Project import
diff --git a/e2fsprogs/.missing-copyright b/e2fsprogs/.missing-copyright
new file mode 100644
index 0000000..d99cb32
--- /dev/null
+++ b/e2fsprogs/.missing-copyright
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+find . -type f \! -name \*~ \! -exec grep -q Begin-Header \{\} \; -print \
+	| grep -v ^./build
diff --git a/e2fsprogs/.release-checklist b/e2fsprogs/.release-checklist
new file mode 100644
index 0000000..414265c
--- /dev/null
+++ b/e2fsprogs/.release-checklist
@@ -0,0 +1,19 @@
+1)  Do "make depend" if necessary
+
+2)  "make check"!!!
+
+3)  Use "git log" to assemble release notes.
+
+4)  Run "(cd po; make e2fsprogs.pot-update)" to update the translation template.
+
+5)  Update files which contain version information
+	version.h
+	README
+	RELEASE-NOTES
+	e2fsprogs.lsm
+	doc/libext2fs.texinfo (three places)
+
+6)  Make source distribution
+
+7)  Adjust sizes in e2fsprogs-VER.lsm; rebuild source files; rebuild RPM files
+
diff --git a/e2fsprogs/ABOUT-NLS b/e2fsprogs/ABOUT-NLS
new file mode 100644
index 0000000..d528f9c
--- /dev/null
+++ b/e2fsprogs/ABOUT-NLS
@@ -0,0 +1,435 @@
+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 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 at translations should contact the appropriate team.
+
+   When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used.  The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+Quick configuration advice
+==========================
+
+   If you want to exploit the full power of internationalization, you
+should configure it using
+
+     ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed.  So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias, message inheritance, automatic
+charset conversion or plural form handling) as the implementation here.
+It is also not possible to offer this additional functionality on top
+of a `catgets' implementation.  Future versions of GNU `gettext' will
+very likely convey even more functionality.  So it might be a good idea
+to change to GNU `gettext' as soon as possible.
+
+   So you need _not_ provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+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.  If not, the GNU `gettext' own
+library will be used.  This library is wholly contained within this
+package, usually in the `intl/' subdirectory, so prior installation of
+the GNU `gettext' package is _not_ required.  Installers may use
+special options at configuration time for changing the default
+behaviour.  The commands:
+
+     ./configure --with-included-gettext
+     ./configure --disable-nls
+
+will respectively bypass any pre-existing `gettext' to use the
+internationalizing routines provided within this package, or else,
+_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.a' file and
+will decide to use this.  This might be not what is desirable.  You
+should use the more recent version of the GNU `gettext' library.  I.e.
+if the file `intl/VERSION' shows that the library which comes with this
+package is more recent, you should use
+
+     ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+   The configuration process will not test for the `catgets' function
+and therefore it will not be used.  The reason is that even an
+emulation of `gettext' on top of `catgets' could not provide all the
+extensions of the GNU `gettext' library.
+
+   Internationalized packages have usually 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.
+
+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.  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 country 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'.
+
+   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.
+
+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://www.iro.umontreal.ca/contrib/po/HTML/', in the "National 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 `translation@iro.umontreal.ca' 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 skill are praised more than
+programming skill, here.
+
+Available Packages
+==================
+
+   Languages are not equally supported in all packages.  The following
+matrix shows the current state of internationalization, as of August
+2002.  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    be bg ca cs da de el en eo es et fi fr
+                     +----------------------------------------+
+     a2ps            |             [] []             []    [] |
+     ap-utils        |                                        |
+     bash            |                []       [] []       [] |
+     bfd             |                            []       [] |
+     binutils        |                            []       [] |
+     bison           |                []          [] []    [] |
+     clisp           |                                        |
+     clisp           |                []    []    []       [] |
+     clisplow        |                                        |
+     cpio            |             [] []          []       [] |
+     darkstat        |             ()                         |
+     diffutils       |          [] [] []       [] []       [] |
+     enscript        |                []                   [] |
+     error           |                []          []       [] |
+     fetchmail       |       [] () [] []          []       () |
+     fileutils       |             [] []          [] []    [] |
+     findutils       |             [] []       [] [] []    [] |
+     flex            |       []    [] []          []       [] |
+     gas             |                            []       [] |
+     gawk            |                []          []       [] |
+     gcal            |       []                            [] |
+     gcc             |                            []       [] |
+     gettext         |       []    [] []          []       [] |
+     gnupg           |       []       [] []    [] [] []    [] |
+     gprof           |                            []       [] |
+     gpsdrive        |             () ()    ()    ()       () |
+     grep            |    [] []       [] []       [] [] [] [] |
+     gretl           |                            []          |
+     gthumb          |                ()          ()       () |
+     hello           |       []    [] [] []    [] [] [] [] [] |
+     id-utils        |             [] []                   [] |
+     indent          |       []       []       []    []    [] |
+     jpilot          |          () [] []                   [] |
+     jwhois          |                            []       [] |
+     kbd             |                []          []       [] |
+     ld              |                            []       [] |
+     libc            |       [] [] [] [] []       []    [] [] |
+     libiconv        |       []       []       [] []          |
+     lifelines       |                ()                   () |
+     lilypond        |             []                      [] |
+     lingoteach      |                         []          [] |
+     lingoteach_lessons|                ()          ()          |
+     lynx            |       [] [] [] []             []       |
+     m4              |          [] [] [] []                [] |
+     make            |             [] []          []       [] |
+     man-db          |       [] () () []          ()       () |
+     mysecretdiary   |                []          []       [] |
+     nano            |       [] () [] []          []       [] |
+     nano_1_0        |       [] () [] []          []       [] |
+     opcodes         |             []             []       [] |
+     parted          |       []    [] []          []       [] |
+     ptx             |             [] []       [] [] [] [] [] |
+     python          |                                        |
+     recode          |             [] [] []    [] []       [] |
+     sed             |       [] [] [] [] []    [] [] [] [] [] |
+     sh-utils        |                []          [] []    [] |
+     sharutils       |          [] [] [] []       [] []    [] |
+     sketch          |                ()          []       () |
+     soundtracker    |                []          []       [] |
+     sp              |                []                      |
+     tar             |          [] [] []          [] []    [] |
+     texinfo         |          [] [] []       []          [] |
+     textutils       |       []    [] []          []       [] |
+     util-linux      |          [] [] []          [] []    [] |
+     vorbis-tools    |                                     [] |
+     wastesedge      |                                        |
+     wdiff           |       []    [] []          [] []    [] |
+     wget            |    [] [] [] [] [] []       [] [] [] [] |
+                     +----------------------------------------+
+                       be bg ca cs da de el en eo es et fi fr
+                        0  2 19 10 30 44  9  1 12 44 17  6 53
+     
+                       gl he hr hu id it ja ko lv nb nl nn
+                     +-------------------------------------+
+     a2ps            |                ()    ()       []    |
+     ap-utils        |                                     |
+     bash            |          []                         |
+     bfd             |                   []                |
+     binutils        |                   []                |
+     bison           |       []       [] []          []    |
+     clisp           |                                     |
+     clisp           |                               []    |
+     clisplow        |                                     |
+     cpio            | []       []          []       []    |
+     darkstat        |                                     |
+     diffutils       | [] []    [] []    []                |
+     enscript        |       []                      []    |
+     error           |          []                         |
+     fetchmail       |                   []                |
+     fileutils       |          []    [] []                |
+     findutils       | []    [] [] [] [] [] []       []    |
+     flex            |                      []             |
+     gas             |                                     |
+     gawk            |    []                               |
+     gcal            |                                     |
+     gcc             |                   []                |
+     gettext         |                   [] []             |
+     gnupg           | []          [] [] []                |
+     gprof           |             []                      |
+     gpsdrive        |          []    ()             ()    |
+     grep            | [] [] [] [] [] [] []                |
+     gretl           |                                     |
+     gthumb          |                () ()                |
+     hello           | [] [] [] [] [] [] [] [] [] [] [] [] |
+     id-utils        |          []                   []    |
+     indent          | []       []       []          []    |
+     jpilot          |                   ()          ()    |
+     jwhois          |          [] []                      |
+     kbd             |                                     |
+     ld              |                                     |
+     libc            | []                [] []    []       |
+     libiconv        | []    [] []                         |
+     lifelines       |                                     |
+     lilypond        |                               []    |
+     lingoteach      |          []                         |
+     lingoteach_lessons|                                     |
+     lynx            |          []    [] []          []    |
+     m4              | []          []    []          []    |
+     make            | [] [] []          [] []       []    |
+     man-db          |                () ()                |
+     mysecretdiary   |             []                      |
+     nano            | []          [] []             []    |
+     nano_1_0        | []          [] []          []    [] |
+     opcodes         |             []                []    |
+     parted          | []                []             [] |
+     ptx             | []       [] []             [] []    |
+     python          |                                     |
+     recode          | [] []          []                   |
+     sed             | [] [] []    [] [] [] []       []    |
+     sh-utils        |                [] []       []       |
+     sharutils       | []                []          []    |
+     sketch          |                ()                   |
+     soundtracker    | []    []                            |
+     sp              |                                     |
+     tar             | []    []    [] [] []       []       |
+     texinfo         |    [] []          []                |
+     textutils       | []                [] []    []       |
+     util-linux      |                () []                |
+     vorbis-tools    |          []                         |
+     wastesedge      |                                     |
+     wdiff           | []       [] []                      |
+     wget            | [] [] [] []       []          []    |
+                     +-------------------------------------+
+                       gl he hr hu id it ja ko lv nb nl nn
+                       23  9 12 19 16 13 26  9  1  7 19  3
+     
+                       no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW
+                     +----------------------------------------------+
+     a2ps            | () () ()  []   []    [] [] []                | 10
+     ap-utils        |                               ()             |  0
+     bash            |           []                                 |  6
+     bfd             |                         [] []                |  5
+     binutils        |                         [] []                |  5
+     bison           |           []   []       [] []                | 12
+     clisp           |                                              |  0
+     clisp           |                                              |  5
+     clisplow        |                                              |  0
+     cpio            |    []     []   []       []                   | 12
+     darkstat        |           []            []        ()    ()   |  2
+     diffutils       |    []     []   []       [] []           []   | 17
+     enscript        |           []   []       [] []                |  8
+     error           |                   []       []           []   |  7
+     fetchmail       |    ()     ()               []                |  6
+     fileutils       |                []    [] [] []     []    []   | 14
+     findutils       |    []     []   [] [] [] [] []                | 21
+     flex            |                []       [] []                |  9
+     gas             |                            []                |  3
+     gawk            |                         [] []                |  6
+     gcal            |                         [] []                |  4
+     gcc             |                            []                |  4
+     gettext         |                [] [] [] [] []           []   | 13
+     gnupg           |    []                   [] []                | 14
+     gprof           |                         [] []                |  5
+     gpsdrive        |                   []    []                   |  3
+     grep            |    []     []   []    []    []                | 20
+     gretl           |                                              |  1
+     gthumb          |           ()   ()       []                   |  1
+     hello           | [] []          [] []    [] [] []             | 28
+     id-utils        |           []   []       [] []                |  9
+     indent          |           []   [] []    [] []                | 14
+     jpilot          | ()                      () []           []   |  5
+     jwhois          |           []   ()       () []           []   |  7
+     kbd             |                         [] []                |  5
+     ld              |                         [] []                |  4
+     libc            | [] []     []      []    [] []                | 18
+     libiconv        |           []   [] []    [] []                | 12
+     lifelines       |                         []                   |  1
+     lilypond        |                         []                   |  4
+     lingoteach      |           []            []                   |  5
+     lingoteach_lessons|                                   ()         |  0
+     lynx            |           []   []       [] []                | 13
+     m4              |    []     []   []       []                   | 13
+     make            |    []     []   []       [] []                | 15
+     man-db          |                                              |  3
+     mysecretdiary   |           []            [] []                |  7
+     nano            |    []          []       []    []             | 13
+     nano_1_0        |    []          []       []    []             | 14
+     opcodes         |           []            [] []                |  8
+     parted          |       []  []            [] []                | 12
+     ptx             | [] [] []  []   []       [] []                | 19
+     python          |                                              |  0
+     recode          |    []     []   []    [] [] []                | 15
+     sed             |           []   [] [] [] [] []                | 24
+     sh-utils        |                []          []                |  9
+     sharutils       |                []       [] []           []   | 14
+     sketch          |           []   ()       []                   |  4
+     soundtracker    |                         []                   |  6
+     sp              |                                              |  1
+     tar             | [] []     []      [] [] [] []                | 19
+     texinfo         |                []       []                   | 10
+     textutils       |                []    [] [] []           []   | 14
+     util-linux      |           []            [] []                | 10
+     vorbis-tools    |                         []                   |  3
+     wastesedge      |                                              |  0
+     wdiff           |           []   [] []    [] []                | 14
+     wget            |    []          [] [] [] [] [] []        []   | 24
+                     +----------------------------------------------+
+       37 teams        no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW
+       68 domains       4 15  2  28   28 12 10 49 43  4   1     9    609
+
+   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 August 2002 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://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
+
+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 Library 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
+to 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
+`translation@iro.umontreal.ca' to make the `.pot' files available to
+the translation teams.
+
diff --git a/e2fsprogs/Android.mk b/e2fsprogs/Android.mk
new file mode 100644
index 0000000..5053e7d
--- /dev/null
+++ b/e2fsprogs/Android.mk
@@ -0,0 +1 @@
+include $(call all-subdir-makefiles)
diff --git a/e2fsprogs/COPYING b/e2fsprogs/COPYING
new file mode 100644
index 0000000..dd1227b
--- /dev/null
+++ b/e2fsprogs/COPYING
@@ -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.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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.
+    		    59 Temple Place, Suite 330, Boston, MA  02111-1307  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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/e2fsprogs/CleanSpec.mk b/e2fsprogs/CleanSpec.mk
new file mode 100644
index 0000000..ded4ceb
--- /dev/null
+++ b/e2fsprogs/CleanSpec.mk
@@ -0,0 +1,51 @@
+# 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)
diff --git a/e2fsprogs/INSTALL b/e2fsprogs/INSTALL
new file mode 100644
index 0000000..b5afd2f
--- /dev/null
+++ b/e2fsprogs/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 liks 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/e2fsprogs/INSTALL.elfbin b/e2fsprogs/INSTALL.elfbin
new file mode 100644
index 0000000..3f54aa1
--- /dev/null
+++ b/e2fsprogs/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 liks 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/e2fsprogs/MCONFIG.in b/e2fsprogs/MCONFIG.in
new file mode 100644
index 0000000..557b37a
--- /dev/null
+++ b/e2fsprogs/MCONFIG.in
@@ -0,0 +1,280 @@
+# Beginning of file MCONFIG
+
+all::
+
+check::
+
+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@
+
+@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@ ifeq ("$(C)", "2")
+@ifGNUmake@   CHECK_CMD=$(CHECK) $(CHECK_OPTS) -Wbitwise -D__CHECK_ENDIAN__
+@ifGNUmake@ else
+@ifGNUmake@   ifeq ("$(C)", "1")
+@ifGNUmake@     CHECK_CMD=$(CHECK) $(CHECK_OPTS)
+@ifGNUmake@    else
+@ifGNUmake@     CHECK_CMD=@true
+@ifGNUmake@   endif
+@ifGNUmake@ endif
+
+@ifNotGNUmake@ CHECK_CMD=@true
+
+CC = @CC@
+BUILD_CC = @BUILD_CC@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @INCLUDES@
+ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
+LDFLAGS = @LDFLAGS@
+ALL_LDFLAGS = $(LDFLAGS) @LDFLAG_DYNAMIC@
+LDFLAGS_STATIC = $(LDFLAGS) @LDFLAG_STATIC@
+BUILD_CFLAGS = @BUILD_CFLAGS@
+BUILD_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@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+
+#
+# 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@
+LIBQUOTA = @STATIC_LIBQUOTA@
+LIBBLKID = @LIBBLKID@ @PRIVATE_LIBS_CMT@ $(LIBUUID)
+LIBINTL = @LIBINTL@
+DEPLIBSS = $(LIB)/libss@LIB_EXT@
+DEPLIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@
+DEPLIBUUID = @DEPLIBUUID@
+DEPLIBQUOTA = @DEPSTATIC_LIBQUOTA@
+DEPLIBBLKID = @DEPLIBBLKID@ @PRIVATE_LIBS_CMT@ $(DEPLIBUUID)
+
+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_LIBQUOTA = @STATIC_LIBQUOTA@
+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_LIBQUOTA = @DEPSTATIC_LIBQUOTA@
+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_LIBQUOTA = @PROFILED_LIBQUOTA@
+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_LIBQUOTA = @PROFILED_LIBQUOTA@
+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 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=c99 -D_XOPEN_SOURCE=600 -D_GNU_SOURCE \
+			-pedantic $(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="@CFLAGS@ $(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup 
+
+gcc-wall:
+	make clean > /dev/null
+	make gcc-wall-new
+
+#
+# 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.checker \
+	$(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.in
+@MAINTAINER_CMT@	cd $(top_srcdir) && autoheader && autoconf
+
+#
+# Make depend magic...
+#
+
+.depend: Makefile $(SRCS) $(top_srcdir)/depfix.sed $(top_srcdir)/wordwrap.pl
+	if test -n "$(SRCS)" ; then \
+		$(CC) -M $(ALL_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/e2fsprogs/MODULE_LICENSE_GPL b/e2fsprogs/MODULE_LICENSE_GPL
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e2fsprogs/MODULE_LICENSE_GPL
diff --git a/e2fsprogs/Makefile.in b/e2fsprogs/Makefile.in
new file mode 100644
index 0000000..f327d19
--- /dev/null
+++ b/e2fsprogs/Makefile.in
@@ -0,0 +1,148 @@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = .
+my_dir = .
+INSTALL = @INSTALL@
+
+@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
+QUOTA_LIB_SUBDIR= lib/quota
+
+LIB_SUBDIRS=lib/et lib/ss lib/e2p $(UUID_LIB_SUBDIR) lib/ext2fs $(BLKID_LIB_SUBDIR) $(QUOTA_LIB_SUBDIR) intl
+PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po
+SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
+
+SUBS= util/subst.conf lib/config.h lib/dirpaths.h \
+	lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
+
+TAR=tar
+
+all:: subs
+	$(MAKE) libs
+	$(MAKE) progs
+	$(MAKE) docs
+
+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)
+
+progs: all-progs-recursive
+libs: all-libs-recursive
+all-progs-recursive all-libs-recursive: subs
+
+e2fsprogs.spec: $(DEP_SUBSTITUTE) e2fsprogs.spec.in
+	cd $(top_builddir); CONFIG_FILES=./e2fsprogs.spec ./config.status
+
+rpm: e2fsprogs.spec
+	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
+	if test ! -d e2fsck && test ! -d debugfs && test ! -d misc && test ! -d ext2ed ; then $(MAKE) install-libs ; fi
+
+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
+
+check-recursive: all
+
+TAGS clean-recursive distclean-recursive depend-recursive check-recursive \
+  mostlyclean-recursive realclean-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: all-libs-recursive
+	@for subdir in $(PROG_SUBDIRS); do \
+	  if test -d $$subdir ; then \
+	    target=`echo $@|$(SED) 's/-progs-recursive//'`; \
+	    echo making $$target in $$subdir; \
+	    (cd $$subdir && $(MAKE) $$target) || exit 1; \
+	  fi ; \
+	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:
+	@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 e2fsprogs.spec ext2ed/Makefile po/stamp-po
+	$(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
+
diff --git a/e2fsprogs/NOTICE b/e2fsprogs/NOTICE
new file mode 100644
index 0000000..dd1227b
--- /dev/null
+++ b/e2fsprogs/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.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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.
+    		    59 Temple Place, Suite 330, Boston, MA  02111-1307  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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/e2fsprogs/README b/e2fsprogs/README
new file mode 100644
index 0000000..85645a6
--- /dev/null
+++ b/e2fsprogs/README
@@ -0,0 +1,19 @@
+	This is the new version (1.42.9) 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/e2fsprogs/README.subset b/e2fsprogs/README.subset
new file mode 100644
index 0000000..70ed4b2
--- /dev/null
+++ b/e2fsprogs/README.subset
@@ -0,0 +1,15 @@
+This distribution contains a subset of the e2fsprogs package; it
+contains the base libraries (ss, et, uuid, blkid) which may be used by
+other non-ext2-related applications.
+
+This may be useful for non-Linux operating systems that need these
+libraries for GNOME, but who do not need the ext2/ext3 filesystem
+utilities.
+
+The full e2fsprogs distributions can be found at the e2fsprogs web
+page, which is:
+
+	http://e2fsprogs.sourceforge.net
+
+In case of bugs in these libraries, please contact Ted Ts'o at
+tytso@mit.edu or tytso@alum.mit.edu.
diff --git a/e2fsprogs/README.version b/e2fsprogs/README.version
new file mode 100644
index 0000000..851c4e8
--- /dev/null
+++ b/e2fsprogs/README.version
@@ -0,0 +1,3 @@
+URL: https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.42.9/e2fsprogs-1.42.9.tar.gz
+Version: 1.42.9
+BugComponent: 95221
diff --git a/e2fsprogs/RELEASE-NOTES b/e2fsprogs/RELEASE-NOTES
new file mode 100644
index 0000000..e3db1b0
--- /dev/null
+++ b/e2fsprogs/RELEASE-NOTES
@@ -0,0 +1,7487 @@
+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 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 depreated (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, Sweedish, 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 worng 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 uninitalized 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, Sweedish, 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 progam 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 accross 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 buildd 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 flie 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 cheksums 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 Sweedish translation 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 segault 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 signalling 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 epsecially 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 unitialized 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 gression 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).
+
+
+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 concicse 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 controled 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 journaling.  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 instad 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 Sweedish translation 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 filefrag program for files that have more than 144 extents.
+
+Update French, Polish, Czech, Indonsian, and Sweedish translation 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
+uninitalized 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 fileds in the sup0erblock
+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 filefrag progam 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 priary 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 posible 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 devncie number in /dev/mapper.
+
+Fix blkid to prefer /dev/mapper/<name> device names instad 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 progam 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
+daeomn.  (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 presuambly
+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 Sstate 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 casued 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.
+
+Accomodations 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 fack 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 Sweedish translation 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 leack 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 occasionaly 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 intrduced a bug in libext2fs which casued 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, Sweedish,
+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 varienty 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.  Unfortuntaely 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 abbrevation.
+
+Various namespace leackages 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 beused 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 avanced shell constructs such as $().
+
+The "make rpm" command will now take some extra configure optiosn 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 oveflow 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 librares 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.
+
+
+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 journaled.
+
+Updated German, Dutch, Sweedish, 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, Sweedish, 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 incorect combination of
+resize_inode and meta_bg, which had previously caused mke2fs to create
+a corrupt fileystem.
+
+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, Sweedish, 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)
+    
+Inhance 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 sytax 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, Sweedish, 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
+compatibity 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 supprt 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 translations 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 hueristics 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 unstall" 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
+clena 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 cuase 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 salvange
+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 priorty 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.
+
+Impove 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 filesystes 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-criticial
+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.
+
+
+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 freespace.
+
+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 cirucmstances
+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.  Finallly, 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.
+
+
+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 Sourcefroge 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 ommited 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 abbrevations 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 overriden via the E2FSCK_TIME environment
+variable for use in regression tests.
+
+The test scrpit 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.
+
+
+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.
+
+
+E2fsprogs 1.36 (February 4, 2005)
+=================================
+
+All of the patches that were applied to Fedore 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 parition 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 conherency 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 newsly 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 enviroment 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 whan 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 nottrustworthy.
+
+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 speeded 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 guielines.  "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 reubuild 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)
+
+
+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 longjump 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.
+
+
+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 journaling
+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 wihch 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 abbrevations in e2fsck
+ - Remove de-utf.po, since we shouldn't have two versions using different
+	charset encodings.
+ - Used ngettext() (abbreivated 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 compaibility 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.
+
+
+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.
+
+E2fsprogs 1.32 (Nomvember 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.
+
+
+E2fsprogs 1.31 (Nomvember 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 unexpectly.  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 debuging 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.
+
+Lshattr will now display the indexed directory flag.  Also, some of
+the more esoteric compression flags are supressed unless compression
+support has been enabled.
+
+Update man pages.
+
+
+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 wil 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 obselete 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 incomat 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 apporpriate 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 bug where efsck 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)
+
+
+E2fsprogs 1.29 (September 24, 2002)
+===================================
+
+Fixed a bug in e2fsck which could corrupt a directory when optimizing
+it (via the -D option) or rebuiliding 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.  :-)
+
+
+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 relcating 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 formated 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 incorrectl 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 swampped 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.
+  
+
+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 journaling 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.
+
+
+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 searchs 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 alreadyy-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 compeltely 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 paraemter 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.
+
+
+E2fsprogs 1.25 (September 20, 2001)
+===================================
+
+This is primarily a bug-fix release; no new features were added, but
+there are a number of embarassing 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).
+
+
+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 hueristics 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 necesssary.
+
+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 externla journal debice when removing.  
+
+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)
+
+
+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 characgters from text files,
+and changed the top-level Makefile.in to avoid including BitKeeper
+files when generating the source tarball.
+
+
+E2fsprogs 1.21 (June 15, 2001)
+==============================
+
+Added new configure flags which allow a subset e2fsprogs to be built;
+this is most useful for boot floopies, 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 journaling 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
+intrudced 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 unneeded argsused #pragma.
+
+
+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
+journaling, 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 terrabyte
+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.
+
+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 journaling 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 agressive 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 swampped 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 filestype 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.
+
+Debufs'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.
+
+
+
+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 prepratory command
+before running e2fsck.
+
+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.
+
+
+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 filesystsem 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 unresonable (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.
+
+
+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 muliple)
+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 hueristics 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 messsage
+	* 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 interarting 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 lirbary 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 convetions 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.
+
+
+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.
+
+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 formating 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 substition 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...
+
+E2fsprogs 1.12 (July 9, 1998)
+==================================
+
+E2fsprogs now works with glibc (at least with the version shipped wtih
+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 subsitutes 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 wheren't explicit enough.
+
+Added special case byte-swapping code if compiling on the PowerPC, to
+accomodate 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 fucntion 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 generla, 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.
+
+
+E2fsprosg 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
+bassed 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.
+
+
+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
+cirmcustances, 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).
+
+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.
+
+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 mesasage 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.
+
+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 customizeable 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 e2fsk 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 envirnoment
+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.
+
+
+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 "MANAULLY" 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();
+
+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 robuest 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 preserve to preserve the ownernship, 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 pathame 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.
+
+
+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 presense of libraries that otherwise
+  could be removed from a rescuse 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".
+
+
+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 casued 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 filesytems.  This is not the safest thing in the world to
+do, but some system administrators really wanted it.
+
+Fixed -Wall flames in lib/ss.
+
+
+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 filesytem.
+
+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/e2fsprogs/SHLIBS b/e2fsprogs/SHLIBS
new file mode 100644
index 0000000..2fcbbc3
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/SUBMITTING-PATCHES b/e2fsprogs/SUBMITTING-PATCHES
new file mode 100644
index 0000000..189deb3
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/TODO b/e2fsprogs/TODO
new file mode 100644
index 0000000..d531d17
--- /dev/null
+++ b/e2fsprogs/TODO
@@ -0,0 +1,277 @@
+Need to process the bad block inode *before* doing the inode scan.
+
+Also check to see if the first block of the inode table is not on the
+bad block scan, and fix that.  We need to check for an inaccurate
+blocks, and fix them before we start doing anything else with the
+filesystem!
+
+---------------------------------------------------
+User request:
+
+BTW: Could you please add some sort of deleted and possibly corrupted file
+     and inode list to e2fsck report. There should be filenames deleted
+     from directory inodes, files with duplicate blocks e.t.c.
+     It's pretty annoying to filter this information from e2fsck output
+     by hand :-
+
+------------------------------------------
+
+Add a "answer Yes always to this class of question" response.
+
+----------------------------------
+
+ext2fs_flush() should return a different error message for primary
+versus backup superblock flushing, so that mke2fs can print an
+appropriate error message.
+
+---------------------------------
+Date: Mon, 08 Mar 1999 21:46:14 +0100
+From: Sergio Polini <s.polini@mclink.it>
+
+
+I'm reading the sorce code of e2fsck 1.14.
+In pass2.c, lines 352-357, I read:
+
+if ((dirent->name_len & 0xFF) > EXT2_NAME_LEN) {
+        if (fix_problem(ctx, PR_2_FILENAME_LONG, &cd->pctx)) {
+                dirent->name_len = EXT2_NAME_LEN;
+                dir_modified++;
+        }
+}
+
+I think that I'll never see any messages about too long filenames,
+because "whatever & 0xFF" can never be "> 0xFF".
+Am I wrong?
+--------------------------------------
+
+Add chmod command to debugfs.
+
+------------------------------------------
+
+Date: Tue, 18 Jan 2000 17:54:53 -0800 (PST)
+From: Alan Blanchard <alan@abraxas.to>
+To: tytso@MIT.EDU
+Subject: DEBUGFS - thanks and a feature idea
+Content-Type: TEXT/PLAIN; charset=US-ASCII
+
+Theodore:
+
+First, let me thank you for writing debugfs. Recently, my Linux box
+(RH 6.0, 400 MHz PIII, on a DSL line) was hacked into.  The intruder did
+an "rm -Rf" on a 34 GB drive with about 5GB of data on it.  I was able to
+restore essentially the entire thing with debugfs and a bit of C code and Perl.
+Actually, I could have done the entire thing with debugfs and Perl, but I
+thought it would be too slow.
+
+During this exercise, I noticed that one small feature was lacking that would
+have made my job a bit easier.  The length of a deleted directory is
+reported as 0, hence debugfs won't dump the contents of the directory to a
+file using the "dump" command.  The only thing that saved me was that the
+list of disk blocks is not zeroed out.  I was able to dump the contents of the
+directories by using debugfs to get the relevant block numbers, then
+using dd to get the actual data.
+
+If debugfs had a feature where it ignored the size of a directory reported by
+the inode and instead just dumped all the blocks, it would have facilited
+things a bit. This seems like a very easy feature to add.
+
+Again, thanks for writing debugfs (and all the other Linux stuff you've written!).
+
+Cheers,
+Alan Blanchard
+alan@abraxas.to
+
+
+-------------------------------------------------------------------
+
+Date: Fri, 21 Jan 2000 14:07:12 -0800
+From: "H. Peter Anvin" <hpa@www.transmeta.com>
+Subject: mkfs -cc and fsck -c
+
+b) An option to mkfs to zero the partition.  Yes, it can be done with
+dd, but it would be a nicer way of doing it.
+
+------------------------------------------------------------------
+
+Add support for in ext2fs_block_iterate() for a returning the
+compressed flag blocks to block_iterate.  Change default to not return
+EXT2_COMPRESSED_BLKADDR.  Change e2fsck to pass this flag in.
+
+(The old compression patches did this by default all the time, which
+is bad, since it meant e2fsck never saw the EXT2_COMPRESSED_BLKADDR
+flagword.
+
+------------------------------------------------------------
+
+E2fsck should offer to clear all the blocks in an indirect block, not
+the entire inode, so there's better recovery for when an indirect
+block gets trashed.
+
+
+-------------------------------------------------------------
+
+From: Yann Dirson - LOGATIQUE <Yann.Dirson@France.Sun.COM>
+Date: Thu, 2 Mar 2000 13:52:13 +0100 (MET)
+
+During my experiments on the broken system, I noticed the following in
+the badblocks program (which I'm aware is not designed for IDE drives)
+- I'd probably have already fixed them if my home system was up :(
+
+* the syntax summary documents 2nd arg as blocks_count, which should
+probably read something like end_count.
+
+* testing past end of device is not detected, and lists those blocks
+as bad, whereas they simply do not exist.
+
+
+I think I'll probably add a "max count" option to findsuper(8), so
+that I do not have to wait for the whole disk to be scanned when the
+system had to be launched with "init=/bin/sh", in which case Ctrl-[CZ]
+and friends appear to be absolutely ignored.
+
+
+Somewhat unrelated, I just noticed the
+http://web.mit.edu/tytso/www/linux/ext2.html could be updated:
+
+- could mention SGI xfs (http://oss.sgi.com/projects/xfs/ - they just
+  release 0.03 snapshot)
+
+----------------------------------------------------------------
+
+Return-Path: <tytso@MIT.EDU>
+Date: Thu, 10 Feb 2000 13:20:14 -0500
+From: "Theodore Y. Ts'o" <tytso@MIT.EDU>
+To: R.E.Wolff@BitWizard.nl
+In-Reply-To: Rogier Wolff's message of Thu, 10 Feb 2000 08:46:30 +0100 (MET),
+	<200002100746.IAA24573@cave.bitwizard.nl>
+Subject: Re: e2fsck request for enhancement.
+Phone: (781) 391-3464
+
+   Date: Thu, 10 Feb 2000 08:46:30 +0100 (MET)
+   From: R.E.Wolff@BitWizard.nl (Rogier Wolff)
+
+   Lately, while trying to recover a broken disk, my system froze (twice,
+   until I tried something else) while copying the disk.
+
+   So I had a file of about 50Mb that was growing frantically at the
+   moment of the crash.
+
+   e2fsck, then finds an indirect block that is completely bogus. It
+   starts by asking me if it's ok to clear a few of the referenced
+   blocks. I say yes. Then it comes to the conclusion: 
+
+      too many invalid blocks. Clear inode?
+
+   and then I get the option to delete the whole file. Not to truncate
+   the file to a "working" size.
+
+
+   I'd MUCH rather have e2fsck say something like:
+
+      inode 1234 references an invalid block 134345454. Hmm.
+      inode 1234 references 567 out of 50176 invalid blocks, 
+			  all near the end. Truncate file to 49152 blocks?
+
+   Here you can see that of the 1024 blocks near the end of the file,
+   only 567 were detected as invalid. However now 48Mb of the file will
+   be recovered, instead of thrown away.
+
+That's a good point.  Actually, the right thing is for e2fsck to offer
+to clear all of the bad blocks in a particular indirect block.  I don't
+know how hard it would be to do that, but I'll put it on my e2fsprogs
+TODO list.
+
+							- Ted
+
+---------------------------------------------------------------
+From e2fsprogs Debian TODO file as of 1.10-13.
+
+* Maybe make -dbg packages. Look at how others do it.
+
+---------------------------------------------------------------
+
+Add --lba option to debian icheck command, and have ways of making it
+easier to translate LBA to filesystem block numbers.
+
+-------------------------------------------------------
+
+
+
+List of projects for e2fsprogs:
+
+
+1) Make debugfs's "ncheck <inode>" command list all of the pathnames
+to an inode, not just only the first link to the inode which is found.
+(A good "intro to libext2fs programming interfaces project)
+
+	Difficulty: Low		Priority: Low
+
+2) Use a code coverage tool such as Rational's PureCoverage to see
+what kind of code coverage we have for e2fsck, and try to add test
+cases to increase the code coverage for e2fsck.
+
+	Difficulty: Medium	Priorty: Low
+
+3) Use a code coverage tool such as Rational's PureCoverage to see
+what kind of code coverage we have for resize2fs, and try to add test
+cases to increase the code coverage for resize2fs.
+
+	Difficulty: Medium	Priorty: Medium
+
+4) Create a new I/O manager (i.e., test_io.c, unix_io.c, et.al.) which
+layers on top of an existing I/O manager which provides copy-on-write
+functionality.  This COW I/O manager takes will take two open I/O
+managers, call them "base" and "changed".  The "base" I/O manager is
+opened read/only, so any changes are written instead to the "changed"
+I/O manager, in a compact, non-sparse format containing the intended
+modification to the "base" filesystem.  
+
+This will allow resize2fs to figure out what changes need to made to
+extend a filesystem, or expand the size of inodes in the inode table,
+and the changes can be pushed the filesystem in one fell swoop.  (If
+the system crashes; the program which runs the "changed" file can be
+re-run, much like a journal replay.  My assumption is that the COW
+file will contain the filesystem UUID in a the COW superblock, and the
+COW file will be stored in some place such as /var/state/e2fsprogs,
+with an init.d file to automate the replay so we can recover cleanly
+from a crash during the resize2fs process.)
+
+	Difficulty: Medium	Priority: Medium
+
+5) Create a new I/O manager (i.e., test_io.c, unix_io.c, et.al.) which
+layers on top of an existing I/O manager which provides an "undo"
+functionality.  This undo I/O manager takes will take two open I/O
+managers, call them "base" and "undo".  The "base" I/O manager is be
+opened read/write, and when any writes are sent to the I/O manager,
+the I/O manager will check the "undo" I/O manager, using a file format
+identical to the one found in (5) above.  
+
+This is useful for allowing e2fsck to create an "undo" file, which
+would make things like "e2fsck -y" much safer.
+
+	Difficulty: Low (once 5 is done)  Priority: Low
+
+6) Modify resize2fs so that it can relocate and reorganize the
+filesystem in the following ways: (1) increase the inode size, so that
+an existing filesystem can use the EA-in-inode kernel patch, (2)
+reserve blocks in the resize inode to allow for on-line resizing.  Use
+the COW I/O manager described in (5) in order to provide robustness in
+case of a crash during the resize/reorganization operation.  
+
+	Difficulty: High	Priority: Medium
+
+7) Review the EA-in-inode patches to e2fsck for correctness/code
+cleanliness.  (I will probably have to do this myself -- Ted)
+
+	Difficulty: High	Priorty: Medium
+
+8) Add support for extent maps to e2fsprogs.  I need to review the
+extent maps first/in parallel. 
+
+	Difficulty: High	Priority: Medium
+
+----------------------------------
+
+Need to deal with the case where the resize inode overlaps with the
+bad blocks inode.
+
diff --git a/e2fsprogs/aclocal.m4 b/e2fsprogs/aclocal.m4
new file mode 100644
index 0000000..6fd4652
--- /dev/null
+++ b/e2fsprogs/aclocal.m4
@@ -0,0 +1,2777 @@
+# codeset.m4 serial AM1 (gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+    [AC_TRY_LINK([#include <langinfo.h>],
+      [char* cs = nl_langinfo(CODESET);],
+      am_cv_langinfo_codeset=yes,
+      am_cv_langinfo_codeset=no)
+    ])
+  if test $am_cv_langinfo_codeset = yes; then
+    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+  fi
+])
+# gettext.m4 serial 28 (gettext-0.13)
+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library 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 Library General Public License, and the rest of the GNU
+dnl gettext package 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.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl    default (if it is not specified or empty) is 'no-libtool'.
+dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+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). If INTLSYMBOL is 'no-libtool', a static library
+dnl    $(top_builddir)/intl/libintl.a will be created.
+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], [no-libtool], , [ifelse([$1], [use-libtool], ,
+    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+  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]))
+  define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
+
+  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 test "$gt_cv_func_gnugettext_libc" != "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 only in autoconf >= 2.52 and not
+  dnl documented, we avoid it.
+  ifelse(gt_included_intl, yes, , [
+    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+  ])
+
+  dnl Set USE_NLS.
+  AM_NLS
+
+  ifelse(gt_included_intl, yes, [
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+  ])
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+  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.
+
+        dnl Add a version number to the cache macros.
+        define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
+        define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
+        define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
+
+        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
+         [AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#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
+], [])[extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+            [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
+            gt_cv_func_gnugettext_libc=yes,
+            gt_cv_func_gnugettext_libc=no)])
+
+        if test "$gt_cv_func_gnugettext_libc" != "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_cv_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_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#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
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();],
+              [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+              gt_cv_func_gnugettext_libintl=yes,
+              gt_cv_func_gnugettext_libintl=no)
+            dnl Now see whether libintl exists and depends on libiconv.
+            if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#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
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();],
+                [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+               [LIBINTL="$LIBINTL $LIBICONV"
+                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                gt_cv_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 test "$gt_cv_func_gnugettext_libc" = "yes" \
+           || { test "$gt_cv_func_gnugettext_libintl" = "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.[]gt_libtool_suffix_prefix[]a $LIBICONV"
+        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
+        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+      fi
+
+      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 "$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 test "$gt_cv_func_gnugettext_libintl" = "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 test "$gt_cv_func_gnugettext_libintl" = "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 If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+    dnl to 'yes' because some of the testsuite requires it.
+    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
+
+    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 configure.ins may be using this.
+    nls_cv_header_intl=
+    nls_cv_header_libgt=
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    DATADIRNAME=share
+    AC_SUBST(DATADIRNAME)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INSTOBJEXT=.mo
+    AC_SUBST(INSTOBJEXT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    GENCAT=gencat
+    AC_SUBST(GENCAT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    if test "$USE_INCLUDED_LIBINTL" = yes; then
+      INTLOBJS="\$(GETTOBJS)"
+    fi
+    AC_SUBST(INTLOBJS)
+
+    dnl Enable libtool support if the surrounding package wishes it.
+    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+  ])
+
+  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 Checks for all prerequisites of the intl subdirectory,
+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
+dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+AC_DEFUN([AM_INTL_SUBDIR],
+[
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+  AC_REQUIRE([AC_PROG_CC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl
+  AC_REQUIRE([AC_PROG_RANLIB])dnl
+  AC_REQUIRE([AC_ISC_POSIX])dnl
+  AC_REQUIRE([AC_HEADER_STDC])dnl
+  AC_REQUIRE([AC_C_CONST])dnl
+  AC_REQUIRE([bh_C_SIGNED])dnl
+  AC_REQUIRE([AC_C_INLINE])dnl
+  AC_REQUIRE([AC_TYPE_OFF_T])dnl
+  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+  AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl
+  AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
+  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
+  AC_REQUIRE([gt_TYPE_WINT_T])dnl
+  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
+  AC_REQUIRE([gt_TYPE_INTMAX_T])
+  AC_REQUIRE([gt_PRINTF_POSIX])
+  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+  AC_REQUIRE([AC_FUNC_MMAP])dnl
+  AC_REQUIRE([jm_GLIBC21])dnl
+  AC_REQUIRE([gt_INTDIV0])dnl
+  AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
+  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
+  AC_REQUIRE([gt_INTTYPES_PRI])dnl
+  AC_REQUIRE([gl_XSIZE])dnl
+
+  AC_CHECK_TYPE([ptrdiff_t], ,
+    [AC_DEFINE([ptrdiff_t], [long],
+       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
+    ])
+  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h unistd.h sys/param.h])
+  AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
+mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
+strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
+__fsetlocking])
+
+  dnl Use the _snprintf function only if it is declared (because on NetBSD it
+  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
+  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
+  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
+
+  dnl Use the *_unlocked functions only if they are declared.
+  dnl (because some of them were defined without being declared in Solaris
+  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+  dnl on Solaris 2.5.1 to run on Solaris 2.6).
+  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
+  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
+  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
+  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
+
+  case $gt_cv_func_printf_posix in
+    *yes) HAVE_POSIX_PRINTF=1 ;;
+    *) HAVE_POSIX_PRINTF=0 ;;
+  esac
+  AC_SUBST([HAVE_POSIX_PRINTF])
+  if test "$ac_cv_func_asprintf" = yes; then
+    HAVE_ASPRINTF=1
+  else
+    HAVE_ASPRINTF=0
+  fi
+  AC_SUBST([HAVE_ASPRINTF])
+  if test "$ac_cv_func_snprintf" = yes; then
+    HAVE_SNPRINTF=1
+  else
+    HAVE_SNPRINTF=0
+  fi
+  AC_SUBST([HAVE_SNPRINTF])
+  if test "$ac_cv_func_wprintf" = yes; then
+    HAVE_WPRINTF=1
+  else
+    HAVE_WPRINTF=0
+  fi
+  AC_SUBST([HAVE_WPRINTF])
+
+  AM_ICONV
+  AM_LANGINFO_CODESET
+  if test $ac_cv_header_locale_h = yes; then
+    AM_LC_MESSAGES
+  fi
+
+  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+  dnl because plural.y uses bison specific features. It requires at least
+  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+  dnl compile.
+  dnl bison is only needed for the maintainer (who touches plural.y). But in
+  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+  dnl the rule in general Makefile. Now, some people carelessly touch the
+  dnl files or have a broken "make" program, hence the plural.c rule will
+  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+  dnl present or too old.
+  AC_CHECK_PROGS([INTLBISON], [bison])
+  if test -z "$INTLBISON"; then
+    ac_verc_fail=yes
+  else
+    dnl Found it, now check the version.
+    AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+    case $ac_prog_version in
+      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+    esac
+    AC_MSG_RESULT([$ac_prog_version])
+  fi
+  if test $ac_verc_fail = yes; then
+    INTLBISON=:
+  fi
+])
+
+
+dnl gt_CHECK_DECL(FUNC, INCLUDES)
+dnl Check whether a function is declared.
+AC_DEFUN([gt_CHECK_DECL],
+[
+  AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
+    [AC_TRY_COMPILE([$2], [
+#ifndef $1
+  char *p = (char *) $1;
+#endif
+], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
+  if test $ac_cv_have_decl_$1 = yes; then
+    gt_value=1
+  else
+    gt_value=0
+  fi
+  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
+    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
+# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([jm_GLIBC21],
+  [
+    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+      ac_cv_gnu_library_2_1,
+      [AC_EGREP_CPP([Lucky GNU user],
+	[
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+  Lucky GNU user
+ #endif
+#endif
+	],
+	ac_cv_gnu_library_2_1=yes,
+	ac_cv_gnu_library_2_1=no)
+      ]
+    )
+    AC_SUBST(GLIBC21)
+    GLIBC21="$ac_cv_gnu_library_2_1"
+  ]
+)
+# iconv.m4 serial AM4 (gettext-0.11.3)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+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).
+
+  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_TRY_LINK will then fail, the second AC_TRY_LINK 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_TRY_LINK([#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_TRY_LINK([#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_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+  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)
+])
+
+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_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || 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([$]{ac_t:-
+         }[$]am_cv_proto_iconv)
+    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+      [Define as const if the declaration of iconv() needs const.])
+  fi
+])
+# intdiv0.m4 serial 1 (gettext-0.11.3)
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gt_INTDIV0],
+[
+  AC_REQUIRE([AC_PROG_CC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
+    gt_cv_int_divbyzero_sigfpe,
+    [
+      AC_TRY_RUN([
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
+#else
+sigfpe_handler (sig) int sig;
+#endif
+{
+  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
+  exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+  signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+  signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL.  */
+#if defined (__sparc__) && defined (__linux__)
+  signal (SIGILL, sigfpe_handler);
+#endif
+
+  z = x / y;
+  nan = y / y;
+  exit (1);
+}
+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
+        [
+          # Guess based on the CPU.
+          case "$host_cpu" in
+            alpha* | i[34567]86 | m68k | s390*)
+              gt_cv_int_divbyzero_sigfpe="guessing yes";;
+            *)
+              gt_cv_int_divbyzero_sigfpe="guessing no";;
+          esac
+        ])
+    ])
+  case "$gt_cv_int_divbyzero_sigfpe" in
+    *yes) value=1;;
+    *) value=0;;
+  esac
+  AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
+    [Define if integer division by zero raises signal SIGFPE.])
+])
+# intmax.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+dnl Test whether the system has the 'intmax_t' type, but don't attempt to
+dnl find a replacement if it is lacking.
+
+AC_DEFUN([gt_TYPE_INTMAX_T],
+[
+  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
+  AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
+    [AC_TRY_COMPILE([
+#include <stddef.h> 
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
+  if test $gt_cv_c_intmax_t = yes; then
+    AC_DEFINE(HAVE_INTMAX_T, 1,
+      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+  fi
+])
+# inttypes.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
+# <sys/types.h>.
+
+AC_DEFUN([gt_HEADER_INTTYPES_H],
+[
+  AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
+  [
+    AC_TRY_COMPILE(
+      [#include <sys/types.h>
+#include <inttypes.h>],
+      [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
+  ])
+  if test $gt_cv_header_inttypes_h = yes; then
+    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
+      [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
+  fi
+])
+# inttypes_h.m4 serial 5 (gettext-0.12)
+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
+[
+  AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
+  [AC_TRY_COMPILE(
+    [#include <sys/types.h>
+#include <inttypes.h>],
+    [uintmax_t i = (uintmax_t) -1;],
+    jm_ac_cv_header_inttypes_h=yes,
+    jm_ac_cv_header_inttypes_h=no)])
+  if test $jm_ac_cv_header_inttypes_h = yes; then
+    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
+      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+       and declares uintmax_t. ])
+  fi
+])
+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values.  This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+  AC_REQUIRE([gt_HEADER_INTTYPES_H])
+  if test $gt_cv_header_inttypes_h = yes; then
+    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+      gt_cv_inttypes_pri_broken,
+      [
+        AC_TRY_COMPILE([#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
+      ])
+  fi
+  if test "$gt_cv_inttypes_pri_broken" = yes; then
+    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
+      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+  fi
+])
+# isc-posix.m4 serial 2 (gettext-0.11.2)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
+
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+  [
+    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+  ]
+)
+# lcmessage.m4 serial 3 (gettext-0.11.3)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library 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 Library General Public License, and the rest of the GNU
+dnl gettext package 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.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([AM_LC_MESSAGES],
+[
+  AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+  if test $am_cv_val_LC_MESSAGES = yes; then
+    AC_DEFINE(HAVE_LC_MESSAGES, 1,
+      [Define if your <locale.h> file defines LC_MESSAGES.])
+  fi
+])
+# lib-ld.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.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 ld's 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-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by GCC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]* | [A-Za-z]:[\\/]*)]
+      [re_direlt='/[^/][^/]*/\.\./']
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    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 GNU ld's 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="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
+# lib-link.m4 serial 4 (gettext-0.12)
+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+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.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[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"
+  ])
+  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  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
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+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. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl 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.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[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"
+    LIBS="$LIBS $LIB[]NAME"
+    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+    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 $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=
+  fi
+  AC_SUBST([HAVE_LIB]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
+dnl hardcode_direct, hardcode_minus_L.
+AC_DEFUN([AC_LIB_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"
+  libext="$acl_cv_libext"
+  shlibext="$acl_cv_shlibext"
+  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  hardcode_direct="$acl_cv_hardcode_direct"
+  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_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.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  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_LIB_ARG_WITH([lib$1-prefix],
+[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
+  --without-lib$1-prefix     don't search for lib$1 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/lib"
+      fi
+    fi
+])
+  dnl Search the library and its dependencies in $additional_libdir and
+  dnl $LDFLAGS. Using breadth-first-seach.
+  LIB[]NAME=
+  LTLIB[]NAME=
+  INC[]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=
+          if test $use_additional = yes; then
+            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+              found_dir="$additional_libdir"
+              found_so="$additional_libdir/lib$name.$shlibext"
+              if test -f "$additional_libdir/lib$name.la"; then
+                found_la="$additional_libdir/lib$name.la"
+              fi
+            else
+              if test -f "$additional_libdir/lib$name.$libext"; then
+                found_dir="$additional_libdir"
+                found_a="$additional_libdir/lib$name.$libext"
+                if test -f "$additional_libdir/lib$name.la"; then
+                  found_la="$additional_libdir/lib$name.la"
+                fi
+              fi
+            fi
+          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//'`
+                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                    found_dir="$dir"
+                    found_so="$dir/lib$name.$shlibext"
+                    if test -f "$dir/lib$name.la"; then
+                      found_la="$dir/lib$name.la"
+                    fi
+                  else
+                    if test -f "$dir/lib$name.$libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/lib$name.$libext"
+                      if test -f "$dir/lib$name.la"; then
+                        found_la="$dir/lib$name.la"
+                      fi
+                    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/lib"; 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 "$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 "$hardcode_libdir_flag_spec" && test "$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 "$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 $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
+              */lib | */lib/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+                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*) 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*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                    dnl Potentially add $additional_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$additional_libdir" != "X/usr/lib"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/lib"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux*) 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$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LIBNAME.
+                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_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$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LTLIBNAME.
+                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_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 "$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:+$hardcode_libdir_separator}$found_dir"
+      done
+      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+      acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$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=\"$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
+])
+
+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
+])
+# lib-prefix.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+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_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_LIB_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/lib"
+      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*) 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/lib"; 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/lib"; 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"
+])
+# longdouble.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+dnl Test whether the compiler supports the 'long double' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_LONGDOUBLE],
+[
+  AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
+    [if test "$GCC" = yes; then
+       gt_cv_c_long_double=yes
+     else
+       AC_TRY_COMPILE([
+         /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
+         long double foo = 0.0;
+         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
+         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
+         ], ,
+         gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
+     fi])
+  if test $gt_cv_c_long_double = yes; then
+    AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
+  fi
+])
+# longlong.m4 serial 4
+dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_LONG_LONG if 'long long' works.
+
+AC_DEFUN([jm_AC_TYPE_LONG_LONG],
+[
+  AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
+  [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
+    [long long llmax = (long long) -1;
+     return ll << i | ll >> i | llmax / ll | llmax % ll;],
+    ac_cv_type_long_long=yes,
+    ac_cv_type_long_long=no)])
+  if test $ac_cv_type_long_long = yes; then
+    AC_DEFINE(HAVE_LONG_LONG, 1,
+      [Define if you have the 'long long' type.])
+  fi
+])
+# nls.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library 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 Library General Public License, and the rest of the GNU
+dnl gettext package 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_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)
+])
+
+AC_DEFUN([AM_MKINSTALLDIRS],
+[
+  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
+  dnl Try to locate it.
+  MKINSTALLDIRS=
+  if test -n "$ac_aux_dir"; then
+    case "$ac_aux_dir" in
+      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+    esac
+  fi
+  if test -z "$MKINSTALLDIRS"; then
+    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+  fi
+  AC_SUBST(MKINSTALLDIRS)
+])
+# po.m4 serial 3 (gettext-0.14)
+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library 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 Library General Public License, and the rest of the GNU
+dnl gettext package 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.
+
+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([AM_MKINSTALLDIRS])dnl
+  AC_REQUIRE([AM_NLS])dnl
+
+  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 >/dev/null 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 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 >/dev/null 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 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 >/dev/null 2>&1], :)
+
+  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+  dnl Test whether we really found GNU msgfmt.
+  if test "$GMSGFMT" != ":"; then
+    dnl If it is no GNU msgfmt we define it as : so that the
+    dnl Makefiles still can work.
+    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+      : ;
+    else
+      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+      AC_MSG_RESULT(
+        [found $GMSGFMT program is not GNU msgfmt; ignore it])
+      GMSGFMT=":"
+    fi
+  fi
+
+  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+  dnl Test whether we really found GNU xgettext.
+  if test "$XGETTEXT" != ":"; then
+    dnl If it is no GNU xgettext we define it as : so that the
+    dnl Makefiles still can work.
+    if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+       (if $XGETTEXT --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
+      : ;
+    else
+      AC_MSG_RESULT(
+        [found xgettext program is not GNU xgettext; ignore it])
+      XGETTEXT=":"
+    fi
+    dnl Remove leftover from FreeBSD xgettext call.
+    rm -f messages.po
+  fi
+
+  AC_OUTPUT_COMMANDS([
+    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
+        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"
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ 	]*\$/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" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+            # Hide the ALL_LINGUAS assigment from automake.
+            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            eval '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. But hide it
+    # from automake.
+    eval '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.
+  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.
+/^[	 ]*VARIABLE[	 ]*=/{
+  # Seen the first line of the variable definition.
+  s/^[	 ]*VARIABLE[	 ]*=//
+  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" "$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
+  # Hide the ALL_LINGUAS assigment from automake.
+  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+  # 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), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
+  # Compute CLASSFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(top_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 \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+    CLASSFILES="$CLASSFILES \$(top_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'`
+    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'`
+      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"
+  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
+	@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+	\$(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'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+	@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+	\$(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"
+])
+# printf-posix.m4 serial 2 (gettext-0.13.1)
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+dnl Test whether the printf() function supports POSIX/XSI format strings with
+dnl positions.
+
+AC_DEFUN([gt_PRINTF_POSIX],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
+    gt_cv_func_printf_posix,
+    [
+      AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+   dollar expansion (possibly an autoconf bug).  */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+  sprintf (buf, format, 33, 55);
+  return (strcmp (buf, "55 33") != 0);
+}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
+      [
+        AC_EGREP_CPP(notposix, [
+#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
+  notposix
+#endif
+        ], gt_cv_func_printf_posix="guessing no",
+           gt_cv_func_printf_posix="guessing yes")
+      ])
+    ])
+  case $gt_cv_func_printf_posix in
+    *yes)
+      AC_DEFINE(HAVE_POSIX_PRINTF, 1,
+        [Define if your printf() function supports format strings with positions.])
+      ;;
+  esac
+])
+# progtest.m4 serial 3 (gettext-0.12)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library 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 Library General Public License, and the rest of the GNU
+dnl gettext package 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.
+
+# 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
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+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
+          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
+])
+# signed.m4 serial 1 (gettext-0.10.40)
+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([bh_C_SIGNED],
+[
+  AC_CACHE_CHECK([for signed], bh_cv_c_signed,
+   [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
+  if test $bh_cv_c_signed = no; then
+    AC_DEFINE(signed, ,
+              [Define to empty if the C compiler doesn't support this keyword.])
+  fi
+])
+# size_max.m4 serial 2
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_SIZE_MAX],
+[
+  AC_CHECK_HEADERS(stdint.h)
+  dnl First test whether the system already has SIZE_MAX.
+  AC_MSG_CHECKING([for SIZE_MAX])
+  result=
+  AC_EGREP_CPP([Found it], [
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+], result=yes)
+  if test -z "$result"; then
+    dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
+    dnl than the type 'unsigned long'.
+    dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
+    dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
+    _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
+      [#include <stddef.h>], result=?)
+    _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
+      [#include <stddef.h>], result=?)
+    _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
+      [#include <stddef.h>], result=?)
+    if test "$fits_in_uint" = 1; then
+      dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
+      dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
+      AC_TRY_COMPILE([#include <stddef.h>
+        extern size_t foo;
+        extern unsigned long foo;
+        ], [], fits_in_uint=0)
+    fi
+    if test -z "$result"; then
+      if test "$fits_in_uint" = 1; then
+        result="$res_hi$res_lo"U
+      else
+        result="$res_hi$res_lo"UL
+      fi
+    else
+      dnl Shouldn't happen, but who knows...
+      result='~(size_t)0'
+    fi
+  fi
+  AC_MSG_RESULT([$result])
+  if test "$result" != yes; then
+    AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
+      [Define as the maximum value of type 'size_t', if the system doesn't define it.])
+  fi
+])
+# stdint_h.m4 serial 3 (gettext-0.12)
+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([jm_AC_HEADER_STDINT_H],
+[
+  AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
+  [AC_TRY_COMPILE(
+    [#include <sys/types.h>
+#include <stdint.h>],
+    [uintmax_t i = (uintmax_t) -1;],
+    jm_ac_cv_header_stdint_h=yes,
+    jm_ac_cv_header_stdint_h=no)])
+  if test $jm_ac_cv_header_stdint_h = yes; then
+    AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
+      [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+       and declares uintmax_t. ])
+  fi
+])
+# uintmax_t.m4 serial 7 (gettext-0.12)
+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+AC_PREREQ(2.13)
+
+# Define uintmax_t to 'unsigned long' or 'unsigned long long'
+# if it is not already defined in <stdint.h> or <inttypes.h>.
+
+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
+[
+  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
+  if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
+    AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
+    test $ac_cv_type_unsigned_long_long = yes \
+      && ac_type='unsigned long long' \
+      || ac_type='unsigned long'
+    AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
+      [Define to unsigned long or unsigned long long
+       if <stdint.h> and <inttypes.h> don't define.])
+  else
+    AC_DEFINE(HAVE_UINTMAX_T, 1,
+      [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
+  fi
+])
+# ulonglong.m4 serial 3
+dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
+
+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
+[
+  AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
+  [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
+    [unsigned long long ullmax = (unsigned long long) -1;
+     return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
+    ac_cv_type_unsigned_long_long=yes,
+    ac_cv_type_unsigned_long_long=no)])
+  if test $ac_cv_type_unsigned_long_long = yes; then
+    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
+      [Define if you have the 'unsigned long long' type.])
+  fi
+])
+# wchar_t.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+dnl Test whether <stddef.h> has the 'wchar_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WCHAR_T],
+[
+  AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
+    [AC_TRY_COMPILE([#include <stddef.h>
+       wchar_t foo = (wchar_t)'\0';], ,
+       gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
+  if test $gt_cv_c_wchar_t = yes; then
+    AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
+  fi
+])
+# wint_t.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+dnl Test whether <wchar.h> has the 'wint_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WINT_T],
+[
+  AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
+    [AC_TRY_COMPILE([#include <wchar.h>
+       wint_t foo = (wchar_t)'\0';], ,
+       gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
+  if test $gt_cv_c_wint_t = yes; then
+    AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
+  fi
+])
+# xsize.m4 serial 2
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+AC_DEFUN([gl_XSIZE],
+[
+  dnl Prerequisites of lib/xsize.h.
+  AC_REQUIRE([gl_SIZE_MAX])
+  AC_CHECK_HEADERS(stdint.h)
+])
+
+# 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)
+])
+
+# Excerpted from pkg.m4 - Macros to locate and utilise pkg-config
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.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 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.
+#
+# 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.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+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
+])# PKG_PROG_PKG_CONFIG
+# ===========================================================================
+#         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
+                for a in "$MAKE" make gmake gnumake ; 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)
+] )
diff --git a/e2fsprogs/config/config.guess b/e2fsprogs/config/config.guess
new file mode 100644
index 0000000..9afd676
--- /dev/null
+++ b/e2fsprogs/config/config.guess
@@ -0,0 +1,1568 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-11-29'
+
+# 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 <http://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.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -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-2013 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
+
+trap 'exit 1' 1 2 15
+
+# 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.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { 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) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; 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 ; set_cc_for_build= ;'
+
+# 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) >/dev/null 2>&1 ; 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/*)
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	LIBC=gnu
+
+	eval $set_cc_for_build
+	cat <<-EOF > $dummy.c
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#else
+	LIBC=gnu
+	#endif
+	EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	;;
+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".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-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.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $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
+	# 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/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit ;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    alpha:OSF1:*:*)
+	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.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+	echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	eval $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 [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    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.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    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'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    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)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # 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:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $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; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $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
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *: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 [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    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 [ -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 [ "${HP_ARCH}" = "" ]; then
+		    eval $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 [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $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
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $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; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+	exit ;;
+    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*:*)
+	echo c34-convex-bsd
+	exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+	exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+	exit ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    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:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    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/ /_/'`
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    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/ /_/'`
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit ;;
+    *:MINGW64*:*)
+	echo ${UNAME_MACHINE}-pc-mingw64
+	exit ;;
+    *:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    i*:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
+    i*:windows32*:*)
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:*)
+	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    authenticamd | genuineintel | EM64T)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    8664:Windows_NT:*)
+	echo x86_64-pc-mks
+	exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` 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
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    arm*:Linux:*:*)
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+	    fi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    cris:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	exit ;;
+    crisv32:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	exit ;;
+    frv:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    i*86:Linux:*:*)
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=${UNAME_MACHINE}el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=${UNAME_MACHINE}
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+	;;
+    or1k:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    or32:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    padre:Linux:*:*)
+	echo sparc-unknown-linux-${LIBC}
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-${LIBC}
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
+	esac
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-${LIBC}
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-${LIBC}
+	exit ;;
+    ppc64le:Linux:*:*)
+	echo powerpc64le-unknown-linux-${LIBC}
+	exit ;;
+    ppcle:Linux:*:*)
+	echo powerpcle-unknown-linux-${LIBC}
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+	exit ;;
+    sh64*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+	exit ;;
+    x86_64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    xtensa*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    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.
+	echo i386-sequent-sysv4
+	exit ;;
+    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.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    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
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${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
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    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 configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
+	exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    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*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
+	echo i586-unisys-sysv4
+	exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+		echo mips-nec-sysv${UNAME_RELEASE}
+	else
+		echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+	exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
+    x86_64:Haiku:*:*)
+	echo x86_64-unknown-haiku
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	eval $set_cc_for_build
+	if test "$UNAME_PROCESSOR" = unknown ; then
+	    UNAME_PROCESSOR=powerpc
+	fi
+	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+	    if [ "$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
+	    fi
+	elif test "$UNAME_PROCESSOR" = i386 ; then
+	    # Avoid executing cc on OS X 10.9, as it ships with a stub
+	    # that puts up a graphical alert prompting to install
+	    # developer tools.  Any system running Mac OS X 10.7 or
+	    # later (Darwin 11 and later) is required to have a 64-bit
+	    # processor. This is not true of the ARM version of Darwin
+	    # that Apple uses in portable devices.
+	    UNAME_PROCESSOR=x86_64
+	fi
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSE-*:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *: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
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit ;;
+    SEI:*:*:SEIUX)
+	echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-unknown-esx
+	exit ;;
+esac
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#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 (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#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
+    printf ("vax-dec-ultrix\n"); exit (0);
+# 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; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    c34*)
+	echo c34-convex-bsd
+	exit ;;
+    c38*)
+	echo c38-convex-bsd
+	exit ;;
+    c4*)
+	echo c4-convex-bsd
+	exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+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
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/e2fsprogs/config/config.rpath b/e2fsprogs/config/config.rpath
new file mode 100755
index 0000000..5ead758
--- /dev/null
+++ b/e2fsprogs/config/config.rpath
@@ -0,0 +1,513 @@
+#! /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-2002 Free Software Foundation, Inc.
+#   Taken from GNU libtool, 2001
+#   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+#   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.
+#
+#   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.
+#
+# 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.
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+shlibext=
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+wl=
+if test "$GCC" = yes; then
+  wl='-Wl,'
+else
+  case "$host_os" in
+    aix3* | aix4* | aix5*)
+      wl='-Wl,'
+      ;;
+    hpux9* | hpux10* | hpux11*)
+      wl='-Wl,'
+      ;;
+    irix5* | irix6*)
+      wl='-Wl,'
+      ;;
+    linux*)
+      echo '__INTEL_COMPILER' > conftest.$ac_ext
+      if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
+      then
+        :
+      else
+        # Intel icc
+        wl='-Qoption,ld,'
+      fi
+      ;;
+    osf3* | osf4* | osf5*)
+      wl='-Wl,'
+      ;;
+    solaris*)
+      wl='-Wl,'
+      ;;
+    sunos4*)
+      wl='-Qoption ld '
+      ;;
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      if test "x$host_vendor" = xsni; then
+        wl='-LD'
+      else
+        wl='-Wl,'
+      fi
+      ;;
+  esac
+fi
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+  cygwin* | mingw* | pw32*)
+    # 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
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+  case "$host_os" in
+    aix3* | aix4* | aix5*)
+      # On AIX, the GNU linker is very broken
+      ld_shlibs=no
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can use
+      # them.
+      ld_shlibs=no
+      ;;
+    beos*)
+      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    cygwin* | mingw* | pw32*)
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+        ld_shlibs=no
+      elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    sunos4*)
+      hardcode_direct=yes
+      ;;
+    *)
+      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+  esac
+  if test "$ld_shlibs" = yes; then
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+  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
+      ;;
+    aix4* | aix5*)
+      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].*|aix5*)
+          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
+            hardcode_direct=yes
+          else
+            # We have old collect2
+            hardcode_direct=unsupported
+            hardcode_minus_L=yes
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_libdir_separator=
+          fi
+        esac
+      fi
+      if test "$aix_use_runtimelinking" = yes; then
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+      else
+        if test "$host_cpu" = ia64; then
+          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+        else
+          hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
+        fi
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+    cygwin* | mingw* | pw32*)
+      # 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=yes
+      ;;
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+    freebsd2.2*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    freebsd2*)
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    freebsd*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    hpux9* | hpux10* | hpux11*)
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+      hardcode_minus_L=yes # Not in the search PATH, but as the default
+                           # location of the library.
+      ;;
+    irix5* | irix6*)
+      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=:
+      ;;
+    openbsd*)
+      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
+      ;;
+    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=:
+      ;;
+    sco3.2v5*)
+      ;;
+    solaris*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      ;;
+    sunos4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    sysv4)
+      if test "x$host_vendor" = xsno; then
+        hardcode_direct=yes # is this really true???
+      else
+        hardcode_direct=no # Motorola manual says yes, but my tests say they lie
+      fi
+      ;;
+    sysv4.3*)
+      ;;
+    sysv5*)
+      hardcode_libdir_flag_spec=
+      ;;
+    uts4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    dgux*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+        ld_shlibs=yes
+      fi
+      ;;
+    sysv4.2uw2*)
+      hardcode_direct=yes
+      hardcode_minus_L=no
+      ;;
+    sysv5uw7* | unixware7*)
+      ;;
+    *)
+      ld_shlibs=no
+      ;;
+  esac
+fi
+
+# Check dynamic linker characteristics
+libname_spec='lib$name'
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+case "$host_os" in
+  aix3*)
+    shlibext=so
+    ;;
+  aix4* | aix5*)
+    shlibext=so
+    ;;
+  amigaos*)
+    shlibext=ixlibrary
+    ;;
+  beos*)
+    shlibext=so
+    ;;
+  bsdi4*)
+    shlibext=so
+    sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+    sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+    ;;
+  cygwin* | mingw* | pw32*)
+    case $GCC,$host_os in
+      yes,cygwin*)
+        shlibext=dll.a
+        ;;
+      yes,mingw*)
+        shlibext=dll
+        sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
+        ;;
+      yes,pw32*)
+        shlibext=dll
+        ;;
+      *)
+        shlibext=dll
+        ;;
+    esac
+    ;;
+  darwin* | rhapsody*)
+    shlibext=dylib
+    ;;
+  freebsd1*)
+    ;;
+  freebsd*)
+    shlibext=so
+    ;;
+  gnu*)
+    shlibext=so
+    ;;
+  hpux9* | hpux10* | hpux11*)
+    shlibext=sl
+    ;;
+  irix5* | irix6*)
+    shlibext=so
+    case "$host_os" in
+      irix5*)
+        libsuff= shlibsuff=
+        ;;
+      *)
+        case $LD in
+          *-32|*"-32 ") libsuff= shlibsuff= ;;
+          *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;;
+          *-64|*"-64 ") libsuff=64 shlibsuff=64 ;;
+          *) libsuff= shlibsuff= ;;
+        esac
+        ;;
+    esac
+    sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+    sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+    ;;
+  linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+    ;;
+  linux-gnu*)
+    shlibext=so
+    ;;
+  netbsd*)
+    shlibext=so
+    ;;
+  newsos6)
+    shlibext=so
+    ;;
+  openbsd*)
+    shlibext=so
+    ;;
+  os2*)
+    libname_spec='$name'
+    shlibext=dll
+    ;;
+  osf3* | osf4* | osf5*)
+    shlibext=so
+    sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+    sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+    ;;
+  sco3.2v5*)
+    shlibext=so
+    ;;
+  solaris*)
+    shlibext=so
+    ;;
+  sunos4*)
+    shlibext=so
+    ;;
+  sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+    shlibext=so
+    case "$host_vendor" in
+      motorola)
+        sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+        ;;
+    esac
+    ;;
+  uts4*)
+    shlibext=so
+    ;;
+  dgux*)
+    shlibext=so
+    ;;
+  sysv4*MP*)
+    if test -d /usr/nec; then
+      shlibext=so
+    fi
+    ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | 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"`
+escaped_sys_lib_search_path_spec=`echo "X$sys_lib_search_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_sys_lib_dlsearch_path_spec=`echo "X$sys_lib_dlsearch_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+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"
+
+# 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"
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec="$escaped_sys_lib_search_path_spec"
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec="$escaped_sys_lib_dlsearch_path_spec"
+
+EOF
diff --git a/e2fsprogs/config/config.sub b/e2fsprogs/config/config.sub
new file mode 100644
index 0000000..61cb4bc
--- /dev/null
+++ b/e2fsprogs/config/config.sub
@@ -0,0 +1,1793 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-10-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 <http://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 with a ChangeLog entry 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:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# 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.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -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-2013 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"
+       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
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -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*)
+		os=
+		basic_machine=$1
+		;;
+	-bluegene*)
+		os=-cnk
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+	-chorusrdb)
+		os=-chorusrdb
+		basic_machine=$1
+		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| aarch64 | aarch64_be \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
+	| arc | arceb \
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+	| avr | avr32 \
+	| be32 | be64 \
+	| bfin \
+	| c4x | c8051 | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| epiphany \
+	| fido | fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| k1om \
+	| le32 | le64 \
+	| lm32 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64octeon | mips64octeonel \
+	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipsr5900 | mipsr5900el \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| moxie \
+	| mt \
+	| msp430 \
+	| nds32 | nds32le | nds32be \
+	| nios | nios2 | nios2eb | nios2el \
+	| ns16k | ns32k \
+	| open8 \
+	| or1k | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
+	| pyramid \
+	| rl78 | rx \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+	| ubicom32 \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+	| we32k \
+	| x86 | xc16x | xstormy16 | xtensa \
+	| z8k | z80)
+		basic_machine=$basic_machine-unknown
+		;;
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
+
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
+
+	# 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)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| aarch64-* | aarch64_be-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* | avr32-* \
+	| be32-* | be64-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
+	| c8051-* | clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| k1om-* \
+	| le32-* | le64-* \
+	| lm32-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+	| microblaze-* | microblazeel-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64octeon-* | mips64octeonel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipsr5900-* | mipsr5900el-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
+	| msp430-* \
+	| nds32-* | nds32le-* | nds32be-* \
+	| nios-* | nios2-* | nios2eb-* | nios2el-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+	| pyramid-* \
+	| rl78-* | romp-* | rs6000-* | rx-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tile*-* \
+	| tron-* \
+	| ubicom32-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
+	| xstormy16-* | xtensa*-* \
+	| ymp-* \
+	| z8k-* | z80-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	bluegene*)
+		basic_machine=powerpc-ibm
+		os=-cnk
+		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16 | cr16-*)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	microblaze*)
+		basic_machine=microblaze-xilinx
+		;;
+	mingw64)
+		basic_machine=x86_64-pc
+		os=-mingw64
+		;;
+	mingw32)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
+	msys)
+		basic_machine=i686-pc
+		os=-msys
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	openrisc | openrisc-*)
+		basic_machine=or32-unknown
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc | ppcbe)	basic_machine=powerpc-unknown
+		;;
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rdos | rdos64)
+		basic_machine=x86_64-pc
+		os=-rdos
+		;;
+	rdos32)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tile*)
+		basic_machine=$basic_machine-unknown
+		os=-linux-gnu
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# 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)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+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
+		;;
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* | -plan9* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* | -aros* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -bitrig* | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-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
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# 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
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-dicos*)
+		os=-dicos
+		;;
+	-nacl*)
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+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.
+
+case $basic_machine in
+	score-*)
+		os=-elf
+		;;
+	spu-*)
+		os=-elf
+		;;
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	c8051-*)
+		os=-elf
+		;;
+	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
+		;;
+	or1k-*)
+		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
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-haiku)
+		os=-haiku
+		;;
+	*-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
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-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
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $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
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				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
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/e2fsprogs/config/install-sh b/e2fsprogs/config/install-sh
new file mode 100755
index 0000000..89fc9b0
--- /dev/null
+++ b/e2fsprogs/config/install-sh
@@ -0,0 +1,238 @@
+#! /bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5.
+#
+# 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.
+#
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+tranformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+	-c) instcmd="$cpprog"
+	    shift
+	    continue;;
+
+	-d) dir_arg=true
+	    shift
+	    continue;;
+
+	-m) chmodcmd="$chmodprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-o) chowncmd="$chownprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-g) chgrpcmd="$chgrpprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-s) stripcmd="$stripprog"
+	    shift
+	    continue;;
+
+	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+	    shift
+	    continue;;
+
+	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+	    shift
+	    continue;;
+
+	*)  if [ x"$src" = x ]
+	    then
+		src=$1
+	    else
+		# this colon is to work around a 386BSD /bin/sh bug
+		:
+		dst=$1
+	    fi
+	    shift
+	    continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+	echo "install:	no input file specified"
+	exit 1
+else
+	true
+fi
+
+if [ x"$dir_arg" != x ]; then
+	dst=$src
+	src=""
+	
+	if [ -d $dst ]; then
+		instcmd=:
+	else
+		instcmd=mkdir
+	fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+	if [ -f $src -o -d $src ]
+	then
+		true
+	else
+		echo "install:  $src does not exist"
+		exit 1
+	fi
+	
+	if [ x"$dst" = x ]
+	then
+		echo "install:	no destination specified"
+		exit 1
+	else
+		true
+	fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+	if [ -d $dst ]
+	then
+		dst="$dst"/`basename $src`
+	else
+		true
+	fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='	
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+	pathcomp="${pathcomp}${1}"
+	shift
+
+	if [ ! -d "${pathcomp}" ] ;
+        then
+		$mkdirprog "${pathcomp}"
+	else
+		true
+	fi
+
+	pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+	$doit $instcmd $dst &&
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+	if [ x"$transformarg" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		dstfile=`basename $dst $transformbasename | 
+			sed $transformarg`$transformbasename
+	fi
+
+# don't allow the sed command to completely eliminate the filename
+
+	if [ x"$dstfile" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		true
+	fi
+
+# Make a temp file name in the proper directory.
+
+	dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd $src $dsttmp &&
+
+	trap "rm -f ${dsttmp}" 0 &&
+
+# 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 $instcmd $src $dsttmp" command.
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+	$doit $rmcmd -f $dstdir/$dstfile &&
+	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
diff --git a/e2fsprogs/config/mkinstalldirs b/e2fsprogs/config/mkinstalldirs
new file mode 100755
index 0000000..4f58503
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/config/parse-types.sh b/e2fsprogs/config/parse-types.sh
new file mode 100755
index 0000000..5076f6c
--- /dev/null
+++ b/e2fsprogs/config/parse-types.sh
@@ -0,0 +1,125 @@
+#!/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
+    echo "Problem detected with asm_types.h"
+    echo "" > asm_types.h
+fi
+rm asm_types.c asm_types
+
diff --git a/e2fsprogs/configure b/e2fsprogs/configure
new file mode 100755
index 0000000..31ec8d3
--- /dev/null
+++ b/e2fsprogs/configure
@@ -0,0 +1,12911 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 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
+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
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+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
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# 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
+  test -z "$as_dir" && as_dir=.
+    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
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# 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'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_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="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
+"
+  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
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || 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_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  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
+  test -z "$as_dir" && as_dir=.
+  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_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+	   done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      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'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$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_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=`$as_echo "$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 ||
+$as_echo 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_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_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# 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
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$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 ||
+$as_echo 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" ||
+    { $as_echo "$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
+}
+
+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
+
+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 <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_header_list=
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+BUILD_LDFLAGS
+BUILD_CFLAGS
+INCLUDES
+DO_TEST_SUITE
+ET_DIR
+SS_DIR
+LDFLAG_STATIC
+root_sysconfdir
+root_libdir
+root_sbindir
+root_bindir
+root_prefix
+UNIX_CMT
+CYGWIN_CMT
+LINUX_CMT
+UNI_DIFF_OPTS
+SEM_INIT_LIB
+SOCKET_LIB
+SIZEOF_OFF_T
+SIZEOF_LONG_LONG
+SIZEOF_LONG
+SIZEOF_INT
+SIZEOF_SHORT
+BUILD_CC
+MAKEINFO
+STRIP
+AR
+LDCONFIG
+PERL
+SED
+AWK
+CHMOD
+RM
+CP
+MV
+LN_S
+LN
+ifNotGNUmake
+ifGNUmake
+BINARY_TYPE
+POSUB
+LTLIBINTL
+LIBINTL
+INTLLIBS
+INTL_LIBTOOL_SUFFIX_PREFIX
+INTLOBJS
+GENCAT
+INSTOBJEXT
+DATADIRNAME
+CATOBJEXT
+USE_INCLUDED_LIBINTL
+BUILD_INCLUDED_LIBINTL
+INTLBISON
+LTLIBICONV
+LIBICONV
+HAVE_WPRINTF
+HAVE_SNPRINTF
+HAVE_ASPRINTF
+HAVE_POSIX_PRINTF
+GLIBC21
+ALLOCA
+EGREP
+GREP
+RANLIB
+MSGMERGE
+XGETTEXT
+GMSGFMT
+MSGFMT
+USE_NLS
+MKINSTALLDIRS
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+SET_MAKE
+VERSION
+PACKAGE
+GETTEXT_PACKAGE
+UUIDD_CMT
+E2INITRD_MAN
+E2INITRD_PROG
+FSCK_MAN
+FSCK_PROG
+DEFRAG_CMT
+RESIZER_CMT
+IMAGER_CMT
+DEBUGFS_CMT
+QUOTA_CMT
+DEPPROFILED_LIBQUOTA
+PROFILED_LIBQUOTA
+DEPSTATIC_LIBQUOTA
+STATIC_LIBQUOTA
+DEPLIBQUOTA
+LIBQUOTA
+QUOTA_MAN_COMMENT
+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
+TEST_IO_CMT
+PRIVATE_LIBS_CMT
+LDFLAG_DYNAMIC
+PROFILED_LIB_EXT
+STATIC_LIB_EXT
+LIB_EXT
+CHECKER_CMT
+PROFILE_CMT
+BSDLIB_CMT
+ELF_CMT
+HTREE_CMT
+Q
+ES
+E
+LINK_BUILD_FLAGS
+SYMLINK_RELATIVE
+LINK_INSTALL_FLAGS
+MAINTAINER_CMT
+CPP
+RDYNAMIC
+DLOPEN_LIB
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+E2FSPROGS_PKGVER
+E2FSPROGS_VERSION
+E2FSPROGS_DAY
+E2FSPROGS_MONTH
+E2FSPROGS_YEAR
+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
+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_CHECKER
+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_compression
+enable_htree
+enable_elf_shlibs
+enable_bsd_shlibs
+enable_profile
+enable_checker
+enable_jbd_debug
+enable_blkid_debug
+enable_testio_debug
+enable_libuuid
+enable_libblkid
+enable_quota
+enable_backtrace
+enable_debugfs
+enable_imager
+enable_resizer
+enable_defrag
+enable_fsck
+enable_e2initrd_helper
+enable_tls
+enable_uuidd
+enable_nls
+with_gnu_ld
+enable_rpath
+with_libiconv_prefix
+with_included_gettext
+with_libintl_prefix
+with_multiarch
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+PKG_CONFIG'
+
+
+# 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'
+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
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  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=`$as_echo "$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=`$as_echo "$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 ;;
+
+  -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=`$as_echo "$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=`$as_echo "$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.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$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" ;;
+    *)     $as_echo "$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
+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 ||
+$as_echo 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]
+  --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-compression	  enable EXPERIMENTAL compression support
+  --enable-htree      	  enable EXPERIMENTAL htree directory support
+  --enable-elf-shlibs	  select ELF shared libraries
+  --enable-bsd-shlibs	  select BSD shared libraries
+  --enable-profile	  build profiling libraries
+  --enable-checker	  build checker libraries
+  --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
+  --disable-libuuid	  do not build private uuid library
+  --disable-libblkid	  do not build private blkid library
+  --enable-quota	  enable quota support
+  --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-nls           do not use Native Language Support
+  --disable-rpath         do not hardcode runtime library paths
+
+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
+  --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-included-gettext use the GNU gettext library included here
+  --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
+
+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
+
+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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$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 guested configure.
+    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
+      $as_echo "$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.69
+
+Copyright (C) 2012 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
+  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\""
+$as_echo "$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
+  $as_echo "$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_echo "$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_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$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\""
+$as_echo "$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
+  $as_echo "$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_echo "$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\""
+$as_echo "$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
+  $as_echo "$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_echo "$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 link 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\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$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\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$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_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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+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 ()
+{
+if (sizeof (($2)))
+	    return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# 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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# 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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#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 ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# 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 ()
+{
+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 ()
+{
+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_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.$ac_ext
+  done
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+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 ()
+{
+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_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.$ac_ext
+  done
+else
+  ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext 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 ()
+{
+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_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext 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 () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  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
+  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_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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+$as_echo_n "checking for $2.$3... " >&6; }
+if eval \${$4+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+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
+  eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$4
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_member
+
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#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
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_decl
+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.69.  Invocation command line was
+
+  $ $0 $@
+
+_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
+  test -z "$as_dir" && as_dir=.
+    $as_echo "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=`$as_echo "$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=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$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
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	$as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$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
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+as_fn_append ac_header_list " stdlib.h"
+as_fn_append ac_header_list " unistd.h"
+as_fn_append ac_header_list " sys/param.h"
+# 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,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$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
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$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=`$as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`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_aux_dir=
+for ac_dir in config "$srcdir"/config; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$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.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+ac_config_headers="$ac_config_headers lib/config.h"
+
+
+MCONFIG=./MCONFIG
+
+BINARY_TYPE=bin
+E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h  \
+	| awk '{print $3}' | tr \" " " | awk '{print $1}'`
+DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
+	| tr \" " "`
+E2FSPROGS_DAY=`echo $DATE | awk -F- '{print $1}'`
+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" ;;
+*)	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown month $MONTH??" >&5
+$as_echo "$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-$E2FSPROGS_YEAR-$MONTH_NUM-$E2FSPROGS_DAY"
+	;;
+*)
+	E2FSPROGS_PKGVER="$base_ver"
+	;;
+esac
+
+unset DATE MONTH YEAR base_ver pre_vers date_spec
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION" >&5
+$as_echo "Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}" >&5
+$as_echo "Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}" >&6; }
+
+
+
+
+
+# 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
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$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
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$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=''
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$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.
+$as_echo "$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\""
+$as_echo "$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
+  $as_echo "$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 ()
+{
+
+  ;
+  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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$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\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$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+set}" = set && 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
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$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_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "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\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$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_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$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 ()
+{
+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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "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\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$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\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$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
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  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\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$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_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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 ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  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.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*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 don't provoke an error unfortunately, instead are silently treated
+   as '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's necessary to write '\x00'==0 to get something
+   that's 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 **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_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
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+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
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+  DLOPEN_LIB=-ldl
+
+$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
+
+fi
+
+
+WITH_DIET_LIBC=
+
+# Check whether --with-diet-libc was given.
+if test "${with_diet_libc+set}" = set; then :
+  withval=$with_diet_libc; CC="diet cc -nostdinc"
+WITH_DIET_LIBC=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: CC=$CC" >&5
+$as_echo "CC=$CC" >&6; }
+fi
+
+# Check whether --with-cc was given.
+if test "${with_cc+set}" = set; 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+set}" = set; 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+set}" = set; 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$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.
+$as_echo "$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\""
+$as_echo "$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
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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 ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  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.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*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 don't provoke an error unfortunately, instead are silently treated
+   as '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's necessary to write '\x00'==0 to get something
+   that's 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 **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_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
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "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 ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-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.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # 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.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # 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
+  # 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$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.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # 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.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # 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
+  # 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_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$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
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for additional special compiler flags" >&5
+$as_echo_n "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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $addcflags" >&5
+$as_echo "$addcflags" >&6; }
+    CFLAGS="$addcflags $CFLAGS"
+else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none)" >&5
+$as_echo "(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+set}" = set; then :
+  withval=$with_root_prefix; root_prefix=$withval
+else
+  root_prefix=NONE
+fi
+# Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+  enableval=$enable_maintainer_mode; if test "$enableval" = "no"
+then
+	MAINTAINER_CMT=#
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling maintainer mode" >&5
+$as_echo "Disabling maintainer mode" >&6; }
+else
+	MAINTAINER_CMT=
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling maintainer mode" >&5
+$as_echo "Enabling maintainer mode" >&6; }
+fi
+
+else
+  MAINTAINER_CMT=#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling maintainer mode by default" >&5
+$as_echo "Disabling maintainer mode by default" >&6; }
+
+fi
+
+
+# Check whether --enable-symlink-install was given.
+if test "${enable_symlink_install+set}" = set; then :
+  enableval=$enable_symlink_install; if test "$enableval" = "no"
+then
+	LINK_INSTALL_FLAGS=-f
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling symlinks for install" >&5
+$as_echo "Disabling symlinks for install" >&6; }
+else
+	LINK_INSTALL_FLAGS=-sf
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling symlinks for install" >&5
+$as_echo "Enabling symlinks for install" >&6; }
+fi
+
+else
+  LINK_INSTALL_FLAGS=-f
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling symlinks for install by default" >&5
+$as_echo "Disabling symlinks for install by default" >&6; }
+
+fi
+
+
+relative_symlink_defined=
+# Check whether --enable-relative-symlinks was given.
+if test "${enable_relative_symlinks+set}" = set; then :
+  enableval=$enable_relative_symlinks; if test "$enableval" = "no"
+then
+	SYMLINK_RELATIVE=
+	relative_symlink_defined=yes
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling relative symlinks for install" >&5
+$as_echo "Disabling relative symlinks for install" >&6; }
+else
+	SYMLINK_RELATIVE=--relative
+	relative_symlink_defined=yes
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling relative symlinks for install" >&5
+$as_echo "Enabling relative symlinks for install" >&6; }
+fi
+fi
+
+# Check whether --enable-symlink-relative-symlinks was given.
+if test "${enable_symlink_relative_symlinks+set}" = set; then :
+  enableval=$enable_symlink_relative_symlinks; if test "$enableval" = "no"
+then
+	SYMLINK_RELATIVE=yes
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling relative symlinks for install" >&5
+$as_echo "Disabling relative symlinks for install" >&6; }
+else
+	SYMLINK_RELATIVE=--relative
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling relative symlinks for install" >&5
+$as_echo "Enabling relative symlinks for install" >&6; }
+fi
+
+else
+  if test -z "$relative_symlink_defined"
+then
+	SYMLINK_RELATIVE=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling relative symlinks for install by default" >&5
+$as_echo "Disabling relative symlinks for install by default" >&6; }
+fi
+
+fi
+
+
+# Check whether --enable-symlink-build was given.
+if test "${enable_symlink_build+set}" = set; then :
+  enableval=$enable_symlink_build; if test "$enableval" = "no"
+then
+	LINK_BUILD_FLAGS=
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling symlinks for build" >&5
+$as_echo "Disabling symlinks for build" >&6; }
+else
+	LINK_BUILD_FLAGS=-s
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling symlinks for build" >&5
+$as_echo "Enabling symlinks for build" >&6; }
+fi
+
+else
+  LINK_BUILD_FLAGS=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling symlinks for build by default" >&5
+$as_echo "Disabling symlinks for build by default" >&6; }
+
+fi
+
+
+# Check whether --enable-verbose-makecmds was given.
+if test "${enable_verbose_makecmds+set}" = set; then :
+  enableval=$enable_verbose_makecmds; if test "$enableval" = "no"
+then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling verbose make commands" >&5
+$as_echo "Disabling verbose make commands" >&6; }
+	E=@echo
+	ES=echo
+	Q=@
+else
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling verbose make commands" >&5
+$as_echo "Enabling verbose make commands" >&6; }
+	E=@\\#
+	ES=\\#
+	Q=
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling verbose make commands" >&5
+$as_echo "Disabling verbose make commands" >&6; }
+E=@echo
+ES=echo
+Q=@
+
+fi
+
+
+
+
+# Check whether --enable-compression was given.
+if test "${enable_compression+set}" = set; then :
+  enableval=$enable_compression; if test "$enableval" = "no"
+then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling compression support" >&5
+$as_echo "Disabling compression support" >&6; }
+else
+
+$as_echo "#define ENABLE_COMPRESSION 1" >>confdefs.h
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling compression support" >&5
+$as_echo "Enabling compression support" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compression support is experimental" >&5
+$as_echo "$as_me: WARNING: Compression support is experimental" >&2;}
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling compression support by default" >&5
+$as_echo "Disabling compression support by default" >&6; }
+
+fi
+
+
+# Check whether --enable-htree was given.
+if test "${enable_htree+set}" = set; then :
+  enableval=$enable_htree; if test "$enableval" = "no"
+then
+	HTREE_CMT=#
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling htree directory support" >&5
+$as_echo "Disabling htree directory support" >&6; }
+else
+	HTREE_CMT=
+	$as_echo "#define ENABLE_HTREE 1" >>confdefs.h
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling htree directory support" >&5
+$as_echo "Enabling htree directory support" >&6; }
+fi
+
+else
+  HTREE_CMT=
+$as_echo "#define ENABLE_HTREE 1" >>confdefs.h
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling htree directory support by default" >&5
+$as_echo "Enabling htree directory support by default" >&6; }
+
+fi
+
+
+E2_PKG_CONFIG_STATIC=--static
+LDFLAG_DYNAMIC=
+PRIVATE_LIBS_CMT=
+# Check whether --enable-elf-shlibs was given.
+if test "${enable_elf_shlibs+set}" = set; then :
+  enableval=$enable_elf_shlibs; if test "$enableval" = "no"
+then
+	ELF_CMT=#
+	MAKEFILE_ELF=/dev/null
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling ELF shared libraries" >&5
+$as_echo "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'
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling ELF shared libraries" >&5
+$as_echo "Enabling ELF shared libraries" >&6; }
+fi
+
+else
+  MAKEFILE_ELF=/dev/null
+ELF_CMT=#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling ELF shared libraries by default" >&5
+$as_echo "Disabling ELF shared libraries by default" >&6; }
+
+fi
+
+
+
+# Check whether --enable-bsd-shlibs was given.
+if test "${enable_bsd_shlibs+set}" = set; then :
+  enableval=$enable_bsd_shlibs; if test "$enableval" = "no"
+then
+	BSDLIB_CMT=#
+	MAKEFILE_BSDLIB=/dev/null
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling BSD shared libraries" >&5
+$as_echo "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
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling BSD shared libraries" >&5
+$as_echo "Enabling BSD shared libraries" >&6; }
+fi
+
+else
+  MAKEFILE_BSDLIB=/dev/null
+BSDLIB_CMT=#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling BSD shared libraries by default" >&5
+$as_echo "Disabling BSD shared libraries by default" >&6; }
+
+fi
+
+
+
+# Check whether --enable-profile was given.
+if test "${enable_profile+set}" = set; then :
+  enableval=$enable_profile; if test "$enableval" = "no"
+then
+	PROFILE_CMT=#
+	MAKEFILE_PROFILE=/dev/null
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling profiling libraries" >&5
+$as_echo "Disabling profiling libraries" >&6; }
+else
+	PROFILE_CMT=
+	MAKEFILE_PROFILE=$srcdir/lib/Makefile.profile
+	PROFILED_LIB_EXT=_p.a
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Building profiling libraries" >&5
+$as_echo "Building profiling libraries" >&6; }
+fi
+
+else
+  PROFILE_CMT=#
+MAKEFILE_PROFILE=/dev/null
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling profiling libraries by default" >&5
+$as_echo "Disabling profiling libraries by default" >&6; }
+
+fi
+
+
+
+# Check whether --enable-checker was given.
+if test "${enable_checker+set}" = set; then :
+  enableval=$enable_checker; if test "$enableval" = "no"
+then
+	CHECKER_CMT=#
+	MAKEFILE_CHECKER=/dev/null
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling checker libraries" >&5
+$as_echo "Disabling checker libraries" >&6; }
+else
+	CHECKER_CMT=
+	MAKEFILE_CHECKER=$srcdir/lib/Makefile.checker
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Building checker libraries" >&5
+$as_echo "Building checker libraries" >&6; }
+fi
+
+else
+  CHECKER_CMT=#
+MAKEFILE_CHECKER=/dev/null
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling checker libraries by default" >&5
+$as_echo "Disabling checker libraries by default" >&6; }
+
+fi
+
+
+
+
+
+
+
+
+# Check whether --enable-jbd-debug was given.
+if test "${enable_jbd_debug+set}" = set; then :
+  enableval=$enable_jbd_debug; if test "$enableval" = "no"
+then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling journal debugging" >&5
+$as_echo "Disabling journal debugging" >&6; }
+else
+
+$as_echo "#define CONFIG_JBD_DEBUG 1" >>confdefs.h
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling journal debugging" >&5
+$as_echo "Enabling journal debugging" >&6; }
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling journal debugging by default" >&5
+$as_echo "Disabling journal debugging by default" >&6; }
+
+fi
+
+# Check whether --enable-blkid-debug was given.
+if test "${enable_blkid_debug+set}" = set; then :
+  enableval=$enable_blkid_debug; if test "$enableval" = "no"
+then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling blkid debugging" >&5
+$as_echo "Disabling blkid debugging" >&6; }
+else
+
+$as_echo "#define CONFIG_BLKID_DEBUG 1" >>confdefs.h
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling blkid debugging" >&5
+$as_echo "Enabling blkid debugging" >&6; }
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling blkid debugging by default" >&5
+$as_echo "Disabling blkid debugging by default" >&6; }
+
+fi
+
+# Check whether --enable-testio-debug was given.
+if test "${enable_testio_debug+set}" = set; then :
+  enableval=$enable_testio_debug;
+if test "$enableval" = "no"
+then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling testio debugging" >&5
+$as_echo "Disabling testio debugging" >&6; }
+	TEST_IO_CMT="#"
+else
+	TEST_IO_CMT=
+	$as_echo "#define CONFIG_TESTIO_DEBUG 1" >>confdefs.h
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling testio debugging" >&5
+$as_echo "Enabling testio debugging" >&6; }
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling testio debugging by default" >&5
+$as_echo "Enabling testio debugging by default" >&6; }
+$as_echo "#define CONFIG_TESTIO_DEBUG 1" >>confdefs.h
+
+TEST_IO_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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$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
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        else
+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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+set}" = set; 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
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
+$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
+if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-luuid $LIBUUID $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.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_generate ();
+int
+main ()
+{
+return uuid_generate ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_uuid_uuid_generate=yes
+else
+  ac_cv_lib_uuid_uuid_generate=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
+$as_echo "$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_fn_error $? "external uuid library not found" "$LINENO" 5
+fi
+
+	UUID_CMT=#
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling private uuid library" >&5
+$as_echo "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
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling private uuid library" >&5
+$as_echo "Enabling private uuid library" >&6; }
+fi
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling private uuid library by default" >&5
+$as_echo "Enabling private uuid library by default" >&6; }
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$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
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        else
+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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+set}" = set; 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
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for blkid_get_cache in -lblkid" >&5
+$as_echo_n "checking for blkid_get_cache in -lblkid... " >&6; }
+if ${ac_cv_lib_blkid_blkid_get_cache+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lblkid $LIBBLKID $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.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char blkid_get_cache ();
+int
+main ()
+{
+return blkid_get_cache ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_blkid_blkid_get_cache=yes
+else
+  ac_cv_lib_blkid_blkid_get_cache=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blkid_blkid_get_cache" >&5
+$as_echo "$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_fn_error $? "external blkid library not found" "$LINENO" 5
+fi
+
+	BLKID_CMT=#
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling private blkid library" >&5
+$as_echo "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
+	$as_echo "#define CONFIG_BUILD_FINDFS 1" >>confdefs.h
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling private blkid library" >&5
+$as_echo "Enabling private blkid library" >&6; }
+fi
+
+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
+$as_echo "#define CONFIG_BUILD_FINDFS 1" >>confdefs.h
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling private blkid library by default" >&5
+$as_echo "Enabling private blkid library by default" >&6; }
+
+fi
+
+
+
+
+
+
+
+
+QUOTA_MAN_COMMENT='.\"'
+QUOTA_CMT=
+
+
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$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
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        else
+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                PKG_CONFIG=""
+        fi
+
+fi
+
+# Check whether --enable-quota was given.
+if test "${enable_quota+set}" = set; then :
+  enableval=$enable_quota; if test "$enableval" = "no"
+then
+	QUOTA_CMT=#
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling quota support" >&5
+$as_echo "Disabling quota support" >&6; }
+else
+	QUOTA_CMT=
+	$as_echo "#define CONFIG_QUOTA 1" >>confdefs.h
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling quota support" >&5
+$as_echo "Enabling quota support" >&6; }
+	QUOTA_MAN_COMMENT=""
+
+fi
+
+else
+  QUOTA_CMT=#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling quota support by default" >&5
+$as_echo "Disabling quota support by default" >&6; }
+
+fi
+
+LIBQUOTA='$(LIB)/libquota'$LIB_EXT
+DEPLIBQUOTA=$LIBQUOTA
+STATIC_LIBQUOTA='$(LIB)/libquota'$STATIC_LIB_EXT
+DEPSTATIC_LIBQUOTA=$STATIC_LIBQUOTA
+PROFILED_LIBQUOTA='$(LIB)/libquota'$PROFILED_LIB_EXT
+DEPPROFILED_LIBQUOTA=$PROFILED_LIBQUOTA
+
+
+
+
+
+
+
+
+# Check whether --enable-backtrace was given.
+if test "${enable_backtrace+set}" = set; then :
+  enableval=$enable_backtrace; if test "$enableval" = "no"
+then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling use of backtrace" >&5
+$as_echo "Disabling use of backtrace" >&6; }
+	$as_echo "#define DISABLE_BACKTRACE 1" >>confdefs.h
+
+else
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling use of backtrace" >&5
+$as_echo "Enabling use of backtrace" >&6; }
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling use of backtrace by default" >&5
+$as_echo "Enabling use of backtrace by default" >&6; }
+
+fi
+
+# Check whether --enable-debugfs was given.
+if test "${enable_debugfs+set}" = set; then :
+  enableval=$enable_debugfs; if test "$enableval" = "no"
+then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling debugfs support" >&5
+$as_echo "Disabling debugfs support" >&6; }
+	DEBUGFS_CMT="#"
+else
+	DEBUGFS_CMT=
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling debugfs support" >&5
+$as_echo "Enabling debugfs support" >&6; }
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling debugfs support by default" >&5
+$as_echo "Enabling debugfs support by default" >&6; }
+DEBUGFS_CMT=
+
+fi
+
+
+# Check whether --enable-imager was given.
+if test "${enable_imager+set}" = set; then :
+  enableval=$enable_imager; if test "$enableval" = "no"
+then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling e2image support" >&5
+$as_echo "Disabling e2image support" >&6; }
+	IMAGER_CMT="#"
+else
+	IMAGER_CMT=
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling e2image support" >&5
+$as_echo "Enabling e2image support" >&6; }
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling e2image support by default" >&5
+$as_echo "Enabling e2image support by default" >&6; }
+IMAGER_CMT=
+
+fi
+
+
+# Check whether --enable-resizer was given.
+if test "${enable_resizer+set}" = set; then :
+  enableval=$enable_resizer; if test "$enableval" = "no"
+then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling e2resize support" >&5
+$as_echo "Disabling e2resize support" >&6; }
+	RESIZER_CMT="#"
+else
+	RESIZER_CMT=
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling e2resize support" >&5
+$as_echo "Enabling e2resize support" >&6; }
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling e2resize support by default" >&5
+$as_echo "Enabling e2resize support by default" >&6; }
+RESIZER_CMT=
+
+fi
+
+
+# Check whether --enable-defrag was given.
+if test "${enable_defrag+set}" = set; then :
+  enableval=$enable_defrag; if test "$enableval" = "no"
+then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling e4defrag support" >&5
+$as_echo "Disabling e4defrag support" >&6; }
+	DEFRAG_CMT="#"
+else
+	DEFRAG_CMT=
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling e4defrag support" >&5
+$as_echo "Enabling e4defrag support" >&6; }
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling e4defrag support by default" >&5
+$as_echo "Enabling e4defrag support by default" >&6; }
+DEFRAG_CMT=
+
+fi
+
+
+# Check whether --enable-fsck was given.
+if test "${enable_fsck+set}" = set; then :
+  enableval=$enable_fsck; if test "$enableval" = "no"
+then
+	FSCK_PROG='' FSCK_MAN=''
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Not building fsck wrapper" >&5
+$as_echo "Not building fsck wrapper" >&6; }
+else
+	FSCK_PROG=fsck FSCK_MAN=fsck.8
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Building fsck wrapper" >&5
+$as_echo "Building fsck wrapper" >&6; }
+fi
+
+else
+  case "$host_os" in
+  gnu*)
+    FSCK_PROG='' FSCK_MAN=''
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not building fsck wrapper by default" >&5
+$as_echo "Not building fsck wrapper by default" >&6; }
+    ;;
+  *)
+    FSCK_PROG=fsck FSCK_MAN=fsck.8
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Building fsck wrapper by default" >&5
+$as_echo "Building fsck wrapper by default" >&6; }
+esac
+
+fi
+
+
+
+# Check whether --enable-e2initrd-helper was given.
+if test "${enable_e2initrd_helper+set}" = set; then :
+  enableval=$enable_e2initrd_helper; if test "$enableval" = "no"
+then
+	E2INITRD_PROG='' E2INITRD_MAN=''
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Not building e2initrd helper" >&5
+$as_echo "Not building e2initrd helper" >&6; }
+else
+	E2INITRD_PROG=e2initrd_helper E2INITRD_MAN=e2initrd_helper.8
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Building e2initrd helper" >&5
+$as_echo "Building e2initrd helper" >&6; }
+fi
+
+else
+  E2INITRD_PROG=e2initrd_helper E2INITRD_MAN=e2initrd_helper.8
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Building e2initrd helper by default" >&5
+$as_echo "Building e2initrd helper by default" >&6; }
+
+fi
+
+
+
+# Check whether --enable-tls was given.
+if test "${enable_tls+set}" = set; then :
+  enableval=$enable_tls; if test "$enableval" = "no"
+then
+	try_tls=""
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling thread local support" >&5
+$as_echo "Disabling thread local support" >&6; }
+else
+	try_tls="yes"
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling thread local support" >&5
+$as_echo "Enabling thread local support" >&6; }
+fi
+
+else
+  if test -n "$WITH_DIET_LIBC"
+then
+	try_tls=""
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Diet libc does not support thread local support" >&5
+$as_echo "Diet libc does not support thread local support" >&6; }
+else
+	try_tls="yes"
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Try using thread local support by default" >&5
+$as_echo "Try using thread local support by default" >&6; }
+fi
+
+fi
+
+if test "$try_tls" = "yes"
+then
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5
+$as_echo_n "checking for thread local storage (TLS) class... " >&6; }
+  if ${ac_cv_tls+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    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 ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_tls=$ax_tls_keyword ; break
+else
+  ac_cv_tls=none
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+          esac
+    done
+
+fi
+
+
+  if test "$ac_cv_tls" != "none"; then
+
+cat >>confdefs.h <<_ACEOF
+#define TLS $ac_cv_tls
+_ACEOF
+
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5
+$as_echo "$ac_cv_tls" >&6; }
+
+fi
+
+# Check whether --enable-uuidd was given.
+if test "${enable_uuidd+set}" = set; then :
+  enableval=$enable_uuidd; if test "$enableval" = "no"
+then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Not building uuidd" >&5
+$as_echo "Not building uuidd" >&6; }
+	UUIDD_CMT="#"
+else
+	$as_echo "#define USE_UUIDD 1" >>confdefs.h
+
+	UUIDD_CMT=""
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Building uuidd" >&5
+$as_echo "Building uuidd" >&6; }
+fi
+
+else
+  $as_echo "#define USE_UUIDD 1" >>confdefs.h
+
+UUIDD_CMT=""
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Building uuidd by default" >&5
+$as_echo "Building uuidd by default" >&6; }
+
+fi
+
+
+MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
+
+GETTEXT_PACKAGE=e2fsprogs
+PACKAGE=e2fsprogs
+VERSION="$E2FSPROGS_VERSION"
+VERSION=0.14.1
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    # Account for people who put trailing slashes in PATH elements.
+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+set}" = set; 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$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'
+
+
+        MKINSTALLDIRS=
+  if test -n "$ac_aux_dir"; then
+    case "$ac_aux_dir" in
+      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+    esac
+  fi
+  if test -z "$MKINSTALLDIRS"; then
+    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+    # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then :
+  enableval=$enable_nls; USE_NLS=$enableval
+else
+  USE_NLS=yes
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+
+
+
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_MSGFMT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+          if $ac_dir/$ac_word --statistics /dev/null >/dev/null 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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GMSGFMT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_XGETTEXT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+          if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+    rm -f messages.po
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_MSGMERGE+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+          if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
+$as_echo "$MSGMERGE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+      if test "$GMSGFMT" != ":"; then
+            if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+      : ;
+    else
+      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
+$as_echo "found $GMSGFMT program is not GNU msgfmt; ignore it" >&6; }
+      GMSGFMT=":"
+    fi
+  fi
+
+      if test "$XGETTEXT" != ":"; then
+            if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+       (if $XGETTEXT --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
+      : ;
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
+$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
+      XGETTEXT=":"
+    fi
+        rm -f messages.po
+  fi
+
+  ac_config_commands="$ac_config_commands default-1"
+
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$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
+
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5
+$as_echo_n "checking for strerror in -lcposix... " >&6; }
+if ${ac_cv_lib_cposix_strerror+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcposix  $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.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strerror ();
+int
+main ()
+{
+return strerror ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_cposix_strerror=yes
+else
+  ac_cv_lib_cposix_strerror=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cposix_strerror" >&5
+$as_echo "$ac_cv_lib_cposix_strerror" >&6; }
+if test "x$ac_cv_lib_cposix_strerror" = xyes; then :
+  LIBS="$LIBS -lcposix"
+fi
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this sort of thing.  */
+  typedef int charset[2];
+  const charset cs = { 0, 0 };
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *pcpcc;
+  char **ppc;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  pcpcc = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++pcpcc;
+  ppc = (char**) pcpcc;
+  pcpcc = (char const *const *) ppc;
+  { /* SCO 3.2v4 cc rejects this sort of thing.  */
+    char tx;
+    char *t = &tx;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+    if (s) return 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; } bx;
+    struct s *b = &bx; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+    if (!foo) return 0;
+  }
+  return !cs[0] && !zero.x;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_const=yes
+else
+  ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed" >&5
+$as_echo_n "checking for signed... " >&6; }
+if ${bh_cv_c_signed+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+signed char x;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bh_cv_c_signed=yes
+else
+  bh_cv_c_signed=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bh_cv_c_signed" >&5
+$as_echo "$bh_cv_c_signed" >&6; }
+  if test $bh_cv_c_signed = no; then
+
+$as_echo "#define signed /**/" >>confdefs.h
+
+  fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+    ;;
+esac
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
+if test "x$ac_cv_type_off_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define off_t long int
+_ACEOF
+
+fi
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5
+$as_echo_n "checking for long long... " >&6; }
+if ${ac_cv_type_long_long+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+long long ll = 1LL; int i = 63;
+int
+main ()
+{
+long long llmax = (long long) -1;
+     return ll << i | ll >> i | llmax / ll | llmax % ll;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_type_long_long=yes
+else
+  ac_cv_type_long_long=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long" >&5
+$as_echo "$ac_cv_type_long_long" >&6; }
+  if test $ac_cv_type_long_long = yes; then
+
+$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
+$as_echo_n "checking for long double... " >&6; }
+if ${gt_cv_c_long_double+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$GCC" = yes; then
+       gt_cv_c_long_double=yes
+     else
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+         /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
+         long double foo = 0.0;
+         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
+         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_c_long_double=yes
+else
+  gt_cv_c_long_double=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_long_double" >&5
+$as_echo "$gt_cv_c_long_double" >&6; }
+  if test $gt_cv_c_long_double = yes; then
+
+$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
+$as_echo_n "checking for wchar_t... " >&6; }
+if ${gt_cv_c_wchar_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+       wchar_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_c_wchar_t=yes
+else
+  gt_cv_c_wchar_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
+$as_echo "$gt_cv_c_wchar_t" >&6; }
+  if test $gt_cv_c_wchar_t = yes; then
+
+$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
+$as_echo_n "checking for wint_t... " >&6; }
+if ${gt_cv_c_wint_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <wchar.h>
+       wint_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_c_wint_t=yes
+else
+  gt_cv_c_wint_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
+$as_echo "$gt_cv_c_wint_t" >&6; }
+  if test $gt_cv_c_wint_t = yes; then
+
+$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
+$as_echo_n "checking for inttypes.h... " >&6; }
+if ${jm_ac_cv_header_inttypes_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <inttypes.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  jm_ac_cv_header_inttypes_h=yes
+else
+  jm_ac_cv_header_inttypes_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $jm_ac_cv_header_inttypes_h" >&5
+$as_echo "$jm_ac_cv_header_inttypes_h" >&6; }
+  if test $jm_ac_cv_header_inttypes_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H_WITH_UINTMAX 1
+_ACEOF
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
+$as_echo_n "checking for stdint.h... " >&6; }
+if ${jm_ac_cv_header_stdint_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <stdint.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  jm_ac_cv_header_stdint_h=yes
+else
+  jm_ac_cv_header_stdint_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $jm_ac_cv_header_stdint_h" >&5
+$as_echo "$jm_ac_cv_header_stdint_h" >&6; }
+  if test $jm_ac_cv_header_stdint_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H_WITH_UINTMAX 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
+$as_echo_n "checking for intmax_t... " >&6; }
+if ${gt_cv_c_intmax_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+
+int
+main ()
+{
+intmax_t x = -1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_c_intmax_t=yes
+else
+  gt_cv_c_intmax_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
+$as_echo "$gt_cv_c_intmax_t" >&6; }
+  if test $gt_cv_c_intmax_t = yes; then
+
+$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf() supports POSIX/XSI format strings" >&5
+$as_echo_n "checking whether printf() supports POSIX/XSI format strings... " >&6; }
+if ${gt_cv_func_printf_posix+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      if test "$cross_compiling" = yes; then :
+
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
+  notposix
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "notposix" >/dev/null 2>&1; then :
+  gt_cv_func_printf_posix="guessing no"
+else
+  gt_cv_func_printf_posix="guessing yes"
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+   dollar expansion (possibly an autoconf bug).  */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+  sprintf (buf, format, 33, 55);
+  return (strcmp (buf, "55 33") != 0);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gt_cv_func_printf_posix=yes
+else
+  gt_cv_func_printf_posix=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_printf_posix" >&5
+$as_echo "$gt_cv_func_printf_posix" >&6; }
+  case $gt_cv_func_printf_posix in
+    *yes)
+
+$as_echo "#define HAVE_POSIX_PRINTF 1" >>confdefs.h
+
+      ;;
+  esac
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if ${ac_cv_working_alloca_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+			  if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_working_alloca_h=yes
+else
+  ac_cv_working_alloca_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if ${ac_cv_func_alloca_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  ifdef HAVE_ALLOCA_H
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
+void *alloca (size_t);
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+				    if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_func_alloca_works=yes
+else
+  ac_cv_func_alloca_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+
+else
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble.  Some versions do not even contain alloca or
+# contain a buggy version.  If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+$as_echo "#define C_ALLOCA 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if ${ac_cv_os_cray+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "webecray" >/dev/null 2>&1; then :
+  ac_cv_os_cray=yes
+else
+  ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+  for ac_func in _getb67 GETB67 getb67; do
+    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+    break
+fi
+
+  done
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if ${ac_cv_c_stack_direction+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_c_stack_direction=0
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+find_stack_direction (int *addr, int depth)
+{
+  int dir, dummy = 0;
+  if (! addr)
+    addr = &dummy;
+  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+  return dir + dummy;
+}
+
+int
+main (int argc, char **argv)
+{
+  return find_stack_direction (0, argc + !argv + 20) < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_c_stack_direction=1
+else
+  ac_cv_c_stack_direction=-1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+
+
+
+  for ac_header in $ac_header_list
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+for ac_func in getpagesize
+do :
+  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
+if test "x$ac_cv_func_getpagesize" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETPAGESIZE 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
+$as_echo_n "checking for working mmap... " >&6; }
+if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_mmap_fixed_mapped=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+/* malloc might have been renamed as rpl_malloc. */
+#undef malloc
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+   Here is a matrix of mmap possibilities:
+	mmap private not fixed
+	mmap private fixed at somewhere currently unmapped
+	mmap private fixed at somewhere already mapped
+	mmap shared not fixed
+	mmap shared fixed at somewhere currently unmapped
+	mmap shared fixed at somewhere already mapped
+   For private mappings, we should verify that changes cannot be read()
+   back from the file, nor mmap's back from the file at a different
+   address.  (There have been systems where private was not correctly
+   implemented like the infamous i386 svr4.0, and systems where the
+   VM page cache was not coherent with the file system buffer cache
+   like early versions of FreeBSD and possibly contemporary NetBSD.)
+   For shared mappings, we should conversely verify that changes get
+   propagated back to all the places they're supposed to be.
+
+   Grep wants private fixed already mapped.
+   The main things grep needs to know about mmap are:
+   * does it exist and is it safe to write into the mmap'd area
+   * how to use it (BSD variants)  */
+
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
+char *malloc ();
+#endif
+
+/* This mess was copied from the GNU getpagesize.h.  */
+#ifndef HAVE_GETPAGESIZE
+# ifdef _SC_PAGESIZE
+#  define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+#  ifdef HAVE_SYS_PARAM_H
+#   include <sys/param.h>
+#   ifdef EXEC_PAGESIZE
+#    define getpagesize() EXEC_PAGESIZE
+#   else /* no EXEC_PAGESIZE */
+#    ifdef NBPG
+#     define getpagesize() NBPG * CLSIZE
+#     ifndef CLSIZE
+#      define CLSIZE 1
+#     endif /* no CLSIZE */
+#    else /* no NBPG */
+#     ifdef NBPC
+#      define getpagesize() NBPC
+#     else /* no NBPC */
+#      ifdef PAGESIZE
+#       define getpagesize() PAGESIZE
+#      endif /* PAGESIZE */
+#     endif /* no NBPC */
+#    endif /* no NBPG */
+#   endif /* no EXEC_PAGESIZE */
+#  else /* no HAVE_SYS_PARAM_H */
+#   define getpagesize() 8192	/* punt totally */
+#  endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+int
+main ()
+{
+  char *data, *data2, *data3;
+  const char *cdata2;
+  int i, pagesize;
+  int fd, fd2;
+
+  pagesize = getpagesize ();
+
+  /* First, make a file with some known garbage in it. */
+  data = (char *) malloc (pagesize);
+  if (!data)
+    return 1;
+  for (i = 0; i < pagesize; ++i)
+    *(data + i) = rand ();
+  umask (0);
+  fd = creat ("conftest.mmap", 0600);
+  if (fd < 0)
+    return 2;
+  if (write (fd, data, pagesize) != pagesize)
+    return 3;
+  close (fd);
+
+  /* Next, check that the tail of a page is zero-filled.  File must have
+     non-zero length, otherwise we risk SIGBUS for entire page.  */
+  fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
+  if (fd2 < 0)
+    return 4;
+  cdata2 = "";
+  if (write (fd2, cdata2, 1) != 1)
+    return 5;
+  data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
+  if (data2 == MAP_FAILED)
+    return 6;
+  for (i = 0; i < pagesize; ++i)
+    if (*(data2 + i))
+      return 7;
+  close (fd2);
+  if (munmap (data2, pagesize))
+    return 8;
+
+  /* Next, try to mmap the file at a fixed address which already has
+     something else allocated at it.  If we can, also make sure that
+     we see the same garbage.  */
+  fd = open ("conftest.mmap", O_RDWR);
+  if (fd < 0)
+    return 9;
+  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+		     MAP_PRIVATE | MAP_FIXED, fd, 0L))
+    return 10;
+  for (i = 0; i < pagesize; ++i)
+    if (*(data + i) != *(data2 + i))
+      return 11;
+
+  /* Finally, make sure that changes to the mapped area do not
+     percolate back to the file as seen by read().  (This is a bug on
+     some variants of i386 svr4.0.)  */
+  for (i = 0; i < pagesize; ++i)
+    *(data2 + i) = *(data2 + i) + 1;
+  data3 = (char *) malloc (pagesize);
+  if (!data3)
+    return 12;
+  if (read (fd, data3, pagesize) != pagesize)
+    return 13;
+  for (i = 0; i < pagesize; ++i)
+    if (*(data + i) != *(data3 + i))
+      return 14;
+  close (fd);
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_mmap_fixed_mapped=yes
+else
+  ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
+$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+
+$as_echo "#define HAVE_MMAP 1" >>confdefs.h
+
+fi
+rm -f conftest.mmap conftest.txt
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5
+$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; }
+if ${ac_cv_gnu_library_2_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+  Lucky GNU user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
+  ac_cv_gnu_library_2_1=yes
+else
+  ac_cv_gnu_library_2_1=no
+fi
+rm -f conftest*
+
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
+$as_echo "$ac_cv_gnu_library_2_1" >&6; }
+
+    GLIBC21="$ac_cv_gnu_library_2_1"
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5
+$as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; }
+if ${gt_cv_int_divbyzero_sigfpe+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      if test "$cross_compiling" = yes; then :
+
+          # Guess based on the CPU.
+          case "$host_cpu" in
+            alpha* | i3456786 | m68k | s390*)
+              gt_cv_int_divbyzero_sigfpe="guessing yes";;
+            *)
+              gt_cv_int_divbyzero_sigfpe="guessing no";;
+          esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
+#else
+sigfpe_handler (sig) int sig;
+#endif
+{
+  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
+  exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+  signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+  signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL.  */
+#if defined (__sparc__) && defined (__linux__)
+  signal (SIGILL, sigfpe_handler);
+#endif
+
+  z = x / y;
+  nan = y / y;
+  exit (1);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gt_cv_int_divbyzero_sigfpe=yes
+else
+  gt_cv_int_divbyzero_sigfpe=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_int_divbyzero_sigfpe" >&5
+$as_echo "$gt_cv_int_divbyzero_sigfpe" >&6; }
+  case "$gt_cv_int_divbyzero_sigfpe" in
+    *yes) value=1;;
+    *) value=0;;
+  esac
+
+cat >>confdefs.h <<_ACEOF
+#define INTDIV0_RAISES_SIGFPE $value
+_ACEOF
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5
+$as_echo_n "checking for unsigned long long... " >&6; }
+if ${ac_cv_type_unsigned_long_long+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+unsigned long long ull = 1ULL; int i = 63;
+int
+main ()
+{
+unsigned long long ullmax = (unsigned long long) -1;
+     return ull << i | ull >> i | ullmax / ull | ullmax % ull;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_type_unsigned_long_long=yes
+else
+  ac_cv_type_unsigned_long_long=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long" >&5
+$as_echo "$ac_cv_type_unsigned_long_long" >&6; }
+  if test $ac_cv_type_unsigned_long_long = yes; then
+
+$as_echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>confdefs.h
+
+  fi
+
+
+
+
+  if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
+
+    test $ac_cv_type_unsigned_long_long = yes \
+      && ac_type='unsigned long long' \
+      || ac_type='unsigned long'
+
+cat >>confdefs.h <<_ACEOF
+#define uintmax_t $ac_type
+_ACEOF
+
+  else
+
+$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
+$as_echo_n "checking for inttypes.h... " >&6; }
+if ${gt_cv_header_inttypes_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <inttypes.h>
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_header_inttypes_h=yes
+else
+  gt_cv_header_inttypes_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_header_inttypes_h" >&5
+$as_echo "$gt_cv_header_inttypes_h" >&6; }
+  if test $gt_cv_header_inttypes_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H 1
+_ACEOF
+
+  fi
+
+
+
+  if test $gt_cv_header_inttypes_h = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
+$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
+if ${gt_cv_inttypes_pri_broken+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_inttypes_pri_broken=no
+else
+  gt_cv_inttypes_pri_broken=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
+$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
+  fi
+  if test "$gt_cv_inttypes_pri_broken" = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define PRI_MACROS_BROKEN 1
+_ACEOF
+
+  fi
+
+
+  for ac_header in stdint.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H 1
+_ACEOF
+
+fi
+
+done
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
+$as_echo_n "checking for SIZE_MAX... " >&6; }
+  result=
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Found it" >/dev/null 2>&1; then :
+  result=yes
+fi
+rm -f conftest*
+
+  if test -z "$result"; then
+                    if ac_fn_c_compute_int "$LINENO" "~(size_t)0 / 10" "res_hi"        "#include <stddef.h>"; then :
+
+else
+  result=?
+fi
+
+
+    if ac_fn_c_compute_int "$LINENO" "~(size_t)0 % 10" "res_lo"        "#include <stddef.h>"; then :
+
+else
+  result=?
+fi
+
+
+    if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
+
+else
+  result=?
+fi
+
+
+    if test "$fits_in_uint" = 1; then
+                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+        extern size_t foo;
+        extern unsigned long foo;
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  fits_in_uint=0
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test -z "$result"; then
+      if test "$fits_in_uint" = 1; then
+        result="$res_hi$res_lo"U
+      else
+        result="$res_hi$res_lo"UL
+      fi
+    else
+            result='~(size_t)0'
+    fi
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
+$as_echo "$result" >&6; }
+  if test "$result" != yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define SIZE_MAX $result
+_ACEOF
+
+  fi
+
+
+
+  for ac_header in stdint.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+      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+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
+$as_echo_n "checking for ld used by GCC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | [A-Za-z]:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${acl_cv_path_LD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    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 GNU ld's 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="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${acl_cv_prog_gnu_ld+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
+$as_echo "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
+$as_echo_n "checking for shared library run path origin... " >&6; }
+if ${acl_cv_rpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
+$as_echo "$acl_cv_rpath" >&6; }
+  wl="$acl_cv_wl"
+  libext="$acl_cv_libext"
+  shlibext="$acl_cv_shlibext"
+  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  hardcode_direct="$acl_cv_hardcode_direct"
+  hardcode_minus_L="$acl_cv_hardcode_minus_L"
+    # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then :
+  enableval=$enable_rpath; :
+else
+  enable_rpath=yes
+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\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; 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\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/lib"
+      fi
+    fi
+
+fi
+
+      LIBICONV=
+  LTLIBICONV=
+  INCICONV=
+  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=
+          if test $use_additional = yes; then
+            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+              found_dir="$additional_libdir"
+              found_so="$additional_libdir/lib$name.$shlibext"
+              if test -f "$additional_libdir/lib$name.la"; then
+                found_la="$additional_libdir/lib$name.la"
+              fi
+            else
+              if test -f "$additional_libdir/lib$name.$libext"; then
+                found_dir="$additional_libdir"
+                found_a="$additional_libdir/lib$name.$libext"
+                if test -f "$additional_libdir/lib$name.la"; then
+                  found_la="$additional_libdir/lib$name.la"
+                fi
+              fi
+            fi
+          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 "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                    found_dir="$dir"
+                    found_so="$dir/lib$name.$shlibext"
+                    if test -f "$dir/lib$name.la"; then
+                      found_la="$dir/lib$name.la"
+                    fi
+                  else
+                    if test -f "$dir/lib$name.$libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/lib$name.$libext"
+                      if test -f "$dir/lib$name.la"; then
+                        found_la="$dir/lib$name.la"
+                      fi
+                    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/lib"; 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 "$hardcode_direct" = yes; then
+                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                else
+                  if test -n "$hardcode_libdir_flag_spec" && test "$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 "$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
+              */lib | */lib/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+                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*) 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*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/lib"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux*) 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$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_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$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_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 "$hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$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=\"$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
+
+
+
+
+
+
+
+
+  ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
+
+else
+
+$as_echo "#define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+  for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h unistd.h sys/param.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+  for ac_func in asprintf fwprintf getcwd getegid geteuid getgid getuid \
+mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
+strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
+__fsetlocking
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _snprintf is declared" >&5
+$as_echo_n "checking whether _snprintf is declared... " >&6; }
+if ${ac_cv_have_decl__snprintf+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+
+#ifndef _snprintf
+  char *p = (char *) _snprintf;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_have_decl__snprintf=yes
+else
+  ac_cv_have_decl__snprintf=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl__snprintf" >&5
+$as_echo "$ac_cv_have_decl__snprintf" >&6; }
+  if test $ac_cv_have_decl__snprintf = yes; then
+    gt_value=1
+  else
+    gt_value=0
+  fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL__SNPRINTF $gt_value
+_ACEOF
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _snwprintf is declared" >&5
+$as_echo_n "checking whether _snwprintf is declared... " >&6; }
+if ${ac_cv_have_decl__snwprintf+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+
+#ifndef _snwprintf
+  char *p = (char *) _snwprintf;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_have_decl__snwprintf=yes
+else
+  ac_cv_have_decl__snwprintf=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl__snwprintf" >&5
+$as_echo "$ac_cv_have_decl__snwprintf" >&6; }
+  if test $ac_cv_have_decl__snwprintf = yes; then
+    gt_value=1
+  else
+    gt_value=0
+  fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL__SNWPRINTF $gt_value
+_ACEOF
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether feof_unlocked is declared" >&5
+$as_echo_n "checking whether feof_unlocked is declared... " >&6; }
+if ${ac_cv_have_decl_feof_unlocked+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+
+#ifndef feof_unlocked
+  char *p = (char *) feof_unlocked;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_have_decl_feof_unlocked=yes
+else
+  ac_cv_have_decl_feof_unlocked=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl_feof_unlocked" >&5
+$as_echo "$ac_cv_have_decl_feof_unlocked" >&6; }
+  if test $ac_cv_have_decl_feof_unlocked = yes; then
+    gt_value=1
+  else
+    gt_value=0
+  fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FEOF_UNLOCKED $gt_value
+_ACEOF
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fgets_unlocked is declared" >&5
+$as_echo_n "checking whether fgets_unlocked is declared... " >&6; }
+if ${ac_cv_have_decl_fgets_unlocked+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+
+#ifndef fgets_unlocked
+  char *p = (char *) fgets_unlocked;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_have_decl_fgets_unlocked=yes
+else
+  ac_cv_have_decl_fgets_unlocked=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl_fgets_unlocked" >&5
+$as_echo "$ac_cv_have_decl_fgets_unlocked" >&6; }
+  if test $ac_cv_have_decl_fgets_unlocked = yes; then
+    gt_value=1
+  else
+    gt_value=0
+  fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FGETS_UNLOCKED $gt_value
+_ACEOF
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getc_unlocked is declared" >&5
+$as_echo_n "checking whether getc_unlocked is declared... " >&6; }
+if ${ac_cv_have_decl_getc_unlocked+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+
+#ifndef getc_unlocked
+  char *p = (char *) getc_unlocked;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_have_decl_getc_unlocked=yes
+else
+  ac_cv_have_decl_getc_unlocked=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl_getc_unlocked" >&5
+$as_echo "$ac_cv_have_decl_getc_unlocked" >&6; }
+  if test $ac_cv_have_decl_getc_unlocked = yes; then
+    gt_value=1
+  else
+    gt_value=0
+  fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED $gt_value
+_ACEOF
+
+
+
+  case $gt_cv_func_printf_posix in
+    *yes) HAVE_POSIX_PRINTF=1 ;;
+    *) HAVE_POSIX_PRINTF=0 ;;
+  esac
+
+  if test "$ac_cv_func_asprintf" = yes; then
+    HAVE_ASPRINTF=1
+  else
+    HAVE_ASPRINTF=0
+  fi
+
+  if test "$ac_cv_func_snprintf" = yes; then
+    HAVE_SNPRINTF=1
+  else
+    HAVE_SNPRINTF=0
+  fi
+
+  if test "$ac_cv_func_wprintf" = yes; then
+    HAVE_WPRINTF=1
+  else
+    HAVE_WPRINTF=0
+  fi
+
+
+
+
+
+
+
+          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
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+if ${am_cv_func_iconv+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    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 ()
+{
+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$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 ()
+{
+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$ac_exeext conftest.$ac_ext
+      LIBS="$am_save_LIBS"
+    fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
+  if test "$am_cv_func_iconv" = yes; then
+
+$as_echo "#define HAVE_ICONV 1" >>confdefs.h
+
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
+  else
+            CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+
+
+
+  if test "$am_cv_func_iconv" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
+$as_echo_n "checking for iconv declaration... " >&6; }
+    if ${am_cv_proto_iconv+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  am_cv_proto_iconv_arg1=""
+else
+  am_cv_proto_iconv_arg1="const"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      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);"
+fi
+
+    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
+         }$am_cv_proto_iconv" >&5
+$as_echo "${ac_t:-
+         }$am_cv_proto_iconv" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define ICONV_CONST $am_cv_proto_iconv_arg1
+_ACEOF
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
+$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
+if ${am_cv_langinfo_codeset+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(CODESET);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  am_cv_langinfo_codeset=yes
+else
+  am_cv_langinfo_codeset=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
+$as_echo "$am_cv_langinfo_codeset" >&6; }
+  if test $am_cv_langinfo_codeset = yes; then
+
+$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
+
+  fi
+
+  if test $ac_cv_header_locale_h = yes; then
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
+$as_echo_n "checking for LC_MESSAGES... " >&6; }
+if ${am_cv_val_LC_MESSAGES+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <locale.h>
+int
+main ()
+{
+return LC_MESSAGES
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  am_cv_val_LC_MESSAGES=yes
+else
+  am_cv_val_LC_MESSAGES=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
+$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
+  if test $am_cv_val_LC_MESSAGES = yes; then
+
+$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
+
+  fi
+
+  fi
+
+                      for ac_prog in bison
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_INTLBISON+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$INTLBISON"; then
+  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    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_INTLBISON="$ac_prog"
+    $as_echo "$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
+INTLBISON=$ac_cv_prog_INTLBISON
+if test -n "$INTLBISON"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5
+$as_echo "$INTLBISON" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$INTLBISON" && break
+done
+
+  if test -z "$INTLBISON"; then
+    ac_verc_fail=yes
+  else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of bison" >&5
+$as_echo_n "checking version of bison... " >&6; }
+    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+    case $ac_prog_version in
+      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+    esac
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
+$as_echo "$ac_prog_version" >&6; }
+  fi
+  if test $ac_verc_fail = yes; then
+    INTLBISON=:
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+    # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then :
+  enableval=$enable_nls; USE_NLS=$enableval
+else
+  USE_NLS=yes
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+
+
+
+
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+    if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5
+$as_echo_n "checking whether included gettext is requested... " >&6; }
+
+# Check whether --with-included-gettext was given.
+if test "${with_included_gettext+set}" = set; then :
+  withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval
+else
+  nls_cv_force_use_gnu_gettext=no
+fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5
+$as_echo "$nls_cv_force_use_gnu_gettext" >&6; }
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+
+
+
+
+
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
+$as_echo_n "checking for GNU gettext in libc... " >&6; }
+if ${gt_cv_func_gnugettext1_libc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <libintl.h>
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+int
+main ()
+{
+bindtextdomain ("", "");
+return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gt_cv_func_gnugettext1_libc=yes
+else
+  gt_cv_func_gnugettext1_libc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_gnugettext1_libc" >&5
+$as_echo "$gt_cv_func_gnugettext1_libc" >&6; }
+
+        if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
+
+
+
+    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\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libintl-prefix was given.
+if test "${with_libintl_prefix+set}" = set; 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\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/lib"
+      fi
+    fi
+
+fi
+
+      LIBINTL=
+  LTLIBINTL=
+  INCINTL=
+  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=
+          if test $use_additional = yes; then
+            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+              found_dir="$additional_libdir"
+              found_so="$additional_libdir/lib$name.$shlibext"
+              if test -f "$additional_libdir/lib$name.la"; then
+                found_la="$additional_libdir/lib$name.la"
+              fi
+            else
+              if test -f "$additional_libdir/lib$name.$libext"; then
+                found_dir="$additional_libdir"
+                found_a="$additional_libdir/lib$name.$libext"
+                if test -f "$additional_libdir/lib$name.la"; then
+                  found_la="$additional_libdir/lib$name.la"
+                fi
+              fi
+            fi
+          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 "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                    found_dir="$dir"
+                    found_so="$dir/lib$name.$shlibext"
+                    if test -f "$dir/lib$name.la"; then
+                      found_la="$dir/lib$name.la"
+                    fi
+                  else
+                    if test -f "$dir/lib$name.$libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/lib$name.$libext"
+                      if test -f "$dir/lib$name.la"; then
+                        found_la="$dir/lib$name.la"
+                      fi
+                    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/lib"; 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 "$hardcode_direct" = yes; then
+                                                      LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                else
+                  if test -n "$hardcode_libdir_flag_spec" && test "$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 "$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
+              */lib | */lib/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+                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*) 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*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/lib"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux*) 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$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_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$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_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 "$hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$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=\"$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
+
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
+$as_echo_n "checking for GNU gettext in libintl... " >&6; }
+if ${gt_cv_func_gnugettext1_libintl+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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>
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();
+int
+main ()
+{
+bindtextdomain ("", "");
+return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gt_cv_func_gnugettext1_libintl=yes
+else
+  gt_cv_func_gnugettext1_libintl=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                        if test "$gt_cv_func_gnugettext1_libintl" != yes && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <libintl.h>
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();
+int
+main ()
+{
+bindtextdomain ("", "");
+return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  LIBINTL="$LIBINTL $LIBICONV"
+                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                gt_cv_func_gnugettext1_libintl=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_gnugettext1_libintl" >&5
+$as_echo "$gt_cv_func_gnugettext1_libintl" >&6; }
+        fi
+
+                                        if test "$gt_cv_func_gnugettext1_libc" = "yes" \
+           || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+                    LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
+
+
+        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+                              nls_cv_use_gnu_gettext=yes
+        fi
+      fi
+
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+                BUILD_INCLUDED_LIBINTL=yes
+        USE_INCLUDED_LIBINTL=yes
+        LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV"
+        LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV"
+        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+      fi
+
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+                CATOBJEXT=.gmo
+      fi
+
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
+
+$as_echo "#define ENABLE_NLS 1" >>confdefs.h
+
+    else
+      USE_NLS=no
+    fi
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
+$as_echo_n "checking whether to use NLS... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+  if test "$USE_NLS" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
+$as_echo_n "checking where the gettext function comes from... " >&6; }
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
+        gt_source="external libintl"
+      else
+        gt_source="libc"
+      fi
+    else
+      gt_source="included intl directory"
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
+$as_echo "$gt_source" >&6; }
+  fi
+
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
+$as_echo_n "checking how to link with libintl... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
+$as_echo "$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
+
+
+$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
+
+    fi
+
+        POSUB=po
+  fi
+
+
+            if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
+
+
+
+
+
+        nls_cv_header_intl=
+    nls_cv_header_libgt=
+
+        DATADIRNAME=share
+
+
+        INSTOBJEXT=.mo
+
+
+        GENCAT=gencat
+
+
+        if test "$USE_INCLUDED_LIBINTL" = yes; then
+      INTLOBJS="\$(GETTOBJS)"
+    fi
+
+
+        INTL_LIBTOOL_SUFFIX_PREFIX=
+
+
+
+    INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5
+$as_echo_n "checking for GNU make... " >&6; }
+if ${_cv_gnu_make_command+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  _cv_gnu_make_command='' ;
+                for a in "$MAKE" make gmake gnumake ; 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5
+$as_echo "$_cv_gnu_make_command" >&6; } ;
+        if test  "x$_cv_gnu_make_command" != "x"  ; then
+                ifGNUmake='' ;
+                ifNotGNUmake='#' ;
+        else
+                ifGNUmake='#' ;
+                ifNotGNUmake='' ;
+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5
+$as_echo "\"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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_LN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
+$as_echo "$LN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_MV+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
+$as_echo "$MV" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "cp", so it can be a program name with args.
+set dummy cp; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
+$as_echo "$CP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "rm", so it can be a program name with args.
+set dummy rm; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_RM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
+$as_echo "$RM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "chmod", so it can be a program name with args.
+set dummy chmod; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CHMOD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
+$as_echo "$CHMOD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
+$as_echo "$SED" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PERL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "ldconfig", so it can be a program name with args.
+set dummy ldconfig; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_LDCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDCONFIG" >&5
+$as_echo "$LDCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_AR" = x; then
+    AR="ar"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MAKEINFO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
+$as_echo "$MAKEINFO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test "_$MAKEINFO" = "_"; then
+    MAKEINFO="@echo Makeinfo is missing. Info documentation will not be built.;true"
+else
+    case "$MAKEINFO" in
+      */missing.*)
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+*** Makeinfo is missing. Info documentation will not be built." >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_BUILD_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
+$as_echo "$BUILD_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$BUILD_CC" && break
+done
+
+fi
+for ac_header in  	dirent.h 	errno.h 	execinfo.h 	getopt.h 	malloc.h 	mntent.h 	paths.h 	semaphore.h 	setjmp.h 	signal.h 	stdarg.h 	stdint.h 	stdlib.h 	termios.h 	termio.h 	unistd.h 	utime.h 	linux/falloc.h 	linux/fd.h 	linux/major.h 	linux/loop.h 	net/if_dl.h 	netinet/in.h 	sys/disklabel.h 	sys/file.h 	sys/ioctl.h 	sys/mkdev.h 	sys/mman.h 	sys/prctl.h 	sys/queue.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
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in sys/disk.h sys/mount.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
+#if HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#endif
+
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in net/if.h
+do :
+  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 :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_NET_IF_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_func in vprintf
+do :
+  ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
+if test "x$ac_cv_func_vprintf" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_VPRINTF 1
+_ACEOF
+
+ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
+if test "x$ac_cv_func__doprnt" = xyes; then :
+
+$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
+
+fi
+
+fi
+done
+
+
+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 :
+
+$as_echo "#define HAVE_RECLEN_DIRENT 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 :
+
+$as_echo "#define HAVE_TYPE_SSIZE_T 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_decl "$LINENO" "llseek" "ac_cv_have_decl_llseek" "#include <unistd.h>
+"
+if test "x$ac_cv_have_decl_llseek" = xyes; then :
+
+$as_echo "#define HAVE_LLSEEK_PROTOTYPE 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_decl "$LINENO" "lseek64" "ac_cv_have_decl_lseek64" "#define _LARGEFILE_SOURCE
+		 #define _LARGEFILE64_SOURCE
+		 #include <unistd.h>
+"
+if test "x$ac_cv_have_decl_lseek64" = xyes; then :
+
+$as_echo "#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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+$as_echo_n "checking size of short... " >&6; }
+if ${ac_cv_sizeof_short+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_short" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
+
+
+# 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if ${ac_cv_sizeof_int+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_int" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+
+# 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if ${ac_cv_sizeof_long+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_long" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+# 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
+$as_echo_n "checking size of long long... " >&6; }
+if ${ac_cv_sizeof_long_long+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_long_long" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
+$as_echo "$ac_cv_sizeof_long_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+_ACEOF
+
+
+# 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
+$as_echo_n "checking size of off_t... " >&6; }
+if ${ac_cv_sizeof_off_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_off_t" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
+$as_echo "$ac_cv_sizeof_off_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
+_ACEOF
+
+
+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
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if ${ac_cv_c_bigendian+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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.$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 ()
+{
+#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 ()
+{
+#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
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext 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 ()
+{
+#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 ()
+{
+#ifndef _BIG_ENDIAN
+		 not big endian
+		#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext 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.  */
+short int ascii_mm[] =
+		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+		short int ascii_ii[] =
+		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+		int use_ascii (int i) {
+		  return ascii_mm[i] + ascii_ii[i];
+		}
+		short int ebcdic_ii[] =
+		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+		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 ()
+{
+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.$ac_ext
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+	     /* 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
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+   yes)
+     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+   no)
+      ;; #(
+   universal)
+
+$as_echo "#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
+
+BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
+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
+
+for ac_header in inttypes.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_inttypes_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H 1
+_ACEOF
+
+fi
+
+done
+
+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 :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INTPTR_T 1
+_ACEOF
+
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat has a st_flags field" >&5
+$as_echo_n "checking whether struct stat has a st_flags field... " >&6; }
+if ${e2fsprogs_cv_struct_st_flags+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+int
+main ()
+{
+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
+  e2fsprogs_cv_struct_st_flags=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $e2fsprogs_cv_struct_st_flags" >&5
+$as_echo "$e2fsprogs_cv_struct_st_flags" >&6; }
+if test "$e2fsprogs_cv_struct_st_flags" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether st_flags field is useful" >&5
+$as_echo_n "checking whether st_flags field is useful... " >&6; }
+  if ${e2fsprogs_cv_struct_st_flags_immut+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+int
+main ()
+{
+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
+  e2fsprogs_cv_struct_st_flags_immut=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $e2fsprogs_cv_struct_st_flags_immut" >&5
+$as_echo "$e2fsprogs_cv_struct_st_flags_immut" >&6; }
+  if test "$e2fsprogs_cv_struct_st_flags_immut" = yes; then
+
+$as_echo "#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 :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SA_LEN 1
+_ACEOF
+
+fi
+
+if test -n "$BLKID_CMT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing blkid_probe_all" >&5
+$as_echo_n "checking for library containing blkid_probe_all... " >&6; }
+if ${ac_cv_search_blkid_probe_all+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$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.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char blkid_probe_all ();
+int
+main ()
+{
+return blkid_probe_all ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' blkid; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_blkid_probe_all=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_blkid_probe_all+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_blkid_probe_all+:} false; then :
+
+else
+  ac_cv_search_blkid_probe_all=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_blkid_probe_all" >&5
+$as_echo "$ac_cv_search_blkid_probe_all" >&6; }
+ac_res=$ac_cv_search_blkid_probe_all
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+fi
+for ac_func in  	__secure_getenv 	backtrace 	blkid_probe_get_topology 	chflags 	fallocate 	fallocate64 	fchown 	fdatasync 	fstat64 	ftruncate64 	getdtablesize 	getmntinfo 	getpwuid_r 	getrlimit 	getrusage 	jrand48 	llseek 	lseek64 	mallinfo 	mbstowcs 	memalign 	mmap 	msync 	nanosleep 	open64 	pathconf 	posix_fadvise 	posix_memalign 	prctl 	secure_getenv 	setmntent 	setresgid 	setresuid 	srandom 	strcasecmp 	strdup 	strnlen 	strptime 	strtoull 	sync_file_range 	sysconf 	usleep 	utime 	valloc
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+SOCKET_LIB=''
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
+$as_echo_n "checking for socket in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_socket+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char socket ();
+int
+main ()
+{
+return socket ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_socket=yes
+else
+  ac_cv_lib_socket_socket=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
+$as_echo "$ac_cv_lib_socket_socket" >&6; }
+if test "x$ac_cv_lib_socket_socket" = xyes; then :
+  SOCKET_LIB=-lsocket
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
+$as_echo_n "checking for optreset... " >&6; }
+if ${ac_cv_have_optreset+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  ac_cv_have_optreset=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_optreset" >&5
+$as_echo "$ac_cv_have_optreset" >&6; }
+if test $ac_cv_have_optreset = yes; then
+
+$as_echo "#define HAVE_OPTRESET 1" >>confdefs.h
+
+fi
+
+SEM_INIT_LIB=''
+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_echo "$as_me:${as_lineno-$LINENO}: checking for sem_init in -lpthread" >&5
+$as_echo_n "checking for sem_init in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_sem_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sem_init ();
+int
+main ()
+{
+return sem_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_sem_init=yes
+else
+  ac_cv_lib_pthread_sem_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sem_init" >&5
+$as_echo "$ac_cv_lib_pthread_sem_init" >&6; }
+if test "x$ac_cv_lib_pthread_sem_init" = xyes; then :
+  $as_echo "#define HAVE_SEM_INIT 1" >>confdefs.h
+
+  	SEM_INIT_LIB=-lpthread
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sem_init in -lrt" >&5
+$as_echo_n "checking for sem_init in -lrt... " >&6; }
+if ${ac_cv_lib_rt_sem_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sem_init ();
+int
+main ()
+{
+return sem_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_rt_sem_init=yes
+else
+  ac_cv_lib_rt_sem_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sem_init" >&5
+$as_echo "$ac_cv_lib_rt_sem_init" >&6; }
+if test "x$ac_cv_lib_rt_sem_init" = xyes; then :
+  $as_echo "#define HAVE_SEM_INIT 1" >>confdefs.h
+
+  	SEM_INIT_LIB=-lrt
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sem_init in -lposix4" >&5
+$as_echo_n "checking for sem_init in -lposix4... " >&6; }
+if ${ac_cv_lib_posix4_sem_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sem_init ();
+int
+main ()
+{
+return sem_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_posix4_sem_init=yes
+else
+  ac_cv_lib_posix4_sem_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sem_init" >&5
+$as_echo "$ac_cv_lib_posix4_sem_init" >&6; }
+if test "x$ac_cv_lib_posix4_sem_init" = xyes; then :
+  $as_echo "#define HAVE_SEM_INIT 1" >>confdefs.h
+
+  	SEM_INIT_LIB=-lposix4
+fi
+
+fi
+
+fi
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unified diff option" >&5
+$as_echo_n "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNI_DIFF_OPTS" >&5
+$as_echo "$UNI_DIFF_OPTS" >&6; }
+
+case "$host_os" in
+linux*)
+
+$as_echo "#define HAVE_EXT2_IOCTLS 1" >>confdefs.h
+
+	;;
+esac
+LINUX_CMT="#"
+CYGWIN_CMT="#"
+UNIX_CMT=
+case "$host_os" in
+linux*)
+	LINUX_CMT=
+	;;
+cygwin)
+	CYGWIN_CMT=
+	UNIX_CMT="#"
+	;;
+esac
+
+
+
+case "$host_os" in
+linux* | gnu* | k*bsd*-gnu)
+	if test "$prefix" = NONE -a "$root_prefix" = NONE ; then
+		root_prefix="";
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: On $host_os systems, root_prefix defaults to ''" >&5
+$as_echo "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";
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: On $host_os systems, prefix defaults to /usr" >&5
+$as_echo "On $host_os systems, prefix defaults to /usr" >&6; }
+		if test "$mandir" = '${prefix}/man' ; then
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ...and mandir defaults to /usr/share/man" >&5
+$as_echo "...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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Setting root_bindir to $root_bindir" >&5
+$as_echo "Setting root_bindir to $root_bindir" >&6; }
+fi
+if test "$sbindir" != '${exec_prefix}/sbin'; then
+    root_sbindir=$sbindir
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Setting root_sbindir to $root_sbindir" >&5
+$as_echo "Setting root_sbindir to $root_sbindir" >&6; }
+fi
+if test "$libdir" != '${exec_prefix}/lib'; then
+    root_libdir=$libdir
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Setting root_libdir to $root_libdir" >&5
+$as_echo "Setting root_libdir to $root_libdir" >&6; }
+fi
+if test "$sysconfdir" != '${prefix}/etc'; then
+    root_sysconfdir=$sysconfdir
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Setting root_sysconfdir to $root_sysconfdir" >&5
+$as_echo "Setting root_sysconfdir to $root_sysconfdir" >&6; }
+fi
+
+
+
+
+
+
+# Check whether --with-multiarch was given.
+if test "${with_multiarch+set}" = set; then :
+  withval=$with_multiarch; libdir=$libdir/$withval
+root_libdir=$root_libdir/$withval
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can link with -static" >&5
+$as_echo_n "checking whether we can link with -static... " >&6; }
+if ${ac_cv_e2fsprogs_use_static+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -static"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+fflush(stdout);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_e2fsprogs_use_static=yes
+else
+  ac_cv_e2fsprogs_use_static=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LDFLAGS=$SAVE_LDFLAGS
+fi
+
+case "$host_os" in
+solaris2.*)
+	ac_cv_e2fsprogs_use_static=no
+;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_e2fsprogs_use_static" >&5
+$as_echo "$ac_cv_e2fsprogs_use_static" >&6; }
+LDFLAG_STATIC=
+if test $ac_cv_e2fsprogs_use_static = yes; then
+	LDFLAG_STATIC=-static
+fi
+
+case "$host_os" in
+darwin*)
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Using Apple Darwin / GNU libintl workaround" >&5
+$as_echo "Using Apple Darwin / GNU libintl workaround" >&6; }
+
+$as_echo "#define _INTL_REDIRECT_MACROS 1" >>confdefs.h
+
+	;;
+esac
+SS_DIR=`cd ${srcdir}/lib/ss; pwd`
+ET_DIR=`cd ${srcdir}/lib/et; pwd`
+
+
+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 $cross_compiling = no; then
+   BUILD_CFLAGS="$CFLAGS $CPPFLAGS"
+   BUILD_LDFLAGS="$LDFLAGS"
+else
+   BUILD_CFLAGS=
+   BUILD_LDFLAGS=
+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
+for i in MCONFIG Makefile e2fsprogs.spec \
+	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 \
+	lib/uuid/Makefile lib/uuid/uuid_types.h \
+	lib/blkid/Makefile lib/blkid/blkid_types.h lib/quota/Makefile \
+	lib/ss/ss.pc lib/uuid/uuid.pc lib/et/com_err.pc \
+	lib/e2p/e2p.pc lib/blkid/blkid.pc lib/ext2fs/ext2fs.pc \
+	misc/Makefile ext2ed/Makefile e2fsck/Makefile \
+	debugfs/Makefile tests/Makefile tests/progs/Makefile \
+	resize/Makefile doc/Makefile intl/Makefile \
+	intl/libgnuintl.h po/Makefile.in ; 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$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+set}" = set || &/
+     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
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$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=`$as_echo "$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"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$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
+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
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+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
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# 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
+  test -z "$as_dir" && as_dir=.
+    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
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# 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
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$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_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_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 ||
+$as_echo 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
+
+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
+
+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=`$as_echo "$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 ||
+$as_echo 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.69.  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
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 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'
+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 )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$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=`$as_echo "$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 )
+    $as_echo "$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
+  \$as_echo "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
+  $as_echo "$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. But hide it
+    # from automake.
+    eval '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" ;;
+    "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+    "$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+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || 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=`$as_echo "$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 '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$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 ||
+$as_echo 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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$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
+_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@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$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
+$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"; } &&
+  { $as_echo "$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
+$as_echo "$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
+    {
+      $as_echo "/* $configure_input  */" \
+      && 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
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$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
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
+  fi
+ ;;
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "default-1":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
+        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"
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ 	]*\$/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" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+            # Hide the ALL_LINGUAS assigment from automake.
+            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            eval '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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$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/e2fsprogs/configure.in b/e2fsprogs/configure.in
new file mode 100644
index 0000000..6f39cc9
--- /dev/null
+++ b/e2fsprogs/configure.in
@@ -0,0 +1,1316 @@
+AC_INIT(version.h)
+AC_PREREQ(2.54)
+AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_HEADERS([lib/config.h])
+AH_BOTTOM([#include "dirpaths.h"])
+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}'`
+DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
+	| tr \" " "`
+E2FSPROGS_DAY=`echo $DATE | awk -F- '{print $1}'`
+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" ;;
+*)	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-$E2FSPROGS_YEAR-$MONTH_NUM-$E2FSPROGS_DAY"
+	;;
+*)
+	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_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_DEFINE(HAVE_DLOPEN, 1, [Define to 1 if dlopen/libdl exists])])
+AC_SUBST(DLOPEN_LIB)
+dnl
+dnl Use diet libc
+dnl 
+WITH_DIET_LIBC=
+AC_ARG_WITH([diet-libc],
+[  --with-diet-libc        use diet libc],
+CC="diet cc -nostdinc"
+WITH_DIET_LIBC=yes
+AC_MSG_RESULT(CC=$CC))dnl
+dnl
+AC_ARG_WITH([cc],
+AC_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],
+AC_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],
+AC_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 extentions.  Will be dealt with after
+dnl parsing configuration opions, 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],
+[  --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],
+[  --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],
+[  --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],
+[  --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],
+[  --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],
+[  --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 handle --enable-compression
+dnl
+AC_ARG_ENABLE([compression],
+[  --enable-compression	  enable EXPERIMENTAL compression support],
+if test "$enableval" = "no"
+then
+	AC_MSG_RESULT([Disabling compression support])
+else
+	AC_DEFINE(ENABLE_COMPRESSION, 1,
+		[Define to 1 if ext2 compression enabled])
+	AC_MSG_RESULT([Enabling compression support])
+	AC_MSG_WARN([Compression support is experimental])
+fi
+,
+AC_MSG_RESULT([Disabling compression support by default])
+)
+dnl
+dnl handle --enable-htree
+dnl
+AH_TEMPLATE([ENABLE_HTREE], [Define to 1 if ext3/4 htree support enabled])
+AC_ARG_ENABLE([htree],
+[  --enable-htree      	  enable EXPERIMENTAL htree directory support],
+if test "$enableval" = "no"
+then
+	HTREE_CMT=#
+	AC_MSG_RESULT([Disabling htree directory support])
+else
+	HTREE_CMT=
+	AC_DEFINE(ENABLE_HTREE, 1)
+	AC_MSG_RESULT([Enabling htree directory support])
+fi
+,
+HTREE_CMT=
+AC_DEFINE(ENABLE_HTREE, 1)
+AC_MSG_RESULT([Enabling htree directory support by default])
+)
+AC_SUBST(HTREE_CMT)
+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],
+[  --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],
+[  --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],
+[  --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-checker
+dnl
+AC_ARG_ENABLE([checker],
+[  --enable-checker	  build checker libraries],
+if test "$enableval" = "no"
+then
+	CHECKER_CMT=#
+	MAKEFILE_CHECKER=/dev/null
+	AC_MSG_RESULT([Disabling checker libraries])
+else
+	CHECKER_CMT=
+	MAKEFILE_CHECKER=$srcdir/lib/Makefile.checker
+	AC_MSG_RESULT([Building checker libraries])
+fi
+,
+CHECKER_CMT=#
+MAKEFILE_CHECKER=/dev/null
+AC_MSG_RESULT([Disabling checker libraries by default])
+)
+AC_SUBST(CHECKER_CMT)
+AC_SUBST_FILE(MAKEFILE_CHECKER)
+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],
+[  --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],
+[  --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],
+[  --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 --disable-libuuid
+dnl
+PKG_PROG_PKG_CONFIG
+LIBUUID=
+DEPLIBUUID=
+STATIC_LIBUUID=
+DEPSTATIC_LIBUUID=
+PROFILED_LIBUUID=
+DEPPROFILED_LIBUUID=
+UUID_CMT=
+AC_ARG_ENABLE([libuuid],
+[  --disable-libuuid	  do not build 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])],
+		[$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
+,
+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])
+)
+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],
+[  --disable-libblkid	  do not build 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])],
+		[$LIBBLKID])
+	BLKID_CMT=#
+	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
+,
+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])
+)
+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-quota
+dnl
+QUOTA_MAN_COMMENT='.\"'
+QUOTA_CMT=
+AC_SUBST(QUOTA_MAN_COMMENT)
+PKG_PROG_PKG_CONFIG
+AH_TEMPLATE([CONFIG_QUOTA], [Define to 1 to enable quota support])
+AC_ARG_ENABLE([quota],
+[  --enable-quota	  enable quota support],
+if test "$enableval" = "no"
+then
+	QUOTA_CMT=#
+	AC_MSG_RESULT([Disabling quota support])
+else
+	QUOTA_CMT=
+	AC_DEFINE(CONFIG_QUOTA, 1)
+	AC_MSG_RESULT([Enabling quota support])
+	QUOTA_MAN_COMMENT=""
+	AC_SUBST(QUOTA_MAN_COMMENT)
+fi
+,
+QUOTA_CMT=#
+AC_MSG_RESULT([Disabling quota support by default])
+)
+dnl
+dnl Define stuff expected for quota library
+dnl
+LIBQUOTA='$(LIB)/libquota'$LIB_EXT
+DEPLIBQUOTA=$LIBQUOTA
+STATIC_LIBQUOTA='$(LIB)/libquota'$STATIC_LIB_EXT
+DEPSTATIC_LIBQUOTA=$STATIC_LIBQUOTA
+PROFILED_LIBQUOTA='$(LIB)/libquota'$PROFILED_LIB_EXT
+DEPPROFILED_LIBQUOTA=$PROFILED_LIBQUOTA
+AC_SUBST(LIBQUOTA)
+AC_SUBST(DEPLIBQUOTA)
+AC_SUBST(STATIC_LIBQUOTA)
+AC_SUBST(DEPSTATIC_LIBQUOTA)
+AC_SUBST(PROFILED_LIBQUOTA)
+AC_SUBST(DEPPROFILED_LIBQUOTA)
+AC_SUBST(QUOTA_CMT)
+dnl
+dnl handle --disable-backtrace
+dnl
+AH_TEMPLATE([DISABLE_BACKTRACE], [Define to 1 to disable use of backtrace])
+AC_ARG_ENABLE([backtrace],
+[  --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],
+[  --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],
+[  --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],
+[  --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],
+[  --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
+,
+AC_MSG_RESULT([Enabling e4defrag support by default])
+DEFRAG_CMT=
+)
+AC_SUBST(DEFRAG_CMT)
+dnl
+dnl See whether to install the `fsck' wrapper program (that calls e2fsck)
+dnl
+AC_ARG_ENABLE([fsck],
+[  --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],
+[  --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],
+[  --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
+AH_TEMPLATE([USE_UUIDD], [Define to 1 to build uuidd])
+AC_ARG_ENABLE([uuidd],
+[  --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)
+UUIDD_CMT=""
+AC_MSG_RESULT([Building uuidd by default])
+)
+AC_SUBST(UUIDD_CMT)
+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
+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_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.;true"
+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
+	semaphore.h
+	setjmp.h
+	signal.h
+	stdarg.h
+	stdint.h
+	stdlib.h
+	termios.h
+	termio.h
+	unistd.h
+	utime.h
+	linux/falloc.h
+	linux/fd.h
+	linux/major.h
+	linux/loop.h
+	net/if_dl.h
+	netinet/in.h
+	sys/disklabel.h
+	sys/file.h
+	sys/ioctl.h
+	sys/mkdev.h
+	sys/mman.h
+	sys/prctl.h
+	sys/queue.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
+]))
+AC_CHECK_HEADERS(sys/disk.h sys/mount.h,,,
+[[
+#if HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#endif
+]])
+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 decleared.
+AC_CHECK_MEMBER(struct dirent.d_reclen,[AC_DEFINE(HAVE_RECLEN_DIRENT, 1,
+		       [Define to 1 if dirent has d_reclen])],,
+		[#include <dirent.h>])
+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)
+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
+AC_SUBST(SIZEOF_SHORT)
+AC_SUBST(SIZEOF_INT)
+AC_SUBST(SIZEOF_LONG)
+AC_SUBST(SIZEOF_LONG_LONG)
+AC_SUBST(SIZEOF_OFF_T)
+AC_C_BIGENDIAN
+BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
+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_TRY_COMPILE([#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_TRY_COMPILE([#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 This will add -lblkid to the AC_CHECK_FUNCS search if we are using
+dnl the system-provided blkid library
+dnl
+if test -n "$BLKID_CMT"; then
+  AC_SEARCH_LIBS([blkid_probe_all], [blkid])
+fi
+dnl
+AC_CHECK_FUNCS(m4_flatten([
+	__secure_getenv
+	backtrace
+	blkid_probe_get_topology
+	chflags
+	fallocate
+	fallocate64
+	fchown
+	fdatasync
+	fstat64
+	ftruncate64
+	getdtablesize
+	getmntinfo
+	getpwuid_r
+	getrlimit
+	getrusage
+	jrand48
+	llseek
+	lseek64
+	mallinfo
+	mbstowcs
+	memalign
+	mmap
+	msync
+	nanosleep
+	open64
+	pathconf
+	posix_fadvise
+	posix_memalign
+	prctl
+	secure_getenv
+	setmntent
+	setresgid
+	setresuid
+	srandom
+	strcasecmp
+	strdup
+	strnlen
+	strptime
+	strtoull
+	sync_file_range
+	sysconf
+	usleep
+	utime
+	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 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=''
+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
+AC_SUBST(SEM_INIT_LIB)
+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 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 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],
+[  --with-multiarch=ARCH specify the multiarch triplet],
+libdir=$libdir/$withval
+root_libdir=$root_libdir/$withval
+)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"
+AC_TRY_LINK([#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)
+LDFLAG_STATIC=
+if test $ac_cv_e2fsprogs_use_static = yes; then
+	LDFLAG_STATIC=-static
+fi
+AC_SUBST(LDFLAG_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 Make the ss and et directories work correctly.
+dnl
+SS_DIR=`cd ${srcdir}/lib/ss; pwd`
+ET_DIR=`cd ${srcdir}/lib/et; pwd`
+AC_SUBST(SS_DIR)
+AC_SUBST(ET_DIR)
+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
+AC_SUBST(INCLUDES)
+dnl
+dnl Build CFLAGS
+dnl
+if test $cross_compiling = no; then
+   BUILD_CFLAGS="$CFLAGS $CPPFLAGS"
+   BUILD_LDFLAGS="$LDFLAGS"
+else
+   BUILD_CFLAGS=
+   BUILD_LDFLAGS=
+fi
+AC_SUBST(BUILD_CFLAGS)
+AC_SUBST(BUILD_LDFLAGS)
+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
+for i in MCONFIG Makefile e2fsprogs.spec \
+	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 \
+	lib/uuid/Makefile lib/uuid/uuid_types.h \
+	lib/blkid/Makefile lib/blkid/blkid_types.h lib/quota/Makefile \
+	lib/ss/ss.pc lib/uuid/uuid.pc lib/et/com_err.pc \
+	lib/e2p/e2p.pc lib/blkid/blkid.pc lib/ext2fs/ext2fs.pc \
+	misc/Makefile ext2ed/Makefile e2fsck/Makefile \
+	debugfs/Makefile tests/Makefile tests/progs/Makefile \
+	resize/Makefile doc/Makefile intl/Makefile \
+	intl/libgnuintl.h po/Makefile.in ; do
+	if test -d `dirname ${srcdir}/$i` ; then
+		outlist="$outlist $i"
+	fi
+done
+AC_OUTPUT($outlist)
+if test -f util/gen-tarball; then chmod +x util/gen-tarball; fi
diff --git a/e2fsprogs/contrib/build-rpm b/e2fsprogs/contrib/build-rpm
new file mode 100644
index 0000000..0b06071
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/contrib/dconf b/e2fsprogs/contrib/dconf
new file mode 100644
index 0000000..cef4cc6
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/contrib/e2croncheck b/e2fsprogs/contrib/e2croncheck
new file mode 100755
index 0000000..87204be
--- /dev/null
+++ b/e2fsprogs/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 -t 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/e2fsprogs/contrib/fallocate.c b/e2fsprogs/contrib/fallocate.c
new file mode 100644
index 0000000..1f9b59a
--- /dev/null
+++ b/e2fsprogs/contrib/fallocate.c
@@ -0,0 +1,174 @@
+/*
+ * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#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 */
+
+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;
+	loff_t	length = -2LL;
+	loff_t	offset = 0;
+	int	falloc_mode = 0;
+	int	error;
+	int	tflag = 0;
+
+	while ((opt = getopt(argc, argv, "npl:o:t")) != -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 '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/e2fsprogs/contrib/make-sparse.c b/e2fsprogs/contrib/make-sparse.c
new file mode 100644
index 0000000..1b3d550
--- /dev/null
+++ b/e2fsprogs/contrib/make-sparse.c
@@ -0,0 +1,87 @@
+/*
+ * 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%
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#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/e2fsprogs/contrib/populate-extfs.sh b/e2fsprogs/contrib/populate-extfs.sh
new file mode 100755
index 0000000..b1d3d1f
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/contrib/python-uuid/setup.py b/e2fsprogs/contrib/python-uuid/setup.py
new file mode 100755
index 0000000..3934d17
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/contrib/python-uuid/test.py b/e2fsprogs/contrib/python-uuid/test.py
new file mode 100755
index 0000000..2264f62
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/contrib/python-uuid/uuid.c b/e2fsprogs/contrib/python-uuid/uuid.c
new file mode 100644
index 0000000..34dd56a
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/contrib/spd_readdir.c b/e2fsprogs/contrib/spd_readdir.c
new file mode 100644
index 0000000..8345fa1
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/debian/attic/comerrg-dev.info b/e2fsprogs/debian/attic/comerrg-dev.info
new file mode 100644
index 0000000..8bd344b
--- /dev/null
+++ b/e2fsprogs/debian/attic/comerrg-dev.info
@@ -0,0 +1,4 @@
+DESCR="The Common Error Description library."
+SECTION_MATCH="Development"
+SECTION_NAME="Development"
+FILE=com_err.info
diff --git a/e2fsprogs/debian/attic/comerrg-dev.menu b/e2fsprogs/debian/attic/comerrg-dev.menu
new file mode 100644
index 0000000..7dddab3
--- /dev/null
+++ b/e2fsprogs/debian/attic/comerrg-dev.menu
@@ -0,0 +1,7 @@
+?package(comerrg-dev):needs="dwww" section="Apps/Programming"\
+  title="The com_err library" \
+  longtitle="The Common Error Description library"\
+  description="libcomerr 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 identified with mechanisms commonly in use." \
+  command="/usr/doc/comerrg-dev/html-info/com_err_toc.html"
diff --git a/e2fsprogs/debian/attic/e2fslibsg-dev.info b/e2fsprogs/debian/attic/e2fslibsg-dev.info
new file mode 100644
index 0000000..e1be950
--- /dev/null
+++ b/e2fsprogs/debian/attic/e2fslibsg-dev.info
@@ -0,0 +1,4 @@
+DESCR="Library of routines to manipulate an ext2 filesystem."
+SECTION_MATCH="Development"
+SECTION_NAME="Development"
+FILE=libext2fs.info
diff --git a/e2fsprogs/debian/attic/e2fslibsg-dev.menu b/e2fsprogs/debian/attic/e2fslibsg-dev.menu
new file mode 100644
index 0000000..7ace8c0
--- /dev/null
+++ b/e2fsprogs/debian/attic/e2fslibsg-dev.menu
@@ -0,0 +1,4 @@
+?package(e2fslibsg-dev):needs="dwww" section="Apps/Programming"\
+  title="The ext2fs library." \
+  longtitle="A library to handle low-level structures in an ext2 filesystem"\
+  command="/usr/doc/e2fslibsg-dev/html-info/libext2fs_toc.html"
diff --git a/e2fsprogs/debian/attic/libs/comerr2g.files b/e2fsprogs/debian/attic/libs/comerr2g.files
new file mode 100644
index 0000000..4f1f552
--- /dev/null
+++ b/e2fsprogs/debian/attic/libs/comerr2g.files
@@ -0,0 +1,2 @@
+lib/libcom_err.so.?.*
+lib/libcom_err.so.?
diff --git a/e2fsprogs/debian/attic/libs/control b/e2fsprogs/debian/attic/libs/control
new file mode 100644
index 0000000..4205120
--- /dev/null
+++ b/e2fsprogs/debian/attic/libs/control
@@ -0,0 +1,114 @@
+Source: e2fsprogs
+Section: base
+Priority: required
+Maintainer: Yann Dirson <dirson@debian.org>
+Standards-Version: 2.4.0.0
+
+Package: e2fsprogs
+Essential: yes
+Depends: ${shlibs:Depends}
+Conflicts: e2fsprogsg, dump (<< 0.4b4-4), quota (<< 1.55-8.1)
+Architecture: any
+Description: The EXT2 file system utilities.
+ EXT2 stands for "Extended Filesystem", version 2. It's the main
+ filesystem type used for hard disks on Debian and other Linux systems.
+ .
+ This package contains programs for creating, checking, and maintaining EXT2
+ filesystems, and the generic `fsck' wrapper.
+ .
+ This release may break older versions of dump and quota.
+
+Package: comerr2g
+Depends: ${shlibs:Depends}
+Conflicts: e2fsprogs (<< 1.10-6), comerr2
+Architecture: any
+Description: The Common Error Description library - shared libraries.
+ libcomerr 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 identified with mechanisms commonly in use.
+ .
+ It is mainly used by the EXT2-filesystem tools.
+
+Package: ss2g
+Depends: ${shlibs:Depends}
+Conflicts: e2fsprogs (<< 1.10-6), ss2
+Architecture: any
+Description: "Sub-System" library for simple command-line interface parsing - shared libs
+ This package contains the shared libs to support command-line
+ interface parsers generated with the ssg-dev package.
+ . 
+ It was originally inspired by the Multics SubSystem library.
+
+Package: e2fslibsg
+Depends: ${shlibs:Depends}
+Provides: ext2fs2g, e2p2g, uuid1g
+Conflicts: e2fsprogs (<= 1.10-7)
+Architecture: any
+Description: The EXT2 file system shared libs.
+ EXT2 stands for "Extended Filesystem", version 2. It's the filesystem type
+ used for hard disks on Debian and other Linux systems.
+ .
+ This package contains shared libraries needed by the utility programs.
+
+Package: comerrg-dev
+Section: devel
+Priority: extra
+Depends: ${libcdev:Depends}, comerr2g
+Suggests: doc-base
+Conflicts: e2fsprogs (<< 1.10-6), comerr-dev
+Architecture: any
+Description: The Common Error Description library - headers and static libraries.
+ libcomerr 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 identified with mechanisms commonly in use.
+
+Package: ssg-dev
+Section: devel
+Priority: extra
+Depends: ${libcdev:Depends}, ss2g
+Conflicts: e2fsprogs (<< 1.10-6), ss-dev
+Architecture: any
+Description: "Sub-System" library for simple command-line interface parsing - devel. files
+ This package includes a tool that parses a command table to generate
+ a simple command-line interface parser, the include files needed to
+ compile and use it, and the static libs.
+ . 
+ It was originally inspired by the Multics SubSystem library.
+
+Package: e2fslibsg-dev
+Section: devel
+Priority: extra
+Depends: ${libcdev:Depends}, e2fslibsg, comerrg-dev
+Suggests: doc-base
+Provides: ext2fsg-dev, e2pg-dev, uuidg-dev
+Conflicts: e2fsprogs (<< 1.10-6), e2fslibs-dev
+Architecture: any
+Description: The headers and static libraries for ext2fs-aware tools-development.
+ EXT2FS stands for "Extended Filesystem", version 2. It's the filesystem
+ type used for hard disks on Debian and other Linux systems.
+ .
+ This package contains the headers and shared libraries needed to compile
+ ext2fs-aware programs. Only programmers that really manipulate
+ features specific to the ext2 filesystem will need this. Most
+ programmers will use the generic filesystem-independent interface
+ from libc.
+ .
+ It also contains dev files for 2 other libs (e2p and uuid) used by
+ the e2fsprogs, but which are not yet packaged all by themselves
+ because they lack documentation. They may also lack some support
+ files, by I can't really know until someone uses them...
+ .
+ libe2p is for user-level e2fsprogs commands.  It's used by dumpe2fs,
+ chattr, and lsattr.  Functions in libe2p typically have two
+ characteristics (a) don't require that block device containing the
+ filesystem be opened directly (functions in libext2fs do), and (b)
+ libe2p typically contains printf statements or parse user input, and so
+ have more internationalization issues.
+ .
+ libuuid generates and parses 128-bit universally unique id's (UUID's),
+ using a standard which is blessed by both Microsoft and DCE, and is
+ being proposed as an internet standard.  See the internet-draft:
+ .
+                draft-leach-uuids-guids-01.txt
+ .
+ for more information.
diff --git a/e2fsprogs/debian/attic/libs/e2fslibsg.files b/e2fsprogs/debian/attic/libs/e2fslibsg.files
new file mode 100644
index 0000000..c777084
--- /dev/null
+++ b/e2fsprogs/debian/attic/libs/e2fslibsg.files
@@ -0,0 +1,3 @@
+lib/*.so.?.*
+lib/*.so.?
+usr/doc/e2fslibsg/*
diff --git a/e2fsprogs/debian/attic/libs/rules b/e2fsprogs/debian/attic/libs/rules
new file mode 100644
index 0000000..3cf3c8d
--- /dev/null
+++ b/e2fsprogs/debian/attic/libs/rules
@@ -0,0 +1,182 @@
+#! /usr/bin/make -f
+# -*- makefile -*-
+#
+# Invoke each target with `./debian/rules <target>'.  All targets should be
+# invoked with the package root as the current directory.
+#
+# The `binary' target must be run as root, as it needs to install files with
+# specific ownerships.
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+package = e2fsprogs
+ARCH = $(shell dpkg --print-architecture)
+
+# find the version for the main package, from changelog file
+MAIN_VERSION = $(shell head -1 debian/changelog | cut '-d ' -f 2 | sed 's/[()]//g')
+# find versions for libraries going into their own packages, from their Makefile.in's
+COMERR_VERSION = $(shell grep ELF_VERSION lib/et/Makefile.in | cut '-d ' -f3)
+COMERR_MAJOR = $(word 1,$(subst ., ,$(COMERR_VERSION)))
+SS_VERSION = $(shell grep ELF_VERSION lib/ss/Makefile.in | cut '-d ' -f3)
+SS_MAJOR = $(word 1,$(subst ., ,$(SS_VERSION)))
+
+topdir = $(shell pwd)
+debdir = $(topdir)/debian
+maindir = $(debdir)/tmp
+builddir = $(topdir)/builddir
+docdir = $(maindir)/usr/doc/$(package)
+
+SUBPACKAGES_DIRS = tmp e2fslibsg e2fslibsg-dev comerr$(COMERR_MAJOR)g comerrg-dev \
+	ss$(SS_MAJOR)g ssg-dev
+
+installdoc = install -m 644
+installbin = install -m 755
+
+ifeq ($(ARCH),alpha)
+CCOPTS = -g -O2 -fsigned-char -DHAVE_NETINET_IN_H
+LIBC-DEV = libc6.1-dev
+else
+CCOPTS = -g -O2 -fsigned-char
+LIBC-DEV = libc6-dev
+endif
+
+build: configured
+	dh_testdir
+	make -C $(builddir)
+	make -C $(builddir)/misc findsuper
+	cd doc && texi2html -split_chapter libext2fs.texinfo
+	cd lib/et && texi2html -split_chapter -expandinfo com_err.texinfo
+	touch build
+
+configured:
+	dh_testdir
+	mkdir -p $(builddir)
+	cd $(builddir) && CFLAGS="$(CFLAGS)" \
+		../configure --enable-elf-shlibs --enable-dynamic-e2fsck \
+		--with-ccopts="$(CCOPTS)"
+	touch configured
+
+clean:
+	dh_testdir
+	rm -f build configured install
+	-make -C $(builddir) -i distclean
+	rm -rf $(builddir)
+	rm -f doc/libext2fs_*.html lib/et/com_err_*.html
+	dh_clean
+
+binary-indep: build
+  # no arch-independant debs.
+
+binary-arch: build
+	dh_testversion 0.56 # == 0.53 + fixes
+	dh_testdir -a
+	dh_testroot -a
+	dh_clean -a -k
+	dh_installdirs -a
+
+	make -C $(builddir) install DESTDIR=$(maindir)
+	install -m 755 $(builddir)/misc/findsuper $(maindir)/sbin
+  # static libs and .h files
+	make -C $(builddir) install-libs DESTDIR=$(maindir)
+	install -m 644 $(builddir)/lib/ss/ss_err.h $(maindir)/usr/include/ss/
+
+# fix and install compile_et script
+	sed s%$(topdir)/lib/et%/usr/share/comerr% \
+	  <$(builddir)/lib/et/compile_et \
+	  >$(debdir)/comerrg-dev/usr/bin/compile_et
+	chmod 755 $(debdir)/comerrg-dev/usr/bin/compile_et
+# add support files for compile_et
+	install -m 644 lib/et/et_c.awk lib/et/et_h.awk \
+	  $(debdir)/comerrg-dev/usr/share/comerr/
+
+# fix and install mk_cmds script
+	sed s%$(topdir)/lib/ss%/usr/share/ss% \
+	  <$(builddir)/lib/ss/mk_cmds \
+	  >$(debdir)/ssg-dev/usr/bin/mk_cmds
+	chmod 755 $(debdir)/ssg-dev/usr/bin/mk_cmds
+# add support files for mk_cmds
+	install -m 644 lib/ss/ct_c.awk lib/ss/ct_c.sed \
+	  $(debdir)/ssg-dev/usr/share/ss/
+
+# docs
+	mkdir -p $(debdir)/e2fslibsg-dev/usr/doc/e2fslibsg
+	ln -sf e2fslibsg $(debdir)/e2fslibsg-dev/usr/doc/e2fslibsg-dev
+	mkdir -p $(maindir)/usr/doc/e2fslibsg
+	ln -sf e2fslibsg $(maindir)/usr/doc/e2fsprogs
+	mkdir -p $(debdir)/comerrg-dev/usr/doc/comerr$(COMERR_MAJOR)g
+	ln -sf comerr$(COMERR_MAJOR)g $(debdir)/comerrg-dev/usr/doc/comerrg-dev
+	mkdir -p $(debdir)/ssg-dev/usr/doc/ss$(SS_MAJOR)g
+	ln -sf ss$(SS_MAJOR)g $(debdir)/ssg-dev/usr/doc/ssg-dev
+	dh_installdocs -a
+
+  # HTML docs
+	install -d $(debdir)/e2fslibsg-dev/usr/doc/e2fslibsg-dev/html-info/
+	install -p $(topdir)/doc/libext2fs_*.html \
+	   $(debdir)/e2fslibsg-dev/usr/doc/e2fslibsg-dev/html-info/
+	install -d $(debdir)/comerrg-dev/usr/doc/comerrg-dev/html-info/
+	install -p $(topdir)/lib/et/com_err_*.html \
+	   $(debdir)/comerrg-dev/usr/doc/comerrg-dev/html-info/
+
+  # texinfo docs
+	install -p $(topdir)/doc/libext2fs.texinfo \
+	   $(debdir)/e2fslibsg-dev/usr/doc/e2fslibsg/libext2fs.texi
+	install -p $(topdir)/lib/et/com_err.texinfo \
+	   $(debdir)/comerrg-dev/usr/doc/comerr2g/com_err.texi
+
+  # doc-base support
+	install -d $(debdir)/e2fslibsg-dev/usr/share/doc-base/
+	install -p -m 644 $(debdir)/libext2fs.docbase \
+	   $(debdir)/e2fslibsg-dev/usr/share/doc-base/libext2fs
+	install -d $(debdir)/comerrg-dev/usr/share/doc-base/
+	install -p -m 644 $(debdir)/com_err.docbase \
+	   $(debdir)/comerrg-dev/usr/share/doc-base/com_err
+
+  # examples
+	dh_installexamples -a
+
+  # dh_installmanpages still makes a mess as of 0.54 (see below dh_movefiles)
+	install -p $(topdir)/lib/et/compile_et.1 $(maindir)/usr/man/man1/
+	install -d $(maindir)/usr/man/man3/
+	install -p $(topdir)/lib/et/com_err.3 $(maindir)/usr/man/man3/
+	ln -s e2fsck.8 $(maindir)/usr/man/man8/fsck.ext2.8
+	ln -s mke2fs.8 $(maindir)/usr/man/man8/mkfs.ext2.8
+
+	dh_movefiles -a
+  # cleanup empty dirs
+	cd  $(maindir) && rmdir usr/man/cat? bin lib usr/include/* usr/include \
+		usr/info usr/lib usr/man/man3 usr/doc/e2fslibsg
+
+#	dh_installmenu -a
+
+  # broken + useless in 0.52
+  #	dh_installmanpages -a
+
+	dh_undocumented -a
+
+	dh_installchangelogs -pe2fslibsg -pcomerr$(COMERR_MAJOR)g -pss$(SS_MAJOR)g ChangeLog
+
+	dh_strip -a
+	dh_compress -a
+	dh_fixperms -a
+
+	echo "libcdev:Depends=$(LIBC-DEV)" > debian/comerrg-dev.substvars
+	echo "libcdev:Depends=$(LIBC-DEV)" > debian/ssg-dev.substvars
+	echo "libcdev:Depends=$(LIBC-DEV)" > debian/e2fslibsg-dev.substvars
+
+	dh_installdeb -a
+	LD_LIBRARY_PATH=$(builddir)/lib:/lib:/usr/lib \
+	  dh_shlibdeps -a
+	dh_gencontrol -u '-isp' -pe2fsprogs -pe2fslibsg -pe2fslibsg-dev
+	dh_gencontrol -u '-isp' -pcomerr$(COMERR_MAJOR)g -pcomerrg-dev \
+	  -u '-v$(COMERR_VERSION)-$(MAIN_VERSION)'
+	dh_gencontrol -u '-isp' -pss$(SS_MAJOR)g -pssg-dev \
+	  -u '-v$(SS_VERSION)-$(MAIN_VERSION)'
+	dh_makeshlibs -a
+#	dh_du -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary: binary-indep binary-arch
+
+.PHONY: binary binary-arch binary-indep clean checkroot
diff --git a/e2fsprogs/debian/attic/libs/ss2g.files b/e2fsprogs/debian/attic/libs/ss2g.files
new file mode 100644
index 0000000..5b717cb
--- /dev/null
+++ b/e2fsprogs/debian/attic/libs/ss2g.files
@@ -0,0 +1,2 @@
+lib/libss.so.?.*
+lib/libss.so.?
diff --git a/e2fsprogs/debian/changelog b/e2fsprogs/debian/changelog
new file mode 100644
index 0000000..47d58bf
--- /dev/null
+++ b/e2fsprogs/debian/changelog
@@ -0,0 +1,3508 @@
+e2fsprogs (1.42.9-1) unstable; urgency=low
+
+  * New upstream version
+  * NMU ack (Closes: #698879)
+  * Fix cross-build support (Closes: #721365)
+  * mke2fs will detect an attempt to create a file system on a
+    loop-mounted image file
+  * Fixed a large number of bugs in resize2fs, e2fsck, debugfs, to
+    handle bigalloc and 64-bit file systems.
+  * Tune2fs will no longer allow changing the uuid on a mounted file
+    system with the uninit_bg feature enabled.
+  * E2fsck will properly allocate a new extent tree block in the rare
+    case where one is needed when rehashing an extent-mapped directory.
+  * Mke2fs wil now properly set the LARGE_FILE feature when creating a
+    journal > 2GB.
+  * Debugfs will now correctly handle free a range of inodes using the
+    freei command.
+  * E2fsck will no longer complain if an external journal was exactly
+    2**32 blocks.
+  * E2fsck will not longer try to add a missing lost+found directory
+    when run in read-only mode.
+  * Fixed some buffer overrun bugs when creating standard e2image files
+  * Mke2fs will not try to set both the meta_bg and resize_inode feature
+    when the extended option "-E resize=NNN" is specified by the user.
+  * Dumpe2fs will no longer abort when trying to print the journal
+    information from an e2image-created image file.
+  * Debugfs's "write" command can now create a sparse files
+  * Debugfs can now support a command line which is up to 8k long
+  * E2image will refuse to create a raw or qcomw image using a mounted
+    file system unless the -f option is given.
+  * E2image has been made more useful for efficiently copying file
+    systems using the -ra options.  New options to help with this use
+    case that were added: -o, -O, -p, and -c.
+  * Fixed a regression introduced in 1.42.8 which would cause e2fsck to
+    erroneously report uninitialized extents past i_size to be invalid.
+  * Fixed cases where resize2fs could corrupt a file system, especially
+    when shrinking a file system.  (Closes: #660793)
+  * Fixed resize2fs and e2fsck to not crash when operating on a file
+    system with the MMP feature enabled.
+  * Fixed debugfs's write command to properly create a zero-length file
+    (instead of creating an invalid inode).
+  * Fixed e2fsck to not crash when trying to delete an invalid
+    extent-mapped symlink.
+  * Improved debugfs's help texts
+  * Fixed a potential integer overflow problem in e2freefrag
+    (Closes: #718205)
+  * The config.guess and config.sub files have been updated to the
+    latest to help with the ppcle port.  (Closes: #732076)
+  * Updated/fixed various man pages.  (Closes: #586218, #669730,
+    #698076, #731329)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 28 Dec 2013 23:18:36 -0500
+
+e2fsprogs (1.42.8-1) unstable; urgency=low
+
+  * New upstream version
+  * Work around Debian Bug #712530 (Closes: #708307)
+  * Fix e2fsck so it can check a read-only root file system with an
+    external journal.  (Closes: #707030)
+  * Fix off-line resizing of file systems with flex_bg && !resize_inode
+    (Closes: #696746)
+  * 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.
+  * If an invalid journal size is given to mke2fs, it will now complain
+    and exit sooner.
+  * 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.
+  * Enhance chattr to allow clearing the extent flag if the kernel allows it
+  * Fix e2image with large (> 32-bit) file systems (Closes: #703067)
+  * Mke2fs will not give warnings about the bigalloc and quota options in
+    quiet mode.
+  * 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.
+  * Fix texinfo incompatibilities (Closes: #712365)
+  * Updated/fixed various man pages  (Closes: #712429, #712430, #707609)
+  * Update German translation
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Thu, 20 Jun 2013 23:09:25 -0500
+
+e2fsprogs (1.42.7-1) unstable; urgency=low
+
+  * New upstream version
+  * Add warning indicating that the quota and bigalloc features are
+    still under development.
+  * Added new options to filefrag to be consistent with the version from
+    Lustre
+  * Optimized e2fsck's CPU utilization
+  * Fixed e2fsck so it detects and fixes inconsistencies in the interior
+    nodes of an inode's extent tree
+  * Fixed a potential memory corruption failure in e2fsck's error path if
+    the call to ext2fs_open2() fails.
+  * Fixed 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.
+  * Fixed a bug in resize2fs which could cause severe file system
+    corruption when growing an ext4 file system which was formatted with
+    fewer-than-normal reserved gdt blocks
+  * Fixed resize2fs to be able to handle off-line resizes of file
+    systems with the flex_bg feature and without any reserved gdt
+    blocks or if the file system did not have the resize_inode feature
+  * 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.
+  * Fixed a big which could cause resize2fs to corrupt bigalloc file systems.
+  * Fix a crash while mke2fs is parsing "-E resize=NNN" with the 64bit
+    file system feature enabled
+  * Added 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.
+  * Added the "symlink", "zap_block", "block_dump", and "extent_open"
+    commands to debugfs
+  * Fixed debugfs's htree command so that all its messages are sent
+    through the pager.
+  * Fixed debugfs's dump_file and cat functions so they work correctly
+    on file systems with a block size greater than 8k.
+  * Fixed mke2fs's handling of the mmp_update_interval option
+  * Fixed e2freefrag so it works on 64-bit file systems, and so it uses
+    much less memory.
+  * E2image can now include all data blocks in the e2image output
+    file when the user specifies the -a option.
+  * Fixed debugfs's mknod command so that it updates the block group
+    statistics
+  * Document the bigalloc feature in the mke2fs man page.
+    (Closes: #669730)
+  * Update Czech, Dutch, French, German, Polish, Sweedish, and
+    Vietnamese translations
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 21 Jan 2013 21:52:58 -0500
+
+e2fsprogs (1.42.6-1) unstable; urgency=low
+
+  * New upstream version
+  * Fix build dependencies to avoid requiring dc, and to allow
+    cross-building to work (Closes: #677497)
+  * Updated/fixed various man pages
+  * Mke2fs will now update its progress indicators at most once a second
+    to avoid overwhelming serial consoles.
+  * Resize2fs will support lazy_itable_init, speeding up off-line growth
+    of uninit_bg file systems.
+  * Resize2fs now supports on-line resizing 64-bit file systems beyond
+    16TB.  A number of bugs in resize2fs which prevented this have been
+    fixed.
+  * Resize2fs now correctly handles resizing 32-bit file systems to 16TB.
+  * Fixed a potential segfault in e2fsck when there is an I/O error
+    while reading the superblock.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Fri, 21 Sep 2012 12:14:41 -0400
+
+e2fsprogs (1.42.5-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * e2fsck-static, e2fsprogs: let preinst remove a symbolic link in
+    /usr/share/doc, that should have been replaced with a directory since
+    1.39+1.40-WIP-2006.10.02+dfsg-1. (Closes: #698879).
+
+ -- Nicolas Boulenguez <nicolas@debian.org>  Fri, 22 Feb 2013 23:14:59 +0100
+
+e2fsprogs (1.42.5-1) unstable; urgency=low
+
+  * New upstream version
+  * Mark the e2fsprogs package as Multi-Arch: foreign, so if a package
+    foo:i386 depends on e2fsprogs and is installed on an amd64 system,
+    the native e2fsprogs will satisfy the dependency.  (Closes: #678395)
+  * Fix a fd leak which could cause logsave (and hence a boot-time rc
+    init script) to hang (Closes: #682592)
+  * Fix 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
+  * Fixed filefrag so it would not seg fault on virtual filesystems such
+    as /proc: e.g., "filefrag /proc/partitions"
+  * Fix filefrag so that it correctly reports the number of extents
+  * Fixed a bug which caused "mke2fs -N 256 -t ext4 /tmp/foo.img 256m"
+    to write blocks out until /tmp filled
+  * Fixed a bug in how e2fsck would uniquify directory entry names
+  * Change e2fsck so it will allow file systems mounted read-only to be
+    checked with the -f option.
+  * Fix e2fsck so that the file system is marked as containing an
+    error if the user chooses not to fix the quota usage information.
+  * Fix 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.
+  * The e4defrag program now allows device symlinks, such as
+    /dev/mapper/testvg-testlv, instead of insisting on less
+    human-friendly names such as /dev/dm-2
+  * Updated/fixed various man pages  (Closes: #680114)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 29 Jul 2012 19:59:56 -0400
+
+e2fsprogs (1.42.4-3) unstable; urgency=medium
+
+  * Add the -C option to chattr's usage message
+  * Fix e2fsprogs so it is blhc (build log hardening check) clean.  This
+    fixed e2fsck.static which previously was not getting built with the
+    security hardening flags.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Wed, 13 Jun 2012 16:03:24 -0400
+
+e2fsprogs (1.42.4-2) unstable; urgency=medium
+
+  * Fix FTBFS problem on the hurd and freebsd platforms
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 12 Jun 2012 18:26:40 -0400
+
+e2fsprogs (1.42.4-1) unstable; urgency=medium
+
+  * New upstream version
+  * Fix 64-bit block number bugs in e2fsck, dumpe2fs, and debugfs which
+    could corrupt file systems
+  * Fixed e2fsck's handling of how errors propagate from the journal to
+    the file system superblock
+  * Fixed a false positive complaint from e2fsck if all of the extents
+    in the last extent block are uninitialized and located after the
+    end of the file.
+  * dumpe2fs will display the journal's error indicator in the
+    superblock if it is set
+  * Fixed a  bug which caused e2fsck to incorrectly use O_EXCLUSIVE in
+    some corner cases.
+  * Fix truncation of extent-mapped inodes in e2fsck and libext2fs
+  * Fixed i_blocks accounting in bigalloc file systems.
+  * Add support for btrfs's No_COW flag to lsattr and chattr
+  * Debugfs interprets the date strings of the form "@ddd" as ddd
+    seconds after the epoch
+  * Updated/fixed various man pages  (Closes: #674453, #674694)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 12 Jun 2012 18:20:55 -0400
+
+e2fsprogs (1.42.3-1) unstable; urgency=low
+
+  * New upstream version
+  * Fix bugs on 32-bit systems which could corrupt > 16TB file systems
+  * 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 support for (hidden) quota files built into ext4; in
+    particular, don't rewrite the quota inode unless the quotas are
+    inconsistent
+  * Optimized reading and writing bitmaps if direct I/O was enabled
+  * Update Czech, Dutch, French, German, Polish, Sweedish, and
+    Vietnamese translations
+  * Fixed incorrect indentation in tune2fs man page
+  * Update debian policy compliance to 3.9.3
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 14 May 2012 14:43:09 -0400
+
+e2fsprogs (1.42.2-2) unstable; urgency=low
+
+  * Fixed e2fsck.conf's man page (Closes: #646963)
+  * Fixed 32-bit binary compatibility problem for the libext2fs shared
+    library introduced in 1.42.2
+  * mke2fs will no longer fail if the /etc/mtab file is not present
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 09 Apr 2012 14:54:33 -0400
+
+e2fsprogs (1.42.2-1) unstable; urgency=low
+
+  * New upstream version
+  * Fixed various man pages (Closes: #665427)
+  * Speed up resize2fs for large file systems (Closes: #663237)
+  * Be less strict about the EXT4_EOFBLOCKS_FL flag (which will
+    eventually be going away in the ext4 file system format)
+  * Teach mke2fs to use direct I/O if the -D option is given
+  * Print errors returned by ext2fs_open2() and ext2fs_check_desc() so
+    we can more easily diagnose memory allocation failures caused by
+    insufficient memory and abort on memory allocation failures
+  * E2fsck can now write log files containing the details of the
+    problems that were found and fixed directly.
+  * E2fsck can now limit the number of messages issued and printed on
+    the console
+  * The dumpe2fs, debugfs, and tune2fs now use rbtree bitmaps, which
+    cause them to use much less memory for large file systems.
+  * E2fsck will now check for zero-length extents, since older kernels will
+    OOPS if they comes across one
+  * Fix e2fsck's discard behaviour so it does not discard too many
+    blocks, and it will not use discard if the device advertises
+    that discard does not persistently zero data.  Also, if e2fsck is
+    run in read-only mode, do not try to discard data.
+  * Fix mke2fs -S so it does not corrupt the first block group's
+    information.
+  * Add pointer for e2fsprogs-udeb to libcomerr2.shlibs (Closes: #665885)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 27 Mar 2012 15:55:57 -0700
+
+e2fsprogs (1.42.1-2) unstable; urgency=low
+
+  * Fix the fact that dpkg-buildflags was being ignored due to a
+    bash'ism in debian/rules.
+  * Check the new /sys/class/power_supply/AC/online since
+    /proc/acpi/ac_adapter/... is deprecated and may not be present on
+    newer kernels.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 20 Feb 2012 19:12:20 -0500
+
+e2fsprogs (1.42.1-1) unstable; urgency=low
+
+  * New upstream release
+  * dpkg-buildflags is now used if it is present.  This allows Debian
+    Wheezy to build with security hardened build flags.  (Closes: #654457)
+  * mke2fs and e2fsck now use much less memory for large file systems
+  * Fixed mke2fs -S so it can be usefully used as a last ditch recovery
+    command when for ext4 filesystems that have the uninit_bg feature enabled.
+  * The mke4fs argv[0] is now recognized by mke2fs.
+  * Fixed usage and help messages for mke2fs.
+  * Eliminated spurious bad block group checksum warnings when e2fsck
+    falls back to using the backup group descriptors.
+  * Debugfs's ncheck command is now much more useful when used to
+    diagnose badly corrupted file system.  Added a new -c option.
+  * Fixed bug in e2image which could cause it to fail to set i_size
+    correctly if the last hole in the file is an exact multiple of a
+    megabyte.
+  * Fixed a bug with resize2fs where for 1k and 2k file systems, the
+    minimum file size used for resize2fs -M could be a block too small.
+  * Fixed the badblocks program to honor the -s flag when in read-only -t
+    mode.  (Closes: #646629)
+  * Update Czech, Dutch, French, Polish, and Swedish translations
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Fri, 17 Feb 2012 15:07:13 -0500
+
+e2fsprogs (1.42-1) unstable; urgency=low
+
+  * New upstream release
+  * Fixed hurd FTBFS (Closes: #649689)
+  * Optimized e2fsck speed on large file systems when using [scratch_files]
+  * Fixed e2fsck handling of blocks claimed by multiple inodes in
+    bigalloc file systems
+  * Fixed e2fsck's calculation of max file size for non-extent based
+    files when huge_file is enabled
+  * Update Czech and Swedish translations
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 29 Nov 2011 15:50:07 -0500
+
+e2fsprogs (1.42~WIP-2011-11-20-1) unstable; urgency=low
+
+  * New upstream release
+  * Fix error checking so resize2fs works when using a 32-bit userspace
+    and a 64-bit kernel (Closes: #644989)
+  * e2fsck now returns additional status bits in its exit code if it
+    aborts early in the e2fsck run
+  * Fix potential stack overflow in debugfs
+  * Avoid an infinite loop in ext2fs_find_block_device() if there are
+    symlink loops in /dev caused by a buggy udev
+  * Fix test failures on big-endian systems
+  * Fix gcc -Wall complaints
+  * Add freefrag and e2freefrag commands to debugfs
+  * Add a read-only, metadata-only debugfs command called rdebugfs
+  * Improve first-class quota support
+  * Fix bigalloc support in e2freefrag
+  * Clean up mmp handling
+  * Fix a regression which caused mke2fs to not work correctly on files
+    > 2GB.  (Closes: #647245)
+  * Fix a namespace leak in libext2fs (tdb_null)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 20 Nov 2011 21:32:49 -0500
+
+e2fsprogs (1.42~WIP-2011-10-16-1) unstable; urgency=low
+
+  * New upstream release
+  * Fix online resizing with resize2fs (Closes: #644989)
+  * Fix bug which caused shrinking an empty file system file system to
+    its minimal size to sometimes fail.
+  * Don't look at the high 16 bits of i_file_acl if the 64-bit feature
+    is not enabled; this fixes a Hurd compatibility field since this is
+    used for the high 16 bits of i_mode on Hurd.
+  * Update Sweedish, Polish, French, German, and Czech translations
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 16 Oct 2011 22:07:03 -0400
+
+e2fsprogs (1.42~WIP-2011-10-09-1) unstable; urgency=low
+
+  * New upstream release
+  * Fixed infinite loop in filefrag (Closes: #644792)
+  * Fixed various spelling and translation problems
+  * Fixed various man pages
+  * Fixed 64-bit block numbers in e2fsck's journal replay
+  * Fixed mipsel FTBFS that was fixed for mips
+  * Update Sweedish, French, and Czech translations
+  * Convert to debian source 3.0 (quilt) format
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 09 Oct 2011 22:24:31 -0400
+
+e2fsprogs (1.42~WIP-2011-10-05-2) unstable; urgency=low
+
+  * Fix portability issues with non-Linux platforms and for the mips
+    platform, which does some really strange things vis-a-vis
+    32/64-bit support without actually having a 64-bit version of
+    the architecture (Closes: #644502)
+  * Fix dependency problem which causes the newer version of libcom_err2
+    to get pulled in when upgrading to e2fsprogs, which needs the new
+    interface exported by libcom_err2.  (Closes: #644425, #644584)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Fri, 07 Oct 2011 18:27:06 -0400
+
+e2fsprogs (1.42~WIP-2011-10-05-1) unstable; urgency=low
+
+  * Update translations: German (Closes: #520985)
+  * Fixed usage and error text for mke2fs -C option
+  * Updated e2fsprogs.pot file for translators
+  * Added support for internationalized error strings for libcom_err
+  * Fixed various portability nits that were causing FTBFS problems on
+    Hurd and FreeBSD
+  * Added "big" and "huge" types to mke2fs.conf, since they are needed
+    for very large file systems
+  * Fixed on-line resizing which had been broken in the 1.42 series
+    (Closes: #451388)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Wed, 05 Oct 2011 02:10:53 -0400
+
+e2fsprogs (1.42~WIP-2011-10-01-2) unstable; urgency=low
+
+  * Update translations: French, German (Closes: #620659)
+  * Fix compilation problems in hermetic environments
+  * Fix on-line resizing in resize2fs (Closes: #451388)
+  * Add definitions for "big" and "huge" filesystems to /etc/mke2fs.conf
+  * Fix mke2fs when there are more than 2**32 block groups
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 04 Oct 2011 00:04:25 -0400
+
+e2fsprogs (1.42~WIP-2011-10-01-1) unstable; urgency=low
+
+  * New upstream release
+  * Avoid unnecessary reboots when checking the root fs in some special cases
+  * Fix an off-by-one error in filefrag -v's output
+  * Make filefrag display the number of contiguous (not physical)
+      extents (Closes: #631498)
+  * Clarify the mke2fs.conf.5 man page (Closes: #634883)
+  * Add a hurd-specific mke2fs.conf file (Closes: #629355)
+  * mke2fs will set s_max_mnt_count to -1 instead of 0 by default to
+      work around a bug in pre-3.0 kernels which caused a spurious
+      message to be printed when the file system was mounted (Closes: #632637)
+  * Fixed portability problems which was causing build failures on
+      non-Linux/non-x86 systems.
+  * Verify that the bad block inode looks sane before trusting it, to
+      avoid it causing more harm than good.
+  * Fixed the debian/rules file so that it build successfully if
+      DEB_BUILD_OPTIONS contains "nostrip" (Closes: #627535)
+  * Fixed some big-endian bugs in the MMP code
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Fri, 30 Sep 2011 22:33:41 -0400
+
+e2fsprogs (1.42~WIP-2011-09-25-1) unstable; urgency=low
+
+  * New upstream release
+  * Fix FTBFS on big-endian architectures (Closes: #641838)
+  * Add support for multiarch (Closes: #632169)
+  * Clarify and update debian/copyright file (Closes: #614662)
+  * Add support for Multi-Mount Protection (MMP)
+  * Allow tune2fs to remove the external journal if the device is not found
+  * Updated/clarified man pages (Closes: #642193)
+  * Fix a potential FTBFS caused by overly long compile lines (Closes: #629883)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 25 Sep 2011 01:28:34 -0400
+
+e2fsprogs (1.42~WIP-2011-09-16-1) unstable; urgency=low
+
+  * New upstream release
+  * Added support for the integrated quota feature
+  * Improved 64-bit and bigalloc support
+  * Mke2fs and tune2fs now allows setting the stride and stripe width to zero
+  * Fixed tune2fs's mount options parsing  (Closes: #641667)
+  * Fixed an ABI compatibility problem which broke the dump program
+      (Closes: #636418)
+  * Resize2fs has forward compatibility for a new on-line resize ioctl
+      for > 16TB file systems.
+  * Fixed a (very hard to hit) bug that could cause e2fsck to crash in
+       pass 1 or pass 2
+  * Debugfs has a new 'blocks' command
+  * Mke2fs now gives a warning if the auto-detected block size exceeds
+      the page size
+  * Mke2fs and e2fsck now tries to use the punch hole command as a
+      "discard" when operating on normal files
+  * Mke2fs will not try to do any discard operations if -n is specified
+      on the command line
+  * Updated/clarified man pages (Closes: #639411)
+  * Fixed parsing of MNTOPT_ options for tune2fs and debugfs (Closes: #641667)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Fri, 16 Sep 2011 10:33:59 -0400
+
+e2fsprogs (1.42~WIP-2011-07-02-1) unstable; urgency=low
+
+  * New upstream release
+  * Add support for 64-bit file systems
+  * Add support for bigalloc file systems
+  * Fixed an e2fsck bug which caused "*** FILE SYSTEM WAS MODIFIED ***"
+      without an 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.  (Closes: #619859)
+  * E2fsck now uses less cpu time in pass 5
+  * E2fsck will no longer segault when a corrupted file system has a bad
+    extent, and removing it leads to a block needing to be deallocated.
+  * E2fsck now supports an extended "discard" option which will cause
+      e2fsck to attempt discard all unused blocks after a full check
+  * The e2image program now supports the qcow2 format, a more efficient
+      way of capturing file system metadata snapshots.
+  * Mke2fs now supports the [devices] stanza in mke2fs.conf.
+  * Mke2fs now supports the reserved_ratio relation 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.
+  * 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 bevice 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.
+   * 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.
+   * 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.
+   * Filefrag will report 0 extents correctly in verbose mode.
+   * Logsave's usage message has been fixed.  (Closes: #619788)
+   * Update translations: French, Chinese, Germany, Indonesian, Swedish,
+        Vietnamese, Polish, Dutch, Czech.
+   * Updated/clarified man pages.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat, 02 Jul 2011 22:38:57 -0400
+
+e2fsprogs (1.41.14-1) experimental; urgency=low
+
+  * New upstream release
+  * Fixed a FTBFS on big-endian architectures
+  * Fixed spurious warning in mke2fs
+  * resize2fs now works correctly on devices exactly 16TB
+  * resize2fs will no longer clear the resize_inode feature when the
+    number of reserved GDT blocks reaches 0.  This allows a file
+    system with the flex_bg feature to be subsequently shrunk.
+  * e2fsck will no longer use the extended rec_len encoding for file
+    systems whose blocksize is less than 64k, to catch fs inconsistencies
+    which the kernel will complain about.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Wed, 22 Dec 2010 18:39:19 -0500
+
+e2fsprogs (1.41.13-1) unstable; urgency=low
+
+  * New upstream release
+  * E2fsck can now do journal-only replays via "e2fsck -E journal_only"
+  * E2fsck now understands UUID= and LABEL= specifiers for the -j option
+    (Closes: #559315)
+  * E2fsck.conf now supports a new config option, which forces the
+    problem not to be fixed: problems/<problem code/force_no
+  * Dumpe2fs now prints friendlier offsets for flex_bg file systems
+  * Mke2fs will now fail if the user uses an file system type not
+    defined in mke2fs.conf (Closes: #594609)
+  * Resize now prints a clarified error message explaining that on-line
+    shrinking is not supported at all.  (Closes: #599786)
+  * Fixed a build error caused by bad static and profiled dependencies
+    for the blkid library (Closes: #604629)
+  * Fixed an e2fsck PROGRAMMING BUG error (Closes: #555456)
+  * Fixed outdated mention of fsck in the e2fsprogs package (Closes: #588726)
+  * Removed obsolete initrd script (Closes: #585041)
+  * Fixed bad dependency on libblkid1 due to shlibs.local (Closes: #583551)
+  * E2fsck now opens the external journal in exclusive mode to prevent
+    clearing the journal of a mounted, snapshotted volume if the user
+    accidentally tries to run e2fsck on the snapshot volume (Closes: #587531)
+  * Fix a big in e2fsck so it correct test for whether the EOFBLOCKS_FL
+    flag should be set or not.
+  * Tune2fs can now set uninit_bg without requiring an fsck afterwards
+  * Add support for the new ext4 default mount options added in 2.6.35
+  * Add support for the ext4 error tracking superblock fields added in 2.6.36
+  * Debugfs now uses a more concise format for listing extents in its
+    stat command
+  * Debugfs can now use direct I/O to access the file system with the -D option
+  * Mke2fs will skip initializing the inode table if a device supports
+    discard and the discard operation results in zero'ed blocks
+  * Mke2fs's handling of logical and physical sector sizes has been
+    significantly improved.
+  * Debugfs will correctly show the progress bar even when UTF-8
+    characters are used in its translation files (Closes: #583782, #587834)
+  * E2freefrag will now display the total number of free extents.
+  * Resize2fs -P now longer requires a freshly checked file system
+  * Fixed a floating point precision error that can cause segfaults in
+    e2fsck and resize2fs in extremely rare cases
+  * Fixed a bug in e2fsck which caused it to fail if both the original
+    and backup superblocks were invalid in some way
+  * Fixed a bug in e2freefrag which caused getopt parsing to fail on
+    architectures with unsigned chars
+  * Clarified mke2fs and e2fsck error messages when given incorrect
+    options/values by the user
+  * Updated/clarified man pages (Closes: #580236, #594004, #589345, #591083)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 22 Nov 2010 16:00:50 -0400
+
+e2fsprogs (1.41.12-2) unstable; urgency=high
+
+  * Allow tune2fs to set uninit_bg without requiring an fsck
+  * Fix test in e2fsck to correctly check for EOFBLOCKS files
+  * Fix dependencies for libuuid and libblkid (Closes: #583551)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Thu, 03 Jun 2010 09:30:36 -0400
+
+e2fsprogs (1.41.12-1) unstable; urgency=low
+
+  * New upstream release
+  * mke2fs now gives the correct error message if the external journal
+    is device is not found
+  * The resize2fs program will refuse to print the minimum size needed
+    for a file system if it is not clean.
+  * E2fsck now tests for extents that begin at physical block 0 and
+    rejects them as invalid.
+  * 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.
+  * E2fsck will now completely skip time-based checks if the system
+    clock looks insane or if the broken_system_clock option is set
+    in /etc/e2fsck.conf.  (Closes: #549861, #540152)
+  * Fixed a bug in e2fsck which caused e2fsck to complain about i_blocks
+    with a 4T file created using posix_fallocate()
+  * E2fsck will now correctly mark a sparse journal as invalid and will
+    delete and recreate the journal to address the problem.
+  * Fixed e2fsck not to ask permission from the user to abort if it's
+    going to abort regardless of what the user is going to say...
+  * E2fsck can now continue even if it fails to recreate the resize inode
+  * E2fsck will now avoid removing directory entries for inods found in
+    the unused region of the inode table until after it restarts the fs
+    check to avoid removing valid data.
+  * E2fsck will now longer try to set the block group checksums if it
+    is interrupted.
+  * Mke2fs will check both the physical and logical blocksizes of a
+    device to better support 4k sector drives.
+  * Mke2fs will accept the valid (but rarely useful) flex_bg size of 1
+  * E2fsck will check for cases where the EOFBLOCKS_FL is set whe nit is
+    not needed, and offer to clear it.
+  * The com_err library will now only output a CR character if the
+    stderr is connected to a tty in raw mode.
+  * Update Czech, Chinese, Dutch, French, Germany, Indonesian, Polish,
+    and Vietnamese translations (from the Translation Project)
+  * Add an fsck.ext4 symlink in the e2fsprogs-udeb package (Closes: #571247)
+  * Fix makefile dependency so dpkg-buildpackage -j2 works (Closes: #563487)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 17 May 2010 19:43:52 -0400
+
+e2fsprogs (1.41.11-1) unstable; urgency=medium
+
+  * New upstream release
+  * Add Heimdal function com_right_r() to libcom_err (Closes: #558910)
+  * Allow e2fsck to run even if the physical device has more than 2**32 blocks
+  * Debugfs's "logdump -b <blk>" now properly shows the allocation status
+    of the block <blk>.  (Closes: #564084)
+  * Make e2fsck's "the filesystem is mounted" message is now more scary
+    to hopefully 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.
+  * If the partition is badly aligned, have mke2fs just print a warning
+    message and continue.  Previously mke2fs would ask to confirm, and
+    this broke distro installation scripts.
+  * Fix a bug in libext2fs caused the creation of very large journals
+    for ext4 to be _very_ slow.
+  * 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.
+  * Fix a bug in e2fsck which could cause e2fsck -D to corrupt
+    non-indexed directories.  (Closes: #572453)
+  * debian/rules: can be compiled statically with stack protector now.
+    (Closes: #573923)
+  * Update debian policy compliance to 3.8.4
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 15 Mar 2010 00:16:35 -0400
+
+e2fsprogs (1.41.10-1) unstable; urgency=low
+
+  * New upstream release
+  * 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 for system with broken CMOS hardware
+    clocks.  (Closes: #559776)
+  * Fix flex_bg inode table placement algorithm used by mke2fs for
+    certain specific file system sizes
+  * Add source lintian overrids for weak-library-dev-dependency
+  * Fix FTBFS problem caused by texi2html changing (again) its output
+    location.  (Closes: #552934)
+  * Make e2fsck to avoid rehashing directories which can fit in a
+    single directory block.
+  * Fix how e2fsck fixes sparse directories which are extent-mapped.
+  * Fix some big-endian bugs in e2fsck and libext2fs
+  * Teach e2fsck to detect and fix sparse extent-mapped directories
+  * Fix filefrag from core dumping on file systems with 8k block sizes
+  * E2fsck was depending on i_size to be correct to detect and fix
+    certain directory problems before actually fixing the
+    directory's i_size.  This caused certain rare corruptions to
+    require two runs of e2fsck to address.
+  * Update Czech, Indonesian, Polish and Vietnamese translations
+    (from the Translation Project)
+  * Fix e2fsck to find and correct duplicate directory entries in
+    non-indexed directories.
+  * Add support for calling BLKDISCARD to mke2fs.
+  * 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 resize2fs so it works correctly on file systems with external journals
+  * Fix libss so that it does not seg fault when using a readline
+    library which does not supply a readline_shutdown() function.
+  * Add a pre-depends for util-linux-ng (Closes: #551795)
+  * Update and clarify various man pages.
+  * Corrected dumpe2fs's usage message
+  * 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.
+  * Change e2fsck to accept superblock times to be fudged by up to 24
+    hours by default.  Most distributions have fixed their init scripts,
+    but apparently now they have buggy virtualization scripts.  :-(  I
+    give up, too many buggy user space set ups out there.  (Closes: #557636)
+  * Fix e2fsck to correctly print > 32-bit i_blocks numbers in problem reports
+  * Improve e2fsck so it prints "Illegal indirect block" instead of
+    "Illegal block #-1"
+  * Teach mke2fs to get device topology information from blkid and use
+    it to populate the superblock stride and stripe sizes and warn if
+    the block device is misaligned
+  * Fix a file descriptor leak in debugfs when sourcing a command file
+  * Fix a file descriptor leak in fsck
+  * Round up the bitmap size to prevent spurious segmentation faults on
+    BSD platforms.
+  * Fix resize2fs to correctly calculate the minimum size needed, when
+    flex_bg is enabled, to prevent resize2fs -M from failing.
+  * Dumpe2fs now displays more information about the contents of the journal
+  * Make sure the libblkid1 and libblkid1-dbg packags have changelogs
+  * On low memory systems, e2fsck can print some very scary looking
+    error messages.  Clean up them up to avoid user panic.  (Closes: #509529)
+  * Enhance blkid to support .ko.gz files in the modules.dep parser
+  * Fix tune2fs -j for mounted exted-enabled file systems
+  * Use the feature name "extent" instead of "extents" in mke2fs.conf.
+    Both work, but the latter is what is documented in the man page.
+    (Closes: #540111)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 07 Feb 2010 20:56:47 -0500
+
+e2fsprogs (1.41.9-1) unstable; urgency=low
+
+  * New upstream release
+  * Fix tune2fs -I to work correctly in the face of bad blocks and
+    filesystems formatted for RAID arrays, and ENOSPC errors
+  * Require the user to only answer one question instead of multiple
+    ones for multiple bad block group checksums, or when an inode
+    table needs to be moved.
+  * Fix e2fsck to handle moving inode tables in FLEX_BG filesystems more
+    gracefully by looking in the entire flex_bg for space, instead of
+    just in the block group; if that doesn't work, try looking for
+    space in the entire filesystem.
+  * Fix the filefrag code to avoid printing the extent header if it
+    needs to fallback to using the FIBMAP ioctl.
+  * Fix filefrag to print the correct number of extents for zero-length
+    files when using FIBMAP.  (Closes: #540376)
+  * Add a filefrag -B option to make it easier to debug the FIBMAP
+    support.
+  * Allow e2fsprogs programs to allocate from uninitalized block groups.
+  * Add a new program, e2freefrag, which displays information about the
+    free space fragmentation in an ext2/3/4 filesystem.
+  * 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.
+  * Update French, Polish, Czech, and Sweedish translation from the
+    Translation Project.
+  * Enhance debugfs's 'stat' command to print basic extent information
+    for extent-mapped inodes, and add a new command, 'dump_extents'
+    which prints detailed information about an inode's extent tree.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 23 Aug 2009 10:08:52 -0400
+
+e2fsprogs (1.41.8-2) unstable; urgency=low
+
+  * Fix regression in ext2fs_extent_set_bmap() which caused e2fsck -fD
+    to fail on ext4 filesystems if the directory needs to shrink by more
+    than a block (Closes: #537510)
+  * Fixed filefrag for non-extent based files
+  * Fix use of apostrohe's in package descriptions
+  * Don't use dietlibc when building for mips and mipsel architectures
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 20 Jul 2009 09:38:21 -0400
+
+e2fsprogs (1.41.8-1) unstable; urgency=low
+
+  * New upstream release
+  * Fix resize2fs bugs when shrinking ext4 filesystems
+  * Update debian policy compliance to 3.8.2
+  * Update package descriptions to mention ext3 and ext4 filesytems
+      (Closes: #535530)
+  * Update French, Polish, Czech, Indonesian, and Sweedish translation
+      from the Translation Project.
+  * If the resize2fs operation fails, the user will be told to fix up
+    the filesystem using e2fsck -fy.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat, 11 Jul 2009 17:26:16 -0400
+
+e2fsprogs (1.41.7-2) unstable; urgency=low
+
+  * Fix online resizing using resize2fs (Closes: #535452)
+  * Fix the filefrag program for files with more than 144 extents
+  * Update and clarify various man pages.
+  * Fix potential filesystem corruptions caused by using resize2fs to
+    shrink filesystems with extents enabled.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 07 Jul 2009 23:21:46 -0400
+
+e2fsprogs (1.41.7-1) unstable; urgency=low
+
+  * New upstream release
+  * 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.
+  * Fix a bug in libext2fs which can cause e2fsck and resize2fs to write
+    uninitalized data into the portion of the inode beyond the first 128
+    bytes when operating on extents; potentially corrupting filesystems.
+  * The logsave program will now filter out the ^A and ^B characters when
+    writing to the console.
+  * Update/clarify man pages (Closes: #531385, #523063)
+  * Fix filefrag progam so it correctly checks for errors from the
+    fiemap ioctl.
+  * Change badblocks to allow block sizes larger than 4k.
+  * Fix libext2fs to properly initialize i_extra_size when creating the
+    journal and resize inodes.
+  * Resize2fs will now update the journal backup fileds in the
+    superblock if the journal is moved; this avoids an unnecessary full
+    fsck after resizing the filesystem.
+  * Use the same encoding as the kernel for rec_len == 64k in 64k block
+    filesystems.
+  * Fix lsattr to exit with a non-zero status when it encounters errors.
+  * Enhance badblocks to print the currently tested block number when
+    interrupted with ^C.
+  * Fix debugfs from core dumping if the logdump command fails to open the
+    output file.
+  * Harden ext2fs_validate_entry() so that lsdel will not read beyond the
+    end of the block even if the directory block is corrupted.
+  * Update Chinese and Czech translation from the Translation Project.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 29 Jun 2009 15:12:14 -0400
+
+e2fsprogs (1.41.6-1) unstable; urgency=low
+
+  * New upstream release
+  * Update and clarify man pages
+  * Fix a number of Lintian warnings, including to updating to debian
+    policy 3.8.1
+  * Update config.guess and config.sub to the latest (2009-04-17)
+    version so that e2fsprogs will build on the avr32 platform
+    (Closes: #528330)
+  * Add an explicit error message if the /etc/mtab file is missing
+    when running e2fsck or resize2fs (Closes: #527859)
+  * Enhance e2fsck to handle the case where the primary block group
+    descriptors need fixing, and the backup superblock is corrupt.
+    (Closes: #516820)
+  * Add an "-a" option to debugfs's close_filesys command
+  * e2fsck will no longer abort a preen operation if an inode's
+    i_file_acl_hi field is non-zero.  (Closes: #526524)
+  * The chattr program can now migrate inodes from using direct/indirect
+    blocks to extent trees.
+  * Speed up e2fsck if there are multiple block groups with inodes in
+    use in the unused portion of the block group's inode table.
+  * Update Chinese translation from the translation project
+  * Fix resize2fs so it won't corrupt ext4 filesystem when asked to
+    shrink a filesystem smaller than the minimum suggested size.
+  * Fix e2fsck regression which can corrupt ext4 filesystems when
+    replaying the journal.
+  * Add support to e2fsck for handling I/O errors while replaying the
+    journal
+  * Fix a bug in e2fsck which could cause it to crash if an inode has a
+    corrupt extent header, and the user declines to clear the inode.
+  * Fix blkid to prefer the /dev/mapper/<name> device names over the
+    private /dev/dm-N device names.
+  * Add support for the FIEMAP ioctl to the filefrag program
+  * Further speed up e2fsck by skipping journal checks if the filesystem
+    is mounted read-only and is marked as not needing journal replay.
+  * Add a build depends in the control file indicating that dietlibc
+    must be newer than version 0.30 (Closes: #506064)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Fri, 30 May 2009 13:26:23 -0400
+
+e2fsprogs (1.41.5-1) unstable; urgency=low
+
+  * New upstream release
+  * E2fsck will now detect and fix inodes that have a non-zero
+    i_file_acl_high field on 32-bit filesystems.
+  * Update build-depends to indicate that dietlibc 0.30 doesn't work.
+    (Closes: #506064)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Fri, 24 Apr 2009 08:52:47 -0400
+
+e2fsprogs (1.41.4-3) unstable; urgency=low
+
+  * Update/clarify man pages (Closes: #365619)
+  * Fix a problem where the 'device names' for pseudo-filesystems in
+    /proc/mounts could confuse the e2fsprogs into thinking that a
+    filesystem image stored in a regular file was mounted when it was not
+  * Remove whole-disk entries from the blkid cache when partitions are found
+  * Reduce the number of disk reads needed when the filesystem is clean
+  * Add Chinese (simplified) translation from the Translation Project
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Thu, 23 Apr 2009 01:35:22 -0400
+
+e2fsprogs (1.41.4-2) unstable; urgency=low
+
+  * Update the debian copyright files to point at the version-specific
+    GPL and LGPL files.
+  * Update the debhelper compat level to 7
+  * 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).
+  * Clarify tune2fs man page  (Closes: #515693)
+  * Add homepage field to the debian control file (Closes: #506279)
+  * Fix Hurd compilation problem (Closes: #521602)
+  * Debugfs can now set i_file_acl_high via the set_inodes_field command
+  * Debugfs will now display a 64-bit file acl block
+  * Fix various gcc compilation warnings and other programming cleanups
+  * Make sure libuuid closes all file descriptors before starting the
+    uuidd daemon.
+  * Avoid running e2fsck unnecessarily after doing an online resize
+  * Mke2fs -S will now avoid trying to create the journal
+  * Update the Czech translation from the translation project.
+  * Fix support for external journals (which was broken in e2fsprogs 1.41.4)
+  * Fix a compatibility issue with libext2fs info page and makeinfo 4.12
+  * Fix a segfault in debugfs when running stat without an open filesystem
+  * Teach the blkid library that starting in 2.6.29, ext4 can support
+    filesystems without journals.
+  * Add error check preventing the reserved_ratio argument to mke2fs and
+    tune2fs from being negative.  (Closes: #517015)
+  * Add support for tracking the number kilobytes written to the
+    filesystem via the superblock field s_kbytes_written
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 19 Apr 2009 23:05:53 -0400
+
+e2fsprogs (1.41.4-1) unstable; urgency=low
+
+  * New upstream release
+  * Fix bug which could sometimes cause blkid to return an exit value of
+    zero for a non-existent device (Closes: #502541)
+  * Fix spelling mistake in Debian changelog (Closes: #502323)
+  * Fix blkid to deal with an ext3 filesystem with the test_fs flag
+  * Fix debugfs's ncheck output to suppress extra characters at the end
+    of the file name
+  * Tune2fs now updates the block group checksums after changing the
+    filesystem's UUID
+  * Speed up tune2fs's inode resizing code so it is no longer vastly
+    inefficient for moderate to large filesystems
+  * Fix dumpe2fs so it doesn't attempt to print the inline journal
+    information on filesystems with an external journal
+  * Update the Catalan translation
+  * Filter out linux-vdso.so lines when determining the library
+    dependencies while building the initial ramdisk (Closes: #503057)
+  * Fix e2fsck so an errant INODE_UNINIT flag set in a block group
+    doesn't cause e2fsck to abort.
+  * E2fsck now distinguishes between fragmented directories and
+    fragmented files in verbose mode statistics and in the fragcheck
+    report.
+  * Avoid double-counting non-contiguous extent-based inodes in the
+    verbose mode statistics.
+  * E2fsck now leaves slack space when repacking directories so that a
+    few new directory entries won't cause leaf nodes to become split
+    right away.
+  * E2fsck was previously not handling the case of a corrupted interior
+    node in the extent tree, and would crash in that case.  It now will
+    handle this and related failures robustly.
+  * 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.
+  * Fix a regression in debugfs's logdump command so it works for
+    filesystems with 32-bit block numbers.  This was accidentally broken
+    when the header files were changed to support the 64-bit block numbers.
+  * 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.
+  * Add mkfs.ext4 symlink to the e2fsprogs-udeb package (Closes: #511207)
+  * Resize2fs now reserves some extra block when calculating the minimum
+    size to shrink the filesystem in case some extent allocation trees
+  * Add a "set -e" to uuid-runtime's prerm script to make Lintian happy
+  * The blkid library will now recognize btrfs filesystems and swap
+    devices currently used by user-level software suspend.
+  * tune2fs will not allow changing the inode size for filesystems that
+    have the flex_bg feature enabled, since the code currently assumes
+    the each block group's portion inode table is located in its own
+    block group.
+  * Fix tune2fs -I so it won't corrupt ext3/ext4 filesystem configured
+    for RAID storage devices.
+  * Mke2fs now understands a -U option which allows the UUID to be
+    specified for the new filesystem.
+  * Mke2fs will now treat devices with exactly 16TB as if they have 16TB
+    minus one block, since many users expect ext4 to support 16TB
+    devices, and the true maximum size is 16TB-1.
+  * E2fsck will now flag filesystems that have an insane s_first_ino
+    field in their superblock.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 27 Jan 2009 11:50:49 -0500
+
+e2fsprogs (1.41.3-1) unstable; urgency=low
+
+  * New upstream release
+  * Fix e2fsck so it prints the correct inode number for uinit_bg
+    related problems.
+  * E2fsck will offer to clear the test_fs flag if the ext4 filesystem
+    is available.
+  * Fix a file descriptor leak in libblkid
+  * Avoid a potential infinite loop in e2fsck when there are disk I/O
+    errors while trying to close a filesystem.
+  * Fix a potential infinite loop in resize2fs when a bogus new size of
+    0 blocks is specified on the command line.
+  * Add an early check to see if a device is read-only to avoid lots of
+    confusing error messages.
+  * Fix debugfs's ncheck command so it prints all of the names of
+    hardlinks in the same directories.
+  * 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.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 12 Oct 2008 22:45:34 -0400
+
+e2fsprogs (1.41.2-1) unstable; urgency=low
+
+  * New upstream release
+  * Fix e2fsck's automatic blocksize detection.  This fixes a regression
+      added in e2fsprogs 1.40.7 where e2fsck's -b option would not
+      work if a blocksize wasn't also specified via the -B option.
+  * Fix a potential file descriptor leak in libcom_err if the
+      application exec's another program.
+  * Fixed badblocks output for "badblocks -sw"
+  * debugfs: Fix ncheck to print all pathnames for all of the specified inodes
+  * Use dietlibc when possible for building e2fsck.static, to reduce the
+      size of the static binary.
+  * debugfs: Add the ability to specify the hash seed and to specify the
+      hash algorithm by name to the "hash" command.
+  * Add documentation for the file I/O functions to libext2fs.texinfo.
+      (Closes: #484877)
+  * Fix a bug in e2fsck where if a translation file is being used and
+      e2fsck needs to print problem report with a custom question (such as
+      "Run journal anyway?"), the PO file's header would get spewed onto
+      the terminal.
+  * Update Swedish, Vietnamese, Dutch, Indonesian, German, Czech translations
+  * Fixed spelling mistakes in man pages  (Closes: #498100, #498101,
+      #498102, #498103)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Thu, 02 Oct 2008 08:54:16 -0400
+
+e2fsprogs (1.41.1-3) unstable; urgency=low
+
+  * badblocks -v will now display the time and percentage complete
+      (Closes: #429739)
+  * Reordered debian/rules when building udebs to avoid a Lintian warning
+  * Fixed dependencies fields in the udeb packages (Closes: #497619)
+  * Avoid linking various programs with unneeded libraries
+  * Fixed a typo'ed bold font specifier in mke2fs's man page
+  * Fixed the pkg-config files so the include directory needed by the
+      various libraries is included, and to use Requires.private to
+      avoid unnecessary linking of dynamic libraries.
+  * Add more historical information to the debian/*.symbol files
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Fri, 05 Sep 2008 11:11:03 -0400
+
+e2fsprogs (1.41.1-2) unstable; urgency=low
+
+  * Make sure ext4_swab64() is defined on all platforms (Closes: #497515)
+  * Badlocks: Use O_LARGEFILE so it will run on files greater than 2GB
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 02 Sep 2008 09:53:46 -0400
+
+e2fsprogs (1.41.1-1) unstable; urgency=low
+
+  * New upstream release
+  * mke2fs and tune2fs now use half-md4 as the default hash algorithm
+       In addition the default hash algorithm can be via mke2fs.conf for
+       mke2fs, and via a command-line option for tune2fs.
+  * Add support for on-line resizing of ext4 filesystems with the
+       flex_bg filesystem feature.
+  * e2fsck now creates the journal in the middle of the filesystem,
+       which can speed up fsync-heavy workloads.
+  * Make the blkid library more efficient for devicemapper devices,
+       mostly by no longer using the libdevmapper library.
+  * Fix various namespace leakages by the libblkid, libe2p and libext2fs
+       libraries.
+  * Fix support for empty directories in 64k blocksize filesystems.
+  * Add supported_features command to debugfs
+  * Improve libblkid detection of JFS and HPFS filesystems
+  * The test I/O manager is now compiled in by default, but to avoid its
+    overhead, it is only enabled when the TEST_IO_FLAGS or TEST_IO_BLOCK
+    environment variables are set.
+  * Fix filefrag's ideal extent calculation (Closes: #458306)
+  * Fix postinstall scripts when the user/group is in LDAP (Closes: #497010)
+  * Add Indonesian and update French, Polish, Dutch, German, Sweedish,
+       Czech, and Vietnamese Translations.  (Closes: #313697, #401092)
+  * Update/clarified man pages
+  * Add dpkg-gensymbols support to track ABI changes to the libraries
+  * Add lintian overrides for uuid-runtime and libuuid1
+  * Remove (no longer needed) lintian overrides for e2fsck-static
+  * Add debian/watch file
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 01 Sep 2008 11:30:21 -0400
+
+e2fsprogs (1.41.0-4) unstable; urgency=low
+
+  * mke2fs will issue a warning if mke2fs.conf hasn't been updated and
+    the user tries to create an ext3, ext4, or ext4dev filesystem,
+    since it depends on the mke2fs.conf file in order to create the
+    filesystem properly with the appropriate features.
+  * Fix the maximum journal size message in mke2fs and tune2fs to be
+    consistent/correct.  (Closes: #491620)
+  * Add detection for hfsx filesystem and add label and uuid detection
+    for hfs, hfsplus, and hfsx filesystems in libblkid.
+  * Fix cosmetic issue in resize2fs when a progress bar doesn't finish
+    with a newline for pass 4 (when the inode references are updated).
+  * Teach resize2fs to move blocks when extents are present (when
+    shrinking a filesystem and/or if resize_inode is not present).
+  * Teach resize2fs to work correctly with the uninit_bg when blocks
+    need to be moved or allocated.
+  * Fix and optimize extent manipulation in libext2fs for resize2fs.
+  * Fix "dumpe2fs -i" and "debugfs -i".  (Closes: #495830)
+  * Fix resize2fs incorrectly managing directory in-use counts when
+    shrinking filesystems and directory inodes need to be moved.
+  * Fix spurious e2fsck complaints with i_size with extents and large
+    files and preallocated blocks.
+  * Make sure the creation timestamp is set by mke2fs and by new inodes
+    created by the libext2fs in general.
+  * Fix ind/dind/tind statistics when extents are present, and add
+    extent tree depth statistics.
+  * Add a fragmentation report extended option to e2fsck.
+  * Fix blkid cache validation and some possible blkid crashes
+    (Closes: #493216)
+  * Teach debugfs's htree command to work with extent-based directories.
+  * Improve the error message for "tune2fs -I".
+  * Fix miscellaneous strings and usage messages pointed out by the
+    translators.  (Thanks, translators!)
+  * Enforce that mke2fs won't allow features for revision 0 filesystems.
+  * Optimize inode table allocation in mke2fs for flex_bg filesystems.
+  * Update/clarified man pages
+  * Fix minor typo in uuid-runtime's debian package description
+  * Wrap debian/copyright files to avoid "line too long" lintian warnings
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat, 23 Aug 2008 08:56:47 -0400
+
+e2fsprogs (1.41.0-3) unstable; urgency=medium
+
+  * Fix mips-specific FTBFS problem in debian/rules file
+  * Synchronize section and priority levels in control file with the
+    FTP masters' override file.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 15 Jul 2008 11:38:59 -0400
+
+e2fsprogs (1.41.0-2) unstable; urgency=medium
+
+  * Don't try to check the group descriptor checksum if the GDT_CSUM
+    feature is not present.  (Closes: #490637)
+  * Add a new blkid -L option which pretty-prints the currently
+    available block devices.  (Closes: #490527)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 13 Jul 2008 19:18:08 -0400
+
+e2fsprogs (1.41.0-1) unstable; urgency=medium
+
+  * New upstream version
+  * Make e2fsck detect corrupted block group descriptors that would
+    cause it to relocate inode tables, causing more damage to the
+    filesystem, and make it try the backup superblock/block group
+    descriptors first.
+  * Fix resize2fs to clean up the resize_inode if all of the reserved
+    gdt blocks are consumed during an off-line resize.
+  * Enable huge_file, dir_nlink, extra_isize feautres for mke2fs and tune2fs.
+  * Enable huge_file, dir_nlink, extra_isize, and uninit_bg by default
+    in mke2fs.conf.
+  * Fix badblocks terminology in man page and program output.
+    (Closes: #440983, #440981)
+  * Clarify stripe-width and stride-size in mke2fs man page.  (Closes: #487849)
+  * mke2fs: Dumb down filesystems for GNU Hurd (Closes: #471977)
+  * Add bash-static to the list of shells recommended for e2fsck-static
+    (Closes: #490003)
+  * mke2fs: Fix flex_bg metadata default layout to avoid a hole between
+    the bitmaps and inode tables.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Thu, 10 Jul 2008 17:25:32 -0400
+
+e2fsprogs (1.41~WIP-2008-07-07-1) experimental; urgency=low
+
+  * New upstream version (pre-release for e2sprogs 1.41)
+  * Update to indicate compliance with debian policy version 3.8.0.0.
+  * Fix e2fsck to not truncate valid extent files that are larger than
+    what is supported by indirect files.
+  * Add -dbg packages which contain the debugging information.
+  * mke2fs: Print a better error message when a device is too big.
+    (Closes: #488663)
+  * Create external journal devices with a default blocksize of 4k
+  * Fix bug in badblocks which caused crash when lots of -t patterns are
+    given.  (Closes: #487298)
+  * Fix blkid handling of stale entries.  (Closes: #487758, #487783)
+  * Update Vietnamese, Polish, French, Spanish, German, Catalan,
+    Dutch, Czech translations from the translation project.
+  * Fix FTBFS problem on MIPS (Closes: #487675)
+  * Fix bug in libuuid1.postinst which would cause it to blow up if
+    there were spaces around the equals sign in /etc/adduser.conf.
+    (Closes: #487443)
+  * Update/clarified man pages.  (Closes: #393313)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 07 Jul 2008 16:30:43 -0400
+
+e2fsprogs (1.41~WIP-2008-06-17-1) experimental; urgency=low
+
+  * New upstream version (pre-release for e2fsprogs 1.41)
+  * New options to badblocks allow it to limit how quickly it reads
+    from disk (for background scrubbing) and abort after a finding
+    giving a number of errors.
+  * Add support for ext4 filesystem features.  (Closes: #388452, #425477)
+  * Tune2fs can migrate a filesystem from using 128 byte inodes to
+    larger inode sizes so the user can take full advantage of ext4)
+  * E2fsck and mke2fs can optionally record an undo log which can be
+    replayed by the e2undo program.
+  * E2fsck will display a less cryptic message when the last check field
+    in the superblock is in the future.  (Closes: #446005)
+  * Improve blkid probes for LVM volumes and swap partitions
+  * Mke2fs has a much more sophisticated system for controlling the
+    parameters of newly created filesystems.  The -t option now is used
+    to specify the filesystem type.  See the mke2fs and mke2fs.conf man
+    pages for more details.
+  * 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.
+  * E2fsck now performs more extensive and careful checks of extended
+    attributes stored in the inode.
+  * Mke2fs will always make sure that lost+found always has at least 2
+    blocks, even for filesystems with very large blocksizes (i.e., 64kb).
+  * The debugfs "ls" command now supports the -p option, which causes
+    filenames to be printed surrounded by double quotes.
+  * Fix a potential off-by-one buffer overflow in e2image
+  * The chattr program will now return a non-zero exit code in case of
+    failures.
+  * This version of e2fsprogs removes support for legacy big-endian
+    filesystems and for MASIX filesystems.
+  * Add I/O statistics reporting to e2fsck.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 17 Jun 2008 23:57:08 -0400
+
+e2fsprogs (1.40.11-1) unstable; urgency=low
+
+  * Change mke2fs, tune2fs and resize2fs to use floating point precision
+    when calculating the number of reserved blocks.  (Closes: #452639)
+  * Update Spanish and Catalan translations.
+  * Fix ext2fs_swap{16,32,64} for external applications.  (Closes: #484879)
+  * Improve uuid-runtime package description.  (Closes: #483962)
+  * Improve e2fsprogs package description.  (Closes: #483023)
+  * Add support for detecting ZFS volumes to libblkid.
+  * Clarify debugfs man page.  (Closes: #486463)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 17 Jun 2008 21:59:21 -0400
+
+e2fsprogs (1.40.10-1) unstable; urgency=low
+
+  * Fix a very rare potential data corruption bug in e2fsck's journal
+    replay.
+  * Updated German, Dutch, Sweedish, and Vietnamese translations.
+  * Force blkid to revalidate a device if its mtime is newer than the
+    last validation time in the cache.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Wed, 21 May 2008 13:35:12 -0400
+
+e2fsprogs (1.40.9-1) unstable; urgency=low
+
+  * Fix fsck so that if multiple filesystems are being checked in
+      parallel, the progress bar for subsequent filesystems will be
+      correctly displayed.  (Closes: #432865)
+  * Fix fsck -Cn for n!=0 for better Ubuntu boot-time support
+  * debugfs: Don't bother using a pager of stdout is not a tty
+  * Fix tune2fs and debugfs to correctly parse time strings during
+      daylight savings time.  (Closes: #471882)
+  * Teach fsck to treat ext4 and ext4 filesystems as ext* filesystems
+  * Logsave will now propagate SIGINT and SIGTERM signals to its child
+      process.
+  * Mke2fs will not allow the illogical combination of the resize_inode
+      and meta_bg filesystem features.
+  * Use UID/GID ranges from adduser.conf if present, even though we
+      don't use adduser to add users/groups.  (Closes: #473179)
+  * Updated German, Czech, Dutch, French, Polish, Sweedish, and
+      Vietnamese translations.
+  * Update/clarified the mke2fs man page
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 27 Apr 2008 00:35:20 -0400
+
+e2fsprogs (1.40.8-2) unstable; urgency=low
+
+  * One more big-endian swap fix needed for resize2fs to work correctly
+      with in-inode extended attributes.
+  * Fix minor security issues identified in uuidd.
+  * Remove e2fsprogs preinstall script which contained stuff not needed
+      in well over two stable releases.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Fri, 14 Mar 2008 14:25:54 -0400
+
+e2fsprogs (1.40.8-1) unstable; urgency=low
+
+  * Fix e2image -I so it works on image files which are larger than 2GB.
+  * Fix e2fsck's handling of directory inodes with a corrupt size field.
+  * Fully fix a resize2fs bug where extended attributes in large inodes
+      could get dropped on big-endian systems.
+  * Update Czech, Dutch, Polish, Sweedish, and Vietnamese translations.
+  * Significantly updated German translation!  Thanks to Philipp Thomas
+    from Novell for stepping up to be our new German translation
+    maintainer!  (Closes: #302512, #370247, #401092, #412882)
+  * Fixed mke2fs man page to document new default inode size.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Thu, 13 Mar 2008 20:00:09 -0400
+
+e2fsprogs (1.40.7-1) unstable; urgency=low
+
+  * New upstream release
+  * tune2fs no longer will remove the sparse_super feature, as it is dangerous
+  * Update/clarified various man pages
+  * Fix bug where large nodes were not getting fully copied when
+      shrinking a fileystem using resize2fs.
+  * Allow mke2fs and tune2fs to manipulate the large_file feature flag
+  * Suppress fsck's warning message about an old-style fstab if the
+      fstab file is empty.  (Closes: #468176)
+  * E2fsck will no longer clear the large_files feature flag
+      automatically when there are no more large files in the system.
+  * Fix blkid code to avoid segfaulting when a device mapper volume
+      disappears out from under it.
+  * Enhance e2fsck's reporting of unsupported filesystem features
+  * Fix dumpe2fs command syntax for explicit superblock/blocksize parameters
+  * Teach tune2fs to clear the resize_inode feature flag
+  * Fix libuuid1 postinstall script to explicitly pass 100 to UID_MIN
+      and GID_MIN, to make it clear we are not trying to allocate an
+      uid/gid in the globally reserved range.  (Closes: #466929)
+  * Fix memory leak in ext2fs_alloc_block()
+  * Teach blkid to recognize LVM2 physical volumes
+  * Add support to dumpe2fs, mke2fs, and tune2fs for specifying and
+      printing the RAID stride and stripe width.
+  * Add support for new superblock fields to debugfs's set_super_value command
+  * Teach debugfs to print "mostly-printable" xattr strings, such as is
+      used by SELinux.
+  * Add support in fsck to ignore mounted filesystems when given the -M option
+  * Fix uuidd so it creates the pid file with the correct pid number
+  * Update Czech, Dutch, Polish, Sweedish, and Vietnamese translations
+      from the Translation Project.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Thu, 28 Feb 2008 22:27:39 -0500
+
+e2fsprogs (1.40.6-1) unstable; urgency=low
+
+  * New upstream release
+  * 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.
+      (Closes: #463787)
+  * Add 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.
+  * Document the BLKID_FILE environment variable in the libblkid man page
+  * Update Vietnamese and Czech translations from the translation project
+  * Fix dependency problem caused by dpkg 1.14.16 (Closes: #436058)
+  * 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.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 10 Feb 2008 00:06:02 -0500
+
+e2fsprogs (1.40.5-2) unstable; urgency=low
+
+  * Fix debian/control and debian/rules so that they work correctly
+    after a change in dpkg-gencontrol's behavior after version 1.14.16
+    of dpkg.  This fixes bad version dependencies for comerr-dev,
+    uuid-dev and ss-dev. Thanks to Don Armstrong for the explanation and
+    Margarity Manterola for a proposed patch. (Closes: #463058)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Wed, 30 Jan 2008 07:17:27 -0500
+
+e2fsprogs (1.40.5-1) unstable; urgency=low
+
+  * New upstream release.
+  * Mke2fs will now create new filesystems with 256 byte inodes and the
+      ext_attr feature flag by default.  This allows for much better
+      future compatibity with ext4 and speeds up extended attributes
+      even on ext3 filesystems.
+  * Teach mke2fs and tune2fs to set a "test_fs" flag, which indicates
+      that it is ok to use the filesystem on in-development kernel
+      code (i.e., ext4dev)
+  * E2fsck now optimizes non-htree directories by sorting them by inode
+      number.
+  * Add support for detecting HFS+ and ext4/ext4dev filesystems in blkid
+  * Fix blkid's ntfs UUID handling so it is compatible with vol_id
+  * Avoid a floating point exception when blkid tries to probe a corrpt
+      reiserfs filesystem.
+  * Fix potential overflow problem in e2image if the device name is
+      too long.
+  * Cause e2image to exit immediately with an error message on a disk
+      full situation.
+  * Fix a minor typos in the resize2fs and uuidd manpages.
+  * E2fsck will no longer backup superblocks when the kernel makes
+      certain "safe" feature set changes behind the user's back.
+  * Fix debugfs's lsdel command so it works on large files
+  * Allow a user to undelete an inode with linking to a destination
+      directory.
+  * Update Swedish translation file from the Translation Project
+  * The libuuid1 and uuid-runtime packages requires passwd package, so
+      declare it as a dependency.  (Closes: #459403)
+  * Fix a FTBFS problem on x86_64 caused by the fact that dietlibc
+      doesn't provide llseek on the x86_64.  (Closes: #459614)
+  * Don't use dietlibc on platforms that don't support it (Closes: #459475)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 27 Jan 2008 16:57:34 -0500
+
+e2fsprogs (1.40.4-1) unstable; urgency=low
+
+  * Make sure that programs like tune2fs, when modifying a mounted
+      filesystem do not write the backup superblocks with the
+      NEEDS_RECOVERY flag, to avoid e2fsck from needlessly forcing a
+      full fsck because it thinks the feature flags need to be backed up
+      from the master to the backup superblocks.  (Closes: #454926)
+  * Improve time-based UUID generation to guarantee uniqueness even when
+      UUID's are being generated at very high rates on SMP systems.  To
+      do this we use an optional setuid helper daemon (uuidd) which is
+      started by libuuid when it is needed.  The uuidd daemon is
+      packaged in the (new) uuid-runtime package, which now also includes
+      the uuidgen program (which had been previously been included as
+      part of the e2fsprogs package).
+  * Fix fsck to only treat '#' characters at the beginning of /etc/fstab
+      lines as starting a comment.  This avoids spurious warnings printed
+      for filesystems such as fuse that often use '#' as part of the
+      filesystem specifier (i.e., wdfs#https://dav.hoster.com/foo).
+  * Enhance the blkid program to pretty-print control and meta
+      characters to avoid garbage filesystem labels from screwing up the
+      user's terminal
+  * Fix potential integer overflows passed to malloc() in resize2fs
+  * Update Dutch, Polish, and Vietnamese translations from the
+      Translation Project.  Remove the Rwandan translation upon advice
+      of the Translation Project.
+  * Fix cross-compilation support for non-Linux architectures
+        (Closes: #451172, #437720)
+  * Clarified and improved man pages (Closes: #444883, #441872)
+  * Fix potential divide by zero error when libblkid tried probing an
+      invalid FAT filesystem.
+  * Make error_message() in libcom_err DTRT when when a 64-bit sign-extended
+      error code is passed to it.
+  * Build the e2fsck-static package so that e2fsck.static will not use
+      TLS and hence will run correctly on back-level Debian systems
+      using a 2.4 Linux kernel.  (Closes: #458017)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 31 Dec 2007 22:40:42 -0500
+
+e2fsprogs (1.40.3-1) unstable; urgency=medium
+
+  * New upstream release
+  * libext2fs: Add checks to prevent integer overflows passed to
+      malloc().  Fixes security issue related to Xen's pygrub: CVE-2007-5497
+  * libss: Fix parallel build failure
+  * e2fsprogs: fix blkid whole-disk scanning heuristics
+  * libext2fs: Fix a corner case bug in ext2fs_unlink
+  * fix check_mntent_file() to pass mode for open(O_CREAT)
+  * Fix errors in test_ss.c so it can be an example application and test case
+  * e2image in raw-mode appends an extra byte to image-file
+  * Fix typo in the summary section of the blkid man page
+  * mke2fs: Change usage message to use -E instead -R, which is deprecated
+  * libblkid: recognize squashfs filesystems on BE systems.
+  * libblkid: detect squashfs
+  * e2fsck: backup superblocks if key constants have changed
+  * e2fsck: update the backup superblocks if the feature bitmasks are changed
+  * ext2fs_dblist_dir_iterate: Fix ABORT propagation logic
+  * libblkid: Add more magic numbers that might mean there is a FAT filesystem
+  * e2fsck: Don't mark the filesystem invalid because of time errors
+  * Work around lame Ubuntu init scripts / installer bugs
+  * fsck: Ignore /etc/fstab entries for bind mounts
+  * e2fsck: If the superblock is corrupt, automatically retry with the backup sb
+  * Don't crash if s_inode_size is zero
+  * Use sscanf instead of atoi when parsing e2fsck options
+  * Add Catalan translation and update Spanish, French, and Dutch
+      translations from the Translation Project.  (Closes: #411562)
+  * Fix typo and clarify the uuidgen man page
+  * Make sure $prefix/etc is created before installing mke2fs.conf
+  * e2fsck: Allow i_size to be rounded up to the size of a VM page
+  * Fix a bug in ext2fs_initialize() which causes mke2fs to fail while
+       allocating inode tables for some relatively rare odd disk sizes.
+  * Fix big-endian byte-swapping bug in ext2fs_swap_inode_full()
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Wed, 05 Dec 2007 20:04:28 -0500
+
+e2fsprogs (1.40.2-1) unstable; urgency=low
+
+  * New upstream release
+  * e2fsck: Fix salvage_directory when the last entry's rec_len is too big
+  * Update Turkish, Polish, Dutch, and Vietnamese PO files from the
+      Translation Project
+  * Fix a bug which would cause e2fsck segfault on very badly damaged
+      filesystems
+  * Update tune2fs man page to include more discussion of reserved
+      blocks (Addresses Ubuntu Launchpad bug #47817)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Thu, 12 Jul 2007 22:18:51 -0400
+
+e2fsprogs (1.40.1-1) unstable; urgency=low
+
+  * New upstream release
+  * Clarify mk_cmds' error reporting
+  * e2fsck: Detect recursive loops in @-expansions
+  * Compile the default mke2fs.conf into mke2fs program
+  * Fix bogus strip permission errors when building under Debian
+  * Update Vietnamese, French, and Dutch PO files from the Translation Project
+  * Fix bug which could cause libblkid to loop forever (Closes: #432052)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun,  8 Jul 2007 20:25:08 -0400
+
+e2fsprogs (1.40-1) unstable; urgency=low
+
+  * New upstream release
+  * Remove RFC-4122 logic from Debian build rules (Closes: #407107)
+  * Fix com_err.texinfo so that the install-info command will remove
+      the com_err info file from the /usr/share/info/dir file when the
+      comerr-dev package is removed and purged (Closes: #401711)
+  * Fix divide-by-zero error in blkid's NTFS proving logic
+  * Add new blkid -g option which causes the blkid cache to be garbage
+      collected
+  * libblkid: Fix bug which could cuase bid_type to be corrupted
+  * mke2fs: Add santy check to make sure inode_size * num_inodes isn't too big
+  * Fix additional Coverity bugs in mke2fs and e2fsck
+  * Improve sanity check in e2fsck's algorithm for finding a backup superblock
+  * Fix e2fsck get_size logic so that it will work with the Linux floppy
+      driver (Closes: #410569)
+  * Fix error checking of badblock's last-block and start-block arguments
+      (Closes: #416477)
+  * e2fsck: avoid writing overwriting the backup superblocks until the
+      master superblock is confirmed to be sane
+  * Make the blkid library more paranoid about concluding a partition
+      contains a NTFS filesystem.  (Addresses Launchpad Bug: #110138)
+  * Enhance e2fsck so it will recreate the ext3 journal if the original
+      journal inode was cleared to due being corrupt
+  * Fix e2fsck so that if the backup journal information is used, that
+      this is written out to the journal inode
+  * Make e2fsck check all of the blocks in the journal inode for validity
+  * blkid: Add support for detecting LUKS encrypted partitions
+  * e2fsck: added sanity check for xattr validation
+  * Fix byte-swapping bug for filesystems with large inodes
+  * Clarify the copyright licenses used by the various libraries in COPYING
+  * Remove RFC-4122 from upstream (Closes: #407107)
+  * Fix info-dir line which prevented install-info from removing
+      com_err entry from from /usr/share/info/dir when the comerr-dev
+      package is purged (Closes: #401711)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 29 Jun 2007 22:40:27 -0400
+
+e2fsprogs (1.39+1.40-WIP-2007.04.07+dfsg-2) unstable; urgency=low
+
+  * Allow the journal to up to 10,240,000 blocks
+  * Fix blkid library to recognize MD 0.90 superblock on little endian
+      systems
+  * Fix blkid library to report the correct UUID from MD superblocks
+  * Fix signed vs. unsigned problem in debugfs' setb/testb/freeb commands
+  * Enhance debugfs's date parser so it acccepts 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 how e2fsprogs byte swaps inodes containing fast
+      symlinks that have extended attributes.
+  * Fix potential file descriptor leak in ext2fs_get_device_size()
+  * Fix minor typo in e2fsck.conf.5 man page
+  * Cleanup udeb dependency (Closes: #419605)
+  * Rebuilding with libdevmapper 1.02.1 (Closes: #421022 and #421668)
+  * Add dependency on comerr-dev to ss-dev (Closes: #408352)
+  * Make mke2fs use sane defaults when /etc/mke2fs.conf doesn't exist
+  * Fix mke2fs and debugfs to support large (> 16 bit) uid's and gid's
+  * Fix spelling typo in debian package description for libblkid1
+    (Closes: #399155)
+  * Remove -WIP language from the debian copyright file.  (Closes: #415560)
+  * Remove check in e2fsck which required EA's in inodes to be sorted
+    (We should get this back-ported to the stable branch since
+    filesystems with large inodes will have EA's erroneously
+    removed, which will for example toast an SELinux system.)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun,  6 May 2007 19:44:35 -0400
+
+e2fsprogs (1.39+1.40-WIP-2007.04.07+dfsg-1) unstable; urgency=low
+
+  * Add libreadline.so.5 support to libss.
+  * Impove badblocks -n/-w exclusive usage message.
+  * Add debugging code (via the COMERR_DEBUG env. variable) to the
+      com_err library
+  * Fix dump_unused segfault in debugfs when a filesystem is not open
+  * Add versioned dependency in Debian's shlibs for libblkid.
+      (Closes: #413208)
+  * Fix memory leak in blkid library.  (Closes: #413661)
+  * Let the debugfs lcd command work even if a filesystem is not open
+  * Fix large number of miscellaneous Coveriy bugs.  (None were
+      security-security).
+  * 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.
+  * Enhance e2fsck to recover directories whose modes field were
+      corrupted to look like special files.
+  * Allow debugfs to dump > 2GB files.  (Closes: #412614)
+  * Misc. man page cleanups.  (Closes: #379695)
+  * Fix resize2fs parsing of size parameter (Closes: #408298)
+  * Fix infinite loop in e2fsck on really big filesystems (Closes: #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.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat,  7 Apr 2007 10:38:40 -0400
+
+e2fsprogs (1.39+1.40-WIP-2006.11.14+dfsg-1) unstable; urgency=low
+
+  * Fix spurious error from e2fsck -c and mke2fs -c caused by the fix
+    to #386475.
+  * Add dirhash signed/unsigned hint to superblock.  (Closes: #389772)
+  * Allow unix_io offsets greater than 2 gigabytes
+  * Make sure mk_cmds and compile_et work even in strange locales
+  * Fix type-punning bug which caused dumpe2fs to crash on the Arm platform
+    (Closes: #397044)
+  * Add explanatory message to badblocks that -n and -w are mutually
+    exclusive.  (Closes: #371869)
+  * New +dfsg source tarball that has useful documentation REALLY
+    removed to satisfy the DFSG License Nazi's.  (Closes: #390664)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 14 Nov 2006 23:45:34 -0500
+
+e2fsprogs (1.39+1.40-WIP-2006.10.02+dfsg-2) unstable; urgency=low
+
+  * Add failsafes against duplicate UUID generation caused by threads
+  * Fix potential e2fsck -n crash caused by corrupt htrees
+  * Reorder the library line for static linking, to fix undefined
+    references to pthreads on amd64.  (Closes: #393680)
+  * Fix mke2fs's error checking when creating revision 0 filesystems.
+    (Closes: #392107)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 22 Oct 2006 00:19:44 -0400
+
+e2fsprogs (1.39+1.40-WIP-2006.10.02+dfsg-1) unstable; urgency=low
+
+  * New +dfsg source tarball that has useful documentation removed to
+    satisfy the DFSG License Nazi's.  (Closes: #390664)
+  * Remove dependency on e2fsprogs from the e2fsck-static package
+    (Closes: #383521)
+  * Fix badblocks interpretation of its first optional argument (last-block)
+    (Closes: #386475)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue,  3 Oct 2006 23:36:05 -0400
+
+e2fsprogs (1.39+1.40-WIP-2006.10.02-2) unstable; urgency=low
+
+  * Build using the sid version of libc, not experimental!
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon,  2 Oct 2006 21:43:44 -0400
+
+e2fsprogs (1.39+1.40-WIP-2006.10.02-1) unstable; urgency=low
+
+  * Previous NMU acknowledged (Closes: #388718)
+  * Fix debugfs to print unsigned values for EA's
+  * Minor man page fixes (Closes: #373004, #369761)
+  * Allow the default inode size to be specified in mke2fs.conf
+  * Require mke2fs -F -F for really dangerous operations
+  * Add Vietnamese translation
+  * Update French and Dutch translations
+  * Fix debugfs coredump when lsdel is run without an open filesystem
+    (Closes: #378335)
+  * Fix spelling error in e2fsck output
+  * Fix overflow problems when the number of inodes and blocks is
+    close to 2**32-1
+  * Add GFS/GFS2 support to the blkid library.
+  * Fix blkid support of empty FAT filesystem labels
+  * Avoid recursing forever due to symlinks in /dev by the blkid library
+  * Fix bogus error messages from resize2fs caused by the filesystem
+    not containing a resize inode.  (Closes: #380548)
+  * Fixed device-mapper probing (it was failing due to an extra '/dev' being
+    added to the device pathname)
+  * Make sure the default minimum size journal is big enough to support
+    on-line resizing.
+  * Add a versioned build-dep on texi2html (Closes: #389554)
+  * Remove useful UUID specification thanks to License Nazi's (Closes: #390664)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon,  2 Oct 2006 13:04:27 -0400
+
+e2fsprogs (1.39-1.1) unstable; urgency=low
+
+  * Non-maintainer upload
+  * Added -pthreads to devmapper libraries (Closes: #388718)
+
+ -- Ben Hutchings <ben@decadent.org.uk>  Sat, 30 Sep 2006 12:49:47 +0100
+
+e2fsprogs (1.39-1) unstable; urgency=low
+
+  * New upstream version
+  * Fix debugfs's dump_unused command so it will not core dump on
+    filesystems with a 64k blocksize
+  * Clarified and improved man pages, including spelling errors
+    (Closes: #368392, #368393, #368394, #368179)
+  * New filesystems are now created with directory indexing and
+    on-line resizing enabled by default
+  * Fix previously mangled wording in an older Debian changelog entry
+  * Fix doc-base pointer to the top-level html file (Closes: #362544, #362970)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 29 May 2006 11:07:53 -0400
+
+e2fsprogs (1.38+1.39-WIP-2006.04.09-2) unstable; urgency=low
+
+  * Resize2fs automatically detects the previously used RAID stride
+    parameter so that resized filesystems can be more optimally laid
+    out for RAID filesystems.
+  * Fix mke2fs -cc and e2fsck -cc (Closes: #366017)
+  * Fix initrd script to fix failure with 2.4 kernels (Closes: #364516)
+  * Mke2fs now uses an improved layout for RAID filesystems when the
+    stride parameter is specified.
+  * Fix the debugfs commands htree_dump, dx_hash, and list_dir so they
+    print a usage message when an illegal option character is given.
+  * Speed up mke2fs and e2fsck by writing inode and block bitmaps in one pass
+  * Fix filefrag to be 32-bit clean by using unsigned long instead of
+    a signed integer for block numbers.
+  * Fix a bug in the e2p library which could cause dumpe2fs to
+    (rarely) fail to print out the journal or hash seed UUID.
+  * Fix memory leak in e2fsck's error paths.
+  * Fix comerr-dev's doc-base pointer to the top-level html file
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 14 May 2006 18:09:20 -0400
+
+e2fsprogs (1.38+1.39-WIP-2006.04.09-1) unstable; urgency=low
+
+  * Update config.guess and config.sub to latest version (2006-02-23) from FSF
+  * Update French, Dutch, Polish, Swedish, and Turkish translations
+  * Fix asm/types.h type conflicts on AMD64 to fix FTBFS problems.
+      (Closes: #360661, #360317)
+  * Fix bug which caused mke2fs -j to fail with an EBUSY error.  (Closes
+      #360652)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun,  9 Apr 2006 23:04:15 -0400
+
+e2fsprogs (1.38+1.39-WIP-2006.03.29-2) unstable; urgency=low
+
+  * Added missing build dependency on libdevmapper-dev.  (Closes: #360046)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Thu, 30 Mar 2006 12:33:30 -0500
+
+e2fsprogs (1.38+1.39-WIP-2006.03.29-1) unstable; urgency=low
+
+  * Add udeb: lines to the Debian's shlibs files (Closes: #356293)
+  * Enhance dumpe2fs to print the size of the journal
+  * Fix e2sprogs so that it is 32-bit clean on x86 platorms.
+  * Fix mklost+ound so that it creates a full-sized directory on 4k and
+    larger block sizes.
+  * Add mke2fs.conf coniguration file to conigure mke2fs's defaults
+  * Add devmapper support to the blkid library.
+  * E2fsck, resize2fs and mke2fs will now open the filesystem device in
+    exclusive mode
+  * Fix documentation and man pages.  (Closes: #351268, #357951, #347295,
+    #316040)
+  * Cix "mke2fs -O resize_inode" for very large filesystems (Closes: #346580)
+  * Add on-line resizing support into resize2fs
+  * Fix blkid's handling of verification timeouts when the system clock is
+    insane
+  * Fix library Makefiles so they work with GNU make 3.81 as well as GNU
+    make 3.80.
+  * Enhance the blkid library to display the uuid of external journals for
+    ext3 filesystems
+  * Enhance e2fsck so it will fix the external journal hint in the
+    superblock if it is out of date.
+  * Fix debugfs's icheck to correctly report the owner of an EA block
+  * Update Sweedish translation
+  * Add a configuration parameter to e2fsck.conf to control whether or not
+    filesystem checks are done when the system is running on battery power.
+  * Print an explanation when skipping a check due being on battery
+    (Closes: #350306)
+  * Update French translation (Closes: #341911, #300871, #316604, #316782,
+     #330789)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Wed, 29 Mar 2006 20:37:27 -0500
+
+e2fsprogs (1.38+1.39-WIP-2005.12.31-1) unstable; urgency=medium
+
+  * New upstream version
+  * Update profile library code base
+    - Allow tag and section names to have quoted strings
+    - Make the profile library support reading files in a conf.d directory
+    - Slightly change the parser to support comments at the end of all lines
+    - Add syntax error reporting
+    - Simplify profile code
+    - Add E2FSCK_CONFIG environment variable which overrides where to
+      find /etc/e2fsck.conf
+    - Make e2fsck's filesystem problem handing configurable
+    - Fix FTBFS bug if comerr-dev is not installed.  (Closes: #345519)
+  * Update Dutch, Polish, and Swedish translations.  (Closes: #343149)
+  * Fix a fd leak across an exec in libuuid.  (Closes: #345832)
+  * Address override file disparities
+  * Make urgency be medium to accelerate a workaround to Debian's buggy
+    initscripts (See Debian bugs: #343662, #343645)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Fri,  6 Jan 2006 21:41:06 -0500
+
+e2fsprogs (1.38+1.39-WIP-2005.12.10-2) unstable; urgency=low
+
+  * Make resize2fs expand or truncate a file containing a filesystem.
+    (Closes: #271607)
+  * Add support for lib64ext2fs-nopic.a for the mips architecture
+    (Closes: #329074)
+  * Deal with the fact that Debian's boot sequence bogusly doesn't set the
+    time correctly until very late in the boot process; so if the
+    superblock's last mount or write time is in the future, don't treat
+    this as a fatal error.  (Closes: #343662, #343645)
+  * Move the blkid and uuidgen binaries out of libblkid1 and libuuid1 and
+    into the e2fsprogs package to support soname transitions and
+    simulaneous installs of multiarch flavors to coexist.  (It's not worth
+    creating two whole new packages for two separate binaries, so we just
+    fold them into e2fsprogs.)  (Closes: #330737, #330736)
+  * Optionally allow the user to interrupt e2fsck "safely" during a boot
+    sequence without causing the boot scripts to abort.  (Closes: #150295)
+  * Update and clarify man pages (Closes: #312515)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat, 31 Dec 2005 01:05:35 -0500
+
+e2fsprogs (1.38+1.39-WIP-2005.12.10-1) unstable; urgency=low
+
+  * Update and clarify man pages (Closes: #329859, #322188, #316811)
+  * Fix bug creating external journals on big-endian machines.
+  * Detect if the superblock's last mount time or last write time is in
+    the future, and offer to fix it if this is the case (Closes: #327580)
+  * Add new debugfs command, set_current_time which sets the time used to
+    update the filesystems's time fields.
+  * Fix display bug in badblocks -sw when printing the "done" message.
+    (Closes: #322231)
+  * Improve blkid's FAT/VFAT filesystem detection code so that it can find
+    labels stored the root directory and to be more correct/paranoid.
+  * Add support to extract iso9660 label information to the blkid library.
+  * Add support to detect the reiser4 filesystem to the blkid library.
+  * Add support for detecting software suspend partitions to the blkid library.
+  * Fix the blkid library to notice when an ext2 filesystem is upgraded to
+    ext3.
+  * Fix debugfs's set_inode_field so that successfully sets the i_size field
+  * Updated Dutch translation
+  * E2fsck will stop and print a warning if the user tries running a
+    read/write badblocks test on a read-only mounted root filesystem.
+  * Add resize2fs and badblocks to the e2fsprogs udeb
+    (Closes: #290429, #310950)
+  * Avoid trying to mount the root device if it is an NFS device.
+    (Closes: #310428)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat, 10 Dec 2005 22:49:47 -0500
+
+e2fsprogs (1.38-2) unstable; urgency=low
+
+  * Previous NMU acknowledged (Closes: #317862, #320389)
+  * Fix debugfs's set_inode_fields command so it doesn't silently fail
+    when setting certain inode fields.
+  * Fix e2fsck from segfaulting on disconnected inodes that contain one or
+    more extended attributes.  (Closes: #316736, #318463)
+  * Allow mke2fs and tune2fs to take fractional percentages to the -m
+    option in mke2fs and tune2fs.  (Closes: #80205)
+  * Fix a compile_et bug which miscount the number of error messages if
+    continuations are used in the .et file, and fix compatibility problems
+    with MIT Kerberos 1.4
+  * Add extra sanity checks to protect users from unusual cirucmstances
+    where /etc/mtab may not be sane, by checking to see if the device is
+    reported busy (works on Linux 2.6) kernels.  (Closes: #319002)
+  * Fix use-after-free bug in e2fsck when finishing up the use of the
+    e2fsck context structure.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 21 Aug 2005 23:35:29 -0400
+
+e2fsprogs (1.38-1.1) unstable; urgency=low
+
+  * NMU for RC bug durring bug squishing party
+  * Fix for changes to texi2html, patch by Matt Kraai
+    (Closes: #317862, #320389)
+  * version build-depend on texi2html, won't work with older one anymore
+
+ -- Blars Blarson <blarson@blars.org>  Fri,  5 Aug 2005 04:46:54 +0000
+
+e2fsprogs (1.38-1) unstable; urgency=low
+
+  * New upstream version
+  * 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 minor typo's in tune2fs man page.
+  * Mke2fs will refuse to create filesystems greater than 2**31-1 blocks,
+    unless forced, to avoid kernel bugs that still need to be fixed as
+    of this release.
+  * Update French, Dutch, Polish, Swedish, and Turkish translations.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Wed, 30 Jun 2005 20:02:42 -0400
+
+e2fsprogs (1.37+1.38-WIP-0620-1) unstable; urgency=low
+
+  * Update and clarify man pages.
+  * Clarify and clean up e2fsck's problem descriptions
+  * Add Dutch translation, and update French, Polish, Swedish, and
+    Turkish translation.
+  * mke2fs and badblocks will check to see if the device appears to be
+    busy and abort if so; this feature only works on Linux 2.6 systems.
+    (Closes: #308594)
+  * Fix filefrag so that it works on 64-bit platforms where the size of
+    an integer != the size of a long.  (Closes: #309655)
+  * Change the default journal size to be bigger for larger filesystems,
+    given modern memory sizes.
+  * Fix com_err library so it is compatible with MIT krb5 1.4.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 20 Jun 2005 17:11:29 -0400
+
+e2fsprogs (1.37+1.38-WIP-0509-1) unstable; urgency=low
+
+  * Make the blkid library much more efficient when a new device is added
+    on systems with a huge number of disks.
+  * Fix handling of the PAGER and SS_READLINE_PATH environment variables
+    in the ss library, and the TEST_IO_* environemnt vaiables for the
+    test_io io_manager, which was accidentally broken in 1.37-1.
+  * Fix libblkid's recognition of cramfs filesystems, and add support for
+    cramfs labels.
+  * Fix filefrag to give correct results when the first block found is an
+    indirect block.  (Closes: #307607)
+  * Fix debugfs seg fault when the stat command is given and a filesystem
+    is not open.
+  * Improve environment variable paranoia checks.
+  * Fix e2fsck's handling of multiply claimed blocks involving the resize
+    inode.
+  * When determining the libraries needed for the initrd, unset LD_PRELOAD
+    and LD_LIBRARY_PATH and filter out libraries found in
+    /etc/ld.so.preload.  (Closes: #304003)
+  * Update Swedish translation, and added translation for Rwanda.
+  * Minor man page spelling/typo fixes.  (Closes: #304591, #304592,
+    #304594, #304597, #304593)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon,  9 May 2005 09:10:20 -0400
+
+e2fsprogs (1.37-2) unstable; urgency=low
+
+  * Fix filefrag so that it works non ext2/3 filesystems again.
+    (Closes: #303509)
+  * Make sure we include stdlib.h to fix a core dump bug in mke2fs on the
+    IA64 architecture (or other platforms where sizeof(ptr) > sizeof(int))
+    (Closes: #302200)
+  * Add missing return values so that we don't return garbage in certain
+    error cases in ext2fs_write_new_inode() and ext2fs_read_int_block().
+  * Fix minor spelling typo in the mke2fs man page
+  * Avoid doing the LOW_DTIME checks if the superblock last mount time
+    indicates that the system clock may not be set correctly.
+  * Add further paranoia checks to the blkid, ext2fs, and ss libraries to
+    make them safe to call from setuid or setgid applications.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat,  9 Apr 2005 11:08:04 -0400
+
+e2fsprogs (1.37-1) unstable; urgency=low
+
+  * New upstream release.
+  * 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.
+  * Fixed a bug in filefrag which caused it to falsely report a
+    discontinuity when there are one or more unallocated blocks at the
+    beginning of a file.
+  * Fix the missing translations (caused by a bug in the gen-tarball
+    script).  (Closes: #296769)
+  * Add support in e2fsck and debugfs for extended attributes in inodes.
+  * Fix the missing translations (caused by a bug in the gen-tarball script).
+    (Closes: #296769)
+  * Force compile_et and mk_cmds to use /usr/bin/awk so that we will work
+    on any Debian system regardless of which version of awk is installed.
+    (Closes: #299341)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Thu, 21 Mar 2005 22:31:08 -0500
+
+e2fsprogs (1.36release-1) unstable; urgency=low
+
+  * New upstream release.
+  * Make filefrag print the first and last blocks when in verbose mode.
+  * Drop sparc assembly bitops; it's less efficient than gcc 3.4's
+    generated code, and it triggers compiler warnings on sparc 64.
+    (Closes: #232326)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Fri,  4 Feb 2005 20:58:35 -0500
+
+e2fsprogs (1.36rc5-1) unstable; urgency=low
+
+  * Make blkid -t work more consistently even when the cache file is not
+    available or set to /dev/null.  (Closes: #292425)
+  * Don't ever use a blocksize greater than 4k, since not all 2.6 kernels
+    will support this.
+  * Fix bug where mke2fs would not correctly create filesystems greater
+    than 4TB.
+  * Fix e2fsck so it won't delete symlinks that contain an extended
+    attribute after the ext_attr feature flag has been cleared.
+  * Fix e2fsck's resize inode handling in some additional corner cases.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Thu, 27 Jan 2005 22:44:31 -0500
+
+e2fsprogs (1.36rc4-1) unstable; urgency=low
+
+  * Fix a bug in resize2fs where we don't release the blocks belonging to
+    the old inode table blocks when we move the inode table.
+    (Closes: #290894)
+  * Make sure that we don't write garbage when writing a large inode.
+  * Check NTFS ahead of other filesystems since Windows doesn't always
+    clearing enough of the partition to avoid false positives with older
+    filesystems.  (Closes: #291990)
+  * E2fsck now checks the summary filesystem accounting information, and
+    if any of the information is obviously wrong, it will force a full
+    filesystem check.  (Closes: #291571)
+  * Clarified and updated tune2fs and blkid man pages
+  * 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 blkid -t to display all devices that match the specified criteria,
+    not just the first one.  (Closes: #290530)
+  * Add support for the blkid library to recognize Oracle ASM volumes.
+  * Add set_super_value jnl_blocks[] in debugfs.
+  * Fix the filefrag program so that it works correctly with sparse files.
+  * Fix portability problems with FreeBSD, Solaris, and Intel C++ 8.1.
+  * Add support for FreeBSD and Lites as OS Creator values.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Wed, 26 Jan 2005 10:22:02 -0500
+
+e2fsprogs (1.36rc3-2) unstable; urgency=low
+
+  * Remove debugging printf's from e2image's -s code.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Wed, 19 Jan 2005 02:25:53 -0500
+
+e2fsprogs (1.36rc3-1) unstable; urgency=low
+
+  * New upstream release
+  * Update Italian, French, and Turkish translations
+  * Fixed file descriptor leak in the filefrag program
+  * Add -s option to e2image which scrambles directory entries when making
+        raw image files
+  * Make sure e2fsck doesn't crash if /proc/acpi/ac_adapter does not
+        exist
+  * Added Solaris, FreeBSD portability fixes
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Wed, 19 Jan 2005 00:33:31 -0500
+
+e2fsprogs (1.36rc2-1) unstable; urgency=low
+
+  * New upstream release
+  * Update Italian translation
+  * Add support for swap partition labels and uuid's
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 11 Jan 2005 14:12:17 -0500
+
+e2fsprogs (1.36rc1-1) unstable; urgency=low
+
+  * Fix a FTBFS bug for amd64/gcc-3.0 (Closes: #289133)
+  * Minor man page clarifications.  (Closes: #273679)
+  * Add support for online resizing via the resize inode.
+  * Badblocks will now correctly display block numbers greater than
+        999,999,999 in its progress display.
+  * tune2fs 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 blocks 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.  (Closes: #287455)
+  * The fsck program will now accept an optional filedescriptor argument
+        to the -C option.
+  * 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 or gigabytes (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 conherency 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 newsly 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 will now accept blocksizes up to 65536; kernel support on
+        the x86 doesn't exist, but it is useful on other architectures.
+  * 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
+  * Updated Italian translation file
+  * E2fsck will now recover from a journal containing illegal blocks.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Fri,  7 Jan 2005 20:22:36 -0500
+
+e2fsprogs (1.35-9) unstable; urgency=low
+
+  * Minor man page clarifications.  (Closes: #273679)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 28 Sep 2004 10:29:29 -0400
+
+e2fsprogs (1.35-8) unstable; urgency=low
+
+  * Remove double "//" when listing attributes in the root directory or
+       when there is a trailing '/' in the directory name.  (Closes: #272943)
+  * Make sure the configure files are newer than configure.in the
+       debian/rules file so that a dpkg-source created patch won't
+       trigger an attempt rebuild of the configure script.
+       (Closes: #272558, #273242)
+  * Make sure /usr/lib/e2initrd_helper is in the e2fsprogs package.
+       (Closes: #272698, #272728, #273161, #273163)
+  * Only use blocksizes > 4k on Linux 2.6 and newer systems.  (Closes: #271064)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat, 25 Sep 2004 07:37:52 -0400
+
+e2fsprogs (1.35-7) unstable; urgency=low
+
+  * Make sure "done" gets correctly translated in badblocks(8), and update
+      French translation (Closes: #252836)
+  * Always build the fsck wrapper on Debian systems (Closes: #248050)
+  * Filter out linux-gate.so, which is a pseudo entry for the 32->64bit
+      translation for amd64 systems, in the initrd creation script.
+      (Closes: #253595)
+  * Change the initrd scripts to be use a helper program which avoids
+       needing to mount the root filesystem and use awk to query the
+       /etc/fstab file.  (Closes: #247775)
+  * Add support for the ocfs2 filesystem to the blkid library.
+  * Various portability fixes for Hurd and FreeBsd, as well as
+        removing XSI:isms.  (Closes: #256669, #264630, #269044, #255589)
+  * Update config.guess and config.sub from the FSF.
+  * Minor manual page clarifications (Closes: #268148)
+  * Fix write ordering problems to make e2fsck more robust in the face
+       of system crashes while replaying the journal, etc.
+  * Fix debugging printf in resize2fs.  (Closes: #271605)
+  * 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.
+  * Change e2fsck to accept directories greater than 32MB.
+  * Add test_io mechanisms to abort after reading or writing to a
+       particular block.
+  * Fix blkid file descriptor and memory leak.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat, 18 Sep 2004 09:58:46 -0400
+
+e2fsprogs (1.35-6) unstable; urgency=low
+
+  * In the mkinitrd script, make sure the directories exist before
+    trying to copy in the needed shared libraries.  (Closes: #244058, #246480)
+  * In the mkinitrd script, use LD_ASSUME_KERNEL=2.4 if necessary.
+    (Closes: #245931)
+  * In the mkinitrd script copy in /usr/bin/awk instead of /usr/bin/mawk.
+    (Closes: #245670)
+  * In the initrd script, fail quietly if /mnt/etc/fstab does not exist.
+    (Closes: #246917)
+  * Minor updates to German translation (Closes: #244105)
+  * Since woody's sysvinit package is before the initscripts were broken out
+    we need an explict Conflict: sysvinit (<< 2.85-4) header. (Closes: #243829)
+  * Update the UUID library man pages
+  * Fix a Y8.8888K potential problem with the uuid library
+  * Minor updates to the german translation
+  * Clarified/corrected the copyright statements of the UUID and blkid
+    libraries in the Debian copyright files.
+  * Added sanity check to the blkid library so that if current time is
+    less than last time a device is verified, force a reverification since
+    it means the system time is not trustworthy.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue,  4 May 2004 16:23:06 -0400
+
+e2fsprogs (1.35-5) unstable; urgency=low
+
+  * Add uuid_unparse_upper() and uuid_unparse_lower() functions to the
+    uuid library.
+  * Address GNU/KFreeBSD portability issues (Closes: #239934)
+  * Use unsigned for 1 bit wide bitfields in header files to avoid
+    Intel C++ compiler warnings.
+  * Use C99 stdint.h types in the uuid library
+  * Fix up and cleanup uuid man pages
+  * Change the licensing of the uuid man pages to be 3-clause BSD.
+  * Fix the initrd scripts so that the automatic ext3 journal
+    conversion actually works correctly; also allow conversion of the root
+    filesystem from ext3 back to ext2  (Closes: #241183)
+  * Minor man page fixes (Closes: #241940, 242995)
+  * Use the DEBUGFS_PAGER environment variable in preference to PAGER
+    (Closes: #239547)
+  * Added French translation
+  * Be flexible about the name of the ACPI device that cooresponds to
+    the AC adapter (Closes: #242136)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 12 Apr 2004 12:38:34 -0400
+
+e2fsprogs (1.35-4) unstable; urgency=low
+
+  * Fix bug in the blkid library (introduced in 1.35-3) which caused
+    the probe function to completely malfunction.  (Closes: #239191)
+  * Make the debugfs command's link command set the filetype information
+    correctly.
+  * Update the Polish, Swedish, and Turkish translations
+  * Add an -o option to the blkid program which allows the user to
+    control the output format of blkid.
+  * Fixed and cleaned up the tune2fs and blkid man pages (Closes: #238741)
+  * Improve UUID generation algorithm (use all 14 bits in the clock sequence)
+  * Change the license on the UUID library to be 3-clause BSD.
+  * Remove the only-partially-implemented -p option to blkid.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 21 Mar 2004 20:17:03 -0500
+
+e2fsprogs (1.35-3) unstable; urgency=low
+
+  * Mention e2image's limitation in writing a normal image file to
+    stdout (Closes: #236383)
+  * Only use BLKGETSIZE64 on Linux 2.6 since it is unreliable on Linux 2.4.
+    (Closes: #236528)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon,  8 Mar 2004 14:19:15 -0500
+
+e2fsprogs (1.35-2) unstable; urgency=low
+
+  * Use 64-bit ioctl's if present to determine the 64-bit size of a device
+  * Add tune2fs to the e2fsprogs udeb package (Closes: #235639)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue,  2 Mar 2004 10:13:39 -0500
+
+e2fsprogs (1.35-1) unstable; urgency=low
+
+  * New upstream version.
+  * Fix "badblocks -t random". (Closes: #234828)
+  * Fix "e2fsck -k".  (Closes: #234993)
+  * Change badblock's default number of blocks tested at once from
+    16 to 64.  (Closes: #232240)
+  * ss-dev and comerr-dev now use a versioned dependency for libss2 and
+    libcomerr2, respectively.  (Closes: #235280)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat, 28 Feb 2004 10:14:19 -0500
+
+e2fsprogs (1.34+1.35-WIP-2004.01.31-2) unstable; urgency=low
+
+  * Add a new -k option to e2fsck which keeps the existing badblocks
+    list when using the -c option.  (Closes: #229103)
+  * Update debugfs to support new large major/minor device numbers
+    supported by Linux 2.6.  (Closes: #865289)
+  * Fix makefiles so that it will build correctly with --enable-profile.
+  * Add -mieee when compiling with GCC on an Alpha.
+  * Fix e2fsck preen mode messages using pass 1B/C/D.
+  * Fix the debugfs man page.  (Closes: #232406)
+  * Fix the ext2fs.h header file to work correctly with C++.
+  * e2fsck and debugfs now correctly deals with symlinks that have
+    extended attribute information, such as those created by SE Linux.
+    (Closes: #232328)
+  * Make sure filefrag actually gets compiled under Linux (Closes: #230992)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 24 Feb 2004 00:16:43 -0500
+
+e2fsprogs (1.34+1.35-WIP-2004.01.31-1) unstable; urgency=medium
+
+  * 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.  (Closes: #228723)
+  * Chattr now stops processing options when it sees '--'.  (Closes: #225188)
+  * Add FreeBSD port fixups
+  * Use the DEBUGFS_PAGER environment variable in preference to PAGER.
+    Document that less is a really, really, really bad pager to use
+    for debugfs (unfortunately, Debian policy says we must use
+    /usr/bin/pager even if it results in very annoying behaviour for
+    the user since 'less' is used in preference to 'more' unless it is
+    globally overriden via update-alternatives(8).  Oh, well.  Debian
+    users are encouraged to set DEBUGFS_PAGER to be "more" in their
+    dot files to avoid this brain damage).
+  * Fix libuuid1-udeb so that it provides libuuid1.  (Closes: #229633)
+  * 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.
+  * Install the filefrag program.
+  * Don't try to compile filefrag on non-Linux platforms. (Closes: #226456)
+  * Minor manual page clarifications (Closes: #222606, #214920)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat, 31 Jan 2004 20:57:35 -0500
+
+e2fsprogs (1.34+1.35-WIP-2003.12.07-2) unstable; urgency=low
+
+  * Fix test for /etc/mkinitrd/scripts/e2fsprogs to make sure it gets
+    removed.  (Closes: #213275)
+  * Debugfs now searches for the appropriate pager to use, beginning
+    with /usr/bin/pager, and then falling back to 'less' and 'more'.
+    (Closes: #221977)
+  * Fixed mangled encoding in Czech locale file.  (Closes: #214633)
+  * Fix bug where using debugfs to copy a file from /dev/null caused
+    in correct mode bits.  (Closes: #217456)
+  * Fixed a bug where e2fsck would bomb out if a journal needed to be
+    replayed when using an alternate superblock.
+  * Minor manual page fixups/cleanups.
+  * Debugfs's mkdir command will automatically expand the directory if
+    necessary.  (Closes: #217892)
+  * Fix a bug in e2fsck which caused it to incorrectly fix a filesystem
+    when reconnecting a directory requires creating a lost+found
+    directory.  (Closes: #219640)
+  * Add Spanish translation.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Wed, 24 Dec 2003 14:24:14 -0500
+
+e2fsprogs (1.34+1.35-WIP-2003.12.07-1) unstable; urgency=medium
+
+  * Added regression tests for mke2fs and dumpe2fs.
+  * Support 2.6 kernel header files.  (Closes: #221778)
+  * Fix bug which could a core dump if a non-existent LABEL or UUID
+    specifier is passed to e2fsck or tune2fs.
+  * Fix handling of corrupted indirect blocks in the bad block inode.
+  * If the number of mounts until the next forced filesystem check is less
+    than 6, mention this to the user.  (Closes: #157194)
+  * E2fsck will try to avoid doing a forced filesystem chcek if a system
+    is running on batteries according to APM or ACPI.  (Closes: #205177)
+  * Fix problems in the German translation.  (Closes: #2000086)
+  * Updated Swedish translation and added Polish translation.
+  * Fix signed vs unsigned bug which could cause the com_right function to
+    seg fault.  (Closes: #213450)
+  * Add libuuid1-udeb (Closes: #221777)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat, 22 Nov 2003 11:51:13 -0500
+
+e2fsprogs (1.34+1.35-WIP-2003.08.21-3) unstable; urgency=low
+
+  * Adjust the man page descriptions so that "apropos ext2" or
+    "apropos ext3" will find all of the e2fsprogs man pages.
+    (Closes: #206845)
+  * Protect against a potential core dump in e2fsck when printing a
+    message about a backup superblock.
+  * Fix a bug in mke2fs which caused -T largefile or -T largefile4 to
+    core dump due to a division by zero error.  (Closes: #207082)
+  * Force e2fsprogs to use the matched version of e2fslibs.  (Closes: #208103)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 31 Aug 2003 21:49:52 -0400
+
+e2fsprogs (1.34+1.35-WIP-2003.08.21-2) unstable; urgency=low
+
+  * When moving the journal or backing up the journal inode
+    information, make sure e2fsck updates all the superblocks, and not
+    just the master superblock.
+  * Change the priority of libblkid1-udeb to be required instead of
+    standard, to match the override file.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Thu, 21 Aug 2003 08:50:34 -0400
+
+e2fsprogs (1.34+1.35-WIP-2003.08.21-1) unstable; urgency=low
+
+  * Fix compile_et to output the correct prototype for
+    initialize_xxx_err_table_r() in the header file.  (Closes: #204332)
+  * E2fsck will avoid printing ^A and ^B characters bracketing the
+    progress bar when stdout is a tty device.  (Closes: #204137)
+  * Add support for storing the journal inode location in the superblock
+    so that e2fsck can recover from a corrupted inode table after a power
+    failure.
+  * Move the initrd script from /etc/mkinitrd/scripts to
+    /usr/share/initrd-tools/scripts so that mkinitrd will not remove
+    the file when it is uninstalled.  (Closes: #204019)
+  * Remove unneeded files in debian directory: blkid-dev.substvars and
+    e2fsprogs-bf.lintian-overrides.  (Closes: #203914)
+  * Support "noopt" in DEB_BUILD_OPTIONS instead of "debug".
+    (Closes: #203914)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Thu, 21 Aug 2003 01:47:58 -0400
+
+e2fsprogs (1.34+1.35-WIP-2003.08.01-1) unstable; urgency=low
+
+  * Fix O_DIRECT test to prevent badblocks from screwing up after
+    finding a bad block.  (Closes: #203713)
+  * Add Heimdal compile_et extensions from Philipp Thomas (pthomas@suse.de)
+  * Fix potential pointer aliasing bugs caused by type-punning and gcc 3.x
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Fri,  1 Aug 2003 13:44:58 -0400
+
+e2fsprogs (1.34-2) unstable; urgency=low
+
+  * Fix erroneous reference to /usr/share/doc/e2fsprogs/html-info in
+    /usr/share/doc-base/libext2fs (Closes: #203157)
+  * Explicitly specify the version of libblkid1 needed in
+    e2fsprogs.shlibs.local in order to avoid picking up the wrong depedency.
+    (Closes: #203157)
+  * Changed priority of libblkid1-udeb to be standard, not required.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Wed, 30 Jul 2003 19:47:32 -0400
+
+e2fsprogs (1.34-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * don't call ldconfig in udebs.
+  * fix dependencies of e2fsprogs-udeb.
+
+ -- Bastian Blank <waldi@debian.org>  Tue, 29 Jul 2003 12:11:54 +0200
+
+e2fsprogs (1.34-1) unstable; urgency=low
+
+  * New upstream version.
+  * Fixed bug in fsck which caused it to waste CPU by spinning while
+    waiting for a child fsck process under some circumstances.
+  * Fixed bug in blkid library which would cause it to spin forever if
+    /proc is not mounted and /etc/blkid.tab is not present.
+  * Improved the blkid library's UDF's probing functions.
+  * Fixed the blkid library so it will remove delete the LABEL
+    attribute from its cache when a filesystem that previously had a
+    label no longer has one.
+  * Added Swedish translation.
+  * Remove debugging printf in badblocks program (Closes: #201499)
+  * Split shared libraries out of the e2fsprogs package into separate
+    packages: libss2, libcomerr2, libuuid1, and e2fslibs.  (Closes: #201155,
+    #201164)
+  * Warn the user when creating a filesystem with a journal and a blocksize
+    greater than 4096, since some kernels don't support ext3 with large
+    block sizes.  (Closes:  #193773)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat, 26 Jul 2003 01:01:55 -0400
+
+e2fsprogs (1.33+1.34-WIP-2003.05.21-2) unstable; urgency=low
+
+  * Set up FreeBSD configuration defaults (Closes: #195274)
+  * Clarify resize2fs man page (Closes: #195616)
+  * Fix resize2fs to deal with filesystem with bad blocks
+  * Fix spelling error in e2fsck
+  * Add workaround for intl library on Darwin
+  * Fix gcc -Wall nitpicks
+  * Round down the default size of the filesystem for mke2fs and
+    resize2fs to be a multiple of the pagesize to work around a potential
+    Linux kernel bug
+  * Fix bug in mke2fs where it could die with a floating exception if
+    the device does not support the BLKSSZGET ioctl (Closes: #196734)
+  * Add conflicts against older versions of sysvinit that don't correctly
+    handle an exit code that has the bit #2 set.  (Closes: #183675)
+  * Badblocks will attempt to use O_DIRECT if it is safe to do so.
+    (Closes: #198006)
+  * Use symbolic links for fsck.ext{2,3} and mkfs.ext{2,3} in the udeb
+    package since busybox tar can't deal with hard links.  (Closes: #196508)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat, 12 Jul 2003 03:16:08 -0400
+
+e2fsprogs (1.33+1.34-WIP-2003.05.21-1) unstable; urgency=low
+
+  * Fix problems with compiling e2fsprogs with NLS support on woody
+    (Closes: #193372)
+  * Remove the extraneous de-utf.po file.
+  * Add get-text to build-depends.
+  * Use ngettext (abbreviated with P_()) to simplify the statistics reporting.
+  * Fix badblocks to be able to support arbitrary 4 byte test patterns.
+  * Fix bug which caused us to accidentally include the EVMS plugin in
+    the e2fsprogs package (which doesn't work, but causes confusing messages
+    to show up when the evms client is started).
+  * If the hardware sector size of a device is larger than the default
+    blocksize, use the hardware sector size as the blocksize when creating
+    a filesystem, to solve problems with s/390 DASD's.
+  * Add a shared library dependency to libuuid to libblkid (Closes: #194094)
+  * Add initial implementation of a dump_unused command (Closes: #79164)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 18 May 2003 01:24:16 -0400
+
+e2fsprogs (1.33-5) unstable; urgency=low
+
+  * Clarify blocksize units when displaying messages in resize2fs, and
+    support using suffixes (sectors, kilobytes, megabites, gigabytes)
+    to the size parameter to indicate units.  (Closes: #189814)
+  * Fix debugfs core-dumping problem caused by getopt.  (Works around: #192834)
+  * Add package dependency to shlibs for comerr to indicate support
+    for kth compatibility.  (Closes: #193096)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue, 13 May 2003 23:45:08 -0400
+
+e2fsprogs (1.33-4) unstable; urgency=low
+
+  * Add replaces field to comerr-dev to resolve a file conflict with
+    /usr/include/com_err.h and the libkrb5-dev package.  (Closes: #192277)
+  * Add -t option to badblocks to control the test pattern used.
+  * Remove e2fsprogs-bf package, as it is obsolete. (Closes: #183453)
+  * Remove NLS support from e2fsprogs-udeb.  Save 5.5k on the boot
+    floppies / install media.
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Thu,  8 May 2003 10:25:05 -0400
+
+e2fsprogs (1.33-3) unstable; urgency=low
+
+  * Add full Heimdall/Kerberos4-kth compatibility to com_err routines.
+  * Declare comerr-dev as replacing << e2fslibs-dev 1.33-2, to avoid
+    errors when upgrading to the new versions of comerr-dev and
+    e2fslibs-dev
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Tue,  6 May 2003 00:29:47 -0400
+
+e2fsprogs (1.33-2) unstable; urgency=low
+
+  * Fix up NLS support
+     - Fix message abbreviations support (i.e., @g --> group)
+     - Update to gettext 0.11.5
+     - Add Czech translation
+     - Install message catalogs
+     - Other miscellaneous NLS bug fixes
+  * Add new debugfs command, imap, which prints the location of a
+    specified inode in the inode table.
+  * Put /usr/include/com_err.h in comerr-dev instead of e2fslibs-dev.
+    (Closes: #191899)
+  * Add support for OV-style continuations in compile_et.  (Closes: #191900)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon,  5 May 2003 18:13:12 -0400
+
+e2fsprogs (1.33-1) unstable; urgency=low
+
+  * New upstream version (Closes: #189687)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 21 Apr 2003 13:49:52 -0400
+
+e2fsprogs (1.32+1.33-WIP-2003.04.14-1) unstable; urgency=low
+
+  * New upstream version
+     - Add new utility program, logsave, to capture the output of fsck
+       during the boot sequence
+  * Add support for the -a and -s options to logsave.
+  * Change e2fsck to bracket its progress bar output with ctrl-A and ctrl-B
+    characters, so that logsave -s can omit writing the progress bar output
+    to the log file.
+  * Avoid printing the version banner for mke2fs if the -q option is
+    specified.  (Closes: #172716)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Wed, 16 Apr 2003 15:27:20 -0400
+
+e2fsprogs (1.32+1.33-WIP-2003.03.30-3) unstable; urgency=low
+
+  * Provide /usr/include/com_err.h, which was previously provided by the
+    libkrb5-dev package
+  * Change the sectoin of com_err-dev, ss-dev, uuid-dev, libblkid-dev,
+    e2fslibs-dev to libdevel
+  * Add libblkid1-udeb package for the Debian Installer.
+  * Use the SS_READLINE_PATH environment variable to control the search
+    for a suitable readine library.
+  * Fix bug in mke2fs, which was was incorrectly checking the argument
+    to the -g option if the default block size is used.  (Closes: #188319)
+  * Update man pages.  (Closes: #188318)
+  * Mke2fs can be given a minimum block size by passing in a negative
+    number to the -b option.
+  * Update to standards 3.5.9
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat, 12 Apr 2003 02:52:17 -0400
+
+e2fsprogs (1.32+1.33-WIP-2003.03.30-2) unstable; urgency=low
+
+  * Fix XFS superblock definition.  Add support to extract UUID and
+    labels for JFS and ROMFS.
+  * Make the random number generator more paranoid about potentially buggy
+    /dev/random devices.
+  * The badblocks program now flushes its output as it discovers bad blocks.
+  * Imported bug fixes to EVMS driver from the EVMS 2.0 tree.  Fixed a
+    few potential hangs, and eliminated a file descriptor leak.
+  * E2fsck now updates the global free block and inode counters from
+    the block group specific counters quietly.  This is needed for an
+    experimental kernel patch which improves SMP scalability by not
+    locking the entire filesystem during block or inode allocation; if
+    the filesystem is not unmoutned cleanly, the global counts may not
+    be accurate.
+  * Fix a bug in fsck which can cause it to hang trying to access the
+    floppy disk if there the floppy drive has filesystem type of
+    'auto'.  (Closes: #187812)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun,  6 Apr 2003 23:13:50 -0400
+
+e2fsprogs (1.32+1.33-WIP-2003.03.30-1) unstable; urgency=low
+
+  * Change compile_et to generate header files that use <et/com_err.h>
+    instead of <com_err.h>, so the current version of the header file
+    is used.  Remove legacy K&R, varargs, and pre-POSIX signal support.
+  * Fix (one more time!) Apple Darwin port in blkid/getsize.c
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 30 Mar 2003 23:34:55 -0500
+
+e2fsprogs (1.32+1.33-WIP-2003.03.25-1) unstable; urgency=low
+
+  * New maintainer
+  * New upstream release (Closes: #176814, #174766, #166048, #179671,
+    #173612, #175233, #175113, #170497, #185945)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 16 Mar 2003 18:05:08 -0500
+
+e2fsprogs (1.32-2) unstable; urgency=high
+
+  * Applied upstream patch to fix htree problems, and to deactivate it by
+    default in mke2fs (Closes: #181615, #179043)
+  * Be sure removal of libe2fsim doesn't fail, as it's not built on hurd
+    (Closes: #164117).
+
+ -- Yann Dirson <dirson@debian.org>  Fri, 21 Feb 2003 00:21:44 +0100
+
+e2fsprogs (1.32-1) unstable; urgency=low
+
+  * New upstream release (Closes: #167108).
+
+ -- Yann Dirson <dirson@debian.org>  Tue, 19 Nov 2002 00:18:09 +0100
+
+e2fsprogs (1.29+1.30-WIP-0930-2) unstable; urgency=low
+
+  * Made mkinitrd script to skip commented-out lines (Closes: #163251).
+
+ -- Yann Dirson <dirson@debian.org>  Tue, 15 Oct 2002 00:16:08 +0200
+
+e2fsprogs (1.29+1.30-WIP-0930-1) unstable; urgency=low
+
+  * New upstream prerelease.
+  * Replaced in mkinitrd script "tune2fs -j" with "tune2fs -O
+    has_journal", as suggested by Theodore Ts'o (Closes: #162949).
+  * Remove --disable-debugfs from mips-nopic flags (Closes: #162674).
+
+ -- Yann Dirson <dirson@debian.org>  Thu,  3 Oct 2002 00:05:36 +0200
+
+e2fsprogs (1.29-1) unstable; urgency=low
+
+  * New upstream release (Closes: #159423).
+  * Fixed typo in chattr manpage (Philipp Matthias Hahn, Closes:
+    #162297).
+  * Generate udeb package for debian-installer (Martin Sjoegren, Closes:
+    #162212).
+  * Fixed installation of mkinitrd script (don't use dh_install).  Remove
+    it from the wrong location where it was, in preinst.  Hopefully noone
+    noticed.
+  * Also have old scripts/e2fsprogs.mkinitrd removed.
+  * Bumped Standards-Version to 3.5.6, no change.  3.5.7 will need a bit
+    of work but not tonight.
+
+ -- Yann Dirson <dirson@debian.org>  Thu, 26 Sep 2002 01:46:25 +0200
+
+e2fsprogs (1.28-5) unstable; urgency=low
+
+  * The "this time it will work ! (famous last words)" release.
+  * Now that it builds, ensure the dir in which we install this damn mips
+    non-pic lib exists.
+
+ -- Yann Dirson <dirson@debian.org>  Tue, 17 Sep 2002 00:04:49 +0200
+
+e2fsprogs (1.28-4) unstable; urgency=low
+
+  * Moved setting of CFLAGS to the correct place when building the special
+    mips non-pic lib (Closes: #159757 again).
+
+ -- Yann Dirson <dirson@debian.org>  Sun, 15 Sep 2002 21:19:19 +0200
+
+e2fsprogs (1.28-3) unstable; urgency=low
+
+  * Don't use special cflags at configure time when building the special
+    mips non-pic lib, in yet another attempt to fix my adaptation of the
+    patch from the mips team.  Also added --disable-nls which was present
+    in the original patch.
+  * Remove debian/BUILD-MIPS on clean.
+  * Install mkinitrd script as scripts/e2fsprogs, not as
+    scripts/e2fsprogs.mkinitrd.
+
+ -- Yann Dirson <dirson@debian.org>  Mon,  9 Sep 2002 23:01:31 +0200
+
+e2fsprogs (1.28-2) unstable; urgency=low
+
+  * Fixed my adapation of the mips non-pic build (Closes: #159757).
+
+ -- Yann Dirson <dirson@debian.org>  Fri,  6 Sep 2002 00:03:45 +0200
+
+e2fsprogs (1.28-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Yann Dirson <dirson@debian.org>  Mon,  2 Sep 2002 23:34:55 +0200
+
+e2fsprogs (1.27+1.28-WIP-0817-1) unstable; urgency=low
+
+  * New upstream pre-release.  Closes: #138003, #144621, #145044, #151990,
+    #152029, #152891, #155007, #131350, #147256, #153102.
+  * New binary: findfs.
+  * Added execute permissions to the mkinitrd script (thanks lintian).
+  * Don't ship FSIM for EVMS for now.
+
+ -- Yann Dirson <dirson@debian.org>  Sun, 25 Aug 2002 19:32:12 +0200
+
+e2fsprogs (1.27+1.28-WIP-0626-2) experimental; urgency=low
+
+  * Remove bogus shlibs deps on "e2fsprogs (>= <current>)"
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Sat, 17 Aug 2002 17:59:17 -0400
+
+e2fsprogs (1.27+1.28-WIP-0626-1) experimental; urgency=low
+
+  * New upstream pre-release:
+  ** Supports v2 ACL format (Closes: #138160).
+  * Removed explicit --mandir flag, as it now uses FHS man location by
+    default.
+  * Added mkinitrd script, "upstream-contributed" ;) by Ted Ts'o (Closes:
+    #148064).
+  * Build a no-pic version of libext2fs.a on mips and mipsel, patch by
+    Florian Lohoff, adapted for style consistency (Closes: #145432).
+  * Removed presumably-useless and presumably-broken CFLAGS propagation.
+    If someone misses that, I'll add ${CFLAGS} to --ccopts.
+
+  * Switched to debhelper v4.
+  * Added ${misc:Depends} to all packages' Depends field.
+
+  * Fixed typos in fsck.8, added an example for clarity (Closes:
+    #145044).
+  * Fixed typo in chattr manpage (Closes: #141938).
+  * Fixed typo in tune2fs manpage (Closes: #148514).
+
+ -- Yann Dirson <dirson@debian.org>  Tue, 23 Jul 2002 00:12:33 +0200
+
+e2fsprogs (1.27-2) unstable; urgency=medium
+
+  * Urgency medium since this fixes a RC bug.
+  * Generate the shlibs file instead of just copying it in place, and make
+    it produce deps on "e2fsprogs (>= <current>)" as well, to cope with
+    new functions introduced in the libs (Closes: #139274).
+  * Added a note on this in README.Debian.
+
+ -- Yann Dirson <dirson@debian.org>  Thu, 21 Mar 2002 23:58:48 +0100
+
+e2fsprogs (1.27-1) unstable; urgency=low
+
+  * New upstream release (Closes: #136737).
+  * No more use for dh_link'ing *.ext[23], it's now done by upstream
+    Makefiles.
+  * Only include (new) inode_io.o from libext2fs when fileio.o is, or the
+    BF build fails because of this additional (unused) member (upstream
+    hint).
+
+ -- Yann Dirson <dirson@debian.org>  Mon, 11 Mar 2002 00:17:32 +0100
+
+e2fsprogs (1.26-3) unstable; urgency=low
+
+  * Simple rebuild after fixing the settings of my computer's clock, so
+    that katie accepts to install the package.
+
+ -- Yann Dirson <dirson@debian.org>  Sat, 23 Feb 2002 14:53:15 +0100
+
+e2fsprogs (1.26-2) unstable; urgency=low
+
+  * Applied upstream patch dealing with the rlimit filesize variation
+    among archs and kernel versions (Closes: #133909).
+  * Create fsck.ext3.8 symlink (Closes: #121526).
+
+ -- Yann Dirson <dirson@debian.org>  Sat, 23 Feb 2002 06:44:02 +0100
+
+e2fsprogs (1.26-1) unstable; urgency=low
+
+  * This uploads fixes 10 bugs, including data-corruption problems, and
+    adds much to the ease of maintainance and problem tracking.  Good
+    choice for woody.
+
+  * New upstream release (Closes: #106622, #116975, #118443, #119624,
+    #120171, #120077, #129828, #132764).
+  ** Fixes for data-corruption bugs not reported to the BTS: e2fsck
+    trashed external journals needing to be replayed, e2fsck now hides
+    visible journal files (data corruption problems when not excluded from
+    a backup and then restored) (Closes: #132654).
+  ** Other noticable bugs fixed include: e2fsck null pointer
+    dereferencing, fsck did not finds LVM volumes by UUID or by label,
+    largefile support (ie. dealing with filesystems inside 2GB+ files) was
+    broken in several programs.
+  * Switch to debhelper v3 to get ldconfig automatically handled
+    (lintian reported that it was broken).  Now call dh_makeshlibs, but
+    still override its generated shlibs file with ours, to get compiled
+    packages depend of the correct virtual packages, which include
+    full sonames.
+  * Removed call do dh_installman (Closes: #115526).
+  * Cleaned up maintainer scripts with dead code - most things are now
+    more properly handled by debhelper.  Removed an "exit 0" lurking in
+    preinst - can't find a reason for it in the changelog, it was probably
+    here for ages.
+  * Remove obsolete maint-scripts in binary-arch, as they are provided by
+    upstream.
+  * Also remove upstream-shipped config.cache before configuring.  That
+    shouldn't impact us, but well, that makes lintian happy :)
+
+ -- Yann Dirson <dirson@debian.org>  Fri,  8 Feb 2002 06:12:35 +0100
+
+e2fsprogs (1.25-1) unstable; urgency=high
+
+  * New upstream bugfix release (Closes: #112414), targeted to woody.
+  * com_err.info provided again now that it was fixed upstream.
+  * Added metainfo to com_err.texinfo so that it gets indexed correctly
+    (thanks lintian).  Moved @setfilename and @settitle to the top so that
+    things get output as expected.
+  * Added lintian overrides for -bf and -static packages.
+  * Put all stamp files in debian/stampdir.
+
+ -- Yann Dirson <dirson@debian.org>  Sat, 22 Sep 2001 16:22:47 +0200
+
+e2fsprogs (1.24a-1) unstable; urgency=high
+
+  * New upstream release (Closes: #109577).
+  ** The only new code in there is in codepaths that
+    are only visited when previously unsupported features are used, so
+    they add virtually no risk.  Support for raw image files will be of
+    great help to debug users' problems.  Urgency set to "high" to make
+    sure this version gets released with woody.
+
+  ** Fsck prints a warning message if now valid filesystems are passed to
+    it. (Closes: #107458).
+  ** Fsck -A will not try to interpret device names for filesystems which
+    have a pass number is 0. (Closes: #106696).
+  ** If -O none is passed to mke2fs, it will now not set the sparse_super
+    feature (Closes: #108165).
+  ** Tune2fs has been fixed to make sure that only error messages go to
+    stderr, and normal message go to stdout (Closes: #108555).
+  ** Minor man pages updates (Closes: #30833, #108174).
+  ** Doc fixes (Closes: #110621).
+
+ -- Yann Dirson <dirson@debian.org>  Tue,  4 Sep 2001 23:44:56 +0200
+
+e2fsprogs (1.22-2) unstable; urgency=medium
+
+  * This is only a trivial patch to stop some user confusion, and would be
+    great to have in woody, hence the urgency.
+  * Applied upstream patch to e2fsck to warn user when some errors were
+    not corrected due to user answering "no" (Closes: #104502).
+
+ -- Yann Dirson <dirson@debian.org>  Sat, 28 Jul 2001 23:01:49 +0200
+
+e2fsprogs (1.22-1) unstable; urgency=low
+
+  * Final 1.22 release:
+  ** Fixes build problems on big-endian (Closes: #101686, #101798).
+
+ -- Yann Dirson <dirson@debian.org>  Sat, 23 Jun 2001 14:03:17 +0200
+
+e2fsprogs (1.21+1.22-WIP-0620-1) unstable; urgency=low
+
+  * New upstream pre-release, critical for big-endian platforms
+    (Closes: #101752).
+  * Re-applied hurd fix again.
+  * Build e2fsprogs-bf with -Os to gain more space.
+
+ -- Yann Dirson <dirson@debian.org>  Fri, 22 Jun 2001 00:18:40 +0200
+
+e2fsprogs (1.21-1) unstable; urgency=low
+
+  * Final 1.21 release.
+  * Re-applied hurd fix that did not came quickly enough to make it in
+    1.21.
+  * Fixed name of copyright file in e2fsprogs-bf.
+
+ -- Yann Dirson <dirson@debian.org>  Wed, 20 Jun 2001 22:32:08 +0200
+
+e2fsprogs (1.20+1.21-WIP-0614-2) unstable; urgency=low
+
+  * Don't build PIC libs, build a reduced version of the libs instead, in
+    package e2fsprogs-bf.  Made this new package conflict with e2fsprogs.
+  * Compilation fix for the Hurd (Closes: #101361).
+
+ -- Yann Dirson <dirson@debian.org>  Tue, 19 Jun 2001 23:33:25 +0200
+
+e2fsprogs (1.20+1.21-WIP-0614-1) unstable; urgency=low
+
+  * New upstream pre-release (Closes: #100559, #100304).
+  * Fixed lib/ext2fs/Makefile.in for installation of new generated .h
+    file.
+
+ -- Yann Dirson <dirson@debian.org>  Thu, 14 Jun 2001 16:14:11 +0200
+
+e2fsprogs (1.20+1.21-WIP-0608-1) unstable; urgency=low
+
+  * New upstream pre-release (critical ext3 bugfix mostly).
+  * Correctly use dh_installinfo.
+  * Adjusted various things accordingly.
+
+ -- Yann Dirson <dirson@debian.org>  Sat,  9 Jun 2001 00:25:51 +0200
+
+e2fsprogs (1.20-4) unstable; urgency=low
+
+  * Cleanup generated substvars files now that debhelper uses other
+    names (may cause problems on other archs).  Build-dep on debhelper
+    3.0.30 or newer to be sure it won't cause broken uploads.  Allows to
+    get rid of hairy dep, but cannot build straightforwardly on potato any
+    more...
+
+ -- Yann Dirson <dirson@debian.org>  Wed,  6 Jun 2001 02:33:32 +0200
+
+e2fsprogs (1.20-3) unstable; urgency=low
+
+  * Create all symlinks to uuid-generate.3 (Closes: #99573).
+  * Somewhat modernized debian/rules (debhelper v2, etc.).
+  * Fixed libss2 copyright file.
+  * Fixed e2fslibs-pic short description.
+
+ -- Yann Dirson <dirson@debian.org>  Wed,  6 Jun 2001 01:19:19 +0200
+
+e2fsprogs (1.20-2) unstable; urgency=low
+
+  * Added support for building pic libs to Makefile.elf-lib.
+  * New package e2fslibs-pic for boot-floppies team (Closes: #99285).
+  * Use -N on dh_gencontrol instead of lots of -p.
+
+ -- Yann Dirson <dirson@debian.org>  Thu, 31 May 2001 23:59:51 +0200
+
+e2fsprogs (1.20-1) unstable; urgency=low
+
+  * Final 1.20 release.
+  * Added new zsh-static to the list of possible static shells recommended
+    by e2fsck-static.
+
+ -- Yann Dirson <dirson@debian.org>  Mon, 28 May 2001 21:39:06 +0200
+
+e2fsprogs (1.19+1.20-WIP-0520-1) unstable; urgency=low
+
+  * New upstream pre-release snapshot:
+  ** Extended "fsck -t" syntax (Closes: #89483).
+  ** Fix handling of devices for which fsck can't determine a physical
+    spindal, causing lockup when checking LVM volumes (Closes: #98103).
+  ** Fixed typo in e2fsck-static description - thanks Ted :).
+  * Fixed small compilation bug in fsck.c
+
+ -- Yann Dirson <dirson@debian.org>  Mon, 21 May 2001 20:47:10 +0200
+
+e2fsprogs (1.19+1.20-WIP-0514-2) unstable; urgency=low
+
+  * Tighten dependency on debhelper.
+
+ -- Yann Dirson <dirson@debian.org>  Tue, 15 May 2001 21:38:47 +0200
+
+e2fsprogs (1.19+1.20-WIP-0514-1) unstable; urgency=low
+
+  * New upstream pre-release snapshot:
+  ** new program: e2image.
+  ** e2fsck validates file descriptor specified in -C (Closes: #55220)
+  ** Fix multiple progress bar fsck bug (Closes: #65267)
+  ** Add devfs support to fsck (Closes: #94159)
+  ** Fix debugfs dump cmd looping on disk errors (Closes: #79163)
+  ** Miscellaneous manual page clarifications (Closes: #63442, #67446,
+    #87216)
+  ** Compilation fixes for Hurd (Closes: #52045).
+  ** New config.{guess,sub} for parisc support (Closes: #94690).
+  ** Improved ext3 support
+  ** tune2fs can now safely modify mounted filesystems
+  * Added missing @dircategory entry to libext2fs.info (lintian)
+  * Moved debugfs back from /usr/sbin/ to /sbin/ (Closes: #97035).
+  * Moved e2label back to /sbin/ as well, as it is now a hard link to
+    tune2fs.
+  * New binary package with statically linked e2fsck, recommending a
+    statically linked shell (Closes: #62611).
+  * All deps against e2fsprogs itself now versionned (lintian).
+  * Updated copyright file (upstream location, packaging copyright notice
+    for previous maintainers and for Alcove).
+  * Remove call to dh_testversion, use versionned build-dep instead
+    (lintian).
+  * Support for DEB_BUILD_OPTIONS debug/nostrip for policy 3.2
+    compliance.
+  * Use dh_shlibdeps -l instead of setting LD_LIBRARY_PATH explicitely -
+    necessary for new versions of fakeroot, and requires debhelper 3.0.23
+    for a fix.  Well finally 3.0.23 is buggy, leave this for later.
+  * Avoid to call ldconfig at "make install" time, too costly.
+  * Get rid in control files of references to never-released standalone
+    lib files (split attempted in 1997/98).
+  * Bumped Standards-Version to 3.5.4.
+
+ -- Yann Dirson <dirson@debian.org>  Tue, 15 May 2001 14:28:39 +0200
+
+e2fsprogs (1.19-4) unstable; urgency=medium
+
+  * Added texinfo to build-deps (Closes: #87685).
+
+ -- Yann Dirson <dirson@debian.org>  Tue,  3 Apr 2001 09:03:13 +0200
+
+e2fsprogs (1.19-3) unstable; urgency=low
+
+  * Drop findsuper binary, and suggest gpart (Closes: #74034).
+  * Drop flushb and extend at upstream request (Closes: #39506).
+  * Applied upstream fix for chattr on large files (Closes: #72690).
+  * Applied clarification patch to tune2fs.8 (Closes: #67446).
+  * Applied typo patch to compile_et.1 (Closes: #63786).
+  * Include <sys/mount.h> in e2fsck/journal.c (Closes: #71775).
+  * Suggest parted.
+
+ -- Yann Dirson <dirson@debian.org>  Mon,  4 Dec 2000 22:08:06 +0100
+
+e2fsprogs (1.19-2) unstable; urgency=low
+
+  * Clarified libuuid copyright to LGPL-2, excluding LGPL-2.1.
+  * Added build-dependency on debhelper (Closes: #67532).
+  * Don't paralelize fsck runs on same drive for hd[efgh] (Closes:
+    #59103).
+  * Upload pristine source, -1 was erroneously uploaded as a
+    debian-specific package.
+
+ -- Yann Dirson <dirson@debian.org>  Thu,  3 Aug 2000 00:30:49 +0200
+
+e2fsprogs (1.19-1) unstable; urgency=low
+
+  * New upstream release:
+  ** new program: resize2fs.
+  ** ext3 support.
+  ** NLS support (non-default, activated).
+  ** Compression support (non-default, activated).
+  ** Progress bar nice to serial console (Closes: #66079)
+  ** Ensure filetype feature is turned off for Hurd filesystems (Closes:
+    #61863)
+  * Updated main copyright file for a number of things.
+  * Fixed NLS support for flushb and extend.
+  * Started to add build-depends.
+  * Include new e2p header.
+
+ -- Yann Dirson <dirson@debian.org>  Wed, 19 Jul 2000 01:55:27 +0200
+
+e2fsprogs (1.18-3) frozen unstable; urgency=medium
+
+  * Fix Y2K display-only bug in debugfs - "ls -l" displayed raw tm_year,
+    causing 2000 to be displayed as "100" (Closes: #57135).  Potato should
+    be y2k-clean.
+  * Remove empty dirs /usr/share/et/ and /usr/share/ss/ from package
+    e2fsprogs (Closes: #52900).
+
+ -- Yann Dirson <dirson@debian.org>  Mon, 21 Feb 2000 23:06:47 +0100
+
+e2fsprogs (1.18-2) unstable; urgency=low
+
+  * Test for "__sparc__" instead of "sparc" as a cpp macro in mke2fs.c
+    (tests in other places are correct) (Closes: #50012).
+
+ -- Yann Dirson <dirson@debian.org>  Fri, 12 Nov 1999 21:40:27 +0100
+
+e2fsprogs (1.18-1) unstable; urgency=low
+
+  * New upstream (bugfix) release.
+
+ -- Yann Dirson <dirson@debian.org>  Fri, 12 Nov 1999 17:27:20 +0100
+
+e2fsprogs (1.17-2) unstable; urgency=low
+
+  * Applied upstream patch to fix segfault (Closes: #49535).
+
+ -- Yann Dirson <dirson@debian.org>  Tue,  9 Nov 1999 22:14:53 +0100
+
+e2fsprogs (1.17-1) unstable; urgency=low
+
+  * New upstream (bugfix) release.
+
+ -- Yann Dirson <dirson@debian.org>  Wed, 27 Oct 1999 23:46:39 +0200
+
+e2fsprogs (1.16-2) unstable; urgency=low
+
+  * Fixed build of a link list in fsck.c (Closes: #48312).
+
+ -- Yann Dirson <dirson@debian.org>  Tue, 26 Oct 1999 01:17:36 +0200
+
+e2fsprogs (1.16-1) unstable; urgency=low
+
+  * New upstream release.
+  * Re-applied Hurd patches that did not seem to have been received
+    upstream.
+
+ -- Yann Dirson <dirson@debian.org>  Sun, 24 Oct 1999 16:11:59 +0200
+
+e2fsprogs (1.15-3) unstable; urgency=low
+
+  * Fixed minor typo for the Hurd.
+  * Fixed various Hurd defines to __GNU__ (Closes: #44407).
+  * Switched doc/ and info/ to FHS.
+  * Cleaned up debian/rules to use new debhelper features.
+  * Bounced Standards-Version to 3.0.1.
+  * Do not install buggy com_err.info, shipped as HTML.
+  * Removed partinfo from the package, following the wish of upstream
+    author, because of duplicate functionality with "fdisk -l" (Closes:
+    #42139).
+
+ -- Yann Dirson <dirson@debian.org>  Mon, 20 Sep 1999 23:04:06 +0200
+
+e2fsprogs (1.15-2) unstable; urgency=medium
+
+  * Changed build directory do debian/BUILD/ - related cleanups in
+    debian/rules.
+  * Fixed partinfo.c to have it compiled, and fixed display of partition
+    device in error messages.
+  * Added /usr/sbin/partinfo to the package (Closes: #42139).
+  * Added note about uuidgen(1) in README.Debian.
+  * Documented in manpage that default mke2fs behaviour is now -r1 -s1
+    (Closes: #44478).
+  * Documented in mke2fs.8 that -r1 forces -s1, thus ignoring -s0.
+  * Added warning message when -s0 is ignored because of -r1.
+  * Documented -n option of mke2fs.
+  * Fixed display buglet causing trailing commas in list of superblock
+    backups when sparse flag is on and last group has no superblock
+    backup.
+  * Closes: #42434, #43134.
+
+ -- Yann Dirson <dirson@debian.org>  Wed,  8 Sep 1999 00:46:38 +0200
+
+e2fsprogs (1.15-1) unstable; urgency=low
+
+  * New upstream release (Closes: Bug#41763).
+  * All changes to upstream files in 1.14-3 were integrated upstream.
+  * Separated libuuid-dev from e2fslibs-dev because it now has manpages.
+  * Fixed debian/rules for POSIX "rmdir -p"
+  * Corrected the location of the GPL in copyright file.
+  * Moved the manpages to /usr/share/.
+  * Bumped Standards-Version to 3.0.0.
+
+ -- Yann Dirson <dirson@debian.org>  Fri, 23 Jul 1999 01:37:51 +0200
+
+e2fsprogs (1.14-3) unstable; urgency=low
+
+  * Fail with error message when /dev/null cannot be opened (Fixes:
+    Bug#35595).
+  * Fixed typo in e2fsck/unix.c (Fixes: Bug#36960).
+  * Added "emeregency help" options summary to e2fsck (Fixes: Bug#11372).
+  * Prepared debian/rules for usr/share/man/.
+
+ -- Yann Dirson <dirson@debian.org>  Tue,  1 Jun 1999 23:37:12 +0200
+
+e2fsprogs (1.14-2) unstable; urgency=low
+
+  * Fixed fsck(1) not to coredump when it does not find its argument in
+    /etc/fstab (Fixes: Bug#33533, Bug#34320, part of Bug#34131).
+  * Fixed spelling of upstream author's name.
+  * Cleaned debian/*.files up.
+  * Undid the <linux/types.h> changes.
+  * Changed "rmdir -p" invocations in debian/rules into "-rmdir -p" to
+    turn around changed behaviour in fileutils_4.0.
+
+ -- Yann Dirson <dirson@debian.org>  Fri, 12 Mar 1999 23:50:47 +0100
+
+e2fsprogs (1.14-1) unstable; urgency=low
+
+  * New upstream release (Fixes: Bug#33113).
+  * All patches we used for 1.12 are obsoleted by 1.14.
+  * Still have to install com_err.info from debian/rules though.
+  * Incorporated patches from Gordon Matzigkeit for hurd cross-compilation:
+  * - configure.in: Change cross-compile default for sizeof (long
+      long) to 8, so that __s64 and __u64 get defined in ext2fs.h.
+      (BUILD_CC): Discover a native compiler if we are cross-compling
+      (used for util/subst).
+    - Include linux/types.h instead of asm/types.h, so that
+      non-Linux platforms use the stubbed version provided with this
+      package.
+    - misc/Makefile.in (findsuper): Add a rule so that findsuper gets built
+      with the right compiler flags.
+    - etc.
+
+ -- Yann Dirson <dirson@debian.org>  Wed, 10 Feb 1999 23:23:03 +0100
+
+e2fsprogs (1.12-4) frozen unstable; urgency=low
+
+  * Ship flushb(8) and extend(8) were missing in all 1.12 packages
+    (Fixes: Bug#28771).
+  * Add extend.8 link to undocumented.7.
+  * Replaced my (ad-hoc) fix for Bug#25684 with (really better) one
+    from upstream.
+
+ -- Yann Dirson <dirson@debian.org>  Mon,  2 Nov 1998 20:53:28 +0100
+
+e2fsprogs (1.12-3) frozen unstable; urgency=low
+
+  * Fixed <ext2fs/ext2fs.h> to use angle brackets instead of double
+    quotes when including files from /usr/include/.
+  * Made e2fslibs-dev depend on comerr-dev (Fixes: Bug#26282,
+    Bug#27497).
+  * Fixed mke2fs' display with inode numbers > 9999 (Fixes: Bug#25684).
+  * Use -D__NO_STRING_INLINES on powerpc to allow building the boot
+    blocks in QUIK, the powermac boot loader - reported by Matt
+    McLean.
+  * Removed unsupported info and texi entries from docbase files.
+
+ -- Yann Dirson <dirson@debian.org>  Mon, 19 Oct 1998 23:32:41 +0200
+
+e2fsprogs (1.12-2.1) unstable; urgency=low
+
+  * Non-maintainer upload
+    config.guess and config.sub files modified, to recognize a Arm
+    architecture.
+
+ -- Turbo Fredriksson <turbo@debian.org>  Thu, 13 Aug 1998 19:15:56 -0400
+
+e2fsprogs (1.12-2) unstable; urgency=low
+
+  * Really install e2label.8 manpage.
+  * Removed path from ldconfig invocation, obeying packaging manual.
+  * Improved the subst.c patch (thanks to Peter Moulder).
+
+ -- Yann Dirson <dirson@debian.org>  Thu, 14 Jul 1998 14:10:06 +0200
+
+e2fsprogs (1.12-1) unstable; urgency=low
+
+  * New upstream release - at last out of alpha status !
+  * Removed some obsolete files from debian/attic.
+  * Patched util/subst.c to expand env variables, and MCONFIG.in to
+    have ${prefix} exported to the `subst' process, so that we get
+    correct paths in mk_cmds and compile_et.  Forwarded upstream.
+  * Debian-specific /usr/share/comerr/ renamed to /usr/share/et/, now
+    installed upstream.
+  * Removed -isp from dh_gencontrol invocation - now the default.
+  * Passed lintian 0.5.0.
+
+ -- Yann Dirson <dirson@debian.org>  Fri, 10 Jul 1998 22:49:18 +0200
+
+e2fsprogs (1.10-17) frozen unstable; urgency=low
+
+  * Commented out obsolete code in fsck.c that assumed fstab entries
+    declared `noauto' should not be checked - successfully forwarded
+    upstream (Fixes: Bug#17244).
+
+ -- Yann Dirson <dirson@debian.org>  Fri, 15 May 1998 01:14:54 +0200
+
+e2fsprogs (1.10-16) frozen unstable; urgency=low
+
+  * Changed <linux/types.h> to <asm/types.h> in lib/uuid/uuidP.h to
+    allow compilation with glibc 2.0.7pre1 (Fixes: Bug#22039).
+  * Use "build-stamp" as a stamp file instead of "build".
+  * Restored "Provides: e2fslibsg" in order to allow upgrade from
+    unstable hamm.  Documented in README.Debian so that it does not
+    get removed again (Fixes: Bug#22019).
+
+ -- Yann Dirson <dirson@debian.org>  Mon,  4 May 1998 21:11:38 +0200
+
+e2fsprogs (1.10-15) frozen unstable; urgency=low
+
+  * Added call to ldconfig in e2fsprogs.postinst.
+  * Fixes checks for install-docs in postinst/prerm (Fixes: Bug#20303,
+    Bug#20304, Bug#20590).
+  * Removed e2fslibsg from what e2fsprogs provides (was just forgotten).
+  * Passed lintian 0.4.2.
+
+ -- Yann Dirson <dirson@debian.org>  Sun, 26 Apr 1998 22:27:11 +0200
+
+e2fsprogs (1.10-14) frozen unstable; urgency=low
+
+  * Fixed checks for install-docs to use -x.
+  * Applied patch for sparc from Juan to fsck.c to compile with glibc
+    2.1 (Fixes: Bug#20841).
+
+ -- Yann Dirson <dirson@debian.org>  Tue, 14 Apr 1998 17:12:19 +0200
+
+e2fsprogs (1.10-13) frozen unstable; urgency=low
+
+  * test for /usr/sbin/install-docs before trying to run it in
+    postinst and prerm (Fixes: Bug#19461, Bug#19469, Bug#19949,
+    Bug#20006).
+  * comerrg-dev now suggests doc-base.
+  * moved binary packages ss2g, comerr2g and e2fslibsg back into
+    binary package e2fsprogs.
+  * use new virtual packages libcomerr2, libss2, libext2fs2, libe2p2,
+    libuuid1 in shlibs and dependencies.
+  * Changed e2fsprogs dependency on libs to a Pre-Depends (Fixes:
+    Bug#18221).
+  * Not conflicting with old ss2g and comerr2g - these will have to be
+    removed by hand.
+  * Turned around dpkg's bug #17624 in e2fsprogs.preinst.
+  * Updated README.Debian to explain the new package architecture.
+  * Passed lintian 0.3.4.
+
+ -- Yann Dirson <dirson@debian.org>  Fri, 20 Mar 1998 13:03:11 +0100
+
+e2fsprogs (1.10-12) unstable; urgency=low
+
+  * Corrected doc menu entries to point to the real documents' places.
+  * Fixed mk_cmds to really find its support scripts (Fixes: Bug#18779).
+  * Made mk_cmds and compile_et use "sh -e".
+  * Have missing file /usr/include/ss/ss_err.h installed (Fixes: Bug#18778).
+  * Corrected typo in Description (Fixes: Bug#18890).
+  * Fixed descriptions for ss* packages, thanks to Greg Stark (Fixes:
+    Bug#18373, Bug#18447).
+  * Added description of e2p and uuid libs in e2fslibsg-dev description.
+  * Included texinfo sources.
+  * Added doc-base support - suppressed direct menu/dwww support.
+  * Complies with standards version 2.4.0.0.
+  * Passed lintian 0.3.0:
+  *  removed .du control file.
+  *  updated FSF address.
+  *  fixed in *.files nasty ldconfig-symlink-before-shlib-in-deb's.
+  *  turned relative links from /usr/lib into /lib into absolute ones.
+
+ -- Yann Dirson <dirson@debian.org>  Sun,  8 Mar 1998 19:42:58 +0100
+
+e2fsprogs (1.10-11) unstable; urgency=low
+
+  * Switched to debhelper (Fixes:Bug#16307).
+  * Updated standards to 2.3.0.1
+  * Changed maintainer's mail address.
+  * Added conflicts with old versions of dump and quota.
+  * Added html-converted texi docs for libs, with menu(dwww) support.
+  * Added findsuper.8 link to undocumented.
+  * Changed version number of lib packages to reflect the lib versions.
+  * Moved libss into its own packages; added mk_cmds script and
+    support files for libss development (Fixes:Bug#17233).
+  * Added README.Debian file documenting all those dependency stuff.
+  * Included example error tables from libext2fs and libss in
+    comerr-dev.
+  * Included example command tables from debugfs in ss-dev.
+  * Added section/priority files in packages (-isp).
+  * Changed names/relations for doc dirs to comply with policy.
+  * Removed call to ldconfig from e2fsprogs.postinst.
+
+ -- Yann Dirson <dirson@debian.org>  Thu, 29 Jan 1998 18:10:03 +0100
+
+e2fsprogs (1.10-10) unstable; urgency=low
+
+  * Added patch from Michael Alan Dorman for compilation on alpha-Linux
+    (Closes:Bug#15596).
+  * Added '-fsigned-char' to COPTS to allow compilation on ppc-Linux
+    (Closes:Bug#15976).
+  * Suppressed Essential flag on libs, as well as useless Replaces
+    (Closes: Bug#16480).
+  * Suppressed reference to obsolete package `e2fsprogsg' in control
+    info, but Conflicts for security (Closes:Bug#16791).
+
+ -- Yann Dirson <dirson@univ-mlv.fr>  Wed,  7 Jan 1998 22:35:08 +0100
+
+e2fsprogs (1.10-9) unstable; urgency=low
+
+  * Fixed comerr2g.shlibs to reflect package-name change.
+  * Fixed problem with ss include files being removed from /usr on make
+    install (indeed fixed in 1.10-8).
+  * Added changelog file to comerr2g package (indeed fixed in 1.10-8).
+  * Corrected link from flushb.8 to undocumented (Closes:Bug#15335,Bug#15660,Bug#15675).
+  * Added /sbin/findsuper (Closes:Bug#15224).
+  * Fixed /usr/bin/compile_et script (Closes:Bug#15487).
+  * Included awk scripts in /usr/share/comerr, for use by compile_et.
+  * Changed back the name from "e2fsprogsg" to "e2fsprogs" to get better
+    dependencies.
+  * Strip libraries (Closes:Bug#15667).
+
+ -- Yann Dirson <dirson@univ-mlv.fr>  Tue,  9 Dec 1997 22:52:42 +0100
+
+e2fsprogs (1.10-8) unstable; urgency=low
+
+  * Added latest patch from Ted for autodetection of llseek() proto.
+  * Switched to libc6, without libc5 compatibility (yet ?).
+  * Turned Pre-Depends into Depends to allow installation. Dirty
+    though. But what were Pre-Depends for anyway ?
+
+ -- Yann Dirson <dirson@univ-mlv.fr>  Sun, 23 Nov 1997 23:03:02 +0100
+
+e2fsprogs (1.10-7) unstable; urgency=HIGH
+
+  * Turned "#if (__GLIBC__ == 2)" into "#if 1" to turn around missing llseek()
+    prototype in libc_5.4.33-5 as well as libc6.
+
+ -- Yann Dirson <dirson@univ-mlv.fr>  Tue, 21 Oct 1997 12:53:27 +0200
+
+e2fsprogs (1.10-6) unstable; urgency=low
+
+  * Official libc6 patches from Ted.
+  * Converted to debstd - let it do the stripping stuff.
+  * Separated libcomerr into a standalone lib - includes full doc and tools.
+  * Separated development files into e2fslibs-dev, which Provides the 4 other
+    -dev packages.
+  * Now Provides the 4 other lib packages, to make it possible not to depend
+    upon e2fsprogs itself. These libs WILL be taken out of "progs" in the
+    next release.
+
+ -- Yann Dirson <dirson@univ-mlv.fr>  Wed, 24 Sep 1997 10:46:00 +0200
+
+e2fsprogs (1.10-5.1) experimental; urgency=low
+
+  * Applied patch from Ted for libc6 compatibility, for test purpose.
+
+ -- Yann Dirson <dirson@univ-mlv.fr>  Thu, 11 Sep 1997 09:09:42 +0200
+
+e2fsprogs (1.10-5) unstable; urgency=medium
+
+  * Switched back to libc5 because of possible bug in libc6-2.0.4-provided
+    llseek() causing problem with partitions > 2Gb.
+  * Switched back to libc-provided llseek().
+
+ -- Yann Dirson <dirson@univ-mlv.fr>  Tue,  5 Aug 1997 16:54:40 +0200
+
+e2fsprogs (1.10-4.1) unstable; urgency=low
+
+  * Make use of shipped llseek instead of glibc's which seems buggy
+    [unreleased - could not compile due to possible gcc bug].
+  * Corrected compiler-options handling in debian/rules (use CCOPTS instead
+    of CFLAGS which is messed with in configure.in).
+
+ -- Yann Dirson <dirson@univ-mlv.fr>  Mon, 28 Jul 1997 19:47:02 +0200
+
+e2fsprogs (1.10-4) unstable; urgency=low
+
+  * Switched to libc6.
+  * Added calls to update-info in postins/prerm.
+  * Misc changes to debian/rules; some cleanup in Makefiles.
+
+ -- Yann Dirson <dirson@univ-mlv.fr>  Thu, 10 Jul 1997 19:42:54 +0200
+
+e2fsprogs (1.10-3) stable unstable; urgency=low
+
+  * New maintainer (closed many obsolete bug-reports).
+  * updated "copyright" to show new location on tsx-11.
+  * started debian/rules cleanup, towards new policy conformance.
+  * Added flushb.8 link to undocumented.7 (bug #8644).
+  * Added {fsck,mkfs}.ext2.8 links to existing manpages (bugs #5598,
+    #6286).
+
+ -- Yann Dirson <dirson@univ-mlv.fr>  Wed, 25 Jun 1997 14:59:58 +0200
+
+e2fsprogs (1.10-2) frozen unstable; urgency=low
+
+  * Add 'ldconfig' to postinst (should fix #9020).
+  * Define HAVE_NETINET_IN_H on alpha/glibc.
+
+ -- Klee Dienes <klee@debian.org>  Tue, 29 Apr 1997 17:24:12 -0400
+
+e2fsprogs (1.10-1) frozen unstable; urgency=medium
+
+  * Upstream bug-fix release.
+
+ -- Klee Dienes <klee@debian.org>  Thu, 24 Apr 1997 14:54:12 -0400
+
+e2fsprogs (1.09-1) frozen; urgency=medium
+
+  * Upstream bug-fix release.
+
+ -- Klee Dienes <klee@debian.org>  Thu, 24 Apr 1997 14:54:12 -0400
+
+e2fsprogs (1.06-4) unstable; urgency=low
+
+  * Added empty entries to shlibs.local, to neatly solve the pre-depends
+    problem, as suggested by Ian Jackson.
+
+ -- Michael Nonweiler <mrn20@cam.ac.uk>  Wed, 13 Nov 1996 08:13:28 +0000
+
+e2fsprogs (1.06-3) unstable; urgency=low
+
+  * Hard coded Pre-Depends line, as a temporary fix for the pre-depends
+    contains e2fsprogs problem.
+
+ -- Michael Nonweiler <mrn20@cam.ac.uk>  Sat, 9 Nov 1996 12:57:44 +0000
+
+e2fsprogs (1.06-2) unstable; urgency=low
+
+  * New packaging format
+  * Fixes packaging bugs -
+      Files in /lib are now stripped of all unneeded symbols (Bug#5121)
+      Calls to ldconfig in maintainer scripts have been removed (Bug#4247)
+
+ -- Michael Nonweiler <mrn20@cam.ac.uk>  Tue, 5 Nov 1996 21:14:54 +0000
+
+e2fsprogs (1.01-1) unstable; urgency=low
+
+  * upgraded to latest upstream version, to 1.06 from 1.05
+  * upgraded to latest upstream version, to 1.05 from 1.04
+  * gzip manpages
+  * minor changes to debian.rules
+
+ -- Michael Meskes <meskes@debian.org>  Fri, 18 Oct 1996 00:00:00 +0000
+
+e2fsprogs (1.04-1) unstable; urgency=low
+
+   * upgraded to latest upstream version, to 1.04 from 1.02
+   * another tidy-up of debian.rules
+   * section and priority added to debian.control, since this is an
+     essential base package.
+
+ -- Michael Nonweiler <mrn20@cam.ac.uk>  Sun, 23 Jun 1996 00:00:00 +0000
+
+e2fsprogs (1.02-1) unstable; urgency=low
+
+  * upgraded to latest upstream version, to 1.02 from 1.01
+  * copied "configure" usr_prefix change (see below), into configure.in
+  * updated debian.control file, added Pre-Depends field
+    created preinst script to check dpkg --assert-predepends
+    tidyed and fixed debian.rules
+  * set e2fsck to link shared, as suggested by Bruce Perens in Bug#2332
+  * corrected problem in e2fsck error message, Bug#2534
+  * added Architecture field
+  * very minor correction to expected output of a build time test
+
+ -- Michael Nonweiler <mrn20@cam.ac.uk>  Tue, 5 Mar 1996 00:00:00 +0000
+
+e2fsprogs (1.01-1) unstable; urgency=low
+
+  * removed debugging symbols from libs and enabled more optimization
+    as suggested by Rolf Rossius
+  * also removed the /var/catman pages
+  * changed to elf compilation
+
+ -- Andrew D. Fernandes <adfernan@cnd.mcgill.ca>  Mon, 20 Nov 1995 00:00:00 +0000
+
+e2fsprogs (0.5b-2) unstable; urgency=low
+
+  * Upgraded to latest version, to 1.01 from 0.5b.
+  * changed the installation groups from bin to root in MCONFIG.in
+  * changed configure to set usr_prefix="\${prefix}/usr"
+  * moved the cat pages to /var/catman in MCONFIG.in
+
+ -- Andrew D. Fernandes <adfernan@cnd.mcgill.ca>  Sat, 7 Oct 1995 00:00:00 +0000
+
+e2fsprogs (0.5b-1) unstable; urgency=low
+
+  * Made "fsck -t <filesystem-type> <device>" work correctly. Formerly
+    the -t argument was overriden by the filesystem type listed for the
+    device in /etc/fstab.
+  * added Debian GNU/Linux package maintenance system files
+
+ -- Bruce Perens <Bruce@Pixar.com>  Thu, 3 Aug 1995 00:00:00 +0000
diff --git a/e2fsprogs/debian/comerr-dev.doc-base b/e2fsprogs/debian/comerr-dev.doc-base
new file mode 100644
index 0000000..463eb76
--- /dev/null
+++ b/e2fsprogs/debian/comerr-dev.doc-base
@@ -0,0 +1,12 @@
+Document: comerr-manual
+Title: The com_err library
+Author: Ken Raeburn and Bill Sommerfeld
+Abstract: A library, and associated utilities,
+ which allow a more uniform way for libraries
+ to return errors to their callers, and for programs
+ to describe errors and exceptional conditions to their users.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/comerr-dev/html-info/com_err.html
+Files: /usr/share/doc/comerr-dev/html-info/*.html
diff --git a/e2fsprogs/debian/comerr-dev.examples b/e2fsprogs/debian/comerr-dev.examples
new file mode 100644
index 0000000..aff20cc
--- /dev/null
+++ b/e2fsprogs/debian/comerr-dev.examples
@@ -0,0 +1,2 @@
+lib/ss/ss_err.et
+debian/BUILD-STD/lib/ext2fs/ext2_err.et
diff --git a/e2fsprogs/debian/comerr-dev.files.in b/e2fsprogs/debian/comerr-dev.files.in
new file mode 100644
index 0000000..a3b8b0e
--- /dev/null
+++ b/e2fsprogs/debian/comerr-dev.files.in
@@ -0,0 +1,9 @@
+usr/lib/*/libcom_err.a
+usr/lib/*/libcom_err.so
+usr/include/et/*
+usr/include/com_err.h
+usr/share/man/man1/compile_et*
+usr/share/man/man3/com_err.3*
+usr/bin/compile_et
+usr/share/et/*
+usr/lib/*/pkgconfig/com_err.pc
diff --git a/e2fsprogs/debian/compat b/e2fsprogs/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/e2fsprogs/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/e2fsprogs/debian/control.in b/e2fsprogs/debian/control.in
new file mode 100644
index 0000000..6db7cd9
--- /dev/null
+++ b/e2fsprogs/debian/control.in
@@ -0,0 +1,330 @@
+define(MULTIARCH_HEADERS,ifdef(`DO_MULTIARCH',
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends},REMOVE_ME))dnl
+define(UTIL_LINUX_NG_DEFINES,
+ifdef(`UTIL_LINUX_NG', ``libblkid-dev (>= 2.16), uuid-dev (>= 2.16),''))dnl
+define(DIETLIBC_DEFINES,
+ifdef(`DIETLIBC', ``dietlibc-dev (>> 0.30) [alpha amd64 arm hppa i386 ia64 powerpc ppc64 s390 sparc],''))dnl
+Source: e2fsprogs
+Section: admin
+Priority: required
+Maintainer: Theodore Y. Ts'o <tytso@mit.edu>
+Build-Depends: gettext, texinfo, pkg-config, DIETLIBC_DEFINES gcc-multilib [mips mipsel], debhelper (>= 7.0), UTIL_LINUX_NG_DEFINES m4
+Standards-Version: 3.9.5
+Homepage: http://e2fsprogs.sourceforge.net
+
+ifdef(`E2FSCK_STATIC',``
+Package: e2fsck-static
+Priority: optional
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: sash | bash-static | zsh-static | busybox-static | zsh30-static
+Architecture: any
+Description: statically-linked version of the ext2/ext3/ext4 filesystem checker
+ This may be of some help to you if your filesystem gets corrupted enough
+ to break the shared libraries used by the dynamically linked checker.
+ .
+ This binary takes much more space than its dynamic counterpart located
+ in e2fsprogs, though.
+ .
+ You may want to install a statically-linked shell as well, to be able
+ to run this program if something like your C library gets corrupted.
+'')dnl
+
+Package: libcomerr2
+Section: libs
+Provides: libcomerr-kth-compat
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Replaces: e2fsprogs (<< 1.34-1)
+Architecture: any
+MULTIARCH_HEADERS
+Description: common error description library
+ libcomerr 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 identified with mechanisms commonly in use.
+
+Package: comerr-dev
+Section: libdevel
+Priority: extra
+Depends: libc6-dev | libc-dev, libcomerr2 (= ${mainBinary}), ${misc:Depends}
+Suggests: doc-base
+Replaces: e2fslibs-dev (<< 1.33-2), libkrb5-dev (<< 1.3)
+Architecture: any
+Description: common error description library - headers and static libraries
+ libcom_err 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 identified with mechanisms commonly in use.
+ .
+ This package contains the development environment for the com_err library.
+
+Package: libss2
+Section: libs
+Depends: libcomerr2, ${shlibs:Depends}, ${misc:Depends}
+Replaces: e2fsprogs (<< 1.34-1)
+Architecture: any
+MULTIARCH_HEADERS
+Description: command-line interface parsing library
+ libss provides a simple command-line interface parser which will
+ accept input from the user, parse the command into an argv argument
+ vector, and then dispatch it to a handler function.
+ . 
+ It was originally inspired by the Multics SubSystem library.
+
+Package: ss-dev
+Section: libdevel
+Priority: extra
+Depends: libc6-dev | libc-dev, libss2 (= ${mainBinary}), comerr-dev, ${misc:Depends}
+Architecture: any
+Description: command-line interface parsing library - headers and static libraries
+ This package includes a tool that parses a command table to generate
+ a simple command-line interface parser, the include files needed to
+ compile and use it, and the static libs.
+ . 
+ It was originally inspired by the Multics SubSystem library.
+ .
+ This package contains the development environment for the ss library.
+ifdef(`UTIL_LINUX_NG',,``
+Package: libuuid1
+Section: libs
+Depends: passwd, ${shlibs:Depends}, ${misc:Depends}
+Recommends: uuid-runtime
+Replaces: e2fsprogs (<< 1.34-1)
+Architecture: any
+MULTIARCH_HEADERS
+Description: Universally Unique ID library
+ The libuuid library generates and parses 128-bit universally unique
+ ids (UUIDs).  A UUID is an identifier that is unique across both
+ space and time, with respect to the space of all UUIDs.  A UUID can
+ be used for multiple purposes, from tagging objects with an extremely
+ short lifetime, to reliably identifying very persistent objects
+ across a network.
+ .
+ See RFC 4122 for more information.  
+
+Package: uuid-runtime
+Section: libs
+Priority: optional
+Depends: passwd, libuuid1 (>> 1.40.3-1), ${shlibs:Depends}, ${misc:Depends}
+Replaces: e2fsprogs (<= 1.40.3-1ubuntu1)
+Architecture: any
+Description: runtime components for the Universally Unique ID library
+ The libuuid library generates and parses 128-bit universally unique
+ ids (UUIDs).  A UUID is an identifier that is unique across both
+ space and time, with respect to the space of all UUIDs.  A UUID can
+ be used for multiple purposes, from tagging objects with an extremely
+ short lifetime, to reliably identifying very persistent objects
+ across a network.
+ .
+ See RFC 4122 for more information.  
+ .
+ This package contains the uuidgen program and the uuidd daemon.
+ .
+ The uuidd daemon is used to generate 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. It is used by libuuid as well as the uuidgen
+ program.
+
+Package: libuuid1-udeb
+XC-Package-Type: udeb
+Section: debian-installer
+Priority: optional
+Depends: ${shlibs:Depends}
+Architecture: any
+Description: stripped down universally unique id library, for debian-installer
+ libuuid generates and parses 128-bit universally unique ids (UUIDs).
+ See RFC 4122 for more information.
+ .
+ This is a minimal package for debian-installer.
+
+Package: uuid-dev
+Section: libdevel
+Priority: extra
+Depends: libc6-dev | libc-dev, libuuid1 (= ${mainBinary}), ${misc:Depends}
+Replaces: e2fslibs-dev (<< 1.15)
+Architecture: any
+Description: universally unique id library - headers and static libraries
+ libuuid generates and parses 128-bit universally unique ids (UUIDs).
+ See RFC 4122 for more information.
+ .
+ This package contains the development environment for the uuid library.
+
+Package: libblkid1
+Section: libs
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Architecture: any
+Description: block device id library
+ The blkid library which allows system programs like fsck and 
+ mount to quickly and easily find block devices by filesystem UUID and 
+ LABEL.  This allows system administrators to avoid specifying 
+ filesystems by hard-coded device names, but via a logical naming 
+ system instead.
+
+Package: libblkid1-udeb
+XC-Package-Type: udeb
+Section: debian-installer
+Priority: optional
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Architecture: any
+Description: stripped down block device id library, for debian-installer
+ The blkid library which allows system programs like fsck and 
+ mount to quickly and easily find block devices by filesystem UUID and 
+ LABEL.  This allows system administrators to avoid specifiying 
+ filesystems by hard-coded device names, but via a logical naming 
+ system instead.
+ .
+ This is a minimal package for debian-installer.
+
+Package: libblkid-dev
+Section: libdevel
+Priority: extra
+Depends: libc6-dev | libc-dev, libblkid1 (= ${binary:Version}), ${misc:Depends}
+Architecture: any
+Description: block device id library - headers and static libraries
+ The blkid library which allows system programs like fsck and 
+ mount to quickly and easily find block devices by filesystem UUID and 
+ LABEL.  This allows system administrators to avoid specifiying 
+ filesystems by hard-coded device names, but via a logical naming 
+ system instead.
+ .
+ This package contains the development environment for the blkid library.
+'')dnl
+
+Package: e2fsprogs-udeb
+XC-Package-Type: udeb
+Section: debian-installer
+Priority: optional
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Architecture: any
+Description: stripped-down versions of e2fsprogs, for debian-installer
+ This package is an e2fsprogs package built for a reduced size, so that
+ it can help to save space in debian-installer.
+ .
+ Don't attempt to install this package, it has no support for a couple of
+ features you surely want.  Anyway it should refuse to install.
+
+Package: e2fslibs
+Section: libs
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Replaces: e2fsprogs (<< 1.34-1)
+Provides: libext2fs2, libe2p2
+Architecture: any
+MULTIARCH_HEADERS
+Description: ext2/ext3/ext4 file system libraries
+ The ext2, ext3 and ext4 file systems are successors of the original ext
+ ("extended") file system. They are the main file system types used for
+ hard disks on Debian and other Linux systems.
+ .
+ This package provides the ext2fs and e2p libraries, for userspace software
+ that directly accesses extended file systems. Programs that use libext2fs
+ include e2fsck, mke2fs, and tune2fs. Programs that use libe2p include
+ dumpe2fs, chattr, and lsattr.
+
+Package: e2fslibs-dev
+Section: libdevel
+Priority: extra
+Depends: libc6-dev | libc-dev, comerr-dev, e2fslibs (= ${binary:Version}), ${misc:Depends}
+Suggests: doc-base
+Provides: ext2fs-dev, e2p-dev
+Replaces: libkrb5-dev (<< 1.3)
+Architecture: any
+Description: ext2/ext3/ext4 file system libraries - headers and static libraries
+ The ext2, ext3 and ext4 file systems are successors of the original ext
+ ("extended") file system. They are the main file system types used for
+ hard disks on Debian and other Linux systems.
+ .
+ This package contains the development environment for the ext2fs and e2p 
+ libraries.
+
+Package: e2fsprogs
+Essential: yes
+ifdef(`UTIL_LINUX_NG',
+``Pre-Depends: ${shlibs:Depends}, ${misc:Depends}, util-linux (>= 2.15~rc1-1)
+'',
+``Pre-Depends: ${shlibs:Depends}, ${misc:Depends}
+'')dnl
+Multi-Arch: foreign
+Suggests: gpart, parted, e2fsck-static
+Conflicts: dump (<< 0.4b4-4), quota (<< 1.55-8.1), initscripts (<< 2.85-4), sysvinit (<< 2.85-4)
+Replaces: hurd (<= 20040301-1), libblkid1 (<< 1.38+1.39-WIP-2005.12.10-2), libuuid1 (<< 1.38+1.39-WIP-2005.12.10-2)
+Architecture: any
+Description: ext2/ext3/ext4 file system utilities
+ The ext2, ext3 and ext4 file systems are successors of the original ext
+ ("extended") file system. They are the main file system types used for
+ hard disks on Debian and other Linux systems.
+ .
+ This package contains programs for creating, checking, and maintaining
+ ext2/3/4-based file systems.
+
+Package: e2fsprogs-dbg
+Section: debug
+Priority: extra
+Depends: e2fsprogs (= ${binary:Version}), ${misc:Depends}
+Architecture: any
+Description: debugging information for e2fsprogs
+ This package includes the debug information useful for debugging e2fsprogs
+ and its libraries, contained in the e2fsprogs and e2fsck-static packages.
+ The debug information is used for execution tracing and core
+ dump analysis. 
+ifdef(`UTIL_LINUX_NG',,``
+Package: uuid-runtime-dbg
+Section: debug
+Priority: extra
+Depends: uuid-runtime (= ${binary:Version}), ${misc:Depends}
+Architecture: any
+Description: debugging information for uuid-runtime
+ This package includes the debug information useful for debugging the
+ uuid runtime programs, contained in the uuid-runtime package.
+ The debugging information is used for execution tracing and core
+ dump analysis.
+'')dnl
+
+Package: e2fslibs-dbg
+Section: debug
+Priority: extra
+Depends: e2fslibs (= ${binary:Version}), ${misc:Depends}
+Architecture: any
+Description: debugging information for e2fslibs
+ This package includes the debug information useful for debugging the
+ ext2fs and e2p libraries, contained in the e2fslibs package.  The debug
+ information is used for execution tracing and core dump analysis.
+
+Package: libcomerr2-dbg
+Section: debug
+Priority: extra
+Depends: libcomerr2 (= ${binary:Version}), ${misc:Depends}
+Architecture: any
+Description: debugging information for libcomerr2
+ This package includes the debug information useful for debugging the
+ com_err library, contained in the libcomerr2 package.  The debugging
+ information is used for execution tracing and core dump analysis.
+
+Package: libss2-dbg
+Section: debug
+Priority: extra
+Depends: libss2 (= ${binary:Version}), ${misc:Depends}
+Architecture: any
+Description: debugging information for libss2
+ This package includes the debug information useful for debugging the
+ ss library, contained in the libss2 package.  The debug information
+ is used for execution tracing and core dump analysis.
+ifdef(`UTIL_LINUX_NG',,``
+Package: libblkid1-dbg
+Section: debug
+Priority: extra
+Depends: libblkid1 (= ${binary:Version}), ${misc:Depends}
+Architecture: any
+Description: debugging information for libblkid1
+ This package includes the debug information useful for debugging the
+ blkid library, contained in the libblkid1 package.  The debug
+ information is used for execution tracing and core dump analysis.
+
+Package: libuuid1-dbg
+Section: debug
+Priority: extra
+Depends: libuuid1 (= ${binary:Version}), ${misc:Depends}
+Architecture: any
+Description: debugging information for libuuid1
+ This package includes the debug information useful for debugging the
+ UUID library, contained in the libuuid1 package.  The debug
+ information is used for execution tracing and core dump analysis.
+'')dnl
diff --git a/e2fsprogs/debian/copyright b/e2fsprogs/debian/copyright
new file mode 100644
index 0000000..94a4d62
--- /dev/null
+++ b/e2fsprogs/debian/copyright
@@ -0,0 +1,73 @@
+This is the Debian GNU/Linux prepackaged version of the EXT2 file
+system utilities (e2fsck, mke2fs, etc.).  The EXT2 utilities were
+written by Theodore Ts'o <tytso@mit.edu> and Remy Card <card@masi.ibp.fr>.
+
+Sources were obtained from http://sourceforge.net/projects/e2fsprogs
+
+Packaging is Copyright (c) 2003-2007 Theodore Ts'o <tytso@mit.edu>
+             Copyright (c) 1997-2003 Yann Dirson <dirson@debian.org>
+	     Copyright (c) 2001 Alcove <http://www.alcove.com/>
+	     Copyright (c) 1997 Klee Dienes
+	     Copyright (c) 1995-1996 Michael Nonweiler <mrn20@cam.ac.uk>
+
+Upstream Author: Theodore Ts'o <tytso@mit.edu>
+
+Copyright notice:
+
+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.
+
+	Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 
+	2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Theodore Ts'o
+
+On Debian GNU systems, the complete text of the GNU General Public
+License can be found in `/usr/share/common-licenses/GPL-2'.  The
+complete text of the GNU Library General Public License can be found
+in '/usr/share/common-licenses/LGPL-2'.
+
+
+The license used for lib/et and lib/ss libraries is:
+
+   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.
+
+The license used for lib/uuid is:
+
+   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/e2fsprogs/debian/e2fsck-static.copyright b/e2fsprogs/debian/e2fsck-static.copyright
new file mode 100644
index 0000000..82bdc67
--- /dev/null
+++ b/e2fsprogs/debian/e2fsck-static.copyright
@@ -0,0 +1,26 @@
+This is the Debian GNU/Linux prepackaged version of the static EXT2
+file system consistency checker (e2fsck.static).  The EXT2 utilities
+were written by Theodore Ts'o <tytso@mit.edu> and Remy Card
+<card@masi.ibp.fr>.
+
+Sources were obtained from http://sourceforge.net/projects/e2fsprogs
+
+Packaging is Copyright (c) 2003-2006 Theodore Ts'o <tytso@mit.edu>
+             Copyright (c) 1997-2003 Yann Dirson <dirson@debian.org>
+	     Copyright (c) 2001 Alcove <http://www.alcove.com/>
+	     Copyright (c) 1997 Klee Dienes
+	     Copyright (c) 1995-1996 Michael Nonweiler <mrn20@cam.ac.uk>
+
+Upstream Author: Theodore Ts'o <tytso@mit.edu>
+
+Copyright notice:
+
+This package, the EXT2 filesystem utilities, is protected by the GNU
+Public License.
+
+	Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+	2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Theodore Ts'o
+
+On Debian GNU systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-2'.
+
diff --git a/e2fsprogs/debian/e2fsck-static.files b/e2fsprogs/debian/e2fsck-static.files
new file mode 100644
index 0000000..15a7716
--- /dev/null
+++ b/e2fsprogs/debian/e2fsck-static.files
@@ -0,0 +1,2 @@
+/sbin/e2fsck.static
+/usr/share/man/man8/e2fsck.static*
diff --git a/e2fsprogs/debian/e2fsck-static.preinst b/e2fsprogs/debian/e2fsck-static.preinst
new file mode 100644
index 0000000..e756ade
--- /dev/null
+++ b/e2fsprogs/debian/e2fsck-static.preinst
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# Abort on error.
+set -e
+
+PKG=e2fsck-static
+DOCLNK=/usr/share/doc/$PKG
+if test "$1" = upgrade \
+    -a -L $DOCLNK
+then
+    rm $DOCLNK
+fi
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/e2fsprogs/debian/e2fslibs-dev.doc-base b/e2fsprogs/debian/e2fslibs-dev.doc-base
new file mode 100644
index 0000000..19d04f4
--- /dev/null
+++ b/e2fsprogs/debian/e2fslibs-dev.doc-base
@@ -0,0 +1,10 @@
+Document: libext2fs
+Title: The EXT2FS library
+Author: Theodore Ts'o
+Abstract: The EXT2FS library is designed to allow
+ user-level programs to manipulate an ext2 filesystem.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/e2fslibs/html-info/libext2fs.html
+Files: /usr/share/doc/e2fslibs/html-info/*.html 
diff --git a/e2fsprogs/debian/e2fslibs-dev.files.in b/e2fsprogs/debian/e2fslibs-dev.files.in
new file mode 100644
index 0000000..b2cd6c9
--- /dev/null
+++ b/e2fsprogs/debian/e2fslibs-dev.files.in
@@ -0,0 +1,9 @@
+usr/lib/*/libext2fs*.so
+usr/lib/*/libext2fs*.a
+usr/lib/*/libe2p*.so
+usr/lib/*/libe2p*.a
+usr/include/ext2fs
+usr/include/e2p
+usr/share/info/libext2fs.info*
+usr/lib/*/pkgconfig/e2p.pc
+usr/lib/*/pkgconfig/ext2fs.pc
diff --git a/e2fsprogs/debian/e2fslibs.files.in b/e2fsprogs/debian/e2fslibs.files.in
new file mode 100644
index 0000000..11198f7
--- /dev/null
+++ b/e2fsprogs/debian/e2fslibs.files.in
@@ -0,0 +1,2 @@
+lib/*/libext2fs*.so.*
+lib/*/libe2p*.so.*
diff --git a/e2fsprogs/debian/e2fslibs.symbols b/e2fsprogs/debian/e2fslibs.symbols
new file mode 100644
index 0000000..f95f477
--- /dev/null
+++ b/e2fsprogs/debian/e2fslibs.symbols
@@ -0,0 +1,553 @@
+libe2p.so.2 e2fslibs #MINVER#
+ e2p_edit_feature2@Base 1.40.7
+ e2p_edit_feature@Base 1.37
+ e2p_edit_mntopts@Base 1.37
+ e2p_feature2string@Base 1.37
+ e2p_hash2string@Base 1.37
+ e2p_is_null_uuid@Base 1.37
+ e2p_jrnl_feature2string@Base 1.41.1
+ e2p_jrnl_string2feature@Base 1.41.1
+ e2p_mntopt2string@Base 1.37
+ e2p_os2string@Base 1.37
+ e2p_percent@Base 1.40
+ e2p_string2feature@Base 1.37
+ e2p_string2hash@Base 1.37
+ e2p_string2mntopt@Base 1.37
+ e2p_string2os@Base 1.37
+ e2p_uuid2str@Base 1.37
+ e2p_uuid_to_str@Base 1.37
+ fgetflags@Base 1.37
+ fgetversion@Base 1.37
+ fsetflags@Base 1.37
+ fsetversion@Base 1.37
+ getflags@Base 1.37
+ getversion@Base 1.37
+ iterate_on_dir@Base 1.37
+ list_super2@Base 1.37
+ list_super@Base 1.37
+ parse_num_blocks2@Base 1.42
+ parse_num_blocks@Base 1.37
+ print_flags@Base 1.37
+ print_fs_errors@Base 1.37
+ print_fs_state@Base 1.37
+ setflags@Base 1.37
+ setversion@Base 1.37
+libext2fs.so.2 e2fslibs #MINVER#
+ badblocks_list_add@Base 1.37
+ badblocks_list_create@Base 1.37
+ badblocks_list_free@Base 1.37
+ badblocks_list_iterate@Base 1.37
+ badblocks_list_iterate_begin@Base 1.37
+ badblocks_list_iterate_end@Base 1.37
+ badblocks_list_test@Base 1.37
+ et_ext2_error_table@Base 1.37
+ ext2fs_add_dir_block2@Base 1.42
+ ext2fs_add_dir_block@Base 1.37
+ ext2fs_add_journal_device@Base 1.37
+ ext2fs_add_journal_inode@Base 1.37
+ ext2fs_adjust_ea_refcount2@Base 1.42
+ ext2fs_adjust_ea_refcount@Base 1.37
+ ext2fs_alloc_block2@Base 1.42
+ ext2fs_alloc_block@Base 1.37
+ ext2fs_alloc_generic_bmap@Base 1.42
+ ext2fs_allocate_block_bitmap@Base 1.37
+ ext2fs_allocate_generic_bitmap@Base 1.37
+ ext2fs_allocate_group_table@Base 1.37
+ ext2fs_allocate_inode_bitmap@Base 1.37
+ ext2fs_allocate_subcluster_bitmap@Base 1.42
+ ext2fs_allocate_tables@Base 1.37
+ ext2fs_badblocks_copy@Base 1.37
+ ext2fs_badblocks_equal@Base 1.37
+ ext2fs_badblocks_list_add@Base 1.37
+ ext2fs_badblocks_list_create@Base 1.37
+ ext2fs_badblocks_list_del@Base 1.37
+ ext2fs_badblocks_list_free@Base 1.37
+ ext2fs_badblocks_list_iterate@Base 1.37
+ ext2fs_badblocks_list_iterate_begin@Base 1.37
+ ext2fs_badblocks_list_iterate_end@Base 1.37
+ ext2fs_badblocks_list_test@Base 1.37
+ ext2fs_bg_checksum@Base 1.42
+ ext2fs_bg_checksum_set@Base 1.42
+ ext2fs_bg_flags@Base 1.42
+ ext2fs_bg_flags_clear@Base 1.42
+ ext2fs_bg_flags_set@Base 1.42
+ ext2fs_bg_flags_test@Base 1.42
+ ext2fs_bg_flags_zap@Base 1.42
+ ext2fs_bg_free_blocks_count@Base 1.42
+ ext2fs_bg_free_blocks_count_set@Base 1.42
+ ext2fs_bg_free_inodes_count@Base 1.42
+ ext2fs_bg_free_inodes_count_set@Base 1.42
+ ext2fs_bg_has_super@Base 1.37
+ ext2fs_bg_itable_unused@Base 1.42
+ ext2fs_bg_itable_unused_set@Base 1.42
+ ext2fs_bg_used_dirs_count@Base 1.42
+ ext2fs_bg_used_dirs_count_set@Base 1.42
+ ext2fs_bitcount@Base 1.42.7
+ ext2fs_blkmap64_bitarray@Base 1.42
+ ext2fs_blkmap64_rbtree@Base 1.42.1
+ ext2fs_block_alloc_stats2@Base 1.42
+ ext2fs_block_alloc_stats@Base 1.37
+ ext2fs_block_bitmap_loc@Base 1.42
+ ext2fs_block_bitmap_loc_set@Base 1.42
+ ext2fs_block_iterate2@Base 1.37
+ ext2fs_block_iterate3@Base 1.42
+ ext2fs_block_iterate@Base 1.37
+ ext2fs_blocks_count@Base 1.42
+ ext2fs_blocks_count_add@Base 1.42
+ ext2fs_blocks_count_set@Base 1.42
+ ext2fs_bmap2@Base 1.41.0
+ ext2fs_bmap@Base 1.37
+ ext2fs_check_desc@Base 1.37
+ ext2fs_check_directory@Base 1.37
+ ext2fs_check_if_mounted@Base 1.37
+ ext2fs_check_mount_point@Base 1.37
+ ext2fs_clear_bit64@Base 1.42
+ ext2fs_clear_bit@Base 1.37
+ ext2fs_clear_block_bitmap@Base 1.37
+ ext2fs_clear_generic_bitmap@Base 1.41.0
+ ext2fs_clear_generic_bmap@Base 1.42
+ ext2fs_clear_inode_bitmap@Base 1.37
+ ext2fs_close2@Base 1.42
+ ext2fs_close@Base 1.37
+ ext2fs_close_inode_scan@Base 1.37
+ ext2fs_compare_block_bitmap@Base 1.37
+ ext2fs_compare_generic_bitmap@Base 1.41.0
+ ext2fs_compare_generic_bmap@Base 1.42
+ ext2fs_compare_inode_bitmap@Base 1.37
+ ext2fs_convert_subcluster_bitmap@Base 1.42
+ ext2fs_copy_bitmap@Base 1.37
+ ext2fs_copy_dblist@Base 1.37
+ ext2fs_copy_generic_bitmap@Base 1.41.0
+ ext2fs_copy_generic_bmap@Base 1.42
+ ext2fs_crc16@Base 1.41.1
+ ext2fs_crc32c_be@Base 1.42
+ ext2fs_crc32c_le@Base 1.42
+ ext2fs_create_icount2@Base 1.37
+ ext2fs_create_icount@Base 1.37
+ ext2fs_create_icount_tdb@Base 1.40
+ ext2fs_create_journal_superblock@Base 1.37
+ ext2fs_create_resize_inode@Base 1.37
+ ext2fs_dblist_count2@Base 1.42
+ ext2fs_dblist_count@Base 1.37
+ ext2fs_dblist_dir_iterate@Base 1.37
+ ext2fs_dblist_drop_last@Base 1.40.8
+ ext2fs_dblist_get_last2@Base 1.42
+ ext2fs_dblist_get_last@Base 1.40.8
+ ext2fs_dblist_iterate2@Base 1.42
+ ext2fs_dblist_iterate@Base 1.37
+ ext2fs_dblist_sort2@Base 1.42
+ ext2fs_dblist_sort@Base 1.37
+ ext2fs_default_journal_size@Base 1.40
+ ext2fs_descriptor_block_loc2@Base 1.42
+ ext2fs_descriptor_block_loc@Base 1.37
+ ext2fs_dir_iterate2@Base 1.37
+ ext2fs_dir_iterate@Base 1.37
+ ext2fs_dirhash@Base 1.37
+ ext2fs_div64_ceil@Base 1.42
+ ext2fs_div_ceil@Base 1.40
+ ext2fs_dup_handle@Base 1.37
+ ext2fs_expand_dir@Base 1.37
+ ext2fs_ext_attr_hash_entry@Base 1.41.0
+ ext2fs_extent_delete@Base 1.41.0
+ ext2fs_extent_fix_parents@Base 1.42.7
+ ext2fs_extent_free@Base 1.41.0
+ ext2fs_extent_get@Base 1.41.0
+ ext2fs_extent_get_info@Base 1.41.0
+ ext2fs_extent_goto@Base 1.41.0
+ ext2fs_extent_goto2@Base 1.42.7
+ ext2fs_extent_header_verify@Base 1.41.0
+ ext2fs_extent_insert@Base 1.41.0
+ ext2fs_extent_node_split@Base 1.42.7
+ ext2fs_extent_open2@Base 1.41.6
+ ext2fs_extent_open@Base 1.41.0
+ ext2fs_extent_replace@Base 1.41.0
+ ext2fs_extent_set_bmap@Base 1.41.0
+ ext2fs_fast_clear_bit64@Base 1.42
+ ext2fs_fast_clear_bit@Base 1.39
+ ext2fs_fast_mark_block_bitmap2@Base 1.42
+ ext2fs_fast_mark_block_bitmap@Base 1.37
+ ext2fs_fast_mark_block_bitmap_range2@Base 1.42
+ ext2fs_fast_mark_block_bitmap_range@Base 1.37
+ ext2fs_fast_mark_inode_bitmap2@Base 1.42
+ ext2fs_fast_mark_inode_bitmap@Base 1.37
+ ext2fs_fast_set_bit64@Base 1.42
+ ext2fs_fast_set_bit@Base 1.39
+ ext2fs_fast_test_block_bitmap2@Base 1.42
+ ext2fs_fast_test_block_bitmap@Base 1.37
+ ext2fs_fast_test_block_bitmap_range2@Base 1.42
+ ext2fs_fast_test_block_bitmap_range@Base 1.37
+ ext2fs_fast_test_inode_bitmap2@Base 1.42
+ ext2fs_fast_test_inode_bitmap@Base 1.37
+ ext2fs_fast_unmark_block_bitmap2@Base 1.42
+ ext2fs_fast_unmark_block_bitmap@Base 1.37
+ ext2fs_fast_unmark_block_bitmap_range2@Base 1.42
+ ext2fs_fast_unmark_block_bitmap_range@Base 1.37
+ ext2fs_fast_unmark_inode_bitmap2@Base 1.42
+ ext2fs_fast_unmark_inode_bitmap@Base 1.37
+ ext2fs_file_acl_block@Base 1.42
+ ext2fs_file_acl_block_set@Base 1.42
+ ext2fs_file_block_offset_too_big@Base 1.42.9
+ ext2fs_file_close@Base 1.37
+ ext2fs_file_flush@Base 1.37
+ ext2fs_file_get_fs@Base 1.37
+ ext2fs_file_get_inode@Base 1.42
+ ext2fs_file_get_inode_num@Base 1.42.1
+ ext2fs_file_get_lsize@Base 1.37
+ ext2fs_file_get_size@Base 1.37
+ ext2fs_file_llseek@Base 1.37
+ ext2fs_file_lseek@Base 1.37
+ ext2fs_file_open2@Base 1.37
+ ext2fs_file_open@Base 1.37
+ ext2fs_file_read@Base 1.37
+ ext2fs_file_set_size2@Base 1.42
+ ext2fs_file_set_size@Base 1.37
+ ext2fs_file_write@Base 1.37
+ ext2fs_find_block_device@Base 1.37
+ ext2fs_find_first_zero_block_bitmap2@Base 1.42.2
+ ext2fs_find_first_zero_generic_bitmap@Base 1.42.3
+ ext2fs_find_first_zero_generic_bmap@Base 1.42.2
+ ext2fs_find_first_zero_inode_bitmap2@Base 1.42.2
+ ext2fs_flush2@Base 1.42
+ ext2fs_flush@Base 1.37
+ ext2fs_flush_icache@Base 1.37
+ ext2fs_follow_link@Base 1.37
+ ext2fs_free@Base 1.37
+ ext2fs_free_block_bitmap@Base 1.37
+ ext2fs_free_blocks_count@Base 1.42
+ ext2fs_free_blocks_count_add@Base 1.42
+ ext2fs_free_blocks_count_set@Base 1.42
+ ext2fs_free_dblist@Base 1.37
+ ext2fs_free_generic_bitmap@Base 1.37
+ ext2fs_free_generic_bmap@Base 1.42
+ ext2fs_free_icount@Base 1.37
+ ext2fs_free_inode_bitmap@Base 1.37
+ ext2fs_free_mem@Base 1.37
+ ext2fs_fstat@Base 1.42
+ ext2fs_fudge_block_bitmap_end2@Base 1.42
+ ext2fs_fudge_block_bitmap_end@Base 1.37
+ ext2fs_fudge_generic_bitmap_end@Base 1.41.0
+ ext2fs_fudge_generic_bmap_end@Base 1.42
+ ext2fs_fudge_inode_bitmap_end@Base 1.37
+ ext2fs_get_array@Base 1.40.3
+ ext2fs_get_arrayzero@Base 1.42
+ ext2fs_get_bitmap_granularity@Base 1.42
+ ext2fs_get_block_bitmap_end2@Base 1.42
+ ext2fs_get_block_bitmap_end@Base 1.37
+ ext2fs_get_block_bitmap_range2@Base 1.42
+ ext2fs_get_block_bitmap_range@Base 1.41.0
+ ext2fs_get_block_bitmap_start2@Base 1.42
+ ext2fs_get_block_bitmap_start@Base 1.37
+ ext2fs_get_blocks@Base 1.37
+ ext2fs_get_data_io@Base 1.37
+ ext2fs_get_device_phys_sectsize@Base 1.41.12
+ ext2fs_get_device_sectsize@Base 1.37
+ ext2fs_get_device_size2@Base 1.41.4
+ ext2fs_get_device_size@Base 1.37
+ ext2fs_get_dio_alignment@Base 1.42.3
+ ext2fs_get_free_blocks2@Base 1.42
+ ext2fs_get_free_blocks@Base 1.37
+ ext2fs_get_generic_bitmap_end@Base 1.41.0
+ ext2fs_get_generic_bitmap_range@Base 1.41.0
+ ext2fs_get_generic_bitmap_start@Base 1.41.0
+ ext2fs_get_generic_bmap_end@Base 1.42
+ ext2fs_get_generic_bmap_range@Base 1.42
+ ext2fs_get_generic_bmap_start@Base 1.42
+ ext2fs_get_icount_size@Base 1.37
+ ext2fs_get_inode_bitmap_end2@Base 1.42
+ ext2fs_get_inode_bitmap_end@Base 1.37
+ ext2fs_get_inode_bitmap_range2@Base 1.42
+ ext2fs_get_inode_bitmap_range@Base 1.41.0
+ ext2fs_get_inode_bitmap_start2@Base 1.42
+ ext2fs_get_inode_bitmap_start@Base 1.37
+ ext2fs_get_library_version@Base 1.37
+ ext2fs_get_mem@Base 1.37
+ ext2fs_get_memalign@Base 1.41.13
+ ext2fs_get_memzero@Base 1.42
+ ext2fs_get_next_inode@Base 1.37
+ ext2fs_get_next_inode_full@Base 1.37
+ ext2fs_get_num_dirs@Base 1.37
+ ext2fs_get_pathname@Base 1.37
+ ext2fs_get_rec_len@Base 1.41.7
+ ext2fs_group_blocks_count@Base 1.42
+ ext2fs_group_desc_csum@Base 1.42.2
+ ext2fs_group_desc@Base 1.42
+ ext2fs_group_desc_csum_set@Base 1.41.0
+ ext2fs_group_desc_csum_verify@Base 1.41.0
+ ext2fs_group_first_block2@Base 1.42
+ ext2fs_group_first_block@Base 1.40
+ ext2fs_group_last_block2@Base 1.42
+ ext2fs_group_last_block@Base 1.40
+ ext2fs_group_of_blk2@Base 1.42
+ ext2fs_group_of_blk@Base 1.37
+ ext2fs_group_of_ino@Base 1.37
+ ext2fs_iblk_add_blocks@Base 1.41.0
+ ext2fs_iblk_set@Base 1.41.0
+ ext2fs_iblk_sub_blocks@Base 1.41.0
+ ext2fs_icount_decrement@Base 1.37
+ ext2fs_icount_fetch@Base 1.37
+ ext2fs_icount_increment@Base 1.37
+ ext2fs_icount_store@Base 1.37
+ ext2fs_icount_validate@Base 1.37
+ ext2fs_image_bitmap_read@Base 1.37
+ ext2fs_image_bitmap_write@Base 1.37
+ ext2fs_image_inode_read@Base 1.37
+ ext2fs_image_inode_write@Base 1.37
+ ext2fs_image_super_read@Base 1.37
+ ext2fs_image_super_write@Base 1.37
+ ext2fs_init_dblist@Base 1.37
+ ext2fs_initialize@Base 1.37
+ ext2fs_inode_alloc_stats2@Base 1.37
+ ext2fs_inode_alloc_stats@Base 1.37
+ ext2fs_inode_bitmap_loc@Base 1.42
+ ext2fs_inode_bitmap_loc_set@Base 1.42
+ ext2fs_inode_data_blocks2@Base 1.42
+ ext2fs_inode_data_blocks@Base 1.37
+ ext2fs_inode_has_valid_blocks@Base 1.37
+ ext2fs_inode_has_valid_blocks2@Base 1.42
+ ext2fs_inode_i_blocks@Base 1.42
+ ext2fs_inode_io_intern2@Base 1.37
+ ext2fs_inode_io_intern@Base 1.37
+ ext2fs_inode_scan_flags@Base 1.37
+ ext2fs_inode_scan_goto_blockgroup@Base 1.37
+ ext2fs_inode_table_loc@Base 1.42
+ ext2fs_inode_table_loc_set@Base 1.42
+ ext2fs_link@Base 1.37
+ ext2fs_llseek@Base 1.37
+ ext2fs_lookup@Base 1.37
+ ext2fs_make_generic_bitmap@Base 1.41.0
+ ext2fs_map_cluster_block@Base 1.42.9
+ ext2fs_mark_bb_dirty@Base 1.37
+ ext2fs_mark_block_bitmap2@Base 1.42
+ ext2fs_mark_block_bitmap@Base 1.37
+ ext2fs_mark_block_bitmap_range2@Base 1.42
+ ext2fs_mark_block_bitmap_range@Base 1.37
+ ext2fs_mark_changed@Base 1.37
+ ext2fs_mark_generic_bitmap@Base 1.37
+ ext2fs_mark_generic_bmap@Base 1.42
+ ext2fs_mark_ib_dirty@Base 1.37
+ ext2fs_mark_inode_bitmap2@Base 1.42
+ ext2fs_mark_inode_bitmap@Base 1.37
+ ext2fs_mark_super_dirty@Base 1.37
+ ext2fs_mark_valid@Base 1.37
+ ext2fs_mem_is_zero@Base 1.42
+ ext2fs_mkdir@Base 1.37
+ ext2fs_mmp_clear@Base 1.42
+ ext2fs_mmp_init@Base 1.42
+ ext2fs_mmp_new_seq@Base 1.42
+ ext2fs_mmp_read@Base 1.42
+ ext2fs_mmp_start@Base 1.42
+ ext2fs_mmp_stop@Base 1.42
+ ext2fs_mmp_update@Base 1.42
+ ext2fs_mmp_write@Base 1.42
+ ext2fs_namei@Base 1.37
+ ext2fs_namei_follow@Base 1.37
+ ext2fs_native_flag@Base 1.37
+ ext2fs_new_block2@Base 1.42
+ ext2fs_new_block@Base 1.37
+ ext2fs_new_dir_block@Base 1.37
+ ext2fs_new_inode@Base 1.37
+ ext2fs_numeric_progress_close@Base 1.42
+ ext2fs_numeric_progress_init@Base 1.42
+ ext2fs_numeric_progress_update@Base 1.42
+ ext2fs_open2@Base 1.37
+ ext2fs_open@Base 1.37
+ ext2fs_open_file@Base 1.42
+ ext2fs_open_inode_scan@Base 1.37
+ ext2fs_parse_version_string@Base 1.37
+ ext2fs_process_dir_block@Base 1.37
+ ext2fs_punch@Base 1.42
+ ext2fs_r_blocks_count@Base 1.42
+ ext2fs_r_blocks_count_add@Base 1.42
+ ext2fs_r_blocks_count_set@Base 1.42
+ ext2fs_rb_augment_erase_begin@Base 1.42.1
+ ext2fs_rb_augment_erase_end@Base 1.42.1
+ ext2fs_rb_augment_insert@Base 1.42.1
+ ext2fs_rb_erase@Base 1.42.1
+ ext2fs_rb_first@Base 1.42.1
+ ext2fs_rb_insert_color@Base 1.42.1
+ ext2fs_rb_last@Base 1.42.1
+ ext2fs_rb_next@Base 1.42.1
+ ext2fs_rb_prev@Base 1.42.1
+ ext2fs_rb_replace_node@Base 1.42.1
+ ext2fs_read_bb_FILE2@Base 1.37
+ ext2fs_read_bb_FILE@Base 1.37
+ ext2fs_read_bb_inode@Base 1.37
+ ext2fs_read_bitmaps@Base 1.37
+ ext2fs_read_block_bitmap@Base 1.37
+ ext2fs_read_dir_block2@Base 1.37
+ ext2fs_read_dir_block3@Base 1.42
+ ext2fs_read_dir_block@Base 1.37
+ ext2fs_read_ext_attr2@Base 1.42
+ ext2fs_read_ext_attr@Base 1.37
+ ext2fs_read_ind_block@Base 1.37
+ ext2fs_read_inode@Base 1.37
+ ext2fs_read_inode_bitmap@Base 1.37
+ ext2fs_read_inode_full@Base 1.37
+ ext2fs_reserve_super_and_bgd@Base 1.37
+ ext2fs_resize_block_bitmap2@Base 1.42
+ ext2fs_resize_block_bitmap@Base 1.37
+ ext2fs_resize_generic_bitmap@Base 1.37
+ ext2fs_resize_generic_bmap@Base 1.42
+ ext2fs_resize_inode_bitmap2@Base 1.42
+ ext2fs_resize_inode_bitmap@Base 1.37
+ ext2fs_resize_mem@Base 1.37
+ ext2fs_rewrite_to_io@Base 1.37
+ ext2fs_set_alloc_block_callback@Base 1.41.0
+ ext2fs_set_bit64@Base 1.42
+ ext2fs_set_bit@Base 1.37
+ ext2fs_set_bitmap_padding@Base 1.37
+ ext2fs_set_block_alloc_stats_callback@Base 1.41.0
+ ext2fs_set_block_bitmap_range2@Base 1.42
+ ext2fs_set_block_bitmap_range@Base 1.41.0
+ ext2fs_set_data_io@Base 1.37
+ ext2fs_set_dir_block2@Base 1.42
+ ext2fs_set_dir_block@Base 1.37
+ ext2fs_set_gdt_csum@Base 1.41.0
+ ext2fs_set_generic_bitmap_padding@Base 1.41.0
+ ext2fs_set_generic_bitmap_range@Base 1.41.0
+ ext2fs_set_generic_bmap_padding@Base 1.42
+ ext2fs_set_generic_bmap_range@Base 1.42
+ ext2fs_set_inode_bitmap_range2@Base 1.42
+ ext2fs_set_inode_bitmap_range@Base 1.41.0
+ ext2fs_set_inode_callback@Base 1.37
+ ext2fs_set_rec_len@Base 1.41.7
+ ext2fs_stat@Base 1.42
+ ext2fs_super_and_bgd_loc2@Base 1.42
+ ext2fs_super_and_bgd_loc@Base 1.37
+ ext2fs_swab16@Base 1.37
+ ext2fs_swab32@Base 1.37
+ ext2fs_swab64@Base 1.40
+ ext2fs_symlink@Base 1.42.7
+ ext2fs_sync_device@Base 1.37
+ ext2fs_tdb_append@Base 1.40
+ ext2fs_tdb_chainlock@Base 1.40
+ ext2fs_tdb_chainlock_mark@Base 1.40.7
+ ext2fs_tdb_chainlock_nonblock@Base 1.40.7
+ ext2fs_tdb_chainlock_read@Base 1.40
+ ext2fs_tdb_chainlock_unmark@Base 1.40.7
+ ext2fs_tdb_chainunlock@Base 1.40
+ ext2fs_tdb_chainunlock_read@Base 1.40
+ ext2fs_tdb_close@Base 1.40
+ ext2fs_tdb_delete@Base 1.40
+ ext2fs_tdb_dump_all@Base 1.40
+ ext2fs_tdb_enable_seqnum@Base 1.40.7
+ ext2fs_tdb_error@Base 1.40
+ ext2fs_tdb_errorstr@Base 1.40
+ ext2fs_tdb_exists@Base 1.40
+ ext2fs_tdb_fd@Base 1.40
+ ext2fs_tdb_fetch@Base 1.40
+ ext2fs_tdb_firstkey@Base 1.40
+ ext2fs_tdb_get_flags@Base 1.40
+ ext2fs_tdb_get_logging_private@Base 1.40
+ ext2fs_tdb_get_seqnum@Base 1.40
+ ext2fs_tdb_hash_size@Base 1.40
+ ext2fs_tdb_increment_seqnum_nonblock@Base 1.40.7
+ ext2fs_tdb_lock_nonblock@Base 1.40.7
+ ext2fs_tdb_lockall@Base 1.40
+ ext2fs_tdb_lockall_mark@Base 1.40.7
+ ext2fs_tdb_lockall_nonblock@Base 1.40.7
+ ext2fs_tdb_lockall_read@Base 1.40
+ ext2fs_tdb_lockall_read_nonblock@Base 1.40.7
+ ext2fs_tdb_lockall_unmark@Base 1.40.7
+ ext2fs_tdb_log_fn@Base 1.40
+ ext2fs_tdb_map_size@Base 1.40
+ ext2fs_tdb_name@Base 1.40
+ ext2fs_tdb_nextkey@Base 1.40
+ ext2fs_tdb_open@Base 1.40
+ ext2fs_tdb_open_ex@Base 1.40
+ ext2fs_tdb_parse_record@Base 1.40
+ ext2fs_tdb_printfreelist@Base 1.40
+ ext2fs_tdb_reopen@Base 1.40
+ ext2fs_tdb_reopen_all@Base 1.40
+ ext2fs_tdb_set_logging_function@Base 1.40
+ ext2fs_tdb_set_max_dead@Base 1.40
+ ext2fs_tdb_store@Base 1.40
+ ext2fs_tdb_transaction_cancel@Base 1.40
+ ext2fs_tdb_transaction_commit@Base 1.40
+ ext2fs_tdb_transaction_recover@Base 1.40
+ ext2fs_tdb_transaction_start@Base 1.40
+ ext2fs_tdb_traverse@Base 1.40
+ ext2fs_tdb_traverse_read@Base 1.40
+ ext2fs_tdb_unlockall@Base 1.40
+ ext2fs_tdb_unlockall_read@Base 1.40
+ ext2fs_tdb_validate_freelist@Base 1.40
+ ext2fs_test_bb_dirty@Base 1.37
+ ext2fs_test_bit64@Base 1.42
+ ext2fs_test_bit@Base 1.37
+ ext2fs_test_block_bitmap2@Base 1.42
+ ext2fs_test_block_bitmap@Base 1.37
+ ext2fs_test_block_bitmap_range2@Base 1.42
+ ext2fs_test_block_bitmap_range@Base 1.37
+ ext2fs_test_changed@Base 1.37
+ ext2fs_test_generic_bitmap@Base 1.37
+ ext2fs_test_generic_bmap@Base 1.42
+ ext2fs_test_ib_dirty@Base 1.37
+ ext2fs_test_inode_bitmap2@Base 1.42
+ ext2fs_test_inode_bitmap@Base 1.37
+ ext2fs_test_inode_bitmap_range@Base 1.41.8
+ ext2fs_test_valid@Base 1.37
+ ext2fs_u32_copy@Base 1.37
+ ext2fs_u32_list_add@Base 1.37
+ ext2fs_u32_list_count@Base 1.37
+ ext2fs_u32_list_create@Base 1.37
+ ext2fs_u32_list_del@Base 1.37
+ ext2fs_u32_list_equal@Base 1.37
+ ext2fs_u32_list_find@Base 1.37
+ ext2fs_u32_list_free@Base 1.37
+ ext2fs_u32_list_iterate@Base 1.37
+ ext2fs_u32_list_iterate_begin@Base 1.37
+ ext2fs_u32_list_iterate_end@Base 1.37
+ ext2fs_u32_list_test@Base 1.37
+ ext2fs_unlink@Base 1.37
+ ext2fs_unmark_block_bitmap2@Base 1.42
+ ext2fs_unmark_block_bitmap@Base 1.37
+ ext2fs_unmark_block_bitmap_range2@Base 1.42
+ ext2fs_unmark_block_bitmap_range@Base 1.37
+ ext2fs_unmark_generic_bitmap@Base 1.37
+ ext2fs_unmark_generic_bmap@Base 1.42
+ ext2fs_unmark_inode_bitmap2@Base 1.42
+ ext2fs_unmark_inode_bitmap@Base 1.37
+ ext2fs_unmark_valid@Base 1.37
+ ext2fs_update_bb_inode@Base 1.37
+ ext2fs_update_dynamic_rev@Base 1.37
+ ext2fs_warn_bitmap2@Base 1.37
+ ext2fs_warn_bitmap32@Base 1.42
+ ext2fs_warn_bitmap@Base 1.37
+ ext2fs_write_bb_FILE@Base 1.37
+ ext2fs_write_bitmaps@Base 1.37
+ ext2fs_write_block_bitmap@Base 1.37
+ ext2fs_write_dir_block2@Base 1.37
+ ext2fs_write_dir_block3@Base 1.42
+ ext2fs_write_dir_block@Base 1.37
+ ext2fs_write_ext_attr2@Base 1.42
+ ext2fs_write_ext_attr@Base 1.37
+ ext2fs_write_ind_block@Base 1.37
+ ext2fs_write_inode@Base 1.37
+ ext2fs_write_inode_bitmap@Base 1.37
+ ext2fs_write_inode_full@Base 1.37
+ ext2fs_write_new_inode@Base 1.37
+ ext2fs_zero_blocks2@Base 1.42
+ ext2fs_zero_blocks@Base 1.41.0
+ initialize_ext2_error_table@Base 1.37
+ initialize_ext2_error_table_r@Base 1.37
+ inode_io_manager@Base 1.37
+ io_channel_alloc_buf@Base 1.42.3
+ io_channel_discard@Base 1.42
+ io_channel_read_blk64@Base 1.41.1
+ io_channel_set_options@Base 1.37
+ io_channel_write_blk64@Base 1.41.1
+ io_channel_write_byte@Base 1.37
+ qcow2_read_header@Base 1.42
+ qcow2_write_raw_image@Base 1.42
+ set_undo_io_backing_manager@Base 1.41.0
+ set_undo_io_backup_file@Base 1.41.0
+ test_io_backing_manager@Base 1.37
+ test_io_cb_read_blk64@Base 1.41.0
+ test_io_cb_read_blk@Base 1.37
+ test_io_cb_set_blksize@Base 1.37
+ test_io_cb_write_blk64@Base 1.41.0
+ test_io_cb_write_blk@Base 1.37
+ test_io_cb_write_byte@Base 1.37
+ test_io_manager@Base 1.37
+ undo_io_manager@Base 1.41.0
+ unix_io_manager@Base 1.37
diff --git a/e2fsprogs/debian/e2fsprogs-udeb.shlibs.local b/e2fsprogs/debian/e2fsprogs-udeb.shlibs.local
new file mode 100644
index 0000000..b41b583
--- /dev/null
+++ b/e2fsprogs/debian/e2fsprogs-udeb.shlibs.local
@@ -0,0 +1,6 @@
+libblkid 1 libblkid1-udeb
+# force the dependency to libblkid1-udeb, even if it don't include the lib
+libcom_err 2 libblkid1-udeb
+libuuid 1 libuuid1-udeb
+libext2fs 2 libblkid1-udeb
+libe2p 2 libblkid1-udeb
diff --git a/e2fsprogs/debian/e2fsprogs.docs b/e2fsprogs/debian/e2fsprogs.docs
new file mode 100644
index 0000000..7af9733
--- /dev/null
+++ b/e2fsprogs/debian/e2fsprogs.docs
@@ -0,0 +1,2 @@
+README
+RELEASE-NOTES
diff --git a/e2fsprogs/debian/e2fsprogs.files b/e2fsprogs/debian/e2fsprogs.files
new file mode 100644
index 0000000..37e54da
--- /dev/null
+++ b/e2fsprogs/debian/e2fsprogs.files
@@ -0,0 +1,6 @@
+sbin
+usr/bin
+usr/sbin
+usr/share/man
+usr/share/locale
+etc
diff --git a/e2fsprogs/debian/e2fsprogs.preinst b/e2fsprogs/debian/e2fsprogs.preinst
new file mode 100644
index 0000000..bfa9f6b
--- /dev/null
+++ b/e2fsprogs/debian/e2fsprogs.preinst
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# Abort on error.
+set -e
+
+PKG=e2fsprogs
+DOCLNK=/usr/share/doc/$PKG
+if test "$1" = upgrade \
+    -a -L $DOCLNK
+then
+    rm $DOCLNK
+fi
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/e2fsprogs/debian/e2fsprogs.shlibs.local.in b/e2fsprogs/debian/e2fsprogs.shlibs.local.in
new file mode 100644
index 0000000..db1b75a
--- /dev/null
+++ b/e2fsprogs/debian/e2fsprogs.shlibs.local.in
@@ -0,0 +1,8 @@
+libcom_err 2 libcomerr2 (>= 1.42~WIP-2011-10-05-1)
+libss 2 libss2 (>= 1.34-1)
+ifdef(`UTIL_LINUX_NG',,
+``libuuid 1 libuuid1 (>= 1.34-1)
+libblkid 1 libblkid1 (>= 1.34-1)
+'')dnl
+libext2fs 2 e2fslibs (= ${Source-Version})
+libe2p 2 e2fslibs (= ${Source-Version})
diff --git a/e2fsprogs/debian/libblkid-dev.files.in b/e2fsprogs/debian/libblkid-dev.files.in
new file mode 100644
index 0000000..7b3da36
--- /dev/null
+++ b/e2fsprogs/debian/libblkid-dev.files.in
@@ -0,0 +1,4 @@
+usr/lib/*/libblkid*.so.*
+usr/include/blkid
+usr/share/man/man3/libblkid.3
+usr/lib/*/pkgconfig/blkid.pc
diff --git a/e2fsprogs/debian/libblkid.copyright b/e2fsprogs/debian/libblkid.copyright
new file mode 100644
index 0000000..8be818b
--- /dev/null
+++ b/e2fsprogs/debian/libblkid.copyright
@@ -0,0 +1,19 @@
+This package was added to the e2fsprogs debian source package by
+Theodore Ts'o <tytso@mit.edu> on Sat Mar 15 15:33:37 EST 2003
+
+It is part of the main e2fsprogs distribution, which can be found at:
+
+	http://sourceforge.net/projects/e2fsprogs
+
+Upstream Author: Theodore Ts'o <tytso@mit.edu>
+
+Copyright:
+
+Copyright (C) 1999, 2001 by Andries Brouwer
+Copyright (C) 1999, 2000, 2003 by Theodore Ts'o
+
+You are free to distribute this software under the terms of the GNU
+Lesser (Library) General Public License.
+
+On Debian systems, the complete text of the GNU Lesser (Library)
+General Public License can be found in /usr/share/common-licenses/LGPL-2.
diff --git a/e2fsprogs/debian/libblkid1.files.in b/e2fsprogs/debian/libblkid1.files.in
new file mode 100644
index 0000000..54ef86d
--- /dev/null
+++ b/e2fsprogs/debian/libblkid1.files.in
@@ -0,0 +1 @@
+lib/*/libblkid*.so.*
diff --git a/e2fsprogs/debian/libblkid1.symbols b/e2fsprogs/debian/libblkid1.symbols
new file mode 100644
index 0000000..5ab91f5
--- /dev/null
+++ b/e2fsprogs/debian/libblkid1.symbols
@@ -0,0 +1,41 @@
+libblkid.so.1 libblkid1 #MINVER#
+ blkid__scan_dir@Base 1.41.1
+ blkid_debug_mask@Base 1.33
+ blkid_dev_devname@Base 1.33
+ blkid_dev_has_tag@Base 1.38
+ blkid_dev_iterate_begin@Base 1.33
+ blkid_dev_iterate_end@Base 1.33
+ blkid_dev_next@Base 1.33
+ blkid_dev_set_search@Base 1.38
+#MISSING: 1.41.1# blkid_devdirs@Base 1.34
+ blkid_devno_to_devname@Base 1.33
+ blkid_find_dev_with_tag@Base 1.33
+ blkid_find_tag_dev@Base 1.33
+ blkid_flush_cache@Base 1.33
+ blkid_free_dev@Base 1.33
+ blkid_free_tag@Base 1.33
+ blkid_gc_cache@Base 1.40
+ blkid_get_cache@Base 1.33
+ blkid_get_dev@Base 1.33
+ blkid_get_dev_size@Base 1.33
+ blkid_get_devname@Base 1.33
+ blkid_get_library_version@Base 1.37
+ blkid_get_tag_value@Base 1.33
+ blkid_known_fstype@Base 1.34
+ blkid_llseek@Base 1.33
+ blkid_new_dev@Base 1.33
+ blkid_parse_tag_string@Base 1.33
+ blkid_parse_version_string@Base 1.37
+ blkid_probe_all@Base 1.33
+ blkid_probe_all_new@Base 1.38
+ blkid_put_cache@Base 1.33
+ blkid_read_cache@Base 1.33
+ blkid_set_tag@Base 1.33
+ blkid_strdup@Base 1.33
+ blkid_strndup@Base 1.33
+ blkid_tag_iterate_begin@Base 1.33
+ blkid_tag_iterate_end@Base 1.33
+ blkid_tag_next@Base 1.33
+ blkid_verify@Base 1.37
+#MISSING: 1.40.7# check_for_modules@Base 1.40.6
+#MISSING: 1.40.7# fs_proc_check@Base 1.40.6
diff --git a/e2fsprogs/debian/libcomerr2.copyright b/e2fsprogs/debian/libcomerr2.copyright
new file mode 100644
index 0000000..578628a
--- /dev/null
+++ b/e2fsprogs/debian/libcomerr2.copyright
@@ -0,0 +1,24 @@
+This is the Debian GNU/Linux prepackaged version of the Common Error
+Description library. It is currently distributed together with the EXT2 file
+system utilities, which are otherwise packaged as "e2fsprogs".
+
+This package was put together by Yann Dirson <dirson@debian.org>,
+from sources obtained from a mirror of:
+ tsx-11.mit.edu:/pub/linux/packages/ext2fs/
+
+From the original distribution:
+
+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.
diff --git a/e2fsprogs/debian/libcomerr2.files.in b/e2fsprogs/debian/libcomerr2.files.in
new file mode 100644
index 0000000..16b039e
--- /dev/null
+++ b/e2fsprogs/debian/libcomerr2.files.in
@@ -0,0 +1 @@
+lib/*/libcom_err*.so.*
diff --git a/e2fsprogs/debian/libcomerr2.symbols b/e2fsprogs/debian/libcomerr2.symbols
new file mode 100644
index 0000000..ce3b74a
--- /dev/null
+++ b/e2fsprogs/debian/libcomerr2.symbols
@@ -0,0 +1,21 @@
+libcom_err.so.2 libcomerr2 #MINVER#
+ _et_dynamic_list@Base 1.38
+ _et_list@Base 1.01
+ add_error_table@Base 1.34
+ add_to_error_table@Base 1.34
+ com_err@Base 1.01
+ com_err_hook@Base 1.01
+ com_err_va@Base 1.01
+ com_right@Base 1.34
+ com_right_r@Base 1.41.11
+ error_message@Base 1.01
+ error_table_name@Base 1.01
+ et_list_lock@Base 1.41.2
+ et_list_unlock@Base 1.41.2
+ free_error_table@Base 1.34
+ init_error_table@Base 1.01
+ initialize_error_table_r@Base 1.34
+ remove_error_table@Base 1.34
+ reset_com_err_hook@Base 1.01
+ set_com_err_gettext@Base 1.41.99
+ set_com_err_hook@Base 1.01
diff --git a/e2fsprogs/debian/libss2.copyright b/e2fsprogs/debian/libss2.copyright
new file mode 100644
index 0000000..eb261c3
--- /dev/null
+++ b/e2fsprogs/debian/libss2.copyright
@@ -0,0 +1,25 @@
+This is the Debian GNU/Linux prepackaged version of the ss
+command-line interface parsing library library. It is currently
+distributed together with the EXT2 file system utilities, which are
+otherwise packaged as "e2fsprogs".
+
+This package was put together by Yann Dirson <dirson@debian.org>,
+from sources obtained from a mirror of:
+ tsx-11.mit.edu:/pub/linux/packages/ext2fs/
+
+From the original distribution:
+
+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.
diff --git a/e2fsprogs/debian/libss2.files.in b/e2fsprogs/debian/libss2.files.in
new file mode 100644
index 0000000..386e185
--- /dev/null
+++ b/e2fsprogs/debian/libss2.files.in
@@ -0,0 +1 @@
+lib/*/libss*.so.*
diff --git a/e2fsprogs/debian/libss2.symbols b/e2fsprogs/debian/libss2.symbols
new file mode 100644
index 0000000..b6fe40b
--- /dev/null
+++ b/e2fsprogs/debian/libss2.symbols
@@ -0,0 +1,35 @@
+libss.so.2 libss2 #MINVER#
+ _ss_pager_name@Base 1.01
+ _ss_table@Base 1.01
+ et_ss_error_table@Base 1.35
+ initialize_ss_error_table@Base 1.01
+ initialize_ss_error_table_r@Base 1.34
+ ss_abort_subsystem@Base 1.01
+ ss_add_info_dir@Base 1.01
+ ss_add_request_table@Base 1.01
+ ss_create_invocation@Base 1.01
+ ss_delete_info_dir@Base 1.01
+ ss_delete_invocation@Base 1.01
+ ss_delete_request_table@Base 1.01
+ ss_error@Base 1.01
+ ss_execute_command@Base 1.01
+ ss_execute_line@Base 1.01
+ ss_get_prompt@Base 1.01
+ ss_get_readline@Base 1.34
+ ss_help@Base 1.01
+ ss_list_requests@Base 1.01
+ ss_listen@Base 1.01
+ ss_name@Base 1.01
+ ss_page_stdin@Base 1.01
+ ss_pager_create@Base 1.01
+ ss_parse@Base 1.01
+ ss_perror@Base 1.01
+ ss_quit@Base 1.01
+ ss_rl_completion@Base 1.34
+ ss_safe_getenv@Base 1.38
+ ss_self_identify@Base 1.01
+ ss_set_prompt@Base 1.01
+ ss_std_requests@Base 1.01
+ ss_subsystem_name@Base 1.01
+ ss_subsystem_version@Base 1.01
+ ss_unimplemented@Base 1.01
diff --git a/e2fsprogs/debian/libuuid1.copyright b/e2fsprogs/debian/libuuid1.copyright
new file mode 100644
index 0000000..f346739
--- /dev/null
+++ b/e2fsprogs/debian/libuuid1.copyright
@@ -0,0 +1,38 @@
+This package was added to the e2fsprogs debian source package by
+Theodore Ts'o <tytso@mit.edu> on Sat Mar 15 15:33:37 EST 2003
+
+It is part of the main e2fsprogs distribution, which can be found at:
+
+	http://sourceforge.net/projects/e2fsprogs
+
+Upstream Author: Theodore Ts'o <tytso@mit.edu>
+
+Copyright:
+
+Copyright (C) 1999, 2000, 2003, 2004 by Theodore Ts'o
+
+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/e2fsprogs/debian/libuuid1.files.in b/e2fsprogs/debian/libuuid1.files.in
new file mode 100644
index 0000000..0761f3b
--- /dev/null
+++ b/e2fsprogs/debian/libuuid1.files.in
@@ -0,0 +1 @@
+lib/*/libuuid*.so.*
diff --git a/e2fsprogs/debian/libuuid1.postinst b/e2fsprogs/debian/libuuid1.postinst
new file mode 100644
index 0000000..5336fcf
--- /dev/null
+++ b/e2fsprogs/debian/libuuid1.postinst
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+set -e
+
+ADDUSERCONF='/etc/adduser.conf'
+
+if test -f $ADDUSERCONF; then
+    FIRST_SYSTEM_UID=$(sed -n "s/^[[:space:]]*FIRST_SYSTEM_UID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF)
+    LAST_SYSTEM_UID=$(sed -n "s/^[[:space:]]*LAST_SYSTEM_UID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF)
+    FIRST_SYSTEM_GID=$(sed -n "s/^[[:space:]]*FIRST_SYSTEM_GID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF)
+    LAST_SYSTEM_GID=$(sed -n "s/^[[:space:]]*LAST_SYSTEM_GID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF)
+fi
+
+if test -z "$FIRST_SYSTEM_UID"; then
+    FIRST_SYSTEM_UID=100
+fi
+if test -z "$LAST_SYSTEM_UID"; then
+    LAST_SYSTEM_UID=999
+fi
+if test -z "$FIRST_SYSTEM_GID"; then
+    FIRST_SYSTEM_GID=100
+fi
+if test -z "$LAST_SYSTEM_GID"; then
+    LAST_SYSTEM_GID=999
+fi
+
+if ! getent group | grep -q libuuid; then
+  groupadd -f -K GID_MIN=$FIRST_SYSTEM_GID -K GID_MAX=$LAST_SYSTEM_GID libuuid
+fi
+if ! getent passwd | grep -q libuuid; then
+   useradd -d /var/lib/libuuid -K UID_MIN=$FIRST_SYSTEM_UID -K UID_MAX=$LAST_SYSTEM_UID -g libuuid libuuid
+fi
+
+mkdir -p /var/lib/libuuid
+chown libuuid:libuuid /var/lib/libuuid
+chmod 2775 /var/lib/libuuid
+
+#DEBHELPER#
+
+exit 0
diff --git a/e2fsprogs/debian/libuuid1.postrm b/e2fsprogs/debian/libuuid1.postrm
new file mode 100644
index 0000000..8c286ee
--- /dev/null
+++ b/e2fsprogs/debian/libuuid1.postrm
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+if [ "$1" = purge ]
+then
+	rm -rf /var/lib/libuuid
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/e2fsprogs/debian/libuuid1.symbols b/e2fsprogs/debian/libuuid1.symbols
new file mode 100644
index 0000000..5a00431
--- /dev/null
+++ b/e2fsprogs/debian/libuuid1.symbols
@@ -0,0 +1,19 @@
+libuuid.so.1 libuuid1 #MINVER#
+ uuid__generate_random@Base 1.40.4
+ uuid__generate_time@Base 1.40.4
+ uuid_clear@Base 1.05
+ uuid_compare@Base 1.05
+ uuid_copy@Base 1.05
+ uuid_generate@Base 1.05
+ uuid_generate_random@Base 1.15
+ uuid_generate_time@Base 1.15
+ uuid_is_null@Base 1.05
+ uuid_pack@Base 1.05
+ uuid_parse@Base 1.05
+ uuid_time@Base 1.15
+ uuid_type@Base 1.15
+ uuid_unpack@Base 1.05
+ uuid_unparse@Base 1.05
+ uuid_unparse_lower@Base 1.36
+ uuid_unparse_upper@Base 1.36
+ uuid_variant@Base 1.15
diff --git a/e2fsprogs/debian/rules b/e2fsprogs/debian/rules
new file mode 100755
index 0000000..245cf50
--- /dev/null
+++ b/e2fsprogs/debian/rules
@@ -0,0 +1,700 @@
+#! /usr/bin/make -f
+# -*- makefile -*-
+#
+# Invoke each target with `./debian/rules <target>'.  All targets should be
+# invoked with the package root as the current directory.
+#
+# The `binary' target must be run as root, as it needs to install files with
+# specific ownerships.
+
+-include debian/rules.custom
+
+# be paranoid
+export LC_ALL ?= C
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_ARCH		?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_BUILD_ARCH		?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+DEB_HOST_OS		?= $(shell dpkg-architecture -qDEB_HOST_OS)
+DEB_HOST_GNU_TYPE	?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE	?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_MULTIARCH	?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null)
+
+# Allow distro-specific behaviour
+DISTRO :=$(shell sed -ne '/DISTRIB_ID/s/.*=//p' /etc/lsb-release 2>/dev/null || echo Debian)
+SYS_BLKID_VER := $(shell dpkg-query -W libblkid1:$(DEB_HOST_ARCH) | cut -f 2 | cut -b 1)
+ifeq ($(SYS_BLKID_VER),2)
+UTIL_LINUX_NG ?= yes
+endif
+
+# find the version for the main package, from changelog file
+MAIN_VERSION = $(shell head -n 1 debian/changelog | cut '-d ' -f 2 | sed 's/[()]//g')
+# find versions for libraries going into their own packages, from their Makefile.in's,
+# and sonames for all libs
+COMERR_VERSION ?= $(shell grep ELF_VERSION lib/et/Makefile.in | cut '-d ' -f3)
+COMERR_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/et/Makefile.in | cut '-d ' -f3)
+SS_VERSION ?= $(shell grep ELF_VERSION lib/ss/Makefile.in | cut '-d ' -f3)
+SS_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/ss/Makefile.in | cut '-d ' -f3)
+
+ifneq ($(UTIL_LINUX_NG),yes)
+UUID_VERSION ?= $(shell grep ELF_VERSION lib/uuid/Makefile.in | cut '-d ' -f3)
+UUID_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/uuid/Makefile.in | cut '-d ' -f3)
+
+BLKID_VERSION ?= $(shell grep ELF_VERSION lib/blkid/Makefile.in | cut '-d ' -f3)
+BLKID_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/blkid/Makefile.in | cut '-d ' -f3)
+endif
+
+EXT2FS_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/ext2fs/Makefile.in | cut '-d ' -f3)
+E2P_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/e2p/Makefile.in | cut '-d ' -f3)
+
+package		?= e2fsprogs
+
+topdir		?= $(shell pwd)
+debdir		?= ${topdir}/debian
+tmpdir		?= ${debdir}/tmp
+udebdir		?= ${debdir}/e2fsprogs-udeb
+ifneq ($(UTIL_LINUX_NG),yes)
+blkidudebdir	?= ${debdir}/libblkid1-udeb
+uuidudebdir	?= ${debdir}/libuuid1-udeb
+endif
+libcomerrdir	?= ${debdir}/libcomerr${COMERR_SOVERSION}
+comerrdevdir	?= ${debdir}/comerr-dev
+libcomerrdbgdir	?= ${debdir}/libcomerr2-dbg
+libssdir	?= ${debdir}/libss${SS_SOVERSION}
+ssdevdir	?= ${debdir}/ss-dev
+libssdbgdir	?= ${debdir}/libss2-dbg
+ifneq ($(UTIL_LINUX_NG),yes)
+libblkiddir	?= ${debdir}/libblkid${BLKID_SOVERSION}
+libblkiddevdir	?= ${debdir}/libblkid-dev
+libblkiddbgdir	?= ${debdir}/libblkid1-dbg
+libuuiddir	?= ${debdir}/libuuid${UUID_SOVERSION}
+uuiddevdir	?= ${debdir}/uuid-dev
+libuuiddbgdir	?= ${debdir}/libuuid1-dbg
+uuidruntimedir	?= ${debdir}/uuid-runtime
+uuidruntimedbgdir ?= ${debdir}/uuid-runtime-dbg
+endif
+libext2dir	?= ${debdir}/e2fslibs
+libext2devdir	?= ${debdir}/e2fslibs-dev
+libext2dbgdir	?= ${debdir}/e2fslibs-dbg
+maindir		?= ${debdir}/e2fsprogs
+e2fsckstaticdir	?= ${debdir}/e2fsck-static
+debugdir	?= ${debdir}/e2fsprogs-dbg
+stdbuilddir	?= ${debdir}/BUILD-STD
+staticbuilddir	?= ${debdir}/BUILD-STATIC
+mipsbuilddir	?= ${debdir}/BUILD-MIPS
+mipsbuilddir64	?= ${debdir}/BUILD-MIPS-64
+# docdir	?= ${maindir}/usr/share/doc/${package}
+MANDIR		?= /usr/share/man
+mandir		?= ${tmpdir}${MANDIR}
+
+UDEB_NAME 	?= $(package)-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
+UDEB_PRIORITY	?= $(shell grep '^Package: e2fsprogs-udeb' debian/control.in -A 10 | grep ^Priority: | cut -d ' ' -f 2)
+
+ifneq ($(UTIL_LINUX_NG),yes)
+BLKID_UDEB_NAME ?= libblkid1-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
+BLKID_UDEB_PRIORITY ?= $(shell grep '^Package: libblkid1-udeb' debian/control.in -A 10 | grep ^Priority: | cut -d ' ' -f 2)
+
+UUID_UDEB_NAME ?= libuuid1-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
+UUID_UDEB_PRIORITY ?= $(shell grep '^Package: libuuid1-udeb' debian/control.in -A 10 | grep ^Priority: | cut -d ' ' -f 2)
+endif
+
+STAMPSDIR	?= debian/stampdir
+CFGSTDSTAMP	?= ${STAMPSDIR}/configure-std-stamp
+CFGBFSTAMP	?= ${STAMPSDIR}/configure-bf-stamp
+CFGSTATICSTAMP	?= ${STAMPSDIR}/configure-static-stamp
+BUILDSTDSTAMP	?= ${STAMPSDIR}/build-std-stamp
+BUILDBFSTAMP	?= ${STAMPSDIR}/build-bf-stamp
+BUILDSTATICSTAMP ?=${STAMPSDIR}/build-static-stamp
+
+INSTALL ?= install
+INSTALL_PROGRAM ?= $(INSTALL) -p -o root -g root -m 0755
+
+#ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+#INSTALL_PROGRAM += -s
+#endif
+
+DEFAULT_CFLAGS ?= -g -O2
+DEFAULT_LDFLAGS ?= -Wl,-Bsymbolic-functions
+
+CFLAGS ?= $(shell if dpkg-buildflags > /dev/null 2>&1 ; then \
+	dpkg-buildflags --get CFLAGS; else echo $(DEFAULT_CFLAGS) ; fi)
+LDFLAGS ?= $(shell if dpkg-buildflags > /dev/null 2>&1 ; then \
+	dpkg-buildflags --get LDFLAGS; else echo $(DEFAULT_LDFLAGS) ; fi)
+CPPFLAGS ?= $(shell if dpkg-buildflags > /dev/null 2>&1 ; then \
+	dpkg-buildflags --get CPPFLAGS; fi)
+
+ifeq (${DEB_HOST_ARCH},alpha)
+CFLAGS += -DHAVE_NETINET_IN_H
+else
+CFLAGS += -D__NO_STRING_INLINES
+endif
+
+ifneq (${DEB_HOST_ARCH_OS},linux)
+SKIP_STATIC = yes
+endif
+
+ifeq ($(SKIP_STATIC),yes)
+BUILD_STATIC =
+E2FSCK_STATIC = ${stdbuilddir}/e2fsck/e2fsck.static
+else
+BUILD_STATIC = build-static
+E2FSCK_STATIC = ${staticbuilddir}/e2fsck/e2fsck.static
+endif
+
+ifeq ($(SKIP_BF),yes)
+BUILD_BF =
+bfbuilddir	?= ${stdbuilddir}
+else
+BUILD_BF = build-bf
+bfbuilddir	?= ${debdir}/BUILD-BF
+endif
+
+BF_CFLAGS = -Os -fomit-frame-pointer
+
+COMMON_CONF_FLAGS = --disable-e2initrd-helper --enable-elf-shlibs \
+	--enable-quota --infodir=/usr/share/info
+ifeq ($(UTIL_LINUX_NG),yes)
+COMMON_CONF_FLAGS += --disable-fsck --disable-libblkid \
+			--disable-libuuid --disable-uuidd
+else
+COMMON_CONF_FLAGS += --enable-fsck
+endif
+
+ifneq ($(strip $(DEB_HOST_MULTIARCH)),)
+MULTIARCH_CONF ?= --with-multiarch=$(DEB_HOST_MULTIARCH)
+# This doesn't work yet because gdb and lintian don't expect and/or
+# don't work with /usr/lib/<triplet>/debug
+#USRLIB = /usr/lib/$(DEB_HOST_MULTIARCH)
+USRLIB ?= /usr/lib
+else
+USRLIB ?= /usr/lib
+endif
+
+BACKTRACE_CONF_FLAGS ?= $(shell if ${debdir}/scripts/test-backtrace ; then echo --disable-backtrace ; fi)
+
+STD_CONF_FLAGS ?= --enable-symlink-install $(MULTIARCH_CONF) $(BACKTRACE_CONF_FLAGS)
+
+BF_CONF_FLAGS ?= --disable-nls --disable-imager --disable-testio-debug \
+	--disable-uuidd --disable-tls --disable-debugfs
+
+STATIC_CONF_FLAGS ?= --disable-nls --disable-imager \
+	--disable-uuidd --disable-tls
+
+MIPS_NOPIC_CONF_FLAGS ?= --disable-nls --disable-imager \
+	--disable-uuidd --disable-tls \
+        --disable-resizer # --disable-debugfs
+
+# we can't use those flags at configure time
+MIPS_CFLAGS ?= -G 0 -fno-pic -mno-abicalls
+MIPS_CFLAGS_64 ?= -mabi=64 -G 0 -fno-pic -mno-abicalls
+
+ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+ifneq (,$(findstring $(DEB_BUILD_ARCH),mips mipsel))
+ismips=ismips
+endif
+endif
+
+M4_ARGS=
+ifeq ($(UTIL_LINUX_NG),yes)
+M4_ARGS+=-DUTIL_LINUX_NG
+else
+M4_ARGS+=-UUTIL_LINUX_NG
+endif
+
+ifneq ($(strip $(DEB_HOST_MULTIARCH)),)
+M4_ARGS+=-DDO_MULTIARCH
+else
+M4_ARGS+=-UDO_MULTIARCH
+endif
+
+ifneq ($(SKIP_DIETLIBC),)
+M4_ARGS+=-UDIETLIBC
+WITH_DIET_LIBC = 
+else
+M4_ARGS+=-DDIETLIBC
+WITH_DIET_LIBC = --with-diet-libc 
+endif
+
+ifneq ($(BUILD_E2FSCK_STATIC),no)
+M4_ARGS+=-DE2FSCK_STATIC
+else
+M4_ARGS+=-UE2FSCK_STATIC
+endif
+
+FILES_FIXUP= libcomerr2.files comerr-dev.files libss2.files ss-dev.files \
+	libuuid1.files uuid-dev.files libblkid1.files libblkid-dev.files \
+	e2fslibs.files e2fslibs-dev.files
+
+debian-files: debian/control debian/e2fsprogs.shlibs.local
+ifeq ($(strip $(DEB_HOST_MULTIARCH)),)
+	for i in $(FILES_FIXUP); do \
+		sed -e 's;lib/\*/;lib/;' debian/$$i.in > debian/$$i; \
+	done
+else
+	for i in $(FILES_FIXUP); do cp debian/$$i.in debian/$$i; done
+endif
+
+mrproper: clean
+	rm debian/control debian/e2fsprogs.shlibs.local
+
+debian/control: debian/control.in debian/rules
+	m4 $(M4_ARGS) < debian/control.in | grep -v ^REMOVE_ME$$ > $@
+
+debian/e2fsprogs.shlibs.local: debian/e2fsprogs.shlibs.local.in
+	m4 $(M4_ARGS) < debian/e2fsprogs.shlibs.local.in > $@
+
+${CFGSTDSTAMP}:
+	dh_testdir
+
+	# Make sure we don't try to rebuild the configure scripts
+	find . -name configure | xargs touch
+
+	mkdir -p ${stdbuilddir}
+ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+	cd ${stdbuilddir} && AWK=/usr/bin/awk \
+		${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS} ${EXTRA_CONF_FLAGS} \
+		CFLAGS="${CFLAGS}" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
+else
+	cd ${stdbuilddir} && AWK=/usr/bin/awk CC="${DEB_HOST_GNU_TYPE}-gcc" \
+		${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS} ${EXTRA_CONF_FLAGS} \
+		--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
+		CFLAGS="${CFLAGS}" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
+endif
+
+  # specially-built MIPS libs
+ifneq ($(ismips),)
+	mkdir -p ${mipsbuilddir} ${mipsbuilddir64}
+	cd ${mipsbuilddir} && AWK=/usr/bin/awk \
+		${topdir}/configure ${MIPS_NOPIC_CONF_FLAGS} \
+		CFLAGS="${CFLAGS}" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
+	cd ${mipsbuilddir64} && AWK=/usr/bin/awk \
+		${topdir}/configure ${MIPS_NOPIC_CONF_FLAGS} \
+		CFLAGS="${CFLAGS}" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
+endif
+
+	mkdir -p ${STAMPSDIR}
+	touch ${CFGSTDSTAMP}
+
+${CFGBFSTAMP}:
+	dh_testdir
+	rm -f config.cache
+
+	mkdir -p ${bfbuilddir}
+ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+	cd ${bfbuilddir} && AWK=/usr/bin/awk \
+		${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS} ${EXTRA_CONF_FLAGS} \
+		CFLAGS="${CFLAGS} ${BF_CFLAGS}" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
+else
+	cd ${bfbuilddir} && AWK=/usr/bin/awk CC="${DEB_HOST_GNU_TYPE}-gcc" \
+		${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS} ${EXTRA_CONF_FLAGS} \
+		--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
+		CFLAGS="${CFLAGS}" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
+endif
+	mkdir -p ${STAMPSDIR}
+	touch ${CFGBFSTAMP}
+
+${CFGSTATICSTAMP}:
+	dh_testdir
+	rm -f config.cache
+
+	mkdir -p ${staticbuilddir}
+ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+	if type diet > /dev/null  2>&1 ; then \
+		cd ${staticbuilddir} && AWK=/usr/bin/awk \
+		${topdir}/configure ${STATIC_CONF_FLAGS} ${EXTRA_CONF_FLAGS} \
+		${WITH_DIET_LIBC} CFLAGS="${CFLAGS}" \
+		CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"; \
+	else \
+		cd ${staticbuilddir} && AWK=/usr/bin/awk \
+			${topdir}/configure ${STATIC_CONF_FLAGS} ${EXTRA_CONF_FLAGS} \
+			CFLAGS="${CFLAGS}" CPPFLAGS="$(CPPFLAGS)" \
+			LDFLAGS="$(LDFLAGS)"; \
+	fi
+else
+	cd ${staticbuilddir} && AWK=/usr/bin/awk CC="${DEB_HOST_GNU_TYPE}-gcc" \
+		${topdir}/configure ${COMMON_CONF_FLAGS} ${STATIC_CONF_FLAGS} ${EXTRA_CONF_FLAGS} \
+		--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
+		CFLAGS="${CFLAGS}" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
+endif
+	mkdir -p ${STAMPSDIR}
+	touch ${CFGSTATICSTAMP}
+
+build-arch: build
+build-indep: build
+build: build-std $(BUILD_BF) $(BUILD_STATIC)
+
+build-std: ${BUILDSTDSTAMP}
+${BUILDSTDSTAMP}: ${CFGSTDSTAMP}
+	dh_testdir
+	$(MAKE) -C ${stdbuilddir} V=1 all
+ifneq ($(BUILD_E2FSCK_STATIC),no)
+	$(MAKE) -C ${stdbuilddir}/e2fsck V=1 e2fsck.static
+endif
+	$(MAKE) -C ${stdbuilddir}/po V=1 update-gmo
+
+	( cd ${stdbuilddir}/doc && $(MAKE) V=1 libext2fs.html )
+	( cd ${stdbuilddir}/lib/et && $(MAKE) V=1 com_err.info com_err.html )
+
+  # specially-built MIPS libs
+ifneq ($(ismips),)
+	$(MAKE) -C ${mipsbuilddir}/util V=1
+	$(MAKE) -C ${mipsbuilddir} V=1 \
+		CFLAGS="${CFLAGS} ${MIPS_CFLAGS}" \
+		LIB_SUBDIRS="lib/et lib/ext2fs" libs
+	$(MAKE) -C ${mipsbuilddir64}/util V=1
+	$(MAKE) -C ${mipsbuilddir64} V=1 \
+		CFLAGS="${CFLAGS} ${MIPS_CFLAGS_64}" \
+		LIB_SUBDIRS="lib/et lib/ext2fs" libs
+endif
+
+	touch ${BUILDSTDSTAMP}
+
+build-bf: ${BUILDBFSTAMP}
+${BUILDBFSTAMP}: ${CFGBFSTAMP}
+	dh_testdir
+	$(MAKE) -C ${bfbuilddir} V=1 libs
+	$(MAKE) -C ${bfbuilddir}/e2fsck V=1 all
+	$(MAKE) -C ${bfbuilddir}/misc V=1 all
+	$(MAKE) -C ${bfbuilddir}/resize V=1 all
+	touch ${BUILDBFSTAMP}
+
+build-static: ${BUILDSTATICSTAMP}
+${BUILDSTATICSTAMP}: ${CFGSTATICSTAMP}
+	dh_testdir
+	$(MAKE) -C ${staticbuilddir} V=1 libs
+ifneq ($(BUILD_E2FSCK_STATIC),no)
+	$(MAKE) -C ${staticbuilddir}/e2fsck V=1 all e2fsck.static
+endif
+	touch ${BUILDSTATICSTAMP}
+
+clean:
+	dh_testdir
+	rm -rf ${STAMPSDIR}
+	[ ! -f ${stdbuilddir}/Makefile ] || $(MAKE) -C ${stdbuilddir} V=1 distclean
+	[ ! -f ${bfbuilddir}/Makefile ] || $(MAKE) -C ${bfbuilddir} V=1 distclean
+	[ ! -f ${staticbuilddir}/Makefile ] || $(MAKE) -C ${staticbuilddir} V=1 distclean
+	rm -rf ${stdbuilddir} ${bfbuilddir} ${staticbuilddir} ${mipsbuilddir} ${mipsbuilddir64}
+	rm -f debian/*.substvars
+	dh_clean
+
+install: cleanup install-std
+
+# This rule allows to factorize the dh_clean between the 2 install rules
+# This must be launched before install-* (if launching them by hand, for
+# exemple) or results are unpredictable
+cleanup:
+	dh_testdir
+	dh_testroot
+	dh_prep
+
+install-std: DH_OPTIONS=
+install-std: build
+	dh_testdir
+	dh_testroot
+	dh_installdirs
+
+	mkdir -p ${tmpdir}/sbin
+	$(MAKE) -C ${stdbuilddir} V=1 install DESTDIR=${tmpdir} \
+		INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
+  # static libs and .h files
+	$(MAKE) -C ${stdbuilddir} V=1 install-libs DESTDIR=${tmpdir} LDCONFIG=true
+
+ifneq ($(BUILD_E2FSCK_STATIC),no)
+  # statically-linked fsck
+	${INSTALL_PROGRAM} $(E2FSCK_STATIC) ${tmpdir}/sbin
+	cp ${mandir}/man8/e2fsck.8 ${mandir}/man8/e2fsck.static.8
+endif
+
+  # remove static quota library for now
+	rm ${tmpdir}/usr/include/quota/mkquota.h
+	find ${tmpdir} -name quota.pc -o -name libquota.a | xargs rm
+
+ifeq ($(DEB_BUILD_GNU_SYSTEM), gnu) 
+	${INSTALL} -m 0644 misc/mke2fs-hurd.conf ${tmpdir}/etc/mke2fs.conf
+endif
+
+	dh_movefiles
+	test -z "`find ${tmpdir} -type f`"
+
+  # specially-built MIPS libs
+ifneq ($(ismips),)
+	$(INSTALL) -p -m 0644 ${mipsbuilddir}/lib/libext2fs.a \
+		${debdir}/e2fslibs-dev/usr/lib/libext2fs-nopic.a
+	$(INSTALL) -p -m 0644 ${mipsbuilddir64}/lib/libext2fs.a \
+		${debdir}/e2fslibs-dev/usr/lib/lib64ext2fs-nopic.a
+endif
+
+install-udeb: DH_OPTIONS=
+install-udeb: build
+	dh_testdir
+	dh_testroot
+
+	$(MAKE) -C ${bfbuilddir} V=1 install-shlibs-libs-recursive DESTDIR=${udebdir} \
+		INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
+	$(MAKE) -C ${bfbuilddir}/e2fsck V=1 install DESTDIR=${udebdir} \
+		INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
+	$(MAKE) -C ${bfbuilddir}/misc V=1 install DESTDIR=${udebdir} \
+		INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
+	$(MAKE) -C ${bfbuilddir}/resize V=1 install DESTDIR=${udebdir} \
+		INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
+
+	rm -rf ${udebdir}/usr
+	find ${udebdir}/sbin -type f -a ! -name e2fsck \
+		-a ! -name mke2fs -a ! -name tune2fs \
+		-a ! -name resize2fs -a ! -name badblocks -print | xargs rm
+
+	(cd ${udebdir}/sbin; ln -sf e2fsck fsck.ext2 ; \
+		ln -sf e2fsck fsck.ext3 ; ln -sf e2fsck fsck.ext4 ; \
+		ln -sf mke2fs mkfs.ext2 ; ln -sf mke2fs mkfs.ext3 ; \
+		ln -sf mke2fs mkfs.ext4)
+
+ifneq ($(UTIL_LINUX_NG),yes)
+	mkdir -p ${blkidudebdir}/lib
+	mv ${udebdir}/lib/libblkid.* ${blkidudebdir}/lib
+
+	mkdir -p ${uuidudebdir}/lib
+	mv ${udebdir}/lib/libuuid.* ${uuidudebdir}/lib
+endif
+
+binary-indep: 
+  # no arch-independant debs.
+
+binary-arch: DH_OPTIONS= -a
+binary-arch: install install-udeb
+	dh_testdir
+	dh_testroot
+
+  # lintian overrides
+	for i in $$(cd debian && echo *.lintian-overrides); do \
+		pkg=$${i%.lintian-overrides} ;\
+		if test "$${pkg}" != source ; then \
+			$(INSTALL) -m 0644 -D -p debian/$$i ${debdir}/$${pkg}/usr/share/lintian/overrides/$${pkg} ;\
+		fi ;\
+	done
+
+  # symlinks to prepare dh_installdocs run
+
+ifneq ($(UTIL_LINUX_NG),yes)
+	mkdir -p ${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION}
+	mkdir -p ${debdir}/libblkid-dev/usr/share/doc
+	ln -sf libblkid${BLKID_SOVERSION} ${debdir}/libblkid-dev/usr/share/doc/libblkid-dev
+endif
+
+	mkdir -p ${debdir}/libss${SS_SOVERSION}/usr/share/doc/libss${SS_SOVERSION}
+	mkdir -p ${debdir}/ss-dev/usr/share/doc
+	ln -sf libss${SS_SOVERSION} ${debdir}/ss-dev/usr/share/doc/ss-dev
+
+	mkdir -p ${debdir}/libcomerr${COMERR_SOVERSION}/usr/share/doc/libcomerr${COMERR_SOVERSION}
+	mkdir -p ${debdir}/comerr-dev/usr/share/doc
+	ln -sf libcomerr${COMERR_SOVERSION} ${debdir}/comerr-dev/usr/share/doc/comerr-dev
+
+ifneq ($(UTIL_LINUX_NG),yes)
+	mkdir -p ${debdir}/libuuid${UUID_SOVERSION}/usr/share/doc/libuuid${UUID_SOVERSION}
+	mkdir -p ${debdir}/uuid-dev/usr/share/doc
+#	ln -sf libuuid${UUID_SOVERSION} ${debdir}/uuid-dev/usr/share/doc/uuid-dev
+endif
+
+	mkdir -p ${debdir}/e2fslibs/usr/share/doc/e2fslibs
+	mkdir -p ${debdir}/e2fslibs-dev/usr/share/doc
+	ln -sf e2fslibs ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev
+
+ifneq ($(UTIL_LINUX_NG),yes)
+	$(INSTALL) -p -m 0644 debian/libblkid.copyright \
+		${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION}/copyright
+endif
+
+	dh_installdocs -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
+
+  # HTML docs
+	$(INSTALL) -d ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/html-info/
+	$(INSTALL) -p -m 0644 ${stdbuilddir}/doc/*.html \
+	   ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/html-info/
+	$(INSTALL) -d ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/html-info/
+	$(INSTALL) -p -m 0644 ${stdbuilddir}/lib/et/*.html \
+	   ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/html-info/
+
+  # texinfo docs
+	mkdir -p ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}
+	$(INSTALL) -p -m 0644 ${topdir}/doc/libext2fs.texinfo \
+	   ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/libext2fs.texi
+	$(INSTALL) -p -m 0644 ${topdir}/lib/et/com_err.texinfo \
+	   ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/com_err.texi
+
+	$(INSTALL) -d ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/examples
+	$(INSTALL) -p -m 0644 lib/ss/ss_err.et \
+		${stdbuilddir}/lib/ext2fs/ext2_err.et \
+		${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/examples
+	$(INSTALL) -d ${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}/examples
+	$(INSTALL) -p -m 0644 debugfs/debug_cmds.ct \
+		${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}/examples
+
+	dh_installinfo -pcomerr-dev ${stdbuilddir}/lib/et/com_err.info
+	dh_installinfo -pe2fslibs-dev ${stdbuilddir}/doc/libext2fs.info
+
+	DH_OPTIONS= dh_installchangelogs -pe2fsprogs \
+		-plibcomerr${COMERR_SOVERSION} \
+		-plibss${SS_SOVERSION} \
+		-pe2fslibs \
+		-pe2fsprogs-dbg -pe2fslibs-dbg \
+		-plibcomerr2-dbg -plibss2-dbg
+ifneq ($(BUILD_E2FSCK_STATIC),no)
+	DH_OPTIONS= dh_installchangelogs -pe2fsck-static
+endif
+ifneq ($(UTIL_LINUX_NG),yes)
+	DH_OPTIONS= dh_installchangelogs -plibuuid${UUID_SOVERSION} \
+		-puuid-dev -puuid-runtime -puuid-runtime-dbg -plibuuid1-dbg \
+		-plibblkid${BLKID_SOVERSION} -plibblkid1-dbg
+endif
+
+	dh_fixperms
+ifneq ($(ismips),)
+	dh_strip -k -Xlib64ext2fs-nopic.a
+else
+	dh_strip -k
+endif
+
+	# debug package stuff
+	rm -rf ${udebdir}/usr
+ifneq ($(UTIL_LINUX_NG),yes)
+	rm -rf ${blkidudebdir}/usr
+	rm -rf ${uuidudebdir}/usr
+endif
+
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	mkdir -p ${debugdir}/$(USRLIB)
+	mv ${maindir}/usr/lib/debug ${debugdir}/$(USRLIB)
+	rm -rf ${maindir}/usr/lib/debug
+
+ifneq ($(BUILD_E2FSCK_STATIC),no)
+	mv ${e2fsckstaticdir}/usr/lib/debug/sbin/* \
+		${debugdir}/$(USRLIB)/debug
+	rm -rf ${e2fsckstaticdir}/usr/lib
+endif
+
+ifneq ($(UTIL_LINUX_NG),yes)
+	mkdir -p ${uuidruntimedbgdir}/$(USRLIB)
+	mv ${uuidruntimedir}/usr/lib/debug ${uuidruntimedbgdir}/$(USRLIB)
+	rmdir ${uuidruntimedir}/usr/lib
+endif
+
+	mkdir -p ${libext2dbgdir}/$(USRLIB)
+	mv ${libext2dir}/usr/lib/debug ${libext2dbgdir}/$(USRLIB)
+	rmdir ${libext2dir}/usr/lib
+
+	mkdir -p ${libcomerrdbgdir}/$(USRLIB)
+	mv ${libcomerrdir}/usr/lib/debug ${libcomerrdbgdir}/$(USRLIB)
+	rmdir ${libcomerrdir}/usr/lib
+
+	mkdir -p ${libssdbgdir}/$(USRLIB)
+	mv ${libssdir}/usr/lib/debug ${libssdbgdir}/$(USRLIB)
+	rmdir ${libssdir}/usr/lib
+
+ifneq ($(UTIL_LINUX_NG),yes)
+	mkdir -p ${libuuiddbgdir}/$(USRLIB)
+	mv ${libuuiddir}/usr/lib/debug ${libuuiddbgdir}/$(USRLIB)
+	rmdir ${libuuiddir}/usr/lib
+
+	mkdir -p ${libblkiddbgdir}/$(USRLIB)
+	mv ${libblkiddir}/usr/lib/debug ${libblkiddbgdir}/$(USRLIB)
+	rmdir ${libblkiddir}/usr/lib
+endif
+endif
+
+	# dpkg symbol handling
+ifneq (,$(findstring update-symbols,$(DEB_BUILD_OPTIONS)))
+SYMBOL_LIBS := e2fslibs libcomerr2 libss2
+ifneq ($(UTIL_LINUX_NG),yes)
+SYMBOL_LIBS += libblkid1 libuuid1
+endif
+	for i in $(SYMBOL_LIBS); \
+	do \
+		echo "Generating symbols for $$i..."; \
+		dpkg-gensymbols -p$$i -Pdebian/$$i > debian/$$i.tmp-patch; \
+		cat debian/$$i.tmp-patch; \
+		patch debian/$$i.symbols < debian/$$i.tmp-patch; \
+		/bin/rm debian/$$i.tmp-patch; \
+	done
+endif
+
+	for i in e2fsprogs e2fsprogs-dbg e2fslibs e2fslibs-dbg; do \
+	   $(INSTALL) -p -m 0644 debian/copyright \
+		${debdir}/$$i/usr/share/doc/$$i/copyright; \
+	done
+
+ifneq ($(UTIL_LINUX_NG),yes)
+	$(INSTALL) -p -m 0644 debian/uuid-runtime.copyright \
+		${uuidruntimedbgdir}/usr/share/doc/uuid-runtime-dbg/copyright
+endif
+
+	$(INSTALL) -p -m 0644 debian/libcomerr2.copyright \
+		${libcomerrdbgdir}/usr/share/doc/libcomerr2-dbg/copyright
+
+	$(INSTALL) -p -m 0644 debian/libss2.copyright \
+		${libssdbgdir}/usr/share/doc/libss2-dbg/copyright
+
+ifneq ($(UTIL_LINUX_NG),yes)
+	$(INSTALL) -p -m 0644 debian/libblkid.copyright \
+		${libblkiddbgdir}/usr/share/doc/libblkid1-dbg/copyright
+
+	$(INSTALL) -p -m 0644 debian/libuuid1.copyright \
+		${libuuiddbgdir}/usr/share/doc/libuuid1-dbg/copyright
+endif
+
+	dh_compress
+
+	dh_makeshlibs -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
+	dh_makeshlibs --add-udeb=e2fsprogs-udeb -plibcomerr${COMERR_SOVERSION} \
+		-V 'libcomerr2 (>= 1.33-3)'
+ifneq ($(UTIL_LINUX_NG),yes)
+	dh_makeshlibs -plibblkid${BLKID_SOVERSION} -V 'libblkid1 (>= 1.39-1)'
+	echo "udeb: libblkid 1 libblkid1-udeb" >> \
+		debian/libblkid1/DEBIAN/shlibs
+	echo "udeb: libuuid 1 libuuid1-udeb" >> debian/libuuid1/DEBIAN/shlibs
+endif
+
+	dh_installdeb
+	dh_shlibdeps -l${stdbuilddir}/lib
+	dh_shlibdeps -pe2fsprogs -l${stdbuilddir}/lib \
+		-u"-Ldebian/e2fsprogs.shlibs.local"
+	dh_shlibdeps -pe2fsprogs-udeb -l${stdbuilddir}/lib \
+		-u"-Ldebian/e2fsprogs-udeb.shlibs.local"
+
+	dh_gencontrol -Ncomerr-dev -Nss-dev -Nuuid-dev \
+		-Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
+	DH_OPTIONS= dh_gencontrol -pcomerr-dev \
+	  -u '-v${COMERR_VERSION}-${MAIN_VERSION} -VmainBinary=${MAIN_VERSION}'
+	DH_OPTIONS= dh_gencontrol -pss-dev \
+	  -u '-v${SS_VERSION}-${MAIN_VERSION} -VmainBinary=${MAIN_VERSION}'
+ifneq ($(UTIL_LINUX_NG),yes)
+	DH_OPTIONS= dh_gencontrol -puuid-dev \
+	  -u '-v${UUID_VERSION}-${MAIN_VERSION} -VmainBinary=${MAIN_VERSION}'
+endif
+	dh_gencontrol	-pe2fsprogs-udeb -- -fdebian/files~
+ifneq ($(UTIL_LINUX_NG),yes)
+	dh_gencontrol	-plibblkid1-udeb -- -fdebian/files~
+	dh_gencontrol	-plibuuid1-udeb -- -fdebian/files~
+endif
+
+	dpkg-distaddfile $(UDEB_NAME) debian-installer $(UDEB_PRIORITY)
+ifneq ($(UTIL_LINUX_NG),yes)
+	dpkg-distaddfile $(BLKID_UDEB_NAME) debian-installer $(BLKID_UDEB_PRIORITY)
+	dpkg-distaddfile $(UUID_UDEB_NAME) debian-installer $(UUID_UDEB_PRIORITY)
+endif
+	dh_md5sums -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
+	dh_builddeb -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
+	dh_builddeb -pe2fsprogs-udeb --filename=$(UDEB_NAME)
+ifneq ($(UTIL_LINUX_NG),yes)
+	dh_builddeb -plibblkid1-udeb --filename=$(BLKID_UDEB_NAME)
+	dh_builddeb -plibuuid1-udeb --filename=$(UUID_UDEB_NAME)
+endif
+
+binary: binary-indep binary-arch
+
+.PHONY: binary binary-arch binary-indep clean checkroot mrproper \
+	debug_flags debian-files
+
+debug_flags:
+	@echo CFLAGS is $(CFLAGS)
+	@echo LDFLAGS is $(LDFLAGS)
+	@echo CPPFLAGS is $(CPPFLAGS)
diff --git a/e2fsprogs/debian/scripts/test-backtrace b/e2fsprogs/debian/scripts/test-backtrace
new file mode 100755
index 0000000..d90486a
--- /dev/null
+++ b/e2fsprogs/debian/scripts/test-backtrace
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Test to see if backtrace requires a library in /usr/lib
+# Returns true if the backtrace command works and requires a library in /usr/lib
+# This is a nasty workaround for Debian bug #708307, which is really a glibc bug
+#
+
+cat > /tmp/backtrace$$.c << EOF
+
+#include <execinfo.h>
+
+int main(int argc, char **argv)
+{
+       void *stack_syms[32];
+       int frames;
+
+       frames = backtrace(stack_syms, 32);
+       backtrace_symbols_fd(stack_syms, frames, 0);
+}
+EOF
+
+if ! cc -o /tmp/backtrace$$ /tmp/backtrace$$.c; then
+   exit 1
+fi
+
+if ! ldd /tmp/backtrace$$ > /tmp/backtrace$$.ldd 2>&1 ; then
+   exit 1
+fi
+
+grep -q /usr/lib /tmp/backtrace$$.ldd
+ret=$?
+
+/bin/rm -f /tmp/backtrace$$*
+exit $ret
diff --git a/e2fsprogs/debian/shlibs.local b/e2fsprogs/debian/shlibs.local
new file mode 100644
index 0000000..e678de0
--- /dev/null
+++ b/e2fsprogs/debian/shlibs.local
@@ -0,0 +1,6 @@
+libext2fs	2
+libe2p		2
+libuuid		1
+libcom_err	2
+libss		2
+libblkid	1
diff --git a/e2fsprogs/debian/source.lintian-overrides b/e2fsprogs/debian/source.lintian-overrides
new file mode 100644
index 0000000..8c0cd0f
--- /dev/null
+++ b/e2fsprogs/debian/source.lintian-overrides
@@ -0,0 +1,3 @@
+e2fsprogs source: weak-library-dev-dependency ss-dev on libss2 (= ${mainBinary})
+e2fsprogs source: weak-library-dev-dependency comerr-dev on libcomerr2 (= ${mainBinary})
+e2fsprogs source: weak-library-dev-dependency uuid-dev on libuuid1 (= ${mainBinary})
diff --git a/e2fsprogs/debian/source/format b/e2fsprogs/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/e2fsprogs/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/e2fsprogs/debian/ss-dev.examples b/e2fsprogs/debian/ss-dev.examples
new file mode 100644
index 0000000..b7930bb
--- /dev/null
+++ b/e2fsprogs/debian/ss-dev.examples
@@ -0,0 +1 @@
+debugfs/debug_cmds.ct
diff --git a/e2fsprogs/debian/ss-dev.files.in b/e2fsprogs/debian/ss-dev.files.in
new file mode 100644
index 0000000..d0c788e
--- /dev/null
+++ b/e2fsprogs/debian/ss-dev.files.in
@@ -0,0 +1,7 @@
+usr/lib/*/libss.so
+usr/lib/*/libss.a
+usr/include/ss/*
+usr/bin/mk_cmds
+usr/share/ss/*
+usr/share/man/man1/mk_cmds*
+usr/lib/*/pkgconfig/ss.pc
diff --git a/e2fsprogs/debian/uuid-dev.README.Debian b/e2fsprogs/debian/uuid-dev.README.Debian
new file mode 100644
index 0000000..3d8cc89
--- /dev/null
+++ b/e2fsprogs/debian/uuid-dev.README.Debian
@@ -0,0 +1,23 @@
+
+In order to santize e2fsprogs to be DFSG free, the file
+draft-leach-uuids-guids-01.txt has been removed.  It can be obtained
+by downloading e2fsprogs from the upstream sources.  It may also be
+available from other sites on the network, if you do a quick web
+search for the string "draft-leach-uuids-guids-01".
+
+Note that debian/rules is set up to include the file on Ubuntu
+systems, so for people trying to build e2fsprogs on Ubuntu systems,
+they should start from the upstream sources, and not the
+Debian-expurgated sources found in the Debian repository.  (n.b., for
+WIP releases the command "./util/gen-tarball ubuntu" will help create
+tar file which is appropriately named to make life easier for
+dpkg-buildpackage.)  Since Ubuntu doesn't have the DFSG restrictions,
+the documentation which has been removed for Debian's DFSG license
+purity shouldn't be denied to Ubuntu users.
+
+					Theodore Ts'o
+					Ocotober 3, 2006
+
+
+
+
diff --git a/e2fsprogs/debian/uuid-dev.copyright b/e2fsprogs/debian/uuid-dev.copyright
new file mode 100644
index 0000000..f346739
--- /dev/null
+++ b/e2fsprogs/debian/uuid-dev.copyright
@@ -0,0 +1,38 @@
+This package was added to the e2fsprogs debian source package by
+Theodore Ts'o <tytso@mit.edu> on Sat Mar 15 15:33:37 EST 2003
+
+It is part of the main e2fsprogs distribution, which can be found at:
+
+	http://sourceforge.net/projects/e2fsprogs
+
+Upstream Author: Theodore Ts'o <tytso@mit.edu>
+
+Copyright:
+
+Copyright (C) 1999, 2000, 2003, 2004 by Theodore Ts'o
+
+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/e2fsprogs/debian/uuid-dev.files.in b/e2fsprogs/debian/uuid-dev.files.in
new file mode 100644
index 0000000..534b92c
--- /dev/null
+++ b/e2fsprogs/debian/uuid-dev.files.in
@@ -0,0 +1,5 @@
+usr/lib/*/libuuid.so
+usr/lib/*/libuuid.a
+usr/include/uuid/*
+usr/share/man/man3/uuid*
+usr/lib/*/pkgconfig/uuid.pc
diff --git a/e2fsprogs/debian/uuid-runtime.copyright b/e2fsprogs/debian/uuid-runtime.copyright
new file mode 100644
index 0000000..afcd4c5
--- /dev/null
+++ b/e2fsprogs/debian/uuid-runtime.copyright
@@ -0,0 +1,39 @@
+This package was added to the e2fsprogs debian source package by
+Theodore Ts'o <tytso@mit.edu> on Fri Dec 14 22:24:35 EST 2007
+
+It is part of the main e2fsprogs distribution, which can be found at:
+
+	http://sourceforge.net/projects/e2fsprogs
+
+Upstream Author: Theodore Ts'o <tytso@mit.edu>
+
+Copyright:
+
+Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by
+Theodore Ts'o
+
+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/e2fsprogs/debian/uuid-runtime.files b/e2fsprogs/debian/uuid-runtime.files
new file mode 100644
index 0000000..ff8d87a
--- /dev/null
+++ b/e2fsprogs/debian/uuid-runtime.files
@@ -0,0 +1,4 @@
+usr/bin/uuidgen
+usr/sbin/uuidd
+usr/share/man/man8/uuidd.*
+usr/share/man/man1/uuidgen.*
diff --git a/e2fsprogs/debian/uuid-runtime.lintian-overrides b/e2fsprogs/debian/uuid-runtime.lintian-overrides
new file mode 100644
index 0000000..4642d30
--- /dev/null
+++ b/e2fsprogs/debian/uuid-runtime.lintian-overrides
@@ -0,0 +1 @@
+uuid-runtime: command-with-path-in-maintainer-script prerm:5 /usr/sbin/uuidd
diff --git a/e2fsprogs/debian/uuid-runtime.postinst b/e2fsprogs/debian/uuid-runtime.postinst
new file mode 100644
index 0000000..3c1adb6
--- /dev/null
+++ b/e2fsprogs/debian/uuid-runtime.postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+if ! getent group | grep -q libuuid; then
+groupadd -f -K GID_MIN=1 -K GID_MAX=999 libuuid
+fi
+if ! getent passwd | grep -q libuuid; then
+   useradd -d /var/lib/libuuid -K UID_MIN=1 -K UID_MAX=499 -g libuuid libuuid
+fi
+chown libuuid:libuuid /usr/sbin/uuidd
+chmod 6755 /usr/sbin/uuidd
+
+#DEBHELPER#
+
+exit 0
diff --git a/e2fsprogs/debian/uuid-runtime.postrm b/e2fsprogs/debian/uuid-runtime.postrm
new file mode 100644
index 0000000..f077001
--- /dev/null
+++ b/e2fsprogs/debian/uuid-runtime.postrm
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+if [ "$1" = purge ]
+then
+	rm -rf /var/run/uuidd
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/e2fsprogs/debian/uuid-runtime.prerm b/e2fsprogs/debian/uuid-runtime.prerm
new file mode 100644
index 0000000..904e161
--- /dev/null
+++ b/e2fsprogs/debian/uuid-runtime.prerm
@@ -0,0 +1,10 @@
+#! /bin/sh
+set -e
+if [ -x /usr/sbin/uuidd ]
+then
+	/usr/sbin/uuidd -k || true
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/e2fsprogs/debian/uuid-runtime.shlibs.local b/e2fsprogs/debian/uuid-runtime.shlibs.local
new file mode 100644
index 0000000..5d97674
--- /dev/null
+++ b/e2fsprogs/debian/uuid-runtime.shlibs.local
@@ -0,0 +1 @@
+libuuid 1 libuuid1 (> 1.40.3-1)
diff --git a/e2fsprogs/debian/watch b/e2fsprogs/debian/watch
new file mode 100644
index 0000000..96f61d3
--- /dev/null
+++ b/e2fsprogs/debian/watch
@@ -0,0 +1,4 @@
+version=3
+http://sf.net/e2fsprogs/e2fsprogs-([0-9].+)\.tar\.gz
+#ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/e2fsprogs-([0-9].+)\.tar\.gz
+
diff --git a/e2fsprogs/debugfs/Makefile.in b/e2fsprogs/debugfs/Makefile.in
new file mode 100644
index 0000000..bf037e0
--- /dev/null
+++ b/e2fsprogs/debugfs/Makefile.in
@@ -0,0 +1,208 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = debugfs
+INSTALL = @INSTALL@
+
+@MCONFIG@
+
+PROGS=		debugfs
+MANPAGES=	debugfs.8
+
+MK_CMDS=	_SS_DIR_OVERRIDE=../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
+
+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
+
+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
+
+LIBS= $(LIBEXT2FS) $(LIBE2P) $(LIBSS) $(LIBCOM_ERR) $(LIBBLKID) \
+	$(LIBUUID)
+DEPLIBS= $(LIBEXT2FS) $(LIBE2P) $(DEPLIBSS) $(DEPLIBCOM_ERR) \
+	$(DEPLIBBLKID) $(DEPLIBUUID)
+
+STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBSS) $(STATIC_LIBCOM_ERR) \
+	$(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(STATIC_LIBE2P)
+STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBSS) \
+		$(DEPSTATIC_LIBCOM_ERR) $(DEPSTATIC_LIBUUID) \
+		$(DEPSTATIC_LIBE2P)
+
+.c.o:
+	$(E) "	CC $<"
+	$(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
+	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+
+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)
+
+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) $< -DDEBUGFS -o $@
+
+debugfs.8: $(DEP_SUBSTITUTE) $(srcdir)/debugfs.8.in
+	$(E) "	SUBST $@"
+	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/debugfs.8.in debugfs.8
+
+installdirs:
+	$(E) "	MKINSTALLDIRS $(root_sbindir) $(man8dir)"
+	$(Q) $(MKINSTALLDIRS) $(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
+
+mostlyclean: clean
+distclean: clean
+	$(RM) -f debug_cmds.c .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
+#
+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_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_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/bitops.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/version.h $(srcdir)/jfs_user.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h
+util.o: $(srcdir)/util.c $(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/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/bitops.h
+ls.o: $(srcdir)/ls.c $(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/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/bitops.h
+ncheck.o: $(srcdir)/ncheck.c $(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/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/bitops.h
+icheck.o: $(srcdir)/icheck.c $(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/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/bitops.h
+lsdel.o: $(srcdir)/lsdel.c $(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/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/bitops.h
+dump.o: $(srcdir)/dump.c $(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/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/bitops.h
+set_fields.o: $(srcdir)/set_fields.c $(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/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/bitops.h \
+ $(top_srcdir)/lib/e2p/e2p.h
+logdump.o: $(srcdir)/logdump.c $(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/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/bitops.h \
+ $(srcdir)/jfs_user.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
+ $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h
+htree.o: $(srcdir)/htree.c $(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/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/bitops.h \
+ $(top_srcdir)/lib/e2p/e2p.h
+unused.o: $(srcdir)/unused.c $(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/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/bitops.h
diff --git a/e2fsprogs/debugfs/debug_cmds.ct b/e2fsprogs/debugfs/debug_cmds.ct
new file mode 100644
index 0000000..96ff00f
--- /dev/null
+++ b/e2fsprogs/debugfs/debug_cmds.ct
@@ -0,0 +1,194 @@
+#
+# 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_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_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, bd;
+
+end;
+
diff --git a/e2fsprogs/debugfs/debugfs.8.in b/e2fsprogs/debugfs/debugfs.8.in
new file mode 100644
index 0000000..73254d3
--- /dev/null
+++ b/e2fsprogs/debugfs/debugfs.8.in
@@ -0,0 +1,718 @@
+.\" -*- 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 \-DVwci
+]
+[
+.B \-b
+blocksize
+]
+[
+.B \-s
+superblock
+]
+[
+.B \-f
+cmd_file
+]
+[
+.B \-R
+request
+]
+[
+.B \-d
+data_source_device
+]
+[
+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.
+.br
+.I device
+is the special file corresponding to the device containing the
+file system (e.g /dev/hdXX).
+.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 \-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 filesystems with significant corruption, but because of this,
+catastrophic mode forces the filesystem 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 for the file system, rather than
+detecting the correct block size as normal.
+.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 filesystem).  If you specify the
+.I -s
+option, you must also provide the blocksize of the filesystem via the
+.I -b
+option.
+.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.
+.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 filesystem 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 filesystem
+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 " filespace"
+Print the blocks used by the inode
+.I filespec
+to stdout.
+.TP
+.BI bmap " filespec logical_block"
+Print the physical block number corresponding to the logical block number
+.I logical_block
+in the inode
+.IR filespec .
+.TP
+.BI block_dump " [-f filespec] block_num"
+Dump the filesystem 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 .
+.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 dirsearch " filespec filename"
+Search the directory
+.I filespec
+for
+.IR filename .
+.TP
+.B dirty
+Mark the filesystem as dirty, so that the superblocks will be written on exit.
+.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
+.B dump_mmp
+Display the multiple-mount protection (mmp) field values.
+.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 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 filesystem data structures.   Hence, the values displayed
+may not necessarily by accurate and does not indicate a problem or
+corruption in the file system.)
+.TP
+.BI expand_dir " filespec"
+Expand the directory
+.IR filespec .
+.TP
+.BI feature " [fs_feature] [-fs_feature] ..."
+Set or clear various filesystem features in the superblock.  After setting
+or clearing any filesystem features that were requested, print the current
+state of the filesystem 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
+.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 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 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 filesystem.
+.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 " [-acs] [-b block] [-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 \-a
+option causes the
+.B logdump
+program to print the contents of all of the descriptor blocks.
+The
+.I \-b
+option causes
+.B logdump
+to print all journal records that are 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.
+.TP
+.BI ls " [-d] [-l] [-p] filespec"
+Print a listing of the files in the directory
+.IR filespec .
+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.
+.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] [-s superblock] device"
+Open a filesystem for editing.  The
+.I -f
+flag forces the filesystem to be opened even if there are some unknown
+or incompatible filesystem features which would normally
+prevent the filesystem from being opened.  The
+.I -e
+flag causes the filesystem to be opened in exclusive mode.  The
+.IR -b ", " -c ", " -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
+.I directory
+and all its contents (including regular files, symbolic links, and other
+directories) into the named
+.I destination
+which should be an existing directory on the native filesystem.
+.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 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
+.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
+.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 filesystem 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 filesystem named
+.IR out_file .
+.TP
+.BI zap_block " [-f filespec] [-o offset] [-l length] [-p pattern] block_num"
+.TP
+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/e2fsprogs/debugfs/debugfs.c b/e2fsprogs/debugfs/debugfs.c
new file mode 100644
index 0000000..80662b1
--- /dev/null
+++ b/e2fsprogs/debugfs/debugfs.c
@@ -0,0 +1,2520 @@
+/*
+ * 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 <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.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>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "debugfs.h"
+#include "uuid/uuid.h"
+#include "e2p/e2p.h"
+
+#include <ext2fs/ext2_ext_attr.h>
+
+#include "../version.h"
+#include "jfs_user.h"
+
+#ifndef BUFSIZ
+#define BUFSIZ 8192
+#endif
+
+/* 64KiB is the minimium blksize to best minimize system call overhead. */
+#ifndef IO_BUFSIZE
+#define IO_BUFSIZE 64*1024
+#endif
+
+/* Block size for `st_blocks' */
+#ifndef S_BLKSIZE
+#define S_BLKSIZE 512
+#endif
+
+ss_request_table *extra_cmds;
+const char *debug_prog_name;
+int sci_idx;
+
+ext2_filsys	current_fs = NULL;
+ext2_ino_t	root, cwd;
+
+static void open_filesystem(char *device, int open_flags, blk64_t superblock,
+			    blk64_t blocksize, int catastrophic,
+			    char *data_filename)
+{
+	int	retval;
+	io_channel data_io = 0;
+
+	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_RW)) {
+		com_err(device, 0,
+			"opening read-only because of catastrophic mode");
+		open_flags &= ~EXT2_FLAG_RW;
+	}
+	if (catastrophic)
+		open_flags |= EXT2_FLAG_SKIP_MMP;
+
+	retval = ext2fs_open(device, open_flags, superblock, blocksize,
+			     unix_io_manager, &current_fs);
+	if (retval) {
+		com_err(device, retval, "while opening filesystem");
+		current_fs = NULL;
+		return;
+	}
+	current_fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE;
+
+	if (catastrophic)
+		com_err(device, 0, "catastrophic mode - not reading inode or group bitmaps");
+	else {
+		retval = ext2fs_read_inode_bitmap(current_fs);
+		if (retval) {
+			com_err(device, retval, "while reading inode bitmap");
+			goto errout;
+		}
+		retval = ext2fs_read_block_bitmap(current_fs);
+		if (retval) {
+			com_err(device, retval, "while reading block bitmap");
+			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(current_fs);
+	if (retval)
+		com_err(device, retval, "while trying to close filesystem");
+	current_fs = NULL;
+}
+
+void do_open_filesys(int argc, char **argv)
+{
+	int	c, err;
+	int	catastrophic = 0;
+	blk64_t	superblock = 0;
+	blk64_t	blocksize = 0;
+	int	open_flags = EXT2_FLAG_SOFTSUPP_FEATURES | EXT2_FLAG_64BITS; 
+	char	*data_filename = 0;
+
+	reset_getopt();
+	while ((c = getopt (argc, argv, "iwfecb:s:d:D")) != 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);
+			if (err)
+				return;
+			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);
+	return;
+
+print_usage:
+	fprintf(stderr, "%s: Usage: open [-s superblock] [-b blocksize] "
+		"[-d image_filename] [-c] [-i] [-f] [-e] [-D] "
+#ifndef READ_ONLY
+		"[-w] "
+#endif
+		"<device>\n", argv[0]);
+}
+
+void do_lcd(int argc, char **argv)
+{
+	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);
+	}
+	retval = ext2fs_close(current_fs);
+	if (retval)
+		com_err("ext2fs_close", retval, 0);
+	current_fs = NULL;
+	return;
+}
+
+void do_close_filesys(int argc, char **argv)
+{
+	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)
+{
+	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);
+	if (err)
+		return;
+	ext2fs_blocks_count_set(&param, blocks);
+	if (err)
+		return;
+	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[])
+{
+	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 (EXT2_HAS_RO_COMPAT_FEATURE(current_fs->super,
+				       EXT4_FEATURE_RO_COMPAT_BIGALLOC))
+		units = "cluster";
+
+	list_super2(current_fs->super, out);
+	for (i=0; i < current_fs->group_desc_count; i++)
+		numdirs += ext2fs_bg_used_dirs_count(current_fs, i);
+	fprintf(out, "Directories:              %d\n", numdirs);
+
+	if (header_only) {
+		close_pager(out);
+		return;
+	}
+
+	gdt_csum = EXT2_HAS_RO_COMPAT_FEATURE(current_fs->super,
+					      EXT4_FEATURE_RO_COMPAT_GDT_CSUM);
+	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, ext2fs_block_bitmap_loc(current_fs, i),
+		        ext2fs_inode_bitmap_loc(current_fs, i),
+			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 [-h]\n", argv[0]);
+}
+
+#ifndef READ_ONLY
+void do_dirty_filesys(int argc EXT2FS_ATTR((unused)),
+		      char **argv 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, lb->first_block);
+	else
+		fprintf(lb->f, "(%lld-%lld):%llu-%llu",
+			(long long)lb->first_bcnt, (long long)lb->last_bcnt,
+			lb->first_block, 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 dump_xattr_string(FILE *out, const char *str, int len)
+{
+	int printable = 0;
+	int i;
+
+	/* check: is string "printable enough?" */
+	for (i = 0; i < len; i++)
+		if (isprint(str[i]))
+			printable++;
+
+	if (printable <= len*7/8)
+		printable = 0;
+
+	for (i = 0; i < len; i++)
+		if (printable)
+			fprintf(out, isprint(str[i]) ? "%c" : "\\%03o",
+				(unsigned char)str[i]);
+		else
+			fprintf(out, "%02x ", (unsigned char)str[i]);
+}
+
+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)
+{
+	struct ext2_ext_attr_entry *entry;
+	__u32 *magic;
+	char *start, *end;
+	unsigned int storage_size;
+
+	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;
+	}
+	storage_size = EXT2_INODE_SIZE(current_fs->super) -
+			EXT2_GOOD_OLD_INODE_SIZE -
+			inode->i_extra_isize;
+	magic = (__u32 *)((char *)inode + EXT2_GOOD_OLD_INODE_SIZE +
+			inode->i_extra_isize);
+	if (*magic == EXT2_EXT_ATTR_MAGIC) {
+		fprintf(out, "Extended attributes stored in inode body: \n");
+		end = (char *) inode + EXT2_INODE_SIZE(current_fs->super);
+		start = (char *) magic + sizeof(__u32);
+		entry = (struct ext2_ext_attr_entry *) start;
+		while (!EXT2_EXT_IS_LAST_ENTRY(entry)) {
+			struct ext2_ext_attr_entry *next =
+				EXT2_EXT_ATTR_NEXT(entry);
+			if (entry->e_value_size > storage_size ||
+					(char *) next >= end) {
+				fprintf(out, "invalid EA entry in inode\n");
+				return;
+			}
+			fprintf(out, "  ");
+			dump_xattr_string(out, EXT2_EXT_ATTR_NAME(entry),
+					  entry->e_name_len);
+			fprintf(out, " = \"");
+			dump_xattr_string(out, start + entry->e_value_offs,
+						entry->e_value_size);
+			fprintf(out, "\" (%u)\n", entry->e_value_size);
+			entry = next;
+		}
+	}
+}
+
+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,
+					extent.e_lblk,
+					logical_width,
+					extent.e_lblk + (extent.e_len - 1),
+					physical_width,
+					extent.e_pblk,
+					physical_width+3, "", extent.e_len);
+				continue;
+			}
+
+			fprintf(f, "%s(ETB%d):%lld",
+				printed ? ", " : "", info.curr_level,
+				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,
+				extent.e_lblk,
+				logical_width,
+				extent.e_lblk + (extent.e_len - 1),
+				physical_width,
+				extent.e_pblk,
+				physical_width,
+				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 ? ", " : "",
+				extent.e_lblk,
+				extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT ?
+				"[u]" : "",
+				extent.e_pblk);
+		else
+			fprintf(f,
+				"%s(%lld-%lld%s):%lld-%lld",
+				printed ? ", " : "",
+				extent.e_lblk,
+				extent.e_lblk + (extent.e_len - 1),
+				extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT ?
+					"[u]" : "",
+				extent.e_pblk,
+				extent.e_pblk + (extent.e_len - 1));
+		printed = 1;
+	}
+	if (printed)
+		fprintf(f, "\n");
+}
+
+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:  %04o   Flags: 0x%x\n",
+		prefix, inode->i_mode & 0777, 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   Size: ",
+		prefix, inode_uid(*inode), inode_gid(*inode));
+	if (LINUX_S_ISREG(inode->i_mode))
+		fprintf(out, "%llu\n", EXT2_I_SIZE(inode));
+	else
+		fprintf(out, "%d\n", inode->i_size);
+	if (os == EXT2_OS_HURD)
+		fprintf(out,
+			"%sFile ACL: %d    Directory ACL: %d Translator: %d\n",
+			prefix,
+			inode->i_file_acl, LINUX_S_ISDIR(inode->i_mode) ? inode->i_dir_acl : 0,
+			inode->osd1.hurd1.h_i_translator);
+	else
+		fprintf(out, "%sFile ACL: %llu    Directory ACL: %d\n",
+			prefix,
+			inode->i_file_acl | ((long long)
+				(inode->osd2.linux2.l_i_file_acl_high) << 32),
+			LINUX_S_ISDIR(inode->i_mode) ? inode->i_dir_acl : 0);
+	if (os == EXT2_OS_LINUX)
+		fprintf(out, "%sLinks: %d   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: %d   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: %d    Number: %d    Size: %d\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,
+			time_to_string(inode->i_ctime));
+		fprintf(out, "%s atime: 0x%08x:%08x -- %s", prefix,
+			inode->i_atime, large_inode->i_atime_extra,
+			time_to_string(inode->i_atime));
+		fprintf(out, "%s mtime: 0x%08x:%08x -- %s", prefix,
+			inode->i_mtime, large_inode->i_mtime_extra,
+			time_to_string(inode->i_mtime));
+		fprintf(out, "%scrtime: 0x%08x:%08x -- %s", prefix,
+			large_inode->i_crtime, large_inode->i_crtime_extra,
+			time_to_string(large_inode->i_crtime));
+	} else {
+		fprintf(out, "%sctime: 0x%08x -- %s", prefix, inode->i_ctime,
+			time_to_string(inode->i_ctime));
+		fprintf(out, "%satime: 0x%08x -- %s", prefix, inode->i_atime,
+			time_to_string(inode->i_atime));
+		fprintf(out, "%smtime: 0x%08x -- %s", prefix, inode->i_mtime,
+			time_to_string(inode->i_mtime));
+	}
+	if (inode->i_dtime)
+	  fprintf(out, "%sdtime: 0x%08x -- %s", prefix, inode->i_dtime,
+		  time_to_string(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);
+	if (LINUX_S_ISLNK(inode->i_mode) && ext2fs_inode_data_blocks(current_fs,inode) == 0)
+		fprintf(out, "%sFast_link_dest: %.*s\n", prefix,
+			(int) inode->i_size, (char *)inode->i_block);
+	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
+			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[])
+{
+	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_inode_full(inode, inode_buf, argv[0],
+					EXT2_INODE_SIZE(current_fs->super))) {
+		free(inode_buf);
+		return;
+	}
+
+	dump_inode(inode, inode_buf);
+	free(inode_buf);
+	return;
+}
+
+void do_dump_extents(int argc, char **argv)
+{
+	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 ", *blocknr);
+	return 0;
+}
+
+void do_blocks(int argc, char *argv[])
+{
+	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[])
+{
+	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[])
+{
+	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[])
+{
+	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[])
+{
+	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[])
+{
+	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[])
+{
+	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",
+				block);
+		ext2fs_unmark_block_bitmap2(current_fs->block_map,block);
+		block++;
+	}
+	ext2fs_mark_bb_dirty(current_fs);
+}
+
+void do_setb(int argc, char *argv[])
+{
+	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",
+				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[])
+{
+	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", block);
+		else
+			printf("Block %llu not in use\n", 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[])
+{
+	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);
+	if (LINUX_S_ISDIR(inode.i_mode))
+		modify_u32(argv[0], "Directory acl", decimal_format, &inode.i_dir_acl);
+	else
+		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 #%d", 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[])
+{
+	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	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[])
+{
+	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[])
+{
+	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[])
+{
+	if (common_args_process(argc, argv, 2, 2, "link",
+				"<pathname>", CHECK_FS_RW))
+		return;
+
+	unlink_file_by_name(argv[1]);
+}
+#endif /* READ_ONLY */
+
+void do_find_free_block(int argc, char *argv[])
+{
+	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 ", free_blk);
+	}
+ 	printf("\n");
+}
+
+void do_find_free_inode(int argc, char *argv[])
+{
+	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
+static errcode_t copy_file(int fd, ext2_ino_t newfile, int bufsize, int make_holes)
+{
+	ext2_file_t	e2_file;
+	errcode_t	retval;
+	int		got;
+	unsigned int	written;
+	char		*buf;
+	char		*ptr;
+	char		*zero_buf;
+	int		cmp;
+
+	retval = ext2fs_file_open(current_fs, newfile,
+				  EXT2_FILE_WRITE, &e2_file);
+	if (retval)
+		return retval;
+
+	retval = ext2fs_get_mem(bufsize, &buf);
+	if (retval) {
+		com_err("copy_file", retval, "can't allocate buffer\n");
+		return retval;
+	}
+
+	/* This is used for checking whether the whole block is zero */
+	retval = ext2fs_get_memzero(bufsize, &zero_buf);
+	if (retval) {
+		com_err("copy_file", retval, "can't allocate buffer\n");
+		ext2fs_free_mem(&buf);
+		return retval;
+	}
+
+	while (1) {
+		got = read(fd, buf, bufsize);
+		if (got == 0)
+			break;
+		if (got < 0) {
+			retval = errno;
+			goto fail;
+		}
+		ptr = buf;
+
+		/* Sparse copy */
+		if (make_holes) {
+			/* Check whether all is zero */
+			cmp = memcmp(ptr, zero_buf, got);
+			if (cmp == 0) {
+				 /* The whole block is zero, make a hole */
+				retval = ext2fs_file_lseek(e2_file, got, EXT2_SEEK_CUR, NULL);
+				if (retval)
+					goto fail;
+				got = 0;
+			}
+		}
+
+		/* Normal copy */
+		while (got > 0) {
+			retval = ext2fs_file_write(e2_file, ptr,
+						   got, &written);
+			if (retval)
+				goto fail;
+
+			got -= written;
+			ptr += written;
+		}
+	}
+	ext2fs_free_mem(&buf);
+	ext2fs_free_mem(&zero_buf);
+	retval = ext2fs_file_close(e2_file);
+	return retval;
+
+fail:
+	ext2fs_free_mem(&buf);
+	ext2fs_free_mem(&zero_buf);
+	(void) ext2fs_file_close(e2_file);
+	return retval;
+}
+
+
+void do_write(int argc, char *argv[])
+{
+	int		fd;
+	struct stat	statbuf;
+	ext2_ino_t	newfile;
+	errcode_t	retval;
+	struct ext2_inode inode;
+	int		bufsize = IO_BUFSIZE;
+	int		make_holes = 0;
+
+	if (common_args_process(argc, argv, 3, 3, "write",
+				"<native file> <new file>", CHECK_FS_RW))
+		return;
+
+	fd = open(argv[1], O_RDONLY);
+	if (fd < 0) {
+		com_err(argv[1], errno, 0);
+		return;
+	}
+	if (fstat(fd, &statbuf) < 0) {
+		com_err(argv[1], errno, 0);
+		close(fd);
+		return;
+	}
+
+	retval = ext2fs_namei(current_fs, root, cwd, argv[2], &newfile);
+	if (retval == 0) {
+		com_err(argv[0], 0, "The file '%s' already exists\n", argv[2]);
+		close(fd);
+		return;
+	}
+
+	retval = ext2fs_new_inode(current_fs, cwd, 010755, 0, &newfile);
+	if (retval) {
+		com_err(argv[0], retval, 0);
+		close(fd);
+		return;
+	}
+	printf("Allocated inode: %u\n", newfile);
+	retval = ext2fs_link(current_fs, cwd, argv[2], newfile,
+			     EXT2_FT_REG_FILE);
+	if (retval == EXT2_ET_DIR_NO_SPACE) {
+		retval = ext2fs_expand_dir(current_fs, cwd);
+		if (retval) {
+			com_err(argv[0], retval, "while expanding directory");
+			close(fd);
+			return;
+		}
+		retval = ext2fs_link(current_fs, cwd, argv[2], newfile,
+				     EXT2_FT_REG_FILE);
+	}
+	if (retval) {
+		com_err(argv[2], retval, 0);
+		close(fd);
+		return;
+	}
+        if (ext2fs_test_inode_bitmap2(current_fs->inode_map,newfile))
+		com_err(argv[0], 0, "Warning: inode already set");
+	ext2fs_inode_alloc_stats2(current_fs, newfile, +1, 0);
+	memset(&inode, 0, sizeof(inode));
+	inode.i_mode = (statbuf.st_mode & ~LINUX_S_IFMT) | LINUX_S_IFREG;
+	inode.i_atime = inode.i_ctime = inode.i_mtime =
+		current_fs->now ? current_fs->now : time(0);
+	inode.i_links_count = 1;
+	inode.i_size = statbuf.st_size;
+	if (current_fs->super->s_feature_incompat &
+	    EXT3_FEATURE_INCOMPAT_EXTENTS) {
+		int i;
+		struct ext3_extent_header *eh;
+
+		eh = (struct ext3_extent_header *) &inode.i_block[0];
+		eh->eh_depth = 0;
+		eh->eh_entries = 0;
+		eh->eh_magic = ext2fs_cpu_to_le16(EXT3_EXT_MAGIC);
+		i = (sizeof(inode.i_block) - sizeof(*eh)) /
+			sizeof(struct ext3_extent);
+		eh->eh_max = ext2fs_cpu_to_le16(i);
+		inode.i_flags |= EXT4_EXTENTS_FL;
+	}
+	if (debugfs_write_new_inode(newfile, &inode, argv[0])) {
+		close(fd);
+		return;
+	}
+	if (LINUX_S_ISREG(inode.i_mode)) {
+		if (statbuf.st_blocks < statbuf.st_size / S_BLKSIZE) {
+			make_holes = 1;
+			/*
+			 * Use I/O blocksize as buffer size when
+			 * copying sparse files.
+			 */
+			bufsize = statbuf.st_blksize;
+		}
+		retval = copy_file(fd, newfile, bufsize, make_holes);
+		if (retval)
+			com_err("copy_file", retval, 0);
+	}
+	close(fd);
+}
+
+void do_mknod(int argc, char *argv[])
+{
+	unsigned long	mode, major, minor;
+	ext2_ino_t	newfile;
+	errcode_t 	retval;
+	struct ext2_inode inode;
+	int		filetype, nr;
+
+	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;
+	}
+	mode = minor = major = 0;
+	switch (argv[2][0]) {
+		case 'p':
+			mode = LINUX_S_IFIFO;
+			filetype = EXT2_FT_FIFO;
+			nr = 3;
+			break;
+		case 'c':
+			mode = LINUX_S_IFCHR;
+			filetype = EXT2_FT_CHRDEV;
+			nr = 5;
+			break;
+		case 'b':
+			mode = LINUX_S_IFBLK;
+			filetype = EXT2_FT_BLKDEV;
+			nr = 5;
+			break;
+		default:
+			filetype = 0;
+			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;
+	if (check_fs_read_write(argv[0]))
+		return;
+	retval = ext2fs_new_inode(current_fs, cwd, 010755, 0, &newfile);
+	if (retval) {
+		com_err(argv[0], retval, 0);
+		return;
+	}
+	printf("Allocated inode: %u\n", newfile);
+	retval = ext2fs_link(current_fs, cwd, argv[1], newfile, filetype);
+	if (retval == EXT2_ET_DIR_NO_SPACE) {
+		retval = ext2fs_expand_dir(current_fs, cwd);
+		if (retval) {
+			com_err(argv[0], retval, "while expanding directory");
+			return;
+		}
+		retval = ext2fs_link(current_fs, cwd, argv[1], newfile,
+				     filetype);
+	}
+	if (retval) {
+		com_err(argv[1], retval, 0);
+		return;
+	}
+        if (ext2fs_test_inode_bitmap2(current_fs->inode_map,newfile))
+		com_err(argv[0], 0, "Warning: inode already set");
+	ext2fs_inode_alloc_stats2(current_fs, newfile, +1, 0);
+	memset(&inode, 0, sizeof(inode));
+	inode.i_mode = mode;
+	inode.i_atime = inode.i_ctime = inode.i_mtime =
+		current_fs->now ? current_fs->now : time(0);
+	if ((major < 256) && (minor < 256)) {
+		inode.i_block[0] = major*256+minor;
+		inode.i_block[1] = 0;
+	} else {
+		inode.i_block[0] = 0;
+		inode.i_block[1] = (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
+	}
+	inode.i_links_count = 1;
+	if (debugfs_write_new_inode(newfile, &inode, argv[0]))
+		return;
+}
+
+void do_mkdir(int argc, char *argv[])
+{
+	char	*cp;
+	ext2_ino_t	parent;
+	char	*name;
+	errcode_t retval;
+
+	if (common_args_process(argc, argv, 2, 2, "mkdir",
+				"<filename>", CHECK_FS_RW))
+		return;
+
+	cp = strrchr(argv[1], '/');
+	if (cp) {
+		*cp = 0;
+		parent = string_to_inode(argv[1]);
+		if (!parent) {
+			com_err(argv[1], ENOENT, 0);
+			return;
+		}
+		name = cp+1;
+	} else {
+		parent = cwd;
+		name = argv[1];
+	}
+
+try_again:
+	retval = ext2fs_mkdir(current_fs, parent, 0, name);
+	if (retval == EXT2_ET_DIR_NO_SPACE) {
+		retval = ext2fs_expand_dir(current_fs, parent);
+		if (retval) {
+			com_err(argv[0], retval, "while expanding directory");
+			return;
+		}
+		goto try_again;
+	}
+	if (retval) {
+		com_err("ext2fs_mkdir", retval, 0);
+		return;
+	}
+
+}
+
+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;
+
+	block = *blocknr;
+	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))
+		return;
+
+	ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, NULL,
+			      release_blocks_proc, NULL);
+	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[])
+{
+	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 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 (((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;
+}
+
+void do_rmdir(int argc, char *argv[])
+{
+	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)))
+{
+	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[])
+{
+	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	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[])
+{
+	ext2_ino_t	ino;
+	blk64_t		blk, pblk;
+	int		err;
+	errcode_t	errcode;
+
+	if (common_args_process(argc, argv, 3, 3, argv[0],
+				"<file> logical_blk", 0))
+		return;
+
+	ino = string_to_inode(argv[1]);
+	if (!ino)
+		return;
+	err = strtoblk(argv[0], argv[2], &blk);
+	if (err)
+		return;
+
+	errcode = ext2fs_bmap2(current_fs, ino, 0, 0, 0, blk, 0, &pblk);
+	if (errcode) {
+		com_err(argv[0], errcode,
+			"while mapping logical block %llu\n", blk);
+		return;
+	}
+	printf("%llu\n", pblk);
+}
+
+void do_imap(int argc, char *argv[])
+{
+	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 %d is part of block group %lu\n"
+	       "\tlocated at block %lu, offset 0x%04lx\n", ino, group,
+	       block_nr, offset);
+
+}
+
+#ifndef READ_ONLY
+void do_set_current_time(int argc, char *argv[])
+{
+	time_t now;
+
+	if (common_args_process(argc, argv, 2, 2, argv[0],
+				"<time>", 0))
+		return;
+
+	now = string_to_time(argv[1]);
+	if (now == ((time_t) -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	ret;
+	__u32	supp[3] = { EXT2_LIB_FEATURE_COMPAT_SUPP,
+			    EXT2_LIB_FEATURE_INCOMPAT_SUPP,
+			    EXT2_LIB_FEATURE_RO_COMPAT_SUPP };
+	__u32	jrnl_supp[3] = { JFS_KNOWN_COMPAT_FEATURES,
+				 JFS_KNOWN_INCOMPAT_FEATURES,
+				 JFS_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[])
+{
+	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], &start);
+	if (err)
+		return;
+	if (argc == 4) {
+		err = strtoblk(argv[0], argv[3], &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;
+	}
+}
+#endif /* READ_ONLY */
+
+void do_symlink(int argc, char *argv[])
+{
+	char		*cp;
+	ext2_ino_t	parent;
+	char		*name, *target;
+	errcode_t	retval;
+
+	if (common_args_process(argc, argv, 3, 3, "symlink",
+				"<filename> <target>", CHECK_FS_RW))
+		return;
+
+	cp = strrchr(argv[1], '/');
+	if (cp) {
+		*cp = 0;
+		parent = string_to_inode(argv[1]);
+		if (!parent) {
+			com_err(argv[1], ENOENT, 0);
+			return;
+		}
+		name = cp+1;
+	} else {
+		parent = cwd;
+		name = argv[1];
+	}
+	target = argv[2];
+
+try_again:
+	retval = ext2fs_symlink(current_fs, parent, 0, name, target);
+	if (retval == EXT2_ET_DIR_NO_SPACE) {
+		retval = ext2fs_expand_dir(current_fs, parent);
+		if (retval) {
+			com_err(argv[0], retval, "while expanding directory");
+			return;
+		}
+		goto try_again;
+	}
+	if (retval) {
+		com_err("ext2fs_symlink", retval, 0);
+		return;
+	}
+
+}
+
+void do_dump_mmp(int argc EXT2FS_ATTR((unused)), char *argv[])
+{
+	struct ext2_super_block *sb;
+	struct mmp_struct *mmp_s;
+	time_t t;
+	errcode_t retval = 0;
+
+	if (check_fs_open(argv[0]))
+		return;
+
+	sb  = current_fs->super;
+
+	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, current_fs->super->s_mmp_block,
+				 current_fs->mmp_buf);
+	if (retval) {
+		com_err(argv[0], retval, "reading MMP block.\n");
+		return;
+	}
+
+	t = mmp_s->mmp_time;
+	fprintf(stdout, "block_number: %llu\n", 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: %lld -- %s", mmp_s->mmp_time, ctime(&t));
+	fprintf(stdout, "node_name: %s\n", mmp_s->mmp_nodename);
+	fprintf(stdout, "device_name: %s\n", mmp_s->mmp_bdevname);
+	fprintf(stdout, "magic: 0x%x\n", mmp_s->mmp_magic);
+}
+
+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;
+		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] [-V] ["
+#ifndef READ_ONLY
+		"[-w] "
+#endif
+		"[-c] device]";
+	int		c;
+	int		open_flags = EXT2_FLAG_SOFTSUPP_FEATURES | EXT2_FLAG_64BITS;
+	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 = "icR:f:b:s:Vd:D";
+#else
+	const char	*opt_string = "iwcR:f:b:s:Vd:D";
+#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);
+
+	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;
+#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);
+			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);
+		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);
+
+	sci_idx = ss_create_invocation(debug_prog_name, "0.0", (char *) NULL,
+				       &debug_cmds, &retval);
+	if (retval) {
+		ss_perror(sci_idx, retval, "creating invocation");
+		exit(1);
+	}
+	ss_get_readline(sci_idx);
+
+	(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 (extra_cmds)
+		ss_add_request_table (sci_idx, extra_cmds, 1, &retval);
+	if (retval) {
+		ss_perror(sci_idx, retval, "adding extra 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);
+	}
+
+	ss_delete_invocation(sci_idx);
+
+	if (current_fs)
+		close_filesystem();
+
+	remove_error_table(&et_ext2_error_table);
+	return exit_status;
+}
diff --git a/e2fsprogs/debugfs/debugfs.h b/e2fsprogs/debugfs/debugfs.h
new file mode 100644
index 0000000..6b4f6ef
--- /dev/null
+++ b/e2fsprogs/debugfs/debugfs.h
@@ -0,0 +1,178 @@
+/*
+ * debugfs.h --- header file for the debugfs program
+ */
+
+#include "ss/ss.h"
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.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 ext2_ino_t	root, cwd;
+extern int 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 *time_to_string(__u32);
+extern time_t 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, 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_inode_full(ext2_ino_t ino, struct ext2_inode * inode,
+				   const char *cmd, int bufsize);
+extern int debugfs_write_inode(ext2_ino_t ino, struct ext2_inode * inode,
+			       const char *cmd);
+extern int debugfs_write_inode_full(ext2_ino_t ino, struct ext2_inode * inode,
+				    const char *cmd, int bufsize);
+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);
+extern void do_cat(int argc, char **argv);
+extern void do_rdump(int argc, char **argv);
+
+/* extent_inode.c */
+extern void do_extent_open(int argc, char **argv);
+extern void do_extent_close(int argc, char **argv);
+extern void do_current_node(int argc, char **argv);
+extern void do_root_node(int argc, char **argv);
+extern void do_last_leaf(int argc, char **argv);
+extern void do_first_sib(int argc, char **argv);
+extern void do_last_sib(int argc, char **argv);
+extern void do_next_sib(int argc, char **argv);
+extern void do_prev_sib(int argc, char **argv);
+extern void do_next_leaf(int argc, char **argv);
+extern void do_prev_leaf(int argc, char **argv);
+extern void do_next(int argc, char **argv);
+extern void do_prev(int argc, char **argv);
+extern void do_up(int argc, char **argv);
+extern void do_down(int argc, char **argv);
+extern void do_delete_node(int argc, char **argv);
+extern void do_replace_node(int argc, char **argv);
+extern void do_split_node(int argc, char **argv);
+extern void do_insert_node(int argc, char **argv);
+extern void do_set_bmap(int argc, char **argv);
+extern void do_print_all(int argc, char **argv);
+extern void do_fix_parents(int argc, char **argv);
+extern void do_info(int argc, char **argv);
+extern void do_goto_block(int argc, char **argv);
+
+/* htree.c */
+extern void do_htree_dump(int argc, char **argv);
+extern void do_dx_hash(int argc, char **argv);
+extern void do_dirsearch(int argc, char **argv);
+
+/* logdump.c */
+extern void do_logdump(int argc, char **argv);
+
+/* lsdel.c */
+extern void do_lsdel(int argc, char **argv);
+
+/* icheck.c */
+extern void do_icheck(int argc, char **argv);
+
+/* ncheck.c */
+extern void do_ncheck(int argc, char **argv);
+
+/* set_fields.c */
+extern void do_set_super(int argc, char **);
+extern void do_set_inode(int argc, char **);
+extern void do_set_block_group_descriptor(int argc, char **);
+
+/* unused.c */
+extern void do_dump_unused(int argc, char **argv);
+
+/* debugfs.c */
+extern void internal_dump_inode(FILE *, const char *, ext2_ino_t,
+				struct ext2_inode *, int);
+
+extern void do_dirty_filesys(int argc, char **argv);
+extern void do_open_filesys(int argc, char **argv);
+extern void do_close_filesys(int argc, char **argv);
+extern void do_lcd(int argc, char **argv);
+extern void do_init_filesys(int argc, char **argv);
+extern void do_show_super_stats(int argc, char **argv);
+extern void do_kill_file(int argc, char **argv);
+extern void do_rm(int argc, char **argv);
+extern void do_link(int argc, char **argv);
+extern void do_undel(int argc, char **argv);
+extern void do_unlink(int argc, char **argv);
+extern void do_find_free_block(int argc, char **argv);
+extern void do_find_free_inode(int argc, char **argv);
+extern void do_stat(int argc, char **argv);
+extern void do_dump_extents(int argc, char **argv);
+extern void do_blocks(int argc, char *argv[]);
+
+extern void do_chroot(int argc, char **argv);
+extern void do_clri(int argc, char **argv);
+extern void do_freei(int argc, char **argv);
+extern void do_seti(int argc, char **argv);
+extern void do_testi(int argc, char **argv);
+extern void do_freeb(int argc, char **argv);
+extern void do_setb(int argc, char **argv);
+extern void do_testb(int argc, char **argv);
+extern void do_modify_inode(int argc, char **argv);
+extern void do_list_dir(int argc, char **argv);
+extern void do_change_working_dir(int argc, char **argv);
+extern void do_print_working_directory(int argc, char **argv);
+extern void do_write(int argc, char **argv);
+extern void do_mknod(int argc, char **argv);
+extern void do_mkdir(int argc, char **argv);
+extern void do_rmdir(int argc, char **argv);
+extern void do_show_debugfs_params(int argc, char **argv);
+extern void do_expand_dir(int argc, char **argv);
+extern void do_features(int argc, char **argv);
+extern void do_bmap(int argc, char **argv);
+extern void do_imap(int argc, char **argv);
+extern void do_set_current_time(int argc, char **argv);
+extern void do_supported_features(int argc, char **argv);
+extern void do_punch(int argc, char **argv);
+extern void do_symlink(int argc, char **argv);
+
+extern void do_dump_mmp(int argc, char **argv);
+extern void do_set_mmp_value(int argc, char **argv);
+
+extern void do_freefrag(int argc, char **argv);
+extern void do_filefrag(int argc, char *argv[]);
+
+/* util.c */
+extern time_t string_to_time(const char *arg);
+
+/* zap.c */
+extern void do_zap_block(int argc, char **argv);
+extern void do_block_dump(int argc, char **argv);
diff --git a/e2fsprogs/debugfs/dump.c b/e2fsprogs/debugfs/dump.c
new file mode 100644
index 0000000..750ff3c
--- /dev/null
+++ b/e2fsprogs/debugfs/dump.c
@@ -0,0 +1,381 @@
+/*
+ * 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 <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->i_uid, inode->i_gid);
+#else
+	if (fd != -1)
+		i = fchown(fd, inode->i_uid, inode->i_gid);
+	else
+		i = chown(name, inode->i_uid, inode->i_gid);
+#endif
+	if (i == -1)
+		com_err(cmd, errno, "while changing ownership of %s", name);
+
+	if (fd != -1)
+		close(fd);
+
+	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)
+{
+	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;
+	}
+
+	/* Apparently, this is the right way to detect and handle fast
+	 * symlinks; see do_stat() in debugfs.c. */
+	if (inode->i_blocks == 0)
+		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 dumping %s", fullname);
+			goto errout;
+		}
+		dump_file("rdump", ino, fd, 1, fullname);
+		if (close(fd) != 0) {
+			com_err("rdump", errno, "while dumping %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 (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 = dirent->name_len & 0xFF;
+	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)
+{
+	ext2_ino_t ino;
+	struct ext2_inode inode;
+	struct stat st;
+	int i;
+	char *p;
+
+	if (common_args_process(argc, argv, 3, 3, "rdump",
+				"<directory> <native directory>", 0))
+		return;
+
+	ino = string_to_inode(argv[1]);
+	if (!ino)
+		return;
+
+	/* Ensure ARGV[2] is a directory. */
+	i = stat(argv[2], &st);
+	if (i == -1) {
+		com_err("rdump", errno, "while statting %s", argv[2]);
+		return;
+	}
+	if (!S_ISDIR(st.st_mode)) {
+		com_err("rdump", 0, "%s is not a directory", argv[2]);
+		return;
+	}
+
+	if (debugfs_read_inode(ino, &inode, argv[1]))
+		return;
+
+	p = strrchr(argv[1], '/');
+	if (p)
+		p++;
+	else
+		p = argv[1];
+
+	rdump_inode(ino, &inode, p, argv[2]);
+}
+
+void do_cat(int argc, char **argv)
+{
+	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/e2fsprogs/debugfs/extent_cmds.ct b/e2fsprogs/debugfs/extent_cmds.ct
new file mode 100644
index 0000000..e1c4395
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/debugfs/extent_inode.c b/e2fsprogs/debugfs/extent_inode.c
new file mode 100644
index 0000000..25b8946
--- /dev/null
+++ b/e2fsprogs/debugfs/extent_inode.c
@@ -0,0 +1,537 @@
+/*
+ * 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 <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: ",
+	       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 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[])
+{
+	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 %d\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);
+	strcpy(extent_prompt, orig_prompt);
+	cp = strchr(extent_prompt, ':');
+	if (cp)
+		*cp = 0;
+	sprintf(extent_prompt + strlen(extent_prompt), " (extent ino %d): ",
+		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 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[])
+{
+	generic_goto_node("current_node", argc, argv, EXT2_EXTENT_CURRENT);
+}
+
+void do_root_node(int argc, char *argv[])
+{
+	generic_goto_node("root_node", argc, argv, EXT2_EXTENT_ROOT);
+}
+
+void do_last_leaf(int argc, char *argv[])
+{
+	generic_goto_node("last_leaf", argc, argv, EXT2_EXTENT_LAST_LEAF);
+}
+
+void do_first_sib(int argc, char *argv[])
+{
+	generic_goto_node("first_sib", argc, argv, EXT2_EXTENT_FIRST_SIB);
+}
+
+void do_last_sib(int argc, char *argv[])
+{
+	generic_goto_node("next_sib", argc, argv, EXT2_EXTENT_LAST_SIB);
+}
+
+void do_next_sib(int argc, char *argv[])
+{
+	generic_goto_node("next_sib", argc, argv, EXT2_EXTENT_NEXT_SIB);
+}
+
+void do_prev_sib(int argc, char *argv[])
+{
+	generic_goto_node("prev_sib", argc, argv, EXT2_EXTENT_PREV_SIB);
+}
+
+void do_next_leaf(int argc, char *argv[])
+{
+	generic_goto_node("next_leaf", argc, argv, EXT2_EXTENT_NEXT_LEAF);
+}
+
+void do_prev_leaf(int argc, char *argv[])
+{
+	generic_goto_node("prev_leaf", argc, argv, EXT2_EXTENT_PREV_LEAF);
+}
+
+void do_next(int argc, char *argv[])
+{
+	generic_goto_node("next", argc, argv, EXT2_EXTENT_NEXT);
+}
+
+void do_prev(int argc, char *argv[])
+{
+	generic_goto_node("prev", argc, argv, EXT2_EXTENT_PREV);
+}
+
+void do_up(int argc, char *argv[])
+{
+	generic_goto_node("up", argc, argv, EXT2_EXTENT_UP);
+}
+
+void do_down(int argc, char *argv[])
+{
+	generic_goto_node("down", argc, argv, EXT2_EXTENT_DOWN);
+}
+
+void do_delete_node(int argc, char *argv[])
+{
+	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[])
+{
+	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], &extent.e_lblk);
+	if (err)
+		return;
+
+	extent.e_len = parse_ulong(argv[2], argv[0], "logical block", &err);
+	if (err)
+		return;
+
+	err = strtoblk(argv[0], argv[3], &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[])
+{
+	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[])
+{
+	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], &extent.e_lblk);
+	if (err)
+		return;
+
+	extent.e_len = parse_ulong(argv[2], cmd,
+				    "length", &err);
+	if (err)
+		return;
+
+	err = strtoblk(cmd, argv[3], &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)
+{
+	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);
+	if (err)
+		return;
+
+	err = strtoblk(cmd, argv[2], &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)
+{
+	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)
+{
+	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)
+{
+	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", info.max_lblk,
+	       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)
+{
+	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], &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/e2fsprogs/debugfs/filefrag.c b/e2fsprogs/debugfs/filefrag.c
new file mode 100644
index 0000000..67a7678
--- /dev/null
+++ b/e2fsprogs/debugfs/filefrag.c
@@ -0,0 +1,323 @@
+/*
+ * 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 <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, fs->physical_start,
+				fs->physical_width, 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, 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 (!(current_fs->super->s_feature_ro_compat &
+		     EXT4_FEATURE_RO_COMPAT_HUGE_FILE) ||
+		    !(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, num_blocks, EXT2_I_SIZE(inode));
+	}
+	print_header(fs);
+	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 = dirent->name_len & 0xFF;
+	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[])
+{
+	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/e2fsprogs/debugfs/htree.c b/e2fsprogs/debugfs/htree.c
new file mode 100644
index 0000000..03b62a7
--- /dev/null
+++ b/e2fsprogs/debugfs/htree.c
@@ -0,0 +1,408 @@
+/*
+ * 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 <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;
+
+	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", blk);
+		return;
+	}
+
+	fprintf(pager, "Reading directory block %llu, phys %llu\n", blk, pblk);
+	errcode = ext2fs_read_dir_block2(current_fs, pblk, buf, 0);
+	if (errcode) {
+		com_err("htree_dump_leaf_node", errcode,
+			"while reading block %llu (%llu)\n",
+			blk, 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;
+		}
+		if (((offset + rec_len) > fs->blocksize) ||
+		    (rec_len < 8) ||
+		    ((rec_len % 4) != 0) ||
+		    ((((unsigned) dirent->name_len & 0xFF)+8) > rec_len)) {
+			fprintf(pager, "Corrupted directory block (%llu)!\n",
+				blk);
+			break;
+		}
+		thislen = dirent->name_len & 0xFF;
+		strncpy(name, dirent->name, thislen);
+		name[thislen] = '\0';
+		errcode = ext2fs_dirhash(hash_alg, name,
+					 thislen, fs->super->s_hash_seed,
+					 &hash, &minor_hash);
+		if (errcode)
+			com_err("htree_dump_leaf_node", errcode,
+				"while calculating hash");
+		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,
+				char *buf, int level)
+{
+	struct ext2_dx_countlimit	limit;
+	struct ext2_dx_entry		e;
+	int				hash, i;
+
+
+	limit = *((struct ext2_dx_countlimit *) ent);
+	limit.count = ext2fs_le16_to_cpu(limit.count);
+	limit.limit = ext2fs_le16_to_cpu(limit.limit);
+
+	fprintf(pager, "Number of entries (count): %d\n", limit.count);
+	fprintf(pager, "Number of entries (limit): %d\n", limit.limit);
+
+	for (i=0; i < limit.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 < limit.count; i++) {
+		e.hash = ext2fs_le32_to_cpu(ent[i].hash);
+		e.block = ext2fs_le32_to_cpu(ent[i].block);
+		fprintf(pager, "Entry #%d: Hash 0x%08x, block %u\n", i,
+		       i ? e.hash : 0, e.block);
+		if (level)
+			htree_dump_int_block(fs, ino, inode, rootnode,
+					     e.block, buf, level-1);
+		else
+			htree_dump_leaf_node(fs, ino, inode, rootnode,
+					     e.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;
+
+	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", 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", blk);
+		goto errout;
+	}
+
+	htree_dump_int_node(fs, ino, inode, rootnode,
+			    (struct ext2_dx_entry *) (buf+8),
+			    cbuf, level);
+errout:
+	free(cbuf);
+}
+
+
+
+void do_htree_dump(int argc, char *argv[])
+{
+	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;
+
+	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: %d\n", rootnode->unused_flags);
+
+	ent = (struct ext2_dx_entry *) (buf + 24 + rootnode->info_length);
+
+	htree_dump_int_node(current_fs, ino, &inode, rootnode, ent,
+			    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[])
+{
+	ext2_dirhash_t hash, minor_hash;
+	errcode_t	err;
+	int		c;
+	int		hash_version = 0;
+	__u32		hash_seed[4];
+
+	hash_seed[0] = hash_seed[1] = hash_seed[2] = hash_seed[3] = 0;
+
+	reset_getopt();
+	while ((c = getopt (argc, argv, "h:s:")) != 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;
+		default:
+			goto print_usage;
+		}
+	}
+	if (optind != argc-1) {
+	print_usage:
+		com_err(argv[0], 0, "usage: dx_hash [-h hash_alg] "
+			"[-s hash_seed] filename");
+		return;
+	}
+	err = ext2fs_dirhash(hash_version, argv[optind], strlen(argv[optind]),
+			     hash_seed, &hash, &minor_hash);
+	if (err) {
+		com_err(argv[0], err, "while caclulating 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[])
+{
+	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 == (dirent->name_len & 0xFF) &&
+		    strncmp(p->search_name, dirent->name,
+			    p->len) == 0) {
+			printf("Entry found at logical block %lld, "
+			       "phys %llu, offset %u\n", (long long)blockcnt,
+			       *blocknr, offset);
+			printf("offset %u\n", offset);
+			return BLOCK_ABORT;
+		}
+		offset += rec_len;
+	}
+	return 0;
+}
+
diff --git a/e2fsprogs/debugfs/icheck.c b/e2fsprogs/debugfs/icheck.c
new file mode 100644
index 0000000..57fa80b
--- /dev/null
+++ b/e2fsprogs/debugfs/icheck.c
@@ -0,0 +1,172 @@
+/*
+ * 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 <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)
+{
+	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], &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", binfo->blk);
+			continue;
+		}
+		printf("%llu\t%u\n", binfo->blk, binfo->ino);
+	}
+
+error_out:
+	free(bw.barray);
+	free(block_buf);
+	if (scan)
+		ext2fs_close_inode_scan(scan);
+	return;
+}
diff --git a/e2fsprogs/debugfs/jfs_user.h b/e2fsprogs/debugfs/jfs_user.h
new file mode 100644
index 0000000..3070cd5
--- /dev/null
+++ b/e2fsprogs/debugfs/jfs_user.h
@@ -0,0 +1,8 @@
+#ifndef _JFS_USER_H
+#define _JFS_USER_H
+
+typedef unsigned short kdev_t;
+
+#include <ext2fs/kernel-jbd.h>
+
+#endif /* _JFS_USER_H */
diff --git a/e2fsprogs/debugfs/logdump.c b/e2fsprogs/debugfs/logdump.c
new file mode 100644
index 0000000..f257171
--- /dev/null
+++ b/e2fsprogs/debugfs/logdump.c
@@ -0,0 +1,697 @@
+/*
+ * logdump.c --- dump the contents of the journal out to a file
+ *
+ * Authro: 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 <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"
+#include <uuid/uuid.h>
+
+enum journal_location {JOURNAL_IS_INTERNAL, JOURNAL_IS_EXTERNAL};
+
+#define ANY_BLOCK ((blk64_t) -1)
+
+static int		dump_all, dump_contents, dump_descriptors;
+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 *, int, tid_t);
+
+static void dump_revoke_block(FILE *, char *, journal_superblock_t *,
+				  unsigned int, int, tid_t);
+
+static void dump_metadata_block(FILE *, struct journal_source *,
+				journal_superblock_t*,
+				unsigned int, unsigned int, unsigned int,
+				int, tid_t);
+
+static void do_hexdump (FILE *, char *, int);
+
+#define WRAP(jsb, blocknr)					\
+	if (blocknr >= be32_to_cpu((jsb)->s_maxlen))		\
+		blocknr -= (be32_to_cpu((jsb)->s_maxlen) -	\
+			    be32_to_cpu((jsb)->s_first));
+
+void do_logdump(int argc, char **argv)
+{
+	int		c;
+	int		retval;
+	char		*out_fn;
+	FILE		*out_file;
+
+	char		*inode_spec = NULL;
+	char		*journal_fn = NULL;
+	int		journal_fd = 0;
+	int		use_sb = 0;
+	ext2_ino_t	journal_inum;
+	struct ext2_inode journal_inode;
+	ext2_file_t 	journal_file;
+	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_contents = 0;
+	dump_descriptors = 1;
+	block_to_dump = ANY_BLOCK;
+	bitmap_to_dump = -1;
+	inode_block_to_dump = ANY_BLOCK;
+	inode_to_dump = -1;
+
+	reset_getopt();
+	while ((c = getopt (argc, argv, "ab:ci:f:s")) != 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 's':
+			use_sb++;
+			break;
+		default:
+			goto print_usage;
+		}
+	}
+	if (optind != argc && optind != argc-1) {
+		goto print_usage;
+	}
+
+	if (current_fs)
+		es = current_fs->super;
+
+	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;
+
+		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,
+		       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 errout;
+		}
+	}
+
+	if (block_to_dump != ANY_BLOCK && current_fs != NULL) {
+		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 && check_fs_open(argv[0]))
+		goto errout;
+
+	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 errout;
+		}
+
+		journal_source.where = JOURNAL_IS_EXTERNAL;
+		journal_source.fd = journal_fd;
+	} else 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 errout;
+			}
+			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 errout;
+		}
+
+		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 errout;
+		}
+		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 errout;
+		}
+		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 errout;
+		}
+		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);
+
+	if (journal_source.where == JOURNAL_IS_INTERNAL)
+		ext2fs_file_close(journal_file);
+	else
+		close(journal_fd);
+
+errout:
+	if (out_file && (out_file != stdout))
+		fclose(out_file);
+
+	return;
+
+print_usage:
+	fprintf(stderr, "%s: Usage: logdump [-acs] [-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,
+			      off_t offset, char *buf, int size,
+			      unsigned int *got)
+{
+	int retval;
+
+	if (source->where == JOURNAL_IS_EXTERNAL) {
+		if (lseek(source->fd, offset, SEEK_SET) < 0) {
+			retval = errno;
+			com_err(cmd, retval, "while seeking in reading journal");
+			return retval;
+		}
+		retval = read(source->fd, buf, size);
+		if (retval >= 0) {
+			*got = retval;
+			retval = 0;
+		} else
+			retval = errno;
+	} else {
+		retval = ext2fs_file_lseek(source->file, offset,
+					   EXT2_SEEK_SET, NULL);
+		if (retval) {
+			com_err(cmd, retval, "while seeking in reading journal");
+			return retval;
+		}
+
+		retval = ext2fs_file_read(source->file, buf, size, got);
+	}
+
+	if (retval)
+		com_err(cmd, retval, "while reading journal");
+	else if (*got != (unsigned int) size) {
+		com_err(cmd, 0, "short read (read %d, expected %d) "
+			"while reading journal", *got, size);
+		retval = -1;
+	}
+
+	return retval;
+}
+
+static const char *type_to_name(int btype)
+{
+	switch (btype) {
+	case JFS_DESCRIPTOR_BLOCK:
+		return "descriptor block";
+	case JFS_COMMIT_BLOCK:
+		return "commit block";
+	case JFS_SUPERBLOCK_V1:
+		return "V1 superblock";
+	case JFS_SUPERBLOCK_V2:
+		return "V2 superblock";
+	case JFS_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[8192];
+	journal_superblock_t	*jsb;
+	unsigned int		blocksize = 1024;
+	unsigned int		got;
+	int			retval;
+	__u32			magic, sequence, blocktype;
+	journal_header_t	*header;
+
+	tid_t			transaction;
+	unsigned int		blocknr = 0;
+
+	/* First, check to see if there's an ext2 superblock header */
+	retval = read_journal_block(cmdname, source, 0,
+				    buf, 2048, &got);
+	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) != JFS_MAGIC_NUMBER) &&
+	    (sb->s_magic == EXT2_SUPER_MAGIC) &&
+	    (sb->s_feature_incompat & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)) {
+		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, blocknr*blocksize,
+				    jsb_buffer, 1024, &got);
+	if (retval)
+		return;
+
+	jsb = (journal_superblock_t *) jsb_buffer;
+	if (be32_to_cpu(jsb->s_header.h_magic) != JFS_MAGIC_NUMBER) {
+		fprintf(out_file,
+			"Journal superblock magic number invalid!\n");
+		return;
+	}
+	blocksize = be32_to_cpu(jsb->s_blocksize);
+	transaction = be32_to_cpu(jsb->s_sequence);
+	blocknr = be32_to_cpu(jsb->s_start);
+
+	fprintf(out_file, "Journal starts at block %u, transaction %u\n",
+		blocknr, transaction);
+
+	if (!blocknr)
+		/* Empty journal, nothing to do. */
+		return;
+
+	while (1) {
+		retval = read_journal_block(cmdname, source,
+					    blocknr*blocksize, buf,
+					    blocksize, &got);
+		if (retval || got != blocksize)
+			return;
+
+		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 != JFS_MAGIC_NUMBER) {
+			fprintf (out_file, "No magic number at block %u: "
+				 "end of journal.\n", blocknr);
+			return;
+		}
+
+		if (sequence != transaction) {
+			fprintf (out_file, "Found sequence %u (not %u) at "
+				 "block %u: end of journal.\n",
+				 sequence, transaction, blocknr);
+			return;
+		}
+
+		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 JFS_DESCRIPTOR_BLOCK:
+			dump_descriptor_block(out_file, source, buf, jsb,
+					      &blocknr, blocksize,
+					      transaction);
+			continue;
+
+		case JFS_COMMIT_BLOCK:
+			transaction++;
+			blocknr++;
+			WRAP(jsb, blocknr);
+			continue;
+
+		case JFS_REVOKE_BLOCK:
+			dump_revoke_block(out_file, buf, jsb,
+					  blocknr, blocksize,
+					  transaction);
+			blocknr++;
+			WRAP(jsb, blocknr);
+			continue;
+
+		default:
+			fprintf (out_file, "Unexpected block type %u at "
+				 "block %u.\n", blocktype, blocknr);
+			return;
+		}
+	}
+}
+
+
+static void dump_descriptor_block(FILE *out_file,
+				  struct journal_source *source,
+				  char *buf,
+				  journal_superblock_t *jsb,
+				  unsigned int *blockp, int blocksize,
+				  tid_t transaction)
+{
+	int			offset, tag_size = JBD_TAG_SIZE32;
+	char			*tagp;
+	journal_block_tag_t	*tag;
+	unsigned int		blocknr;
+	__u32			tag_block;
+	__u32			tag_flags;
+
+	if (be32_to_cpu(jsb->s_feature_incompat) & JFS_FEATURE_INCOMPAT_64BIT)
+		tag_size = JBD_TAG_SIZE64;
+
+	offset = sizeof(journal_header_t);
+	blocknr = *blockp;
+
+	if (dump_all)
+		fprintf(out_file, "Dumping descriptor block, sequence %u, at "
+			"block %u:\n", transaction, blocknr);
+
+	++blocknr;
+	WRAP(jsb, blocknr);
+
+	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)
+			break;
+
+		tag_block = be32_to_cpu(tag->t_blocknr);
+		tag_flags = be32_to_cpu(tag->t_flags);
+
+		if (!(tag_flags & JFS_FLAG_SAME_UUID))
+			offset += 16;
+
+		dump_metadata_block(out_file, source, jsb,
+				    blocknr, tag_block, tag_flags, blocksize,
+				    transaction);
+
+		++blocknr;
+		WRAP(jsb, blocknr);
+
+	} while (!(tag_flags & JFS_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,
+			      int blocksize EXT2FS_ATTR((unused)),
+			      tid_t transaction)
+{
+	int			offset, max;
+	journal_revoke_header_t *header;
+	unsigned int		*entry, rblock;
+
+	if (dump_all)
+		fprintf(out_file, "Dumping revoke block, sequence %u, at "
+			"block %u:\n", transaction, blocknr);
+
+	header = (journal_revoke_header_t *) buf;
+	offset = sizeof(journal_revoke_header_t);
+	max = be32_to_cpu(header->r_count);
+
+	while (offset < max) {
+		entry = (unsigned int *) (buf + offset);
+		rblock = be32_to_cpu(*entry);
+		if (dump_all || rblock == block_to_dump) {
+			fprintf(out_file, "  Revoke FS block %u", rblock);
+			if (dump_all)
+				fprintf(out_file, "\n");
+			else
+				fprintf(out_file," at block %u, sequence %u\n",
+					blocknr, transaction);
+		}
+		offset += 4;
+	}
+}
+
+
+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,
+				int blocksize,
+				tid_t transaction)
+{
+	unsigned int 	got;
+	int		retval;
+	char 		buf[8192];
+
+	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,
+				    blocksize * log_blocknr,
+				    buf, blocksize, &got);
+	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",
+			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/e2fsprogs/debugfs/ls.c b/e2fsprogs/debugfs/ls.c
new file mode 100644
index 0000000..f21e96e
--- /dev/null
+++ b/e2fsprogs/debugfs/ls.c
@@ -0,0 +1,182 @@
+/*
+ * ls.c --- list directories
+ *
+ * Copyright (C) 1997 Theodore Ts'o.  This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#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 DELETED_OPT	0x0002
+#define PARSE_OPT	0x0004
+
+struct list_dir_struct {
+	FILE	*f;
+	int	col;
+	int	options;
+};
+
+static const char *monstr[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+				"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
+
+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			name[EXT2_NAME_LEN + 1];
+	char			tmp[EXT2_NAME_LEN + 16];
+	char			datestr[80];
+	char			lbr, rbr;
+	int			thislen;
+	struct list_dir_struct *ls = (struct list_dir_struct *) private;
+
+	thislen = dirent->name_len & 0xFF;
+	strncpy(name, dirent->name, thislen);
+	name[thislen] = '\0';
+	ino = dirent->inode;
+
+	if (entry == DIRENT_DELETED_FILE) {
+		lbr = '<';
+		rbr = '>';
+		ino = 0;
+	} else {
+		lbr = rbr = ' ';
+	}
+	if (ls->options & PARSE_OPT) {
+		if (ino) {
+			if (debugfs_read_inode(ino, &inode, name))
+				return 0;
+		} else
+			memset(&inode, 0, sizeof(struct ext2_inode));
+		fprintf(ls->f,"/%u/%06o/%d/%d/%s/",ino,inode.i_mode,inode.i_uid, inode.i_gid,name);
+		if (LINUX_S_ISDIR(inode.i_mode))
+			fprintf(ls->f, "/");
+		else
+			fprintf(ls->f, "%lld/", EXT2_I_SIZE(&inode));
+		fprintf(ls->f, "\n");
+	} else if (ls->options & LONG_OPT) {
+		if (ino) {
+			if (debugfs_read_inode(ino, &inode, name))
+				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 (%d)  %5d  %5d   ", lbr, ino, rbr,
+			inode.i_mode, dirent->name_len >> 8,
+			inode_uid(inode), inode_gid(inode));
+		if (LINUX_S_ISDIR(inode.i_mode))
+			fprintf(ls->f, "%5d", inode.i_size);
+		else
+			fprintf(ls->f, "%5llu", EXT2_I_SIZE(&inode));
+		fprintf (ls->f, " %s %s\n", datestr, name);
+	} else {
+		sprintf(tmp, "%c%u%c (%d) %s   ", lbr, dirent->inode, rbr,
+			dirent->rec_len, name);
+		thislen = strlen(tmp);
+
+		if (ls->col + thislen > 80) {
+			fprintf(ls->f, "\n");
+			ls->col = 0;
+		}
+		fprintf(ls->f, "%s", tmp);
+		ls->col += thislen;
+	}
+	return 0;
+}
+
+void do_list_dir(int argc, char *argv[])
+{
+	ext2_ino_t	inode;
+	int		retval;
+	int		c;
+	int		flags;
+	struct list_dir_struct ls;
+
+	ls.options = 0;
+	if (check_fs_open(argv[0]))
+		return;
+
+	reset_getopt();
+	while ((c = getopt (argc, argv, "dlp")) != EOF) {
+		switch (c) {
+		case 'l':
+			ls.options |= LONG_OPT;
+			break;
+		case 'd':
+			ls.options |= DELETED_OPT;
+			break;
+		case 'p':
+			ls.options |= PARSE_OPT;
+			break;
+		default:
+			goto print_usage;
+		}
+	}
+
+	if (argc > optind+1) {
+	print_usage:
+		com_err(0, 0, "Usage: ls [-l] [-d] [-p] file");
+		return;
+	}
+
+	if (argc == optind)
+		inode = cwd;
+	else
+		inode = string_to_inode(argv[optind]);
+	if (!inode)
+		return;
+
+	ls.f = open_pager();
+	ls.col = 0;
+	flags = DIRENT_FLAG_INCLUDE_EMPTY;
+	if (ls.options & DELETED_OPT)
+		flags |= DIRENT_FLAG_INCLUDE_REMOVED;
+
+	retval = ext2fs_dir_iterate2(current_fs, inode, 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/e2fsprogs/debugfs/lsdel.c b/e2fsprogs/debugfs/lsdel.c
new file mode 100644
index 0000000..ecc8a88
--- /dev/null
+++ b/e2fsprogs/debugfs/lsdel.c
@@ -0,0 +1,211 @@
+/*
+ * 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 <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)
+{
+	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 && ((unsigned) abs(now - secs) > inode.i_dtime)))
+			goto next;
+
+		lsd.inode = ino;
+		lsd.num_blocks = 0;
+		lsd.free_blocks = 0;
+		lsd.bad_blocks = 0;
+
+		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) {
+			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 = 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, delarray[i].size,
+			delarray[i].free_blocks, 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/e2fsprogs/debugfs/ncheck.c b/e2fsprogs/debugfs/ncheck.c
new file mode 100644
index 0000000..b7faa63
--- /dev/null
+++ b/e2fsprogs/debugfs/ncheck.c
@@ -0,0 +1,205 @@
+/*
+ * 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 <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			inodes_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 = dirent->name_len >> 8;
+	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,
+				       (dirent->name_len & 0xFF), dirent->name);
+			else
+				printf("%u\t<%u>/%.*s", iw->iarray[i],
+				       iw->dir,
+				       (dirent->name_len & 0xFF), 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);
+		}
+	}
+	if (!iw->inodes_left)
+		return DIRENT_ABORT;
+
+	return 0;
+}
+
+void do_ncheck(int argc, char **argv)
+{
+	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;
+		}
+	}
+	argc -= optind;
+	argv += optind;
+
+	if (argc < 1) {
+	print_usage:
+		com_err(argv[0], 0, "Usage: ncheck [-c] <inode number> ...");
+		return;
+	}
+	if (check_fs_open(argv[0]))
+		return;
+
+	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);
+
+	for (i=0; i < argc; i++) {
+		iw.iarray[i] = strtol(argv[i], &tmp, 0);
+		if (*tmp) {
+			com_err(argv[0], 0, "Bad inode - %s", argv[i]);
+			goto error_out;
+		}
+	}
+
+	iw.num_inodes = iw.inodes_left = 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.inodes_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/e2fsprogs/debugfs/ro_debug_cmds.ct b/e2fsprogs/debugfs/ro_debug_cmds.ct
new file mode 100644
index 0000000..8226d1a
--- /dev/null
+++ b/e2fsprogs/debugfs/ro_debug_cmds.ct
@@ -0,0 +1,94 @@
+#
+# 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;
+
+end;
+
diff --git a/e2fsprogs/debugfs/set_fields.c b/e2fsprogs/debugfs/set_fields.c
new file mode 100644
index 0000000..116a15a
--- /dev/null
+++ b/e2fsprogs/debugfs/set_fields.c
@@ -0,0 +1,826 @@
+/*
+ * 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 <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
+#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"
+
+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
+
+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_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_mmp_clear(struct field_set_info *info, char *field,
+				 char *arg);
+
+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 },
+	{ "lastcheck",  &set_sb.s_lastcheck, NULL, 4, parse_uint },
+	{ "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 },
+	{ "min_extra_isize", &set_sb.s_min_extra_isize, NULL, 4, 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 },
+	{ "overhead_blocks", &set_sb.s_overhead_blocks, NULL, 4, parse_uint },
+	{ "checksum", &set_sb.s_checksum, NULL, 4, parse_uint },
+	{ 0, 0, 0, 0 }
+};
+
+static struct field_set_info inode_fields[] = {
+	{ "inodes_count", &set_sb.s_inodes_count, NULL, 4, parse_uint },
+	{ "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, NULL, 4, parse_time },
+	{ "ctime", &set_inode.i_ctime, NULL, 4, parse_time },
+	{ "mtime", &set_inode.i_mtime, NULL, 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 },
+	{ "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 },
+	{ "dir_acl", &set_inode.i_dir_acl, NULL, 4, parse_uint },
+	{ "faddr", &set_inode.i_faddr, NULL, 4, parse_uint },
+	{ "frag", &set_inode.osd2.hurd2.h_i_frag, NULL, 1, parse_uint },
+	{ "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_uint },
+	{ "author", &set_inode.osd2.hurd2.h_i_author, NULL,
+		4, parse_uint },
+	{ "extra_isize", &set_inode.i_extra_isize, NULL,
+		2, parse_uint },
+	{ "ctime_extra", &set_inode.i_ctime_extra, NULL,
+		4, parse_uint },
+	{ "mtime_extra", &set_inode.i_mtime_extra, NULL,
+		4, parse_uint },
+	{ "atime_extra", &set_inode.i_atime_extra, NULL,
+		4, parse_uint },
+	{ "crtime", &set_inode.i_crtime, NULL, 4, parse_uint },
+	{ "crtime_extra", &set_inode.i_crtime_extra, 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 },
+	{ "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 },
+};
+
+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 = 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 secondiory (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:
+		/* 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;
+	}
+	if (!field2)
+		return 0;
+	n = num >> (size*8);
+	u.ptr8 = (__u8 *) field2;
+	if (info->size == 6)
+		size = 2;
+	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;
+	}
+	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 EXT2FS_ATTR((unused)), char *arg)
+{
+	time_t		t;
+	__u32		*ptr32;
+
+	ptr32 = (__u32 *) info->ptr;
+
+	t = string_to_time(arg);
+
+	if (t == ((time_t) -1)) {
+		fprintf(stderr, "Couldn't parse '%s' for field %s.\n",
+			arg, info->name);
+		return EINVAL;
+	}
+	*ptr32 = t;
+	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_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_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)
+{
+
+	if (strcmp(arg, "calc") == 0) {
+		ext2fs_group_desc_csum_set(current_fs, set_bg);
+		memcpy(&set_gd, ext2fs_group_desc(current_fs,
+					current_fs->group_desc,
+					set_bg),
+			sizeof(set_gd));
+		printf("Checksum set to 0x%04x\n",
+		       ext2fs_bg_checksum(current_fs, set_bg));
+		return 0;
+	}
+
+	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[])
+{
+	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[])
+{
+	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_inode_full(set_ino,
+			(struct ext2_inode *) &set_inode, argv[1],
+				    sizeof(set_inode)))
+		return;
+
+	if (ss->func(ss, argv[2], argv[3]) == 0) {
+		if (debugfs_write_inode_full(set_ino, 
+			     (struct ext2_inode *) &set_inode,
+			     argv[1], sizeof(set_inode)))
+			return;
+	}
+}
+
+void do_set_block_group_descriptor(int argc, char *argv[])
+{
+	const char *usage = "<bg number> <field> <value>\n"
+		"\t\"set_block_group_descriptor -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_descriptor",
+				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 */
+}
+
+void do_set_mmp_value(int argc, char *argv[])
+{
+	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;
+	}
+}
+
diff --git a/e2fsprogs/debugfs/unused.c b/e2fsprogs/debugfs/unused.c
new file mode 100644
index 0000000..b78d70b
--- /dev/null
+++ b/e2fsprogs/debugfs/unused.c
@@ -0,0 +1,57 @@
+/*
+ * 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 <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)
+{
+	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",
+		       blk);
+		for (i=0; i < current_fs->blocksize; i++)
+			fputc(buf[i], stdout);
+	}
+}
diff --git a/e2fsprogs/debugfs/util.c b/e2fsprogs/debugfs/util.c
new file mode 100644
index 0000000..8b34490
--- /dev/null
+++ b/e2fsprogs/debugfs/util.c
@@ -0,0 +1,481 @@
+/*
+ * 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 <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=='>')
+			return ino;
+	}
+
+	retval = ext2fs_namei(current_fs, root, cwd, str, &ino);
+	if (retval) {
+		com_err(str, retval, 0);
+		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;
+}
+
+/*
+ * This function takes a __u32 time value and converts it to a string,
+ * using ctime
+ */
+char *time_to_string(__u32 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 environemnt variable */
+		tz = ss_safe_getenv("TZ");
+		if (!tz)
+			tz = "";
+		do_gmt = !strcmp(tz, "GMT");
+	}
+
+	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.
+ */
+time_t string_to_time(const char *arg)
+{
+	struct	tm	ts;
+	time_t		ret;
+	char *tmp;
+
+	if (strcmp(arg, "now") == 0) {
+		return time(0);
+	}
+	if (arg[0] == '@') {
+		/* interpret it as an integer */
+		ret = strtoul(arg+1, &tmp, 0);
+		if (*tmp)
+			return ((time_t) -1);
+		return ret;
+	}
+	memset(&ts, 0, sizeof(ts));
+#ifdef HAVE_STRPTIME
+	strptime(arg, "%Y%m%d%H%M%S", &ts);
+#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)
+		ts.tm_mday = 0;
+#endif
+	ts.tm_isdst = -1;
+	ret = mktime(&ts);
+	if (ts.tm_mday == 0 || ret == ((time_t) -1)) {
+		/* Try it as an integer... */
+		ret = strtoul(arg, &tmp, 0);
+		if (*tmp)
+			return ((time_t) -1);
+	}
+	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.
+ */
+int strtoblk(const char *cmd, const char *str, blk64_t *ret)
+{
+	blk64_t	blk;
+	int	err;
+
+	blk = parse_ulonglong(str, cmd, "block number", &err);
+	*ret = blk;
+	if (err)
+		com_err(cmd, 0, "Invalid block number: %s", str);
+	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], block))
+		return 1;
+	if (*block == 0) {
+		com_err(argv[0], 0, "Invalid block number 0");
+		err = 1;
+	}
+
+	if (argc > 2) {
+		err = strtoblk(argv[0], argv[2], count);
+		if (err)
+			return 1;
+	}
+	return 0;
+}
+
+int debugfs_read_inode_full(ext2_ino_t ino, struct ext2_inode * inode,
+			const char *cmd, int bufsize)
+{
+	int retval;
+
+	retval = ext2fs_read_inode_full(current_fs, ino, inode, bufsize);
+	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_inode_full(ext2_ino_t ino,
+			     struct ext2_inode *inode,
+			     const char *cmd,
+			     int bufsize)
+{
+	int retval;
+
+	retval = ext2fs_write_inode_full(current_fs, ino,
+					 inode, bufsize);
+	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;
+}
diff --git a/e2fsprogs/debugfs/zap.c b/e2fsprogs/debugfs/zap.c
new file mode 100644
index 0000000..1d4d02e
--- /dev/null
+++ b/e2fsprogs/debugfs/zap.c
@@ -0,0 +1,259 @@
+/*
+ * zap.c --- zap block
+ *
+ * Copyright (C) 2012 Theodore Ts'o.  This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#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[])
+{
+	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", 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", 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", block);
+		goto errout;
+	}
+
+errout:
+	free(buf);
+	return;
+}
+
+void do_block_dump(int argc, char *argv[])
+{
+	unsigned char	*buf;
+	ext2_ino_t	inode;
+	errcode_t	errcode;
+	blk64_t		block;
+	char		*file = NULL;
+	unsigned int	i, j;
+	int		c, err;
+	int		suppress = -1;
+
+	if (check_fs_open(argv[0]))
+		return;
+
+	reset_getopt();
+	while ((c = getopt (argc, argv, "f:")) != EOF) {
+		switch (c) {
+		case 'f':
+			file = optarg;
+			break;
+
+		default:
+			goto print_usage;
+		}
+	}
+
+	if (argc != optind + 1) {
+	print_usage:
+		com_err(0, 0, "Usage: block_dump [-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", 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", block);
+		goto errout;
+	}
+
+	for (i=0; i < current_fs->blocksize; i += 16) {
+		if (suppress < 0) {
+			if (i && memcmp(buf + i, buf + i - 16, 16) == 0) {
+				suppress = i;
+				printf("*\n");
+				continue;
+			}
+		} else {
+			if (memcmp(buf + i, buf + suppress, 16) == 0)
+				continue;
+			suppress = -1;
+		}
+		printf("%04o  ", i);
+		for (j = 0; j < 16; j++) {
+			printf("%02x", buf[i+j]);
+			if ((j % 2) == 1)
+				putchar(' ');
+		}
+		putchar(' ');
+		for (j = 0; j < 16; j++)
+			printf("%c", isprint(buf[i+j]) ? buf[i+j] : '.');
+		putchar('\n');
+	}
+	putchar('\n');
+
+errout:
+	free(buf);
+	return;
+}
diff --git a/e2fsprogs/depfix.sed b/e2fsprogs/depfix.sed
new file mode 100644
index 0000000..582d79f
--- /dev/null
+++ b/e2fsprogs/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;/mit/cygnus[^ ]* *;;g
+s;\.\./[^ ]*lib/blkid/blkid[^ ]* *;;g
+s;\.\./[^ ]*lib/uuid/uuid.h[^ ]* *;;g
+
+#
+# Now insert a trailing newline...
+#
+$a\
+
diff --git a/e2fsprogs/doc/Makefile.in b/e2fsprogs/doc/Makefile.in
new file mode 100644
index 0000000..a2b2612
--- /dev/null
+++ b/e2fsprogs/doc/Makefile.in
@@ -0,0 +1,84 @@
+#
+# Makefile for the doc directory
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = doc
+INSTALL = @INSTALL@
+
+@MCONFIG@
+
+DVI=texi2dvi
+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) "	MKINSTALLDIRS $(infodir)"
+	$(Q) $(MKINSTALLDIRS) $(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 -9 $(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/e2fsprogs/doc/libblkid.txt b/e2fsprogs/doc/libblkid.txt
new file mode 100644
index 0000000..4aea1b6
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/doc/libext2fs.texinfo b/e2fsprogs/doc/libext2fs.texinfo
new file mode 100644
index 0000000..2c76673
--- /dev/null
+++ b/e2fsprogs/doc/libext2fs.texinfo
@@ -0,0 +1,1374 @@
+\input texinfo    @c -*-texinfo-*-
+@c %**start of header
+@setfilename libext2fs.info
+@settitle The EXT2FS Library (version 1.42.9)
+@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 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.42.9
+@subtitle December 2013
+
+@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 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.42.9.
+
+@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 descripts 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 function 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 uperblock.  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 fund 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{got}.
+@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 indiciates that the interator 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 containined 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 any necessary
+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 any necessary
+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_info} and @var{parent_ino} is 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 interate
+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 return 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 indoe @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 currrently 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 stucture 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} fetches 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/e2fsprogs/doc/texinfo.tex b/e2fsprogs/doc/texinfo.tex
new file mode 100644
index 0000000..dddd014
--- /dev/null
+++ b/e2fsprogs/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 occurence 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.
+% (Similarily, 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 enviroments; 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
+}
+
+% Evironment 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 achive 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.
+% Similarily, 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/e2fsprogs/e2fsck/Android.mk b/e2fsprogs/e2fsck/Android.mk
new file mode 100644
index 0000000..ebd43c6
--- /dev/null
+++ b/e2fsprogs/e2fsck/Android.mk
@@ -0,0 +1,166 @@
+LOCAL_PATH := $(call my-dir)
+
+#########################
+# Build the libext2 profile library
+
+libext2_profile_src_files :=  \
+	prof_err.c \
+	profile.c
+
+libext2_profile_shared_libraries := \
+	libext2_com_err
+
+libext2_profile_system_shared_libraries := libc
+
+libext2_profile_c_includes := external/e2fsprogs/lib
+
+libext2_profile_cflags := -O2 -g -W -Wall \
+	-DHAVE_UNISTD_H \
+	-DHAVE_ERRNO_H \
+	-DHAVE_NETINET_IN_H \
+	-DHAVE_SYS_IOCTL_H \
+	-DHAVE_SYS_MMAN_H \
+	-DHAVE_SYS_MOUNT_H \
+	-DHAVE_SYS_PRCTL_H \
+	-DHAVE_SYS_RESOURCE_H \
+	-DHAVE_SYS_SELECT_H \
+	-DHAVE_SYS_STAT_H \
+	-DHAVE_SYS_TYPES_H \
+	-DHAVE_STDLIB_H \
+	-DHAVE_STRDUP \
+	-DHAVE_MMAP \
+	-DHAVE_UTIME_H \
+	-DHAVE_GETPAGESIZE \
+	-DHAVE_LSEEK64 \
+	-DHAVE_LSEEK64_PROTOTYPE \
+	-DHAVE_EXT2_IOCTLS \
+	-DHAVE_LINUX_FD_H \
+	-DHAVE_TYPE_SSIZE_T \
+	-DHAVE_SYS_TIME_H \
+	-DHAVE_SYS_PARAM_H \
+	-DHAVE_SYSCONF \
+	-DDISABLE_BACKTRACE=1 \
+	-Wno-unused-parameter
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_profile_src_files)
+LOCAL_SYSTEM_SHARED_LIBRARIES := $(libext2_profile_system_shared_libraries)
+LOCAL_SHARED_LIBRARIES := $(libext2_profile_shared_libraries)
+LOCAL_C_INCLUDES := $(libext2_profile_c_includes)
+LOCAL_CFLAGS := $(libext2_profile_cflags)
+LOCAL_MODULE := libext2_profile
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_profile_src_files)
+LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(libext2_profile_shared_libraries))
+LOCAL_C_INCLUDES := $(libext2_profile_c_includes)
+LOCAL_CFLAGS := $(libext2_profile_cflags)
+LOCAL_MODULE := libext2_profile-host
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_SHARED_LIBRARY)
+
+#########################
+# Build the e2fsck binary
+
+e2fsck_src_files :=  \
+	crc32.c \
+	e2fsck.c \
+	dict.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
+
+e2fsck_shared_libraries := \
+	libext2fs \
+	libext2_blkid \
+	libext2_uuid \
+	libext2_profile \
+	libext2_quota \
+	libext2_com_err \
+	libext2_e2p
+e2fsck_system_shared_libraries := libc
+
+e2fsck_c_includes :=
+
+e2fsck_cflags := -O2 -g -W -Wall -fno-strict-aliasing \
+	-DHAVE_DIRENT_H \
+	-DHAVE_ERRNO_H \
+	-DHAVE_INTTYPES_H \
+	-DHAVE_LINUX_FD_H \
+	-DHAVE_NETINET_IN_H \
+	-DHAVE_SETJMP_H \
+	-DHAVE_SYS_IOCTL_H \
+	-DHAVE_SYS_MMAN_H \
+	-DHAVE_SYS_MOUNT_H \
+	-DHAVE_SYS_PRCTL_H \
+	-DHAVE_SYS_RESOURCE_H \
+	-DHAVE_SYS_SELECT_H \
+	-DHAVE_SYS_STAT_H \
+	-DHAVE_SYS_TYPES_H \
+	-DHAVE_STDLIB_H \
+	-DHAVE_UNISTD_H \
+	-DHAVE_UTIME_H \
+	-DHAVE_STRDUP \
+	-DHAVE_MMAP \
+	-DHAVE_GETPAGESIZE \
+	-DHAVE_LSEEK64 \
+	-DHAVE_LSEEK64_PROTOTYPE \
+	-DHAVE_EXT2_IOCTLS \
+	-DHAVE_TYPE_SSIZE_T \
+	-DHAVE_INTPTR_T \
+	-DENABLE_HTREE=1 \
+	-DHAVE_SYS_TIME_H \
+	-DHAVE_SYS_PARAM_H \
+	-DHAVE_SYSCONF \
+	-DDISABLE_BACKTRACE=1 \
+	-Wno-missing-field-initializers
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(e2fsck_src_files)
+LOCAL_C_INCLUDES := $(e2fsck_c_includes)
+LOCAL_CFLAGS := $(e2fsck_cflags)
+LOCAL_SYSTEM_SHARED_LIBRARIES := $(e2fsck_system_shared_libraries)
+LOCAL_SHARED_LIBRARIES := $(e2fsck_shared_libraries)
+LOCAL_MODULE := e2fsck
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(e2fsck_src_files)
+LOCAL_C_INCLUDES := $(e2fsck_c_includes)
+LOCAL_CFLAGS := $(e2fsck_cflags)
+LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(e2fsck_shared_libraries))
+LOCAL_MODULE := e2fsck_host
+LOCAL_MODULE_STEM := e2fsck
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/e2fsprogs/e2fsck/CHANGES b/e2fsprogs/e2fsck/CHANGES
new file mode 100644
index 0000000..fa135b6
--- /dev/null
+++ b/e2fsprogs/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 badding 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/e2fsprogs/e2fsck/Makefile.in b/e2fsprogs/e2fsck/Makefile.in
new file mode 100644
index 0000000..8e1c891
--- /dev/null
+++ b/e2fsprogs/e2fsck/Makefile.in
@@ -0,0 +1,578 @@
+#
+# Makefile for e2fsck
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = e2fsck
+INSTALL = @INSTALL@
+
+@MCONFIG@
+
+PROGS=		e2fsck
+MANPAGES=	e2fsck.8
+FMANPAGES=	e2fsck.conf.5
+
+LIBS= $(LIBQUOTA) $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBBLKID) $(LIBUUID) \
+	$(LIBINTL) $(LIBE2P)
+DEPLIBS= $(DEPLIBQUOTA) $(LIBEXT2FS) $(DEPLIBCOM_ERR) $(DEPLIBBLKID) \
+	 $(DEPLIBUUID) $(DEPLIBE2P)
+
+STATIC_LIBS= $(STATIC_LIBQUOTA) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
+	     $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(LIBINTL) $(STATIC_LIBE2P)
+STATIC_DEPLIBS= $(DEPSTATIC_LIBQUOTA) $(STATIC_LIBEXT2FS) \
+		$(DEPSTATIC_LIBCOM_ERR) $(DEPSTATIC_LIBBLKID) \
+		$(DEPSTATIC_LIBUUID) $(DEPSTATIC_LIBE2P)
+
+PROFILED_LIBS= $(PROFILED_LIBQUOTA) $(PROFILED_LIBEXT2FS) \
+	       $(PROFILED_LIBCOM_ERR) $(PROFILED_LIBBLKID) $(PROFILED_LIBUUID) \
+	       $(PROFILED_LIBE2P) $(LIBINTL)
+PROFILED_DEPLIBS= $(DEPPROFILED_LIBQUOTA) $(PROFILED_LIBEXT2FS) \
+		  $(DEPPROFILED_LIBCOM_ERR) $(DEPPROFILED_LIBBLKID) \
+		  $(DEPPROFILED_LIBUUID) $(DEPPROFILED_LIBE2P)
+
+COMPILE_ET=$(top_builddir)/lib/et/compile_et --build-tree
+
+.c.o:
+	$(E) "	CC $<"
+	$(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
+	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+
+#
+# Flags for using Checker
+#	Note: The optimization flags must include -g
+#
+#MCHECK=	-checker
+#LIBS= $(LIBCOM_ERR) $(LIB_EXT2FS) $(CHECKLIB)
+#DEPLIBS= $(LIBCOM_ERR) $(LIB_EXT2FS) 
+#CHECKLIB= /usr/lib/libchecker.o
+
+#
+# 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= crc32.o dict.o 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 profile.o prof_err.o \
+	logfile.o sigcatcher.o $(MTRACE_OBJ)
+
+PROFILED_OBJS= profiled/dict.o 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/profile.o \
+	profiled/crc32.o profiled/prof_err.o profiled/logfile.o \
+	profiled/sigcatcher.o
+
+SRCS= $(srcdir)/e2fsck.c \
+	$(srcdir)/crc32.c \
+	$(srcdir)/gen_crc32table.c \
+	$(srcdir)/dict.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)/region.c \
+	$(srcdir)/profile.c \
+	$(srcdir)/sigcatcher.c \
+	$(srcdir)/logfile.c \
+	prof_err.c \
+	$(srcdir)/quota.c \
+	$(MTRACE_SRC)
+
+all:: profiled $(PROGS) e2fsck $(MANPAGES) $(FMANPAGES)
+
+@PROFILE_CMT@all:: e2fsck.profiled
+
+prof_err.c prof_err.h: prof_err.et
+	$(E) "	COMPILE_ET prof_err.et"
+	$(Q) $(COMPILE_ET) $(srcdir)/prof_err.et
+
+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) 
+
+gen_crc32table: $(srcdir)/gen_crc32table.c
+	$(E) "	CC $@"
+	$(Q) $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o gen_crc32table \
+		$(srcdir)/gen_crc32table.c
+
+crc32table.h: gen_crc32table
+	$(E) "	GEN32TABLE $@"
+	$(Q) ./gen_crc32table > crc32table.h
+
+tst_sigcatcher: $(srcdir)/sigcatcher.c sigcatcher.o
+	$(E) "	CC $@"
+	$(Q) $(CC) $(BUILD_LDFLAGS) $(ALL_CFLAGS) $(RDYNAMIC) \
+		$(srcdir)/sigcatcher.c -DDEBUG -o tst_sigcatcher
+
+tst_problem: $(srcdir)/problem.c $(srcdir)/problem.h $(LIBEXT2FS) \
+	$(DEPLIBCOM_ERR)
+	$(Q) $(CC) $(BUILD_LDFLAGS) $(ALL_CFLAGS) -o tst_problem \
+		$(srcdir)/problem.c -DUNITTEST $(LIBEXT2FS) $(LIBCOM_ERR) \
+		$(LIBINTL)
+
+tst_crc32: $(srcdir)/crc32.c $(LIBEXT2FS) $(DEPLIBCOM_ERR)
+	$(Q) $(CC) $(BUILD_LDFLAGS) $(ALL_CFLAGS) -o tst_crc32 $(srcdir)/crc32.c \
+		-DUNITTEST $(LIBEXT2FS) $(LIBCOM_ERR)
+
+tst_refcount: ea_refcount.c $(DEPLIBCOM_ERR)
+	$(E) "	LD $@"
+	$(Q) $(CC) -o tst_refcount $(srcdir)/ea_refcount.c \
+		$(ALL_CFLAGS) -DTEST_PROGRAM $(LIBCOM_ERR) $(LIBEXT2FS) 
+
+tst_logfile: $(srcdir)/logfile.c
+	$(E) "	LD $@"
+	$(Q) $(CC) -o tst_logfile $(srcdir)/logfile.c $(ALL_CFLAGS) \
+		-DTEST_PROGRAM
+
+tst_region: region.c $(DEPLIBCOM_ERR)
+	$(E) "	LD $@"
+	$(Q) $(CC) -o tst_region $(srcdir)/region.c \
+		$(ALL_CFLAGS) -DTEST_PROGRAM $(LIBCOM_ERR)
+
+check:: tst_refcount tst_region tst_crc32 tst_problem
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_refcount
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_region
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_crc32
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./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 util.o ehandler.o $(DEPLIBS)
+	$(E) "	LD $@"
+	$(Q) $(LD) $(ALL_LDFLAGS) -o iscan iscan.o util.o ehandler.o $(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) "	MKINSTALLDIRS $(root_sbindir) $(man8dir)"
+	$(Q) $(MKINSTALLDIRS) $(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 ext4dev; 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 ext4dev; 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 \
+		$(DESTDIR)$(root_sbindir)/fsck.ext4dev
+	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 \
+			$(DESTDIR)$(root_sbindir)/fsck.ext4dev
+
+clean:
+	$(RM) -f $(PROGS) \#* *\# *.s *.o *.a *~ core e2fsck.static \
+		e2fsck.shared e2fsck.profiled flushb e2fsck.8 \
+		tst_problem tst_crc32 tst_region tst_refcount gen_crc32table \
+		crc32table.h e2fsck.conf.5 prof_err.c prof_err.h \
+		test_profile
+	$(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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h \
+ $(srcdir)/problem.h
+crc32.o: $(srcdir)/crc32.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h \
+ $(srcdir)/crc32defs.h crc32table.h
+gen_crc32table.o: $(srcdir)/gen_crc32table.c $(srcdir)/crc32defs.h
+dict.o: $(srcdir)/dict.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/dict.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h \
+ $(srcdir)/problem.h $(srcdir)/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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h \
+ $(srcdir)/problem.h $(srcdir)/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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(srcdir)/problem.h
+recovery.o: $(srcdir)/recovery.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h
+revoke.o: $(srcdir)/revoke.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.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 $(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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h \
+ $(srcdir)/problem.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h \
+ $(srcdir)/problem.h $(srcdir)/problemP.h
+message.o: $(srcdir)/message.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h \
+ $(srcdir)/problem.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.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
+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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h
+prof_err.o: prof_err.c
+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/bitops.h \
+ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h \
+ $(srcdir)/problem.h $(top_srcdir)/lib/quota/quotaio.h
diff --git a/e2fsprogs/e2fsck/Makefile.pq b/e2fsprogs/e2fsck/Makefile.pq
new file mode 100644
index 0000000..18a3cd3
--- /dev/null
+++ b/e2fsprogs/e2fsck/Makefile.pq
@@ -0,0 +1,9 @@
+TOPSRC=..
+LIBNAME=E2FSCK.LIB
+OBJFILE=E2FSCK.LST
+
+OBJS= e2fsck.obj super.obj pass1.obj pass2.obj pass3.obj \
+	pass4.obj pass5.obj dirinfo.obj
+
+!include $(TOPSRC)\powerquest\MCONFIG
+
diff --git a/e2fsprogs/e2fsck/argv_parse.c b/e2fsprogs/e2fsck/argv_parse.c
new file mode 100644
index 0000000..c0c5bbe
--- /dev/null
+++ b/e2fsprogs/e2fsck/argv_parse.c
@@ -0,0 +1,165 @@
+/*
+ * 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
+ */
+
+#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);
+	}
+	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/e2fsprogs/e2fsck/argv_parse.h b/e2fsprogs/e2fsck/argv_parse.h
new file mode 100644
index 0000000..86f4564
--- /dev/null
+++ b/e2fsprogs/e2fsck/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/e2fsprogs/e2fsck/badblocks.c b/e2fsprogs/e2fsck/badblocks.c
new file mode 100644
index 0000000..74e414b
--- /dev/null
+++ b/e2fsprogs/e2fsck/badblocks.c
@@ -0,0 +1,138 @@
+/*
+ * 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 <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, 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;
+	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/e2fsprogs/e2fsck/crc32.c b/e2fsprogs/e2fsck/crc32.c
new file mode 100644
index 0000000..f092c03
--- /dev/null
+++ b/e2fsprogs/e2fsck/crc32.c
@@ -0,0 +1,569 @@
+/*
+ * crc32.c --- CRC32 function
+ *
+ * Copyright (C) 2008 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+/*
+ * 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 <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+
+#ifdef UNITTEST
+#undef ENABLE_NLS
+#endif
+#include "e2fsck.h"
+
+#include "crc32defs.h"
+#if CRC_LE_BITS == 8
+#define tole(x) __constant_cpu_to_le32(x)
+#define tobe(x) __constant_cpu_to_be32(x)
+#else
+#define tole(x) (x)
+#define tobe(x) (x)
+#endif
+#include "crc32table.h"
+
+#ifdef UNITTEST
+
+/**
+ * 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
+ */
+__u32 crc32_le(__u32 crc, unsigned char const *p, size_t len);
+
+#if CRC_LE_BITS == 1
+/*
+ * In fact, the table-based code will work in this case, but it can be
+ * simplified by inlining the table in ?: form.
+ */
+
+__u32 crc32_le(__u32 crc, unsigned char const *p, size_t len)
+{
+	int i;
+	while (len--) {
+		crc ^= *p++;
+		for (i = 0; i < 8; i++)
+			crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0);
+	}
+	return crc;
+}
+#else				/* Table-based approach */
+
+__u32 crc32_le(__u32 crc, unsigned char const *p, size_t len)
+{
+# if CRC_LE_BITS == 8
+	const __u32      *b =(__u32 *)p;
+	const __u32      *tab = crc32table_le;
+
+# ifdef WORDS_BIGENDIAN
+#  define DO_CRC(x) crc = tab[ ((crc >> 24) ^ (x)) & 255] ^ (crc<<8)
+# else
+#  define DO_CRC(x) crc = tab[ (crc ^ (x)) & 255 ] ^ (crc>>8)
+# endif
+
+	crc = __cpu_to_le32(crc);
+	/* Align it */
+	if(unlikely(((long)b)&3 && len)){
+		do {
+			__u8 *p = (__u8 *)b;
+			DO_CRC(*p++);
+			b = (void *)p;
+		} while ((--len) && ((long)b)&3 );
+	}
+	if(likely(len >= 4)){
+		/* load data 32 bits wide, xor data 32 bits wide. */
+		size_t save_len = len & 3;
+	        len = len >> 2;
+		--b; /* use pre increment below(*++b) for speed */
+		do {
+			crc ^= *++b;
+			DO_CRC(0);
+			DO_CRC(0);
+			DO_CRC(0);
+			DO_CRC(0);
+		} while (--len);
+		b++; /* point to next byte(s) */
+		len = save_len;
+	}
+	/* And the last few bytes */
+	if(len){
+		do {
+			__u8 *p = (__u8 *)b;
+			DO_CRC(*p++);
+			b = (void *)p;
+		} while (--len);
+	}
+
+	return __le32_to_cpu(crc);
+#undef ENDIAN_SHIFT
+#undef DO_CRC
+
+# elif CRC_LE_BITS == 4
+	while (len--) {
+		crc ^= *p++;
+		crc = (crc >> 4) ^ crc32table_le[crc & 15];
+		crc = (crc >> 4) ^ crc32table_le[crc & 15];
+	}
+	return crc;
+# elif CRC_LE_BITS == 2
+	while (len--) {
+		crc ^= *p++;
+		crc = (crc >> 2) ^ crc32table_le[crc & 3];
+		crc = (crc >> 2) ^ crc32table_le[crc & 3];
+		crc = (crc >> 2) ^ crc32table_le[crc & 3];
+		crc = (crc >> 2) ^ crc32table_le[crc & 3];
+	}
+	return crc;
+# endif
+}
+#endif
+
+#endif /* UNITTEST */
+
+/**
+ * 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
+ */
+__u32 crc32_be(__u32 crc, unsigned char const *p, size_t len);
+
+#if CRC_BE_BITS == 1
+/*
+ * In fact, the table-based code will work in this case, but it can be
+ * simplified by inlining the table in ?: form.
+ */
+
+__u32 crc32_be(__u32 crc, unsigned char const *p, size_t len)
+{
+	int i;
+	while (len--) {
+		crc ^= *p++ << 24;
+		for (i = 0; i < 8; i++)
+			crc =
+			    (crc << 1) ^ ((crc & 0x80000000) ? CRCPOLY_BE :
+					  0);
+	}
+	return crc;
+}
+
+#else				/* Table-based approach */
+__u32 crc32_be(__u32 crc, unsigned char const *p, size_t len)
+{
+# if CRC_BE_BITS == 8
+	const __u32      *b =(const __u32 *)p;
+	const __u32      *tab = crc32table_be;
+
+# ifdef WORDS_BIGENDIAN
+#  define DO_CRC(x) crc = tab[ ((crc >> 24) ^ (x)) & 255] ^ (crc<<8)
+# else
+#  define DO_CRC(x) crc = tab[ (crc ^ (x)) & 255 ] ^ (crc>>8)
+# endif
+
+	crc = __cpu_to_be32(crc);
+	/* Align it */
+	if(unlikely(((long)b)&3 && len)){
+		do {
+			const __u8 *q = (const __u8 *)b;
+			DO_CRC(*q++);
+			b = (const __u32 *)q;
+		} while ((--len) && ((long)b)&3 );
+	}
+	if(likely(len >= 4)){
+		/* load data 32 bits wide, xor data 32 bits wide. */
+		size_t save_len = len & 3;
+	        len = len >> 2;
+		--b; /* use pre increment below(*++b) for speed */
+		do {
+			crc ^= *++b;
+			DO_CRC(0);
+			DO_CRC(0);
+			DO_CRC(0);
+			DO_CRC(0);
+		} while (--len);
+		b++; /* point to next byte(s) */
+		len = save_len;
+	}
+	/* And the last few bytes */
+	if(len){
+		do {
+			const __u8 *q = (const __u8 *)b;
+			DO_CRC(*q++);
+			b = (const void *)q;
+		} while (--len);
+	}
+	return __be32_to_cpu(crc);
+#undef ENDIAN_SHIFT
+#undef DO_CRC
+
+# elif CRC_BE_BITS == 4
+	while (len--) {
+		crc ^= *p++ << 24;
+		crc = (crc << 4) ^ crc32table_be[crc >> 28];
+		crc = (crc << 4) ^ crc32table_be[crc >> 28];
+	}
+	return crc;
+# elif CRC_BE_BITS == 2
+	while (len--) {
+		crc ^= *p++ << 24;
+		crc = (crc << 2) ^ crc32table_be[crc >> 30];
+		crc = (crc << 2) ^ crc32table_be[crc >> 30];
+		crc = (crc << 2) ^ crc32table_be[crc >> 30];
+		crc = (crc << 2) ^ crc32table_be[crc >> 30];
+	}
+	return crc;
+# endif
+}
+#endif
+
+/*
+ * A brief CRC tutorial.
+ *
+ * A CRC is a long-division remainder.  You add the CRC to the message,
+ * and the whole thing (message+CRC) is a multiple of the given
+ * CRC polynomial.  To check the CRC, you can either check that the
+ * CRC matches the recomputed value, *or* you can check that the
+ * remainder computed on the message+CRC is 0.  This latter approach
+ * is used by a lot of hardware implementations, and is why so many
+ * protocols put the end-of-frame flag after the CRC.
+ *
+ * It's actually the same long division you learned in school, except that
+ * - We're working in binary, so the digits are only 0 and 1, and
+ * - When dividing polynomials, there are no carries.  Rather than add and
+ *   subtract, we just xor.  Thus, we tend to get a bit sloppy about
+ *   the difference between adding and subtracting.
+ *
+ * A 32-bit CRC polynomial is actually 33 bits long.  But since it's
+ * 33 bits long, bit 32 is always going to be set, so usually the CRC
+ * is written in hex with the most significant bit omitted.  (If you're
+ * familiar with the IEEE 754 floating-point format, it's the same idea.)
+ *
+ * Note that a CRC is computed over a string of *bits*, so you have
+ * to decide on the endianness of the bits within each byte.  To get
+ * the best error-detecting properties, this should correspond to the
+ * order they're actually sent.  For example, standard RS-232 serial is
+ * little-endian; the most significant bit (sometimes used for parity)
+ * is sent last.  And when appending a CRC word to a message, you should
+ * do it in the right order, matching the endianness.
+ *
+ * Just like with ordinary division, the remainder is always smaller than
+ * the divisor (the CRC polynomial) you're dividing by.  Each step of the
+ * division, you take one more digit (bit) of the dividend and append it
+ * to the current remainder.  Then you figure out the appropriate multiple
+ * of the divisor to subtract to being the remainder back into range.
+ * In binary, it's easy - it has to be either 0 or 1, and to make the
+ * XOR cancel, it's just a copy of bit 32 of the remainder.
+ *
+ * When computing a CRC, we don't care about the quotient, so we can
+ * throw the quotient bit away, but subtract the appropriate multiple of
+ * the polynomial from the remainder and we're back to where we started,
+ * ready to process the next bit.
+ *
+ * A big-endian CRC written this way would be coded like:
+ * for (i = 0; i < input_bits; i++) {
+ * 	multiple = remainder & 0x80000000 ? CRCPOLY : 0;
+ * 	remainder = (remainder << 1 | next_input_bit()) ^ multiple;
+ * }
+ * Notice how, to get at bit 32 of the shifted remainder, we look
+ * at bit 31 of the remainder *before* shifting it.
+ *
+ * But also notice how the next_input_bit() bits we're shifting into
+ * the remainder don't actually affect any decision-making until
+ * 32 bits later.  Thus, the first 32 cycles of this are pretty boring.
+ * Also, to add the CRC to a message, we need a 32-bit-long hole for it at
+ * the end, so we have to add 32 extra cycles shifting in zeros at the
+ * end of every message,
+ *
+ * So the standard trick is to rearrage merging in the next_input_bit()
+ * until the moment it's needed.  Then the first 32 cycles can be precomputed,
+ * and merging in the final 32 zero bits to make room for the CRC can be
+ * skipped entirely.
+ * This changes the code to:
+ * for (i = 0; i < input_bits; i++) {
+ *      remainder ^= next_input_bit() << 31;
+ * 	multiple = (remainder & 0x80000000) ? CRCPOLY : 0;
+ * 	remainder = (remainder << 1) ^ multiple;
+ * }
+ * With this optimization, the little-endian code is simpler:
+ * for (i = 0; i < input_bits; i++) {
+ *      remainder ^= next_input_bit();
+ * 	multiple = (remainder & 1) ? CRCPOLY : 0;
+ * 	remainder = (remainder >> 1) ^ multiple;
+ * }
+ *
+ * Note that the other details of endianness have been hidden in CRCPOLY
+ * (which must be bit-reversed) and next_input_bit().
+ *
+ * However, as long as next_input_bit is returning the bits in a sensible
+ * order, we can actually do the merging 8 or more bits at a time rather
+ * than one bit at a time:
+ * for (i = 0; i < input_bytes; i++) {
+ * 	remainder ^= next_input_byte() << 24;
+ * 	for (j = 0; j < 8; j++) {
+ * 		multiple = (remainder & 0x80000000) ? CRCPOLY : 0;
+ * 		remainder = (remainder << 1) ^ multiple;
+ * 	}
+ * }
+ * Or in little-endian:
+ * for (i = 0; i < input_bytes; i++) {
+ * 	remainder ^= next_input_byte();
+ * 	for (j = 0; j < 8; j++) {
+ * 		multiple = (remainder & 1) ? CRCPOLY : 0;
+ * 		remainder = (remainder << 1) ^ multiple;
+ * 	}
+ * }
+ * If the input is a multiple of 32 bits, you can even XOR in a 32-bit
+ * word at a time and increase the inner loop count to 32.
+ *
+ * You can also mix and match the two loop styles, for example doing the
+ * bulk of a message byte-at-a-time and adding bit-at-a-time processing
+ * for any fractional bytes at the end.
+ *
+ * The only remaining optimization is to the byte-at-a-time table method.
+ * Here, rather than just shifting one bit of the remainder to decide
+ * in the correct multiple to subtract, we can shift a byte at a time.
+ * This produces a 40-bit (rather than a 33-bit) intermediate remainder,
+ * but again the multiple of the polynomial to subtract depends only on
+ * the high bits, the high 8 bits in this case.
+ *
+ * The multiple we need in that case is the low 32 bits of a 40-bit
+ * value whose high 8 bits are given, and which is a multiple of the
+ * generator polynomial.  This is simply the CRC-32 of the given
+ * one-byte message.
+ *
+ * Two more details: normally, appending zero bits to a message which
+ * is already a multiple of a polynomial produces a larger multiple of that
+ * polynomial.  To enable a CRC to detect this condition, it's common to
+ * invert the CRC before appending it.  This makes the remainder of the
+ * message+crc come out not as zero, but some fixed non-zero value.
+ *
+ * The same problem applies to zero bits prepended to the message, and
+ * a similar solution is used.  Instead of starting with a remainder of
+ * 0, an initial remainder of all ones is used.  As long as you start
+ * the same way on decoding, it doesn't make a difference.
+ */
+
+#ifdef UNITTEST
+
+#include <stdlib.h>
+#include <stdio.h>
+
+const __u8 byte_rev_table[256] = {
+	0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
+	0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
+	0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
+	0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
+	0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
+	0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
+	0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
+	0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
+	0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
+	0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
+	0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
+	0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
+	0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
+	0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
+	0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
+	0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
+	0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
+	0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
+	0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
+	0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
+	0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
+	0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
+	0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
+	0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
+	0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
+	0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
+	0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
+	0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
+	0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
+	0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
+	0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
+	0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
+};
+
+static inline __u8 bitrev8(__u8 byte)
+{
+	return byte_rev_table[byte];
+}
+
+static inline __u16 bitrev16(__u16 x)
+{
+	return (bitrev8(x & 0xff) << 8) | bitrev8(x >> 8);
+}
+
+/**
+ * bitrev32 - reverse the order of bits in a u32 value
+ * @x: value to be bit-reversed
+ */
+static __u32 bitrev32(__u32 x)
+{
+	return (bitrev16(x & 0xffff) << 16) | bitrev16(x >> 16);
+}
+
+#if 0				/*Not used at present */
+
+static void
+buf_dump(char const *prefix, unsigned char const *buf, size_t len)
+{
+	fputs(prefix, stdout);
+	while (len--)
+		printf(" %02x", *buf++);
+	putchar('\n');
+
+}
+#endif
+
+static void bytereverse(unsigned char *buf, size_t len)
+{
+	while (len--) {
+		unsigned char x = bitrev8(*buf);
+		*buf++ = x;
+	}
+}
+
+static void random_garbage(unsigned char *buf, size_t len)
+{
+	while (len--)
+		*buf++ = (unsigned char) random();
+}
+
+#if 0				/* Not used at present */
+static void store_le(__u32 x, unsigned char *buf)
+{
+	buf[0] = (unsigned char) x;
+	buf[1] = (unsigned char) (x >> 8);
+	buf[2] = (unsigned char) (x >> 16);
+	buf[3] = (unsigned char) (x >> 24);
+}
+#endif
+
+static void store_be(__u32 x, unsigned char *buf)
+{
+	buf[0] = (unsigned char) (x >> 24);
+	buf[1] = (unsigned char) (x >> 16);
+	buf[2] = (unsigned char) (x >> 8);
+	buf[3] = (unsigned char) x;
+}
+
+/*
+ * This checks that CRC(buf + CRC(buf)) = 0, and that
+ * CRC commutes with bit-reversal.  This has the side effect
+ * of bytewise bit-reversing the input buffer, and returns
+ * the CRC of the reversed buffer.
+ */
+static __u32 test_step(__u32 init, unsigned char *buf, size_t len)
+{
+	__u32 crc1, crc2;
+	size_t i;
+
+	crc1 = crc32_be(init, buf, len);
+	store_be(crc1, buf + len);
+	crc2 = crc32_be(init, buf, len + 4);
+	if (crc2)
+		printf("\nCRC cancellation fail: 0x%08x should be 0\n",
+		       crc2);
+
+	for (i = 0; i <= len + 4; i++) {
+		crc2 = crc32_be(init, buf, i);
+		crc2 = crc32_be(crc2, buf + i, len + 4 - i);
+		if (crc2)
+			printf("\nCRC split fail: 0x%08x\n", crc2);
+	}
+
+	/* Now swap it around for the other test */
+
+	bytereverse(buf, len + 4);
+	init = bitrev32(init);
+	crc2 = bitrev32(crc1);
+	if (crc1 != bitrev32(crc2))
+		printf("\nBit reversal fail: 0x%08x -> 0x%08x -> 0x%08x\n",
+		       crc1, crc2, bitrev32(crc2));
+	crc1 = crc32_le(init, buf, len);
+	if (crc1 != crc2)
+		printf("\nCRC endianness fail: 0x%08x != 0x%08x\n", crc1,
+		       crc2);
+	crc2 = crc32_le(init, buf, len + 4);
+	if (crc2)
+		printf("\nCRC cancellation fail: 0x%08x should be 0\n",
+		       crc2);
+
+	for (i = 0; i <= len + 4; i++) {
+		crc2 = crc32_le(init, buf, i);
+		crc2 = crc32_le(crc2, buf + i, len + 4 - i);
+		if (crc2)
+			printf("\nCRC split fail: 0x%08x\n", crc2);
+	}
+
+	return crc1;
+}
+
+#define SIZE 64
+#define INIT1 0
+#define INIT2 0
+
+int main(int argc, char **argv)
+{
+	unsigned char buf1[SIZE + 4];
+	unsigned char buf2[SIZE + 4];
+	unsigned char buf3[SIZE + 4];
+	int i, j;
+	__u32 crc1, crc2, crc3;
+	int exit_status = 0;
+
+	for (i = 0; i <= SIZE; i++) {
+		printf("\rTesting length %d...", i);
+		fflush(stdout);
+		random_garbage(buf1, i);
+		random_garbage(buf2, i);
+		for (j = 0; j < i; j++)
+			buf3[j] = buf1[j] ^ buf2[j];
+
+		crc1 = test_step(INIT1, buf1, i);
+		crc2 = test_step(INIT2, buf2, i);
+		/* Now check that CRC(buf1 ^ buf2) = CRC(buf1) ^ CRC(buf2) */
+		crc3 = test_step(INIT1 ^ INIT2, buf3, i);
+		if (crc3 != (crc1 ^ crc2)) {
+			printf("CRC XOR fail: 0x%08x != 0x%08x ^ 0x%08x\n",
+			       crc3, crc1, crc2);
+			exit_status++;
+		}
+	}
+	printf("\nAll test complete.  No failures expected.\n");
+	return 0;
+}
+
+#endif				/* UNITTEST */
diff --git a/e2fsprogs/e2fsck/crc32defs.h b/e2fsprogs/e2fsck/crc32defs.h
new file mode 100644
index 0000000..27414d2
--- /dev/null
+++ b/e2fsprogs/e2fsck/crc32defs.h
@@ -0,0 +1,64 @@
+/*
+ * 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
+
+/* How many bits at a time to use.  Requires a table of 4<<CRC_xx_BITS bytes. */
+/* For less performance-sensitive, use 4 */
+#ifndef CRC_LE_BITS
+# define CRC_LE_BITS 8
+#endif
+#ifndef CRC_BE_BITS
+# define CRC_BE_BITS 8
+#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 > 8 || CRC_LE_BITS < 1 || CRC_LE_BITS & CRC_LE_BITS-1
+# error CRC_LE_BITS must be a power of 2 between 1 and 8
+#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 > 8 || CRC_BE_BITS < 1 || CRC_BE_BITS & CRC_BE_BITS-1
+# error CRC_BE_BITS must be a power of 2 between 1 and 8
+#endif
+
+#define ___constant_swab32(x) \
+	((__u32)( \
+		(((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
+		(((__u32)(x) & (__u32)0x0000ff00UL) <<  8) | \
+		(((__u32)(x) & (__u32)0x00ff0000UL) >>  8) | \
+		(((__u32)(x) & (__u32)0xff000000UL) >> 24) ))
+
+
+#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_swab32((x)))
+#define __le32_to_cpu(x) (ext2fs_swab32((x)))
+#else
+#define __constant_cpu_to_le32(x) (x)
+#define __constant_cpu_to_be32(x) ___constant_swab32((x))
+#define __be32_to_cpu(x) (ext2fs_swab32((x)))
+#define __cpu_to_be32(x) (ext2fs_swab32((x)))
+#define __cpu_to_le32(x) (x)
+#define __le32_to_cpu(x) (x)
+#endif
+
+#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/e2fsprogs/e2fsck/crc32table.h b/e2fsprogs/e2fsck/crc32table.h
new file mode 100644
index 0000000..57a79a2
--- /dev/null
+++ b/e2fsprogs/e2fsck/crc32table.h
@@ -0,0 +1,136 @@
+/* this file is generated - do not edit */
+
+#ifdef UNITTEST
+static const __u32 crc32table_le[] = {
+tole(0x00000000L), tole(0x77073096L), tole(0xee0e612cL), tole(0x990951baL), 
+tole(0x076dc419L), tole(0x706af48fL), tole(0xe963a535L), tole(0x9e6495a3L), 
+tole(0x0edb8832L), tole(0x79dcb8a4L), tole(0xe0d5e91eL), tole(0x97d2d988L), 
+tole(0x09b64c2bL), tole(0x7eb17cbdL), tole(0xe7b82d07L), tole(0x90bf1d91L), 
+tole(0x1db71064L), tole(0x6ab020f2L), tole(0xf3b97148L), tole(0x84be41deL), 
+tole(0x1adad47dL), tole(0x6ddde4ebL), tole(0xf4d4b551L), tole(0x83d385c7L), 
+tole(0x136c9856L), tole(0x646ba8c0L), tole(0xfd62f97aL), tole(0x8a65c9ecL), 
+tole(0x14015c4fL), tole(0x63066cd9L), tole(0xfa0f3d63L), tole(0x8d080df5L), 
+tole(0x3b6e20c8L), tole(0x4c69105eL), tole(0xd56041e4L), tole(0xa2677172L), 
+tole(0x3c03e4d1L), tole(0x4b04d447L), tole(0xd20d85fdL), tole(0xa50ab56bL), 
+tole(0x35b5a8faL), tole(0x42b2986cL), tole(0xdbbbc9d6L), tole(0xacbcf940L), 
+tole(0x32d86ce3L), tole(0x45df5c75L), tole(0xdcd60dcfL), tole(0xabd13d59L), 
+tole(0x26d930acL), tole(0x51de003aL), tole(0xc8d75180L), tole(0xbfd06116L), 
+tole(0x21b4f4b5L), tole(0x56b3c423L), tole(0xcfba9599L), tole(0xb8bda50fL), 
+tole(0x2802b89eL), tole(0x5f058808L), tole(0xc60cd9b2L), tole(0xb10be924L), 
+tole(0x2f6f7c87L), tole(0x58684c11L), tole(0xc1611dabL), tole(0xb6662d3dL), 
+tole(0x76dc4190L), tole(0x01db7106L), tole(0x98d220bcL), tole(0xefd5102aL), 
+tole(0x71b18589L), tole(0x06b6b51fL), tole(0x9fbfe4a5L), tole(0xe8b8d433L), 
+tole(0x7807c9a2L), tole(0x0f00f934L), tole(0x9609a88eL), tole(0xe10e9818L), 
+tole(0x7f6a0dbbL), tole(0x086d3d2dL), tole(0x91646c97L), tole(0xe6635c01L), 
+tole(0x6b6b51f4L), tole(0x1c6c6162L), tole(0x856530d8L), tole(0xf262004eL), 
+tole(0x6c0695edL), tole(0x1b01a57bL), tole(0x8208f4c1L), tole(0xf50fc457L), 
+tole(0x65b0d9c6L), tole(0x12b7e950L), tole(0x8bbeb8eaL), tole(0xfcb9887cL), 
+tole(0x62dd1ddfL), tole(0x15da2d49L), tole(0x8cd37cf3L), tole(0xfbd44c65L), 
+tole(0x4db26158L), tole(0x3ab551ceL), tole(0xa3bc0074L), tole(0xd4bb30e2L), 
+tole(0x4adfa541L), tole(0x3dd895d7L), tole(0xa4d1c46dL), tole(0xd3d6f4fbL), 
+tole(0x4369e96aL), tole(0x346ed9fcL), tole(0xad678846L), tole(0xda60b8d0L), 
+tole(0x44042d73L), tole(0x33031de5L), tole(0xaa0a4c5fL), tole(0xdd0d7cc9L), 
+tole(0x5005713cL), tole(0x270241aaL), tole(0xbe0b1010L), tole(0xc90c2086L), 
+tole(0x5768b525L), tole(0x206f85b3L), tole(0xb966d409L), tole(0xce61e49fL), 
+tole(0x5edef90eL), tole(0x29d9c998L), tole(0xb0d09822L), tole(0xc7d7a8b4L), 
+tole(0x59b33d17L), tole(0x2eb40d81L), tole(0xb7bd5c3bL), tole(0xc0ba6cadL), 
+tole(0xedb88320L), tole(0x9abfb3b6L), tole(0x03b6e20cL), tole(0x74b1d29aL), 
+tole(0xead54739L), tole(0x9dd277afL), tole(0x04db2615L), tole(0x73dc1683L), 
+tole(0xe3630b12L), tole(0x94643b84L), tole(0x0d6d6a3eL), tole(0x7a6a5aa8L), 
+tole(0xe40ecf0bL), tole(0x9309ff9dL), tole(0x0a00ae27L), tole(0x7d079eb1L), 
+tole(0xf00f9344L), tole(0x8708a3d2L), tole(0x1e01f268L), tole(0x6906c2feL), 
+tole(0xf762575dL), tole(0x806567cbL), tole(0x196c3671L), tole(0x6e6b06e7L), 
+tole(0xfed41b76L), tole(0x89d32be0L), tole(0x10da7a5aL), tole(0x67dd4accL), 
+tole(0xf9b9df6fL), tole(0x8ebeeff9L), tole(0x17b7be43L), tole(0x60b08ed5L), 
+tole(0xd6d6a3e8L), tole(0xa1d1937eL), tole(0x38d8c2c4L), tole(0x4fdff252L), 
+tole(0xd1bb67f1L), tole(0xa6bc5767L), tole(0x3fb506ddL), tole(0x48b2364bL), 
+tole(0xd80d2bdaL), tole(0xaf0a1b4cL), tole(0x36034af6L), tole(0x41047a60L), 
+tole(0xdf60efc3L), tole(0xa867df55L), tole(0x316e8eefL), tole(0x4669be79L), 
+tole(0xcb61b38cL), tole(0xbc66831aL), tole(0x256fd2a0L), tole(0x5268e236L), 
+tole(0xcc0c7795L), tole(0xbb0b4703L), tole(0x220216b9L), tole(0x5505262fL), 
+tole(0xc5ba3bbeL), tole(0xb2bd0b28L), tole(0x2bb45a92L), tole(0x5cb36a04L), 
+tole(0xc2d7ffa7L), tole(0xb5d0cf31L), tole(0x2cd99e8bL), tole(0x5bdeae1dL), 
+tole(0x9b64c2b0L), tole(0xec63f226L), tole(0x756aa39cL), tole(0x026d930aL), 
+tole(0x9c0906a9L), tole(0xeb0e363fL), tole(0x72076785L), tole(0x05005713L), 
+tole(0x95bf4a82L), tole(0xe2b87a14L), tole(0x7bb12baeL), tole(0x0cb61b38L), 
+tole(0x92d28e9bL), tole(0xe5d5be0dL), tole(0x7cdcefb7L), tole(0x0bdbdf21L), 
+tole(0x86d3d2d4L), tole(0xf1d4e242L), tole(0x68ddb3f8L), tole(0x1fda836eL), 
+tole(0x81be16cdL), tole(0xf6b9265bL), tole(0x6fb077e1L), tole(0x18b74777L), 
+tole(0x88085ae6L), tole(0xff0f6a70L), tole(0x66063bcaL), tole(0x11010b5cL), 
+tole(0x8f659effL), tole(0xf862ae69L), tole(0x616bffd3L), tole(0x166ccf45L), 
+tole(0xa00ae278L), tole(0xd70dd2eeL), tole(0x4e048354L), tole(0x3903b3c2L), 
+tole(0xa7672661L), tole(0xd06016f7L), tole(0x4969474dL), tole(0x3e6e77dbL), 
+tole(0xaed16a4aL), tole(0xd9d65adcL), tole(0x40df0b66L), tole(0x37d83bf0L), 
+tole(0xa9bcae53L), tole(0xdebb9ec5L), tole(0x47b2cf7fL), tole(0x30b5ffe9L), 
+tole(0xbdbdf21cL), tole(0xcabac28aL), tole(0x53b39330L), tole(0x24b4a3a6L), 
+tole(0xbad03605L), tole(0xcdd70693L), tole(0x54de5729L), tole(0x23d967bfL), 
+tole(0xb3667a2eL), tole(0xc4614ab8L), tole(0x5d681b02L), tole(0x2a6f2b94L), 
+tole(0xb40bbe37L), tole(0xc30c8ea1L), tole(0x5a05df1bL), tole(0x2d02ef8dL)
+};
+#endif /* UNITTEST */
+static const __u32 crc32table_be[] = {
+tobe(0x00000000L), tobe(0x04c11db7L), tobe(0x09823b6eL), tobe(0x0d4326d9L), 
+tobe(0x130476dcL), tobe(0x17c56b6bL), tobe(0x1a864db2L), tobe(0x1e475005L), 
+tobe(0x2608edb8L), tobe(0x22c9f00fL), tobe(0x2f8ad6d6L), tobe(0x2b4bcb61L), 
+tobe(0x350c9b64L), tobe(0x31cd86d3L), tobe(0x3c8ea00aL), tobe(0x384fbdbdL), 
+tobe(0x4c11db70L), tobe(0x48d0c6c7L), tobe(0x4593e01eL), tobe(0x4152fda9L), 
+tobe(0x5f15adacL), tobe(0x5bd4b01bL), tobe(0x569796c2L), tobe(0x52568b75L), 
+tobe(0x6a1936c8L), tobe(0x6ed82b7fL), tobe(0x639b0da6L), tobe(0x675a1011L), 
+tobe(0x791d4014L), tobe(0x7ddc5da3L), tobe(0x709f7b7aL), tobe(0x745e66cdL), 
+tobe(0x9823b6e0L), tobe(0x9ce2ab57L), tobe(0x91a18d8eL), tobe(0x95609039L), 
+tobe(0x8b27c03cL), tobe(0x8fe6dd8bL), tobe(0x82a5fb52L), tobe(0x8664e6e5L), 
+tobe(0xbe2b5b58L), tobe(0xbaea46efL), tobe(0xb7a96036L), tobe(0xb3687d81L), 
+tobe(0xad2f2d84L), tobe(0xa9ee3033L), tobe(0xa4ad16eaL), tobe(0xa06c0b5dL), 
+tobe(0xd4326d90L), tobe(0xd0f37027L), tobe(0xddb056feL), tobe(0xd9714b49L), 
+tobe(0xc7361b4cL), tobe(0xc3f706fbL), tobe(0xceb42022L), tobe(0xca753d95L), 
+tobe(0xf23a8028L), tobe(0xf6fb9d9fL), tobe(0xfbb8bb46L), tobe(0xff79a6f1L), 
+tobe(0xe13ef6f4L), tobe(0xe5ffeb43L), tobe(0xe8bccd9aL), tobe(0xec7dd02dL), 
+tobe(0x34867077L), tobe(0x30476dc0L), tobe(0x3d044b19L), tobe(0x39c556aeL), 
+tobe(0x278206abL), tobe(0x23431b1cL), tobe(0x2e003dc5L), tobe(0x2ac12072L), 
+tobe(0x128e9dcfL), tobe(0x164f8078L), tobe(0x1b0ca6a1L), tobe(0x1fcdbb16L), 
+tobe(0x018aeb13L), tobe(0x054bf6a4L), tobe(0x0808d07dL), tobe(0x0cc9cdcaL), 
+tobe(0x7897ab07L), tobe(0x7c56b6b0L), tobe(0x71159069L), tobe(0x75d48ddeL), 
+tobe(0x6b93dddbL), tobe(0x6f52c06cL), tobe(0x6211e6b5L), tobe(0x66d0fb02L), 
+tobe(0x5e9f46bfL), tobe(0x5a5e5b08L), tobe(0x571d7dd1L), tobe(0x53dc6066L), 
+tobe(0x4d9b3063L), tobe(0x495a2dd4L), tobe(0x44190b0dL), tobe(0x40d816baL), 
+tobe(0xaca5c697L), tobe(0xa864db20L), tobe(0xa527fdf9L), tobe(0xa1e6e04eL), 
+tobe(0xbfa1b04bL), tobe(0xbb60adfcL), tobe(0xb6238b25L), tobe(0xb2e29692L), 
+tobe(0x8aad2b2fL), tobe(0x8e6c3698L), tobe(0x832f1041L), tobe(0x87ee0df6L), 
+tobe(0x99a95df3L), tobe(0x9d684044L), tobe(0x902b669dL), tobe(0x94ea7b2aL), 
+tobe(0xe0b41de7L), tobe(0xe4750050L), tobe(0xe9362689L), tobe(0xedf73b3eL), 
+tobe(0xf3b06b3bL), tobe(0xf771768cL), tobe(0xfa325055L), tobe(0xfef34de2L), 
+tobe(0xc6bcf05fL), tobe(0xc27dede8L), tobe(0xcf3ecb31L), tobe(0xcbffd686L), 
+tobe(0xd5b88683L), tobe(0xd1799b34L), tobe(0xdc3abdedL), tobe(0xd8fba05aL), 
+tobe(0x690ce0eeL), tobe(0x6dcdfd59L), tobe(0x608edb80L), tobe(0x644fc637L), 
+tobe(0x7a089632L), tobe(0x7ec98b85L), tobe(0x738aad5cL), tobe(0x774bb0ebL), 
+tobe(0x4f040d56L), tobe(0x4bc510e1L), tobe(0x46863638L), tobe(0x42472b8fL), 
+tobe(0x5c007b8aL), tobe(0x58c1663dL), tobe(0x558240e4L), tobe(0x51435d53L), 
+tobe(0x251d3b9eL), tobe(0x21dc2629L), tobe(0x2c9f00f0L), tobe(0x285e1d47L), 
+tobe(0x36194d42L), tobe(0x32d850f5L), tobe(0x3f9b762cL), tobe(0x3b5a6b9bL), 
+tobe(0x0315d626L), tobe(0x07d4cb91L), tobe(0x0a97ed48L), tobe(0x0e56f0ffL), 
+tobe(0x1011a0faL), tobe(0x14d0bd4dL), tobe(0x19939b94L), tobe(0x1d528623L), 
+tobe(0xf12f560eL), tobe(0xf5ee4bb9L), tobe(0xf8ad6d60L), tobe(0xfc6c70d7L), 
+tobe(0xe22b20d2L), tobe(0xe6ea3d65L), tobe(0xeba91bbcL), tobe(0xef68060bL), 
+tobe(0xd727bbb6L), tobe(0xd3e6a601L), tobe(0xdea580d8L), tobe(0xda649d6fL), 
+tobe(0xc423cd6aL), tobe(0xc0e2d0ddL), tobe(0xcda1f604L), tobe(0xc960ebb3L), 
+tobe(0xbd3e8d7eL), tobe(0xb9ff90c9L), tobe(0xb4bcb610L), tobe(0xb07daba7L), 
+tobe(0xae3afba2L), tobe(0xaafbe615L), tobe(0xa7b8c0ccL), tobe(0xa379dd7bL), 
+tobe(0x9b3660c6L), tobe(0x9ff77d71L), tobe(0x92b45ba8L), tobe(0x9675461fL), 
+tobe(0x8832161aL), tobe(0x8cf30badL), tobe(0x81b02d74L), tobe(0x857130c3L), 
+tobe(0x5d8a9099L), tobe(0x594b8d2eL), tobe(0x5408abf7L), tobe(0x50c9b640L), 
+tobe(0x4e8ee645L), tobe(0x4a4ffbf2L), tobe(0x470cdd2bL), tobe(0x43cdc09cL), 
+tobe(0x7b827d21L), tobe(0x7f436096L), tobe(0x7200464fL), tobe(0x76c15bf8L), 
+tobe(0x68860bfdL), tobe(0x6c47164aL), tobe(0x61043093L), tobe(0x65c52d24L), 
+tobe(0x119b4be9L), tobe(0x155a565eL), tobe(0x18197087L), tobe(0x1cd86d30L), 
+tobe(0x029f3d35L), tobe(0x065e2082L), tobe(0x0b1d065bL), tobe(0x0fdc1becL), 
+tobe(0x3793a651L), tobe(0x3352bbe6L), tobe(0x3e119d3fL), tobe(0x3ad08088L), 
+tobe(0x2497d08dL), tobe(0x2056cd3aL), tobe(0x2d15ebe3L), tobe(0x29d4f654L), 
+tobe(0xc5a92679L), tobe(0xc1683bceL), tobe(0xcc2b1d17L), tobe(0xc8ea00a0L), 
+tobe(0xd6ad50a5L), tobe(0xd26c4d12L), tobe(0xdf2f6bcbL), tobe(0xdbee767cL), 
+tobe(0xe3a1cbc1L), tobe(0xe760d676L), tobe(0xea23f0afL), tobe(0xeee2ed18L), 
+tobe(0xf0a5bd1dL), tobe(0xf464a0aaL), tobe(0xf9278673L), tobe(0xfde69bc4L), 
+tobe(0x89b8fd09L), tobe(0x8d79e0beL), tobe(0x803ac667L), tobe(0x84fbdbd0L), 
+tobe(0x9abc8bd5L), tobe(0x9e7d9662L), tobe(0x933eb0bbL), tobe(0x97ffad0cL), 
+tobe(0xafb010b1L), tobe(0xab710d06L), tobe(0xa6322bdfL), tobe(0xa2f33668L), 
+tobe(0xbcb4666dL), tobe(0xb8757bdaL), tobe(0xb5365d03L), tobe(0xb1f740b4L)
+};
diff --git a/e2fsprogs/e2fsck/dict.c b/e2fsprogs/e2fsck/dict.c
new file mode 100644
index 0000000..722b5b1
--- /dev/null
+++ b/e2fsprogs/e2fsck/dict.c
@@ -0,0 +1,1521 @@
+/*
+ * 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 $
+ */
+
+#define NDEBUG
+
+#ifdef __GNUC__
+#define EXT2FS_ATTR(x) __attribute__(x)
+#else
+#define EXT2FS_ATTR(x)
+#endif
+
+#include <stdlib.h>
+#include <stddef.h>
+#include <assert.h>
+#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 {
+	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 {
+	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 NDEBUG
+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->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)
+{
+    assert (dict_count(dict) == 0);
+    assert ((al == NULL && fr == NULL) || (al != NULL && fr != NULL));
+
+    dict->allocnode = al ? al : dnode_alloc;
+    dict->freenode = fr ? fr : dnode_free;
+    dict->context = context;
+}
+
+#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)
+{
+    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
+    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;
+
+    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;
+    assert (dict->nilnode.color == dnode_black);
+}
+
+
+/*
+ * 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.
+ */
+
+int dict_verify(dict_t *dict)
+{
+#ifndef NDEBUG
+    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;
+#endif
+    return 1;
+}
+
+/*
+ * 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(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(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(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(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;
+
+    assert (!dict_isfull(dict));
+    assert (!dict_contains(dict, node));
+    assert (!dnode_is_in_a_dict(node));
+
+    /* basic binary tree insert */
+
+    while (where != nil) {
+	parent = where;
+	result = dict->compare(key, where->key);
+	/* trap attempts at duplicate key insertion unless it's explicitly allowed */
+	assert (dict->dupes || result != 0);
+	if (result < 0)
+	    where = where->left;
+	else
+	    where = where->right;
+    }
+
+    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;
+		    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;
+		    assert (grandpa == parent->parent);
+		}
+		parent->color = dnode_black;
+		grandpa->color = dnode_red;
+		rotate_left(grandpa);
+		break;
+	    }
+	}
+    }
+
+    dict_root(dict)->color = dnode_black;
+
+    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 */
+
+    assert (!dict_isempty(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;
+
+	assert (next != nil);
+	assert (next->parent != nil);
+	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 {
+	    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 {
+	    assert (delparent->right == delete);
+	    delparent->right = next;
+	}
+
+    } else {
+	assert (delete != nil);
+	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 {
+	    assert (delete == delparent->right);
+	    delparent->right = child;
+	}
+    }
+
+    delete->parent = NULL;
+    delete->right = NULL;
+    delete->left = NULL;
+
+    dict->nodecount--;
+
+    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;
+		assert (sister != nil);
+		if (sister->color == dnode_red) {
+		    sister->color = dnode_black;
+		    parent->color = dnode_red;
+		    rotate_left(parent);
+		    sister = parent->right;
+		    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) {
+			assert (sister->left->color == dnode_red);
+			sister->left->color = dnode_black;
+			sister->color = dnode_red;
+			rotate_right(sister);
+			sister = parent->right;
+			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 */
+		assert (child == parent->right);
+		sister = parent->left;
+		assert (sister != nil);
+		if (sister->color == dnode_red) {
+		    sister->color = dnode_black;
+		    parent->color = dnode_red;
+		    rotate_right(parent);
+		    sister = parent->left;
+		    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) {
+			assert (sister->right->color == dnode_red);
+			sister->right->color = dnode_black;
+			sister->color = dnode_red;
+			rotate_left(sister);
+			sister = parent->left;
+			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;
+    }
+
+    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)
+{
+    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;
+}
+
+int dnode_is_in_a_dict(dnode_t *dnode)
+{
+    return (dnode->parent && dnode->left && dnode->right);
+}
+
+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		*/
+	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)
+{
+    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;
+
+    assert (!dnode_is_in_a_dict(newnode));
+    assert (dict->nodecount < dict->maxcount);
+
+#ifndef NDEBUG
+    if (dict->nodecount > 0) {
+	if (dict->dupes)
+	    assert (dict->compare(nil->left->key, key) <= 0);
+	else
+	    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;
+
+    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) {
+	    assert (baselevel == 0);
+	    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;
+
+	    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;
+
+    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);
+
+    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 {
+	    assert (leftnode == NULL && rightnode == NULL);
+	    break;
+	}
+
+    copyleft:
+	{
+	    dnode_t *next = dict_next(dest, leftnode);
+#ifndef NDEBUG
+	    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 NDEBUG
+	    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 *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/e2fsprogs/e2fsck/dict.h b/e2fsprogs/e2fsck/dict.h
new file mode 100644
index 0000000..838079d
--- /dev/null
+++ b/e2fsprogs/e2fsck/dict.h
@@ -0,0 +1,144 @@
+/*
+ * 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 $
+ */
+
+#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 *);
+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;
+    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_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/e2fsprogs/e2fsck/dirinfo.c b/e2fsprogs/e2fsck/dirinfo.c
new file mode 100644
index 0000000..3c18393
--- /dev/null
+++ b/e2fsprogs/e2fsck/dirinfo.c
@@ -0,0 +1,453 @@
+/*
+ * 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 "e2fsck.h"
+#include <sys/stat.h>
+#include <fcntl.h>
+#include "uuid/uuid.h"
+
+#include <ext2fs/tdb.h>
+
+struct dir_info_db {
+	int		count;
+	int		size;
+	struct dir_info *array;
+	struct dir_info *last_lookup;
+	char		*tdb_fn;
+	TDB_CONTEXT	*tdb;
+};
+
+struct dir_info_iter {
+	int	i;
+	TDB_DATA	tdb_iter;
+};
+
+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);
+
+static void setup_tdb(e2fsck_t ctx, ext2_ino_t num_dirs)
+{
+	struct dir_info_db	*db = ctx->dir_info;
+	unsigned int		threshold;
+	errcode_t		retval;
+	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);
+	fd = mkstemp(db->tdb_fn);
+	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);
+}
+
+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 */
+
+	setup_tdb(ctx, num_dirs);
+
+	if (db->tdb) {
+#ifdef DIRINFO_DEBUG
+		printf("Note: using tdb!\n");
+#endif
+		return;
+	}
+
+	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_db 	*db;
+	struct dir_info 	*dir, ent;
+	int			i, j;
+	errcode_t		retval;
+	unsigned long		old_size;
+
+#ifdef DIRINFO_DEBUG
+	printf("add_dir_info for inode (%lu, %lu)...\n", ino, parent);
+#endif
+	if (!ctx->dir_info)
+		setup_db(ctx);
+	db = ctx->dir_info;
+
+	if (ctx->dir_info->count >= ctx->dir_info->size) {
+		old_size = ctx->dir_info->size * sizeof(struct dir_info);
+		ctx->dir_info->size += 10;
+		retval = ext2fs_resize_mem(old_size, ctx->dir_info->size *
+					   sizeof(struct dir_info),
+					   &ctx->dir_info->array);
+		if (retval) {
+			ctx->dir_info->size -= 10;
+			return;
+		}
+	}
+
+	ent.ino = ino;
+	ent.parent = parent;
+	ent.dotdot = parent;
+
+	if (db->tdb) {
+		e2fsck_put_dir_info(ctx, &ent);
+		return;
+	}
+
+	/*
+	 * 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;
+	int			low, high, mid;
+	struct dir_info_ent	*buf;
+	static struct dir_info	ret_dir_info;
+
+	if (!db)
+		return 0;
+
+#ifdef DIRINFO_DEBUG
+	printf("e2fsck_get_dir_info %d...", ino);
+#endif
+
+	if (db->tdb) {
+		TDB_DATA key, data;
+
+		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("(%d,%d,%d)\n", ino, buf->dotdot, buf->parent);
+#endif
+		free(data.dptr);
+		return &ret_dir_info;
+	}
+
+	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("(%d,%d,%d)\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("(%d,%d,%d)\n", ino,
+		       ctx->dir_info->array[high].dotdot,
+		       ctx->dir_info->array[high].parent);
+#endif
+		return &ctx->dir_info->array[high];
+	}
+
+	while (low < high) {
+		mid = (low+high)/2;
+		if (mid == low || mid == high)
+			break;
+		if (ino == ctx->dir_info->array[mid].ino) {
+#ifdef DIRINFO_DEBUG
+			printf("(%d,%d,%d)\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, struct dir_info *dir)
+{
+	struct dir_info_db	*db = ctx->dir_info;
+	struct dir_info_ent	buf;
+	TDB_DATA		key, data;
+
+#ifdef DIRINFO_DEBUG
+	printf("e2fsck_put_dir_info (%d, %d, %d)...", dir->ino, dir->dotdot,
+	       dir->parent);
+#endif
+
+	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));
+	}
+	return;
+}
+
+/*
+ * Free the dir_info structure when it isn't needed any more.
+ */
+void e2fsck_free_dir_info(e2fsck_t ctx)
+{
+	if (ctx->dir_info) {
+		if (ctx->dir_info->tdb)
+			tdb_close(ctx->dir_info->tdb);
+		if (ctx->dir_info->tdb_fn) {
+			unlink(ctx->dir_info->tdb_fn);
+			free(ctx->dir_info->tdb_fn);
+		}
+		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;
+	struct dir_info_db *db = ctx->dir_info;
+
+	iter = e2fsck_allocate_memory(ctx, sizeof(struct dir_info_iter),
+				      "dir_info iterator");
+
+	if (db->tdb)
+		iter->tdb_iter = tdb_firstkey(db->tdb);
+
+	return iter;
+}
+
+void e2fsck_dir_info_iter_end(e2fsck_t ctx EXT2FS_ATTR((unused)),
+			      struct dir_info_iter *iter)
+{
+	free(iter->tdb_iter.dptr);
+	ext2fs_free_mem(&iter);
+}
+
+/*
+ * A simple interator function
+ */
+struct dir_info *e2fsck_dir_info_iter(e2fsck_t ctx, struct dir_info_iter *iter)
+{
+	TDB_DATA data, key;
+	struct dir_info_db *db = ctx->dir_info;
+	struct dir_info_ent *buf;
+	static struct dir_info ret_dir_info;
+
+	if (!ctx->dir_info || !iter)
+		return 0;
+
+	if (db->tdb) {
+		if (iter->tdb_iter.dptr == 0)
+			return 0;
+		key = iter->tdb_iter;
+		data = tdb_fetch(db->tdb, key);
+		if (!data.dptr) {
+			printf("iter fetch failed: %s\n",
+			       tdb_errorstr(db->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(db->tdb, key);
+		free(key.dptr);
+		free(data.dptr);
+		return &ret_dir_info;
+	}
+
+	if (iter->i >= ctx->dir_info->count)
+		return 0;
+
+#ifdef DIRINFO_DEBUG
+	printf("iter(%d, %d, %d)...", 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/e2fsprogs/e2fsck/dx_dirinfo.c b/e2fsprogs/e2fsck/dx_dirinfo.c
new file mode 100644
index 0000000..5c48d32
--- /dev/null
+++ b/e2fsprogs/e2fsck/dx_dirinfo.c
@@ -0,0 +1,150 @@
+/*
+ * 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 "e2fsck.h"
+#ifdef ENABLE_HTREE
+
+/*
+ * 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, int num_blocks)
+{
+	struct dx_dir_info *dir;
+	int		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) {
+			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->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)
+{
+	int	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) {
+		mid = (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)
+{
+	int	i;
+	struct dx_dir_info *dir;
+
+	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
+ */
+int e2fsck_get_num_dx_dirinfo(e2fsck_t ctx)
+{
+	return ctx->dx_dir_info_count;
+}
+
+/*
+ * A simple interator function
+ */
+struct dx_dir_info *e2fsck_dx_dir_info_iter(e2fsck_t ctx, int *control)
+{
+	if (*control >= ctx->dx_dir_info_count)
+		return 0;
+
+	return(ctx->dx_dir_info + (*control)++);
+}
+
+#endif /* ENABLE_HTREE */
diff --git a/e2fsprogs/e2fsck/e2fsck.8.in b/e2fsprogs/e2fsck/e2fsck.8.in
new file mode 100644
index 0000000..f5ed758
--- /dev/null
+++ b/e2fsprogs/e2fsck/e2fsck.8.in
@@ -0,0 +1,417 @@
+.\" -*- 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
+]
+.I device
+.SH DESCRIPTION
+.B e2fsck
+is used to check the ext2/ext3/ext4 family of file systems.   
+For ext3 and ext4 filesystems 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 filesystems that use journalling,
+.B e2fsck
+will normally replay the journal and exit, unless its superblock
+indicates that further checking is required.
+.PP
+.I device
+is the device file where the filesystem is stored (e.g.
+.IR /dev/hdc1 ).
+.PP
+Note that in general it is not safe to run
+.B e2fsck
+on mounted filesystems.  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 filesystem is mounted.   If 
+.B e2fsck
+asks whether or not you should check a filesystem 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.
+.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 the backup superblock is dependent on the
+filesystem's blocksize.  For filesystems with 1k blocksizes, a backup
+superblock can be found at block 8193; for filesystems with 2k
+blocksizes, at block 16384; and for 4k blocksizes, at block 32768.  
+.IP
+Additional backup superblocks can be determined by using the 
+.B mke2fs 
+program using the 
+.B \-n
+option to print out where the superblocks were created.   The 
+.B \-b 
+option to 
+.BR mke2fs ,
+which specifies blocksize of the filesystem must be specified in order
+for the superblock locations that are printed out to be accurate.
+.IP
+If an alternative superblock is specified and  
+the filesystem is not opened read-only, e2fsck will make sure that the
+primary superblock is updated appropriately upon completion of the 
+filesystem 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 filesystem 
+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 filesystem.  This option causes e2fsck to
+try to optimize all directories, either by reindexing them if the
+filesystem supports directory indexing,  or by sorting and compressing
+directories for smaller directories, or for filesystems 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 filesystem 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 filesystem.  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 filesystem.
+.TP
+.BI discard
+Attempt to discard free blocks and unused inode blocks after the full
+filesystem check (discarding blocks is useful on solid state devices and sparse
+/ thin-provisioned storage). Note that discard is done in pass 5 AFTER the
+filesystem 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.
+.RE
+.TP
+.B \-f
+Force checking even if the file system seems clean.
+.TP
+.B \-F
+Flush the filesystem 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 filesystem 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 filesystem.  Hence, 
+.BR badblocks (8)
+must be given the blocksize of the filesystem 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 filesystem 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 filesystem 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.
+.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
+filesystem 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 filesystem 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 filesystem, 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 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/e2fsprogs/e2fsck/e2fsck.c b/e2fsprogs/e2fsck/e2fsck.c
new file mode 100644
index 0000000..3693124
--- /dev/null
+++ b/e2fsprogs/e2fsck/e2fsck.c
@@ -0,0 +1,234 @@
+/*
+ * 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 <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 = strtoul(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_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);
+#ifdef ENABLE_HTREE
+	e2fsck_free_dx_dir_info(ctx);
+#endif
+	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->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->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;
+	}
+
+	/*
+	 * 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;
+	}
+
+	/* 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;
+
+	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);
+
+	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_pass2, e2fsck_pass3, e2fsck_pass4,
+	e2fsck_pass5, 0 };
+
+#define E2F_FLAG_RUN_RETURN	(E2F_FLAG_SIGNAL_MASK|E2F_FLAG_RESTART)
+
+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/e2fsprogs/e2fsck/e2fsck.conf.5.in b/e2fsprogs/e2fsck/e2fsck.conf.5.in
new file mode 100644
index 0000000..085a951
--- /dev/null
+++ b/e2fsprogs/e2fsck/e2fsck.conf.5.in
@@ -0,0 +1,432 @@
+.\" -*- 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 filesystems.
+.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 [problems]
+This stanza allows the administrator to reconfigure how e2fsck handles
+various filesystem inconsistencies.
+.TP
+.I [scratch_files]
+This stanza controls when e2fsck will attempt to use 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 filesystem 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.  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
+.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 filesystem 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 
+filesystem 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 log_dir
+If the
+.I log_filename
+relation 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 writeable.
+.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 writeable, 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 requiste filesytem 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 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 [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 filesystem
+inconsistency is detected to be overridden.
+.TP
+.I preen_ok
+This boolean relation overrides the default behavior controlling 
+whether this filesystem 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 filesystem 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 filesystem 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 filesystem 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).
+.SH THE [scratch_files] STANZA
+The following relations are defined in the 
+.I [scratch_files]
+stanza.
+.TP
+.I directory
+If the directory named by this relation exists and is writeable, then
+e2fsck will attempt to use this directory to store scratch files instead
+of using in-memory data structures.
+.TP
+.I numdirs_threshold
+If this relation is set, then in-memory data structures be used if the
+number of directories in the filesystem are fewer than amount specified.
+.TP
+.I dirinfo
+This relation controls whether or not the scratch file directory is used
+instead of an in-memory data structure for directory information.  It
+defaults to true.
+.TP
+.I icount
+This relation controls whether or not the scratch file directory is used
+instead of an in-memory data structure when tracking inode counts.  It
+defaults to 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 timzeone.
+.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 filesystem 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/e2fsprogs/e2fsck/e2fsck.h b/e2fsprogs/e2fsck/e2fsck.h
new file mode 100644
index 0000000..d64df2c
--- /dev/null
+++ b/e2fsprogs/e2fsck/e2fsck.h
@@ -0,0 +1,582 @@
+/*
+ * 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 "profile.h"
+#include "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 "quota/mkquota.h"
+
+/*
+ * 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 */
+	int			numblocks;	/* number of blocks */
+	int			hashversion;
+	short			depth;		/* depth of tree */
+	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;
+	blk64_t		phys;
+	int		flags;
+	blk64_t		parent;
+	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
+
+#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
+
+/*
+ * E2fsck flags
+ */
+#define E2F_FLAG_ABORT		0x0001 /* Abort signaled */
+#define E2F_FLAG_CANCEL		0x0002 /* Cancel signaled */
+#define E2F_FLAG_SIGNAL_MASK	0x0003
+#define E2F_FLAG_RESTART	0x0004 /* Restart signaled */
+#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_RESET_FLAGS (E2F_FLAG_TIME_INSANE)
+
+/*
+ * 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 5
+
+struct e2fsck_struct {
+	ext2_filsys fs;
+	const char *program_name;
+	char *filesystem_name;
+	char *device_name;
+	char *io_options;
+	FILE	*logf;
+	char	*log_fn;
+	int	flags;		/* E2fsck internal flags */
+	int	options;
+	int	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;
+	ino_t	free_inodes;
+	int	mount_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_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;
+
+	/*
+	 * 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
+	 */
+	int		dx_dir_info_count;
+	int		dx_dir_info_size;
+	struct dx_dir_info *dx_dir_info;
+
+	/*
+	 * Directories to hash
+	 */
+	ext2_u32_list	dirs_to_hash;
+
+	/*
+	 * 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 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 encrypted_dirs;
+
+	/*
+	 * For the use of callers of the e2fsck functions; not used by
+	 * e2fsck functions themselves.
+	 */
+	void *priv_data;
+};
+
+/* Used by the region allocation code */
+typedef __u32 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);
+
+/* crc32.c */
+extern __u32 crc32_be(__u32 crc, unsigned char const *p, size_t len);
+
+/* 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, 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 int e2fsck_get_num_dx_dirinfo(e2fsck_t ctx);
+extern struct dx_dir_info *e2fsck_dx_dir_info_iter(e2fsck_t ctx, int *control);
+
+/* ea_refcount.c */
+extern errcode_t ea_refcount_create(int size, ext2_refcount_t *ret);
+extern void ea_refcount_free(ext2_refcount_t refcount);
+extern errcode_t ea_refcount_fetch(ext2_refcount_t refcount, blk64_t blk, int *ret);
+extern errcode_t ea_refcount_increment(ext2_refcount_t refcount,
+				       blk64_t blk, int *ret);
+extern errcode_t ea_refcount_decrement(ext2_refcount_t refcount,
+				       blk64_t blk, int *ret);
+extern errcode_t ea_refcount_store(ext2_refcount_t refcount,
+				   blk64_t blk, int count);
+extern blk_t ext2fs_get_refcount_size(ext2_refcount_t refcount);
+extern void ea_refcount_intr_begin(ext2_refcount_t refcount);
+extern blk64_t ea_refcount_intr_next(ext2_refcount_t refcount, int *ret);
+
+/* ehandler.c */
+extern const char *ehandler_operation(const char *op);
+extern void ehandler_init(io_channel channel);
+
+/* 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);
+
+/* pass1.c */
+extern void e2fsck_setup_tdb_icount(e2fsck_t ctx, int flags,
+				    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);
+
+/* 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);
+
+
+/* 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 */
+errcode_t e2fsck_rehash_dir(e2fsck_t ctx, ext2_ino_t ino);
+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);
+
+/* util.c */
+extern void *e2fsck_allocate_memory(e2fsck_t ctx, unsigned int 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, int len);
+extern errcode_t e2fsck_zero_blocks(ext2_filsys fs, blk_t blk, int num,
+				    blk_t *ret_blk, int *ret_count);
+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 *msg);
+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);
+
+/* 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);
+#endif /* _E2FSCK_H */
diff --git a/e2fsprogs/e2fsck/ea_refcount.c b/e2fsprogs/e2fsck/ea_refcount.c
new file mode 100644
index 0000000..e4ccd6d
--- /dev/null
+++ b/e2fsprogs/e2fsck/ea_refcount.c
@@ -0,0 +1,460 @@
+/*
+ * ea_refcount.c
+ *
+ * Copyright (C) 2001 Theodore Ts'o.  This file may be
+ * redistributed under the terms of the GNU Public License.
+ */
+
+#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 {
+	blk64_t	ea_blk;
+	int	ea_count;
+};
+
+struct ea_refcount {
+	blk_t		count;
+	blk_t		size;
+	blk_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(int size, ext2_refcount_t *ret)
+{
+	ext2_refcount_t	refcount;
+	errcode_t	retval;
+	size_t		bytes;
+
+	retval = ext2fs_get_mem(sizeof(struct ea_refcount), &refcount);
+	if (retval)
+		return retval;
+	memset(refcount, 0, sizeof(struct ea_refcount));
+
+	if (!size)
+		size = 500;
+	refcount->size = size;
+	bytes = (size_t) (size * sizeof(struct ea_refcount_el));
+#ifdef DEBUG
+	printf("Refcount allocated %d entries, %d bytes.\n",
+	       refcount->size, bytes);
+#endif
+	retval = ext2fs_get_mem(bytes, &refcount->list);
+	if (retval)
+		goto errout;
+	memset(refcount->list, 0, bytes);
+
+	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_count) {
+			if (i != j)
+				list[j] = list[i];
+			j++;
+		}
+	}
+#if defined(DEBUG) || defined(TEST_PROGRAM)
+	printf("Refcount_collapse: size was %d, 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,
+						 blk64_t blk, int pos)
+{
+	struct ea_refcount_el 	*el;
+	errcode_t		retval;
+	blk_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_count = 0;
+	el->ea_blk = blk;
+	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,
+					      blk64_t blk, 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) ||
+		       (blk > refcount->list[high].ea_blk))) {
+		if (refcount->count >= refcount->size)
+			refcount_collapse(refcount);
+
+		return insert_refcount_el(refcount, blk,
+					  (unsigned) refcount->count);
+	}
+	if (refcount->count == 0)
+		return 0;
+
+	if (refcount->cursor >= refcount->count)
+		refcount->cursor = 0;
+	if (blk == refcount->list[refcount->cursor].ea_blk)
+		return &refcount->list[refcount->cursor++];
+#ifdef DEBUG
+	printf("Non-cursor get_refcount_el: %u\n", blk);
+#endif
+	while (low <= high) {
+		mid = (low+high)/2;
+		if (blk == refcount->list[mid].ea_blk) {
+			refcount->cursor = mid+1;
+			return &refcount->list[mid];
+		}
+		if (blk < refcount->list[mid].ea_blk)
+			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, blk, low);
+	}
+	return 0;
+}
+
+errcode_t ea_refcount_fetch(ext2_refcount_t refcount, blk64_t blk,
+				int *ret)
+{
+	struct ea_refcount_el	*el;
+
+	el = get_refcount_el(refcount, blk, 0);
+	if (!el) {
+		*ret = 0;
+		return 0;
+	}
+	*ret = el->ea_count;
+	return 0;
+}
+
+errcode_t ea_refcount_increment(ext2_refcount_t refcount, blk64_t blk, int *ret)
+{
+	struct ea_refcount_el	*el;
+
+	el = get_refcount_el(refcount, blk, 1);
+	if (!el)
+		return EXT2_ET_NO_MEMORY;
+	el->ea_count++;
+
+	if (ret)
+		*ret = el->ea_count;
+	return 0;
+}
+
+errcode_t ea_refcount_decrement(ext2_refcount_t refcount, blk64_t blk, int *ret)
+{
+	struct ea_refcount_el	*el;
+
+	el = get_refcount_el(refcount, blk, 0);
+	if (!el || el->ea_count == 0)
+		return EXT2_ET_INVALID_ARGUMENT;
+
+	el->ea_count--;
+
+	if (ret)
+		*ret = el->ea_count;
+	return 0;
+}
+
+errcode_t ea_refcount_store(ext2_refcount_t refcount, blk64_t blk, int count)
+{
+	struct ea_refcount_el	*el;
+
+	/*
+	 * Get the refcount element
+	 */
+	el = get_refcount_el(refcount, blk, count ? 1 : 0);
+	if (!el)
+		return count ? EXT2_ET_NO_MEMORY : 0;
+	el->ea_count = count;
+	return 0;
+}
+
+blk_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;
+}
+
+
+blk64_t ea_refcount_intr_next(ext2_refcount_t refcount,
+				int *ret)
+{
+	struct ea_refcount_el	*list;
+
+	while (1) {
+		if (refcount->cursor >= refcount->count)
+			return 0;
+		list = refcount->list;
+		if (list[refcount->cursor].ea_count) {
+			if (ret)
+				*ret = list[refcount->cursor].ea_count;
+			return list[refcount->cursor++].ea_blk;
+		}
+		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_blk >= refcount->list[i].ea_blk) {
+			fprintf(out,
+				"%s: list[%d].blk=%llu, list[%d].blk=%llu\n",
+				bad, i-1, refcount->list[i-1].ea_blk,
+				i, refcount->list[i].ea_blk);
+			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;
+	int		size, arg;
+	blk64_t		blk;
+	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 %d", size);
+				exit(1);
+			} else
+				printf("Creating refcount with size %d\n",
+				       size);
+			break;
+		case BCODE_FREE:
+			ea_refcount_free(refcount);
+			refcount = 0;
+			printf("Freeing refcount\n");
+			break;
+		case BCODE_STORE:
+			blk = (blk_t) bcode_program[i++];
+			arg = bcode_program[i++];
+			printf("Storing blk %llu with value %d\n", blk, arg);
+			retval = ea_refcount_store(refcount, blk, arg);
+			if (retval)
+				com_err("ea_refcount_store", retval,
+					"while storing blk %llu", blk);
+			break;
+		case BCODE_FETCH:
+			blk = (blk_t) bcode_program[i++];
+			retval = ea_refcount_fetch(refcount, blk, &arg);
+			if (retval)
+				com_err("ea_refcount_fetch", retval,
+					"while fetching blk %llu", blk);
+			else
+				printf("bcode_fetch(%llu) returns %d\n",
+				       blk, arg);
+			break;
+		case BCODE_INCR:
+			blk = (blk_t) bcode_program[i++];
+			retval = ea_refcount_increment(refcount, blk, &arg);
+			if (retval)
+				com_err("ea_refcount_increment", retval,
+					"while incrementing blk %llu", blk);
+			else
+				printf("bcode_increment(%llu) returns %d\n",
+				       blk, arg);
+			break;
+		case BCODE_DECR:
+			blk = (blk_t) bcode_program[i++];
+			retval = ea_refcount_decrement(refcount, blk, &arg);
+			if (retval)
+				com_err("ea_refcount_decrement", retval,
+					"while decrementing blk %llu", blk);
+			else
+				printf("bcode_decrement(%llu) returns %d\n",
+				       blk, 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) {
+				blk = ea_refcount_intr_next(refcount, &arg);
+				if (!blk)
+					break;
+				printf("\tblk=%llu, count=%d\n", blk, arg);
+			}
+			break;
+		case BCODE_COLLAPSE:
+			refcount_collapse(refcount);
+			break;
+		}
+
+	}
+}
+
+#endif
diff --git a/e2fsprogs/e2fsck/ehandler.c b/e2fsprogs/e2fsck/ehandler.c
new file mode 100644
index 0000000..6e2f23c
--- /dev/null
+++ b/e2fsprogs/e2fsck/ehandler.c
@@ -0,0 +1,127 @@
+/*
+ * 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 <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);
+	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/e2fsprogs/e2fsck/emptydir.c b/e2fsprogs/e2fsck/emptydir.c
new file mode 100644
index 0000000..cf9b521
--- /dev/null
+++ b/e2fsprogs/e2fsck/emptydir.c
@@ -0,0 +1,193 @@
+/*
+ * 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 "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 = malloc(sizeof(struct empty_dir_info_struct));
+	if (!edi)
+		return NULL;
+
+	memset(edi, 0, sizeof(struct empty_dir_info_struct));
+
+	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));
+	free(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;
+
+	edi->block_buf = malloc(ctx->fs->blocksize * 3);
+
+	if (edi->block_buf) {
+		(void) ext2fs_dblist_iterate2(edi->empty_dblist,
+					      fix_directory, &edi);
+	}
+	free(edi->block_buf);
+	free_empty_dirblock(edi);
+}
+
diff --git a/e2fsprogs/e2fsck/extend.c b/e2fsprogs/e2fsck/extend.c
new file mode 100644
index 0000000..2a849b2
--- /dev/null
+++ b/e2fsprogs/e2fsck/extend.c
@@ -0,0 +1,81 @@
+/*
+ * 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 <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;
+	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);
+	}
+
+	block = malloc(blocksize);
+	if (block == 0) {
+		fprintf(stderr, _("Couldn't allocate block buffer (size=%d)\n"),
+			blocksize);
+		exit(1);
+	}
+	memset(block, 0, blocksize);
+
+	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);
+	}
+	exit(0);
+}
diff --git a/e2fsprogs/e2fsck/flushb.c b/e2fsprogs/e2fsck/flushb.c
new file mode 100644
index 0000000..95ca6f8
--- /dev/null
+++ b/e2fsprogs/e2fsck/flushb.c
@@ -0,0 +1,66 @@
+/*
+ * 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 <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/e2fsprogs/e2fsck/gen_crc32table.c b/e2fsprogs/e2fsck/gen_crc32table.c
new file mode 100644
index 0000000..2c1aa8e
--- /dev/null
+++ b/e2fsprogs/e2fsck/gen_crc32table.c
@@ -0,0 +1,101 @@
+/*
+ * gen_crc32table.c --- Generate CRC32 tables.
+ *
+ * Copyright (C) 2008 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include <stdio.h>
+#include "crc32defs.h"
+#include <inttypes.h>
+
+#define ENTRIES_PER_LINE 4
+
+#define LE_TABLE_SIZE (1 << CRC_LE_BITS)
+#define BE_TABLE_SIZE (1 << CRC_BE_BITS)
+
+static uint32_t crc32table_le[LE_TABLE_SIZE];
+static uint32_t crc32table_be[BE_TABLE_SIZE];
+
+/**
+ * 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 crc32init_le(void)
+{
+	unsigned i, j;
+	uint32_t crc = 1;
+
+	crc32table_le[0] = 0;
+
+	for (i = 1 << (CRC_LE_BITS - 1); i; i >>= 1) {
+		crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0);
+		for (j = 0; j < LE_TABLE_SIZE; j += 2 * i)
+			crc32table_le[i + j] = crc ^ crc32table_le[j];
+	}
+}
+
+/**
+ * crc32init_be() - allocate and initialize BE table data
+ */
+static void crc32init_be(void)
+{
+	unsigned i, j;
+	uint32_t crc = 0x80000000;
+
+	crc32table_be[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[i + j] = crc ^ crc32table_be[j];
+	}
+}
+
+static void output_table(uint32_t table[], int len, const char *trans)
+{
+	int i;
+
+	for (i = 0; i < len - 1; i++) {
+		if (i % ENTRIES_PER_LINE == 0)
+			printf("\n");
+		printf("%s(0x%8.8xL), ", trans, table[i]);
+	}
+	printf("%s(0x%8.8xL)\n", trans, table[len - 1]);
+}
+
+#ifdef __GNUC__
+#define ATTR(x) __attribute__(x)
+#else
+#define ATTR(x)
+#endif
+
+int main(int argc ATTR((unused)), char** argv ATTR((unused)))
+{
+	printf("/* this file is generated - do not edit */\n\n");
+
+	printf("#ifdef UNITTEST\n");
+	if (CRC_LE_BITS > 1) {
+		crc32init_le();
+		printf("static const __u32 crc32table_le[] = {");
+		output_table(crc32table_le, LE_TABLE_SIZE, "tole");
+		printf("};\n");
+	}
+	printf("#endif /* UNITTEST */\n");
+
+	if (CRC_BE_BITS > 1) {
+		crc32init_be();
+		printf("static const __u32 crc32table_be[] = {");
+		output_table(crc32table_be, BE_TABLE_SIZE, "tobe");
+		printf("};\n");
+	}
+
+	return 0;
+}
diff --git a/e2fsprogs/e2fsck/iscan.c b/e2fsprogs/e2fsck/iscan.c
new file mode 100644
index 0000000..3d33c1f
--- /dev/null
+++ b/e2fsprogs/e2fsck/iscan.c
@@ -0,0 +1,138 @@
+/*
+ * Test to see how quickly we can scan the inode table (not doing
+ * anything else)
+ */
+
+#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 "et/com_err.h"
+#include "e2fsck.h"
+#include "../version.h"
+
+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;
+
+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(FSCK_ERROR);
+		}
+		if ((retval = ext2fs_sync_device(fd, 1))) {
+			com_err("ext2fs_sync_device", retval,
+				_("while trying to flush %s"), device_name);
+			exit(FSCK_ERROR);
+		}
+		close(fd);
+	}
+}
+
+int main (int argc, char *argv[])
+{
+	errcode_t	retval = 0;
+	int		exit_value = FSCK_OK;
+	ext2_filsys	fs;
+	ext2_ino_t	ino;
+	__u32	num_inodes = 0;
+	struct ext2_inode inode;
+	ext2_inode_scan	scan;
+
+	init_resource_track(&global_rtrack);
+
+	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);
+	}
+
+	ehandler_init(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);
+	printf(_("%u inodes scanned.\n"), num_inodes);
+
+	exit(0);
+}
diff --git a/e2fsprogs/e2fsck/jfs_user.h b/e2fsprogs/e2fsck/jfs_user.h
new file mode 100644
index 0000000..bb2c630
--- /dev/null
+++ b/e2fsprogs/e2fsck/jfs_user.h
@@ -0,0 +1,151 @@
+/*
+ * 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.
+ */
+
+/*
+ * Pull in the definition of the e2fsck context structure
+ */
+#include "e2fsck.h"
+
+struct buffer_head {
+	e2fsck_t	b_ctx;
+	io_channel 	b_io;
+	int	 	b_size;
+	unsigned long long b_blocknr;
+	int	 	b_dirty;
+	int	 	b_uptodate;
+	int	 	b_err;
+	char		b_data[1024];
+};
+
+struct inode {
+	e2fsck_t	i_ctx;
+	ext2_ino_t	i_ino;
+	struct ext2_inode i_ext2;
+};
+
+struct kdev_s {
+	e2fsck_t	k_ctx;
+	int		k_dev;
+};
+
+#define K_DEV_FS	1
+#define K_DEV_JOURNAL	2
+
+typedef struct kdev_s *kdev_t;
+
+#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)
+
+extern e2fsck_t e2fsck_global_ctx;  /* Try your very best not to use this! */
+
+typedef struct {
+	int	object_length;
+} lkmem_cache_t;
+
+#define kmem_cache_alloc(cache,flags) malloc((cache)->object_length)
+#define kmem_cache_free(cache,obj) free(obj)
+#define kmem_cache_create(name,len,a,b,c,d) do_cache_create(len)
+#define kmem_cache_destroy(cache) do_cache_destroy(cache)
+#define kmalloc(len,flags) malloc(len)
+#define kfree(p) free(p)
+
+#define cond_resched()	do { } while (0)
+
+#ifndef __BIONIC__
+typedef unsigned int __be32;
+typedef __u64 __be64;
+#endif
+
+#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 lkmem_cache_t * do_cache_create(int len);
+extern void do_cache_destroy(lkmem_cache_t *cache);
+extern size_t journal_tag_bytes(journal_t *journal);
+#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_ lkmem_cache_t * do_cache_create(int len)
+{
+	lkmem_cache_t *new_cache;
+	new_cache = malloc(sizeof(*new_cache));
+	if (new_cache)
+		new_cache->object_length = len;
+	return new_cache;
+}
+
+_INLINE_ void do_cache_destroy(lkmem_cache_t *cache)
+{
+	free(cache);
+}
+
+/*
+ * helper functions to deal with 32 or 64bit block numbers.
+ */
+_INLINE_ size_t journal_tag_bytes(journal_t *journal)
+{
+	if (JFS_HAS_INCOMPAT_FEATURE(journal, JFS_FEATURE_INCOMPAT_64BIT))
+		return JBD_TAG_SIZE64;
+	else
+		return JBD_TAG_SIZE32;
+}
+
+#undef _INLINE_
+#endif
+
+/*
+ * Kernel compatibility functions are defined in journal.c
+ */
+int journal_bmap(journal_t *journal, blk64_t block, unsigned long long *phys);
+struct buffer_head *getblk(kdev_t ctx, blk64_t blocknr, int blocksize);
+void sync_blockdev(kdev_t kdev);
+void ll_rw_block(int rw, int dummy, 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)
diff --git a/e2fsprogs/e2fsck/journal.c b/e2fsprogs/e2fsck/journal.c
new file mode 100644
index 0000000..c806ae2
--- /dev/null
+++ b/e2fsprogs/e2fsck/journal.c
@@ -0,0 +1,1095 @@
+/*
+ * 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.
+ */
+
+#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"
+
+#ifdef CONFIG_JBD_DEBUG		/* Enabled by configure --enable-jfs-debug */
+static int bh_count = 0;
+#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
+
+/* 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 journal_bmap(journal_t *journal, blk64_t 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, block, 0, &pblk);
+	*phys = pblk;
+	return (int) retval;
+#endif
+}
+
+struct buffer_head *getblk(kdev_t kdev, blk64_t 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;
+
+#ifdef CONFIG_JBD_DEBUG
+	if (journal_enable_debug >= 3)
+		bh_count++;
+#endif
+	jfs_debug(4, "getblk for block %llu (%d bytes)(total %d)\n",
+		  (unsigned long long) 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;
+}
+
+void 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;
+
+	io_channel_flush(io);
+}
+
+void ll_rw_block(int rw, int nr, struct buffer_head *bhp[])
+{
+	errcode_t retval;
+	struct buffer_head *bh;
+
+	for (; nr > 0; --nr) {
+		bh = *bhp++;
+		if (rw == 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 == 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 == 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(WRITE, 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(READ, 1, &bh);
+}
+
+
+static void e2fsck_clear_recover(e2fsck_t ctx, int error)
+{
+	ctx->fs->super->s_feature_incompat &= ~EXT3_FEATURE_INCOMPAT_RECOVER;
+
+	/* 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 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			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)) {
+		if (!sb->s_journal_inum) {
+			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)) {
+			retval = EXT2_ET_NO_JOURNAL;
+			goto try_backup_journal;
+		}
+		if (EXT2_I_SIZE(&j_inode->i_ext2) / journal->j_blocksize <
+		    JFS_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_maxlen = 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 ((retval = (errcode_t) journal_bmap(journal, 0, &start)) != 0)
+			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;
+
+		if (ctx->fs->blocksize == 1024)
+			start = 1;
+		bh = getblk(dev_journal, start, ctx->fs->blocksize);
+		if (!bh) {
+			retval = EXT2_ET_NO_MEMORY;
+			goto errout;
+		}
+		ll_rw_block(READ, 1, &bh);
+		if ((retval = bh->b_err) != 0) {
+			brelse(bh);
+			goto errout;
+		}
+		memcpy(&jsuper, start ? bh->b_data :  bh->b_data + 1024,
+		       sizeof(jsuper));
+		brelse(bh);
+#ifdef WORDS_BIGENDIAN
+		if (jsuper.s_magic == ext2fs_swab16(EXT2_SUPER_MAGIC))
+			ext2fs_swap_super(&jsuper);
+#endif
+		if (jsuper.s_magic != EXT2_SUPER_MAGIC ||
+		    !(jsuper.s_feature_incompat & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)) {
+			fix_problem(ctx, PR_0_EXT_JOURNAL_BAD_SUPER, &pctx);
+			retval = EXT2_ET_LOAD_EXT_JOURNAL;
+			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;
+			goto errout;
+		}
+
+		maxlen = ext2fs_blocks_count(&jsuper);
+		journal->j_maxlen = (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;
+
+#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 = ctx->fs->super->s_feature_incompat &
+		EXT3_FEATURE_INCOMPAT_RECOVER;
+	int has_journal = ctx->fs->super->s_feature_compat &
+		EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+
+	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("*** ext3 journal has been deleted - "
+				       "filesystem is now ext2 only ***\n\n");
+			sb->s_feature_compat &= ~EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+			sb->s_journal_inum = 0;
+			ctx->flags |= E2F_FLAG_JOURNAL_INODE;
+			ctx->fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+			e2fsck_clear_recover(ctx, 1);
+			return 0;
+		}
+		return EXT2_ET_BAD_INODE_NUM;
+	} 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;
+
+	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(READ, 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 JFS_MAGIC, we probably have a wrong inode */
+	if (jsb->s_header.h_magic != htonl(JFS_MAGIC_NUMBER))
+		return e2fsck_journal_fix_bad_inode(ctx, &pctx);
+
+	switch (ntohl(jsb->s_header.h_blocktype)) {
+	case JFS_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 JFS_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 JFS_DESCRIPTOR_BLOCK:
+	case JFS_COMMIT_BLOCK:
+	case JFS_REVOKE_BLOCK:
+		return EXT2_ET_CORRUPT_SUPERBLOCK;
+
+	/* 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 (JFS_HAS_INCOMPAT_FEATURE(journal, ~JFS_KNOWN_INCOMPAT_FEATURES))
+		return EXT2_ET_UNSUPP_FEATURE;
+
+	if (JFS_HAS_RO_COMPAT_FEATURE(journal, ~JFS_KNOWN_ROCOMPAT_FEATURES))
+		return EXT2_ET_RO_UNSUPP_FEATURE;
+
+	/* 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_SUPERBLOCK,
+			_("%s: no valid journal superblock found\n"),
+			ctx->device_name);
+		return EXT2_ET_CORRUPT_SUPERBLOCK;
+	}
+
+	if (ntohl(jsb->s_maxlen) < journal->j_maxlen)
+		journal->j_maxlen = ntohl(jsb->s_maxlen);
+	else if (ntohl(jsb->s_maxlen) > journal->j_maxlen) {
+		com_err(ctx->program_name, EXT2_ET_CORRUPT_SUPERBLOCK,
+			_("%s: journal too short\n"),
+			ctx->device_name);
+		return EXT2_ET_CORRUPT_SUPERBLOCK;
+	}
+
+	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 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(JFS_MAGIC_NUMBER) ||
+	    jsb->s_header.h_blocktype != htonl(JFS_SUPERBLOCK_V1)) {
+		jsb->s_header.h_magic = htonl(JFS_MAGIC_NUMBER);
+		jsb->s_header.h_blocktype = htonl(JFS_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_maxlen);
+	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);
+
+	mark_buffer_dirty(journal->j_sb_buffer);
+	ll_rw_block(WRITE, 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 = ctx->fs->super->s_feature_incompat &
+		EXT3_FEATURE_INCOMPAT_RECOVER;
+
+	if (sb->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) {
+		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_SUPERBLOCK;
+	} else if (e2fsck_journal_fix_bad_inode(ctx, pctx))
+		return EXT2_ET_CORRUPT_SUPERBLOCK;
+
+	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_transaction_sequence);
+		if (reset)
+			jsb->s_start = 0; /* this marks the journal as empty */
+		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 = ctx->fs->super->s_feature_incompat &
+		EXT3_FEATURE_INCOMPAT_RECOVER;
+	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 (!(sb->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
+	    !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_SUPERBLOCK) ||
+		    ((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 (!(sb->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL)) {
+		recover = sb->s_feature_incompat & EXT3_FEATURE_INCOMPAT_RECOVER;
+		pctx.str = "inode";
+		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)) {
+			sb->s_feature_compat |= EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+			ctx->fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+			ext2fs_mark_super_dirty(ctx->fs);
+		}
+	}
+
+	if (sb->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL &&
+	    !(sb->s_feature_incompat & EXT3_FEATURE_INCOMPAT_RECOVER) &&
+	    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;
+			sb->s_feature_incompat |=
+				EXT3_FEATURE_INCOMPAT_RECOVER;
+			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 (!(sb->s_feature_incompat & EXT3_FEATURE_INCOMPAT_RECOVER) &&
+	    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;
+		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);
+
+	journal_init_revoke_caches();
+	retval = e2fsck_get_journal(ctx, &journal);
+	if (retval)
+		return retval;
+
+	retval = e2fsck_journal_load(journal);
+	if (retval)
+		goto errout;
+
+	retval = journal_init_revoke(journal, 1024);
+	if (retval)
+		goto errout;
+
+	retval = -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);
+	}
+
+errout:
+	journal_destroy_revoke(journal);
+	journal_destroy_revoke_caches();
+	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, EXT2_FLAG_RW,
+			     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) ||
+	    !(sb->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL))
+		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 (!(sb->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) ||
+	    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/e2fsprogs/e2fsck/logfile.c b/e2fsprogs/e2fsck/logfile.c
new file mode 100644
index 0000000..40e5acb
--- /dev/null
+++ b/e2fsprogs/e2fsck/logfile.c
@@ -0,0 +1,395 @@
+/*
+ * 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%
+ */
+
+#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>
+
+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 = len;
+	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;
+	}
+	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 (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
+void set_up_logging(e2fsck_t ctx)
+{
+	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 (ctx->log_fn)
+		log_fn = string_copy(ctx, ctx->log_fn, 0);
+	else
+		profile_get_string(ctx->profile, "options", "log_filename",
+				   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)
+		ctx->logf = fopen(s0, "w");
+	if (!ctx->logf && s1.s)
+		ctx->logf = fopen(s1.s, "w");
+	if (!ctx->logf && s2.s)
+		ctx->logf = fopen(s2.s, "w");
+	if (!ctx->logf && log_dir_wait)
+		ctx->logf = save_output(s0, s1.s, s2.s);
+
+out:
+	free(s.s);
+	free(s1.s);
+	free(s2.s);
+	free(log_fn);
+	free(log_dir);
+	return;
+}
+#else
+void *e2fsck_allocate_memory(e2fsck_t ctx, unsigned int 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/e2fsprogs/e2fsck/message.c b/e2fsprogs/e2fsck/message.c
new file mode 100644
index 0000000..5b20a16
--- /dev/null
+++ b/e2fsprogs/e2fsck/message.c
@@ -0,0 +1,562 @@
+/*
+ * 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_dir_acl
+ * 	%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
+ * 	%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 <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+#include <termios.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_("iinode"),
+	N_("Iillegal"),
+	N_("jjournal"),
+	N_("Ddeleted"),
+	N_("ddirectory"),
+	N_("eentry"),
+	N_("E@e '%Dn' in %p (%i)"),
+	N_("ffilesystem"),
+	N_("Ffor @i %i (%Q) is"),
+	N_("ggroup"),
+	N_("hHTREE @d @i"),
+	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 environemnt variable */
+		if (do_gmt == -1) {
+			time_str = getenv("TZ");
+			if (!time_str)
+				time_str = "";
+			do_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':
+		if (LINUX_S_ISDIR(inode->i_mode))
+			fprintf(f, "%u", inode->i_size);
+		else {
+#ifdef EXT2_NO_64_TYPE
+			if (inode->i_size_high)
+				fprintf(f, "0x%x%08x", inode->i_size_high,
+					inode->i_size);
+			else
+				fprintf(f, "%u", inode->i_size);
+#else
+			fprintf(f, "%llu", EXT2_I_SIZE(inode));
+#endif
+		}
+		break;
+	case 'S':
+		fprintf(f, "%u", large_inode->i_extra_isize);
+		break;
+	case 'b':
+		if (fs->super->s_feature_ro_compat &
+		    EXT4_FEATURE_RO_COMPAT_HUGE_FILE) 
+			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", ext2fs_file_acl_block(fs, inode));
+		break;
+	case 'd':
+		fprintf(f, "%u", (LINUX_S_ISDIR(inode->i_mode) ?
+				  inode->i_dir_acl : 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 = dirent->name_len & 0xFF;
+		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", dirent->name_len & 0xFF);
+		break;
+	case 't':
+		fprintf(f, "%u", dirent->name_len >> 8);
+		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':
+#ifdef EXT2_NO_64_TYPE
+		fprintf(f, "%*u", width, (unsigned long) ctx->blk);
+#else
+		fprintf(f, "%*llu", width, (unsigned long long) ctx->blk);
+#endif
+		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) {
+#ifdef EXT2_NO_64_TYPE
+			fprintf(f, "%d", ctx->blkcount);
+#else
+			fprintf(f, "%lld", (long long) ctx->blkcount);
+#endif
+		}
+		break;
+	case 'c':
+#ifdef EXT2_NO_64_TYPE
+		fprintf(f, "%*u", width, (unsigned long) ctx->blk2);
+#else
+		fprintf(f, "%*llu", width, (unsigned long long) ctx->blk2);
+#endif
+		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':
+#ifdef EXT2_NO_64_TYPE
+		fprintf(f, "%*u", width, ctx->num);
+#else
+		fprintf(f, "%*llu", width, (long long)ctx->num);
+#endif
+		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':
+#ifdef EXT2_NO_64_TYPE
+		fprintf(f, "%*d", width, ctx->blkcount);
+#else
+		fprintf(f, "%*lld", width, (long long) ctx->blkcount);
+#endif
+		break;
+	case 'S':
+		fprintf(f, "%llu", 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 'x':
+		fprintf(f, "0x%0*x", width, ctx->csum1);
+		break;
+	case 'X':
+#ifdef EXT2_NO_64_TYPE
+		fprintf(f, "0x%0*x", width, ctx->num);
+#else
+		fprintf(f, "0x%0*llx", width, (long long)ctx->num);
+#endif
+		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/e2fsprogs/e2fsck/mtrace.awk b/e2fsprogs/e2fsck/mtrace.awk
new file mode 100644
index 0000000..7e96b8a
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/e2fsck/mtrace.c b/e2fsprogs/e2fsck/mtrace.c
new file mode 100644
index 0000000..f34f19a
--- /dev/null
+++ b/e2fsprogs/e2fsck/mtrace.c
@@ -0,0 +1,158 @@
+/* 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.  */
+
+#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/e2fsprogs/e2fsck/mtrace.h b/e2fsprogs/e2fsck/mtrace.h
new file mode 100644
index 0000000..2ed20eb
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/e2fsck/pass1.c b/e2fsprogs/e2fsck/pass1.c
new file mode 100644
index 0000000..ef04b6f
--- /dev/null
+++ b/e2fsprogs/e2fsck/pass1.c
@@ -0,0 +1,2917 @@
+/*
+ * 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 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)
+ *
+ * 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.  (Althogh 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 <string.h>
+#include <time.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "e2fsck.h"
+#include <ext2fs/ext2_ext_attr.h>
+
+#include "problem.h"
+
+#ifdef NO_INLINE_FUNCS
+#define _INLINE_
+#else
+#define _INLINE_ inline
+#endif
+
+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);
+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, ino_t ino);
+static void add_encrypted_dir(e2fsck_t ctx, 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;
+	blk64_t		num_blocks;
+	blk64_t		max_blocks;
+	e2_blkcnt_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;
+};
+
+struct process_inode_block {
+	ext2_ino_t ino;
+	struct ext2_inode 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];
+
+/*
+ * Free all memory allocated by pass1 in preparation for restarting
+ * things.
+ */
+static void unwind_pass1(ext2_filsys fs EXT2FS_ATTR((unused)))
+{
+	ext2fs_free_mem(&inodes_to_process);
+	inodes_to_process = 0;
+}
+
+/*
+ * 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 flag is set, then this is a bogus
+	 * device/fifo/socket
+	 */
+	if (inode->i_flags & EXT2_INDEX_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 len;
+	int i;
+	blk64_t	blocks;
+	ext2_extent_handle_t	handle;
+	struct ext2_extent_info	info;
+	struct ext2fs_extent	extent;
+
+	if ((inode->i_size_high || inode->i_size == 0) ||
+	    (inode->i_flags & EXT2_INDEX_FL))
+		return 0;
+
+	if (inode->i_flags & EXT4_EXTENTS_FL) {
+		if (inode->i_size > fs->blocksize)
+			return 0;
+		if (ext2fs_extent_open2(fs, ino, inode, &handle))
+			return 0;
+		i = 0;
+		if (ext2fs_extent_get_info(handle, &info) ||
+		    (info.num_entries != 1) ||
+		    (info.max_depth != 0))
+			goto exit_extent;
+		if (ext2fs_extent_get(handle, EXT2_EXTENT_ROOT, &extent) ||
+		    (extent.e_lblk != 0) ||
+		    (extent.e_len != 1) ||
+		    (extent.e_pblk < fs->super->s_first_data_block) ||
+		    (extent.e_pblk >= ext2fs_blocks_count(fs->super)))
+			goto exit_extent;
+		i = 1;
+	exit_extent:
+		ext2fs_extent_free(handle);
+		return i;
+	}
+
+	blocks = ext2fs_inode_data_blocks2(fs, inode);
+	if (blocks) {
+		if ((inode->i_size >= fs->blocksize) ||
+		    (blocks != fs->blocksize >> 9) ||
+		    (inode->i_block[0] < fs->super->s_first_data_block) ||
+		    (inode->i_block[0] >= ext2fs_blocks_count(fs->super)))
+			return 0;
+
+		for (i = 1; i < EXT2_N_BLOCKS; i++)
+			if (inode->i_block[i])
+				return 0;
+
+		if (io_channel_read_blk64(fs->io, inode->i_block[0], 1, buf))
+			return 0;
+
+		if (inode->i_flags & EXT4_ENCRYPT_FL) {
+			len = ext2fs_le32_to_cpu(*((__u32 *)buf)) + 4;
+		} else {
+			len = strnlen(buf, fs->blocksize);
+		}
+		if (len == fs->blocksize)
+			return 0;
+	} else {
+		if (inode->i_size >= sizeof(inode->i_block))
+			return 0;
+
+		len = strnlen((char *)inode->i_block, sizeof(inode->i_block));
+		if (len == sizeof(inode->i_block))
+			return 0;
+	}
+	if (len != inode->i_size)
+		if ((inode->i_flags & EXT4_ENCRYPT_FL) == 0)
+			return 0;
+	return 1;
+}
+
+/*
+ * 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;
+
+	inode->i_size = 0;
+	inode->i_size_high = 0;
+	e2fsck_write_inode(ctx, pctx->ino, pctx->inode, "pass1");
+}
+
+static void check_ea_in_inode(e2fsck_t ctx, struct problem_context *pctx)
+{
+	struct ext2_super_block *sb = ctx->fs->super;
+	struct ext2_inode_large *inode;
+	struct ext2_ext_attr_entry *entry;
+	char *start;
+	unsigned int storage_size, remain;
+	problem_t problem = 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;
+	start = ((char *) inode) + EXT2_GOOD_OLD_INODE_SIZE +
+		inode->i_extra_isize + 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);
+
+	while (!EXT2_EXT_IS_LAST_ENTRY(entry)) {
+		__u32 hash;
+
+		/* 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);
+
+		/* check value size */
+		if (entry->e_value_size > remain) {
+			pctx->num = entry->e_value_size;
+			problem = PR_1_ATTR_VALUE_SIZE;
+			goto fix;
+		}
+
+		/* e_value_block must be 0 in inode's ea */
+		if (entry->e_value_block != 0) {
+			pctx->num = entry->e_value_block;
+			problem = PR_1_ATTR_VALUE_BLOCK;
+			goto fix;
+		}
+
+		hash = ext2fs_ext_attr_hash_entry(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;
+		}
+
+		remain -= entry->e_value_size;
+
+		entry = EXT2_EXT_ATTR_NEXT(entry);
+	}
+fix:
+	/*
+	 * 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))
+		return;
+
+	/* simply remove all possible EA(s) */
+	*((__u32 *)start) = 0UL;
+	e2fsck_write_inode_full(ctx, pctx->ino, pctx->inode,
+				EXT2_INODE_SIZE(sb), "pass1");
+}
+
+static void check_inode_extra_space(e2fsck_t ctx, struct problem_context *pctx)
+{
+	struct ext2_super_block *sb = ctx->fs->super;
+	struct ext2_inode_large *inode;
+	__u32 *eamagic;
+	int min, max;
+
+	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)) {
+		if (!fix_problem(ctx, PR_1_EXTRA_ISIZE, pctx))
+			return;
+		inode->i_extra_isize = min;
+		e2fsck_write_inode_full(ctx, pctx->ino, pctx->inode,
+					EXT2_INODE_SIZE(sb), "pass1");
+		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);
+	}
+}
+
+/*
+ * 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;
+
+	/*
+	 * 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.
+	 */
+
+	extent_fs = (ctx->fs->super->s_feature_incompat &
+		     EXT3_FEATURE_INCOMPAT_EXTENTS);
+	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_block3(ctx->fs, blk, buf, 0);
+	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 (((dirent->name_len & 0xFF) != 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 (((dirent->name_len & 0xFF) != 2) ||
+	    (dirent->name[0] != '.') ||
+	    (dirent->name[1] != '.') ||
+	    (rec_len < 12) ||
+	    (rec_len % 4))
+		return;
+
+	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");
+	}
+}
+
+void e2fsck_setup_tdb_icount(e2fsck_t ctx, int flags,
+			     ext2_icount_t *ret)
+{
+	unsigned int		threshold;
+	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))
+		return;
+
+	retval = ext2fs_create_icount_tdb(ctx->fs, tdb_dir, flags, ret);
+	if (retval)
+		*ret = 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;
+	ext2_inode_scan	scan;
+	char		*block_buf;
+#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;
+	unsigned int	save_type;
+	int		imagic_fs, extent_fs;
+	int		busted_fs_time = 0;
+	int		inode_size;
+
+	init_resource_track(&rtrack, ctx->fs->io);
+	clear_problem_context(&pctx);
+
+	if (!(ctx->options & E2F_OPT_PREEN))
+		fix_problem(ctx, PR_1_PASS_HEADER, &pctx);
+
+	if ((fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX) &&
+	    !(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 = (sb->s_feature_compat & EXT2_FEATURE_COMPAT_IMAGIC_INODES);
+	extent_fs = (sb->s_feature_incompat & EXT3_FEATURE_INCOMPAT_EXTENTS);
+
+	/*
+	 * 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;
+	}
+	e2fsck_setup_tdb_icount(ctx, 0, &ctx->inode_link_info);
+	if (!ctx->inode_link_info) {
+		e2fsck_set_bitmap_type(fs, EXT2FS_BMAP64_RBTREE,
+				       "inode_link_info", &save_type);
+		pctx.errcode = ext2fs_create_icount2(fs, 0, 0, 0,
+						     &ctx->inode_link_info);
+		fs->default_bitmap_type = save_type;
+	}
+
+	if (pctx.errcode) {
+		fix_problem(ctx, PR_1_ALLOCATE_ICOUNT, &pctx);
+		ctx->flags |= E2F_FLAG_ABORT;
+		return;
+	}
+	inode_size = EXT2_INODE_SIZE(fs->super);
+	inode = (struct ext2_inode *)
+		e2fsck_allocate_memory(ctx, inode_size, "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;
+		ext2fs_free_mem(&inode);
+		return;
+	}
+
+	/*
+	 * 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;
+		ext2fs_free_mem(&inode);
+		return;
+	}
+	block_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 3,
+						    "block interate buffer");
+	e2fsck_use_inode_shortcuts(ctx, 1);
+	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;
+		ext2fs_free_mem(&block_buf);
+		ext2fs_free_mem(&inode);
+		return;
+	}
+	ext2fs_inode_scan_flags(scan, EXT2_SF_SKIP_MISSING_ITABLE, 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)
+		if ((ctx->progress)(ctx, 1, 0, ctx->fs->group_desc_count))
+			return;
+	if ((fs->super->s_wtime < fs->super->s_inodes_count) ||
+	    (fs->super->s_mtime < fs->super->s_inodes_count))
+		busted_fs_time = 1;
+
+	if ((fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_MMP) &&
+	    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);
+
+	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(_("getting next inode from scan"));
+		pctx.errcode = ext2fs_get_next_inode_full(scan, &ino,
+							  inode, inode_size);
+		ehandler_operation(old_op);
+		if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+			return;
+		if (pctx.errcode == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE) {
+			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) {
+			fix_problem(ctx, PR_1_ISCAN_ERROR, &pctx);
+			ctx->flags |= E2F_FLAG_ABORT;
+			return;
+		}
+		if (!ino)
+			break;
+		pctx.ino = ino;
+		pctx.inode = inode;
+		ctx->stashed_ino = ino;
+		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;
+				return;
+			}
+		}
+
+		/*
+		 * 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)) {
+				sb->s_feature_incompat |= EXT3_FEATURE_INCOMPAT_EXTENTS;
+				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);
+				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");
+			}
+		}
+
+		if (ino == EXT2_BAD_INO) {
+			struct process_block_struct pb;
+
+			if ((inode->i_mode || inode->i_uid || inode->i_gid ||
+			     inode->i_links_count || 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");
+			}
+
+			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;
+				return;
+			}
+			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;
+				return;
+			}
+			if (pb.bbcheck)
+				if (!fix_problem(ctx, PR_1_BBINODE_BAD_METABLOCK_PROMPT, &pctx)) {
+				ctx->flags |= E2F_FLAG_ABORT;
+				return;
+			}
+			ext2fs_mark_inode_bitmap2(ctx->inode_used_map, ino);
+			clear_problem_context(&pctx);
+			continue;
+		} else if (ino == EXT2_ROOT_INO) {
+			/*
+			 * Make sure the root inode is a directory; if
+			 * not, offer to clear it.  It will be
+			 * regnerated 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");
+				}
+			}
+		} 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");
+				}
+				check_blocks(ctx, &pctx, block_buf);
+				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");
+			}
+		} else if ((ino == EXT4_USR_QUOTA_INO) ||
+			   (ino == EXT4_GRP_QUOTA_INO)) {
+			ext2fs_mark_inode_bitmap2(ctx->inode_used_map, ino);
+			if ((fs->super->s_feature_ro_compat &
+					EXT4_FEATURE_RO_COMPAT_QUOTA) &&
+			    ((fs->super->s_usr_quota_inum == ino) ||
+			     (fs->super->s_grp_quota_inum == 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");
+				}
+				check_blocks(ctx, &pctx, block_buf);
+				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");
+			}
+		} 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");
+				}
+			}
+			check_blocks(ctx, &pctx, block_buf);
+			continue;
+		}
+
+		/*
+		 * 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 && !busted_fs_time &&
+		    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");
+			}
+		}
+
+		/*
+		 * This code assumes that deleted inodes have
+		 * i_links_count set to 0.
+		 */
+		if (!inode->i_links_count) {
+			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");
+				}
+			}
+			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");
+			}
+		}
+
+		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 ||
+		    (LINUX_S_ISDIR(inode->i_mode) && inode->i_dir_acl))
+			mark_inode_bad(ctx, ino);
+		if (!(fs->super->s_feature_incompat & 
+		      EXT4_FEATURE_INCOMPAT_64BIT) &&
+		    inode->osd2.linux2.l_i_file_acl_high != 0)
+			mark_inode_bad(ctx, ino);
+		if ((fs->super->s_creator_os == EXT2_OS_LINUX) &&
+		    !(fs->super->s_feature_ro_compat &
+		      EXT4_FEATURE_RO_COMPAT_HUGE_FILE) &&
+		    (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");
+				}
+			}
+		}
+
+		check_inode_extra_space(ctx, &pctx);
+		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");
+		}
+
+		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_ENCRYPT_FL)
+				add_encrypted_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_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_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 (ext2fs_inode_data_blocks(fs, inode) == 0) {
+				ctx->fs_fast_symlinks_count++;
+				check_blocks(ctx, &pctx, block_buf);
+				continue;
+			}
+		}
+		else if (LINUX_S_ISFIFO (inode->i_mode) &&
+			 e2fsck_pass1_check_device_inode(fs, inode)) {
+			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_immutable(ctx, &pctx);
+			check_size(ctx, &pctx);
+			ctx->fs_sockets_count++;
+		} else
+			mark_inode_bad(ctx, ino);
+		if (!(inode->i_flags & EXT4_EXTENTS_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_block[EXT2_IND_BLOCK] ||
+		     inode->i_block[EXT2_DIND_BLOCK] ||
+		     inode->i_block[EXT2_TIND_BLOCK] ||
+		     ext2fs_file_acl_block(fs, inode))) {
+			inodes_to_process[process_inode_count].ino = ino;
+			inodes_to_process[process_inode_count].inode = *inode;
+			process_inode_count++;
+		} else
+			check_blocks(ctx, &pctx, block_buf);
+
+		if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+			return;
+
+		if (process_inode_count >= ctx->process_inode_size) {
+			process_inodes(ctx, block_buf);
+
+			if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+				return;
+		}
+	}
+	process_inodes(ctx, block_buf);
+	ext2fs_close_inode_scan(scan);
+
+	/*
+	 * 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->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;
+	}
+
+	if (ctx->flags & E2F_FLAG_RESIZE_INODE) {
+		ext2fs_block_bitmap save_bmap;
+
+		save_bmap = fs->block_map;
+		fs->block_map = ctx->block_found_map;
+		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;
+				return;
+			}
+			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");
+		}
+		fs->block_map = save_bmap;
+		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;
+		unwind_pass1(fs);
+		goto endit;
+	}
+
+	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);
+	}
+	ext2fs_free_mem(&inodes_to_process);
+endit:
+	e2fsck_use_inode_shortcuts(ctx, 0);
+
+	ext2fs_free_mem(&block_buf);
+	ext2fs_free_mem(&inode);
+
+	print_resource_track(ctx, _("Pass 1"), &rtrack, ctx->fs->io);
+}
+
+/*
+ * 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 = &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);
+		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, &(ib_a->inode)) -
+			ext2fs_file_acl_block(0, &(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, 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_encrypted_dir(e2fsck_t ctx, ino_t ino)
+{
+	struct		problem_context pctx;
+
+	if (!ctx->encrypted_dirs) {
+		pctx.errcode = ext2fs_u32_list_create(&ctx->encrypted_dirs, 0);
+		if (pctx.errcode)
+			goto error;
+	}
+	pctx.errcode = ext2fs_u32_list_add(ctx->encrypted_dirs, ino);
+	if (pctx.errcode == 0)
+		return;
+error:
+	fix_problem(ctx, PR_1_ALLOCATE_ENCRYPTED_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 (!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);
+	}
+}
+
+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
+		while (num--)
+			mark_block_used(ctx, block++);
+}
+
+/*
+ * 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;
+	int				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_attr2(fs, blk, block_buf);
+		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 * count;
+		pctx.num = should_be;
+		if (fix_problem(ctx, PR_1_EXTATTR_REFCOUNT, &pctx)) {
+			header->h_refcount = should_be;
+			pctx.errcode = ext2fs_write_ext_attr2(fs, blk,
+							     block_buf);
+			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)
+{
+	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 *entry;
+	int		count;
+	region_t	region = 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 (!(fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_EXT_ATTR) ||
+	    (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)) {
+		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_attr2(fs, blk, block_buf);
+	if (pctx->errcode && fix_problem(ctx, PR_1_READ_EA_BLOCK, pctx))
+		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;
+	}
+
+	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;
+	}
+
+	entry = (struct ext2_ext_attr_entry *)(header+1);
+	end = block_buf + fs->blocksize;
+	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_block != 0) {
+			if (fix_problem(ctx, PR_1_EA_BAD_VALUE, pctx))
+				goto clear_extattr;
+		}
+		if (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) {
+			pctx->num = entry->e_hash;
+			if (fix_problem(ctx, PR_1_ATTR_HASH, pctx))
+				goto clear_extattr;
+			entry->e_hash = hash;
+		}
+
+		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);
+
+	count = header->h_refcount - 1;
+	if (count)
+		ea_refcount_store(ctx->refcount, blk, count);
+	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)) ||
+	    (!(fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX) &&
+	     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) &&
+	    fix_problem(ctx, PR_1_HTREE_HASHV, 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 ((root->indirect_levels > 1) &&
+	    fix_problem(ctx, PR_1_HTREE_DEPTH, pctx))
+		return 1;
+
+	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;
+
+	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);
+}
+
+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)
+{
+	struct ext2fs_extent	extent;
+	blk64_t			blk, last_lblk;
+	e2_blkcnt_t		blockcnt;
+	unsigned int		i;
+	int			is_dir, is_leaf;
+	problem_t		problem;
+	struct ext2_extent_info	info;
+
+	pctx->errcode = ext2fs_extent_get_info(ehandle, &info);
+	if (pctx->errcode)
+		return;
+
+	pctx->errcode = ext2fs_extent_get(ehandle, EXT2_EXTENT_FIRST_SIB,
+					  &extent);
+	while (!pctx->errcode && 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;
+		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) &&
+			 (!(extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT &&
+				last_lblk > eof_block)))
+			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 &&
+			 ((extent.e_lblk + extent.e_len) >
+			  (1 << (21 - ctx->fs->super->s_log_block_size))))
+			problem = PR_1_TOOBIG_DIR;
+
+		if (problem) {
+report_problem:
+			pctx->blk = extent.e_pblk;
+			pctx->blk2 = extent.e_lblk;
+			pctx->num = extent.e_len;
+			pctx->blkcount = extent.e_lblk + extent.e_len;
+			if (fix_problem(ctx, problem, pctx)) {
+				e2fsck_read_bitmaps(ctx);
+				pctx->errcode =
+					ext2fs_extent_delete(ehandle, 0);
+				if (pctx->errcode) {
+					pctx->str = "ext2fs_extent_delete";
+					return;
+				}
+				ext2fs_extent_fix_parents(ehandle);
+				pctx->errcode = ext2fs_extent_get(ehandle,
+								  EXT2_EXTENT_CURRENT,
+								  &extent);
+				if (pctx->errcode == EXT2_ET_NO_CURRENT_NODE) {
+					pctx->errcode = 0;
+					break;
+				}
+				continue;
+			}
+			goto next;
+		}
+
+		if (!is_leaf) {
+			blk64_t lblk = extent.e_lblk;
+
+			blk = extent.e_pblk;
+			pctx->errcode = ext2fs_extent_get(ehandle,
+						  EXT2_EXTENT_DOWN, &extent);
+			if (pctx->errcode) {
+				pctx->str = "EXT2_EXTENT_DOWN";
+				problem = PR_1_EXTENT_HEADER_INVALID;
+				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;
+
+				ext2fs_extent_get_info(ehandle, &e_info);
+				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))
+					ext2fs_extent_fix_parents(ehandle);
+			}
+			scan_extent_node(ctx, pctx, pb, extent.e_lblk,
+					 last_lblk, eof_block, ehandle);
+			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;
+		}
+		while (is_dir && (++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;
+			}
+		}
+		if (!ctx->fs->cluster_ratio_bits) {
+			mark_blocks_used(ctx, extent.e_pblk, extent.e_len);
+			pb->num_blocks += extent.e_len;
+		}
+		for (blk = extent.e_pblk, blockcnt = extent.e_lblk, i = 0;
+		     i < extent.e_len;
+		     blk++, blockcnt++, i++) {
+			if (ctx->fs->cluster_ratio_bits &&
+			    !(pb->previous_block &&
+			      (EXT2FS_B2C(ctx->fs, blk) ==
+			       EXT2FS_B2C(ctx->fs, pb->previous_block)) &&
+			      (blk & EXT2FS_CLUSTER_MASK(ctx->fs)) ==
+			      ((unsigned) blockcnt & EXT2FS_CLUSTER_MASK(ctx->fs)))) {
+				mark_block_used(ctx, blk);
+				pb->num_blocks++;
+			}
+
+			pb->previous_block = blk;
+
+			if (is_dir) {
+				pctx->errcode = ext2fs_add_dir_block2(ctx->fs->dblist, pctx->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;
+				}
+			}
+		}
+		if (is_dir && extent.e_len > 0)
+			pb->last_db_block = blockcnt - 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);
+	}
+	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;
+
+	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) {
+		if (info.max_depth >= MAX_EXTENT_DEPTH_COUNT)
+			info.max_depth = MAX_EXTENT_DEPTH_COUNT-1;
+		ctx->extent_depth_count[info.max_depth]++;
+	}
+
+	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);
+	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);
+}
+
+/*
+ * 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)
+{
+	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;
+	__u64		size;
+
+	pb.ino = ino;
+	pb.num_blocks = 0;
+	pb.last_block = -1;
+	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 = 1 << (31 - fs->super->s_log_block_size);
+	pb.inode = inode;
+	pb.pctx = pctx;
+	pb.ctx = ctx;
+	pctx->ino = ino;
+	pctx->errcode = 0;
+
+	extent_fs = (ctx->fs->super->s_feature_incompat &
+                     EXT3_FEATURE_INCOMPAT_EXTENTS);
+
+	if (inode->i_flags & EXT2_COMPRBLK_FL) {
+		if (fs->super->s_feature_incompat &
+		    EXT2_FEATURE_INCOMPAT_COMPRESSION)
+			pb.compressed = 1;
+		else {
+			if (fix_problem(ctx, PR_1_COMPR_SET, pctx)) {
+				inode->i_flags &= ~EXT2_COMPRBLK_FL;
+				dirty_inode++;
+			}
+		}
+	}
+
+	if (ext2fs_file_acl_block(fs, inode) &&
+	    check_ext_attr(ctx, pctx, block_buf)) {
+		if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+			goto out;
+		pb.num_blocks++;
+	}
+
+	if (ext2fs_inode_has_valid_blocks2(fs, inode)) {
+		if (extent_fs && (inode->i_flags & EXT4_EXTENTS_FL))
+			check_blocks_extents(ctx, pctx, &pb);
+		else {
+			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;
+		}
+	}
+	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 {
+#ifdef ENABLE_HTREE
+			e2fsck_add_dx_dir(ctx, ino, pb.last_block+1);
+#endif
+		}
+	}
+
+	if (!pb.num_blocks && pb.is_dir) {
+		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 == EXT2_ROOT_INO || ino >= EXT2_FIRST_INODE(ctx->fs->super)) {
+		quota_data_add(ctx->qctx, inode, ino,
+			       pb.num_blocks * fs->blocksize);
+		quota_data_inodes(ctx->qctx, inode, ino, +1);
+	}
+
+	if (!(fs->super->s_feature_ro_compat &
+	      EXT4_FEATURE_RO_COMPAT_HUGE_FILE) ||
+	    !(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 = %lld, i_blocks=%llu, num_blocks = %llu\n",
+	       ino, inode->i_size, pb.last_block, ext2fs_inode_i_blocks(fs, inode),
+	       pb.num_blocks);
+#endif
+	if (pb.is_dir) {
+		int nblock = inode->i_size >> EXT2_BLOCK_SIZE_BITS(fs->super);
+		if (inode->i_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 {
+		e2_blkcnt_t blkpg = ctx->blocks_per_page;
+
+		size = EXT2_I_SIZE(inode);
+		if ((pb.last_init_lblock >= 0) &&
+		    /* allow allocated blocks to end of PAGE_SIZE */
+		    (size < (__u64)pb.last_init_lblock * fs->blocksize) &&
+		    (pb.last_init_lblock / blkpg * blkpg != pb.last_init_lblock ||
+		     size < (__u64)(pb.last_init_lblock & ~(blkpg-1)) *
+		     fs->blocksize))
+			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)) {
+		pctx->num = (pb.last_block+1) * fs->blocksize;
+		pctx->group = bad_size;
+		if (fix_problem(ctx, PR_1_BAD_I_SIZE, pctx)) {
+			inode->i_size = pctx->num;
+			if (!LINUX_S_ISDIR(inode->i_mode))
+				inode->i_size_high = pctx->num >> 32;
+			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 ((pb.num_blocks != ext2fs_inode_i_blocks(fs, inode)) ||
+	    ((fs->super->s_feature_ro_compat &
+	      EXT4_FEATURE_RO_COMPAT_HUGE_FILE) &&
+	     (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;
+	}
+
+	if (ctx->dirs_to_hash && pb.is_dir &&
+	    !(inode->i_flags & EXT2_INDEX_FL) &&
+	    ((inode->i_size / fs->blocksize) >= 3))
+		ext2fs_u32_list_add(ctx->dirs_to_hash, 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;
+
+	if (p->compressed && (blk == EXT2FS_COMPRESSED_BLKADDR)) {
+		/* todo: Check that the comprblk_fl is high, that the
+		   blkaddr pattern looks right (all non-holes up to
+		   first EXT2FS_COMPRESSED_BLKADDR, then all
+		   EXT2FS_COMPRESSED_BLKADDR up to end of cluster),
+		   that the feature_incompat bit is high, and that the
+		   inode is a regular file.  If we're doing a "full
+		   check" (a concept introduced to e2fsck by e2compr,
+		   meaning that we look at data blocks as well as
+		   metadata) then call some library routine that
+		   checks the compressed data.  I'll have to think
+		   about this, because one particularly important
+		   problem to be able to fix is to recalculate the
+		   cluster size if necessary.  I think that perhaps
+		   we'd better do most/all e2compr-specific checks
+		   separately, after the non-e2compr checks.  If not
+		   doing a full check, it may be useful to test that
+		   the personality is linux; e.g. if it isn't then
+		   perhaps this really is just an illegal block. */
+		return 0;
+	}
+
+	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 (!HOLE_BLKADDR(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,
+				       blockcnt);
+			}
+			p->fragmented = 1;
+		}
+	}
+
+	if (p->is_dir && blockcnt > (1 << (21 - fs->super->s_log_block_size)))
+		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 (problem) {
+		p->num_illegal_blocks++;
+		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;
+			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++;
+	}
+	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;
+
+	/*
+	 * Note: This function processes blocks for the bad blocks
+	 * inode, which is never compressed.  So we don't use HOLE_BLKADDR().
+	 */
+
+	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 = EXT2_HAS_INCOMPAT_FEATURE(fs->super,
+					      EXT4_FEATURE_INCOMPAT_FLEX_BG);
+	if (is_flexbg) {
+		flexbg_size = 1 << 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;
+		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);
+		} else
+			memset(buf, 0, fs->blocksize);
+
+		pctx.blk = (*new_block) + i;
+		pctx.errcode = io_channel_write_blk64(fs->io, pctx.blk,
+					      1, buf);
+		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);
+
+		/*
+		 * 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);
+			    	}
+			}
+		}
+
+		/*
+		 * 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));
+		    }
+
+		}
+		/*
+		 * 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_found_map,
+				     ext2fs_inode_bitmap_loc(fs, i));
+			}
+		}
+	}
+}
+
+/*
+ * Thes 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, 0, &new_block);
+		if (retval)
+			return retval;
+	}
+
+	*ret = new_block;
+	return (0);
+}
+
+static void e2fsck_block_alloc_stats(ext2_filsys fs, blk64_t blk, int inuse)
+{
+	e2fsck_t ctx = (e2fsck_t) fs->priv_data;
+
+	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);
+	}
+}
+
+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;
+		ext2fs_set_alloc_block_callback(fs, e2fsck_get_alloc_block,
+						0);
+		ext2fs_set_block_alloc_stats_callback(fs,
+						      e2fsck_block_alloc_stats,
+						      0);
+	} else {
+		fs->get_blocks = 0;
+		fs->check_directory = 0;
+		fs->read_inode = 0;
+		fs->write_inode = 0;
+	}
+}
diff --git a/e2fsprogs/e2fsck/pass1b.c b/e2fsprogs/e2fsck/pass1b.c
new file mode 100644
index 0000000..932a171
--- /dev/null
+++ b/e2fsprogs/e2fsck/pass1b.c
@@ -0,0 +1,953 @@
+/*
+ * 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 <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 "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	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 test_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 *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 *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;
+		free(p);
+	}
+	free(di);
+	free(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;
+		free(p);
+	}
+	free(dc);
+	free(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);
+
+	/*
+	 * 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;
+	struct ext2_inode *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 inode;
+	ext2_inode_scan	scan;
+	struct process_block_struct pb;
+	struct problem_context pctx;
+
+	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 = &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(scan, &ino, &inode);
+		if (pctx.errcode == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE)
+			continue;
+		if (pctx.errcode) {
+			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;
+
+		if (ext2fs_inode_has_valid_blocks2(fs, &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 ((fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_EXT_ATTR) &&
+		    ext2fs_file_acl_block(fs, &inode)) {
+			blk64_t blk = ext2fs_file_acl_block(fs, &inode);
+			process_pass1b_block(fs, &blk,
+					     BLOCK_COUNT_EXTATTR, 0, 0, &pb);
+			ext2fs_file_acl_block_set(fs, &inode, blk);
+		}
+		if (pb.dup_blocks) {
+			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;
+
+	if (HOLE_BLKADDR(*block_nr))
+		return 0;
+	p = (struct process_block_struct *) priv_data;
+	ctx = p->ctx;
+	lc = EXT2FS_B2C(fs, blockcnt);
+
+	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) {
+		p->pctx->blk = *block_nr;
+		fix_problem(ctx, PR_1B_DUP_BLOCK, p->pctx);
+	}
+	p->dup_blocks++;
+	ext2fs_mark_inode_bitmap2(inode_dup_map, p->ino);
+
+	if (lc != p->cur_cluster)
+		add_dupe(ctx, p->ino, EXT2FS_B2C(fs, *block_nr), p->inode);
+
+finish:
+	p->cur_cluster = lc;
+	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 = &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 = &t->inode;
+			pctx.ino = shared[i];
+			pctx.dir = t->dir;
+			fix_problem(ctx, PR_1D_DUP_FILE_LIST, &pctx);
+		}
+		if (file_ok) {
+			fix_problem(ctx, PR_1D_DUP_BLOCKS_DEALT, &pctx);
+			continue;
+		}
+		if (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;
+		}
+		if (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 (HOLE_BLKADDR(*block_nr))
+		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) {
+			p = (struct dup_cluster *) dnode_get(n);
+			if (lc != pb->cur_cluster)
+				decrement_badcount(ctx, *block_nr, p);
+		} else
+			com_err("delete_file_block", 0,
+			    _("internal error: can't find dup_blk for %llu\n"),
+				*block_nr);
+	} else {
+		ext2fs_unmark_block_bitmap2(ctx->block_found_map, *block_nr);
+		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, &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);
+	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(ctx, ino, &dp->inode, "delete_file");
+	e2fsck_clear_inode(ctx, ino, &dp->inode, 0, "delete_file");
+	if (ext2fs_file_acl_block(fs, &dp->inode) &&
+	    (fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_EXT_ATTR)) {
+		count = 1;
+		pctx.errcode = ext2fs_adjust_ea_refcount2(fs,
+					ext2fs_file_acl_block(fs, &dp->inode),
+						   block_buf, -1, &count);
+		if (pctx.errcode == EXT2_ET_BAD_EA_BLOCK_NUM) {
+			pctx.errcode = 0;
+			count = 1;
+		}
+		if (pctx.errcode) {
+			pctx.blk = ext2fs_file_acl_block(fs, &dp->inode);
+			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,
+					ext2fs_file_acl_block(fs, &dp->inode))) {
+			blk64_t blk = ext2fs_file_acl_block(fs, &dp->inode);
+			delete_file_block(fs, &blk,
+					  BLOCK_COUNT_EXTATTR, 0, 0, &pb);
+			ext2fs_file_acl_block_set(fs, &dp->inode, blk);
+			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;
+	char	*buf;
+	e2fsck_t ctx;
+};
+
+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;
+	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;
+
+	ctx = cs->ctx;
+
+	if (HOLE_BLKADDR(*block_nr))
+		return 0;
+
+	c = EXT2FS_B2C(fs, blockcnt);
+	if (check_if_fs_cluster(ctx, EXT2FS_B2C(fs, *block_nr)))
+		is_meta = 1;
+
+	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"),
+				*block_nr);
+			return 0;
+		}
+
+		p = (struct dup_cluster *) dnode_get(n);
+		if (!is_meta)
+			decrement_badcount(ctx, *block_nr, p);
+
+		cs->dup_cluster = c;
+
+		retval = ext2fs_new_block2(fs, 0, ctx->block_found_map,
+					   &new_block);
+		if (retval) {
+			cs->errcode = retval;
+			return BLOCK_ABORT;
+		}
+		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, *block_nr, new_block);
+#endif
+		retval = io_channel_read_blk64(fs->io, *block_nr, 1, cs->buf);
+		if (retval) {
+			cs->errcode = retval;
+			return BLOCK_ABORT;
+		}
+		retval = io_channel_write_blk64(fs->io, new_block, 1, cs->buf);
+		if (retval) {
+			cs->errcode = retval;
+			return BLOCK_ABORT;
+		}
+		*block_nr = new_block;
+		ext2fs_mark_block_bitmap2(ctx->block_found_map, new_block);
+		ext2fs_mark_block_bitmap2(fs->block_map, new_block);
+		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;
+	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, &dp->inode))
+		pctx.errcode = ext2fs_block_iterate3(fs, ino, 0, block_buf,
+						     clone_file_block, &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(ctx, ino, &dp->inode, "clone file EA");
+	blk = ext2fs_file_acl_block(fs, &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, &dp->inode, new_blk);
+		e2fsck_write_inode(ctx, ino, &dp->inode, "clone file EA");
+		/*
+		 * If we cloned the EA block, find all other inodes
+		 * which refered 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"), 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, &di->inode) == blk) {
+				ext2fs_file_acl_block_set(fs, &di->inode,
+					ext2fs_file_acl_block(fs, &dp->inode));
+				e2fsck_write_inode(ctx, ino_el->inode,
+					   &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 test_block)
+{
+	ext2_filsys fs = ctx->fs;
+	blk64_t	first_block;
+	dgrp_t	i;
+
+	first_block = fs->super->s_first_data_block;
+	for (i = 0; i < fs->group_desc_count; i++) {
+
+		/* Check superblocks/block group descriptors */
+		if (ext2fs_bg_has_super(fs, i)) {
+			if (test_block >= first_block &&
+			    (test_block <= first_block + fs->desc_blocks))
+				return 1;
+		}
+
+		/* Check the inode table */
+		if ((ext2fs_inode_table_loc(fs, i)) &&
+		    (test_block >= ext2fs_inode_table_loc(fs, i)) &&
+		    (test_block < (ext2fs_inode_table_loc(fs, i) +
+				   fs->inode_blocks_per_group)))
+			return 1;
+
+		/* Check the bitmap blocks */
+		if ((test_block == ext2fs_block_bitmap_loc(fs, i)) ||
+		    (test_block == ext2fs_inode_bitmap_loc(fs, i)))
+			return 1;
+
+		first_block += fs->super->s_blocks_per_group;
+	}
+	return 0;
+}
+
+/*
+ * 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	first_block;
+	dgrp_t	i;
+
+	first_block = fs->super->s_first_data_block;
+	for (i = 0; i < fs->group_desc_count; i++) {
+
+		/* Check superblocks/block group descriptors */
+		if (ext2fs_bg_has_super(fs, i)) {
+			if (cluster >= EXT2FS_B2C(fs, first_block) &&
+			    (cluster <= EXT2FS_B2C(fs, first_block +
+						   fs->desc_blocks)))
+				return 1;
+		}
+
+		/* Check the inode table */
+		if ((ext2fs_inode_table_loc(fs, i)) &&
+		    (cluster >= EXT2FS_B2C(fs,
+					   ext2fs_inode_table_loc(fs, i))) &&
+		    (cluster <= EXT2FS_B2C(fs,
+					   ext2fs_inode_table_loc(fs, i) +
+					   fs->inode_blocks_per_group - 1)))
+			return 1;
+
+		/* Check the bitmap blocks */
+		if ((cluster == EXT2FS_B2C(fs,
+					   ext2fs_block_bitmap_loc(fs, i))) ||
+		    (cluster == EXT2FS_B2C(fs,
+					   ext2fs_inode_bitmap_loc(fs, i))))
+			return 1;
+
+		first_block += fs->super->s_blocks_per_group;
+	}
+	return 0;
+}
diff --git a/e2fsprogs/e2fsck/pass2.c b/e2fsprogs/e2fsck/pass2.c
new file mode 100644
index 0000000..b606657
--- /dev/null
+++ b/e2fsprogs/e2fsck/pass2.c
@@ -0,0 +1,1495 @@
+/*
+ * 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
+ *
+ * Pass 2 frees the following data structures
+ * 	- The inode_bad_map bitmap
+ * 	- The inode_reg_map bitmap
+ */
+
+#define _GNU_SOURCE 1 /* get strnlen() */
+#include <string.h>
+
+#include "e2fsck.h"
+#include "problem.h"
+#include "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_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 int 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;
+};
+
+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;
+#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, *dx_parent;
+	unsigned int		save_type;
+	int			b;
+	int			i, depth;
+	problem_t		code;
+	int			bad_dir;
+
+	init_resource_track(&rtrack, ctx->fs->io);
+	clear_problem_context(&cd.pctx);
+
+#ifdef MTRACE
+	mtrace_print("Pass 2");
+#endif
+
+	if (!(ctx->options & E2F_OPT_PREEN))
+		fix_problem(ctx, PR_2_PASS_HEADER, &cd.pctx);
+
+	e2fsck_setup_tdb_icount(ctx, EXT2_ICOUNT_OPT_INCREMENT,
+				&ctx->inode_count);
+	if (ctx->inode_count)
+		cd.pctx.errcode = 0;
+	else {
+		e2fsck_set_bitmap_type(fs, EXT2FS_BMAP64_RBTREE,
+				       "inode_count", &save_type);
+		cd.pctx.errcode = ext2fs_create_icount2(fs,
+						EXT2_ICOUNT_OPT_INCREMENT,
+						0, ctx->inode_link_info,
+						&ctx->inode_count);
+		fs->default_bitmap_type = save_type;
+	}
+	if (cd.pctx.errcode) {
+		fix_problem(ctx, PR_2_ALLOCATE_ICOUNT, &cd.pctx);
+		ctx->flags |= E2F_FLAG_ABORT;
+		return;
+	}
+	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);
+
+	if (ctx->progress)
+		(void) (ctx->progress)(ctx, 2, 0, cd.max);
+
+	if (fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX)
+		ext2fs_dblist_sort2(fs->dblist, special_dir_block_cmp);
+
+	cd.pctx.errcode = ext2fs_dblist_iterate2(fs->dblist, check_dir_block,
+						 &cd);
+	if (ctx->flags & E2F_FLAG_SIGNAL_MASK || ctx->flags & E2F_FLAG_RESTART)
+		return;
+
+	if (ctx->flags & E2F_FLAG_RESTART_LATER) {
+		ctx->flags |= E2F_FLAG_RESTART;
+		return;
+	}
+
+	if (cd.pctx.errcode) {
+		fix_problem(ctx, PR_2_DBLIST_ITERATE, &cd.pctx);
+		ctx->flags |= E2F_FLAG_ABORT;
+		return;
+	}
+
+#ifdef ENABLE_HTREE
+	for (i=0; (dx_dir = e2fsck_dx_dir_info_iter(ctx, &i)) != 0;) {
+		if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+			return;
+		if (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
+		 */
+		for (b=0, dx_db = dx_dir->dx_block;
+		     b < dx_dir->numblocks;
+		     b++, dx_db++) {
+			if ((dx_db->type != DX_DIRBLOCK_LEAF) ||
+			    !(dx_db->flags & (DX_FLAG_FIRST | DX_FLAG_LAST)))
+				continue;
+			dx_parent = &dx_dir->dx_block[dx_db->parent];
+			/*
+			 * 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;
+			/*
+			 * 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;
+		}
+
+		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);
+#endif
+	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->encrypted_dirs) {
+		ext2fs_u32_list_free(ctx->encrypted_dirs);
+		ctx->encrypted_dirs = 0;
+	}
+
+	clear_problem_context(&pctx);
+	if (ctx->large_files) {
+		if (!(sb->s_feature_ro_compat &
+		      EXT2_FEATURE_RO_COMPAT_LARGE_FILE) &&
+		    fix_problem(ctx, PR_2_FEATURE_LARGE_FILES, &pctx)) {
+			sb->s_feature_ro_compat |=
+				EXT2_FEATURE_RO_COMPAT_LARGE_FILE;
+			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);
+}
+
+#define MAX_DEPTH 32000
+static int htree_depth(struct dx_dir_info *dx_dir,
+		       struct dx_dirblock_info *dx_db)
+{
+	int	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 *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 = de_a->name_len & 0xFF;
+	de_b = (const struct ext2_dir_entry *) b;
+	b_len = de_b->name_len & 0xFF;
+
+	if (a_len != b_len)
+		return (a_len - b_len);
+
+	return memcmp(de_a->name, de_b->name, a_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;
+
+	if (!dirent->inode)
+		problem = PR_2_MISSING_DOT;
+	else if (((dirent->name_len & 0xFF) != 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 (fix_problem(ctx, problem, pctx)) {
+			if (rec_len < 12)
+				rec_len = dirent->rec_len = 12;
+			dirent->inode = ino;
+			dirent->name_len = 1;
+			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;
+				(void) ext2fs_set_rec_len(ctx->fs, new_len,
+							  nextdir);
+				nextdir->inode = 0;
+				nextdir->name_len = 0;
+				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;
+
+	if (!dirent->inode)
+		problem = PR_2_MISSING_DOT_DOT;
+	else if (((dirent->name_len & 0xFF) != 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 (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;
+			dirent->name_len = 2;
+			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 < (dirent->name_len & 0xFF); i++) {
+		if (dirent->name[i] == '/' || dirent->name[i] == '\0') {
+			if (fixup < 0) {
+				fixup = fix_problem(ctx, PR_2_BAD_NAME, pctx);
+			}
+			if (fixup) {
+				dirent->name[i] = '.';
+				ret = 1;
+			}
+		}
+	}
+	return ret;
+}
+
+/*
+ * 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 = dirent->name_len >> 8;
+	int	should_be = EXT2_FT_UNKNOWN;
+	struct ext2_inode	inode;
+
+	if (!(ctx->fs->super->s_feature_incompat &
+	      EXT2_FEATURE_INCOMPAT_FILETYPE)) {
+		if (filetype == 0 ||
+		    !fix_problem(ctx, PR_2_CLEAR_FILETYPE, pctx))
+			return 0;
+		dirent->name_len = dirent->name_len & 0xFF;
+		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;
+
+	dirent->name_len = (dirent->name_len & 0xFF) | should_be << 8;
+	return 1;
+}
+
+#ifdef ENABLE_HTREE
+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)
+{
+	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;
+
+	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: %d\n", root->hash_version);
+		printf("\t Info length: %d\n", root->info_length);
+		printf("\t Indirect levels: %d\n", root->indirect_levels);
+		printf("\t Flags: %d\n", root->unused_flags);
+#endif
+
+		ent = (struct ext2_dx_entry *) (block_buf + 24 + root->info_length);
+	} else {
+		ent = (struct ext2_dx_entry *) (block_buf+8);
+	}
+	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);
+	expect_limit = (fs->blocksize - ((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) & 0x0ffffff;
+		/* Check to make sure the block is valid */
+		if (blk >= (blk_t) 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;
+		}
+		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;
+}
+#endif /* ENABLE_HTREE */
+
+/*
+ * 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)
+{
+	char	*cp = (char *) dirent;
+	int left;
+	unsigned int rec_len, prev_rec_len;
+	unsigned int name_len = dirent->name_len & 0xFF;
+
+	(void) ext2fs_get_rec_len(fs, dirent, &rec_len);
+	left = fs->blocksize - *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 >= 12) && (rec_len == 8)) {
+		memmove(cp, cp+8, left);
+		memset(cp + left, 0, 8);
+		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 > 8) &&
+	    ((int) name_len + 8 <= (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 <= fs->blocksize)) {
+		(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 += fs->blocksize - *offset;
+		(void) ext2fs_set_rec_len(fs, prev_rec_len, prev);
+		*offset = fs->blocksize;
+	} else {
+		rec_len = fs->blocksize - *offset;
+		(void) ext2fs_set_rec_len(fs, rec_len, dirent);
+		dirent->name_len = 0;
+		dirent->inode = 0;
+	}
+}
+
+static int check_dir_block(ext2_filsys fs,
+			   struct ext2_db_entry2 *db,
+			   void *priv_data)
+{
+ 	struct dx_dir_info	*dx_dir;
+#ifdef ENABLE_HTREE
+	struct dx_dirblock_info	*dx_db = 0;
+#endif /* ENABLE_HTREE */
+	struct ext2_dir_entry 	*dirent, *prev;
+	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;
+	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	encrypted = 0;
+	int	ret;
+
+	cd = (struct check_dir_struct *) priv_data;
+	buf = cd->buf;
+	ctx = cd->ctx;
+
+	if (ctx->flags & E2F_FLAG_SIGNAL_MASK || ctx->flags & E2F_FLAG_RESTART)
+		return DIRENT_ABORT;
+
+	if (ctx->progress && (ctx->progress)(ctx, 2, cd->count++, cd->max))
+		return DIRENT_ABORT;
+
+	/*
+	 * 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 (db->blk == 0) {
+		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
+
+	ehandler_operation(_("reading directory block"));
+	cd->pctx.errcode = ext2fs_read_dir_block3(fs, block_nr, buf, 0);
+	ehandler_operation(0);
+	if (cd->pctx.errcode == EXT2_ET_DIR_CORRUPTED)
+		cd->pctx.errcode = 0; /* We'll handle this ourselves */
+	if (cd->pctx.errcode) {
+		if (!fix_problem(ctx, PR_2_READ_DIRBLOCK, &cd->pctx)) {
+			ctx->flags |= E2F_FLAG_ABORT;
+			return DIRENT_ABORT;
+		}
+		memset(buf, 0, fs->blocksize);
+	}
+#ifdef ENABLE_HTREE
+	dx_dir = e2fsck_get_dx_dir_info(ctx, ino);
+	if (dx_dir && dx_dir->numblocks) {
+		if (db->blockcnt >= dx_dir->numblocks) {
+			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;
+			if ((root->reserved_zero ||
+			     root->info_length < 8 ||
+			     root->indirect_levels > 1) &&
+			    fix_problem(ctx, PR_2_HTREE_BAD_ROOT, &cd->pctx)) {
+				clear_htree(ctx, ino);
+				dx_dir->numblocks = 0;
+				dx_db = 0;
+			}
+			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) &&
+			   (dirent->name_len == 0) &&
+			   (ext2fs_le16_to_cpu(limit->limit) ==
+			    ((fs->blocksize-8) /
+			     sizeof(struct ext2_dx_entry))))
+			dx_db->type = DX_DIRBLOCK_NODE;
+	}
+out_htree:
+#endif /* ENABLE_HTREE */
+
+	if (ctx->encrypted_dirs)
+		encrypted = ext2fs_u32_list_test(ctx->encrypted_dirs, ino);
+
+	dict_init(&de_dict, DICTCOUNT_T_MAX, dict_de_cmp);
+	prev = 0;
+	do {
+		dgrp_t group;
+		ext2_ino_t first_unused_inode;
+
+		problem = 0;
+		dirent = (struct ext2_dir_entry *) (buf + offset);
+		(void) ext2fs_get_rec_len(fs, dirent, &rec_len);
+		cd->pctx.dirent = dirent;
+		cd->pctx.num = offset;
+		if (((offset + rec_len) > fs->blocksize) ||
+		    (rec_len < 12) ||
+		    ((rec_len % 4) != 0) ||
+		    (((dirent->name_len & (unsigned) 0xFF)+8) > rec_len)) {
+			if (fix_problem(ctx, PR_2_DIR_CORRUPTED, &cd->pctx)) {
+				salvage_directory(fs, dirent, prev, &offset);
+				dir_modified++;
+				continue;
+			} else
+				goto abort_free_dict;
+		}
+
+		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.
+		 */
+		if (((dirent->inode != EXT2_ROOT_INO) &&
+		     (dirent->inode < EXT2_FIRST_INODE(fs->super))) ||
+		    (dirent->inode > fs->super->s_inodes_count)) {
+			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) &&
+			   ((dirent->name_len & 0xFF) == 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) &&
+			   ((dirent->name_len & 0xFF) == 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) &&
+			   (dirent->name_len & 0xFF) == 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_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_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 (!encrypted && check_name(ctx, dirent, &cd->pctx))
+			dir_modified++;
+
+		if (check_filetype(ctx, dirent, ino, &cd->pctx))
+			dir_modified++;
+
+#ifdef ENABLE_HTREE
+		if (dx_db) {
+			ext2fs_dirhash(dx_dir->hashversion, dirent->name,
+				       (dirent->name_len & 0xFF),
+				       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;
+		}
+#endif
+
+		/*
+		 * 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);
+			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);
+			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);
+		offset += rec_len;
+		dot_state++;
+	} while (offset < fs->blocksize);
+#if 0
+	printf("\n");
+#endif
+#ifdef ENABLE_HTREE
+	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);
+	}
+#endif /* ENABLE_HTREE */
+	if (offset != fs->blocksize) {
+		cd->pctx.num = rec_len - fs->blocksize + offset;
+		if (fix_problem(ctx, PR_2_FINAL_RECLEN, &cd->pctx)) {
+			dirent->rec_len = cd->pctx.num;
+			dir_modified++;
+		}
+	}
+	if (dir_modified) {
+		cd->pctx.errcode = ext2fs_write_dir_block3(fs, block_nr, buf, 0);
+		if (cd->pctx.errcode) {
+			if (!fix_problem(ctx, PR_2_WRITE_DIRBLOCK,
+					 &cd->pctx))
+				goto abort_free_dict;
+		}
+		ext2fs_mark_changed(fs);
+	}
+	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;
+};
+
+/*
+ * This function is called to deallocate a block, and is an interator
+ * 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;
+
+	if (HOLE_BLKADDR(*block_nr))
+		return 0;
+	if ((*block_nr < fs->super->s_first_data_block) ||
+	    (*block_nr >= ext2fs_blocks_count(fs->super)))
+		return 0;
+	ext2fs_unmark_block_bitmap2(p->ctx->block_found_map, *block_nr);
+	ext2fs_block_alloc_stats2(fs, *block_nr, -1);
+	p->num++;
+	return 0;
+}
+
+/*
+ * This fuction 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) &&
+	    (fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_EXT_ATTR)) {
+		pctx.errcode = ext2fs_adjust_ea_refcount2(fs,
+					ext2fs_file_acl_block(fs, &inode),
+					block_buf, -1, &count);
+		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_unmark_block_bitmap2(ctx->block_found_map,
+					ext2fs_file_acl_block(fs, &inode));
+			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;
+
+	if (LINUX_S_ISREG(inode.i_mode) &&
+	    ext2fs_needs_large_file_feature(EXT2_I_SIZE(&inode)))
+		ctx->large_files--;
+
+	del_block.ctx = ctx;
+	del_block.num = 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 fuction 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) &&
+	    !(fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_EXT_ATTR)) {
+		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) &&
+	    !(fs->super->s_feature_ro_compat &
+	      EXT4_FEATURE_RO_COMPAT_HUGE_FILE) &&
+	    (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_feature_incompat & 
+	     EXT4_FEATURE_INCOMPAT_64BIT) &&
+	    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_dir_acl &&
+	    LINUX_S_ISDIR(inode.i_mode)) {
+		if (fix_problem(ctx, PR_2_DIR_ACL_ZERO, &pctx)) {
+			inode.i_dir_acl = 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;
+	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
+	 */
+	pctx->errcode = ext2fs_new_block2(fs, 0, 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_block3(fs, blk, block, 0);
+	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
+	 */
+	e2fsck_read_inode(ctx, db->ino, &inode, "allocate_dir_block");
+	ext2fs_iblk_add_blocks(fs, &inode, 1);
+	if (inode.i_size < (db->blockcnt+1) * fs->blocksize)
+		inode.i_size = (db->blockcnt+1) * fs->blocksize;
+	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/e2fsprogs/e2fsck/pass3.c b/e2fsprogs/e2fsck/pass3.c
new file mode 100644
index 0000000..8f1898a
--- /dev/null
+++ b/e2fsprogs/e2fsck/pass3.c
@@ -0,0 +1,852 @@
+/*
+ * 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 interates 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 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.
+ */
+
+#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)
+			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;
+	}
+
+	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	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
+	 */
+	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);
+	ext2fs_mark_block_bitmap2(fs->block_map, blk);
+	ext2fs_mark_bb_dirty(fs);
+
+	/*
+	 * Now let's create the actual data block for the inode
+	 */
+	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_block3(fs, blk, block, 0);
+	if (pctx.errcode) {
+		pctx.str = "ext2fs_write_dir_block3";
+		fix_problem(ctx, PR_3_CREATE_ROOT_ERROR, &pctx);
+		ctx->flags |= E2F_FLAG_ABORT;
+		return;
+	}
+	ext2fs_free_mem(&block);
+
+	/*
+	 * 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, &inode, 1);
+	inode.i_block[0] = blk;
+
+	/*
+	 * Write out the inode.
+	 */
+	pctx.errcode = ext2fs_write_new_inode(fs, EXT2_ROOT_INO, &inode);
+	if (pctx.errcode) {
+		pctx.str = "ext2fs_write_inode";
+		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);
+}
+
+/*
+ * 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 (fix_problem(ctx, PR_3_UNCONNECTED_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	inode;
+	char *			block;
+	static const char	name[] = "lost+found";
+	struct 	problem_context	pctx;
+
+	if (ctx->lost_and_found)
+		return ctx->lost_and_found;
+
+	clear_problem_context(&pctx);
+
+	retval = ext2fs_lookup(fs, EXT2_ROOT_INO, name,
+			       sizeof(name)-1, 0, &ino);
+	if (retval && !fix)
+		return 0;
+	if (!retval) {
+		if (ext2fs_test_inode_bitmap2(ctx->inode_dir_map, ino)) {
+			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;
+
+		/* 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);
+	} 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
+	 */
+	retval = ext2fs_new_block2(fs, 0, ctx->block_found_map, &blk);
+	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);
+	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) {
+		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);
+
+	/*
+	 * Now let's create the actual data block for the inode
+	 */
+	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_block3(fs, blk, block, 0);
+	ext2fs_free_mem(&block);
+	if (retval) {
+		pctx.errcode = retval;
+		fix_problem(ctx, PR_3_ERR_LPF_WRITE_BLOCK, &pctx);
+		return 0;
+	}
+
+	/*
+	 * 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, &inode, 1);
+	inode.i_block[0] = blk;
+
+	/*
+	 * Next, write out the inode.
+	 */
+	pctx.errcode = ext2fs_write_new_inode(fs, ino, &inode);
+	if (pctx.errcode) {
+		pctx.str = "ext2fs_write_inode";
+		fix_problem(ctx, PR_3_CREATE_LPF_ERROR, &pctx);
+		return 0;
+	}
+	/*
+	 * Finally, create the directory link
+	 */
+	pctx.errcode = ext2fs_link(fs, EXT2_ROOT_INO, name, ino, EXT2_FT_DIR);
+	if (pctx.errcode) {
+		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, fs->blocksize);
+	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 ((dirent->name_len & 0xFF) != 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 (fp->ctx->fs->super->s_feature_incompat &
+	    EXT2_FEATURE_INCOMPAT_FILETYPE)
+		dirent->name_len = (dirent->name_len & 0xFF) |
+			(EXT2_FT_DIR << 8);
+	else
+		dirent->name_len = dirent->name_len & 0xFF;
+
+	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;
+
+	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;
+	retval = ext2fs_dir_iterate(fs, ino, DIRENT_FLAG_INCLUDE_EMPTY,
+				    0, fix_dotdot_proc, &fp);
+	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;
+};
+
+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_block3(fs, new_blk, block, 0);
+	} else {
+		retval = ext2fs_get_mem(fs->blocksize, &block);
+		if (retval) {
+			es->err = retval;
+			return BLOCK_ABORT;
+		}
+		memset(block, 0, fs->blocksize);
+		retval = io_channel_write_blk64(fs->io, new_blk, 1, block);
+	}
+	if (retval) {
+		es->err = retval;
+		return BLOCK_ABORT;
+	}
+	ext2fs_free_mem(&block);
+	*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;
+}
+
+/*
+ * Ensure that all blocks are marked in the block_found_map, since it's
+ * possible that the library allocated an extent node block or a block map
+ * block during the directory rebuilding; these new allocations are not
+ * captured in block_found_map.  This is bad since we could later use
+ * block_found_map to allocate more blocks.
+ */
+static int find_new_blocks_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;
+	e2fsck_t	ctx = es->ctx;
+
+	ext2fs_mark_block_bitmap2(ctx->block_found_map, *blocknr);
+	return 0;
+}
+
+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	inode;
+	blk64_t		sz, before, after;
+
+	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;
+
+	before = ext2fs_free_blocks_count(fs->super);
+	retval = ext2fs_block_iterate3(fs, dir, BLOCK_FLAG_APPEND,
+				       0, expand_dir_proc, &es);
+
+	if (es.err)
+		return es.err;
+	after = ext2fs_free_blocks_count(fs->super);
+
+	/*
+	 * If the free block count has dropped by more than the blocks we
+	 * allocated ourselves, then we must've allocated some extent/map
+	 * blocks.  Therefore, we must iterate this dir's blocks again to
+	 * ensure that all newly allocated blocks are captured in
+	 * block_found_map.
+	 */
+	if ((before - after) > es.newblocks) {
+		retval = ext2fs_block_iterate3(fs, dir, BLOCK_FLAG_READ_ONLY,
+					       0, find_new_blocks_proc, &es);
+		if (es.err)
+			return es.err;
+	}
+
+	/*
+	 * Update the size and block count fields in the inode.
+	 */
+	retval = ext2fs_read_inode(fs, dir, &inode);
+	if (retval)
+		return retval;
+
+	sz = (es.last_block + 1) * fs->blocksize;
+	inode.i_size = sz;
+	inode.i_size_high = sz >> 32;
+	ext2fs_iblk_add_blocks(fs, &inode, es.newblocks);
+	quota_data_add(ctx->qctx, &inode, dir, es.newblocks * fs->blocksize);
+
+	e2fsck_write_inode(ctx, dir, &inode, "expand_directory");
+
+	return 0;
+}
+
diff --git a/e2fsprogs/e2fsck/pass4.c b/e2fsprogs/e2fsck/pass4.c
new file mode 100644
index 0000000..d47b662
--- /dev/null
+++ b/e2fsprogs/e2fsck/pass4.c
@@ -0,0 +1,197 @@
+/*
+ * 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)
+ */
+
+#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,
+			    struct ext2_inode *inode)
+{
+	ext2_filsys fs = ctx->fs;
+	struct problem_context	pctx;
+	__u32 eamagic = 0;
+	int extra_size = 0;
+
+	if (EXT2_INODE_SIZE(fs->super) > EXT2_GOOD_OLD_INODE_SIZE) {
+		e2fsck_read_inode_full(ctx, i, inode,EXT2_INODE_SIZE(fs->super),
+				       "pass4: disconnect_inode");
+		extra_size = ((struct ext2_inode_large *)inode)->i_extra_isize;
+	} else {
+		e2fsck_read_inode(ctx, i, inode, "pass4: disconnect_inode");
+	}
+	clear_problem_context(&pctx);
+	pctx.ino = i;
+	pctx.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, 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);
+	} 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;
+}
+
+
+void e2fsck_pass4(e2fsck_t ctx)
+{
+	ext2_filsys fs = ctx->fs;
+	ext2_ino_t	i;
+	struct ext2_inode	*inode;
+#ifdef RESOURCE_TRACK
+	struct resource_track	rtrack;
+#endif
+	struct problem_context	pctx;
+	__u16	link_count, link_counted;
+	char	*buf = 0;
+	dgrp_t	group, maxgroup;
+
+	init_resource_track(&rtrack, ctx->fs->io);
+
+#ifdef MTRACE
+	mtrace_print("Pass 4");
+#endif
+
+	clear_problem_context(&pctx);
+
+	if (!(ctx->options & E2F_OPT_PREEN))
+		fix_problem(ctx, PR_4_PASS_HEADER, &pctx);
+
+	group = 0;
+	maxgroup = fs->group_desc_count;
+	if (ctx->progress)
+		if ((ctx->progress)(ctx, 4, 0, maxgroup))
+			return;
+
+	inode = e2fsck_allocate_memory(ctx, EXT2_INODE_SIZE(fs->super),
+				       "scratch inode");
+
+	/* Protect loop from wrap-around if s_inodes_count maxed */
+	for (i=1; i <= fs->super->s_inodes_count && i > 0; i++) {
+		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 == 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) {
+			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, 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))
+			link_counted = 1;
+		if (link_counted != link_count) {
+			e2fsck_read_inode(ctx, i, inode, "pass4");
+			pctx.ino = i;
+			pctx.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 && !(ctx->options & E2F_OPT_NO)) ||
+			    fix_problem(ctx, PR_4_BAD_REF_COUNT, &pctx)) {
+				inode->i_links_count = link_counted;
+				e2fsck_write_inode(ctx, i, inode, "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;
+	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/e2fsprogs/e2fsck/pass5.c b/e2fsprogs/e2fsck/pass5.c
new file mode 100644
index 0000000..c04ffbd
--- /dev/null
+++ b/e2fsprogs/e2fsck/pass5.c
@@ -0,0 +1,898 @@
+/*
+ * 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 <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"
+
+#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
+
+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);
+
+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;
+
+	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;
+
+	print_resource_track(ctx, _("Pass 5"), &rtrack, ctx->fs->io);
+}
+
+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 succint */
+#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		csum_flag;
+	int		skip_group = 0;
+	int	old_desc_blocks = 0;
+	int	count = 0;
+	int	cmp_block = 0;
+	int	redo_flag = 0;
+	blk64_t	super_blk, old_desc_blk, new_desc_blk;
+	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;
+	}
+
+	csum_flag = EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+					       EXT4_FEATURE_RO_COMPAT_GDT_CSUM);
+redo_counts:
+	had_problem = 0;
+	save_problem = 0;
+	pctx.blk = pctx.blk2 = NO_BLK;
+	if (csum_flag &&
+	    (ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT)))
+		skip_group++;
+	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 == (int)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;
+		if (ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT))
+			memset(bitmap_buf, 0, nbytes);
+		else {
+			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 (skip_group) {
+			if (first_block_in_bg) {
+				super_blk = 0;
+				old_desc_blk = 0;
+				new_desc_blk = 0;
+				ext2fs_super_and_bgd_loc2(fs, group, &super_blk,
+					 &old_desc_blk, &new_desc_blk, 0);
+
+				if (fs->super->s_feature_incompat &
+						EXT2_FEATURE_INCOMPAT_META_BG)
+					old_desc_blocks =
+						fs->super->s_first_meta_bg;
+				else
+					old_desc_blocks = fs->desc_blocks +
+					fs->super->s_reserved_gdt_blocks;
+
+				count = 0;
+				cmp_block = fs->super->s_clusters_per_group;
+				if (group == (int)fs->group_desc_count - 1)
+					cmp_block = EXT2FS_NUM_B2C(fs,
+						    ext2fs_group_blocks_count(fs, group));
+			}
+
+			bitmap = 0;
+			if (EQ_CLSTR(i, super_blk) ||
+			    (old_desc_blk && old_desc_blocks &&
+			     GE_CLSTR(i, old_desc_blk) &&
+			     LE_CLSTR(i, old_desc_blk + old_desc_blocks-1)) ||
+			    (new_desc_blk && EQ_CLSTR(i, new_desc_blk)) ||
+			    EQ_CLSTR(i, ext2fs_block_bitmap_loc(fs, group)) ||
+			    EQ_CLSTR(i, ext2fs_inode_bitmap_loc(fs, group)) ||
+			    (GE_CLSTR(i, ext2fs_inode_table_loc(fs, group)) &&
+			     LE_CLSTR(i, (ext2fs_inode_table_loc(fs, group) +
+					  fs->inode_blocks_per_group - 1)))) {
+				bitmap = 1;
+				actual = (actual != 0);
+				count++;
+				cmp_block--;
+			} else if ((EXT2FS_B2C(fs, i) - count -
+				    EXT2FS_B2C(fs, fs->super->s_first_data_block)) %
+				   fs->super->s_clusters_per_group == 0) {
+				/*
+				 * When the compare data blocks in block bitmap
+				 * are 0, count the free block,
+				 * skip the current block group.
+				 */
+				if (ext2fs_test_block_bitmap_range2(
+					    ctx->block_found_map,
+					    EXT2FS_B2C(fs, i),
+					    cmp_block)) {
+					/*
+					 * -1 means to skip the current block
+					 * group.
+					 */
+					blocks = fs->super->s_clusters_per_group - 1;
+					group_free = cmp_block;
+					free_blocks += cmp_block;
+					/*
+					 * The current block group's last block
+					 * is set to i.
+					 */
+					i += EXT2FS_C2B(fs, cmp_block - 1);
+					bitmap = 1;
+					goto do_counts;
+				}
+			}
+		} else 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 (skip_group) {
+				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);
+					skip_group = 0;
+				}
+			}
+		}
+		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;
+			skip_group = 0;
+			if (ctx->progress)
+				if ((ctx->progress)(ctx, 5, group,
+						    fs->group_desc_count*2))
+					goto errout;
+			if (csum_flag &&
+			    (i != ext2fs_blocks_count(fs->super)-1) &&
+			    ext2fs_bg_flags_test(fs, group, 
+						EXT2_BG_BLOCK_UNINIT))
+				skip_group++;
+		}
+	}
+	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 = EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+					       EXT4_FEATURE_RO_COMPAT_GDT_CSUM);
+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;
+
+	clear_problem_context(&pctx);
+
+	end = 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)
+		return;
+
+	/* 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)) {
+			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;
+	}
+}
+
+static void check_block_end(e2fsck_t ctx)
+{
+	ext2_filsys fs = ctx->fs;
+	blk64_t	end, save_blocks_count, i;
+	struct problem_context	pctx;
+
+	clear_problem_context(&pctx);
+
+	end = ext2fs_get_block_bitmap_start2(fs->block_map) +
+		((blk64_t)EXT2_CLUSTERS_PER_GROUP(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)
+		return;
+
+	/* 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))) {
+			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;
+	}
+}
+
+
+
diff --git a/e2fsprogs/e2fsck/problem.c b/e2fsprogs/e2fsck/problem.c
new file mode 100644
index 0000000..2fdc8d2
--- /dev/null
+++ b/e2fsprogs/e2fsck/problem.c
@@ -0,0 +1,2072 @@
+/*
+ * 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 <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_NULL	20
+
+/*
+ * 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)"),	/* 0 */
+	N_("Fix"),		/* 1 */
+	N_("Clear"),		/* 2 */
+	N_("Relocate"),		/* 3 */
+	N_("Allocate"),		/* 4 */
+	N_("Expand"),		/* 5 */
+	N_("Connect to /lost+found"), /* 6 */
+	N_("Create"),		/* 7 */
+	N_("Salvage"),		/* 8 */
+	N_("Truncate"),		/* 9 */
+	N_("Clear inode"),	/* 10 */
+	N_("Abort"),		/* 11 */
+	N_("Split"),		/* 12 */
+	N_("Continue"),		/* 13 */
+	N_("Clone multiply-claimed blocks"), /* 14 */
+	N_("Delete file"),	/* 15 */
+	N_("Suppress messages"),/* 16 */
+	N_("Unlink"),		/* 17 */
+	N_("Clear HTree index"),/* 18 */
+	N_("Recreate"),		/* 19 */
+	"",			/* 20 */
+};
+
+/*
+ * 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 */
+	"",			/* 20 */
+};
+
+static struct e2fsck_problem problem_table[] = {
+
+	/* Pre-Pass 1 errors */
+
+	/* Block bitmap 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 },
+
+	/* Inode bitmap 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 },
+
+	/* Inode table not in group */
+	{ 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 },
+
+	/* Superblock corrupt */
+	{ PR_0_SB_CORRUPT,
+	  N_("\nThe @S could not be read or does not describe a correct ext2\n"
+	  "@f.  If the @v is valid and it really contains an ext2\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 %S <@v>\n\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* 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 },
+
+	/* 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 },
+
+	  /* Bad blocks_per_group */
+	{ 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 },
+
+	/* Bad first_data_block */
+	{ 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 },
+
+	/* Adding UUID to filesystem */
+	{ PR_0_ADD_UUID,
+	  N_("@f did not have a UUID; generating one.\n\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Relocate hint */
+	{ PR_0_RELOCATE_HINT,
+	  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 },
+
+	/* 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 },
+
+	/* Error determing physical device size of filesystem */
+	{ PR_0_GETSIZE_ERROR,
+	  N_("Error determining size of the physical @v: %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Inode count in superblock is incorrect */
+	{ PR_0_INODE_COUNT_WRONG,
+	  N_("@i count in @S is %i, @s %j.\n"),
+	  PROMPT_FIX, 0 },
+
+	{ PR_0_HURD_CLEAR_FILETYPE,
+	  N_("The Hurd does not support the filetype feature.\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* Journal inode is invalid */
+	{ PR_0_JOURNAL_BAD_INODE,
+	  N_("@S has an @n @j (@i %i).\n"),
+	  PROMPT_CLEAR, PR_PREEN_OK },
+
+	/* The external journal has (unsupported) multiple filesystems */
+	{ PR_0_JOURNAL_UNSUPP_MULTIFS,
+	  N_("External @j has multiple @f users (unsupported).\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Can't find external journal */
+	{ PR_0_CANT_FIND_JOURNAL,
+	  N_("Can't find external @j\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* External journal has bad superblock */
+	{ PR_0_EXT_JOURNAL_BAD_SUPER,
+	  N_("External @j has bad @S\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Superblock has a bad journal UUID */
+	{ PR_0_JOURNAL_BAD_UUID,
+	  N_("External @j does not support this @f\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Journal has an unknown superblock 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 },
+
+	/* Journal superblock is corrupt */
+	{ PR_0_JOURNAL_BAD_SUPER,
+	  N_("@j @S is corrupt.\n"),
+	  PROMPT_FIX, PR_PREEN_OK },
+
+	/* 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 %s is present.\n"),
+	  PROMPT_CLEAR, PR_PREEN_OK },
+
+	/* Superblock needs_recovery flag is set but not 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 },
+
+	/* 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 },
+
+	/* Ask if we should clear the journal */
+	{ PR_0_JOURNAL_RESET_JOURNAL,
+	  N_("Clear @j"),
+	  PROMPT_NULL, PR_PREEN_NOMSG },
+
+	/* 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 },
+
+	/* 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 },
+
+	/* 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 },
+
+	/* 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 },
+
+	/* Illegal orphan inode in superblock */
+	{ PR_0_ORPHAN_ILLEGAL_HEAD_INODE,
+	  N_("@I @o @i %i in @S.\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Illegal inode in orphaned inode list */
+	{ PR_0_ORPHAN_ILLEGAL_INODE,
+	  N_("@I @i %i in @o @i list.\n"),
+	  PROMPT_NONE, 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 },
+
+	/* 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 },
+
+	/* Journal has unsupported version number */
+	{ PR_0_JOURNAL_UNSUPP_VERSION,
+	  N_("@j version not supported by this e2fsck.\n"),
+	  PROMPT_ABORT, 0 },
+
+	/* Moving journal to hidden file */
+	{ PR_0_MOVE_JOURNAL,
+	  N_("Moving @j from /%s to hidden @i.\n\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Error moving journal to hidden file */
+	{ PR_0_ERR_MOVE_JOURNAL,
+	  N_("Error moving @j: %m\n\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Clearing V2 journal superblock */
+	{ 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 },
+
+	/* Ask if we should run the journal anyway */
+	{ PR_0_JOURNAL_RUN,
+	  N_("Run @j anyway"),
+	  PROMPT_NULL, 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 },
+
+	/* Backup journal inode blocks */
+	{ PR_0_BACKUP_JNL,
+	  N_("Backing up @j @i @b information.\n\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Reserved blocks w/o resize_inode */
+	{ 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 },
+
+	/* Resize_inode not enabled, but 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 },
+
+	/* Resize inode invalid */
+	{ PR_0_RESIZE_INODE_INVALID,
+	  N_("Resize @i not valid.  "),
+	  PROMPT_RECREATE, 0 },
+
+	/* 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_NO_OK },
+
+	/* 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_NO_OK },
+
+	{ PR_0_EXTERNAL_JOURNAL_HINT,
+	  N_("@S hint for external superblock @s %X.  "),
+	     PROMPT_FIX, PR_PREEN_OK },
+
+	/* Adding dirhash hint */
+	{ PR_0_DIRHASH_HINT,
+	  N_("Adding dirhash hint to @f.\n\n"),
+	  PROMPT_NONE, 0 },
+
+	/* group descriptor N checksum is invalid. */
+	{ PR_0_GDT_CSUM,
+	  N_("@g descriptor %g checksum is %04x, should be %04y.  "),
+	     PROMPT_FIX, PR_LATCH_BG_CHECKSUM },
+
+	/* group descriptor N marked uninitialized without feature set. */
+	{ PR_0_GDT_UNINIT,
+	  N_("@g descriptor %g marked uninitialized without feature set.\n"),
+	     PROMPT_FIX, PR_PREEN_OK },
+
+	/* 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 },
+
+	/* Last group block bitmap uninitialized. */
+	{ PR_0_BB_UNINIT_LAST,
+	  N_("Last @g @b @B uninitialized.  "),
+	     PROMPT_FIX, PR_PREEN_OK },
+
+	/* Journal transaction found corrupt */
+	{ PR_0_JNL_TXN_CORRUPT,
+	  N_("Journal transaction %i was corrupt, replay was aborted.\n"),
+	  PROMPT_NONE, 0 },
+
+	{ PR_0_CLEAR_TESTFS_FLAG,
+	  N_("The test_fs flag is set (and ext4 is available).  "),
+	  PROMPT_CLEAR, PR_PREEN_OK },
+
+	/* 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)  "),
+	  PROMPT_FIX, PR_PREEN_OK | PR_NO_OK },
+
+	/* 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).  "),
+	  PROMPT_FIX, PR_PREEN_OK | PR_NO_OK },
+
+	/* Block group checksum (latch question) is invalid. */
+	{ PR_0_GDT_CSUM_LATCH,
+	  N_("One or more @b @g descriptor checksums are invalid.  "),
+	     PROMPT_FIX, PR_PREEN_OK },
+
+	/* Free inodes count wrong */
+	{ PR_0_FREE_INODE_COUNT,
+	  N_("Setting free @is count to %j (was %i)\n"),
+	  PROMPT_NONE, PR_PREEN_NOMSG },
+
+	/* Free blocks count wrong */
+	{ PR_0_FREE_BLOCK_COUNT,
+	  N_("Setting free @bs count to %c (was %b)\n"),
+	  PROMPT_NONE, PR_PREEN_NOMSG },
+
+	/* Making quota file hidden */
+	{ PR_0_HIDE_QUOTA,
+	  N_("Making @q @i %i (%Q) hidden.\n"),
+	  PROMPT_NONE, PR_PREEN_OK },
+
+	/* Superblock has invalid MMP block. */
+	{ PR_0_MMP_INVALID_BLK,
+	  N_("@S has invalid MMP block.  "),
+	  PROMPT_CLEAR, PR_PREEN_OK },
+
+	/* Superblock has invalid MMP magic. */
+	{ PR_0_MMP_INVALID_MAGIC,
+	  N_("@S has invalid MMP magic.  "),
+	  PROMPT_FIX, PR_PREEN_OK | PR_NO_OK},
+
+	/* Opening file system failed */
+	{ PR_0_OPEN_FAILED,
+	  N_("ext2fs_open2: %m\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Checking group descriptor failed */
+	{ PR_0_CHECK_DESC_FAILED,
+	  N_("ext2fs_check_desc: %m\n"),
+	  PROMPT_NONE, 0 },
+
+	/* 64bit is set but extents is unset. */
+	{ PR_0_64BIT_WITHOUT_EXTENTS,
+	  N_("@S 64bit filesystems needs extents to access the whole disk.  "),
+	  PROMPT_FIX, PR_PREEN_OK | PR_NO_OK},
+
+	/* 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, 0 },
+
+	/* Root directory is not an inode */
+	{ PR_1_ROOT_NO_DIR, N_("@r is not a @d.  "),
+	  PROMPT_CLEAR, 0 },
+
+	/* Root directory has dtime set */
+	{ PR_1_ROOT_DTIME,
+	  N_("@r has dtime set (probably due to old mke2fs).  "),
+	  PROMPT_FIX, PR_PREEN_OK },
+
+	/* Reserved inode has bad mode */
+	{ PR_1_RESERVED_BAD_MODE,
+	  N_("Reserved @i %i (%Q) has @n mode.  "),
+	  PROMPT_CLEAR, PR_PREEN_OK },
+
+	/* Deleted inode has zero dtime */
+	{ PR_1_ZERO_DTIME,
+	  N_("@D @i %i has zero dtime.  "),
+	  PROMPT_FIX, PR_PREEN_OK },
+
+	/* Inode in use, but dtime set */
+	{ PR_1_SET_DTIME,
+	  N_("@i %i is in use, but has dtime set.  "),
+	  PROMPT_FIX, PR_PREEN_OK },
+
+	/* Zero-length directory */
+	{ PR_1_ZERO_LENGTH_DIR,
+	  N_("@i %i is a @z @d.  "),
+	  PROMPT_CLEAR, PR_PREEN_OK },
+
+	/* Block bitmap conflicts with some other fs block */
+	{ PR_1_BB_CONFLICT,
+	  N_("@g %g's @b @B at %b @C.\n"),
+	  PROMPT_RELOCATE, 0 },
+
+	/* Inode bitmap conflicts with some other fs block */
+	{ PR_1_IB_CONFLICT,
+	  N_("@g %g's @i @B at %b @C.\n"),
+	  PROMPT_RELOCATE, 0 },
+
+	/* Inode table conflicts with some other fs block */
+	{ PR_1_ITABLE_CONFLICT,
+	  N_("@g %g's @i table at %b @C.\n"),
+	  PROMPT_RELOCATE, 0 },
+
+	/* Block bitmap is on a bad block */
+	{ PR_1_BB_BAD_BLOCK,
+	  N_("@g %g's @b @B (%b) is bad.  "),
+	  PROMPT_RELOCATE, 0 },
+
+	/* Inode bitmap is on a bad block */
+	{ PR_1_IB_BAD_BLOCK,
+	  N_("@g %g's @i @B (%b) is bad.  "),
+	  PROMPT_RELOCATE, 0 },
+
+	/* Inode has incorrect i_size */
+	{ PR_1_BAD_I_SIZE,
+	  N_("@i %i, i_size is %Is, @s %N.  "),
+	  PROMPT_FIX, PR_PREEN_OK },
+
+	/* Inode has incorrect i_blocks */
+	{ PR_1_BAD_I_BLOCKS,
+	  N_("@i %i, i_@bs is %Ib, @s %N.  "),
+	  PROMPT_FIX, PR_PREEN_OK },
+
+	/* Illegal blocknumber in inode */
+	{ PR_1_ILLEGAL_BLOCK_NUM,
+	  N_("@I %B (%b) in @i %i.  "),
+	  PROMPT_CLEAR, PR_LATCH_BLOCK },
+
+	/* Block number overlaps fs metadata */
+	{ PR_1_BLOCK_OVERLAPS_METADATA,
+	  N_("%B (%b) overlaps @f metadata in @i %i.  "),
+	  PROMPT_CLEAR, PR_LATCH_BLOCK },
+
+	/* Inode has illegal blocks (latch question) */
+	{ PR_1_INODE_BLOCK_LATCH,
+	  N_("@i %i has illegal @b(s).  "),
+	  PROMPT_CLEAR, 0 },
+
+	/* Too many bad blocks in inode */
+	{ PR_1_TOO_MANY_BAD_BLOCKS,
+	  N_("Too many illegal @bs in @i %i.\n"),
+	  PROMPT_CLEAR_INODE, PR_NO_OK },
+
+	/* 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 },
+
+	/* Bad block inode has illegal blocks (latch question) */
+	{ PR_1_INODE_BBLOCK_LATCH,
+	  N_("Bad @b @i has illegal @b(s).  "),
+	  PROMPT_CLEAR, 0 },
+
+	/* Duplicate or bad blocks in use! */
+	{ PR_1_DUP_BLOCKS_PREENSTOP,
+	  N_("Duplicate or bad @b in use!\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Bad block used as bad block indirect block */
+	{ PR_1_BBINODE_BAD_METABLOCK,
+	  N_("Bad @b %b used as bad @b @i indirect @b.  "),
+	  PROMPT_CLEAR, PR_LATCH_BBLOCK },
+
+	/* 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 },
+
+	/* 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 },
+
+	/* 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 },
+
+	/* Bad primary superblock */
+	{ 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 },
+
+	/* 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 },
+
+	/* Bad superblock in group */
+	{ PR_1_BAD_SUPERBLOCK,
+	  N_("Warning: Group %g's @S (%b) is bad.\n"),
+	  PROMPT_NONE, PR_PREEN_OK | PR_PREEN_NOMSG },
+
+	/* Bad block group descriptors in group */
+	{ 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 },
+
+	/* Block claimed for no reason */
+	{ PR_1_PROGERR_CLAIMED_BLOCK,
+	  N_("Programming error?  @b #%b claimed for no reason in "
+	  "process_bad_@b.\n"),
+	  PROMPT_NONE, PR_PREEN_OK },
+
+	/* Error allocating blocks for relocating metadata */
+	{ PR_1_RELOC_BLOCK_ALLOCATE,
+	  N_("@A %N contiguous @b(s) in @b @g %g for %s: %m\n"),
+	  PROMPT_NONE, PR_PREEN_OK },
+
+	/* Error allocating block buffer during relocation process */
+	{ PR_1_RELOC_MEMORY_ALLOCATE,
+	  N_("@A @b buffer for relocating %s\n"),
+	  PROMPT_NONE, PR_PREEN_OK },
+
+	/* Relocating metadata group 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 },
+
+	/* Relocating metatdata group information to X */
+	{ PR_1_RELOC_TO,
+	  N_("Relocating @g %g's %s to %c...\n"), /* xgettext:no-c-format */
+	  PROMPT_NONE, PR_PREEN_OK },
+
+	/* Block read error during relocation process */
+	{ PR_1_RELOC_READ_ERR,
+	  N_("Warning: could not read @b %b of %s: %m\n"),
+	  PROMPT_NONE, PR_PREEN_OK },
+
+	/* Block write error during relocation process */
+	{ PR_1_RELOC_WRITE_ERR,
+	  N_("Warning: could not write @b %b for %s: %m\n"),
+	  PROMPT_NONE, PR_PREEN_OK },
+
+	/* Error allocating inode bitmap */
+	{ PR_1_ALLOCATE_IBITMAP_ERROR,
+	  N_("@A @i @B (%N): %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error allocating block bitmap */
+	{ PR_1_ALLOCATE_BBITMAP_ERROR,
+	  N_("@A @b @B (%N): %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error allocating icount link information */
+	{ PR_1_ALLOCATE_ICOUNT,
+	  N_("@A icount link information: %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error allocating directory block array */
+	{ PR_1_ALLOCATE_DBCOUNT,
+	  N_("@A @d @b array: %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error while scanning inodes */
+	{ PR_1_ISCAN_ERROR,
+	  N_("Error while scanning @is (%i): %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error while iterating over blocks */
+	{ PR_1_BLOCK_ITERATE,
+	  N_("Error while iterating over @bs in @i %i: %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error while storing inode count information */
+	{ PR_1_ICOUNT_STORE,
+	  N_("Error storing @i count information (@i=%i, count=%N): %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error while 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 },
+
+	/* Error while reading inode (for clearing) */
+	{ PR_1_READ_INODE,
+	  N_("Error reading @i %i: %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Suppress messages prompt */
+	{ PR_1_SUPPRESS_MESSAGES, "", PROMPT_SUPPRESS, PR_NO_OK },
+
+	/* Imagic flag set on an inode when filesystem doesn't support it */
+	{ PR_1_SET_IMAGIC,
+	  N_("@i %i has imagic flag set.  "),
+	  PROMPT_CLEAR, 0 },
+
+	/* Immutable flag set on a device or socket inode */
+	{ PR_1_SET_IMMUTABLE,
+	  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 },
+
+	/* Compression flag set on an inode when filesystem doesn't support it */
+	{ PR_1_COMPR_SET,
+	  N_("@i %i has @cion flag set on @f without @cion support.  "),
+	  PROMPT_CLEAR, 0 },
+
+	/* Non-zero size for device, fifo or socket inode */
+	{ PR_1_SET_NONZSIZE,
+	  N_("Special (@v/socket/fifo) @i %i has non-zero size.  "),
+	  PROMPT_FIX, PR_PREEN_OK },
+
+	/* Filesystem revision is 0, but feature flags are set */
+	{ 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 },
+
+	/* 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 },
+
+	/* Journal has bad mode */
+	{ PR_1_JOURNAL_BAD_MODE,
+	  N_("@j is not regular file.  "),
+	  PROMPT_FIX, PR_PREEN_OK },
+
+	/* Deal with inodes that were part of orphan linked list */
+	{ PR_1_LOW_DTIME,
+	  N_("@i %i was part of the @o @i list.  "),
+	  PROMPT_FIX, PR_LATCH_LOW_DTIME, 0 },
+
+	/* Deal with inodes that were part of corrupted orphan linked
+	   list (latch question) */
+	{ PR_1_ORPHAN_LIST_REFUGEES,
+	  N_("@is that were part of a corrupted orphan linked list found.  "),
+	  PROMPT_FIX, 0 },
+
+	/* Error allocating refcount structure */
+	{ PR_1_ALLOCATE_REFCOUNT,
+	  N_("@A refcount structure (%N): %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error reading extended attribute block */
+	{ PR_1_READ_EA_BLOCK,
+	  N_("Error reading @a @b %b for @i %i.  "),
+	  PROMPT_CLEAR, 0 },
+
+	/* Invalid extended attribute block */
+	{ PR_1_BAD_EA_BLOCK,
+	  N_("@i %i has a bad @a @b %b.  "),
+	  PROMPT_CLEAR, 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 },
+
+	/* Extended attribute reference count incorrect */
+	{ PR_1_EXTATTR_REFCOUNT,
+	  N_("@a @b %b has reference count %r, @s %N.  "),
+	  PROMPT_FIX, 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 },
+
+	/* Multiple EA blocks not supported */
+	{ PR_1_EA_MULTI_BLOCK,
+	  N_("@a @b %b has h_@bs > 1.  "),
+	  PROMPT_CLEAR, 0},
+
+	/* Error allocating EA region allocation structure */
+	{ PR_1_EA_ALLOC_REGION_ABORT,
+	  N_("@A @a @b %b.  "),
+	  PROMPT_NONE, PR_FATAL},
+
+	/* Error EA allocation collision */
+	{ PR_1_EA_ALLOC_COLLISION,
+	  N_("@a @b %b is corrupt (allocation collision).  "),
+	  PROMPT_CLEAR, 0},
+
+	/* Bad extended attribute name */
+	{ PR_1_EA_BAD_NAME,
+	  N_("@a @b %b is corrupt (@n name).  "),
+	  PROMPT_CLEAR, 0},
+
+	/* Bad extended attribute value */
+	{ PR_1_EA_BAD_VALUE,
+	  N_("@a @b %b is corrupt (@n value).  "),
+	  PROMPT_CLEAR, 0},
+
+	/* Inode too big (latch question) */
+	{ PR_1_INODE_TOOBIG,
+	  N_("@i %i is too big.  "), PROMPT_TRUNCATE, 0 },
+
+	/* Directory too big */
+	{ PR_1_TOOBIG_DIR,
+	  N_("%B (%b) causes @d to be too big.  "),
+	  PROMPT_CLEAR, PR_LATCH_TOOBIG },
+
+	/* Regular file too big */
+	{ PR_1_TOOBIG_REG,
+	  N_("%B (%b) causes file to be too big.  "),
+	  PROMPT_CLEAR, PR_LATCH_TOOBIG },
+
+	/* Symlink too big */
+	{ PR_1_TOOBIG_SYMLINK,
+	  N_("%B (%b) causes symlink to be too big.  "),
+	  PROMPT_CLEAR, PR_LATCH_TOOBIG },
+
+	/* INDEX_FL flag set on a non-HTREE filesystem */
+	{ PR_1_HTREE_SET,
+	  N_("@i %i has INDEX_FL flag set on @f without htree support.\n"),
+	  PROMPT_CLEAR_HTREE, PR_PREEN_OK },
+
+	/* INDEX_FL flag set on a non-directory */
+	{ PR_1_HTREE_NODIR,
+	  N_("@i %i has INDEX_FL flag set but is not a @d.\n"),
+	  PROMPT_CLEAR_HTREE, PR_PREEN_OK },
+
+	/* Invalid root node in HTREE directory */
+	{ PR_1_HTREE_BADROOT,
+	  N_("@h %i has an @n root node.\n"),
+	  PROMPT_CLEAR_HTREE, PR_PREEN_OK },
+
+	/* Unsupported hash version in HTREE directory */
+	{ PR_1_HTREE_HASHV,
+	  N_("@h %i has an unsupported hash version (%N)\n"),
+	  PROMPT_CLEAR_HTREE, PR_PREEN_OK },
+
+	/* Incompatible flag in HTREE root node */
+	{ PR_1_HTREE_INCOMPAT,
+	  N_("@h %i uses an incompatible htree root node flag.\n"),
+	  PROMPT_CLEAR_HTREE, PR_PREEN_OK },
+
+	/* HTREE too deep */
+	{ PR_1_HTREE_DEPTH,
+	  N_("@h %i has a tree depth (%N) which is too big\n"),
+	  PROMPT_CLEAR_HTREE, PR_PREEN_OK },
+
+	/* Bad block has indirect block that conflicts with filesystem block */
+	{ 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 },
+
+	/* Resize inode failed */
+	{ PR_1_RESIZE_INODE_CREATE,
+	  N_("Resize @i (re)creation failed: %m."),
+	  PROMPT_CONTINUE, 0 },
+
+	/* invalid inode->i_extra_isize */
+	{ PR_1_EXTRA_ISIZE,
+	  N_("@i %i has a extra size (%IS) which is @n\n"),
+	  PROMPT_FIX, PR_PREEN_OK },
+
+	/* invalid ea entry->e_name_len */
+	{ PR_1_ATTR_NAME_LEN,
+	  N_("@a in @i %i has a namelen (%N) which is @n\n"),
+	  PROMPT_CLEAR, PR_PREEN_OK },
+
+	/* invalid ea entry->e_value_offs */
+	{ PR_1_ATTR_VALUE_OFFSET,
+	  N_("@a in @i %i has a value offset (%N) which is @n\n"),
+	  PROMPT_CLEAR, PR_PREEN_OK },
+
+	/* invalid ea entry->e_value_block */
+	{ 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 },
+
+	/* invalid ea entry->e_value_size */
+	{ PR_1_ATTR_VALUE_SIZE,
+	  N_("@a in @i %i has a value size (%N) which is @n\n"),
+	  PROMPT_CLEAR, PR_PREEN_OK },
+
+	/* invalid ea entry->e_hash */
+	{ PR_1_ATTR_HASH,
+	  N_("@a in @i %i has a hash (%N) which is @n\n"),
+	  PROMPT_CLEAR, PR_PREEN_OK },
+
+	/* inode appears to be 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 },
+
+	/* Error while reading extent tree */
+	{ PR_1_READ_EXTENT,
+	  N_("Error while reading over @x tree in @i %i: %m\n"),
+	  PROMPT_CLEAR_INODE, 0 },
+
+	/* Failure to iterate extents */
+	{ 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 },
+
+	/* Bad starting block in extent */
+	{ 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 },
+
+	/* Extent 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 },
+
+	/* EXTENTS_FL flag set on a non-extents filesystem */
+	{ PR_1_EXTENTS_SET,
+	  N_("@i %i has EXTENTS_FL flag set on @f without extents support.\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* inode has extents, superblock missing INCOMPAT_EXTENTS feature */
+	{ PR_1_EXTENT_FEATURE,
+	  N_("@i %i is in extent format, but @S is missing EXTENTS feature\n"),
+	  PROMPT_FIX, 0 },
+
+	/* inode missing EXTENTS_FL, but is an extent inode */
+	{ PR_1_UNSET_EXTENT_FL,
+	  N_("@i %i missing EXTENT_FL, but is in extents format\n"),
+	  PROMPT_FIX, PR_PREEN_OK },
+
+	/* Fast symlink has EXTENTS_FL set */
+	{ PR_1_FAST_SYMLINK_EXTENT_FL,
+	  N_("Fast symlink %i has EXTENT_FL set.  "),
+	  PROMPT_CLEAR, 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 },
+
+	{ PR_1_EXTENT_HEADER_INVALID,
+	  N_("@i %i has an invalid extent node (blk %b, lblk %c)\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* Failed to convert subcluster bitmap */
+	{ PR_1_CONVERT_SUBCLUSTER,
+	  N_("Error converting subcluster @b @B: %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Quota inode has bad mode */
+	{ PR_1_QUOTA_BAD_MODE,
+	  N_("@q @i is not regular file.  "),
+	  PROMPT_CLEAR, PR_PREEN_OK },
+
+	/* 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 },
+
+	/* Quota inode is user visible */
+	{ PR_1_QUOTA_INODE_NOT_HIDDEN,
+	  N_("@q @i is visible to the user.  "),
+	  PROMPT_CLEAR, PR_PREEN_OK },
+
+	/* Invalid bad inode */
+	{ PR_1_INVALID_BAD_INODE,
+	  N_("The bad @b @i looks @n.  "),
+	  PROMPT_CLEAR, 0 },
+
+	/* Extent has zero length */
+	{ 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 },
+
+	/*
+	 * Interior extent node logical offset doesn't match first node below it
+	 */
+	{ 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 },
+
+	/* Extent end is out of bounds for the tree */
+	{ 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 },
+
+
+	/* Error allocating memory for encrypted directory list */
+	{ PR_1_ALLOCATE_ENCRYPTED_DIRLIST,
+	  N_("@A memory for encrypted @d list\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* 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, 0 },
+
+	/* Duplicate/bad block(s) header */
+	{ PR_1B_DUP_BLOCK_HEADER,
+	  N_("@m @b(s) in @i %i:"),
+	  PROMPT_NONE, 0 },
+
+	/* Duplicate/bad block(s) in inode */
+	{ PR_1B_DUP_BLOCK,
+	  " %b",
+	  PROMPT_NONE, PR_LATCH_DBLOCK | PR_PREEN_NOHDR },
+
+	/* Duplicate/bad block(s) end */
+	{ PR_1B_DUP_BLOCK_END,
+	  "\n",
+	  PROMPT_NONE, PR_PREEN_NOHDR },
+
+	/* Error while scanning inodes */
+	{ PR_1B_ISCAN_ERROR,
+	  N_("Error while scanning inodes (%i): %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error allocating inode bitmap */
+	{ PR_1B_ALLOCATE_IBITMAP_ERROR,
+	  N_("@A @i @B (@i_dup_map): %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error while iterating over blocks */
+	{ PR_1B_BLOCK_ITERATE,
+	  N_("Error while iterating over @bs in @i %i (%s): %m\n"),
+	  PROMPT_NONE, 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 },
+
+	/* 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, 0 },
+
+
+	/* Pass 1D: Reconciling multiply-claimed blocks */
+	{ PR_1D_PASS_HEADER,
+	  N_("Pass 1D: Reconciling @m @bs\n"),
+	  PROMPT_NONE, 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 },
+
+	/* List of files sharing duplicate blocks */
+	{ PR_1D_DUP_FILE_LIST,
+	  N_("\t%Q (@i #%i, mod time %IM)\n"),
+	  PROMPT_NONE, 0 },
+
+	/* File sharing blocks with filesystem metadata  */
+	{ PR_1D_SHARE_METADATA,
+	  N_("\t<@f metadata>\n"),
+	  PROMPT_NONE, 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 },
+
+	/* Duplicated blocks already reassigned or cloned. */
+	{ PR_1D_DUP_BLOCKS_DEALT,
+	  N_("@m @bs already reassigned or cloned.\n\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Clone duplicate/bad blocks? */
+	{ PR_1D_CLONE_QUESTION,
+	  "", PROMPT_CLONE, PR_NO_OK },
+
+	/* Delete file? */
+	{ PR_1D_DELETE_QUESTION,
+	  "", PROMPT_DELETE, 0 },
+
+	/* Couldn't clone file (error) */
+	{ PR_1D_CLONE_ERROR,
+	  N_("Couldn't clone file: %m\n"), PROMPT_NONE, 0 },
+
+	/* Pass 2 errors */
+
+	/* Pass 2: Checking directory structure */
+	{ PR_2_PASS_HEADER,
+	  N_("Pass 2: Checking @d structure\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Bad inode number for '.' */
+	{ PR_2_BAD_INODE_DOT,
+	  N_("@n @i number for '.' in @d @i %i.\n"),
+	  PROMPT_FIX, 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 },
+
+	/* 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 },
+
+	/* Directry entry is link to '.' */
+	{ PR_2_LINK_DOT,
+	  N_("@E @L to '.'  "),
+	  PROMPT_CLEAR, 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 },
+
+	/* Directory entry contains a link to a directory */
+	{ PR_2_LINK_DIR,
+	  N_("@E @L to @d %P (%Di).\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* Directory entry contains a link to the root directry */
+	{ PR_2_LINK_ROOT,
+	  N_("@E @L to the @r.\n"),
+	  PROMPT_CLEAR, 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 },
+
+	/* Missing '.' in directory inode */
+	{ PR_2_MISSING_DOT,
+	  N_("Missing '.' in @d @i %i.\n"),
+	  PROMPT_FIX, 0 },
+
+	/* Missing '..' in directory inode */
+	{ PR_2_MISSING_DOT_DOT,
+	  N_("Missing '..' in @d @i %i.\n"),
+	  PROMPT_FIX, 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 },
+
+	/* 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 },
+
+	/* i_faddr should be zero */
+	{ PR_2_FADDR_ZERO,
+	  N_("i_faddr @F %IF, @s zero.\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* i_file_acl should be zero */
+	{ PR_2_FILE_ACL_ZERO,
+	  N_("i_file_acl @F %If, @s zero.\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* i_dir_acl should be zero */
+	{ PR_2_DIR_ACL_ZERO,
+	  N_("i_dir_acl @F %Id, @s zero.\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* i_frag should be zero */
+	{ PR_2_FRAG_ZERO,
+	  N_("i_frag @F %N, @s zero.\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* i_fsize should be zero */
+	{ PR_2_FSIZE_ZERO,
+	  N_("i_fsize @F %N, @s zero.\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* inode has bad mode */
+	{ PR_2_BAD_MODE,
+	  N_("@i %i (%Q) has @n mode (%Im).\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* directory corrupted */
+	{ PR_2_DIR_CORRUPTED,
+	  N_("@d @i %i, %B, offset %N: @d corrupted\n"),
+	  PROMPT_SALVAGE, 0 },
+
+	/* filename too long */
+	{ PR_2_FILENAME_LONG,
+	  N_("@d @i %i, %B, offset %N: filename too long\n"),
+	  PROMPT_TRUNCATE, 0 },
+
+	/* Directory inode has a missing block (hole) */
+	{ PR_2_DIRECTORY_HOLE,
+	  N_("@d @i %i has an unallocated %B.  "),
+	  PROMPT_ALLOCATE, 0 },
+
+	/* '.' is not NULL terminated */
+	{ PR_2_DOT_NULL_TERM,
+	  N_("'.' @d @e in @d @i %i is not NULL terminated\n"),
+	  PROMPT_FIX, 0 },
+
+	/* '..' is not NULL terminated */
+	{ PR_2_DOT_DOT_NULL_TERM,
+	  N_("'..' @d @e in @d @i %i is not NULL terminated\n"),
+	  PROMPT_FIX, 0 },
+
+	/* Illegal character device inode */
+	{ PR_2_BAD_CHAR_DEV,
+	  N_("@i %i (%Q) is an @I character @v.\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* Illegal block device inode */
+	{ PR_2_BAD_BLOCK_DEV,
+	  N_("@i %i (%Q) is an @I @b @v.\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* Duplicate '.' entry */
+	{ PR_2_DUP_DOT,
+	  N_("@E is duplicate '.' @e.\n"),
+	  PROMPT_FIX, 0 },
+
+	/* Duplicate '..' entry */
+	{ PR_2_DUP_DOT_DOT,
+	  N_("@E is duplicate '..' @e.\n"),
+	  PROMPT_FIX, 0 },
+
+	/* Internal error: couldn't find dir_info */
+	{ PR_2_NO_DIRINFO,
+	  N_("Internal error: couldn't find dir_info for %i.\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Final rec_len is wrong */
+	{ PR_2_FINAL_RECLEN,
+	  N_("@E has rec_len of %Dr, @s %N.\n"),
+	  PROMPT_FIX, 0 },
+
+	/* Error allocating icount structure */
+	{ PR_2_ALLOCATE_ICOUNT,
+	  N_("@A icount structure: %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error iterating over directory blocks */
+	{ PR_2_DBLIST_ITERATE,
+	  N_("Error iterating over @d @bs: %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error reading directory block */
+	{ PR_2_READ_DIRBLOCK,
+	  N_("Error reading @d @b %b (@i %i): %m\n"),
+	  PROMPT_CONTINUE, 0 },
+
+	/* Error writing directory block */
+	{ PR_2_WRITE_DIRBLOCK,
+	  N_("Error writing @d @b %b (@i %i): %m\n"),
+	  PROMPT_CONTINUE, 0 },
+
+	/* Error allocating new directory block */
+	{ PR_2_ALLOC_DIRBOCK,
+	  N_("@A new @d @b for @i %i (%s): %m\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Error deallocating inode */
+	{ PR_2_DEALLOC_INODE,
+	  N_("Error deallocating @i %i: %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Directory entry for '.' is big.  Split? */
+	{ PR_2_SPLIT_DOT,
+	  N_("@d @e for '.' in %p (%i) is big.\n"),
+	  PROMPT_SPLIT, PR_NO_OK },
+
+	/* Illegal FIFO inode */
+	{ PR_2_BAD_FIFO,
+	  N_("@i %i (%Q) is an @I FIFO.\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* Illegal socket inode */
+	{ PR_2_BAD_SOCKET,
+	  N_("@i %i (%Q) is an @I socket.\n"),
+	  PROMPT_CLEAR, 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 },
+
+	/* Directory filetype incorrect */
+	{ PR_2_BAD_FILETYPE,
+	  N_("@E has an incorrect filetype (was %Dt, @s %N).\n"),
+	  PROMPT_FIX, 0 },
+
+	/* Directory filetype set on filesystem */
+	{ PR_2_CLEAR_FILETYPE,
+	  N_("@E has filetype set.\n"),
+	  PROMPT_CLEAR, PR_PREEN_OK },
+
+	/* Directory filename is null */
+	{ PR_2_NULL_NAME,
+	  N_("@E has a @z name.\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* Invalid symlink */
+	{ PR_2_INVALID_SYMLINK,
+	  N_("Symlink %Q (@i #%i) is @n.\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* i_file_acl (extended attribute block) is bad */
+	{ PR_2_FILE_ACL_BAD,
+	  N_("@a @b @F @n (%If).\n"),
+	  PROMPT_CLEAR, 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, 0 },
+
+	/* Node in HTREE directory not referenced */
+	{ PR_2_HTREE_NOTREF,
+	  N_("@p @h %d: %B not referenced\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Node in HTREE directory referenced twice */
+	{ PR_2_HTREE_DUPREF,
+	  N_("@p @h %d: %B referenced twice\n"),
+	  PROMPT_NONE, 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 },
+
+	/* 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 },
+
+	/* Clear invalid HTREE directory */
+	{ PR_2_HTREE_CLEAR,
+	  N_("@n @h %d (%q).  "), PROMPT_CLEAR_HTREE, 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 },
+
+	/* 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 },
+
+	/* Invalid HTREE root node */
+	{ PR_2_HTREE_BAD_ROOT,
+	  N_("@p @h %d: root node is @n\n"),
+	  PROMPT_CLEAR_HTREE, PR_PREEN_OK },
+
+	/* Invalid HTREE limit */
+	{ PR_2_HTREE_BAD_LIMIT,
+	  N_("@p @h %d: %B has @n limit (%N)\n"),
+	  PROMPT_CLEAR_HTREE, PR_PREEN_OK },
+
+	/* Invalid HTREE count */
+	{ PR_2_HTREE_BAD_COUNT,
+	  N_("@p @h %d: %B has @n count (%N)\n"),
+	  PROMPT_CLEAR_HTREE, PR_PREEN_OK },
+
+	/* 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 },
+
+	/* 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 },
+
+	/* Duplicate directory entry found */
+	{ PR_2_DUPLICATE_DIRENT,
+	  N_("Duplicate @E found.  "),
+	  PROMPT_CLEAR, 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 },
+
+	/* 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 },
+
+	/* i_blocks_hi should be zero */
+	{ PR_2_BLOCKS_HI_ZERO,
+	  N_("i_blocks_hi @F %N, @s zero.\n"),
+	  PROMPT_CLEAR, 0 },
+
+	/* Unexpected HTREE block */
+	{ PR_2_UNEXPECTED_HTREE_BLOCK,
+	  N_("Unexpected @b in @h %d (%q).\n"), PROMPT_CLEAR_HTREE, 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 },
+
+	/* 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 },
+
+	/* 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 },
+
+	/* Pass 3 errors */
+
+	/* Pass 3: Checking directory connectivity */
+	{ PR_3_PASS_HEADER,
+	  N_("Pass 3: Checking @d connectivity\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Root inode not allocated */
+	{ PR_3_NO_ROOT_INODE,
+	  N_("@r not allocated.  "),
+	  PROMPT_ALLOCATE, 0 },
+
+	/* No room in lost+found */
+	{ PR_3_EXPAND_LF_DIR,
+	  N_("No room in @l @d.  "),
+	  PROMPT_EXPAND, 0 },
+
+	/* Unconnected directory inode */
+	{ PR_3_UNCONNECTED_DIR,
+	  N_("Unconnected @d @i %i (%p)\n"),
+	  PROMPT_CONNECT, 0 },
+
+	/* /lost+found not found */
+	{ PR_3_NO_LF_DIR,
+	  N_("/@l not found.  "),
+	  PROMPT_CREATE, PR_PREEN_OK },
+
+	/* .. entry is incorrect */
+	{ PR_3_BAD_DOT_DOT,
+	  N_("'..' in %Q (%i) is %P (%j), @s %q (%d).\n"),
+	  PROMPT_FIX, 0 },
+
+	/* Bad or non-existent /lost+found.  Cannot reconnect */
+	{ PR_3_NO_LPF,
+	  N_("Bad or non-existent /@l.  Cannot reconnect.\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Could not expand /lost+found */
+	{ PR_3_CANT_EXPAND_LPF,
+	  N_("Could not expand /@l: %m\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Could not reconnect inode */
+	{ PR_3_CANT_RECONNECT,
+	  N_("Could not reconnect %i: %m\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Error while trying to find /lost+found */
+	{ PR_3_ERR_FIND_LPF,
+	  N_("Error while trying to find /@l: %m\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Error in ext2fs_new_block while creating /lost+found */
+	{ PR_3_ERR_LPF_NEW_BLOCK,
+	  N_("ext2fs_new_@b: %m while trying to create /@l @d\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Error in ext2fs_new_inode while creating /lost+found */
+	{ PR_3_ERR_LPF_NEW_INODE,
+	  N_("ext2fs_new_@i: %m while trying to create /@l @d\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Error in ext2fs_new_dir_block while creating /lost+found */
+	{ PR_3_ERR_LPF_NEW_DIR_BLOCK,
+	  N_("ext2fs_new_dir_@b: %m while creating new @d @b\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Error while writing directory block for /lost+found */
+	{ PR_3_ERR_LPF_WRITE_BLOCK,
+	  N_("ext2fs_write_dir_@b: %m while writing the @d @b for /@l\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Error while adjusting inode count */
+	{ PR_3_ADJUST_INODE,
+	  N_("Error while adjusting @i count on @i %i\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Couldn't fix parent directory -- error */
+	{ PR_3_FIX_PARENT_ERR,
+	  N_("Couldn't fix parent of @i %i: %m\n\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Couldn't fix parent directory -- couldn't find it */
+	{ PR_3_FIX_PARENT_NOFIND,
+	  N_("Couldn't fix parent of @i %i: Couldn't find parent @d @e\n\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Error allocating inode bitmap */
+	{ PR_3_ALLOCATE_IBITMAP_ERROR,
+	  N_("@A @i @B (%N): %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error creating root directory */
+	{ PR_3_CREATE_ROOT_ERROR,
+	  N_("Error creating root @d (%s): %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error creating lost and found directory */
+	{ PR_3_CREATE_LPF_ERROR,
+	  N_("Error creating /@l @d (%s): %m\n"),
+	  PROMPT_NONE, 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 },
+
+	/* Cannot proceed without a root inode. */
+	{ PR_3_NO_ROOT_INODE_ABORT,
+	  N_("Cannot proceed without a @r.\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* 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 },
+
+	/* Lost+found not a directory */
+	{ PR_3_LPF_NOTDIR,
+	  N_("/@l is not a @d (ino=%i)\n"),
+	  PROMPT_UNLINK, 0 },
+
+	/* Pass 3A Directory Optimization	*/
+
+	/* Pass 3A: Optimizing directories */
+	{ PR_3A_PASS_HEADER,
+	  N_("Pass 3A: Optimizing directories\n"),
+	  PROMPT_NONE, PR_PREEN_NOMSG },
+
+	/* Error iterating over directories */
+	{ PR_3A_OPTIMIZE_ITER,
+	  N_("Failed to create dirs_to_hash iterator: %m\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Error rehash directory */
+	{ PR_3A_OPTIMIZE_DIR_ERR,
+	  N_("Failed to optimize directory %q (%d): %m\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Rehashing dir header */
+	{ PR_3A_OPTIMIZE_DIR_HEADER,
+	  N_("Optimizing directories: "),
+	  PROMPT_NONE, PR_MSG_ONLY },
+
+	/* Rehashing directory %d */
+	{ PR_3A_OPTIMIZE_DIR,
+	  " %d",
+	  PROMPT_NONE, PR_LATCH_OPTIMIZE_DIR | PR_PREEN_NOHDR},
+
+	/* Rehashing dir end */
+	{ PR_3A_OPTIMIZE_DIR_END,
+	  "\n",
+	  PROMPT_NONE, PR_PREEN_NOHDR },
+
+	/* Pass 4 errors */
+
+	/* Pass 4: Checking reference counts */
+	{ PR_4_PASS_HEADER,
+	  N_("Pass 4: Checking reference counts\n"),
+	  PROMPT_NONE, 0 },
+
+	/* Unattached zero-length inode */
+	{ PR_4_ZERO_LEN_INODE,
+	  N_("@u @z @i %i.  "),
+	  PROMPT_CLEAR, PR_PREEN_OK|PR_NO_OK },
+
+	/* Unattached inode */
+	{ PR_4_UNATTACHED_INODE,
+	  N_("@u @i %i\n"),
+	  PROMPT_CONNECT, 0 },
+
+	/* Inode ref count wrong */
+	{ PR_4_BAD_REF_COUNT,
+	  N_("@i %i ref count is %Il, @s %N.  "),
+	  PROMPT_FIX, PR_PREEN_OK },
+
+	{ 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 },
+
+	/* Pass 5 errors */
+
+	/* Pass 5: Checking group summary information */
+	{ PR_5_PASS_HEADER,
+	  N_("Pass 5: Checking @g summary information\n"),
+	  PROMPT_NONE, 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 },
+
+	/* 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 },
+
+	/* Block bitmap differences header */
+	{ PR_5_BLOCK_BITMAP_HEADER,
+	  N_("@b @B differences: "),
+	  PROMPT_NONE, PR_PREEN_OK | PR_PREEN_NOMSG},
+
+	/* Block not used, but marked in bitmap */
+	{ PR_5_BLOCK_UNUSED,
+	  " -%b",
+	  PROMPT_NONE, PR_LATCH_BBITMAP | PR_PREEN_OK | PR_PREEN_NOMSG },
+
+	/* Block used, but not marked used in bitmap */
+	{ PR_5_BLOCK_USED,
+	  " +%b",
+	  PROMPT_NONE, PR_LATCH_BBITMAP | PR_PREEN_OK | PR_PREEN_NOMSG },
+
+	/* Block bitmap differences end */
+	{ PR_5_BLOCK_BITMAP_END,
+	  "\n",
+	  PROMPT_FIX, PR_PREEN_OK | PR_PREEN_NOMSG },
+
+	/* Inode bitmap differences header */
+	{ PR_5_INODE_BITMAP_HEADER,
+	  N_("@i @B differences: "),
+	  PROMPT_NONE, PR_PREEN_OK | PR_PREEN_NOMSG },
+
+	/* Inode not used, but marked in bitmap */
+	{ PR_5_INODE_UNUSED,
+	  " -%i",
+	  PROMPT_NONE, PR_LATCH_IBITMAP | PR_PREEN_OK | PR_PREEN_NOMSG },
+
+	/* Inode used, but not marked used in bitmap */
+	{ PR_5_INODE_USED,
+	  " +%i",
+	  PROMPT_NONE, PR_LATCH_IBITMAP | PR_PREEN_OK | PR_PREEN_NOMSG },
+
+	/* Inode bitmap differences end */
+	{ PR_5_INODE_BITMAP_END,
+	  "\n",
+	  PROMPT_FIX, PR_PREEN_OK | PR_PREEN_NOMSG },
+
+	/* 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 },
+
+	/* 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 },
+
+	/* 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 },
+
+	/* 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 },
+
+	/* 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 },
+
+	/* 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 },
+
+	/* Internal error: fudging end of bitmap */
+	{ PR_5_FUDGE_BITMAP_ERROR,
+	  N_("Internal error: fudging end of bitmap (%N)\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error copying in replacement inode bitmap */
+	{ PR_5_COPY_IBITMAP_ERROR,
+	  N_("Error copying in replacement @i @B: %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* Error copying in replacement block bitmap */
+	{ PR_5_COPY_BBITMAP_ERROR,
+	  N_("Error copying in replacement @b @B: %m\n"),
+	  PROMPT_NONE, PR_FATAL },
+
+	/* 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 },
+
+	/* 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 },
+
+	/* 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 },
+
+	/* 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 },
+
+	/* Group N block(s) in use but group is marked BLOCK_UNINIT */
+	{ PR_5_BLOCK_UNINIT,
+	  N_("@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"),
+	  PROMPT_FIX, PR_PREEN_OK },
+
+	/* Group N inode(s) in use but group is marked INODE_UNINIT */
+	{ PR_5_INODE_UNINIT,
+	  N_("@g %g @i(s) in use but @g is marked INODE_UNINIT\n"),
+	  PROMPT_FIX, PR_PREEN_OK },
+
+	/* 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 },
+
+	/* 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 }
+};
+
+/*
+ * 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 },
+	{ PR_LATCH_BBLOCK, PR_1_INODE_BBLOCK_LATCH, 0 },
+	{ PR_LATCH_IBITMAP, PR_5_INODE_BITMAP_HEADER, PR_5_INODE_BITMAP_END },
+	{ PR_LATCH_BBITMAP, PR_5_BLOCK_BITMAP_HEADER, PR_5_BLOCK_BITMAP_END },
+	{ PR_LATCH_RELOC, PR_0_RELOCATE_HINT, 0 },
+	{ PR_LATCH_DBLOCK, PR_1B_DUP_BLOCK_HEADER, PR_1B_DUP_BLOCK_END },
+	{ PR_LATCH_LOW_DTIME, PR_1_ORPHAN_LIST_REFUGEES, 0 },
+	{ PR_LATCH_TOOBIG, PR_1_INODE_TOOBIG, 0 },
+	{ PR_LATCH_OPTIMIZE_DIR, PR_3A_OPTIMIZE_DIR_HEADER, PR_3A_OPTIMIZE_DIR_END },
+	{ PR_LATCH_BG_CHECKSUM, PR_0_GDT_CSUM_LATCH, 0 },
+	{ -1, 0, 0 },
+};
+
+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->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;
+}
+
+
+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;
+
+	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");
+		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);
+		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 ((ptr->flags & PR_LATCH_MASK) &&
+		    (ldesc->flags & (PRL_YES | PRL_NO)))
+			suppress++;
+		if (ptr->count == ptr->max_count + 1) {
+			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 ((ptr->flags & PR_LATCH_MASK) &&
+			   (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);
+
+	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/e2fsprogs/e2fsck/problem.h b/e2fsprogs/e2fsck/problem.h
new file mode 100644
index 0000000..240326e
--- /dev/null
+++ b/e2fsprogs/e2fsck/problem.h
@@ -0,0 +1,1057 @@
+/*
+ * 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%
+ */
+
+#include <stdint.h>
+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;
+	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(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 not in group */
+#define PR_0_BB_NOT_GROUP	0x000001
+
+/* Inode bitmap not in group */
+#define PR_0_IB_NOT_GROUP	0x000002
+
+/* Inode table not in group */
+#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
+
+/* Bad blocks_per_group */
+#define PR_0_BLOCKS_PER_GROUP	0x000007
+
+/* Bad first_data_block */
+#define PR_0_FIRST_DATA_BLOCK	0x000008
+
+/* Adding UUID to filesystem */
+#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 determing 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
+
+/* Journal inode is invalid */
+#define PR_0_JOURNAL_BAD_INODE	0x00000F
+
+/* The external journal has multiple filesystems (which we can't handle yet) */
+#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
+
+/* Journal has an unknown superblock type */
+#define PR_0_JOURNAL_UNSUPP_SUPER 0x000014
+
+/* Journal superblock is corrupt */
+#define PR_0_JOURNAL_BAD_SUPER	0x000015
+
+/* Journal superblock is corrupt */
+#define PR_0_JOURNAL_HAS_JOURNAL 0x000016
+
+/* Superblock has recovery flag set but no journal */
+#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 has unsupported version number */
+#define PR_0_JOURNAL_UNSUPP_VERSION		0x000027
+
+/* Moving journal to hidden file */
+#define	PR_0_MOVE_JOURNAL			0x000028
+
+/* Error moving journal */
+#define	PR_0_ERR_MOVE_JOURNAL			0x000029
+
+/* Clearing V2 journal superblock */
+#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
+
+/* Backup journal inode blocks */
+#define PR_0_BACKUP_JNL				0x00002D
+
+/* Reserved blocks w/o resize_inode */
+#define PR_0_NONZERO_RESERVED_GDT_BLOCKS	0x00002E
+
+/* Resize_inode not enabled, but resize inode is non-zero */
+#define PR_0_CLEAR_RESIZE_INODE			0x00002F
+
+/* Resize inode invalid */
+#define PR_0_RESIZE_INODE_INVALID		0x000030
+
+/* Last mount time is in the future */
+#define PR_0_FUTURE_SB_LAST_MOUNT		0x000031
+
+/* Last write time is in the future */
+#define PR_0_FUTURE_SB_LAST_WRITE		0x000032
+
+/* Superblock hint for external journal incorrect */
+#define PR_0_EXTERNAL_JOURNAL_HINT		0x000033
+
+/* Superblock hint for external journal incorrect */
+#define PR_0_DIRHASH_HINT			0x000034
+
+/* Group descriptor N checksum is invalid */
+#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 found corrupt */
+#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
+
+/* Block group checksum (latch question) */
+#define PR_0_GDT_CSUM_LATCH			0x00003E
+
+/* Free inodes count wrong */
+#define PR_0_FREE_INODE_COUNT			0x00003F
+
+/* Free blocks count wrong */
+#define PR_0_FREE_BLOCK_COUNT			0x000040
+
+/* Make quota file 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
+
+/* 64bit is set but extents are not set. */
+#define PR_0_64BIT_WITHOUT_EXTENTS		0x000048
+
+/*
+ * Pass 1 errors
+ */
+
+/* Pass 1: Checking inodes, blocks, and sizes */
+#define PR_1_PASS_HEADER		0x010000
+
+/* Root directory is not an inode */
+#define PR_1_ROOT_NO_DIR		0x010001
+
+/* Root directory has dtime set */
+#define PR_1_ROOT_DTIME			0x010002
+
+/* Reserved inode has bad mode */
+#define PR_1_RESERVED_BAD_MODE		0x010003
+
+/* Deleted inode has zero dtime */
+#define PR_1_ZERO_DTIME			0x010004
+
+/* Inode in use, but dtime set */
+#define PR_1_SET_DTIME			0x010005
+
+/* Zero-length directory */
+#define PR_1_ZERO_LENGTH_DIR		0x010006
+
+/* Block bitmap conflicts with some other fs block */
+#define PR_1_BB_CONFLICT		0x010007
+
+/* Inode bitmap conflicts with some other fs block */
+#define PR_1_IB_CONFLICT		0x010008
+
+/* Inode table conflicts with some other fs block */
+#define PR_1_ITABLE_CONFLICT		0x010009
+
+/* Block bitmap is on a bad block */
+#define PR_1_BB_BAD_BLOCK		0x01000A
+
+/* Inode bitmap is on a bad block */
+#define PR_1_IB_BAD_BLOCK		0x01000B
+
+/* Inode has incorrect i_size */
+#define PR_1_BAD_I_SIZE			0x01000C
+
+/* Inode has incorrect i_blocks */
+#define PR_1_BAD_I_BLOCKS		0x01000D
+
+/* Illegal block number in inode */
+#define PR_1_ILLEGAL_BLOCK_NUM		0x01000E
+
+/* Block number overlaps fs metadata */
+#define PR_1_BLOCK_OVERLAPS_METADATA	0x01000F
+
+/* Inode has illegal blocks (latch question) */
+#define PR_1_INODE_BLOCK_LATCH		0x010010
+
+/* Too many bad 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 used as bad block 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
+
+/* Bad primary superblock */
+#define PR_1_BAD_PRIMARY_SUPERBLOCK	0x010019
+
+/* Bad primary block group descriptors */
+#define PR_1_BAD_PRIMARY_GROUP_DESCRIPTOR 0x01001A
+
+/* Bad superblock in group */
+#define PR_1_BAD_SUPERBLOCK		0x01001B
+
+/* Bad block group descriptors in group */
+#define PR_1_BAD_GROUP_DESCRIPTORS	0x01001C
+
+/* Block claimed for no reason */
+#define PR_1_PROGERR_CLAIMED_BLOCK	0x01001D
+
+/* Error allocating blocks for relocating metadata */
+#define PR_1_RELOC_BLOCK_ALLOCATE	0x01001E
+
+/* Error allocating block buffer during relocation process */
+#define PR_1_RELOC_MEMORY_ALLOCATE	0x01001F
+
+/* Relocating metadata group information from X to Y */
+#define PR_1_RELOC_FROM_TO		0x010020
+
+/* Relocating metatdata group information to X */
+#define PR_1_RELOC_TO			0x010021
+
+/* Block read error during relocation process */
+#define PR_1_RELOC_READ_ERR		0x010022
+
+/* Block write error during 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 structure */
+#define PR_1_ALLOCATE_ICOUNT		0x010026
+
+/* Error allocating dbcount */
+#define PR_1_ALLOCATE_DBCOUNT		0x010027
+
+/* Error while scanning inodes */
+#define PR_1_ISCAN_ERROR		0x010028
+
+/* Error while iterating over blocks */
+#define PR_1_BLOCK_ITERATE		0x010029
+
+/* Error while storing inode count information */
+#define PR_1_ICOUNT_STORE		0x01002A
+
+/* Error while storing directory block information */
+#define PR_1_ADD_DBLOCK			0x01002B
+
+/* Error while reading inode (for clearing) */
+#define PR_1_READ_INODE			0x01002C
+
+/* Suppress messages prompt */
+#define PR_1_SUPPRESS_MESSAGES		0x01002D
+
+/* Imagic flag set on an inode when filesystem 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 */
+#define PR_1_COMPR_SET			0x010031
+
+/* Non-zero size on on device, fifo or socket inode */
+#define PR_1_SET_NONZSIZE		0x010032
+
+/* Filesystem revision is 0, but feature flags are set */
+#define PR_1_FS_REV_LEVEL		0x010033
+
+/* Journal inode not in use, needs clearing */
+#define PR_1_JOURNAL_INODE_NOT_CLEAR	0x010034
+
+/* Journal inode has wrong mode */
+#define PR_1_JOURNAL_BAD_MODE		0x010035
+
+/* Inode that was part of orphan linked list */
+#define PR_1_LOW_DTIME			0x010036
+
+/* Latch question which asks how to deal with low dtime inodes */
+#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
+
+/* Invalid 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 reference count incorrect */
+#define PR_1_EXTATTR_REFCOUNT		0x01003C
+
+/* Error writing Extended Attribute block while fixing refcount */
+#define PR_1_EXTATTR_WRITE_ABORT	0x01003D
+
+/* Multiple EA blocks not supported */
+#define PR_1_EA_MULTI_BLOCK		0x01003E
+
+/* Error allocating EA region allocation structure */
+#define PR_1_EA_ALLOC_REGION_ABORT	0x01003F
+
+/* Error EA allocation collision */
+#define PR_1_EA_ALLOC_COLLISION		0x010040
+
+/* Bad extended attribute name */
+#define PR_1_EA_BAD_NAME		0x010041
+
+/* Bad extended attribute value */
+#define PR_1_EA_BAD_VALUE		0x010042
+
+/* Inode too big (latch question) */
+#define PR_1_INODE_TOOBIG		0x010043
+
+/* Directory too big */
+#define PR_1_TOOBIG_DIR			0x010044
+
+/* Regular file too big */
+#define PR_1_TOOBIG_REG			0x010045
+
+/* Symlink too big */
+#define PR_1_TOOBIG_SYMLINK		0x010046
+
+/* INDEX_FL flag set on a non-HTREE filesystem */
+#define PR_1_HTREE_SET			0x010047
+
+/* INDEX_FL flag set on a non-directory */
+#define PR_1_HTREE_NODIR		0x010048
+
+/* Invalid root node in HTREE directory */
+#define PR_1_HTREE_BADROOT		0x010049
+
+/* Unsupported hash version in HTREE directory */
+#define PR_1_HTREE_HASHV		0x01004A
+
+/* Incompatible flag in HTREE root node */
+#define PR_1_HTREE_INCOMPAT		0x01004B
+
+/* HTREE too deep */
+#define PR_1_HTREE_DEPTH		0x01004C
+
+/* Bad block has indirect block that conflicts with filesystem block */
+#define PR_1_BB_FS_BLOCK		0x01004D
+
+/* Resize inode failed */
+#define PR_1_RESIZE_INODE_CREATE	0x01004E
+
+/* inode->i_size is too long */
+#define PR_1_EXTRA_ISIZE		0x01004F
+
+/* attribute name is too long */
+#define PR_1_ATTR_NAME_LEN		0x010050
+
+/* wrong EA value offset */
+#define PR_1_ATTR_VALUE_OFFSET		0x010051
+
+/* wrong EA blocknumber */
+#define PR_1_ATTR_VALUE_BLOCK		0x010052
+
+/* wrong EA value size */
+#define PR_1_ATTR_VALUE_SIZE		0x010053
+
+/* wrong EA hash value */
+#define PR_1_ATTR_HASH			0x010054
+
+/* inode appears to be a directory */
+#define PR_1_TREAT_AS_DIRECTORY		0x010055
+
+/* Error while reading extent tree */
+#define PR_1_READ_EXTENT		0x010056
+
+/* Failure to iterate extents */
+#define PR_1_EXTENT_ITERATE_FAILURE	0x010057
+
+/* Bad starting block in extent */
+#define PR_1_EXTENT_BAD_START_BLK	0x010058
+
+/* Extent ends beyond filesystem */
+#define PR_1_EXTENT_ENDS_BEYOND		0x010059
+
+/* EXTENTS_FL flag set on a non-extents capable filesystem */
+#define PR_1_EXTENTS_SET		0x01005A
+
+/* inode has extents, superblock missing INCOMPAT_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 bitmap */
+#define PR_1_CONVERT_SUBCLUSTER		0x010061
+
+/* Quota inode has wrong mode */
+#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 user visible */
+#define PR_1_QUOTA_INODE_NOT_HIDDEN	0x010064
+
+/* Invalid bad inode */
+#define PR_1_INVALID_BAD_INODE		0x010065
+
+/* Extent has zero length */
+#define PR_1_EXTENT_LENGTH_ZERO		0x010066
+
+/* Index start doesn't match start of next extent down */
+#define PR_1_EXTENT_INDEX_START_INVALID	0x01006D
+
+#define PR_1_EXTENT_END_OUT_OF_BOUNDS	0x01006E
+/*
+ * 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
+
+/* 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
+
+/* Error allocating memory for encrypted directory list */
+#define PR_1_ALLOCATE_ENCRYPTED_DIRLIST		0x01007E
+
+/*
+ * 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
+
+/* Directry 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 directry */
+#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_dir_acl should be zero */
+#define PR_2_DIR_ACL_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
+
+/* Clear the htree flag forcibly */
+/* #define PR_2_HTREE_FCLR	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
+
+/*
+ * 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
+
+/*
+ * Pass 3a --- rehashing diretories
+ */
+/* 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 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
+
+/*
+ * 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 rangeused, 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
+
+/*
+ * 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
+
+/*
+ * 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/e2fsprogs/e2fsck/problemP.h b/e2fsprogs/e2fsck/problemP.h
new file mode 100644
index 0000000..7944cd6
--- /dev/null
+++ b/e2fsprogs/e2fsck/problemP.h
@@ -0,0 +1,46 @@
+/*
+ * 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 */
diff --git a/e2fsprogs/e2fsck/prof_err.c b/e2fsprogs/e2fsck/prof_err.c
new file mode 100644
index 0000000..2c8d43b
--- /dev/null
+++ b/e2fsprogs/e2fsck/prof_err.c
@@ -0,0 +1,85 @@
+/*
+ * prof_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_("Profile version 0.0"),
+	N_("Bad magic value in profile_node"),
+	N_("Profile section not found"),
+	N_("Profile relation not found"),
+	N_(	"Attempt to add a relation to node which is not a section"),
+	N_(	"A profile section header has a non-zero value"),
+	N_("Bad linked list in profile structures"),
+	N_("Bad group level in profile structures"),
+	N_(	"Bad parent pointer in profile structures"),
+	N_("Bad magic value in profile iterator"),
+	N_("Can't set value on section node"),
+	N_("Invalid argument passed to profile library"),
+	N_("Attempt to modify read-only profile"),
+	N_("Profile section header not at top level"),
+	N_("Syntax error in profile section header"),
+	N_("Syntax error in profile relation"),
+	N_("Extra closing brace in profile"),
+	N_("Missing open brace in profile"),
+	N_("Bad magic value in profile_t"),
+	N_("Bad magic value in profile_section_t"),
+	N_(	"Iteration through all top level section not supported"),
+	N_("Invalid profile_section object"),
+	N_("No more sections"),
+	N_("Bad nameset passed to query routine"),
+	N_("No profile file open"),
+	N_("Bad magic value in profile_file_t"),
+	N_("Couldn't open profile file"),
+	N_("Section already exists"),
+	N_("Invalid boolean value"),
+	N_("Invalid integer value"),
+	N_("Bad magic value in profile_file_data_t"),
+    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_prof_error_table = { text, -1429577728L, 31 };
+
+static struct et_list link = { 0, 0 };
+
+void initialize_prof_error_table_r(struct et_list **list);
+void initialize_prof_error_table(void);
+
+void initialize_prof_error_table(void) {
+    initialize_prof_error_table_r(&_et_list);
+}
+
+/* For Heimdal compatibility */
+void initialize_prof_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_prof_error_table;
+    et->next = 0;
+    *end = et;
+}
diff --git a/e2fsprogs/e2fsck/prof_err.et b/e2fsprogs/e2fsck/prof_err.et
new file mode 100644
index 0000000..c9316c7
--- /dev/null
+++ b/e2fsprogs/e2fsck/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/e2fsprogs/e2fsck/prof_err.h b/e2fsprogs/e2fsck/prof_err.h
new file mode 100644
index 0000000..e8066dd
--- /dev/null
+++ b/e2fsprogs/e2fsck/prof_err.h
@@ -0,0 +1,49 @@
+/*
+ * prof_err.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <et/com_err.h>
+
+#define PROF_VERSION                             (-1429577728L)
+#define PROF_MAGIC_NODE                          (-1429577727L)
+#define PROF_NO_SECTION                          (-1429577726L)
+#define PROF_NO_RELATION                         (-1429577725L)
+#define PROF_ADD_NOT_SECTION                     (-1429577724L)
+#define PROF_SECTION_WITH_VALUE                  (-1429577723L)
+#define PROF_BAD_LINK_LIST                       (-1429577722L)
+#define PROF_BAD_GROUP_LVL                       (-1429577721L)
+#define PROF_BAD_PARENT_PTR                      (-1429577720L)
+#define PROF_MAGIC_ITERATOR                      (-1429577719L)
+#define PROF_SET_SECTION_VALUE                   (-1429577718L)
+#define PROF_EINVAL                              (-1429577717L)
+#define PROF_READ_ONLY                           (-1429577716L)
+#define PROF_SECTION_NOTOP                       (-1429577715L)
+#define PROF_SECTION_SYNTAX                      (-1429577714L)
+#define PROF_RELATION_SYNTAX                     (-1429577713L)
+#define PROF_EXTRA_CBRACE                        (-1429577712L)
+#define PROF_MISSING_OBRACE                      (-1429577711L)
+#define PROF_MAGIC_PROFILE                       (-1429577710L)
+#define PROF_MAGIC_SECTION                       (-1429577709L)
+#define PROF_TOPSECTION_ITER_NOSUPP              (-1429577708L)
+#define PROF_INVALID_SECTION                     (-1429577707L)
+#define PROF_END_OF_SECTIONS                     (-1429577706L)
+#define PROF_BAD_NAMESET                         (-1429577705L)
+#define PROF_NO_PROFILE                          (-1429577704L)
+#define PROF_MAGIC_FILE                          (-1429577703L)
+#define PROF_FAIL_OPEN                           (-1429577702L)
+#define PROF_EXISTS                              (-1429577701L)
+#define PROF_BAD_BOOLEAN                         (-1429577700L)
+#define PROF_BAD_INTEGER                         (-1429577699L)
+#define PROF_MAGIC_FILE_DATA                     (-1429577698L)
+extern const struct error_table et_prof_error_table;
+extern void initialize_prof_error_table(void);
+
+/* For compatibility with Heimdal */
+extern void initialize_prof_error_table_r(struct et_list **list);
+
+#define ERROR_TABLE_BASE_prof (-1429577728L)
+
+/* for compatibility with older versions... */
+#define init_prof_err_tbl initialize_prof_error_table
+#define prof_err_base ERROR_TABLE_BASE_prof
diff --git a/e2fsprogs/e2fsck/profile.c b/e2fsprogs/e2fsck/profile.c
new file mode 100644
index 0000000..845b061
--- /dev/null
+++ b/e2fsprogs/e2fsck/profile.c
@@ -0,0 +1,1903 @@
+/*
+ * 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.
+ *
+ */
+
+#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 <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 **files, profile_t *ret_profile)
+{
+	const char **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);
+		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->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;
+		}
+	}
+	new->magic = PROF_MAGIC_NODE;
+
+	*ret_node = new;
+	return 0;
+}
+
+/*
+ * This function verifies that all of the representation invarients 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 interate 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 == 0 ||
+		    (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? */
+			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) {
+			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) {
+		iter->file = iter->file->next;
+		iter->node = 0;
+		skip_num = 0;
+		goto get_new_file;
+	}
+	if ((iter->node = p->next) == NULL)
+		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, 10);
+
+	/* 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, 10);
+
+	/* 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/e2fsprogs/e2fsck/profile.h b/e2fsprogs/e2fsck/profile.h
new file mode 100644
index 0000000..4cc10eb
--- /dev/null
+++ b/e2fsprogs/e2fsck/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 * *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/e2fsprogs/e2fsck/profile_helpers.c b/e2fsprogs/e2fsck/profile_helpers.c
new file mode 100644
index 0000000..c6b5c44
--- /dev/null
+++ b/e2fsprogs/e2fsck/profile_helpers.c
@@ -0,0 +1,309 @@
+/*
+ * 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 <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#include <et/com_err.h>
+#include "profile.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)))
+		return retval;
+
+	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);
+	return retval;
+}
+
+/*
+ * This function will return the list of the names of subections 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)))
+		return retval;
+
+	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);
+	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)))
+		return retval;
+
+	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);
+	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 **) filenames,
+			      ret_profile);
+
+	/* count back down and free the entries */
+	while(--i >= 0) free(filenames[i]);
+	free(filenames);
+
+	return retval;
+}
diff --git a/e2fsprogs/e2fsck/profile_helpers.h b/e2fsprogs/e2fsck/profile_helpers.h
new file mode 100644
index 0000000..af63ca5
--- /dev/null
+++ b/e2fsprogs/e2fsck/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/e2fsprogs/e2fsck/quota.c b/e2fsprogs/e2fsck/quota.c
new file mode 100644
index 0000000..7d24ccf
--- /dev/null
+++ b/e2fsprogs/e2fsck/quota.c
@@ -0,0 +1,81 @@
+/*
+ * quota.c --- code for handling ext4 quota inodes
+ *
+ */
+
+#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"
+#include "quota/mkquota.h"
+#include "quota/quotaio.h"
+
+static void move_quota_inode(ext2_filsys fs, ext2_ino_t from_ino,
+			     ext2_ino_t to_ino, int qtype)
+{
+	struct ext2_inode	inode;
+	char			qf_name[QUOTA_NAME_LEN];
+
+	/* We need the inode bitmap to be loaded */
+	if (ext2fs_read_bitmaps(fs))
+		return;
+
+	if (ext2fs_read_inode(fs, from_ino, &inode))
+		return;
+
+	inode.i_links_count = 1;
+	inode.i_mode = LINUX_S_IFREG | 0600;
+	inode.i_flags = EXT2_IMMUTABLE_FL;
+	if (fs->super->s_feature_incompat &
+			EXT3_FEATURE_INCOMPAT_EXTENTS)
+		inode.i_flags |= EXT4_EXTENTS_FL;
+
+	ext2fs_write_new_inode(fs, to_ino, &inode);
+	/* unlink the old inode */
+	quota_get_qf_name(qtype, QFMT_VFS_V1, qf_name);
+	ext2fs_unlink(fs, EXT2_ROOT_INO, qf_name, from_ino, 0);
+	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);
+}
+
+void e2fsck_hide_quota(e2fsck_t ctx)
+{
+	struct ext2_super_block *sb = ctx->fs->super;
+	struct problem_context	pctx;
+	ext2_filsys		fs = ctx->fs;
+
+	clear_problem_context(&pctx);
+
+	if ((ctx->options & E2F_OPT_READONLY) ||
+	    !(sb->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_QUOTA))
+		return;
+
+	pctx.ino = sb->s_usr_quota_inum;
+	if (sb->s_usr_quota_inum &&
+	    (sb->s_usr_quota_inum != EXT4_USR_QUOTA_INO) &&
+	    fix_problem(ctx, PR_0_HIDE_QUOTA, &pctx)) {
+		move_quota_inode(fs, sb->s_usr_quota_inum, EXT4_USR_QUOTA_INO,
+				 USRQUOTA);
+		sb->s_usr_quota_inum = EXT4_USR_QUOTA_INO;
+	}
+
+	pctx.ino = sb->s_grp_quota_inum;
+	if (sb->s_grp_quota_inum &&
+	    (sb->s_grp_quota_inum != EXT4_GRP_QUOTA_INO) &&
+	    fix_problem(ctx, PR_0_HIDE_QUOTA, &pctx)) {
+		move_quota_inode(fs, sb->s_grp_quota_inum, EXT4_GRP_QUOTA_INO,
+				 GRPQUOTA);
+		sb->s_grp_quota_inum = EXT4_GRP_QUOTA_INO;
+	}
+
+	return;
+}
diff --git a/e2fsprogs/e2fsck/recovery.c b/e2fsprogs/e2fsck/recovery.c
new file mode 100644
index 0000000..905edd9
--- /dev/null
+++ b/e2fsprogs/e2fsck/recovery.c
@@ -0,0 +1,748 @@
+/*
+ * linux/fs/jbd/recovery.c
+ *
+ * Written by Stephen C. Tweedie <sct@redhat.com>, 1999
+ *
+ * Copyright 1999-2000 Red Hat Software --- 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.
+ *
+ * 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/jbd.h>
+#include <linux/errno.h>
+#include <linux/slab.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;
+};
+
+enum passtype {PASS_SCAN, PASS_REVOKE, PASS_REPLAY};
+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_maxlen)
+		max = journal->j_maxlen;
+
+	/* 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 = journal_bmap(journal, next, &blocknr);
+
+		if (err) {
+			printk (KERN_ERR "JBD: 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(READ, nbufs, bufs);
+				journal_brelse_array(bufs, nbufs);
+				nbufs = 0;
+			}
+		} else
+			brelse(bh);
+	}
+
+	if (nbufs)
+		ll_rw_block(READ, 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_maxlen) {
+		printk(KERN_ERR "JBD: corrupted journal superblock\n");
+		return -EIO;
+	}
+
+	err = journal_bmap(journal, offset, &blocknr);
+
+	if (err) {
+		printk (KERN_ERR "JBD: 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 "JBD: Failed to read block at offset %u\n",
+			offset);
+		brelse(bh);
+		return -EIO;
+	}
+
+	*bhp = bh;
+	return 0;
+}
+
+
+/*
+ * 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);
+
+	tagp = &bh->b_data[sizeof(journal_header_t)];
+
+	while ((tagp - bh->b_data + tag_bytes) <= size) {
+		tag = (journal_block_tag_t *) tagp;
+
+		nr++;
+		tagp += tag_bytes;
+		if (!(tag->t_flags & cpu_to_be32(JFS_FLAG_SAME_UUID)))
+			tagp += 16;
+
+		if (tag->t_flags & cpu_to_be32(JFS_FLAG_LAST_TAG))
+			break;
+	}
+
+	return nr;
+}
+
+
+/* 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)
+
+/**
+ * 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 journal_recover(journal_t *journal)
+{
+	int			err;
+	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, "JBD: recovery, exit status %d, "
+		  "recovered transactions %u to %u\n",
+		  err, info.start_transaction, info.end_transaction);
+	jbd_debug(1, "JBD: 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;
+
+	journal_clear_revoke(journal);
+	sync_blockdev(journal->j_fs_dev);
+	return err;
+}
+
+/**
+ * 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 does'nt appear to be exorted..
+ *
+ * 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 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 "JBD: error %d scanning journal\n", err);
+		++journal->j_transaction_sequence;
+	} else {
+#ifdef CONFIG_JBD_DEBUG
+		journal_superblock_t *sb = journal->j_superblock;
+
+		int dropped = info.end_transaction - be32_to_cpu(sb->s_sequence);
+#endif
+		jbd_debug(1,
+			  "JBD: ignoring %d transaction%s from the journal.\n",
+			  dropped, (dropped == 1) ? "" : "s");
+		journal->j_transaction_sequence = ++info.end_transaction;
+	}
+
+	journal->j_tail = 0;
+	return err;
+}
+
+static inline unsigned long long read_tag_block(int tag_bytes, journal_block_tag_t *tag)
+{
+	unsigned long long block = be32_to_cpu(tag->t_blocknr);
+	if (tag_bytes > JBD_TAG_SIZE32)
+		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 long *next_log_block, __u32 *crc32_sum)
+{
+	int i, num_blks, err;
+	unsigned long 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 "JBD: IO error %d recovering block "
+				"%llu in log\n", err, io_block);
+			return 1;
+		} else {
+			*crc32_sum = crc32_be(*crc32_sum, (void *)obh->b_data,
+				     obh->b_size);
+		}
+		brelse(obh);
+	}
+	return 0;
+}
+
+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 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 */
+
+	/*
+	 * 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 %llu/%lu\n",
+			  next_commit_ID, next_log_block, journal->j_last);
+
+		/* Skip over each chunk of the transaction looking
+		 * either the next descriptor block or the final commit
+		 * record. */
+
+		jbd_debug(3, "JBD: checking block %llu\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(JFS_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 JFS_DESCRIPTOR_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 &&
+				    JFS_HAS_COMPAT_FEATURE(journal,
+					    JFS_FEATURE_COMPAT_CHECKSUM) &&
+				    !info->end_transaction) {
+					if (calc_chksums(journal, bh,
+							&next_log_block,
+							&crc32_sum)) {
+						brelse(bh);
+						break;
+					}
+					brelse(bh);
+					continue;
+				}
+				next_log_block += count_tags(journal, bh);
+				wrap(journal, next_log_block);
+				brelse(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) {
+				unsigned long long io_block;
+
+				tag = (journal_block_tag_t *) tagp;
+				flags = be32_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
+						"JBD: IO error %d recovering "
+						"block %llu in log\n",
+						err, io_block);
+				} else {
+					unsigned long long blocknr;
+
+					J_ASSERT(obh != NULL);
+					blocknr = read_tag_block(tag_bytes,
+								 tag);
+
+					/* If the block has been
+					 * revoked, then we're all done
+					 * here. */
+					if (journal_test_revoke
+					    (journal, blocknr,
+					     next_commit_ID)) {
+						brelse(obh);
+						++info->nr_revoke_hits;
+						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
+						       "JBD: 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 & JFS_FLAG_ESCAPE) {
+						journal_header_t *header;
+
+						header = (journal_header_t *) &nbh->b_data[0];
+						header->h_magic = cpu_to_be32(JFS_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 & JFS_FLAG_SAME_UUID))
+					tagp += 16;
+
+				if (flags & JFS_FLAG_LAST_TAG)
+					break;
+			}
+
+			brelse(bh);
+			continue;
+
+		case JFS_COMMIT_BLOCK:
+			jbd_debug(3, "Commit block for #%u found\n",
+				  next_commit_ID);
+			/*     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".)
+			 */
+
+			/* 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 &&
+			    JFS_HAS_COMPAT_FEATURE(journal,
+				    JFS_FEATURE_COMPAT_CHECKSUM)) {
+				int chksum_err, chksum_seen;
+				struct commit_header *cbh =
+					(struct commit_header *)bh->b_data;
+				unsigned found_chksum =
+					be32_to_cpu(cbh->h_chksum[0]);
+
+				chksum_err = chksum_seen = 0;
+
+				jbd_debug(3, "Checksums %x %x\n",
+					  crc32_sum, found_chksum);
+				if (info->end_transaction) {
+					journal->j_failed_commit =
+						info->end_transaction;
+					brelse(bh);
+					break;
+				}
+
+				if (crc32_sum == found_chksum &&
+				    cbh->h_chksum_type == JBD2_CRC32_CHKSUM &&
+				    cbh->h_chksum_size ==
+						JBD2_CRC32_CHKSUM_SIZE)
+				       chksum_seen = 1;
+				else if (!(cbh->h_chksum_type == 0 &&
+					     cbh->h_chksum_size == 0 &&
+					     found_chksum == 0 &&
+					     !chksum_seen))
+				/*
+				 * If fs is mounted using an old kernel and then
+				 * kernel with journal_chksum is used then we
+				 * get a situation where the journal flag has
+				 * checksum flag set but checksums are not
+				 * present i.e chksum = 0, in the individual
+				 * commit blocks.
+				 * Hence to avoid checksum failures, in this
+				 * situation, this extra check is added.
+				 */
+						chksum_err = 1;
+
+				if (chksum_err) {
+					info->end_transaction = next_commit_ID;
+					jbd_debug(1, "Checksum_err %x %x\n",
+						  crc32_sum, found_chksum);
+					if (!JFS_HAS_INCOMPAT_FEATURE(journal,
+					   JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)){
+						journal->j_failed_commit =
+							next_commit_ID;
+						brelse(bh);
+						break;
+					}
+				}
+				crc32_sum = ~0;
+			}
+			brelse(bh);
+			next_commit_ID++;
+			continue;
+
+		case JFS_REVOKE_BLOCK:
+			/* 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 "JBD: recovery pass %d ended at "
+				"transaction %u, expected %u\n",
+				pass, next_commit_ID, info->end_transaction);
+			if (!success)
+				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)
+{
+	journal_revoke_header_t *header;
+	int offset, max;
+	int record_len = 4;
+
+	header = (journal_revoke_header_t *) bh->b_data;
+	offset = sizeof(journal_revoke_header_t);
+	max = be32_to_cpu(header->r_count);
+
+	if (JFS_HAS_INCOMPAT_FEATURE(journal, JFS_FEATURE_INCOMPAT_64BIT))
+		record_len = 8;
+
+	while (offset < max) {
+		unsigned long long blocknr;
+		int err;
+
+		if (record_len == 4) {
+			__be32 b;
+			memcpy(&b, bh->b_data + offset, sizeof(__be32));
+			blocknr = ext2fs_be32_to_cpu(b);
+		} else {
+			__be64 b;
+			memcpy(&b, bh->b_data + offset, sizeof(__be64));
+			blocknr = ext2fs_be64_to_cpu(b);
+		}
+
+		offset += record_len;
+		err = journal_set_revoke(journal, blocknr, sequence);
+		if (err)
+			return err;
+		++info->nr_revokes;
+	}
+	return 0;
+}
diff --git a/e2fsprogs/e2fsck/region.c b/e2fsprogs/e2fsck/region.c
new file mode 100644
index 0000000..547d3de
--- /dev/null
+++ b/e2fsprogs/e2fsck/region.c
@@ -0,0 +1,207 @@
+/*
+ * 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%
+ */
+
+#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;
+};
+
+region_t region_create(region_addr_t min, region_addr_t max)
+{
+	region_t	region;
+
+	region = malloc(sizeof(struct region_struct));
+	if (!region)
+		return NULL;
+	memset(region, 0, sizeof(struct region_struct));
+	region->min = min;
+	region->max = max;
+	return region;
+}
+
+void region_free(region_t region)
+{
+	struct region_el	*r, *next;
+
+	for (r = region->allocated; r; r = next) {
+		next = r->next;
+		free(r);
+	}
+	memset(region, 0, sizeof(struct region_struct));
+	free(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;
+
+	end = start+n;
+	if ((start < region->min) || (end > region->max))
+		return -1;
+	if (n == 0)
+		return 1;
+
+	/*
+	 * Search through the linked list.  If we find that it
+	 * conflicts witih 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;
+					free(next);
+					return 0;
+				}
+			}
+			r->end = end;
+			return 0;
+		}
+		if (start < r->start)
+			break;
+	}
+	/*
+	 * Insert a new region element structure into the linked list
+	 */
+	new_region = malloc(sizeof(struct region_el));
+	if (!new_region)
+		return -1;
+	new_region->start = start;
+	new_region->end = start + n;
+	new_region->next = r;
+	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=%d. max=%d)\n\t", region->min,
+		region->max);
+	for (r = region->allocated; r; r = r->next) {
+		fprintf(f, "(%d, %d)  ", r->start, 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(%d, %d)\n",
+			       start, 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(%d, %d) returns %d\n",
+			       start, end, ret);
+			break;
+		case BCODE_PRINT:
+			region_print(r, stdout);
+			break;
+		}
+	}
+}
+
+#endif /* TEST_PROGRAM */
diff --git a/e2fsprogs/e2fsck/rehash.c b/e2fsprogs/e2fsck/rehash.c
new file mode 100644
index 0000000..fdfea21
--- /dev/null
+++ b/e2fsprogs/e2fsck/rehash.c
@@ -0,0 +1,903 @@
+/*
+ * 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 <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include "e2fsck.h"
+#include "problem.h"
+
+struct fill_dir_struct {
+	char *buf;
+	struct ext2_inode *inode;
+	errcode_t err;
+	e2fsck_t ctx;
+	struct hash_entry *harray;
+	int max_array, num_array;
+	unsigned int dir_size;
+	int compress;
+	ino_t parent;
+};
+
+struct hash_entry {
+	ext2_dirhash_t	hash;
+	ext2_dirhash_t	minor_hash;
+	ino_t		ino;
+	struct ext2_dir_entry	*dir;
+};
+
+struct out_dir {
+	int		num;
+	int		max;
+	char		*buf;
+	ext2_dirhash_t	*hashes;
+};
+
+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 	*new_array, *ent;
+	struct ext2_dir_entry 	*dirent;
+	char			*dir;
+	unsigned int		offset, dir_offset, rec_len;
+	int			hash_alg;
+
+	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 (HOLE_BLKADDR(*block_nr)) {
+		memset(dir, 0, fs->blocksize);
+		dirent = (struct ext2_dir_entry *) dir;
+		(void) ext2fs_set_rec_len(fs, fs->blocksize, dirent);
+	} else {
+		fd->err = ext2fs_read_dir_block3(fs, *block_nr, dir, 0);
+		if (fd->err)
+			return BLOCK_ABORT;
+	}
+	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) {
+		dirent = (struct ext2_dir_entry *) (dir + dir_offset);
+		(void) ext2fs_get_rec_len(fs, dirent, &rec_len);
+		if (((dir_offset + rec_len) > fs->blocksize) ||
+		    (rec_len < 8) ||
+		    ((rec_len % 4) != 0) ||
+		    (((dirent->name_len & 0xFF)+8U) > rec_len)) {
+			fd->err = EXT2_ET_DIR_CORRUPTED;
+			return BLOCK_ABORT;
+		}
+		dir_offset += rec_len;
+		if (dirent->inode == 0)
+			continue;
+		if (!fd->compress && ((dirent->name_len&0xFF) == 1) &&
+		    (dirent->name[0] == '.'))
+			continue;
+		if (!fd->compress && ((dirent->name_len&0xFF) == 2) &&
+		    (dirent->name[0] == '.') && (dirent->name[1] == '.')) {
+			fd->parent = dirent->inode;
+			continue;
+		}
+		if (fd->num_array >= fd->max_array) {
+			new_array = realloc(fd->harray,
+			    sizeof(struct hash_entry) * (fd->max_array+500));
+			if (!new_array) {
+				fd->err = ENOMEM;
+				return BLOCK_ABORT;
+			}
+			fd->harray = new_array;
+			fd->max_array += 500;
+		}
+		ent = fd->harray + fd->num_array++;
+		ent->dir = dirent;
+		fd->dir_size += EXT2_DIR_REC_LEN(dirent->name_len & 0xFF);
+		ent->ino = dirent->inode;
+		if (fd->compress)
+			ent->hash = ent->minor_hash = 0;
+		else {
+			fd->err = ext2fs_dirhash(hash_alg, dirent->name,
+						 dirent->name_len & 0xFF,
+						 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);
+}
+
+/* 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;
+	int	ret;
+	int	min_len;
+
+	min_len = he_a->dir->name_len;
+	if (min_len > he_b->dir->name_len)
+		min_len = he_b->dir->name_len;
+
+	ret = strncmp(he_a->dir->name, he_b->dir->name, min_len);
+	if (ret == 0) {
+		if (he_a->dir->name_len > he_b->dir->name_len)
+			ret = 1;
+		else if (he_a->dir->name_len < he_b->dir->name_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)
+{
+	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
+			ret = name_cmp(a, b);
+	}
+	return ret;
+}
+
+static errcode_t alloc_size_dir(ext2_filsys fs, struct out_dir *outdir,
+				int blocks)
+{
+	void			*new_mem;
+
+	if (outdir->max) {
+		new_mem = realloc(outdir->buf, blocks * fs->blocksize);
+		if (!new_mem)
+			return ENOMEM;
+		outdir->buf = new_mem;
+		new_mem = realloc(outdir->hashes,
+				  blocks * sizeof(ext2_dirhash_t));
+		if (!new_mem)
+			return ENOMEM;
+		outdir->hashes = new_mem;
+	} else {
+		outdir->buf = malloc(blocks * fs->blocksize);
+		outdir->hashes = malloc(blocks * sizeof(ext2_dirhash_t));
+		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) {
+		retval = alloc_size_dir(fs, outdir, outdir->max + 50);
+		if (retval)
+			return retval;
+	}
+	*ret = outdir->buf + (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, __u16 *len)
+{
+	int	i;
+	__u16	l = *len & 0xFF, h = *len & 0xff00;
+
+	/*
+	 * 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 == l-1) || (str[i] != '~')) {
+		if (((l-1) & 3) < 2)
+			l += 2;
+		else
+			l = (l+3) & ~3;
+		str[l-2] = '~';
+		str[l-1] = '0';
+		*len = l | h;
+		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)
+{
+	struct problem_context	pctx;
+	struct hash_entry 	*ent, *prev;
+	int			i, j;
+	int			fixed = 0;
+	char			new_name[256];
+	__u16			new_len;
+	int			hash_alg;
+
+	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 ||
+		    ((ent->dir->name_len & 0xFF) !=
+		     (prev->dir->name_len & 0xFF)) ||
+		    (strncmp(ent->dir->name, prev->dir->name,
+			     ent->dir->name_len & 0xFF)))
+			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;
+		}
+		memcpy(new_name, ent->dir->name, ent->dir->name_len & 0xFF);
+		new_len = ent->dir->name_len;
+		mutate_name(new_name, &new_len);
+		for (j=0; j < fd->num_array; j++) {
+			if ((i==j) ||
+			    ((new_len & 0xFF) !=
+			     (fd->harray[j].dir->name_len & 0xFF)) ||
+			    (strncmp(new_name, fd->harray[j].dir->name,
+				     new_len & 0xFF)))
+				continue;
+			mutate_name(new_name, &new_len);
+
+			j = -1;
+		}
+		new_name[new_len & 0xFF] = 0;
+		pctx.str = new_name;
+		if (fix_problem(ctx, PR_2_NON_UNIQUE_FILE, &pctx)) {
+			memcpy(ent->dir->name, new_name, new_len & 0xFF);
+			ent->dir->name_len = new_len;
+			ext2fs_dirhash(hash_alg, ent->dir->name,
+				       ent->dir->name_len & 0xFF,
+				       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;
+	int			i;
+	ext2_dirhash_t		prev_hash;
+
+	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;
+	}
+
+	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;
+	slack = fd->compress ? 12 :
+		(fs->blocksize * ctx->htree_slack_percentage)/100;
+	if (slack < 12)
+		slack = 12;
+	for (i = 0; i < fd->num_array; i++) {
+		ent = fd->harray + i;
+		if (ent->dir->inode == 0)
+			continue;
+		rec_len = EXT2_DIR_REC_LEN(ent->dir->name_len & 0xFF);
+		if (rec_len > left) {
+			if (left) {
+				left += prev_rec_len;
+				retval = ext2fs_set_rec_len(fs, left, dirent);
+				if (retval)
+					return retval;
+			}
+			if ((retval = get_next_block(fs, outdir,
+						      &block_start)))
+				return retval;
+			offset = 0;
+		}
+		left = fs->blocksize - 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;
+		dirent->name_len = ent->dir->name_len;
+		retval = ext2fs_set_rec_len(fs, rec_len, dirent);
+		if (retval)
+			return retval;
+		prev_rec_len = rec_len;
+		memcpy(dirent->name, ent->dir->name, dirent->name_len & 0xFF);
+		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);
+
+	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_dir_entry 		*dir;
+	struct ext2_dx_root_info  	*root;
+	struct ext2_dx_countlimit	*limits;
+	int				filetype = 0;
+
+	if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_FILETYPE)
+		filetype = EXT2_FT_DIR << 8;
+
+	memset(buf, 0, fs->blocksize);
+	dir = (struct ext2_dir_entry *) buf;
+	dir->inode = ino;
+	dir->name[0] = '.';
+	dir->name_len = 1 | filetype;
+	dir->rec_len = 12;
+	dir = (struct ext2_dir_entry *) (buf + 12);
+	dir->inode = parent;
+	dir->name[0] = '.';
+	dir->name[1] = '.';
+	dir->name_len = 2 | filetype;
+	dir->rec_len = fs->blocksize - 12;
+
+	root = (struct ext2_dx_root_info *) (buf+24);
+	root->reserved_zero = 0;
+	root->hash_version = fs->super->s_def_hash_version;
+	root->info_length = 8;
+	root->indirect_levels = 0;
+	root->unused_flags = 0;
+
+	limits = (struct ext2_dx_countlimit *) (buf+32);
+	limits->limit = (fs->blocksize - 32) / 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;
+
+	memset(buf, 0, fs->blocksize);
+	dir = (struct ext2_dir_entry *) buf;
+	dir->inode = 0;
+	(void) ext2fs_set_rec_len(fs, fs->blocksize, dir);
+
+	limits = (struct ext2_dx_countlimit *) (buf+8);
+	limits->limit = (fs->blocksize - 8) / sizeof(struct ext2_dx_entry);
+	limits->count = 0;
+
+	return (struct ext2_dx_entry *) limits;
+}
+
+/*
+ * 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_dx_root_info  	*root_info;
+	struct ext2_dx_entry 		*root, *dx_ent = 0;
+	struct ext2_dx_countlimit	*root_limit, *limit;
+	errcode_t			retval;
+	char				* block_start;
+	int				i, c1, c2, nblks;
+	int				limit_offset, root_offset;
+
+	root_info = set_root_node(fs, outdir->buf, ino, parent);
+	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 {
+		c2 = 0;
+		limit = 0;
+		root_info->indirect_levels = 1;
+		for (i=1; i < nblks; i++) {
+			if (c1 == 0)
+				return ENOSPC;
+			if (c2 == 0) {
+				if (limit)
+					limit->limit = limit->count =
+		ext2fs_cpu_to_le16(limit->limit);
+				root = (struct ext2_dx_entry *)
+					(outdir->buf + root_offset);
+				root->block = ext2fs_cpu_to_le32(outdir->num);
+				if (i != 1)
+					root->hash =
+			ext2fs_cpu_to_le32(outdir->hashes[i]);
+				if ((retval =  get_next_block(fs, outdir,
+							      &block_start)))
+					return retval;
+				dx_ent = set_int_node(fs, block_start);
+				limit = (struct ext2_dx_countlimit *) dx_ent;
+				c2 = limit->limit;
+				root_offset += sizeof(struct ext2_dx_entry);
+				c1--;
+			}
+			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);
+	}
+	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;
+	e2fsck_t	ctx;
+	blk64_t		cleared;
+};
+
+/*
+ * 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;
+	blk64_t	blk;
+	char	*dir;
+
+	if (*block_nr == 0)
+		return 0;
+	if (blockcnt >= wd->outdir->num) {
+		e2fsck_read_bitmaps(wd->ctx);
+		blk = *block_nr;
+		/*
+		 * In theory, we only release blocks from the end of the
+		 * directory file, so it's fine to clobber a whole cluster at
+		 * once.
+		 */
+		if (blk % EXT2FS_CLUSTER_RATIO(fs) == 0) {
+			ext2fs_unmark_block_bitmap2(wd->ctx->block_found_map,
+						    blk);
+			ext2fs_block_alloc_stats2(fs, blk, -1);
+			wd->cleared++;
+		}
+		*block_nr = 0;
+		return BLOCK_CHANGED;
+	}
+	if (blockcnt < 0)
+		return 0;
+
+	dir = wd->outdir->buf + (blockcnt * fs->blocksize);
+	wd->err = ext2fs_write_dir_block3(fs, *block_nr, dir, 0);
+	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, int compress)
+{
+	struct write_dir_struct wd;
+	errcode_t	retval;
+	struct ext2_inode 	inode;
+
+	retval = e2fsck_expand_directory(ctx, ino, -1, outdir->num);
+	if (retval)
+		return retval;
+
+	wd.outdir = outdir;
+	wd.err = 0;
+	wd.ctx = ctx;
+	wd.cleared = 0;
+
+	retval = ext2fs_block_iterate3(fs, ino, 0, 0,
+				       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;
+	inode.i_size = outdir->num * fs->blocksize;
+	ext2fs_iblk_sub_blocks(fs, &inode, wd.cleared);
+	e2fsck_write_inode(ctx, ino, &inode, "rehash_dir");
+
+	return 0;
+}
+
+errcode_t e2fsck_rehash_dir(e2fsck_t ctx, ext2_ino_t ino)
+{
+	ext2_filsys 		fs = ctx->fs;
+	errcode_t		retval;
+	struct ext2_inode 	inode;
+	char			*dir_buf = 0;
+	struct fill_dir_struct	fd;
+	struct out_dir		outdir;
+
+	outdir.max = outdir.num = 0;
+	outdir.buf = 0;
+	outdir.hashes = 0;
+	e2fsck_read_inode(ctx, ino, &inode, "rehash_dir");
+
+	retval = ENOMEM;
+	fd.harray = 0;
+	dir_buf = malloc(inode.i_size);
+	if (!dir_buf)
+		goto errout;
+
+	fd.max_array = inode.i_size / 32;
+	fd.num_array = 0;
+	fd.harray = malloc(fd.max_array * sizeof(struct hash_entry));
+	if (!fd.harray)
+		goto errout;
+
+	fd.ctx = ctx;
+	fd.buf = dir_buf;
+	fd.inode = &inode;
+	fd.err = 0;
+	fd.dir_size = 0;
+	fd.compress = 0;
+	if (!(fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX) ||
+	    (inode.i_size / fs->blocksize) < 2)
+		fd.compress = 1;
+	fd.parent = 0;
+
+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)
+		qsort(fd.harray+2, fd.num_array-2, sizeof(struct hash_entry),
+		      hash_cmp);
+	else
+		qsort(fd.harray, fd.num_array, sizeof(struct hash_entry),
+		      hash_cmp);
+
+	/*
+	 * Look for duplicates
+	 */
+	if (duplicate_search_and_fix(ctx, fs, ino, &fd))
+		goto resort;
+
+	if (ctx->options & E2F_OPT_NO) {
+		retval = 0;
+		goto errout;
+	}
+
+	/* Sort non-hashed directories by inode number */
+	if (fd.compress)
+		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);
+		if (retval)
+			goto errout;
+	}
+
+	retval = write_directory(ctx, fs, &outdir, ino, fd.compress);
+	if (retval)
+		goto errout;
+
+errout:
+	free(dir_buf);
+	free(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;
+
+	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 (ino == ctx->lost_and_found)
+			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);
+		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/e2fsprogs/e2fsck/revoke.c b/e2fsprogs/e2fsck/revoke.c
new file mode 100644
index 0000000..c43e40e
--- /dev/null
+++ b/e2fsprogs/e2fsck/revoke.c
@@ -0,0 +1,640 @@
+/*
+ * linux/fs/revoke.c
+ *
+ * Written by Stephen C. Tweedie <sct@redhat.com>, 2000
+ *
+ * Copyright 2000 Red Hat corp --- 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.
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+#ifndef __KERNEL__
+#include "jfs_user.h"
+#else
+#include <linux/sched.h>
+#include <linux/fs.h>
+#include <linux/jbd.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/locks.h>
+#include <linux/list.h>
+#include <linux/smp_lock.h>
+#include <linux/init.h>
+#endif
+
+static lkmem_cache_t *revoke_record_cache;
+static lkmem_cache_t *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 jbd_revoke_record_s
+{
+	struct list_head  hash;
+	tid_t		  sequence;	/* Used for recovery only */
+	unsigned long	  blocknr;
+};
+
+
+/* The revoke table is just a simple hash table of revoke records. */
+struct jbd_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(journal_t *, transaction_t *,
+				    struct journal_head **, int *,
+				    struct jbd_revoke_record_s *);
+static void flush_descriptor(journal_t *, struct journal_head *, int);
+#endif
+
+/* Utility functions to maintain the revoke table */
+
+/* Borrowed from buffer.c: this is a tried and tested block hash function */
+static inline int hash(journal_t *journal, unsigned long block)
+{
+	struct jbd_revoke_table_s *table = journal->j_revoke;
+	int hash_shift = table->hash_shift;
+
+	return ((block << (hash_shift - 6)) ^
+		(block >> 13) ^
+		(block << (hash_shift - 12))) & (table->hash_size - 1);
+}
+
+static int insert_revoke_hash(journal_t *journal, unsigned long blocknr,
+			      tid_t seq)
+{
+	struct list_head *hash_list;
+	struct jbd_revoke_record_s *record;
+
+#ifdef __KERNEL__
+repeat:
+#endif
+	record = kmem_cache_alloc(revoke_record_cache, GFP_NOFS);
+	if (!record)
+		goto oom;
+
+	record->sequence = seq;
+	record->blocknr = blocknr;
+	hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)];
+	list_add(&record->hash, hash_list);
+	return 0;
+
+oom:
+#ifdef __KERNEL__
+	if (!journal_oom_retry)
+		return -ENOMEM;
+	jbd_debug(1, "ENOMEM in " __FUNCTION__ ", retrying.\n");
+	current->policy |= SCHED_YIELD;
+	schedule();
+	goto repeat;
+#else
+	return -ENOMEM;
+#endif
+}
+
+/* Find a revoke record in the journal's hash table. */
+
+static struct jbd_revoke_record_s *find_revoke_record(journal_t *journal,
+						      unsigned long blocknr)
+{
+	struct list_head *hash_list;
+	struct jbd_revoke_record_s *record;
+
+	hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)];
+
+	record = (struct jbd_revoke_record_s *) hash_list->next;
+	while (&(record->hash) != hash_list) {
+		if (record->blocknr == blocknr)
+			return record;
+		record = (struct jbd_revoke_record_s *) record->hash.next;
+	}
+	return NULL;
+}
+
+int __init journal_init_revoke_caches(void)
+{
+	revoke_record_cache = kmem_cache_create("revoke_record",
+					   sizeof(struct jbd_revoke_record_s),
+					   0, SLAB_HWCACHE_ALIGN, NULL, NULL);
+	if (revoke_record_cache == 0)
+		return -ENOMEM;
+
+	revoke_table_cache = kmem_cache_create("revoke_table",
+					   sizeof(struct jbd_revoke_table_s),
+					   0, 0, NULL, NULL);
+	if (revoke_table_cache == 0) {
+		kmem_cache_destroy(revoke_record_cache);
+		revoke_record_cache = NULL;
+		return -ENOMEM;
+	}
+	return 0;
+}
+
+void journal_destroy_revoke_caches(void)
+{
+	kmem_cache_destroy(revoke_record_cache);
+	revoke_record_cache = 0;
+	kmem_cache_destroy(revoke_table_cache);
+	revoke_table_cache = 0;
+}
+
+/* Initialise the revoke table for a given journal to a given size. */
+
+int journal_init_revoke(journal_t *journal, int hash_size)
+{
+	int shift, tmp;
+
+	J_ASSERT (journal->j_revoke == NULL);
+
+	journal->j_revoke = kmem_cache_alloc(revoke_table_cache, GFP_KERNEL);
+	if (!journal->j_revoke)
+		return -ENOMEM;
+
+	/* Check that the hash_size is a power of two */
+	J_ASSERT ((hash_size & (hash_size-1)) == 0);
+
+	journal->j_revoke->hash_size = hash_size;
+
+	shift = 0;
+	tmp = hash_size;
+	while((tmp >>= 1UL) != 0UL)
+		shift++;
+	journal->j_revoke->hash_shift = shift;
+
+	journal->j_revoke->hash_table =
+		kmalloc(hash_size * sizeof(struct list_head), GFP_KERNEL);
+	if (!journal->j_revoke->hash_table) {
+		kmem_cache_free(revoke_table_cache, journal->j_revoke);
+		journal->j_revoke = NULL;
+		return -ENOMEM;
+	}
+
+	for (tmp = 0; tmp < hash_size; tmp++)
+		INIT_LIST_HEAD(&journal->j_revoke->hash_table[tmp]);
+
+	return 0;
+}
+
+/* Destoy a journal's revoke table.  The table must already be empty! */
+
+void journal_destroy_revoke(journal_t *journal)
+{
+	struct jbd_revoke_table_s *table;
+	struct list_head *hash_list;
+	int i;
+
+	table = journal->j_revoke;
+	if (!table)
+		return;
+
+	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(revoke_table_cache, table);
+	journal->j_revoke = NULL;
+}
+
+
+#ifdef __KERNEL__
+
+/*
+ * 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 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, journal_revoke() will decrement its b_count
+ * by one.
+ */
+
+int journal_revoke(handle_t *handle, unsigned long blocknr,
+		   struct buffer_head *bh_in)
+{
+	struct buffer_head *bh = NULL;
+	journal_t *journal;
+	kdev_t dev;
+	int err;
+
+	if (bh_in)
+		BUFFER_TRACE(bh_in, "enter");
+
+	journal = handle->h_transaction->t_journal;
+	if (!journal_set_features(journal, 0, 0, JFS_FEATURE_INCOMPAT_REVOKE)){
+		J_ASSERT (!"Cannot set revoke feature!");
+		return -EINVAL;
+	}
+
+	dev = journal->j_fs_dev;
+	bh = bh_in;
+
+	if (!bh) {
+		bh = get_hash_table(dev, blocknr, journal->j_blocksize);
+		if (bh)
+			BUFFER_TRACE(bh, "found on hash");
+	}
+#ifdef JBD_EXPENSIVE_CHECKING
+	else {
+		struct buffer_head *bh2;
+
+		/* If there is a different buffer_head lying around in
+		 * memory anywhere... */
+		bh2 = get_hash_table(dev, blocknr, journal->j_blocksize);
+		if (bh2) {
+			/* ... and it has RevokeValid status... */
+			if ((bh2 != bh) &&
+			    test_bit(BH_RevokeValid, &bh2->b_state))
+				/* ...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, test_bit(BH_Revoked, &
+							  bh2->b_state));
+			__brelse(bh2);
+		}
+	}
+#endif
+
+	/* 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) {
+		J_ASSERT_BH(bh, !test_bit(BH_Revoked, &bh->b_state));
+		set_bit(BH_Revoked, &bh->b_state);
+		set_bit(BH_RevokeValid, &bh->b_state);
+		if (bh_in) {
+			BUFFER_TRACE(bh_in, "call journal_forget");
+			journal_forget(handle, bh_in);
+		} else {
+			BUFFER_TRACE(bh, "call brelse");
+			__brelse(bh);
+		}
+	}
+
+	lock_journal(journal);
+	jbd_debug(2, "insert revoke for block %lu, bh_in=%p\n", blocknr, bh_in);
+	err = insert_revoke_hash(journal, blocknr,
+				handle->h_transaction->t_tid);
+	unlock_journal(journal);
+	BUFFER_TRACE(bh_in, "exit");
+	return err;
+}
+
+/*
+ * Cancel an outstanding revoke.  For use only internally by the
+ * journaling code (called from journal_get_write_access).
+ *
+ * We trust the BH_Revoked bit 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.
+ *
+ * The caller must have the journal locked.
+ */
+int journal_cancel_revoke(handle_t *handle, struct journal_head *jh)
+{
+	struct jbd_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_and_set_bit(BH_RevokeValid, &bh->b_state))
+		need_cancel = (test_and_clear_bit(BH_Revoked, &bh->b_state));
+	else {
+		need_cancel = 1;
+		clear_bit(BH_Revoked, &bh->b_state);
+	}
+
+	if (need_cancel) {
+		record = find_revoke_record(journal, bh->b_blocknr);
+		if (record) {
+			jbd_debug(4, "cancelled existing revoke on "
+				  "blocknr %lu\n", bh->b_blocknr);
+			list_del(&record->hash);
+			kmem_cache_free(revoke_record_cache, record);
+			did_revoke = 1;
+		}
+	}
+
+#ifdef JBD_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 && !bh->b_pprev) {
+		struct buffer_head *bh2;
+		bh2 = get_hash_table(bh->b_dev, bh->b_blocknr, bh->b_size);
+		if (bh2) {
+			clear_bit(BH_Revoked, &bh2->b_state);
+			__brelse(bh2);
+		}
+	}
+
+	return did_revoke;
+}
+
+
+/*
+ * Write revoke records to the journal for all entries in the current
+ * revoke hash, deleting the entries as we go.
+ *
+ * Called with the journal lock held.
+ */
+
+void journal_write_revoke_records(journal_t *journal,
+				  transaction_t *transaction)
+{
+	struct journal_head *descriptor;
+	struct jbd_revoke_record_s *record;
+	struct jbd_revoke_table_s *revoke;
+	struct list_head *hash_list;
+	int i, offset, count;
+
+	descriptor = NULL;
+	offset = 0;
+	count = 0;
+	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 jbd_revoke_record_s *)
+				hash_list->next;
+			write_one_revoke_record(journal, transaction,
+						&descriptor, &offset,
+						record);
+			count++;
+			list_del(&record->hash);
+			kmem_cache_free(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(journal_t *journal,
+				    transaction_t *transaction,
+				    struct journal_head **descriptorp,
+				    int *offsetp,
+				    struct jbd_revoke_record_s *record)
+{
+	struct journal_head *descriptor;
+	int offset;
+	journal_header_t *header;
+
+	/* If we are already aborting, this all becomes a noop.  We
+           still need to go round the loop in
+           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;
+
+	/* Make sure we have a descriptor with space left for the record */
+	if (descriptor) {
+		if (offset == journal->j_blocksize) {
+			flush_descriptor(journal, descriptor, offset);
+			descriptor = NULL;
+		}
+	}
+
+	if (!descriptor) {
+		descriptor = journal_get_descriptor_buffer(journal);
+		if (!descriptor)
+			return;
+		header = (journal_header_t *) &jh2bh(descriptor)->b_data[0];
+		header->h_magic     = htonl(JFS_MAGIC_NUMBER);
+		header->h_blocktype = htonl(JFS_REVOKE_BLOCK);
+		header->h_sequence  = htonl(transaction->t_tid);
+
+		/* Record it so that we can wait for IO completion later */
+		JBUFFER_TRACE(descriptor, "file as BJ_LogCtl");
+		journal_file_buffer(descriptor, transaction, BJ_LogCtl);
+
+		offset = sizeof(journal_revoke_header_t);
+		*descriptorp = descriptor;
+	}
+
+	* ((unsigned int *)(&jh2bh(descriptor)->b_data[offset])) =
+		htonl(record->blocknr);
+	offset += 4;
+	*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 journal_head *descriptor,
+			     int offset)
+{
+	journal_revoke_header_t *header;
+
+	if (is_journal_aborted(journal)) {
+		JBUFFER_TRACE(descriptor, "brelse");
+		__brelse(jh2bh(descriptor));
+		return;
+	}
+
+	header = (journal_revoke_header_t *) jh2bh(descriptor)->b_data;
+	header->r_count = htonl(offset);
+	set_bit(BH_JWrite, &jh2bh(descriptor)->b_state);
+	{
+		struct buffer_head *bh = jh2bh(descriptor);
+		BUFFER_TRACE(bh, "write");
+		ll_rw_block (WRITE, 1, &bh);
+	}
+}
+
+#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 journal_set_revoke(journal_t *journal,
+		       unsigned long blocknr,
+		       tid_t sequence)
+{
+	struct jbd_revoke_record_s *record;
+
+	record = find_revoke_record(journal, blocknr);
+	if (record) {
+		/* If we have multiple occurences, 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 journal_test_revoke(journal_t *journal,
+			unsigned long blocknr,
+			tid_t sequence)
+{
+	struct jbd_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 journal_clear_revoke(journal_t *journal)
+{
+	int i;
+	struct list_head *hash_list;
+	struct jbd_revoke_record_s *record;
+	struct jbd_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 jbd_revoke_record_s*) hash_list->next;
+			list_del(&record->hash);
+			kmem_cache_free(revoke_record_cache, record);
+		}
+	}
+}
+
diff --git a/e2fsprogs/e2fsck/scantest.c b/e2fsprogs/e2fsck/scantest.c
new file mode 100644
index 0000000..5ab97db
--- /dev/null
+++ b/e2fsprogs/e2fsck/scantest.c
@@ -0,0 +1,140 @@
+/*
+ * scantest.c - test the speed of the inode scan routine
+ */
+
+#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: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"),
+	       (int) (((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(fs);
+
+	print_resource_track(&global_rtrack);
+
+	return exit_value;
+}
diff --git a/e2fsprogs/e2fsck/sigcatcher.c b/e2fsprogs/e2fsck/sigcatcher.c
new file mode 100644
index 0000000..183b1df
--- /dev/null
+++ b/e2fsprogs/e2fsck/sigcatcher.c
@@ -0,0 +1,441 @@
+/*
+ * 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 <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)))
+{
+       void *stack_syms[32];
+       int frames;
+       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)
+       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);
+}	
+
+
+#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/e2fsprogs/e2fsck/super.c b/e2fsprogs/e2fsck/super.c
new file mode 100644
index 0000000..d05c90e
--- /dev/null
+++ b/e2fsprogs/e2fsck/super.c
@@ -0,0 +1,964 @@
+/*
+ * 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%
+ */
+
+#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 void 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; /* never get here! */
+	}
+}
+
+/*
+ * 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;
+};
+
+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;
+	int			retval = 0;
+
+	pb = (struct process_block_struct *) priv_data;
+	ctx = pb->ctx;
+	pctx = pb->pctx;
+
+	pctx->blk = blk;
+	pctx->blkcount = blockcnt;
+
+	if (HOLE_BLKADDR(blk))
+		return 0;
+
+	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;
+	}
+
+	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 *inode, char *block_buf,
+				struct problem_context *pctx)
+{
+	struct process_block_struct 	pb;
+	ext2_filsys			fs = ctx->fs;
+	errcode_t			retval;
+	__u32				count;
+
+	if (!ext2fs_inode_has_valid_blocks2(fs, inode))
+		return 0;
+
+	pb.buf = block_buf + 3 * ctx->fs->blocksize;
+	pb.ctx = ctx;
+	pb.abort = 0;
+	pb.errcode = 0;
+	pb.pctx = pctx;
+	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 %d"),
+			ino);
+		return 1;
+	}
+	if (pb.abort)
+		return 1;
+
+	/* Refresh the inode since ext2fs_block_iterate may have changed it */
+	e2fsck_read_inode(ctx, ino, inode, "release_inode_blocks");
+
+	if (pb.truncated_blocks)
+		ext2fs_iblk_sub_blocks(fs, inode, pb.truncated_blocks);
+
+	if (ext2fs_file_acl_block(fs, inode)) {
+		retval = ext2fs_adjust_ea_refcount2(fs,
+					ext2fs_file_acl_block(fs, inode),
+					block_buf, -1, &count);
+		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 %d"),
+				ino);
+			return 1;
+		}
+		if (count == 0) {
+			ext2fs_block_alloc_stats2(fs,
+					ext2fs_file_acl_block(fs, inode), -1);
+			ctx->free_blocks++;
+		}
+		ext2fs_file_acl_block_set(fs, inode, 0);
+	}
+	return 0;
+}
+
+/*
+ * 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, next_ino;
+	struct ext2_inode inode;
+	struct problem_context pctx;
+	char *block_buf;
+
+	if ((ino = fs->super->s_last_orphan) == 0)
+		return 0;
+
+	/*
+	 * 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 run the orphan
+	 * list, since the orphan list can't be trusted; and we're
+	 * going to be running a full e2fsck run anyway...
+	 */
+	if (fs->super->s_state & EXT2_ERROR_FS)
+		return 0;
+
+	if ((ino < EXT2_FIRST_INODE(fs->super)) ||
+	    (ino > fs->super->s_inodes_count)) {
+		clear_problem_context(&pctx);
+		pctx.ino = ino;
+		fix_problem(ctx, PR_0_ORPHAN_ILLEGAL_HEAD_INODE, &pctx);
+		return 1;
+	}
+
+	block_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 4,
+						    "block iterate buffer");
+	e2fsck_read_bitmaps(ctx);
+
+	while (ino) {
+		e2fsck_read_inode(ctx, ino, &inode, "release_orphan_inodes");
+		clear_problem_context(&pctx);
+		pctx.ino = ino;
+		pctx.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);
+			goto return_abort;
+		}
+
+		if (release_inode_blocks(ctx, ino, &inode, block_buf, &pctx))
+			goto return_abort;
+
+		if (!inode.i_links_count) {
+			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(ctx, ino, &inode, "delete_file");
+		ino = next_ino;
+	}
+	ext2fs_free_mem(&block_buf);
+	return 0;
+return_abort:
+	ext2fs_free_mem(&block_buf);
+	return 1;
+}
+
+/*
+ * 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 the resize inode feature isn't set, then
+	 * s_reserved_gdt_blocks must be zero.
+	 */
+	if (!(fs->super->s_feature_compat &
+	      EXT2_FEATURE_COMPAT_RESIZE_INODE)) {
+		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 (fs->super->s_feature_compat &
+		    EXT2_FEATURE_COMPAT_RESIZE_INODE)
+			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 (!(fs->super->s_feature_compat &
+	      EXT2_FEATURE_COMPAT_RESIZE_INODE)) {
+		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 + (j * fs->super->s_blocks_per_group);
+			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) ||
+	    !(sb->s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX) ||
+	    (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;
+	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;
+	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");
+
+	clear_problem_context(&pctx);
+
+	/*
+	 * Verify the super block constants...
+	 */
+	check_super_value(ctx, "inodes_count", sb->s_inodes_count,
+			  MIN_CHECK, 1, 0);
+	check_super_value(ctx, "blocks_count", ext2fs_blocks_count(sb),
+			  MIN_CHECK, 1, 0);
+	check_super_value(ctx, "first_data_block", sb->s_first_data_block,
+			  MAX_CHECK, 0, ext2fs_blocks_count(sb));
+	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);
+	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));
+	check_super_value(ctx, "clusters_per_group", sb->s_clusters_per_group,
+			  MIN_CHECK | MAX_CHECK, 8, cpg_max);
+	check_super_value(ctx, "blocks_per_group", sb->s_blocks_per_group,
+			  MIN_CHECK | MAX_CHECK, 8, bpg_max);
+	check_super_value(ctx, "inodes_per_group", sb->s_inodes_per_group,
+			  MIN_CHECK | MAX_CHECK, inodes_per_block, ipg_max);
+	check_super_value(ctx, "r_blocks_count", ext2fs_r_blocks_count(sb),
+			  MAX_CHECK, 0, ext2fs_blocks_count(sb) / 2);
+	check_super_value(ctx, "reserved_gdt_blocks",
+			  sb->s_reserved_gdt_blocks, MAX_CHECK, 0,
+			  fs->blocksize / sizeof(__u32));
+	check_super_value(ctx, "desc_size",
+			  sb->s_desc_size, MAX_CHECK | LOG2_CHECK, 0,
+			  EXT2_MAX_DESC_SIZE);
+	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);
+	inode_size = EXT2_INODE_SIZE(sb);
+	check_super_value(ctx, "inode_size",
+			  inode_size, MIN_CHECK | MAX_CHECK | LOG2_CHECK,
+			  EXT2_GOOD_OLD_INODE_SIZE, fs->blocksize);
+	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; /* never get here! */
+		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;
+	}
+
+	should_be = sb->s_inodes_per_group * fs->group_desc_count;
+	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);
+		}
+	}
+
+	/* Is 64bit set and extents unset? */
+	if (EXT2_HAS_INCOMPAT_FEATURE(fs->super,
+				      EXT4_FEATURE_INCOMPAT_64BIT) &&
+	    !EXT2_HAS_INCOMPAT_FEATURE(fs->super,
+				       EXT3_FEATURE_INCOMPAT_EXTENTS) &&
+	    fix_problem(ctx, PR_0_64BIT_WITHOUT_EXTENTS, &pctx)) {
+		fs->super->s_feature_incompat |=
+			EXT3_FEATURE_INCOMPAT_EXTENTS;
+		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 = EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+					       EXT4_FEATURE_RO_COMPAT_GDT_CSUM);
+	for (i = 0; i < fs->group_desc_count; i++) {
+		pctx.group = i;
+
+		if (!EXT2_HAS_INCOMPAT_FEATURE(fs->super,
+					       EXT4_FEATURE_INCOMPAT_FLEX_BG)) {
+			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.
+	 */
+	if (!(ctx->options & E2F_OPT_READONLY) && uuid_is_null(sb->s_uuid)) {
+		if (fix_problem(ctx, PR_0_ADD_UUID, &pctx)) {
+			uuid_generate(sb->s_uuid);
+			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 &&
+	    (fs->super->s_feature_incompat &
+	     EXT2_FEATURE_INCOMPAT_FILETYPE)) {
+		if (fix_problem(ctx, PR_0_HURD_CLEAR_FILETYPE, &pctx)) {
+			fs->super->s_feature_incompat &=
+				~EXT2_FEATURE_INCOMPAT_FILETYPE;
+			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 (!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 (!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;
+		}
+	}
+
+	/*
+	 * 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/e2fsprogs/e2fsck/unix.c b/e2fsprogs/e2fsck/unix.c
new file mode 100644
index 0000000..56f4924
--- /dev/null
+++ b/e2fsprogs/e2fsck/unix.c
@@ -0,0 +1,1781 @@
+/*
+ * 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 <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 "e2p/e2p.h"
+#include "et/com_err.h"
+#include "e2p/e2p.h"
+#include "e2fsck.h"
+#include "problem.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-jfs-debug */
+int journal_enable_debug = -1;
+#endif
+
+#ifndef ROOT_SYSCONFDIR
+#define ROOT_SYSCONFDIR "/etc"
+#endif
+
+static void usage(e2fsck_t ctx)
+{
+	fprintf(stderr,
+		_("Usage: %s [-panyrcdfvtDFV] [-b superblock] [-B blocksize]\n"
+		"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
+		"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+		"\t\t[-E extended-options] device\n"),
+		ctx->program_name);
+
+	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"
+		));
+
+	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, frag_percent_dir, frag_percent_total;
+	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));
+
+	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,
+			blocks_used, 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),
+		blocks_used, 100.0 * blocks_used / blocks, 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)) {
+		log_out(ctx, _("Warning!  %s is %s.\n"),
+			ctx->filesystem_name,
+			ctx->mount_flags & EXT2_MF_MOUNTED ?
+				"mounted" : "in use");
+		return;
+	}
+
+	log_out(ctx, _("%s is %s.\n"), ctx->filesystem_name,
+		ctx->mount_flags & EXT2_MF_MOUNTED ? "mounted" : "in use");
+	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[80];
+	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, "%s %s %s %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, 80, "/proc/acpi/ac_adapter/%s/state",
+				 de->d_name);
+			f = fopen(fname, "r");
+			if (!f)
+				continue;
+			if (fscanf(f, "%s %s", 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;
+
+	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;
+	}
+	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,
+		ext2fs_blocks_count(fs->super) -
+		ext2fs_free_blocks_count(fs->super),
+		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(fs);
+	ctx->fs = NULL;
+	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));
+			break;
+		}
+	}
+}
+
+#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;
+
+	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, "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, "log_filename") == 0) {
+			if (!arg)
+				extended_usage++;
+			else
+				ctx->log_fn = string_copy(ctx, arg, 0);
+			continue;
+		} 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"), 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);
+		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
+
+	retval = e2fsck_allocate_context(&ctx);
+	if (retval)
+		return retval;
+
+	*ret_ctx = ctx;
+
+	setvbuf(stdout, NULL, _IONBF, BUFSIZ);
+	setvbuf(stderr, NULL, _IONBF, BUFSIZ);
+	if (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
+		ctx->program_name = "e2fsck";
+
+	while ((c = getopt (argc, argv, "panyrcC:B:dE:fvtFVM:b:I:j:P:l:L:N:SsDk")) != 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", &ctx->use_superblock);
+			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 = blkid_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++;
+		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;
+		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 = blkid_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);
+
+	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;
+
+	/* 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
+	e2fsck_global_ctx = ctx;
+	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 && ctx->blocksize) {
+		retval = ext2fs_open2(ctx->filesystem_name, ctx->io_options,
+				      flags, ctx->superblock, ctx->blocksize,
+				      io_ptr, ret_fs);
+	} else if (ctx->superblock) {
+		int blocksize;
+		for (blocksize = EXT2_MIN_BLOCK_SIZE;
+		     blocksize <= EXT2_MAX_BLOCK_SIZE; blocksize *= 2) {
+			if (*ret_fs) {
+				ext2fs_free(*ret_fs);
+				*ret_fs = NULL;
+			}
+			retval = ext2fs_open2(ctx->filesystem_name,
+					      ctx->io_options, flags,
+					      ctx->superblock, blocksize,
+					      io_ptr, ret_fs);
+			if (!retval)
+				break;
+		}
+	} else
+		retval = ext2fs_open2(ctx->filesystem_name, ctx->io_options,
+				      flags, 0, 0, io_ptr, ret_fs);
+
+	if (retval == 0)
+		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 e2fck 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 {device}'\n"));
+	} else if (retval == EXT2_ET_MMP_MAGIC_INVALID) {
+		if (fix_problem(ctx, PR_0_MMP_INVALID_MAGIC, &pctx)) {
+			ext2fs_mmp_clear(fs);
+			retval = 0;
+		}
+	}
+	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;
+	struct problem_context pctx;
+	int flags, run_result;
+	int journal_size;
+	int sysval, sys_page_size = 4096;
+	int old_bitmaps;
+	__u32 features[3];
+	char *cp;
+	int qtype = -99;  /* quota type */
+
+	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);
+	}
+
+	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;
+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;
+	}
+
+	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_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(fs);
+			orig_retval = retval;
+			retval = try_open_fs(ctx, flags, io_ptr, &fs);
+			if ((orig_retval == 0) && retval != 0) {
+				if (fs)
+					ext2fs_close(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
+			fix_problem(ctx, PR_0_SB_CORRUPT, &pctx);
+		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(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->priv_data = ctx;
+	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] != 0)) {
+		ctx->device_name = string_copy(ctx, 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 = '_';
+
+	ehandler_init(fs->io);
+
+	if ((fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_MMP) &&
+	    (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(fs);
+		ctx->fs = NULL;
+		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.
+	 */
+	retval = e2fsck_check_ext3_journal(ctx);
+	if (retval) {
+		com_err(ctx->program_name, retval,
+			_("while checking ext3 journal for %s"),
+			ctx->device_name);
+		fatal_error(ctx, 0);
+	}
+
+	/*
+	 * Check to see if we need to do ext3-style recovery.  If so,
+	 * do it, and then restart the fsck.
+	 */
+	if (sb->s_feature_incompat & EXT3_FEATURE_INCOMPAT_RECOVER) {
+		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) {
+				com_err(ctx->program_name, retval,
+				_("while recovering ext3 journal of %s"),
+					ctx->device_name);
+				fatal_error(ctx, 0);
+			}
+			ext2fs_close(ctx->fs);
+			ctx->fs = 0;
+			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;
+	}
+#ifdef ENABLE_COMPRESSION
+	if (sb->s_feature_incompat & EXT2_FEATURE_INCOMPAT_COMPRESSION)
+		log_err(ctx, _("%s: warning: compression support "
+			       "is experimental.\n"),
+			ctx->program_name);
+#endif
+#ifndef ENABLE_HTREE
+	if (sb->s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX) {
+		log_err(ctx, _("%s: e2fsck not compiled with HTREE support,\n\t"
+			  "but filesystem %s has HTREE directories.\n"),
+			ctx->program_name, ctx->device_name);
+		goto get_newer;
+	}
+#endif
+
+	/*
+	 * 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 (sb->s_jnl_backup_type == EXT3_JNL_BACKUP_BLOCKS)
+		journal_size = (sb->s_jnl_blocks[15] << (32 - 20)) |
+			       (sb->s_jnl_blocks[16] >> 20);
+	else
+		journal_size = -1;
+
+	if (sb->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_QUOTA) {
+		/* Quotas were enabled. Do quota accounting during fsck. */
+		if ((sb->s_usr_quota_inum && sb->s_grp_quota_inum) ||
+		    (!sb->s_usr_quota_inum && !sb->s_grp_quota_inum))
+			qtype = -1;
+		else
+			qtype = sb->s_usr_quota_inum ? USRQUOTA : GRPQUOTA;
+
+		quota_init_context(&ctx->qctx, ctx->fs, qtype);
+	}
+
+	run_result = e2fsck_run(ctx);
+	e2fsck_clear_progbar(ctx);
+
+	if (ctx->flags & E2F_FLAG_JOURNAL_INODE) {
+		if (fix_problem(ctx, PR_6_RECREATE_JOURNAL, &pctx)) {
+			if (journal_size < 1024)
+				journal_size = ext2fs_default_journal_size(ext2fs_blocks_count(fs->super));
+			if (journal_size < 0) {
+				fs->super->s_feature_compat &=
+					~EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+				fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+				log_out(ctx, "%s: Couldn't determine "
+					"journal size\n", ctx->program_name);
+				goto no_journal;
+			}
+			log_out(ctx, _("Creating journal (%d blocks): "),
+			       journal_size);
+			fflush(stdout);
+			retval = ext2fs_add_journal_inode(fs,
+							  journal_size, 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 re-created - "
+				  "filesystem is now ext3 again ***\n"));
+		}
+	}
+no_journal:
+
+	if (ctx->qctx) {
+		int i, needs_writeout;
+		for (i = 0; i < MAXQUOTAS; i++) {
+			if (qtype != -1 && qtype != i)
+				continue;
+			needs_writeout = 0;
+			pctx.num = i;
+			retval = quota_compare_and_update(ctx->qctx, i,
+							  &needs_writeout);
+			if ((retval || needs_writeout) &&
+			    fix_problem(ctx, PR_6_UPDATE_QUOTAS, &pctx))
+				quota_write_inode(ctx->qctx, i);
+		}
+		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(fs);
+		goto restart;
+	}
+	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;
+	}
+	if (run_result & E2F_FLAG_ABORT)
+		fatal_error(ctx, _("aborted"));
+	if (check_backup_super_block(ctx)) {
+		fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+		ext2fs_mark_super_dirty(fs);
+	}
+
+#ifdef MTRACE
+	mtrace_print("Cleanup");
+#endif
+	if (ext2fs_test_changed(fs)) {
+		exit_value |= FSCK_NONDESTRUCT;
+		if (!(ctx->options & E2F_OPT_PREEN))
+			log_out(ctx, _("\n%s: ***** FILE SYSTEM WAS "
+				       "MODIFIED *****\n"),
+				ctx->device_name);
+		if (ctx->mount_flags & EXT2_MF_ISROOT) {
+			log_out(ctx, _("%s: ***** REBOOT LINUX *****\n"),
+				ctx->device_name);
+			exit_value |= FSCK_REBOOT;
+		}
+	}
+	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);
+		if (!(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;
+			} else
+				sb->s_state &= ~EXT2_VALID_FS;
+			sb->s_mnt_count = 0;
+			if (!(ctx->flags & E2F_FLAG_TIME_INSANE))
+				sb->s_lastcheck = ctx->now;
+			memset(((char *) sb) + EXT4_S_ERR_START, 0,
+			       EXT4_S_ERR_LEN);
+			ext2fs_mark_super_dirty(fs);
+		}
+	}
+
+	if ((run_result & E2F_FLAG_CANCEL) == 0 &&
+	    sb->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_GDT_CSUM &&
+	    !(ctx->options & E2F_OPT_READONLY)) {
+		retval = ext2fs_set_gdt_csum(ctx->fs);
+		if (retval) {
+			com_err(ctx->program_name, retval, "%s",
+				_("while setting block group checksum info"));
+			fatal_error(ctx, 0);
+		}
+	}
+
+	e2fsck_write_bitmaps(ctx);
+	io_channel_flush(ctx->fs->io);
+	print_resource_track(ctx, NULL, &ctx->global_rtrack, ctx->fs->io);
+
+	ext2fs_close(fs);
+	ctx->fs = NULL;
+	free(ctx->journal_name);
+
+	e2fsck_free_context(ctx);
+	remove_error_table(&et_ext2_error_table);
+	remove_error_table(&et_prof_error_table);
+	return exit_value;
+}
diff --git a/e2fsprogs/e2fsck/util.c b/e2fsprogs/e2fsck/util.c
new file mode 100644
index 0000000..3f2ff5b
--- /dev/null
+++ b/e2fsprogs/e2fsck/util.c
@@ -0,0 +1,848 @@
+/*
+ * 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 <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);
+	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 int size,
+			     const char *description)
+{
+	void *ret;
+	char buf[256];
+
+#ifdef DEBUG_ALLOCATE_MEMORY
+	printf("Allocating %u bytes for %s...\n", size, description);
+#endif
+	ret = malloc(size);
+	if (!ret) {
+		sprintf(buf, "Can't allocate %u bytes for %s\n",
+			size, description);
+		fatal_error(ctx, buf);
+	}
+	memset(ret, 0, size);
+	return ret;
+}
+
+char *string_copy(e2fsck_t ctx EXT2FS_ATTR((unused)),
+		  const char *str, int 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");
+
+#ifdef HAVE_TERMIOS_H
+	struct termios	termios, tmp;
+
+	tcgetattr (0, &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)");
+	log_out(ctx, "%s%s? ", string, 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"));
+			return 0;
+		}
+		if (strchr(short_yes, (char) c)) {
+			def = 1;
+			break;
+		}
+		else if (strchr(short_no, (char) c)) {
+			def = 0;
+			break;
+		}
+		else if ((c == 27 || c == ' ' || c == '\n') && (def != -1))
+			break;
+	}
+	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;
+
+	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);
+	retval = ext2fs_read_bitmaps(fs);
+	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(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
+#ifdef HAVE_MALLINFO
+	struct mallinfo	malloc_info;
+#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);
+
+#ifdef HAVE_MALLINFO
+#define kbytes(x)	(((unsigned long)(x) + 1023) / 1024)
+
+	malloc_info = mallinfo();
+	log_out(ctx, _("Memory used: %luk/%luk (%luk/%luk), "),
+		kbytes(malloc_info.arena), kbytes(malloc_info.hblkhd),
+		kbytes(malloc_info.uordblks), kbytes(malloc_info.fordblks));
+#else
+	log_out(ctx, _("Memory used: %lu, "),
+		(unsigned long) (((char *) sbrk(0)) -
+				 ((char *) track->brk_start)));
+#endif
+#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;
+}
+
+#define STRIDE_LENGTH 8
+/*
+ * Helper 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.)
+ */
+errcode_t e2fsck_zero_blocks(ext2_filsys fs, blk_t blk, int num,
+			     blk_t *ret_blk, int *ret_count)
+{
+	int		j, count;
+	static char	*buf;
+	errcode_t	retval;
+
+	/* If fs is null, clean up the static buffer and return */
+	if (!fs) {
+		if (buf) {
+			free(buf);
+			buf = 0;
+		}
+		return 0;
+	}
+	/* Allocate the zeroizing buffer if necessary */
+	if (!buf) {
+		buf = malloc(fs->blocksize * STRIDE_LENGTH);
+		if (!buf) {
+			com_err("malloc", ENOMEM, "%s",
+				_("while allocating zeroizing buffer"));
+			exit(1);
+		}
+		memset(buf, 0, fs->blocksize * STRIDE_LENGTH);
+	}
+	/* OK, do the write loop */
+	for (j = 0; j < num; j += STRIDE_LENGTH, blk += STRIDE_LENGTH) {
+		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;
+		}
+	}
+	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 EGAIN/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 *msg)
+{
+
+	if (msg)
+		printf("MMP check failed: %s\n", msg);
+	if (mmp) {
+		time_t t = mmp->mmp_time;
+
+		printf("MMP error info: last update: %s node: %s device: %s\n",
+		       ctime(&t), mmp->mmp_nodename, 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;
+
+	if (old_type)
+		*old_type = fs->default_bitmap_type;
+#ifdef HAVE_SIGNAL_H
+	profile_get_uint(e2fsck_global_ctx->profile, "bitmaps",
+			 profile_name, 0, default_type, &type);
+	profile_get_uint(e2fsck_global_ctx->profile, "bitmaps",
+			 "all", 0, type, &type);
+	fs->default_bitmap_type = type ? type : default_type;
+#else
+	fs->default_bitmap_type = default_type;
+#endif
+}
+
+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;
+}
diff --git a/e2fsprogs/e2fsprogs.lsm b/e2fsprogs/e2fsprogs.lsm
new file mode 100644
index 0000000..f980fe6
--- /dev/null
+++ b/e2fsprogs/e2fsprogs.lsm
@@ -0,0 +1,17 @@
+Begin3
+Title:          EXT2 Filesystem utilities
+Version:        1.42.9
+Entered-date:   28Dec2013
+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:   download.sourceforge.net /pub/sourceforge/e2fsprogs
+                5928kB e2fsprogs-1.42.9.tar.gz
+                564kB  e2fsprogs-libs-1.42.9.tar.gz
+                1kB    e2fsprogs-1.42.9.lsm
+Alternate-site: 
+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
+Copying-policy: GPL-2/LGPL-2
+End
diff --git a/e2fsprogs/e2fsprogs.spec.in b/e2fsprogs/e2fsprogs.spec.in
new file mode 100644
index 0000000..b188b75
--- /dev/null
+++ b/e2fsprogs/e2fsprogs.spec.in
@@ -0,0 +1,242 @@
+%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: @E2FSPROGS_PKGVER@
+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}/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/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/e2fsprogs/ext2ed/COPYRIGHT b/e2fsprogs/ext2ed/COPYRIGHT
new file mode 100644
index 0000000..5585eb6
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/ext2ed/Makefile.in b/e2fsprogs/ext2ed/Makefile.in
new file mode 100644
index 0000000..290f06e
--- /dev/null
+++ b/e2fsprogs/ext2ed/Makefile.in
@@ -0,0 +1,95 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = ext2ed
+INSTALL = @INSTALL@
+
+@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) $<
+
+.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/e2fsprogs/ext2ed/README b/e2fsprogs/ext2ed/README
new file mode 100644
index 0000000..fda4b87
--- /dev/null
+++ b/e2fsprogs/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 missunderstanding between ncurses and
+readline.
+
+I first applied patches from Redhat 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 percompiled 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/e2fsprogs/ext2ed/blockbitmap_com.c b/e2fsprogs/ext2ed/blockbitmap_com.c
new file mode 100644
index 0000000..996bbeb
--- /dev/null
+++ b/e2fsprogs/ext2ed/blockbitmap_com.c
@@ -0,0 +1,265 @@
+/*
+
+/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 <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/e2fsprogs/ext2ed/dir_com.c b/e2fsprogs/ext2ed/dir_com.c
new file mode 100644
index 0000000..b023e7a
--- /dev/null
+++ b/e2fsprogs/ext2ed/dir_com.c
@@ -0,0 +1,677 @@
+/*
+
+/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 <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 overrided 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/e2fsprogs/ext2ed/disk.c b/e2fsprogs/ext2ed/disk.c
new file mode 100644
index 0000000..5e1cd7e
--- /dev/null
+++ b/e2fsprogs/ext2ed/disk.c
@@ -0,0 +1,238 @@
+/*
+
+/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 carefuly; There are many places to change.
+
+First written on: April 9 1995
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#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 aviable (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/e2fsprogs/ext2ed/doc/ext2ed-design.sgml b/e2fsprogs/ext2ed/doc/ext2ed-design.sgml
new file mode 100644
index 0000000..ad2df96
--- /dev/null
+++ b/e2fsprogs/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 throughly 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 parallelly.
+</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 themself
+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 splitted into several source
+files. I splitted 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 asynchronic 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 deattaches 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_dir_acl;		/* Directory ACL */
+	__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/e2fsprogs/ext2ed/doc/ext2fs-overview.sgml b/e2fsprogs/ext2ed/doc/ext2fs-overview.sgml
new file mode 100644
index 0000000..a6ebf5a
--- /dev/null
+++ b/e2fsprogs/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_dir_acl;	/* Directory ACL */
+	__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 experimently 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 occured 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 multiplition 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 reforced. 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/e2fsprogs/ext2ed/doc/user-guide.sgml b/e2fsprogs/ext2ed/doc/user-guide.sgml
new file mode 100644
index 0000000..42887ef
--- /dev/null
+++ b/e2fsprogs/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 synchronic rather
+than asynchronic - 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 asynchronically 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/e2fsprogs/ext2ed/ext2.descriptors b/e2fsprogs/ext2ed/ext2.descriptors
new file mode 100644
index 0000000..bf927b0
--- /dev/null
+++ b/e2fsprogs/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 aviable 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_dir_acl;	/* Directory ACL */
+	__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/e2fsprogs/ext2ed/ext2_com.c b/e2fsprogs/ext2ed/ext2_com.c
new file mode 100644
index 0000000..2f20a28
--- /dev/null
+++ b/e2fsprogs/ext2ed/ext2_com.c
@@ -0,0 +1,97 @@
+/*
+
+/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 <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/e2fsprogs/ext2ed/ext2ed.8.in b/e2fsprogs/ext2ed/ext2ed.8.in
new file mode 100644
index 0000000..b5d6b33
--- /dev/null
+++ b/e2fsprogs/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 filesystem.
+Its aim is to show you the various internal filesystem 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 filesystem.
+You need to understand the internal layout in order to effectively edit
+your filesystem.
+
+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 filesystem.
+
+.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 filesystem.
+.TP
+.I /var/log/ext2ed.log
+Log file of actual changes made to the filesystem.
+.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 filesystem.
+.TP
+.I @datadir@/doc/ext2ed/ext2ed-design-0.1.ps
+EXT2ED design notes.
+
+.SH BUGS
+Filesystems 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/e2fsprogs/ext2ed/ext2ed.conf.in b/e2fsprogs/ext2ed/ext2ed.conf.in
new file mode 100644
index 0000000..7e2a925
--- /dev/null
+++ b/e2fsprogs/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 aviable despite the possible
+# autodetection failture.
+
+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/e2fsprogs/ext2ed/ext2ed.h b/e2fsprogs/ext2ed/ext2ed.h
new file mode 100644
index 0000000..b9b43b4
--- /dev/null
+++ b/e2fsprogs/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 aviable 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 genereal commands - Aviable 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/e2fsprogs/ext2ed/file_com.c b/e2fsprogs/ext2ed/file_com.c
new file mode 100644
index 0000000..9772f66
--- /dev/null
+++ b/e2fsprogs/ext2ed/file_com.c
@@ -0,0 +1,564 @@
+/*
+
+/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 <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/e2fsprogs/ext2ed/general_com.c b/e2fsprogs/ext2ed/general_com.c
new file mode 100644
index 0000000..03dc261
--- /dev/null
+++ b/e2fsprogs/ext2ed/general_com.c
@@ -0,0 +1,906 @@
+/*
+
+/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 <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 enchanced 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 aviable 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/e2fsprogs/ext2ed/group_com.c b/e2fsprogs/ext2ed/group_com.c
new file mode 100644
index 0000000..2532553
--- /dev/null
+++ b/e2fsprogs/ext2ed/group_com.c
@@ -0,0 +1,182 @@
+/*
+
+/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 <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/e2fsprogs/ext2ed/init.c b/e2fsprogs/ext2ed/init.c
new file mode 100644
index 0000000..d4703ed
--- /dev/null
+++ b/e2fsprogs/ext2ed/init.c
@@ -0,0 +1,632 @@
+/*
+
+/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 <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, aviable 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 asynchronicly in the filesystem",set_offset);
+	add_user_command (&general_commands,"settype","Tells EXT2ED how to interpert 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 decriptor",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/e2fsprogs/ext2ed/inode_com.c b/e2fsprogs/ext2ed/inode_com.c
new file mode 100644
index 0000000..8d4b9f3
--- /dev/null
+++ b/e2fsprogs/ext2ed/inode_com.c
@@ -0,0 +1,436 @@
+/*
+
+/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 <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/e2fsprogs/ext2ed/inodebitmap_com.c b/e2fsprogs/ext2ed/inodebitmap_com.c
new file mode 100644
index 0000000..e602234
--- /dev/null
+++ b/e2fsprogs/ext2ed/inodebitmap_com.c
@@ -0,0 +1,214 @@
+/*
+
+/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 <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/e2fsprogs/ext2ed/main.c b/e2fsprogs/ext2ed/main.c
new file mode 100644
index 0000000..50a3f07
--- /dev/null
+++ b/e2fsprogs/ext2ed/main.c
@@ -0,0 +1,545 @@
+/*
+
+/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 occured.
+
+First written on: March 30 1995
+
+Copyright (C) 1995 Gadi Oxman
+
+*/
+
+#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 diables 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 recieve 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 interpert 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, pehaps 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);
+	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/e2fsprogs/ext2ed/super_com.c b/e2fsprogs/ext2ed/super_com.c
new file mode 100644
index 0000000..57953ab
--- /dev/null
+++ b/e2fsprogs/ext2ed/super_com.c
@@ -0,0 +1,155 @@
+/*
+
+/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 <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/e2fsprogs/ext2ed/win.c b/e2fsprogs/ext2ed/win.c
new file mode 100644
index 0000000..113a28f
--- /dev/null
+++ b/e2fsprogs/ext2ed/win.c
@@ -0,0 +1,231 @@
+/*
+
+/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 <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/e2fsprogs/include/nonunix/asm/types.h b/e2fsprogs/include/nonunix/asm/types.h
new file mode 100644
index 0000000..ad1c889
--- /dev/null
+++ b/e2fsprogs/include/nonunix/asm/types.h
@@ -0,0 +1 @@
+#include "../linux/types.h"
diff --git a/e2fsprogs/include/nonunix/config.h b/e2fsprogs/include/nonunix/config.h
new file mode 100644
index 0000000..e269d20
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/include/nonunix/dirent.h b/e2fsprogs/include/nonunix/dirent.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e2fsprogs/include/nonunix/dirent.h
diff --git a/e2fsprogs/include/nonunix/getopt.h b/e2fsprogs/include/nonunix/getopt.h
new file mode 100644
index 0000000..33ad46c
--- /dev/null
+++ b/e2fsprogs/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., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, 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/e2fsprogs/include/nonunix/grp.h b/e2fsprogs/include/nonunix/grp.h
new file mode 100644
index 0000000..ef019bd
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/include/nonunix/linux/types.h b/e2fsprogs/include/nonunix/linux/types.h
new file mode 100644
index 0000000..8e5bc90
--- /dev/null
+++ b/e2fsprogs/include/nonunix/linux/types.h
@@ -0,0 +1,28 @@
+#ifndef _LINUX_TYPES_H
+#define _LINUX_TYPES_H
+
+#ifndef _MSC_VER
+#error  _MSC_VER not defined
+#endif
+
+
+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;
+
+
+#endif /* LINUX_TYPES_H */
diff --git a/e2fsprogs/include/nonunix/pwd.h b/e2fsprogs/include/nonunix/pwd.h
new file mode 100644
index 0000000..a724ea2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/include/nonunix/sys/file.h b/e2fsprogs/include/nonunix/sys/file.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e2fsprogs/include/nonunix/sys/file.h
diff --git a/e2fsprogs/include/nonunix/sys/ioctl.h b/e2fsprogs/include/nonunix/sys/ioctl.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e2fsprogs/include/nonunix/sys/ioctl.h
diff --git a/e2fsprogs/include/nonunix/sys/param.h b/e2fsprogs/include/nonunix/sys/param.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e2fsprogs/include/nonunix/sys/param.h
diff --git a/e2fsprogs/include/nonunix/sys/resource.h b/e2fsprogs/include/nonunix/sys/resource.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e2fsprogs/include/nonunix/sys/resource.h
diff --git a/e2fsprogs/include/nonunix/sys/socket.h b/e2fsprogs/include/nonunix/sys/socket.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e2fsprogs/include/nonunix/sys/socket.h
diff --git a/e2fsprogs/include/nonunix/sys/time.h b/e2fsprogs/include/nonunix/sys/time.h
new file mode 100644
index 0000000..91fd187
--- /dev/null
+++ b/e2fsprogs/include/nonunix/sys/time.h
@@ -0,0 +1 @@
+#include <time.h>
diff --git a/e2fsprogs/include/nonunix/sys/wait.h b/e2fsprogs/include/nonunix/sys/wait.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e2fsprogs/include/nonunix/sys/wait.h
diff --git a/e2fsprogs/include/nonunix/termios.h b/e2fsprogs/include/nonunix/termios.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e2fsprogs/include/nonunix/termios.h
diff --git a/e2fsprogs/include/nonunix/unistd.h b/e2fsprogs/include/nonunix/unistd.h
new file mode 100644
index 0000000..5053587
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/include/nonunix/utime.h b/e2fsprogs/include/nonunix/utime.h
new file mode 100644
index 0000000..8285f38
--- /dev/null
+++ b/e2fsprogs/include/nonunix/utime.h
@@ -0,0 +1 @@
+#include <sys/utime.h>
diff --git a/e2fsprogs/install-utils/compile_manpages b/e2fsprogs/install-utils/compile_manpages
new file mode 100644
index 0000000..fb3bbdb
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/install-utils/convfstab b/e2fsprogs/install-utils/convfstab
new file mode 100644
index 0000000..11160bf
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/install-utils/remove_preformat_manpages b/e2fsprogs/install-utils/remove_preformat_manpages
new file mode 100644
index 0000000..67dfff8
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/intl/Makefile.in b/e2fsprogs/intl/Makefile.in
new file mode 100644
index 0000000..bf24f63
--- /dev/null
+++ b/e2fsprogs/intl/Makefile.in
@@ -0,0 +1,525 @@
+# Makefile for directory with message catalog handling library of GNU gettext
+# Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
+#
+# This program 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, 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library 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.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = ..
+VPATH = $(srcdir)
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+transform = @program_transform_name@
+libdir = @libdir@
+includedir = @includedir@
+datadir = @datadir@
+localedir = $(datadir)/locale
+gettextsrcdir = $(datadir)/gettext/intl
+aliaspath = $(localedir)
+subdir = intl
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
+
+@SET_MAKE@
+
+@ifGNUmake@ V =
+@ifGNUmake@ ifeq ($(strip $(V)),)
+@ifGNUmake@ #  E = @echo
+@ifGNUmake@ #  Q = @
+@ifGNUmake@    E = @E@
+@ifGNUmake@    Q = @Q@
+@ifGNUmake@ else
+@ifGNUmake@    E = @\#
+@ifGNUmake@    Q =
+@ifGNUmake@ endif
+
+@ifNotGNUmake@ E = @E@
+@ifNotGNUmake@ Q = @Q@
+
+l = @INTL_LIBTOOL_SUFFIX_PREFIX@
+
+AR = ar
+CC = @CC@
+LIBTOOL = @LIBTOOL@
+RANLIB = @RANLIB@
+YACC = @INTLBISON@ -y -d
+YFLAGS = --name-prefix=__gettext
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
+-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL \
+-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
+-Dset_relocation_prefix=libintl_set_relocation_prefix \
+-Drelocate=libintl_relocate \
+-DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+HEADERS = \
+  gmo.h \
+  gettextP.h \
+  hash-string.h \
+  loadinfo.h \
+  plural-exp.h \
+  eval-plural.h \
+  localcharset.h \
+  relocatable.h \
+  xsize.h \
+  printf-args.h printf-args.c \
+  printf-parse.h wprintf-parse.h printf-parse.c \
+  vasnprintf.h vasnwprintf.h vasnprintf.c \
+  os2compat.h \
+  libgnuintl.h.in
+SOURCES = \
+  bindtextdom.c \
+  dcgettext.c \
+  dgettext.c \
+  gettext.c \
+  finddomain.c \
+  loadmsgcat.c \
+  localealias.c \
+  textdomain.c \
+  l10nflist.c \
+  explodename.c \
+  dcigettext.c \
+  dcngettext.c \
+  dngettext.c \
+  ngettext.c \
+  plural.y \
+  plural-exp.c \
+  localcharset.c \
+  relocatable.c \
+  localename.c \
+  log.c \
+  printf.c \
+  osdep.c \
+  os2compat.c \
+  intl-compat.c
+OBJECTS = \
+  bindtextdom.$lo \
+  dcgettext.$lo \
+  dgettext.$lo \
+  gettext.$lo \
+  finddomain.$lo \
+  loadmsgcat.$lo \
+  localealias.$lo \
+  textdomain.$lo \
+  l10nflist.$lo \
+  explodename.$lo \
+  dcigettext.$lo \
+  dcngettext.$lo \
+  dngettext.$lo \
+  ngettext.$lo \
+  plural.$lo \
+  plural-exp.$lo \
+  localcharset.$lo \
+  relocatable.$lo \
+  localename.$lo \
+  log.$lo \
+  printf.$lo \
+  osdep.$lo \
+  intl-compat.$lo
+DISTFILES.common = Makefile.in \
+config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
+DISTFILES.generated = plural.c
+DISTFILES.normal = VERSION
+DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \
+libgnuintl.h_vms Makefile.vms \
+libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc
+DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
+COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h
+
+all: all-@USE_INCLUDED_LIBINTL@
+all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
+all-no: all-no-@BUILD_INCLUDED_LIBINTL@
+all-no-yes: libgnuintl.$la
+all-no-no:
+
+libintl.a libgnuintl.a: $(OBJECTS)
+	$(Q) rm -f $@
+	$(E) "	AR $@"
+	$(Q) $(AR) cru $@ $(OBJECTS)
+	$(E) "	RANLIB $@"
+	$(Q) $(RANLIB) $@
+
+libintl.la libgnuintl.la: $(OBJECTS)
+	$(LIBTOOL) --mode=link \
+	  $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
+	  $(OBJECTS) @LTLIBICONV@ $(LIBS) -lc \
+	  -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
+	  -rpath $(libdir) \
+	  -no-undefined
+
+# Libtool's library version information for libintl.
+# Before making a gettext release, the gettext maintainer must change this
+# according to the libtool documentation, section "Library interface versions".
+# Maintainers of other packages that include the intl directory must *not*
+# change these values.
+LTV_CURRENT=7
+LTV_REVISION=0
+LTV_AGE=4
+
+.SUFFIXES:
+.SUFFIXES: .c .y .o .lo .sin .sed
+
+.c.o:
+	$(E) "	CC $<"
+	$(Q) $(COMPILE) $<
+	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+
+.y.c:
+	$(YACC) $(YFLAGS) --output $@ $<
+	rm -f $*.h
+
+bindtextdom.lo: $(srcdir)/bindtextdom.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c
+dcgettext.lo: $(srcdir)/dcgettext.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c
+dgettext.lo: $(srcdir)/dgettext.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c
+gettext.lo: $(srcdir)/gettext.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c
+finddomain.lo: $(srcdir)/finddomain.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c
+loadmsgcat.lo: $(srcdir)/loadmsgcat.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c
+localealias.lo: $(srcdir)/localealias.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c
+textdomain.lo: $(srcdir)/textdomain.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c
+l10nflist.lo: $(srcdir)/l10nflist.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c
+explodename.lo: $(srcdir)/explodename.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c
+dcigettext.lo: $(srcdir)/dcigettext.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c
+dcngettext.lo: $(srcdir)/dcngettext.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c
+dngettext.lo: $(srcdir)/dngettext.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c
+ngettext.lo: $(srcdir)/ngettext.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c
+plural.lo: $(srcdir)/plural.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c
+plural-exp.lo: $(srcdir)/plural-exp.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c
+localcharset.lo: $(srcdir)/localcharset.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c
+relocatable.lo: $(srcdir)/relocatable.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c
+localename.lo: $(srcdir)/localename.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c
+log.lo: $(srcdir)/log.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c
+printf.lo: $(srcdir)/printf.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c
+osdep.lo: $(srcdir)/osdep.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c
+intl-compat.lo: $(srcdir)/intl-compat.c
+	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c
+
+ref-add.sed: $(srcdir)/ref-add.sin
+	$(E) "	SED ref-add.sed"
+	$(Q) sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed
+	$(Q) mv t-ref-add.sed ref-add.sed
+ref-del.sed: $(srcdir)/ref-del.sin
+	$(E) "	SED ref-del.sed"
+	$(Q) sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed
+	$(Q) mv t-ref-del.sed ref-del.sed
+
+INCLUDES = -I. -I$(srcdir) -I.. -I$(top_builddir)/lib
+
+libgnuintl.h: $(srcdir)/libgnuintl.h.in
+	$(E) "	SED libgnuintl.h "
+	$(Q) sed -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \
+	    -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
+	    -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
+	    -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
+	  < $(srcdir)/libgnuintl.h.in > libgnuintl.h 
+
+libintl.h: libgnuintl.h
+	$(E) "	CP libintl.h"
+	$(Q) cp libgnuintl.h libintl.h
+
+charset.alias: $(srcdir)/config.charset
+	$(E) "	CONFIG.CHARSET $@"
+	$(Q) $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
+	$(Q) mv t-$@ $@
+
+check: all
+
+# We must not install the libintl.h/libintl.a files if we are on a
+# system which has the GNU gettext() function in its C library or in a
+# separate library.
+# If you want to use the one which comes with this version of the
+# package, you have to use `configure --with-included-gettext'.
+install: install-exec install-data
+install-exec: all
+	$(Q) if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
+	   && test '@USE_INCLUDED_LIBINTL@' = yes; then \
+	  $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
+	  $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
+	  $(LIBTOOL) --mode=install \
+	    $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
+	  if test "@RELOCATABLE@" = yes; then \
+	    dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \
+	    if test -n "$$dependencies"; then \
+	      rm -f $(DESTDIR)$(libdir)/libintl.la; \
+	    fi; \
+	  fi; \
+	else \
+	  : ; \
+	fi
+	$(Q) if test "$(PACKAGE)" = "gettext-tools" \
+	   && test '@USE_INCLUDED_LIBINTL@' = no; then \
+	  $(mkinstalldirs) $(DESTDIR)$(libdir); \
+	  $(LIBTOOL) --mode=install \
+	    $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \
+	  rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
+	  $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \
+	  $(LIBTOOL) --mode=uninstall \
+	    rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \
+	else \
+	  : ; \
+	fi
+	if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+	  test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
+	  temp=$(DESTDIR)$(libdir)/t-charset.alias; \
+	  dest=$(DESTDIR)$(libdir)/charset.alias; \
+	  if test -f $(DESTDIR)$(libdir)/charset.alias; then \
+	    orig=$(DESTDIR)$(libdir)/charset.alias; \
+	    sed -f ref-add.sed $$orig > $$temp; \
+	    $(INSTALL_DATA) $$temp $$dest; \
+	    rm -f $$temp; \
+	  else \
+	    if test @GLIBC21@ = no; then \
+	      orig=charset.alias; \
+	      sed -f ref-add.sed $$orig > $$temp; \
+	      $(INSTALL_DATA) $$temp $$dest; \
+	      rm -f $$temp; \
+	    fi; \
+	  fi; \
+	  $(mkinstalldirs) $(DESTDIR)$(localedir); \
+	  test -f $(DESTDIR)$(localedir)/locale.alias \
+	    && orig=$(DESTDIR)$(localedir)/locale.alias \
+	    || orig=$(srcdir)/locale.alias; \
+	  temp=$(DESTDIR)$(localedir)/t-locale.alias; \
+	  dest=$(DESTDIR)$(localedir)/locale.alias; \
+	  sed -f ref-add.sed $$orig > $$temp; \
+	  $(INSTALL_DATA) $$temp $$dest; \
+	  rm -f $$temp; \
+	else \
+	  : ; \
+	fi
+install-data: all
+	$(Q) if test "$(PACKAGE)" = "gettext-tools"; then \
+	  $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+	  $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
+	  $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
+	  dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
+	  for file in $$dists; do \
+	    $(INSTALL_DATA) $(srcdir)/$$file \
+			    $(DESTDIR)$(gettextsrcdir)/$$file; \
+	  done; \
+	  chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
+	  dists="$(DISTFILES.generated)"; \
+	  for file in $$dists; do \
+	    if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
+	    $(INSTALL_DATA) $$dir/$$file \
+			    $(DESTDIR)$(gettextsrcdir)/$$file; \
+	  done; \
+	  dists="$(DISTFILES.obsolete)"; \
+	  for file in $$dists; do \
+	    rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+	  done; \
+	else \
+	  : ; \
+	fi
+
+install-strip: install
+
+installdirs:
+	if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
+	   && test '@USE_INCLUDED_LIBINTL@' = yes; then \
+	  $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
+	else \
+	  : ; \
+	fi
+	if test "$(PACKAGE)" = "gettext-tools" \
+	   && test '@USE_INCLUDED_LIBINTL@' = no; then \
+	  $(mkinstalldirs) $(DESTDIR)$(libdir); \
+	else \
+	  : ; \
+	fi
+	if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+	  test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
+	  $(mkinstalldirs) $(DESTDIR)$(localedir); \
+	else \
+	  : ; \
+	fi
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+	else \
+	  : ; \
+	fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+install-shlibs:
+
+uninstall-shlibs:
+
+install-shlibs-strip:
+
+uninstall:
+	if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
+	   && test '@USE_INCLUDED_LIBINTL@' = yes; then \
+	  rm -f $(DESTDIR)$(includedir)/libintl.h; \
+	  $(LIBTOOL) --mode=uninstall \
+	    rm -f $(DESTDIR)$(libdir)/libintl.$la; \
+	else \
+	  : ; \
+	fi
+	if test "$(PACKAGE)" = "gettext-tools" \
+	   && test '@USE_INCLUDED_LIBINTL@' = no; then \
+	  rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
+	else \
+	  : ; \
+	fi
+	if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+	  if test -f $(DESTDIR)$(libdir)/charset.alias; then \
+	    temp=$(DESTDIR)$(libdir)/t-charset.alias; \
+	    dest=$(DESTDIR)$(libdir)/charset.alias; \
+	    sed -f ref-del.sed $$dest > $$temp; \
+	    if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
+	      rm -f $$dest; \
+	    else \
+	      $(INSTALL_DATA) $$temp $$dest; \
+	    fi; \
+	    rm -f $$temp; \
+	  fi; \
+	  if test -f $(DESTDIR)$(localedir)/locale.alias; then \
+	    temp=$(DESTDIR)$(localedir)/t-locale.alias; \
+	    dest=$(DESTDIR)$(localedir)/locale.alias; \
+	    sed -f ref-del.sed $$dest > $$temp; \
+	    if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
+	      rm -f $$dest; \
+	    else \
+	      $(INSTALL_DATA) $$temp $$dest; \
+	    fi; \
+	    rm -f $$temp; \
+	  fi; \
+	else \
+	  : ; \
+	fi
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
+	    rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+	  done; \
+	else \
+	  : ; \
+	fi
+
+info dvi ps pdf html:
+
+$(OBJECTS): libgnuintl.h
+bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h
+dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h
+explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h
+dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h
+dcigettext.$lo: $(srcdir)/eval-plural.h
+localcharset.$lo: $(srcdir)/localcharset.h
+localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h
+printf.$lo: $(srcdir)/printf-args.h $(srcdir)/printf-args.c $(srcdir)/printf-parse.h $(srcdir)/wprintf-parse.h $(srcdir)/xsize.h $(srcdir)/printf-parse.c $(srcdir)/vasnprintf.h $(srcdir)/vasnwprintf.h $(srcdir)/vasnprintf.c
+
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES)
+	here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
+
+ctags: CTAGS
+
+CTAGS: $(HEADERS) $(SOURCES)
+	here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
+
+id: ID
+
+ID: $(HEADERS) $(SOURCES)
+	here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
+
+
+mostlyclean:
+	rm -f *.a *.la *.o *.obj *.lo core core.*
+	rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
+	rm -f -r .libs _libs
+
+clean: mostlyclean
+
+distclean: clean
+	rm -f Makefile ID TAGS
+	if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
+	  rm -f ChangeLog.inst $(DISTFILES.normal); \
+	else \
+	  : ; \
+	fi
+
+maintainer-clean: distclean
+	$(E) "This command is intended for maintainers to use;"
+	$(E) "it deletes files that may require special tools to rebuild."
+
+
+# GNU gettext needs not contain the file `VERSION' but contains some
+# other files which should not be distributed in other packages.
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: Makefile
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  : ; \
+	else \
+	  if test "$(PACKAGE)" = "gettext-runtime"; then \
+	    additional="$(DISTFILES.gettext)"; \
+	  else \
+	    additional="$(DISTFILES.normal)"; \
+	  fi; \
+	  $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
+	  for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
+	    if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
+	    cp -p $$dir/$$file $(distdir); \
+	  done; \
+	fi
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+#	cd $(top_builddir) && $(SHELL) ./config.status
+# This would be more efficient, but doesn't work any more with autoconf-2.57,
+# when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used.
+	cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# 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/e2fsprogs/intl/VERSION b/e2fsprogs/intl/VERSION
new file mode 100644
index 0000000..b4b846c
--- /dev/null
+++ b/e2fsprogs/intl/VERSION
@@ -0,0 +1 @@
+GNU gettext library from gettext-0.14.1
diff --git a/e2fsprogs/intl/bindtextdom.c b/e2fsprogs/intl/bindtextdom.c
new file mode 100644
index 0000000..8284226
--- /dev/null
+++ b/e2fsprogs/intl/bindtextdom.c
@@ -0,0 +1,362 @@
+/* Implementation of the bindtextdomain(3) function
+   Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "gettextP.h"
+
+#ifdef _LIBC
+/* We have to handle multi-threaded applications.  */
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc.  */
+# define __libc_rwlock_define(CLASS, NAME)
+# define __libc_rwlock_wrlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* The internal variables in the standalone libintl.a must have different
+   names than the internal variables in GNU libc, otherwise programs
+   using libintl.a cannot be linked statically.  */
+#if !defined _LIBC
+# define _nl_default_dirname libintl_nl_default_dirname
+# define _nl_domain_bindings libintl_nl_domain_bindings
+#endif
+
+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>.  */
+#ifndef offsetof
+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Contains the default location of the message catalogs.  */
+extern const char _nl_default_dirname[];
+#ifdef _LIBC
+extern const char _nl_default_dirname_internal[] attribute_hidden;
+#else
+# define INTUSE(name) name
+#endif
+
+/* List with bindings of specific domains.  */
+extern struct binding *_nl_domain_bindings;
+
+/* Lock variable to protect the global data in the gettext implementation.  */
+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
+
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define BINDTEXTDOMAIN __bindtextdomain
+# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
+# ifndef strdup
+#  define strdup(str) __strdup (str)
+# endif
+#else
+# define BINDTEXTDOMAIN libintl_bindtextdomain
+# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
+#endif
+
+/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
+   to be used for the DOMAINNAME message catalog.
+   If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
+   modified, only the current value is returned.
+   If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
+   modified nor returned.  */
+static void
+set_binding_values (const char *domainname,
+		    const char **dirnamep, const char **codesetp)
+{
+  struct binding *binding;
+  int modified;
+
+  /* Some sanity checks.  */
+  if (domainname == NULL || domainname[0] == '\0')
+    {
+      if (dirnamep)
+	*dirnamep = NULL;
+      if (codesetp)
+	*codesetp = NULL;
+      return;
+    }
+
+  __libc_rwlock_wrlock (_nl_state_lock);
+
+  modified = 0;
+
+  for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
+    {
+      int compare = strcmp (domainname, binding->domainname);
+      if (compare == 0)
+	/* We found it!  */
+	break;
+      if (compare < 0)
+	{
+	  /* It is not in the list.  */
+	  binding = NULL;
+	  break;
+	}
+    }
+
+  if (binding != NULL)
+    {
+      if (dirnamep)
+	{
+	  const char *dirname = *dirnamep;
+
+	  if (dirname == NULL)
+	    /* The current binding has be to returned.  */
+	    *dirnamep = binding->dirname;
+	  else
+	    {
+	      /* The domain is already bound.  If the new value and the old
+		 one are equal we simply do nothing.  Otherwise replace the
+		 old binding.  */
+	      char *result = binding->dirname;
+	      if (strcmp (dirname, result) != 0)
+		{
+		  if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
+		    result = (char *) INTUSE(_nl_default_dirname);
+		  else
+		    {
+#if defined _LIBC || defined HAVE_STRDUP
+		      result = strdup (dirname);
+#else
+		      size_t len = strlen (dirname) + 1;
+		      result = (char *) malloc (len);
+		      if (__builtin_expect (result != NULL, 1))
+			memcpy (result, dirname, len);
+#endif
+		    }
+
+		  if (__builtin_expect (result != NULL, 1))
+		    {
+		      if (binding->dirname != INTUSE(_nl_default_dirname))
+			free (binding->dirname);
+
+		      binding->dirname = result;
+		      modified = 1;
+		    }
+		}
+	      *dirnamep = result;
+	    }
+	}
+
+      if (codesetp)
+	{
+	  const char *codeset = *codesetp;
+
+	  if (codeset == NULL)
+	    /* The current binding has be to returned.  */
+	    *codesetp = binding->codeset;
+	  else
+	    {
+	      /* The domain is already bound.  If the new value and the old
+		 one are equal we simply do nothing.  Otherwise replace the
+		 old binding.  */
+	      char *result = binding->codeset;
+	      if (result == NULL || strcmp (codeset, result) != 0)
+		{
+#if defined _LIBC || defined HAVE_STRDUP
+		  result = strdup (codeset);
+#else
+		  size_t len = strlen (codeset) + 1;
+		  result = (char *) malloc (len);
+		  if (__builtin_expect (result != NULL, 1))
+		    memcpy (result, codeset, len);
+#endif
+
+		  if (__builtin_expect (result != NULL, 1))
+		    {
+		      free (binding->codeset);
+
+		      binding->codeset = result;
+		      binding->codeset_cntr++;
+		      modified = 1;
+		    }
+		}
+	      *codesetp = result;
+	    }
+	}
+    }
+  else if ((dirnamep == NULL || *dirnamep == NULL)
+	   && (codesetp == NULL || *codesetp == NULL))
+    {
+      /* Simply return the default values.  */
+      if (dirnamep)
+	*dirnamep = INTUSE(_nl_default_dirname);
+      if (codesetp)
+	*codesetp = NULL;
+    }
+  else
+    {
+      /* We have to create a new binding.  */
+      size_t len = strlen (domainname) + 1;
+      struct binding *new_binding =
+	(struct binding *) malloc (offsetof (struct binding, domainname) + len);
+
+      if (__builtin_expect (new_binding == NULL, 0))
+	goto failed;
+
+      memcpy (new_binding->domainname, domainname, len);
+
+      if (dirnamep)
+	{
+	  const char *dirname = *dirnamep;
+
+	  if (dirname == NULL)
+	    /* The default value.  */
+	    dirname = INTUSE(_nl_default_dirname);
+	  else
+	    {
+	      if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
+		dirname = INTUSE(_nl_default_dirname);
+	      else
+		{
+		  char *result;
+#if defined _LIBC || defined HAVE_STRDUP
+		  result = strdup (dirname);
+		  if (__builtin_expect (result == NULL, 0))
+		    goto failed_dirname;
+#else
+		  size_t len = strlen (dirname) + 1;
+		  result = (char *) malloc (len);
+		  if (__builtin_expect (result == NULL, 0))
+		    goto failed_dirname;
+		  memcpy (result, dirname, len);
+#endif
+		  dirname = result;
+		}
+	    }
+	  *dirnamep = dirname;
+	  new_binding->dirname = (char *) dirname;
+	}
+      else
+	/* The default value.  */
+	new_binding->dirname = (char *) INTUSE(_nl_default_dirname);
+
+      new_binding->codeset_cntr = 0;
+
+      if (codesetp)
+	{
+	  const char *codeset = *codesetp;
+
+	  if (codeset != NULL)
+	    {
+	      char *result;
+
+#if defined _LIBC || defined HAVE_STRDUP
+	      result = strdup (codeset);
+	      if (__builtin_expect (result == NULL, 0))
+		goto failed_codeset;
+#else
+	      size_t len = strlen (codeset) + 1;
+	      result = (char *) malloc (len);
+	      if (__builtin_expect (result == NULL, 0))
+		goto failed_codeset;
+	      memcpy (result, codeset, len);
+#endif
+	      codeset = result;
+	      new_binding->codeset_cntr++;
+	    }
+	  *codesetp = codeset;
+	  new_binding->codeset = (char *) codeset;
+	}
+      else
+	new_binding->codeset = NULL;
+
+      /* Now enqueue it.  */
+      if (_nl_domain_bindings == NULL
+	  || strcmp (domainname, _nl_domain_bindings->domainname) < 0)
+	{
+	  new_binding->next = _nl_domain_bindings;
+	  _nl_domain_bindings = new_binding;
+	}
+      else
+	{
+	  binding = _nl_domain_bindings;
+	  while (binding->next != NULL
+		 && strcmp (domainname, binding->next->domainname) > 0)
+	    binding = binding->next;
+
+	  new_binding->next = binding->next;
+	  binding->next = new_binding;
+	}
+
+      modified = 1;
+
+      /* Here we deal with memory allocation failures.  */
+      if (0)
+	{
+	failed_codeset:
+	  if (new_binding->dirname != INTUSE(_nl_default_dirname))
+	    free (new_binding->dirname);
+	failed_dirname:
+	  free (new_binding);
+	failed:
+	  if (dirnamep)
+	    *dirnamep = NULL;
+	  if (codesetp)
+	    *codesetp = NULL;
+	}
+    }
+
+  /* If we modified any binding, we flush the caches.  */
+  if (modified)
+    ++_nl_msg_cat_cntr;
+
+  __libc_rwlock_unlock (_nl_state_lock);
+}
+
+/* Specify that the DOMAINNAME message catalog will be found
+   in DIRNAME rather than in the system locale data base.  */
+char *
+BINDTEXTDOMAIN (const char *domainname, const char *dirname)
+{
+  set_binding_values (domainname, &dirname, NULL);
+  return (char *) dirname;
+}
+
+/* Specify the character encoding in which the messages from the
+   DOMAINNAME message catalog will be returned.  */
+char *
+BIND_TEXTDOMAIN_CODESET (const char *domainname, const char *codeset)
+{
+  set_binding_values (domainname, NULL, &codeset);
+  return (char *) codeset;
+}
+
+#ifdef _LIBC
+/* Aliases for function names in GNU C Library.  */
+weak_alias (__bindtextdomain, bindtextdomain);
+weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
+#endif
diff --git a/e2fsprogs/intl/config.charset b/e2fsprogs/intl/config.charset
new file mode 100644
index 0000000..43d45fb
--- /dev/null
+++ b/e2fsprogs/intl/config.charset
@@ -0,0 +1,608 @@
+#! /bin/sh
+# Output a system dependent table of character encoding aliases.
+#
+#   Copyright (C) 2000-2004 Free Software Foundation, Inc.
+#
+#   This program 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, 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
+#   Library General Public License for more details.
+#
+#   You should have received a copy of the GNU Library 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.
+#
+# The table consists of lines of the form
+#    ALIAS  CANONICAL
+#
+# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
+# ALIAS is compared in a case sensitive way.
+#
+# CANONICAL is the GNU canonical name for this character encoding.
+# It must be an encoding supported by libiconv. Support by GNU libc is
+# also desirable. CANONICAL is case insensitive. Usually an upper case
+# MIME charset name is preferred.
+# The current list of GNU canonical charset names is as follows.
+#
+#       name              MIME?             used by which systems
+#   ASCII, ANSI_X3.4-1968       glibc solaris freebsd darwin
+#   ISO-8859-1              Y   glibc aix hpux irix osf solaris freebsd darwin
+#   ISO-8859-2              Y   glibc aix hpux irix osf solaris freebsd darwin
+#   ISO-8859-3              Y   glibc solaris
+#   ISO-8859-4              Y   osf solaris freebsd darwin
+#   ISO-8859-5              Y   glibc aix hpux irix osf solaris freebsd darwin
+#   ISO-8859-6              Y   glibc aix hpux solaris
+#   ISO-8859-7              Y   glibc aix hpux irix osf solaris
+#   ISO-8859-8              Y   glibc aix hpux osf solaris
+#   ISO-8859-9              Y   glibc aix hpux irix osf solaris
+#   ISO-8859-13                 glibc
+#   ISO-8859-14                 glibc
+#   ISO-8859-15                 glibc aix osf solaris freebsd
+#   KOI8-R                  Y   glibc solaris freebsd darwin
+#   KOI8-U                  Y   glibc freebsd darwin
+#   KOI8-T                      glibc
+#   CP437                       dos
+#   CP775                       dos
+#   CP850                       aix osf dos
+#   CP852                       dos
+#   CP855                       dos
+#   CP856                       aix
+#   CP857                       dos
+#   CP861                       dos
+#   CP862                       dos
+#   CP864                       dos
+#   CP865                       dos
+#   CP866                       freebsd darwin dos
+#   CP869                       dos
+#   CP874                       woe32 dos
+#   CP922                       aix
+#   CP932                       aix woe32 dos
+#   CP943                       aix
+#   CP949                       osf woe32 dos
+#   CP950                       woe32 dos
+#   CP1046                      aix
+#   CP1124                      aix
+#   CP1125                      dos
+#   CP1129                      aix
+#   CP1250                      woe32
+#   CP1251                      glibc solaris darwin woe32
+#   CP1252                      aix woe32
+#   CP1253                      woe32
+#   CP1254                      woe32
+#   CP1255                      glibc woe32
+#   CP1256                      woe32
+#   CP1257                      woe32
+#   GB2312                  Y   glibc aix hpux irix solaris freebsd darwin
+#   EUC-JP                  Y   glibc aix hpux irix osf solaris freebsd darwin
+#   EUC-KR                  Y   glibc aix hpux irix osf solaris freebsd darwin
+#   EUC-TW                      glibc aix hpux irix osf solaris
+#   BIG5                    Y   glibc aix hpux osf solaris freebsd darwin
+#   BIG5-HKSCS                  glibc solaris
+#   GBK                         glibc aix osf solaris woe32 dos
+#   GB18030                     glibc solaris
+#   SHIFT_JIS               Y   hpux osf solaris freebsd darwin
+#   JOHAB                       glibc solaris woe32
+#   TIS-620                     glibc aix hpux osf solaris
+#   VISCII                  Y   glibc
+#   TCVN5712-1                  glibc
+#   GEORGIAN-PS                 glibc
+#   HP-ROMAN8                   hpux
+#   HP-ARABIC8                  hpux
+#   HP-GREEK8                   hpux
+#   HP-HEBREW8                  hpux
+#   HP-TURKISH8                 hpux
+#   HP-KANA8                    hpux
+#   DEC-KANJI                   osf
+#   DEC-HANYU                   osf
+#   UTF-8                   Y   glibc aix hpux osf solaris
+#
+# Note: Names which are not marked as being a MIME name should not be used in
+# Internet protocols for information interchange (mail, news, etc.).
+#
+# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
+# must understand both names and treat them as equivalent.
+#
+# The first argument passed to this file is the canonical host specification,
+#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+
+host="$1"
+os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
+echo "# This file contains a table of character encoding aliases,"
+echo "# suitable for operating system '${os}'."
+echo "# It was automatically generated from config.charset."
+# List of references, updated during installation:
+echo "# Packages using this file: "
+case "$os" in
+    linux-gnulibc1*)
+	# Linux libc5 doesn't have nl_langinfo(CODESET); therefore
+	# localcharset.c falls back to using the full locale name
+	# from the environment variables.
+	echo "C ASCII"
+	echo "POSIX ASCII"
+	for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
+	         en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
+	         en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
+	         es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
+	         et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
+	         fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
+	         it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
+	         sv_FI sv_SE; do
+	  echo "$l ISO-8859-1"
+	  echo "$l.iso-8859-1 ISO-8859-1"
+	  echo "$l.iso-8859-15 ISO-8859-15"
+	  echo "$l.iso-8859-15@euro ISO-8859-15"
+	  echo "$l@euro ISO-8859-15"
+	  echo "$l.cp-437 CP437"
+	  echo "$l.cp-850 CP850"
+	  echo "$l.cp-1252 CP1252"
+	  echo "$l.cp-1252@euro CP1252"
+	  #echo "$l.atari-st ATARI-ST" # not a commonly used encoding
+	  echo "$l.utf-8 UTF-8"
+	  echo "$l.utf-8@euro UTF-8"
+	done
+	for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
+	         sl_SI sr sr_CS sr_YU; do
+	  echo "$l ISO-8859-2"
+	  echo "$l.iso-8859-2 ISO-8859-2"
+	  echo "$l.cp-852 CP852"
+	  echo "$l.cp-1250 CP1250"
+	  echo "$l.utf-8 UTF-8"
+	done
+	for l in mk mk_MK ru ru_RU; do
+	  echo "$l ISO-8859-5"
+	  echo "$l.iso-8859-5 ISO-8859-5"
+	  echo "$l.koi8-r KOI8-R"
+	  echo "$l.cp-866 CP866"
+	  echo "$l.cp-1251 CP1251"
+	  echo "$l.utf-8 UTF-8"
+	done
+	for l in ar ar_SA; do
+	  echo "$l ISO-8859-6"
+	  echo "$l.iso-8859-6 ISO-8859-6"
+	  echo "$l.cp-864 CP864"
+	  #echo "$l.cp-868 CP868" # not a commonly used encoding
+	  echo "$l.cp-1256 CP1256"
+	  echo "$l.utf-8 UTF-8"
+	done
+	for l in el el_GR gr gr_GR; do
+	  echo "$l ISO-8859-7"
+	  echo "$l.iso-8859-7 ISO-8859-7"
+	  echo "$l.cp-869 CP869"
+	  echo "$l.cp-1253 CP1253"
+	  echo "$l.cp-1253@euro CP1253"
+	  echo "$l.utf-8 UTF-8"
+	  echo "$l.utf-8@euro UTF-8"
+	done
+	for l in he he_IL iw iw_IL; do
+	  echo "$l ISO-8859-8"
+	  echo "$l.iso-8859-8 ISO-8859-8"
+	  echo "$l.cp-862 CP862"
+	  echo "$l.cp-1255 CP1255"
+	  echo "$l.utf-8 UTF-8"
+	done
+	for l in tr tr_TR; do
+	  echo "$l ISO-8859-9"
+	  echo "$l.iso-8859-9 ISO-8859-9"
+	  echo "$l.cp-857 CP857"
+	  echo "$l.cp-1254 CP1254"
+	  echo "$l.utf-8 UTF-8"
+	done
+	for l in lt lt_LT lv lv_LV; do
+	  #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
+	  echo "$l ISO-8859-13"
+	done
+	for l in ru_UA uk uk_UA; do
+	  echo "$l KOI8-U"
+	done
+	for l in zh zh_CN; do
+	  #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
+	  echo "$l GB2312"
+	done
+	for l in ja ja_JP ja_JP.EUC; do
+	  echo "$l EUC-JP"
+	done
+	for l in ko ko_KR; do
+	  echo "$l EUC-KR"
+	done
+	for l in th th_TH; do
+	  echo "$l TIS-620"
+	done
+	for l in fa fa_IR; do
+	  #echo "$l ISIRI-3342" # a broken encoding
+	  echo "$l.utf-8 UTF-8"
+	done
+	;;
+    linux* | *-gnu*)
+	# With glibc-2.1 or newer, we don't need any canonicalization,
+	# because glibc has iconv and both glibc and libiconv support all
+	# GNU canonical names directly. Therefore, the Makefile does not
+	# need to install the alias file at all.
+	# The following applies only to glibc-2.0.x and older libcs.
+	echo "ISO_646.IRV:1983 ASCII"
+	;;
+    aix*)
+	echo "ISO8859-1 ISO-8859-1"
+	echo "ISO8859-2 ISO-8859-2"
+	echo "ISO8859-5 ISO-8859-5"
+	echo "ISO8859-6 ISO-8859-6"
+	echo "ISO8859-7 ISO-8859-7"
+	echo "ISO8859-8 ISO-8859-8"
+	echo "ISO8859-9 ISO-8859-9"
+	echo "ISO8859-15 ISO-8859-15"
+	echo "IBM-850 CP850"
+	echo "IBM-856 CP856"
+	echo "IBM-921 ISO-8859-13"
+	echo "IBM-922 CP922"
+	echo "IBM-932 CP932"
+	echo "IBM-943 CP943"
+	echo "IBM-1046 CP1046"
+	echo "IBM-1124 CP1124"
+	echo "IBM-1129 CP1129"
+	echo "IBM-1252 CP1252"
+	echo "IBM-eucCN GB2312"
+	echo "IBM-eucJP EUC-JP"
+	echo "IBM-eucKR EUC-KR"
+	echo "IBM-eucTW EUC-TW"
+	echo "big5 BIG5"
+	echo "GBK GBK"
+	echo "TIS-620 TIS-620"
+	echo "UTF-8 UTF-8"
+	;;
+    hpux*)
+	echo "iso88591 ISO-8859-1"
+	echo "iso88592 ISO-8859-2"
+	echo "iso88595 ISO-8859-5"
+	echo "iso88596 ISO-8859-6"
+	echo "iso88597 ISO-8859-7"
+	echo "iso88598 ISO-8859-8"
+	echo "iso88599 ISO-8859-9"
+	echo "iso885915 ISO-8859-15"
+	echo "roman8 HP-ROMAN8"
+	echo "arabic8 HP-ARABIC8"
+	echo "greek8 HP-GREEK8"
+	echo "hebrew8 HP-HEBREW8"
+	echo "turkish8 HP-TURKISH8"
+	echo "kana8 HP-KANA8"
+	echo "tis620 TIS-620"
+	echo "big5 BIG5"
+	echo "eucJP EUC-JP"
+	echo "eucKR EUC-KR"
+	echo "eucTW EUC-TW"
+	echo "hp15CN GB2312"
+	#echo "ccdc ?" # what is this?
+	echo "SJIS SHIFT_JIS"
+	echo "utf8 UTF-8"
+	;;
+    irix*)
+	echo "ISO8859-1 ISO-8859-1"
+	echo "ISO8859-2 ISO-8859-2"
+	echo "ISO8859-5 ISO-8859-5"
+	echo "ISO8859-7 ISO-8859-7"
+	echo "ISO8859-9 ISO-8859-9"
+	echo "eucCN GB2312"
+	echo "eucJP EUC-JP"
+	echo "eucKR EUC-KR"
+	echo "eucTW EUC-TW"
+	;;
+    osf*)
+	echo "ISO8859-1 ISO-8859-1"
+	echo "ISO8859-2 ISO-8859-2"
+	echo "ISO8859-4 ISO-8859-4"
+	echo "ISO8859-5 ISO-8859-5"
+	echo "ISO8859-7 ISO-8859-7"
+	echo "ISO8859-8 ISO-8859-8"
+	echo "ISO8859-9 ISO-8859-9"
+	echo "ISO8859-15 ISO-8859-15"
+	echo "cp850 CP850"
+	echo "big5 BIG5"
+	echo "dechanyu DEC-HANYU"
+	echo "dechanzi GB2312"
+	echo "deckanji DEC-KANJI"
+	echo "deckorean EUC-KR"
+	echo "eucJP EUC-JP"
+	echo "eucKR EUC-KR"
+	echo "eucTW EUC-TW"
+	echo "GBK GBK"
+	echo "KSC5601 CP949"
+	echo "sdeckanji EUC-JP"
+	echo "SJIS SHIFT_JIS"
+	echo "TACTIS TIS-620"
+	echo "UTF-8 UTF-8"
+	;;
+    solaris*)
+	echo "646 ASCII"
+	echo "ISO8859-1 ISO-8859-1"
+	echo "ISO8859-2 ISO-8859-2"
+	echo "ISO8859-3 ISO-8859-3"
+	echo "ISO8859-4 ISO-8859-4"
+	echo "ISO8859-5 ISO-8859-5"
+	echo "ISO8859-6 ISO-8859-6"
+	echo "ISO8859-7 ISO-8859-7"
+	echo "ISO8859-8 ISO-8859-8"
+	echo "ISO8859-9 ISO-8859-9"
+	echo "ISO8859-15 ISO-8859-15"
+	echo "koi8-r KOI8-R"
+	echo "ansi-1251 CP1251"
+	echo "BIG5 BIG5"
+	echo "Big5-HKSCS BIG5-HKSCS"
+	echo "gb2312 GB2312"
+	echo "GBK GBK"
+	echo "GB18030 GB18030"
+	echo "cns11643 EUC-TW"
+	echo "5601 EUC-KR"
+	echo "ko_KR.johap92 JOHAB"
+	echo "eucJP EUC-JP"
+	echo "PCK SHIFT_JIS"
+	echo "TIS620.2533 TIS-620"
+	#echo "sun_eu_greek ?" # what is this?
+	echo "UTF-8 UTF-8"
+	;;
+    freebsd* | os2*)
+	# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
+	# localcharset.c falls back to using the full locale name
+	# from the environment variables.
+	# Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
+	# reuse FreeBSD's locale data for OS/2.
+	echo "C ASCII"
+	echo "US-ASCII ASCII"
+	for l in la_LN lt_LN; do
+	  echo "$l.ASCII ASCII"
+	done
+	for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
+	         fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
+	         lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
+	  echo "$l.ISO_8859-1 ISO-8859-1"
+	  echo "$l.DIS_8859-15 ISO-8859-15"
+	done
+	for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
+	  echo "$l.ISO_8859-2 ISO-8859-2"
+	done
+	for l in la_LN lt_LT; do
+	  echo "$l.ISO_8859-4 ISO-8859-4"
+	done
+	for l in ru_RU ru_SU; do
+	  echo "$l.KOI8-R KOI8-R"
+	  echo "$l.ISO_8859-5 ISO-8859-5"
+	  echo "$l.CP866 CP866"
+	done
+	echo "uk_UA.KOI8-U KOI8-U"
+	echo "zh_TW.BIG5 BIG5"
+	echo "zh_TW.Big5 BIG5"
+	echo "zh_CN.EUC GB2312"
+	echo "ja_JP.EUC EUC-JP"
+	echo "ja_JP.SJIS SHIFT_JIS"
+	echo "ja_JP.Shift_JIS SHIFT_JIS"
+	echo "ko_KR.EUC EUC-KR"
+	;;
+    netbsd*)
+	echo "646 ASCII"
+	echo "ISO8859-1 ISO-8859-1"
+	echo "ISO8859-2 ISO-8859-2"
+	echo "ISO8859-4 ISO-8859-4"
+	echo "ISO8859-5 ISO-8859-5"
+	echo "ISO8859-15 ISO-8859-15"
+	echo "eucCN GB2312"
+	echo "eucJP EUC-JP"
+	echo "eucKR EUC-KR"
+	echo "eucTW EUC-TW"
+	echo "BIG5 BIG5"
+	echo "SJIS SHIFT_JIS"
+	;;
+    darwin*)
+	# Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
+	# localcharset.c falls back to using the full locale name
+	# from the environment variables.
+	echo "C ASCII"
+	for l in en_AU en_CA en_GB en_US la_LN; do
+	  echo "$l.US-ASCII ASCII"
+	done
+	for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
+	         fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
+	         nl_NL no_NO pt_PT sv_SE; do
+	  echo "$l ISO-8859-1"
+	  echo "$l.ISO8859-1 ISO-8859-1"
+	  echo "$l.ISO8859-15 ISO-8859-15"
+	done
+	for l in la_LN; do
+	  echo "$l.ISO8859-1 ISO-8859-1"
+	  echo "$l.ISO8859-15 ISO-8859-15"
+	done
+	for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
+	  echo "$l.ISO8859-2 ISO-8859-2"
+	done
+	for l in la_LN lt_LT; do
+	  echo "$l.ISO8859-4 ISO-8859-4"
+	done
+	for l in ru_RU; do
+	  echo "$l.KOI8-R KOI8-R"
+	  echo "$l.ISO8859-5 ISO-8859-5"
+	  echo "$l.CP866 CP866"
+	done
+	for l in bg_BG; do
+	  echo "$l.CP1251 CP1251"
+	done
+	echo "uk_UA.KOI8-U KOI8-U"
+	echo "zh_TW.BIG5 BIG5"
+	echo "zh_TW.Big5 BIG5"
+	echo "zh_CN.EUC GB2312"
+	echo "ja_JP.EUC EUC-JP"
+	echo "ja_JP.SJIS SHIFT_JIS"
+	echo "ko_KR.EUC EUC-KR"
+	;;
+    beos*)
+	# BeOS has a single locale, and it has UTF-8 encoding.
+	echo "* UTF-8"
+	;;
+    msdosdjgpp*)
+	# DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
+	# localcharset.c falls back to using the full locale name
+	# from the environment variables.
+	echo "#"
+	echo "# The encodings given here may not all be correct."
+	echo "# If you find that the encoding given for your language and"
+	echo "# country is not the one your DOS machine actually uses, just"
+	echo "# correct it in this file, and send a mail to"
+	echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
+	echo "# and Bruno Haible <bruno@clisp.org>."
+	echo "#"
+	echo "C ASCII"
+	# ISO-8859-1 languages
+	echo "ca CP850"
+	echo "ca_ES CP850"
+	echo "da CP865"    # not CP850 ??
+	echo "da_DK CP865" # not CP850 ??
+	echo "de CP850"
+	echo "de_AT CP850"
+	echo "de_CH CP850"
+	echo "de_DE CP850"
+	echo "en CP850"
+	echo "en_AU CP850" # not CP437 ??
+	echo "en_CA CP850"
+	echo "en_GB CP850"
+	echo "en_NZ CP437"
+	echo "en_US CP437"
+	echo "en_ZA CP850" # not CP437 ??
+	echo "es CP850"
+	echo "es_AR CP850"
+	echo "es_BO CP850"
+	echo "es_CL CP850"
+	echo "es_CO CP850"
+	echo "es_CR CP850"
+	echo "es_CU CP850"
+	echo "es_DO CP850"
+	echo "es_EC CP850"
+	echo "es_ES CP850"
+	echo "es_GT CP850"
+	echo "es_HN CP850"
+	echo "es_MX CP850"
+	echo "es_NI CP850"
+	echo "es_PA CP850"
+	echo "es_PY CP850"
+	echo "es_PE CP850"
+	echo "es_SV CP850"
+	echo "es_UY CP850"
+	echo "es_VE CP850"
+	echo "et CP850"
+	echo "et_EE CP850"
+	echo "eu CP850"
+	echo "eu_ES CP850"
+	echo "fi CP850"
+	echo "fi_FI CP850"
+	echo "fr CP850"
+	echo "fr_BE CP850"
+	echo "fr_CA CP850"
+	echo "fr_CH CP850"
+	echo "fr_FR CP850"
+	echo "ga CP850"
+	echo "ga_IE CP850"
+	echo "gd CP850"
+	echo "gd_GB CP850"
+	echo "gl CP850"
+	echo "gl_ES CP850"
+	echo "id CP850"    # not CP437 ??
+	echo "id_ID CP850" # not CP437 ??
+	echo "is CP861"    # not CP850 ??
+	echo "is_IS CP861" # not CP850 ??
+	echo "it CP850"
+	echo "it_CH CP850"
+	echo "it_IT CP850"
+	echo "lt CP775"
+	echo "lt_LT CP775"
+	echo "lv CP775"
+	echo "lv_LV CP775"
+	echo "nb CP865"    # not CP850 ??
+	echo "nb_NO CP865" # not CP850 ??
+	echo "nl CP850"
+	echo "nl_BE CP850"
+	echo "nl_NL CP850"
+	echo "nn CP865"    # not CP850 ??
+	echo "nn_NO CP865" # not CP850 ??
+	echo "no CP865"    # not CP850 ??
+	echo "no_NO CP865" # not CP850 ??
+	echo "pt CP850"
+	echo "pt_BR CP850"
+	echo "pt_PT CP850"
+	echo "sv CP850"
+	echo "sv_SE CP850"
+	# ISO-8859-2 languages
+	echo "cs CP852"
+	echo "cs_CZ CP852"
+	echo "hr CP852"
+	echo "hr_HR CP852"
+	echo "hu CP852"
+	echo "hu_HU CP852"
+	echo "pl CP852"
+	echo "pl_PL CP852"
+	echo "ro CP852"
+	echo "ro_RO CP852"
+	echo "sk CP852"
+	echo "sk_SK CP852"
+	echo "sl CP852"
+	echo "sl_SI CP852"
+	echo "sq CP852"
+	echo "sq_AL CP852"
+	echo "sr CP852"    # CP852 or CP866 or CP855 ??
+	echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
+	echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
+	# ISO-8859-3 languages
+	echo "mt CP850"
+	echo "mt_MT CP850"
+	# ISO-8859-5 languages
+	echo "be CP866"
+	echo "be_BE CP866"
+	echo "bg CP866"    # not CP855 ??
+	echo "bg_BG CP866" # not CP855 ??
+	echo "mk CP866"    # not CP855 ??
+	echo "mk_MK CP866" # not CP855 ??
+	echo "ru CP866"
+	echo "ru_RU CP866"
+	echo "uk CP1125"
+	echo "uk_UA CP1125"
+	# ISO-8859-6 languages
+	echo "ar CP864"
+	echo "ar_AE CP864"
+	echo "ar_DZ CP864"
+	echo "ar_EG CP864"
+	echo "ar_IQ CP864"
+	echo "ar_IR CP864"
+	echo "ar_JO CP864"
+	echo "ar_KW CP864"
+	echo "ar_MA CP864"
+	echo "ar_OM CP864"
+	echo "ar_QA CP864"
+	echo "ar_SA CP864"
+	echo "ar_SY CP864"
+	# ISO-8859-7 languages
+	echo "el CP869"
+	echo "el_GR CP869"
+	# ISO-8859-8 languages
+	echo "he CP862"
+	echo "he_IL CP862"
+	# ISO-8859-9 languages
+	echo "tr CP857"
+	echo "tr_TR CP857"
+	# Japanese
+	echo "ja CP932"
+	echo "ja_JP CP932"
+	# Chinese
+	echo "zh_CN GBK"
+	echo "zh_TW CP950" # not CP938 ??
+	# Korean
+	echo "kr CP949"    # not CP934 ??
+	echo "kr_KR CP949" # not CP934 ??
+	# Thai
+	echo "th CP874"
+	echo "th_TH CP874"
+	# Other
+	echo "eo CP850"
+	echo "eo_EO CP850"
+	;;
+esac
diff --git a/e2fsprogs/intl/dcgettext.c b/e2fsprogs/intl/dcgettext.c
new file mode 100644
index 0000000..850acde
--- /dev/null
+++ b/e2fsprogs/intl/dcgettext.c
@@ -0,0 +1,56 @@
+/* Implementation of the dcgettext(3) function.
+   Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define DCGETTEXT __dcgettext
+# define DCIGETTEXT __dcigettext
+#else
+# define DCGETTEXT libintl_dcgettext
+# define DCIGETTEXT libintl_dcigettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+   locale.  */
+char *
+DCGETTEXT (const char *domainname, const char *msgid, int category)
+{
+  return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+INTDEF(__dcgettext)
+weak_alias (__dcgettext, dcgettext);
+#endif
diff --git a/e2fsprogs/intl/dcigettext.c b/e2fsprogs/intl/dcigettext.c
new file mode 100644
index 0000000..79678cf
--- /dev/null
+++ b/e2fsprogs/intl/dcigettext.c
@@ -0,0 +1,1222 @@
+/* Implementation of the internal dcigettext function.
+   Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE	1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  if defined HAVE_ALLOCA_H || defined _LIBC
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+#ifndef __set_errno
+# define __set_errno(val) errno = (val)
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include <locale.h>
+
+#ifdef _LIBC
+  /* Guess whether integer division by zero raises signal SIGFPE.
+     Set to 1 only if you know for sure.  In case of doubt, set to 0.  */
+# if defined __alpha__ || defined __arm__ || defined __i386__ \
+     || defined __m68k__ || defined __s390__
+#  define INTDIV0_RAISES_SIGFPE 1
+# else
+#  define INTDIV0_RAISES_SIGFPE 0
+# endif
+#endif
+#if !INTDIV0_RAISES_SIGFPE
+# include <signal.h>
+#endif
+
+#if defined HAVE_SYS_PARAM_H || defined _LIBC
+# include <sys/param.h>
+#endif
+
+#include "gettextP.h"
+#include "plural-exp.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "hash-string.h"
+
+/* Thread safetyness.  */
+#ifdef _LIBC
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc.  */
+# define __libc_lock_define_initialized(CLASS, NAME)
+# define __libc_lock_lock(NAME)
+# define __libc_lock_unlock(NAME)
+# define __libc_rwlock_define_initialized(CLASS, NAME)
+# define __libc_rwlock_rdlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* Alignment of types.  */
+#if defined __GNUC__ && __GNUC__ >= 2
+# define alignof(TYPE) __alignof__ (TYPE)
+#else
+# define alignof(TYPE) \
+    ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
+#endif
+
+/* The internal variables in the standalone libintl.a must have different
+   names than the internal variables in GNU libc, otherwise programs
+   using libintl.a cannot be linked statically.  */
+#if !defined _LIBC
+# define _nl_default_default_domain libintl_nl_default_default_domain
+# define _nl_current_default_domain libintl_nl_current_default_domain
+# define _nl_default_dirname libintl_nl_default_dirname
+# define _nl_domain_bindings libintl_nl_domain_bindings
+#endif
+
+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>.  */
+#ifndef offsetof
+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions.  This is required by the standard
+   because some ANSI C functions will require linking with this object
+   file and the name space must not be polluted.  */
+# define getcwd __getcwd
+# ifndef stpcpy
+#  define stpcpy __stpcpy
+# endif
+# define tfind __tfind
+#else
+# if !defined HAVE_GETCWD
+char *getwd ();
+#  define getcwd(buf, max) getwd (buf)
+# else
+#  if VMS
+#   define getcwd(buf, max) (getcwd) (buf, max, 0)
+#  else
+char *getcwd ();
+#  endif
+# endif
+# ifndef HAVE_STPCPY
+#define stpcpy(dest, src) my_stpcpy(dest, src)
+static char *stpcpy (char *dest, const char *src);
+# endif
+# ifndef HAVE_MEMPCPY
+static void *mempcpy (void *dest, const void *src, size_t n);
+# endif
+#endif
+
+/* Amount to increase buffer size by in each try.  */
+#define PATH_INCR 32
+
+/* The following is from pathmax.h.  */
+/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
+   PATH_MAX but might cause redefinition warnings when sys/param.h is
+   later included (as on MORE/BSD 4.3).  */
+#if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__)
+# include <limits.h>
+#endif
+
+#ifndef _POSIX_PATH_MAX
+# define _POSIX_PATH_MAX 255
+#endif
+
+#if !defined PATH_MAX && defined _PC_PATH_MAX
+# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
+#endif
+
+/* Don't include sys/param.h if it already has been.  */
+#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
+# include <sys/param.h>
+#endif
+
+#if !defined PATH_MAX && defined MAXPATHLEN
+# define PATH_MAX MAXPATHLEN
+#endif
+
+#ifndef PATH_MAX
+# define PATH_MAX _POSIX_PATH_MAX
+#endif
+
+/* Pathname support.
+   ISSLASH(C)           tests whether C is a directory separator character.
+   IS_ABSOLUTE_PATH(P)  tests whether P is an absolute path.  If it is not,
+                        it may be concatenated to a directory pathname.
+   IS_PATH_WITH_DIR(P)  tests whether P contains a directory specification.
+ */
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+# define HAS_DEVICE(P) \
+    ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+     && (P)[1] == ':')
+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
+# define IS_PATH_WITH_DIR(P) \
+    (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
+#else
+  /* Unix */
+# define ISSLASH(C) ((C) == '/')
+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
+#endif
+
+/* This is the type used for the search tree where known translations
+   are stored.  */
+struct known_translation_t
+{
+  /* Domain in which to search.  */
+  char *domainname;
+
+  /* The category.  */
+  int category;
+
+  /* State of the catalog counter at the point the string was found.  */
+  int counter;
+
+  /* Catalog where the string was found.  */
+  struct loaded_l10nfile *domain;
+
+  /* And finally the translation.  */
+  const char *translation;
+  size_t translation_length;
+
+  /* Pointer to the string in question.  */
+  char msgid[ZERO];
+};
+
+/* Root of the search tree with known translations.  We can use this
+   only if the system provides the `tsearch' function family.  */
+#if defined HAVE_TSEARCH || defined _LIBC
+# include <search.h>
+
+static void *root;
+
+# ifdef _LIBC
+#  define tsearch __tsearch
+# endif
+
+/* Function to compare two entries in the table of known translations.  */
+static int
+transcmp (const void *p1, const void *p2)
+{
+  const struct known_translation_t *s1;
+  const struct known_translation_t *s2;
+  int result;
+
+  s1 = (const struct known_translation_t *) p1;
+  s2 = (const struct known_translation_t *) p2;
+
+  result = strcmp (s1->msgid, s2->msgid);
+  if (result == 0)
+    {
+      result = strcmp (s1->domainname, s2->domainname);
+      if (result == 0)
+	/* We compare the category last (though this is the cheapest
+	   operation) since it is hopefully always the same (namely
+	   LC_MESSAGES).  */
+	result = s1->category - s2->category;
+    }
+
+  return result;
+}
+#endif
+
+#ifndef INTVARDEF
+# define INTVARDEF(name)
+#endif
+#ifndef INTUSE
+# define INTUSE(name) name
+#endif
+
+/* Name of the default domain used for gettext(3) prior any call to
+   textdomain(3).  The default value for this is "messages".  */
+const char _nl_default_default_domain[] attribute_hidden = "messages";
+
+/* Value used as the default domain for gettext(3).  */
+const char *_nl_current_default_domain attribute_hidden
+     = _nl_default_default_domain;
+
+/* Contains the default location of the message catalogs.  */
+#if defined __EMX__
+extern const char _nl_default_dirname[];
+#else
+const char _nl_default_dirname[] = LOCALEDIR;
+INTVARDEF (_nl_default_dirname)
+#endif
+
+/* List with bindings of specific domains created by bindtextdomain()
+   calls.  */
+struct binding *_nl_domain_bindings;
+
+/* Prototypes for local functions.  */
+static char *plural_lookup (struct loaded_l10nfile *domain,
+			    unsigned long int n,
+			    const char *translation, size_t translation_len)
+     internal_function;
+static const char *guess_category_value (int category,
+					 const char *categoryname)
+     internal_function;
+#ifdef _LIBC
+# include "../locale/localeinfo.h"
+# define category_to_name(category)	_nl_category_names[category]
+#else
+static const char *category_to_name (int category) internal_function;
+#endif
+
+
+/* For those loosing systems which don't have `alloca' we have to add
+   some additional code emulating it.  */
+#ifdef HAVE_ALLOCA
+/* Nothing has to be done.  */
+# define freea(p) /* nothing */
+# define ADD_BLOCK(list, address) /* nothing */
+# define FREE_BLOCKS(list) /* nothing */
+#else
+struct block_list
+{
+  void *address;
+  struct block_list *next;
+};
+# define ADD_BLOCK(list, addr)						      \
+  do {									      \
+    struct block_list *newp = (struct block_list *) malloc (sizeof (*newp));  \
+    /* If we cannot get a free block we cannot add the new element to	      \
+       the list.  */							      \
+    if (newp != NULL) {							      \
+      newp->address = (addr);						      \
+      newp->next = (list);						      \
+      (list) = newp;							      \
+    }									      \
+  } while (0)
+# define FREE_BLOCKS(list)						      \
+  do {									      \
+    while (list != NULL) {						      \
+      struct block_list *old = list;					      \
+      list = list->next;						      \
+      free (old->address);						      \
+      free (old);							      \
+    }									      \
+  } while (0)
+# undef alloca
+# define alloca(size) (malloc (size))
+# define freea(p) free (p)
+#endif	/* have alloca */
+
+
+#ifdef _LIBC
+/* List of blocks allocated for translations.  */
+typedef struct transmem_list
+{
+  struct transmem_list *next;
+  char data[ZERO];
+} transmem_block_t;
+static struct transmem_list *transmem_list;
+#else
+typedef unsigned char transmem_block_t;
+#endif
+
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define DCIGETTEXT __dcigettext
+#else
+# define DCIGETTEXT libintl_dcigettext
+#endif
+
+/* Lock variable to protect the global data in the gettext implementation.  */
+#ifdef _LIBC
+__libc_rwlock_define_initialized (, _nl_state_lock attribute_hidden)
+#endif
+
+/* Checking whether the binaries runs SUID must be done and glibc provides
+   easier methods therefore we make a difference here.  */
+#ifdef _LIBC
+# define ENABLE_SECURE __libc_enable_secure
+# define DETERMINE_SECURE
+#else
+# ifndef HAVE_GETUID
+#  define getuid() 0
+# endif
+# ifndef HAVE_GETGID
+#  define getgid() 0
+# endif
+# ifndef HAVE_GETEUID
+#  define geteuid() getuid()
+# endif
+# ifndef HAVE_GETEGID
+#  define getegid() getgid()
+# endif
+static int enable_secure;
+# define ENABLE_SECURE (enable_secure == 1)
+# define DETERMINE_SECURE \
+  if (enable_secure == 0)						      \
+    {									      \
+      if (getuid () != geteuid () || getgid () != getegid ())		      \
+	enable_secure = 1;						      \
+      else								      \
+	enable_secure = -1;						      \
+    }
+#endif
+
+/* Get the function to evaluate the plural expression.  */
+#include "eval-plural.h"
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current
+   CATEGORY locale and, if PLURAL is nonzero, search over string
+   depending on the plural form determined by N.  */
+char *
+DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
+	    int plural, unsigned long int n, int category)
+{
+#ifndef HAVE_ALLOCA
+  struct block_list *block_list = NULL;
+#endif
+  struct loaded_l10nfile *domain;
+  struct binding *binding;
+  const char *categoryname;
+  const char *categoryvalue;
+  char *dirname, *xdomainname;
+  char *single_locale;
+  char *retval;
+  size_t retlen;
+  int saved_errno;
+#if defined HAVE_TSEARCH || defined _LIBC
+  struct known_translation_t *search;
+  struct known_translation_t **foundp = NULL;
+  size_t msgid_len;
+#endif
+  size_t domainname_len;
+
+  /* If no real MSGID is given return NULL.  */
+  if (msgid1 == NULL)
+    return NULL;
+
+#ifdef _LIBC
+  if (category < 0 || category >= __LC_LAST || category == LC_ALL)
+    /* Bogus.  */
+    return (plural == 0
+	    ? (char *) msgid1
+	    /* Use the Germanic plural rule.  */
+	    : n == 1 ? (char *) msgid1 : (char *) msgid2);
+#endif
+
+  __libc_rwlock_rdlock (_nl_state_lock);
+
+  /* If DOMAINNAME is NULL, we are interested in the default domain.  If
+     CATEGORY is not LC_MESSAGES this might not make much sense but the
+     definition left this undefined.  */
+  if (domainname == NULL)
+    domainname = _nl_current_default_domain;
+
+  /* OS/2 specific: backward compatibility with older libintl versions  */
+#ifdef LC_MESSAGES_COMPAT
+  if (category == LC_MESSAGES_COMPAT)
+    category = LC_MESSAGES;
+#endif
+
+#if defined HAVE_TSEARCH || defined _LIBC
+  msgid_len = strlen (msgid1) + 1;
+
+  /* Try to find the translation among those which we found at
+     some time.  */
+  search = (struct known_translation_t *)
+	   alloca (offsetof (struct known_translation_t, msgid) + msgid_len);
+  memcpy (search->msgid, msgid1, msgid_len);
+  search->domainname = (char *) domainname;
+  search->category = category;
+
+  foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
+  freea (search);
+  if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
+    {
+      /* Now deal with plural.  */
+      if (plural)
+	retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation,
+				(*foundp)->translation_length);
+      else
+	retval = (char *) (*foundp)->translation;
+
+      __libc_rwlock_unlock (_nl_state_lock);
+      return retval;
+    }
+#endif
+
+  /* Preserve the `errno' value.  */
+  saved_errno = errno;
+
+  /* See whether this is a SUID binary or not.  */
+  DETERMINE_SECURE;
+
+  /* First find matching binding.  */
+  for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
+    {
+      int compare = strcmp (domainname, binding->domainname);
+      if (compare == 0)
+	/* We found it!  */
+	break;
+      if (compare < 0)
+	{
+	  /* It is not in the list.  */
+	  binding = NULL;
+	  break;
+	}
+    }
+
+  if (binding == NULL)
+    dirname = (char *) INTUSE(_nl_default_dirname);
+  else if (IS_ABSOLUTE_PATH (binding->dirname))
+    dirname = binding->dirname;
+  else
+    {
+      /* We have a relative path.  Make it absolute now.  */
+      size_t dirname_len = strlen (binding->dirname) + 1;
+      size_t path_max;
+      char *ret;
+
+      path_max = (unsigned int) PATH_MAX;
+      path_max += 2;		/* The getcwd docs say to do this.  */
+
+      for (;;)
+	{
+	  dirname = (char *) alloca (path_max + dirname_len);
+	  ADD_BLOCK (block_list, dirname);
+
+	  __set_errno (0);
+	  ret = getcwd (dirname, path_max);
+	  if (ret != NULL || errno != ERANGE)
+	    break;
+
+	  path_max += path_max / 2;
+	  path_max += PATH_INCR;
+	}
+
+      if (ret == NULL)
+	/* We cannot get the current working directory.  Don't signal an
+	   error but simply return the default string.  */
+	goto return_untranslated;
+
+      stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
+    }
+
+  /* Now determine the symbolic name of CATEGORY and its value.  */
+  categoryname = category_to_name (category);
+  categoryvalue = guess_category_value (category, categoryname);
+
+  domainname_len = strlen (domainname);
+  xdomainname = (char *) alloca (strlen (categoryname)
+				 + domainname_len + 5);
+  ADD_BLOCK (block_list, xdomainname);
+
+  stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
+		  domainname, domainname_len),
+	  ".mo");
+
+  /* Creating working area.  */
+  single_locale = (char *) alloca (strlen (categoryvalue) + 1);
+  ADD_BLOCK (block_list, single_locale);
+
+
+  /* Search for the given string.  This is a loop because we perhaps
+     got an ordered list of languages to consider for the translation.  */
+  while (1)
+    {
+      /* Make CATEGORYVALUE point to the next element of the list.  */
+      while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
+	++categoryvalue;
+      if (categoryvalue[0] == '\0')
+	{
+	  /* The whole contents of CATEGORYVALUE has been searched but
+	     no valid entry has been found.  We solve this situation
+	     by implicitly appending a "C" entry, i.e. no translation
+	     will take place.  */
+	  single_locale[0] = 'C';
+	  single_locale[1] = '\0';
+	}
+      else
+	{
+	  char *cp = single_locale;
+	  while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
+	    *cp++ = *categoryvalue++;
+	  *cp = '\0';
+
+	  /* When this is a SUID binary we must not allow accessing files
+	     outside the dedicated directories.  */
+	  if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale))
+	    /* Ingore this entry.  */
+	    continue;
+	}
+
+      /* If the current locale value is C (or POSIX) we don't load a
+	 domain.  Return the MSGID.  */
+      if (strcmp (single_locale, "C") == 0
+	  || strcmp (single_locale, "POSIX") == 0)
+	break;
+
+      /* Find structure describing the message catalog matching the
+	 DOMAINNAME and CATEGORY.  */
+      domain = _nl_find_domain (dirname, single_locale, xdomainname, binding);
+
+      if (domain != NULL)
+	{
+	  retval = _nl_find_msg (domain, binding, msgid1, &retlen);
+
+	  if (retval == NULL)
+	    {
+	      int cnt;
+
+	      for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
+		{
+		  retval = _nl_find_msg (domain->successor[cnt], binding,
+					 msgid1, &retlen);
+
+		  if (retval != NULL)
+		    {
+		      domain = domain->successor[cnt];
+		      break;
+		    }
+		}
+	    }
+
+	  if (retval != NULL)
+	    {
+	      /* Found the translation of MSGID1 in domain DOMAIN:
+		 starting at RETVAL, RETLEN bytes.  */
+	      FREE_BLOCKS (block_list);
+#if defined HAVE_TSEARCH || defined _LIBC
+	      if (foundp == NULL)
+		{
+		  /* Create a new entry and add it to the search tree.  */
+		  struct known_translation_t *newp;
+
+		  newp = (struct known_translation_t *)
+		    malloc (offsetof (struct known_translation_t, msgid)
+			    + msgid_len + domainname_len + 1);
+		  if (newp != NULL)
+		    {
+		      newp->domainname =
+			mempcpy (newp->msgid, msgid1, msgid_len);
+		      memcpy (newp->domainname, domainname, domainname_len + 1);
+		      newp->category = category;
+		      newp->counter = _nl_msg_cat_cntr;
+		      newp->domain = domain;
+		      newp->translation = retval;
+		      newp->translation_length = retlen;
+
+		      /* Insert the entry in the search tree.  */
+		      foundp = (struct known_translation_t **)
+			tsearch (newp, &root, transcmp);
+		      if (foundp == NULL
+			  || __builtin_expect (*foundp != newp, 0))
+			/* The insert failed.  */
+			free (newp);
+		    }
+		}
+	      else
+		{
+		  /* We can update the existing entry.  */
+		  (*foundp)->counter = _nl_msg_cat_cntr;
+		  (*foundp)->domain = domain;
+		  (*foundp)->translation = retval;
+		  (*foundp)->translation_length = retlen;
+		}
+#endif
+	      __set_errno (saved_errno);
+
+	      /* Now deal with plural.  */
+	      if (plural)
+		retval = plural_lookup (domain, n, retval, retlen);
+
+	      __libc_rwlock_unlock (_nl_state_lock);
+	      return retval;
+	    }
+	}
+    }
+
+ return_untranslated:
+  /* Return the untranslated MSGID.  */
+  FREE_BLOCKS (block_list);
+  __libc_rwlock_unlock (_nl_state_lock);
+#if 0				/* Doesn't work with diet libc -- TYT */
+#ifndef _LIBC
+  if (!ENABLE_SECURE)
+    {
+      extern void _nl_log_untranslated (const char *logfilename,
+					const char *domainname,
+					const char *msgid1, const char *msgid2,
+					int plural);
+      const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED");
+
+      if (logfilename != NULL && logfilename[0] != '\0')
+	_nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural);
+    }
+#endif
+#endif
+  __set_errno (saved_errno);
+  return (plural == 0
+	  ? (char *) msgid1
+	  /* Use the Germanic plural rule.  */
+	  : n == 1 ? (char *) msgid1 : (char *) msgid2);
+}
+
+
+char *
+internal_function
+_nl_find_msg (struct loaded_l10nfile *domain_file,
+	      struct binding *domainbinding, const char *msgid,
+	      size_t *lengthp)
+{
+  struct loaded_domain *domain;
+  nls_uint32 nstrings;
+  size_t act;
+  char *result;
+  size_t resultlen;
+
+  if (domain_file->decided == 0)
+    _nl_load_domain (domain_file, domainbinding);
+
+  if (domain_file->data == NULL)
+    return NULL;
+
+  domain = (struct loaded_domain *) domain_file->data;
+
+  nstrings = domain->nstrings;
+
+  /* Locate the MSGID and its translation.  */
+  if (domain->hash_tab != NULL)
+    {
+      /* Use the hashing table.  */
+      nls_uint32 len = strlen (msgid);
+      nls_uint32 hash_val = hash_string (msgid);
+      nls_uint32 idx = hash_val % domain->hash_size;
+      nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
+
+      while (1)
+	{
+	  nls_uint32 nstr =
+	    W (domain->must_swap_hash_tab, domain->hash_tab[idx]);
+
+	  if (nstr == 0)
+	    /* Hash table entry is empty.  */
+	    return NULL;
+
+	  nstr--;
+
+	  /* Compare msgid with the original string at index nstr.
+	     We compare the lengths with >=, not ==, because plural entries
+	     are represented by strings with an embedded NUL.  */
+	  if (nstr < nstrings
+	      ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len
+		&& (strcmp (msgid,
+			    domain->data + W (domain->must_swap,
+					      domain->orig_tab[nstr].offset))
+		    == 0)
+	      : domain->orig_sysdep_tab[nstr - nstrings].length > len
+		&& (strcmp (msgid,
+			    domain->orig_sysdep_tab[nstr - nstrings].pointer)
+		    == 0))
+	    {
+	      act = nstr;
+	      goto found;
+	    }
+
+	  if (idx >= domain->hash_size - incr)
+	    idx -= domain->hash_size - incr;
+	  else
+	    idx += incr;
+	}
+      /* NOTREACHED */
+    }
+  else
+    {
+      /* Try the default method:  binary search in the sorted array of
+	 messages.  */
+      size_t top, bottom;
+
+      bottom = 0;
+      top = nstrings;
+      while (bottom < top)
+	{
+	  int cmp_val;
+
+	  act = (bottom + top) / 2;
+	  cmp_val = strcmp (msgid, (domain->data
+				    + W (domain->must_swap,
+					 domain->orig_tab[act].offset)));
+	  if (cmp_val < 0)
+	    top = act;
+	  else if (cmp_val > 0)
+	    bottom = act + 1;
+	  else
+	    goto found;
+	}
+      /* No translation was found.  */
+      return NULL;
+    }
+
+ found:
+  /* The translation was found at index ACT.  If we have to convert the
+     string to use a different character set, this is the time.  */
+  if (act < nstrings)
+    {
+      result = (char *)
+	(domain->data + W (domain->must_swap, domain->trans_tab[act].offset));
+      resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
+    }
+  else
+    {
+      result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer;
+      resultlen = domain->trans_sysdep_tab[act - nstrings].length;
+    }
+
+#if defined _LIBC || HAVE_ICONV
+  if (domain->codeset_cntr
+      != (domainbinding != NULL ? domainbinding->codeset_cntr : 0))
+    {
+      /* The domain's codeset has changed through bind_textdomain_codeset()
+	 since the message catalog was initialized or last accessed.  We
+	 have to reinitialize the converter.  */
+      _nl_free_domain_conv (domain);
+      _nl_init_domain_conv (domain_file, domain, domainbinding);
+    }
+
+  if (
+# ifdef _LIBC
+      domain->conv != (__gconv_t) -1
+# else
+#  if HAVE_ICONV
+      domain->conv != (iconv_t) -1
+#  endif
+# endif
+      )
+    {
+      /* We are supposed to do a conversion.  First allocate an
+	 appropriate table with the same structure as the table
+	 of translations in the file, where we can put the pointers
+	 to the converted strings in.
+	 There is a slight complication with plural entries.  They
+	 are represented by consecutive NUL terminated strings.  We
+	 handle this case by converting RESULTLEN bytes, including
+	 NULs.  */
+
+      if (domain->conv_tab == NULL
+	  && ((domain->conv_tab =
+		 (char **) calloc (nstrings + domain->n_sysdep_strings,
+				   sizeof (char *)))
+	      == NULL))
+	/* Mark that we didn't succeed allocating a table.  */
+	domain->conv_tab = (char **) -1;
+
+      if (__builtin_expect (domain->conv_tab == (char **) -1, 0))
+	/* Nothing we can do, no more memory.  */
+	goto converted;
+
+      if (domain->conv_tab[act] == NULL)
+	{
+	  /* We haven't used this string so far, so it is not
+	     translated yet.  Do this now.  */
+	  /* We use a bit more efficient memory handling.
+	     We allocate always larger blocks which get used over
+	     time.  This is faster than many small allocations.   */
+	  __libc_lock_define_initialized (static, lock)
+# define INITIAL_BLOCK_SIZE	4080
+	  static unsigned char *freemem;
+	  static size_t freemem_size;
+
+	  const unsigned char *inbuf;
+	  unsigned char *outbuf;
+	  int malloc_count;
+# ifndef _LIBC
+	  transmem_block_t *transmem_list = NULL;
+# endif
+
+	  __libc_lock_lock (lock);
+
+	  inbuf = (const unsigned char *) result;
+	  outbuf = freemem + sizeof (size_t);
+
+	  malloc_count = 0;
+	  while (1)
+	    {
+	      transmem_block_t *newmem;
+# ifdef _LIBC
+	      size_t non_reversible;
+	      int res;
+
+	      if (freemem_size < sizeof (size_t))
+		goto resize_freemem;
+
+	      res = __gconv (domain->conv,
+			     &inbuf, inbuf + resultlen,
+			     &outbuf,
+			     outbuf + freemem_size - sizeof (size_t),
+			     &non_reversible);
+
+	      if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT)
+		break;
+
+	      if (res != __GCONV_FULL_OUTPUT)
+		{
+		  __libc_lock_unlock (lock);
+		  goto converted;
+		}
+
+	      inbuf = result;
+# else
+#  if HAVE_ICONV
+	      const char *inptr = (const char *) inbuf;
+	      size_t inleft = resultlen;
+	      char *outptr = (char *) outbuf;
+	      size_t outleft;
+
+	      if (freemem_size < sizeof (size_t))
+		goto resize_freemem;
+
+	      outleft = freemem_size - sizeof (size_t);
+	      if (iconv (domain->conv,
+			 (ICONV_CONST char **) &inptr, &inleft,
+			 &outptr, &outleft)
+		  != (size_t) (-1))
+		{
+		  outbuf = (unsigned char *) outptr;
+		  break;
+		}
+	      if (errno != E2BIG)
+		{
+		  __libc_lock_unlock (lock);
+		  goto converted;
+		}
+#  endif
+# endif
+
+	    resize_freemem:
+	      /* We must allocate a new buffer or resize the old one.  */
+	      if (malloc_count > 0)
+		{
+		  ++malloc_count;
+		  freemem_size = malloc_count * INITIAL_BLOCK_SIZE;
+		  newmem = (transmem_block_t *) realloc (transmem_list,
+							 freemem_size);
+# ifdef _LIBC
+		  if (newmem != NULL)
+		    transmem_list = transmem_list->next;
+		  else
+		    {
+		      struct transmem_list *old = transmem_list;
+
+		      transmem_list = transmem_list->next;
+		      free (old);
+		    }
+# endif
+		}
+	      else
+		{
+		  malloc_count = 1;
+		  freemem_size = INITIAL_BLOCK_SIZE;
+		  newmem = (transmem_block_t *) malloc (freemem_size);
+		}
+	      if (__builtin_expect (newmem == NULL, 0))
+		{
+		  freemem = NULL;
+		  freemem_size = 0;
+		  __libc_lock_unlock (lock);
+		  goto converted;
+		}
+
+# ifdef _LIBC
+	      /* Add the block to the list of blocks we have to free
+                 at some point.  */
+	      newmem->next = transmem_list;
+	      transmem_list = newmem;
+
+	      freemem = newmem->data;
+	      freemem_size -= offsetof (struct transmem_list, data);
+# else
+	      transmem_list = newmem;
+	      freemem = newmem;
+# endif
+
+	      outbuf = freemem + sizeof (size_t);
+	    }
+
+	  /* We have now in our buffer a converted string.  Put this
+	     into the table of conversions.  */
+	  *(size_t *) freemem = outbuf - freemem - sizeof (size_t);
+	  domain->conv_tab[act] = (char *) freemem;
+	  /* Shrink freemem, but keep it aligned.  */
+	  freemem_size -= outbuf - freemem;
+	  freemem = outbuf;
+	  freemem += freemem_size & (alignof (size_t) - 1);
+	  freemem_size = freemem_size & ~ (alignof (size_t) - 1);
+
+	  __libc_lock_unlock (lock);
+	}
+
+      /* Now domain->conv_tab[act] contains the translation of all
+	 the plural variants.  */
+      result = domain->conv_tab[act] + sizeof (size_t);
+      resultlen = *(size_t *) domain->conv_tab[act];
+    }
+
+ converted:
+  /* The result string is converted.  */
+
+#endif /* _LIBC || HAVE_ICONV */
+
+  *lengthp = resultlen;
+  return result;
+}
+
+
+/* Look up a plural variant.  */
+static char *
+internal_function
+plural_lookup (struct loaded_l10nfile *domain, unsigned long int n,
+	       const char *translation, size_t translation_len)
+{
+  struct loaded_domain *domaindata = (struct loaded_domain *) domain->data;
+  unsigned long int index;
+  const char *p;
+
+  index = plural_eval (domaindata->plural, n);
+  if (index >= domaindata->nplurals)
+    /* This should never happen.  It means the plural expression and the
+       given maximum value do not match.  */
+    index = 0;
+
+  /* Skip INDEX strings at TRANSLATION.  */
+  p = translation;
+  while (index-- > 0)
+    {
+#ifdef _LIBC
+      p = __rawmemchr (p, '\0');
+#else
+      p = strchr (p, '\0');
+#endif
+      /* And skip over the NUL byte.  */
+      p++;
+
+      if (p >= translation + translation_len)
+	/* This should never happen.  It means the plural expression
+	   evaluated to a value larger than the number of variants
+	   available for MSGID1.  */
+	return (char *) translation;
+    }
+  return (char *) p;
+}
+
+#ifndef _LIBC
+/* Return string representation of locale CATEGORY.  */
+static const char *
+internal_function
+category_to_name (int category)
+{
+  const char *retval;
+
+  switch (category)
+  {
+#ifdef LC_COLLATE
+  case LC_COLLATE:
+    retval = "LC_COLLATE";
+    break;
+#endif
+#ifdef LC_CTYPE
+  case LC_CTYPE:
+    retval = "LC_CTYPE";
+    break;
+#endif
+#ifdef LC_MONETARY
+  case LC_MONETARY:
+    retval = "LC_MONETARY";
+    break;
+#endif
+#ifdef LC_NUMERIC
+  case LC_NUMERIC:
+    retval = "LC_NUMERIC";
+    break;
+#endif
+#ifdef LC_TIME
+  case LC_TIME:
+    retval = "LC_TIME";
+    break;
+#endif
+#ifdef LC_MESSAGES
+  case LC_MESSAGES:
+    retval = "LC_MESSAGES";
+    break;
+#endif
+#ifdef LC_RESPONSE
+  case LC_RESPONSE:
+    retval = "LC_RESPONSE";
+    break;
+#endif
+#ifdef LC_ALL
+  case LC_ALL:
+    /* This might not make sense but is perhaps better than any other
+       value.  */
+    retval = "LC_ALL";
+    break;
+#endif
+  default:
+    /* If you have a better idea for a default value let me know.  */
+    retval = "LC_XXX";
+  }
+
+  return retval;
+}
+#endif
+
+/* Guess value of current locale from value of the environment variables.  */
+static const char *
+internal_function
+guess_category_value (int category, const char *categoryname)
+{
+  const char *language;
+  const char *retval;
+
+  /* The highest priority value is the `LANGUAGE' environment
+     variable.  But we don't use the value if the currently selected
+     locale is the C locale.  This is a GNU extension.  */
+  language = getenv ("LANGUAGE");
+  if (language != NULL && language[0] == '\0')
+    language = NULL;
+
+  /* We have to proceed with the POSIX methods of looking to `LC_ALL',
+     `LC_xxx', and `LANG'.  On some systems this can be done by the
+     `setlocale' function itself.  */
+#ifdef _LIBC
+  retval = __current_locale_name (category);
+#else
+  retval = _nl_locale_name (category, categoryname);
+#endif
+
+  /* Ignore LANGUAGE if the locale is set to "C" because
+     1. "C" locale usually uses the ASCII encoding, and most international
+	messages use non-ASCII characters. These characters get displayed
+	as question marks (if using glibc's iconv()) or as invalid 8-bit
+	characters (because other iconv()s refuse to convert most non-ASCII
+	characters to ASCII). In any case, the output is ugly.
+     2. The precise output of some programs in the "C" locale is specified
+	by POSIX and should not depend on environment variables like
+	"LANGUAGE".  We allow such programs to use gettext().  */
+  return language != NULL && strcmp (retval, "C") != 0 ? language : retval;
+}
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library.  So we
+   avoid the non-standard function stpcpy.  In GNU C Library this
+   function is available, though.  Also allow the symbol HAVE_STPCPY
+   to be defined.  */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (char *dest, const char *src)
+{
+  while ((*dest++ = *src++) != '\0')
+    /* Do nothing. */ ;
+  return dest - 1;
+}
+#endif
+
+#if !_LIBC && !HAVE_MEMPCPY
+static void *
+mempcpy (void *dest, const void *src, size_t n)
+{
+  return (void *) ((char *) memcpy (dest, src, n) + n);
+}
+#endif
+
+
+#ifdef _LIBC
+/* If we want to free all resources we have to do some work at
+   program's end.  */
+libc_freeres_fn (free_mem)
+{
+  void *old;
+
+  while (_nl_domain_bindings != NULL)
+    {
+      struct binding *oldp = _nl_domain_bindings;
+      _nl_domain_bindings = _nl_domain_bindings->next;
+      if (oldp->dirname != INTUSE(_nl_default_dirname))
+	/* Yes, this is a pointer comparison.  */
+	free (oldp->dirname);
+      free (oldp->codeset);
+      free (oldp);
+    }
+
+  if (_nl_current_default_domain != _nl_default_default_domain)
+    /* Yes, again a pointer comparison.  */
+    free ((char *) _nl_current_default_domain);
+
+  /* Remove the search tree with the known translations.  */
+  __tdestroy (root, free);
+  root = NULL;
+
+  while (transmem_list != NULL)
+    {
+      old = transmem_list;
+      transmem_list = transmem_list->next;
+      free (old);
+    }
+}
+#endif
diff --git a/e2fsprogs/intl/dcngettext.c b/e2fsprogs/intl/dcngettext.c
new file mode 100644
index 0000000..48a3e09
--- /dev/null
+++ b/e2fsprogs/intl/dcngettext.c
@@ -0,0 +1,57 @@
+/* Implementation of the dcngettext(3) function.
+   Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define DCNGETTEXT __dcngettext
+# define DCIGETTEXT __dcigettext
+#else
+# define DCNGETTEXT libintl_dcngettext
+# define DCIGETTEXT libintl_dcigettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+   locale.  */
+char *
+DCNGETTEXT (const char *domainname,
+	    const char *msgid1, const char *msgid2, unsigned long int n,
+	    int category)
+{
+  return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+weak_alias (__dcngettext, dcngettext);
+#endif
diff --git a/e2fsprogs/intl/dgettext.c b/e2fsprogs/intl/dgettext.c
new file mode 100644
index 0000000..b64b0f5
--- /dev/null
+++ b/e2fsprogs/intl/dgettext.c
@@ -0,0 +1,58 @@
+/* Implementation of the dgettext(3) function.
+   Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+
+#include <locale.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define DGETTEXT __dgettext
+# define DCGETTEXT INTUSE(__dcgettext)
+#else
+# define DGETTEXT libintl_dgettext
+# define DCGETTEXT libintl_dcgettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog of the current
+   LC_MESSAGES locale.  */
+char *
+DGETTEXT (const char *domainname, const char *msgid)
+{
+  return DCGETTEXT (domainname, msgid, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+weak_alias (__dgettext, dgettext);
+#endif
diff --git a/e2fsprogs/intl/dngettext.c b/e2fsprogs/intl/dngettext.c
new file mode 100644
index 0000000..7815637
--- /dev/null
+++ b/e2fsprogs/intl/dngettext.c
@@ -0,0 +1,59 @@
+/* Implementation of the dngettext(3) function.
+   Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+
+#include <locale.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define DNGETTEXT __dngettext
+# define DCNGETTEXT __dcngettext
+#else
+# define DNGETTEXT libintl_dngettext
+# define DCNGETTEXT libintl_dcngettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog of the current
+   LC_MESSAGES locale and skip message according to the plural form.  */
+char *
+DNGETTEXT (const char *domainname,
+	   const char *msgid1, const char *msgid2, unsigned long int n)
+{
+  return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+weak_alias (__dngettext, dngettext);
+#endif
diff --git a/e2fsprogs/intl/eval-plural.h b/e2fsprogs/intl/eval-plural.h
new file mode 100644
index 0000000..01bd5af
--- /dev/null
+++ b/e2fsprogs/intl/eval-plural.h
@@ -0,0 +1,108 @@
+/* Plural expression evaluation.
+   Copyright (C) 2000-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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 STATIC
+#define STATIC static
+#endif
+
+/* Evaluate the plural expression and return an index value.  */
+STATIC
+unsigned long int
+internal_function
+plural_eval (struct expression *pexp, unsigned long int n)
+{
+  switch (pexp->nargs)
+    {
+    case 0:
+      switch (pexp->operation)
+	{
+	case var:
+	  return n;
+	case num:
+	  return pexp->val.num;
+	default:
+	  break;
+	}
+      /* NOTREACHED */
+      break;
+    case 1:
+      {
+	/* pexp->operation must be lnot.  */
+	unsigned long int arg = plural_eval (pexp->val.args[0], n);
+	return ! arg;
+      }
+    case 2:
+      {
+	unsigned long int leftarg = plural_eval (pexp->val.args[0], n);
+	if (pexp->operation == lor)
+	  return leftarg || plural_eval (pexp->val.args[1], n);
+	else if (pexp->operation == land)
+	  return leftarg && plural_eval (pexp->val.args[1], n);
+	else
+	  {
+	    unsigned long int rightarg = plural_eval (pexp->val.args[1], n);
+
+	    switch (pexp->operation)
+	      {
+	      case mult:
+		return leftarg * rightarg;
+	      case divide:
+#if !INTDIV0_RAISES_SIGFPE
+		if (rightarg == 0)
+		  raise (SIGFPE);
+#endif
+		return leftarg / rightarg;
+	      case module:
+#if !INTDIV0_RAISES_SIGFPE
+		if (rightarg == 0)
+		  raise (SIGFPE);
+#endif
+		return leftarg % rightarg;
+	      case plus:
+		return leftarg + rightarg;
+	      case minus:
+		return leftarg - rightarg;
+	      case less_than:
+		return leftarg < rightarg;
+	      case greater_than:
+		return leftarg > rightarg;
+	      case less_or_equal:
+		return leftarg <= rightarg;
+	      case greater_or_equal:
+		return leftarg >= rightarg;
+	      case equal:
+		return leftarg == rightarg;
+	      case not_equal:
+		return leftarg != rightarg;
+	      default:
+		break;
+	      }
+	  }
+	/* NOTREACHED */
+	break;
+      }
+    case 3:
+      {
+	/* pexp->operation must be qmop.  */
+	unsigned long int boolarg = plural_eval (pexp->val.args[0], n);
+	return plural_eval (pexp->val.args[boolarg ? 1 : 2], n);
+      }
+    }
+  /* NOTREACHED */
+  return 0;
+}
diff --git a/e2fsprogs/intl/explodename.c b/e2fsprogs/intl/explodename.c
new file mode 100644
index 0000000..52c25e7
--- /dev/null
+++ b/e2fsprogs/intl/explodename.c
@@ -0,0 +1,185 @@
+/* Copyright (C) 1995-1998, 2000-2001, 2003 Free Software Foundation, Inc.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found.  Sigh!  */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+#  define NULL ((void *) 0)
+# else
+#  define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+char *
+_nl_find_language (const char *name)
+{
+  while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
+	 && name[0] != '+' && name[0] != ',')
+    ++name;
+
+  return (char *) name;
+}
+
+
+int
+_nl_explode_name (char *name,
+		  const char **language, const char **modifier,
+		  const char **territory, const char **codeset,
+		  const char **normalized_codeset, const char **special,
+		  const char **sponsor, const char **revision)
+{
+  enum { undecided, xpg, cen } syntax;
+  char *cp;
+  int mask;
+
+  *modifier = NULL;
+  *territory = NULL;
+  *codeset = NULL;
+  *normalized_codeset = NULL;
+  *special = NULL;
+  *sponsor = NULL;
+  *revision = NULL;
+
+  /* Now we determine the single parts of the locale name.  First
+     look for the language.  Termination symbols are `_' and `@' if
+     we use XPG4 style, and `_', `+', and `,' if we use CEN syntax.  */
+  mask = 0;
+  syntax = undecided;
+  *language = cp = name;
+  cp = _nl_find_language (*language);
+
+  if (*language == cp)
+    /* This does not make sense: language has to be specified.  Use
+       this entry as it is without exploding.  Perhaps it is an alias.  */
+    cp = strchr (*language, '\0');
+  else if (cp[0] == '_')
+    {
+      /* Next is the territory.  */
+      cp[0] = '\0';
+      *territory = ++cp;
+
+      while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
+	     && cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
+	++cp;
+
+      mask |= TERRITORY;
+
+      if (cp[0] == '.')
+	{
+	  /* Next is the codeset.  */
+	  syntax = xpg;
+	  cp[0] = '\0';
+	  *codeset = ++cp;
+
+	  while (cp[0] != '\0' && cp[0] != '@')
+	    ++cp;
+
+	  mask |= XPG_CODESET;
+
+	  if (*codeset != cp && (*codeset)[0] != '\0')
+	    {
+	      *normalized_codeset = _nl_normalize_codeset (*codeset,
+							   cp - *codeset);
+	      if (strcmp (*codeset, *normalized_codeset) == 0)
+		free ((char *) *normalized_codeset);
+	      else
+		mask |= XPG_NORM_CODESET;
+	    }
+	}
+    }
+
+  if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
+    {
+      /* Next is the modifier.  */
+      syntax = cp[0] == '@' ? xpg : cen;
+      cp[0] = '\0';
+      *modifier = ++cp;
+
+      while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
+	     && cp[0] != ',' && cp[0] != '_')
+	++cp;
+
+      mask |= XPG_MODIFIER | CEN_AUDIENCE;
+    }
+
+  if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
+    {
+      syntax = cen;
+
+      if (cp[0] == '+')
+	{
+ 	  /* Next is special application (CEN syntax).  */
+	  cp[0] = '\0';
+	  *special = ++cp;
+
+	  while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
+	    ++cp;
+
+	  mask |= CEN_SPECIAL;
+	}
+
+      if (cp[0] == ',')
+	{
+ 	  /* Next is sponsor (CEN syntax).  */
+	  cp[0] = '\0';
+	  *sponsor = ++cp;
+
+	  while (cp[0] != '\0' && cp[0] != '_')
+	    ++cp;
+
+	  mask |= CEN_SPONSOR;
+	}
+
+      if (cp[0] == '_')
+	{
+ 	  /* Next is revision (CEN syntax).  */
+	  cp[0] = '\0';
+	  *revision = ++cp;
+
+	  mask |= CEN_REVISION;
+	}
+    }
+
+  /* For CEN syntax values it might be important to have the
+     separator character in the file name, not for XPG syntax.  */
+  if (syntax == xpg)
+    {
+      if (*territory != NULL && (*territory)[0] == '\0')
+	mask &= ~TERRITORY;
+
+      if (*codeset != NULL && (*codeset)[0] == '\0')
+	mask &= ~XPG_CODESET;
+
+      if (*modifier != NULL && (*modifier)[0] == '\0')
+	mask &= ~XPG_MODIFIER;
+    }
+
+  return mask;
+}
diff --git a/e2fsprogs/intl/finddomain.c b/e2fsprogs/intl/finddomain.c
new file mode 100644
index 0000000..4992a8c
--- /dev/null
+++ b/e2fsprogs/intl/finddomain.c
@@ -0,0 +1,192 @@
+/* Handle list of needed message catalogs
+   Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc.
+   Written by Ulrich Drepper <drepper@gnu.org>, 1995.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+/* List of already loaded domains.  */
+static struct loaded_l10nfile *_nl_loaded_domains;
+
+
+/* Return a data structure describing the message catalog described by
+   the DOMAINNAME and CATEGORY parameters with respect to the currently
+   established bindings.  */
+struct loaded_l10nfile *
+internal_function
+_nl_find_domain (const char *dirname, char *locale,
+		 const char *domainname, struct binding *domainbinding)
+{
+  struct loaded_l10nfile *retval;
+  const char *language;
+  const char *modifier;
+  const char *territory;
+  const char *codeset;
+  const char *normalized_codeset;
+  const char *special;
+  const char *sponsor;
+  const char *revision;
+  const char *alias_value;
+  int mask;
+
+  /* LOCALE can consist of up to four recognized parts for the XPG syntax:
+
+		language[_territory[.codeset]][@modifier]
+
+     and six parts for the CEN syntax:
+
+	language[_territory][+audience][+special][,[sponsor][_revision]]
+
+     Beside the first part all of them are allowed to be missing.  If
+     the full specified locale is not found, the less specific one are
+     looked for.  The various parts will be stripped off according to
+     the following order:
+		(1) revision
+		(2) sponsor
+		(3) special
+		(4) codeset
+		(5) normalized codeset
+		(6) territory
+		(7) audience/modifier
+   */
+
+  /* If we have already tested for this locale entry there has to
+     be one data set in the list of loaded domains.  */
+  retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+			       strlen (dirname) + 1, 0, locale, NULL, NULL,
+			       NULL, NULL, NULL, NULL, NULL, domainname, 0);
+  if (retval != NULL)
+    {
+      /* We know something about this locale.  */
+      int cnt;
+
+      if (retval->decided == 0)
+	_nl_load_domain (retval, domainbinding);
+
+      if (retval->data != NULL)
+	return retval;
+
+      for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+	{
+	  if (retval->successor[cnt]->decided == 0)
+	    _nl_load_domain (retval->successor[cnt], domainbinding);
+
+	  if (retval->successor[cnt]->data != NULL)
+	    break;
+	}
+      return cnt >= 0 ? retval : NULL;
+      /* NOTREACHED */
+    }
+
+  /* See whether the locale value is an alias.  If yes its value
+     *overwrites* the alias name.  No test for the original value is
+     done.  */
+  alias_value = _nl_expand_alias (locale);
+  if (alias_value != NULL)
+    {
+#if defined _LIBC || defined HAVE_STRDUP
+      locale = strdup (alias_value);
+      if (locale == NULL)
+	return NULL;
+#else
+      size_t len = strlen (alias_value) + 1;
+      locale = (char *) malloc (len);
+      if (locale == NULL)
+	return NULL;
+
+      memcpy (locale, alias_value, len);
+#endif
+    }
+
+  /* Now we determine the single parts of the locale name.  First
+     look for the language.  Termination symbols are `_' and `@' if
+     we use XPG4 style, and `_', `+', and `,' if we use CEN syntax.  */
+  mask = _nl_explode_name (locale, &language, &modifier, &territory,
+			   &codeset, &normalized_codeset, &special,
+			   &sponsor, &revision);
+
+  /* Create all possible locale entries which might be interested in
+     generalization.  */
+  retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+			       strlen (dirname) + 1, mask, language, territory,
+			       codeset, normalized_codeset, modifier, special,
+			       sponsor, revision, domainname, 1);
+  if (retval == NULL)
+    /* This means we are out of core.  */
+    return NULL;
+
+  if (retval->decided == 0)
+    _nl_load_domain (retval, domainbinding);
+  if (retval->data == NULL)
+    {
+      int cnt;
+      for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+	{
+	  if (retval->successor[cnt]->decided == 0)
+	    _nl_load_domain (retval->successor[cnt], domainbinding);
+	  if (retval->successor[cnt]->data != NULL)
+	    break;
+	}
+    }
+
+  /* The room for an alias was dynamically allocated.  Free it now.  */
+  if (alias_value != NULL)
+    free (locale);
+
+  /* The space for normalized_codeset is dynamically allocated.  Free it.  */
+  if (mask & XPG_NORM_CODESET)
+    free ((void *) normalized_codeset);
+
+  return retval;
+}
+
+
+#ifdef _LIBC
+libc_freeres_fn (free_mem)
+{
+  struct loaded_l10nfile *runp = _nl_loaded_domains;
+
+  while (runp != NULL)
+    {
+      struct loaded_l10nfile *here = runp;
+      if (runp->data != NULL)
+	_nl_unload_domain ((struct loaded_domain *) runp->data);
+      runp = runp->next;
+      free ((char *) here->filename);
+      free (here);
+    }
+}
+#endif
diff --git a/e2fsprogs/intl/gettext.c b/e2fsprogs/intl/gettext.c
new file mode 100644
index 0000000..92c42fa
--- /dev/null
+++ b/e2fsprogs/intl/gettext.c
@@ -0,0 +1,63 @@
+/* Implementation of gettext(3) function.
+   Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# define __need_NULL
+# include <stddef.h>
+#else
+# include <stdlib.h>		/* Just for NULL.  */
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define GETTEXT __gettext
+# define DCGETTEXT INTUSE(__dcgettext)
+#else
+# define GETTEXT libintl_gettext
+# define DCGETTEXT libintl_dcgettext
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
+   text).  */
+char *
+GETTEXT (const char *msgid)
+{
+  return DCGETTEXT (NULL, msgid, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+weak_alias (__gettext, gettext);
+#endif
diff --git a/e2fsprogs/intl/gettextP.h b/e2fsprogs/intl/gettextP.h
new file mode 100644
index 0000000..4d66c3d
--- /dev/null
+++ b/e2fsprogs/intl/gettextP.h
@@ -0,0 +1,215 @@
+/* Header describing internals of libintl library.
+   Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
+   Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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 _GETTEXTP_H
+#define _GETTEXTP_H
+
+#include <stddef.h>		/* Get size_t.  */
+
+#ifdef _LIBC
+# include "../iconv/gconv_int.h"
+#else
+# if HAVE_ICONV
+#  include <iconv.h>
+# endif
+#endif
+
+#include "loadinfo.h"
+
+#include "gmo.h"		/* Get nls_uint32.  */
+
+/* @@ end of prolog @@ */
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+#ifndef attribute_hidden
+# define attribute_hidden
+#endif
+
+/* Tell the compiler when a conditional or integer expression is
+   almost always true or almost always false.  */
+#ifndef HAVE_BUILTIN_EXPECT
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+#ifndef W
+# define W(flag, data) ((flag) ? SWAP (data) : (data))
+#endif
+
+
+#ifdef _LIBC
+# include <byteswap.h>
+# define SWAP(i) bswap_32 (i)
+#else
+static inline nls_uint32
+SWAP (i)
+     nls_uint32 i;
+{
+  return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
+}
+#endif
+
+
+/* In-memory representation of system dependent string.  */
+struct sysdep_string_desc
+{
+  /* Length of addressed string, including the trailing NUL.  */
+  size_t length;
+  /* Pointer to addressed string.  */
+  const char *pointer;
+};
+
+/* The representation of an opened message catalog.  */
+struct loaded_domain
+{
+  /* Pointer to memory containing the .mo file.  */
+  const char *data;
+  /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed.  */
+  int use_mmap;
+  /* Size of mmap()ed memory.  */
+  size_t mmap_size;
+  /* 1 if the .mo file uses a different endianness than this machine.  */
+  int must_swap;
+  /* Pointer to additional malloc()ed memory.  */
+  void *malloced;
+
+  /* Number of static strings pairs.  */
+  nls_uint32 nstrings;
+  /* Pointer to descriptors of original strings in the file.  */
+  const struct string_desc *orig_tab;
+  /* Pointer to descriptors of translated strings in the file.  */
+  const struct string_desc *trans_tab;
+
+  /* Number of system dependent strings pairs.  */
+  nls_uint32 n_sysdep_strings;
+  /* Pointer to descriptors of original sysdep strings.  */
+  const struct sysdep_string_desc *orig_sysdep_tab;
+  /* Pointer to descriptors of translated sysdep strings.  */
+  const struct sysdep_string_desc *trans_sysdep_tab;
+
+  /* Size of hash table.  */
+  nls_uint32 hash_size;
+  /* Pointer to hash table.  */
+  const nls_uint32 *hash_tab;
+  /* 1 if the hash table uses a different endianness than this machine.  */
+  int must_swap_hash_tab;
+
+  int codeset_cntr;
+#ifdef _LIBC
+  __gconv_t conv;
+#else
+# if HAVE_ICONV
+  iconv_t conv;
+# endif
+#endif
+  char **conv_tab;
+
+  struct expression *plural;
+  unsigned long int nplurals;
+};
+
+/* We want to allocate a string at the end of the struct.  But ISO C
+   doesn't allow zero sized arrays.  */
+#ifdef __GNUC__
+# define ZERO 0
+#else
+# define ZERO 1
+#endif
+
+/* A set of settings bound to a message domain.  Used to store settings
+   from bindtextdomain() and bind_textdomain_codeset().  */
+struct binding
+{
+  struct binding *next;
+  char *dirname;
+  int codeset_cntr;	/* Incremented each time codeset changes.  */
+  char *codeset;
+  char domainname[ZERO];
+};
+
+/* A counter which is incremented each time some previous translations
+   become invalid.
+   This variable is part of the external ABI of the GNU libintl.  */
+extern int _nl_msg_cat_cntr;
+
+#ifndef _LIBC
+const char *_nl_locale_name (int category, const char *categoryname);
+#endif
+
+struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale,
+					 const char *__domainname,
+					 struct binding *__domainbinding)
+     internal_function;
+void _nl_load_domain (struct loaded_l10nfile *__domain,
+		      struct binding *__domainbinding)
+     internal_function;
+void _nl_unload_domain (struct loaded_domain *__domain)
+     internal_function;
+const char *_nl_init_domain_conv (struct loaded_l10nfile *__domain_file,
+				  struct loaded_domain *__domain,
+				  struct binding *__domainbinding)
+     internal_function;
+void _nl_free_domain_conv (struct loaded_domain *__domain)
+     internal_function;
+
+char *_nl_find_msg (struct loaded_l10nfile *domain_file,
+		    struct binding *domainbinding, const char *msgid,
+		    size_t *lengthp)
+     internal_function;
+
+#ifdef _LIBC
+extern char *__gettext (const char *__msgid);
+extern char *__dgettext (const char *__domainname, const char *__msgid);
+extern char *__dcgettext (const char *__domainname, const char *__msgid,
+			  int __category);
+extern char *__ngettext (const char *__msgid1, const char *__msgid2,
+			 unsigned long int __n);
+extern char *__dngettext (const char *__domainname,
+			  const char *__msgid1, const char *__msgid2,
+			  unsigned long int n);
+extern char *__dcngettext (const char *__domainname,
+			   const char *__msgid1, const char *__msgid2,
+			   unsigned long int __n, int __category);
+extern char *__dcigettext (const char *__domainname,
+			   const char *__msgid1, const char *__msgid2,
+			   int __plural, unsigned long int __n,
+			   int __category);
+extern char *__textdomain (const char *__domainname);
+extern char *__bindtextdomain (const char *__domainname,
+			       const char *__dirname);
+extern char *__bind_textdomain_codeset (const char *__domainname,
+					const char *__codeset);
+#else
+/* Declare the exported libintl_* functions, in a way that allows us to
+   call them under their real name.  */
+# undef _INTL_REDIRECT_INLINE
+# undef _INTL_REDIRECT_MACROS
+# define _INTL_REDIRECT_MACROS
+# include "libgnuintl.h"
+extern char *libintl_dcigettext (const char *__domainname,
+				 const char *__msgid1, const char *__msgid2,
+				 int __plural, unsigned long int __n,
+				 int __category);
+#endif
+
+/* @@ begin of epilog @@ */
+
+#endif /* gettextP.h  */
diff --git a/e2fsprogs/intl/gmo.h b/e2fsprogs/intl/gmo.h
new file mode 100644
index 0000000..e7c9cc1
--- /dev/null
+++ b/e2fsprogs/intl/gmo.h
@@ -0,0 +1,149 @@
+/* Description of GNU message catalog format: general file layout.
+   Copyright (C) 1995, 1997, 2000-2002, 2004 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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 _GETTEXT_H
+#define _GETTEXT_H 1
+
+#include <limits.h>
+
+/* @@ end of prolog @@ */
+
+/* The magic number of the GNU message catalog format.  */
+#define _MAGIC 0x950412de
+#define _MAGIC_SWAPPED 0xde120495
+
+/* Revision number of the currently used .mo (binary) file format.  */
+#define MO_REVISION_NUMBER 0
+#define MO_REVISION_NUMBER_WITH_SYSDEP_I 1
+
+/* The following contortions are an attempt to use the C preprocessor
+   to determine an unsigned integral type that is 32 bits wide.  An
+   alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
+   as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
+   when cross-compiling.  */
+
+#if __STDC__
+# define UINT_MAX_32_BITS 4294967295U
+#else
+# define UINT_MAX_32_BITS 0xFFFFFFFF
+#endif
+
+/* If UINT_MAX isn't defined, assume it's a 32-bit type.
+   This should be valid for all systems GNU cares about because
+   that doesn't include 16-bit systems, and only modern systems
+   (that certainly have <limits.h>) have 64+-bit integral types.  */
+
+#ifndef UINT_MAX
+# define UINT_MAX UINT_MAX_32_BITS
+#endif
+
+#if UINT_MAX == UINT_MAX_32_BITS
+typedef unsigned nls_uint32;
+#else
+# if USHRT_MAX == UINT_MAX_32_BITS
+typedef unsigned short nls_uint32;
+# else
+#  if ULONG_MAX == UINT_MAX_32_BITS
+typedef unsigned long nls_uint32;
+#  else
+  /* The following line is intended to throw an error.  Using #error is
+     not portable enough.  */
+  "Cannot determine unsigned 32-bit data type."
+#  endif
+# endif
+#endif
+
+
+/* Header for binary .mo file format.  */
+struct mo_file_header
+{
+  /* The magic number.  */
+  nls_uint32 magic;
+  /* The revision number of the file format.  */
+  nls_uint32 revision;
+
+  /* The following are only used in .mo files with major revision 0 or 1.  */
+
+  /* The number of strings pairs.  */
+  nls_uint32 nstrings;
+  /* Offset of table with start offsets of original strings.  */
+  nls_uint32 orig_tab_offset;
+  /* Offset of table with start offsets of translated strings.  */
+  nls_uint32 trans_tab_offset;
+  /* Size of hash table.  */
+  nls_uint32 hash_tab_size;
+  /* Offset of first hash table entry.  */
+  nls_uint32 hash_tab_offset;
+
+  /* The following are only used in .mo files with minor revision >= 1.  */
+
+  /* The number of system dependent segments.  */
+  nls_uint32 n_sysdep_segments;
+  /* Offset of table describing system dependent segments.  */
+  nls_uint32 sysdep_segments_offset;
+  /* The number of system dependent strings pairs.  */
+  nls_uint32 n_sysdep_strings;
+  /* Offset of table with start offsets of original sysdep strings.  */
+  nls_uint32 orig_sysdep_tab_offset;
+  /* Offset of table with start offsets of translated sysdep strings.  */
+  nls_uint32 trans_sysdep_tab_offset;
+};
+
+/* Descriptor for static string contained in the binary .mo file.  */
+struct string_desc
+{
+  /* Length of addressed string, not including the trailing NUL.  */
+  nls_uint32 length;
+  /* Offset of string in file.  */
+  nls_uint32 offset;
+};
+
+/* The following are only used in .mo files with minor revision >= 1.  */
+
+/* Descriptor for system dependent string segment.  */
+struct sysdep_segment
+{
+  /* Length of addressed string, including the trailing NUL.  */
+  nls_uint32 length;
+  /* Offset of string in file.  */
+  nls_uint32 offset;
+};
+
+/* Descriptor for system dependent string.  */
+struct sysdep_string
+{
+  /* Offset of static string segments in file.  */
+  nls_uint32 offset;
+  /* Alternating sequence of static and system dependent segments.
+     The last segment is a static segment, including the trailing NUL.  */
+  struct segment_pair
+  {
+    /* Size of static segment.  */
+    nls_uint32 segsize;
+    /* Reference to system dependent string segment, or ~0 at the end.  */
+    nls_uint32 sysdepref;
+  } segments[1];
+};
+
+/* Marker for the end of the segments[] array.  This has the value 0xFFFFFFFF,
+   regardless whether 'int' is 16 bit, 32 bit, or 64 bit.  */
+#define SEGMENTS_END ((nls_uint32) ~0)
+
+/* @@ begin of epilog @@ */
+
+#endif	/* gettext.h  */
diff --git a/e2fsprogs/intl/hash-string.h b/e2fsprogs/intl/hash-string.h
new file mode 100644
index 0000000..093e3b1
--- /dev/null
+++ b/e2fsprogs/intl/hash-string.h
@@ -0,0 +1,48 @@
+/* Description of GNU message catalog format: string hashing function.
+   Copyright (C) 1995, 1997-1998, 2000-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+/* @@ end of prolog @@ */
+
+/* We assume to have `unsigned long int' value with at least 32 bits.  */
+#define HASHWORDBITS 32
+
+
+/* Defines the so called `hashpjw' function by P.J. Weinberger
+   [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
+   1986, 1987 Bell Telephone Laboratories, Inc.]  */
+static inline unsigned long int
+hash_string (const char *str_param)
+{
+  unsigned long int hval, g;
+  const char *str = str_param;
+
+  /* Compute the hash value for the given string.  */
+  hval = 0;
+  while (*str != '\0')
+    {
+      hval <<= 4;
+      hval += (unsigned char) *str++;
+      g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
+      if (g != 0)
+	{
+	  hval ^= g >> (HASHWORDBITS - 8);
+	  hval ^= g;
+	}
+    }
+  return hval;
+}
diff --git a/e2fsprogs/intl/intl-compat.c b/e2fsprogs/intl/intl-compat.c
new file mode 100644
index 0000000..96f9d95
--- /dev/null
+++ b/e2fsprogs/intl/intl-compat.c
@@ -0,0 +1,131 @@
+/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
+   Library.
+   Copyright (C) 1995, 2000-2003 Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+
+/* @@ end of prolog @@ */
+
+/* This file redirects the gettext functions (without prefix) to those
+   defined in the included GNU libintl library (with "libintl_" prefix).
+   It is compiled into libintl in order to make the AM_GNU_GETTEXT test
+   of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
+   has the redirections primarily in the <libintl.h> include file.
+   It is also compiled into libgnuintl so that libgnuintl.so can be used
+   as LD_PRELOADable library on glibc systems, to provide the extra
+   features that the functions in the libc don't have (namely, logging).  */
+
+
+#undef gettext
+#undef dgettext
+#undef dcgettext
+#undef ngettext
+#undef dngettext
+#undef dcngettext
+#undef textdomain
+#undef bindtextdomain
+#undef bind_textdomain_codeset
+
+
+/* When building a DLL, we must export some functions.  Note that because
+   the functions are only defined for binary backward compatibility, we
+   don't need to use __declspec(dllimport) in any case.  */
+#if defined _MSC_VER && BUILDING_DLL
+# define DLL_EXPORTED __declspec(dllexport)
+#else
+# define DLL_EXPORTED
+#endif
+
+
+DLL_EXPORTED
+char *
+gettext (const char *msgid)
+{
+  return libintl_gettext (msgid);
+}
+
+
+DLL_EXPORTED
+char *
+dgettext (const char *domainname, const char *msgid)
+{
+  return libintl_dgettext (domainname, msgid);
+}
+
+
+DLL_EXPORTED
+char *
+dcgettext (const char *domainname, const char *msgid, int category)
+{
+  return libintl_dcgettext (domainname, msgid, category);
+}
+
+
+DLL_EXPORTED
+char *
+ngettext (const char *msgid1, const char *msgid2, unsigned long int n)
+{
+  return libintl_ngettext (msgid1, msgid2, n);
+}
+
+
+DLL_EXPORTED
+char *
+dngettext (const char *domainname,
+	   const char *msgid1, const char *msgid2, unsigned long int n)
+{
+  return libintl_dngettext (domainname, msgid1, msgid2, n);
+}
+
+
+DLL_EXPORTED
+char *
+dcngettext (const char *domainname,
+	    const char *msgid1, const char *msgid2, unsigned long int n,
+	    int category)
+{
+  return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
+}
+
+
+DLL_EXPORTED
+char *
+textdomain (const char *domainname)
+{
+  return libintl_textdomain (domainname);
+}
+
+
+DLL_EXPORTED
+char *
+bindtextdomain (const char *domainname, const char *dirname)
+{
+  return libintl_bindtextdomain (domainname, dirname);
+}
+
+
+DLL_EXPORTED
+char *
+bind_textdomain_codeset (const char *domainname, const char *codeset)
+{
+  return libintl_bind_textdomain_codeset (domainname, codeset);
+}
diff --git a/e2fsprogs/intl/l10nflist.c b/e2fsprogs/intl/l10nflist.c
new file mode 100644
index 0000000..3393ecb
--- /dev/null
+++ b/e2fsprogs/intl/l10nflist.c
@@ -0,0 +1,422 @@
+/* Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+/* Tell glibc's <string.h> to provide a prototype for stpcpy().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE	1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+
+#if defined _LIBC || defined HAVE_ARGZ_H
+# include <argz.h>
+#endif
+#include <ctype.h>
+#include <sys/types.h>
+#include <stdlib.h>
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found.  Sigh!  */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+#  define NULL ((void *) 0)
+# else
+#  define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions.  This is required by the standard
+   because some ANSI C functions will require linking with this object
+   file and the name space must not be polluted.  */
+# ifndef stpcpy
+#  define stpcpy(dest, src) __stpcpy(dest, src)
+# endif
+#else
+# ifndef HAVE_STPCPY
+#define stpcpy(dest, src) my_stpcpy(dest, src)
+static char *stpcpy (char *dest, const char *src);
+# endif
+#endif
+
+/* Pathname support.
+   ISSLASH(C)           tests whether C is a directory separator character.
+   IS_ABSOLUTE_PATH(P)  tests whether P is an absolute path.  If it is not,
+                        it may be concatenated to a directory pathname.
+ */
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+# define HAS_DEVICE(P) \
+    ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+     && (P)[1] == ':')
+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
+#else
+  /* Unix */
+# define ISSLASH(C) ((C) == '/')
+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
+#endif
+
+/* Define function which are usually not available.  */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
+/* Returns the number of strings in ARGZ.  */
+static size_t
+argz_count__ (const char *argz, size_t len)
+{
+  size_t count = 0;
+  while (len > 0)
+    {
+      size_t part_len = strlen (argz);
+      argz += part_len + 1;
+      len -= part_len + 1;
+      count++;
+    }
+  return count;
+}
+# undef __argz_count
+# define __argz_count(argz, len) argz_count__ (argz, len)
+#else
+# ifdef _LIBC
+#  define __argz_count(argz, len) INTUSE(__argz_count) (argz, len)
+# endif
+#endif	/* !_LIBC && !HAVE___ARGZ_COUNT */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
+/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
+   except the last into the character SEP.  */
+static void
+argz_stringify__ (char *argz, size_t len, int sep)
+{
+  while (len > 0)
+    {
+      size_t part_len = strlen (argz);
+      argz += part_len;
+      len -= part_len + 1;
+      if (len > 0)
+	*argz++ = sep;
+    }
+}
+# undef __argz_stringify
+# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
+#else
+# ifdef _LIBC
+#  define __argz_stringify(argz, len, sep) \
+  INTUSE(__argz_stringify) (argz, len, sep)
+# endif
+#endif	/* !_LIBC && !HAVE___ARGZ_STRINGIFY */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
+static char *
+argz_next__ (char *argz, size_t argz_len, const char *entry)
+{
+  if (entry)
+    {
+      if (entry < argz + argz_len)
+        entry = strchr (entry, '\0') + 1;
+
+      return entry >= argz + argz_len ? NULL : (char *) entry;
+    }
+  else
+    if (argz_len > 0)
+      return argz;
+    else
+      return 0;
+}
+# undef __argz_next
+# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
+#endif	/* !_LIBC && !HAVE___ARGZ_NEXT */
+
+
+/* Return number of bits set in X.  */
+static inline int
+pop (int x)
+{
+  /* We assume that no more than 16 bits are used.  */
+  x = ((x & ~0x5555) >> 1) + (x & 0x5555);
+  x = ((x & ~0x3333) >> 2) + (x & 0x3333);
+  x = ((x >> 4) + x) & 0x0f0f;
+  x = ((x >> 8) + x) & 0xff;
+
+  return x;
+}
+
+
+struct loaded_l10nfile *
+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
+		    const char *dirlist, size_t dirlist_len,
+		    int mask, const char *language, const char *territory,
+		    const char *codeset, const char *normalized_codeset,
+		    const char *modifier, const char *special,
+		    const char *sponsor, const char *revision,
+		    const char *filename, int do_allocate)
+{
+  char *abs_filename;
+  struct loaded_l10nfile **lastp;
+  struct loaded_l10nfile *retval;
+  char *cp;
+  size_t dirlist_count;
+  size_t entries;
+  int cnt;
+
+  /* If LANGUAGE contains an absolute directory specification, we ignore
+     DIRLIST.  */
+  if (IS_ABSOLUTE_PATH (language))
+    dirlist_len = 0;
+
+  /* Allocate room for the full file name.  */
+  abs_filename = (char *) malloc (dirlist_len
+				  + strlen (language)
+				  + ((mask & TERRITORY) != 0
+				     ? strlen (territory) + 1 : 0)
+				  + ((mask & XPG_CODESET) != 0
+				     ? strlen (codeset) + 1 : 0)
+				  + ((mask & XPG_NORM_CODESET) != 0
+				     ? strlen (normalized_codeset) + 1 : 0)
+				  + (((mask & XPG_MODIFIER) != 0
+				      || (mask & CEN_AUDIENCE) != 0)
+				     ? strlen (modifier) + 1 : 0)
+				  + ((mask & CEN_SPECIAL) != 0
+				     ? strlen (special) + 1 : 0)
+				  + (((mask & CEN_SPONSOR) != 0
+				      || (mask & CEN_REVISION) != 0)
+				     ? (1 + ((mask & CEN_SPONSOR) != 0
+					     ? strlen (sponsor) : 0)
+					+ ((mask & CEN_REVISION) != 0
+					   ? strlen (revision) + 1 : 0)) : 0)
+				  + 1 + strlen (filename) + 1);
+
+  if (abs_filename == NULL)
+    return NULL;
+
+  /* Construct file name.  */
+  cp = abs_filename;
+  if (dirlist_len > 0)
+    {
+      memcpy (cp, dirlist, dirlist_len);
+      __argz_stringify (cp, dirlist_len, PATH_SEPARATOR);
+      cp += dirlist_len;
+      cp[-1] = '/';
+    }
+
+  cp = stpcpy (cp, language);
+
+  if ((mask & TERRITORY) != 0)
+    {
+      *cp++ = '_';
+      cp = stpcpy (cp, territory);
+    }
+  if ((mask & XPG_CODESET) != 0)
+    {
+      *cp++ = '.';
+      cp = stpcpy (cp, codeset);
+    }
+  if ((mask & XPG_NORM_CODESET) != 0)
+    {
+      *cp++ = '.';
+      cp = stpcpy (cp, normalized_codeset);
+    }
+  if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
+    {
+      /* This component can be part of both syntaces but has different
+	 leading characters.  For CEN we use `+', else `@'.  */
+      *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
+      cp = stpcpy (cp, modifier);
+    }
+  if ((mask & CEN_SPECIAL) != 0)
+    {
+      *cp++ = '+';
+      cp = stpcpy (cp, special);
+    }
+  if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
+    {
+      *cp++ = ',';
+      if ((mask & CEN_SPONSOR) != 0)
+	cp = stpcpy (cp, sponsor);
+      if ((mask & CEN_REVISION) != 0)
+	{
+	  *cp++ = '_';
+	  cp = stpcpy (cp, revision);
+	}
+    }
+
+  *cp++ = '/';
+  stpcpy (cp, filename);
+
+  /* Look in list of already loaded domains whether it is already
+     available.  */
+  lastp = l10nfile_list;
+  for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
+    if (retval->filename != NULL)
+      {
+	int compare = strcmp (retval->filename, abs_filename);
+	if (compare == 0)
+	  /* We found it!  */
+	  break;
+	if (compare < 0)
+	  {
+	    /* It's not in the list.  */
+	    retval = NULL;
+	    break;
+	  }
+
+	lastp = &retval->next;
+      }
+
+  if (retval != NULL || do_allocate == 0)
+    {
+      free (abs_filename);
+      return retval;
+    }
+
+  dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1);
+
+  /* Allocate a new loaded_l10nfile.  */
+  retval =
+    (struct loaded_l10nfile *)
+    malloc (sizeof (*retval)
+	    + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0))
+	       * sizeof (struct loaded_l10nfile *)));
+  if (retval == NULL)
+    return NULL;
+
+  retval->filename = abs_filename;
+
+  /* We set retval->data to NULL here; it is filled in later.
+     Setting retval->decided to 1 here means that retval does not
+     correspond to a real file (dirlist_count > 1) or is not worth
+     looking up (if an unnormalized codeset was specified).  */
+  retval->decided = (dirlist_count > 1
+		     || ((mask & XPG_CODESET) != 0
+			 && (mask & XPG_NORM_CODESET) != 0));
+  retval->data = NULL;
+
+  retval->next = *lastp;
+  *lastp = retval;
+
+  entries = 0;
+  /* Recurse to fill the inheritance list of RETVAL.
+     If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL
+     entry does not correspond to a real file; retval->filename contains
+     colons.  In this case we loop across all elements of DIRLIST and
+     across all bit patterns dominated by MASK.
+     If the DIRLIST is a single directory or entirely redundant (i.e.
+     DIRLIST_COUNT == 1), we loop across all bit patterns dominated by
+     MASK, excluding MASK itself.
+     In either case, we loop down from MASK to 0.  This has the effect
+     that the extra bits in the locale name are dropped in this order:
+     first the modifier, then the territory, then the codeset, then the
+     normalized_codeset.  */
+  for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt)
+    if ((cnt & ~mask) == 0
+	&& ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
+	&& ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
+      {
+	if (dirlist_count > 1)
+	  {
+	    /* Iterate over all elements of the DIRLIST.  */
+	    char *dir = NULL;
+
+	    while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
+		   != NULL)
+	      retval->successor[entries++]
+		= _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1,
+				      cnt, language, territory, codeset,
+				      normalized_codeset, modifier, special,
+				      sponsor, revision, filename, 1);
+	  }
+	else
+	  retval->successor[entries++]
+	    = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len,
+				  cnt, language, territory, codeset,
+				  normalized_codeset, modifier, special,
+				  sponsor, revision, filename, 1);
+      }
+  retval->successor[entries] = NULL;
+
+  return retval;
+}
+
+/* Normalize codeset name.  There is no standard for the codeset
+   names.  Normalization allows the user to use any of the common
+   names.  The return value is dynamically allocated and has to be
+   freed by the caller.  */
+const char *
+_nl_normalize_codeset (const char *codeset, size_t name_len)
+{
+  int len = 0;
+  int only_digit = 1;
+  char *retval;
+  char *wp;
+  size_t cnt;
+
+  for (cnt = 0; cnt < name_len; ++cnt)
+    if (isalnum ((unsigned char) codeset[cnt]))
+      {
+	++len;
+
+	if (isalpha ((unsigned char) codeset[cnt]))
+	  only_digit = 0;
+      }
+
+  retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
+
+  if (retval != NULL)
+    {
+      if (only_digit)
+	wp = stpcpy (retval, "iso");
+      else
+	wp = retval;
+
+      for (cnt = 0; cnt < name_len; ++cnt)
+	if (isalpha ((unsigned char) codeset[cnt]))
+	  *wp++ = tolower ((unsigned char) codeset[cnt]);
+	else if (isdigit ((unsigned char) codeset[cnt]))
+	  *wp++ = codeset[cnt];
+
+      *wp = '\0';
+    }
+
+  return (const char *) retval;
+}
+
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library.  So we
+   avoid the non-standard function stpcpy.  In GNU C Library this
+   function is available, though.  Also allow the symbol HAVE_STPCPY
+   to be defined.  */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (char *dest, const char *src)
+{
+  while ((*dest++ = *src++) != '\0')
+    /* Do nothing. */ ;
+  return dest - 1;
+}
+#endif
diff --git a/e2fsprogs/intl/libgettext.h b/e2fsprogs/intl/libgettext.h
new file mode 100644
index 0000000..3a92960
--- /dev/null
+++ b/e2fsprogs/intl/libgettext.h
@@ -0,0 +1,182 @@
+/* Message catalogs for internationalization.
+   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, 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; either version 2, 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.  */
+
+/* Because on some systems (e.g. Solaris) we sometimes have to include
+   the systems libintl.h as well as this file we have more complex
+   include protection above.  But the systems header might perhaps also
+   define _LIBINTL_H and therefore we have to protect the definition here.  */
+
+#if !defined _LIBINTL_H || !defined _LIBGETTEXT_H
+#ifndef _LIBINTL_H
+# define _LIBINTL_H	1
+#endif
+#define _LIBGETTEXT_H	1
+
+/* We define an additional symbol to signal that we use the GNU
+   implementation of gettext.  */
+#define __USE_GNU_GETTEXT 1
+
+#include <sys/types.h>
+
+#if HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifndef PARAMS
+# if __STDC__ || defined __cplusplus
+#  define PARAMS(args) args
+# else
+#  define PARAMS(args) ()
+# endif
+#endif
+
+#ifndef NULL
+# if !defined __cplusplus || defined __GNUC__
+#  define NULL ((void *) 0)
+# else
+#  define NULL (0)
+# endif
+#endif
+
+#if !HAVE_LC_MESSAGES
+/* This value determines the behaviour of the gettext() and dgettext()
+   function.  But some system does not have this defined.  Define it
+   to a default value.  */
+# define LC_MESSAGES (-1)
+#endif
+
+
+/* Declarations for gettext-using-catgets interface.  Derived from
+   Jim Meyering's libintl.h.  */
+struct _msg_ent
+{
+  const char *_msg;
+  int _msg_number;
+};
+
+
+#if HAVE_CATGETS
+/* These two variables are defined in the automatically by po-to-tbl.sed
+   generated file `cat-id-tbl.c'.  */
+extern const struct _msg_ent _msg_tbl[];
+extern int _msg_tbl_length;
+#endif
+
+
+/* For automatical extraction of messages sometimes no real
+   translation is needed.  Instead the string itself is the result.  */
+#define gettext_noop(Str) (Str)
+
+/* Look up MSGID in the current default message catalog for the current
+   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
+   text).  */
+extern char *gettext PARAMS ((const char *__msgid));
+extern char *gettext__ PARAMS ((const char *__msgid));
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current
+   LC_MESSAGES locale.  */
+extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
+extern char *dgettext__ PARAMS ((const char *__domainname,
+				 const char *__msgid));
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+   locale.  */
+extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
+				int __category));
+extern char *dcgettext__ PARAMS ((const char *__domainname,
+				  const char *__msgid, int __category));
+
+
+/* Set the current default message catalog to DOMAINNAME.
+   If DOMAINNAME is null, return the current default.
+   If DOMAINNAME is "", reset to the default of "messages".  */
+extern char *textdomain PARAMS ((const char *__domainname));
+extern char *textdomain__ PARAMS ((const char *__domainname));
+
+/* Specify that the DOMAINNAME message catalog will be found
+   in DIRNAME rather than in the system locale data base.  */
+extern char *bindtextdomain PARAMS ((const char *__domainname,
+				  const char *__dirname));
+extern char *bindtextdomain__ PARAMS ((const char *__domainname,
+				    const char *__dirname));
+
+#if ENABLE_NLS
+
+/* Solaris 2.3 has the gettext function but dcgettext is missing.
+   So we omit this optimization for Solaris 2.3.  BTW, Solaris 2.4
+   has dcgettext.  */
+# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
+
+#  define gettext(Msgid)						      \
+     dgettext (NULL, Msgid)
+
+#  define dgettext(Domainname, Msgid)					      \
+     dcgettext (Domainname, Msgid, LC_MESSAGES)
+
+#  if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
+/* This global variable is defined in loadmsgcat.c.  We need a sign,
+   whether a new catalog was loaded, which can be associated with all
+   translations.  */
+extern int _nl_msg_cat_cntr;
+
+#   define dcgettext(Domainname, Msgid, Category)			      \
+  (__extension__							      \
+   ({									      \
+     char *__result;							      \
+     if (__builtin_constant_p (Msgid))					      \
+       {								      \
+	 static char *__translation__;					      \
+	 static int __catalog_counter__;				      \
+	 if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr)    \
+	   {								      \
+	     __translation__ =						      \
+	       dcgettext__ (Domainname, Msgid, Category);		      \
+	     __catalog_counter__ = _nl_msg_cat_cntr;			      \
+	   }								      \
+	 __result = __translation__;					      \
+       }								      \
+     else								      \
+       __result = dcgettext__ (Domainname, Msgid, Category);		      \
+     __result;								      \
+    }))
+#  endif
+# endif
+
+#else
+
+# define gettext(Msgid) (Msgid)
+# define dgettext(Domainname, Msgid) (Msgid)
+# define dcgettext(Domainname, Msgid, Category) (Msgid)
+# define textdomain(Domainname) ((char *) Domainname)
+# define bindtextdomain(Domainname, Dirname) ((char *) Dirname)
+
+#endif
+
+/* @@ begin of epilog @@ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/e2fsprogs/intl/libgnuintl.h.in b/e2fsprogs/intl/libgnuintl.h.in
new file mode 100644
index 0000000..3be7eb9
--- /dev/null
+++ b/e2fsprogs/intl/libgnuintl.h.in
@@ -0,0 +1,383 @@
+/* Message catalogs for internationalization.
+   Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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 _LIBINTL_H
+#define _LIBINTL_H	1
+
+#include <locale.h>
+
+/* The LC_MESSAGES locale category is the category used by the functions
+   gettext() and dgettext().  It is specified in POSIX, but not in ANSI C.
+   On systems that don't define it, use an arbitrary value instead.
+   On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
+   then includes <libintl.h> (i.e. this file!) and then only defines
+   LC_MESSAGES.  To avoid a redefinition warning, don't define LC_MESSAGES
+   in this case.  */
+#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
+# define LC_MESSAGES 1729
+#endif
+
+/* We define an additional symbol to signal that we use the GNU
+   implementation of gettext.  */
+#define __USE_GNU_GETTEXT 1
+
+/* Provide information about the supported file formats.  Returns the
+   maximum minor revision number supported for a given major revision.  */
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
+  ((major) == 0 ? 1 : -1)
+
+/* Resolve a platform specific conflict on DJGPP.  GNU gettext takes
+   precedence over _conio_gettext.  */
+#ifdef __DJGPP__
+# undef gettext
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* We redirect the functions to those prefixed with "libintl_".  This is
+   necessary, because some systems define gettext/textdomain/... in the C
+   library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
+   If we used the unprefixed names, there would be cases where the
+   definition in the C library would override the one in the libintl.so
+   shared library.  Recall that on ELF systems, the symbols are looked
+   up in the following order:
+     1. in the executable,
+     2. in the shared libraries specified on the link command line, in order,
+     3. in the dependencies of the shared libraries specified on the link
+        command line,
+     4. in the dlopen()ed shared libraries, in the order in which they were
+        dlopen()ed.
+   The definition in the C library would override the one in libintl.so if
+   either
+     * -lc is given on the link command line and -lintl isn't, or
+     * -lc is given on the link command line before -lintl, or
+     * libintl.so is a dependency of a dlopen()ed shared library but not
+       linked to the executable at link time.
+   Since Solaris gettext() behaves differently than GNU gettext(), this
+   would be unacceptable.
+
+   The redirection happens by default through macros in C, so that &gettext
+   is independent of the compilation unit, but through inline functions in
+   C++, in order not to interfere with the name mangling of class fields or
+   class methods called 'gettext'.  */
+
+/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
+   If he doesn't, we choose the method.  A third possible method is
+   _INTL_REDIRECT_ASM, supported only by GCC.  */
+#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
+# if __GNUC__ >= 2 && !defined __APPLE_CC__ && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
+#  define _INTL_REDIRECT_ASM
+# else
+#  ifdef __cplusplus
+#   define _INTL_REDIRECT_INLINE
+#  else
+#   define _INTL_REDIRECT_MACROS
+#  endif
+# endif
+#endif
+/* Auxiliary macros.  */
+#ifdef _INTL_REDIRECT_ASM
+# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
+# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
+# define _INTL_STRINGIFY(prefix) #prefix
+#else
+# define _INTL_ASM(cname)
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
+   text).  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_gettext (const char *__msgid);
+static inline char *gettext (const char *__msgid)
+{
+  return libintl_gettext (__msgid);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define gettext libintl_gettext
+#endif
+extern char *gettext (const char *__msgid)
+       _INTL_ASM (libintl_gettext);
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current
+   LC_MESSAGES locale.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dgettext (const char *__domainname, const char *__msgid);
+static inline char *dgettext (const char *__domainname, const char *__msgid)
+{
+  return libintl_dgettext (__domainname, __msgid);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dgettext libintl_dgettext
+#endif
+extern char *dgettext (const char *__domainname, const char *__msgid)
+       _INTL_ASM (libintl_dgettext);
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+   locale.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
+				int __category);
+static inline char *dcgettext (const char *__domainname, const char *__msgid,
+			       int __category)
+{
+  return libintl_dcgettext (__domainname, __msgid, __category);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dcgettext libintl_dcgettext
+#endif
+extern char *dcgettext (const char *__domainname, const char *__msgid,
+			int __category)
+       _INTL_ASM (libintl_dcgettext);
+#endif
+
+
+/* Similar to `gettext' but select the plural form corresponding to the
+   number N.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
+			       unsigned long int __n);
+static inline char *ngettext (const char *__msgid1, const char *__msgid2,
+			      unsigned long int __n)
+{
+  return libintl_ngettext (__msgid1, __msgid2, __n);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define ngettext libintl_ngettext
+#endif
+extern char *ngettext (const char *__msgid1, const char *__msgid2,
+		       unsigned long int __n)
+       _INTL_ASM (libintl_ngettext);
+#endif
+
+/* Similar to `dgettext' but select the plural form corresponding to the
+   number N.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
+				const char *__msgid2, unsigned long int __n);
+static inline char *dngettext (const char *__domainname, const char *__msgid1,
+			       const char *__msgid2, unsigned long int __n)
+{
+  return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dngettext libintl_dngettext
+#endif
+extern char *dngettext (const char *__domainname,
+			const char *__msgid1, const char *__msgid2,
+			unsigned long int __n)
+       _INTL_ASM (libintl_dngettext);
+#endif
+
+/* Similar to `dcgettext' but select the plural form corresponding to the
+   number N.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dcngettext (const char *__domainname,
+				 const char *__msgid1, const char *__msgid2,
+				 unsigned long int __n, int __category);
+static inline char *dcngettext (const char *__domainname,
+				const char *__msgid1, const char *__msgid2,
+				unsigned long int __n, int __category)
+{
+  return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dcngettext libintl_dcngettext
+#endif
+extern char *dcngettext (const char *__domainname,
+			 const char *__msgid1, const char *__msgid2,
+			 unsigned long int __n, int __category)
+       _INTL_ASM (libintl_dcngettext);
+#endif
+
+
+/* Set the current default message catalog to DOMAINNAME.
+   If DOMAINNAME is null, return the current default.
+   If DOMAINNAME is "", reset to the default of "messages".  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_textdomain (const char *__domainname);
+static inline char *textdomain (const char *__domainname)
+{
+  return libintl_textdomain (__domainname);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define textdomain libintl_textdomain
+#endif
+extern char *textdomain (const char *__domainname)
+       _INTL_ASM (libintl_textdomain);
+#endif
+
+/* Specify that the DOMAINNAME message catalog will be found
+   in DIRNAME rather than in the system locale data base.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_bindtextdomain (const char *__domainname,
+				     const char *__dirname);
+static inline char *bindtextdomain (const char *__domainname,
+				    const char *__dirname)
+{
+  return libintl_bindtextdomain (__domainname, __dirname);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define bindtextdomain libintl_bindtextdomain
+#endif
+extern char *bindtextdomain (const char *__domainname, const char *__dirname)
+       _INTL_ASM (libintl_bindtextdomain);
+#endif
+
+/* Specify the character encoding in which the messages from the
+   DOMAINNAME message catalog will be returned.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_bind_textdomain_codeset (const char *__domainname,
+					      const char *__codeset);
+static inline char *bind_textdomain_codeset (const char *__domainname,
+					     const char *__codeset)
+{
+  return libintl_bind_textdomain_codeset (__domainname, __codeset);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define bind_textdomain_codeset libintl_bind_textdomain_codeset
+#endif
+extern char *bind_textdomain_codeset (const char *__domainname,
+				      const char *__codeset)
+       _INTL_ASM (libintl_bind_textdomain_codeset);
+#endif
+
+
+/* Support for format strings with positions in *printf(), following the
+   POSIX/XSI specification.
+   Note: These replacements for the *printf() functions are visible only
+   in source files that #include <libintl.h> or #include "gettext.h".
+   Packages that use *printf() in source files that don't refer to _()
+   or gettext() but for which the format string could be the return value
+   of _() or gettext() need to add this #include.  Oh well.  */
+
+#if !@HAVE_POSIX_PRINTF@
+
+#include <stdio.h>
+#include <stddef.h>
+
+/* Get va_list.  */
+#if __STDC__ || defined __cplusplus || defined _MSC_VER
+# include <stdarg.h>
+#else
+# include <varargs.h>
+#endif
+
+#undef fprintf
+#define fprintf libintl_fprintf
+extern int fprintf (FILE *, const char *, ...);
+#undef vfprintf
+#define vfprintf libintl_vfprintf
+extern int vfprintf (FILE *, const char *, va_list);
+
+#undef printf
+#define printf libintl_printf
+extern int printf (const char *, ...);
+#undef vprintf
+#define vprintf libintl_vprintf
+extern int vprintf (const char *, va_list);
+
+#undef sprintf
+#define sprintf libintl_sprintf
+extern int sprintf (char *, const char *, ...);
+#undef vsprintf
+#define vsprintf libintl_vsprintf
+extern int vsprintf (char *, const char *, va_list);
+
+#if @HAVE_SNPRINTF@
+
+#undef snprintf
+#define snprintf libintl_snprintf
+extern int snprintf (char *, size_t, const char *, ...);
+#undef vsnprintf
+#define vsnprintf libintl_vsnprintf
+extern int vsnprintf (char *, size_t, const char *, va_list);
+
+#endif
+
+#if @HAVE_ASPRINTF@
+
+#undef asprintf
+#define asprintf libintl_asprintf
+extern int asprintf (char **, const char *, ...);
+#undef vasprintf
+#define vasprintf libintl_vasprintf
+extern int vasprintf (char **, const char *, va_list);
+
+#endif
+
+#if @HAVE_WPRINTF@
+
+#undef fwprintf
+#define fwprintf libintl_fwprintf
+extern int fwprintf (FILE *, const wchar_t *, ...);
+#undef vfwprintf
+#define vfwprintf libintl_vfwprintf
+extern int vfwprintf (FILE *, const wchar_t *, va_list);
+
+#undef wprintf
+#define wprintf libintl_wprintf
+extern int wprintf (const wchar_t *, ...);
+#undef vwprintf
+#define vwprintf libintl_vwprintf
+extern int vwprintf (const wchar_t *, va_list);
+
+#undef swprintf
+#define swprintf libintl_swprintf
+extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
+#undef vswprintf
+#define vswprintf libintl_vswprintf
+extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
+
+#endif
+
+#endif
+
+
+/* Support for relocatable packages.  */
+
+/* Sets the original and the current installation prefix of the package.
+   Relocation simply replaces a pathname starting with the original prefix
+   by the corresponding pathname with the current prefix instead.  Both
+   prefixes should be directory names without trailing slash (i.e. use ""
+   instead of "/").  */
+#define libintl_set_relocation_prefix libintl_set_relocation_prefix
+extern void
+       libintl_set_relocation_prefix (const char *orig_prefix,
+				      const char *curr_prefix);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* libintl.h */
diff --git a/e2fsprogs/intl/loadinfo.h b/e2fsprogs/intl/loadinfo.h
new file mode 100644
index 0000000..65e5ebd
--- /dev/null
+++ b/e2fsprogs/intl/loadinfo.h
@@ -0,0 +1,145 @@
+/* Copyright (C) 1996-1999, 2000-2003 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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 _LOADINFO_H
+#define _LOADINFO_H	1
+
+/* Declarations of locale dependent catalog lookup functions.
+   Implemented in
+
+     localealias.c    Possibly replace a locale name by another.
+     explodename.c    Split a locale name into its various fields.
+     l10nflist.c      Generate a list of filenames of possible message catalogs.
+     finddomain.c     Find and open the relevant message catalogs.
+
+   The main function _nl_find_domain() in finddomain.c is declared
+   in gettextP.h.
+ */
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+/* Tell the compiler when a conditional or integer expression is
+   almost always true or almost always false.  */
+#ifndef HAVE_BUILTIN_EXPECT
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+/* Separator in PATH like lists of pathnames.  */
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, OS/2, DOS */
+# define PATH_SEPARATOR ';'
+#else
+  /* Unix */
+# define PATH_SEPARATOR ':'
+#endif
+
+/* Encoding of locale name parts.  */
+#define CEN_REVISION		1
+#define CEN_SPONSOR		2
+#define CEN_SPECIAL		4
+#define XPG_NORM_CODESET	8
+#define XPG_CODESET		16
+#define TERRITORY		32
+#define CEN_AUDIENCE		64
+#define XPG_MODIFIER		128
+
+#define CEN_SPECIFIC	(CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
+#define XPG_SPECIFIC	(XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
+
+
+struct loaded_l10nfile
+{
+  const char *filename;
+  int decided;
+
+  const void *data;
+
+  struct loaded_l10nfile *next;
+  struct loaded_l10nfile *successor[1];
+};
+
+
+/* Normalize codeset name.  There is no standard for the codeset
+   names.  Normalization allows the user to use any of the common
+   names.  The return value is dynamically allocated and has to be
+   freed by the caller.  */
+extern const char *_nl_normalize_codeset (const char *codeset,
+					  size_t name_len);
+
+/* Lookup a locale dependent file.
+   *L10NFILE_LIST denotes a pool of lookup results of locale dependent
+   files of the same kind, sorted in decreasing order of ->filename.
+   DIRLIST and DIRLIST_LEN are an argz list of directories in which to
+   look, containing at least one directory (i.e. DIRLIST_LEN > 0).
+   MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER,
+   SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as
+   produced by _nl_explode_name().  FILENAME is the filename suffix.
+   The return value is the lookup result, either found in *L10NFILE_LIST,
+   or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
+   If the return value is non-NULL, it is added to *L10NFILE_LIST, and
+   its ->next field denotes the chaining inside *L10NFILE_LIST, and
+   furthermore its ->successor[] field contains a list of other lookup
+   results from which this lookup result inherits.  */
+extern struct loaded_l10nfile *
+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
+		    const char *dirlist, size_t dirlist_len, int mask,
+		    const char *language, const char *territory,
+		    const char *codeset, const char *normalized_codeset,
+		    const char *modifier, const char *special,
+		    const char *sponsor, const char *revision,
+		    const char *filename, int do_allocate);
+
+/* Lookup the real locale name for a locale alias NAME, or NULL if
+   NAME is not a locale alias (but possibly a real locale name).
+   The return value is statically allocated and must not be freed.  */
+extern const char *_nl_expand_alias (const char *name);
+
+/* Split a locale name NAME into its pieces: language, modifier,
+   territory, codeset, special, sponsor, revision.
+   NAME gets destructively modified: NUL bytes are inserted here and
+   there.  *LANGUAGE gets assigned NAME.  Each of *MODIFIER, *TERRITORY,
+   *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a
+   pointer into the old NAME string, or NULL.  *NORMALIZED_CODESET
+   gets assigned the expanded *CODESET, if it is different from *CODESET;
+   this one is dynamically allocated and has to be freed by the caller.
+   The return value is a bitmask, where each bit corresponds to one
+   filled-in value:
+     XPG_MODIFIER, CEN_AUDIENCE  for *MODIFIER,
+     TERRITORY                   for *TERRITORY,
+     XPG_CODESET                 for *CODESET,
+     XPG_NORM_CODESET            for *NORMALIZED_CODESET,
+     CEN_SPECIAL                 for *SPECIAL,
+     CEN_SPONSOR                 for *SPONSOR,
+     CEN_REVISION                for *REVISION.
+ */
+extern int _nl_explode_name (char *name, const char **language,
+			     const char **modifier, const char **territory,
+			     const char **codeset,
+			     const char **normalized_codeset,
+			     const char **special, const char **sponsor,
+			     const char **revision);
+
+/* Split a locale name NAME into a leading language part and all the
+   rest.  Return a pointer to the first character after the language,
+   i.e. to the first byte of the rest.  */
+extern char *_nl_find_language (const char *name);
+
+#endif	/* loadinfo.h */
diff --git a/e2fsprogs/intl/loadmsgcat.c b/e2fsprogs/intl/loadmsgcat.c
new file mode 100644
index 0000000..7fab71a
--- /dev/null
+++ b/e2fsprogs/intl/loadmsgcat.c
@@ -0,0 +1,1418 @@
+/* Load needed message catalogs.
+   Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE    1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef __GNUC__
+# undef  alloca
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  if defined HAVE_ALLOCA_H || defined _LIBC
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#ifdef _LIBC
+# include <langinfo.h>
+# include <locale.h>
+#endif
+
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+    || (defined _LIBC && defined _POSIX_MAPPED_FILES)
+# include <sys/mman.h>
+# undef HAVE_MMAP
+# define HAVE_MMAP	1
+#else
+# undef HAVE_MMAP
+#endif
+
+#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC
+# include <stdint.h>
+#endif
+#if defined HAVE_INTTYPES_H || defined _LIBC
+# include <inttypes.h>
+#endif
+
+#include "gmo.h"
+#include "gettextP.h"
+#include "hash-string.h"
+#include "plural-exp.h"
+
+#ifdef _LIBC
+# include "../locale/localeinfo.h"
+#endif
+
+/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
+   Note that our fallback values need not be literal strings, because we don't
+   use them with preprocessor string concatenation.  */
+#if !defined PRId8 || PRI_MACROS_BROKEN
+# undef PRId8
+# define PRId8 "d"
+#endif
+#if !defined PRIi8 || PRI_MACROS_BROKEN
+# undef PRIi8
+# define PRIi8 "i"
+#endif
+#if !defined PRIo8 || PRI_MACROS_BROKEN
+# undef PRIo8
+# define PRIo8 "o"
+#endif
+#if !defined PRIu8 || PRI_MACROS_BROKEN
+# undef PRIu8
+# define PRIu8 "u"
+#endif
+#if !defined PRIx8 || PRI_MACROS_BROKEN
+# undef PRIx8
+# define PRIx8 "x"
+#endif
+#if !defined PRIX8 || PRI_MACROS_BROKEN
+# undef PRIX8
+# define PRIX8 "X"
+#endif
+#if !defined PRId16 || PRI_MACROS_BROKEN
+# undef PRId16
+# define PRId16 "d"
+#endif
+#if !defined PRIi16 || PRI_MACROS_BROKEN
+# undef PRIi16
+# define PRIi16 "i"
+#endif
+#if !defined PRIo16 || PRI_MACROS_BROKEN
+# undef PRIo16
+# define PRIo16 "o"
+#endif
+#if !defined PRIu16 || PRI_MACROS_BROKEN
+# undef PRIu16
+# define PRIu16 "u"
+#endif
+#if !defined PRIx16 || PRI_MACROS_BROKEN
+# undef PRIx16
+# define PRIx16 "x"
+#endif
+#if !defined PRIX16 || PRI_MACROS_BROKEN
+# undef PRIX16
+# define PRIX16 "X"
+#endif
+#if !defined PRId32 || PRI_MACROS_BROKEN
+# undef PRId32
+# define PRId32 "d"
+#endif
+#if !defined PRIi32 || PRI_MACROS_BROKEN
+# undef PRIi32
+# define PRIi32 "i"
+#endif
+#if !defined PRIo32 || PRI_MACROS_BROKEN
+# undef PRIo32
+# define PRIo32 "o"
+#endif
+#if !defined PRIu32 || PRI_MACROS_BROKEN
+# undef PRIu32
+# define PRIu32 "u"
+#endif
+#if !defined PRIx32 || PRI_MACROS_BROKEN
+# undef PRIx32
+# define PRIx32 "x"
+#endif
+#if !defined PRIX32 || PRI_MACROS_BROKEN
+# undef PRIX32
+# define PRIX32 "X"
+#endif
+#if !defined PRId64 || PRI_MACROS_BROKEN
+# undef PRId64
+# define PRId64 (sizeof (long) == 8 ? "ld" : "lld")
+#endif
+#if !defined PRIi64 || PRI_MACROS_BROKEN
+# undef PRIi64
+# define PRIi64 (sizeof (long) == 8 ? "li" : "lli")
+#endif
+#if !defined PRIo64 || PRI_MACROS_BROKEN
+# undef PRIo64
+# define PRIo64 (sizeof (long) == 8 ? "lo" : "llo")
+#endif
+#if !defined PRIu64 || PRI_MACROS_BROKEN
+# undef PRIu64
+# define PRIu64 (sizeof (long) == 8 ? "lu" : "llu")
+#endif
+#if !defined PRIx64 || PRI_MACROS_BROKEN
+# undef PRIx64
+# define PRIx64 (sizeof (long) == 8 ? "lx" : "llx")
+#endif
+#if !defined PRIX64 || PRI_MACROS_BROKEN
+# undef PRIX64
+# define PRIX64 (sizeof (long) == 8 ? "lX" : "llX")
+#endif
+#if !defined PRIdLEAST8 || PRI_MACROS_BROKEN
+# undef PRIdLEAST8
+# define PRIdLEAST8 "d"
+#endif
+#if !defined PRIiLEAST8 || PRI_MACROS_BROKEN
+# undef PRIiLEAST8
+# define PRIiLEAST8 "i"
+#endif
+#if !defined PRIoLEAST8 || PRI_MACROS_BROKEN
+# undef PRIoLEAST8
+# define PRIoLEAST8 "o"
+#endif
+#if !defined PRIuLEAST8 || PRI_MACROS_BROKEN
+# undef PRIuLEAST8
+# define PRIuLEAST8 "u"
+#endif
+#if !defined PRIxLEAST8 || PRI_MACROS_BROKEN
+# undef PRIxLEAST8
+# define PRIxLEAST8 "x"
+#endif
+#if !defined PRIXLEAST8 || PRI_MACROS_BROKEN
+# undef PRIXLEAST8
+# define PRIXLEAST8 "X"
+#endif
+#if !defined PRIdLEAST16 || PRI_MACROS_BROKEN
+# undef PRIdLEAST16
+# define PRIdLEAST16 "d"
+#endif
+#if !defined PRIiLEAST16 || PRI_MACROS_BROKEN
+# undef PRIiLEAST16
+# define PRIiLEAST16 "i"
+#endif
+#if !defined PRIoLEAST16 || PRI_MACROS_BROKEN
+# undef PRIoLEAST16
+# define PRIoLEAST16 "o"
+#endif
+#if !defined PRIuLEAST16 || PRI_MACROS_BROKEN
+# undef PRIuLEAST16
+# define PRIuLEAST16 "u"
+#endif
+#if !defined PRIxLEAST16 || PRI_MACROS_BROKEN
+# undef PRIxLEAST16
+# define PRIxLEAST16 "x"
+#endif
+#if !defined PRIXLEAST16 || PRI_MACROS_BROKEN
+# undef PRIXLEAST16
+# define PRIXLEAST16 "X"
+#endif
+#if !defined PRIdLEAST32 || PRI_MACROS_BROKEN
+# undef PRIdLEAST32
+# define PRIdLEAST32 "d"
+#endif
+#if !defined PRIiLEAST32 || PRI_MACROS_BROKEN
+# undef PRIiLEAST32
+# define PRIiLEAST32 "i"
+#endif
+#if !defined PRIoLEAST32 || PRI_MACROS_BROKEN
+# undef PRIoLEAST32
+# define PRIoLEAST32 "o"
+#endif
+#if !defined PRIuLEAST32 || PRI_MACROS_BROKEN
+# undef PRIuLEAST32
+# define PRIuLEAST32 "u"
+#endif
+#if !defined PRIxLEAST32 || PRI_MACROS_BROKEN
+# undef PRIxLEAST32
+# define PRIxLEAST32 "x"
+#endif
+#if !defined PRIXLEAST32 || PRI_MACROS_BROKEN
+# undef PRIXLEAST32
+# define PRIXLEAST32 "X"
+#endif
+#if !defined PRIdLEAST64 || PRI_MACROS_BROKEN
+# undef PRIdLEAST64
+# define PRIdLEAST64 PRId64
+#endif
+#if !defined PRIiLEAST64 || PRI_MACROS_BROKEN
+# undef PRIiLEAST64
+# define PRIiLEAST64 PRIi64
+#endif
+#if !defined PRIoLEAST64 || PRI_MACROS_BROKEN
+# undef PRIoLEAST64
+# define PRIoLEAST64 PRIo64
+#endif
+#if !defined PRIuLEAST64 || PRI_MACROS_BROKEN
+# undef PRIuLEAST64
+# define PRIuLEAST64 PRIu64
+#endif
+#if !defined PRIxLEAST64 || PRI_MACROS_BROKEN
+# undef PRIxLEAST64
+# define PRIxLEAST64 PRIx64
+#endif
+#if !defined PRIXLEAST64 || PRI_MACROS_BROKEN
+# undef PRIXLEAST64
+# define PRIXLEAST64 PRIX64
+#endif
+#if !defined PRIdFAST8 || PRI_MACROS_BROKEN
+# undef PRIdFAST8
+# define PRIdFAST8 "d"
+#endif
+#if !defined PRIiFAST8 || PRI_MACROS_BROKEN
+# undef PRIiFAST8
+# define PRIiFAST8 "i"
+#endif
+#if !defined PRIoFAST8 || PRI_MACROS_BROKEN
+# undef PRIoFAST8
+# define PRIoFAST8 "o"
+#endif
+#if !defined PRIuFAST8 || PRI_MACROS_BROKEN
+# undef PRIuFAST8
+# define PRIuFAST8 "u"
+#endif
+#if !defined PRIxFAST8 || PRI_MACROS_BROKEN
+# undef PRIxFAST8
+# define PRIxFAST8 "x"
+#endif
+#if !defined PRIXFAST8 || PRI_MACROS_BROKEN
+# undef PRIXFAST8
+# define PRIXFAST8 "X"
+#endif
+#if !defined PRIdFAST16 || PRI_MACROS_BROKEN
+# undef PRIdFAST16
+# define PRIdFAST16 "d"
+#endif
+#if !defined PRIiFAST16 || PRI_MACROS_BROKEN
+# undef PRIiFAST16
+# define PRIiFAST16 "i"
+#endif
+#if !defined PRIoFAST16 || PRI_MACROS_BROKEN
+# undef PRIoFAST16
+# define PRIoFAST16 "o"
+#endif
+#if !defined PRIuFAST16 || PRI_MACROS_BROKEN
+# undef PRIuFAST16
+# define PRIuFAST16 "u"
+#endif
+#if !defined PRIxFAST16 || PRI_MACROS_BROKEN
+# undef PRIxFAST16
+# define PRIxFAST16 "x"
+#endif
+#if !defined PRIXFAST16 || PRI_MACROS_BROKEN
+# undef PRIXFAST16
+# define PRIXFAST16 "X"
+#endif
+#if !defined PRIdFAST32 || PRI_MACROS_BROKEN
+# undef PRIdFAST32
+# define PRIdFAST32 "d"
+#endif
+#if !defined PRIiFAST32 || PRI_MACROS_BROKEN
+# undef PRIiFAST32
+# define PRIiFAST32 "i"
+#endif
+#if !defined PRIoFAST32 || PRI_MACROS_BROKEN
+# undef PRIoFAST32
+# define PRIoFAST32 "o"
+#endif
+#if !defined PRIuFAST32 || PRI_MACROS_BROKEN
+# undef PRIuFAST32
+# define PRIuFAST32 "u"
+#endif
+#if !defined PRIxFAST32 || PRI_MACROS_BROKEN
+# undef PRIxFAST32
+# define PRIxFAST32 "x"
+#endif
+#if !defined PRIXFAST32 || PRI_MACROS_BROKEN
+# undef PRIXFAST32
+# define PRIXFAST32 "X"
+#endif
+#if !defined PRIdFAST64 || PRI_MACROS_BROKEN
+# undef PRIdFAST64
+# define PRIdFAST64 PRId64
+#endif
+#if !defined PRIiFAST64 || PRI_MACROS_BROKEN
+# undef PRIiFAST64
+# define PRIiFAST64 PRIi64
+#endif
+#if !defined PRIoFAST64 || PRI_MACROS_BROKEN
+# undef PRIoFAST64
+# define PRIoFAST64 PRIo64
+#endif
+#if !defined PRIuFAST64 || PRI_MACROS_BROKEN
+# undef PRIuFAST64
+# define PRIuFAST64 PRIu64
+#endif
+#if !defined PRIxFAST64 || PRI_MACROS_BROKEN
+# undef PRIxFAST64
+# define PRIxFAST64 PRIx64
+#endif
+#if !defined PRIXFAST64 || PRI_MACROS_BROKEN
+# undef PRIXFAST64
+# define PRIXFAST64 PRIX64
+#endif
+#if !defined PRIdMAX || PRI_MACROS_BROKEN
+# undef PRIdMAX
+# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld")
+#endif
+#if !defined PRIiMAX || PRI_MACROS_BROKEN
+# undef PRIiMAX
+# define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli")
+#endif
+#if !defined PRIoMAX || PRI_MACROS_BROKEN
+# undef PRIoMAX
+# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo")
+#endif
+#if !defined PRIuMAX || PRI_MACROS_BROKEN
+# undef PRIuMAX
+# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu")
+#endif
+#if !defined PRIxMAX || PRI_MACROS_BROKEN
+# undef PRIxMAX
+# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx")
+#endif
+#if !defined PRIXMAX || PRI_MACROS_BROKEN
+# undef PRIXMAX
+# define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX")
+#endif
+#if !defined PRIdPTR || PRI_MACROS_BROKEN
+# undef PRIdPTR
+# define PRIdPTR \
+  (sizeof (void *) == sizeof (long) ? "ld" : \
+   sizeof (void *) == sizeof (int) ? "d" : \
+   "lld")
+#endif
+#if !defined PRIiPTR || PRI_MACROS_BROKEN
+# undef PRIiPTR
+# define PRIiPTR \
+  (sizeof (void *) == sizeof (long) ? "li" : \
+   sizeof (void *) == sizeof (int) ? "i" : \
+   "lli")
+#endif
+#if !defined PRIoPTR || PRI_MACROS_BROKEN
+# undef PRIoPTR
+# define PRIoPTR \
+  (sizeof (void *) == sizeof (long) ? "lo" : \
+   sizeof (void *) == sizeof (int) ? "o" : \
+   "llo")
+#endif
+#if !defined PRIuPTR || PRI_MACROS_BROKEN
+# undef PRIuPTR
+# define PRIuPTR \
+  (sizeof (void *) == sizeof (long) ? "lu" : \
+   sizeof (void *) == sizeof (int) ? "u" : \
+   "llu")
+#endif
+#if !defined PRIxPTR || PRI_MACROS_BROKEN
+# undef PRIxPTR
+# define PRIxPTR \
+  (sizeof (void *) == sizeof (long) ? "lx" : \
+   sizeof (void *) == sizeof (int) ? "x" : \
+   "llx")
+#endif
+#if !defined PRIXPTR || PRI_MACROS_BROKEN
+# undef PRIXPTR
+# define PRIXPTR \
+  (sizeof (void *) == sizeof (long) ? "lX" : \
+   sizeof (void *) == sizeof (int) ? "X" : \
+   "llX")
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ISO C functions.  This is required by the standard
+   because some ISO C functions will require linking with this object
+   file and the name space must not be polluted.  */
+# define open   __open
+# define close  __close
+# define read   __read
+# define mmap   __mmap
+# define munmap __munmap
+#endif
+
+/* For those losing systems which don't have `alloca' we have to add
+   some additional code emulating it.  */
+#ifdef HAVE_ALLOCA
+# define freea(p) /* nothing */
+#else
+# define alloca(n) malloc (n)
+# define freea(p) free (p)
+#endif
+
+/* For systems that distinguish between text and binary I/O.
+   O_BINARY is usually declared in <fcntl.h>. */
+#if !defined O_BINARY && defined _O_BINARY
+  /* For MSC-compatible compilers.  */
+# define O_BINARY _O_BINARY
+# define O_TEXT _O_TEXT
+#endif
+#ifdef __BEOS__
+  /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect.  */
+# undef O_BINARY
+# undef O_TEXT
+#endif
+/* On reasonable systems, binary I/O is the default.  */
+#ifndef O_BINARY
+# define O_BINARY 0
+#endif
+
+
+/* We need a sign, whether a new catalog was loaded, which can be associated
+   with all translations.  This is important if the translations are
+   cached by one of GCC's features.  */
+int _nl_msg_cat_cntr;
+
+
+/* Expand a system dependent string segment.  Return NULL if unsupported.  */
+static const char *
+get_sysdep_segment_value (const char *name)
+{
+  /* Test for an ISO C 99 section 7.8.1 format string directive.
+     Syntax:
+     P R I { d | i | o | u | x | X }
+     { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR }  */
+  /* We don't use a table of 14 times 6 'const char *' strings here, because
+     data relocations cost startup time.  */
+  if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I')
+    {
+      if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u'
+	  || name[3] == 'x' || name[3] == 'X')
+	{
+	  if (name[4] == '8' && name[5] == '\0')
+	    {
+	      if (name[3] == 'd')
+		return PRId8;
+	      if (name[3] == 'i')
+		return PRIi8;
+	      if (name[3] == 'o')
+		return PRIo8;
+	      if (name[3] == 'u')
+		return PRIu8;
+	      if (name[3] == 'x')
+		return PRIx8;
+	      if (name[3] == 'X')
+		return PRIX8;
+	      abort ();
+	    }
+	  if (name[4] == '1' && name[5] == '6' && name[6] == '\0')
+	    {
+	      if (name[3] == 'd')
+		return PRId16;
+	      if (name[3] == 'i')
+		return PRIi16;
+	      if (name[3] == 'o')
+		return PRIo16;
+	      if (name[3] == 'u')
+		return PRIu16;
+	      if (name[3] == 'x')
+		return PRIx16;
+	      if (name[3] == 'X')
+		return PRIX16;
+	      abort ();
+	    }
+	  if (name[4] == '3' && name[5] == '2' && name[6] == '\0')
+	    {
+	      if (name[3] == 'd')
+		return PRId32;
+	      if (name[3] == 'i')
+		return PRIi32;
+	      if (name[3] == 'o')
+		return PRIo32;
+	      if (name[3] == 'u')
+		return PRIu32;
+	      if (name[3] == 'x')
+		return PRIx32;
+	      if (name[3] == 'X')
+		return PRIX32;
+	      abort ();
+	    }
+	  if (name[4] == '6' && name[5] == '4' && name[6] == '\0')
+	    {
+	      if (name[3] == 'd')
+		return PRId64;
+	      if (name[3] == 'i')
+		return PRIi64;
+	      if (name[3] == 'o')
+		return PRIo64;
+	      if (name[3] == 'u')
+		return PRIu64;
+	      if (name[3] == 'x')
+		return PRIx64;
+	      if (name[3] == 'X')
+		return PRIX64;
+	      abort ();
+	    }
+	  if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A'
+	      && name[7] == 'S' && name[8] == 'T')
+	    {
+	      if (name[9] == '8' && name[10] == '\0')
+		{
+		  if (name[3] == 'd')
+		    return PRIdLEAST8;
+		  if (name[3] == 'i')
+		    return PRIiLEAST8;
+		  if (name[3] == 'o')
+		    return PRIoLEAST8;
+		  if (name[3] == 'u')
+		    return PRIuLEAST8;
+		  if (name[3] == 'x')
+		    return PRIxLEAST8;
+		  if (name[3] == 'X')
+		    return PRIXLEAST8;
+		  abort ();
+		}
+	      if (name[9] == '1' && name[10] == '6' && name[11] == '\0')
+		{
+		  if (name[3] == 'd')
+		    return PRIdLEAST16;
+		  if (name[3] == 'i')
+		    return PRIiLEAST16;
+		  if (name[3] == 'o')
+		    return PRIoLEAST16;
+		  if (name[3] == 'u')
+		    return PRIuLEAST16;
+		  if (name[3] == 'x')
+		    return PRIxLEAST16;
+		  if (name[3] == 'X')
+		    return PRIXLEAST16;
+		  abort ();
+		}
+	      if (name[9] == '3' && name[10] == '2' && name[11] == '\0')
+		{
+		  if (name[3] == 'd')
+		    return PRIdLEAST32;
+		  if (name[3] == 'i')
+		    return PRIiLEAST32;
+		  if (name[3] == 'o')
+		    return PRIoLEAST32;
+		  if (name[3] == 'u')
+		    return PRIuLEAST32;
+		  if (name[3] == 'x')
+		    return PRIxLEAST32;
+		  if (name[3] == 'X')
+		    return PRIXLEAST32;
+		  abort ();
+		}
+	      if (name[9] == '6' && name[10] == '4' && name[11] == '\0')
+		{
+		  if (name[3] == 'd')
+		    return PRIdLEAST64;
+		  if (name[3] == 'i')
+		    return PRIiLEAST64;
+		  if (name[3] == 'o')
+		    return PRIoLEAST64;
+		  if (name[3] == 'u')
+		    return PRIuLEAST64;
+		  if (name[3] == 'x')
+		    return PRIxLEAST64;
+		  if (name[3] == 'X')
+		    return PRIXLEAST64;
+		  abort ();
+		}
+	    }
+	  if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S'
+	      && name[7] == 'T')
+	    {
+	      if (name[8] == '8' && name[9] == '\0')
+		{
+		  if (name[3] == 'd')
+		    return PRIdFAST8;
+		  if (name[3] == 'i')
+		    return PRIiFAST8;
+		  if (name[3] == 'o')
+		    return PRIoFAST8;
+		  if (name[3] == 'u')
+		    return PRIuFAST8;
+		  if (name[3] == 'x')
+		    return PRIxFAST8;
+		  if (name[3] == 'X')
+		    return PRIXFAST8;
+		  abort ();
+		}
+	      if (name[8] == '1' && name[9] == '6' && name[10] == '\0')
+		{
+		  if (name[3] == 'd')
+		    return PRIdFAST16;
+		  if (name[3] == 'i')
+		    return PRIiFAST16;
+		  if (name[3] == 'o')
+		    return PRIoFAST16;
+		  if (name[3] == 'u')
+		    return PRIuFAST16;
+		  if (name[3] == 'x')
+		    return PRIxFAST16;
+		  if (name[3] == 'X')
+		    return PRIXFAST16;
+		  abort ();
+		}
+	      if (name[8] == '3' && name[9] == '2' && name[10] == '\0')
+		{
+		  if (name[3] == 'd')
+		    return PRIdFAST32;
+		  if (name[3] == 'i')
+		    return PRIiFAST32;
+		  if (name[3] == 'o')
+		    return PRIoFAST32;
+		  if (name[3] == 'u')
+		    return PRIuFAST32;
+		  if (name[3] == 'x')
+		    return PRIxFAST32;
+		  if (name[3] == 'X')
+		    return PRIXFAST32;
+		  abort ();
+		}
+	      if (name[8] == '6' && name[9] == '4' && name[10] == '\0')
+		{
+		  if (name[3] == 'd')
+		    return PRIdFAST64;
+		  if (name[3] == 'i')
+		    return PRIiFAST64;
+		  if (name[3] == 'o')
+		    return PRIoFAST64;
+		  if (name[3] == 'u')
+		    return PRIuFAST64;
+		  if (name[3] == 'x')
+		    return PRIxFAST64;
+		  if (name[3] == 'X')
+		    return PRIXFAST64;
+		  abort ();
+		}
+	    }
+	  if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X'
+	      && name[7] == '\0')
+	    {
+	      if (name[3] == 'd')
+		return PRIdMAX;
+	      if (name[3] == 'i')
+		return PRIiMAX;
+	      if (name[3] == 'o')
+		return PRIoMAX;
+	      if (name[3] == 'u')
+		return PRIuMAX;
+	      if (name[3] == 'x')
+		return PRIxMAX;
+	      if (name[3] == 'X')
+		return PRIXMAX;
+	      abort ();
+	    }
+	  if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R'
+	      && name[7] == '\0')
+	    {
+	      if (name[3] == 'd')
+		return PRIdPTR;
+	      if (name[3] == 'i')
+		return PRIiPTR;
+	      if (name[3] == 'o')
+		return PRIoPTR;
+	      if (name[3] == 'u')
+		return PRIuPTR;
+	      if (name[3] == 'x')
+		return PRIxPTR;
+	      if (name[3] == 'X')
+		return PRIXPTR;
+	      abort ();
+	    }
+	}
+    }
+  /* Test for a glibc specific printf() format directive flag.  */
+  if (name[0] == 'I' && name[1] == '\0')
+    {
+#if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+      /* The 'I' flag, in numeric format directives, replaces ASCII digits
+	 with the 'outdigits' defined in the LC_CTYPE locale facet.  This is
+	 used for Farsi (Persian) and maybe Arabic.  */
+      return "I";
+#else
+      return "";
+#endif
+    }
+  /* Other system dependent strings are not valid.  */
+  return NULL;
+}
+
+/* Initialize the codeset dependent parts of an opened message catalog.
+   Return the header entry.  */
+const char *
+internal_function
+_nl_init_domain_conv (struct loaded_l10nfile *domain_file,
+		      struct loaded_domain *domain,
+		      struct binding *domainbinding)
+{
+  /* Find out about the character set the file is encoded with.
+     This can be found (in textual form) in the entry "".  If this
+     entry does not exist or if this does not contain the `charset='
+     information, we will assume the charset matches the one the
+     current locale and we don't have to perform any conversion.  */
+  char *nullentry;
+  size_t nullentrylen;
+
+  /* Preinitialize fields, to avoid recursion during _nl_find_msg.  */
+  domain->codeset_cntr =
+    (domainbinding != NULL ? domainbinding->codeset_cntr : 0);
+#ifdef _LIBC
+  domain->conv = (__gconv_t) -1;
+#else
+# if HAVE_ICONV
+  domain->conv = (iconv_t) -1;
+# endif
+#endif
+  domain->conv_tab = NULL;
+
+  /* Get the header entry.  */
+  nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
+
+  if (nullentry != NULL)
+    {
+#if defined _LIBC || HAVE_ICONV
+      const char *charsetstr;
+
+      charsetstr = strstr (nullentry, "charset=");
+      if (charsetstr != NULL)
+	{
+	  size_t len;
+	  char *charset;
+	  const char *outcharset;
+
+	  charsetstr += strlen ("charset=");
+	  len = strcspn (charsetstr, " \t\n");
+
+	  charset = (char *) alloca (len + 1);
+# if defined _LIBC || HAVE_MEMPCPY
+	  *((char *) mempcpy (charset, charsetstr, len)) = '\0';
+# else
+	  memcpy (charset, charsetstr, len);
+	  charset[len] = '\0';
+# endif
+
+	  /* The output charset should normally be determined by the
+	     locale.  But sometimes the locale is not used or not correctly
+	     set up, so we provide a possibility for the user to override
+	     this.  Moreover, the value specified through
+	     bind_textdomain_codeset overrides both.  */
+	  if (domainbinding != NULL && domainbinding->codeset != NULL)
+	    outcharset = domainbinding->codeset;
+	  else
+	    {
+	      outcharset = getenv ("OUTPUT_CHARSET");
+	      if (outcharset == NULL || outcharset[0] == '\0')
+		{
+# ifdef _LIBC
+		  outcharset = _NL_CURRENT (LC_CTYPE, CODESET);
+# else
+#  if HAVE_ICONV
+		  extern const char *locale_charset (void);
+		  outcharset = locale_charset ();
+#  endif
+# endif
+		}
+	    }
+
+# ifdef _LIBC
+	  /* We always want to use transliteration.  */
+	  outcharset = norm_add_slashes (outcharset, "TRANSLIT");
+	  charset = norm_add_slashes (charset, NULL);
+	  if (__gconv_open (outcharset, charset, &domain->conv,
+			    GCONV_AVOID_NOCONV)
+	      != __GCONV_OK)
+	    domain->conv = (__gconv_t) -1;
+# else
+#  if HAVE_ICONV
+	  /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
+	     we want to use transliteration.  */
+#   if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
+       || _LIBICONV_VERSION >= 0x0105
+	  if (strchr (outcharset, '/') == NULL)
+	    {
+	      char *tmp;
+
+	      len = strlen (outcharset);
+	      tmp = (char *) alloca (len + 10 + 1);
+	      memcpy (tmp, outcharset, len);
+	      memcpy (tmp + len, "//TRANSLIT", 10 + 1);
+	      outcharset = tmp;
+
+	      domain->conv = iconv_open (outcharset, charset);
+
+	      freea (outcharset);
+	    }
+	  else
+#   endif
+	    domain->conv = iconv_open (outcharset, charset);
+#  endif
+# endif
+
+	  freea (charset);
+	}
+#endif /* _LIBC || HAVE_ICONV */
+    }
+
+  return nullentry;
+}
+
+/* Frees the codeset dependent parts of an opened message catalog.  */
+void
+internal_function
+_nl_free_domain_conv (struct loaded_domain *domain)
+{
+  if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
+    free (domain->conv_tab);
+
+#ifdef _LIBC
+  if (domain->conv != (__gconv_t) -1)
+    __gconv_close (domain->conv);
+#else
+# if HAVE_ICONV
+  if (domain->conv != (iconv_t) -1)
+    iconv_close (domain->conv);
+# endif
+#endif
+}
+
+/* Load the message catalogs specified by FILENAME.  If it is no valid
+   message catalog do nothing.  */
+void
+internal_function
+_nl_load_domain (struct loaded_l10nfile *domain_file,
+		 struct binding *domainbinding)
+{
+  int fd;
+  size_t size;
+#ifdef _LIBC
+  struct stat64 st;
+#else
+  struct stat st;
+#endif
+  struct mo_file_header *data = (struct mo_file_header *) -1;
+  int use_mmap = 0;
+  struct loaded_domain *domain;
+  int revision;
+  const char *nullentry;
+
+  domain_file->decided = 1;
+  domain_file->data = NULL;
+
+  /* Note that it would be useless to store domainbinding in domain_file
+     because domainbinding might be == NULL now but != NULL later (after
+     a call to bind_textdomain_codeset).  */
+
+  /* If the record does not represent a valid locale the FILENAME
+     might be NULL.  This can happen when according to the given
+     specification the locale file name is different for XPG and CEN
+     syntax.  */
+  if (domain_file->filename == NULL)
+    return;
+
+  /* Try to open the addressed file.  */
+  fd = open (domain_file->filename, O_RDONLY | O_BINARY);
+  if (fd == -1)
+    return;
+
+  /* We must know about the size of the file.  */
+  if (
+#ifdef _LIBC
+      __builtin_expect (fstat64 (fd, &st) != 0, 0)
+#else
+      __builtin_expect (fstat (fd, &st) != 0, 0)
+#endif
+      || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
+      || __builtin_expect (size < sizeof (struct mo_file_header), 0))
+    {
+      /* Something went wrong.  */
+      close (fd);
+      return;
+    }
+
+#ifdef HAVE_MMAP
+  /* Now we are ready to load the file.  If mmap() is available we try
+     this first.  If not available or it failed we try to load it.  */
+  data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
+					 MAP_PRIVATE, fd, 0);
+
+  if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
+    {
+      /* mmap() call was successful.  */
+      close (fd);
+      use_mmap = 1;
+    }
+#endif
+
+  /* If the data is not yet available (i.e. mmap'ed) we try to load
+     it manually.  */
+  if (data == (struct mo_file_header *) -1)
+    {
+      size_t to_read;
+      char *read_ptr;
+
+      data = (struct mo_file_header *) malloc (size);
+      if (data == NULL)
+	return;
+
+      to_read = size;
+      read_ptr = (char *) data;
+      do
+	{
+	  long int nb = (long int) read (fd, read_ptr, to_read);
+	  if (nb <= 0)
+	    {
+#ifdef EINTR
+	      if (nb == -1 && errno == EINTR)
+		continue;
+#endif
+	      close (fd);
+	      return;
+	    }
+	  read_ptr += nb;
+	  to_read -= nb;
+	}
+      while (to_read > 0);
+
+      close (fd);
+    }
+
+  /* Using the magic number we can test whether it really is a message
+     catalog file.  */
+  if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
+			0))
+    {
+      /* The magic number is wrong: not a message catalog file.  */
+#ifdef HAVE_MMAP
+      if (use_mmap)
+	munmap ((void *) data, size);
+      else
+#endif
+	free (data);
+      return;
+    }
+
+  domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
+  if (domain == NULL)
+    return;
+  domain_file->data = domain;
+
+  domain->data = (char *) data;
+  domain->use_mmap = use_mmap;
+  domain->mmap_size = size;
+  domain->must_swap = data->magic != _MAGIC;
+  domain->malloced = NULL;
+
+  /* Fill in the information about the available tables.  */
+  revision = W (domain->must_swap, data->revision);
+  /* We support only the major revisions 0 and 1.  */
+  switch (revision >> 16)
+    {
+    case 0:
+    case 1:
+      domain->nstrings = W (domain->must_swap, data->nstrings);
+      domain->orig_tab = (const struct string_desc *)
+	((char *) data + W (domain->must_swap, data->orig_tab_offset));
+      domain->trans_tab = (const struct string_desc *)
+	((char *) data + W (domain->must_swap, data->trans_tab_offset));
+      domain->hash_size = W (domain->must_swap, data->hash_tab_size);
+      domain->hash_tab =
+	(domain->hash_size > 2
+	 ? (const nls_uint32 *)
+	   ((char *) data + W (domain->must_swap, data->hash_tab_offset))
+	 : NULL);
+      domain->must_swap_hash_tab = domain->must_swap;
+
+      /* Now dispatch on the minor revision.  */
+      switch (revision & 0xffff)
+	{
+	case 0:
+	  domain->n_sysdep_strings = 0;
+	  domain->orig_sysdep_tab = NULL;
+	  domain->trans_sysdep_tab = NULL;
+	  break;
+	case 1:
+	default:
+	  {
+	    nls_uint32 n_sysdep_strings;
+
+	    if (domain->hash_tab == NULL)
+	      /* This is invalid.  These minor revisions need a hash table.  */
+	      goto invalid;
+
+	    n_sysdep_strings =
+	      W (domain->must_swap, data->n_sysdep_strings);
+	    if (n_sysdep_strings > 0)
+	      {
+		nls_uint32 n_sysdep_segments;
+		const struct sysdep_segment *sysdep_segments;
+		const char **sysdep_segment_values;
+		const nls_uint32 *orig_sysdep_tab;
+		const nls_uint32 *trans_sysdep_tab;
+		nls_uint32 n_inmem_sysdep_strings;
+		size_t memneed;
+		char *mem;
+		struct sysdep_string_desc *inmem_orig_sysdep_tab;
+		struct sysdep_string_desc *inmem_trans_sysdep_tab;
+		nls_uint32 *inmem_hash_tab;
+		unsigned int i, j;
+
+		/* Get the values of the system dependent segments.  */
+		n_sysdep_segments =
+		  W (domain->must_swap, data->n_sysdep_segments);
+		sysdep_segments = (const struct sysdep_segment *)
+		  ((char *) data
+		   + W (domain->must_swap, data->sysdep_segments_offset));
+		sysdep_segment_values =
+		  alloca (n_sysdep_segments * sizeof (const char *));
+		for (i = 0; i < n_sysdep_segments; i++)
+		  {
+		    const char *name =
+		      (char *) data
+		      + W (domain->must_swap, sysdep_segments[i].offset);
+		    nls_uint32 namelen =
+		      W (domain->must_swap, sysdep_segments[i].length);
+
+		    if (!(namelen > 0 && name[namelen - 1] == '\0'))
+		      {
+			freea (sysdep_segment_values);
+			goto invalid;
+		      }
+
+		    sysdep_segment_values[i] = get_sysdep_segment_value (name);
+		  }
+
+		orig_sysdep_tab = (const nls_uint32 *)
+		  ((char *) data
+		   + W (domain->must_swap, data->orig_sysdep_tab_offset));
+		trans_sysdep_tab = (const nls_uint32 *)
+		  ((char *) data
+		   + W (domain->must_swap, data->trans_sysdep_tab_offset));
+
+		/* Compute the amount of additional memory needed for the
+		   system dependent strings and the augmented hash table.
+		   At the same time, also drop string pairs which refer to
+		   an undefined system dependent segment.  */
+		n_inmem_sysdep_strings = 0;
+		memneed = domain->hash_size * sizeof (nls_uint32);
+		for (i = 0; i < n_sysdep_strings; i++)
+		  {
+		    int valid = 1;
+		    size_t needs[2];
+
+		    for (j = 0; j < 2; j++)
+		      {
+			const struct sysdep_string *sysdep_string =
+			  (const struct sysdep_string *)
+			  ((char *) data
+			   + W (domain->must_swap,
+				j == 0
+				? orig_sysdep_tab[i]
+				: trans_sysdep_tab[i]));
+			size_t need = 0;
+			const struct segment_pair *p = sysdep_string->segments;
+
+			if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END)
+			  for (p = sysdep_string->segments;; p++)
+			    {
+			      nls_uint32 sysdepref;
+
+			      need += W (domain->must_swap, p->segsize);
+
+			      sysdepref = W (domain->must_swap, p->sysdepref);
+			      if (sysdepref == SEGMENTS_END)
+				break;
+
+			      if (sysdepref >= n_sysdep_segments)
+				{
+				  /* Invalid.  */
+				  freea (sysdep_segment_values);
+				  goto invalid;
+				}
+
+			      if (sysdep_segment_values[sysdepref] == NULL)
+				{
+				  /* This particular string pair is invalid.  */
+				  valid = 0;
+				  break;
+				}
+
+			      need += strlen (sysdep_segment_values[sysdepref]);
+			    }
+
+			needs[j] = need;
+			if (!valid)
+			  break;
+		      }
+
+		    if (valid)
+		      {
+			n_inmem_sysdep_strings++;
+			memneed += needs[0] + needs[1];
+		      }
+		  }
+		memneed += 2 * n_inmem_sysdep_strings
+			   * sizeof (struct sysdep_string_desc);
+
+		if (n_inmem_sysdep_strings > 0)
+		  {
+		    unsigned int k;
+
+		    /* Allocate additional memory.  */
+		    mem = (char *) malloc (memneed);
+		    if (mem == NULL)
+		      goto invalid;
+
+		    domain->malloced = mem;
+		    inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem;
+		    mem += n_inmem_sysdep_strings
+			   * sizeof (struct sysdep_string_desc);
+		    inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem;
+		    mem += n_inmem_sysdep_strings
+			   * sizeof (struct sysdep_string_desc);
+		    inmem_hash_tab = (nls_uint32 *) mem;
+		    mem += domain->hash_size * sizeof (nls_uint32);
+
+		    /* Compute the system dependent strings.  */
+		    k = 0;
+		    for (i = 0; i < n_sysdep_strings; i++)
+		      {
+			int valid = 1;
+
+			for (j = 0; j < 2; j++)
+			  {
+			    const struct sysdep_string *sysdep_string =
+			      (const struct sysdep_string *)
+			      ((char *) data
+			       + W (domain->must_swap,
+				    j == 0
+				    ? orig_sysdep_tab[i]
+				    : trans_sysdep_tab[i]));
+			    const struct segment_pair *p =
+			      sysdep_string->segments;
+
+			    if (W (domain->must_swap, p->sysdepref)
+				!= SEGMENTS_END)
+			      for (p = sysdep_string->segments;; p++)
+				{
+				  nls_uint32 sysdepref;
+
+				  sysdepref =
+				    W (domain->must_swap, p->sysdepref);
+				  if (sysdepref == SEGMENTS_END)
+				    break;
+
+				  if (sysdep_segment_values[sysdepref] == NULL)
+				    {
+				      /* This particular string pair is
+					 invalid.  */
+				      valid = 0;
+				      break;
+				    }
+				}
+
+			    if (!valid)
+			      break;
+			  }
+
+			if (valid)
+			  {
+			    for (j = 0; j < 2; j++)
+			      {
+				const struct sysdep_string *sysdep_string =
+				  (const struct sysdep_string *)
+				  ((char *) data
+				   + W (domain->must_swap,
+					j == 0
+					? orig_sysdep_tab[i]
+					: trans_sysdep_tab[i]));
+				const char *static_segments =
+				  (char *) data
+				  + W (domain->must_swap, sysdep_string->offset);
+				const struct segment_pair *p =
+				  sysdep_string->segments;
+
+				/* Concatenate the segments, and fill
+				   inmem_orig_sysdep_tab[k] (for j == 0) and
+				   inmem_trans_sysdep_tab[k] (for j == 1).  */
+
+				struct sysdep_string_desc *inmem_tab_entry =
+				  (j == 0
+				   ? inmem_orig_sysdep_tab
+				   : inmem_trans_sysdep_tab)
+				  + k;
+
+				if (W (domain->must_swap, p->sysdepref)
+				    == SEGMENTS_END)
+				  {
+				    /* Only one static segment.  */
+				    inmem_tab_entry->length =
+				      W (domain->must_swap, p->segsize);
+				    inmem_tab_entry->pointer = static_segments;
+				  }
+				else
+				  {
+				    inmem_tab_entry->pointer = mem;
+
+				    for (p = sysdep_string->segments;; p++)
+				      {
+					nls_uint32 segsize =
+					  W (domain->must_swap, p->segsize);
+					nls_uint32 sysdepref =
+					  W (domain->must_swap, p->sysdepref);
+					size_t n;
+
+					if (segsize > 0)
+					  {
+					    memcpy (mem, static_segments, segsize);
+					    mem += segsize;
+					    static_segments += segsize;
+					  }
+
+					if (sysdepref == SEGMENTS_END)
+					  break;
+
+					n = strlen (sysdep_segment_values[sysdepref]);
+					memcpy (mem, sysdep_segment_values[sysdepref], n);
+					mem += n;
+				      }
+
+				    inmem_tab_entry->length =
+				      mem - inmem_tab_entry->pointer;
+				  }
+			      }
+
+			    k++;
+			  }
+		      }
+		    if (k != n_inmem_sysdep_strings)
+		      abort ();
+
+		    /* Compute the augmented hash table.  */
+		    for (i = 0; i < domain->hash_size; i++)
+		      inmem_hash_tab[i] =
+			W (domain->must_swap_hash_tab, domain->hash_tab[i]);
+		    for (i = 0; i < n_inmem_sysdep_strings; i++)
+		      {
+			const char *msgid = inmem_orig_sysdep_tab[i].pointer;
+			nls_uint32 hash_val = hash_string (msgid);
+			nls_uint32 idx = hash_val % domain->hash_size;
+			nls_uint32 incr =
+			  1 + (hash_val % (domain->hash_size - 2));
+
+			for (;;)
+			  {
+			    if (inmem_hash_tab[idx] == 0)
+			      {
+				/* Hash table entry is empty.  Use it.  */
+				inmem_hash_tab[idx] = 1 + domain->nstrings + i;
+				break;
+			      }
+
+			    if (idx >= domain->hash_size - incr)
+			      idx -= domain->hash_size - incr;
+			    else
+			      idx += incr;
+			  }
+		      }
+
+		    domain->n_sysdep_strings = n_inmem_sysdep_strings;
+		    domain->orig_sysdep_tab = inmem_orig_sysdep_tab;
+		    domain->trans_sysdep_tab = inmem_trans_sysdep_tab;
+
+		    domain->hash_tab = inmem_hash_tab;
+		    domain->must_swap_hash_tab = 0;
+		  }
+		else
+		  {
+		    domain->n_sysdep_strings = 0;
+		    domain->orig_sysdep_tab = NULL;
+		    domain->trans_sysdep_tab = NULL;
+		  }
+
+		freea (sysdep_segment_values);
+	      }
+	    else
+	      {
+		domain->n_sysdep_strings = 0;
+		domain->orig_sysdep_tab = NULL;
+		domain->trans_sysdep_tab = NULL;
+	      }
+	  }
+	  break;
+	}
+      break;
+    default:
+      /* This is an invalid revision.  */
+    invalid:
+      /* This is an invalid .mo file.  */
+      free (domain->malloced);
+#ifdef HAVE_MMAP
+      if (use_mmap)
+	munmap ((void *) data, size);
+      else
+#endif
+	free (data);
+      free (domain);
+      domain_file->data = NULL;
+      return;
+    }
+
+  /* Now initialize the character set converter from the character set
+     the file is encoded with (found in the header entry) to the domain's
+     specified character set or the locale's character set.  */
+  nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
+
+  /* Also look for a plural specification.  */
+  EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
+}
+
+
+#ifdef _LIBC
+void
+internal_function
+_nl_unload_domain (struct loaded_domain *domain)
+{
+  if (domain->plural != &__gettext_germanic_plural)
+    __gettext_free_exp (domain->plural);
+
+  _nl_free_domain_conv (domain);
+
+  free (domain->malloced);
+
+# ifdef _POSIX_MAPPED_FILES
+  if (domain->use_mmap)
+    munmap ((void *) domain->data, domain->mmap_size);
+  else
+# endif	/* _POSIX_MAPPED_FILES */
+    free ((void *) domain->data);
+
+  free (domain);
+}
+#endif
diff --git a/e2fsprogs/intl/localcharset.c b/e2fsprogs/intl/localcharset.c
new file mode 100644
index 0000000..a3e3a9b
--- /dev/null
+++ b/e2fsprogs/intl/localcharset.c
@@ -0,0 +1,397 @@
+/* Determine a canonical name for the current locale's character encoding.
+
+   Copyright (C) 2000-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Specification.  */
+#include "localcharset.h"
+
+#if HAVE_STDDEF_H
+# include <stddef.h>
+#endif
+
+#include <stdio.h>
+#if HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if defined _WIN32 || defined __WIN32__
+# undef WIN32   /* avoid warning on mingw32 */
+# define WIN32
+#endif
+
+#if defined __EMX__
+/* Assume EMX program runs on OS/2, even if compiled under DOS.  */
+# define OS2
+#endif
+
+#if !defined WIN32
+# if HAVE_LANGINFO_CODESET
+#  include <langinfo.h>
+# else
+#  if HAVE_SETLOCALE
+#   include <locale.h>
+#  endif
+# endif
+#elif defined WIN32
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+#if defined OS2
+# define INCL_DOS
+# include <os2.h>
+#endif
+
+#if ENABLE_RELOCATABLE
+# include "relocatable.h"
+#else
+# define relocate(pathname) (pathname)
+#endif
+
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#endif
+
+#ifndef DIRECTORY_SEPARATOR
+# define DIRECTORY_SEPARATOR '/'
+#endif
+
+#ifndef ISSLASH
+# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
+#endif
+
+#if HAVE_DECL_GETC_UNLOCKED
+# undef getc
+# define getc getc_unlocked
+#endif
+
+/* The following static variable is declared 'volatile' to avoid a
+   possible multithread problem in the function get_charset_aliases. If we
+   are running in a threaded environment, and if two threads initialize
+   'charset_aliases' simultaneously, both will produce the same value,
+   and everything will be ok if the two assignments to 'charset_aliases'
+   are atomic. But I don't know what will happen if the two assignments mix.  */
+#if __STDC__ != 1
+# define volatile /* empty */
+#endif
+/* Pointer to the contents of the charset.alias file, if it has already been
+   read, else NULL.  Its format is:
+   ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0'  */
+static const char * volatile charset_aliases;
+
+/* Return a pointer to the contents of the charset.alias file.  */
+static const char *
+get_charset_aliases ()
+{
+  const char *cp;
+
+  cp = charset_aliases;
+  if (cp == NULL)
+    {
+#if !(defined VMS || defined WIN32)
+      FILE *fp;
+      const char *dir = relocate (LIBDIR);
+      const char *base = "charset.alias";
+      char *file_name;
+
+      /* Concatenate dir and base into freshly allocated file_name.  */
+      {
+	size_t dir_len = strlen (dir);
+	size_t base_len = strlen (base);
+	int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
+	file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
+	if (file_name != NULL)
+	  {
+	    memcpy (file_name, dir, dir_len);
+	    if (add_slash)
+	      file_name[dir_len] = DIRECTORY_SEPARATOR;
+	    memcpy (file_name + dir_len + add_slash, base, base_len + 1);
+	  }
+      }
+
+      if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
+	/* Out of memory or file not found, treat it as empty.  */
+	cp = "";
+      else
+	{
+	  /* Parse the file's contents.  */
+	  int c;
+	  char buf1[50+1];
+	  char buf2[50+1];
+	  char *res_ptr = NULL;
+	  size_t res_size = 0;
+	  size_t l1, l2;
+
+	  for (;;)
+	    {
+	      c = getc (fp);
+	      if (c == EOF)
+		break;
+	      if (c == '\n' || c == ' ' || c == '\t')
+		continue;
+	      if (c == '#')
+		{
+		  /* Skip comment, to end of line.  */
+		  do
+		    c = getc (fp);
+		  while (!(c == EOF || c == '\n'));
+		  if (c == EOF)
+		    break;
+		  continue;
+		}
+	      ungetc (c, fp);
+	      if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
+		break;
+	      l1 = strlen (buf1);
+	      l2 = strlen (buf2);
+	      if (res_size == 0)
+		{
+		  res_size = l1 + 1 + l2 + 1;
+		  res_ptr = (char *) malloc (res_size + 1);
+		}
+	      else
+		{
+		  res_size += l1 + 1 + l2 + 1;
+		  res_ptr = (char *) realloc (res_ptr, res_size + 1);
+		}
+	      if (res_ptr == NULL)
+		{
+		  /* Out of memory. */
+		  res_size = 0;
+		  break;
+		}
+	      strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
+	      strcpy (res_ptr + res_size - (l2 + 1), buf2);
+	    }
+	  fclose (fp);
+	  if (res_size == 0)
+	    cp = "";
+	  else
+	    {
+	      *(res_ptr + res_size) = '\0';
+	      cp = res_ptr;
+	    }
+	}
+
+      free (file_name);
+
+#else
+
+# if defined VMS
+      /* To avoid the troubles of an extra file charset.alias_vms in the
+	 sources of many GNU packages, simply inline the aliases here.  */
+      /* The list of encodings is taken from the OpenVMS 7.3-1 documentation
+	 "Compaq C Run-Time Library Reference Manual for OpenVMS systems"
+	 section 10.7 "Handling Different Character Sets".  */
+      cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
+	   "ISO8859-2" "\0" "ISO-8859-2" "\0"
+	   "ISO8859-5" "\0" "ISO-8859-5" "\0"
+	   "ISO8859-7" "\0" "ISO-8859-7" "\0"
+	   "ISO8859-8" "\0" "ISO-8859-8" "\0"
+	   "ISO8859-9" "\0" "ISO-8859-9" "\0"
+	   /* Japanese */
+	   "eucJP" "\0" "EUC-JP" "\0"
+	   "SJIS" "\0" "SHIFT_JIS" "\0"
+	   "DECKANJI" "\0" "DEC-KANJI" "\0"
+	   "SDECKANJI" "\0" "EUC-JP" "\0"
+	   /* Chinese */
+	   "eucTW" "\0" "EUC-TW" "\0"
+	   "DECHANYU" "\0" "DEC-HANYU" "\0"
+	   "DECHANZI" "\0" "GB2312" "\0"
+	   /* Korean */
+	   "DECKOREAN" "\0" "EUC-KR" "\0";
+# endif
+
+# if defined WIN32
+      /* To avoid the troubles of installing a separate file in the same
+	 directory as the DLL and of retrieving the DLL's directory at
+	 runtime, simply inline the aliases here.  */
+
+      cp = "CP936" "\0" "GBK" "\0"
+	   "CP1361" "\0" "JOHAB" "\0"
+	   "CP20127" "\0" "ASCII" "\0"
+	   "CP20866" "\0" "KOI8-R" "\0"
+	   "CP21866" "\0" "KOI8-RU" "\0"
+	   "CP28591" "\0" "ISO-8859-1" "\0"
+	   "CP28592" "\0" "ISO-8859-2" "\0"
+	   "CP28593" "\0" "ISO-8859-3" "\0"
+	   "CP28594" "\0" "ISO-8859-4" "\0"
+	   "CP28595" "\0" "ISO-8859-5" "\0"
+	   "CP28596" "\0" "ISO-8859-6" "\0"
+	   "CP28597" "\0" "ISO-8859-7" "\0"
+	   "CP28598" "\0" "ISO-8859-8" "\0"
+	   "CP28599" "\0" "ISO-8859-9" "\0"
+	   "CP28605" "\0" "ISO-8859-15" "\0";
+# endif
+#endif
+
+      charset_aliases = cp;
+    }
+
+  return cp;
+}
+
+/* Determine the current locale's character encoding, and canonicalize it
+   into one of the canonical names listed in config.charset.
+   The result must not be freed; it is statically allocated.
+   If the canonical name cannot be determined, the result is a non-canonical
+   name.  */
+
+#ifdef STATIC
+STATIC
+#endif
+const char *
+locale_charset ()
+{
+  const char *codeset;
+  const char *aliases;
+
+#if !(defined WIN32 || defined OS2)
+
+# if HAVE_LANGINFO_CODESET
+
+  /* Most systems support nl_langinfo (CODESET) nowadays.  */
+  codeset = nl_langinfo (CODESET);
+
+# else
+
+  /* On old systems which lack it, use setlocale or getenv.  */
+  const char *locale = NULL;
+
+  /* But most old systems don't have a complete set of locales.  Some
+     (like SunOS 4 or DJGPP) have only the C locale.  Therefore we don't
+     use setlocale here; it would return "C" when it doesn't support the
+     locale name the user has set.  */
+#  if HAVE_SETLOCALE && 0
+  locale = setlocale (LC_CTYPE, NULL);
+#  endif
+  if (locale == NULL || locale[0] == '\0')
+    {
+      locale = getenv ("LC_ALL");
+      if (locale == NULL || locale[0] == '\0')
+	{
+	  locale = getenv ("LC_CTYPE");
+	  if (locale == NULL || locale[0] == '\0')
+	    locale = getenv ("LANG");
+	}
+    }
+
+  /* On some old systems, one used to set locale = "iso8859_1". On others,
+     you set it to "language_COUNTRY.charset". In any case, we resolve it
+     through the charset.alias file.  */
+  codeset = locale;
+
+# endif
+
+#elif defined WIN32
+
+  static char buf[2 + 10 + 1];
+
+  /* Woe32 has a function returning the locale's codepage as a number.  */
+  sprintf (buf, "CP%u", GetACP ());
+  codeset = buf;
+
+#elif defined OS2
+
+  const char *locale;
+  static char buf[2 + 10 + 1];
+  ULONG cp[3];
+  ULONG cplen;
+
+  /* Allow user to override the codeset, as set in the operating system,
+     with standard language environment variables.  */
+  locale = getenv ("LC_ALL");
+  if (locale == NULL || locale[0] == '\0')
+    {
+      locale = getenv ("LC_CTYPE");
+      if (locale == NULL || locale[0] == '\0')
+	locale = getenv ("LANG");
+    }
+  if (locale != NULL && locale[0] != '\0')
+    {
+      /* If the locale name contains an encoding after the dot, return it.  */
+      const char *dot = strchr (locale, '.');
+
+      if (dot != NULL)
+	{
+	  const char *modifier;
+
+	  dot++;
+	  /* Look for the possible @... trailer and remove it, if any.  */
+	  modifier = strchr (dot, '@');
+	  if (modifier == NULL)
+	    return dot;
+	  if (modifier - dot < sizeof (buf))
+	    {
+	      memcpy (buf, dot, modifier - dot);
+	      buf [modifier - dot] = '\0';
+	      return buf;
+	    }
+	}
+
+      /* Resolve through the charset.alias file.  */
+      codeset = locale;
+    }
+  else
+    {
+      /* OS/2 has a function returning the locale's codepage as a number.  */
+      if (DosQueryCp (sizeof (cp), cp, &cplen))
+	codeset = "";
+      else
+	{
+	  sprintf (buf, "CP%u", cp[0]);
+	  codeset = buf;
+	}
+    }
+
+#endif
+
+  if (codeset == NULL)
+    /* The canonical name cannot be determined.  */
+    codeset = "";
+
+  /* Resolve alias. */
+  for (aliases = get_charset_aliases ();
+       *aliases != '\0';
+       aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
+    if (strcmp (codeset, aliases) == 0
+	|| (aliases[0] == '*' && aliases[1] == '\0'))
+      {
+	codeset = aliases + strlen (aliases) + 1;
+	break;
+      }
+
+  /* Don't return an empty string.  GNU libc and GNU libiconv interpret
+     the empty string as denoting "the locale's character encoding",
+     thus GNU libiconv would call this function a second time.  */
+  if (codeset[0] == '\0')
+    codeset = "ASCII";
+
+  return codeset;
+}
diff --git a/e2fsprogs/intl/localcharset.h b/e2fsprogs/intl/localcharset.h
new file mode 100644
index 0000000..3b137e7
--- /dev/null
+++ b/e2fsprogs/intl/localcharset.h
@@ -0,0 +1,42 @@
+/* Determine a canonical name for the current locale's character encoding.
+   Copyright (C) 2000-2003 Free Software Foundation, Inc.
+   This file is part of the GNU CHARSET Library.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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 _LOCALCHARSET_H
+#define _LOCALCHARSET_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Determine the current locale's character encoding, and canonicalize it
+   into one of the canonical names listed in config.charset.
+   The result must not be freed; it is statically allocated.
+   If the canonical name cannot be determined, the result is a non-canonical
+   name.  */
+extern const char * locale_charset (void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _LOCALCHARSET_H */
diff --git a/e2fsprogs/intl/locale.alias b/e2fsprogs/intl/locale.alias
new file mode 100644
index 0000000..bd6bb25
--- /dev/null
+++ b/e2fsprogs/intl/locale.alias
@@ -0,0 +1,78 @@
+# Locale name alias data base.
+# Copyright (C) 1996-2001,2003 Free Software Foundation, Inc.
+#
+# This program 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, 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library 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.
+
+# The format of this file is the same as for the corresponding file of
+# the X Window System, which normally can be found in
+#	/usr/lib/X11/locale/locale.alias
+# A single line contains two fields: an alias and a substitution value.
+# All entries are case independent.
+
+# Note: This file is far from being complete.  If you have a value for
+# your own site which you think might be useful for others too, share
+# it with the rest of us.  Send it using the `glibcbug' script to
+# bugs@gnu.org.
+
+# Packages using this file: 
+
+bokmal		nb_NO.ISO-8859-1
+bokmål		nb_NO.ISO-8859-1
+catalan		ca_ES.ISO-8859-1
+croatian	hr_HR.ISO-8859-2
+czech		cs_CZ.ISO-8859-2
+danish          da_DK.ISO-8859-1
+dansk		da_DK.ISO-8859-1
+deutsch		de_DE.ISO-8859-1
+dutch		nl_NL.ISO-8859-1
+eesti		et_EE.ISO-8859-1
+estonian	et_EE.ISO-8859-1
+finnish         fi_FI.ISO-8859-1
+français	fr_FR.ISO-8859-1
+french		fr_FR.ISO-8859-1
+galego		gl_ES.ISO-8859-1
+galician	gl_ES.ISO-8859-1
+german		de_DE.ISO-8859-1
+greek           el_GR.ISO-8859-7
+hebrew          he_IL.ISO-8859-8
+hrvatski	hr_HR.ISO-8859-2
+hungarian       hu_HU.ISO-8859-2
+icelandic       is_IS.ISO-8859-1
+italian         it_IT.ISO-8859-1
+japanese	ja_JP.eucJP
+japanese.euc	ja_JP.eucJP
+ja_JP		ja_JP.eucJP
+ja_JP.ujis	ja_JP.eucJP
+japanese.sjis	ja_JP.SJIS
+korean		ko_KR.eucKR
+korean.euc 	ko_KR.eucKR
+ko_KR		ko_KR.eucKR
+lithuanian      lt_LT.ISO-8859-13
+no_NO		nb_NO.ISO-8859-1
+no_NO.ISO-8859-1 nb_NO.ISO-8859-1
+norwegian       nb_NO.ISO-8859-1
+nynorsk		nn_NO.ISO-8859-1
+polish          pl_PL.ISO-8859-2
+portuguese      pt_PT.ISO-8859-1
+romanian        ro_RO.ISO-8859-2
+russian         ru_RU.ISO-8859-5
+slovak          sk_SK.ISO-8859-2
+slovene         sl_SI.ISO-8859-2
+slovenian       sl_SI.ISO-8859-2
+spanish         es_ES.ISO-8859-1
+swedish         sv_SE.ISO-8859-1
+thai		th_TH.TIS-620
+turkish         tr_TR.ISO-8859-9
diff --git a/e2fsprogs/intl/localealias.c b/e2fsprogs/intl/localealias.c
new file mode 100644
index 0000000..2eaf881
--- /dev/null
+++ b/e2fsprogs/intl/localealias.c
@@ -0,0 +1,414 @@
+/* Handle aliases for locale names.
+   Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE    1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <stdio.h>
+#if defined _LIBC || defined HAVE___FSETLOCKING
+# include <stdio_ext.h>
+#endif
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# undef alloca
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  if defined HAVE_ALLOCA_H || defined _LIBC
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "gettextP.h"
+
+#if ENABLE_RELOCATABLE
+# include "relocatable.h"
+#else
+# define relocate(pathname) (pathname)
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions.  This is required by the standard
+   because some ANSI C functions will require linking with this object
+   file and the name space must not be polluted.  */
+# define strcasecmp __strcasecmp
+
+# ifndef mempcpy
+#  define mempcpy __mempcpy
+# endif
+# define HAVE_MEMPCPY	1
+# define HAVE___FSETLOCKING	1
+
+/* We need locking here since we can be called from different places.  */
+# include <bits/libc-lock.h>
+
+__libc_lock_define_initialized (static, lock);
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+/* Some optimizations for glibc.  */
+#ifdef _LIBC
+# define FEOF(fp)		feof_unlocked (fp)
+# define FGETS(buf, n, fp)	fgets_unlocked (buf, n, fp)
+#else
+# define FEOF(fp)		feof (fp)
+# define FGETS(buf, n, fp)	fgets (buf, n, fp)
+#endif
+
+/* For those losing systems which don't have `alloca' we have to add
+   some additional code emulating it.  */
+#ifdef HAVE_ALLOCA
+# define freea(p) /* nothing */
+#else
+# define alloca(n) malloc (n)
+# define freea(p) free (p)
+#endif
+
+#if defined _LIBC_REENTRANT || HAVE_DECL_FGETS_UNLOCKED
+# undef fgets
+# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
+#endif
+#if defined _LIBC_REENTRANT || HAVE_DECL_FEOF_UNLOCKED
+# undef feof
+# define feof(s) feof_unlocked (s)
+#endif
+
+
+struct alias_map
+{
+  const char *alias;
+  const char *value;
+};
+
+
+#ifndef _LIBC
+# define libc_freeres_ptr(decl) decl
+#endif
+
+libc_freeres_ptr (static char *string_space);
+static size_t string_space_act;
+static size_t string_space_max;
+libc_freeres_ptr (static struct alias_map *map);
+static size_t nmap;
+static size_t maxmap;
+
+
+/* Prototypes for local functions.  */
+static size_t read_alias_file (const char *fname, int fname_len)
+     internal_function;
+static int extend_alias_table (void);
+static int alias_compare (const struct alias_map *map1,
+			  const struct alias_map *map2);
+
+
+const char *
+_nl_expand_alias (const char *name)
+{
+  static const char *locale_alias_path;
+  struct alias_map *retval;
+  const char *result = NULL;
+  size_t added;
+
+#ifdef _LIBC
+  __libc_lock_lock (lock);
+#endif
+
+  if (locale_alias_path == NULL)
+    locale_alias_path = LOCALE_ALIAS_PATH;
+
+  do
+    {
+      struct alias_map item;
+
+      item.alias = name;
+
+      if (nmap > 0)
+	retval = (struct alias_map *) bsearch (&item, map, nmap,
+					       sizeof (struct alias_map),
+					       (int (*) (const void *,
+							 const void *)
+						) alias_compare);
+      else
+	retval = NULL;
+
+      /* We really found an alias.  Return the value.  */
+      if (retval != NULL)
+	{
+	  result = retval->value;
+	  break;
+	}
+
+      /* Perhaps we can find another alias file.  */
+      added = 0;
+      while (added == 0 && locale_alias_path[0] != '\0')
+	{
+	  const char *start;
+
+	  while (locale_alias_path[0] == PATH_SEPARATOR)
+	    ++locale_alias_path;
+	  start = locale_alias_path;
+
+	  while (locale_alias_path[0] != '\0'
+		 && locale_alias_path[0] != PATH_SEPARATOR)
+	    ++locale_alias_path;
+
+	  if (start < locale_alias_path)
+	    added = read_alias_file (start, locale_alias_path - start);
+	}
+    }
+  while (added != 0);
+
+#ifdef _LIBC
+  __libc_lock_unlock (lock);
+#endif
+
+  return result;
+}
+
+
+static size_t
+internal_function
+read_alias_file (const char *fname, int fname_len)
+{
+  FILE *fp;
+  char *full_fname;
+  size_t added;
+  static const char aliasfile[] = "/locale.alias";
+
+  full_fname = (char *) alloca (fname_len + sizeof aliasfile);
+#ifdef HAVE_MEMPCPY
+  mempcpy (mempcpy (full_fname, fname, fname_len),
+	   aliasfile, sizeof aliasfile);
+#else
+  memcpy (full_fname, fname, fname_len);
+  memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
+#endif
+
+  fp = fopen (relocate (full_fname), "r");
+  freea (full_fname);
+  if (fp == NULL)
+    return 0;
+
+#ifdef HAVE___FSETLOCKING
+  /* No threads present.  */
+  __fsetlocking (fp, FSETLOCKING_BYCALLER);
+#endif
+
+  added = 0;
+  while (!FEOF (fp))
+    {
+      /* It is a reasonable approach to use a fix buffer here because
+	 a) we are only interested in the first two fields
+	 b) these fields must be usable as file names and so must not
+	    be that long
+	 We avoid a multi-kilobyte buffer here since this would use up
+	 stack space which we might not have if the program ran out of
+	 memory.  */
+      char buf[400];
+      char *alias;
+      char *value;
+      char *cp;
+
+      if (FGETS (buf, sizeof buf, fp) == NULL)
+	/* EOF reached.  */
+	break;
+
+      cp = buf;
+      /* Ignore leading white space.  */
+      while (isspace ((unsigned char) cp[0]))
+	++cp;
+
+      /* A leading '#' signals a comment line.  */
+      if (cp[0] != '\0' && cp[0] != '#')
+	{
+	  alias = cp++;
+	  while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
+	    ++cp;
+	  /* Terminate alias name.  */
+	  if (cp[0] != '\0')
+	    *cp++ = '\0';
+
+	  /* Now look for the beginning of the value.  */
+	  while (isspace ((unsigned char) cp[0]))
+	    ++cp;
+
+	  if (cp[0] != '\0')
+	    {
+	      size_t alias_len;
+	      size_t value_len;
+
+	      value = cp++;
+	      while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
+		++cp;
+	      /* Terminate value.  */
+	      if (cp[0] == '\n')
+		{
+		  /* This has to be done to make the following test
+		     for the end of line possible.  We are looking for
+		     the terminating '\n' which do not overwrite here.  */
+		  *cp++ = '\0';
+		  *cp = '\n';
+		}
+	      else if (cp[0] != '\0')
+		*cp++ = '\0';
+
+	      if (nmap >= maxmap)
+		if (__builtin_expect (extend_alias_table (), 0))
+		  return added;
+
+	      alias_len = strlen (alias) + 1;
+	      value_len = strlen (value) + 1;
+
+	      if (string_space_act + alias_len + value_len > string_space_max)
+		{
+		  /* Increase size of memory pool.  */
+		  size_t new_size = (string_space_max
+				     + (alias_len + value_len > 1024
+					? alias_len + value_len : 1024));
+		  char *new_pool = (char *) realloc (string_space, new_size);
+		  if (new_pool == NULL)
+		    return added;
+
+		  if (__builtin_expect (string_space != new_pool, 0))
+		    {
+		      size_t i;
+
+		      for (i = 0; i < nmap; i++)
+			{
+			  map[i].alias += new_pool - string_space;
+			  map[i].value += new_pool - string_space;
+			}
+		    }
+
+		  string_space = new_pool;
+		  string_space_max = new_size;
+		}
+
+	      map[nmap].alias = memcpy (&string_space[string_space_act],
+					alias, alias_len);
+	      string_space_act += alias_len;
+
+	      map[nmap].value = memcpy (&string_space[string_space_act],
+					value, value_len);
+	      string_space_act += value_len;
+
+	      ++nmap;
+	      ++added;
+	    }
+	}
+
+      /* Possibly not the whole line fits into the buffer.  Ignore
+	 the rest of the line.  */
+      while (strchr (buf, '\n') == NULL)
+	if (FGETS (buf, sizeof buf, fp) == NULL)
+	  /* Make sure the inner loop will be left.  The outer loop
+	     will exit at the `feof' test.  */
+	  break;
+    }
+
+  /* Should we test for ferror()?  I think we have to silently ignore
+     errors.  --drepper  */
+  fclose (fp);
+
+  if (added > 0)
+    qsort (map, nmap, sizeof (struct alias_map),
+	   (int (*) (const void *, const void *)) alias_compare);
+
+  return added;
+}
+
+
+static int
+extend_alias_table ()
+{
+  size_t new_size;
+  struct alias_map *new_map;
+
+  new_size = maxmap == 0 ? 100 : 2 * maxmap;
+  new_map = (struct alias_map *) realloc (map, (new_size
+						* sizeof (struct alias_map)));
+  if (new_map == NULL)
+    /* Simply don't extend: we don't have any more core.  */
+    return -1;
+
+  map = new_map;
+  maxmap = new_size;
+  return 0;
+}
+
+
+static int
+alias_compare (const struct alias_map *map1, const struct alias_map *map2)
+{
+#if defined _LIBC || defined HAVE_STRCASECMP
+  return strcasecmp (map1->alias, map2->alias);
+#else
+  const unsigned char *p1 = (const unsigned char *) map1->alias;
+  const unsigned char *p2 = (const unsigned char *) map2->alias;
+  unsigned char c1, c2;
+
+  if (p1 == p2)
+    return 0;
+
+  do
+    {
+      /* I know this seems to be odd but the tolower() function in
+	 some systems libc cannot handle nonalpha characters.  */
+      c1 = isupper (*p1) ? tolower (*p1) : *p1;
+      c2 = isupper (*p2) ? tolower (*p2) : *p2;
+      if (c1 == '\0')
+	break;
+      ++p1;
+      ++p2;
+    }
+  while (c1 == c2);
+
+  return c1 - c2;
+#endif
+}
diff --git a/e2fsprogs/intl/localename.c b/e2fsprogs/intl/localename.c
new file mode 100644
index 0000000..5662e54
--- /dev/null
+++ b/e2fsprogs/intl/localename.c
@@ -0,0 +1,1142 @@
+/* Determine the current selected locale.
+   Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+/* Written by Ulrich Drepper <drepper@gnu.org>, 1995.  */
+/* Win32 code written by Tor Lillqvist <tml@iki.fi>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <locale.h>
+
+#if defined _WIN32 || defined __WIN32__
+# undef WIN32   /* avoid warning on mingw32 */
+# define WIN32
+#endif
+
+#ifdef WIN32
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+/* List of language codes, sorted by value:
+   0x01 LANG_ARABIC
+   0x02 LANG_BULGARIAN
+   0x03 LANG_CATALAN
+   0x04 LANG_CHINESE
+   0x05 LANG_CZECH
+   0x06 LANG_DANISH
+   0x07 LANG_GERMAN
+   0x08 LANG_GREEK
+   0x09 LANG_ENGLISH
+   0x0a LANG_SPANISH
+   0x0b LANG_FINNISH
+   0x0c LANG_FRENCH
+   0x0d LANG_HEBREW
+   0x0e LANG_HUNGARIAN
+   0x0f LANG_ICELANDIC
+   0x10 LANG_ITALIAN
+   0x11 LANG_JAPANESE
+   0x12 LANG_KOREAN
+   0x13 LANG_DUTCH
+   0x14 LANG_NORWEGIAN
+   0x15 LANG_POLISH
+   0x16 LANG_PORTUGUESE
+   0x17 LANG_RHAETO_ROMANCE
+   0x18 LANG_ROMANIAN
+   0x19 LANG_RUSSIAN
+   0x1a LANG_CROATIAN == LANG_SERBIAN
+   0x1b LANG_SLOVAK
+   0x1c LANG_ALBANIAN
+   0x1d LANG_SWEDISH
+   0x1e LANG_THAI
+   0x1f LANG_TURKISH
+   0x20 LANG_URDU
+   0x21 LANG_INDONESIAN
+   0x22 LANG_UKRAINIAN
+   0x23 LANG_BELARUSIAN
+   0x24 LANG_SLOVENIAN
+   0x25 LANG_ESTONIAN
+   0x26 LANG_LATVIAN
+   0x27 LANG_LITHUANIAN
+   0x28 LANG_TAJIK
+   0x29 LANG_FARSI
+   0x2a LANG_VIETNAMESE
+   0x2b LANG_ARMENIAN
+   0x2c LANG_AZERI
+   0x2d LANG_BASQUE
+   0x2e LANG_SORBIAN
+   0x2f LANG_MACEDONIAN
+   0x30 LANG_SUTU
+   0x31 LANG_TSONGA
+   0x32 LANG_TSWANA
+   0x33 LANG_VENDA
+   0x34 LANG_XHOSA
+   0x35 LANG_ZULU
+   0x36 LANG_AFRIKAANS
+   0x37 LANG_GEORGIAN
+   0x38 LANG_FAEROESE
+   0x39 LANG_HINDI
+   0x3a LANG_MALTESE
+   0x3b LANG_SAAMI
+   0x3c LANG_GAELIC
+   0x3d LANG_YIDDISH
+   0x3e LANG_MALAY
+   0x3f LANG_KAZAK
+   0x40 LANG_KYRGYZ
+   0x41 LANG_SWAHILI
+   0x42 LANG_TURKMEN
+   0x43 LANG_UZBEK
+   0x44 LANG_TATAR
+   0x45 LANG_BENGALI
+   0x46 LANG_PUNJABI
+   0x47 LANG_GUJARATI
+   0x48 LANG_ORIYA
+   0x49 LANG_TAMIL
+   0x4a LANG_TELUGU
+   0x4b LANG_KANNADA
+   0x4c LANG_MALAYALAM
+   0x4d LANG_ASSAMESE
+   0x4e LANG_MARATHI
+   0x4f LANG_SANSKRIT
+   0x50 LANG_MONGOLIAN
+   0x51 LANG_TIBETAN
+   0x52 LANG_WELSH
+   0x53 LANG_CAMBODIAN
+   0x54 LANG_LAO
+   0x55 LANG_BURMESE
+   0x56 LANG_GALICIAN
+   0x57 LANG_KONKANI
+   0x58 LANG_MANIPURI
+   0x59 LANG_SINDHI
+   0x5a LANG_SYRIAC
+   0x5b LANG_SINHALESE
+   0x5c LANG_CHEROKEE
+   0x5d LANG_INUKTITUT
+   0x5e LANG_AMHARIC
+   0x5f LANG_TAMAZIGHT
+   0x60 LANG_KASHMIRI
+   0x61 LANG_NEPALI
+   0x62 LANG_FRISIAN
+   0x63 LANG_PASHTO
+   0x64 LANG_TAGALOG
+   0x65 LANG_DIVEHI
+   0x66 LANG_EDO
+   0x67 LANG_FULFULDE
+   0x68 LANG_HAUSA
+   0x69 LANG_IBIBIO
+   0x6a LANG_YORUBA
+   0x70 LANG_IGBO
+   0x71 LANG_KANURI
+   0x72 LANG_OROMO
+   0x73 LANG_TIGRINYA
+   0x74 LANG_GUARANI
+   0x75 LANG_HAWAIIAN
+   0x76 LANG_LATIN
+   0x77 LANG_SOMALI
+   0x78 LANG_YI
+   0x79 LANG_PAPIAMENTU
+*/
+/* Mingw headers don't have latest language and sublanguage codes.  */
+# ifndef LANG_AFRIKAANS
+# define LANG_AFRIKAANS 0x36
+# endif
+# ifndef LANG_ALBANIAN
+# define LANG_ALBANIAN 0x1c
+# endif
+# ifndef LANG_AMHARIC
+# define LANG_AMHARIC 0x5e
+# endif
+# ifndef LANG_ARABIC
+# define LANG_ARABIC 0x01
+# endif
+# ifndef LANG_ARMENIAN
+# define LANG_ARMENIAN 0x2b
+# endif
+# ifndef LANG_ASSAMESE
+# define LANG_ASSAMESE 0x4d
+# endif
+# ifndef LANG_AZERI
+# define LANG_AZERI 0x2c
+# endif
+# ifndef LANG_BASQUE
+# define LANG_BASQUE 0x2d
+# endif
+# ifndef LANG_BELARUSIAN
+# define LANG_BELARUSIAN 0x23
+# endif
+# ifndef LANG_BENGALI
+# define LANG_BENGALI 0x45
+# endif
+# ifndef LANG_BURMESE
+# define LANG_BURMESE 0x55
+# endif
+# ifndef LANG_CAMBODIAN
+# define LANG_CAMBODIAN 0x53
+# endif
+# ifndef LANG_CATALAN
+# define LANG_CATALAN 0x03
+# endif
+# ifndef LANG_CHEROKEE
+# define LANG_CHEROKEE 0x5c
+# endif
+# ifndef LANG_DIVEHI
+# define LANG_DIVEHI 0x65
+# endif
+# ifndef LANG_EDO
+# define LANG_EDO 0x66
+# endif
+# ifndef LANG_ESTONIAN
+# define LANG_ESTONIAN 0x25
+# endif
+# ifndef LANG_FAEROESE
+# define LANG_FAEROESE 0x38
+# endif
+# ifndef LANG_FARSI
+# define LANG_FARSI 0x29
+# endif
+# ifndef LANG_FRISIAN
+# define LANG_FRISIAN 0x62
+# endif
+# ifndef LANG_FULFULDE
+# define LANG_FULFULDE 0x67
+# endif
+# ifndef LANG_GAELIC
+# define LANG_GAELIC 0x3c
+# endif
+# ifndef LANG_GALICIAN
+# define LANG_GALICIAN 0x56
+# endif
+# ifndef LANG_GEORGIAN
+# define LANG_GEORGIAN 0x37
+# endif
+# ifndef LANG_GUARANI
+# define LANG_GUARANI 0x74
+# endif
+# ifndef LANG_GUJARATI
+# define LANG_GUJARATI 0x47
+# endif
+# ifndef LANG_HAUSA
+# define LANG_HAUSA 0x68
+# endif
+# ifndef LANG_HAWAIIAN
+# define LANG_HAWAIIAN 0x75
+# endif
+# ifndef LANG_HEBREW
+# define LANG_HEBREW 0x0d
+# endif
+# ifndef LANG_HINDI
+# define LANG_HINDI 0x39
+# endif
+# ifndef LANG_IBIBIO
+# define LANG_IBIBIO 0x69
+# endif
+# ifndef LANG_IGBO
+# define LANG_IGBO 0x70
+# endif
+# ifndef LANG_INDONESIAN
+# define LANG_INDONESIAN 0x21
+# endif
+# ifndef LANG_INUKTITUT
+# define LANG_INUKTITUT 0x5d
+# endif
+# ifndef LANG_KANNADA
+# define LANG_KANNADA 0x4b
+# endif
+# ifndef LANG_KANURI
+# define LANG_KANURI 0x71
+# endif
+# ifndef LANG_KASHMIRI
+# define LANG_KASHMIRI 0x60
+# endif
+# ifndef LANG_KAZAK
+# define LANG_KAZAK 0x3f
+# endif
+# ifndef LANG_KONKANI
+# define LANG_KONKANI 0x57
+# endif
+# ifndef LANG_KYRGYZ
+# define LANG_KYRGYZ 0x40
+# endif
+# ifndef LANG_LAO
+# define LANG_LAO 0x54
+# endif
+# ifndef LANG_LATIN
+# define LANG_LATIN 0x76
+# endif
+# ifndef LANG_LATVIAN
+# define LANG_LATVIAN 0x26
+# endif
+# ifndef LANG_LITHUANIAN
+# define LANG_LITHUANIAN 0x27
+# endif
+# ifndef LANG_MACEDONIAN
+# define LANG_MACEDONIAN 0x2f
+# endif
+# ifndef LANG_MALAY
+# define LANG_MALAY 0x3e
+# endif
+# ifndef LANG_MALAYALAM
+# define LANG_MALAYALAM 0x4c
+# endif
+# ifndef LANG_MALTESE
+# define LANG_MALTESE 0x3a
+# endif
+# ifndef LANG_MANIPURI
+# define LANG_MANIPURI 0x58
+# endif
+# ifndef LANG_MARATHI
+# define LANG_MARATHI 0x4e
+# endif
+# ifndef LANG_MONGOLIAN
+# define LANG_MONGOLIAN 0x50
+# endif
+# ifndef LANG_NEPALI
+# define LANG_NEPALI 0x61
+# endif
+# ifndef LANG_ORIYA
+# define LANG_ORIYA 0x48
+# endif
+# ifndef LANG_OROMO
+# define LANG_OROMO 0x72
+# endif
+# ifndef LANG_PAPIAMENTU
+# define LANG_PAPIAMENTU 0x79
+# endif
+# ifndef LANG_PASHTO
+# define LANG_PASHTO 0x63
+# endif
+# ifndef LANG_PUNJABI
+# define LANG_PUNJABI 0x46
+# endif
+# ifndef LANG_RHAETO_ROMANCE
+# define LANG_RHAETO_ROMANCE 0x17
+# endif
+# ifndef LANG_SAAMI
+# define LANG_SAAMI 0x3b
+# endif
+# ifndef LANG_SANSKRIT
+# define LANG_SANSKRIT 0x4f
+# endif
+# ifndef LANG_SERBIAN
+# define LANG_SERBIAN 0x1a
+# endif
+# ifndef LANG_SINDHI
+# define LANG_SINDHI 0x59
+# endif
+# ifndef LANG_SINHALESE
+# define LANG_SINHALESE 0x5b
+# endif
+# ifndef LANG_SLOVAK
+# define LANG_SLOVAK 0x1b
+# endif
+# ifndef LANG_SOMALI
+# define LANG_SOMALI 0x77
+# endif
+# ifndef LANG_SORBIAN
+# define LANG_SORBIAN 0x2e
+# endif
+# ifndef LANG_SUTU
+# define LANG_SUTU 0x30
+# endif
+# ifndef LANG_SWAHILI
+# define LANG_SWAHILI 0x41
+# endif
+# ifndef LANG_SYRIAC
+# define LANG_SYRIAC 0x5a
+# endif
+# ifndef LANG_TAGALOG
+# define LANG_TAGALOG 0x64
+# endif
+# ifndef LANG_TAJIK
+# define LANG_TAJIK 0x28
+# endif
+# ifndef LANG_TAMAZIGHT
+# define LANG_TAMAZIGHT 0x5f
+# endif
+# ifndef LANG_TAMIL
+# define LANG_TAMIL 0x49
+# endif
+# ifndef LANG_TATAR
+# define LANG_TATAR 0x44
+# endif
+# ifndef LANG_TELUGU
+# define LANG_TELUGU 0x4a
+# endif
+# ifndef LANG_THAI
+# define LANG_THAI 0x1e
+# endif
+# ifndef LANG_TIBETAN
+# define LANG_TIBETAN 0x51
+# endif
+# ifndef LANG_TIGRINYA
+# define LANG_TIGRINYA 0x73
+# endif
+# ifndef LANG_TSONGA
+# define LANG_TSONGA 0x31
+# endif
+# ifndef LANG_TSWANA
+# define LANG_TSWANA 0x32
+# endif
+# ifndef LANG_TURKMEN
+# define LANG_TURKMEN 0x42
+# endif
+# ifndef LANG_UKRAINIAN
+# define LANG_UKRAINIAN 0x22
+# endif
+# ifndef LANG_URDU
+# define LANG_URDU 0x20
+# endif
+# ifndef LANG_UZBEK
+# define LANG_UZBEK 0x43
+# endif
+# ifndef LANG_VENDA
+# define LANG_VENDA 0x33
+# endif
+# ifndef LANG_VIETNAMESE
+# define LANG_VIETNAMESE 0x2a
+# endif
+# ifndef LANG_WELSH
+# define LANG_WELSH 0x52
+# endif
+# ifndef LANG_XHOSA
+# define LANG_XHOSA 0x34
+# endif
+# ifndef LANG_YI
+# define LANG_YI 0x78
+# endif
+# ifndef LANG_YIDDISH
+# define LANG_YIDDISH 0x3d
+# endif
+# ifndef LANG_YORUBA
+# define LANG_YORUBA 0x6a
+# endif
+# ifndef LANG_ZULU
+# define LANG_ZULU 0x35
+# endif
+# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
+# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
+# endif
+# ifndef SUBLANG_ARABIC_IRAQ
+# define SUBLANG_ARABIC_IRAQ 0x02
+# endif
+# ifndef SUBLANG_ARABIC_EGYPT
+# define SUBLANG_ARABIC_EGYPT 0x03
+# endif
+# ifndef SUBLANG_ARABIC_LIBYA
+# define SUBLANG_ARABIC_LIBYA 0x04
+# endif
+# ifndef SUBLANG_ARABIC_ALGERIA
+# define SUBLANG_ARABIC_ALGERIA 0x05
+# endif
+# ifndef SUBLANG_ARABIC_MOROCCO
+# define SUBLANG_ARABIC_MOROCCO 0x06
+# endif
+# ifndef SUBLANG_ARABIC_TUNISIA
+# define SUBLANG_ARABIC_TUNISIA 0x07
+# endif
+# ifndef SUBLANG_ARABIC_OMAN
+# define SUBLANG_ARABIC_OMAN 0x08
+# endif
+# ifndef SUBLANG_ARABIC_YEMEN
+# define SUBLANG_ARABIC_YEMEN 0x09
+# endif
+# ifndef SUBLANG_ARABIC_SYRIA
+# define SUBLANG_ARABIC_SYRIA 0x0a
+# endif
+# ifndef SUBLANG_ARABIC_JORDAN
+# define SUBLANG_ARABIC_JORDAN 0x0b
+# endif
+# ifndef SUBLANG_ARABIC_LEBANON
+# define SUBLANG_ARABIC_LEBANON 0x0c
+# endif
+# ifndef SUBLANG_ARABIC_KUWAIT
+# define SUBLANG_ARABIC_KUWAIT 0x0d
+# endif
+# ifndef SUBLANG_ARABIC_UAE
+# define SUBLANG_ARABIC_UAE 0x0e
+# endif
+# ifndef SUBLANG_ARABIC_BAHRAIN
+# define SUBLANG_ARABIC_BAHRAIN 0x0f
+# endif
+# ifndef SUBLANG_ARABIC_QATAR
+# define SUBLANG_ARABIC_QATAR 0x10
+# endif
+# ifndef SUBLANG_AZERI_LATIN
+# define SUBLANG_AZERI_LATIN 0x01
+# endif
+# ifndef SUBLANG_AZERI_CYRILLIC
+# define SUBLANG_AZERI_CYRILLIC 0x02
+# endif
+# ifndef SUBLANG_BENGALI_INDIA
+# define SUBLANG_BENGALI_INDIA 0x00
+# endif
+# ifndef SUBLANG_BENGALI_BANGLADESH
+# define SUBLANG_BENGALI_BANGLADESH 0x01
+# endif
+# ifndef SUBLANG_CHINESE_MACAU
+# define SUBLANG_CHINESE_MACAU 0x05
+# endif
+# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
+# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
+# endif
+# ifndef SUBLANG_ENGLISH_JAMAICA
+# define SUBLANG_ENGLISH_JAMAICA 0x08
+# endif
+# ifndef SUBLANG_ENGLISH_CARIBBEAN
+# define SUBLANG_ENGLISH_CARIBBEAN 0x09
+# endif
+# ifndef SUBLANG_ENGLISH_BELIZE
+# define SUBLANG_ENGLISH_BELIZE 0x0a
+# endif
+# ifndef SUBLANG_ENGLISH_TRINIDAD
+# define SUBLANG_ENGLISH_TRINIDAD 0x0b
+# endif
+# ifndef SUBLANG_ENGLISH_ZIMBABWE
+# define SUBLANG_ENGLISH_ZIMBABWE 0x0c
+# endif
+# ifndef SUBLANG_ENGLISH_PHILIPPINES
+# define SUBLANG_ENGLISH_PHILIPPINES 0x0d
+# endif
+# ifndef SUBLANG_ENGLISH_INDONESIA
+# define SUBLANG_ENGLISH_INDONESIA 0x0e
+# endif
+# ifndef SUBLANG_ENGLISH_HONGKONG
+# define SUBLANG_ENGLISH_HONGKONG 0x0f
+# endif
+# ifndef SUBLANG_ENGLISH_INDIA
+# define SUBLANG_ENGLISH_INDIA 0x10
+# endif
+# ifndef SUBLANG_ENGLISH_MALAYSIA
+# define SUBLANG_ENGLISH_MALAYSIA 0x11
+# endif
+# ifndef SUBLANG_ENGLISH_SINGAPORE
+# define SUBLANG_ENGLISH_SINGAPORE 0x12
+# endif
+# ifndef SUBLANG_FRENCH_LUXEMBOURG
+# define SUBLANG_FRENCH_LUXEMBOURG 0x05
+# endif
+# ifndef SUBLANG_FRENCH_MONACO
+# define SUBLANG_FRENCH_MONACO 0x06
+# endif
+# ifndef SUBLANG_FRENCH_WESTINDIES
+# define SUBLANG_FRENCH_WESTINDIES 0x07
+# endif
+# ifndef SUBLANG_FRENCH_REUNION
+# define SUBLANG_FRENCH_REUNION 0x08
+# endif
+# ifndef SUBLANG_FRENCH_CONGO
+# define SUBLANG_FRENCH_CONGO 0x09
+# endif
+# ifndef SUBLANG_FRENCH_SENEGAL
+# define SUBLANG_FRENCH_SENEGAL 0x0a
+# endif
+# ifndef SUBLANG_FRENCH_CAMEROON
+# define SUBLANG_FRENCH_CAMEROON 0x0b
+# endif
+# ifndef SUBLANG_FRENCH_COTEDIVOIRE
+# define SUBLANG_FRENCH_COTEDIVOIRE 0x0c
+# endif
+# ifndef SUBLANG_FRENCH_MALI
+# define SUBLANG_FRENCH_MALI 0x0d
+# endif
+# ifndef SUBLANG_FRENCH_MOROCCO
+# define SUBLANG_FRENCH_MOROCCO 0x0e
+# endif
+# ifndef SUBLANG_FRENCH_HAITI
+# define SUBLANG_FRENCH_HAITI 0x0f
+# endif
+# ifndef SUBLANG_GERMAN_LUXEMBOURG
+# define SUBLANG_GERMAN_LUXEMBOURG 0x04
+# endif
+# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
+# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
+# endif
+# ifndef SUBLANG_KASHMIRI_INDIA
+# define SUBLANG_KASHMIRI_INDIA 0x02
+# endif
+# ifndef SUBLANG_MALAY_MALAYSIA
+# define SUBLANG_MALAY_MALAYSIA 0x01
+# endif
+# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
+# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
+# endif
+# ifndef SUBLANG_NEPALI_INDIA
+# define SUBLANG_NEPALI_INDIA 0x02
+# endif
+# ifndef SUBLANG_PUNJABI_INDIA
+# define SUBLANG_PUNJABI_INDIA 0x00
+# endif
+# ifndef SUBLANG_PUNJABI_PAKISTAN
+# define SUBLANG_PUNJABI_PAKISTAN 0x01
+# endif
+# ifndef SUBLANG_ROMANIAN_ROMANIA
+# define SUBLANG_ROMANIAN_ROMANIA 0x00
+# endif
+# ifndef SUBLANG_ROMANIAN_MOLDOVA
+# define SUBLANG_ROMANIAN_MOLDOVA 0x01
+# endif
+# ifndef SUBLANG_SERBIAN_LATIN
+# define SUBLANG_SERBIAN_LATIN 0x02
+# endif
+# ifndef SUBLANG_SERBIAN_CYRILLIC
+# define SUBLANG_SERBIAN_CYRILLIC 0x03
+# endif
+# ifndef SUBLANG_SINDHI_INDIA
+# define SUBLANG_SINDHI_INDIA 0x00
+# endif
+# ifndef SUBLANG_SINDHI_PAKISTAN
+# define SUBLANG_SINDHI_PAKISTAN 0x01
+# endif
+# ifndef SUBLANG_SPANISH_GUATEMALA
+# define SUBLANG_SPANISH_GUATEMALA 0x04
+# endif
+# ifndef SUBLANG_SPANISH_COSTA_RICA
+# define SUBLANG_SPANISH_COSTA_RICA 0x05
+# endif
+# ifndef SUBLANG_SPANISH_PANAMA
+# define SUBLANG_SPANISH_PANAMA 0x06
+# endif
+# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
+# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
+# endif
+# ifndef SUBLANG_SPANISH_VENEZUELA
+# define SUBLANG_SPANISH_VENEZUELA 0x08
+# endif
+# ifndef SUBLANG_SPANISH_COLOMBIA
+# define SUBLANG_SPANISH_COLOMBIA 0x09
+# endif
+# ifndef SUBLANG_SPANISH_PERU
+# define SUBLANG_SPANISH_PERU 0x0a
+# endif
+# ifndef SUBLANG_SPANISH_ARGENTINA
+# define SUBLANG_SPANISH_ARGENTINA 0x0b
+# endif
+# ifndef SUBLANG_SPANISH_ECUADOR
+# define SUBLANG_SPANISH_ECUADOR 0x0c
+# endif
+# ifndef SUBLANG_SPANISH_CHILE
+# define SUBLANG_SPANISH_CHILE 0x0d
+# endif
+# ifndef SUBLANG_SPANISH_URUGUAY
+# define SUBLANG_SPANISH_URUGUAY 0x0e
+# endif
+# ifndef SUBLANG_SPANISH_PARAGUAY
+# define SUBLANG_SPANISH_PARAGUAY 0x0f
+# endif
+# ifndef SUBLANG_SPANISH_BOLIVIA
+# define SUBLANG_SPANISH_BOLIVIA 0x10
+# endif
+# ifndef SUBLANG_SPANISH_EL_SALVADOR
+# define SUBLANG_SPANISH_EL_SALVADOR 0x11
+# endif
+# ifndef SUBLANG_SPANISH_HONDURAS
+# define SUBLANG_SPANISH_HONDURAS 0x12
+# endif
+# ifndef SUBLANG_SPANISH_NICARAGUA
+# define SUBLANG_SPANISH_NICARAGUA 0x13
+# endif
+# ifndef SUBLANG_SPANISH_PUERTO_RICO
+# define SUBLANG_SPANISH_PUERTO_RICO 0x14
+# endif
+# ifndef SUBLANG_SWEDISH_FINLAND
+# define SUBLANG_SWEDISH_FINLAND 0x02
+# endif
+# ifndef SUBLANG_TAMAZIGHT_ARABIC
+# define SUBLANG_TAMAZIGHT_ARABIC 0x01
+# endif
+# ifndef SUBLANG_TAMAZIGHT_LATIN
+# define SUBLANG_TAMAZIGHT_LATIN 0x02
+# endif
+# ifndef SUBLANG_TIGRINYA_ETHIOPIA
+# define SUBLANG_TIGRINYA_ETHIOPIA 0x00
+# endif
+# ifndef SUBLANG_TIGRINYA_ERITREA
+# define SUBLANG_TIGRINYA_ERITREA 0x01
+# endif
+# ifndef SUBLANG_URDU_PAKISTAN
+# define SUBLANG_URDU_PAKISTAN 0x01
+# endif
+# ifndef SUBLANG_URDU_INDIA
+# define SUBLANG_URDU_INDIA 0x02
+# endif
+# ifndef SUBLANG_UZBEK_LATIN
+# define SUBLANG_UZBEK_LATIN 0x01
+# endif
+# ifndef SUBLANG_UZBEK_CYRILLIC
+# define SUBLANG_UZBEK_CYRILLIC 0x02
+# endif
+#endif
+
+/* XPG3 defines the result of 'setlocale (category, NULL)' as:
+   "Directs 'setlocale()' to query 'category' and return the current
+    setting of 'local'."
+   However it does not specify the exact format.  Neither do SUSV2 and
+   ISO C 99.  So we can use this feature only on selected systems (e.g.
+   those using GNU C Library).  */
+#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
+# define HAVE_LOCALE_NULL
+#endif
+
+/* Determine the current locale's name, and canonicalize it into XPG syntax
+     language[_territory[.codeset]][@modifier]
+   The codeset part in the result is not reliable; the locale_charset()
+   should be used for codeset information instead.
+   The result must not be freed; it is statically allocated.  */
+
+const char *
+_nl_locale_name (int category, const char *categoryname)
+{
+  const char *retval;
+
+#ifndef WIN32
+
+  /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
+     On some systems this can be done by the 'setlocale' function itself.  */
+# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
+  retval = setlocale (category, NULL);
+# else
+  /* Setting of LC_ALL overwrites all other.  */
+  retval = getenv ("LC_ALL");
+  if (retval == NULL || retval[0] == '\0')
+    {
+      /* Next comes the name of the desired category.  */
+      retval = getenv (categoryname);
+      if (retval == NULL || retval[0] == '\0')
+	{
+	  /* Last possibility is the LANG environment variable.  */
+	  retval = getenv ("LANG");
+	  if (retval == NULL || retval[0] == '\0')
+	    /* We use C as the default domain.  POSIX says this is
+	       implementation defined.  */
+	    retval = "C";
+	}
+    }
+# endif
+
+  return retval;
+
+#else /* WIN32 */
+
+  /* Return an XPG style locale name language[_territory][@modifier].
+     Don't even bother determining the codeset; it's not useful in this
+     context, because message catalogs are not specific to a single
+     codeset.  */
+
+  LCID lcid;
+  LANGID langid;
+  int primary, sub;
+
+  /* Let the user override the system settings through environment
+     variables, as on POSIX systems.  */
+  retval = getenv ("LC_ALL");
+  if (retval != NULL && retval[0] != '\0')
+    return retval;
+  retval = getenv (categoryname);
+  if (retval != NULL && retval[0] != '\0')
+    return retval;
+  retval = getenv ("LANG");
+  if (retval != NULL && retval[0] != '\0')
+    return retval;
+
+  /* Use native Win32 API locale ID.  */
+  lcid = GetThreadLocale ();
+
+  /* Strip off the sorting rules, keep only the language part.  */
+  langid = LANGIDFROMLCID (lcid);
+
+  /* Split into language and territory part.  */
+  primary = PRIMARYLANGID (langid);
+  sub = SUBLANGID (langid);
+
+  /* Dispatch on language.
+     See also http://www.unicode.org/unicode/onlinedat/languages.html .
+     For details about languages, see http://www.ethnologue.com/ .  */
+  switch (primary)
+    {
+    case LANG_AFRIKAANS: return "af_ZA";
+    case LANG_ALBANIAN: return "sq_AL";
+    case LANG_AMHARIC: return "am_ET";
+    case LANG_ARABIC:
+      switch (sub)
+	{
+	case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA";
+	case SUBLANG_ARABIC_IRAQ: return "ar_IQ";
+	case SUBLANG_ARABIC_EGYPT: return "ar_EG";
+	case SUBLANG_ARABIC_LIBYA: return "ar_LY";
+	case SUBLANG_ARABIC_ALGERIA: return "ar_DZ";
+	case SUBLANG_ARABIC_MOROCCO: return "ar_MA";
+	case SUBLANG_ARABIC_TUNISIA: return "ar_TN";
+	case SUBLANG_ARABIC_OMAN: return "ar_OM";
+	case SUBLANG_ARABIC_YEMEN: return "ar_YE";
+	case SUBLANG_ARABIC_SYRIA: return "ar_SY";
+	case SUBLANG_ARABIC_JORDAN: return "ar_JO";
+	case SUBLANG_ARABIC_LEBANON: return "ar_LB";
+	case SUBLANG_ARABIC_KUWAIT: return "ar_KW";
+	case SUBLANG_ARABIC_UAE: return "ar_AE";
+	case SUBLANG_ARABIC_BAHRAIN: return "ar_BH";
+	case SUBLANG_ARABIC_QATAR: return "ar_QA";
+	}
+      return "ar";
+    case LANG_ARMENIAN: return "hy_AM";
+    case LANG_ASSAMESE: return "as_IN";
+    case LANG_AZERI:
+      switch (sub)
+	{
+	/* FIXME: Adjust this when Azerbaijani locales appear on Unix.  */
+	case SUBLANG_AZERI_LATIN: return "az_AZ@latin";
+	case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic";
+	}
+      return "az";
+    case LANG_BASQUE:
+      return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR".  */
+    case LANG_BELARUSIAN: return "be_BY";
+    case LANG_BENGALI:
+      switch (sub)
+	{
+	case SUBLANG_BENGALI_INDIA: return "bn_IN";
+	case SUBLANG_BENGALI_BANGLADESH: return "bn_BD";
+	}
+      return "bn";
+    case LANG_BULGARIAN: return "bg_BG";
+    case LANG_BURMESE: return "my_MM";
+    case LANG_CAMBODIAN: return "km_KH";
+    case LANG_CATALAN: return "ca_ES";
+    case LANG_CHEROKEE: return "chr_US";
+    case LANG_CHINESE:
+      switch (sub)
+	{
+	case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW";
+	case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN";
+	case SUBLANG_CHINESE_HONGKONG: return "zh_HK";
+	case SUBLANG_CHINESE_SINGAPORE: return "zh_SG";
+	case SUBLANG_CHINESE_MACAU: return "zh_MO";
+	}
+      return "zh";
+    case LANG_CROATIAN:		/* LANG_CROATIAN == LANG_SERBIAN
+				 * What used to be called Serbo-Croatian
+				 * should really now be two separate
+				 * languages because of political reasons.
+				 * (Says tml, who knows nothing about Serbian
+				 * or Croatian.)
+				 * (I can feel those flames coming already.)
+				 */
+      switch (sub)
+	{
+	case SUBLANG_DEFAULT: return "hr_HR";
+	case SUBLANG_SERBIAN_LATIN: return "sr_CS";
+	case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic";
+	}
+      return "hr";
+    case LANG_CZECH: return "cs_CZ";
+    case LANG_DANISH: return "da_DK";
+    case LANG_DIVEHI: return "dv_MV";
+    case LANG_DUTCH:
+      switch (sub)
+	{
+	case SUBLANG_DUTCH: return "nl_NL";
+	case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
+	}
+      return "nl";
+    case LANG_EDO: return "bin_NG";
+    case LANG_ENGLISH:
+      switch (sub)
+	{
+	/* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
+	 * English was the language spoken in England.
+	 * Oh well.
+	 */
+	case SUBLANG_ENGLISH_US: return "en_US";
+	case SUBLANG_ENGLISH_UK: return "en_GB";
+	case SUBLANG_ENGLISH_AUS: return "en_AU";
+	case SUBLANG_ENGLISH_CAN: return "en_CA";
+	case SUBLANG_ENGLISH_NZ: return "en_NZ";
+	case SUBLANG_ENGLISH_EIRE: return "en_IE";
+	case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA";
+	case SUBLANG_ENGLISH_JAMAICA: return "en_JM";
+	case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */
+	case SUBLANG_ENGLISH_BELIZE: return "en_BZ";
+	case SUBLANG_ENGLISH_TRINIDAD: return "en_TT";
+	case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW";
+	case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH";
+	case SUBLANG_ENGLISH_INDONESIA: return "en_ID";
+	case SUBLANG_ENGLISH_HONGKONG: return "en_HK";
+	case SUBLANG_ENGLISH_INDIA: return "en_IN";
+	case SUBLANG_ENGLISH_MALAYSIA: return "en_MY";
+	case SUBLANG_ENGLISH_SINGAPORE: return "en_SG";
+	}
+      return "en";
+    case LANG_ESTONIAN: return "et_EE";
+    case LANG_FAEROESE: return "fo_FO";
+    case LANG_FARSI: return "fa_IR";
+    case LANG_FINNISH: return "fi_FI";
+    case LANG_FRENCH:
+      switch (sub)
+	{
+	case SUBLANG_FRENCH: return "fr_FR";
+	case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE";
+	case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
+	case SUBLANG_FRENCH_SWISS: return "fr_CH";
+	case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU";
+	case SUBLANG_FRENCH_MONACO: return "fr_MC";
+	case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */
+	case SUBLANG_FRENCH_REUNION: return "fr_RE";
+	case SUBLANG_FRENCH_CONGO: return "fr_CG";
+	case SUBLANG_FRENCH_SENEGAL: return "fr_SN";
+	case SUBLANG_FRENCH_CAMEROON: return "fr_CM";
+	case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI";
+	case SUBLANG_FRENCH_MALI: return "fr_ML";
+	case SUBLANG_FRENCH_MOROCCO: return "fr_MA";
+	case SUBLANG_FRENCH_HAITI: return "fr_HT";
+	}
+      return "fr";
+    case LANG_FRISIAN: return "fy_NL";
+    case LANG_FULFULDE:
+      /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin. */
+      return "ff_NG";
+    case LANG_GAELIC:
+      switch (sub)
+	{
+	case 0x01: /* SCOTTISH */ return "gd_GB";
+	case 0x02: /* IRISH */ return "ga_IE";
+	}
+      return "C";
+    case LANG_GALICIAN: return "gl_ES";
+    case LANG_GEORGIAN: return "ka_GE";
+    case LANG_GERMAN:
+      switch (sub)
+	{
+	case SUBLANG_GERMAN: return "de_DE";
+	case SUBLANG_GERMAN_SWISS: return "de_CH";
+	case SUBLANG_GERMAN_AUSTRIAN: return "de_AT";
+	case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU";
+	case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
+	}
+      return "de";
+    case LANG_GREEK: return "el_GR";
+    case LANG_GUARANI: return "gn_PY";
+    case LANG_GUJARATI: return "gu_IN";
+    case LANG_HAUSA: return "ha_NG";
+    case LANG_HAWAIIAN:
+      /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
+	 or Hawaii Creole English ("cpe_US", 600000 speakers)?  */
+      return "cpe_US";
+    case LANG_HEBREW: return "he_IL";
+    case LANG_HINDI: return "hi_IN";
+    case LANG_HUNGARIAN: return "hu_HU";
+    case LANG_IBIBIO: return "nic_NG";
+    case LANG_ICELANDIC: return "is_IS";
+    case LANG_IGBO: return "ig_NG";
+    case LANG_INDONESIAN: return "id_ID";
+    case LANG_INUKTITUT: return "iu_CA";
+    case LANG_ITALIAN:
+      switch (sub)
+	{
+	case SUBLANG_ITALIAN: return "it_IT";
+	case SUBLANG_ITALIAN_SWISS: return "it_CH";
+	}
+      return "it";
+    case LANG_JAPANESE: return "ja_JP";
+    case LANG_KANNADA: return "kn_IN";
+    case LANG_KANURI: return "kr_NG";
+    case LANG_KASHMIRI:
+      switch (sub)
+	{
+	case SUBLANG_DEFAULT: return "ks_PK";
+	case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
+	}
+      return "ks";
+    case LANG_KAZAK: return "kk_KZ";
+    case LANG_KONKANI:
+      /* FIXME: Adjust this when such locales appear on Unix.  */
+      return "kok_IN";
+    case LANG_KOREAN: return "ko_KR";
+    case LANG_KYRGYZ: return "ky_KG";
+    case LANG_LAO: return "lo_LA";
+    case LANG_LATIN: return "la_VA";
+    case LANG_LATVIAN: return "lv_LV";
+    case LANG_LITHUANIAN: return "lt_LT";
+    case LANG_MACEDONIAN: return "mk_MK";
+    case LANG_MALAY:
+      switch (sub)
+	{
+	case SUBLANG_MALAY_MALAYSIA: return "ms_MY";
+	case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
+	}
+      return "ms";
+    case LANG_MALAYALAM: return "ml_IN";
+    case LANG_MALTESE: return "mt_MT";
+    case LANG_MANIPURI:
+      /* FIXME: Adjust this when such locales appear on Unix.  */
+      return "mni_IN";
+    case LANG_MARATHI: return "mr_IN";
+    case LANG_MONGOLIAN:
+      return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN".  */
+    case LANG_NEPALI:
+      switch (sub)
+	{
+	case SUBLANG_DEFAULT: return "ne_NP";
+	case SUBLANG_NEPALI_INDIA: return "ne_IN";
+	}
+      return "ne";
+    case LANG_NORWEGIAN:
+      switch (sub)
+	{
+	case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO";
+	case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
+	}
+      return "no";
+    case LANG_ORIYA: return "or_IN";
+    case LANG_OROMO: return "om_ET";
+    case LANG_PAPIAMENTU: return "pap_AN";
+    case LANG_PASHTO:
+      return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF".  */
+    case LANG_POLISH: return "pl_PL";
+    case LANG_PORTUGUESE:
+      switch (sub)
+	{
+	case SUBLANG_PORTUGUESE: return "pt_PT";
+	/* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
+	   Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
+	case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
+	}
+      return "pt";
+    case LANG_PUNJABI:
+      switch (sub)
+	{
+	case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */
+	case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */
+	}
+      return "pa";
+    case LANG_RHAETO_ROMANCE: return "rm_CH";
+    case LANG_ROMANIAN:
+      switch (sub)
+	{
+	case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO";
+	case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD";
+	}
+      return "ro";
+    case LANG_RUSSIAN:
+      return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD".  */
+    case LANG_SAAMI: /* actually Northern Sami */ return "se_NO";
+    case LANG_SANSKRIT: return "sa_IN";
+    case LANG_SINDHI:
+      switch (sub)
+	{
+	case SUBLANG_SINDHI_INDIA: return "sd_IN";
+	case SUBLANG_SINDHI_PAKISTAN: return "sd_PK";
+	}
+      return "sd";
+    case LANG_SINHALESE: return "si_LK";
+    case LANG_SLOVAK: return "sk_SK";
+    case LANG_SLOVENIAN: return "sl_SI";
+    case LANG_SOMALI: return "so_SO";
+    case LANG_SORBIAN:
+      /* FIXME: Adjust this when such locales appear on Unix.  */
+      return "wen_DE";
+    case LANG_SPANISH:
+      switch (sub)
+	{
+	case SUBLANG_SPANISH: return "es_ES";
+	case SUBLANG_SPANISH_MEXICAN: return "es_MX";
+	case SUBLANG_SPANISH_MODERN:
+	  return "es_ES@modern";	/* not seen on Unix */
+	case SUBLANG_SPANISH_GUATEMALA: return "es_GT";
+	case SUBLANG_SPANISH_COSTA_RICA: return "es_CR";
+	case SUBLANG_SPANISH_PANAMA: return "es_PA";
+	case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO";
+	case SUBLANG_SPANISH_VENEZUELA: return "es_VE";
+	case SUBLANG_SPANISH_COLOMBIA: return "es_CO";
+	case SUBLANG_SPANISH_PERU: return "es_PE";
+	case SUBLANG_SPANISH_ARGENTINA: return "es_AR";
+	case SUBLANG_SPANISH_ECUADOR: return "es_EC";
+	case SUBLANG_SPANISH_CHILE: return "es_CL";
+	case SUBLANG_SPANISH_URUGUAY: return "es_UY";
+	case SUBLANG_SPANISH_PARAGUAY: return "es_PY";
+	case SUBLANG_SPANISH_BOLIVIA: return "es_BO";
+	case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV";
+	case SUBLANG_SPANISH_HONDURAS: return "es_HN";
+	case SUBLANG_SPANISH_NICARAGUA: return "es_NI";
+	case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR";
+	}
+      return "es";
+    case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */
+    case LANG_SWAHILI: return "sw_KE";
+    case LANG_SWEDISH:
+      switch (sub)
+	{
+	case SUBLANG_DEFAULT: return "sv_SE";
+	case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
+	}
+      return "sv";
+    case LANG_SYRIAC: return "syr_TR"; /* An extinct language.  */
+    case LANG_TAGALOG: return "tl_PH";
+    case LANG_TAJIK: return "tg_TJ";
+    case LANG_TAMAZIGHT:
+      switch (sub)
+	{
+	/* FIXME: Adjust this when Tamazight locales appear on Unix.  */
+	case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic";
+	case SUBLANG_TAMAZIGHT_LATIN: return "ber_MA@latin";
+	}
+      return "ber_MA";
+    case LANG_TAMIL:
+      return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG".  */
+    case LANG_TATAR: return "tt_RU";
+    case LANG_TELUGU: return "te_IN";
+    case LANG_THAI: return "th_TH";
+    case LANG_TIBETAN: return "bo_CN";
+    case LANG_TIGRINYA:
+      switch (sub)
+	{
+	case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET";
+	case SUBLANG_TIGRINYA_ERITREA: return "ti_ER";
+	}
+      return "ti";
+    case LANG_TSONGA: return "ts_ZA";
+    case LANG_TSWANA: return "tn_BW";
+    case LANG_TURKISH: return "tr_TR";
+    case LANG_TURKMEN: return "tk_TM";
+    case LANG_UKRAINIAN: return "uk_UA";
+    case LANG_URDU:
+      switch (sub)
+	{
+	case SUBLANG_URDU_PAKISTAN: return "ur_PK";
+	case SUBLANG_URDU_INDIA: return "ur_IN";
+	}
+      return "ur";
+    case LANG_UZBEK:
+      switch (sub)
+	{
+	case SUBLANG_UZBEK_LATIN: return "uz_UZ";
+	case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic";
+	}
+      return "uz";
+    case LANG_VENDA: return "ve_ZA";
+    case LANG_VIETNAMESE: return "vi_VN";
+    case LANG_WELSH: return "cy_GB";
+    case LANG_XHOSA: return "xh_ZA";
+    case LANG_YI: return "sit_CN";
+    case LANG_YIDDISH: return "yi_IL";
+    case LANG_YORUBA: return "yo_NG";
+    case LANG_ZULU: return "zu_ZA";
+    default: return "C";
+    }
+
+#endif
+}
diff --git a/e2fsprogs/intl/log.c b/e2fsprogs/intl/log.c
new file mode 100644
index 0000000..cb6076e
--- /dev/null
+++ b/e2fsprogs/intl/log.c
@@ -0,0 +1,98 @@
+/* Log file output.
+   Copyright (C) 2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Print an ASCII string with quotes and escape sequences where needed.  */
+static void
+print_escaped (FILE *stream, const char *str)
+{
+  putc ('"', stream);
+  for (; *str != '\0'; str++)
+    if (*str == '\n')
+      {
+	fputs ("\\n\"", stream);
+	if (str[1] == '\0')
+	  return;
+	fputs ("\n\"", stream);
+      }
+    else
+      {
+	if (*str == '"' || *str == '\\')
+	  putc ('\\', stream);
+	putc (*str, stream);
+      }
+  putc ('"', stream);
+}
+
+/* Add to the log file an entry denoting a failed translation.  */
+void
+_nl_log_untranslated (const char *logfilename, const char *domainname,
+		      const char *msgid1, const char *msgid2, int plural)
+{
+  static char *last_logfilename = NULL;
+  static FILE *last_logfile = NULL;
+  FILE *logfile;
+
+  /* Can we reuse the last opened logfile?  */
+  if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0)
+    {
+      /* Close the last used logfile.  */
+      if (last_logfilename != NULL)
+	{
+	  if (last_logfile != NULL)
+	    {
+	      fclose (last_logfile);
+	      last_logfile = NULL;
+	    }
+	  free (last_logfilename);
+	  last_logfilename = NULL;
+	}
+      /* Open the logfile.  */
+      last_logfilename = (char *) malloc (strlen (logfilename) + 1);
+      if (last_logfilename == NULL)
+	return;
+      strcpy (last_logfilename, logfilename);
+      last_logfile = fopen (logfilename, "a");
+      if (last_logfile == NULL)
+	return;
+    }
+  logfile = last_logfile;
+
+  fprintf (logfile, "domain ");
+  print_escaped (logfile, domainname);
+  fprintf (logfile, "\nmsgid ");
+  print_escaped (logfile, msgid1);
+  if (plural)
+    {
+      fprintf (logfile, "\nmsgid_plural ");
+      print_escaped (logfile, msgid2);
+      fprintf (logfile, "\nmsgstr[0] \"\"\n");
+    }
+  else
+    fprintf (logfile, "\nmsgstr \"\"\n");
+  putc ('\n', logfile);
+}
diff --git a/e2fsprogs/intl/ngettext.c b/e2fsprogs/intl/ngettext.c
new file mode 100644
index 0000000..e73e00c
--- /dev/null
+++ b/e2fsprogs/intl/ngettext.c
@@ -0,0 +1,65 @@
+/* Implementation of ngettext(3) function.
+   Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# define __need_NULL
+# include <stddef.h>
+#else
+# include <stdlib.h>		/* Just for NULL.  */
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+#include <locale.h>
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define NGETTEXT __ngettext
+# define DCNGETTEXT __dcngettext
+#else
+# define NGETTEXT libintl_ngettext
+# define DCNGETTEXT libintl_dcngettext
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
+   text).  */
+char *
+NGETTEXT (const char *msgid1, const char *msgid2, unsigned long int n)
+{
+  return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+weak_alias (__ngettext, ngettext);
+#endif
diff --git a/e2fsprogs/intl/os2compat.c b/e2fsprogs/intl/os2compat.c
new file mode 100644
index 0000000..c8dc33e
--- /dev/null
+++ b/e2fsprogs/intl/os2compat.c
@@ -0,0 +1,98 @@
+/* OS/2 compatibility functions.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#define OS2_AWARE
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/param.h>
+
+/* A version of getenv() that works from DLLs */
+extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue);
+
+char *
+_nl_getenv (const char *name)
+{
+  unsigned char *value;
+  if (DosScanEnv (name, &value))
+    return NULL;
+  else
+    return value;
+}
+
+/* A fixed size buffer.  */
+char libintl_nl_default_dirname[MAXPATHLEN+1];
+
+char *_nlos2_libdir = NULL;
+char *_nlos2_localealiaspath = NULL;
+char *_nlos2_localedir = NULL;
+
+static __attribute__((constructor)) void
+nlos2_initialize ()
+{
+  char *root = getenv ("UNIXROOT");
+  char *gnulocaledir = getenv ("GNULOCALEDIR");
+
+  _nlos2_libdir = gnulocaledir;
+  if (!_nlos2_libdir)
+    {
+      if (root)
+        {
+          size_t sl = strlen (root);
+          _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1);
+          memcpy (_nlos2_libdir, root, sl);
+          memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1);
+        }
+      else
+        _nlos2_libdir = LIBDIR;
+    }
+
+  _nlos2_localealiaspath = gnulocaledir;
+  if (!_nlos2_localealiaspath)
+    {
+      if (root)
+        {
+          size_t sl = strlen (root);
+          _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1);
+          memcpy (_nlos2_localealiaspath, root, sl);
+          memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1);
+        }
+     else
+        _nlos2_localealiaspath = LOCALE_ALIAS_PATH;
+    }
+
+  _nlos2_localedir = gnulocaledir;
+  if (!_nlos2_localedir)
+    {
+      if (root)
+        {
+          size_t sl = strlen (root);
+          _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1);
+          memcpy (_nlos2_localedir, root, sl);
+          memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1);
+        }
+      else
+        _nlos2_localedir = LOCALEDIR;
+    }
+
+  if (strlen (_nlos2_localedir) <= MAXPATHLEN)
+    strcpy (libintl_nl_default_dirname, _nlos2_localedir);
+}
diff --git a/e2fsprogs/intl/os2compat.h b/e2fsprogs/intl/os2compat.h
new file mode 100644
index 0000000..4f74e8c
--- /dev/null
+++ b/e2fsprogs/intl/os2compat.h
@@ -0,0 +1,46 @@
+/* OS/2 compatibility defines.
+   This file is intended to be included from config.h
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+/* When included from os2compat.h we need all the original definitions */
+#ifndef OS2_AWARE
+
+#undef LIBDIR
+#define LIBDIR			_nlos2_libdir
+extern char *_nlos2_libdir;
+
+#undef LOCALEDIR
+#define LOCALEDIR		_nlos2_localedir
+extern char *_nlos2_localedir;
+
+#undef LOCALE_ALIAS_PATH
+#define LOCALE_ALIAS_PATH	_nlos2_localealiaspath
+extern char *_nlos2_localealiaspath;
+
+#endif
+
+#undef HAVE_STRCASECMP
+#define HAVE_STRCASECMP 1
+#define strcasecmp stricmp
+#define strncasecmp strnicmp
+
+/* We have our own getenv() which works even if library is compiled as DLL */
+#define getenv _nl_getenv
+
+/* Older versions of gettext used -1 as the value of LC_MESSAGES */
+#define LC_MESSAGES_COMPAT (-1)
diff --git a/e2fsprogs/intl/osdep.c b/e2fsprogs/intl/osdep.c
new file mode 100644
index 0000000..b372598
--- /dev/null
+++ b/e2fsprogs/intl/osdep.c
@@ -0,0 +1,24 @@
+/* OS dependent parts of libintl.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#if defined __EMX__
+# include "os2compat.c"
+#else
+/* Avoid AIX compiler warning.  */
+typedef int dummy;
+#endif
diff --git a/e2fsprogs/intl/plural-exp.c b/e2fsprogs/intl/plural-exp.c
new file mode 100644
index 0000000..8c04e64
--- /dev/null
+++ b/e2fsprogs/intl/plural-exp.c
@@ -0,0 +1,154 @@
+/* Expression parsing for plural form selection.
+   Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
+   Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "plural-exp.h"
+
+#if (defined __GNUC__ && !defined __APPLE_CC__) \
+    || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
+
+/* These structs are the constant expression for the germanic plural
+   form determination.  It represents the expression  "n != 1".  */
+static const struct expression plvar =
+{
+  .nargs = 0,
+  .operation = var,
+};
+static const struct expression plone =
+{
+  .nargs = 0,
+  .operation = num,
+  .val =
+  {
+    .num = 1
+  }
+};
+struct expression GERMANIC_PLURAL =
+{
+  .nargs = 2,
+  .operation = not_equal,
+  .val =
+  {
+    .args =
+    {
+      [0] = (struct expression *) &plvar,
+      [1] = (struct expression *) &plone
+    }
+  }
+};
+
+# define INIT_GERMANIC_PLURAL()
+
+#else
+
+/* For compilers without support for ISO C 99 struct/union initializers:
+   Initialization at run-time.  */
+
+static struct expression plvar;
+static struct expression plone;
+struct expression GERMANIC_PLURAL;
+
+static void
+init_germanic_plural ()
+{
+  if (plone.val.num == 0)
+    {
+      plvar.nargs = 0;
+      plvar.operation = var;
+
+      plone.nargs = 0;
+      plone.operation = num;
+      plone.val.num = 1;
+
+      GERMANIC_PLURAL.nargs = 2;
+      GERMANIC_PLURAL.operation = not_equal;
+      GERMANIC_PLURAL.val.args[0] = &plvar;
+      GERMANIC_PLURAL.val.args[1] = &plone;
+    }
+}
+
+# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
+
+#endif
+
+void
+internal_function
+EXTRACT_PLURAL_EXPRESSION (const char *nullentry, struct expression **pluralp,
+			   unsigned long int *npluralsp)
+{
+  if (nullentry != NULL)
+    {
+      const char *plural;
+      const char *nplurals;
+
+      plural = strstr (nullentry, "plural=");
+      nplurals = strstr (nullentry, "nplurals=");
+      if (plural == NULL || nplurals == NULL)
+	goto no_plural;
+      else
+	{
+	  char *endp;
+	  unsigned long int n;
+	  struct parse_args args;
+
+	  /* First get the number.  */
+	  nplurals += 9;
+	  while (*nplurals != '\0' && isspace ((unsigned char) *nplurals))
+	    ++nplurals;
+	  if (!(*nplurals >= '0' && *nplurals <= '9'))
+	    goto no_plural;
+#if defined HAVE_STRTOUL || defined _LIBC
+	  n = strtoul (nplurals, &endp, 10);
+#else
+	  for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
+	    n = n * 10 + (*endp - '0');
+#endif
+	  if (nplurals == endp)
+	    goto no_plural;
+	  *npluralsp = n;
+
+	  /* Due to the restrictions bison imposes onto the interface of the
+	     scanner function we have to put the input string and the result
+	     passed up from the parser into the same structure which address
+	     is passed down to the parser.  */
+	  plural += 7;
+	  args.cp = plural;
+	  if (PLURAL_PARSE (&args) != 0)
+	    goto no_plural;
+	  *pluralp = args.res;
+	}
+    }
+  else
+    {
+      /* By default we are using the Germanic form: singular form only
+         for `one', the plural form otherwise.  Yes, this is also what
+         English is using since English is a Germanic language.  */
+    no_plural:
+      INIT_GERMANIC_PLURAL ();
+      *pluralp = &GERMANIC_PLURAL;
+      *npluralsp = 2;
+    }
+}
diff --git a/e2fsprogs/intl/plural-exp.h b/e2fsprogs/intl/plural-exp.h
new file mode 100644
index 0000000..49e2c5b
--- /dev/null
+++ b/e2fsprogs/intl/plural-exp.h
@@ -0,0 +1,118 @@
+/* Expression parsing and evaluation for plural form selection.
+   Copyright (C) 2000-2003 Free Software Foundation, Inc.
+   Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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 _PLURAL_EXP_H
+#define _PLURAL_EXP_H
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+#ifndef attribute_hidden
+# define attribute_hidden
+#endif
+
+
+/* This is the representation of the expressions to determine the
+   plural form.  */
+struct expression
+{
+  int nargs;			/* Number of arguments.  */
+  enum operator
+  {
+    /* Without arguments:  */
+    var,			/* The variable "n".  */
+    num,			/* Decimal number.  */
+    /* Unary operators:  */
+    lnot,			/* Logical NOT.  */
+    /* Binary operators:  */
+    mult,			/* Multiplication.  */
+    divide,			/* Division.  */
+    module,			/* Modulo operation.  */
+    plus,			/* Addition.  */
+    minus,			/* Subtraction.  */
+    less_than,			/* Comparison.  */
+    greater_than,		/* Comparison.  */
+    less_or_equal,		/* Comparison.  */
+    greater_or_equal,		/* Comparison.  */
+    equal,			/* Comparison for equality.  */
+    not_equal,			/* Comparison for inequality.  */
+    land,			/* Logical AND.  */
+    lor,			/* Logical OR.  */
+    /* Ternary operators:  */
+    qmop			/* Question mark operator.  */
+  } operation;
+  union
+  {
+    unsigned long int num;	/* Number value for `num'.  */
+    struct expression *args[3];	/* Up to three arguments.  */
+  } val;
+};
+
+/* This is the data structure to pass information to the parser and get
+   the result in a thread-safe way.  */
+struct parse_args
+{
+  const char *cp;
+  struct expression *res;
+};
+
+
+/* Names for the libintl functions are a problem.  This source code is used
+   1. in the GNU C Library library,
+   2. in the GNU libintl library,
+   3. in the GNU gettext tools.
+   The function names in each situation must be different, to allow for
+   binary incompatible changes in 'struct expression'.  Furthermore,
+   1. in the GNU C Library library, the names have a __ prefix,
+   2.+3. in the GNU libintl library and in the GNU gettext tools, the names
+         must follow ANSI C and not start with __.
+   So we have to distinguish the three cases.  */
+#ifdef _LIBC
+# define FREE_EXPRESSION __gettext_free_exp
+# define PLURAL_PARSE __gettextparse
+# define GERMANIC_PLURAL __gettext_germanic_plural
+# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
+#elif defined (IN_LIBINTL)
+# define FREE_EXPRESSION libintl_gettext_free_exp
+# define PLURAL_PARSE libintl_gettextparse
+# define GERMANIC_PLURAL libintl_gettext_germanic_plural
+# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural
+#else
+# define FREE_EXPRESSION free_plural_expression
+# define PLURAL_PARSE parse_plural_expression
+# define GERMANIC_PLURAL germanic_plural
+# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression
+#endif
+
+extern void FREE_EXPRESSION (struct expression *exp)
+     internal_function;
+extern int PLURAL_PARSE (void *arg);
+extern struct expression GERMANIC_PLURAL attribute_hidden;
+extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
+				       struct expression **pluralp,
+				       unsigned long int *npluralsp)
+     internal_function;
+
+#if !defined (_LIBC) && !defined (IN_LIBINTL)
+extern unsigned long int plural_eval (struct expression *pexp,
+				      unsigned long int n);
+#endif
+
+#endif /* _PLURAL_EXP_H */
diff --git a/e2fsprogs/intl/plural.c b/e2fsprogs/intl/plural.c
new file mode 100644
index 0000000..535305b
--- /dev/null
+++ b/e2fsprogs/intl/plural.c
@@ -0,0 +1,1490 @@
+/* A Bison parser, made from plural.y
+   by GNU bison 1.35.  */
+
+#define YYBISON 1  /* Identify Bison output.  */
+
+#define yyparse __gettextparse
+#define yylex __gettextlex
+#define yyerror __gettexterror
+#define yylval __gettextlval
+#define yychar __gettextchar
+#define yydebug __gettextdebug
+#define yynerrs __gettextnerrs
+# define	EQUOP2	257
+# define	CMPOP2	258
+# define	ADDOP2	259
+# define	MULOP2	260
+# define	NUMBER	261
+
+#line 1 "plural.y"
+
+/* Expression parsing for plural form selection.
+   Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
+   Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+/* The bison generated parser uses alloca.  AIX 3 forces us to put this
+   declaration at the beginning of the file.  The declaration in bison's
+   skeleton file comes too late.  This must come before <config.h>
+   because <config.h> may include arbitrary system headers.  */
+#if defined _AIX && !defined __GNUC__
+ #pragma alloca
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include "plural-exp.h"
+
+/* The main function generated by the parser is called __gettextparse,
+   but we want it to be called PLURAL_PARSE.  */
+#ifndef _LIBC
+# define __gettextparse PLURAL_PARSE
+#endif
+
+#define YYLEX_PARAM	&((struct parse_args *) arg)->cp
+#define YYPARSE_PARAM	arg
+
+#line 49 "plural.y"
+#ifndef YYSTYPE
+typedef union {
+  unsigned long int num;
+  enum operator op;
+  struct expression *exp;
+} yystype;
+# define YYSTYPE yystype
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+#line 55 "plural.y"
+
+/* Prototypes for local functions.  */
+static int yylex (YYSTYPE *lval, const char **pexp);
+static void yyerror (const char *str);
+
+/* Allocation of expressions.  */
+
+static struct expression *
+new_exp (int nargs, enum operator op, struct expression * const *args)
+{
+  int i;
+  struct expression *newp;
+
+  /* If any of the argument could not be malloc'ed, just return NULL.  */
+  for (i = nargs - 1; i >= 0; i--)
+    if (args[i] == NULL)
+      goto fail;
+
+  /* Allocate a new expression.  */
+  newp = (struct expression *) malloc (sizeof (*newp));
+  if (newp != NULL)
+    {
+      newp->nargs = nargs;
+      newp->operation = op;
+      for (i = nargs - 1; i >= 0; i--)
+	newp->val.args[i] = args[i];
+      return newp;
+    }
+
+ fail:
+  for (i = nargs - 1; i >= 0; i--)
+    FREE_EXPRESSION (args[i]);
+
+  return NULL;
+}
+
+static inline struct expression *
+new_exp_0 (enum operator op)
+{
+  return new_exp (0, op, NULL);
+}
+
+static inline struct expression *
+new_exp_1 (enum operator op, struct expression *right)
+{
+  struct expression *args[1];
+
+  args[0] = right;
+  return new_exp (1, op, args);
+}
+
+static struct expression *
+new_exp_2 (enum operator op, struct expression *left, struct expression *right)
+{
+  struct expression *args[2];
+
+  args[0] = left;
+  args[1] = right;
+  return new_exp (2, op, args);
+}
+
+static inline struct expression *
+new_exp_3 (enum operator op, struct expression *bexp,
+	   struct expression *tbranch, struct expression *fbranch)
+{
+  struct expression *args[3];
+
+  args[0] = bexp;
+  args[1] = tbranch;
+  args[2] = fbranch;
+  return new_exp (3, op, args);
+}
+
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+
+
+#define	YYFINAL		27
+#define	YYFLAG		-32768
+#define	YYNTBASE	16
+
+/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
+#define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18)
+
+/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
+static const char yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,    10,     2,     2,     2,     2,     5,     2,
+      14,    15,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    12,     2,
+       2,     2,     2,     3,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+      13,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     4,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     6,     7,     8,
+       9,    11
+};
+
+#if YYDEBUG
+static const short yyprhs[] =
+{
+       0,     0,     2,     8,    12,    16,    20,    24,    28,    32,
+      35,    37,    39
+};
+static const short yyrhs[] =
+{
+      17,     0,    17,     3,    17,    12,    17,     0,    17,     4,
+      17,     0,    17,     5,    17,     0,    17,     6,    17,     0,
+      17,     7,    17,     0,    17,     8,    17,     0,    17,     9,
+      17,     0,    10,    17,     0,    13,     0,    11,     0,    14,
+      17,    15,     0
+};
+
+#endif
+
+#if YYDEBUG
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const short yyrline[] =
+{
+       0,   150,   158,   162,   166,   170,   174,   178,   182,   186,
+     190,   194,   199
+};
+#endif
+
+
+#if (YYDEBUG) || defined YYERROR_VERBOSE
+
+/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
+static const char *const yytname[] =
+{
+  "$", "error", "$undefined.", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2",
+  "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'",
+  "start", "exp", 0
+};
+#endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const short yyr1[] =
+{
+       0,    16,    17,    17,    17,    17,    17,    17,    17,    17,
+      17,    17,    17
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const short yyr2[] =
+{
+       0,     1,     5,     3,     3,     3,     3,     3,     3,     2,
+       1,     1,     3
+};
+
+/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
+   doesn't specify something else to do.  Zero means the default is an
+   error. */
+static const short yydefact[] =
+{
+       0,     0,    11,    10,     0,     1,     9,     0,     0,     0,
+       0,     0,     0,     0,     0,    12,     0,     3,     4,     5,
+       6,     7,     8,     0,     2,     0,     0,     0
+};
+
+static const short yydefgoto[] =
+{
+      25,     5
+};
+
+static const short yypact[] =
+{
+      -9,    -9,-32768,-32768,    -9,    34,-32768,    11,    -9,    -9,
+      -9,    -9,    -9,    -9,    -9,-32768,    24,    39,    43,    16,
+      26,    -3,-32768,    -9,    34,    21,    53,-32768
+};
+
+static const short yypgoto[] =
+{
+  -32768,    -1
+};
+
+
+#define	YYLAST		53
+
+
+static const short yytable[] =
+{
+       6,     1,     2,     7,     3,     4,    14,    16,    17,    18,
+      19,    20,    21,    22,     8,     9,    10,    11,    12,    13,
+      14,    26,    24,    12,    13,    14,    15,     8,     9,    10,
+      11,    12,    13,    14,    13,    14,    23,     8,     9,    10,
+      11,    12,    13,    14,    10,    11,    12,    13,    14,    11,
+      12,    13,    14,    27
+};
+
+static const short yycheck[] =
+{
+       1,    10,    11,     4,    13,    14,     9,     8,     9,    10,
+      11,    12,    13,    14,     3,     4,     5,     6,     7,     8,
+       9,     0,    23,     7,     8,     9,    15,     3,     4,     5,
+       6,     7,     8,     9,     8,     9,    12,     3,     4,     5,
+       6,     7,     8,     9,     5,     6,     7,     8,     9,     6,
+       7,     8,     9,     0
+};
+#define YYPURE 1
+
+/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
+#line 3 "/usr/local/share/bison/bison.simple"
+
+/* Skeleton output parser for bison,
+
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
+   Foundation, 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; either version 2, 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.  */
+
+/* As a special exception, when this file is copied by Bison into a
+   Bison output file, you may use that output file without restriction.
+   This special exception was added by the Free Software Foundation
+   in version 1.24 of Bison.  */
+
+/* This is the parser code that is written into each bison parser when
+   the %semantic_parser declaration is not specified in the grammar.
+   It was written by Richard Stallman by simplifying the hairy parser
+   used when %semantic_parser is specified.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# if YYSTACK_USE_ALLOCA
+#  define YYSTACK_ALLOC alloca
+# else
+#  ifndef YYSTACK_USE_ALLOCA
+#   if defined (alloca) || defined (_ALLOCA_H)
+#    define YYSTACK_ALLOC alloca
+#   else
+#    ifdef __GNUC__
+#     define YYSTACK_ALLOC __builtin_alloca
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning. */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# else
+#  if defined (__STDC__) || defined (__cplusplus)
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   define YYSIZE_T size_t
+#  endif
+#  define YYSTACK_ALLOC malloc
+#  define YYSTACK_FREE free
+# endif
+#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
+
+
+#if (! defined (yyoverflow) \
+     && (! defined (__cplusplus) \
+	 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  short yyss;
+  YYSTYPE yyvs;
+# if YYLSP_NEEDED
+  YYLTYPE yyls;
+# endif
+};
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# if YYLSP_NEEDED
+#  define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))	\
+      + 2 * YYSTACK_GAP_MAX)
+# else
+#  define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
+      + YYSTACK_GAP_MAX)
+# endif
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  register YYSIZE_T yyi;		\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (0)
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack)					\
+    do									\
+      {									\
+	YYSIZE_T yynewbytes;						\
+	YYCOPY (&yyptr->Stack, Stack, yysize);				\
+	Stack = &yyptr->Stack;						\
+	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;	\
+	yyptr += yynewbytes / sizeof (*yyptr);				\
+      }									\
+    while (0)
+
+#endif
+
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# if defined (__STDC__) || defined (__cplusplus)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# endif
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		-2
+#define YYEOF		0
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT 	goto yyabortlab
+#define YYERROR		goto yyerrlab1
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+#define YYFAIL		goto yyerrlab
+#define YYRECOVERING()  (!!yyerrstatus)
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    {								\
+      yychar = (Token);						\
+      yylval = (Value);						\
+      yychar1 = YYTRANSLATE (yychar);				\
+      YYPOPSTACK;						\
+      goto yybackup;						\
+    }								\
+  else								\
+    { 								\
+      yyerror ("syntax error: cannot back up");			\
+      YYERROR;							\
+    }								\
+while (0)
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+
+/* YYLLOC_DEFAULT -- Compute the default location (before the actions
+   are run).
+
+   When YYLLOC_DEFAULT is run, CURRENT is set the location of the
+   first token.  By default, to implement support for ranges, extend
+   its range to the last symbol.  */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)       	\
+   Current.last_line   = Rhs[N].last_line;	\
+   Current.last_column = Rhs[N].last_column;
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#if YYPURE
+# if YYLSP_NEEDED
+#  ifdef YYLEX_PARAM
+#   define YYLEX		yylex (&yylval, &yylloc, YYLEX_PARAM)
+#  else
+#   define YYLEX		yylex (&yylval, &yylloc)
+#  endif
+# else /* !YYLSP_NEEDED */
+#  ifdef YYLEX_PARAM
+#   define YYLEX		yylex (&yylval, YYLEX_PARAM)
+#  else
+#   define YYLEX		yylex (&yylval)
+#  endif
+# endif /* !YYLSP_NEEDED */
+#else /* !YYPURE */
+# define YYLEX			yylex ()
+#endif /* !YYPURE */
+
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yydebug)					\
+    YYFPRINTF Args;				\
+} while (0)
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+#endif /* !YYDEBUG */
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#if YYMAXDEPTH == 0
+# undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+#ifdef YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined (__GLIBC__) && defined (_STRING_H)
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+static YYSIZE_T
+#   if defined (__STDC__) || defined (__cplusplus)
+yystrlen (const char *yystr)
+#   else
+yystrlen (yystr)
+     const char *yystr;
+#   endif
+{
+  register const char *yys = yystr;
+
+  while (*yys++ != '\0')
+    continue;
+
+  return yys - yystr - 1;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+static char *
+#   if defined (__STDC__) || defined (__cplusplus)
+yystpcpy (char *yydest, const char *yysrc)
+#   else
+yystpcpy (yydest, yysrc)
+     char *yydest;
+     const char *yysrc;
+#   endif
+{
+  register char *yyd = yydest;
+  register const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+#endif
+
+#line 315 "/usr/local/share/bison/bison.simple"
+
+
+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
+   into yyparse.  The argument should have type void *.
+   It should actually point to an object.
+   Grammar actions can access the variable by casting it
+   to the proper pointer type.  */
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+#  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
+#  define YYPARSE_PARAM_DECL
+# else
+#  define YYPARSE_PARAM_ARG YYPARSE_PARAM
+#  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+# endif
+#else /* !YYPARSE_PARAM */
+# define YYPARSE_PARAM_ARG
+# define YYPARSE_PARAM_DECL
+#endif /* !YYPARSE_PARAM */
+
+/* Prevent warning if -Wstrict-prototypes.  */
+#ifdef __GNUC__
+# ifdef YYPARSE_PARAM
+int yyparse (void *);
+# else
+int yyparse (void);
+# endif
+#endif
+
+/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
+   variables are global, or local to YYPARSE.  */
+
+#define YY_DECL_NON_LSP_VARIABLES			\
+/* The lookahead symbol.  */				\
+int yychar;						\
+							\
+/* The semantic value of the lookahead symbol. */	\
+YYSTYPE yylval;						\
+							\
+/* Number of parse errors so far.  */			\
+int yynerrs;
+
+#if YYLSP_NEEDED
+# define YY_DECL_VARIABLES			\
+YY_DECL_NON_LSP_VARIABLES			\
+						\
+/* Location data for the lookahead symbol.  */	\
+YYLTYPE yylloc;
+#else
+# define YY_DECL_VARIABLES			\
+YY_DECL_NON_LSP_VARIABLES
+#endif
+
+
+/* If nonreentrant, generate the variables here. */
+
+#if !YYPURE
+YY_DECL_VARIABLES
+#endif  /* !YYPURE */
+
+int
+yyparse (YYPARSE_PARAM_ARG)
+     YYPARSE_PARAM_DECL
+{
+  /* If reentrant, generate the variables here. */
+#if YYPURE
+  YY_DECL_VARIABLES
+#endif  /* !YYPURE */
+
+  register int yystate;
+  register int yyn;
+  int yyresult;
+  /* Number of tokens to shift before error messages enabled.  */
+  int yyerrstatus;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yychar1 = 0;
+
+  /* Three stacks and their tools:
+     `yyss': related to states,
+     `yyvs': related to semantic values,
+     `yyls': related to locations.
+
+     Refer to the stacks thru separate pointers, to allow yyoverflow
+     to reallocate them elsewhere.  */
+
+  /* The state stack. */
+  short	yyssa[YYINITDEPTH];
+  short *yyss = yyssa;
+  register short *yyssp;
+
+  /* The semantic value stack.  */
+  YYSTYPE yyvsa[YYINITDEPTH];
+  YYSTYPE *yyvs = yyvsa;
+  register YYSTYPE *yyvsp;
+
+#if YYLSP_NEEDED
+  /* The location stack.  */
+  YYLTYPE yylsa[YYINITDEPTH];
+  YYLTYPE *yyls = yylsa;
+  YYLTYPE *yylsp;
+#endif
+
+#if YYLSP_NEEDED
+# define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
+#else
+# define YYPOPSTACK   (yyvsp--, yyssp--)
+#endif
+
+  YYSIZE_T yystacksize = YYINITDEPTH;
+
+
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+#if YYLSP_NEEDED
+  YYLTYPE yyloc;
+#endif
+
+  /* When reducing, the number of symbols on the RHS of the reduced
+     rule. */
+  int yylen;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY;		/* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  yyssp = yyss;
+  yyvsp = yyvs;
+#if YYLSP_NEEDED
+  yylsp = yyls;
+#endif
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed. so pushing a state here evens the stacks.
+     */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyssp >= yyss + yystacksize - 1)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+	/* Give user a chance to reallocate the stack. Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *yyvs1 = yyvs;
+	short *yyss1 = yyss;
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  */
+# if YYLSP_NEEDED
+	YYLTYPE *yyls1 = yyls;
+	/* This used to be a conditional around just the two extra args,
+	   but that might be undefined if yyoverflow is a macro.  */
+	yyoverflow ("parser stack overflow",
+		    &yyss1, yysize * sizeof (*yyssp),
+		    &yyvs1, yysize * sizeof (*yyvsp),
+		    &yyls1, yysize * sizeof (*yylsp),
+		    &yystacksize);
+	yyls = yyls1;
+# else
+	yyoverflow ("parser stack overflow",
+		    &yyss1, yysize * sizeof (*yyssp),
+		    &yyvs1, yysize * sizeof (*yyvsp),
+		    &yystacksize);
+# endif
+	yyss = yyss1;
+	yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyoverflowlab;
+# else
+      /* Extend the stack our own way.  */
+      if (yystacksize >= YYMAXDEPTH)
+	goto yyoverflowlab;
+      yystacksize *= 2;
+      if (yystacksize > YYMAXDEPTH)
+	yystacksize = YYMAXDEPTH;
+
+      {
+	short *yyss1 = yyss;
+	union yyalloc *yyptr =
+	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+	if (! yyptr)
+	  goto yyoverflowlab;
+	YYSTACK_RELOCATE (yyss);
+	YYSTACK_RELOCATE (yyvs);
+# if YYLSP_NEEDED
+	YYSTACK_RELOCATE (yyls);
+# endif
+# undef YYSTACK_RELOCATE
+	if (yyss1 != yyssa)
+	  YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+#if YYLSP_NEEDED
+      yylsp = yyls + yysize - 1;
+#endif
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) yystacksize));
+
+      if (yyssp >= yyss + yystacksize - 1)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  goto yybackup;
+
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+/* Do appropriate processing given the current state.  */
+/* Read a lookahead token if we need one and don't already have one.  */
+/* yyresume: */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* yychar is either YYEMPTY or YYEOF
+     or a valid token in external form.  */
+
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = YYLEX;
+    }
+
+  /* Convert token to internal form (in yychar1) for indexing tables with */
+
+  if (yychar <= 0)		/* This means end of input. */
+    {
+      yychar1 = 0;
+      yychar = YYEOF;		/* Don't call YYLEX any more */
+
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yychar1 = YYTRANSLATE (yychar);
+
+#if YYDEBUG
+     /* We have to keep this `#if YYDEBUG', since we use variables
+	which are defined only if `YYDEBUG' is set.  */
+      if (yydebug)
+	{
+	  YYFPRINTF (stderr, "Next token is %d (%s",
+		     yychar, yytname[yychar1]);
+	  /* Give the individual parser a way to print the precise
+	     meaning of a token, for further debugging info.  */
+# ifdef YYPRINT
+	  YYPRINT (stderr, yychar, yylval);
+# endif
+	  YYFPRINTF (stderr, ")\n");
+	}
+#endif
+    }
+
+  yyn += yychar1;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+    goto yydefault;
+
+  yyn = yytable[yyn];
+
+  /* yyn is what to do for this token type in this state.
+     Negative => reduce, -yyn is rule number.
+     Positive => shift, yyn is new state.
+       New state is final state => don't bother to shift,
+       just return success.
+     0, or most negative number => error.  */
+
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrlab;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  /* Shift the lookahead token.  */
+  YYDPRINTF ((stderr, "Shifting token %d (%s), ",
+	      yychar, yytname[yychar1]));
+
+  /* Discard the token being shifted unless it is eof.  */
+  if (yychar != YYEOF)
+    yychar = YYEMPTY;
+
+  *++yyvsp = yylval;
+#if YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to the semantic value of
+     the lookahead token.  This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+#if YYLSP_NEEDED
+  /* Similarly for the default location.  Let the user run additional
+     commands if for instance locations are ranges.  */
+  yyloc = yylsp[1-yylen];
+  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
+#endif
+
+#if YYDEBUG
+  /* We have to keep this `#if YYDEBUG', since we use variables which
+     are defined only if `YYDEBUG' is set.  */
+  if (yydebug)
+    {
+      int yyi;
+
+      YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
+		 yyn, yyrline[yyn]);
+
+      /* Print the symbols being reduced, and their result.  */
+      for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
+	YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
+      YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+    }
+#endif
+
+  switch (yyn) {
+
+case 1:
+#line 151 "plural.y"
+{
+	    if (yyvsp[0].exp == NULL)
+	      YYABORT;
+	    ((struct parse_args *) arg)->res = yyvsp[0].exp;
+	  }
+    break;
+case 2:
+#line 159 "plural.y"
+{
+	    yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
+	  }
+    break;
+case 3:
+#line 163 "plural.y"
+{
+	    yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
+	  }
+    break;
+case 4:
+#line 167 "plural.y"
+{
+	    yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
+	  }
+    break;
+case 5:
+#line 171 "plural.y"
+{
+	    yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+	  }
+    break;
+case 6:
+#line 175 "plural.y"
+{
+	    yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+	  }
+    break;
+case 7:
+#line 179 "plural.y"
+{
+	    yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+	  }
+    break;
+case 8:
+#line 183 "plural.y"
+{
+	    yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+	  }
+    break;
+case 9:
+#line 187 "plural.y"
+{
+	    yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
+	  }
+    break;
+case 10:
+#line 191 "plural.y"
+{
+	    yyval.exp = new_exp_0 (var);
+	  }
+    break;
+case 11:
+#line 195 "plural.y"
+{
+	    if ((yyval.exp = new_exp_0 (num)) != NULL)
+	      yyval.exp->val.num = yyvsp[0].num;
+	  }
+    break;
+case 12:
+#line 200 "plural.y"
+{
+	    yyval.exp = yyvsp[-1].exp;
+	  }
+    break;
+}
+
+#line 705 "/usr/local/share/bison/bison.simple"
+
+
+  yyvsp -= yylen;
+  yyssp -= yylen;
+#if YYLSP_NEEDED
+  yylsp -= yylen;
+#endif
+
+#if YYDEBUG
+  if (yydebug)
+    {
+      short *yyssp1 = yyss - 1;
+      YYFPRINTF (stderr, "state stack now");
+      while (yyssp1 != yyssp)
+	YYFPRINTF (stderr, " %d", *++yyssp1);
+      YYFPRINTF (stderr, "\n");
+    }
+#endif
+
+  *++yyvsp = yyval;
+#if YYLSP_NEEDED
+  *++yylsp = yyloc;
+#endif
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTBASE];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+
+#ifdef YYERROR_VERBOSE
+      yyn = yypact[yystate];
+
+      if (yyn > YYFLAG && yyn < YYLAST)
+	{
+	  YYSIZE_T yysize = 0;
+	  char *yymsg;
+	  int yyx, yycount;
+
+	  yycount = 0;
+	  /* Start YYX at -YYN if negative to avoid negative indexes in
+	     YYCHECK.  */
+	  for (yyx = yyn < 0 ? -yyn : 0;
+	       yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
+	    if (yycheck[yyx + yyn] == yyx)
+	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
+	  yysize += yystrlen ("parse error, unexpected ") + 1;
+	  yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
+	  yymsg = (char *) YYSTACK_ALLOC (yysize);
+	  if (yymsg != 0)
+	    {
+	      char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
+	      yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
+
+	      if (yycount < 5)
+		{
+		  yycount = 0;
+		  for (yyx = yyn < 0 ? -yyn : 0;
+		       yyx < (int) (sizeof (yytname) / sizeof (char *));
+		       yyx++)
+		    if (yycheck[yyx + yyn] == yyx)
+		      {
+			const char *yyq = ! yycount ? ", expecting " : " or ";
+			yyp = yystpcpy (yyp, yyq);
+			yyp = yystpcpy (yyp, yytname[yyx]);
+			yycount++;
+		      }
+		}
+	      yyerror (yymsg);
+	      YYSTACK_FREE (yymsg);
+	    }
+	  else
+	    yyerror ("parse error; also virtual memory exhausted");
+	}
+      else
+#endif /* defined (YYERROR_VERBOSE) */
+	yyerror ("parse error");
+    }
+  goto yyerrlab1;
+
+
+/*--------------------------------------------------.
+| yyerrlab1 -- error raised explicitly by an action |
+`--------------------------------------------------*/
+yyerrlab1:
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse lookahead token after an
+	 error, discard it.  */
+
+      /* return failure if at end of input */
+      if (yychar == YYEOF)
+	YYABORT;
+      YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
+		  yychar, yytname[yychar1]));
+      yychar = YYEMPTY;
+    }
+
+  /* Else will try to reuse lookahead token after shifting the error
+     token.  */
+
+  yyerrstatus = 3;		/* Each real token shifted decrements this */
+
+  goto yyerrhandle;
+
+
+/*-------------------------------------------------------------------.
+| yyerrdefault -- current state does not do anything special for the |
+| error token.                                                       |
+`-------------------------------------------------------------------*/
+yyerrdefault:
+#if 0
+  /* This is wrong; only states that explicitly want error tokens
+     should shift them.  */
+
+  /* If its default is to accept any token, ok.  Otherwise pop it.  */
+  yyn = yydefact[yystate];
+  if (yyn)
+    goto yydefault;
+#endif
+
+
+/*---------------------------------------------------------------.
+| yyerrpop -- pop the current state because it cannot handle the |
+| error token                                                    |
+`---------------------------------------------------------------*/
+yyerrpop:
+  if (yyssp == yyss)
+    YYABORT;
+  yyvsp--;
+  yystate = *--yyssp;
+#if YYLSP_NEEDED
+  yylsp--;
+#endif
+
+#if YYDEBUG
+  if (yydebug)
+    {
+      short *yyssp1 = yyss - 1;
+      YYFPRINTF (stderr, "Error: state stack now");
+      while (yyssp1 != yyssp)
+	YYFPRINTF (stderr, " %d", *++yyssp1);
+      YYFPRINTF (stderr, "\n");
+    }
+#endif
+
+/*--------------.
+| yyerrhandle.  |
+`--------------*/
+yyerrhandle:
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yyerrdefault;
+
+  yyn += YYTERROR;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+    goto yyerrdefault;
+
+  yyn = yytable[yyn];
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+	goto yyerrpop;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrpop;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  YYDPRINTF ((stderr, "Shifting error token, "));
+
+  *++yyvsp = yylval;
+#if YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+/*---------------------------------------------.
+| yyoverflowab -- parser overflow comes here.  |
+`---------------------------------------------*/
+yyoverflowlab:
+  yyerror ("parser stack overflow");
+  yyresult = 2;
+  /* Fall through.  */
+
+yyreturn:
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+  return yyresult;
+}
+#line 205 "plural.y"
+
+
+void
+internal_function
+FREE_EXPRESSION (struct expression *exp)
+{
+  if (exp == NULL)
+    return;
+
+  /* Handle the recursive case.  */
+  switch (exp->nargs)
+    {
+    case 3:
+      FREE_EXPRESSION (exp->val.args[2]);
+      /* FALLTHROUGH */
+    case 2:
+      FREE_EXPRESSION (exp->val.args[1]);
+      /* FALLTHROUGH */
+    case 1:
+      FREE_EXPRESSION (exp->val.args[0]);
+      /* FALLTHROUGH */
+    default:
+      break;
+    }
+
+  free (exp);
+}
+
+
+static int
+yylex (YYSTYPE *lval, const char **pexp)
+{
+  const char *exp = *pexp;
+  int result;
+
+  while (1)
+    {
+      if (exp[0] == '\0')
+	{
+	  *pexp = exp;
+	  return YYEOF;
+	}
+
+      if (exp[0] != ' ' && exp[0] != '\t')
+	break;
+
+      ++exp;
+    }
+
+  result = *exp++;
+  switch (result)
+    {
+    case '0': case '1': case '2': case '3': case '4':
+    case '5': case '6': case '7': case '8': case '9':
+      {
+	unsigned long int n = result - '0';
+	while (exp[0] >= '0' && exp[0] <= '9')
+	  {
+	    n *= 10;
+	    n += exp[0] - '0';
+	    ++exp;
+	  }
+	lval->num = n;
+	result = NUMBER;
+      }
+      break;
+
+    case '=':
+      if (exp[0] == '=')
+	{
+	  ++exp;
+	  lval->op = equal;
+	  result = EQUOP2;
+	}
+      else
+	result = YYERRCODE;
+      break;
+
+    case '!':
+      if (exp[0] == '=')
+	{
+	  ++exp;
+	  lval->op = not_equal;
+	  result = EQUOP2;
+	}
+      break;
+
+    case '&':
+    case '|':
+      if (exp[0] == result)
+	++exp;
+      else
+	result = YYERRCODE;
+      break;
+
+    case '<':
+      if (exp[0] == '=')
+	{
+	  ++exp;
+	  lval->op = less_or_equal;
+	}
+      else
+	lval->op = less_than;
+      result = CMPOP2;
+      break;
+
+    case '>':
+      if (exp[0] == '=')
+	{
+	  ++exp;
+	  lval->op = greater_or_equal;
+	}
+      else
+	lval->op = greater_than;
+      result = CMPOP2;
+      break;
+
+    case '*':
+      lval->op = mult;
+      result = MULOP2;
+      break;
+
+    case '/':
+      lval->op = divide;
+      result = MULOP2;
+      break;
+
+    case '%':
+      lval->op = module;
+      result = MULOP2;
+      break;
+
+    case '+':
+      lval->op = plus;
+      result = ADDOP2;
+      break;
+
+    case '-':
+      lval->op = minus;
+      result = ADDOP2;
+      break;
+
+    case 'n':
+    case '?':
+    case ':':
+    case '(':
+    case ')':
+      /* Nothing, just return the character.  */
+      break;
+
+    case ';':
+    case '\n':
+    case '\0':
+      /* Be safe and let the user call this function again.  */
+      --exp;
+      result = YYEOF;
+      break;
+
+    default:
+      result = YYERRCODE;
+#if YYDEBUG != 0
+      --exp;
+#endif
+      break;
+    }
+
+  *pexp = exp;
+
+  return result;
+}
+
+
+static void
+yyerror (const char *str)
+{
+  /* Do nothing.  We don't print error messages here.  */
+}
diff --git a/e2fsprogs/intl/plural.y b/e2fsprogs/intl/plural.y
new file mode 100644
index 0000000..4d33bd7
--- /dev/null
+++ b/e2fsprogs/intl/plural.y
@@ -0,0 +1,381 @@
+%{
+/* Expression parsing for plural form selection.
+   Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
+   Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+/* The bison generated parser uses alloca.  AIX 3 forces us to put this
+   declaration at the beginning of the file.  The declaration in bison's
+   skeleton file comes too late.  This must come before <config.h>
+   because <config.h> may include arbitrary system headers.  */
+#if defined _AIX && !defined __GNUC__
+ #pragma alloca
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include "plural-exp.h"
+
+/* The main function generated by the parser is called __gettextparse,
+   but we want it to be called PLURAL_PARSE.  */
+#ifndef _LIBC
+# define __gettextparse PLURAL_PARSE
+#endif
+
+#define YYLEX_PARAM	&((struct parse_args *) arg)->cp
+#define YYPARSE_PARAM	arg
+%}
+%pure_parser
+%expect 7
+
+%union {
+  unsigned long int num;
+  enum operator op;
+  struct expression *exp;
+}
+
+%{
+/* Prototypes for local functions.  */
+static int yylex (YYSTYPE *lval, const char **pexp);
+static void yyerror (const char *str);
+
+/* Allocation of expressions.  */
+
+static struct expression *
+new_exp (int nargs, enum operator op, struct expression * const *args)
+{
+  int i;
+  struct expression *newp;
+
+  /* If any of the argument could not be malloc'ed, just return NULL.  */
+  for (i = nargs - 1; i >= 0; i--)
+    if (args[i] == NULL)
+      goto fail;
+
+  /* Allocate a new expression.  */
+  newp = (struct expression *) malloc (sizeof (*newp));
+  if (newp != NULL)
+    {
+      newp->nargs = nargs;
+      newp->operation = op;
+      for (i = nargs - 1; i >= 0; i--)
+	newp->val.args[i] = args[i];
+      return newp;
+    }
+
+ fail:
+  for (i = nargs - 1; i >= 0; i--)
+    FREE_EXPRESSION (args[i]);
+
+  return NULL;
+}
+
+static inline struct expression *
+new_exp_0 (enum operator op)
+{
+  return new_exp (0, op, NULL);
+}
+
+static inline struct expression *
+new_exp_1 (enum operator op, struct expression *right)
+{
+  struct expression *args[1];
+
+  args[0] = right;
+  return new_exp (1, op, args);
+}
+
+static struct expression *
+new_exp_2 (enum operator op, struct expression *left, struct expression *right)
+{
+  struct expression *args[2];
+
+  args[0] = left;
+  args[1] = right;
+  return new_exp (2, op, args);
+}
+
+static inline struct expression *
+new_exp_3 (enum operator op, struct expression *bexp,
+	   struct expression *tbranch, struct expression *fbranch)
+{
+  struct expression *args[3];
+
+  args[0] = bexp;
+  args[1] = tbranch;
+  args[2] = fbranch;
+  return new_exp (3, op, args);
+}
+
+%}
+
+/* This declares that all operators have the same associativity and the
+   precedence order as in C.  See [Harbison, Steele: C, A Reference Manual].
+   There is no unary minus and no bitwise operators.
+   Operators with the same syntactic behaviour have been merged into a single
+   token, to save space in the array generated by bison.  */
+%right '?'		/*   ?		*/
+%left '|'		/*   ||		*/
+%left '&'		/*   &&		*/
+%left EQUOP2		/*   == !=	*/
+%left CMPOP2		/*   < > <= >=	*/
+%left ADDOP2		/*   + -	*/
+%left MULOP2		/*   * / %	*/
+%right '!'		/*   !		*/
+
+%token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
+%token <num> NUMBER
+%type <exp> exp
+
+%%
+
+start:	  exp
+	  {
+	    if ($1 == NULL)
+	      YYABORT;
+	    ((struct parse_args *) arg)->res = $1;
+	  }
+	;
+
+exp:	  exp '?' exp ':' exp
+	  {
+	    $$ = new_exp_3 (qmop, $1, $3, $5);
+	  }
+	| exp '|' exp
+	  {
+	    $$ = new_exp_2 (lor, $1, $3);
+	  }
+	| exp '&' exp
+	  {
+	    $$ = new_exp_2 (land, $1, $3);
+	  }
+	| exp EQUOP2 exp
+	  {
+	    $$ = new_exp_2 ($2, $1, $3);
+	  }
+	| exp CMPOP2 exp
+	  {
+	    $$ = new_exp_2 ($2, $1, $3);
+	  }
+	| exp ADDOP2 exp
+	  {
+	    $$ = new_exp_2 ($2, $1, $3);
+	  }
+	| exp MULOP2 exp
+	  {
+	    $$ = new_exp_2 ($2, $1, $3);
+	  }
+	| '!' exp
+	  {
+	    $$ = new_exp_1 (lnot, $2);
+	  }
+	| 'n'
+	  {
+	    $$ = new_exp_0 (var);
+	  }
+	| NUMBER
+	  {
+	    if (($$ = new_exp_0 (num)) != NULL)
+	      $$->val.num = $1;
+	  }
+	| '(' exp ')'
+	  {
+	    $$ = $2;
+	  }
+	;
+
+%%
+
+void
+internal_function
+FREE_EXPRESSION (struct expression *exp)
+{
+  if (exp == NULL)
+    return;
+
+  /* Handle the recursive case.  */
+  switch (exp->nargs)
+    {
+    case 3:
+      FREE_EXPRESSION (exp->val.args[2]);
+      /* FALLTHROUGH */
+    case 2:
+      FREE_EXPRESSION (exp->val.args[1]);
+      /* FALLTHROUGH */
+    case 1:
+      FREE_EXPRESSION (exp->val.args[0]);
+      /* FALLTHROUGH */
+    default:
+      break;
+    }
+
+  free (exp);
+}
+
+
+static int
+yylex (YYSTYPE *lval, const char **pexp)
+{
+  const char *exp = *pexp;
+  int result;
+
+  while (1)
+    {
+      if (exp[0] == '\0')
+	{
+	  *pexp = exp;
+	  return YYEOF;
+	}
+
+      if (exp[0] != ' ' && exp[0] != '\t')
+	break;
+
+      ++exp;
+    }
+
+  result = *exp++;
+  switch (result)
+    {
+    case '0': case '1': case '2': case '3': case '4':
+    case '5': case '6': case '7': case '8': case '9':
+      {
+	unsigned long int n = result - '0';
+	while (exp[0] >= '0' && exp[0] <= '9')
+	  {
+	    n *= 10;
+	    n += exp[0] - '0';
+	    ++exp;
+	  }
+	lval->num = n;
+	result = NUMBER;
+      }
+      break;
+
+    case '=':
+      if (exp[0] == '=')
+	{
+	  ++exp;
+	  lval->op = equal;
+	  result = EQUOP2;
+	}
+      else
+	result = YYERRCODE;
+      break;
+
+    case '!':
+      if (exp[0] == '=')
+	{
+	  ++exp;
+	  lval->op = not_equal;
+	  result = EQUOP2;
+	}
+      break;
+
+    case '&':
+    case '|':
+      if (exp[0] == result)
+	++exp;
+      else
+	result = YYERRCODE;
+      break;
+
+    case '<':
+      if (exp[0] == '=')
+	{
+	  ++exp;
+	  lval->op = less_or_equal;
+	}
+      else
+	lval->op = less_than;
+      result = CMPOP2;
+      break;
+
+    case '>':
+      if (exp[0] == '=')
+	{
+	  ++exp;
+	  lval->op = greater_or_equal;
+	}
+      else
+	lval->op = greater_than;
+      result = CMPOP2;
+      break;
+
+    case '*':
+      lval->op = mult;
+      result = MULOP2;
+      break;
+
+    case '/':
+      lval->op = divide;
+      result = MULOP2;
+      break;
+
+    case '%':
+      lval->op = module;
+      result = MULOP2;
+      break;
+
+    case '+':
+      lval->op = plus;
+      result = ADDOP2;
+      break;
+
+    case '-':
+      lval->op = minus;
+      result = ADDOP2;
+      break;
+
+    case 'n':
+    case '?':
+    case ':':
+    case '(':
+    case ')':
+      /* Nothing, just return the character.  */
+      break;
+
+    case ';':
+    case '\n':
+    case '\0':
+      /* Be safe and let the user call this function again.  */
+      --exp;
+      result = YYEOF;
+      break;
+
+    default:
+      result = YYERRCODE;
+#if YYDEBUG != 0
+      --exp;
+#endif
+      break;
+    }
+
+  *pexp = exp;
+
+  return result;
+}
+
+
+static void
+yyerror (const char *str)
+{
+  /* Do nothing.  We don't print error messages here.  */
+}
diff --git a/e2fsprogs/intl/printf-args.c b/e2fsprogs/intl/printf-args.c
new file mode 100644
index 0000000..f6f3219
--- /dev/null
+++ b/e2fsprogs/intl/printf-args.c
@@ -0,0 +1,119 @@
+/* Decomposed printf argument list.
+   Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Specification.  */
+#include "printf-args.h"
+
+#ifdef STATIC
+STATIC
+#endif
+int
+printf_fetchargs (va_list args, arguments *a)
+{
+  size_t i;
+  argument *ap;
+
+  for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)
+    switch (ap->type)
+      {
+      case TYPE_SCHAR:
+	ap->a.a_schar = va_arg (args, /*signed char*/ int);
+	break;
+      case TYPE_UCHAR:
+	ap->a.a_uchar = va_arg (args, /*unsigned char*/ int);
+	break;
+      case TYPE_SHORT:
+	ap->a.a_short = va_arg (args, /*short*/ int);
+	break;
+      case TYPE_USHORT:
+	ap->a.a_ushort = va_arg (args, /*unsigned short*/ int);
+	break;
+      case TYPE_INT:
+	ap->a.a_int = va_arg (args, int);
+	break;
+      case TYPE_UINT:
+	ap->a.a_uint = va_arg (args, unsigned int);
+	break;
+      case TYPE_LONGINT:
+	ap->a.a_longint = va_arg (args, long int);
+	break;
+      case TYPE_ULONGINT:
+	ap->a.a_ulongint = va_arg (args, unsigned long int);
+	break;
+#ifdef HAVE_LONG_LONG
+      case TYPE_LONGLONGINT:
+	ap->a.a_longlongint = va_arg (args, long long int);
+	break;
+      case TYPE_ULONGLONGINT:
+	ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
+	break;
+#endif
+      case TYPE_DOUBLE:
+	ap->a.a_double = va_arg (args, double);
+	break;
+#ifdef HAVE_LONG_DOUBLE
+      case TYPE_LONGDOUBLE:
+	ap->a.a_longdouble = va_arg (args, long double);
+	break;
+#endif
+      case TYPE_CHAR:
+	ap->a.a_char = va_arg (args, int);
+	break;
+#ifdef HAVE_WINT_T
+      case TYPE_WIDE_CHAR:
+	ap->a.a_wide_char = va_arg (args, wint_t);
+	break;
+#endif
+      case TYPE_STRING:
+	ap->a.a_string = va_arg (args, const char *);
+	break;
+#ifdef HAVE_WCHAR_T
+      case TYPE_WIDE_STRING:
+	ap->a.a_wide_string = va_arg (args, const wchar_t *);
+	break;
+#endif
+      case TYPE_POINTER:
+	ap->a.a_pointer = va_arg (args, void *);
+	break;
+      case TYPE_COUNT_SCHAR_POINTER:
+	ap->a.a_count_schar_pointer = va_arg (args, signed char *);
+	break;
+      case TYPE_COUNT_SHORT_POINTER:
+	ap->a.a_count_short_pointer = va_arg (args, short *);
+	break;
+      case TYPE_COUNT_INT_POINTER:
+	ap->a.a_count_int_pointer = va_arg (args, int *);
+	break;
+      case TYPE_COUNT_LONGINT_POINTER:
+	ap->a.a_count_longint_pointer = va_arg (args, long int *);
+	break;
+#ifdef HAVE_LONG_LONG
+      case TYPE_COUNT_LONGLONGINT_POINTER:
+	ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
+	break;
+#endif
+      default:
+	/* Unknown type.  */
+	return -1;
+      }
+  return 0;
+}
diff --git a/e2fsprogs/intl/printf-args.h b/e2fsprogs/intl/printf-args.h
new file mode 100644
index 0000000..f11e64c
--- /dev/null
+++ b/e2fsprogs/intl/printf-args.h
@@ -0,0 +1,137 @@
+/* Decomposed printf argument list.
+   Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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 _PRINTF_ARGS_H
+#define _PRINTF_ARGS_H
+
+/* Get size_t.  */
+#include <stddef.h>
+
+/* Get wchar_t.  */
+#ifdef HAVE_WCHAR_T
+# include <stddef.h>
+#endif
+
+/* Get wint_t.  */
+#ifdef HAVE_WINT_T
+# include <wchar.h>
+#endif
+
+/* Get va_list.  */
+#include <stdarg.h>
+
+
+/* Argument types */
+typedef enum
+{
+  TYPE_NONE,
+  TYPE_SCHAR,
+  TYPE_UCHAR,
+  TYPE_SHORT,
+  TYPE_USHORT,
+  TYPE_INT,
+  TYPE_UINT,
+  TYPE_LONGINT,
+  TYPE_ULONGINT,
+#ifdef HAVE_LONG_LONG
+  TYPE_LONGLONGINT,
+  TYPE_ULONGLONGINT,
+#endif
+  TYPE_DOUBLE,
+#ifdef HAVE_LONG_DOUBLE
+  TYPE_LONGDOUBLE,
+#endif
+  TYPE_CHAR,
+#ifdef HAVE_WINT_T
+  TYPE_WIDE_CHAR,
+#endif
+  TYPE_STRING,
+#ifdef HAVE_WCHAR_T
+  TYPE_WIDE_STRING,
+#endif
+  TYPE_POINTER,
+  TYPE_COUNT_SCHAR_POINTER,
+  TYPE_COUNT_SHORT_POINTER,
+  TYPE_COUNT_INT_POINTER,
+  TYPE_COUNT_LONGINT_POINTER
+#ifdef HAVE_LONG_LONG
+, TYPE_COUNT_LONGLONGINT_POINTER
+#endif
+} arg_type;
+
+/* Polymorphic argument */
+typedef struct
+{
+  arg_type type;
+  union
+  {
+    signed char			a_schar;
+    unsigned char		a_uchar;
+    short			a_short;
+    unsigned short		a_ushort;
+    int				a_int;
+    unsigned int		a_uint;
+    long int			a_longint;
+    unsigned long int		a_ulongint;
+#ifdef HAVE_LONG_LONG
+    long long int		a_longlongint;
+    unsigned long long int	a_ulonglongint;
+#endif
+    float			a_float;
+    double			a_double;
+#ifdef HAVE_LONG_DOUBLE
+    long double			a_longdouble;
+#endif
+    int				a_char;
+#ifdef HAVE_WINT_T
+    wint_t			a_wide_char;
+#endif
+    const char*			a_string;
+#ifdef HAVE_WCHAR_T
+    const wchar_t*		a_wide_string;
+#endif
+    void*			a_pointer;
+    signed char *		a_count_schar_pointer;
+    short *			a_count_short_pointer;
+    int *			a_count_int_pointer;
+    long int *			a_count_longint_pointer;
+#ifdef HAVE_LONG_LONG
+    long long int *		a_count_longlongint_pointer;
+#endif
+  }
+  a;
+}
+argument;
+
+typedef struct
+{
+  size_t count;
+  argument *arg;
+}
+arguments;
+
+
+/* Fetch the arguments, putting them into a. */
+#ifdef STATIC
+STATIC
+#else
+extern
+#endif
+int printf_fetchargs (va_list args, arguments *a);
+
+#endif /* _PRINTF_ARGS_H */
diff --git a/e2fsprogs/intl/printf-parse.c b/e2fsprogs/intl/printf-parse.c
new file mode 100644
index 0000000..416deda
--- /dev/null
+++ b/e2fsprogs/intl/printf-parse.c
@@ -0,0 +1,535 @@
+/* Formatted output to strings.
+   Copyright (C) 1999-2000, 2002-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Specification.  */
+#if WIDE_CHAR_VERSION
+# include "wprintf-parse.h"
+#else
+# include "printf-parse.h"
+#endif
+
+/* Get size_t, NULL.  */
+#include <stddef.h>
+
+/* Get intmax_t.  */
+#if HAVE_STDINT_H_WITH_UINTMAX
+# include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+# include <inttypes.h>
+#endif
+
+/* malloc(), realloc(), free().  */
+#include <stdlib.h>
+
+/* Checked size_t computations.  */
+#include "xsize.h"
+
+#if WIDE_CHAR_VERSION
+# define PRINTF_PARSE wprintf_parse
+# define CHAR_T wchar_t
+# define DIRECTIVE wchar_t_directive
+# define DIRECTIVES wchar_t_directives
+#else
+# define PRINTF_PARSE printf_parse
+# define CHAR_T char
+# define DIRECTIVE char_directive
+# define DIRECTIVES char_directives
+#endif
+
+#ifdef STATIC
+STATIC
+#endif
+int
+PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
+{
+  const CHAR_T *cp = format;		/* pointer into format */
+  size_t arg_posn = 0;		/* number of regular arguments consumed */
+  size_t d_allocated;			/* allocated elements of d->dir */
+  size_t a_allocated;			/* allocated elements of a->arg */
+  size_t max_width_length = 0;
+  size_t max_precision_length = 0;
+
+  d->count = 0;
+  d_allocated = 1;
+  d->dir = malloc (d_allocated * sizeof (DIRECTIVE));
+  if (d->dir == NULL)
+    /* Out of memory.  */
+    return -1;
+
+  a->count = 0;
+  a_allocated = 0;
+  a->arg = NULL;
+
+#define REGISTER_ARG(_index_,_type_) \
+  {									\
+    size_t n = (_index_);						\
+    if (n >= a_allocated)						\
+      {									\
+	size_t memory_size;						\
+	argument *memory;						\
+									\
+	a_allocated = xtimes (a_allocated, 2);				\
+	if (a_allocated <= n)						\
+	  a_allocated = xsum (n, 1);					\
+	memory_size = xtimes (a_allocated, sizeof (argument));		\
+	if (size_overflow_p (memory_size))				\
+	  /* Overflow, would lead to out of memory.  */			\
+	  goto error;							\
+	memory = (a->arg						\
+		  ? realloc (a->arg, memory_size)			\
+		  : malloc (memory_size));				\
+	if (memory == NULL)						\
+	  /* Out of memory.  */						\
+	  goto error;							\
+	a->arg = memory;						\
+      }									\
+    while (a->count <= n)						\
+      a->arg[a->count++].type = TYPE_NONE;				\
+    if (a->arg[n].type == TYPE_NONE)					\
+      a->arg[n].type = (_type_);					\
+    else if (a->arg[n].type != (_type_))				\
+      /* Ambiguous type for positional argument.  */			\
+      goto error;							\
+  }
+
+  while (*cp != '\0')
+    {
+      CHAR_T c = *cp++;
+      if (c == '%')
+	{
+	  size_t arg_index = ARG_NONE;
+	  DIRECTIVE *dp = &d->dir[d->count];/* pointer to next directive */
+
+	  /* Initialize the next directive.  */
+	  dp->dir_start = cp - 1;
+	  dp->flags = 0;
+	  dp->width_start = NULL;
+	  dp->width_end = NULL;
+	  dp->width_arg_index = ARG_NONE;
+	  dp->precision_start = NULL;
+	  dp->precision_end = NULL;
+	  dp->precision_arg_index = ARG_NONE;
+	  dp->arg_index = ARG_NONE;
+
+	  /* Test for positional argument.  */
+	  if (*cp >= '0' && *cp <= '9')
+	    {
+	      const CHAR_T *np;
+
+	      for (np = cp; *np >= '0' && *np <= '9'; np++)
+		;
+	      if (*np == '$')
+		{
+		  size_t n = 0;
+
+		  for (np = cp; *np >= '0' && *np <= '9'; np++)
+		    n = xsum (xtimes (n, 10), *np - '0');
+		  if (n == 0)
+		    /* Positional argument 0.  */
+		    goto error;
+		  if (size_overflow_p (n))
+		    /* n too large, would lead to out of memory later.  */
+		    goto error;
+		  arg_index = n - 1;
+		  cp = np + 1;
+		}
+	    }
+
+	  /* Read the flags.  */
+	  for (;;)
+	    {
+	      if (*cp == '\'')
+		{
+		  dp->flags |= FLAG_GROUP;
+		  cp++;
+		}
+	      else if (*cp == '-')
+		{
+		  dp->flags |= FLAG_LEFT;
+		  cp++;
+		}
+	      else if (*cp == '+')
+		{
+		  dp->flags |= FLAG_SHOWSIGN;
+		  cp++;
+		}
+	      else if (*cp == ' ')
+		{
+		  dp->flags |= FLAG_SPACE;
+		  cp++;
+		}
+	      else if (*cp == '#')
+		{
+		  dp->flags |= FLAG_ALT;
+		  cp++;
+		}
+	      else if (*cp == '0')
+		{
+		  dp->flags |= FLAG_ZERO;
+		  cp++;
+		}
+	      else
+		break;
+	    }
+
+	  /* Parse the field width.  */
+	  if (*cp == '*')
+	    {
+	      dp->width_start = cp;
+	      cp++;
+	      dp->width_end = cp;
+	      if (max_width_length < 1)
+		max_width_length = 1;
+
+	      /* Test for positional argument.  */
+	      if (*cp >= '0' && *cp <= '9')
+		{
+		  const CHAR_T *np;
+
+		  for (np = cp; *np >= '0' && *np <= '9'; np++)
+		    ;
+		  if (*np == '$')
+		    {
+		      size_t n = 0;
+
+		      for (np = cp; *np >= '0' && *np <= '9'; np++)
+			n = xsum (xtimes (n, 10), *np - '0');
+		      if (n == 0)
+			/* Positional argument 0.  */
+			goto error;
+		      if (size_overflow_p (n))
+			/* n too large, would lead to out of memory later.  */
+			goto error;
+		      dp->width_arg_index = n - 1;
+		      cp = np + 1;
+		    }
+		}
+	      if (dp->width_arg_index == ARG_NONE)
+		{
+		  dp->width_arg_index = arg_posn++;
+		  if (dp->width_arg_index == ARG_NONE)
+		    /* arg_posn wrapped around.  */
+		    goto error;
+		}
+	      REGISTER_ARG (dp->width_arg_index, TYPE_INT);
+	    }
+	  else if (*cp >= '0' && *cp <= '9')
+	    {
+	      size_t width_length;
+
+	      dp->width_start = cp;
+	      for (; *cp >= '0' && *cp <= '9'; cp++)
+		;
+	      dp->width_end = cp;
+	      width_length = dp->width_end - dp->width_start;
+	      if (max_width_length < width_length)
+		max_width_length = width_length;
+	    }
+
+	  /* Parse the precision.  */
+	  if (*cp == '.')
+	    {
+	      cp++;
+	      if (*cp == '*')
+		{
+		  dp->precision_start = cp - 1;
+		  cp++;
+		  dp->precision_end = cp;
+		  if (max_precision_length < 2)
+		    max_precision_length = 2;
+
+		  /* Test for positional argument.  */
+		  if (*cp >= '0' && *cp <= '9')
+		    {
+		      const CHAR_T *np;
+
+		      for (np = cp; *np >= '0' && *np <= '9'; np++)
+			;
+		      if (*np == '$')
+			{
+			  size_t n = 0;
+
+			  for (np = cp; *np >= '0' && *np <= '9'; np++)
+			    n = xsum (xtimes (n, 10), *np - '0');
+			  if (n == 0)
+			    /* Positional argument 0.  */
+			    goto error;
+			  if (size_overflow_p (n))
+			    /* n too large, would lead to out of memory
+			       later.  */
+			    goto error;
+			  dp->precision_arg_index = n - 1;
+			  cp = np + 1;
+			}
+		    }
+		  if (dp->precision_arg_index == ARG_NONE)
+		    {
+		      dp->precision_arg_index = arg_posn++;
+		      if (dp->precision_arg_index == ARG_NONE)
+			/* arg_posn wrapped around.  */
+			goto error;
+		    }
+		  REGISTER_ARG (dp->precision_arg_index, TYPE_INT);
+		}
+	      else
+		{
+		  size_t precision_length;
+
+		  dp->precision_start = cp - 1;
+		  for (; *cp >= '0' && *cp <= '9'; cp++)
+		    ;
+		  dp->precision_end = cp;
+		  precision_length = dp->precision_end - dp->precision_start;
+		  if (max_precision_length < precision_length)
+		    max_precision_length = precision_length;
+		}
+	    }
+
+	  {
+	    arg_type type;
+
+	    /* Parse argument type/size specifiers.  */
+	    {
+	      int flags = 0;
+
+	      for (;;)
+		{
+		  if (*cp == 'h')
+		    {
+		      flags |= (1 << (flags & 1));
+		      cp++;
+		    }
+		  else if (*cp == 'L')
+		    {
+		      flags |= 4;
+		      cp++;
+		    }
+		  else if (*cp == 'l')
+		    {
+		      flags += 8;
+		      cp++;
+		    }
+#ifdef HAVE_INTMAX_T
+		  else if (*cp == 'j')
+		    {
+		      if (sizeof (intmax_t) > sizeof (long))
+			{
+			  /* intmax_t = long long */
+			  flags += 16;
+			}
+		      else if (sizeof (intmax_t) > sizeof (int))
+			{
+			  /* intmax_t = long */
+			  flags += 8;
+			}
+		      cp++;
+		    }
+#endif
+		  else if (*cp == 'z' || *cp == 'Z')
+		    {
+		      /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
+			 because the warning facility in gcc-2.95.2 understands
+			 only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784).  */
+		      if (sizeof (size_t) > sizeof (long))
+			{
+			  /* size_t = long long */
+			  flags += 16;
+			}
+		      else if (sizeof (size_t) > sizeof (int))
+			{
+			  /* size_t = long */
+			  flags += 8;
+			}
+		      cp++;
+		    }
+		  else if (*cp == 't')
+		    {
+		      if (sizeof (ptrdiff_t) > sizeof (long))
+			{
+			  /* ptrdiff_t = long long */
+			  flags += 16;
+			}
+		      else if (sizeof (ptrdiff_t) > sizeof (int))
+			{
+			  /* ptrdiff_t = long */
+			  flags += 8;
+			}
+		      cp++;
+		    }
+		  else
+		    break;
+		}
+
+	      /* Read the conversion character.  */
+	      c = *cp++;
+	      switch (c)
+		{
+		case 'd': case 'i':
+#ifdef HAVE_LONG_LONG
+		  if (flags >= 16 || (flags & 4))
+		    type = TYPE_LONGLONGINT;
+		  else
+#endif
+		  if (flags >= 8)
+		    type = TYPE_LONGINT;
+		  else if (flags & 2)
+		    type = TYPE_SCHAR;
+		  else if (flags & 1)
+		    type = TYPE_SHORT;
+		  else
+		    type = TYPE_INT;
+		  break;
+		case 'o': case 'u': case 'x': case 'X':
+#ifdef HAVE_LONG_LONG
+		  if (flags >= 16 || (flags & 4))
+		    type = TYPE_ULONGLONGINT;
+		  else
+#endif
+		  if (flags >= 8)
+		    type = TYPE_ULONGINT;
+		  else if (flags & 2)
+		    type = TYPE_UCHAR;
+		  else if (flags & 1)
+		    type = TYPE_USHORT;
+		  else
+		    type = TYPE_UINT;
+		  break;
+		case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
+		case 'a': case 'A':
+#ifdef HAVE_LONG_DOUBLE
+		  if (flags >= 16 || (flags & 4))
+		    type = TYPE_LONGDOUBLE;
+		  else
+#endif
+		  type = TYPE_DOUBLE;
+		  break;
+		case 'c':
+		  if (flags >= 8)
+#ifdef HAVE_WINT_T
+		    type = TYPE_WIDE_CHAR;
+#else
+		    goto error;
+#endif
+		  else
+		    type = TYPE_CHAR;
+		  break;
+#ifdef HAVE_WINT_T
+		case 'C':
+		  type = TYPE_WIDE_CHAR;
+		  c = 'c';
+		  break;
+#endif
+		case 's':
+		  if (flags >= 8)
+#ifdef HAVE_WCHAR_T
+		    type = TYPE_WIDE_STRING;
+#else
+		    goto error;
+#endif
+		  else
+		    type = TYPE_STRING;
+		  break;
+#ifdef HAVE_WCHAR_T
+		case 'S':
+		  type = TYPE_WIDE_STRING;
+		  c = 's';
+		  break;
+#endif
+		case 'p':
+		  type = TYPE_POINTER;
+		  break;
+		case 'n':
+#ifdef HAVE_LONG_LONG
+		  if (flags >= 16 || (flags & 4))
+		    type = TYPE_COUNT_LONGLONGINT_POINTER;
+		  else
+#endif
+		  if (flags >= 8)
+		    type = TYPE_COUNT_LONGINT_POINTER;
+		  else if (flags & 2)
+		    type = TYPE_COUNT_SCHAR_POINTER;
+		  else if (flags & 1)
+		    type = TYPE_COUNT_SHORT_POINTER;
+		  else
+		    type = TYPE_COUNT_INT_POINTER;
+		  break;
+		case '%':
+		  type = TYPE_NONE;
+		  break;
+		default:
+		  /* Unknown conversion character.  */
+		  goto error;
+		}
+	    }
+
+	    if (type != TYPE_NONE)
+	      {
+		dp->arg_index = arg_index;
+		if (dp->arg_index == ARG_NONE)
+		  {
+		    dp->arg_index = arg_posn++;
+		    if (dp->arg_index == ARG_NONE)
+		      /* arg_posn wrapped around.  */
+		      goto error;
+		  }
+		REGISTER_ARG (dp->arg_index, type);
+	      }
+	    dp->conversion = c;
+	    dp->dir_end = cp;
+	  }
+
+	  d->count++;
+	  if (d->count >= d_allocated)
+	    {
+	      size_t memory_size;
+	      DIRECTIVE *memory;
+
+	      d_allocated = xtimes (d_allocated, 2);
+	      memory_size = xtimes (d_allocated, sizeof (DIRECTIVE));
+	      if (size_overflow_p (memory_size))
+		/* Overflow, would lead to out of memory.  */
+		goto error;
+	      memory = realloc (d->dir, memory_size);
+	      if (memory == NULL)
+		/* Out of memory.  */
+		goto error;
+	      d->dir = memory;
+	    }
+	}
+    }
+  d->dir[d->count].dir_start = cp;
+
+  d->max_width_length = max_width_length;
+  d->max_precision_length = max_precision_length;
+  return 0;
+
+error:
+  free (a->arg);
+  free (d->dir);
+  return -1;
+}
+
+#undef DIRECTIVES
+#undef DIRECTIVE
+#undef CHAR_T
+#undef PRINTF_PARSE
diff --git a/e2fsprogs/intl/printf-parse.h b/e2fsprogs/intl/printf-parse.h
new file mode 100644
index 0000000..8aec50e
--- /dev/null
+++ b/e2fsprogs/intl/printf-parse.h
@@ -0,0 +1,75 @@
+/* Parse printf format string.
+   Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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 _PRINTF_PARSE_H
+#define _PRINTF_PARSE_H
+
+#include "printf-args.h"
+
+
+/* Flags */
+#define FLAG_GROUP	 1	/* ' flag */
+#define FLAG_LEFT	 2	/* - flag */
+#define FLAG_SHOWSIGN	 4	/* + flag */
+#define FLAG_SPACE	 8	/* space flag */
+#define FLAG_ALT	16	/* # flag */
+#define FLAG_ZERO	32
+
+/* arg_index value indicating that no argument is consumed.  */
+#define ARG_NONE	(~(size_t)0)
+
+/* A parsed directive.  */
+typedef struct
+{
+  const char* dir_start;
+  const char* dir_end;
+  int flags;
+  const char* width_start;
+  const char* width_end;
+  size_t width_arg_index;
+  const char* precision_start;
+  const char* precision_end;
+  size_t precision_arg_index;
+  char conversion; /* d i o u x X f e E g G c s p n U % but not C S */
+  size_t arg_index;
+}
+char_directive;
+
+/* A parsed format string.  */
+typedef struct
+{
+  size_t count;
+  char_directive *dir;
+  size_t max_width_length;
+  size_t max_precision_length;
+}
+char_directives;
+
+
+/* Parses the format string.  Fills in the number N of directives, and fills
+   in directives[0], ..., directives[N-1], and sets directives[N].dir_start
+   to the end of the format string.  Also fills in the arg_type fields of the
+   arguments and the needed count of arguments.  */
+#ifdef STATIC
+STATIC
+#else
+extern
+#endif
+int printf_parse (const char *format, char_directives *d, arguments *a);
+
+#endif /* _PRINTF_PARSE_H */
diff --git a/e2fsprogs/intl/printf.c b/e2fsprogs/intl/printf.c
new file mode 100644
index 0000000..878646c
--- /dev/null
+++ b/e2fsprogs/intl/printf.c
@@ -0,0 +1,371 @@
+/* Formatted output to strings, using POSIX/XSI format strings with positions.
+   Copyright (C) 2003 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  if defined HAVE_ALLOCA_H || defined _LIBC
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+#include <stdio.h>
+
+#if !HAVE_POSIX_PRINTF
+
+#include <stdlib.h>
+#include <string.h>
+
+/* When building a DLL, we must export some functions.  Note that because
+   the functions are only defined for binary backward compatibility, we
+   don't need to use __declspec(dllimport) in any case.  */
+#if defined _MSC_VER && BUILDING_DLL
+# define DLL_EXPORTED __declspec(dllexport)
+#else
+# define DLL_EXPORTED
+#endif
+
+#define STATIC static
+
+/* Define auxiliary functions declared in "printf-args.h".  */
+#include "printf-args.c"
+
+/* Define auxiliary functions declared in "printf-parse.h".  */
+#include "printf-parse.c"
+
+/* Define functions declared in "vasnprintf.h".  */
+#define vasnprintf libintl_vasnprintf
+#include "vasnprintf.c"
+#if 0 /* not needed */
+#define asnprintf libintl_asnprintf
+#include "asnprintf.c"
+#endif
+
+DLL_EXPORTED
+int
+libintl_vfprintf (FILE *stream, const char *format, va_list args)
+{
+  if (strchr (format, '$') == NULL)
+    return vfprintf (stream, format, args);
+  else
+    {
+      size_t length;
+      char *result = libintl_vasnprintf (NULL, &length, format, args);
+      int retval = -1;
+      if (result != NULL)
+	{
+	  if (fwrite (result, 1, length, stream) == length)
+	    retval = length;
+	  free (result);
+	}
+      return retval;
+    }
+}
+
+DLL_EXPORTED
+int
+libintl_fprintf (FILE *stream, const char *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vfprintf (stream, format, args);
+  va_end (args);
+  return retval;
+}
+
+DLL_EXPORTED
+int
+libintl_vprintf (const char *format, va_list args)
+{
+  return libintl_vfprintf (stdout, format, args);
+}
+
+DLL_EXPORTED
+int
+libintl_printf (const char *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vprintf (format, args);
+  va_end (args);
+  return retval;
+}
+
+DLL_EXPORTED
+int
+libintl_vsprintf (char *resultbuf, const char *format, va_list args)
+{
+  if (strchr (format, '$') == NULL)
+    return vsprintf (resultbuf, format, args);
+  else
+    {
+      size_t length = (size_t) ~0 / (4 * sizeof (char));
+      char *result = libintl_vasnprintf (resultbuf, &length, format, args);
+      if (result != resultbuf)
+	{
+	  free (result);
+	  return -1;
+	}
+      else
+	return length;
+    }
+}
+
+DLL_EXPORTED
+int
+libintl_sprintf (char *resultbuf, const char *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vsprintf (resultbuf, format, args);
+  va_end (args);
+  return retval;
+}
+
+#if HAVE_SNPRINTF
+
+# if HAVE_DECL__SNPRINTF
+   /* Windows.  */
+#  define system_vsnprintf _vsnprintf
+# else
+   /* Unix.  */
+#  define system_vsnprintf vsnprintf
+# endif
+
+DLL_EXPORTED
+int
+libintl_vsnprintf (char *resultbuf, size_t length, const char *format, va_list args)
+{
+  if (strchr (format, '$') == NULL)
+    return system_vsnprintf (resultbuf, length, format, args);
+  else
+    {
+      size_t maxlength = length;
+      char *result = libintl_vasnprintf (resultbuf, &length, format, args);
+      if (result != resultbuf)
+	{
+	  if (maxlength > 0)
+	    {
+	      if (length < maxlength)
+		abort ();
+	      memcpy (resultbuf, result, maxlength - 1);
+	      resultbuf[maxlength - 1] = '\0';
+	    }
+	  free (result);
+	  return -1;
+	}
+      else
+	return length;
+    }
+}
+
+DLL_EXPORTED
+int
+libintl_snprintf (char *resultbuf, size_t length, const char *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vsnprintf (resultbuf, length, format, args);
+  va_end (args);
+  return retval;
+}
+
+#endif
+
+#if HAVE_ASPRINTF
+
+DLL_EXPORTED
+int
+libintl_vasprintf (char **resultp, const char *format, va_list args)
+{
+  size_t length;
+  char *result = libintl_vasnprintf (NULL, &length, format, args);
+  if (result == NULL)
+    return -1;
+  *resultp = result;
+  return length;
+}
+
+DLL_EXPORTED
+int
+libintl_asprintf (char **resultp, const char *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vasprintf (resultp, format, args);
+  va_end (args);
+  return retval;
+}
+
+#endif
+
+#if HAVE_FWPRINTF
+
+#include <wchar.h>
+
+#define WIDE_CHAR_VERSION 1
+
+/* Define auxiliary functions declared in "wprintf-parse.h".  */
+#include "printf-parse.c"
+
+/* Define functions declared in "vasnprintf.h".  */
+#define vasnwprintf libintl_vasnwprintf
+#include "vasnprintf.c"
+#if 0 /* not needed */
+#define asnwprintf libintl_asnwprintf
+#include "asnprintf.c"
+#endif
+
+# if HAVE_DECL__SNWPRINTF
+   /* Windows.  */
+#  define system_vswprintf _vsnwprintf
+# else
+   /* Unix.  */
+#  define system_vswprintf vswprintf
+# endif
+
+DLL_EXPORTED
+int
+libintl_vfwprintf (FILE *stream, const wchar_t *format, va_list args)
+{
+  if (wcschr (format, '$') == NULL)
+    return vfwprintf (stream, format, args);
+  else
+    {
+      size_t length;
+      wchar_t *result = libintl_vasnwprintf (NULL, &length, format, args);
+      int retval = -1;
+      if (result != NULL)
+	{
+	  size_t i;
+	  for (i = 0; i < length; i++)
+	    if (fputwc (result[i], stream) == WEOF)
+	      break;
+	  if (i == length)
+	    retval = length;
+	  free (result);
+	}
+      return retval;
+    }
+}
+
+DLL_EXPORTED
+int
+libintl_fwprintf (FILE *stream, const wchar_t *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vfwprintf (stream, format, args);
+  va_end (args);
+  return retval;
+}
+
+DLL_EXPORTED
+int
+libintl_vwprintf (const wchar_t *format, va_list args)
+{
+  return libintl_vfwprintf (stdout, format, args);
+}
+
+DLL_EXPORTED
+int
+libintl_wprintf (const wchar_t *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vwprintf (format, args);
+  va_end (args);
+  return retval;
+}
+
+DLL_EXPORTED
+int
+libintl_vswprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, va_list args)
+{
+  if (wcschr (format, '$') == NULL)
+    return system_vswprintf (resultbuf, length, format, args);
+  else
+    {
+      size_t maxlength = length;
+      wchar_t *result = libintl_vasnwprintf (resultbuf, &length, format, args);
+      if (result != resultbuf)
+	{
+	  if (maxlength > 0)
+	    {
+	      if (length < maxlength)
+		abort ();
+	      memcpy (resultbuf, result, (maxlength - 1) * sizeof (wchar_t));
+	      resultbuf[maxlength - 1] = 0;
+	    }
+	  free (result);
+	  return -1;
+	}
+      else
+	return length;
+    }
+}
+
+DLL_EXPORTED
+int
+libintl_swprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vswprintf (resultbuf, length, format, args);
+  va_end (args);
+  return retval;
+}
+
+#endif
+
+#endif
diff --git a/e2fsprogs/intl/ref-add.sin b/e2fsprogs/intl/ref-add.sin
new file mode 100644
index 0000000..167374e
--- /dev/null
+++ b/e2fsprogs/intl/ref-add.sin
@@ -0,0 +1,31 @@
+# Add this package to a list of references stored in a text file.
+#
+#   Copyright (C) 2000 Free Software Foundation, Inc.
+#
+#   This program 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, 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
+#   Library General Public License for more details.
+#
+#   You should have received a copy of the GNU Library 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.
+#
+# Written by Bruno Haible <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+  s/# Packages using this file://
+  ta
+  :a
+  s/ @PACKAGE@ / @PACKAGE@ /
+  tb
+  s/ $/ @PACKAGE@ /
+  :b
+  s/^/# Packages using this file:/
+}
diff --git a/e2fsprogs/intl/ref-del.sin b/e2fsprogs/intl/ref-del.sin
new file mode 100644
index 0000000..613cf37
--- /dev/null
+++ b/e2fsprogs/intl/ref-del.sin
@@ -0,0 +1,26 @@
+# Remove this package from a list of references stored in a text file.
+#
+#   Copyright (C) 2000 Free Software Foundation, Inc.
+#
+#   This program 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, 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
+#   Library General Public License for more details.
+#
+#   You should have received a copy of the GNU Library 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.
+#
+# Written by Bruno Haible <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+  s/# Packages using this file://
+  s/ @PACKAGE@ / /
+  s/^/# Packages using this file:/
+}
diff --git a/e2fsprogs/intl/relocatable.c b/e2fsprogs/intl/relocatable.c
new file mode 100644
index 0000000..bf7c708
--- /dev/null
+++ b/e2fsprogs/intl/relocatable.c
@@ -0,0 +1,449 @@
+/* Provide relocatable packages.
+   Copyright (C) 2003 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+
+/* Tell glibc's <stdio.h> to provide a prototype for getline().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE	1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+/* Specification.  */
+#include "relocatable.h"
+
+#if ENABLE_RELOCATABLE
+
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef NO_XMALLOC
+# define xmalloc malloc
+#else
+# include "xalloc.h"
+#endif
+
+#if defined _WIN32 || defined __WIN32__
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#if DEPENDS_ON_LIBCHARSET
+# include <libcharset.h>
+#endif
+#if DEPENDS_ON_LIBICONV && HAVE_ICONV
+# include <iconv.h>
+#endif
+#if DEPENDS_ON_LIBINTL && ENABLE_NLS
+# include <libintl.h>
+#endif
+
+/* Faked cheap 'bool'.  */
+#undef bool
+#undef false
+#undef true
+#define bool int
+#define false 0
+#define true 1
+
+/* Pathname support.
+   ISSLASH(C)           tests whether C is a directory separator character.
+   IS_PATH_WITH_DIR(P)  tests whether P contains a directory specification.
+ */
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+# define HAS_DEVICE(P) \
+    ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+     && (P)[1] == ':')
+# define IS_PATH_WITH_DIR(P) \
+    (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
+# define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
+#else
+  /* Unix */
+# define ISSLASH(C) ((C) == '/')
+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
+# define FILESYSTEM_PREFIX_LEN(P) 0
+#endif
+
+/* Original installation prefix.  */
+static char *orig_prefix;
+static size_t orig_prefix_len;
+/* Current installation prefix.  */
+static char *curr_prefix;
+static size_t curr_prefix_len;
+/* These prefixes do not end in a slash.  Anything that will be concatenated
+   to them must start with a slash.  */
+
+/* Sets the original and the current installation prefix of this module.
+   Relocation simply replaces a pathname starting with the original prefix
+   by the corresponding pathname with the current prefix instead.  Both
+   prefixes should be directory names without trailing slash (i.e. use ""
+   instead of "/").  */
+static void
+set_this_relocation_prefix (const char *orig_prefix_arg,
+			    const char *curr_prefix_arg)
+{
+  if (orig_prefix_arg != NULL && curr_prefix_arg != NULL
+      /* Optimization: if orig_prefix and curr_prefix are equal, the
+	 relocation is a nop.  */
+      && strcmp (orig_prefix_arg, curr_prefix_arg) != 0)
+    {
+      /* Duplicate the argument strings.  */
+      char *memory;
+
+      orig_prefix_len = strlen (orig_prefix_arg);
+      curr_prefix_len = strlen (curr_prefix_arg);
+      memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1);
+#ifdef NO_XMALLOC
+      if (memory != NULL)
+#endif
+	{
+	  memcpy (memory, orig_prefix_arg, orig_prefix_len + 1);
+	  orig_prefix = memory;
+	  memory += orig_prefix_len + 1;
+	  memcpy (memory, curr_prefix_arg, curr_prefix_len + 1);
+	  curr_prefix = memory;
+	  return;
+	}
+    }
+  orig_prefix = NULL;
+  curr_prefix = NULL;
+  /* Don't worry about wasted memory here - this function is usually only
+     called once.  */
+}
+
+/* Sets the original and the current installation prefix of the package.
+   Relocation simply replaces a pathname starting with the original prefix
+   by the corresponding pathname with the current prefix instead.  Both
+   prefixes should be directory names without trailing slash (i.e. use ""
+   instead of "/").  */
+void
+set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg)
+{
+  set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
+
+  /* Now notify all dependent libraries.  */
+#if DEPENDS_ON_LIBCHARSET
+  libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
+#endif
+#if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109
+  libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
+#endif
+#if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix
+  libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
+#endif
+}
+
+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
+
+/* Convenience function:
+   Computes the current installation prefix, based on the original
+   installation prefix, the original installation directory of a particular
+   file, and the current pathname of this file.  Returns NULL upon failure.  */
+#ifdef IN_LIBRARY
+#define compute_curr_prefix local_compute_curr_prefix
+static
+#endif
+const char *
+compute_curr_prefix (const char *orig_installprefix,
+		     const char *orig_installdir,
+		     const char *curr_pathname)
+{
+  const char *curr_installdir;
+  const char *rel_installdir;
+
+  if (curr_pathname == NULL)
+    return NULL;
+
+  /* Determine the relative installation directory, relative to the prefix.
+     This is simply the difference between orig_installprefix and
+     orig_installdir.  */
+  if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix))
+      != 0)
+    /* Shouldn't happen - nothing should be installed outside $(prefix).  */
+    return NULL;
+  rel_installdir = orig_installdir + strlen (orig_installprefix);
+
+  /* Determine the current installation directory.  */
+  {
+    const char *p_base = curr_pathname + FILESYSTEM_PREFIX_LEN (curr_pathname);
+    const char *p = curr_pathname + strlen (curr_pathname);
+    char *q;
+
+    while (p > p_base)
+      {
+	p--;
+	if (ISSLASH (*p))
+	  break;
+      }
+
+    q = (char *) xmalloc (p - curr_pathname + 1);
+#ifdef NO_XMALLOC
+    if (q == NULL)
+      return NULL;
+#endif
+    memcpy (q, curr_pathname, p - curr_pathname);
+    q[p - curr_pathname] = '\0';
+    curr_installdir = q;
+  }
+
+  /* Compute the current installation prefix by removing the trailing
+     rel_installdir from it.  */
+  {
+    const char *rp = rel_installdir + strlen (rel_installdir);
+    const char *cp = curr_installdir + strlen (curr_installdir);
+    const char *cp_base =
+      curr_installdir + FILESYSTEM_PREFIX_LEN (curr_installdir);
+
+    while (rp > rel_installdir && cp > cp_base)
+      {
+	bool same = false;
+	const char *rpi = rp;
+	const char *cpi = cp;
+
+	while (rpi > rel_installdir && cpi > cp_base)
+	  {
+	    rpi--;
+	    cpi--;
+	    if (ISSLASH (*rpi) || ISSLASH (*cpi))
+	      {
+		if (ISSLASH (*rpi) && ISSLASH (*cpi))
+		  same = true;
+		break;
+	      }
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+	    /* Win32, OS/2, DOS - case insignificant filesystem */
+	    if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi)
+		!= (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi))
+	      break;
+#else
+	    if (*rpi != *cpi)
+	      break;
+#endif
+	  }
+	if (!same)
+	  break;
+	/* The last pathname component was the same.  opi and cpi now point
+	   to the slash before it.  */
+	rp = rpi;
+	cp = cpi;
+      }
+
+    if (rp > rel_installdir)
+      /* Unexpected: The curr_installdir does not end with rel_installdir.  */
+      return NULL;
+
+    {
+      size_t curr_prefix_len = cp - curr_installdir;
+      char *curr_prefix;
+
+      curr_prefix = (char *) xmalloc (curr_prefix_len + 1);
+#ifdef NO_XMALLOC
+      if (curr_prefix == NULL)
+	return NULL;
+#endif
+      memcpy (curr_prefix, curr_installdir, curr_prefix_len);
+      curr_prefix[curr_prefix_len] = '\0';
+
+      return curr_prefix;
+    }
+  }
+}
+
+#endif /* !IN_LIBRARY || PIC */
+
+#if defined PIC && defined INSTALLDIR
+
+/* Full pathname of shared library, or NULL.  */
+static char *shared_library_fullname;
+
+#if defined _WIN32 || defined __WIN32__
+
+/* Determine the full pathname of the shared library when it is loaded.  */
+
+BOOL WINAPI
+DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved)
+{
+  (void) reserved;
+
+  if (event == DLL_PROCESS_ATTACH)
+    {
+      /* The DLL is being loaded into an application's address range.  */
+      static char location[MAX_PATH];
+
+      if (!GetModuleFileName (module_handle, location, sizeof (location)))
+	/* Shouldn't happen.  */
+	return FALSE;
+
+      if (!IS_PATH_WITH_DIR (location))
+	/* Shouldn't happen.  */
+	return FALSE;
+
+      shared_library_fullname = strdup (location);
+    }
+
+  return TRUE;
+}
+
+#else /* Unix */
+
+static void
+find_shared_library_fullname ()
+{
+#if defined __linux__ && __GLIBC__ >= 2
+  /* Linux has /proc/self/maps. glibc 2 has the getline() function.  */
+  FILE *fp;
+
+  /* Open the current process' maps file.  It describes one VMA per line.  */
+  fp = fopen ("/proc/self/maps", "r");
+  if (fp)
+    {
+      unsigned long address = (unsigned long) &find_shared_library_fullname;
+      for (;;)
+	{
+	  unsigned long start, end;
+	  int c;
+
+	  if (fscanf (fp, "%lx-%lx", &start, &end) != 2)
+	    break;
+	  if (address >= start && address <= end - 1)
+	    {
+	      /* Found it.  Now see if this line contains a filename.  */
+	      while (c = getc (fp), c != EOF && c != '\n' && c != '/')
+		continue;
+	      if (c == '/')
+		{
+		  size_t size;
+		  int len;
+
+		  ungetc (c, fp);
+		  shared_library_fullname = NULL; size = 0;
+		  len = getline (&shared_library_fullname, &size, fp);
+		  if (len >= 0)
+		    {
+		      /* Success: filled shared_library_fullname.  */
+		      if (len > 0 && shared_library_fullname[len - 1] == '\n')
+			shared_library_fullname[len - 1] = '\0';
+		    }
+		}
+	      break;
+	    }
+	  while (c = getc (fp), c != EOF && c != '\n')
+	    continue;
+	}
+      fclose (fp);
+    }
+#endif
+}
+
+#endif /* WIN32 / Unix */
+
+/* Return the full pathname of the current shared library.
+   Return NULL if unknown.
+   Guaranteed to work only on Linux and Woe32.  */
+static char *
+get_shared_library_fullname ()
+{
+#if !(defined _WIN32 || defined __WIN32__)
+  static bool tried_find_shared_library_fullname;
+  if (!tried_find_shared_library_fullname)
+    {
+      find_shared_library_fullname ();
+      tried_find_shared_library_fullname = true;
+    }
+#endif
+  return shared_library_fullname;
+}
+
+#endif /* PIC */
+
+/* Returns the pathname, relocated according to the current installation
+   directory.  */
+const char *
+relocate (const char *pathname)
+{
+#if defined PIC && defined INSTALLDIR
+  static int initialized;
+
+  /* Initialization code for a shared library.  */
+  if (!initialized)
+    {
+      /* At this point, orig_prefix and curr_prefix likely have already been
+	 set through the main program's set_program_name_and_installdir
+	 function.  This is sufficient in the case that the library has
+	 initially been installed in the same orig_prefix.  But we can do
+	 better, to also cover the cases that 1. it has been installed
+	 in a different prefix before being moved to orig_prefix and (later)
+	 to curr_prefix, 2. unlike the program, it has not moved away from
+	 orig_prefix.  */
+      const char *orig_installprefix = INSTALLPREFIX;
+      const char *orig_installdir = INSTALLDIR;
+      const char *curr_prefix_better;
+
+      curr_prefix_better =
+	compute_curr_prefix (orig_installprefix, orig_installdir,
+			     get_shared_library_fullname ());
+      if (curr_prefix_better == NULL)
+	curr_prefix_better = curr_prefix;
+
+      set_relocation_prefix (orig_installprefix, curr_prefix_better);
+
+      initialized = 1;
+    }
+#endif
+
+  /* Note: It is not necessary to perform case insensitive comparison here,
+     even for DOS-like filesystems, because the pathname argument was
+     typically created from the same Makefile variable as orig_prefix came
+     from.  */
+  if (orig_prefix != NULL && curr_prefix != NULL
+      && strncmp (pathname, orig_prefix, orig_prefix_len) == 0)
+    {
+      if (pathname[orig_prefix_len] == '\0')
+	/* pathname equals orig_prefix.  */
+	return curr_prefix;
+      if (ISSLASH (pathname[orig_prefix_len]))
+	{
+	  /* pathname starts with orig_prefix.  */
+	  const char *pathname_tail = &pathname[orig_prefix_len];
+	  char *result =
+	    (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1);
+
+#ifdef NO_XMALLOC
+	  if (result != NULL)
+#endif
+	    {
+	      memcpy (result, curr_prefix, curr_prefix_len);
+	      strcpy (result + curr_prefix_len, pathname_tail);
+	      return result;
+	    }
+	}
+    }
+  /* Nothing to relocate.  */
+  return pathname;
+}
+
+#endif
diff --git a/e2fsprogs/intl/relocatable.h b/e2fsprogs/intl/relocatable.h
new file mode 100644
index 0000000..48c5b71
--- /dev/null
+++ b/e2fsprogs/intl/relocatable.h
@@ -0,0 +1,77 @@
+/* Provide relocatable packages.
+   Copyright (C) 2003 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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 _RELOCATABLE_H
+#define _RELOCATABLE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* This can be enabled through the configure --enable-relocatable option.  */
+#if ENABLE_RELOCATABLE
+
+/* When building a DLL, we must export some functions.  Note that because
+   this is a private .h file, we don't need to use __declspec(dllimport)
+   in any case.  */
+#if defined _MSC_VER && BUILDING_DLL
+# define RELOCATABLE_DLL_EXPORTED __declspec(dllexport)
+#else
+# define RELOCATABLE_DLL_EXPORTED
+#endif
+
+/* Sets the original and the current installation prefix of the package.
+   Relocation simply replaces a pathname starting with the original prefix
+   by the corresponding pathname with the current prefix instead.  Both
+   prefixes should be directory names without trailing slash (i.e. use ""
+   instead of "/").  */
+extern RELOCATABLE_DLL_EXPORTED void
+       set_relocation_prefix (const char *orig_prefix,
+			      const char *curr_prefix);
+
+/* Returns the pathname, relocated according to the current installation
+   directory.  */
+extern const char * relocate (const char *pathname);
+
+/* Memory management: relocate() leaks memory, because it has to construct
+   a fresh pathname.  If this is a problem because your program calls
+   relocate() frequently, think about caching the result.  */
+
+/* Convenience function:
+   Computes the current installation prefix, based on the original
+   installation prefix, the original installation directory of a particular
+   file, and the current pathname of this file.  Returns NULL upon failure.  */
+extern const char * compute_curr_prefix (const char *orig_installprefix,
+					 const char *orig_installdir,
+					 const char *curr_pathname);
+
+#else
+
+/* By default, we use the hardwired pathnames.  */
+#define relocate(pathname) (pathname)
+
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RELOCATABLE_H */
diff --git a/e2fsprogs/intl/textdomain.c b/e2fsprogs/intl/textdomain.c
new file mode 100644
index 0000000..8745a84
--- /dev/null
+++ b/e2fsprogs/intl/textdomain.c
@@ -0,0 +1,141 @@
+/* Implementation of the textdomain(3) function.
+   Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "gettextP.h"
+
+#ifdef _LIBC
+/* We have to handle multi-threaded applications.  */
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc.  */
+# define __libc_rwlock_define(CLASS, NAME)
+# define __libc_rwlock_wrlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* The internal variables in the standalone libintl.a must have different
+   names than the internal variables in GNU libc, otherwise programs
+   using libintl.a cannot be linked statically.  */
+#if !defined _LIBC
+# define _nl_default_default_domain libintl_nl_default_default_domain
+# define _nl_current_default_domain libintl_nl_current_default_domain
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Name of the default text domain.  */
+extern const char _nl_default_default_domain[] attribute_hidden;
+
+/* Default text domain in which entries for gettext(3) are to be found.  */
+extern const char *_nl_current_default_domain attribute_hidden;
+
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define TEXTDOMAIN __textdomain
+# ifndef strdup
+#  define strdup(str) __strdup (str)
+# endif
+#else
+# define TEXTDOMAIN libintl_textdomain
+#endif
+
+/* Lock variable to protect the global data in the gettext implementation.  */
+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
+
+/* Set the current default message catalog to DOMAINNAME.
+   If DOMAINNAME is null, return the current default.
+   If DOMAINNAME is "", reset to the default of "messages".  */
+char *
+TEXTDOMAIN (const char *domainname)
+{
+  char *new_domain;
+  char *old_domain;
+
+  /* A NULL pointer requests the current setting.  */
+  if (domainname == NULL)
+    return (char *) _nl_current_default_domain;
+
+  __libc_rwlock_wrlock (_nl_state_lock);
+
+  old_domain = (char *) _nl_current_default_domain;
+
+  /* If domain name is the null string set to default domain "messages".  */
+  if (domainname[0] == '\0'
+      || strcmp (domainname, _nl_default_default_domain) == 0)
+    {
+      _nl_current_default_domain = _nl_default_default_domain;
+      new_domain = (char *) _nl_current_default_domain;
+    }
+  else if (strcmp (domainname, old_domain) == 0)
+    /* This can happen and people will use it to signal that some
+       environment variable changed.  */
+    new_domain = old_domain;
+  else
+    {
+      /* If the following malloc fails `_nl_current_default_domain'
+	 will be NULL.  This value will be returned and so signals we
+	 are out of core.  */
+#if defined _LIBC || defined HAVE_STRDUP
+      new_domain = strdup (domainname);
+#else
+      size_t len = strlen (domainname) + 1;
+      new_domain = (char *) malloc (len);
+      if (new_domain != NULL)
+	memcpy (new_domain, domainname, len);
+#endif
+
+      if (new_domain != NULL)
+	_nl_current_default_domain = new_domain;
+    }
+
+  /* We use this possibility to signal a change of the loaded catalogs
+     since this is most likely the case and there is no other easy we
+     to do it.  Do it only when the call was successful.  */
+  if (new_domain != NULL)
+    {
+      ++_nl_msg_cat_cntr;
+
+      if (old_domain != new_domain && old_domain != _nl_default_default_domain)
+	free (old_domain);
+    }
+
+  __libc_rwlock_unlock (_nl_state_lock);
+
+  return new_domain;
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+weak_alias (__textdomain, textdomain);
+#endif
diff --git a/e2fsprogs/intl/vasnprintf.c b/e2fsprogs/intl/vasnprintf.c
new file mode 100644
index 0000000..61bfb9e
--- /dev/null
+++ b/e2fsprogs/intl/vasnprintf.c
@@ -0,0 +1,884 @@
+/* vsprintf with automatic memory allocation.
+   Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+/* Tell glibc's <stdio.h> to provide a prototype for snprintf().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE    1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#ifndef IN_LIBINTL
+# include <alloca.h>
+#endif
+
+/* Specification.  */
+#if WIDE_CHAR_VERSION
+# include "vasnwprintf.h"
+#else
+# include "vasnprintf.h"
+#endif
+
+#include <stdio.h>	/* snprintf(), sprintf() */
+#include <stdlib.h>	/* abort(), malloc(), realloc(), free() */
+#include <string.h>	/* memcpy(), strlen() */
+#include <errno.h>	/* errno */
+#include <limits.h>	/* CHAR_BIT */
+#include <float.h>	/* DBL_MAX_EXP, LDBL_MAX_EXP */
+#if WIDE_CHAR_VERSION
+# include "wprintf-parse.h"
+#else
+# include "printf-parse.h"
+#endif
+
+/* Checked size_t computations.  */
+#include "xsize.h"
+
+#ifdef HAVE_WCHAR_T
+# ifdef HAVE_WCSLEN
+#  define local_wcslen wcslen
+# else
+   /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid
+      a dependency towards this library, here is a local substitute.
+      Define this substitute only once, even if this file is included
+      twice in the same compilation unit.  */
+#  ifndef local_wcslen_defined
+#   define local_wcslen_defined 1
+static size_t
+local_wcslen (const wchar_t *s)
+{
+  const wchar_t *ptr;
+
+  for (ptr = s; *ptr != (wchar_t) 0; ptr++)
+    ;
+  return ptr - s;
+}
+#  endif
+# endif
+#endif
+
+#if WIDE_CHAR_VERSION
+# define VASNPRINTF vasnwprintf
+# define CHAR_T wchar_t
+# define DIRECTIVE wchar_t_directive
+# define DIRECTIVES wchar_t_directives
+# define PRINTF_PARSE wprintf_parse
+# define USE_SNPRINTF 1
+# if HAVE_DECL__SNWPRINTF
+   /* On Windows, the function swprintf() has a different signature than
+      on Unix; we use the _snwprintf() function instead.  */
+#  define SNPRINTF _snwprintf
+# else
+   /* Unix.  */
+#  define SNPRINTF swprintf
+# endif
+#else
+# define VASNPRINTF vasnprintf
+# define CHAR_T char
+# define DIRECTIVE char_directive
+# define DIRECTIVES char_directives
+# define PRINTF_PARSE printf_parse
+# define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF)
+# if HAVE_DECL__SNPRINTF
+   /* Windows.  */
+#  define SNPRINTF _snprintf
+# else
+   /* Unix.  */
+#  define SNPRINTF snprintf
+# endif
+#endif
+
+CHAR_T *
+VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list args)
+{
+  DIRECTIVES d;
+  arguments a;
+
+  if (PRINTF_PARSE (format, &d, &a) < 0)
+    {
+      errno = EINVAL;
+      return NULL;
+    }
+
+#define CLEANUP() \
+  free (d.dir);								\
+  if (a.arg)								\
+    free (a.arg);
+
+  if (printf_fetchargs (args, &a) < 0)
+    {
+      CLEANUP ();
+      errno = EINVAL;
+      return NULL;
+    }
+
+  {
+    size_t buf_neededlength;
+    CHAR_T *buf;
+    CHAR_T *buf_malloced;
+    const CHAR_T *cp;
+    size_t i;
+    DIRECTIVE *dp;
+    /* Output string accumulator.  */
+    CHAR_T *result;
+    size_t allocated;
+    size_t length;
+
+    /* Allocate a small buffer that will hold a directive passed to
+       sprintf or snprintf.  */
+    buf_neededlength =
+      xsum4 (7, d.max_width_length, d.max_precision_length, 6);
+#if HAVE_ALLOCA
+    if (buf_neededlength < 4000 / sizeof (CHAR_T))
+      {
+	buf = (CHAR_T *) alloca (buf_neededlength * sizeof (CHAR_T));
+	buf_malloced = NULL;
+      }
+    else
+#endif
+      {
+	size_t buf_memsize = xtimes (buf_neededlength, sizeof (CHAR_T));
+	if (size_overflow_p (buf_memsize))
+	  goto out_of_memory_1;
+	buf = (CHAR_T *) malloc (buf_memsize);
+	if (buf == NULL)
+	  goto out_of_memory_1;
+	buf_malloced = buf;
+      }
+
+    if (resultbuf != NULL)
+      {
+	result = resultbuf;
+	allocated = *lengthp;
+      }
+    else
+      {
+	result = NULL;
+	allocated = 0;
+      }
+    length = 0;
+    /* Invariants:
+       result is either == resultbuf or == NULL or malloc-allocated.
+       If length > 0, then result != NULL.  */
+
+    /* Ensures that allocated >= needed.  Aborts through a jump to
+       out_of_memory if needed is SIZE_MAX or otherwise too big.  */
+#define ENSURE_ALLOCATION(needed) \
+    if ((needed) > allocated)						     \
+      {									     \
+	size_t memory_size;						     \
+	CHAR_T *memory;							     \
+									     \
+	allocated = (allocated > 0 ? xtimes (allocated, 2) : 12);	     \
+	if ((needed) > allocated)					     \
+	  allocated = (needed);						     \
+	memory_size = xtimes (allocated, sizeof (CHAR_T));		     \
+	if (size_overflow_p (memory_size))				     \
+	  goto out_of_memory;						     \
+	if (result == resultbuf || result == NULL)			     \
+	  memory = (CHAR_T *) malloc (memory_size);			     \
+	else								     \
+	  memory = (CHAR_T *) realloc (result, memory_size);		     \
+	if (memory == NULL)						     \
+	  goto out_of_memory;						     \
+	if (result == resultbuf && length > 0)				     \
+	  memcpy (memory, result, length * sizeof (CHAR_T));		     \
+	result = memory;						     \
+      }
+
+    for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
+      {
+	if (cp != dp->dir_start)
+	  {
+	    size_t n = dp->dir_start - cp;
+	    size_t augmented_length = xsum (length, n);
+
+	    ENSURE_ALLOCATION (augmented_length);
+	    memcpy (result + length, cp, n * sizeof (CHAR_T));
+	    length = augmented_length;
+	  }
+	if (i == d.count)
+	  break;
+
+	/* Execute a single directive.  */
+	if (dp->conversion == '%')
+	  {
+	    size_t augmented_length;
+
+	    if (!(dp->arg_index == ARG_NONE))
+	      abort ();
+	    augmented_length = xsum (length, 1);
+	    ENSURE_ALLOCATION (augmented_length);
+	    result[length] = '%';
+	    length = augmented_length;
+	  }
+	else
+	  {
+	    if (!(dp->arg_index != ARG_NONE))
+	      abort ();
+
+	    if (dp->conversion == 'n')
+	      {
+		switch (a.arg[dp->arg_index].type)
+		  {
+		  case TYPE_COUNT_SCHAR_POINTER:
+		    *a.arg[dp->arg_index].a.a_count_schar_pointer = length;
+		    break;
+		  case TYPE_COUNT_SHORT_POINTER:
+		    *a.arg[dp->arg_index].a.a_count_short_pointer = length;
+		    break;
+		  case TYPE_COUNT_INT_POINTER:
+		    *a.arg[dp->arg_index].a.a_count_int_pointer = length;
+		    break;
+		  case TYPE_COUNT_LONGINT_POINTER:
+		    *a.arg[dp->arg_index].a.a_count_longint_pointer = length;
+		    break;
+#ifdef HAVE_LONG_LONG
+		  case TYPE_COUNT_LONGLONGINT_POINTER:
+		    *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
+		    break;
+#endif
+		  default:
+		    abort ();
+		  }
+	      }
+	    else
+	      {
+		arg_type type = a.arg[dp->arg_index].type;
+		CHAR_T *p;
+		unsigned int prefix_count;
+		int prefixes[2];
+#if !USE_SNPRINTF
+		size_t tmp_length;
+		CHAR_T tmpbuf[700];
+		CHAR_T *tmp;
+
+		/* Allocate a temporary buffer of sufficient size for calling
+		   sprintf.  */
+		{
+		  size_t width;
+		  size_t precision;
+
+		  width = 0;
+		  if (dp->width_start != dp->width_end)
+		    {
+		      if (dp->width_arg_index != ARG_NONE)
+			{
+			  int arg;
+
+			  if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+			    abort ();
+			  arg = a.arg[dp->width_arg_index].a.a_int;
+			  width = (arg < 0 ? (unsigned int) (-arg) : arg);
+			}
+		      else
+			{
+			  const CHAR_T *digitp = dp->width_start;
+
+			  do
+			    width = xsum (xtimes (width, 10), *digitp++ - '0');
+			  while (digitp != dp->width_end);
+			}
+		    }
+
+		  precision = 6;
+		  if (dp->precision_start != dp->precision_end)
+		    {
+		      if (dp->precision_arg_index != ARG_NONE)
+			{
+			  int arg;
+
+			  if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+			    abort ();
+			  arg = a.arg[dp->precision_arg_index].a.a_int;
+			  precision = (arg < 0 ? 0 : arg);
+			}
+		      else
+			{
+			  const CHAR_T *digitp = dp->precision_start + 1;
+
+			  precision = 0;
+			  do
+			    precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+			  while (digitp != dp->precision_end);
+			}
+		    }
+
+		  switch (dp->conversion)
+		    {
+
+		    case 'd': case 'i': case 'u':
+# ifdef HAVE_LONG_LONG
+		      if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+			tmp_length =
+			  (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+					  * 0.30103 /* binary -> decimal */
+					  * 2 /* estimate for FLAG_GROUP */
+					 )
+			  + 1 /* turn floor into ceil */
+			  + 1; /* account for leading sign */
+		      else
+# endif
+		      if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+			tmp_length =
+			  (unsigned int) (sizeof (unsigned long) * CHAR_BIT
+					  * 0.30103 /* binary -> decimal */
+					  * 2 /* estimate for FLAG_GROUP */
+					 )
+			  + 1 /* turn floor into ceil */
+			  + 1; /* account for leading sign */
+		      else
+			tmp_length =
+			  (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+					  * 0.30103 /* binary -> decimal */
+					  * 2 /* estimate for FLAG_GROUP */
+					 )
+			  + 1 /* turn floor into ceil */
+			  + 1; /* account for leading sign */
+		      break;
+
+		    case 'o':
+# ifdef HAVE_LONG_LONG
+		      if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+			tmp_length =
+			  (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+					  * 0.333334 /* binary -> octal */
+					 )
+			  + 1 /* turn floor into ceil */
+			  + 1; /* account for leading sign */
+		      else
+# endif
+		      if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+			tmp_length =
+			  (unsigned int) (sizeof (unsigned long) * CHAR_BIT
+					  * 0.333334 /* binary -> octal */
+					 )
+			  + 1 /* turn floor into ceil */
+			  + 1; /* account for leading sign */
+		      else
+			tmp_length =
+			  (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+					  * 0.333334 /* binary -> octal */
+					 )
+			  + 1 /* turn floor into ceil */
+			  + 1; /* account for leading sign */
+		      break;
+
+		    case 'x': case 'X':
+# ifdef HAVE_LONG_LONG
+		      if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+			tmp_length =
+			  (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+					  * 0.25 /* binary -> hexadecimal */
+					 )
+			  + 1 /* turn floor into ceil */
+			  + 2; /* account for leading sign or alternate form */
+		      else
+# endif
+		      if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+			tmp_length =
+			  (unsigned int) (sizeof (unsigned long) * CHAR_BIT
+					  * 0.25 /* binary -> hexadecimal */
+					 )
+			  + 1 /* turn floor into ceil */
+			  + 2; /* account for leading sign or alternate form */
+		      else
+			tmp_length =
+			  (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+					  * 0.25 /* binary -> hexadecimal */
+					 )
+			  + 1 /* turn floor into ceil */
+			  + 2; /* account for leading sign or alternate form */
+		      break;
+
+		    case 'f': case 'F':
+# ifdef HAVE_LONG_DOUBLE
+		      if (type == TYPE_LONGDOUBLE)
+			tmp_length =
+			  (unsigned int) (LDBL_MAX_EXP
+					  * 0.30103 /* binary -> decimal */
+					  * 2 /* estimate for FLAG_GROUP */
+					 )
+			  + 1 /* turn floor into ceil */
+			  + 10; /* sign, decimal point etc. */
+		      else
+# endif
+			tmp_length =
+			  (unsigned int) (DBL_MAX_EXP
+					  * 0.30103 /* binary -> decimal */
+					  * 2 /* estimate for FLAG_GROUP */
+					 )
+			  + 1 /* turn floor into ceil */
+			  + 10; /* sign, decimal point etc. */
+		      tmp_length = xsum (tmp_length, precision);
+		      break;
+
+		    case 'e': case 'E': case 'g': case 'G':
+		    case 'a': case 'A':
+		      tmp_length =
+			12; /* sign, decimal point, exponent etc. */
+		      tmp_length = xsum (tmp_length, precision);
+		      break;
+
+		    case 'c':
+# if defined HAVE_WINT_T && !WIDE_CHAR_VERSION
+		      if (type == TYPE_WIDE_CHAR)
+			tmp_length = MB_CUR_MAX;
+		      else
+# endif
+			tmp_length = 1;
+		      break;
+
+		    case 's':
+# ifdef HAVE_WCHAR_T
+		      if (type == TYPE_WIDE_STRING)
+			{
+			  tmp_length =
+			    local_wcslen (a.arg[dp->arg_index].a.a_wide_string);
+
+#  if !WIDE_CHAR_VERSION
+			  tmp_length = xtimes (tmp_length, MB_CUR_MAX);
+#  endif
+			}
+		      else
+# endif
+			tmp_length = strlen (a.arg[dp->arg_index].a.a_string);
+		      break;
+
+		    case 'p':
+		      tmp_length =
+			(unsigned int) (sizeof (void *) * CHAR_BIT
+					* 0.25 /* binary -> hexadecimal */
+				       )
+			  + 1 /* turn floor into ceil */
+			  + 2; /* account for leading 0x */
+		      break;
+
+		    default:
+		      abort ();
+		    }
+
+		  if (tmp_length < width)
+		    tmp_length = width;
+
+		  tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
+		}
+
+		if (tmp_length <= sizeof (tmpbuf) / sizeof (CHAR_T))
+		  tmp = tmpbuf;
+		else
+		  {
+		    size_t tmp_memsize = xtimes (tmp_length, sizeof (CHAR_T));
+
+		    if (size_overflow_p (tmp_memsize))
+		      /* Overflow, would lead to out of memory.  */
+		      goto out_of_memory;
+		    tmp = (CHAR_T *) malloc (tmp_memsize);
+		    if (tmp == NULL)
+		      /* Out of memory.  */
+		      goto out_of_memory;
+		  }
+#endif
+
+		/* Construct the format string for calling snprintf or
+		   sprintf.  */
+		p = buf;
+		*p++ = '%';
+		if (dp->flags & FLAG_GROUP)
+		  *p++ = '\'';
+		if (dp->flags & FLAG_LEFT)
+		  *p++ = '-';
+		if (dp->flags & FLAG_SHOWSIGN)
+		  *p++ = '+';
+		if (dp->flags & FLAG_SPACE)
+		  *p++ = ' ';
+		if (dp->flags & FLAG_ALT)
+		  *p++ = '#';
+		if (dp->flags & FLAG_ZERO)
+		  *p++ = '0';
+		if (dp->width_start != dp->width_end)
+		  {
+		    size_t n = dp->width_end - dp->width_start;
+		    memcpy (p, dp->width_start, n * sizeof (CHAR_T));
+		    p += n;
+		  }
+		if (dp->precision_start != dp->precision_end)
+		  {
+		    size_t n = dp->precision_end - dp->precision_start;
+		    memcpy (p, dp->precision_start, n * sizeof (CHAR_T));
+		    p += n;
+		  }
+
+		switch (type)
+		  {
+#ifdef HAVE_LONG_LONG
+		  case TYPE_LONGLONGINT:
+		  case TYPE_ULONGLONGINT:
+		    *p++ = 'l';
+		    /*FALLTHROUGH*/
+#endif
+		  case TYPE_LONGINT:
+		  case TYPE_ULONGINT:
+#ifdef HAVE_WINT_T
+		  case TYPE_WIDE_CHAR:
+#endif
+#ifdef HAVE_WCHAR_T
+		  case TYPE_WIDE_STRING:
+#endif
+		    *p++ = 'l';
+		    break;
+#ifdef HAVE_LONG_DOUBLE
+		  case TYPE_LONGDOUBLE:
+		    *p++ = 'L';
+		    break;
+#endif
+		  default:
+		    break;
+		  }
+		*p = dp->conversion;
+#if USE_SNPRINTF
+		p[1] = '%';
+		p[2] = 'n';
+		p[3] = '\0';
+#else
+		p[1] = '\0';
+#endif
+
+		/* Construct the arguments for calling snprintf or sprintf.  */
+		prefix_count = 0;
+		if (dp->width_arg_index != ARG_NONE)
+		  {
+		    if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+		      abort ();
+		    prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int;
+		  }
+		if (dp->precision_arg_index != ARG_NONE)
+		  {
+		    if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+		      abort ();
+		    prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int;
+		  }
+
+#if USE_SNPRINTF
+		/* Prepare checking whether snprintf returns the count
+		   via %n.  */
+		ENSURE_ALLOCATION (xsum (length, 1));
+		result[length] = '\0';
+#endif
+
+		for (;;)
+		  {
+		    size_t maxlen;
+		    int count;
+		    int retcount;
+
+		    maxlen = allocated - length;
+		    count = -1;
+		    retcount = 0;
+
+#if USE_SNPRINTF
+# define SNPRINTF_BUF(arg) \
+		    switch (prefix_count)				    \
+		      {							    \
+		      case 0:						    \
+			retcount = SNPRINTF (result + length, maxlen, buf,  \
+					     arg, &count);		    \
+			break;						    \
+		      case 1:						    \
+			retcount = SNPRINTF (result + length, maxlen, buf,  \
+					     prefixes[0], arg, &count);	    \
+			break;						    \
+		      case 2:						    \
+			retcount = SNPRINTF (result + length, maxlen, buf,  \
+					     prefixes[0], prefixes[1], arg, \
+					     &count);			    \
+			break;						    \
+		      default:						    \
+			abort ();					    \
+		      }
+#else
+# define SNPRINTF_BUF(arg) \
+		    switch (prefix_count)				    \
+		      {							    \
+		      case 0:						    \
+			count = sprintf (tmp, buf, arg);		    \
+			break;						    \
+		      case 1:						    \
+			count = sprintf (tmp, buf, prefixes[0], arg);	    \
+			break;						    \
+		      case 2:						    \
+			count = sprintf (tmp, buf, prefixes[0], prefixes[1],\
+					 arg);				    \
+			break;						    \
+		      default:						    \
+			abort ();					    \
+		      }
+#endif
+
+		    switch (type)
+		      {
+		      case TYPE_SCHAR:
+			{
+			  int arg = a.arg[dp->arg_index].a.a_schar;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+		      case TYPE_UCHAR:
+			{
+			  unsigned int arg = a.arg[dp->arg_index].a.a_uchar;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+		      case TYPE_SHORT:
+			{
+			  int arg = a.arg[dp->arg_index].a.a_short;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+		      case TYPE_USHORT:
+			{
+			  unsigned int arg = a.arg[dp->arg_index].a.a_ushort;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+		      case TYPE_INT:
+			{
+			  int arg = a.arg[dp->arg_index].a.a_int;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+		      case TYPE_UINT:
+			{
+			  unsigned int arg = a.arg[dp->arg_index].a.a_uint;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+		      case TYPE_LONGINT:
+			{
+			  long int arg = a.arg[dp->arg_index].a.a_longint;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+		      case TYPE_ULONGINT:
+			{
+			  unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+#ifdef HAVE_LONG_LONG
+		      case TYPE_LONGLONGINT:
+			{
+			  long long int arg = a.arg[dp->arg_index].a.a_longlongint;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+		      case TYPE_ULONGLONGINT:
+			{
+			  unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+#endif
+		      case TYPE_DOUBLE:
+			{
+			  double arg = a.arg[dp->arg_index].a.a_double;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+#ifdef HAVE_LONG_DOUBLE
+		      case TYPE_LONGDOUBLE:
+			{
+			  long double arg = a.arg[dp->arg_index].a.a_longdouble;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+#endif
+		      case TYPE_CHAR:
+			{
+			  int arg = a.arg[dp->arg_index].a.a_char;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+#ifdef HAVE_WINT_T
+		      case TYPE_WIDE_CHAR:
+			{
+			  wint_t arg = a.arg[dp->arg_index].a.a_wide_char;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+#endif
+		      case TYPE_STRING:
+			{
+			  const char *arg = a.arg[dp->arg_index].a.a_string;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+#ifdef HAVE_WCHAR_T
+		      case TYPE_WIDE_STRING:
+			{
+			  const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+#endif
+		      case TYPE_POINTER:
+			{
+			  void *arg = a.arg[dp->arg_index].a.a_pointer;
+			  SNPRINTF_BUF (arg);
+			}
+			break;
+		      default:
+			abort ();
+		      }
+
+#if USE_SNPRINTF
+		    /* Portability: Not all implementations of snprintf()
+		       are ISO C 99 compliant.  Determine the number of
+		       bytes that snprintf() has produced or would have
+		       produced.  */
+		    if (count >= 0)
+		      {
+			/* Verify that snprintf() has NUL-terminated its
+			   result.  */
+			if (count < maxlen && result[length + count] != '\0')
+			  abort ();
+			/* Portability hack.  */
+			if (retcount > count)
+			  count = retcount;
+		      }
+		    else
+		      {
+			/* snprintf() doesn't understand the '%n'
+			   directive.  */
+			if (p[1] != '\0')
+			  {
+			    /* Don't use the '%n' directive; instead, look
+			       at the snprintf() return value.  */
+			    p[1] = '\0';
+			    continue;
+			  }
+			else
+			  {
+			    /* Look at the snprintf() return value.  */
+			    if (retcount < 0)
+			      {
+				/* HP-UX 10.20 snprintf() is doubly deficient:
+				   It doesn't understand the '%n' directive,
+				   *and* it returns -1 (rather than the length
+				   that would have been required) when the
+				   buffer is too small.  */
+				size_t bigger_need =
+				  xsum (xtimes (allocated, 2), 12);
+				ENSURE_ALLOCATION (bigger_need);
+				continue;
+			      }
+			    else
+			      count = retcount;
+			  }
+		      }
+#endif
+
+		    /* Attempt to handle failure.  */
+		    if (count < 0)
+		      {
+			if (!(result == resultbuf || result == NULL))
+			  free (result);
+			free (buf_malloced);
+			CLEANUP ();
+			errno = EINVAL;
+			return NULL;
+		      }
+
+#if !USE_SNPRINTF
+		    if (count >= tmp_length)
+		      /* tmp_length was incorrectly calculated - fix the
+			 code above!  */
+		      abort ();
+#endif
+
+		    /* Make room for the result.  */
+		    if (count >= maxlen)
+		      {
+			/* Need at least count bytes.  But allocate
+			   proportionally, to avoid looping eternally if
+			   snprintf() reports a too small count.  */
+			size_t n =
+			  xmax (xsum (length, count), xtimes (allocated, 2));
+
+			ENSURE_ALLOCATION (n);
+#if USE_SNPRINTF
+			continue;
+#endif
+		      }
+
+#if USE_SNPRINTF
+		    /* The snprintf() result did fit.  */
+#else
+		    /* Append the sprintf() result.  */
+		    memcpy (result + length, tmp, count * sizeof (CHAR_T));
+		    if (tmp != tmpbuf)
+		      free (tmp);
+#endif
+
+		    length += count;
+		    break;
+		  }
+	      }
+	  }
+      }
+
+    /* Add the final NUL.  */
+    ENSURE_ALLOCATION (xsum (length, 1));
+    result[length] = '\0';
+
+    if (result != resultbuf && length + 1 < allocated)
+      {
+	/* Shrink the allocated memory if possible.  */
+	CHAR_T *memory;
+
+	memory = (CHAR_T *) realloc (result, (length + 1) * sizeof (CHAR_T));
+	if (memory != NULL)
+	  result = memory;
+      }
+
+    free (buf_malloced);
+    CLEANUP ();
+    *lengthp = length;
+    return result;
+
+  out_of_memory:
+    if (!(result == resultbuf || result == NULL))
+      free (result);
+    free (buf_malloced);
+  out_of_memory_1:
+    CLEANUP ();
+    errno = ENOMEM;
+    return NULL;
+  }
+}
+
+#undef SNPRINTF
+#undef USE_SNPRINTF
+#undef PRINTF_PARSE
+#undef DIRECTIVES
+#undef DIRECTIVE
+#undef CHAR_T
+#undef VASNPRINTF
diff --git a/e2fsprogs/intl/vasnprintf.h b/e2fsprogs/intl/vasnprintf.h
new file mode 100644
index 0000000..65f1bc1
--- /dev/null
+++ b/e2fsprogs/intl/vasnprintf.h
@@ -0,0 +1,61 @@
+/* vsprintf with automatic memory allocation.
+   Copyright (C) 2002-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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 _VASNPRINTF_H
+#define _VASNPRINTF_H
+
+/* Get va_list.  */
+#include <stdarg.h>
+
+/* Get size_t.  */
+#include <stddef.h>
+
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later.  */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
+#  define __attribute__(Spec) /* empty */
+# endif
+/* The __-protected variants of `format' and `printf' attributes
+   are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+#  define __format__ format
+#  define __printf__ printf
+# endif
+#endif
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+/* Write formatted output to a string dynamically allocated with malloc().
+   You can pass a preallocated buffer for the result in RESULTBUF and its
+   size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
+   If successful, return the address of the string (this may be = RESULTBUF
+   if no dynamic memory allocation was necessary) and set *LENGTHP to the
+   number of resulting bytes, excluding the trailing NUL.  Upon error, set
+   errno and return NULL.  */
+extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 3, 4)));
+extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 3, 0)));
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif /* _VASNPRINTF_H */
diff --git a/e2fsprogs/intl/vasnwprintf.h b/e2fsprogs/intl/vasnwprintf.h
new file mode 100644
index 0000000..d3cef4c
--- /dev/null
+++ b/e2fsprogs/intl/vasnwprintf.h
@@ -0,0 +1,46 @@
+/* vswprintf with automatic memory allocation.
+   Copyright (C) 2002-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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 _VASNWPRINTF_H
+#define _VASNWPRINTF_H
+
+/* Get va_list.  */
+#include <stdarg.h>
+
+/* Get wchar_t, size_t.  */
+#include <stddef.h>
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+/* Write formatted output to a string dynamically allocated with malloc().
+   You can pass a preallocated buffer for the result in RESULTBUF and its
+   size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
+   If successful, return the address of the string (this may be = RESULTBUF
+   if no dynamic memory allocation was necessary) and set *LENGTHP to the
+   number of resulting bytes, excluding the trailing NUL.  Upon error, set
+   errno and return NULL.  */
+extern wchar_t * asnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, ...);
+extern wchar_t * vasnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, va_list args);
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif /* _VASNWPRINTF_H */
diff --git a/e2fsprogs/intl/wprintf-parse.h b/e2fsprogs/intl/wprintf-parse.h
new file mode 100644
index 0000000..24a2cfc
--- /dev/null
+++ b/e2fsprogs/intl/wprintf-parse.h
@@ -0,0 +1,75 @@
+/* Parse printf format string.
+   Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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 _WPRINTF_PARSE_H
+#define _WPRINTF_PARSE_H
+
+#include "printf-args.h"
+
+
+/* Flags */
+#define FLAG_GROUP	 1	/* ' flag */
+#define FLAG_LEFT	 2	/* - flag */
+#define FLAG_SHOWSIGN	 4	/* + flag */
+#define FLAG_SPACE	 8	/* space flag */
+#define FLAG_ALT	16	/* # flag */
+#define FLAG_ZERO	32
+
+/* arg_index value indicating that no argument is consumed.  */
+#define ARG_NONE	(~(size_t)0)
+
+/* A parsed directive.  */
+typedef struct
+{
+  const wchar_t* dir_start;
+  const wchar_t* dir_end;
+  int flags;
+  const wchar_t* width_start;
+  const wchar_t* width_end;
+  size_t width_arg_index;
+  const wchar_t* precision_start;
+  const wchar_t* precision_end;
+  size_t precision_arg_index;
+  wchar_t conversion; /* d i o u x X f e E g G c s p n U % but not C S */
+  size_t arg_index;
+}
+wchar_t_directive;
+
+/* A parsed format string.  */
+typedef struct
+{
+  size_t count;
+  wchar_t_directive *dir;
+  size_t max_width_length;
+  size_t max_precision_length;
+}
+wchar_t_directives;
+
+
+/* Parses the format string.  Fills in the number N of directives, and fills
+   in directives[0], ..., directives[N-1], and sets directives[N].dir_start
+   to the end of the format string.  Also fills in the arg_type fields of the
+   arguments and the needed count of arguments.  */
+#ifdef STATIC
+STATIC
+#else
+extern
+#endif
+int wprintf_parse (const wchar_t *format, wchar_t_directives *d, arguments *a);
+
+#endif /* _WPRINTF_PARSE_H */
diff --git a/e2fsprogs/intl/xsize.h b/e2fsprogs/intl/xsize.h
new file mode 100644
index 0000000..362e24b
--- /dev/null
+++ b/e2fsprogs/intl/xsize.h
@@ -0,0 +1,109 @@
+/* xsize.h -- Checked size_t computations.
+
+   Copyright (C) 2003 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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 _XSIZE_H
+#define _XSIZE_H
+
+/* Get size_t.  */
+#include <stddef.h>
+
+/* Get SIZE_MAX.  */
+#include <limits.h>
+#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+/* The size of memory objects is often computed through expressions of
+   type size_t. Example:
+      void* p = malloc (header_size + n * element_size).
+   These computations can lead to overflow.  When this happens, malloc()
+   returns a piece of memory that is way too small, and the program then
+   crashes while attempting to fill the memory.
+   To avoid this, the functions and macros in this file check for overflow.
+   The convention is that SIZE_MAX represents overflow.
+   malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc
+   implementation that uses mmap --, it's recommended to use size_overflow_p()
+   or size_in_bounds_p() before invoking malloc().
+   The example thus becomes:
+      size_t size = xsum (header_size, xtimes (n, element_size));
+      void *p = (size_in_bounds_p (size) ? malloc (size) : NULL);
+*/
+
+/* Convert an arbitrary value >= 0 to type size_t.  */
+#define xcast_size_t(N) \
+  ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
+
+/* Sum of two sizes, with overflow check.  */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xsum (size_t size1, size_t size2)
+{
+  size_t sum = size1 + size2;
+  return (sum >= size1 ? sum : SIZE_MAX);
+}
+
+/* Sum of three sizes, with overflow check.  */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xsum3 (size_t size1, size_t size2, size_t size3)
+{
+  return xsum (xsum (size1, size2), size3);
+}
+
+/* Sum of four sizes, with overflow check.  */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
+{
+  return xsum (xsum (xsum (size1, size2), size3), size4);
+}
+
+/* Maximum of two sizes, with overflow check.  */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xmax (size_t size1, size_t size2)
+{
+  /* No explicit check is needed here, because for any n:
+     max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX.  */
+  return (size1 >= size2 ? size1 : size2);
+}
+
+/* Multiplication of a count with an element size, with overflow check.
+   The count must be >= 0 and the element size must be > 0.
+   This is a macro, not an inline function, so that it works correctly even
+   when N is of a wider tupe and N > SIZE_MAX.  */
+#define xtimes(N, ELSIZE) \
+  ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
+
+/* Check for overflow.  */
+#define size_overflow_p(SIZE) \
+  ((SIZE) == SIZE_MAX)
+/* Check against overflow.  */
+#define size_in_bounds_p(SIZE) \
+  ((SIZE) != SIZE_MAX)
+
+#endif /* _XSIZE_H */
diff --git a/e2fsprogs/lib/Android.mk b/e2fsprogs/lib/Android.mk
new file mode 100644
index 0000000..5053e7d
--- /dev/null
+++ b/e2fsprogs/lib/Android.mk
@@ -0,0 +1 @@
+include $(call all-subdir-makefiles)
diff --git a/e2fsprogs/lib/Makefile.bsd-lib b/e2fsprogs/lib/Makefile.bsd-lib
new file mode 100644
index 0000000..0ca09f8
--- /dev/null
+++ b/e2fsprogs/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) $(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/e2fsprogs/lib/Makefile.checker b/e2fsprogs/lib/Makefile.checker
new file mode 100644
index 0000000..7bff0f4
--- /dev/null
+++ b/e2fsprogs/lib/Makefile.checker
@@ -0,0 +1,17 @@
+all:: $(LIBRARY)_chk.a
+
+real-subdirs:: Makefile
+	$(E) "	MKDIR checker"
+	$(Q) mkdir -p checker
+
+clean::
+	$(RM) -rf checker
+
+$(LIBRARY)_chk.a: $(OBJS)
+	$(E) "	GEN_CHECKER_LIB $@"
+	$(Q) (test -r $@ && $(RM) -f $@.bak && $(MV) $@ $@.bak)
+	$(Q) (cd checker; $(ARGEN) $@ $(OBJS))
+	-$(Q) $(RANLIB) $@
+	$(Q) $(RM) -f ../$@
+	$(Q) (cd .. ; $(LN) $(LINK_BUILD_FLAGS) \
+	     `echo $(my_dir) | sed -e 's;lib/;;'`/$@ $@)
diff --git a/e2fsprogs/lib/Makefile.darwin-lib b/e2fsprogs/lib/Makefile.darwin-lib
new file mode 100644
index 0000000..c94a5e7
--- /dev/null
+++ b/e2fsprogs/lib/Makefile.darwin-lib
@@ -0,0 +1,51 @@
+#
+# 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) \
+		-flat_namespace -undefined warning -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/e2fsprogs/lib/Makefile.elf-lib b/e2fsprogs/lib/Makefile.elf-lib
new file mode 100644
index 0000000..78479d3
--- /dev/null
+++ b/e2fsprogs/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) --shared -o $(ELF_LIB) \
+		-L$(top_builddir)/../lib $(LDFLAGS) \
+		-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) "	MKINSTALLDIRS $(ELF_INSTALL_DIR) $(libdir)"
+	$(Q) $(MKINSTALLDIRS) $(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/e2fsprogs/lib/Makefile.library b/e2fsprogs/lib/Makefile.library
new file mode 100644
index 0000000..1b86b02
--- /dev/null
+++ b/e2fsprogs/lib/Makefile.library
@@ -0,0 +1,25 @@
+all:: subdirs $(LIBRARY).a
+
+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/e2fsprogs/lib/Makefile.profile b/e2fsprogs/lib/Makefile.profile
new file mode 100644
index 0000000..180f5bc
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/Makefile.solaris-lib b/e2fsprogs/lib/Makefile.solaris-lib
new file mode 100644
index 0000000..5990be8
--- /dev/null
+++ b/e2fsprogs/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) \
+		-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::
+	$(MKINSTALLDIRS) $(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/e2fsprogs/lib/blkid/Android.mk b/e2fsprogs/lib/blkid/Android.mk
new file mode 100644
index 0000000..4bd59ec
--- /dev/null
+++ b/e2fsprogs/lib/blkid/Android.mk
@@ -0,0 +1,93 @@
+LOCAL_PATH := $(call my-dir)
+
+libext2_blkid_src_files := \
+	cache.c \
+	dev.c \
+	devname.c \
+	devno.c \
+	getsize.c \
+	llseek.c \
+	probe.c \
+	read.c \
+	resolve.c \
+	save.c \
+	tag.c \
+	version.c \
+
+
+libext2_blkid_shared_libraries := libext2_uuid
+
+libext2_blkid_system_shared_libraries := libc
+
+libext2_blkid_static_libraries := libext2_uuid_static
+
+libext2_blkid_system_static_libraries := libc
+
+libext2_blkid_c_includes := external/e2fsprogs/lib
+
+libext2_blkid_cflags := -O2 -g -W -Wall -fno-strict-aliasing \
+	-DHAVE_UNISTD_H \
+	-DHAVE_ERRNO_H \
+	-DHAVE_NETINET_IN_H \
+	-DHAVE_SYS_IOCTL_H \
+	-DHAVE_SYS_MMAN_H \
+	-DHAVE_SYS_MOUNT_H \
+	-DHAVE_SYS_RESOURCE_H \
+	-DHAVE_SYS_SELECT_H \
+	-DHAVE_SYS_STAT_H \
+	-DHAVE_SYS_TYPES_H \
+	-DHAVE_STDLIB_H \
+	-DHAVE_STRDUP \
+	-DHAVE_MMAP \
+	-DHAVE_UTIME_H \
+	-DHAVE_GETPAGESIZE \
+	-DHAVE_EXT2_IOCTLS \
+	-DHAVE_TYPE_SSIZE_T \
+	-DHAVE_SYS_TIME_H \
+        -DHAVE_SYS_PARAM_H \
+	-DHAVE_SYSCONF \
+	-Wno-unused-parameter
+
+libext2_blkid_cflags_linux := \
+	-DHAVE_LINUX_FD_H \
+	-DHAVE_SYS_PRCTL_H \
+	-DHAVE_LSEEK64 \
+	-DHAVE_LSEEK64_PROTOTYPE
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_blkid_src_files)
+LOCAL_SYSTEM_SHARED_LIBRARIES := $(libext2_blkid_system_shared_libraries)
+LOCAL_SHARED_LIBRARIES := $(libext2_blkid_shared_libraries)
+LOCAL_C_INCLUDES := $(libext2_blkid_c_includes)
+LOCAL_CFLAGS := $(libext2_blkid_cflags) $(libext2_blkid_cflags_linux) -fno-strict-aliasing
+LOCAL_MODULE := libext2_blkid
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_blkid_src_files)
+LOCAL_STATIC_LIBRARIES := $(libext2_blkid_static_libraries) $(libext2_blkid_system_static_libraries)
+LOCAL_C_INCLUDES := $(libext2_blkid_c_includes)
+LOCAL_CFLAGS := $(libext2_blkid_cflags) $(libext2_blkid_cflags_linux) -fno-strict-aliasing
+LOCAL_MODULE := libext2_blkid
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_blkid_src_files)
+LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(libext2_blkid_shared_libraries))
+LOCAL_C_INCLUDES := $(libext2_blkid_c_includes)
+ifeq ($(HOST_OS),linux)
+LOCAL_CFLAGS := $(libext2_blkid_cflags) $(libext2_blkid_cflags_linux)
+else
+LOCAL_CFLAGS := $(libext2_blkid_cflags)
+endif
+LOCAL_MODULE := libext2_blkid-host
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_SHARED_LIBRARY)
diff --git a/e2fsprogs/lib/blkid/Makefile.in b/e2fsprogs/lib/blkid/Makefile.in
new file mode 100644
index 0000000..3f15c67
--- /dev/null
+++ b/e2fsprogs/lib/blkid/Makefile.in
@@ -0,0 +1,223 @@
+# 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@
+
+@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@
+@MAKEFILE_CHECKER@
+
+LIBS_BLKID=	$(STATIC_LIBBLKID) $(STATIC_LIBUUID)
+DEPLIBS_BLKID=	$(DEPSTATIC_LIBBLKID) $(DEPSTATIC_LIBUUID)
+
+.c.o:
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+@CHECKER_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
+@ELF_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
+@BSDLIB_CMT@	$(Q) $(CC) $(ALL_CFLAGS) $(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 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
+
+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) "	MKINSTALLDIRS $(libdir) $(includedir)/blkid"
+	$(Q) $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
+		$(DESTDIR)$(includedir)/blkid $(DESTDIR)$(libdir)/pkgconfig
+
+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 $(libdir)/pkgconfig/blkid.pc"
+	$(Q) $(INSTALL_DATA) blkid.pc $(DESTDIR)$(libdir)/pkgconfig/blkid.pc
+
+uninstall::
+	$(RM) -f $(DESTDIR)$(libdir)/libblkid.a \
+		$(DESTDIR)$(libdir)/pkgconfig/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/* \
+		checker/* blkid.h blkid_types.h ../libblkid.a ../libblkid_p.a \
+		$(SMANPAGES) blkid
+	@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/e2fsprogs/lib/blkid/blkid.h b/e2fsprogs/lib/blkid/blkid.h
new file mode 100644
index 0000000..81f3098
--- /dev/null
+++ b/e2fsprogs/lib/blkid/blkid.h
@@ -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/e2fsprogs/lib/blkid/blkid.h.in b/e2fsprogs/lib/blkid/blkid.h.in
new file mode 100644
index 0000000..81f3098
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/blkid/blkid.pc.in b/e2fsprogs/lib/blkid/blkid.pc.in
new file mode 100644
index 0000000..808fe22
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/blkid/blkidP.h b/e2fsprogs/lib/blkid/blkidP.h
new file mode 100644
index 0000000..e0f11a0
--- /dev/null
+++ b/e2fsprogs/lib/blkid/blkidP.h
@@ -0,0 +1,189 @@
+/*
+ * 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>
+
+#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
+
+/* devno.c */
+struct dir_list {
+	char	*name;
+	struct dir_list *next;
+};
+extern void blkid__scan_dir(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/e2fsprogs/lib/blkid/blkid_types.h b/e2fsprogs/lib/blkid/blkid_types.h
new file mode 100644
index 0000000..3ffaee5
--- /dev/null
+++ b/e2fsprogs/lib/blkid/blkid_types.h
@@ -0,0 +1,133 @@
+/* 
+ * 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
+
+
+#ifdef __U8_TYPEDEF
+typedef __U8_TYPEDEF __u8;
+#else
+typedef unsigned char __u8;
+#endif
+
+#ifdef __S8_TYPEDEF
+typedef __S8_TYPEDEF __s8;
+#else
+typedef signed char __s8;
+#endif
+
+#ifdef __U16_TYPEDEF
+typedef __U16_TYPEDEF __u16;
+#else
+#if (4 == 2)
+typedef	unsigned int	__u16;
+#else
+#if (2 == 2)
+typedef	unsigned short	__u16;
+#else
+  ?==error: undefined 16 bit type
+#endif /* SIZEOF_SHORT == 2 */
+#endif /* SIZEOF_INT == 2 */
+#endif /* __U16_TYPEDEF */
+
+#ifdef __S16_TYPEDEF
+typedef __S16_TYPEDEF __s16;
+#else
+#if (4 == 2)
+typedef	int		__s16;
+#else
+#if (2 == 2)
+typedef	short		__s16;
+#else
+  ?==error: undefined 16 bit type
+#endif /* SIZEOF_SHORT == 2 */
+#endif /* SIZEOF_INT == 2 */
+#endif /* __S16_TYPEDEF */
+
+
+#ifdef __U32_TYPEDEF
+typedef __U32_TYPEDEF __u32;
+#else
+#if (4 == 4)
+typedef	unsigned int	__u32;
+#else
+#if (4 == 4)
+typedef	unsigned long	__u32;
+#else
+#if (2 == 4)
+typedef	unsigned short	__u32;
+#else
+ ?== error: undefined 32 bit type
+#endif /* SIZEOF_SHORT == 4 */
+#endif /* SIZEOF_LONG == 4 */
+#endif /* SIZEOF_INT == 4 */
+#endif /* __U32_TYPEDEF */
+
+#ifdef __S32_TYPEDEF
+typedef __S32_TYPEDEF __s32;
+#else
+#if (4 == 4)
+typedef	int		__s32;
+#else
+#if (4 == 4)
+typedef	long		__s32;
+#else
+#if (2 == 4)
+typedef	short		__s32;
+#else
+ ?== error: undefined 32 bit type
+#endif /* SIZEOF_SHORT == 4 */
+#endif /* SIZEOF_LONG == 4 */
+#endif /* SIZEOF_INT == 4 */
+#endif /* __S32_TYPEDEF */
+
+#ifdef __U64_TYPEDEF
+typedef __U64_TYPEDEF __u64;
+#else
+#if (4 == 8)
+typedef unsigned int	__u64;
+#else
+#if (8 == 8)
+typedef unsigned long long	__u64;
+#else
+#if (4 == 8)
+typedef unsigned long	__u64;
+#endif /* SIZEOF_LONG == 8 */
+#endif /* SIZEOF_LONG_LONG == 8 */
+#endif /* SIZEOF_INT == 8 */
+#endif /* __U64_TYPEDEF */
+
+#ifdef __S64_TYPEDEF
+typedef __S64_TYPEDEF __s64;
+#else
+#if (4 == 8)
+typedef int		__s64;
+#else
+#if (8 == 8)
+#if defined(__GNUC__)
+typedef __signed__ long long 	__s64;
+#else
+typedef signed long long 	__s64;
+#endif /* __GNUC__ */
+#else
+#if (4 == 8)
+typedef long		__s64;
+#endif /* SIZEOF_LONG == 8 */
+#endif /* SIZEOF_LONG_LONG == 8 */
+#endif /* SIZEOF_INT == 8 */
+#endif /* __S64_TYPEDEF */
+
+#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/e2fsprogs/lib/blkid/blkid_types.h.in b/e2fsprogs/lib/blkid/blkid_types.h.in
new file mode 100644
index 0000000..2edc0da
--- /dev/null
+++ b/e2fsprogs/lib/blkid/blkid_types.h.in
@@ -0,0 +1,134 @@
+/* 
+ * 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@
+
+#ifdef __U8_TYPEDEF
+typedef __U8_TYPEDEF __u8;
+#else
+typedef unsigned char __u8;
+#endif
+
+#ifdef __S8_TYPEDEF
+typedef __S8_TYPEDEF __s8;
+#else
+typedef signed char __s8;
+#endif
+
+#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
+  ?==error: undefined 16 bit type
+#endif /* SIZEOF_SHORT == 2 */
+#endif /* SIZEOF_INT == 2 */
+#endif /* __U16_TYPEDEF */
+
+#ifdef __S16_TYPEDEF
+typedef __S16_TYPEDEF __s16;
+#else
+#if (@SIZEOF_INT@ == 2)
+typedef	int		__s16;
+#else
+#if (@SIZEOF_SHORT@ == 2)
+typedef	short		__s16;
+#else
+  ?==error: undefined 16 bit type
+#endif /* SIZEOF_SHORT == 2 */
+#endif /* SIZEOF_INT == 2 */
+#endif /* __S16_TYPEDEF */
+
+
+#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
+ ?== error: undefined 32 bit type
+#endif /* SIZEOF_SHORT == 4 */
+#endif /* SIZEOF_LONG == 4 */
+#endif /* SIZEOF_INT == 4 */
+#endif /* __U32_TYPEDEF */
+
+#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
+ ?== error: undefined 32 bit type
+#endif /* SIZEOF_SHORT == 4 */
+#endif /* SIZEOF_LONG == 4 */
+#endif /* SIZEOF_INT == 4 */
+#endif /* __S32_TYPEDEF */
+
+#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;
+#endif /* SIZEOF_LONG == 8 */
+#endif /* SIZEOF_LONG_LONG == 8 */
+#endif /* SIZEOF_INT == 8 */
+#endif /* __U64_TYPEDEF */
+
+#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;
+#endif /* SIZEOF_LONG == 8 */
+#endif /* SIZEOF_LONG_LONG == 8 */
+#endif /* SIZEOF_INT == 8 */
+#endif /* __S64_TYPEDEF */
+
+#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/e2fsprogs/lib/blkid/cache.c b/e2fsprogs/lib/blkid/cache.c
new file mode 100644
index 0000000..e2ccafd
--- /dev/null
+++ b/e2fsprogs/lib/blkid/cache.c
@@ -0,0 +1,213 @@
+/*
+ * 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%
+ */
+
+#if HAVE_SECURE_GETENV
+#define _GNU_SOURCE
+#endif
+#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 (!p)
+			break;
+		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/e2fsprogs/lib/blkid/dev.c b/e2fsprogs/lib/blkid/dev.c
new file mode 100644
index 0000000..128a869
--- /dev/null
+++ b/e2fsprogs/lib/blkid/dev.c
@@ -0,0 +1,252 @@
+/*
+ * 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 <stdlib.h>
+#include <string.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 implemenation.  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/e2fsprogs/lib/blkid/devname.c b/e2fsprogs/lib/blkid/devname.c
new file mode 100644
index 0000000..b151354
--- /dev/null
+++ b/e2fsprogs/lib/blkid/devname.c
@@ -0,0 +1,558 @@
+/*
+ * 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 <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
+#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;
+			if (!p)
+				break;
+			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[256];
+	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[256], 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 && S_ISBLK(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[128], ptname1[128], *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/e2fsprogs/lib/blkid/devno.c b/e2fsprogs/lib/blkid/devno.c
new file mode 100644
index 0000000..c9f5c92
--- /dev/null
+++ b/e2fsprogs/lib/blkid/devno.c
@@ -0,0 +1,228 @@
+/*
+ * 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 <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
+
+#include "blkidP.h"
+
+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;
+}
+
+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(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 (S_ISBLK(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/e2fsprogs/lib/blkid/getsize.c b/e2fsprogs/lib/blkid/getsize.c
new file mode 100644
index 0000000..ac4177e
--- /dev/null
+++ b/e2fsprogs/lib/blkid/getsize.c
@@ -0,0 +1,213 @@
+/*
+ * 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%
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+/* include this before sys/queues.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
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h> /* for LIST_HEAD */
+#endif
+#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_loff_t high, low;
+
+#ifdef DKIOCGETBLOCKCOUNT	/* For Apple Darwin */
+	if (ioctl(fd, DKIOCGETBLOCKCOUNT, &size64) >= 0) {
+		if (sizeof(blkid_loff_t) < sizeof(unsigned long long) &&
+		    (size64 << 9) > 0xFFFFFFFF)
+			return 0; /* EFBIG */
+		return (blkid_loff_t)size64 << 9;
+	}
+#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
+#ifdef HAVE_SYS_DISKLABEL_H
+	{
+		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 &&
+		    (S_ISBLK(st.st_mode) || S_ISCHR(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 /* HAVE_SYS_DISKLABEL_H */
+	{
+#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/e2fsprogs/lib/blkid/libblkid.3.in b/e2fsprogs/lib/blkid/libblkid.3.in
new file mode 100644
index 0000000..bd24cb1
--- /dev/null
+++ b/e2fsprogs/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.
+filesystem type) as well as extracting additional information such as
+filesystem 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 filesystem utilties, 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/e2fsprogs/lib/blkid/list.h b/e2fsprogs/lib/blkid/list.h
new file mode 100644
index 0000000..26a5ac1
--- /dev/null
+++ b/e2fsprogs/lib/blkid/list.h
@@ -0,0 +1,176 @@
+#if !defined(_BLKID_LIST_H) && !defined(LIST_HEAD_INIT)
+#define _BLKID_LIST_H
+
+#ifdef __cplusplus
+extern "C" {
+#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)(&((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/e2fsprogs/lib/blkid/llseek.c b/e2fsprogs/lib/blkid/llseek.c
new file mode 100644
index 0000000..5bd0e51
--- /dev/null
+++ b/e2fsprogs/lib/blkid/llseek.c
@@ -0,0 +1,142 @@
+/*
+ * 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%
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#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 <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/e2fsprogs/lib/blkid/probe.c b/e2fsprogs/lib/blkid/probe.c
new file mode 100644
index 0000000..8215768
--- /dev/null
+++ b/e2fsprogs/lib/blkid/probe.c
@@ -0,0 +1,1694 @@
+/*
+ * 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 <stdio.h>
+#include <string.h>
+#include <stdlib.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 == ' ' || *end == 0) && end >= label)
+		--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 (strlen(es->s_volume_name))
+		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()
+{
+#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 = (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 = (reserved * 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) != (1 << blkid_le16(js->js_l2bsize)))
+		return 1;
+
+	if (blkid_le32(js->js_pbsize) != (1 << 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, struct blkid_magic *id,
+		     unsigned char *buf)
+{
+#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[40];
+
+	/* 168 is the offset to the 40 character uuid:
+	 * http://luks.endorphin.org/LUKS-on-disk-format.pdf */
+	strncpy(uuid, (char *) buf+168, 40);
+	blkid_set_tag(probe->dev, "UUID", uuid, sizeof(uuid));
+	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, 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 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;
+	unsigned long long *uuid_ptr;
+	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+ */
+
+	uuid_ptr = (unsigned long long *)hfs->finder_info.id;
+	uuid = blkid_le64(*uuid_ptr);
+	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;
+}
+
+
+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;
+	unsigned long long *uuid_ptr;
+	__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;
+
+	uuid_ptr = (unsigned long long *)hfsplus->finder_info.id;
+	uuid = blkid_le64(*uuid_ptr);
+	if (uuid) {
+		sprintf(uuid_str, "%016llX", uuid);
+		blkid_set_tag(probe->dev, "UUID", uuid_str, 0);
+	}
+
+	blocksize = blkid_be32(hfsplus->blocksize);
+	memcpy(extents, hfsplus->cat_file.extents, sizeof(extents));
+	cat_block = blkid_be32(extents[0].start_block);
+
+	buf = get_buffer(probe, off + (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 = (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 <= 32;
+	     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,
+			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,
+            unsigned char *buf)
+{
+    struct f2fs_super_block *bs;
+
+    bs = (struct f2fs_super_block *)buf;
+    set_uuid(probe->dev, bs->uuid, 0);
+    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",       8,	 0,  8, "\0\0\x02\xf5\xb0\x07\xb1\x0c", probe_zfs },
+  { "zfs",       8,	 0,  8, "\x0c\xb1\x07\xb0\xf5\x02\0\0", probe_zfs },
+  { "zfs",     264,	 0,  8, "\0\0\x02\xf5\xb0\x07\xb1\x0c", probe_zfs },
+  { "zfs",     264,	 0,  8, "\x0c\xb1\x07\xb0\xf5\x02\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 },
+  {   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, 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/e2fsprogs/lib/blkid/probe.h b/e2fsprogs/lib/blkid/probe.h
new file mode 100644
index 0000000..8eef37e
--- /dev/null
+++ b/e2fsprogs/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 <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
+
+/* 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 allowr 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__));
+
+/*
+ * Byte swap functions
+ */
+#ifdef __GNUC__
+#define _INLINE_ static __inline__
+#else				/* For Watcom C */
+#define _INLINE_ static inline
+#endif
+
+static __u16 blkid_swab16(__u16 val);
+static __u32 blkid_swab32(__u32 val);
+static __u64 blkid_swab64(__u64 val);
+
+#if ((defined __GNUC__) && \
+     (defined(__i386__) || defined(__i486__) || defined(__i586__)))
+
+#define _BLKID_HAVE_ASM_BITOPS_
+
+_INLINE_ __u32 blkid_swab32(__u32 val)
+{
+#ifdef EXT2FS_REQUIRE_486
+	__asm__("bswap %0" : "=r" (val) : "0" (val));
+#else
+	__asm__("xchgb %b0,%h0\n\t"	/* swap lower bytes	*/
+		"rorl $16,%0\n\t"	/* swap words		*/
+		"xchgb %b0,%h0"		/* swap higher bytes	*/
+		:"=q" (val)
+		: "0" (val));
+#endif
+	return val;
+}
+
+_INLINE_ __u16 blkid_swab16(__u16 val)
+{
+	__asm__("xchgb %b0,%h0"		/* swap bytes		*/ \
+		: "=q" (val) \
+		:  "0" (val)); \
+		return val;
+}
+
+_INLINE_ __u64 blkid_swab64(__u64 val)
+{
+	return (blkid_swab32(val >> 32) |
+		(((__u64) blkid_swab32(val & 0xFFFFFFFFUL)) << 32));
+}
+#endif
+
+#if !defined(_BLKID_HAVE_ASM_BITOPS_)
+
+_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));
+}
+#endif
+
+
+
+#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/e2fsprogs/lib/blkid/read.c b/e2fsprogs/lib/blkid/read.c
new file mode 100644
index 0000000..ca2798f
--- /dev/null
+++ b/e2fsprogs/lib/blkid/read.c
@@ -0,0 +1,493 @@
+/*
+ * 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 <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/e2fsprogs/lib/blkid/resolve.c b/e2fsprogs/lib/blkid/resolve.c
new file mode 100644
index 0000000..6c2e268
--- /dev/null
+++ b/e2fsprogs/lib/blkid/resolve.c
@@ -0,0 +1,139 @@
+/*
+ * 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 <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/e2fsprogs/lib/blkid/save.c b/e2fsprogs/lib/blkid/save.c
new file mode 100644
index 0000000..6802e9d
--- /dev/null
+++ b/e2fsprogs/lib/blkid/save.c
@@ -0,0 +1,193 @@
+/*
+ * 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 <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"
+
+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) {
+			sprintf(tmp, "%s-XXXXXX", filename);
+			fd = mkstemp(tmp);
+			if (fd >= 0) {
+				file = fdopen(fd, "w");
+				opened = tmp;
+			}
+			fchmod(fd, 0644);
+		}
+	}
+
+	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) {
+			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);
+				link(filename, backup);
+				free(backup);
+			}
+			rename(opened, filename);
+			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/e2fsprogs/lib/blkid/tag.c b/e2fsprogs/lib/blkid/tag.c
new file mode 100644
index 0000000..639ef89
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tag.c
@@ -0,0 +1,470 @@
+/*
+ * 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 <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 implemenation.  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/e2fsprogs/lib/blkid/test_probe.in b/e2fsprogs/lib/blkid/test_probe.in
new file mode 100644
index 0000000..9b3edf5
--- /dev/null
+++ b/e2fsprogs/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" ]; 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" ]; 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/e2fsprogs/lib/blkid/tests/cramfs.img.bz2 b/e2fsprogs/lib/blkid/tests/cramfs.img.bz2
new file mode 100644
index 0000000..d638116
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/cramfs.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/cramfs.results b/e2fsprogs/lib/blkid/tests/cramfs.results
new file mode 100644
index 0000000..984d9e2
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/cramfs.results
@@ -0,0 +1,2 @@
+TYPE='cramfs'
+LABEL='test-cram'
diff --git a/e2fsprogs/lib/blkid/tests/ext2.img.bz2 b/e2fsprogs/lib/blkid/tests/ext2.img.bz2
new file mode 100644
index 0000000..d1811ce
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/ext2.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/ext2.results b/e2fsprogs/lib/blkid/tests/ext2.results
new file mode 100644
index 0000000..4fa7a2a
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/ext2.results
@@ -0,0 +1,3 @@
+TYPE='ext2'
+LABEL='test-ext2'
+UUID='22f0eac3-5c89-4ec1-9076-60799119aaea'
diff --git a/e2fsprogs/lib/blkid/tests/ext3.img.bz2 b/e2fsprogs/lib/blkid/tests/ext3.img.bz2
new file mode 100644
index 0000000..5394598
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/ext3.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/ext3.results b/e2fsprogs/lib/blkid/tests/ext3.results
new file mode 100644
index 0000000..4dc2252
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/ext3.results
@@ -0,0 +1,3 @@
+TYPE='ext3'
+LABEL='test-ext3'
+UUID='35f66dab-477e-4090-a872-95ee0e493ad6'
diff --git a/e2fsprogs/lib/blkid/tests/fat.img.bz2 b/e2fsprogs/lib/blkid/tests/fat.img.bz2
new file mode 100644
index 0000000..1fa7f2d
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/fat.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/fat.results b/e2fsprogs/lib/blkid/tests/fat.results
new file mode 100644
index 0000000..7441872
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/fat.results
@@ -0,0 +1,3 @@
+TYPE='vfat'
+LABEL='TEST-FAT'
+UUID='DEAD-BEEF'
diff --git a/e2fsprogs/lib/blkid/tests/fat32_label_64MB.img.bz2 b/e2fsprogs/lib/blkid/tests/fat32_label_64MB.img.bz2
new file mode 100644
index 0000000..ca76293
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/fat32_label_64MB.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/fat32_label_64MB.results b/e2fsprogs/lib/blkid/tests/fat32_label_64MB.results
new file mode 100644
index 0000000..f2f56c2
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/fat32_label_64MB.results
@@ -0,0 +1,3 @@
+TYPE='vfat'
+LABEL='BINGO'
+UUID='8CB5-BA49'
diff --git a/e2fsprogs/lib/blkid/tests/iso.img.bz2 b/e2fsprogs/lib/blkid/tests/iso.img.bz2
new file mode 100644
index 0000000..4efb6ad
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/iso.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/iso.results b/e2fsprogs/lib/blkid/tests/iso.results
new file mode 100644
index 0000000..6a5d1dc
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/iso.results
@@ -0,0 +1,2 @@
+TYPE='iso9660'
+LABEL='test-iso'
diff --git a/e2fsprogs/lib/blkid/tests/jbd.img.bz2 b/e2fsprogs/lib/blkid/tests/jbd.img.bz2
new file mode 100644
index 0000000..f0d7f91
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/jbd.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/jbd.results b/e2fsprogs/lib/blkid/tests/jbd.results
new file mode 100644
index 0000000..2a43089
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/jbd.results
@@ -0,0 +1,2 @@
+TYPE='jbd'
+UUID='0d7a07df-7b06-4829-bce7-3b9c3ece570c'
diff --git a/e2fsprogs/lib/blkid/tests/jfs.img.bz2 b/e2fsprogs/lib/blkid/tests/jfs.img.bz2
new file mode 100644
index 0000000..1d4d249
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/jfs.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/jfs.results b/e2fsprogs/lib/blkid/tests/jfs.results
new file mode 100644
index 0000000..5d752a3
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/jfs.results
@@ -0,0 +1,3 @@
+TYPE='jfs'
+LABEL='test-jfs'
+UUID='9bf7b82e-7583-4c74-99a4-189a691f27b5'
diff --git a/e2fsprogs/lib/blkid/tests/minix.img.bz2 b/e2fsprogs/lib/blkid/tests/minix.img.bz2
new file mode 100644
index 0000000..d11f3a8
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/minix.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/minix.results b/e2fsprogs/lib/blkid/tests/minix.results
new file mode 100644
index 0000000..d0b448f
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/minix.results
@@ -0,0 +1 @@
+TYPE='minix'
diff --git a/e2fsprogs/lib/blkid/tests/ocfs2.img.bz2 b/e2fsprogs/lib/blkid/tests/ocfs2.img.bz2
new file mode 100644
index 0000000..0bad915
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/ocfs2.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/ocfs2.results b/e2fsprogs/lib/blkid/tests/ocfs2.results
new file mode 100644
index 0000000..918afa3
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/ocfs2.results
@@ -0,0 +1,3 @@
+TYPE='ocfs2'
+LABEL='test-ocfs2'
+UUID='6b6bfbea-3a79-4f0c-b166-a20776102445'
diff --git a/e2fsprogs/lib/blkid/tests/reiser3.img.bz2 b/e2fsprogs/lib/blkid/tests/reiser3.img.bz2
new file mode 100644
index 0000000..1802bc2
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/reiser3.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/reiser3.results b/e2fsprogs/lib/blkid/tests/reiser3.results
new file mode 100644
index 0000000..8c3bb7c
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/reiser3.results
@@ -0,0 +1,3 @@
+TYPE='reiserfs'
+LABEL='TESTREISER'
+UUID='9efe7863-b124-46dc-ad68-8ecd04230a7b'
diff --git a/e2fsprogs/lib/blkid/tests/reiser4.img.bz2 b/e2fsprogs/lib/blkid/tests/reiser4.img.bz2
new file mode 100644
index 0000000..b50d12e
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/reiser4.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/reiser4.results b/e2fsprogs/lib/blkid/tests/reiser4.results
new file mode 100644
index 0000000..b312289
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/reiser4.results
@@ -0,0 +1,3 @@
+TYPE='reiser4'
+LABEL='TESTR4'
+UUID='9722633c-d69a-4881-b1c8-bedecbbf39d2'
diff --git a/e2fsprogs/lib/blkid/tests/romfs.img.bz2 b/e2fsprogs/lib/blkid/tests/romfs.img.bz2
new file mode 100644
index 0000000..b5e3109
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/romfs.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/romfs.results b/e2fsprogs/lib/blkid/tests/romfs.results
new file mode 100644
index 0000000..03e8622
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/romfs.results
@@ -0,0 +1,2 @@
+TYPE='romfs'
+LABEL='test-romfs'
diff --git a/e2fsprogs/lib/blkid/tests/small-fat32.img.bz2 b/e2fsprogs/lib/blkid/tests/small-fat32.img.bz2
new file mode 100644
index 0000000..8b90f9c
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/small-fat32.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/small-fat32.results b/e2fsprogs/lib/blkid/tests/small-fat32.results
new file mode 100644
index 0000000..bd5ebf4
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/small-fat32.results
@@ -0,0 +1,3 @@
+TYPE='vfat'
+LABEL='TESTVFAT'
+UUID='1423-AAE1'
diff --git a/e2fsprogs/lib/blkid/tests/swap0.img.bz2 b/e2fsprogs/lib/blkid/tests/swap0.img.bz2
new file mode 100644
index 0000000..e61e375
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/swap0.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/swap0.results b/e2fsprogs/lib/blkid/tests/swap0.results
new file mode 100644
index 0000000..8742a60
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/swap0.results
@@ -0,0 +1 @@
+TYPE='swap'
diff --git a/e2fsprogs/lib/blkid/tests/swap1.img.bz2 b/e2fsprogs/lib/blkid/tests/swap1.img.bz2
new file mode 100644
index 0000000..fbab9ed
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/swap1.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/swap1.results b/e2fsprogs/lib/blkid/tests/swap1.results
new file mode 100644
index 0000000..ea04e5d
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/swap1.results
@@ -0,0 +1,3 @@
+TYPE='swap'
+LABEL='SWAP-TEST'
+UUID='8ff8e77f-8553-485e-8656-58be67a81666'
diff --git a/e2fsprogs/lib/blkid/tests/udf.img.bz2 b/e2fsprogs/lib/blkid/tests/udf.img.bz2
new file mode 100644
index 0000000..bd2deb0
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/udf.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/udf.results b/e2fsprogs/lib/blkid/tests/udf.results
new file mode 100644
index 0000000..1f7aa48
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/udf.results
@@ -0,0 +1,2 @@
+TYPE='udf'
+LABEL='test-udf'
diff --git a/e2fsprogs/lib/blkid/tests/xfs.img.bz2 b/e2fsprogs/lib/blkid/tests/xfs.img.bz2
new file mode 100644
index 0000000..cf6982b
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/xfs.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/xfs.results b/e2fsprogs/lib/blkid/tests/xfs.results
new file mode 100644
index 0000000..18e8d88
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/xfs.results
@@ -0,0 +1,3 @@
+TYPE='xfs'
+LABEL='test-xfs'
+UUID='8c8a0a5a-9f57-492e-9610-45a61f38f58a'
diff --git a/e2fsprogs/lib/blkid/tests/zfs.img.bz2 b/e2fsprogs/lib/blkid/tests/zfs.img.bz2
new file mode 100644
index 0000000..92f445a
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/zfs.img.bz2
Binary files differ
diff --git a/e2fsprogs/lib/blkid/tests/zfs.results b/e2fsprogs/lib/blkid/tests/zfs.results
new file mode 100644
index 0000000..c0f8fb9
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tests/zfs.results
@@ -0,0 +1 @@
+TYPE='zfs'
diff --git a/e2fsprogs/lib/blkid/tst_types.c b/e2fsprogs/lib/blkid/tst_types.c
new file mode 100644
index 0000000..3003c8b
--- /dev/null
+++ b/e2fsprogs/lib/blkid/tst_types.c
@@ -0,0 +1,63 @@
+/*
+ * 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 <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/e2fsprogs/lib/blkid/version.c b/e2fsprogs/lib/blkid/version.c
new file mode 100644
index 0000000..c9754fa
--- /dev/null
+++ b/e2fsprogs/lib/blkid/version.c
@@ -0,0 +1,49 @@
+/*
+ * 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 Public
+ * License.
+ * %End-Header%
+ */
+
+#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/e2fsprogs/lib/config.h.in b/e2fsprogs/lib/config.h.in
new file mode 100644
index 0000000..b500a2c
--- /dev/null
+++ b/e2fsprogs/lib/config.h.in
@@ -0,0 +1,623 @@
+/* lib/config.h.in.  Generated from configure.in 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 if debugging ext3/4 journal code */
+#undef CONFIG_JBD_DEBUG
+
+/* Define to 1 to enable quota support */
+#undef CONFIG_QUOTA
+
+/* Define to 1 if the testio I/O manager should be enabled */
+#undef CONFIG_TESTIO_DEBUG
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define to 1 to disable use of backtrace */
+#undef DISABLE_BACKTRACE
+
+/* Define to 1 if ext2 compression enabled */
+#undef ENABLE_COMPRESSION
+
+/* Define to 1 if ext3/4 htree support enabled */
+#undef ENABLE_HTREE
+
+/* 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 `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+   */
+#undef HAVE_ALLOCA_H
+
+/* Define to 1 if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
+/* Define to 1 if you have the `asprintf' function. */
+#undef HAVE_ASPRINTF
+
+/* Define to 1 if you have the `backtrace' function. */
+#undef HAVE_BACKTRACE
+
+/* Define to 1 if you have the `blkid_probe_get_topology' function. */
+#undef HAVE_BLKID_PROBE_GET_TOPOLOGY
+
+/* 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 declaration of `feof_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FEOF_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FGETS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL__SNPRINTF
+
+/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL__SNWPRINTF
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if dlopen/libdl exists */
+#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 `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 `fdatasync' function. */
+#undef HAVE_FDATASYNC
+
+/* Define to 1 if you have the `fstat64' function. */
+#undef HAVE_FSTAT64
+
+/* Define to 1 if you have the `ftruncate64' function. */
+#undef HAVE_FTRUNCATE64
+
+/* Define to 1 if you have the `fwprintf' function. */
+#undef HAVE_FWPRINTF
+
+/* 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 `getegid' function. */
+#undef HAVE_GETEGID
+
+/* Define to 1 if you have the `geteuid' function. */
+#undef HAVE_GETEUID
+
+/* Define to 1 if you have the `getgid' function. */
+#undef HAVE_GETGID
+
+/* 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 `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the `getpwuid_r' function. */
+#undef HAVE_GETPWUID_R
+
+/* 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 `getuid' function. */
+#undef HAVE_GETUID
+
+/* Define if you have the iconv() function. */
+#undef HAVE_ICONV
+
+/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_INTMAX_T
+
+/* 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 if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
+   declares uintmax_t. */
+#undef HAVE_INTTYPES_H_WITH_UINTMAX
+
+/* Define to 1 if you have the `jrand48' function. */
+#undef HAVE_JRAND48
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* 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/major.h> header file. */
+#undef HAVE_LINUX_MAJOR_H
+
+/* 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 <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define if you have the 'long double' type. */
+#undef HAVE_LONG_DOUBLE
+
+/* Define if you have the 'long long' type. */
+#undef HAVE_LONG_LONG
+
+/* 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 `mallinfo' function. */
+#undef HAVE_MALLINFO
+
+/* 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 <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mempcpy' function. */
+#undef HAVE_MEMPCPY
+
+/* 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 you have the `msync' function. */
+#undef HAVE_MSYNC
+
+/* Define to 1 if you have the `munmap' function. */
+#undef HAVE_MUNMAP
+
+/* 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 <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_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_memalign' function. */
+#undef HAVE_POSIX_MEMALIGN
+
+/* Define if your printf() function supports format strings with positions. */
+#undef HAVE_POSIX_PRINTF
+
+/* Define to 1 if you have the `prctl' function. */
+#undef HAVE_PRCTL
+
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
+
+/* 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 `setenv' function. */
+#undef HAVE_SETENV
+
+/* Define to 1 if you have the <setjmp.h> header file. */
+#undef HAVE_SETJMP_H
+
+/* Define to 1 if you have the `setlocale' function. */
+#undef HAVE_SETLOCALE
+
+/* 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 <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
+   uintmax_t. */
+#undef HAVE_STDINT_H_WITH_UINTMAX
+
+/* 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 `strtoul' function. */
+#undef HAVE_STRTOUL
+
+/* Define to 1 if you have the `strtoull' function. */
+#undef HAVE_STRTOULL
+
+/* 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/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/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/param.h> header file. */
+#undef HAVE_SYS_PARAM_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/queue.h> header file. */
+#undef HAVE_SYS_QUEUE_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 <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 you have the `tsearch' function. */
+#undef HAVE_TSEARCH
+
+/* Define to 1 if ssize_t declared */
+#undef HAVE_TYPE_SSIZE_T
+
+/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_UINTMAX_T
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define if you have the 'unsigned long long' type. */
+#undef HAVE_UNSIGNED_LONG_LONG
+
+/* 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 <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 if you have the 'wchar_t' type. */
+#undef HAVE_WCHAR_T
+
+/* Define to 1 if you have the `wcslen' function. */
+#undef HAVE_WCSLEN
+
+/* Define if you have the 'wint_t' type. */
+#undef HAVE_WINT_T
+
+/* Define to 1 if you have the `__argz_count' function. */
+#undef HAVE___ARGZ_COUNT
+
+/* Define to 1 if you have the `__argz_next' function. */
+#undef HAVE___ARGZ_NEXT
+
+/* Define to 1 if you have the `__argz_stringify' function. */
+#undef HAVE___ARGZ_STRINGIFY
+
+/* Define to 1 if you have the `__fsetlocking' function. */
+#undef HAVE___FSETLOCKING
+
+/* Define to 1 if you have the `__secure_getenv' function. */
+#undef HAVE___SECURE_GETENV
+
+/* Define as const if the declaration of iconv() needs const. */
+#undef ICONV_CONST
+
+/* Define if integer division by zero raises signal SIGFPE. */
+#undef INTDIV0_RAISES_SIGFPE
+
+/* 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 if <inttypes.h> exists and defines unusable PRI* macros. */
+#undef PRI_MACROS_BROKEN
+
+/* 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
+
+/* Define as the maximum value of type 'size_t', if the system doesn't define
+   it. */
+#undef SIZE_MAX
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+	STACK_DIRECTION > 0 => grows toward higher addresses
+	STACK_DIRECTION < 0 => grows toward lower addresses
+	STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* If the compiler supports a TLS storage class define it to that here */
+#undef TLS
+
+/* 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
+
+/* Define to 1 if Apple Darwin libintl workaround is needed */
+#undef _INTL_REDIRECT_MACROS
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to `long int' if <sys/types.h> does not define. */
+#undef off_t
+
+/* Define as the type of the result of subtracting two pointers, if the system
+   doesn't define it. */
+#undef ptrdiff_t
+
+/* Define to empty if the C compiler doesn't support this keyword. */
+#undef signed
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define to unsigned long or unsigned long long if <stdint.h> and
+   <inttypes.h> don't define. */
+#undef uintmax_t
+
+#include "dirpaths.h"
diff --git a/e2fsprogs/lib/dirpaths.h.in b/e2fsprogs/lib/dirpaths.h.in
new file mode 100644
index 0000000..6ccb55b
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/e2p/Android.mk b/e2fsprogs/lib/e2p/Android.mk
new file mode 100644
index 0000000..b91b7c0
--- /dev/null
+++ b/e2fsprogs/lib/e2p/Android.mk
@@ -0,0 +1,87 @@
+LOCAL_PATH := $(call my-dir)
+
+libext2_e2p_src_files := \
+	feature.c \
+	fgetflags.c \
+	fsetflags.c \
+	fgetversion.c \
+	fsetversion.c \
+	getflags.c \
+	getversion.c \
+	hashstr.c \
+	iod.c \
+	ls.c \
+	mntopts.c \
+	parse_num.c \
+	pe.c \
+	pf.c \
+	ps.c \
+	setflags.c \
+	setversion.c \
+	uuid.c \
+	ostype.c \
+	percent.c
+
+libext2_e2p_c_includes := external/e2fsprogs/lib
+
+libext2_e2p_cflags := -O2 -g -W -Wall \
+	-DHAVE_UNISTD_H \
+	-DHAVE_ERRNO_H \
+	-DHAVE_NETINET_IN_H \
+	-DHAVE_SYS_IOCTL_H \
+	-DHAVE_SYS_MMAN_H \
+	-DHAVE_SYS_MOUNT_H \
+	-DHAVE_SYS_PRCTL_H \
+	-DHAVE_SYS_RESOURCE_H \
+	-DHAVE_SYS_SELECT_H \
+	-DHAVE_SYS_STAT_H \
+	-DHAVE_SYS_TYPES_H \
+	-DHAVE_STDLIB_H \
+	-DHAVE_STRDUP \
+	-DHAVE_MMAP \
+	-DHAVE_UTIME_H \
+	-DHAVE_GETPAGESIZE \
+	-DHAVE_LSEEK64 \
+	-DHAVE_LSEEK64_PROTOTYPE \
+	-DHAVE_EXT2_IOCTLS \
+	-DHAVE_LINUX_FD_H \
+	-DHAVE_TYPE_SSIZE_T \
+	-DHAVE_SYS_TIME_H \
+        -DHAVE_SYS_PARAM_H \
+	-DHAVE_SYSCONF
+
+libext2_e2p_system_shared_libraries := libc
+
+libext2_e2p_system_static_libraries := libc
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_e2p_src_files)
+LOCAL_C_INCLUDES := $(libext2_e2p_c_includes)
+LOCAL_CFLAGS := $(libext2_e2p_cflags)
+LOCAL_SYSTEM_SHARED_LIBRARIES := $(libext2_e2p_system_shared_libraries)
+LOCAL_MODULE := libext2_e2p
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_e2p_src_files)
+LOCAL_C_INCLUDES := $(libext2_e2p_c_includes)
+LOCAL_CFLAGS := $(libext2_e2p_cflags)
+LOCAL_STATIC_LIBRARIES := $(libext2_e2p_system_static_libraries)
+LOCAL_MODULE := libext2_e2p
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_e2p_src_files)
+LOCAL_C_INCLUDES := $(libext2_e2p_c_includes)
+LOCAL_CFLAGS := $(libext2_e2p_cflags)
+LOCAL_MODULE := libext2_e2p-host
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_SHARED_LIBRARY)
diff --git a/e2fsprogs/lib/e2p/Makefile.in b/e2fsprogs/lib/e2p/Makefile.in
new file mode 100644
index 0000000..d6992fc
--- /dev/null
+++ b/e2fsprogs/lib/e2p/Makefile.in
@@ -0,0 +1,185 @@
+# 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@
+
+@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 mntopts.o \
+		parse_num.o pe.o pf.o ps.o setflags.o setversion.o uuid.o \
+		ostype.o percent.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)/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
+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@
+@MAKEFILE_CHECKER@
+
+.c.o:
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+@CHECKER_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
+@ELF_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
+@BSDLIB_CMT@	$(Q) $(CC) $(ALL_CFLAGS) $(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)
+
+tst_feature: $(srcdir)/feature.c
+	$(E) "	LD $@"
+	$(Q) $(CC) -DTEST_PROGRAM -I$(top_srcdir)/lib -o tst_feature \
+		$(srcdir)/feature.c $(ALL_CFLAGS)
+
+check::	tst_ostype tst_feature
+	./tst_ostype
+	./tst_feature
+
+installdirs::
+	$(E) "	MKINSTALLDIRS $(libdir) $(includedir)/e2p"
+	$(Q) $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
+		$(DESTDIR)$(includedir)/e2p $(DESTDIR)$(libdir)/pkgconfig
+
+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 $(libdir)/pkgconfig/e2p.pc"
+	$(Q) $(INSTALL_DATA) e2p.pc $(DESTDIR)$(libdir)/pkgconfig/e2p.pc
+
+uninstall::
+	$(RM) -f $(DESTDIR)$(libdir)/libe2p.a \
+		$(DESTDIR)$(libdir)/pkgconfig/e2p.pc
+	$(RM) -rf $(DESTDIR)$(includedir)/e2p
+
+clean::
+	$(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* checker/*
+	$(RM) -f ../libe2p.a ../libe2p_p.a tst_ostype tst_feature
+
+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/bitops.h \
+ $(top_srcdir)/lib/ext2fs/jfs_user.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
+ $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.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
+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
diff --git a/e2fsprogs/lib/e2p/e2p.h b/e2fsprogs/lib/e2p/e2p.h
new file mode 100644
index 0000000..4a68dd9
--- /dev/null
+++ b/e2fsprogs/lib/e2p/e2p.h
@@ -0,0 +1,74 @@
+/*
+ * 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 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);
+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);
+
+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);
diff --git a/e2fsprogs/lib/e2p/e2p.pc.in b/e2fsprogs/lib/e2p/e2p.pc.in
new file mode 100644
index 0000000..c171ae6
--- /dev/null
+++ b/e2fsprogs/lib/e2p/e2p.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: e2p
+Description: Ext2fs userpace programs utility library
+Version: @E2FSPROGS_VERSION@
+Requires: 
+Cflags: -I${includedir}/e2p -I${includedir}
+Libs: -L${libdir} -le2p
diff --git a/e2fsprogs/lib/e2p/feature.c b/e2fsprogs/lib/e2p/feature.c
new file mode 100644
index 0000000..fcdf4c2
--- /dev/null
+++ b/e2fsprogs/lib/e2p/feature.c
@@ -0,0 +1,410 @@
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+
+#include "e2p.h"
+#include <ext2fs/ext2fs.h>
+#include <ext2fs/jfs_user.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_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_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_LARGEDIR,
+			"large_dir"},
+	{       E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_INLINEDATA,
+			"inline_data"},
+	{       E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_ENCRYPT,
+			"encrypt"},
+	{	0, 0, 0 },
+};
+
+static struct feature jrnl_feature_list[] = {
+       {       E2P_FEATURE_COMPAT, JFS_FEATURE_COMPAT_CHECKSUM,
+                       "journal_checksum" },
+
+       {       E2P_FEATURE_INCOMPAT, JFS_FEATURE_INCOMPAT_REVOKE,
+                       "journal_incompat_revoke" },
+       {       E2P_FEATURE_INCOMPAT, JFS_FEATURE_INCOMPAT_64BIT,
+                       "journal_64bit" },
+       {       E2P_FEATURE_INCOMPAT, JFS_FEATURE_INCOMPAT_ASYNC_COMMIT,
+                       "journal_async_commit" },
+       {       0, 0, 0 },
+};
+
+const char *e2p_feature2string(int compat, unsigned int mask)
+{
+	struct feature  *f;
+	static char buf[20];
+	char	fchar;
+	int	fnum;
+
+	for (f = 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_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 > 32 || 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 > 32 || 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/e2fsprogs/lib/e2p/fgetflags.c b/e2fsprogs/lib/e2p/fgetflags.c
new file mode 100644
index 0000000..ca3ea16
--- /dev/null
+++ b/e2fsprogs/lib/e2p/fgetflags.c
@@ -0,0 +1,97 @@
+/*
+ * 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
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#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"
+
+#ifdef O_LARGEFILE
+#define OPEN_FLAGS (O_RDONLY|O_NONBLOCK|O_LARGEFILE)
+#else
+#define OPEN_FLAGS (O_RDONLY|O_NONBLOCK)
+#endif
+
+int fgetflags (const char * name, unsigned long * flags)
+{
+	struct stat buf;
+#if HAVE_STAT_FLAGS && !(APPLE_DARWIN && HAVE_EXT2_IOCTLS)
+
+	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;
+#else /* !HAVE_STAT_FLAGS || (APPLE_DARWIN && HAVE_EXT2_IOCTLS) */
+#if HAVE_EXT2_IOCTLS
+	int fd, r, f, save_errno = 0;
+
+	if (!lstat(name, &buf) &&
+	    !S_ISREG(buf.st_mode) && !S_ISDIR(buf.st_mode)) {
+		goto notsupp;
+	}
+#if !APPLE_DARWIN
+	fd = open (name, OPEN_FLAGS);
+	if (fd == -1)
+		return -1;
+	r = ioctl (fd, EXT2_IOC_GETFLAGS, &f);
+	if (r == -1)
+		save_errno = errno;
+	*flags = f;
+	close (fd);
+	if (save_errno)
+		errno = save_errno;
+	return r;
+#else /* APPLE_DARWIN */
+   f = -1;
+   save_errno = syscall(SYS_fsctl, name, EXT2_IOC_GETFLAGS, &f, 0);
+   *flags = f;
+   return (save_errno);
+#endif /* !APPLE_DARWIN */
+notsupp:
+#endif /* HAVE_EXT2_IOCTLS */
+#endif
+	errno = EOPNOTSUPP;
+	return -1;
+}
diff --git a/e2fsprogs/lib/e2p/fgetversion.c b/e2fsprogs/lib/e2p/fgetversion.c
new file mode 100644
index 0000000..37946f7
--- /dev/null
+++ b/e2fsprogs/lib/e2p/fgetversion.c
@@ -0,0 +1,67 @@
+/*
+ * 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
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#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)
+{
+#if HAVE_EXT2_IOCTLS
+#if !APPLE_DARWIN
+	int fd, r, ver, save_errno = 0;
+
+	fd = open (name, OPEN_FLAGS);
+	if (fd == -1)
+		return -1;
+	r = ioctl (fd, EXT2_IOC_GETVERSION, &ver);
+	if (r == -1)
+		save_errno = errno;
+	*version = ver;
+	close (fd);
+	if (save_errno)
+		errno = save_errno;
+	return r;
+#else
+   int ver=-1, err;
+   err = syscall(SYS_fsctl, name, EXT2_IOC_GETVERSION, &ver, 0);
+   *version = ver;
+   return(err);
+#endif
+#else /* ! HAVE_EXT2_IOCTLS */
+	extern int errno;
+	errno = EOPNOTSUPP;
+	return -1;
+#endif /* ! HAVE_EXT2_IOCTLS */
+}
diff --git a/e2fsprogs/lib/e2p/fsetflags.c b/e2fsprogs/lib/e2p/fsetflags.c
new file mode 100644
index 0000000..08dd114
--- /dev/null
+++ b/e2fsprogs/lib/e2p/fsetflags.c
@@ -0,0 +1,102 @@
+/*
+ * 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
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#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
+
+#ifdef O_LARGEFILE
+#define OPEN_FLAGS (O_RDONLY|O_NONBLOCK|O_LARGEFILE)
+#else
+#define OPEN_FLAGS (O_RDONLY|O_NONBLOCK)
+#endif
+
+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);
+#else /* !HAVE_CHFLAGS || (APPLE_DARWIN && HAVE_EXT2_IOCTLS) */
+#if HAVE_EXT2_IOCTLS
+	int fd, r, f, save_errno = 0;
+	struct stat buf;
+
+	if (!lstat(name, &buf) &&
+	    !S_ISREG(buf.st_mode) && !S_ISDIR(buf.st_mode)) {
+		goto notsupp;
+	}
+#if !APPLE_DARWIN
+	fd = open (name, OPEN_FLAGS);
+	if (fd == -1)
+		return -1;
+	f = (int) flags;
+	r = ioctl (fd, EXT2_IOC_SETFLAGS, &f);
+	if (r == -1)
+		save_errno = errno;
+	close (fd);
+	if (save_errno)
+		errno = save_errno;
+#else /* APPLE_DARWIN */
+	f = (int) flags;
+	return syscall(SYS_fsctl, name, EXT2_IOC_SETFLAGS, &f, 0);
+#endif /* !APPLE_DARWIN */
+	return r;
+
+notsupp:
+#endif /* HAVE_EXT2_IOCTLS */
+#endif
+	errno = EOPNOTSUPP;
+	return -1;
+}
diff --git a/e2fsprogs/lib/e2p/fsetversion.c b/e2fsprogs/lib/e2p/fsetversion.c
new file mode 100644
index 0000000..fc50cb1
--- /dev/null
+++ b/e2fsprogs/lib/e2p/fsetversion.c
@@ -0,0 +1,65 @@
+/*
+ * 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
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#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 */
+	extern int errno;
+	errno = EOPNOTSUPP;
+	return -1;
+#endif /* ! HAVE_EXT2_IOCTLS */
+}
diff --git a/e2fsprogs/lib/e2p/getflags.c b/e2fsprogs/lib/e2p/getflags.c
new file mode 100644
index 0000000..e871684
--- /dev/null
+++ b/e2fsprogs/lib/e2p/getflags.c
@@ -0,0 +1,69 @@
+/*
+ * 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
+ */
+
+#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)
+{
+	struct stat buf;
+#if HAVE_STAT_FLAGS
+
+	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
+	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/e2fsprogs/lib/e2p/getversion.c b/e2fsprogs/lib/e2p/getversion.c
new file mode 100644
index 0000000..ec6621d
--- /dev/null
+++ b/e2fsprogs/lib/e2p/getversion.c
@@ -0,0 +1,39 @@
+/*
+ * 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
+ */
+
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/ioctl.h>
+
+#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 */
+	extern int errno;
+	errno = EOPNOTSUPP;
+	return -1;
+#endif /* ! HAVE_EXT2_IOCTLS */
+}
diff --git a/e2fsprogs/lib/e2p/hashstr.c b/e2fsprogs/lib/e2p/hashstr.c
new file mode 100644
index 0000000..5ee6237
--- /dev/null
+++ b/e2fsprogs/lib/e2p/hashstr.c
@@ -0,0 +1,71 @@
+/*
+ * 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 <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/e2fsprogs/lib/e2p/iod.c b/e2fsprogs/lib/e2p/iod.c
new file mode 100644
index 0000000..c53aafe
--- /dev/null
+++ b/e2fsprogs/lib/e2p/iod.c
@@ -0,0 +1,75 @@
+/*
+ * 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 "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/e2fsprogs/lib/e2p/ls.c b/e2fsprogs/lib/e2p/ls.c
new file mode 100644
index 0000000..78cd335
--- /dev/null
+++ b/e2fsprogs/lib/e2p/ls.c
@@ -0,0 +1,434 @@
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <string.h>
+#include <grp.h>
+#include <pwd.h>
+#include <time.h>
+
+#include "e2p.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 |
+		(super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT ?
+		(__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 |
+		(super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT ?
+		(__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 |
+		(super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT ?
+		(__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
+
+void list_super2(struct ext2_super_block * sb, FILE *f)
+{
+	int inode_blocks_per_group;
+	char buf[80], *str;
+	time_t	tm;
+
+	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]) {
+		memset(buf, 0, sizeof(buf));
+		strncpy(buf, sb->s_volume_name, sizeof(sb->s_volume_name));
+	} else
+		strcpy(buf, "<none>");
+	fprintf(f, "Filesystem volume name:   %s\n", buf);
+	if (sb->s_last_mounted[0]) {
+		memset(buf, 0, sizeof(buf));
+		strncpy(buf, sb->s_last_mounted, sizeof(sb->s_last_mounted));
+	} else
+		strcpy(buf, "<not available>");
+	fprintf(f, "Last mounted on:          %s\n", buf);
+	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", 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", e2p_blocks_count(sb));
+	fprintf(f, "Reserved block count:     %llu\n", e2p_r_blocks_count(sb));
+	if (sb->s_overhead_blocks)
+		fprintf(f, "Overhead blocks:          %u\n",
+			sb->s_overhead_blocks);
+	fprintf(f, "Free blocks:              %llu\n", 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 (sb->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_BIGALLOC)
+		fprintf(f, "Cluster size:             %u\n",
+			EXT2_CLUSTER_SIZE(sb));
+	else
+		fprintf(f, "Fragment size:            %u\n",
+			EXT2_CLUSTER_SIZE(sb));
+	if (sb->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+		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 (sb->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_BIGALLOC)
+		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",
+			1 << 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", sb->s_kbytes_written);
+		else if (sb->s_kbytes_written < POW2(23))
+			fprintf(f, "%llu MB\n",
+				(sb->s_kbytes_written + POW2(9)) >> 10);
+		else if (sb->s_kbytes_written < POW2(33))
+			fprintf(f, "%llu GB\n",
+				(sb->s_kbytes_written + POW2(19)) >> 20);
+		else if (sb->s_kbytes_written < POW2(43))
+			fprintf(f, "%llu TB\n",
+				(sb->s_kbytes_written + POW2(29)) >> 30);
+		else
+			fprintf(f, "%llu PB\n",
+				(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 ((sb->s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX) ||
+	    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_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",
+			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));
+		memset(buf, 0, sizeof(buf));
+		strncpy(buf, (char *)sb->s_first_error_func,
+			sizeof(sb->s_first_error_func));
+		fprintf(f, "First error function:     %s\n", buf);
+		fprintf(f, "First error line #:       %u\n",
+			sb->s_first_error_line);
+		fprintf(f, "First error inode #:      %u\n",
+			sb->s_first_error_ino);
+		fprintf(f, "First error block #:      %llu\n",
+			sb->s_first_error_block);
+	}
+	if (sb->s_last_error_time) {
+		tm = sb->s_last_error_time;
+		fprintf(f, "Last error time:          %s", ctime(&tm));
+		memset(buf, 0, sizeof(buf));
+		strncpy(buf, (char *)sb->s_last_error_func,
+			sizeof(sb->s_last_error_func));
+		fprintf(f, "Last error function:      %s\n", buf);
+		fprintf(f, "Last error line #:        %u\n",
+			sb->s_last_error_line);
+		fprintf(f, "Last error inode #:       %u\n",
+			sb->s_last_error_ino);
+		fprintf(f, "Last error block #:       %llu\n",
+			sb->s_last_error_block);
+	}
+	if (sb->s_feature_incompat & EXT4_FEATURE_INCOMPAT_MMP) {
+		fprintf(f, "MMP block number:         %llu\n",
+			(long long)sb->s_mmp_block);
+		fprintf(f, "MMP update interval:      %u\n",
+			sb->s_mmp_update_interval);
+	}
+	if (sb->s_usr_quota_inum)
+		fprintf(f, "User quota inode:         %u\n",
+			sb->s_usr_quota_inum);
+	if (sb->s_grp_quota_inum)
+		fprintf(f, "Group quota inode:        %u\n",
+			sb->s_grp_quota_inum);
+
+	if (sb->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)
+		fprintf(f, "Checksum:                 0x%08x\n",
+			sb->s_checksum);
+}
+
+void list_super (struct ext2_super_block * s)
+{
+	list_super2(s, stdout);
+}
+
diff --git a/e2fsprogs/lib/e2p/mntopts.c b/e2fsprogs/lib/e2p/mntopts.c
new file mode 100644
index 0000000..9d3879e
--- /dev/null
+++ b/e2fsprogs/lib/e2p/mntopts.c
@@ -0,0 +1,148 @@
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <string.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 > 32 || 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/e2fsprogs/lib/e2p/ostype.c b/e2fsprogs/lib/e2p/ostype.c
new file mode 100644
index 0000000..978315b
--- /dev/null
+++ b/e2fsprogs/lib/e2p/ostype.c
@@ -0,0 +1,77 @@
+/*
+ * 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 "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 <= 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);
+		if (i != os) {
+			fprintf(stderr, "Failure!\n");
+			exit(1);
+		}
+	}
+	exit(0);
+}
+#endif
+
+
diff --git a/e2fsprogs/lib/e2p/parse_num.c b/e2fsprogs/lib/e2p/parse_num.c
new file mode 100644
index 0000000..4caa3a3
--- /dev/null
+++ b/e2fsprogs/lib/e2p/parse_num.c
@@ -0,0 +1,90 @@
+/*
+ * 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 "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/e2fsprogs/lib/e2p/pe.c b/e2fsprogs/lib/e2p/pe.c
new file mode 100644
index 0000000..78c8099
--- /dev/null
+++ b/e2fsprogs/lib/e2p/pe.c
@@ -0,0 +1,39 @@
+/*
+ * 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 <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/e2fsprogs/lib/e2p/percent.c b/e2fsprogs/lib/e2p/percent.c
new file mode 100644
index 0000000..cfa7046
--- /dev/null
+++ b/e2fsprogs/lib/e2p/percent.c
@@ -0,0 +1,66 @@
+/*
+ * 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 "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/e2fsprogs/lib/e2p/pf.c b/e2fsprogs/lib/e2p/pf.c
new file mode 100644
index 0000000..2fb5c8c
--- /dev/null
+++ b/e2fsprogs/lib/e2p/pf.c
@@ -0,0 +1,81 @@
+/*
+ * 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 <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" },
+#ifdef ENABLE_COMPRESSION
+	{ EXT2_COMPRBLK_FL, "B", "Compressed_File" },
+	{ EXT2_DIRTY_FL, "Z", "Compressed_Dirty_File" },
+	{ EXT2_NOCOMPR_FL, "X", "Compression_Raw_Access" },
+	{ EXT2_ECOMPR_FL, "E", "Compression_Error" },
+#else
+	{ EXT4_ENCRYPT_FL, "E", "Encrypted" },
+#endif
+	{ 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" },
+	{ EXT4_HUGE_FILE_FL, "h", "Huge_file" },
+	{ FS_NOCOW_FL, "C", "No_COW" },
+	{ 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/e2fsprogs/lib/e2p/ps.c b/e2fsprogs/lib/e2p/ps.c
new file mode 100644
index 0000000..e6ad60a
--- /dev/null
+++ b/e2fsprogs/lib/e2p/ps.c
@@ -0,0 +1,31 @@
+/*
+ * 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 <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/e2fsprogs/lib/e2p/setflags.c b/e2fsprogs/lib/e2p/setflags.c
new file mode 100644
index 0000000..b203606
--- /dev/null
+++ b/e2fsprogs/lib/e2p/setflags.c
@@ -0,0 +1,76 @@
+/*
+ * 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
+ */
+
+#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/e2fsprogs/lib/e2p/setversion.c b/e2fsprogs/lib/e2p/setversion.c
new file mode 100644
index 0000000..d72270b
--- /dev/null
+++ b/e2fsprogs/lib/e2p/setversion.c
@@ -0,0 +1,38 @@
+/*
+ * 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
+ */
+
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <sys/ioctl.h>
+
+#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 */
+	extern int errno;
+	errno = EOPNOTSUPP;
+	return -1;
+#endif /* ! HAVE_EXT2_IOCTLS */
+}
diff --git a/e2fsprogs/lib/e2p/uuid.c b/e2fsprogs/lib/e2p/uuid.c
new file mode 100644
index 0000000..310b01d
--- /dev/null
+++ b/e2fsprogs/lib/e2p/uuid.c
@@ -0,0 +1,84 @@
+/*
+ * 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 <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/e2fsprogs/lib/et/Android.mk b/e2fsprogs/lib/et/Android.mk
new file mode 100644
index 0000000..999d8fc
--- /dev/null
+++ b/e2fsprogs/lib/et/Android.mk
@@ -0,0 +1,76 @@
+LOCAL_PATH := $(call my-dir)
+
+libext2_com_err_src_files := \
+	error_message.c \
+	et_name.c \
+	init_et.c \
+	com_err.c \
+	com_right.c
+
+libext2_com_err_c_includes := external/e2fsprogs/lib
+
+libext2_com_err_cflags := -O2 -g -W -Wall \
+	-DHAVE_UNISTD_H \
+	-DHAVE_ERRNO_H \
+	-DHAVE_NETINET_IN_H \
+	-DHAVE_SYS_IOCTL_H \
+	-DHAVE_SYS_MMAN_H \
+	-DHAVE_SYS_MOUNT_H \
+	-DHAVE_SYS_RESOURCE_H \
+	-DHAVE_SYS_SELECT_H \
+	-DHAVE_SYS_STAT_H \
+	-DHAVE_SYS_TYPES_H \
+	-DHAVE_STDLIB_H \
+	-DHAVE_STRDUP \
+	-DHAVE_MMAP \
+	-DHAVE_UTIME_H \
+	-DHAVE_GETPAGESIZE \
+	-DHAVE_EXT2_IOCTLS \
+	-DHAVE_TYPE_SSIZE_T \
+	-DHAVE_SYS_TIME_H \
+        -DHAVE_SYS_PARAM_H \
+	-DHAVE_SYSCONF
+
+libext2_com_err_cflags_linux := \
+	-DHAVE_LINUX_FD_H \
+	-DHAVE_SYS_PRCTL_H \
+	-DHAVE_LSEEK64 \
+	-DHAVE_LSEEK64_PROTOTYPE
+
+libext2_com_err_system_shared_libraries := libc
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_com_err_src_files)
+LOCAL_C_INCLUDES := $(libext2_com_err_c_includes)
+LOCAL_CFLAGS := $(libext2_com_err_cflags) $(libext2_com_err_cflags_linux)
+LOCAL_SYSTEM_SHARED_LIBRARIES := libc
+LOCAL_MODULE := libext2_com_err
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_com_err_src_files)
+LOCAL_C_INCLUDES := $(libext2_com_err_c_includes)
+LOCAL_CFLAGS := $(libext2_com_err_cflags) $(libext2_com_err_cflags_linux)
+LOCAL_STATIC_LIBRARIES := libc
+LOCAL_MODULE := libext2_com_err
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_com_err_src_files)
+LOCAL_C_INCLUDES := $(libext2_com_err_c_includes)
+ifeq ($(HOST_OS),linux)
+LOCAL_CFLAGS := $(libext2_com_err_cflags) $(libext2_com_err_cflags_linux)
+else
+LOCAL_CFLAGS := $(libext2_com_err_cflags)
+endif
+LOCAL_MODULE := libext2_com_err-host
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_SHARED_LIBRARY)
diff --git a/e2fsprogs/lib/et/Makefile.in b/e2fsprogs/lib/et/Makefile.in
new file mode 100644
index 0000000..ff99f5d
--- /dev/null
+++ b/e2fsprogs/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@
+
+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) -c $< -o $@
+	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+@CHECKER_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
+@ELF_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
+@BSDLIB_CMT@	$(Q) $(CC) $(ALL_CFLAGS) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
+
+@MAKEFILE_LIBRARY@
+@MAKEFILE_ELF@
+@MAKEFILE_BSDLIB@
+@MAKEFILE_PROFILE@
+@MAKEFILE_CHECKER@
+
+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) "	MKINSTALLDIRS $(libdir) $(includedir)/et $(datadir)/et $(bindir) $(man1dir) $(man3dir)"
+	$(Q) $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
+		$(DESTDIR)$(includedir)/et $(DESTDIR)$(datadir)/et \
+		$(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) \
+		$(DESTDIR)$(man3dir) $(DESTDIR)$(libdir)/pkgconfig
+
+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 $(libdir)/pkgconfig/com_err.pc"
+	$(Q) $(INSTALL_DATA) com_err.pc $(DESTDIR)$(libdir)/pkgconfig/com_err.pc
+
+uninstall::
+	$(RM) -f $(DESTDIR)$(libdir)/libcom_err.a \
+		$(DESTDIR)$(bindir)/compile_et \
+		$(DESTDIR)$(libdir)/pkgconfig/com_err.pc
+	$(RM) -rf $(DESTDIR)$(includedir)/et $(DESTDIR)$(datadir)/et
+
+check:: compile_et
+	for i in $(srcdir)/test_cases/*.et ; do \
+		t=`basename $$i | sed -e 's/.et//'`; \
+		./compile_et --build-tree $$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/e2fsprogs/lib/et/com_err.3 b/e2fsprogs/lib/et/com_err.3
new file mode 100644
index 0000000..5a25f09
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/com_err.c b/e2fsprogs/lib/et/com_err.c
new file mode 100644
index 0000000..5cc5c08
--- /dev/null
+++ b/e2fsprogs/lib/et/com_err.c
@@ -0,0 +1,103 @@
+/*
+ * 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 <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);
+
+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/e2fsprogs/lib/et/com_err.h b/e2fsprogs/lib/et/com_err.h
new file mode 100644
index 0000000..27a36ea
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/com_err.pc.in b/e2fsprogs/lib/et/com_err.pc.in
new file mode 100644
index 0000000..86df8a2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/com_err.texinfo b/e2fsprogs/lib/et/com_err.texinfo
new file mode 100644
index 0000000..c9d3fca
--- /dev/null
+++ b/e2fsprogs/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 consistancy 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 concurrancy 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/e2fsprogs/lib/et/com_right.c b/e2fsprogs/lib/et/com_right.c
new file mode 100644
index 0000000..f00e910
--- /dev/null
+++ b/e2fsprogs/lib/et/com_right.c
@@ -0,0 +1,119 @@
+/*
+ * com_right.c -- provide Heimdall / Kerberos4kth com_err interfaces
+ * 	for backwards compatbility
+ *
+ * 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 <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/e2fsprogs/lib/et/compile_et.1 b/e2fsprogs/lib/et/compile_et.1
new file mode 100644
index 0000000..7219441
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/compile_et.sh.in b/e2fsprogs/lib/et/compile_et.sh.in
new file mode 100644
index 0000000..96772c7
--- /dev/null
+++ b/e2fsprogs/lib/et/compile_et.sh.in
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+#
+
+datarootdir=@datarootdir@
+AWK=@AWK@
+DIR="${DIR-@datadir@/et}"
+ET_DIR="@ET_DIR@"
+
+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 ! -f "$DIR/et_h.awk" || test ! -f "$DIR/et_c.awk" ; then
+    DIR="$ET_DIR"
+#    echo "Falling back to $DIR..."
+    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
+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 -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 -w ${BASE}.c
+fi
diff --git a/e2fsprogs/lib/et/error_message.c b/e2fsprogs/lib/et/error_message.c
new file mode 100644
index 0000000..16a4bcf
--- /dev/null
+++ b/e2fsprogs/lib/et/error_message.c
@@ -0,0 +1,339 @@
+/*
+ * $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.
+ */
+
+#if HAVE_SECURE_GETENV
+#define _GNU_SOURCE
+#endif
+#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
+#include <fcntl.h>
+#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;
+}
+
+
+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) {
+#ifdef HAS_SYS_ERRLIST
+	if (offset < sys_nerr)
+	    return(sys_errlist[offset]);
+	else
+	    goto oops;
+#else
+	cp = strerror(offset);
+	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 ((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
+}
+
+#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;
+	int	fd, flags;
+
+	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) {
+		fd = fileno(debug_f);
+		if (fd >= 0) {
+			flags = fcntl(fd, F_GETFD);
+			if (flags >= 0)
+				fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
+		}
+	} 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/e2fsprogs/lib/et/error_table.h b/e2fsprogs/lib/et/error_table.h
new file mode 100644
index 0000000..24e4762
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/et_c.awk b/e2fsprogs/lib/et/et_c.awk
new file mode 100644
index 0000000..99c33ba
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/et_h.awk b/e2fsprogs/lib/et/et_h.awk
new file mode 100644
index 0000000..8337121
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/et_name.c b/e2fsprogs/lib/et/et_name.c
new file mode 100644
index 0000000..3a0790e
--- /dev/null
+++ b/e2fsprogs/lib/et/et_name.c
@@ -0,0 +1,42 @@
+/*
+ * 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 "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/e2fsprogs/lib/et/init_et.c b/e2fsprogs/lib/et/init_et.c
new file mode 100644
index 0000000..bf27da1
--- /dev/null
+++ b/e2fsprogs/lib/et/init_et.c
@@ -0,0 +1,52 @@
+/*
+ * $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 <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/e2fsprogs/lib/et/internal.h b/e2fsprogs/lib/et/internal.h
new file mode 100644
index 0000000..d16f373
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/test_cases/continuation.c b/e2fsprogs/lib/et/test_cases/continuation.c
new file mode 100644
index 0000000..1207897
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/test_cases/continuation.et b/e2fsprogs/lib/et/test_cases/continuation.et
new file mode 100644
index 0000000..64d1674
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/test_cases/continuation.h b/e2fsprogs/lib/et/test_cases/continuation.h
new file mode 100644
index 0000000..9cfe602
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/test_cases/heimdal.c b/e2fsprogs/lib/et/test_cases/heimdal.c
new file mode 100644
index 0000000..d9be4ce
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/test_cases/heimdal.et b/e2fsprogs/lib/et/test_cases/heimdal.et
new file mode 100644
index 0000000..9dce192
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/test_cases/heimdal.h b/e2fsprogs/lib/et/test_cases/heimdal.h
new file mode 100644
index 0000000..5c94354
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/test_cases/heimdal2.c b/e2fsprogs/lib/et/test_cases/heimdal2.c
new file mode 100644
index 0000000..a8d4c11
--- /dev/null
+++ b/e2fsprogs/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 attemping 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/e2fsprogs/lib/et/test_cases/heimdal2.et b/e2fsprogs/lib/et/test_cases/heimdal2.et
new file mode 100644
index 0000000..7a247c5
--- /dev/null
+++ b/e2fsprogs/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 attemping 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/e2fsprogs/lib/et/test_cases/heimdal2.h b/e2fsprogs/lib/et/test_cases/heimdal2.h
new file mode 100644
index 0000000..3c2cb7d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/test_cases/heimdal3.c b/e2fsprogs/lib/et/test_cases/heimdal3.c
new file mode 100644
index 0000000..b8b9b73
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/test_cases/heimdal3.et b/e2fsprogs/lib/et/test_cases/heimdal3.et
new file mode 100644
index 0000000..a0bd5c1
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/test_cases/heimdal3.h b/e2fsprogs/lib/et/test_cases/heimdal3.h
new file mode 100644
index 0000000..91d2cb9
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/test_cases/imap_err.c b/e2fsprogs/lib/et/test_cases/imap_err.c
new file mode 100644
index 0000000..6f576d3
--- /dev/null
+++ b/e2fsprogs/lib/et/test_cases/imap_err.c
@@ -0,0 +1,84 @@
+/*
+ * 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_(   "System I/O error"),
+	N_(   "Permission denied"),
+	N_(   "Over quota"),
+	N_(   "Too many user flags in mailbox"),
+	N_(   "Mailbox has an invalid format"),
+	N_(   "Operation is not supported on mailbox"),
+	N_(   "Mailbox does not exist"),
+	N_(   "Mailbox already exists"),
+	N_(   "Invalid mailbox name"),
+	N_(   "Mailbox is locked by POP server"),
+	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_(   "Unrecognized character set"),
+	N_(   "Invalid user"),
+	N_(   "Login incorrect"),
+	N_(   "Anonymous login is not permitted"),
+	N_(   "Unsupported quota resource"),
+	N_(   "Mailbox is over quota"),
+	N_(   "Mailbox is at %d%% of quota"),
+	N_(   "Message %d no longer exists"),
+	N_(   "Unable to checkpoint \\Seen state"),
+	N_(   "Unable to preserve \\Seen state"),
+	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, 30 };
+
+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/e2fsprogs/lib/et/test_cases/imap_err.et b/e2fsprogs/lib/et/test_cases/imap_err.et
new file mode 100644
index 0000000..33f5bbc
--- /dev/null
+++ b/e2fsprogs/lib/et/test_cases/imap_err.et
@@ -0,0 +1,127 @@
+# imap_err.et -- Error codes for Cyrus IMAP server programs
+#
+# Copyright 1998 Carnegie Mellon University
+# 
+# No warranties, either expressed or implied, are made regarding the
+# operation, use, or results of the software.
+#
+# Permission to use, copy, modify and distribute this software and its
+# documentation is hereby granted for non-commercial purposes only
+# provided that this copyright notice appears in all copies and in
+# supporting documentation.
+#
+# Permission is also granted to Internet Service Providers and others
+# entities to use the software for internal purposes.
+#
+# The distribution, modification or sale of a product which uses or is
+# based on the software, in whole or in part, for commercial purposes or
+# benefits requires specific, additional permission from:
+#
+#  Office of Technology Transfer
+#  Carnegie Mellon University
+#  5000 Forbes Avenue
+#  Pittsburgh, PA  15213-3890
+#  (412) 268-4387, fax: (412) 268-7395
+#  tech-transfer@andrew.cmu.edu
+# 
+error_table imap
+
+ec IMAP_IOERROR,
+   "System I/O error"
+
+ec IMAP_PERMISSION_DENIED,
+   "Permission denied"
+
+ec IMAP_QUOTA_EXCEEDED,
+   "Over quota"
+
+ec IMAP_USERFLAG_EXHAUSTED,
+   "Too many user flags in mailbox"
+
+ec IMAP_MAILBOX_BADFORMAT,
+   "Mailbox has an invalid format"
+
+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_POPLOCKED,
+   "Mailbox is locked by POP server"
+
+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"
+
+# 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 for internationalization of untagged OK/NO responses
+
+ec IMAP_NO_OVERQUOTA,
+   "Mailbox is over quota"
+
+ec IMAP_NO_CLOSEQUOTA,
+   "Mailbox is at %d%% of 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"
+
+# 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/e2fsprogs/lib/et/test_cases/imap_err.h b/e2fsprogs/lib/et/test_cases/imap_err.h
new file mode 100644
index 0000000..17664c4
--- /dev/null
+++ b/e2fsprogs/lib/et/test_cases/imap_err.h
@@ -0,0 +1,48 @@
+/*
+ * imap_err.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <et/com_err.h>
+
+#define IMAP_IOERROR                             (-1904809472L)
+#define IMAP_PERMISSION_DENIED                   (-1904809471L)
+#define IMAP_QUOTA_EXCEEDED                      (-1904809470L)
+#define IMAP_USERFLAG_EXHAUSTED                  (-1904809469L)
+#define IMAP_MAILBOX_BADFORMAT                   (-1904809468L)
+#define IMAP_MAILBOX_NOTSUPPORTED                (-1904809467L)
+#define IMAP_MAILBOX_NONEXISTENT                 (-1904809466L)
+#define IMAP_MAILBOX_EXISTS                      (-1904809465L)
+#define IMAP_MAILBOX_BADNAME                     (-1904809464L)
+#define IMAP_MAILBOX_POPLOCKED                   (-1904809463L)
+#define IMAP_PARTITION_UNKNOWN                   (-1904809462L)
+#define IMAP_INVALID_IDENTIFIER                  (-1904809461L)
+#define IMAP_MESSAGE_CONTAINSNULL                (-1904809460L)
+#define IMAP_MESSAGE_CONTAINSNL                  (-1904809459L)
+#define IMAP_MESSAGE_CONTAINS8BIT                (-1904809458L)
+#define IMAP_MESSAGE_BADHEADER                   (-1904809457L)
+#define IMAP_MESSAGE_NOBLANKLINE                 (-1904809456L)
+#define IMAP_QUOTAROOT_NONEXISTENT               (-1904809455L)
+#define IMAP_UNRECOGNIZED_CHARSET                (-1904809454L)
+#define IMAP_INVALID_USER                        (-1904809453L)
+#define IMAP_INVALID_LOGIN                       (-1904809452L)
+#define IMAP_ANONYMOUS_NOT_PERMITTED             (-1904809451L)
+#define IMAP_UNSUPPORTED_QUOTA                   (-1904809450L)
+#define IMAP_NO_OVERQUOTA                        (-1904809449L)
+#define IMAP_NO_CLOSEQUOTA                       (-1904809448L)
+#define IMAP_NO_MSGGONE                          (-1904809447L)
+#define IMAP_NO_CHECKSEEN                        (-1904809446L)
+#define IMAP_NO_CHECKPRESERVE                    (-1904809445L)
+#define IMAP_BYE_LOGOUT                          (-1904809444L)
+#define IMAP_OK_COMPLETED                        (-1904809443L)
+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/e2fsprogs/lib/et/test_cases/simple.c b/e2fsprogs/lib/et/test_cases/simple.c
new file mode 100644
index 0000000..10ab1a3
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/test_cases/simple.et b/e2fsprogs/lib/et/test_cases/simple.et
new file mode 100644
index 0000000..4c7b77f
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/test_cases/simple.h b/e2fsprogs/lib/et/test_cases/simple.h
new file mode 100644
index 0000000..e7800b7
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/et/texinfo.tex b/e2fsprogs/lib/et/texinfo.tex
new file mode 100644
index 0000000..dddd014
--- /dev/null
+++ b/e2fsprogs/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 occurence 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.
+% (Similarily, 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 enviroments; 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
+}
+
+% Evironment 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 achive 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.
+% Similarily, 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/e2fsprogs/lib/et/vfprintf.c b/e2fsprogs/lib/et/vfprintf.c
new file mode 100644
index 0000000..a1dc1e8
--- /dev/null
+++ b/e2fsprogs/lib/et/vfprintf.c
@@ -0,0 +1,49 @@
+/*
+ * 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 */
+
+#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/e2fsprogs/lib/ext2fs/Android.mk b/e2fsprogs/lib/ext2fs/Android.mk
new file mode 100644
index 0000000..b560ef3
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/Android.mk
@@ -0,0 +1,164 @@
+LOCAL_PATH := $(call my-dir)
+
+libext2fs_src_files := \
+	ext2_err.c \
+	alloc.c \
+	alloc_sb.c \
+	alloc_stats.c \
+	alloc_tables.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 \
+	closefs.c \
+	crc16.c \
+	csum.c \
+	dblist.c \
+	dblist_dir.c \
+	dirblock.c \
+	dirhash.c \
+	dir_iterate.c \
+	dupfs.c \
+	expanddir.c \
+	ext_attr.c \
+	extent.c \
+	fileio.c \
+	finddev.c \
+	flushb.c \
+	freefs.c \
+	gen_bitmap.c \
+	gen_bitmap64.c \
+	get_pathname.c \
+	getsize.c \
+	getsectsize.c \
+	i_block.c \
+	icount.c \
+	ind_block.c \
+	initialize.c \
+	inline.c \
+	inode.c \
+	io_manager.c \
+	ismounted.c \
+	link.c \
+	llseek.c \
+	lookup.c \
+	mkdir.c \
+	mkjournal.c \
+	mmp.c \
+	namei.c \
+	native.c \
+	newdir.c \
+	openfs.c \
+	progress.c \
+	punch.c \
+	qcow2.c \
+	read_bb.c \
+	read_bb_file.c \
+	res_gdt.c \
+	rw_bitmaps.c \
+	swapfs.c \
+	symlink.c \
+	tdb.c \
+	undo_io.c \
+	unix_io.c \
+	unlink.c \
+	valid_blk.c \
+	version.c \
+	rbtree.c
+
+# get rid of this?!
+libext2fs_src_files += test_io.c
+
+libext2fs_shared_libraries := \
+	libext2_com_err \
+	libext2_uuid \
+	libext2_blkid \
+	libext2_e2p
+
+libext2fs_system_shared_libraries := libc
+
+libext2fs_static_libraries := \
+	libext2_com_err \
+	libext2_uuid_static \
+	libext2_blkid \
+	libext2_e2p
+
+libext2fs_system_static_libraries := libc
+
+libext2fs_c_includes := external/e2fsprogs/lib
+
+libext2fs_cflags := -O2 -g -W -Wall \
+	-DHAVE_UNISTD_H \
+	-DHAVE_ERRNO_H \
+	-DHAVE_NETINET_IN_H \
+	-DHAVE_SYS_IOCTL_H \
+	-DHAVE_SYS_MMAN_H \
+	-DHAVE_SYS_MOUNT_H \
+	-DHAVE_SYS_RESOURCE_H \
+	-DHAVE_SYS_SELECT_H \
+	-DHAVE_SYS_STAT_H \
+	-DHAVE_SYS_TYPES_H \
+	-DHAVE_STDLIB_H \
+	-DHAVE_STRDUP \
+	-DHAVE_MMAP \
+	-DHAVE_UTIME_H \
+	-DHAVE_GETPAGESIZE \
+	-DHAVE_EXT2_IOCTLS \
+	-DHAVE_TYPE_SSIZE_T \
+	-DHAVE_SYS_TIME_H \
+        -DHAVE_SYS_PARAM_H \
+	-DHAVE_SYSCONF \
+	-Wno-unused-parameter
+
+libext2fs_cflags_linux := \
+	-DHAVE_LINUX_FD_H \
+	-DHAVE_SYS_PRCTL_H \
+	-DHAVE_LSEEK64 \
+	-DHAVE_LSEEK64_PROTOTYPE
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2fs_src_files)
+LOCAL_SYSTEM_SHARED_LIBRARIES := $(libext2fs_system_shared_libraries)
+LOCAL_SHARED_LIBRARIES := $(libext2fs_shared_libraries)
+LOCAL_C_INCLUDES := $(libext2fs_c_includes)
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(libext2fs_c_includes)
+LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux)
+LOCAL_MODULE := libext2fs
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2fs_src_files)
+LOCAL_STATIC_LIBRARIES := $(libext2fs_static_libraries) $(libext2fs_system_static_libraries)
+LOCAL_C_INCLUDES := $(libext2fs_c_includes)
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(libext2fs_c_includes)
+LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux)
+LOCAL_MODULE := libext2fs
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2fs_src_files)
+LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(libext2fs_shared_libraries))
+LOCAL_C_INCLUDES := $(libext2fs_c_includes)
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(libext2fs_c_includes)
+ifeq ($(HOST_OS),linux)
+LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux)
+else
+LOCAL_CFLAGS := $(libext2fs_cflags)
+endif
+LOCAL_MODULE := libext2fs-host
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_SHARED_LIBRARY)
diff --git a/e2fsprogs/lib/ext2fs/Makefile.in b/e2fsprogs/lib/ext2fs/Makefile.in
new file mode 100644
index 0000000..87678c6
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/Makefile.in
@@ -0,0 +1,974 @@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = lib/ext2fs
+INSTALL = @INSTALL@
+
+@MCONFIG@
+
+@DEBUGFS_CMT@DEBUGFS_LIB_OBJS = bb_compat.o inode_io.o write_bb_file.o
+
+MK_CMDS=	_SS_DIR_OVERRIDE=../ss ../ss/mk_cmds
+
+@RESIZER_CMT@RESIZE_LIB_OBJS = dupfs.o
+@TEST_IO_CMT@TEST_IO_LIB_OBJS = test_io.o
+@IMAGER_CMT@E2IMAGE_LIB_OBJS = imager.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 \
+	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 \
+	fileio.o \
+	finddev.o \
+	flushb.o \
+	freefs.o \
+	gen_bitmap.o \
+	gen_bitmap64.o \
+	get_pathname.o \
+	getsize.o \
+	getsectsize.o \
+	i_block.o \
+	icount.o \
+	ind_block.o \
+	initialize.o \
+	inline.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 \
+	openfs.o \
+	progress.o \
+	punch.o \
+	qcow2.o \
+	read_bb.o \
+	read_bb_file.o \
+	res_gdt.o \
+	rw_bitmaps.o \
+	swapfs.o \
+	symlink.o \
+	tdb.o \
+	undo_io.o \
+	unix_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)/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)/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_pathname.c \
+	$(srcdir)/getsize.c \
+	$(srcdir)/getsectsize.c \
+	$(srcdir)/i_block.c \
+	$(srcdir)/icount.c \
+	$(srcdir)/ind_block.c \
+	$(srcdir)/initialize.c \
+	$(srcdir)/inline.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)/openfs.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)/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)/unix_io.c \
+	$(srcdir)/unlink.c \
+	$(srcdir)/valid_blk.c \
+	$(srcdir)/version.c \
+	$(srcdir)/write_bb_file.c \
+	$(srcdir)/rbtree.c \
+
+HFILES= bitops.h ext2fs.h ext2_io.h ext2_fs.h ext2_ext_attr.h ext3_extents.h \
+	tdb.h qcow2.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@
+@MAKEFILE_CHECKER@
+
+all:: ext2fs.pc
+
+.c.o:
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+@CHECKER_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
+@ELF_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
+@BSDLIB_CMT@	$(Q) $(CC) $(ALL_CFLAGS) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
+
+COMPILE_ET=../et/compile_et --build-tree
+
+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 $(STATIC_LIBEXT2FS) \
+		$(STATIC_LIBCOM_ERR)
+
+tst_icount: $(srcdir)/icount.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+	$(E) "	LD $@"
+	$(Q) $(CC) -o tst_icount $(srcdir)/icount.c -DDEBUG $(ALL_CFLAGS) \
+		$(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+
+tst_iscan: tst_iscan.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+	$(E) "	LD $@"
+	$(Q) $(CC) -o tst_iscan tst_iscan.o $(STATIC_LIBEXT2FS) \
+		$(STATIC_LIBCOM_ERR)
+
+tst_getsize: tst_getsize.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+	$(E) "	LD $@"
+	$(Q) $(CC) -o tst_getsize tst_getsize.o $(STATIC_LIBEXT2FS) \
+		$(STATIC_LIBCOM_ERR)
+
+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) \
+		$(STATIC_LIBCOM_ERR)
+
+tst_byteswap: tst_byteswap.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+	$(E) "	LD $@"
+	$(Q) $(CC) -o tst_byteswap tst_byteswap.o $(STATIC_LIBEXT2FS) \
+		$(STATIC_LIBCOM_ERR)
+
+tst_bitops: tst_bitops.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+	$(E) "	LD $@"
+	$(Q) $(CC) -o tst_bitops tst_bitops.o $(ALL_CFLAGS) \
+		$(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+
+tst_getsectsize: tst_getsectsize.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+	$(E) "	LD $@"
+	$(Q) $(CC) -o tst_sectgetsize tst_getsectsize.o \
+		$(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+
+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 
+
+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 
+
+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 
+
+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 
+
+ext2_tdbtool: tdbtool.o
+	$(E) "	LD $@"
+	$(Q) $(CC) -o ext2_tdbtool tdbtool.o tdb.o
+
+extent_dbg.c: $(srcdir)/extent_dbg.ct
+	$(E) "	MK_CMDS $<"
+	$(Q) $(MK_CMDS) $(srcdir)/extent_dbg.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
+
+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_inode.o extent_cmds.o zap.o
+
+debugfs.o: $(top_srcdir)/debugfs/debugfs.c
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+
+extent_inode.o: $(top_srcdir)/debugfs/extent_inode.c
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+
+util.o: $(top_srcdir)/debugfs/util.c
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+
+ncheck.o: $(top_srcdir)/debugfs/ncheck.c
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+
+icheck.o: $(top_srcdir)/debugfs/icheck.c
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+
+ls.o: $(top_srcdir)/debugfs/ls.c
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+
+lsdel.o: $(top_srcdir)/debugfs/lsdel.c
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+
+dump.o: $(top_srcdir)/debugfs/dump.c
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+
+set_fields.o: $(top_srcdir)/debugfs/set_fields.c
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+
+logdump.o: $(top_srcdir)/debugfs/logdump.c
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+
+htree.o: $(top_srcdir)/debugfs/htree.c
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+
+unused.o: $(top_srcdir)/debugfs/unused.c
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+
+zap.o: $(top_srcdir)/debugfs/zap.c
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+
+e2freefrag.o: $(top_srcdir)/misc/e2freefrag.c
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -DDEBUGFS -I$(top_srcdir)/debugfs -c $< -o $@
+
+filefrag.o: $(top_srcdir)/debugfs/filefrag.c
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_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 $(STATIC_LIBEXT2FS) \
+		$(DEPSTATIC_LIBSS) $(DEPSTATIC_LIBCOM_ERR)
+	$(E) "	LD $@"
+	$(Q) $(CC) -o $@ tst_bitmaps.o tst_bitmaps_cmd.o $(ALL_CFLAGS) \
+		$(STATIC_LIBEXT2FS) $(STATIC_LIBSS) $(STATIC_LIBCOM_ERR)
+
+tst_extents: $(srcdir)/extent.c $(DEBUG_OBJS) $(DEPSTATIC_LIBSS) \
+	$(STATIC_LIBE2P) $(DEPLIBUUID) $(DEPLIBBLKID) $(DEPSTATIC_LIBCOM_ERR)
+	$(E) "	LD $@"
+	$(Q) $(CC) -o tst_extents $(srcdir)/extent.c \
+		$(ALL_CFLAGS) -DDEBUG $(DEBUG_OBJS) $(STATIC_LIBSS) \
+		$(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(LIBBLKID) $(LIBUUID) \
+		$(STATIC_LIBCOM_ERR) -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) -DDEBUG \
+		$(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+
+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) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
+		$(STATIC_LIBE2P)
+
+tst_crc32c: $(srcdir)/crc32c.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+	$(Q) $(CC) $(BUILD_LDFLAGS) $(ALL_CFLAGS) -o tst_crc32c $(srcdir)/crc32c.c \
+		-DUNITTEST $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+
+mkjournal: mkjournal.c $(STATIC_LIBEXT2FS) $(DEPLIBCOM_ERR)
+	$(E) "	LD $@"
+	$(Q) $(CC) -o mkjournal $(srcdir)/mkjournal.c -DDEBUG $(STATIC_LIBEXT2FS) $(LIBCOM_ERR) $(ALL_CFLAGS)
+
+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
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_bitops
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_badblocks
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_iscan
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_types
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_icount
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_super_size
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_inode_size
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_csum
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_inline
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_crc32c
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) \
+		./tst_bitmaps -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
+	diff $(srcdir)/tst_bitmaps_exp tst_bitmaps_out
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) \
+		./tst_bitmaps -t 2 -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
+	diff $(srcdir)/tst_bitmaps_exp tst_bitmaps_out
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) \
+		./tst_bitmaps -t 3 -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
+	diff $(srcdir)/tst_bitmaps_exp tst_bitmaps_out
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) \
+		./tst_bitmaps -l -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
+	diff $(srcdir)/tst_bitmaps_exp tst_bitmaps_out
+
+installdirs::
+	$(E) "	MKINSTALLDIRS $(libdir) $(includedir)/ext2fs"
+	$(Q) $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
+		$(DESTDIR)$(includedir)/ext2fs $(DESTDIR)$(libdir)/pkgconfig
+
+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 $(libdir)/pkgconfig/ext2fs.pc"
+	$(Q) $(INSTALL_DATA) ext2fs.pc $(DESTDIR)$(libdir)/pkgconfig/ext2fs.pc
+
+uninstall::
+	$(RM) -f $(DESTDIR)$(libdir)/libext2fs.a \
+		$(DESTDIR)$(libdir)/pkgconfig/ext2fs.pc
+	$(RM) -rf $(DESTDIR)$(includedir)/ext2fs 
+
+clean::
+	$(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* checker/* \
+		tst_badblocks tst_iscan ext2_err.et ext2_err.c ext2_err.h \
+		tst_byteswap tst_ismounted tst_getsize tst_sectgetsize \
+		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 \
+		ext2_tdbtool mkjournal debug_cmds.c extent_cmds.c \
+		../libext2fs.a ../libext2fs_p.a ../libext2fs_chk.a \
+		crc32c_table.h gen_crc32ctable tst_crc32c
+
+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
+
+# +++ 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)/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)/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)/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)/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)/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)/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)/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)/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)/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)/bitops.h $(srcdir)/bmap64.h
+blkmap64_rb.o: $(srcdir)/blkmap64_rb.c $(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)/bitops.h $(srcdir)/bmap64.h $(srcdir)/rbtree.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)/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)/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
+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)/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)/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)/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)/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)/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)/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)/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)/bitops.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)/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)/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)/bitops.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)/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
+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)/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)/bitops.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)/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)/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)/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)/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)/bitops.h $(srcdir)/bmap64.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)/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)/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)/bitops.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)/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)/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)/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)/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)/bitops.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)/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)/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)/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)/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)/bitops.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)/bitops.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
+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)/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)/bitops.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)/bitops.h $(srcdir)/jfs_user.h $(srcdir)/kernel-jbd.h \
+ $(srcdir)/jfs_compat.h $(srcdir)/kernel-list.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)/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)/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)/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)/bitops.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)/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)/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)/bitops.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)/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)/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)/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)/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)/bitops.h $(srcdir)/e2image.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)/bitops.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)/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)/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)/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)/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)/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)/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)/bitops.h
+undo_io.o: $(srcdir)/undo_io.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/tdb.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
+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)/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)/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)/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)/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)/bitops.h
+rbtree.o: $(srcdir)/rbtree.c $(srcdir)/rbtree.h
diff --git a/e2fsprogs/lib/ext2fs/Makefile.pq b/e2fsprogs/lib/ext2fs/Makefile.pq
new file mode 100644
index 0000000..2f7b654
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/Makefile.pq
@@ -0,0 +1,49 @@
+TOPSRC=..\..
+LIBNAME=EXT2.LIB
+OBJFILE=EXT2.LST
+
+OBJS= 	alloc.obj \
+	alloc_tables.obj \
+	badblocks.obj \
+	bb_compat.obj \
+	bb_inode.obj \
+	bitmaps.obj \
+	bitops.obj \
+	block.obj \
+	bmap.obj \
+	bmove.obj \
+	check_desc.obj \
+	closefs.obj \
+	cmp_bitmaps.obj \
+	dblist.obj \
+	dblist_dir.obj \
+	dirblock.obj \
+	dir_iterate.obj \
+	dupfs.obj \
+	expanddir.obj \
+	fileio.obj \
+	freefs.obj \
+	get_pathname.obj \
+	icount.obj \
+	initialize.obj \
+	inline.obj \
+	inode.obj \
+	ismounted.obj \
+	link.obj \
+	lookup.obj \
+	mkdir.obj \
+	namei.obj \
+	native.obj \
+	newdir.obj \
+	openfs.obj \
+	read_bb.obj \
+	read_bb_file.obj \
+	rs_bitmap.obj \
+	rw_bitmaps.obj \
+	swapfs.obj \
+	unlink.obj \
+	valid_blk.obj \
+	version.obj
+
+!include $(TOPSRC)\powerquest\MCONFIG
+
diff --git a/e2fsprogs/lib/ext2fs/alloc.c b/e2fsprogs/lib/ext2fs/alloc.c
new file mode 100644
index 0000000..21d3e5e
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/alloc.c
@@ -0,0 +1,334 @@
+/*
+ * 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 <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"
+
+/*
+ * Check for uninit block bitmaps and deal with them appropriately
+ */
+static void check_block_uninit(ext2_filsys fs, ext2fs_block_bitmap map,
+			       dgrp_t group)
+{
+	blk_t		i;
+	blk64_t		blk, super_blk, old_desc_blk, new_desc_blk;
+	int		old_desc_blocks;
+
+	if (!(EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+					 EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) ||
+	    !(ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT)))
+		return;
+
+	blk = ext2fs_group_first_block2(fs, group);
+
+	ext2fs_super_and_bgd_loc2(fs, group, &super_blk,
+				  &old_desc_blk, &new_desc_blk, 0);
+
+	if (fs->super->s_feature_incompat &
+	    EXT2_FEATURE_INCOMPAT_META_BG)
+		old_desc_blocks = fs->super->s_first_meta_bg;
+	else
+		old_desc_blocks = fs->desc_blocks + fs->super->s_reserved_gdt_blocks;
+
+	for (i=0; i < fs->super->s_blocks_per_group; i++, blk++)
+		ext2fs_fast_unmark_block_bitmap2(map, blk);
+
+	blk = ext2fs_group_first_block2(fs, group);
+	for (i=0; i < fs->super->s_blocks_per_group; i++, blk++) {
+		if ((blk == super_blk) ||
+		    (old_desc_blk && old_desc_blocks &&
+		     (blk >= old_desc_blk) &&
+		     (blk < old_desc_blk + old_desc_blocks)) ||
+		    (new_desc_blk && (blk == new_desc_blk)) ||
+		    (blk == ext2fs_block_bitmap_loc(fs, group)) ||
+		    (blk == ext2fs_inode_bitmap_loc(fs, group)) ||
+		    (blk >= ext2fs_inode_table_loc(fs, group) &&
+		     (blk < ext2fs_inode_table_loc(fs, group)
+		      + fs->inode_blocks_per_group)))
+			ext2fs_fast_mark_block_bitmap2(map, blk);
+	}
+	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 (!(EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+					 EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) ||
+	    !(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);
+	ext2fs_group_desc_csum_set(fs, group);
+	ext2fs_mark_ib_dirty(fs);
+	ext2fs_mark_super_dirty(fs);
+	check_block_uninit(fs, fs->block_map, group);
+}
+
+/*
+ * 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_block2(ext2_filsys fs, blk64_t goal,
+			   ext2fs_block_bitmap map, blk64_t *ret)
+{
+	blk64_t	i;
+	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 (!goal || (goal >= ext2fs_blocks_count(fs->super)))
+		goal = fs->super->s_first_data_block;
+	i = goal;
+	c_ratio = 1 << ext2fs_get_bitmap_granularity(map);
+	if (c_ratio > 1)
+		goal &= ~EXT2FS_CLUSTER_MASK(fs);
+	check_block_uninit(fs, map,
+			   (i - fs->super->s_first_data_block) /
+			   EXT2_BLOCKS_PER_GROUP(fs->super));
+	do {
+		if (((i - fs->super->s_first_data_block) %
+		     EXT2_BLOCKS_PER_GROUP(fs->super)) == 0)
+			check_block_uninit(fs, map,
+					   (i - fs->super->s_first_data_block) /
+					   EXT2_BLOCKS_PER_GROUP(fs->super));
+
+		if (!ext2fs_fast_test_block_bitmap2(map, i)) {
+			*ret = i;
+			return 0;
+		}
+		i = (i + c_ratio) & ~(c_ratio - 1);
+		if (i >= ext2fs_blocks_count(fs->super))
+			i = fs->super->s_first_data_block;
+	} while (i != goal);
+	return EXT2_ET_BLOCK_ALLOC_FAIL;
+}
+
+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_block2(ext2_filsys fs, blk64_t goal,
+			     char *block_buf, blk64_t *ret)
+{
+	errcode_t	retval;
+	blk64_t		block;
+	char		*buf = 0;
+
+	if (!block_buf) {
+		retval = ext2fs_get_mem(fs->blocksize, &buf);
+		if (retval)
+			return retval;
+		block_buf = buf;
+	}
+	memset(block_buf, 0, fs->blocksize);
+
+	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_block2(fs, goal, 0, &block);
+		if (retval)
+			goto fail;
+	}
+
+	retval = io_channel_write_blk64(fs->io, block, 1, block_buf);
+	if (retval)
+		goto fail;
+
+	ext2fs_block_alloc_stats2(fs, block, +1);
+	*ret = block;
+
+fail:
+	if (buf)
+		ext2fs_free_mem(&buf);
+	return retval;
+}
+
+errcode_t ext2fs_alloc_block(ext2_filsys fs, blk_t goal,
+			     char *block_buf, blk_t *ret)
+{
+	errcode_t retval;
+	blk64_t	val;
+	retval = ext2fs_alloc_block2(fs, goal, block_buf, &val);
+	if (!retval)
+		*ret = (blk_t) val;
+	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))
+			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;
+}
diff --git a/e2fsprogs/lib/ext2fs/alloc_sb.c b/e2fsprogs/lib/ext2fs/alloc_sb.c
new file mode 100644
index 0000000..73ef2ce
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/alloc_sb.c
@@ -0,0 +1,82 @@
+/*
+ * 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 <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 (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
+		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) {
+		if (fs->super->s_reserved_gdt_blocks && fs->block_map == bmap)
+			ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT);
+		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/e2fsprogs/lib/ext2fs/alloc_stats.c b/e2fsprogs/lib/ext2fs/alloc_stats.c
new file mode 100644
index 0000000..9a6697e
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/alloc_stats.c
@@ -0,0 +1,107 @@
+/*
+ * 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 <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);
+
+#ifndef OMIT_COM_ERR
+	if (ino > fs->super->s_inodes_count) {
+		com_err("ext2fs_inode_alloc_stats2", 0,
+			"Illegal inode number: %lu", (unsigned long) ino);
+		return;
+	}
+#endif
+	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 (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+				       EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) {
+		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);
+
+#ifndef OMIT_COM_ERR
+	if (blk >= ext2fs_blocks_count(fs->super)) {
+		com_err("ext2fs_block_alloc_stats", 0,
+			"Illegal block number: %lu", (unsigned long) blk);
+		return;
+	}
+#endif
+	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 * 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;
+}
diff --git a/e2fsprogs/lib/ext2fs/alloc_tables.c b/e2fsprogs/lib/ext2fs/alloc_tables.c
new file mode 100644
index 0000000..885d2b2
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/alloc_tables.c
@@ -0,0 +1,244 @@
+/*
+ * 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 <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 continously 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 = 1 << 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 / 8))
+		size = (int) fs->super->s_blocks_per_group / 8;
+
+	/*
+	 * Don't do a long search if the previous block
+	 * search is still valid.
+	 */
+	if (start_blk && ext2fs_test_block_bitmap_range2(bmap, start_blk,
+							 elem_size))
+		return start_blk;
+
+	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)
+{
+	unsigned int	j;
+	errcode_t	retval;
+	blk64_t		group_blk, start_blk, last_blk, new_blk, blk;
+	dgrp_t		last_grp = 0;
+	int		rem_grps = 0, flexbg_size = 0;
+
+	group_blk = ext2fs_group_first_block2(fs, group);
+	last_blk = ext2fs_group_last_block2(fs, group);
+
+	if (!bmap)
+		bmap = fs->block_map;
+
+	if (EXT2_HAS_INCOMPAT_FEATURE(fs->super,
+				      EXT4_FEATURE_INCOMPAT_FLEX_BG) &&
+	    fs->super->s_log_groups_per_flex) {
+		flexbg_size = 1 << 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) {
+		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;
+
+		if (group % flexbg_size)
+			prev_block = ext2fs_block_bitmap_loc(fs, group - 1) + 1;
+		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) +
+				flexbg_size;
+		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) +
+				flexbg_size;
+
+		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;
+		for (j=0, blk = new_blk;
+		     j < fs->inode_blocks_per_group;
+		     j++, blk++) {
+			ext2fs_mark_block_bitmap2(bmap, blk);
+			if (flexbg_size) {
+				dgrp_t gr = ext2fs_group_of_blk2(fs, 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);
+			}
+		}
+		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;
+
+	ext2fs_numeric_progress_init(fs, &progress, NULL,
+				     fs->group_desc_count);
+
+	for (i = 0; i < fs->group_desc_count; i++) {
+		ext2fs_numeric_progress_update(fs, &progress, i);
+		retval = ext2fs_allocate_group_table(fs, i, fs->block_map);
+		if (retval)
+			return retval;
+	}
+	ext2fs_numeric_progress_close(fs, &progress, NULL);
+	return 0;
+}
+
diff --git a/e2fsprogs/lib/ext2fs/badblocks.c b/e2fsprogs/lib/ext2fs/badblocks.c
new file mode 100644
index 0000000..4312e19
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/badblocks.c
@@ -0,0 +1,327 @@
+/*
+ * 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 <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 a block to a badblocks list.
+ */
+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/e2fsprogs/lib/ext2fs/bb_compat.c b/e2fsprogs/lib/ext2fs/bb_compat.c
new file mode 100644
index 0000000..a94e3e4
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/bb_compat.c
@@ -0,0 +1,63 @@
+/*
+ * 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 <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/e2fsprogs/lib/ext2fs/bb_inode.c b/e2fsprogs/lib/ext2fs/bb_inode.c
new file mode 100644
index 0000000..0b6c3dd
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/bb_inode.c
@@ -0,0 +1,266 @@
+/*
+ * 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 <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 indirecto 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);
+	inode.i_size = rec.bad_block_count * fs->blocksize;
+
+	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/e2fsprogs/lib/ext2fs/bitmaps.c b/e2fsprogs/lib/ext2fs/bitmaps.c
new file mode 100644
index 0000000..f215122
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/bitmaps.c
@@ -0,0 +1,307 @@
+/*
+ * 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 <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);
+
+	fs->write_bitmaps = ext2fs_write_bitmaps;
+
+	start = 1;
+	end = fs->super->s_inodes_count;
+	real_end = (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);
+
+	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;
+	errcode_t		retval;
+
+	EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+	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;
+	bmap->cluster_bits = 0;
+	*ret = bmap;
+	return 0;
+}
+
+int ext2fs_get_bitmap_granularity(ext2fs_block_bitmap bitmap)
+{
+	ext2fs_generic_bitmap bmap = 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/e2fsprogs/lib/ext2fs/bitops.c b/e2fsprogs/lib/ext2fs/bitops.c
new file mode 100644
index 0000000..4232847
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/bitops.c
@@ -0,0 +1,157 @@
+/*
+ * 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 <stdio.h>
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+#ifndef _EXT2_HAVE_ASM_BITOPS_
+
+/*
+ * For the benefit of those who are trying to port Linux to another
+ * architecture, here are some C-language equivalents.  You should
+ * recode these in the native assmebly language, if at all possible.
+ *
+ * C language equivalents 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);
+}
+
+#endif	/* !_EXT2_HAVE_ASM_BITOPS_ */
+
+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
+}
+
+/*
+ * C-only 64 bit ops.
+ */
+
+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 (((((unsigned long) 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/e2fsprogs/lib/ext2fs/bitops.h b/e2fsprogs/lib/ext2fs/bitops.h
new file mode 100644
index 0000000..3e8132d
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/bitops.h
@@ -0,0 +1,660 @@
+/*
+ * 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) ext2fs_swab64((x))
+#define ext2fs_le64_to_cpu(x) ext2fs_swab64((x))
+#define ext2fs_cpu_to_le32(x) ext2fs_swab32((x))
+#define ext2fs_le32_to_cpu(x) ext2fs_swab32((x))
+#define ext2fs_cpu_to_le16(x) ext2fs_swab16((x))
+#define ext2fs_le16_to_cpu(x) ext2fs_swab16((x))
+#define ext2fs_cpu_to_be64(x) ((__u64)(x))
+#define ext2fs_be64_to_cpu(x) ((__u64)(x))
+#define ext2fs_cpu_to_be32(x) ((__u32)(x))
+#define ext2fs_be32_to_cpu(x) ((__u32)(x))
+#define ext2fs_cpu_to_be16(x) ((__u16)(x))
+#define ext2fs_be16_to_cpu(x) ((__u16)(x))
+#else
+#define ext2fs_cpu_to_le64(x) ((__u64)(x))
+#define ext2fs_le64_to_cpu(x) ((__u64)(x))
+#define ext2fs_cpu_to_le32(x) ((__u32)(x))
+#define ext2fs_le32_to_cpu(x) ((__u32)(x))
+#define ext2fs_cpu_to_le16(x) ((__u16)(x))
+#define ext2fs_le16_to_cpu(x) ((__u16)(x))
+#define ext2fs_cpu_to_be64(x) ext2fs_swab64((x))
+#define ext2fs_be64_to_cpu(x) ext2fs_swab64((x))
+#define ext2fs_cpu_to_be32(x) ext2fs_swab32((x))
+#define ext2fs_be32_to_cpu(x) ext2fs_swab32((x))
+#define ext2fs_cpu_to_be16(x) ext2fs_swab16((x))
+#define ext2fs_be16_to_cpu(x) ext2fs_swab16((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,
+					  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 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);
+
+/*
+ * 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
+ */
+#ifdef NO_INLINE_FUNCS
+#if (defined(__GNUC__) && (defined(__i386__) || defined(__i486__) || \
+			   defined(__i586__)))
+	/* This prevents bitops.c from trying to include the C */
+	/* function version of these functions */
+#define _EXT2_HAVE_ASM_BITOPS_
+#endif
+#endif /* NO_INLINE_FUNCS */
+
+#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));
+}
+
+
+#if ((defined __GNUC__) && !defined(_EXT2_USE_C_VERSIONS_) && \
+     (defined(__i386__) || defined(__i486__) || defined(__i586__)))
+
+#define _EXT2_HAVE_ASM_BITOPS_
+#define _EXT2_HAVE_ASM_SWAB_
+
+/*
+ * These are done by inline assembly for speed reasons.....
+ *
+ * All bitoperations return 0 if the bit was cleared before the
+ * operation and != 0 if it was not.  Bit 0 is the LSB of addr; bit 32
+ * is the LSB of (addr+1).
+ */
+
+/*
+ * Some hacks to defeat gcc over-optimizations..
+ */
+struct __dummy_h { unsigned long a[100]; };
+#define EXT2FS_ADDR (*(struct __dummy_h *) addr)
+#define EXT2FS_CONST_ADDR (*(const struct __dummy_h *) addr)
+
+_INLINE_ int ext2fs_set_bit(unsigned int nr, void * addr)
+{
+	int oldbit;
+
+	addr = (void *) (((unsigned char *) addr) + (nr >> 3));
+	__asm__ __volatile__("btsl %2,%1\n\tsbbl %0,%0"
+		:"=r" (oldbit),"+m" (EXT2FS_ADDR)
+		:"r" (nr & 7));
+	return oldbit;
+}
+
+_INLINE_ int ext2fs_clear_bit(unsigned int nr, void * addr)
+{
+	int oldbit;
+
+	addr = (void *) (((unsigned char *) addr) + (nr >> 3));
+	__asm__ __volatile__("btrl %2,%1\n\tsbbl %0,%0"
+		:"=r" (oldbit),"+m" (EXT2FS_ADDR)
+		:"r" (nr & 7));
+	return oldbit;
+}
+
+_INLINE_ int ext2fs_test_bit(unsigned int nr, const void * addr)
+{
+	int oldbit;
+
+	addr = (const void *) (((const unsigned char *) addr) + (nr >> 3));
+	__asm__ __volatile__("btl %2,%1\n\tsbbl %0,%0"
+		:"=r" (oldbit)
+		:"m" (EXT2FS_CONST_ADDR),"r" (nr & 7));
+	return oldbit;
+}
+
+_INLINE_ __u32 ext2fs_swab32(__u32 val)
+{
+#ifdef EXT2FS_REQUIRE_486
+	__asm__("bswap %0" : "=r" (val) : "0" (val));
+#else
+	__asm__("xchgb %b0,%h0\n\t"	/* swap lower bytes	*/
+		"rorl $16,%0\n\t"	/* swap words		*/
+		"xchgb %b0,%h0"		/* swap higher bytes	*/
+		:"=q" (val)
+		: "0" (val));
+#endif
+	return val;
+}
+
+_INLINE_ __u16 ext2fs_swab16(__u16 val)
+{
+	__asm__("xchgb %b0,%h0"		/* swap bytes		*/ \
+		: "=q" (val) \
+		:  "0" (val)); \
+		return val;
+}
+
+#undef EXT2FS_ADDR
+
+#endif	/* i386 */
+
+
+#if !defined(_EXT2_HAVE_ASM_SWAB_)
+
+_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));
+}
+
+#endif /* !_EXT2_HAVE_ASM_SWAB */
+
+_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_ 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
+
+#ifndef _EXT2_HAVE_ASM_BITOPS_
+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);
+#endif
+
+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/e2fsprogs/lib/ext2fs/blkmap64_ba.c b/e2fsprogs/lib/ext2fs/blkmap64_ba.c
new file mode 100644
index 0000000..72ef3eb
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/blkmap64_ba.c
@@ -0,0 +1,416 @@
+/*
+ * 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 <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 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 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 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 src,
+			      ext2fs_generic_bitmap 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 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 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 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 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 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 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 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 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 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 bitmap)
+{
+	ext2fs_ba_private bp = (ext2fs_ba_private) bitmap->private;
+
+	memset(bp->bitarray, 0,
+	       (size_t) (((bitmap->real_end - bitmap->start) / 8) + 1));
+}
+
+static void ba_print_stats(ext2fs_generic_bitmap bitmap)
+{
+	fprintf(stderr, "%16llu Bytes used by bitarray\n",
+		((bitmap->real_end - bitmap->start) >> 3) + 1 +
+		sizeof(struct ext2fs_ba_private_struct));
+}
+
+/* Find the first zero bit between start and end, inclusive. */
+static errcode_t ba_find_first_zero(ext2fs_generic_bitmap 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;
+
+	if (start < bitmap->start || end > bitmap->end || start > end)
+		return EINVAL;
+
+	if (bitmap->cluster_bits)
+		return EINVAL;
+
+	/* 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 && (((unsigned long)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;
+}
+
+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
+};
diff --git a/e2fsprogs/lib/ext2fs/blkmap64_rb.c b/e2fsprogs/lib/ext2fs/blkmap64_rb.c
new file mode 100644
index 0000000..a22682e
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/blkmap64_rb.c
@@ -0,0 +1,886 @@
+/*
+ * 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 <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"
+#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 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;
+
+	printf("\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);
+		printf("\t\t\t--> (%llu -> %llu)\n",
+			ext->start, ext->start + ext->count);
+	}
+	printf("\t\t\t=================================\n");
+}
+
+static void check_tree(struct rb_root *root, const char *msg)
+{
+	struct rb_node *new_node, *node, *next;
+	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) {
+			printf("Tree Error: count is crazy\n");
+			printf("extent: %llu -> %llu (%u)\n", ext->start,
+				ext->start + ext->count, ext->count);
+			goto err_out;
+		}
+		if (ext->start < 0) {
+			printf("Tree Error: start is crazy\n");
+			printf("extent: %llu -> %llu (%u)\n", ext->start,
+				ext->start + ext->count, ext->count);
+			goto err_out;
+		}
+
+		if (old) {
+			if (old->start > ext->start) {
+				printf("Tree Error: start is crazy\n");
+				printf("extent: %llu -> %llu (%u)\n",
+					old->start, old->start + old->count,
+					old->count);
+				printf("extent next: %llu -> %llu (%u)\n",
+					ext->start, ext->start + ext->count,
+					ext->count);
+				goto err_out;
+			}
+			if ((old->start + old->count) >= ext->start) {
+				printf("Tree Error: extent is crazy\n");
+				printf("extent: %llu -> %llu (%u)\n",
+					old->start, old->start + old->count,
+					old->count);
+				printf("extent next: %llu -> %llu (%u)\n",
+					ext->start, ext->start + ext->count,
+					ext->count);
+				goto err_out;
+			}
+		}
+		old = ext;
+	}
+	return;
+
+err_out:
+	printf("%s\n", msg);
+	print_tree(root);
+	exit(1);
+}
+#else
+#define check_tree(root, msg) do {} while (0)
+#define print_tree(root, msg) 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) {
+		perror("ext2fs_get_mem");
+		exit(1);
+	}
+
+	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 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 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 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 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 src,
+			      ext2fs_generic_bitmap 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 bmap,
+				__u64 new_end, __u64 new_real_end)
+{
+	struct ext2fs_rb_private *bp;
+
+	if (new_real_end >= bmap->real_end) {
+		bmap->end = new_end;
+		bmap->real_end = new_real_end;
+		return 0;
+	}
+
+	bp = (struct ext2fs_rb_private *) bmap->private;
+	bp->rcursor = NULL;
+	bp->wcursor = NULL;
+
+	/* truncate tree to new_real_end size */
+	rb_truncate(new_real_end, &bp->root);
+
+	bmap->end = new_end;
+	bmap->real_end = new_real_end;
+	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 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;
+
+	bp->rcursor_next = NULL;
+	ext = bp->wcursor;
+	if (ext) {
+		if (start >= ext->start &&
+		    start <= (ext->start + ext->count)) {
+#ifdef 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 reigon 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 bitmap, __u64 arg)
+{
+	struct ext2fs_rb_private *bp;
+
+	bp = (struct ext2fs_rb_private *) bitmap->private;
+	arg -= bitmap->start;
+
+	return rb_insert_extent(arg, 1, bp);
+}
+
+static int rb_unmark_bmap(ext2fs_generic_bitmap 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 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 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);
+}
+
+static void rb_unmark_bmap_extent(ext2fs_generic_bitmap 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 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 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);
+		first_set = -1;
+	}
+	if (first_set != -1)
+		rb_insert_extent(start + first_set - bitmap->start,
+				 num - first_set, bp);
+
+	return 0;
+}
+
+static errcode_t rb_get_bmap_range(ext2fs_generic_bitmap 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;
+	int count;
+	__u64 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) {
+			count -= start - pos;
+			if (count < 0)
+				continue;
+			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 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;
+}
+
+#ifdef BMAP_STATS
+static void rb_print_stats(ext2fs_generic_bitmap 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 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;
+
+	node = ext2fs_rb_first(&bp->root);
+	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 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",
+		count, ((count * sizeof(struct bmap_rb_extent)) +
+			sizeof(struct ext2fs_rb_private)));
+ 	fprintf(stderr, "%16llu bits minimum size\n",
+		min_size);
+	fprintf(stderr, "%16llu bits maximum size\n"
+		"%16llu bits average size\n",
+		max_size, avg_size);
+	fprintf(stderr, "%16llu bits set in bitmap (out of %llu)\n", size,
+		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 bitmap){}
+#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,
+};
diff --git a/e2fsprogs/lib/ext2fs/blknum.c b/e2fsprogs/lib/ext2fs/blknum.c
new file mode 100644
index 0000000..e2f0f1b
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/blknum.c
@@ -0,0 +1,494 @@
+/*
+ * 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 "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 +
+		((blk64_t)group * fs->super->s_blocks_per_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 |
+		((fs->super->s_feature_ro_compat &
+		  EXT4_FEATURE_RO_COMPAT_HUGE_FILE) ?
+		 (__u64) inode->osd2.linux2.l_i_blocks_hi << 32 : 0)) -
+		(inode->i_file_acl ? fs->blocksize >> 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 |
+		((fs->super->s_feature_ro_compat &
+		  EXT4_FEATURE_RO_COMPAT_HUGE_FILE) ?
+		 (__u64)inode->osd2.linux2.l_i_blocks_hi << 32 : 0));
+}
+
+/*
+ * Return the fs block count
+ */
+blk64_t ext2fs_blocks_count(struct ext2_super_block *super)
+{
+	return super->s_blocks_count |
+		(super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT ?
+		(__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 (super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+		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 |
+		(super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT ?
+		(__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 (super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+		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 |
+		(super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT ?
+		(__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 (super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+		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)
+{
+	return (struct ext2_group_desc *)((char *)gdp +
+					  group * EXT2_DESC_SIZE(fs->super));
+}
+
+/* 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 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 |
+		(fs->super->s_feature_incompat
+		 & EXT4_FEATURE_INCOMPAT_64BIT ?
+		 (__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 (fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+		gdp->bg_block_bitmap_hi = (__u64) blk >> 32;
+}
+
+/*
+ * 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 |
+		(fs->super->s_feature_incompat
+		 & EXT4_FEATURE_INCOMPAT_64BIT ?
+		 (__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 (fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+		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 |
+		(fs->super->s_feature_incompat
+		 & EXT4_FEATURE_INCOMPAT_64BIT ?
+		 (__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 (fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+		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 |
+		(fs->super->s_feature_incompat
+		 & EXT4_FEATURE_INCOMPAT_64BIT ?
+		 (__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 (fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+		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 |
+		(fs->super->s_feature_incompat
+		 & EXT4_FEATURE_INCOMPAT_64BIT ?
+		 (__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 (fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+		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 |
+		(fs->super->s_feature_incompat
+		 & EXT4_FEATURE_INCOMPAT_64BIT ?
+		 (__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 (fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+		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 |
+		(fs->super->s_feature_incompat
+		 & EXT4_FEATURE_INCOMPAT_64BIT ?
+		 (__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 (fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+		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 && fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+		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 && fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+		inode->osd2.linux2.l_i_file_acl_high = (__u64) blk >> 32;
+}
+
diff --git a/e2fsprogs/lib/ext2fs/block.c b/e2fsprogs/lib/ext2fs/block.c
new file mode 100644
index 0000000..3e4bbde
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/block.c
@@ -0,0 +1,651 @@
+/*
+ * 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 <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 += 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;
+
+	/*
+	 * 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/e2fsprogs/lib/ext2fs/bmap.c b/e2fsprogs/lib/ext2fs/bmap.c
new file mode 100644
index 0000000..28a3320
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/bmap.c
@@ -0,0 +1,459 @@
+/*
+ * 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 <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 ? ((blk_t *) block_buf)[nr-1] : 0;
+		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 (!EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+					EXT4_FEATURE_RO_COMPAT_BIGALLOC))
+		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 (!EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+					EXT4_FEATURE_RO_COMPAT_BIGALLOC) ||
+	    !(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 ext2fs_extent	extent;
+	unsigned int		offset;
+	errcode_t		retval = 0;
+	blk64_t			blk64 = 0;
+	int			alloc = 0;
+
+	if (bmap_flags & BMAP_SET) {
+		retval = ext2fs_extent_set_bmap(handle, block,
+						*phys_blk, 0);
+		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)
+			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 = 0;
+		retval = ext2fs_alloc_block2(fs, blk64, block_buf,
+					     &blk64);
+		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, 0);
+		if (retval)
+			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;
+	char	*buf = 0;
+	errcode_t	retval = 0;
+	int		blocks_alloc = 0, inode_dirty = 0;
+
+	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 (!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) : 0;
+
+		if ((*phys_blk == 0) && (bmap_flags & BMAP_ALLOC)) {
+			retval = ext2fs_alloc_block(fs, b, block_buf, &b);
+			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);
+ 			retval = ext2fs_alloc_block(fs, b, block_buf, &b);
+			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);
+ 			retval = ext2fs_alloc_block(fs, b, block_buf, &b);
+			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);
+		retval = ext2fs_alloc_block(fs, b, block_buf, &b);
+		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 (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/e2fsprogs/lib/ext2fs/bmap64.h b/e2fsprogs/lib/ext2fs/bmap64.h
new file mode 100644
index 0000000..f44d379
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/bmap64.h
@@ -0,0 +1,100 @@
+/*
+ * 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 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 /* BMAP_STATS_OPS */
+};
+
+
+struct ext2fs_struct_generic_bitmap {
+	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 BMAP_STATS
+	struct ext2_bmap_statistics	stats;
+#endif
+};
+
+#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 bmap);
+	void	(*free_bmap)(ext2fs_generic_bitmap bitmap);
+	errcode_t (*copy_bmap)(ext2fs_generic_bitmap src,
+			     ext2fs_generic_bitmap dest);
+	errcode_t (*resize_bmap)(ext2fs_generic_bitmap bitmap,
+			       __u64 new_end,
+			       __u64 new_real_end);
+	/* bit set/test operators */
+	int	(*mark_bmap)(ext2fs_generic_bitmap bitmap, __u64 arg);
+	int	(*unmark_bmap)(ext2fs_generic_bitmap bitmap, __u64 arg);
+	int	(*test_bmap)(ext2fs_generic_bitmap bitmap, __u64 arg);
+	void	(*mark_bmap_extent)(ext2fs_generic_bitmap bitmap, __u64 arg,
+				    unsigned int num);
+	void	(*unmark_bmap_extent)(ext2fs_generic_bitmap bitmap, __u64 arg,
+				      unsigned int num);
+	int	(*test_clear_bmap_extent)(ext2fs_generic_bitmap bitmap,
+					  __u64 arg, unsigned int num);
+	errcode_t (*set_bmap_range)(ext2fs_generic_bitmap bitmap,
+				    __u64 start, size_t num, void *in);
+	errcode_t (*get_bmap_range)(ext2fs_generic_bitmap bitmap,
+				    __u64 start, size_t num, void *out);
+	void (*clear_bmap)(ext2fs_generic_bitmap bitmap);
+	void (*print_stats)(ext2fs_generic_bitmap);
+
+	/* 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 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/e2fsprogs/lib/ext2fs/bmove.c b/e2fsprogs/lib/ext2fs/bmove.c
new file mode 100644
index 0000000..f9480c8
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/bmove.c
@@ -0,0 +1,166 @@
+/*
+ * 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 <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/e2fsprogs/lib/ext2fs/brel.h b/e2fsprogs/lib/ext2fs/brel.h
new file mode 100644
index 0000000..9fdddd4
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ext2fs/brel_ma.c b/e2fsprogs/lib/ext2fs/brel_ma.c
new file mode 100644
index 0000000..e398c1e
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/brel_ma.c
@@ -0,0 +1,198 @@
+/*
+ * 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 <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/e2fsprogs/lib/ext2fs/check_desc.c b/e2fsprogs/lib/ext2fs/check_desc.c
new file mode 100644
index 0000000..d2cc565
--- /dev/null
+++ b/e2fsprogs/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 <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 (!EXT2_HAS_INCOMPAT_FEATURE(fs->super,
+					       EXT4_FEATURE_INCOMPAT_FLEX_BG)) {
+			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/e2fsprogs/lib/ext2fs/closefs.c b/e2fsprogs/lib/ext2fs/closefs.c
new file mode 100644
index 0000000..8740383
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/closefs.c
@@ -0,0 +1,474 @@
+/*
+ * 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 <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 (!(fs->super->s_feature_ro_compat &
+	      EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER) || group <= 1)
+		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 (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
+		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 (!(fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) ||
+	    (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)
+{
+	dgrp_t	sgrp = group;
+
+	if (sgrp > ((1 << 16) - 1))
+		sgrp = (1 << 16) - 1;
+#ifdef WORDS_BIGENDIAN
+	super_shadow->s_block_group_nr = ext2fs_swab16(sgrp);
+#else
+	fs->super->s_block_group_nr = sgrp;
+#endif
+
+	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 ext2_group_desc *group_shadow = 0;
+#ifdef WORDS_BIGENDIAN
+	struct ext2_group_desc *gdp;
+	dgrp_t		j;
+#endif
+	char	*group_ptr;
+	int	old_desc_blocks;
+	struct ext2fs_numeric_progress_struct progress;
+
+	EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+	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;
+#ifdef WORDS_BIGENDIAN
+	retval = EXT2_ET_NO_MEMORY;
+	retval = ext2fs_get_mem(SUPERBLOCK_SIZE, &super_shadow);
+	if (retval)
+		goto errout;
+	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);
+
+	/* swap the group descriptors */
+	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 = ext2fs_group_desc(fs, fs->group_desc, 0);
+#endif
+
+	/*
+	 * 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;
+	fs->super->s_feature_incompat &= ~EXT3_FEATURE_INCOMPAT_RECOVER;
+#ifdef WORDS_BIGENDIAN
+	*super_shadow = *fs->super;
+	ext2fs_swap_super(super_shadow);
+#endif
+
+	/*
+	 * If this is an external journal device, don't write out the
+	 * block group descriptors or any of the backup superblocks
+	 */
+	if (fs->super->s_feature_incompat &
+	    EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)
+		goto write_primary_superblock_only;
+
+	/*
+	 * Write out the master group descriptors, and the backup
+	 * superblocks and group descriptors.
+	 */
+	group_ptr = (char *) group_shadow;
+	if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
+		old_desc_blocks = fs->super->s_first_meta_bg;
+	else
+		old_desc_blocks = fs->desc_blocks;
+
+	ext2fs_numeric_progress_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;
+
+		ext2fs_numeric_progress_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;
+		}
+	}
+
+	ext2fs_numeric_progress_close(fs, &progress, NULL);
+
+	/*
+	 * 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.
+	 */
+	if (fs->write_bitmaps) {
+		retval = fs->write_bitmaps(fs);
+		if (retval)
+			goto errout;
+	}
+
+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
+
+	if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC))
+		retval = io_channel_flush(fs->io);
+	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);
+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(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/e2fsprogs/lib/ext2fs/crc16.c b/e2fsprogs/lib/ext2fs/crc16.c
new file mode 100644
index 0000000..026f040
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/crc16.c
@@ -0,0 +1,73 @@
+/*
+ *      crc16.c
+ *
+ * This source code is licensed under the GNU General Public License,
+ * Version 2. See the file COPYING for more details.
+ */
+
+#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/e2fsprogs/lib/ext2fs/crc16.h b/e2fsprogs/lib/ext2fs/crc16.h
new file mode 100644
index 0000000..322e68d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ext2fs/crc32c.c b/e2fsprogs/lib/ext2fs/crc32c.c
new file mode 100644
index 0000000..5907500
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/crc32c.c
@@ -0,0 +1,1143 @@
+/*
+ * 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 <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+#define __force
+#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) (__force uint32_t) __constant_cpu_to_le32(x)
+#else
+# define tole(x) (x)
+#endif
+
+#if CRC_BE_BITS > 8
+# define tobe(x) (__force uint32_t) __constant_cpu_to_be32(x)
+#else
+# define tobe(x) (x)
+#endif
+
+#include "crc32c_table.h"
+
+#if CRC_LE_BITS == 32
+/* slice by 4 algorithm */
+static uint32_t crc32c_le_body(uint32_t crc, uint8_t const *buf, size_t len)
+{
+	const uint8_t *p8;
+	const uint32_t *p32;
+	size_t init_bytes;
+	size_t words;
+	size_t end_bytes;
+	size_t i;
+	uint32_t q;
+	uint8_t i0, i1, i2, i3;
+
+	crc = (__force uint32_t) __cpu_to_le32(crc);
+
+	/* unroll loop into 'init_bytes' odd bytes followed by
+	 * 'words' aligned 4 byte words followed by
+	 * 'end_bytes' odd bytes at the end */
+	p8 = buf;
+	p32 = (uint32_t *)PTR_ALIGN(p8, 4);
+	init_bytes = min((uintptr_t)p32 - (uintptr_t)p8, len);
+	words = (len - init_bytes) >> 2;
+	end_bytes = (len - init_bytes) & 3;
+
+	for (i = 0; i < init_bytes; i++) {
+#ifndef WORDS_BIGENDIAN
+		i0 = *p8++ ^ crc;
+		crc = t0_le[i0] ^ (crc >> 8);
+#else
+		i0 = *p8++ ^ (crc >> 24);
+		crc = t0_le[i0] ^ (crc << 8);
+#endif
+	}
+
+	/* using pre-increment below slightly faster */
+	p32--;
+
+	for (i = 0; i < words; i++) {
+#ifndef WORDS_BIGENDIAN
+		q = *++p32 ^ crc;
+		i3 = q;
+		i2 = q >> 8;
+		i1 = q >> 16;
+		i0 = q >> 24;
+		crc = t3_le[i3] ^ t2_le[i2] ^ t1_le[i1] ^ t0_le[i0];
+#else
+		q = *++p32 ^ crc;
+		i3 = q >> 24;
+		i2 = q >> 16;
+		i1 = q >> 8;
+		i0 = q;
+		crc = t3_le[i3] ^ t2_le[i2] ^ t1_le[i1] ^ t0_le[i0];
+#endif
+	}
+
+	p8 = (uint8_t *)(++p32);
+
+	for (i = 0; i < end_bytes; i++) {
+#ifndef WORDS_BIGENDIAN
+		i0 = *p8++ ^ crc;
+		crc = t0_le[i0] ^ (crc >> 8);
+#else
+		i0 = *p8++ ^ (crc >> 24);
+		crc = t0_le[i0] ^ (crc << 8);
+#endif
+	}
+
+	return __le32_to_cpu((__force __le32)crc);
+}
+#endif
+
+#if CRC_BE_BITS == 32
+static uint32_t crc32c_be_body(uint32_t crc, uint8_t const *buf, size_t len)
+{
+	const uint8_t *p8;
+	const uint32_t *p32;
+	size_t init_bytes;
+	size_t words;
+	size_t end_bytes;
+	size_t i;
+	uint32_t q;
+	uint8_t i0, i1, i2, i3;
+
+	crc = (__force uint32_t) __cpu_to_be32(crc);
+
+	p8 = buf;
+	p32 = (uint32_t *)PTR_ALIGN(p8, 4);
+	init_bytes = min((uintptr_t)p32 - (uintptr_t)p8, len);
+	words = (len - init_bytes) >> 2;
+	end_bytes = (len - init_bytes) & 3;
+
+	for (i = 0; i < init_bytes; i++) {
+#ifndef WORDS_BIGENDIAN
+		i0 = *p8++ ^ crc;
+		crc = t0_be[i0] ^ (crc >> 8);
+#else
+		i0 = *p8++ ^ (crc >> 24);
+		crc = t0_be[i0] ^ (crc << 8);
+#endif
+	}
+
+	p32--;
+
+	for (i = 0; i < words; i++) {
+#ifndef WORDS_BIGENDIAN
+		q = *++p32 ^ crc;
+		i3 = q;
+		i2 = q >> 8;
+		i1 = q >> 16;
+		i0 = q >> 24;
+		crc = t3_be[i3] ^ t2_be[i2] ^ t1_be[i1] ^ t0_be[i0];
+#else
+		q = *++p32 ^ crc;
+		i3 = q >> 24;
+		i2 = q >> 16;
+		i1 = q >> 8;
+		i0 = q;
+		crc = t3_be[i3] ^ t2_be[i2] ^ t1_be[i1] ^ t0_be[i0];
+#endif
+	}
+
+	p8 = (uint8_t *)(++p32);
+
+	for (i = 0; i < end_bytes; i++) {
+#ifndef WORDS_BIGENDIAN
+		i0 = *p8++ ^ crc;
+		crc = t0_be[i0] ^ (crc >> 8);
+#else
+		i0 = *p8++ ^ (crc >> 24);
+		crc = t0_be[i0] ^ (crc << 8);
+#endif
+	}
+
+	return __be32_to_cpu((__force __be32)crc);
+}
+#endif
+
+#if CRC_LE_BITS == 64
+/* slice by 8 algorithm */
+static uint32_t crc32c_le_body(uint32_t crc, uint8_t const *buf, size_t len)
+{
+	const uint8_t *p8;
+	const uint32_t *p32;
+	size_t init_bytes;
+	size_t words;
+	size_t end_bytes;
+	size_t i;
+	uint32_t q;
+	uint8_t i0, i1, i2, i3;
+
+	crc = (__force uint32_t) __cpu_to_le32(crc);
+
+	p8 = buf;
+	p32 = (const uint32_t *)PTR_ALIGN(p8, 8);
+	init_bytes = min((uintptr_t)p32 - (uintptr_t)p8, len);
+	words = (len - init_bytes) >> 3;
+	end_bytes = (len - init_bytes) & 7;
+
+	for (i = 0; i < init_bytes; i++) {
+#ifndef WORDS_BIGENDIAN
+		i0 = *p8++ ^ crc;
+		crc = t0_le[i0] ^ (crc >> 8);
+#else
+		i0 = *p8++ ^ (crc >> 24);
+		crc = t0_le[i0] ^ (crc << 8);
+#endif
+	}
+
+	p32--;
+
+	for (i = 0; i < words; i++) {
+#ifndef WORDS_BIGENDIAN
+		q = *++p32 ^ crc;
+		i3 = q;
+		i2 = q >> 8;
+		i1 = q >> 16;
+		i0 = q >> 24;
+		crc = t7_le[i3] ^ t6_le[i2] ^ t5_le[i1] ^ t4_le[i0];
+
+		q = *++p32;
+		i3 = q;
+		i2 = q >> 8;
+		i1 = q >> 16;
+		i0 = q >> 24;
+		crc ^= t3_le[i3] ^ t2_le[i2] ^ t1_le[i1] ^ t0_le[i0];
+#else
+		q = *++p32 ^ crc;
+		i3 = q >> 24;
+		i2 = q >> 16;
+		i1 = q >> 8;
+		i0 = q;
+		crc = t7_le[i3] ^ t6_le[i2] ^ t5_le[i1] ^ t4_le[i0];
+
+		q = *++p32;
+		i3 = q >> 24;
+		i2 = q >> 16;
+		i1 = q >> 8;
+		i0 = q;
+		crc ^= t3_le[i3] ^ t2_le[i2] ^ t1_le[i1] ^ t0_le[i0];
+#endif
+	}
+
+	p8 = (const uint8_t *)(++p32);
+
+	for (i = 0; i < end_bytes; i++) {
+#ifndef WORDS_BIGENDIAN
+		i0 = *p8++ ^ crc;
+		crc = t0_le[i0] ^ (crc >> 8);
+#else
+		i0 = *p8++ ^ (crc >> 24);
+		crc = t0_le[i0] ^ (crc << 8);
+#endif
+	}
+
+	return __le32_to_cpu(crc);
+}
+#endif
+
+#if CRC_BE_BITS == 64
+static uint32_t crc32c_be_body(uint32_t crc, uint8_t const *buf, size_t len)
+{
+	const uint8_t *p8;
+	const uint32_t *p32;
+	size_t init_bytes;
+	size_t words;
+	size_t end_bytes;
+	size_t i;
+	uint32_t q;
+	uint8_t i0, i1, i2, i3;
+
+	crc = (__force uint32_t) __cpu_to_be32(crc);
+
+	p8 = buf;
+	p32 = (const uint32_t *)PTR_ALIGN(p8, 8);
+	init_bytes = min((uintptr_t)p32 - (uintptr_t)p8, len);
+	words = (len - init_bytes) >> 3;
+	end_bytes = (len - init_bytes) & 7;
+
+	for (i = 0; i < init_bytes; i++) {
+#ifndef WORDS_BIGENDIAN
+		i0 = *p8++ ^ crc;
+		crc = t0_be[i0] ^ (crc >> 8);
+#else
+		i0 = *p8++ ^ (crc >> 24);
+		crc = t0_be[i0] ^ (crc << 8);
+#endif
+	}
+
+	p32--;
+
+	for (i = 0; i < words; i++) {
+#ifndef WORDS_BIGENDIAN
+		q = *++p32 ^ crc;
+		i3 = q;
+		i2 = q >> 8;
+		i1 = q >> 16;
+		i0 = q >> 24;
+		crc = t7_be[i3] ^ t6_be[i2] ^ t5_be[i1] ^ t4_be[i0];
+
+		q = *++p32;
+		i3 = q;
+		i2 = q >> 8;
+		i1 = q >> 16;
+		i0 = q >> 24;
+		crc ^= t3_be[i3] ^ t2_be[i2] ^ t1_be[i1] ^ t0_be[i0];
+#else
+		q = *++p32 ^ crc;
+		i3 = q >> 24;
+		i2 = q >> 16;
+		i1 = q >> 8;
+		i0 = q;
+		crc = t7_be[i3] ^ t6_be[i2] ^ t5_be[i1] ^ t4_be[i0];
+
+		q = *++p32;
+		i3 = q >> 24;
+		i2 = q >> 16;
+		i1 = q >> 8;
+		i0 = q;
+		crc ^= t3_be[i3] ^ t2_be[i2] ^ t1_be[i1] ^ t0_be[i0];
+#endif
+	}
+
+	p8 = (const uint8_t *)(++p32);
+
+	for (i = 0; i < end_bytes; i++) {
+#ifndef WORDS_BIGENDIAN
+		i0 = *p8++ ^ crc;
+		crc = t0_be[i0] ^ (crc >> 8);
+#else
+		i0 = *p8++ ^ (crc >> 24);
+		crc = t0_be[i0] ^ (crc << 8);
+#endif
+	}
+
+	return __be32_to_cpu(crc);
+}
+#endif
+
+/**
+ * crc32c_le() - Calculate bitwise little-endian CRC32c.
+ * @crc: seed value for computation.  ~0 for ext4, sometimes 0 for
+ *	other uses, or the previous crc32c value if computing incrementally.
+ * @p: pointer to buffer over which CRC is run
+ * @len: length of buffer @p
+ */
+uint32_t ext2fs_crc32c_le(uint32_t crc, unsigned char const *p, size_t len)
+{
+#if CRC_LE_BITS == 1
+	int i;
+	while (len--) {
+		crc ^= *p++;
+		for (i = 0; i < 8; i++)
+			crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0);
+	}
+# elif CRC_LE_BITS == 2
+	while (len--) {
+		crc ^= *p++;
+		crc = (crc >> 2) ^ t0_le[crc & 0x03];
+		crc = (crc >> 2) ^ t0_le[crc & 0x03];
+		crc = (crc >> 2) ^ t0_le[crc & 0x03];
+		crc = (crc >> 2) ^ t0_le[crc & 0x03];
+	}
+# elif CRC_LE_BITS == 4
+	while (len--) {
+		crc ^= *p++;
+		crc = (crc >> 4) ^ t0_le[crc & 0x0f];
+		crc = (crc >> 4) ^ t0_le[crc & 0x0f];
+	}
+# elif CRC_LE_BITS == 8
+	while (len--) {
+		crc ^= *p++;
+		crc = (crc >> 8) ^ t0_le[crc & 0xff];
+	}
+# else
+	crc = crc32c_le_body(crc, p, len);
+# endif
+	return crc;
+}
+
+/**
+ * crc32c_be() - Calculate bitwise big-endian CRC32c.
+ * @crc: seed value for computation.  ~0 for ext4, sometimes 0 for
+ *	other uses, or the previous crc32c value if computing incrementally.
+ * @p: pointer to buffer over which CRC is run
+ * @len: length of buffer @p
+ */
+uint32_t ext2fs_crc32c_be(uint32_t crc, unsigned char const *p, size_t len)
+{
+#if CRC_BE_BITS == 1
+	int i;
+	while (len--) {
+		crc ^= *p++ << 24;
+		for (i = 0; i < 8; i++)
+			crc = (crc << 1) ^
+			      ((crc & 0x80000000) ? CRCPOLY_BE : 0);
+	}
+# elif CRC_BE_BITS == 2
+	while (len--) {
+		crc ^= *p++ << 24;
+		crc = (crc << 2) ^ t0_be[crc >> 30];
+		crc = (crc << 2) ^ t0_be[crc >> 30];
+		crc = (crc << 2) ^ t0_be[crc >> 30];
+		crc = (crc << 2) ^ t0_be[crc >> 30];
+	}
+# elif CRC_BE_BITS == 4
+	while (len--) {
+		crc ^= *p++ << 24;
+		crc = (crc << 4) ^ t0_be[crc >> 28];
+		crc = (crc << 4) ^ t0_be[crc >> 28];
+	}
+# elif CRC_BE_BITS == 8
+	while (len--) {
+		crc ^= *p++ << 24;
+		crc = (crc << 8) ^ t0_be[crc >> 24];
+	}
+# else
+	crc = crc32c_be_body(crc, p, len);
+# endif
+	return crc;
+}
+
+#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 crc_le;	/* expected crc32_le result */
+	uint32_t crc_be;	/* expected crc32_be result */
+} test[] = {
+	{0xffffffff, 0x00000000, 0x00001000, 0x13934bef, 0x14f3b75f},
+	{0xfe7328ea, 0x00000763, 0x00000717, 0xed2c0d70, 0x57531214},
+	{0x4c40684e, 0x00000721, 0x0000011e, 0xd7f46ccc, 0xedf12ec3},
+	{0x6b487f90, 0x00000264, 0x000007bc, 0x759e9939, 0x9af8e387},
+	{0x9f5810db, 0x00000afa, 0x00000255, 0x2685197f, 0x716de6ed},
+	{0xb15c4755, 0x00000d5b, 0x000002a4, 0xd8fadcb5, 0xfc34ae3f},
+	{0x06518253, 0x00000ffb, 0x00000004, 0xabee2433, 0xfa30ac9e},
+	{0xd9e71c55, 0x00000a2a, 0x00000259, 0x96682af2, 0xe5907ea3},
+	{0x0c1ae843, 0x00000ce4, 0x0000031b, 0x7b637c43, 0xe7f71b04},
+	{0xec3cd517, 0x000002ff, 0x00000566, 0x5d719a77, 0xed16e045},
+	{0x77828e95, 0x0000067f, 0x0000038f, 0x43ee5b6c, 0x35999927},
+	{0xec87b4e3, 0x00000d1c, 0x000002e3, 0x2ddd2eee, 0x9452d3f8},
+	{0x412158bb, 0x00000eee, 0x00000111, 0x67b38ba2, 0x177976d0},
+	{0x2e52de3e, 0x00000c4a, 0x000003b5, 0xbcc5d61d, 0xf60fee71},
+	{0x6ddaae8b, 0x00000d99, 0x00000266, 0x8b535544, 0x1dab8596},
+	{0x049b6cb1, 0x000009c5, 0x000000b0, 0xfc22cabc, 0x47ebc954},
+	{0x77d4b954, 0x0000028a, 0x000007fa, 0x71d00923, 0x905585ef},
+	{0x5e192355, 0x00000ac1, 0x000001fa, 0xb966b81a, 0x33c12903},
+	{0x7d80b71d, 0x00000213, 0x000001e0, 0x2bba371a, 0x5f4bd8d9},
+	{0x01f6f1e4, 0x000001d6, 0x00000395, 0xb7e8a647, 0x2a7943a1},
+	{0x1dfabb13, 0x00000e14, 0x000001eb, 0x53917fba, 0x8dee1e5d},
+	{0xb00a4449, 0x00000bf6, 0x00000409, 0xedecb577, 0x628e087d},
+	{0x7ecd3981, 0x0000083f, 0x0000016b, 0xefef62b9, 0xda4f94e6},
+	{0xf8f330d2, 0x000004be, 0x00000757, 0x9357c9f3, 0x8e2d5c2f},
+	{0x03c38af2, 0x00000d23, 0x000002dc, 0x360fa8c0, 0x6294c0d6},
+	{0x687bb79b, 0x00000f3d, 0x000000c2, 0x448d3be2, 0x08f48f3a},
+	{0x6710f550, 0x000009e9, 0x00000603, 0xdbfd1998, 0xc950ac29},
+	{0x873171d1, 0x00000787, 0x000004d5, 0xab7f1b62, 0xe66896ab},
+	{0x373b1314, 0x00000f0f, 0x000000f0, 0x184098ab, 0x4038e674},
+	{0x90fad9cd, 0x00000ead, 0x00000152, 0x23ce52ff, 0x9eff3974},
+	{0x19676fe7, 0x0000007d, 0x0000070d, 0xf8a76f1e, 0xfbc5c8a9},
+	{0x89facd45, 0x000005f3, 0x00000473, 0x4331a006, 0xb8f0f0cc},
+	{0x6f173747, 0x00000fc3, 0x0000003c, 0xb012f08e, 0x5126e378},
+	{0x4b44a106, 0x0000075a, 0x0000008b, 0xf6f7ac38, 0xf9b1781b},
+	{0xb620ad06, 0x00000774, 0x0000017e, 0xd34558e6, 0xb175edd3},
+	{0x976f21e9, 0x000008d7, 0x0000034a, 0xe533aa3a, 0x1e4367b9},
+	{0x687628c0, 0x000006c5, 0x0000061b, 0x3a840b15, 0xfb5989a0},
+	{0xe24ac108, 0x00000cd0, 0x0000032f, 0x51010ae8, 0xcdd8f182},
+	{0x361c44a3, 0x00000304, 0x00000719, 0xfd7bd481, 0x12de540f},
+	{0xd93ff95e, 0x00000db7, 0x0000008e, 0xcfbbc304, 0x42eecd5a},
+	{0xed752d12, 0x00000883, 0x00000091, 0x65a6c868, 0x9ebfa578},
+	{0xb4ff4b54, 0x000003d3, 0x000001c1, 0xf82597e7, 0xa8ad2b19},
+	{0x111b520f, 0x00000708, 0x000000eb, 0xc3e109f3, 0x323ace17},
+	{0x62c806f2, 0x00000ba3, 0x0000045c, 0x874d3a72, 0xaf1a1360},
+	{0x40d97470, 0x000005e1, 0x0000058d, 0x87a9684f, 0x524244a8},
+	{0x4312179c, 0x00000056, 0x0000070e, 0x809a00f5, 0xf9e940b0},
+	{0x13d5f84c, 0x00000a2d, 0x00000104, 0xf3d27578, 0x5d33341c},
+	{0x1f302cb2, 0x00000151, 0x00000014, 0x1e162693, 0x53c3cfc3},
+	{0xe491db24, 0x00000600, 0x000006f6, 0x7ff09615, 0xa300ecf7},
+	{0xf9a98069, 0x000002ba, 0x000002ad, 0x01af7387, 0x31c0911e},
+	{0xe9c477ad, 0x0000015f, 0x00000778, 0x6facf9a0, 0x1993b688},
+	{0x353f32b2, 0x0000087c, 0x00000783, 0x6cc964ea, 0x418db561},
+	{0x78e1b24f, 0x00000650, 0x000006a8, 0xb3bb7c27, 0xf2aad006},
+	{0x61aa400e, 0x00000049, 0x00000254, 0xb8cd1681, 0x79150b15},
+	{0xb84b10b0, 0x00000f73, 0x0000008c, 0x406a6450, 0x0c705222},
+	{0x9fa99c9c, 0x00000a7c, 0x000004d7, 0xfb3d21b4, 0xe4e789df},
+	{0x3fc9ebe3, 0x00000cd9, 0x000000d6, 0x43803f9c, 0x5a152be5},
+	{0x529879cd, 0x000002f2, 0x00000595, 0x78b4c6a6, 0xf7236ec4},
+	{0x3a933019, 0x00000516, 0x00000266, 0xdcb45436, 0x2c7935f5},
+	{0x887b4977, 0x00000227, 0x0000038d, 0xc5f7c3d9, 0x0d6d7df6},
+	{0x770745de, 0x000008c6, 0x00000739, 0xf69145e8, 0x47d5efc9},
+	{0x28be3b47, 0x00000c46, 0x0000032b, 0x764c028f, 0x1eb70d64},
+	{0x5013a050, 0x00000cf6, 0x00000309, 0xea8fe164, 0x186affa4},
+	{0x2ec4c9ba, 0x000006e8, 0x0000078d, 0xa35557a9, 0xb41f49ec},
+	{0xa9f950c9, 0x00000d33, 0x000002cc, 0x41ea8618, 0xab8dfae3},
+	{0x5b520229, 0x000007b2, 0x00000484, 0x44569f1f, 0x607a8052},
+	{0xd8dcbbfc, 0x0000002f, 0x0000048c, 0xdb88ab8b, 0xf1c411f1},
+	{0x25529792, 0x00000d1d, 0x000002e2, 0x20cda404, 0x32683a2d},
+	{0x9f3f6d71, 0x00000238, 0x0000079a, 0x0720443e, 0x4b8ba2ff},
+	{0x64121215, 0x000007ff, 0x0000038f, 0x6aacff2c, 0x3b84233b},
+	{0xfb6cdde0, 0x00000ef8, 0x00000107, 0xbd43a0f1, 0x926624d0},
+	{0x221c9d6f, 0x000007b6, 0x0000014f, 0xb67f834b, 0x2bdedda4},
+	{0x030e1de4, 0x00000836, 0x000004b4, 0x0d67d26a, 0x75a73b73},
+	{0xb56fa6cf, 0x00000c07, 0x000003f8, 0x60601ac1, 0x10a43f35},
+	{0xb55c89f5, 0x0000098e, 0x000001d4, 0x2400efbe, 0x006e28eb},
+	{0x5e90b6d5, 0x0000070b, 0x000003ea, 0x3bb5d6ea, 0xb175fa6b},
+	{0x2a7045ae, 0x00000961, 0x00000633, 0xfca89e4b, 0x962cd6d2},
+	{0x8b374ea9, 0x000006ba, 0x00000780, 0xbce036ed, 0x4dc8279b},
+	{0x8bd90bc9, 0x00000562, 0x00000369, 0xcb26a24b, 0x50dee743},
+	{0x5b1b1762, 0x000000fd, 0x0000051a, 0x33cdda07, 0xee75ff7b},
+	{0xa4153555, 0x0000058f, 0x000005c7, 0xbe50eeca, 0xe73fffcc},
+	{0x0be1f931, 0x00000651, 0x00000672, 0x95a25753, 0x4ad6270f},
+	{0xb7e78618, 0x00000a7f, 0x000002bb, 0xe06bcc1c, 0x1a35ee59},
+	{0x4a9bc41b, 0x00000e51, 0x000001ae, 0x709e8d2c, 0x75080ca8},
+	{0xfc359d13, 0x00000440, 0x000002f8, 0x0a58451f, 0x6fa3cfbf},
+	{0x5aa48619, 0x000006d1, 0x00000284, 0x928ead83, 0xbd600efc},
+	{0xa609afa8, 0x0000053e, 0x00000272, 0xb048c141, 0x184f80bb},
+	{0x3f108afb, 0x00000949, 0x00000150, 0x9a6bb5bc, 0x0ea02be1},
+	{0x79bec2d3, 0x000008ed, 0x00000712, 0x32692d57, 0x2eb13289},
+	{0x9429e067, 0x00000bc3, 0x0000043c, 0x5295ceff, 0x8a9014a7},
+	{0xae58b96a, 0x0000082d, 0x000007d2, 0xc2a681ba, 0x6af94089},
+	{0x95df24be, 0x00000985, 0x000004c1, 0x3a287765, 0x379fcb42},
+	{0x5e94976f, 0x00000596, 0x000004ed, 0xff00c489, 0x991fc1f5},
+	{0xf5e5f1de, 0x00000d31, 0x000002ce, 0x35f28e91, 0x543def1a},
+	{0xa2c219cf, 0x00000a3c, 0x00000374, 0x707d21eb, 0xa6d28bc1},
+	{0xf21b6ceb, 0x00000919, 0x00000135, 0x0847fb8b, 0x224468c2},
+	{0xaa988728, 0x00000787, 0x00000771, 0x885aeaa4, 0x814db00b},
+	{0xaa5dfaac, 0x000003e5, 0x0000051b, 0x52c48ab7, 0x725bef8a},
+	{0x0a053968, 0x00000d2a, 0x000002d5, 0x7a90256d, 0xc53b9402},
+	{0x1421dc20, 0x00000eef, 0x00000110, 0x97d6da24, 0x10846935},
+	{0xb47c2166, 0x00000a6a, 0x00000209, 0xcfd6cc52, 0x46e2797e},
+	{0x77dd1955, 0x000000de, 0x00000266, 0xba74bcaa, 0x4fa3fe9c},
+	{0x68a03cc2, 0x0000082f, 0x000007b0, 0x752bd5d8, 0x4f760c63},
+	{0x0226b0a3, 0x00000a5f, 0x000005a0, 0x82de4970, 0x8ee1310e},
+	{0x637bf3b1, 0x00000d93, 0x0000026c, 0x5c7115cb, 0x9f6a0ced},
+	{0x3b120edf, 0x00000c13, 0x000003ec, 0x80d7d20f, 0x241657d5},
+	{0xe2456780, 0x000002eb, 0x00000641, 0xc0a5d289, 0x74df96b4},
+	{0x9b2e7125, 0x00000c0c, 0x000003f3, 0xcc15f57e, 0x03e290bf},
+	{0x153033ef, 0x00000787, 0x000006b6, 0x3cde443b, 0x7bf1d121},
+	{0x18458b3f, 0x0000066c, 0x00000561, 0x9a2bd8c6, 0x9d564bef},
+	{0x4ff9d4b9, 0x00000c8f, 0x0000033a, 0xd0ee6d6d, 0xee00aa0b},
+	{0xdf84b5d9, 0x00000802, 0x0000029a, 0xdab0d74a, 0xd0cb63dc},
+	{0x81ee15df, 0x000003ce, 0x00000725, 0x9942e2de, 0xe48fb26b},
+	{0x5c768e04, 0x00000afd, 0x00000160, 0x36110831, 0x8dc74483},
+	{0xe5e18094, 0x00000b4b, 0x000000a0, 0xffa3e4a7, 0xc0145e1b},
+	{0xed7263b6, 0x00000d0d, 0x000002f2, 0xb0006a35, 0x5468ae3a},
+	{0x5bfde7d7, 0x000006fb, 0x00000554, 0xa4193b76, 0xb73d34b2},
+	{0x67f4a743, 0x00000b85, 0x0000047a, 0xf05c8d8f, 0x4f843e49},
+	{0xf13bdf22, 0x00000ff7, 0x00000008, 0x816351eb, 0x41f537f6},
+	{0x08ecc608, 0x00000d5d, 0x00000098, 0x90492772, 0xf5172204},
+	{0x296f52ba, 0x000004f9, 0x00000788, 0x5e5a4896, 0xe01d5b46},
+	{0xbe4624c2, 0x00000427, 0x000004ef, 0xcd267b94, 0x7b9069f4},
+	{0x906f7c7c, 0x00000a05, 0x0000003f, 0x03fcfc33, 0x7b6ff563},
+	{0x8f7b323e, 0x00000458, 0x000004c7, 0xcd4969c8, 0xd4c22ada},
+	{0x88d6593d, 0x00000597, 0x000005b5, 0xf199cd3b, 0x5c3e8ca2},
+	{0x978a7768, 0x00000268, 0x000001d3, 0xb28c95bd, 0x49a2cc67},
+	{0x857a621e, 0x000007a7, 0x000003a8, 0xf4bf84ab, 0xde26f369},
+	{0xb0e121ef, 0x000005be, 0x00000644, 0x28747c14, 0x61d4dc6b},
+	{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_crc32c_be(t->crc, test_buf + t->start, t->length);
+		if (le != t->crc_le) {
+			printf("Test %d LE fails, %x != %x\n",
+			       (int) (t - test), le, t->crc_le);
+			failures++;
+		}
+		if (be != t->crc_be) {
+			printf("Test %d BE fails, %x != %x\n",
+			       (int) (t - test), be, t->crc_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/e2fsprogs/lib/ext2fs/crc32c_defs.h b/e2fsprogs/lib/ext2fs/crc32c_defs.h
new file mode 100644
index 0000000..023f2c0
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/crc32c_defs.h
@@ -0,0 +1,51 @@
+/*
+ * 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 CRCPOLY_LE 0x82F63B78
+#define CRCPOLY_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/e2fsprogs/lib/ext2fs/csum.c b/e2fsprogs/lib/ext2fs/csum.c
new file mode 100644
index 0000000..b588ead
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/csum.c
@@ -0,0 +1,307 @@
+/*
+ * 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%
+ */
+
+#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
+
+__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 size = EXT2_DESC_SIZE(fs->super);
+	size_t offset;
+	__u16 crc;
+
+	if (fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_GDT_CSUM) {
+		size_t offset = offsetof(struct ext2_group_desc, bg_checksum);
+
+#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
+		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
+	}
+
+	return crc;
+}
+
+int ext2fs_group_desc_csum_verify(ext2_filsys fs, dgrp_t group)
+{
+	if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+				       EXT4_FEATURE_RO_COMPAT_GDT_CSUM) &&
+	    (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 (!EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+					EXT4_FEATURE_RO_COMPAT_GDT_CSUM))
+		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 (!EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+					EXT4_FEATURE_RO_COMPAT_GDT_CSUM))
+		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);
+
+		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);
+	}
+
+	return 0;
+}
+#endif
diff --git a/e2fsprogs/lib/ext2fs/dblist.c b/e2fsprogs/lib/ext2fs/dblist.c
new file mode 100644
index 0000000..e5b685a
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/dblist.c
@@ -0,0 +1,415 @@
+/*
+ * 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 <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);
+
+/*
+ * 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;
+}
+
+/*
+ * 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_iterate2(ext2_dblist dblist,
+				 int (*func)(ext2_filsys fs,
+					     struct ext2_db_entry2 *db_info,
+					     void	*priv_data),
+				 void *priv_data)
+{
+	unsigned long long	i;
+	int		ret;
+
+	EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST);
+
+	if (!dblist->sorted)
+		ext2fs_dblist_sort2(dblist, 0);
+	for (i=0; i < dblist->count; i++) {
+		ret = (*func)(dblist->fs, &dblist->list[i], priv_data);
+		if (ret & DBLIST_ABORT)
+			return 0;
+	}
+	return 0;
+}
+
+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/e2fsprogs/lib/ext2fs/dblist_dir.c b/e2fsprogs/lib/ext2fs/dblist_dir.c
new file mode 100644
index 0000000..07ed8af
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/dblist_dir.c
@@ -0,0 +1,79 @@
+/*
+ * 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 <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 dir_context	*ctx;
+	int			ret;
+
+	ctx = (struct dir_context *) priv_data;
+	ctx->dir = db_info->ino;
+	ctx->errcode = 0;
+
+	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/e2fsprogs/lib/ext2fs/dir_iterate.c b/e2fsprogs/lib/ext2fs/dir_iterate.c
new file mode 100644
index 0000000..8412218
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/dir_iterate.c
@@ -0,0 +1,270 @@
+/*
+ * 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 <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) ||
+		    ((((unsigned) dirent->name_len & 0xFF)+8) > 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)
+		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;
+	int		entry;
+	struct ext2_dir_entry *dirent;
+
+	if (blockcnt < 0)
+		return 0;
+
+	entry = blockcnt ? DIRENT_OTHER_FILE : DIRENT_DOT_FILE;
+
+	ctx->errcode = ext2fs_read_dir_block3(fs, *blocknr, ctx->buf, 0);
+	if (ctx->errcode)
+		return BLOCK_ABORT;
+
+	while (offset < fs->blocksize) {
+		dirent = (struct ext2_dir_entry *) (ctx->buf + offset);
+		if (ext2fs_get_rec_len(fs, dirent, &rec_len))
+			return BLOCK_ABORT;
+		if (((offset + rec_len) > fs->blocksize) ||
+		    (rec_len < 8) ||
+		    ((rec_len % 4) != 0) ||
+		    ((((unsigned) dirent->name_len & 0xFF)+8) > rec_len)) {
+			ctx->errcode = EXT2_ET_DIR_CORRUPTED;
+			return BLOCK_ABORT;
+		}
+		if (!dirent->inode &&
+		    !(ctx->flags & DIRENT_FLAG_INCLUDE_EMPTY))
+			goto next;
+
+		ret = (ctx->func)(ctx->dir,
+				  (next_real_entry > offset) ?
+				  DIRENT_DELETED_FILE : entry,
+				  dirent, offset,
+				  fs->blocksize, 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 = ((dirent->name_len & 0xFF) + 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) {
+		ctx->errcode = ext2fs_write_dir_block3(fs, *blocknr, ctx->buf,
+						       0);
+		if (ctx->errcode)
+			return BLOCK_ABORT;
+	}
+	if (do_abort)
+		return BLOCK_ABORT;
+	return 0;
+}
+
diff --git a/e2fsprogs/lib/ext2fs/dirblock.c b/e2fsprogs/lib/ext2fs/dirblock.c
new file mode 100644
index 0000000..73e1f0a
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/dirblock.c
@@ -0,0 +1,126 @@
+/*
+ * 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 <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_block3(ext2_filsys fs, blk64_t block,
+				 void *buf, int flags EXT2FS_ATTR((unused)))
+{
+	errcode_t	retval;
+	char		*p, *end;
+	struct ext2_dir_entry *dirent;
+	unsigned int	name_len, rec_len;
+
+
+	retval = io_channel_read_blk64(fs->io, block, 1, buf);
+	if (retval)
+		return retval;
+
+	p = (char *) buf;
+	end = (char *) buf + fs->blocksize;
+	while (p < end-8) {
+		dirent = (struct ext2_dir_entry *) p;
+#ifdef WORDS_BIGENDIAN
+		dirent->inode = ext2fs_swab32(dirent->inode);
+		dirent->rec_len = ext2fs_swab16(dirent->rec_len);
+		dirent->name_len = ext2fs_swab16(dirent->name_len);
+#endif
+		name_len = dirent->name_len;
+#ifdef WORDS_BIGENDIAN
+		if (flags & EXT2_DIRBLOCK_V2_STRUCT)
+			dirent->name_len = ext2fs_swab16(dirent->name_len);
+#endif
+		if ((retval = ext2fs_get_rec_len(fs, dirent, &rec_len)) != 0)
+			return retval;
+		if ((rec_len < 8) || (rec_len % 4)) {
+			rec_len = 8;
+			retval = EXT2_ET_DIR_CORRUPTED;
+		} else if (((name_len & 0xFF) + 8) > rec_len)
+			retval = EXT2_ET_DIR_CORRUPTED;
+		p += rec_len;
+	}
+	return retval;
+}
+
+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_block3(ext2_filsys fs, blk64_t block,
+				  void *inbuf, int flags EXT2FS_ATTR((unused)))
+{
+#ifdef WORDS_BIGENDIAN
+	errcode_t	retval;
+	char		*p, *end;
+	char		*buf = 0;
+	unsigned int	rec_len;
+	struct ext2_dir_entry *dirent;
+
+	retval = ext2fs_get_mem(fs->blocksize, &buf);
+	if (retval)
+		return retval;
+	memcpy(buf, inbuf, fs->blocksize);
+	p = buf;
+	end = buf + fs->blocksize;
+	while (p < end) {
+		dirent = (struct ext2_dir_entry *) p;
+		if ((retval = ext2fs_get_rec_len(fs, dirent, &rec_len)) != 0)
+			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 (flags & EXT2_DIRBLOCK_V2_STRUCT)
+			dirent->name_len = ext2fs_swab16(dirent->name_len);
+	}
+	retval = io_channel_write_blk64(fs->io, block, 1, buf);
+	ext2fs_free_mem(&buf);
+	return retval;
+#else
+	return io_channel_write_blk64(fs->io, block, 1, (char *) inbuf);
+#endif
+}
+
+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/e2fsprogs/lib/ext2fs/dirhash.c b/e2fsprogs/lib/ext2fs/dirhash.c
new file mode 100644
index 0000000..5477bfb
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/dirhash.c
@@ -0,0 +1,260 @@
+/*
+ * 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 <stdio.h>
+#include <string.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+/*
+ * 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 ((i % 4) == 0)
+			val = pad;
+		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.
+ */
+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;
+}
diff --git a/e2fsprogs/lib/ext2fs/dosio.c b/e2fsprogs/lib/ext2fs/dosio.c
new file mode 100644
index 0000000..ff3bda6
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/dosio.c
@@ -0,0 +1,457 @@
+/*
+ * 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 <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 = {
+        EXT2_ET_MAGIC_IO_MANAGER,
+        "DOS I/O Manager",
+        dos_open,
+        dos_close,
+        dos_set_blksize,
+        dos_read_blk,
+        dos_write_blk,
+        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/e2fsprogs/lib/ext2fs/dosio.h b/e2fsprogs/lib/ext2fs/dosio.h
new file mode 100644
index 0000000..d2a8f03
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ext2fs/dupfs.c b/e2fsprogs/lib/ext2fs/dupfs.c
new file mode 100644
index 0000000..13a4812
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/dupfs.c
@@ -0,0 +1,121 @@
+/*
+ * 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 <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/e2fsprogs/lib/ext2fs/e2image.h b/e2fsprogs/lib/ext2fs/e2image.h
new file mode 100644
index 0000000..53b20cc
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ext2fs/expanddir.c b/e2fsprogs/lib/ext2fs/expanddir.c
new file mode 100644
index 0000000..c89385b
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/expanddir.c
@@ -0,0 +1,136 @@
+/*
+ * 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 <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+struct expand_dir_struct {
+	int		done;
+	int		newblocks;
+	blk64_t		goal;
+	errcode_t	err;
+};
+
+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_block(fs, new_blk, block);
+	} else {
+		retval = ext2fs_get_mem(fs->blocksize, &block);
+		if (retval) {
+			es->err = retval;
+			return BLOCK_ABORT;
+		}
+		memset(block, 0, fs->blocksize);
+		retval = io_channel_write_blk64(fs->io, new_blk, 1, block);
+	}
+	if (blockcnt >= 0)
+		es->goal = new_blk;
+	if (retval) {
+		es->err = retval;
+		return BLOCK_ABORT;
+	}
+	ext2fs_free_mem(&block);
+	*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;
+
+	es.done = 0;
+	es.err = 0;
+	es.goal = 0;
+	es.newblocks = 0;
+
+	retval = ext2fs_block_iterate3(fs, dir, BLOCK_FLAG_APPEND,
+				       0, expand_dir_proc, &es);
+
+	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;
+
+	inode.i_size += fs->blocksize;
+	ext2fs_iblk_add_blocks(fs, &inode, es.newblocks);
+
+	retval = ext2fs_write_inode(fs, dir, &inode);
+	if (retval)
+		return retval;
+
+	return 0;
+}
diff --git a/e2fsprogs/lib/ext2fs/ext2_err.c b/e2fsprogs/lib/ext2fs/ext2_err.c
new file mode 100644
index 0000000..3d6f0b4
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/ext2_err.c
@@ -0,0 +1,210 @@
+/*
+ * ext2_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_(	"EXT2FS Library version 1.42.9"),
+	N_(	"Wrong magic number for ext2_filsys structure"),
+	N_(	"Wrong magic number for badblocks_list structure"),
+	N_(	"Wrong magic number for badblocks_iterate structure"),
+	N_(	"Wrong magic number for inode_scan structure"),
+	N_(	"Wrong magic number for io_channel structure"),
+	N_(	"Wrong magic number for unix io_channel structure"),
+	N_(	"Wrong magic number for io_manager structure"),
+	N_(	"Wrong magic number for block_bitmap structure"),
+	N_(	"Wrong magic number for inode_bitmap structure"),
+	N_(	"Wrong magic number for generic_bitmap structure"),
+	N_(	"Wrong magic number for test io_channel structure"),
+	N_(	"Wrong magic number for directory block list structure"),
+	N_(	"Wrong magic number for icount structure"),
+	N_(	"Wrong magic number for Powerquest io_channel structure"),
+	N_(	"Wrong magic number for ext2 file structure"),
+	N_(	"Wrong magic number for Ext2 Image Header"),
+	N_(	"Wrong magic number for inode io_channel structure"),
+	N_(	"Wrong magic number for ext4 extent handle"),
+	N_(	"Bad magic number in super-block"),
+	N_(	"Filesystem revision too high"),
+	N_(	"Attempt to write to filesystem opened read-only"),
+	N_(	"Can't read group descriptors"),
+	N_(	"Can't write group descriptors"),
+	N_(	"Corrupt group descriptor: bad block for block bitmap"),
+	N_(	"Corrupt group descriptor: bad block for inode bitmap"),
+	N_(	"Corrupt group descriptor: bad block for inode table"),
+	N_(	"Can't write an inode bitmap"),
+	N_(	"Can't read an inode bitmap"),
+	N_(	"Can't write a block bitmap"),
+	N_(	"Can't read a block bitmap"),
+	N_(	"Can't write an inode table"),
+	N_(	"Can't read an inode table"),
+	N_(	"Can't read next inode"),
+	N_(	"Filesystem has unexpected block size"),
+	N_(	"EXT2 directory corrupted"),
+	N_(	"Attempt to read block from filesystem resulted in short read"),
+	N_(	"Attempt to write block to filesystem resulted in short write"),
+	N_(	"No free space in the directory"),
+	N_(	"Inode bitmap not loaded"),
+	N_(	"Block bitmap not loaded"),
+	N_(	"Illegal inode number"),
+	N_(	"Illegal block number"),
+	N_(	"Internal error in ext2fs_expand_dir"),
+	N_(	"Not enough space to build proposed filesystem"),
+	N_(	"Illegal block number passed to ext2fs_mark_block_bitmap"),
+	N_(	"Illegal block number passed to ext2fs_unmark_block_bitmap"),
+	N_(	"Illegal block number passed to ext2fs_test_block_bitmap"),
+	N_(	"Illegal inode number passed to ext2fs_mark_inode_bitmap"),
+	N_(	"Illegal inode number passed to ext2fs_unmark_inode_bitmap"),
+	N_(	"Illegal inode number passed to ext2fs_test_inode_bitmap"),
+	N_(	"Attempt to fudge end of block bitmap past the real end"),
+	N_(	"Attempt to fudge end of inode bitmap past the real end"),
+	N_(	"Illegal indirect block found" ),
+	N_(	"Illegal doubly indirect block found" ),
+	N_(	"Illegal triply indirect block found" ),
+	N_(	"Block bitmaps are not the same"),
+	N_(	"Inode bitmaps are not the same"),
+	N_(	"Illegal or malformed device name"),
+	N_(	"A block group is missing an inode table"),
+	N_(	"The ext2 superblock is corrupt"),
+	N_(	"Illegal generic bit number passed to ext2fs_mark_generic_bitmap"),
+	N_(	"Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"),
+	N_(	"Illegal generic bit number passed to ext2fs_test_generic_bitmap"),
+	N_(	"Too many symbolic links encountered."),
+	N_(	"The callback function will not handle this case"),
+	N_(	"The inode is from a bad block in the inode table"),
+	N_(	"Filesystem has unsupported feature(s)"),
+	N_(	"Filesystem has unsupported read-only feature(s)"),
+	N_(	"IO Channel failed to seek on read or write"),
+	N_(	"Memory allocation failed"),
+	N_(	"Invalid argument passed to ext2 library"),
+	N_(	"Could not allocate block in ext2 filesystem"),
+	N_(	"Could not allocate inode in ext2 filesystem"),
+	N_(	"Ext2 inode is not a directory"),
+	N_(	"Too many references in table"),
+	N_(	"File not found by ext2_lookup"),
+	N_(	"File open read-only"),
+	N_(	"Ext2 directory block not found"),
+	N_(	"Ext2 directory already exists"),
+	N_(	"Unimplemented ext2 library function"),
+	N_(	"User cancel requested"),
+	N_(	"Ext2 file too big"),
+	N_(	"Supplied journal device not a block device"),
+	N_(	"Journal superblock not found"),
+	N_(	"Journal must be at least 1024 blocks"),
+	N_(	"Unsupported journal version"),
+	N_(	"Error loading external journal"),
+	N_(	"Journal not found"),
+	N_(	"Directory hash unsupported"),
+	N_(	"Illegal extended attribute block number"),
+	N_(	"Cannot create filesystem with requested number of inodes"),
+	N_(	"E2image snapshot not in use"),
+	N_(	"Too many reserved group descriptor blocks"),
+	N_(	"Resize inode is corrupt"),
+	N_(	"Tried to set block bmap with missing indirect block"),
+	N_(	"TDB: Success"),
+	N_(	"TDB: Corrupt database"),
+	N_(	"TDB: IO Error"),
+	N_(	"TDB: Locking error"),
+	N_(	"TDB: Out of memory"),
+	N_(	"TDB: Record exists"),
+	N_(	"TDB: Lock exists on other keys"),
+	N_(	"TDB: Invalid parameter"),
+	N_(	"TDB: Record does not exist"),
+	N_(	"TDB: Write not permitted"),
+	N_(	"Ext2fs directory block list is empty"),
+	N_(	"Attempt to modify a block mapping via a read-only block iterator"),
+	N_(	"Wrong magic number for ext4 extent saved path"),
+	N_(	"Wrong magic number for 64-bit generic bitmap"),
+	N_(	"Wrong magic number for 64-bit block bitmap"),
+	N_(	"Wrong magic number for 64-bit inode bitmap"),
+	N_(	"Wrong magic number --- RESERVED_13"),
+	N_(	"Wrong magic number --- RESERVED_14"),
+	N_(	"Wrong magic number --- RESERVED_15"),
+	N_(	"Wrong magic number --- RESERVED_16"),
+	N_(	"Wrong magic number --- RESERVED_17"),
+	N_(	"Wrong magic number --- RESERVED_18"),
+	N_(	"Wrong magic number --- RESERVED_19"),
+	N_(	"Corrupt extent header"),
+	N_(	"Corrupt extent index"),
+	N_(	"Corrupt extent"),
+	N_(	"No free space in extent map"),
+	N_(	"Inode does not use extents"),
+	N_(	"No 'next' extent"),
+	N_(	"No 'previous' extent"),
+	N_(	"No 'up' extent"),
+	N_(	"No 'down' extent"),
+	N_(	"No current node"),
+	N_(	"Ext2fs operation not supported"),
+	N_(	"No room to insert extent in node"),
+	N_(	"Splitting would result in empty node"),
+	N_(	"Extent not found"),
+	N_(	"Operation not supported for inodes containing extents"),
+	N_(	"Extent length is invalid"),
+	N_(	"I/O Channel does not support 64-bit block numbers"),
+	N_(	"Can't check if filesystem is mounted due to missing mtab file"),
+	N_(	"Filesystem too large to use legacy bitmaps"),
+	N_(	"MMP: invalid magic number"),
+	N_(	"MMP: device currently active"),
+	N_(	"MMP: fsck being run"),
+	N_(	"MMP: block number beyond filesystem range"),
+	N_(	"MMP: undergoing an unknown operation"),
+	N_(	"MMP: filesystem still in use"),
+	N_(	"MMP: open with O_DIRECT failed"),
+	N_(	"Block group descriptor size incorrect"),
+	N_(	"Inode checksum does not match inode"),
+	N_(	"Inode bitmap checksum does not match bitmap"),
+	N_(	"Extent block checksum does not match extent block"),
+	N_(	"Directory block does not have space for checksum"),
+	N_(	"Directory block checksum does not match directory block"),
+	N_(	"Extended attribute block checksum does not match block"),
+	N_(	"Superblock checksum does not match superblock"),
+	N_(	"Unknown checksum algorithm"),
+	N_(	"MMP block checksum does not match MMP block"),
+	N_(	"Ext2 file already exists"),
+    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_ext2_error_table = { text, 2133571328L, 156 };
+
+static struct et_list link = { 0, 0 };
+
+void initialize_ext2_error_table_r(struct et_list **list);
+void initialize_ext2_error_table(void);
+
+void initialize_ext2_error_table(void) {
+    initialize_ext2_error_table_r(&_et_list);
+}
+
+/* For Heimdal compatibility */
+void initialize_ext2_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_ext2_error_table;
+    et->next = 0;
+    *end = et;
+}
diff --git a/e2fsprogs/lib/ext2fs/ext2_err.et.in b/e2fsprogs/lib/ext2fs/ext2_err.et.in
new file mode 100644
index 0000000..87812ab
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/ext2_err.et.in
@@ -0,0 +1,479 @@
+#
+# 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: fsck 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 MMP block"
+
+ec	EXT2_ET_FILE_EXISTS,
+	"Ext2 file already exists"
+
+	end
diff --git a/e2fsprogs/lib/ext2fs/ext2_err.h b/e2fsprogs/lib/ext2fs/ext2_err.h
new file mode 100644
index 0000000..7022418
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/ext2_err.h
@@ -0,0 +1,174 @@
+/*
+ * ext2_err.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <et/com_err.h>
+
+#define EXT2_ET_BASE                             (2133571328L)
+#define EXT2_ET_MAGIC_EXT2FS_FILSYS              (2133571329L)
+#define EXT2_ET_MAGIC_BADBLOCKS_LIST             (2133571330L)
+#define EXT2_ET_MAGIC_BADBLOCKS_ITERATE          (2133571331L)
+#define EXT2_ET_MAGIC_INODE_SCAN                 (2133571332L)
+#define EXT2_ET_MAGIC_IO_CHANNEL                 (2133571333L)
+#define EXT2_ET_MAGIC_UNIX_IO_CHANNEL            (2133571334L)
+#define EXT2_ET_MAGIC_IO_MANAGER                 (2133571335L)
+#define EXT2_ET_MAGIC_BLOCK_BITMAP               (2133571336L)
+#define EXT2_ET_MAGIC_INODE_BITMAP               (2133571337L)
+#define EXT2_ET_MAGIC_GENERIC_BITMAP             (2133571338L)
+#define EXT2_ET_MAGIC_TEST_IO_CHANNEL            (2133571339L)
+#define EXT2_ET_MAGIC_DBLIST                     (2133571340L)
+#define EXT2_ET_MAGIC_ICOUNT                     (2133571341L)
+#define EXT2_ET_MAGIC_PQ_IO_CHANNEL              (2133571342L)
+#define EXT2_ET_MAGIC_EXT2_FILE                  (2133571343L)
+#define EXT2_ET_MAGIC_E2IMAGE                    (2133571344L)
+#define EXT2_ET_MAGIC_INODE_IO_CHANNEL           (2133571345L)
+#define EXT2_ET_MAGIC_EXTENT_HANDLE              (2133571346L)
+#define EXT2_ET_BAD_MAGIC                        (2133571347L)
+#define EXT2_ET_REV_TOO_HIGH                     (2133571348L)
+#define EXT2_ET_RO_FILSYS                        (2133571349L)
+#define EXT2_ET_GDESC_READ                       (2133571350L)
+#define EXT2_ET_GDESC_WRITE                      (2133571351L)
+#define EXT2_ET_GDESC_BAD_BLOCK_MAP              (2133571352L)
+#define EXT2_ET_GDESC_BAD_INODE_MAP              (2133571353L)
+#define EXT2_ET_GDESC_BAD_INODE_TABLE            (2133571354L)
+#define EXT2_ET_INODE_BITMAP_WRITE               (2133571355L)
+#define EXT2_ET_INODE_BITMAP_READ                (2133571356L)
+#define EXT2_ET_BLOCK_BITMAP_WRITE               (2133571357L)
+#define EXT2_ET_BLOCK_BITMAP_READ                (2133571358L)
+#define EXT2_ET_INODE_TABLE_WRITE                (2133571359L)
+#define EXT2_ET_INODE_TABLE_READ                 (2133571360L)
+#define EXT2_ET_NEXT_INODE_READ                  (2133571361L)
+#define EXT2_ET_UNEXPECTED_BLOCK_SIZE            (2133571362L)
+#define EXT2_ET_DIR_CORRUPTED                    (2133571363L)
+#define EXT2_ET_SHORT_READ                       (2133571364L)
+#define EXT2_ET_SHORT_WRITE                      (2133571365L)
+#define EXT2_ET_DIR_NO_SPACE                     (2133571366L)
+#define EXT2_ET_NO_INODE_BITMAP                  (2133571367L)
+#define EXT2_ET_NO_BLOCK_BITMAP                  (2133571368L)
+#define EXT2_ET_BAD_INODE_NUM                    (2133571369L)
+#define EXT2_ET_BAD_BLOCK_NUM                    (2133571370L)
+#define EXT2_ET_EXPAND_DIR_ERR                   (2133571371L)
+#define EXT2_ET_TOOSMALL                         (2133571372L)
+#define EXT2_ET_BAD_BLOCK_MARK                   (2133571373L)
+#define EXT2_ET_BAD_BLOCK_UNMARK                 (2133571374L)
+#define EXT2_ET_BAD_BLOCK_TEST                   (2133571375L)
+#define EXT2_ET_BAD_INODE_MARK                   (2133571376L)
+#define EXT2_ET_BAD_INODE_UNMARK                 (2133571377L)
+#define EXT2_ET_BAD_INODE_TEST                   (2133571378L)
+#define EXT2_ET_FUDGE_BLOCK_BITMAP_END           (2133571379L)
+#define EXT2_ET_FUDGE_INODE_BITMAP_END           (2133571380L)
+#define EXT2_ET_BAD_IND_BLOCK                    (2133571381L)
+#define EXT2_ET_BAD_DIND_BLOCK                   (2133571382L)
+#define EXT2_ET_BAD_TIND_BLOCK                   (2133571383L)
+#define EXT2_ET_NEQ_BLOCK_BITMAP                 (2133571384L)
+#define EXT2_ET_NEQ_INODE_BITMAP                 (2133571385L)
+#define EXT2_ET_BAD_DEVICE_NAME                  (2133571386L)
+#define EXT2_ET_MISSING_INODE_TABLE              (2133571387L)
+#define EXT2_ET_CORRUPT_SUPERBLOCK               (2133571388L)
+#define EXT2_ET_BAD_GENERIC_MARK                 (2133571389L)
+#define EXT2_ET_BAD_GENERIC_UNMARK               (2133571390L)
+#define EXT2_ET_BAD_GENERIC_TEST                 (2133571391L)
+#define EXT2_ET_SYMLINK_LOOP                     (2133571392L)
+#define EXT2_ET_CALLBACK_NOTHANDLED              (2133571393L)
+#define EXT2_ET_BAD_BLOCK_IN_INODE_TABLE         (2133571394L)
+#define EXT2_ET_UNSUPP_FEATURE                   (2133571395L)
+#define EXT2_ET_RO_UNSUPP_FEATURE                (2133571396L)
+#define EXT2_ET_LLSEEK_FAILED                    (2133571397L)
+#define EXT2_ET_NO_MEMORY                        (2133571398L)
+#define EXT2_ET_INVALID_ARGUMENT                 (2133571399L)
+#define EXT2_ET_BLOCK_ALLOC_FAIL                 (2133571400L)
+#define EXT2_ET_INODE_ALLOC_FAIL                 (2133571401L)
+#define EXT2_ET_NO_DIRECTORY                     (2133571402L)
+#define EXT2_ET_TOO_MANY_REFS                    (2133571403L)
+#define EXT2_ET_FILE_NOT_FOUND                   (2133571404L)
+#define EXT2_ET_FILE_RO                          (2133571405L)
+#define EXT2_ET_DB_NOT_FOUND                     (2133571406L)
+#define EXT2_ET_DIR_EXISTS                       (2133571407L)
+#define EXT2_ET_UNIMPLEMENTED                    (2133571408L)
+#define EXT2_ET_CANCEL_REQUESTED                 (2133571409L)
+#define EXT2_ET_FILE_TOO_BIG                     (2133571410L)
+#define EXT2_ET_JOURNAL_NOT_BLOCK                (2133571411L)
+#define EXT2_ET_NO_JOURNAL_SB                    (2133571412L)
+#define EXT2_ET_JOURNAL_TOO_SMALL                (2133571413L)
+#define EXT2_ET_JOURNAL_UNSUPP_VERSION           (2133571414L)
+#define EXT2_ET_LOAD_EXT_JOURNAL                 (2133571415L)
+#define EXT2_ET_NO_JOURNAL                       (2133571416L)
+#define EXT2_ET_DIRHASH_UNSUPP                   (2133571417L)
+#define EXT2_ET_BAD_EA_BLOCK_NUM                 (2133571418L)
+#define EXT2_ET_TOO_MANY_INODES                  (2133571419L)
+#define EXT2_ET_NOT_IMAGE_FILE                   (2133571420L)
+#define EXT2_ET_RES_GDT_BLOCKS                   (2133571421L)
+#define EXT2_ET_RESIZE_INODE_CORRUPT             (2133571422L)
+#define EXT2_ET_SET_BMAP_NO_IND                  (2133571423L)
+#define EXT2_ET_TDB_SUCCESS                      (2133571424L)
+#define EXT2_ET_TDB_ERR_CORRUPT                  (2133571425L)
+#define EXT2_ET_TDB_ERR_IO                       (2133571426L)
+#define EXT2_ET_TDB_ERR_LOCK                     (2133571427L)
+#define EXT2_ET_TDB_ERR_OOM                      (2133571428L)
+#define EXT2_ET_TDB_ERR_EXISTS                   (2133571429L)
+#define EXT2_ET_TDB_ERR_NOLOCK                   (2133571430L)
+#define EXT2_ET_TDB_ERR_EINVAL                   (2133571431L)
+#define EXT2_ET_TDB_ERR_NOEXIST                  (2133571432L)
+#define EXT2_ET_TDB_ERR_RDONLY                   (2133571433L)
+#define EXT2_ET_DBLIST_EMPTY                     (2133571434L)
+#define EXT2_ET_RO_BLOCK_ITERATE                 (2133571435L)
+#define EXT2_ET_MAGIC_EXTENT_PATH                (2133571436L)
+#define EXT2_ET_MAGIC_GENERIC_BITMAP64           (2133571437L)
+#define EXT2_ET_MAGIC_BLOCK_BITMAP64             (2133571438L)
+#define EXT2_ET_MAGIC_INODE_BITMAP64             (2133571439L)
+#define EXT2_ET_MAGIC_RESERVED_13                (2133571440L)
+#define EXT2_ET_MAGIC_RESERVED_14                (2133571441L)
+#define EXT2_ET_MAGIC_RESERVED_15                (2133571442L)
+#define EXT2_ET_MAGIC_RESERVED_16                (2133571443L)
+#define EXT2_ET_MAGIC_RESERVED_17                (2133571444L)
+#define EXT2_ET_MAGIC_RESERVED_18                (2133571445L)
+#define EXT2_ET_MAGIC_RESERVED_19                (2133571446L)
+#define EXT2_ET_EXTENT_HEADER_BAD                (2133571447L)
+#define EXT2_ET_EXTENT_INDEX_BAD                 (2133571448L)
+#define EXT2_ET_EXTENT_LEAF_BAD                  (2133571449L)
+#define EXT2_ET_EXTENT_NO_SPACE                  (2133571450L)
+#define EXT2_ET_INODE_NOT_EXTENT                 (2133571451L)
+#define EXT2_ET_EXTENT_NO_NEXT                   (2133571452L)
+#define EXT2_ET_EXTENT_NO_PREV                   (2133571453L)
+#define EXT2_ET_EXTENT_NO_UP                     (2133571454L)
+#define EXT2_ET_EXTENT_NO_DOWN                   (2133571455L)
+#define EXT2_ET_NO_CURRENT_NODE                  (2133571456L)
+#define EXT2_ET_OP_NOT_SUPPORTED                 (2133571457L)
+#define EXT2_ET_CANT_INSERT_EXTENT               (2133571458L)
+#define EXT2_ET_CANT_SPLIT_EXTENT                (2133571459L)
+#define EXT2_ET_EXTENT_NOT_FOUND                 (2133571460L)
+#define EXT2_ET_EXTENT_NOT_SUPPORTED             (2133571461L)
+#define EXT2_ET_EXTENT_INVALID_LENGTH            (2133571462L)
+#define EXT2_ET_IO_CHANNEL_NO_SUPPORT_64         (2133571463L)
+#define EXT2_ET_NO_MTAB_FILE                     (2133571464L)
+#define EXT2_ET_CANT_USE_LEGACY_BITMAPS          (2133571465L)
+#define EXT2_ET_MMP_MAGIC_INVALID                (2133571466L)
+#define EXT2_ET_MMP_FAILED                       (2133571467L)
+#define EXT2_ET_MMP_FSCK_ON                      (2133571468L)
+#define EXT2_ET_MMP_BAD_BLOCK                    (2133571469L)
+#define EXT2_ET_MMP_UNKNOWN_SEQ                  (2133571470L)
+#define EXT2_ET_MMP_CHANGE_ABORT                 (2133571471L)
+#define EXT2_ET_MMP_OPEN_DIRECT                  (2133571472L)
+#define EXT2_ET_BAD_DESC_SIZE                    (2133571473L)
+#define EXT2_ET_INODE_CSUM_INVALID               (2133571474L)
+#define EXT2_ET_INODE_BITMAP_CSUM_INVALID        (2133571475L)
+#define EXT2_ET_EXTENT_CSUM_INVALID              (2133571476L)
+#define EXT2_ET_DIR_NO_SPACE_FOR_CSUM            (2133571477L)
+#define EXT2_ET_DIR_CSUM_INVALID                 (2133571478L)
+#define EXT2_ET_EXT_ATTR_CSUM_INVALID            (2133571479L)
+#define EXT2_ET_SB_CSUM_INVALID                  (2133571480L)
+#define EXT2_ET_UNKNOWN_CSUM                     (2133571481L)
+#define EXT2_ET_MMP_CSUM_INVALID                 (2133571482L)
+#define EXT2_ET_FILE_EXISTS                      (2133571483L)
+extern const struct error_table et_ext2_error_table;
+extern void initialize_ext2_error_table(void);
+
+/* For compatibility with Heimdal */
+extern void initialize_ext2_error_table_r(struct et_list **list);
+
+#define ERROR_TABLE_BASE_ext2 (2133571328L)
+
+/* for compatibility with older versions... */
+#define init_ext2_err_tbl initialize_ext2_error_table
+#define ext2_err_base ERROR_TABLE_BASE_ext2
diff --git a/e2fsprogs/lib/ext2fs/ext2_ext_attr.h b/e2fsprogs/lib/ext2fs/ext2_ext_attr.h
new file mode 100644
index 0000000..ed548d1
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/ext2_ext_attr.h
@@ -0,0 +1,71 @@
+/*
+  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_reserved[4];	/* 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_block;	/* disk block attribute is stored on (n/i) */
+	__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)
+
+#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/e2fsprogs/lib/ext2fs/ext2_fs.h b/e2fsprogs/lib/ext2fs/ext2_fs.h
new file mode 100644
index 0000000..6847b46
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/ext2_fs.h
@@ -0,0 +1,905 @@
+/*
+ *  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 */
+
+/*
+ * 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 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_FLAG_INCOMPAT	0x1
+
+struct ext2_dx_entry {
+	__u32 hash;
+	__u32 block;
+};
+
+struct ext2_dx_countlimit {
+	__u16 limit;
+	__u16 count;
+};
+
+
+/*
+ * 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)                                                \
+       ((EXT2_SB(s)->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT) ? \
+	(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
+
+/*
+ * 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_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 EXT4_SNAPFILE_DELETED_FL	0x04000000  /* Snapshot is being deleted */
+#define EXT4_SNAPFILE_SHRUNK_FL		0x08000000  /* Snapshot shrink has completed */
+#define EXT2_RESERVED_FL		0x80000000 /* reserved for ext2 lib */
+
+#define EXT2_FL_USER_VISIBLE		0x004BDFFF /* User visible flags */
+#define EXT2_FL_USER_MODIFIABLE		0x004B80FF /* 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 {
+	__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 */
+	__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 */
+	__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 */
+	__u32	i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
+	__u32	i_generation;	/* File version (for NFS) */
+	__u32	i_file_acl;	/* File ACL */
+	__u32	i_size_high;	/* Formerly i_dir_acl, directory ACL */
+	__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 {
+	__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 */
+	__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 */
+	__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 */
+	__u32	i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
+	__u32	i_generation;	/* File version (for NFS) */
+	__u32	i_file_acl;	/* File ACL */
+	__u32	i_size_high;	/* Formerly i_dir_acl, directory ACL */
+	__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 */
+	__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) */
+	__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 */
+};
+
+#define i_dir_acl	i_size_high
+
+#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 | (inode).osd2.linux2.l_i_uid_high << 16)
+#define inode_gid(inode)	((inode).i_gid | (inode).osd2.linux2.l_i_gid_high << 16)
+#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))
+
+/*
+ * 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 */
+
+/*
+ * 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
+
+/* 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
+
+/* Password derivation constants */
+#define EXT4_MAX_PASSPHRASE_SIZE		1024
+#define EXT4_MAX_SALT_SIZE			256
+#define EXT4_PBKDF2_ITERATIONS			0xFFFF
+
+/*
+ * 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 {
+	__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 */
+	__u32	s_log_cluster_size;	/* Allocation cluster size */
+	__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 */
+	__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 */
+	/*
+	 * 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 */
+	__u32	s_feature_incompat;	/* incompatible feature set */
+	__u32	s_feature_ro_compat;	/* readonly-compatible feature set */
+	__u8	s_uuid[16];		/* 128-bit uuid for volume */
+	char	s_volume_name[16];	/* volume name */
+	char	s_last_mounted[64];	/* 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_reserved_gdt_blocks;	/* Per group table for online growth */
+	/*
+	 * Journaling support valid if EXT2_FEATURE_COMPAT_HAS_JOURNAL set.
+	 */
+	__u8	s_journal_uuid[16];	/* 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_hash_seed[4];		/* HTREE hash seed */
+	__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 */
+	__u32	s_default_mount_opts;
+	__u32	s_first_meta_bg;	/* First metablock group */
+	__u32	s_mkfs_time;		/* When the filesystem was created */
+	__u32	s_jnl_blocks[17]; 	/* Backup of the journal inode */
+	__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 */
+	__u32	s_flags;		/* Miscellaneous flags */
+	__u16   s_raid_stride;		/* RAID stride */
+	__u16   s_mmp_update_interval;  /* # seconds to wait in MMP checking */
+	__u64   s_mmp_block;            /* Block for multi-mount protection */
+	__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 */
+	__u32	s_snapshot_inum;	/* Inode number of active snapshot */
+	__u32	s_snapshot_id;		/* sequential ID of active snapshot */
+	__u64	s_snapshot_r_blocks_count; /* reserved blocks for active
+					      snapshot's future use */
+	__u32	s_snapshot_list;	/* inode number of the head of the on-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 */
+	__u64	s_first_error_block;	/* block involved of first error */
+	__u8	s_first_error_func[32];	/* function where the error happened */
+	__u32	s_first_error_line;	/* line number where error happened */
+	__u32	s_last_error_time;	/* most recent time of an error */
+	__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 */
+	__u8	s_last_error_func[32];	/* function where the error happened */
+#define EXT4_S_ERR_END ext4_offsetof(struct ext2_super_block, s_mount_opts)
+	__u8	s_mount_opts[64];
+	__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_blocks;	/* overhead blocks/clusters in fs */
+	__u32	s_backup_bgs[2];	/* If sparse_super2 enabled */
+	__u8	s_encrypt_algos[4];	/* Encryption algorithms in use  */
+	__u8	s_encrypt_pw_salt[16];	/* Salt used for string2key algorithm */
+	__u32	s_lpf_ino;		/* Location of the lost+found inode */
+	__u32   s_reserved[100];        /* Padding to the end of the block */
+	__u32	s_checksum;		/* crc32c(superblock) */
+};
+
+#define EXT4_S_ERR_LEN (EXT4_S_ERR_END - EXT4_S_ERR_START)
+
+/*
+ * 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 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
+#define EXT4_FEATURE_RO_COMPAT_METADATA_CSUM	0x0400
+#define EXT4_FEATURE_RO_COMPAT_REPLICA		0x0800
+
+#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
+/* 0x2000 was EXT4_FEATURE_INCOMPAT_BG_USE_META_CSUM but this was never used */
+#define EXT4_FEATURE_INCOMPAT_LARGEDIR		0x4000 /* >2GB or 3-lvl htree */
+#define EXT4_FEATURE_INCOMPAT_INLINEDATA	0x8000 /* data in inode */
+#define EXT4_FEATURE_INCOMPAT_ENCRYPT		0x10000
+
+#define EXT2_FEATURE_COMPAT_SUPP	0
+#define EXT2_FEATURE_INCOMPAT_SUPP    (EXT2_FEATURE_INCOMPAT_FILETYPE| \
+				       EXT4_FEATURE_INCOMPAT_MMP)
+#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)
+
+/*
+ * 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
+
+/*
+ * 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.
+ */
+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 */
+};
+
+/*
+ * 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
+
+/*
+ * EXT2_DIR_PAD defines the directory entries boundaries
+ *
+ * NOTE: It must be a multiple of 4
+ */
+#define EXT2_DIR_PAD			4
+#define EXT2_DIR_ROUND			(EXT2_DIR_PAD - 1)
+#define EXT2_DIR_REC_LEN(name_len)	(((name_len) + 8 + EXT2_DIR_ROUND) & \
+					 ~EXT2_DIR_ROUND)
+
+/*
+ * 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
+ * arbitary 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 */
+
+struct mmp_struct {
+	__u32	mmp_magic;		/* Magic number for MMP */
+	__u32	mmp_seq;		/* Sequence no. updated periodically */
+	__u64	mmp_time;		/* Time last updated */
+	char	mmp_nodename[64];	/* Node which last updated MMP block */
+	char	mmp_bdevname[32];	/* Bdev which last updated MMP block */
+	__u16	mmp_check_interval;	/* Changed mmp_check_interval */
+	__u16	mmp_pad1;
+	__u32	mmp_pad2[227];
+};
+
+/*
+ * 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
+
+#endif	/* _LINUX_EXT2_FS_H */
diff --git a/e2fsprogs/lib/ext2fs/ext2_io.h b/e2fsprogs/lib/ext2fs/ext2_io.h
new file mode 100644
index 0000000..1894fb8
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/ext2_io.h
@@ -0,0 +1,150 @@
+/*
+ * 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
+
+/*
+ * 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 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);
+	long	reserved[16];
+};
+
+#define IO_FLAG_RW		0x0001
+#define IO_FLAG_EXCLUSIVE	0x0002
+#define IO_FLAG_DIRECT_IO	0x0004
+
+/*
+ * 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_alloc_buf(io_channel channel,
+				      int count, void *ptr);
+
+/* unix_io.c */
+extern io_manager unix_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/e2fsprogs/lib/ext2fs/ext2_types.h b/e2fsprogs/lib/ext2fs/ext2_types.h
new file mode 100644
index 0000000..18d4f9b
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/ext2_types.h
@@ -0,0 +1,137 @@
+/* 
+ * 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
+
+
+#ifdef __U8_TYPEDEF
+typedef __U8_TYPEDEF __u8;
+#else
+typedef unsigned char __u8;
+#endif
+
+#ifdef __S8_TYPEDEF
+typedef __S8_TYPEDEF __s8;
+#else
+typedef signed char __s8;
+#endif
+
+#ifdef __U16_TYPEDEF
+typedef __U16_TYPEDEF __u16;
+#else
+#if (4 == 2)
+typedef	unsigned int	__u16;
+#else
+#if (2 == 2)
+typedef	unsigned short	__u16;
+#else
+  ?==error: undefined 16 bit type
+#endif /* SIZEOF_SHORT == 2 */
+#endif /* SIZEOF_INT == 2 */
+#endif /* __U16_TYPEDEF */
+
+#ifdef __S16_TYPEDEF
+typedef __S16_TYPEDEF __s16;
+#else
+#if (4 == 2)
+typedef	int		__s16;
+#else
+#if (2 == 2)
+typedef	short		__s16;
+#else
+  ?==error: undefined 16 bit type
+#endif /* SIZEOF_SHORT == 2 */
+#endif /* SIZEOF_INT == 2 */
+#endif /* __S16_TYPEDEF */
+
+
+#ifdef __U32_TYPEDEF
+typedef __U32_TYPEDEF __u32;
+#else
+#if (4 == 4)
+typedef	unsigned int	__u32;
+#else
+#if (4 == 4)
+typedef	unsigned long	__u32;
+#else
+#if (2 == 4)
+typedef	unsigned short	__u32;
+#else
+ ?== error: undefined 32 bit type
+#endif /* SIZEOF_SHORT == 4 */
+#endif /* SIZEOF_LONG == 4 */
+#endif /* SIZEOF_INT == 4 */
+#endif /* __U32_TYPEDEF */
+
+#ifdef __S32_TYPEDEF
+typedef __S32_TYPEDEF __s32;
+#else
+#if (4 == 4)
+typedef	int		__s32;
+#else
+#if (4 == 4)
+typedef	long		__s32;
+#else
+#if (2 == 4)
+typedef	short		__s32;
+#else
+ ?== error: undefined 32 bit type
+#endif /* SIZEOF_SHORT == 4 */
+#endif /* SIZEOF_LONG == 4 */
+#endif /* SIZEOF_INT == 4 */
+#endif /* __S32_TYPEDEF */
+
+#ifdef __U64_TYPEDEF
+typedef __U64_TYPEDEF __u64;
+#else
+#if (4 == 8)
+typedef unsigned int	__u64;
+#else
+#if (8 == 8)
+typedef unsigned long long	__u64;
+#else
+#if (4 == 8)
+typedef unsigned long	__u64;
+#endif /* SIZEOF_LONG_LONG == 8 */
+#endif /* SIZEOF_LONG == 8 */
+#endif /* SIZEOF_INT == 8 */
+#endif /* __U64_TYPEDEF */
+
+#ifdef __S64_TYPEDEF
+typedef __S64_TYPEDEF __s64;
+#else
+#if (4 == 8)
+typedef int		__s64;
+#else
+#if (8 == 8)
+#if defined(__GNUC__)
+typedef __signed__ long long	__s64;
+#else
+typedef signed long long	__s64;
+#endif /* __GNUC__ */
+#else
+#if (4 == 8)
+typedef long		__s64;
+#endif /* SIZEOF_LONG_LONG == 8 */
+#endif /* SIZEOF_LONG == 8 */
+#endif /* SIZEOF_INT == 8 */
+#endif /* __S64_TYPEDEF */
+
+#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 */
+
+/* These defines are needed for the public ext2fs.h header file */
+#define HAVE_SYS_TYPES_H 1
+#undef WORDS_BIGENDIAN
diff --git a/e2fsprogs/lib/ext2fs/ext2_types.h.in b/e2fsprogs/lib/ext2fs/ext2_types.h.in
new file mode 100644
index 0000000..5b98f71
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/ext2_types.h.in
@@ -0,0 +1,136 @@
+/* 
+ * 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@
+
+#ifdef __U8_TYPEDEF
+typedef __U8_TYPEDEF __u8;
+#else
+typedef unsigned char __u8;
+#endif
+
+#ifdef __S8_TYPEDEF
+typedef __S8_TYPEDEF __s8;
+#else
+typedef signed char __s8;
+#endif
+
+#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
+  ?==error: undefined 16 bit type
+#endif /* SIZEOF_SHORT == 2 */
+#endif /* SIZEOF_INT == 2 */
+#endif /* __U16_TYPEDEF */
+
+#ifdef __S16_TYPEDEF
+typedef __S16_TYPEDEF __s16;
+#else
+#if (@SIZEOF_INT@ == 2)
+typedef	int		__s16;
+#else
+#if (@SIZEOF_SHORT@ == 2)
+typedef	short		__s16;
+#else
+  ?==error: undefined 16 bit type
+#endif /* SIZEOF_SHORT == 2 */
+#endif /* SIZEOF_INT == 2 */
+#endif /* __S16_TYPEDEF */
+
+
+#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
+ ?== error: undefined 32 bit type
+#endif /* SIZEOF_SHORT == 4 */
+#endif /* SIZEOF_LONG == 4 */
+#endif /* SIZEOF_INT == 4 */
+#endif /* __U32_TYPEDEF */
+
+#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
+ ?== error: undefined 32 bit type
+#endif /* SIZEOF_SHORT == 4 */
+#endif /* SIZEOF_LONG == 4 */
+#endif /* SIZEOF_INT == 4 */
+#endif /* __S32_TYPEDEF */
+
+#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;
+#endif /* SIZEOF_LONG_LONG == 8 */
+#endif /* SIZEOF_LONG == 8 */
+#endif /* SIZEOF_INT == 8 */
+#endif /* __U64_TYPEDEF */
+
+#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;
+#endif /* SIZEOF_LONG_LONG == 8 */
+#endif /* SIZEOF_LONG == 8 */
+#endif /* SIZEOF_INT == 8 */
+#endif /* __S64_TYPEDEF */
+
+#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 */
+
+@PUBLIC_CONFIG_HEADER@
diff --git a/e2fsprogs/lib/ext2fs/ext2fs.h b/e2fsprogs/lib/ext2fs/ext2fs.h
new file mode 100644
index 0000000..e013fbb
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/ext2fs.h
@@ -0,0 +1,1745 @@
+/*
+ * 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
+
+#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
+
+/*
+ * 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 <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 */
+
+#ifdef __CHECK_ENDIAN__
+#define __bitwise __attribute__((bitwise))
+#else
+#define __bitwise
+#endif
+
+typedef __u32 __bitwise		ext2_ino_t;
+typedef __u32 __bitwise		blk_t;
+typedef __u64 __bitwise		blk64_t;
+typedef __u32 __bitwise		dgrp_t;
+typedef __u32 __bitwise		ext2_off_t;
+typedef __u64 __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
+
+/*
+ * 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
+
+typedef struct ext2fs_struct_generic_bitmap *ext2fs_generic_bitmap;
+typedef struct ext2fs_struct_generic_bitmap *ext2fs_inode_bitmap;
+typedef struct ext2fs_struct_generic_bitmap *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
+
+/*
+ * 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 */
+
+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);
+	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;
+};
+
+#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
+
+/*
+ * Block interate flags
+ *
+ * BLOCK_FLAG_APPEND, or BLOCK_FLAG_HOLE, indicates that the interator
+ * 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 containined 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)
+
+#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 extnt 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_DOT_FILE		1
+#define DIRENT_DOT_DOT_FILE	2
+#define DIRENT_OTHER_FILE	3
+#define DIRENT_DELETED_FILE	4
+
+/*
+ * 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
+
+/*
+ * 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
+
+/*
+ * 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
+
+typedef struct ext2_icount *ext2_icount_t;
+
+/*
+ * Flags for ext2fs_bmap
+ */
+#define BMAP_ALLOC	0x0001
+#define BMAP_SET	0x0002
+
+/*
+ * Returned flags from ext2fs_bmap
+ */
+#define BMAP_RET_UNINIT	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)
+
+
+/*
+ * For ext2 compression support
+ */
+#define EXT2FS_COMPRESSED_BLKADDR ((blk_t) -1)
+#define HOLE_BLKADDR(_b) ((_b) == 0 || (_b) == EXT2FS_COMPRESSED_BLKADDR)
+
+/*
+ * 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)
+
+/* This #ifdef is temporary until compression is fully supported */
+#ifdef ENABLE_COMPRESSION
+#ifndef I_KNOW_THAT_COMPRESSION_IS_EXPERIMENTAL
+/* If the below warning bugs you, then have
+   `CPPFLAGS=-DI_KNOW_THAT_COMPRESSION_IS_EXPERIMENTAL' in your
+   environment at configure time. */
+ #warning "Compression support is experimental"
+#endif
+#define EXT2_LIB_FEATURE_INCOMPAT_SUPP	(EXT2_FEATURE_INCOMPAT_FILETYPE|\
+					 EXT2_FEATURE_INCOMPAT_COMPRESSION|\
+					 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_MMP|\
+					 EXT4_FEATURE_INCOMPAT_64BIT|\
+					 EXT4_FEATURE_INCOMPAT_ENCRYPT)
+#else
+#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_MMP|\
+					 EXT4_FEATURE_INCOMPAT_64BIT|\
+					 EXT4_FEATURE_INCOMPAT_ENCRYPT)
+#endif
+#ifdef CONFIG_QUOTA
+#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)
+#else
+#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)
+#endif
+
+/*
+ * 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
+
+/*
+ * function prototypes
+ */
+
+/* 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 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_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 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));
+
+/* 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);
+
+/* 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_write_inode_bitmap(ext2_filsys fs);
+extern errcode_t ext2fs_write_block_bitmap (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_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_read_bitmaps(ext2_filsys fs);
+extern errcode_t ext2fs_write_bitmaps(ext2_filsys fs);
+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 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_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_loc(ext2_filsys fs, dgrp_t group);
+extern void ext2fs_block_bitmap_loc_set(ext2_filsys fs, dgrp_t group,
+					blk64_t blk);
+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);
+
+/* 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_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_crc32c_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_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_get_num_dirs(ext2_filsys fs, ext2_ino_t *ret_num_dirs);
+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_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);
+
+/* 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_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);
+
+/* 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);
+
+
+/* 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 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_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_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);
+
+/* 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);
+
+/* 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);
+
+/* gen_bitmap64.c */
+
+/* Generate and print bitmap usage statistics */
+#define BMAP_STATS
+
+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);
+
+/* 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);
+
+/* 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);
+
+/* inode.c */
+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);
+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_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_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);
+
+/* mkdir.c */
+extern errcode_t ext2fs_mkdir(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t inum,
+			      const char *name);
+
+/* mkjournal.c */
+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_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 int ext2fs_default_journal_size(__u64 num_blocks);
+
+/* 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);
+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);
+
+/* get_pathname.c */
+extern errcode_t ext2fs_get_pathname(ext2_filsys fs, ext2_ino_t dir, ext2_ino_t ino,
+			       char **name);
+
+/* link.c */
+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, char *target);
+
+/* 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_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);
+
+/* swapfs.c */
+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 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 unsigned int ext2fs_div_ceil(unsigned int a, unsigned int b);
+extern __u64 ext2fs_div64_ceil(__u64 a, __u64 b);
+#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 && (-1UL)/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)
+{
+	void *pp;
+
+	if (count && (-1UL)/count<size)
+		return EXT2_ET_NO_MEMORY;
+	pp = calloc(count, size);
+	if (!pp)
+		return EXT2_ET_NO_MEMORY;
+	memcpy(ptr, &pp, sizeof(pp));
+	return 0;
+}
+
+/*
+ * 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;
+}
+#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);
+}
+
+/*
+ * 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;
+}
+
+#undef _INLINE_
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _EXT2FS_EXT2FS_H */
diff --git a/e2fsprogs/lib/ext2fs/ext2fs.pc.in b/e2fsprogs/lib/ext2fs/ext2fs.pc.in
new file mode 100644
index 0000000..efac85e
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ext2fs/ext2fsP.h b/e2fsprogs/lib/ext2fs/ext2fsP.h
new file mode 100644
index 0000000..a88db93
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/ext2fsP.h
@@ -0,0 +1,147 @@
+/*
+ * 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%
+ */
+
+#include "ext2fs.h"
+
+#define EXT2FS_MAX_NESTED_LINKS  8
+
+/*
+ * 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;
+	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;
+	int				cache_size;
+	int				refcount;
+	struct ext2_inode_cache_ent	*cache;
+};
+
+struct ext2_inode_cache_ent {
+	ext2_ino_t		ino;
+	struct ext2_inode	inode;
+};
+
+/* 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);
+
+/* Generic numeric progress meter */
+
+struct ext2fs_numeric_progress_struct {
+	__u64		max;
+	int		log_max;
+	int		skip_progress;
+};
+
+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);
diff --git a/e2fsprogs/lib/ext2fs/ext3_extents.h b/e2fsprogs/lib/ext2fs/ext3_extents.h
new file mode 100644
index 0000000..88fabc9
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/ext3_extents.h
@@ -0,0 +1,109 @@
+/*
+ * 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 on-disk structure
+ * it's used at the bottom of the tree
+ */
+struct ext3_extent {
+	__u32	ee_block;	/* first logical block extent covers */
+	__u16	ee_len;		/* number of blocks covered by extent */
+	__u16	ee_start_hi;	/* high 16 bits of physical block */
+	__u32	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 {
+	__u32	ei_block;	/* index covers logical blocks from 'block' */
+	__u32	ei_leaf;	/* pointer to the physical block of the next *
+				 * level. leaf or next index could bet here */
+	__u16	ei_leaf_hi;	/* high 16 bits of physical block */
+	__u16	ei_unused;
+};
+
+/*
+ * each block (leaves and indexes), even inode-stored has header
+ */
+struct ext3_extent_header {
+	__u16	eh_magic;	/* probably will support different formats */
+	__u16	eh_entries;	/* number of valid entries */
+	__u16	eh_max;		/* capacity of store in entries */
+	__u16	eh_depth;	/* has tree real underlaying blocks? */
+	__u32	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_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__) \
+	((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max)
+#define EXT_LAST_EXTENT(__hdr__) \
+	(EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1)
+#define EXT_LAST_INDEX(__hdr__) \
+	(EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1)
+#define EXT_MAX_EXTENT(__hdr__) \
+	(EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1)
+#define EXT_MAX_INDEX(__hdr__) \
+	(EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1)
+
+#endif /* _LINUX_EXT3_EXTENTS */
+
diff --git a/e2fsprogs/lib/ext2fs/ext_attr.c b/e2fsprogs/lib/ext2fs/ext_attr.c
new file mode 100644
index 0000000..ddcc89f
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/ext_attr.c
@@ -0,0 +1,156 @@
+/*
+ * 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 <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 "ext2fs.h"
+
+#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;
+	char *name = ((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_block == 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;
+}
+
+#undef NAME_HASH_SHIFT
+#undef VALUE_HASH_SHIFT
+
+errcode_t ext2fs_read_ext_attr2(ext2_filsys fs, blk64_t block, void *buf)
+{
+	errcode_t	retval;
+
+	retval = io_channel_read_blk64(fs->io, block, 1, buf);
+	if (retval)
+		return retval;
+#ifdef WORDS_BIGENDIAN
+	ext2fs_swap_ext_attr(buf, buf, fs->blocksize, 1);
+#endif
+	return 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_attr2(ext2_filsys fs, blk64_t block, void *inbuf)
+{
+	errcode_t	retval;
+	char		*write_buf;
+#ifdef WORDS_BIGENDIAN
+	char		*buf = NULL;
+
+	retval = ext2fs_get_mem(fs->blocksize, &buf);
+	if (retval)
+		return retval;
+	write_buf = buf;
+	ext2fs_swap_ext_attr(buf, inbuf, fs->blocksize, 1);
+#else
+	write_buf = (char *) inbuf;
+#endif
+	retval = io_channel_write_blk64(fs->io, block, 1, write_buf);
+#ifdef WORDS_BIGENDIAN
+	ext2fs_free_mem(&buf);
+#endif
+	if (!retval)
+		ext2fs_mark_changed(fs);
+	return retval;
+}
+
+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_refcount2(ext2_filsys fs, blk64_t blk,
+				    char *block_buf, int adjust,
+				    __u32 *newcount)
+{
+	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_attr2(fs, blk, block_buf);
+	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_attr2(fs, blk, block_buf);
+	if (retval)
+		goto errout;
+
+errout:
+	if (buf)
+		ext2fs_free_mem(&buf);
+	return retval;
+}
+
+errcode_t ext2fs_adjust_ea_refcount(ext2_filsys fs, blk_t blk,
+					char *block_buf, int adjust,
+					__u32 *newcount)
+{
+	return ext2fs_adjust_ea_refcount(fs, blk, block_buf, adjust, newcount);
+}
diff --git a/e2fsprogs/lib/ext2fs/extent.c b/e2fsprogs/lib/ext2fs/extent.c
new file mode 100644
index 0000000..fc6c95b
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/extent.c
@@ -0,0 +1,1572 @@
+/*
+ * 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 <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"
+
+/*
+ * 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;
+	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;
+	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);
+
+}
+
+#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)
+#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_depth; 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);
+
+	retval = ext2fs_get_mem(((handle->max_depth+1) *
+				 sizeof(struct extent_path)),
+				&handle->path);
+	memset(handle->path, 0,
+	       (handle->max_depth+1) * sizeof(struct extent_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].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;
+	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;
+
+	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);
+		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;
+		}
+
+		newpath->left = newpath->entries =
+			ext2fs_le16_to_cpu(eh->eh_entries);
+		newpath->max_entries = ext2fs_le16_to_cpu(eh->eh_max);
+
+		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;
+
+	return 0;
+}
+
+static errcode_t update_path(ext2_extent_handle_t handle)
+{
+	blk64_t				blk;
+	errcode_t			retval;
+	struct ext3_extent_idx		*ix;
+
+	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);
+
+		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,
+ * will  simply return.
+ */
+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;
+}
+
+/*
+ * allocate a new block, move half the current node to it, and update parent
+ *
+ * handle will be left pointing at original record.
+ */
+errcode_t ext2fs_extent_node_split(ext2_extent_handle_t handle)
+{
+	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;
+
+	/* 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;
+
+	/* 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;
+		goal_blk = extent.e_pblk;
+
+		retval = ext2fs_extent_node_split(handle);
+		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;
+
+	/* 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_mem(((handle->max_depth+2) *
+					 sizeof(struct extent_path)),
+					&newpath);
+		if (retval)
+			goto done;
+		memset(newpath, 0,
+		       ((handle->max_depth+2) * sizeof(struct extent_path)));
+	} 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) {
+#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) {
+		dgrp_t	group = ext2fs_group_of_ino(handle->fs, handle->ino);
+		__u8	log_flex = handle->fs->super->s_log_groups_per_flex;
+
+		if (log_flex)
+			group = group & ~((1 << (log_flex)) - 1);
+		goal_blk = ext2fs_group_first_block2(handle->fs, group);
+	}
+	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);
+
+	/* ...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_depth+1));
+		handle->path = newpath;
+		newpath = path;
+		path = handle->path;
+		path->entries = 1;
+		path->left = path->max_entries - 1;
+		handle->max_depth++;
+		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?) */
+	handle->inode->i_blocks += (handle->fs->blocksize *
+				    EXT2FS_CLUSTER_RATIO(handle->fs)) / 512;
+	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_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 = ext2fs_extent_node_split(handle);
+			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->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;
+				retval = ext2fs_extent_fix_parents(handle);
+				if (retval)
+					goto done;
+			} else
+				retval = ext2fs_extent_insert(handle,
+				      EXT2_EXTENT_INSERT_AFTER, &newextent);
+			if (retval)
+				goto done;
+			/* Now pointing at inserted extent; move back to prev */
+			retval = ext2fs_extent_get(handle,
+						   EXT2_EXTENT_PREV_LEAF,
+						   &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_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	orig_length;
+
+#ifdef DEBUG
+		printf("(re/un)mapping in middle of extent\n");
+#endif
+		/* need to split this extent; later */
+
+		orig_length = extent.e_len;
+
+		/* 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)
+				goto done;
+		}
+		/* add post-split extent */
+		extent.e_pblk += extent.e_len + 1;
+		extent.e_lblk += extent.e_len + 1;
+		extent.e_len = orig_length - extent.e_len - 1;
+		retval = ext2fs_extent_insert(handle,
+				EXT2_EXTENT_INSERT_AFTER, &extent);
+		if (retval)
+			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;
+
+	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 = 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 = ((__u64) 1 << 32) - 1;
+	info->max_pblk = ((__u64) 1 << 48) - 1;
+	info->max_len = (1UL << 15);
+	info->max_uninit_len = (1UL << 15) - 1;
+
+	return 0;
+}
+
+#ifdef DEBUG
+/*
+ * Override debugfs's prompt
+ */
+const char *debug_prog_name = "tst_extents";
+
+#endif
+
diff --git a/e2fsprogs/lib/ext2fs/fiemap.h b/e2fsprogs/lib/ext2fs/fiemap.h
new file mode 100644
index 0000000..30bf555
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/fiemap.h
@@ -0,0 +1,68 @@
+/*
+ * 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;
+	struct fiemap_extent fm_extents[0]; /* array of mapped extents (out) */
+};
+
+#ifndef FS_IOC_FIEMAP
+#define FS_IOC_FIEMAP	_IOWR('f', 11, struct fiemap)
+#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_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. */
+
+#endif /* _LINUX_FIEMAP_H */
diff --git a/e2fsprogs/lib/ext2fs/fileio.c b/e2fsprogs/lib/ext2fs/fileio.c
new file mode 100644
index 0000000..2e1b682
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/fileio.c
@@ -0,0 +1,498 @@
+/*
+ * 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 <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;
+};
+
+#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;
+
+	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;
+
+	/*
+	 * 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;
+
+	if (!(file->flags & EXT2_FILE_BUF_VALID)) {
+		retval = ext2fs_bmap2(fs, file->ino, &file->inode,
+				     BMAP_BUFFER, 0, file->blockno, 0,
+				     &file->physblock);
+		if (retval)
+			return retval;
+		if (!dontfill) {
+			if (file->physblock) {
+				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;
+}
+
+
+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;
+
+	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;
+}
+
+
+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;
+
+	EXT2_CHECK_MAGIC(file, EXT2_ET_MAGIC_EXT2_FILE);
+	fs = file->fs;
+
+	if (!(file->flags & EXT2_FILE_WRITE))
+		return EXT2_ET_FILE_RO;
+
+	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;
+
+		/*
+		 * 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)
+				goto fail;
+		}
+
+		file->flags |= EXT2_FILE_BUF_DIRTY;
+		memcpy(file->buf+start, ptr, c);
+		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;
+	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));
+
+	/* If we're writing a large file, set the large_file flag */
+	if (LINUX_S_ISREG(file->inode.i_mode) &&
+	    ext2fs_needs_large_file_feature(EXT2_I_SIZE(&file->inode)) &&
+	    (!EXT2_HAS_RO_COMPAT_FEATURE(file->fs->super,
+					 EXT2_FEATURE_RO_COMPAT_LARGE_FILE) ||
+	     file->fs->super->s_rev_level == EXT2_GOOD_OLD_REV)) {
+		file->fs->super->s_feature_ro_compat |=
+				EXT2_FEATURE_RO_COMPAT_LARGE_FILE;
+		ext2fs_update_dynamic_rev(file->fs);
+		ext2fs_mark_super_dirty(file->fs);
+	}
+
+	file->inode.i_size = size & 0xffffffff;
+	file->inode.i_size_high = (size >> 32);
+	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/e2fsprogs/lib/ext2fs/finddev.c b/e2fsprogs/lib/ext2fs/finddev.c
new file mode 100644
index 0000000..88eb5ce
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/finddev.c
@@ -0,0 +1,213 @@
+/*
+ * 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 <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
+
+#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 (S_ISBLK(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/e2fsprogs/lib/ext2fs/flushb.c b/e2fsprogs/lib/ext2fs/flushb.c
new file mode 100644
index 0000000..c4406fd
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/flushb.c
@@ -0,0 +1,78 @@
+/*
+ * 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 <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 (fsync (fd) == -1)
+		return errno;
+
+	if (flushb) {
+
+#ifdef BLKFLSBUF
+		if (ioctl (fd, BLKFLSBUF, 0) == 0)
+			return 0;
+#elif defined(__linux__)
+#warning BLKFLSBUF not defined
+#endif
+#ifdef FDFLUSH
+		return ioctl(fd, FDFLUSH, 0);   /* In case this is a floppy */
+#elif defined(__linux__)
+#warning FDFLUSH not defined
+#endif
+	}
+	return 0;
+}
diff --git a/e2fsprogs/lib/ext2fs/freefs.c b/e2fsprogs/lib/ext2fs/freefs.c
new file mode 100644
index 0000000..1e01ef5
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/freefs.c
@@ -0,0 +1,119 @@
+/*
+ * 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 <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fsP.h"
+
+static void ext2fs_free_inode_cache(struct ext2_inode_cache *icache);
+
+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);
+
+	fs->magic = 0;
+
+	ext2fs_free_mem(&fs);
+}
+
+/*
+ * Free the inode cache structure
+ */
+static void ext2fs_free_inode_cache(struct ext2_inode_cache *icache)
+{
+	if (--icache->refcount)
+		return;
+	if (icache->buffer)
+		ext2fs_free_mem(&icache->buffer);
+	if (icache->cache)
+		ext2fs_free_mem(&icache->cache);
+	icache->buffer_blk = 0;
+	ext2fs_free_mem(&icache);
+}
+
+/*
+ * 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/e2fsprogs/lib/ext2fs/gen_bitmap.c b/e2fsprogs/lib/ext2fs/gen_bitmap.c
new file mode 100644
index 0000000..e436234
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/gen_bitmap.c
@@ -0,0 +1,584 @@
+/*
+ * 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 <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 {
+	errcode_t	magic;
+	ext2_filsys 	fs;
+	__u32		start, end;
+	__u32		real_end;
+	char	*	description;
+	char	*	bitmap;
+	errcode_t	base_error_code;
+	__u32		reserved[7];
+};
+
+#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 bitmap,
+			    int code, unsigned long arg)
+{
+#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	bitmap;
+	errcode_t		retval;
+	size_t			size;
+
+	retval = ext2fs_get_mem(sizeof(struct ext2fs_struct_generic_bitmap),
+				&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 = 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 src,
+				     ext2fs_generic_bitmap *dest)
+{
+	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 bitmap)
+{
+	if (check_magic(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)
+{
+	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 < bitmap->start) || (bitno > bitmap->end)) {
+		ext2fs_warn_bitmap2(bitmap, EXT2FS_TEST_ERROR, bitno);
+		return 0;
+	}
+	return ext2fs_test_bit(bitno - bitmap->start, bitmap->bitmap);
+}
+
+int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap,
+					 __u32 bitno)
+{
+	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 < bitmap->start) || (bitno > bitmap->end)) {
+		ext2fs_warn_bitmap2(bitmap, EXT2FS_MARK_ERROR, bitno);
+		return 0;
+	}
+	return ext2fs_set_bit(bitno - bitmap->start, bitmap->bitmap);
+}
+
+int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap,
+					   blk_t bitno)
+{
+	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 < bitmap->start) || (bitno > bitmap->end)) {
+		ext2fs_warn_bitmap2(bitmap, EXT2FS_UNMARK_ERROR, bitno);
+		return 0;
+	}
+	return ext2fs_clear_bit(bitno - bitmap->start, bitmap->bitmap);
+}
+
+__u32 ext2fs_get_generic_bitmap_start(ext2fs_generic_bitmap 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 bitmap->start;
+}
+
+__u32 ext2fs_get_generic_bitmap_end(ext2fs_generic_bitmap 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 bitmap->end;
+}
+
+void ext2fs_clear_generic_bitmap(ext2fs_generic_bitmap 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(bitmap->bitmap, 0,
+	       (size_t) (((bitmap->real_end - bitmap->start) / 8) + 1));
+}
+
+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)
+{
+	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 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 bm1,
+					ext2fs_generic_bitmap 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(bm1, i) !=
+		    ext2fs_fast_test_block_bitmap(bm2, i))
+			return neq;
+
+	return 0;
+}
+
+void ext2fs_set_generic_bitmap_padding(ext2fs_generic_bitmap 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 bmap,
+					  errcode_t magic,
+					  __u32 start, __u32 num,
+					  void *out)
+{
+	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 >> 3), (num+7) >> 3);
+	return 0;
+}
+
+errcode_t ext2fs_set_generic_bitmap_range(ext2fs_generic_bitmap bmap,
+					  errcode_t magic,
+					  __u32 start, __u32 num,
+					  void *in)
+{
+	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 >> 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 bitmap,
+						  unsigned int start,
+						  unsigned int len)
+{
+	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 bitmap,
+						__u32 start, __u32 end,
+						__u32 *out)
+{
+	blk_t b;
+
+	if (start < bitmap->start || end > bitmap->end || start > end) {
+		ext2fs_warn_bitmap2(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 bitmap,
+				   blk_t block, int num)
+{
+	EXT2_CHECK_MAGIC(bitmap, EXT2_ET_MAGIC_BLOCK_BITMAP);
+	if ((block < bitmap->start) || (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 bitmap,
+				   ino_t inode, int num)
+{
+	EXT2_CHECK_MAGIC(bitmap, EXT2_ET_MAGIC_INODE_BITMAP);
+	if ((inode < bitmap->start) || (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 bitmap,
+				    blk_t block, int num)
+{
+	int	i;
+
+	if ((block < bitmap->start) || (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 bitmap,
+					       blk_t block, int num)
+{
+	int	i;
+
+	if ((block < bitmap->start) || (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/e2fsprogs/lib/ext2fs/gen_bitmap64.c b/e2fsprogs/lib/ext2fs/gen_bitmap64.c
new file mode 100644
index 0000000..7f49fd9
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/gen_bitmap64.c
@@ -0,0 +1,849 @@
+/*
+ * 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 <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 bitmap,
+			int code, __u64 arg)
+{
+#ifndef OMIT_COM_ERR
+	if (bitmap->description)
+		com_err(0, bitmap->base_error_code+code,
+			"#%llu for %s", arg, bitmap->description);
+	else
+		com_err(0, bitmap->base_error_code + code, "#%llu", arg);
+#endif
+}
+
+#ifdef 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	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),
+				    &bitmap);
+	if (retval)
+		return retval;
+
+#ifdef 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 = bitmap;
+	return 0;
+}
+
+#ifdef BMAP_STATS
+static void ext2fs_print_bmap_statistics(ext2fs_generic_bitmap bitmap)
+{
+	struct ext2_bmap_statistics *stats = &bitmap->stats;
+#ifdef 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;
+#endif
+	double inuse;
+	struct timeval now;
+
+#ifdef BMAP_STATS_OPS
+	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;
+	}
+#endif
+
+	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);
+
+	fprintf(stderr, "\n[+] %s bitmap (type %d)\n", bitmap->description,
+		stats->type);
+	fprintf(stderr, "=================================================\n");
+#ifdef 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 /* BMAP_STATS_OPS */
+}
+#endif
+
+void ext2fs_free_generic_bmap(ext2fs_generic_bitmap bmap)
+{
+	if (!bmap)
+		return;
+
+	if (EXT2FS_IS_32_BITMAP(bmap)) {
+		ext2fs_free_generic_bitmap(bmap);
+		return;
+	}
+
+	if (!EXT2FS_IS_64_BITMAP(bmap))
+		return;
+
+#ifdef 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 src,
+				   ext2fs_generic_bitmap *dest)
+{
+	char *descr, *new_descr;
+	ext2fs_generic_bitmap	new_bmap;
+	errcode_t retval;
+
+	if (!src)
+		return EINVAL;
+
+	if (EXT2FS_IS_32_BITMAP(src))
+		return ext2fs_copy_generic_bitmap(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),
+				    &new_bmap);
+	if (retval)
+		return retval;
+
+
+#ifdef BMAP_STATS_OPS
+	src->stats.copy_count++;
+#endif
+#ifdef 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;
+		}
+		sprintf(new_descr, "copy of %s", 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 = new_bmap;
+
+	return 0;
+}
+
+errcode_t ext2fs_resize_generic_bmap(ext2fs_generic_bitmap bmap,
+				     __u64 new_end,
+				     __u64 new_real_end)
+{
+	if (!bmap)
+		return EINVAL;
+
+	if (EXT2FS_IS_32_BITMAP(bmap))
+		return ext2fs_resize_generic_bitmap(bmap->magic, new_end,
+						    new_real_end, 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 bitmap,
+					errcode_t neq,
+					__u64 end, __u64 *oend)
+{
+	if (!bitmap)
+		return EINVAL;
+
+	if (EXT2FS_IS_32_BITMAP(bitmap)) {
+		ext2_ino_t tmp_oend;
+		int retval;
+
+		retval = ext2fs_fudge_generic_bitmap_end(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 bitmap)
+{
+	if (!bitmap)
+		return EINVAL;
+
+	if (EXT2FS_IS_32_BITMAP(bitmap))
+		return ext2fs_get_generic_bitmap_start(bitmap);
+
+	if (!EXT2FS_IS_64_BITMAP(bitmap))
+		return EINVAL;
+
+	return bitmap->start;
+}
+
+__u64 ext2fs_get_generic_bmap_end(ext2fs_generic_bitmap bitmap)
+{
+	if (!bitmap)
+		return EINVAL;
+
+	if (EXT2FS_IS_32_BITMAP(bitmap))
+		return ext2fs_get_generic_bitmap_end(bitmap);
+
+	if (!EXT2FS_IS_64_BITMAP(bitmap))
+		return EINVAL;
+
+	return bitmap->end;
+}
+
+void ext2fs_clear_generic_bmap(ext2fs_generic_bitmap bitmap)
+{
+	if (EXT2FS_IS_32_BITMAP(bitmap))
+		ext2fs_clear_generic_bitmap(bitmap);
+	else
+		bitmap->bitmap_ops->clear_bmap (bitmap);
+}
+
+int ext2fs_mark_generic_bmap(ext2fs_generic_bitmap bitmap,
+			     __u64 arg)
+{
+	if (!bitmap)
+		return 0;
+
+	if (EXT2FS_IS_32_BITMAP(bitmap)) {
+		if (arg & ~0xffffffffULL) {
+			ext2fs_warn_bitmap2(bitmap,
+					    EXT2FS_MARK_ERROR, 0xffffffff);
+			return 0;
+		}
+		return ext2fs_mark_generic_bitmap(bitmap, arg);
+	}
+
+	if (!EXT2FS_IS_64_BITMAP(bitmap))
+		return 0;
+
+	arg >>= bitmap->cluster_bits;
+
+#ifdef 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 bitmap,
+			       __u64 arg)
+{
+	if (!bitmap)
+		return 0;
+
+	if (EXT2FS_IS_32_BITMAP(bitmap)) {
+		if (arg & ~0xffffffffULL) {
+			ext2fs_warn_bitmap2(bitmap, EXT2FS_UNMARK_ERROR,
+					    0xffffffff);
+			return 0;
+		}
+		return ext2fs_unmark_generic_bitmap(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 bitmap,
+			     __u64 arg)
+{
+	if (!bitmap)
+		return 0;
+
+	if (EXT2FS_IS_32_BITMAP(bitmap)) {
+		if (arg & ~0xffffffffULL) {
+			ext2fs_warn_bitmap2(bitmap, EXT2FS_TEST_ERROR,
+					    0xffffffff);
+			return 0;
+		}
+		return ext2fs_test_generic_bitmap(bitmap, arg);
+	}
+
+	if (!EXT2FS_IS_64_BITMAP(bitmap))
+		return 0;
+
+	arg >>= bitmap->cluster_bits;
+
+#ifdef 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 bmap,
+					__u64 start, unsigned int num,
+					void *in)
+{
+	if (!bmap)
+		return EINVAL;
+
+	if (EXT2FS_IS_32_BITMAP(bmap)) {
+		if ((start+num-1) & ~0xffffffffULL) {
+			ext2fs_warn_bitmap2(bmap, EXT2FS_UNMARK_ERROR,
+					    0xffffffff);
+			return EINVAL;
+		}
+		return ext2fs_set_generic_bitmap_range(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 bmap,
+					__u64 start, unsigned int num,
+					void *out)
+{
+	if (!bmap)
+		return EINVAL;
+
+	if (EXT2FS_IS_32_BITMAP(bmap)) {
+		if ((start+num-1) & ~0xffffffffULL) {
+			ext2fs_warn_bitmap2(bmap,
+					    EXT2FS_UNMARK_ERROR, 0xffffffff);
+			return EINVAL;
+		}
+		return ext2fs_get_generic_bitmap_range(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 bm1,
+				      ext2fs_generic_bitmap 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, bm1, bm2);
+
+	if (!EXT2FS_IS_64_BITMAP(bm1))
+		return EINVAL;
+
+	if ((bm1->start != bm2->start) ||
+	    (bm1->end != bm2->end))
+		return neq;
+
+	for (i = bm1->end - ((bm1->end - bm1->start) % 8); i <= bm1->end; i++)
+		if (ext2fs_test_generic_bmap(bm1, i) !=
+		    ext2fs_test_generic_bmap(bm2, i))
+			return neq;
+
+	return 0;
+}
+
+void ext2fs_set_generic_bmap_padding(ext2fs_generic_bitmap bmap)
+{
+	__u64	start, num;
+
+	if (EXT2FS_IS_32_BITMAP(bmap)) {
+		ext2fs_set_generic_bitmap_padding(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 bmap,
+				    blk64_t block, unsigned int num)
+{
+	__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+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 += (1 << bmap->cluster_bits) - 1;
+	end >>= bmap->cluster_bits;
+	num = end - block;
+
+	if ((block < bmap->start) || (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 bmap,
+				     blk64_t block, unsigned int num)
+{
+	__u64	end = block + num;
+
+	if (!bmap)
+		return;
+
+	if (EXT2FS_IS_32_BITMAP(bmap)) {
+		if ((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 += (1 << bmap->cluster_bits) - 1;
+	end >>= bmap->cluster_bits;
+	num = end - block;
+
+	if ((block < bmap->start) || (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 bmap,
+				       blk64_t block, unsigned int num)
+{
+	__u64	end = block + num;
+
+	if (!bmap)
+		return;
+
+	if (EXT2FS_IS_32_BITMAP(bmap)) {
+		if ((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 += (1 << bmap->cluster_bits) - 1;
+	end >>= bmap->cluster_bits;
+	num = end - block;
+
+	if ((block < bmap->start) || (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 bitmap, const char *func)
+{
+#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_block_bitmap	cmap, bmap;
+	errcode_t		retval;
+	blk64_t			i, b_end, c_end;
+	int			n, ratio;
+
+	bmap = *bitmap;
+
+	if (fs->cluster_ratio_bits == ext2fs_get_bitmap_granularity(bmap))
+		return 0;	/* Nothing to do */
+
+	retval = ext2fs_allocate_block_bitmap(fs, "converted cluster bitmap",
+					      &cmap);
+	if (retval)
+		return retval;
+
+	i = bmap->start;
+	b_end = bmap->end;
+	bmap->end = bmap->real_end;
+	c_end = cmap->end;
+	cmap->end = cmap->real_end;
+	n = 0;
+	ratio = 1 << fs->cluster_ratio_bits;
+	while (i < bmap->real_end) {
+		if (ext2fs_test_block_bitmap2(bmap, i)) {
+			ext2fs_mark_block_bitmap2(cmap, i);
+			i += ratio - n;
+			n = 0;
+			continue;
+		}
+		i++; n++;
+		if (n >= ratio)
+			n = 0;
+	}
+	bmap->end = b_end;
+	cmap->end = c_end;
+	ext2fs_free_block_bitmap(bmap);
+	*bitmap = cmap;
+	return 0;
+}
+
+errcode_t ext2fs_find_first_zero_generic_bmap(ext2fs_generic_bitmap bitmap,
+					      __u64 start, __u64 end, __u64 *out)
+{
+	int b;
+
+	if (!bitmap)
+		return EINVAL;
+
+	if (EXT2FS_IS_64_BITMAP(bitmap) && bitmap->bitmap_ops->find_first_zero)
+		return bitmap->bitmap_ops->find_first_zero(bitmap, start,
+							   end, out);
+
+	if (EXT2FS_IS_32_BITMAP(bitmap)) {
+		blk_t blk = 0;
+		errcode_t retval;
+
+		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;
+
+	start >>= bitmap->cluster_bits;
+	end >>= bitmap->cluster_bits;
+
+	if (start < bitmap->start || end > bitmap->end || start > end) {
+		warn_bitmap(bitmap, EXT2FS_TEST_ERROR, start);
+		return EINVAL;
+	}
+
+	while (start <= end) {
+		b = bitmap->bitmap_ops->test_bmap(bitmap, start);
+		if (!b) {
+			*out = start << bitmap->cluster_bits;
+			return 0;
+		}
+		start++;
+	}
+
+	return ENOENT;
+}
diff --git a/e2fsprogs/lib/ext2fs/gen_crc32ctable.c b/e2fsprogs/lib/ext2fs/gen_crc32ctable.c
new file mode 100644
index 0000000..9996e9d
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/gen_crc32ctable.c
@@ -0,0 +1,123 @@
+#include <stdio.h>
+#include "crc32c_defs.h"
+#include <inttypes.h>
+
+#define ENTRIES_PER_LINE 4
+
+#if CRC_LE_BITS <= 8
+#define LE_TABLE_SIZE (1 << CRC_LE_BITS)
+#else
+#define LE_TABLE_SIZE 256
+#endif
+
+#if CRC_BE_BITS <= 8
+#define BE_TABLE_SIZE (1 << CRC_BE_BITS)
+#else
+#define BE_TABLE_SIZE 256
+#endif
+
+static uint32_t crc32ctable_le[8][256];
+static uint32_t crc32ctable_be[8][256];
+
+/**
+ * crc32cinit_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) ? CRCPOLY_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 < 8; j++) {
+			crc = crc32ctable_le[0][crc & 0xff] ^ (crc >> 8);
+			crc32ctable_le[j][i] = crc;
+		}
+	}
+}
+
+/**
+ * crc32cinit_be() - allocate and initialize BE table data
+ */
+static void crc32cinit_be(void)
+{
+	unsigned i, j;
+	uint32_t crc = 0x80000000;
+
+	crc32ctable_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++)
+			crc32ctable_be[0][i + j] = crc ^ crc32ctable_be[0][j];
+	}
+	for (i = 0; i < BE_TABLE_SIZE; i++) {
+		crc = crc32ctable_be[0][i];
+		for (j = 1; j < 8; j++) {
+			crc = crc32ctable_be[0][(crc >> 24) & 0xff] ^
+			      (crc << 8);
+			crc32ctable_be[j][i] = crc;
+		}
+	}
+}
+
+static void output_table(uint32_t table[8][256], int len, char trans)
+{
+	int i, j;
+
+	for (j = 0 ; j < 8; j++) {
+		printf("static const uint32_t t%d_%ce[] = {", j, trans);
+		for (i = 0; i < len - 1; i++) {
+			if ((i % ENTRIES_PER_LINE) == 0)
+				printf("\n");
+			printf("to%ce(0x%8.8xL),", trans, table[j][i]);
+			if ((i % ENTRIES_PER_LINE) != (ENTRIES_PER_LINE - 1))
+				printf(" ");
+		}
+		printf("to%ce(0x%8.8xL)};\n\n", trans, table[j][len - 1]);
+
+		if (trans == 'l') {
+			if ((j+1)*8 >= CRC_LE_BITS)
+				break;
+		} else {
+			if ((j+1)*8 >= CRC_BE_BITS)
+				break;
+		}
+	}
+}
+
+int main(int argc, char **argv)
+{
+	printf("/*\n");
+	printf(" * crc32ctable.h - CRC32c tables\n");
+	printf(" *    this file is generated - do not edit\n");
+	printf(" *	# gen_crc32ctable > crc32c_table.h\n");
+	printf(" *    with\n");
+	printf(" *	CRC_LE_BITS = %d\n", CRC_LE_BITS);
+	printf(" *	CRC_BE_BITS = %d\n", CRC_BE_BITS);
+	printf(" */\n");
+	printf("#include <stdint.h>\n");
+
+	if (CRC_LE_BITS > 1) {
+		crc32cinit_le();
+		output_table(crc32ctable_le, LE_TABLE_SIZE, 'l');
+	}
+
+	if (CRC_BE_BITS > 1) {
+		crc32cinit_be();
+		output_table(crc32ctable_be, BE_TABLE_SIZE, 'b');
+	}
+
+	return 0;
+}
diff --git a/e2fsprogs/lib/ext2fs/get_pathname.c b/e2fsprogs/lib/ext2fs/get_pathname.c
new file mode 100644
index 0000000..93a9ec8
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/get_pathname.c
@@ -0,0 +1,171 @@
+/*
+ * get_pathname.c --- do directry/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 <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;
+
+	gp = (struct get_pathname_struct *) priv_data;
+
+	if (((dirent->name_len & 0xFF) == 2) &&
+	    !strncmp(dirent->name, "..", 2))
+		gp->parent = dirent->inode;
+	if (dirent->inode == gp->search_ino) {
+		retval = ext2fs_get_mem((dirent->name_len & 0xFF) + 1,
+					&gp->name);
+		if (retval) {
+			gp->errcode = retval;
+			return DIRENT_ABORT;
+		}
+		strncpy(gp->name, dirent->name, (dirent->name_len & 0xFF));
+		gp->name[dirent->name_len & 0xFF] = '\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/e2fsprogs/lib/ext2fs/getsectsize.c b/e2fsprogs/lib/ext2fs/getsectsize.c
new file mode 100644
index 0000000..c7ae659
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/getsectsize.c
@@ -0,0 +1,109 @@
+/*
+ * 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%
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#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 <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)
+{
+	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
+	*sectsize = 0;
+	close(fd);
+	return 0;
+}
+
+/*
+ * 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 _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)
+{
+	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
+	*sectsize = 0;
+	close(fd);
+	return 0;
+}
diff --git a/e2fsprogs/lib/ext2fs/getsize.c b/e2fsprogs/lib/ext2fs/getsize.c
new file mode 100644
index 0000000..2f4495e
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/getsize.c
@@ -0,0 +1,310 @@
+/*
+ * 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%
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#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
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h> /* for LIST_HEAD */
+#endif
+#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
+
+errcode_t ext2fs_get_device_size(const char *file, int blocksize,
+				 blk_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 */
+
+	dev = CreateFile(file, GENERIC_READ,
+			 FILE_SHARE_READ | FILE_SHARE_WRITE ,
+                	 NULL,  OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,  NULL);
+
+	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 */
+
+	CloseHandle(dev);
+	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;
+
+#ifdef DKIOCGETBLOCKCOUNT	/* For Apple Darwin */
+	if (ioctl(fd, DKIOCGETBLOCKCOUNT, &size64) >= 0) {
+		*retblocks = size64 / (blocksize / 512);
+		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;
+}
+
+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;
+}
+
+#endif /* WIN32 */
+
+#ifdef DEBUG
+int main(int argc, char **argv)
+{
+	blk_t	blocks;
+	int	retval;
+
+	if (argc < 2) {
+		fprintf(stderr, "Usage: %s device\n", argv[0]);
+		exit(1);
+	}
+
+	retval = ext2fs_get_device_size(argv[1], 1024, &blocks);
+	if (retval) {
+		com_err(argv[0], retval,
+			"while calling ext2fs_get_device_size");
+		exit(1);
+	}
+	printf("Device %s has %u 1k blocks.\n", argv[1], blocks);
+	exit(0);
+}
+#endif
diff --git a/e2fsprogs/lib/ext2fs/i_block.c b/e2fsprogs/lib/ext2fs/i_block.c
new file mode 100644
index 0000000..f36c3c4
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/i_block.c
@@ -0,0 +1,92 @@
+/*
+ * 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 <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 (fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_HUGE_FILE)
+		b += ((long long) inode->osd2.linux2.l_i_blocks_hi) << 32;
+
+	if (!(fs->super->s_feature_ro_compat &
+	      EXT4_FEATURE_RO_COMPAT_HUGE_FILE) ||
+	    !(inode->i_flags & EXT4_HUGE_FILE_FL))
+	    num_blocks *= fs->blocksize / 512;
+	num_blocks *= EXT2FS_CLUSTER_RATIO(fs);
+
+	b += num_blocks;
+
+	if (fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_HUGE_FILE)
+		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 (fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_HUGE_FILE)
+		b += ((long long) inode->osd2.linux2.l_i_blocks_hi) << 32;
+
+	if (!(fs->super->s_feature_ro_compat &
+	      EXT4_FEATURE_RO_COMPAT_HUGE_FILE) ||
+	    !(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 (fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_HUGE_FILE)
+		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 (!(fs->super->s_feature_ro_compat &
+	      EXT4_FEATURE_RO_COMPAT_HUGE_FILE) ||
+	    !(inode->i_flags & EXT4_HUGE_FILE_FL))
+		b *= fs->blocksize / 512;
+	b *= EXT2FS_CLUSTER_RATIO(fs);
+
+	inode->i_blocks = b & 0xFFFFFFFF;
+	if (fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_HUGE_FILE)
+		inode->osd2.linux2.l_i_blocks_hi = b >> 32;
+	else if (b >> 32)
+		return EOVERFLOW;
+	return 0;
+}
diff --git a/e2fsprogs/lib/ext2fs/icount.c b/e2fsprogs/lib/ext2fs/icount.c
new file mode 100644
index 0000000..f99824f
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/icount.c
@@ -0,0 +1,849 @@
+/*
+ * 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%
+ */
+
+#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;
+	char			*tdb_fn;
+	TDB_CONTEXT		*tdb;
+};
+
+/*
+ * 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);
+	if (icount->tdb)
+		tdb_close(icount->tdb);
+	if (icount->tdb_fn) {
+		unlink(icount->tdb_fn);
+		free(icount->tdb_fn);
+	}
+
+	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));
+
+	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;
+
+	icount->magic = EXT2_ET_MAGIC_ICOUNT;
+	icount->num_inodes = fs->super->s_inodes_count;
+
+	*ret = icount;
+	return 0;
+
+errout:
+	ext2fs_free_icount(icount);
+	return(retval);
+}
+
+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]);
+}
+
+errcode_t ext2fs_create_icount_tdb(ext2_filsys fs, char *tdb_dir,
+				   int flags, ext2_icount_t *ret)
+{
+	ext2_icount_t	icount;
+	errcode_t	retval;
+	char 		*fn, uuid[40];
+	ext2_ino_t	num_inodes;
+	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);
+	fd = mkstemp(fn);
+	if (fd < 0)
+		return fd;
+
+	/*
+	 * 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_fn = fn;
+	icount->tdb = tdb_open(fn, num_inodes, TDB_NOLOCK | TDB_NOSYNC,
+			       O_RDWR | O_CREAT | O_TRUNC, 0600);
+	if (icount->tdb) {
+		close(fd);
+		*ret = icount;
+		return 0;
+	}
+
+	retval = errno;
+	close(fd);
+
+errout:
+	ext2fs_free_icount(icount);
+	return(retval);
+}
+
+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 (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;
+	}
+
+	*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;
+	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;
+	}
+
+	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;
+	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;
+	}
+	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 (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 (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 (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 (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) {
+		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 {
+		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/e2fsprogs/lib/ext2fs/imager.c b/e2fsprogs/lib/ext2fs/imager.c
new file mode 100644
index 0000000..5c7003a
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/imager.c
@@ -0,0 +1,409 @@
+/*
+ * 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 <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)
+{
+	unsigned int	group, left, c, d;
+	char		*buf, *cp;
+	blk64_t		blk;
+	ssize_t		actual;
+	errcode_t	retval;
+	off_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, (unsigned)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;
+			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 = lseek(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, fs->blocksize * d);
+				if (actual == -1) {
+					retval = errno;
+					goto errout;
+				}
+				if (actual != (ssize_t) (fs->blocksize * d)) {
+					retval = EXT2_ET_SHORT_WRITE;
+					goto errout;
+				}
+				blk += d;
+				left -= d;
+				cp += fs->blocksize * d;
+				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)))
+{
+	unsigned int	group, 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, (unsigned)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 != (ssize_t) (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;
+
+	buf = malloc(fs->blocksize);
+	if (!buf)
+		return ENOMEM;
+
+	/*
+	 * Write out the superblock
+	 */
+	memset(buf, 0, fs->blocksize);
+	memcpy(buf, fs->super, SUPERBLOCK_SIZE);
+	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;
+	actual = write(fd, cp, fs->blocksize * fs->desc_blocks);
+	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 = 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,
+	       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;
+	__u32			itr, cnt, size;
+	int			c, 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 = 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_BLOCKS_PER_GROUP(fs->super) * fs->group_desc_count;
+		size = EXT2_BLOCKS_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);
+
+		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 == -1)
+				return errno;
+			if (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;
+	__u32			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 = 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_BLOCKS_PER_GROUP(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);
+
+		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/e2fsprogs/lib/ext2fs/ind_block.c b/e2fsprogs/lib/ext2fs/ind_block.c
new file mode 100644
index 0000000..722d3bd
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/ind_block.c
@@ -0,0 +1,66 @@
+/*
+ * 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 <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/e2fsprogs/lib/ext2fs/initialize.c b/e2fsprogs/lib/ext2fs/initialize.c
new file mode 100644
index 0000000..a57ffcb
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/initialize.c
@@ -0,0 +1,518 @@
+/*
+ * 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 <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"
+
+#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;
+	unsigned	reserved_inos;
+	char		*buf = 0;
+	char		c;
+	double		reserved_ratio;
+
+	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
+	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;
+	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 = EXT2_HAS_RO_COMPAT_FEATURE(param,
+				   EXT4_FEATURE_RO_COMPAT_BIGALLOC);
+
+	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);
+	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 (super->s_feature_incompat & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) {
+		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,
+		  super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT ?
+		  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 (super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT &&
+	    (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 (super->s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INODE)
+		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;
+	}
+
+	/*
+	 * 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 +
+			  fs->desc_blocks + super->s_reserved_gdt_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);
+	if (ext2fs_bg_has_super(fs, fs->group_desc_count - 1))
+		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.
+	 */
+
+	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 = EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+					       EXT4_FEATURE_RO_COMPAT_GDT_CSUM);
+	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;
+}
diff --git a/e2fsprogs/lib/ext2fs/inline.c b/e2fsprogs/lib/ext2fs/inline.c
new file mode 100644
index 0000000..4d0f4ad
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/inline.c
@@ -0,0 +1,120 @@
+/*
+ * 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 <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_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;
+	void **p = ptr;
+
+	if (align < 8)
+		align = 8;
+#ifdef HAVE_POSIX_MEMALIGN
+	retval = posix_memalign(p, align, size);
+	if (retval) {
+		if (retval == ENOMEM)
+			return EXT2_ET_NO_MEMORY;
+		return retval;
+	}
+#else
+#ifdef HAVE_MEMALIGN
+	*p = memalign(align, size);
+	if (*p == NULL) {
+		if (errno)
+			return errno;
+		else
+			return EXT2_ET_NO_MEMORY;
+	}
+#else
+#ifdef HAVE_VALLOC
+	if (align > sizeof(long long))
+		*p = valloc(size);
+	else
+#endif
+		*p = malloc(size);
+	if ((unsigned long) *p & (align - 1)) {
+		free(*p);
+		*p = 0;
+	}
+	if (*p == 0)
+		return EXT2_ET_NO_MEMORY;
+#endif
+#endif
+	return 0;
+}
+
+#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/e2fsprogs/lib/ext2fs/inode.c b/e2fsprogs/lib/ext2fs/inode.c
new file mode 100644
index 0000000..d0b528c
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/inode.c
@@ -0,0 +1,840 @@
+/*
+ * 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 <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"
+
+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)
+{
+	int	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;
+}
+
+static errcode_t create_icache(ext2_filsys fs)
+{
+	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) {
+		ext2fs_free_mem(&fs->icache);
+		return retval;
+	}
+	fs->icache->buffer_blk = 0;
+	fs->icache->cache_last = -1;
+	fs->icache->cache_size = 4;
+	fs->icache->refcount = 1;
+	retval = ext2fs_get_array(fs->icache->cache_size,
+				  sizeof(struct ext2_inode_cache_ent),
+				  &fs->icache->cache);
+	if (retval) {
+		ext2fs_free_mem(&fs->icache->buffer);
+		ext2fs_free_mem(&fs->icache);
+		return retval;
+	}
+	ext2fs_flush_icache(fs);
+	return 0;
+}
+
+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 fs->badblocks isn't set, then set it --- since the inode
+	 * scanning functions require it.
+	 */
+	if (fs->badblocks == 0) {
+		/*
+		 * Temporarly 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 : 8;
+	scan->current_block = ext2fs_inode_table_loc(scan->fs,
+						     scan->current_group);
+	scan->inodes_left = EXT2_INODES_PER_GROUP(scan->fs->super);
+	scan->blocks_left = scan->fs->inode_blocks_per_group;
+	if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+				       EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) {
+		scan->inodes_left -=
+			ext2fs_bg_itable_unused(fs, scan->current_group);
+		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->temp_buffer);
+	if (retval) {
+		ext2fs_free_mem(&scan->inode_buffer);
+		ext2fs_free_mem(&scan);
+		return retval;
+	}
+	if (scan->fs->badblocks && scan->fs->badblocks->num)
+		scan->scan_flags |= EXT2_SF_CHK_BADBLOCKS;
+	if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+				       EXT4_FEATURE_RO_COMPAT_GDT_CSUM))
+		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 (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+				       EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) {
+		scan->inodes_left -=
+			ext2fs_bg_itable_unused(fs, scan->current_group);
+		scan->blocks_left =
+			(scan->inodes_left +
+			 (fs->blocksize / scan->inode_size - 1)) *
+			scan->inode_size / fs->blocksize;
+	}
+
+	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;
+	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;
+
+	/*
+	 * 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;
+}
+
+/*
+ * 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;
+	}
+	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;
+
+	EXT2_CHECK_MAGIC(scan, EXT2_ET_MAGIC_INODE_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) {
+		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
+	}
+
+	retval = 0;
+	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;
+
+#ifdef WORDS_BIGENDIAN
+		memset(inode, 0, bufsize);
+		ext2fs_swap_inode_full(scan->fs,
+			       (struct ext2_inode_large *) inode,
+			       (struct ext2_inode_large *) scan->temp_buffer,
+			       0, bufsize);
+#else
+		*inode = *((struct ext2_inode *) scan->temp_buffer);
+#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 {
+#ifdef WORDS_BIGENDIAN
+		memset(inode, 0, bufsize);
+		ext2fs_swap_inode_full(scan->fs,
+				(struct ext2_inode_large *) inode,
+				(struct ext2_inode_large *) scan->ptr,
+				0, bufsize);
+#else
+		memcpy(inode, scan->ptr, bufsize);
+#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;
+	}
+
+	scan->inodes_left--;
+	scan->current_inode++;
+	*ino = scan->current_inode;
+	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_inode_full(ext2_filsys fs, ext2_ino_t ino,
+				 struct ext2_inode * inode, int bufsize)
+{
+	blk64_t		block_nr;
+	unsigned long 	group, block, offset;
+	char 		*ptr;
+	errcode_t	retval;
+	int 		clen, i, inodes_per_block, length;
+	io_channel	io;
+
+	EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+	/* 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 = create_icache(fs);
+		if (retval)
+			return retval;
+	}
+	/* Check to see if it's in the inode cache */
+	if (bufsize == sizeof(struct ext2_inode)) {
+		/* only old good inode can be retrieved from the cache */
+		for (i=0; i < fs->icache->cache_size; i++) {
+			if (fs->icache->cache[i].ino == ino) {
+				*inode = fs->icache->cache[i].inode;
+				return 0;
+			}
+		}
+	}
+	if (fs->flags & EXT2_FLAG_IMAGE_FILE) {
+		inodes_per_block = fs->blocksize / EXT2_INODE_SIZE(fs->super);
+		block_nr = 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);
+		if (!ext2fs_inode_table_loc(fs, (unsigned) group))
+			return EXT2_ET_MISSING_INODE_TABLE;
+		block_nr = ext2fs_inode_table_loc(fs, group) +
+			block;
+		io = fs->io;
+	}
+	offset &= (EXT2_BLOCK_SIZE(fs->super) - 1);
+
+	length = EXT2_INODE_SIZE(fs->super);
+	if (bufsize < length)
+		length = bufsize;
+
+	ptr = (char *) inode;
+	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++;
+	}
+
+#ifdef WORDS_BIGENDIAN
+	ext2fs_swap_inode_full(fs, (struct ext2_inode_large *) inode,
+			       (struct ext2_inode_large *) inode,
+			       0, bufsize);
+#endif
+
+	/* Update the inode cache */
+	fs->icache->cache_last = (fs->icache->cache_last + 1) %
+		fs->icache->cache_size;
+	fs->icache->cache[fs->icache->cache_last].ino = ino;
+	fs->icache->cache[fs->icache->cache_last].inode = *inode;
+
+	return 0;
+}
+
+errcode_t ext2fs_read_inode(ext2_filsys fs, ext2_ino_t ino,
+			    struct ext2_inode * inode)
+{
+	return ext2fs_read_inode_full(fs, ino, inode,
+					sizeof(struct ext2_inode));
+}
+
+errcode_t ext2fs_write_inode_full(ext2_filsys fs, ext2_ino_t ino,
+				  struct ext2_inode * inode, int bufsize)
+{
+	blk64_t block_nr;
+	unsigned long group, block, offset;
+	errcode_t retval = 0;
+	struct ext2_inode_large temp_inode, *w_inode;
+	char *ptr;
+	int clen, i, length;
+
+	EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+	/* 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;
+	}
+
+	/* 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) {
+				fs->icache->cache[i].inode = *inode;
+				break;
+			}
+		}
+	} else {
+		retval = create_icache(fs);
+		if (retval)
+			return retval;
+	}
+
+	if (!(fs->flags & EXT2_FLAG_RW))
+		return EXT2_ET_RO_FILSYS;
+
+	if ((ino == 0) || (ino > fs->super->s_inodes_count))
+		return EXT2_ET_BAD_INODE_NUM;
+
+	length = bufsize;
+	if (length < EXT2_INODE_SIZE(fs->super))
+		length = EXT2_INODE_SIZE(fs->super);
+
+	if (length > (int) sizeof(struct ext2_inode_large)) {
+		w_inode = malloc(length);
+		if (!w_inode) {
+			retval = ENOMEM;
+			goto errout;
+		}
+	} else
+		w_inode = &temp_inode;
+	memset(w_inode, 0, length);
+
+#ifdef WORDS_BIGENDIAN
+	ext2fs_swap_inode_full(fs, w_inode,
+			       (struct ext2_inode_large *) inode,
+			       1, bufsize);
+#else
+	memcpy(w_inode, inode, bufsize);
+#endif
+
+	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);
+	if (!ext2fs_inode_table_loc(fs, (unsigned) group)) {
+		retval = EXT2_ET_MISSING_INODE_TABLE;
+		goto errout;
+	}
+	block_nr = ext2fs_inode_table_loc(fs, (unsigned) group) + block;
+
+	offset &= (EXT2_BLOCK_SIZE(fs->super) - 1);
+
+	length = EXT2_INODE_SIZE(fs->super);
+	if (length > bufsize)
+		length = bufsize;
+
+	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:
+	if (w_inode && w_inode != &temp_inode)
+		free(w_inode);
+	return retval;
+}
+
+errcode_t ext2fs_write_inode(ext2_filsys fs, ext2_ino_t ino,
+			     struct ext2_inode *inode)
+{
+	return ext2fs_write_inode_full(fs, ino, inode,
+				       sizeof(struct ext2_inode));
+}
+
+/*
+ * 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/e2fsprogs/lib/ext2fs/inode_io.c b/e2fsprogs/lib/ext2fs/inode_io.c
new file mode 100644
index 0000000..ced3244
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/inode_io.c
@@ -0,0 +1,291 @@
+/*
+ * 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 <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 = {
+	EXT2_ET_MAGIC_IO_MANAGER,
+	"Inode I/O Manager",
+	inode_open,
+	inode_close,
+	inode_set_blksize,
+	inode_read_blk,
+	inode_write_blk,
+	inode_flush,
+	inode_write_byte,
+	NULL,
+	NULL,
+	inode_read_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_lseek(data->file,
+					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_lseek(data->file,
+					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/e2fsprogs/lib/ext2fs/io_manager.c b/e2fsprogs/lib/ext2fs/io_manager.c
new file mode 100644
index 0000000..116f2ae
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/io_manager.c
@@ -0,0 +1,129 @@
+/*
+ * io_manager.c --- the I/O manager abstraction
+ */
+
+#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_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)
+		return ext2fs_get_memalign(size, io->align, ptr);
+	else
+		return ext2fs_get_mem(size, ptr);
+}
diff --git a/e2fsprogs/lib/ext2fs/irel.h b/e2fsprogs/lib/ext2fs/irel.h
new file mode 100644
index 0000000..8aaa2d2
--- /dev/null
+++ b/e2fsprogs/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 interator
+	 * 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/e2fsprogs/lib/ext2fs/irel_ma.c b/e2fsprogs/lib/ext2fs/irel_ma.c
new file mode 100644
index 0000000..b055790
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/irel_ma.c
@@ -0,0 +1,376 @@
+/*
+ * 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 <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/e2fsprogs/lib/ext2fs/ismounted.c b/e2fsprogs/lib/ext2fs/ismounted.c
new file mode 100644
index 0000000..db80c46
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/ismounted.c
@@ -0,0 +1,437 @@
+/*
+ * 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%
+ */
+
+#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>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+/*
+ * 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;
+	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;
+}
+
+#ifdef HAVE_SETMNTENT
+/*
+ * 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;
+	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 (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 ((mnt = getmntent (f)) != NULL) {
+		if (mnt->mnt_fsname[0] != '/')
+			continue;
+		if (strcmp(file, mnt->mnt_fsname) == 0)
+			break;
+		if (stat(mnt->mnt_fsname, &st_buf) == 0) {
+			if (S_ISBLK(st_buf.st_mode)) {
+#ifndef __GNU__
+				if (file_rdev && (file_rdev == st_buf.st_rdev))
+					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;
+	}
+#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->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->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->mnt_dir);
+#endif /* DEBUG */
+		goto errout;
+	}
+#endif /* __GNU__ */
+	*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);
+	}
+	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 && (*mount_flags != 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) &&
+	    S_ISBLK(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) &&
+		    S_ISBLK(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;
+
+	if (is_swap_device(device)) {
+		*mount_flags = EXT2_MF_MOUNTED | EXT2_MF_SWAP;
+		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
+#ifdef __GNUC__
+ #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;
+
+#ifdef __linux__ /* This only works on Linux 2.6+ systems */
+	{
+		struct stat st_buf;
+
+		if (stat(device, &st_buf) == 0 && S_ISBLK(st_buf.st_mode)) {
+			int fd = open(device, O_RDONLY | O_EXCL);
+
+			if (fd >= 0)
+				close(fd);
+			else if (errno == EBUSY)
+				*mount_flags |= EXT2_MF_BUSY;
+		}
+	}
+#endif
+
+	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/e2fsprogs/lib/ext2fs/jfs_compat.h b/e2fsprogs/lib/ext2fs/jfs_compat.h
new file mode 100644
index 0000000..7b8aafd
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/jfs_compat.h
@@ -0,0 +1,68 @@
+
+#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
+
+#define printk printf
+#define KERN_ERR ""
+#define KERN_DEBUG ""
+
+#define READ 0
+#define WRITE 1
+
+#define cpu_to_be32(n) htonl(n)
+#define be32_to_cpu(n) ntohl(n)
+
+typedef unsigned int tid_t;
+typedef struct journal_s journal_t;
+
+struct buffer_head;
+struct inode;
+
+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_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_maxlen;
+	struct inode *		j_inode;
+	tid_t			j_tail_sequence;
+	tid_t			j_transaction_sequence;
+	__u8			j_uuid[16];
+	struct jbd_revoke_table_s *j_revoke;
+	tid_t			j_failed_commit;
+};
+
+#define J_ASSERT(assert)						\
+	do { if (!(assert)) {						\
+		printf ("Assertion failure in %s() at %s line %d: "	\
+			"\"%s\"\n",					\
+			__FUNCTION__, __FILE__, __LINE__, # assert);	\
+		fatal_error(e2fsck_global_ctx, 0);			\
+	} } while (0)
+
+#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/e2fsprogs/lib/ext2fs/jfs_dat.h b/e2fsprogs/lib/ext2fs/jfs_dat.h
new file mode 100644
index 0000000..62778c6
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/jfs_dat.h
@@ -0,0 +1,64 @@
+/*
+ * jfs_dat.h --- stripped down header file which only contains the JFS
+ * 	on-disk data structures
+ */
+
+#define JFS_MAGIC_NUMBER 0xc03b3998U /* The first 4 bytes of /dev/random! */
+
+/*
+ * On-disk structures
+ */
+
+/*
+ * Descriptor block types:
+ */
+
+#define JFS_DESCRIPTOR_BLOCK	1
+#define JFS_COMMIT_BLOCK	2
+#define JFS_SUPERBLOCK		3
+
+/*
+ * Standard header for all descriptor blocks:
+ */
+typedef struct journal_header_s
+{
+	__u32		h_magic;
+	__u32		h_blocktype;
+	__u32		h_sequence;
+} journal_header_t;
+
+
+/*
+ * The block tag: used to describe a single buffer in the journal
+ */
+typedef struct journal_block_tag_s
+{
+	__u32		t_blocknr;	/* The on-disk block number */
+	__u32		t_flags;	/* See below */
+} journal_block_tag_t;
+
+/* Definitions for the journal tag flags word: */
+#define JFS_FLAG_ESCAPE		1	/* on-disk block is escaped */
+#define JFS_FLAG_SAME_UUID	2	/* block has same uuid as previous */
+#define JFS_FLAG_DELETED	4	/* block deleted by this transaction */
+#define JFS_FLAG_LAST_TAG	8	/* last tag in this descriptor block */
+
+
+/*
+ * The journal superblock
+ */
+typedef struct journal_superblock_s
+{
+	journal_header_t s_header;
+
+	/* Static information describing the journal */
+	__u32		s_blocksize;	/* journal device blocksize */
+	__u32		s_maxlen;	/* total blocks in journal file */
+	__u32		s_first;	/* first block of log information */
+
+	/* Dynamic information describing the current state of the log */
+	__u32		s_sequence;	/* first commit ID expected in log */
+	__u32		s_start;	/* blocknr of start of log */
+
+} journal_superblock_t;
+
diff --git a/e2fsprogs/lib/ext2fs/jfs_user.h b/e2fsprogs/lib/ext2fs/jfs_user.h
new file mode 100644
index 0000000..3a52123
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/jfs_user.h
@@ -0,0 +1,8 @@
+#ifndef _JFS_USER_H
+#define _JFS_USER_H
+
+typedef unsigned short kdev_t;
+
+#include "kernel-jbd.h"
+
+#endif /* _JFS_USER_H */
diff --git a/e2fsprogs/lib/ext2fs/kernel-jbd.h b/e2fsprogs/lib/ext2fs/kernel-jbd.h
new file mode 100644
index 0000000..059bf8f
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/kernel-jbd.h
@@ -0,0 +1,952 @@
+/*
+ * 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
+
+#if defined(CONFIG_JBD) || defined(CONFIG_JBD_MODULE) || !defined(__KERNEL__)
+
+/* Allow this file to be included directly into e2fsprogs */
+#ifndef __KERNEL__
+#include "jfs_compat.h"
+#define JFS_DEBUG
+#define jfs_debug jbd_debug
+#else
+
+#include <linux/journal-head.h>
+#include <linux/stddef.h>
+#include <asm/semaphore.h>
+#endif
+
+#ifndef __GNUC__
+#define __FUNCTION__ ""
+#endif
+
+#define journal_oom_retry 1
+
+#ifdef __STDC__
+#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;
+
+#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
+#ifdef __GNUC__
+#define jbd_debug(f, a...)	/**/
+#else
+#define jbd_debug(f, ...)	/**/
+#endif
+#endif
+#else
+#define jbd_debug(x)		/* AIX doesn't do STDC */
+#endif
+
+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 JFS_MIN_JOURNAL_BLOCKS 1024
+
+#ifdef __KERNEL__
+typedef struct handle_s		handle_t;	/* Atomic operation type */
+typedef struct journal_s	journal_t;	/* Journal control structure */
+#endif
+
+/*
+ * Internal structures used by the logging mechanism:
+ */
+
+#define JFS_MAGIC_NUMBER 0xc03b3998U /* The first 4 bytes of /dev/random! */
+
+/*
+ * On-disk structures
+ */
+
+/*
+ * Descriptor block types:
+ */
+
+#define JFS_DESCRIPTOR_BLOCK	1
+#define JFS_COMMIT_BLOCK	2
+#define JFS_SUPERBLOCK_V1	3
+#define JFS_SUPERBLOCK_V2	4
+#define JFS_REVOKE_BLOCK	5
+
+/*
+ * Standard header for all descriptor blocks:
+ */
+typedef struct journal_header_s
+{
+	__u32		h_magic;
+	__u32		h_blocktype;
+	__u32		h_sequence;
+} journal_header_t;
+
+/*
+ * Checksum types.
+ */
+#define JBD2_CRC32_CHKSUM   1
+#define JBD2_MD5_CHKSUM     2
+#define JBD2_SHA1_CHKSUM    3
+
+#define JBD2_CRC32_CHKSUM_SIZE 4
+
+#define JBD2_CHECKSUM_BYTES (32 / sizeof(__u32))
+/*
+ * Commit block header for storing transactional checksums:
+ */
+struct commit_header {
+	__u32		h_magic;
+	__u32		h_blocktype;
+	__u32		h_sequence;
+	unsigned char	h_chksum_type;
+	unsigned char	h_chksum_size;
+	unsigned char	h_padding[2];
+	__u32		h_chksum[JBD2_CHECKSUM_BYTES];
+	__u64		h_commit_sec;
+	__u32		h_commit_nsec;
+};
+
+/*
+ * The block tag: used to describe a single buffer in the journal
+ */
+typedef struct journal_block_tag_s
+{
+	__u32		t_blocknr;	/* The on-disk block number */
+	__u32		t_flags;	/* See below */
+	__u32		t_blocknr_high; /* most-significant high 32bits. */
+} journal_block_tag_t;
+
+#define JBD_TAG_SIZE64 (sizeof(journal_block_tag_t))
+#define JBD_TAG_SIZE32 (8)
+
+/*
+ * 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;
+	int		 r_count;	/* Count of bytes used in the block */
+} journal_revoke_header_t;
+
+
+/* Definitions for the journal tag flags word: */
+#define JFS_FLAG_ESCAPE		1	/* on-disk block is escaped */
+#define JFS_FLAG_SAME_UUID	2	/* block has same uuid as previous */
+#define JFS_FLAG_DELETED	4	/* block deleted by this transaction */
+#define JFS_FLAG_LAST_TAG	8	/* last tag in this descriptor block */
+
+
+/*
+ * 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 */
+	__u32	s_blocksize;		/* journal device blocksize */
+	__u32	s_maxlen;		/* total blocks in journal file */
+	__u32	s_first;		/* first block of log information */
+
+/* 0x0018 */
+	/* Dynamic information describing the current state of the log */
+	__u32	s_sequence;		/* first commit ID expected in log */
+	__u32	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 */
+	__u32	s_feature_compat; 	/* compatible feature set */
+	__u32	s_feature_incompat; 	/* incompatible feature set */
+	__u32	s_feature_ro_compat; 	/* readonly-compatible feature set */
+/* 0x0030 */
+	__u8	s_uuid[16];		/* 128-bit uuid for journal */
+
+/* 0x0040 */
+	__u32	s_nr_users;		/* Nr of filesystems sharing log */
+
+	__u32	s_dynsuper;		/* Blocknr of dynamic superblock copy*/
+
+/* 0x0048 */
+	__u32	s_max_transaction;	/* Limit of journal blocks per trans.*/
+	__u32	s_max_trans_data;	/* Limit of data blocks per trans. */
+
+/* 0x0050 */
+	__u32	s_padding[44];
+
+/* 0x0100 */
+	__u8	s_users[16*48];		/* ids of all fs'es sharing the log */
+/* 0x0400 */
+} journal_superblock_t;
+
+#define JFS_HAS_COMPAT_FEATURE(j,mask)					\
+	((j)->j_format_version >= 2 &&					\
+	 ((j)->j_superblock->s_feature_compat & ext2fs_cpu_to_be32((mask))))
+#define JFS_HAS_RO_COMPAT_FEATURE(j,mask)				\
+	((j)->j_format_version >= 2 &&					\
+	 ((j)->j_superblock->s_feature_ro_compat & ext2fs_cpu_to_be32((mask))))
+#define JFS_HAS_INCOMPAT_FEATURE(j,mask)				\
+	((j)->j_format_version >= 2 &&					\
+	 ((j)->j_superblock->s_feature_incompat & ext2fs_cpu_to_be32((mask))))
+
+#define JFS_FEATURE_COMPAT_CHECKSUM	0x00000001
+
+#define JFS_FEATURE_INCOMPAT_REVOKE	0x00000001
+
+#define JFS_FEATURE_INCOMPAT_REVOKE		0x00000001
+#define JFS_FEATURE_INCOMPAT_64BIT		0x00000002
+#define JFS_FEATURE_INCOMPAT_ASYNC_COMMIT	0x00000004
+
+/* Features known to this kernel version: */
+#define JFS_KNOWN_COMPAT_FEATURES	0
+#define JFS_KNOWN_ROCOMPAT_FEATURES	0
+#define JFS_KNOWN_INCOMPAT_FEATURES	(JFS_FEATURE_INCOMPAT_REVOKE|\
+					 JFS_FEATURE_INCOMPAT_ASYNC_COMMIT|\
+					 JFS_FEATURE_INCOMPAT_64BIT)
+
+#ifdef __KERNEL__
+
+#include <linux/fs.h>
+#include <linux/sched.h>
+
+#define JBD_ASSERTIONS
+#ifdef JBD_ASSERTIONS
+#define J_ASSERT(assert)						\
+do {									\
+	if (!(assert)) {						\
+		printk (KERN_EMERG					\
+			"Assertion failure in %s() at %s:%d: \"%s\"\n",	\
+			__FUNCTION__, __FILE__, __LINE__, # assert);	\
+		BUG();							\
+	}								\
+} while (0)
+
+#if defined(CONFIG_BUFFER_DEBUG)
+void buffer_assertion_failure(struct buffer_head *bh);
+#define J_ASSERT_BH(bh, expr)						\
+	do {								\
+		if (!(expr))						\
+			buffer_assertion_failure(bh);			\
+		J_ASSERT(expr);						\
+	} while (0)
+#define J_ASSERT_JH(jh, expr)	J_ASSERT_BH(jh2bh(jh), expr)
+#else
+#define J_ASSERT_BH(bh, expr)	J_ASSERT(expr)
+#define J_ASSERT_JH(jh, expr)	J_ASSERT(expr)
+#endif
+
+#else
+#define J_ASSERT(assert)
+#endif		/* JBD_ASSERTIONS */
+
+enum jbd_state_bits {
+	BH_JWrite
+	  = BH_PrivateStart,	/* 1 if being written to log (@@@ DEBUGGING) */
+	BH_Freed,		/* 1 if buffer has been freed (truncated) */
+	BH_Revoked,		/* 1 if buffer has been revoked from the log */
+	BH_RevokeValid,		/* 1 if buffer revoked flag is valid */
+	BH_JBDDirty,		/* 1 if buffer is dirty but journaled */
+};
+
+/* Return true if the buffer is one which JBD is managing */
+static inline int buffer_jbd(struct buffer_head *bh)
+{
+	return __buffer_state(bh, JBD);
+}
+
+static inline struct buffer_head *jh2bh(struct journal_head *jh)
+{
+	return jh->b_bh;
+}
+
+static inline struct journal_head *bh2jh(struct buffer_head *bh)
+{
+	return bh->b_private;
+}
+
+struct jbd_revoke_table_s;
+
+/* The handle_t type represents a single atomic update being performed
+ * by some process.  All filesystem modifications made by the process go
+ * through this handle.  Recursive operations (such as quota operations)
+ * are gathered into a single update.
+ *
+ * The buffer credits field is used to account for journaled buffers
+ * being modified by the running process.  To ensure that there is
+ * enough log space for all outstanding operations, we need to limit the
+ * number of outstanding buffers possible at any time.  When the
+ * operation completes, any buffer credits not used are credited back to
+ * the transaction, so that at all times we know how many buffers the
+ * outstanding updates on a transaction might possibly touch. */
+
+struct handle_s
+{
+	/* Which compound transaction is this update a part of? */
+	transaction_t	      * h_transaction;
+
+	/* Number of remaining buffers we are allowed to dirty: */
+	int			h_buffer_credits;
+
+	/* Reference count on this handle */
+	int			h_ref;
+
+	/* Field for caller's use to track errors through large fs
+	   operations */
+	int			h_err;
+
+	/* Flags */
+	unsigned int	h_sync:		1;	/* sync-on-close */
+	unsigned int	h_jdata:	1;	/* force data journaling */
+	unsigned int	h_aborted:	1;	/* fatal error on handle */
+};
+
+
+/* The transaction_t type is the guts of the journaling mechanism.  It
+ * tracks a compound transaction through its various states:
+ *
+ * RUNNING:	accepting new updates
+ * LOCKED:	Updates still running but we don't accept new ones
+ * RUNDOWN:	Updates are tidying up but have finished requesting
+ *		new buffers to modify (state not used for now)
+ * FLUSH:       All updates complete, but we are still writing to disk
+ * COMMIT:      All data on disk, writing commit record
+ * FINISHED:	We still have to keep the transaction for checkpointing.
+ *
+ * The transaction keeps track of all of the buffers modified by a
+ * running transaction, and all of the buffers committed but not yet
+ * flushed to home for finished transactions.
+ */
+
+struct transaction_s
+{
+	/* Pointer to the journal for this transaction. */
+	journal_t *		t_journal;
+
+	/* Sequence number for this transaction */
+	tid_t			t_tid;
+
+	/* Transaction's current state */
+	enum {
+		T_RUNNING,
+		T_LOCKED,
+		T_RUNDOWN,
+		T_FLUSH,
+		T_COMMIT,
+		T_FINISHED
+	}			t_state;
+
+	/* Where in the log does this transaction's commit start? */
+	unsigned long		t_log_start;
+
+	/* Doubly-linked circular list of all inodes owned by this
+           transaction */	/* AKPM: unused */
+	struct inode *		t_ilist;
+
+	/* Number of buffers on the t_buffers list */
+	int			t_nr_buffers;
+
+	/* Doubly-linked circular list of all buffers reserved but not
+           yet modified by this transaction */
+	struct journal_head *	t_reserved_list;
+
+	/* Doubly-linked circular list of all metadata buffers owned by this
+           transaction */
+	struct journal_head *	t_buffers;
+
+	/*
+	 * Doubly-linked circular list of all data buffers still to be
+	 * flushed before this transaction can be committed.
+	 * Protected by journal_datalist_lock.
+	 */
+	struct journal_head *	t_sync_datalist;
+
+	/*
+	 * Doubly-linked circular list of all writepage data buffers
+	 * still to be written before this transaction can be committed.
+	 * Protected by journal_datalist_lock.
+	 */
+	struct journal_head *	t_async_datalist;
+
+	/* Doubly-linked circular list of all forget buffers (superceded
+           buffers which we can un-checkpoint once this transaction
+           commits) */
+	struct journal_head *	t_forget;
+
+	/*
+	 * Doubly-linked circular list of all buffers still to be
+	 * flushed before this transaction can be checkpointed.
+	 */
+	/* Protected by journal_datalist_lock */
+	struct journal_head *	t_checkpoint_list;
+
+	/* Doubly-linked circular list of temporary buffers currently
+           undergoing IO in the log */
+	struct journal_head *	t_iobuf_list;
+
+	/* Doubly-linked circular list of metadata buffers being
+           shadowed by log IO.  The IO buffers on the iobuf list and the
+           shadow buffers on this list match each other one for one at
+           all times. */
+	struct journal_head *	t_shadow_list;
+
+	/* Doubly-linked circular list of control buffers being written
+           to the log. */
+	struct journal_head *	t_log_list;
+
+	/* Number of outstanding updates running on this transaction */
+	int			t_updates;
+
+	/* Number of buffers reserved for use by all handles in this
+	 * transaction handle but not yet modified. */
+	int			t_outstanding_credits;
+
+	/*
+	 * Forward and backward links for the circular list of all
+	 * transactions awaiting checkpoint.
+	 */
+	/* Protected by journal_datalist_lock */
+	transaction_t		*t_cpnext, *t_cpprev;
+
+	/* When will the transaction expire (become due for commit), in
+	 * jiffies ? */
+	unsigned long		t_expires;
+
+	/* How many handles used this transaction? */
+	int t_handle_count;
+};
+
+
+/* The journal_t maintains all of the journaling state information for a
+ * single filesystem.  It is linked to from the fs superblock structure.
+ *
+ * We use the journal_t to keep track of all outstanding transaction
+ * activity on the filesystem, and to manage the state of the log
+ * writing process. */
+
+struct journal_s
+{
+	/* General journaling state flags */
+	unsigned long		j_flags;
+
+	/* Is there an outstanding uncleared error on the journal (from
+	 * a prior abort)? */
+	int			j_errno;
+
+	/* The superblock buffer */
+	struct buffer_head *	j_sb_buffer;
+	journal_superblock_t *	j_superblock;
+
+	/* Version of the superblock format */
+	int			j_format_version;
+
+	/* Number of processes waiting to create a barrier lock */
+	int			j_barrier_count;
+
+	/* The barrier lock itself */
+	struct semaphore	j_barrier;
+
+	/* Transactions: The current running transaction... */
+	transaction_t *		j_running_transaction;
+
+	/* ... the transaction we are pushing to disk ... */
+	transaction_t *		j_committing_transaction;
+
+	/* ... and a linked circular list of all transactions waiting
+	 * for checkpointing. */
+	/* Protected by journal_datalist_lock */
+	transaction_t *		j_checkpoint_transactions;
+
+	/* Wait queue for waiting for a locked transaction to start
+           committing, or for a barrier lock to be released */
+	wait_queue_head_t	j_wait_transaction_locked;
+
+	/* Wait queue for waiting for checkpointing to complete */
+	wait_queue_head_t	j_wait_logspace;
+
+	/* Wait queue for waiting for commit to complete */
+	wait_queue_head_t	j_wait_done_commit;
+
+	/* Wait queue to trigger checkpointing */
+	wait_queue_head_t	j_wait_checkpoint;
+
+	/* Wait queue to trigger commit */
+	wait_queue_head_t	j_wait_commit;
+
+	/* Wait queue to wait for updates to complete */
+	wait_queue_head_t	j_wait_updates;
+
+	/* Semaphore for locking against concurrent checkpoints */
+	struct semaphore 	j_checkpoint_sem;
+
+	/* The main journal lock, used by lock_journal() */
+	struct semaphore	j_sem;
+
+	/* Journal head: identifies the first unused block in the journal. */
+	unsigned long		j_head;
+
+	/* Journal tail: identifies the oldest still-used block in the
+	 * journal. */
+	unsigned long		j_tail;
+
+	/* Journal free: how many free blocks are there in the journal? */
+	unsigned long		j_free;
+
+	/* Journal start and end: the block numbers of the first usable
+	 * block and one beyond the last usable block in the journal. */
+	unsigned long		j_first, j_last;
+
+	/* Device, blocksize and starting block offset for the location
+	 * where we store the journal. */
+	kdev_t			j_dev;
+	int			j_blocksize;
+	unsigned int		j_blk_offset;
+
+	/* Device which holds the client fs.  For internal journal this
+	 * will be equal to j_dev. */
+	kdev_t			j_fs_dev;
+
+	/* Total maximum capacity of the journal region on disk. */
+	unsigned int		j_maxlen;
+
+	/* Optional inode where we store the journal.  If present, all
+	 * journal block numbers are mapped into this inode via
+	 * bmap(). */
+	struct inode *		j_inode;
+
+	/* Sequence number of the oldest transaction in the log */
+	tid_t			j_tail_sequence;
+	/* Sequence number of the next transaction to grant */
+	tid_t			j_transaction_sequence;
+	/* Sequence number of the most recently committed transaction */
+	tid_t			j_commit_sequence;
+	/* Sequence number of the most recent transaction wanting commit */
+	tid_t			j_commit_request;
+
+	/* Journal uuid: identifies the object (filesystem, LVM volume
+	 * etc) backed by this journal.  This will eventually be
+	 * replaced by an array of uuids, allowing us to index multiple
+	 * devices within a single journal and to perform atomic updates
+	 * across them.  */
+
+	__u8			j_uuid[16];
+
+	/* Pointer to the current commit thread for this journal */
+	struct task_struct *	j_task;
+
+	/* Maximum number of metadata buffers to allow in a single
+	 * compound commit transaction */
+	int			j_max_transaction_buffers;
+
+	/* What is the maximum transaction lifetime before we begin a
+	 * commit? */
+	unsigned long		j_commit_interval;
+
+	/* The timer used to wakeup the commit thread: */
+	struct timer_list *	j_commit_timer;
+	int			j_commit_timer_active;
+
+	/* Link all journals together - system-wide */
+	struct list_head	j_all_journals;
+
+	/* The revoke table: maintains the list of revoked blocks in the
+           current transaction. */
+	struct jbd_revoke_table_s *j_revoke;
+
+	/* Failed journal commit ID */
+	unsigned int		j_failed_commit;
+};
+
+/*
+ * Journal flag definitions
+ */
+#define JFS_UNMOUNT	0x001	/* Journal thread is being destroyed */
+#define JFS_ABORT	0x002	/* Journaling has been aborted for errors. */
+#define JFS_ACK_ERR	0x004	/* The errno in the sb has been acked */
+#define JFS_FLUSHED	0x008	/* The journal superblock has been flushed */
+#define JFS_LOADED	0x010	/* The journal superblock has been loaded */
+
+/*
+ * Function declarations for the journaling transaction and buffer
+ * management
+ */
+
+/* Filing buffers */
+extern void __journal_unfile_buffer(struct journal_head *);
+extern void journal_unfile_buffer(struct journal_head *);
+extern void __journal_refile_buffer(struct journal_head *);
+extern void journal_refile_buffer(struct journal_head *);
+extern void __journal_file_buffer(struct journal_head *, transaction_t *, int);
+extern void __journal_free_buffer(struct journal_head *bh);
+extern void journal_file_buffer(struct journal_head *, transaction_t *, int);
+extern void __journal_clean_data_list(transaction_t *transaction);
+
+/* Log buffer allocation */
+extern struct journal_head * journal_get_descriptor_buffer(journal_t *);
+extern unsigned long journal_next_log_block(journal_t *);
+
+/* Commit management */
+extern void journal_commit_transaction(journal_t *);
+
+/* Checkpoint list management */
+int __journal_clean_checkpoint_list(journal_t *journal);
+extern void journal_remove_checkpoint(struct journal_head *);
+extern void __journal_remove_checkpoint(struct journal_head *);
+extern void journal_insert_checkpoint(struct journal_head *, transaction_t *);
+extern void __journal_insert_checkpoint(struct journal_head *,transaction_t *);
+
+/* Buffer IO */
+extern int
+journal_write_metadata_buffer(transaction_t	  *transaction,
+			      struct journal_head  *jh_in,
+			      struct journal_head **jh_out,
+			      int		   blocknr);
+
+/* Transaction locking */
+extern void		__wait_on_journal (journal_t *);
+
+/*
+ * Journal locking.
+ *
+ * We need to lock the journal during transaction state changes so that
+ * nobody ever tries to take a handle on the running transaction while
+ * we are in the middle of moving it to the commit phase.
+ *
+ * Note that the locking is completely interrupt unsafe.  We never touch
+ * journal structures from interrupts.
+ *
+ * In 2.2, the BKL was required for lock_journal.  This is no longer
+ * the case.
+ */
+
+static inline void lock_journal(journal_t *journal)
+{
+	down(&journal->j_sem);
+}
+
+/* This returns zero if we acquired the semaphore */
+static inline int try_lock_journal(journal_t * journal)
+{
+	return down_trylock(&journal->j_sem);
+}
+
+static inline void unlock_journal(journal_t * journal)
+{
+	up(&journal->j_sem);
+}
+
+
+static inline handle_t *journal_current_handle(void)
+{
+	return current->journal_info;
+}
+
+/* The journaling code user interface:
+ *
+ * Create and destroy handles
+ * Register buffer modifications against the current transaction.
+ */
+
+extern handle_t *journal_start(journal_t *, int nblocks);
+extern handle_t *journal_try_start(journal_t *, int nblocks);
+extern int	 journal_restart (handle_t *, int nblocks);
+extern int	 journal_extend (handle_t *, int nblocks);
+extern int	 journal_get_write_access (handle_t *, struct buffer_head *);
+extern int	 journal_get_create_access (handle_t *, struct buffer_head *);
+extern int	 journal_get_undo_access (handle_t *, struct buffer_head *);
+extern int	 journal_dirty_data (handle_t *,
+				struct buffer_head *, int async);
+extern int	 journal_dirty_metadata (handle_t *, struct buffer_head *);
+extern void	 journal_release_buffer (handle_t *, struct buffer_head *);
+extern void	 journal_forget (handle_t *, struct buffer_head *);
+extern void	 journal_sync_buffer (struct buffer_head *);
+extern int	 journal_flushpage(journal_t *, struct page *, unsigned long);
+extern int	 journal_try_to_free_buffers(journal_t *, struct page *, int);
+extern int	 journal_stop(handle_t *);
+extern int	 journal_flush (journal_t *);
+
+extern void	 journal_lock_updates (journal_t *);
+extern void	 journal_unlock_updates (journal_t *);
+
+extern journal_t * journal_init_dev(kdev_t dev, kdev_t fs_dev,
+				int start, int len, int bsize);
+extern journal_t * journal_init_inode (struct inode *);
+extern int	   journal_update_format (journal_t *);
+extern int	   journal_check_used_features
+		   (journal_t *, unsigned long, unsigned long, unsigned long);
+extern int	   journal_check_available_features
+		   (journal_t *, unsigned long, unsigned long, unsigned long);
+extern int	   journal_set_features
+		   (journal_t *, unsigned long, unsigned long, unsigned long);
+extern int	   journal_create     (journal_t *);
+extern int	   journal_load       (journal_t *journal);
+extern void	   journal_destroy    (journal_t *);
+extern int	   journal_recover    (journal_t *journal);
+extern int	   journal_wipe       (journal_t *, int);
+extern int	   journal_skip_recovery (journal_t *);
+extern void	   journal_update_superblock (journal_t *, int);
+extern void	   __journal_abort      (journal_t *);
+extern void	   journal_abort      (journal_t *, int);
+extern int	   journal_errno      (journal_t *);
+extern void	   journal_ack_err    (journal_t *);
+extern int	   journal_clear_err  (journal_t *);
+extern unsigned long journal_bmap(journal_t *journal, unsigned long blocknr);
+extern int	    journal_force_commit(journal_t *journal);
+
+/*
+ * journal_head management
+ */
+extern struct journal_head
+		*journal_add_journal_head(struct buffer_head *bh);
+extern void	journal_remove_journal_head(struct buffer_head *bh);
+extern void	__journal_remove_journal_head(struct buffer_head *bh);
+extern void	journal_unlock_journal_head(struct journal_head *jh);
+
+/* Primary revoke support */
+#define JOURNAL_REVOKE_DEFAULT_HASH 256
+extern int	   journal_init_revoke(journal_t *, int);
+extern void	   journal_destroy_revoke_caches(void);
+extern int	   journal_init_revoke_caches(void);
+
+extern void	   journal_destroy_revoke(journal_t *);
+extern int	   journal_revoke (handle_t *,
+				unsigned long, struct buffer_head *);
+extern int	   journal_cancel_revoke(handle_t *, struct journal_head *);
+extern void	   journal_write_revoke_records(journal_t *, transaction_t *);
+
+/* Recovery revoke support */
+extern int	   journal_set_revoke(journal_t *, unsigned long, tid_t);
+extern int	   journal_test_revoke(journal_t *, unsigned long, tid_t);
+extern void	   journal_clear_revoke(journal_t *);
+extern void	   journal_brelse_array(struct buffer_head *b[], int n);
+
+/* The log thread user interface:
+ *
+ * Request space in the current transaction, and force transaction commit
+ * transitions on demand.
+ */
+
+extern int	log_space_left (journal_t *); /* Called with journal locked */
+extern tid_t	log_start_commit (journal_t *, transaction_t *);
+extern void	log_wait_commit (journal_t *, tid_t);
+extern int	log_do_checkpoint (journal_t *, int);
+
+extern void	log_wait_for_space(journal_t *, int nblocks);
+extern void	__journal_drop_transaction(journal_t *, transaction_t *);
+extern int	cleanup_journal_tail(journal_t *);
+
+/* Reduce journal memory usage by flushing */
+extern void shrink_journal_memory(void);
+
+/* Debugging code only: */
+
+#define jbd_ENOSYS() \
+do {								      \
+	printk (KERN_ERR "JBD unimplemented function " __FUNCTION__); \
+	current->state = TASK_UNINTERRUPTIBLE;			      \
+	schedule();						      \
+} while (1)
+
+/*
+ * is_journal_abort
+ *
+ * Simple test wrapper function to test the JFS_ABORT state flag.  This
+ * bit, when set, indicates that we have had a fatal error somewhere,
+ * either inside the journaling layer or indicated to us by the client
+ * (eg. ext3), and that we and should not commit any further
+ * transactions.
+ */
+
+static inline int is_journal_aborted(journal_t *journal)
+{
+	return journal->j_flags & JFS_ABORT;
+}
+
+static inline int is_handle_aborted(handle_t *handle)
+{
+	if (handle->h_aborted)
+		return 1;
+	return is_journal_aborted(handle->h_transaction->t_journal);
+}
+
+static inline void journal_abort_handle(handle_t *handle)
+{
+	handle->h_aborted = 1;
+}
+
+/* Not all architectures define BUG() */
+#ifndef BUG
+#define BUG() do { \
+        printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
+	* ((char *) 0) = 0; \
+ } while (0)
+#endif /* BUG */
+
+#else
+
+extern int	   journal_recover    (journal_t *journal);
+extern int	   journal_skip_recovery (journal_t *);
+
+/* Primary revoke support */
+extern int	   journal_init_revoke(journal_t *, int);
+extern void	   journal_destroy_revoke_caches(void);
+extern int	   journal_init_revoke_caches(void);
+
+/* Recovery revoke support */
+extern int	   journal_set_revoke(journal_t *, unsigned long, tid_t);
+extern int	   journal_test_revoke(journal_t *, unsigned long, tid_t);
+extern void	   journal_clear_revoke(journal_t *);
+extern void	   journal_brelse_array(struct buffer_head *b[], int n);
+
+extern void	   journal_destroy_revoke(journal_t *);
+#endif /* __KERNEL__   */
+
+static inline int tid_gt(tid_t x, tid_t y) EXT2FS_ATTR((unused));
+static inline int tid_geq(tid_t x, tid_t y) EXT2FS_ATTR((unused));
+
+/* Comparison functions for transaction IDs: perform comparisons using
+ * modulo arithmetic so that they work over sequence number wraps. */
+
+static inline int tid_gt(tid_t x, tid_t y)
+{
+	int difference = (x - y);
+	return (difference > 0);
+}
+
+static inline int tid_geq(tid_t x, tid_t y)
+{
+	int difference = (x - y);
+	return (difference >= 0);
+}
+
+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 superceded 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);
+
+#ifdef __KERNEL__
+
+extern spinlock_t jh_splice_lock;
+/*
+ * Once `expr1' has been found true, take jh_splice_lock
+ * and then reevaluate everything.
+ */
+#define SPLICE_LOCK(expr1, expr2)				\
+	({							\
+		int ret = (expr1);				\
+		if (ret) {					\
+			spin_lock(&jh_splice_lock);		\
+			ret = (expr1) && (expr2);		\
+			spin_unlock(&jh_splice_lock);		\
+		}						\
+		ret;						\
+	})
+
+/*
+ * A number of buffer state predicates.  They test for
+ * buffer_jbd() because they are used in core kernel code.
+ *
+ * These will be racy on SMP unless we're *sure* that the
+ * buffer won't be detached from the journalling system
+ * in parallel.
+ */
+
+/* Return true if the buffer is on journal list `list' */
+static inline int buffer_jlist_eq(struct buffer_head *bh, int list)
+{
+	return SPLICE_LOCK(buffer_jbd(bh), bh2jh(bh)->b_jlist == list);
+}
+
+/* Return true if this bufer is dirty wrt the journal */
+static inline int buffer_jdirty(struct buffer_head *bh)
+{
+	return buffer_jbd(bh) && __buffer_state(bh, JBDDirty);
+}
+
+/* Return true if it's a data buffer which journalling is managing */
+static inline int buffer_jbd_data(struct buffer_head *bh)
+{
+	return SPLICE_LOCK(buffer_jbd(bh),
+			bh2jh(bh)->b_jlist == BJ_SyncData ||
+			bh2jh(bh)->b_jlist == BJ_AsyncData);
+}
+
+#ifdef CONFIG_SMP
+#define assert_spin_locked(lock)	J_ASSERT(spin_is_locked(lock))
+#else
+#define assert_spin_locked(lock)	do {} while(0)
+#endif
+
+#define buffer_trace_init(bh)	do {} while (0)
+#define print_buffer_fields(bh)	do {} while (0)
+#define print_buffer_trace(bh)	do {} while (0)
+#define BUFFER_TRACE(bh, info)	do {} while (0)
+#define BUFFER_TRACE2(bh, bh2, info)	do {} while (0)
+#define JBUFFER_TRACE(jh, info)	do {} while (0)
+
+#endif	/* __KERNEL__ */
+
+#endif	/* CONFIG_JBD || CONFIG_JBD_MODULE || !__KERNEL__ */
+
+/*
+ * Compatibility no-ops which allow the kernel to compile without CONFIG_JBD
+ * go here.
+ */
+
+#if defined(__KERNEL__) && !(defined(CONFIG_JBD) || defined(CONFIG_JBD_MODULE))
+
+#define J_ASSERT(expr)			do {} while (0)
+#define J_ASSERT_BH(bh, expr)		do {} while (0)
+#define buffer_jbd(bh)			0
+#define buffer_jlist_eq(bh, val)	0
+#define journal_buffer_journal_lru(bh)	0
+
+#endif	/* defined(__KERNEL__) && !defined(CONFIG_JBD) */
+#endif	/* _LINUX_JBD_H */
diff --git a/e2fsprogs/lib/ext2fs/kernel-list.h b/e2fsprogs/lib/ext2fs/kernel-list.h
new file mode 100644
index 0000000..01f4f6b
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/kernel-list.h
@@ -0,0 +1,109 @@
+#ifndef _LINUX_LIST_H
+#define _LINUX_LIST_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) \
+	((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
+
+#define list_for_each(pos, head) \
+        for (pos = (head)->next; pos != (head); pos = pos->next)
+
+#endif
diff --git a/e2fsprogs/lib/ext2fs/link.c b/e2fsprogs/lib/ext2fs/link.c
new file mode 100644
index 0000000..8c5553c
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/link.c
@@ -0,0 +1,156 @@
+/*
+ * 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 <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+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(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;
+
+	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;
+
+	/*
+	 * 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) &&
+	    (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(dirent->name_len & 0xFF);
+		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;
+		next->name_len = 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;
+	dirent->name_len = ls->namelen;
+	strncpy(dirent->name, ls->name, ls->namelen);
+	if (ls->sb->s_feature_incompat & EXT2_FEATURE_INCOMPAT_FILETYPE)
+		dirent->name_len |= (ls->flags & 0x7) << 8;
+
+	ls->done++;
+	return DIRENT_ABORT|DIRENT_CHANGED;
+}
+
+/*
+ * 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;
+
+	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_iterate(fs, dir, DIRENT_FLAG_INCLUDE_EMPTY,
+				    0, link_proc, &ls);
+	if (retval)
+		return retval;
+	if (ls.err)
+		return ls.err;
+
+	if (!ls.done)
+		return EXT2_ET_DIR_NO_SPACE;
+
+	if ((retval = ext2fs_read_inode(fs, dir, &inode)) != 0)
+		return retval;
+
+	if (inode.i_flags & EXT2_INDEX_FL) {
+		inode.i_flags &= ~EXT2_INDEX_FL;
+		if ((retval = ext2fs_write_inode(fs, dir, &inode)) != 0)
+			return retval;
+	}
+
+	return 0;
+}
diff --git a/e2fsprogs/lib/ext2fs/llseek.c b/e2fsprogs/lib/ext2fs/llseek.c
new file mode 100644
index 0000000..2bdb2e0
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/llseek.c
@@ -0,0 +1,140 @@
+/*
+ * 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%
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#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 <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 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/e2fsprogs/lib/ext2fs/lookup.c b/e2fsprogs/lib/ext2fs/lookup.c
new file mode 100644
index 0000000..97aa088
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/lookup.c
@@ -0,0 +1,69 @@
+/*
+ * 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 <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 != (dirent->name_len & 0xFF))
+		return 0;
+	if (strncmp(ls->name, dirent->name, (dirent->name_len & 0xFF)))
+		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/e2fsprogs/lib/ext2fs/mkdir.c b/e2fsprogs/lib/ext2fs/mkdir.c
new file mode 100644
index 0000000..9b6b799
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/mkdir.c
@@ -0,0 +1,155 @@
+/*
+ * 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 <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 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;
+
+	EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+	/*
+	 * 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
+	 */
+	retval = ext2fs_new_block2(fs, 0, 0, &blk);
+	if (retval)
+		goto cleanup;
+
+	/*
+	 * Create a scratch template for the directory
+	 */
+	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....
+	 */
+	memset(&inode, 0, sizeof(struct ext2_inode));
+	inode.i_mode = LINUX_S_IFDIR | (0777 & ~fs->umask);
+	inode.i_uid = inode.i_gid = 0;
+	ext2fs_iblk_set(fs, &inode, 1);
+	if (fs->super->s_feature_incompat & EXT3_FEATURE_INCOMPAT_EXTENTS)
+		inode.i_flags |= EXT4_EXTENTS_FL;
+	else
+		inode.i_block[0] = blk;
+	inode.i_links_count = 2;
+	inode.i_size = fs->blocksize;
+
+	/*
+	 * Write out the inode and inode data block
+	 */
+	retval = ext2fs_write_dir_block(fs, blk, block);
+	if (retval)
+		goto cleanup;
+	retval = ext2fs_write_new_inode(fs, ino, &inode);
+	if (retval)
+		goto cleanup;
+
+	if (fs->super->s_feature_incompat & EXT3_FEATURE_INCOMPAT_EXTENTS) {
+		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;
+	}
+
+	/*
+	 * 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) {
+		parent_inode.i_links_count++;
+		retval = ext2fs_write_inode(fs, parent, &parent_inode);
+		if (retval)
+			goto cleanup;
+	}
+
+	/*
+	 * Update accounting....
+	 */
+	ext2fs_block_alloc_stats2(fs, blk, +1);
+	ext2fs_inode_alloc_stats2(fs, ino, +1, 1);
+
+cleanup:
+	if (block)
+		ext2fs_free_mem(&block);
+	return retval;
+
+}
+
+
diff --git a/e2fsprogs/lib/ext2fs/mkjournal.c b/e2fsprogs/lib/ext2fs/mkjournal.c
new file mode 100644
index 0000000..02ffb97
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/mkjournal.c
@@ -0,0 +1,636 @@
+/*
+ * 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 <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
+#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 "jfs_user.h"
+
+/*
+ * This function automatically sets up the journal superblock and
+ * returns it as an allocated block.
+ */
+errcode_t ext2fs_create_journal_superblock(ext2_filsys fs,
+					   __u32 num_blocks, int flags,
+					   char  **ret_jsb)
+{
+	errcode_t		retval;
+	journal_superblock_t	*jsb;
+
+	if (num_blocks < 1024)
+		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(JFS_MAGIC_NUMBER);
+	if (flags & EXT2_MKJOURNAL_V1_SUPER)
+		jsb->s_header.h_blocktype = htonl(JFS_SUPERBLOCK_V1);
+	else
+		jsb->s_header.h_blocktype = htonl(JFS_SUPERBLOCK_V2);
+	jsb->s_blocksize = htonl(fs->blocksize);
+	jsb->s_maxlen = htonl(num_blocks);
+	jsb->s_nr_users = htonl(1);
+	jsb->s_first = htonl(1);
+	jsb->s_sequence = htonl(1);
+	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 (fs->super->s_feature_incompat &
+	    EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) {
+		jsb->s_nr_users = 0;
+		if (fs->blocksize == 1024)
+			jsb->s_first = htonl(3);
+		else
+			jsb->s_first = htonl(2);
+	}
+
+	*ret_jsb = (char *) jsb;
+	return 0;
+}
+
+/*
+ * 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,
+				    blk_t num_blocks, int flags)
+{
+	errcode_t	retval;
+	char		*buf = 0;
+	int		fd, ret_size;
+	blk_t		i;
+
+	if ((retval = ext2fs_create_journal_superblock(fs, num_blocks, 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 < num_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 STRIDE_LENGTH 8
+errcode_t ext2fs_zero_blocks2(ext2_filsys fs, blk64_t blk, int num,
+			      blk64_t *ret_blk, int *ret_count)
+{
+	int		j, count;
+	static char	*buf;
+	errcode_t	retval;
+
+	/* If fs is null, clean up the static buffer and return */
+	if (!fs) {
+		if (buf) {
+			free(buf);
+			buf = 0;
+		}
+		return 0;
+	}
+	/* Allocate the zeroizing buffer if necessary */
+	if (!buf) {
+		buf = malloc(fs->blocksize * STRIDE_LENGTH);
+		if (!buf)
+			return ENOMEM;
+		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;
+}
+
+/*
+ * Helper function for creating the journal using direct I/O routines
+ */
+struct mkjournal_struct {
+	int		num_blocks;
+	int		newblocks;
+	blk64_t		goal;
+	blk64_t		blk_to_zero;
+	int		zero_count;
+	int		flags;
+	char		*buf;
+	errcode_t	err;
+};
+
+static int mkjournal_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 mkjournal_struct *es = (struct mkjournal_struct *) priv_data;
+	blk64_t	new_blk;
+	errcode_t	retval;
+
+	if (*blocknr) {
+		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;
+		}
+		ext2fs_block_alloc_stats2(fs, new_blk, +1);
+		es->newblocks++;
+	}
+	if (blockcnt >= 0)
+		es->num_blocks--;
+
+	retval = 0;
+	if (blockcnt <= 0)
+		retval = io_channel_write_blk64(fs->io, new_blk, 1, es->buf);
+	else if (!(es->flags & EXT2_MKJOURNAL_LAZYINIT)) {
+		if (es->zero_count) {
+			if ((es->blk_to_zero + es->zero_count == new_blk) &&
+			    (es->zero_count < 1024))
+				es->zero_count++;
+			else {
+				retval = ext2fs_zero_blocks2(fs,
+							     es->blk_to_zero,
+							     es->zero_count,
+							     0, 0);
+				es->zero_count = 0;
+			}
+		}
+		if (es->zero_count == 0) {
+			es->blk_to_zero = new_blk;
+			es->zero_count = 1;
+		}
+	}
+
+	if (blockcnt == 0)
+		memset(es->buf, 0, fs->blocksize);
+
+	if (retval) {
+		es->err = retval;
+		return BLOCK_ABORT;
+	}
+	*blocknr = es->goal = new_blk;
+
+	if (es->num_blocks == 0)
+		return (BLOCK_CHANGED | BLOCK_ABORT);
+	else
+		return BLOCK_CHANGED;
+
+}
+
+/*
+ * This function creates a journal using direct I/O routines.
+ */
+static errcode_t write_journal_inode(ext2_filsys fs, ext2_ino_t journal_ino,
+				     blk_t num_blocks, int flags)
+{
+	char			*buf;
+	dgrp_t			group, start, end, i, log_flex;
+	errcode_t		retval;
+	struct ext2_inode	inode;
+	unsigned long long	inode_size;
+	struct mkjournal_struct	es;
+
+	if ((retval = ext2fs_create_journal_superblock(fs, num_blocks, 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;
+	}
+
+	es.num_blocks = num_blocks;
+	es.newblocks = 0;
+	es.buf = buf;
+	es.err = 0;
+	es.flags = flags;
+	es.zero_count = 0;
+
+	if (fs->super->s_feature_incompat & EXT3_FEATURE_INCOMPAT_EXTENTS) {
+		inode.i_flags |= EXT4_EXTENTS_FL;
+		if ((retval = ext2fs_write_inode(fs, journal_ino, &inode)))
+			goto out2;
+	}
+
+	/*
+	 * Set the initial goal block to be roughly at the middle of
+	 * the filesystem.  Pick a group that has the largest number
+	 * of free blocks.
+	 */
+	group = ext2fs_group_of_blk2(fs, (ext2fs_blocks_count(fs->super) -
+					 fs->super->s_first_data_block) / 2);
+	log_flex = 1 << 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;
+
+	es.goal = ext2fs_group_first_block2(fs, group);
+	retval = ext2fs_block_iterate3(fs, journal_ino, BLOCK_FLAG_APPEND,
+				       0, mkjournal_proc, &es);
+	if (es.err) {
+		retval = es.err;
+		goto errout;
+	}
+	if (es.zero_count) {
+		retval = ext2fs_zero_blocks2(fs, es.blk_to_zero,
+					    es.zero_count, 0, 0);
+		if (retval)
+			goto errout;
+	}
+
+	if ((retval = ext2fs_read_inode(fs, journal_ino, &inode)))
+		goto errout;
+
+	inode_size = (unsigned long long)fs->blocksize * num_blocks;
+	inode.i_size = inode_size & 0xFFFFFFFF;
+	inode.i_size_high = (inode_size >> 32) & 0xFFFFFFFF;
+	if (ext2fs_needs_large_file_feature(inode_size))
+		fs->super->s_feature_ro_compat |=
+			EXT2_FEATURE_RO_COMPAT_LARGE_FILE;
+	ext2fs_iblk_add_blocks(fs, &inode, es.newblocks);
+	inode.i_mtime = inode.i_ctime = fs->now ? fs->now : time(0);
+	inode.i_links_count = 1;
+	inode.i_mode = LINUX_S_IFREG | 0600;
+
+	if ((retval = ext2fs_write_new_inode(fs, journal_ino, &inode)))
+		goto errout;
+	retval = 0;
+
+	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);
+
+errout:
+	ext2fs_zero_blocks2(0, 0, 0, 0, 0);
+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.
+ */
+int ext2fs_default_journal_size(__u64 num_blocks)
+{
+	if (num_blocks < 2048)
+		return -1;
+	if (num_blocks < 32768)
+		return (1024);
+	if (num_blocks < 256*1024)
+		return (4096);
+	if (num_blocks < 512*1024)
+		return (8192);
+	if (num_blocks < 1024*1024)
+		return (16384);
+	return 32768;
+}
+
+/*
+ * 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[1024];
+	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 = 1;
+	if (journal_dev->blocksize == 1024)
+		start++;
+	if ((retval = io_channel_read_blk64(journal_dev->io, start, -1024,
+					    buf)))
+		return retval;
+
+	jsb = (journal_superblock_t *) buf;
+	if ((jsb->s_header.h_magic != (unsigned) ntohl(JFS_MAGIC_NUMBER)) ||
+	    (jsb->s_header.h_blocktype != (unsigned) ntohl(JFS_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);
+	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, -1024, 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));
+	fs->super->s_feature_compat |= EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+	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_inode(ext2_filsys fs, blk_t num_blocks, 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 retval;
+		}
+#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, num_blocks, 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;
+	} 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,
+						  num_blocks, 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));
+	fs->super->s_feature_compat |= EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+
+	ext2fs_mark_super_dirty(fs);
+	return 0;
+errout:
+	if (fd >= 0)
+		close(fd);
+	return retval;
+}
+
+#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, 1024, 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(fs);
+	exit(0);
+
+}
+#endif
diff --git a/e2fsprogs/lib/ext2fs/mmp.c b/e2fsprogs/lib/ext2fs/mmp.c
new file mode 100644
index 0000000..a9eae50
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/mmp.c
@@ -0,0 +1,397 @@
+/*
+ * 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
+
+
+#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
+
+errcode_t ext2fs_mmp_read(ext2_filsys fs, blk64_t mmp_blk, void *buf)
+{
+	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) {
+		fs->mmp_fd = open(fs->device_name, O_RDWR | O_DIRECT);
+		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;
+#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;
+}
+
+errcode_t ext2fs_mmp_write(ext2_filsys fs, blk64_t mmp_blk, void *buf)
+{
+	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
+
+	/* 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;
+}
+
+#ifdef HAVE_SRANDOM
+#define srand(x)	srandom(x)
+#define rand()		random()
+#endif
+
+unsigned ext2fs_mmp_new_seq(void)
+{
+	unsigned new_seq;
+	struct timeval tv;
+
+	gettimeofday(&tv, 0);
+	srand((getpid() << 16) ^ 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;
+}
+
+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;
+#if _BSD_SOURCE || _XOPEN_SOURCE >= 500
+	gethostname(mmp_s->mmp_nodename, sizeof(mmp_s->mmp_nodename));
+#else
+	mmp_s->mmp_nodename[0] = '\0';
+#endif
+	strncpy(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;
+}
+
+errcode_t ext2fs_mmp_clear(ext2_filsys fs)
+{
+	errcode_t retval = 0;
+
+	if (!(fs->flags & EXT2_FLAG_RW))
+		return EXT2_ET_RO_FILSYS;
+
+	retval = ext2fs_mmp_reset(fs);
+
+	return retval;
+}
+
+errcode_t ext2fs_mmp_init(ext2_filsys fs)
+{
+	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;
+}
+
+/*
+ * Make sure that the fs is not mounted or being fsck'ed while opening the fs.
+ */
+errcode_t ext2fs_mmp_start(ext2_filsys fs)
+{
+	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(2 * mmp_check_interval + 1);
+
+	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();
+#if _BSD_SOURCE || _XOPEN_SOURCE >= 500
+	gethostname(mmp_s->mmp_nodename, sizeof(mmp_s->mmp_nodename));
+#else
+	strcpy(mmp_s->mmp_nodename, "unknown host");
+#endif
+	strncpy(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(2 * mmp_check_interval + 1);
+
+	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;
+}
+
+/*
+ * 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)
+{
+	struct mmp_struct *mmp, *mmp_cmp;
+	errcode_t retval = 0;
+
+	if (!(fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_MMP) ||
+	    !(fs->flags & EXT2_FLAG_RW) || (fs->flags & EXT2_FLAG_SKIP_MMP))
+		goto mmp_error;
+
+	retval = ext2fs_mmp_read(fs, fs->super->s_mmp_block, fs->mmp_buf);
+	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;
+}
+
+#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_update(ext2_filsys fs)
+{
+	struct mmp_struct *mmp, *mmp_cmp;
+	struct timeval tv;
+	errcode_t retval = 0;
+
+	if (!(fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_MMP) ||
+	    !(fs->flags & EXT2_FLAG_RW) || (fs->flags & EXT2_FLAG_SKIP_MMP))
+		return 0;
+
+	gettimeofday(&tv, 0);
+	if (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;
+}
diff --git a/e2fsprogs/lib/ext2fs/namei.c b/e2fsprogs/lib/ext2fs/namei.c
new file mode 100644
index 0000000..dd710b8
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/namei.c
@@ -0,0 +1,212 @@
+/*
+ * 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 <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_inode_data_blocks(fs,&ei)) {
+		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;
+	} else
+		pathname = (char *)&(ei.i_block[0]);
+	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/e2fsprogs/lib/ext2fs/native.c b/e2fsprogs/lib/ext2fs/native.c
new file mode 100644
index 0000000..c71a95e
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/native.c
@@ -0,0 +1,27 @@
+/*
+ * 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 <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/e2fsprogs/lib/ext2fs/newdir.c b/e2fsprogs/lib/ext2fs/newdir.c
new file mode 100644
index 0000000..bccaecd
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/newdir.c
@@ -0,0 +1,81 @@
+/*
+ * 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 <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;
+
+	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;
+
+	retval = ext2fs_set_rec_len(fs, fs->blocksize, dir);
+	if (retval) {
+		ext2fs_free_mem(&buf);
+		return retval;
+	}
+
+	if (dir_ino) {
+		if (fs->super->s_feature_incompat &
+		    EXT2_FEATURE_INCOMPAT_FILETYPE)
+			filetype = EXT2_FT_DIR << 8;
+		/*
+		 * Set up entry for '.'
+		 */
+		dir->inode = dir_ino;
+		dir->name_len = 1 | filetype;
+		dir->name[0] = '.';
+		rec_len = fs->blocksize - 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;
+		dir->name_len = 2 | filetype;
+		dir->name[0] = '.';
+		dir->name[1] = '.';
+
+	}
+	*block = buf;
+	return 0;
+}
diff --git a/e2fsprogs/lib/ext2fs/nt_io.c b/e2fsprogs/lib/ext2fs/nt_io.c
new file mode 100644
index 0000000..a29e1d4
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/nt_io.c
@@ -0,0 +1,1495 @@
+/*
+ * 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
+#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 = {
+	EXT2_ET_MAGIC_IO_MANAGER,
+	"NT I/O Manager",
+	nt_open,
+	nt_close,
+	nt_set_blksize,
+	nt_read_blk,
+	nt_write_blk,
+	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 easyer
+//
+
+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 inlut 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; // Unpappable 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 letted 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/e2fsprogs/lib/ext2fs/openfs.c b/e2fsprogs/lib/ext2fs/openfs.c
new file mode 100644
index 0000000..45b3627
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/openfs.c
@@ -0,0 +1,472 @@
+/*
+ * 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 <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;
+	blk64_t	ret_blk;
+
+	if (!(fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) ||
+	    (i < fs->super->s_first_meta_bg))
+		return (group_block + i + 1);
+
+	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) + has_super;
+	/*
+	 * 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 + fs->super->s_blocks_per_group) <
+	     ext2fs_blocks_count(fs->super)))
+		ret_blk += fs->super->s_blocks_per_group;
+	return ret_blk;
+}
+
+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);
+}
+
+/*
+ *  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;
+#ifdef WORDS_BIGENDIAN
+	unsigned int	groups_per_block;
+	struct ext2_group_desc *gdp;
+	int		j;
+#endif
+
+	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;
+	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;
+	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 (fs->image_header->magic_number != EXT2_ET_MAGIC_E2IMAGE)
+			return EXT2_ET_MAGIC_E2IMAGE;
+		superblock = 1;
+		block_size = 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;
+	}
+	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);
+
+#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;
+		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) &&
+		    (fs->super->s_feature_incompat &
+		     EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)) {
+			retval = EXT2_ET_UNSUPP_FEATURE;
+			goto cleanup;
+		}
+	}
+
+	if ((fs->super->s_log_block_size + EXT2_MIN_BLOCK_LOG_SIZE) >
+	    EXT2_MAX_BLOCK_LOG_SIZE) {
+		retval = EXT2_ET_CORRUPT_SUPERBLOCK;
+		goto cleanup;
+	}
+
+	/*
+	 * bigalloc requires cluster-aware bitfield operations, which at the
+	 * moment means we need EXT2_FLAG_64BITS.
+	 */
+	if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+				       EXT4_FEATURE_RO_COMPAT_BIGALLOC) &&
+	    !(flags & EXT2_FLAG_64BITS)) {
+		retval = EXT2_ET_CANT_USE_LEGACY_BITMAPS;
+		goto cleanup;
+	}
+
+	if (!EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+					EXT4_FEATURE_RO_COMPAT_BIGALLOC) &&
+	    (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);
+	if (EXT2_INODE_SIZE(fs->super) < EXT2_GOOD_OLD_INODE_SIZE) {
+		retval = EXT2_ET_CORRUPT_SUPERBLOCK;
+		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 (fs->super->s_feature_incompat &
+	    EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) {
+		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;
+	}
+
+	/*
+	 * Read group descriptors
+	 */
+	blocks_per_group = EXT2_BLOCKS_PER_GROUP(fs->super);
+	if (blocks_per_group == 0 ||
+	    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;
+	}
+	fs->group_desc_count = ext2fs_div64_ceil(ext2fs_blocks_count(fs->super) -
+						 fs->super->s_first_data_block,
+						 blocks_per_group);
+	if (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));
+	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;
+	if (group_block == 0 && fs->blocksize == 1024)
+		group_block = 1; /* Deal with 1024 blocksize && bigalloc */
+	dest = (char *) fs->group_desc;
+#ifdef WORDS_BIGENDIAN
+	groups_per_block = EXT2_DESC_PER_BLOCK(fs->super);
+#endif
+	if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
+		first_meta_bg = fs->super->s_first_meta_bg;
+	else
+		first_meta_bg = fs->desc_blocks;
+	if (first_meta_bg) {
+		retval = io_channel_read_blk(fs->io, group_block+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);
+			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);
+		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);
+			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 && EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+					EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) {
+		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);
+	}
+
+	if ((fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_MMP) &&
+	    !(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;
+		}
+	}
+
+	fs->flags &= ~EXT2_FLAG_NOFREE_ON_ERROR;
+	*ret_fs = fs;
+
+	return 0;
+cleanup:
+	if (flags & EXT2_FLAG_NOFREE_ON_ERROR)
+		*ret_fs = fs;
+	else
+		ext2fs_free(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/e2fsprogs/lib/ext2fs/progress.c b/e2fsprogs/lib/ext2fs/progress.c
new file mode 100644
index 0000000..ad6a3d4
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/progress.c
@@ -0,0 +1,96 @@
+/*
+ * 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 "ext2fs.h"
+#include "ext2fsP.h"
+
+#include <time.h>
+
+static char spaces[80], backspaces[80];
+static time_t last_update;
+
+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, val,
+	       progress->log_max, 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/e2fsprogs/lib/ext2fs/punch.c b/e2fsprogs/lib/ext2fs/punch.c
new file mode 100644
index 0000000..adfcdec
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/punch.c
@@ -0,0 +1,447 @@
+/*
+ * 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 <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <errno.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.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,
+			   blk_t start, blk_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 %u, count %u, "
+	       "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);
+}
+
+static errcode_t ext2fs_punch_ind(ext2_filsys fs, struct ext2_inode *inode,
+				  char *block_buf, blk_t start, blk_t count)
+{
+	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;
+
+	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 %u 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;
+}
+
+#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;
+
+	/* 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 >= 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) {
+			if (end < extent.e_lblk)
+				goto next_extent;
+			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) {
+			if (start >= next)
+				break;
+			/* 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;
+			/* Now pointing at inserted extent; so go back */
+			retval = ext2fs_extent_get(handle,
+						   EXT2_EXTENT_PREV_LEAF,
+						   &newex);
+			if (retval)
+				goto errout;
+		} 
+		if (extent.e_len) {
+			dbg_print_extent("replacing", &extent);
+			retval = ext2fs_extent_replace(handle, 0, &extent);
+		} 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;
+
+			/* Jump forward to the next extent. */
+			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;
+}
+	
+/*
+ * Deallocate all logical blocks starting at start to end, inclusive.
+ * If end is ~0, 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_EXTENTS_FL)
+		retval = ext2fs_punch_extent(fs, ino, inode, start, end);
+	else {
+		blk_t	count;
+
+		if (start > ~0U)
+			return 0;
+		if (end > ~0U)
+			end = ~0U;
+		count = ((end - start + 1) < ~0U) ? (end - start + 1) : ~0U;
+		retval = ext2fs_punch_ind(fs, inode, block_buf, 
+					  (blk_t) start, count);
+	}
+	if (retval)
+		return retval;
+
+	return ext2fs_write_inode(fs, ino, inode);
+}
diff --git a/e2fsprogs/lib/ext2fs/qcow2.c b/e2fsprogs/lib/ext2fs/qcow2.c
new file mode 100644
index 0000000..9d56ae5
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/qcow2.c
@@ -0,0 +1,255 @@
+/*
+ * 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%
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#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,
+			       ext2_off64_t 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, ext2_off64_t off_in,
+			   ext2_off64_t 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;
+	ext2_off64_t offset;
+	blk64_t *l1_table, *l2_table = NULL;
+	void *copy_buf = NULL;
+	size_t 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);
+	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);
+
+
+	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++) {
+		ext2_off64_t 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 = (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)
+		return errno;
+
+	((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/e2fsprogs/lib/ext2fs/qcow2.h b/e2fsprogs/lib/ext2fs/qcow2.h
new file mode 100644
index 0000000..81e0ec9
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/qcow2.h
@@ -0,0 +1,113 @@
+/*
+ * 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	(1LL << 63)
+#define QCOW_OFLAG_COMPRESSED	(1LL << 62)
+
+#define QCOW_COMPRESSED		1
+#define QCOW_ENCRYPTED		2
+
+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/e2fsprogs/lib/ext2fs/rbtree.c b/e2fsprogs/lib/ext2fs/rbtree.c
new file mode 100644
index 0000000..9439303
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/rbtree.c
@@ -0,0 +1,451 @@
+/*
+  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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);
+}
+
+static void ext2fs_rb_augment_path(struct rb_node *node, rb_augment_f func, void *data)
+{
+	struct rb_node *parent;
+
+up:
+	func(node, data);
+	parent = ext2fs_rb_parent(node);
+	if (!parent)
+		return;
+
+	if (node == parent->rb_left && parent->rb_right)
+		func(parent->rb_right, data);
+	else if (parent->rb_left)
+		func(parent->rb_left, data);
+
+	node = parent;
+	goto up;
+}
+
+/*
+ * after inserting @node into the tree, update the tree to account for
+ * both the new entry and any damage done by rebalance
+ */
+void ext2fs_rb_augment_insert(struct rb_node *node, rb_augment_f func, void *data)
+{
+	if (node->rb_left)
+		node = node->rb_left;
+	else if (node->rb_right)
+		node = node->rb_right;
+
+	ext2fs_rb_augment_path(node, func, data);
+}
+
+/*
+ * before removing the node, find the deepest node on the rebalance path
+ * that will still be there after @node gets removed
+ */
+struct rb_node *ext2fs_rb_augment_erase_begin(struct rb_node *node)
+{
+	struct rb_node *deepest;
+
+	if (!node->rb_right && !node->rb_left)
+		deepest = ext2fs_rb_parent(node);
+	else if (!node->rb_right)
+		deepest = node->rb_left;
+	else if (!node->rb_left)
+		deepest = node->rb_right;
+	else {
+		deepest = ext2fs_rb_next(node);
+		if (deepest->rb_right)
+			deepest = deepest->rb_right;
+		else if (ext2fs_rb_parent(deepest) != node)
+			deepest = ext2fs_rb_parent(deepest);
+	}
+
+	return deepest;
+}
+
+/*
+ * after removal, update the tree to account for the removed entry
+ * and any rebalance damage.
+ */
+void ext2fs_rb_augment_erase_end(struct rb_node *node, rb_augment_f func, void *data)
+{
+	if (node)
+		ext2fs_rb_augment_path(node, func, data);
+}
+
+/*
+ * 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/e2fsprogs/lib/ext2fs/rbtree.h b/e2fsprogs/lib/ext2fs/rbtree.h
new file mode 100644
index 0000000..3b0b078
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/rbtree.h
@@ -0,0 +1,180 @@
+/*
+  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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 drammatically 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>
+
+#undef offsetof
+#ifdef __compiler_offsetof
+#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
+#else
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+
+#define container_of(ptr, type, member) ({			\
+	const __typeof__( ((type *)0)->member ) *__mptr = (ptr);	\
+	(type *)( (char *)__mptr - offsetof(type,member) );})
+
+struct rb_node
+{
+	unsigned long  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) | (unsigned long)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)
+
+#define EXT2FS_RB_EMPTY_ROOT(root)	((root)->rb_node == NULL)
+#define EXT2FS_RB_EMPTY_NODE(node)	(ext2fs_rb_parent(node) == node)
+#define EXT2FS_RB_CLEAR_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 *);
+
+typedef void (*rb_augment_f)(struct rb_node *node, void *data);
+
+extern void ext2fs_rb_augment_insert(struct rb_node *node,
+			      rb_augment_f func, void *data);
+extern struct rb_node *ext2fs_rb_augment_erase_begin(struct rb_node *node);
+extern void ext2fs_rb_augment_erase_end(struct rb_node *node,
+				 rb_augment_f func, void *data);
+
+/* 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 = (unsigned long )parent;
+	node->rb_left = node->rb_right = NULL;
+
+	*rb_link = node;
+}
+
+#endif	/* _LINUX_RBTREE_H */
diff --git a/e2fsprogs/lib/ext2fs/read_bb.c b/e2fsprogs/lib/ext2fs/read_bb.c
new file mode 100644
index 0000000..e5d6322
--- /dev/null
+++ b/e2fsprogs/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 <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 (!((fs->super->s_feature_ro_compat &
+		       EXT4_FEATURE_RO_COMPAT_HUGE_FILE) &&
+		      (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/e2fsprogs/lib/ext2fs/read_bb_file.c b/e2fsprogs/lib/ext2fs/read_bb_file.c
new file mode 100644
index 0000000..89c567b
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/read_bb_file.c
@@ -0,0 +1,108 @@
+/*
+ * 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 <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;
+	blk64_t		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, blockno, buf, priv_data);
+			continue;
+		}
+		retval = ext2fs_badblocks_list_add(*bb_list, 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/e2fsprogs/lib/ext2fs/res_gdt.c b/e2fsprogs/lib/ext2fs/res_gdt.c
new file mode 100644
index 0000000..acce650
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/res_gdt.c
@@ -0,0 +1,229 @@
+/*
+ * 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 <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 (!(fs->super->s_feature_ro_compat &
+	      EXT2_FEATURE_RO_COMPAT_SPARSE_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 donly use the dindirect 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;
+		inode.i_size = inode_size & 0xFFFFFFFF;
+		inode.i_size_high = (inode_size >> 32) & 0xFFFFFFFF;
+		if(inode.i_size_high) {
+			sb->s_feature_ro_compat |=
+				EXT2_FEATURE_RO_COMPAT_LARGE_FILE;
+		}
+		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 = %u\n", inode.i_blocks,
+	       inode.i_size);
+#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/e2fsprogs/lib/ext2fs/rw_bitmaps.c b/e2fsprogs/lib/ext2fs/rw_bitmaps.c
new file mode 100644
index 0000000..eacf86a
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/rw_bitmaps.c
@@ -0,0 +1,356 @@
+/*
+ * 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 <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
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include "e2image.h"
+
+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 = 0;
+	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;
+
+	if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+				       EXT4_FEATURE_RO_COMPAT_GDT_CSUM))
+		csum_flag = 1;
+
+	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);
+		}
+		blk = ext2fs_block_bitmap_loc(fs, i);
+		if (blk) {
+			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;
+
+		blk = ext2fs_inode_bitmap_loc(fs, i);
+		if (blk) {
+			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 read_bitmaps(ext2_filsys fs, int do_inode, int do_block)
+{
+	dgrp_t i;
+	char *block_bitmap = 0, *inode_bitmap = 0;
+	char *buf;
+	errcode_t retval;
+	int block_nbytes = EXT2_CLUSTERS_PER_GROUP(fs->super) / 8;
+	int inode_nbytes = EXT2_INODES_PER_GROUP(fs->super) / 8;
+	int csum_flag = 0;
+	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;
+
+	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;
+
+	if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+				       EXT4_FEATURE_RO_COMPAT_GDT_CSUM))
+		csum_flag = 1;
+
+	retval = ext2fs_get_mem(strlen(fs->device_name) + 80, &buf);
+	if (retval)
+		return retval;
+	if (do_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;
+		retval = io_channel_alloc_buf(fs->io, 0, &block_bitmap);
+		if (retval)
+			goto cleanup;
+	} else
+		block_nbytes = 0;
+	if (do_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;
+		retval = io_channel_alloc_buf(fs->io, 0, &inode_bitmap);
+		if (retval)
+			goto cleanup;
+	} else
+		inode_nbytes = 0;
+	ext2fs_free_mem(&buf);
+
+	if (fs->flags & EXT2_FLAG_IMAGE_FILE) {
+		blk = (fs->image_header->offset_inodemap / fs->blocksize);
+		ino_cnt = fs->super->s_inodes_count;
+		while (inode_nbytes > 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 += fs->blocksize << 3;
+			ino_cnt -= fs->blocksize << 3;
+			inode_nbytes -= fs->blocksize;
+		}
+		blk = (fs->image_header->offset_blockmap /
+		       fs->blocksize);
+		blk_cnt = (blk64_t)EXT2_CLUSTERS_PER_GROUP(fs->super) *
+			fs->group_desc_count;
+		while (block_nbytes > 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 += fs->blocksize << 3;
+			blk_cnt -= fs->blocksize << 3;
+			block_nbytes -= fs->blocksize;
+		}
+		goto success_cleanup;
+	}
+
+	for (i = 0; i < fs->group_desc_count; 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 = 0;
+			if (blk) {
+				retval = io_channel_read_blk64(fs->io, blk,
+							       1, block_bitmap);
+				if (retval) {
+					retval = EXT2_ET_BLOCK_BITMAP_READ;
+					goto cleanup;
+				}
+			} else
+				memset(block_bitmap, 0, block_nbytes);
+			cnt = block_nbytes << 3;
+			retval = ext2fs_set_block_bitmap_range2(fs->block_map,
+					       blk_itr, cnt, block_bitmap);
+			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 = 0;
+			if (blk) {
+				retval = io_channel_read_blk64(fs->io, blk,
+							       1, inode_bitmap);
+				if (retval) {
+					retval = EXT2_ET_INODE_BITMAP_READ;
+					goto cleanup;
+				}
+			} else
+				memset(inode_bitmap, 0, inode_nbytes);
+			cnt = inode_nbytes << 3;
+			retval = ext2fs_set_inode_bitmap_range2(fs->inode_map,
+					       ino_itr, cnt, inode_bitmap);
+			if (retval)
+				goto cleanup;
+			ino_itr += inode_nbytes << 3;
+		}
+	}
+success_cleanup:
+	if (inode_bitmap)
+		ext2fs_free_mem(&inode_bitmap);
+	if (block_bitmap)
+		ext2fs_free_mem(&block_bitmap);
+	return 0;
+
+cleanup:
+	if (do_block) {
+		ext2fs_free_mem(&fs->block_map);
+		fs->block_map = 0;
+	}
+	if (do_inode) {
+		ext2fs_free_mem(&fs->inode_map);
+		fs->inode_map = 0;
+	}
+	if (inode_bitmap)
+		ext2fs_free_mem(&inode_bitmap);
+	if (block_bitmap)
+		ext2fs_free_mem(&block_bitmap);
+	if (buf)
+		ext2fs_free_mem(&buf);
+	return retval;
+}
+
+errcode_t ext2fs_read_inode_bitmap(ext2_filsys fs)
+{
+	return read_bitmaps(fs, 1, 0);
+}
+
+errcode_t ext2fs_read_block_bitmap(ext2_filsys fs)
+{
+	return read_bitmaps(fs, 0, 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)
+{
+	if (fs->inode_map && fs->block_map)
+		return 0;
+
+	return read_bitmaps(fs, !fs->inode_map, !fs->block_map);
+}
+
+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/e2fsprogs/lib/ext2fs/swapfs.c b/e2fsprogs/lib/ext2fs/swapfs.c
new file mode 100644
index 0000000..46d60ef
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/swapfs.c
@@ -0,0 +1,352 @@
+/*
+ * 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 <stdio.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <time.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+#include <ext2fs/ext2_ext_attr.h>
+
+#ifdef WORDS_BIGENDIAN
+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_algorithm_usage_bitmap = ext2fs_swab32(sb->s_algorithm_usage_bitmap);
+	sb->s_reserved_gdt_blocks = ext2fs_swab16(sb->s_reserved_gdt_blocks);
+	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);
+	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);
+	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_mmp_update_interval = ext2fs_swab16(sb->s_mmp_update_interval);
+	sb->s_mmp_block = ext2fs_swab64(sb->s_mmp_block);
+	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_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_blocks = ext2fs_swab32(sb->s_overhead_blocks);
+	sb->s_checksum = ext2fs_swab32(sb->s_checksum);
+
+	for (i=0; i < 4; i++)
+		sb->s_hash_seed[i] = ext2fs_swab32(sb->s_hash_seed[i]);
+
+	/* 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]);
+}
+
+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);
+}
+
+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);
+	for (n = 0; n < 4; 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_block = ext2fs_swab32(from_entry->e_value_block);
+	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 && *(__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, has_data_blocks, extra_isize, attr_magic;
+	int has_extents = 0;
+	int islnk = 0;
+	__u32 *eaf, *eat;
+
+	if (hostorder && LINUX_S_ISLNK(f->i_mode))
+		islnk = 1;
+	t->i_mode = ext2fs_swab16(f->i_mode);
+	if (!hostorder && LINUX_S_ISLNK(t->i_mode))
+		islnk = 1;
+	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);
+	if (hostorder)
+		has_data_blocks = ext2fs_inode_data_blocks(fs,
+					   (struct ext2_inode *) f);
+	t->i_blocks = ext2fs_swab32(f->i_blocks);
+	if (!hostorder)
+		has_data_blocks = ext2fs_inode_data_blocks(fs,
+					   (struct ext2_inode *) t);
+	if (hostorder && (f->i_flags & EXT4_EXTENTS_FL))
+		has_extents = 1;
+	t->i_flags = ext2fs_swab32(f->i_flags);
+	if (!hostorder && (t->i_flags & EXT4_EXTENTS_FL))
+		has_extents = 1;
+	t->i_dir_acl = ext2fs_swab32(f->i_dir_acl);
+	/* extent data are swapped on access, not here */
+	if (!has_extents && (!islnk || has_data_blocks)) {
+		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 >= 4)
+		t->i_checksum_hi = ext2fs_swab16(f->i_checksum_hi);
+	if (extra_isize >= 8)
+		t->i_ctime_extra = ext2fs_swab32(f->i_ctime_extra);
+	if (extra_isize >= 12)
+		t->i_mtime_extra = ext2fs_swab32(f->i_mtime_extra);
+	if (extra_isize >= 16)
+		t->i_atime_extra = ext2fs_swab32(f->i_atime_extra);
+	if (extra_isize >= 20)
+		t->i_crtime = ext2fs_swab32(f->i_crtime);
+	if (extra_isize >= 24)
+		t->i_crtime_extra = ext2fs_swab32(f->i_crtime_extra);
+	if (extra_isize >= 28)
+		t->i_version_hi = ext2fs_swab32(f->i_version_hi);
+
+	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);
+}
+
+#endif
diff --git a/e2fsprogs/lib/ext2fs/symlink.c b/e2fsprogs/lib/ext2fs/symlink.c
new file mode 100644
index 0000000..4478dff
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/symlink.c
@@ -0,0 +1,150 @@
+/*
+ * 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 <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 ext2fs_symlink(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t ino,
+			 const char *name, char *target)
+{
+	ext2_extent_handle_t	handle;
+	errcode_t		retval;
+	struct ext2_inode	inode;
+	ext2_ino_t		scratch_ino;
+	blk64_t			blk;
+	int			fastlink;
+	unsigned int		target_len;
+	char			*block_buf = 0;
+
+	EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+	/* The Linux kernel doesn't allow for links longer than a block */
+	target_len = strlen(target);
+	if (target_len > fs->blocksize) {
+		retval = EXT2_ET_INVALID_ARGUMENT;
+		goto cleanup;
+	}
+
+	/*
+	 * Allocate a data block for slow links
+	 */
+	fastlink = (target_len < sizeof(inode.i_block));
+	if (!fastlink) {
+		retval = ext2fs_new_block2(fs, 0, 0, &blk);
+		if (retval)
+			goto cleanup;
+		retval = ext2fs_get_mem(fs->blocksize, &block_buf);
+		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....
+	 */
+	memset(&inode, 0, sizeof(struct ext2_inode));
+	inode.i_mode = LINUX_S_IFLNK | 0777;
+	inode.i_uid = inode.i_gid = 0;
+	ext2fs_iblk_set(fs, &inode, fastlink ? 0 : 1);
+	inode.i_links_count = 1;
+	inode.i_size = target_len;
+	/* The time fields are set by ext2fs_write_new_inode() */
+
+	if (fastlink) {
+		/* Fast symlinks, target stored in inode */
+		strcpy((char *)&inode.i_block, target);
+	} else {
+		/* Slow symlinks, target stored in the first block */
+		memset(block_buf, 0, fs->blocksize);
+		strcpy(block_buf, target);
+		if (fs->super->s_feature_incompat &
+		    EXT3_FEATURE_INCOMPAT_EXTENTS) {
+			/*
+			 * 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.
+	 */
+	retval = ext2fs_write_new_inode(fs, ino, &inode);
+	if (retval)
+		goto cleanup;
+
+	if (!fastlink) {
+		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;
+	}
+
+	/*
+	 * 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;
+	}
+
+	/*
+	 * Update accounting....
+	 */
+	if (!fastlink)
+		ext2fs_block_alloc_stats2(fs, blk, +1);
+	ext2fs_inode_alloc_stats2(fs, ino, +1, 0);
+
+cleanup:
+	if (block_buf)
+		ext2fs_free_mem(&block_buf);
+	return retval;
+}
diff --git a/e2fsprogs/lib/ext2fs/tdb.c b/e2fsprogs/lib/ext2fs/tdb.c
new file mode 100644
index 0000000..869c405
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tdb.c
@@ -0,0 +1,4139 @@
+/*
+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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#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 600
+
+#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"
+
+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;
+};
+
+
+/*
+  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);
+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 &&
+	    (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 &&
+	    (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 == 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 != 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 varient */
+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 varient */
+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 < (size_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->map_size);
+		if (ret != 0)
+			return ret;
+	}
+#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->map_ptr = NULL;
+			TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_mmap failed for size %d (%s)\n",
+				 tdb->map_size, strerror(errno)));
+		}
+	} 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 stategy 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)
+{
+	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, tdb_off_t offset,
+			      int rw_type, int lck_type, int probe, size_t len)
+{
+	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;
+		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
+   neccessary. */
+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 thats 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 initializaton, 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<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.
+	*/
+	tdb_ofs_read(tdb, TDB_SEQNUM_OFS, &seqnum);
+	seqnum++;
+	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)
+{
+	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;
+
+	tdb_ofs_read(tdb, TDB_SEQNUM_OFS, &seqnum);
+	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, enum tdb_debug_level level, const char *fmt, ...)
+{
+}
+
+
+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)
+	    || strcmp(tdb->header.magic_food, 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 loging 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;
+}
diff --git a/e2fsprogs/lib/ext2fs/tdb.h b/e2fsprogs/lib/ext2fs/tdb.h
new file mode 100644
index 0000000..732ef0e
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tdb.h
@@ -0,0 +1,213 @@
+#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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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
+
+/* 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);
+
+/* 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/e2fsprogs/lib/ext2fs/tdb/build-tdb b/e2fsprogs/lib/ext2fs/tdb/build-tdb
new file mode 100755
index 0000000..1cc18f7
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ext2fs/tdb/patches/copyright b/e2fsprogs/lib/ext2fs/tdb/patches/copyright
new file mode 100644
index 0000000..d9d1d84
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ext2fs/tdb/patches/ext2tdb-rename b/e2fsprogs/lib/ext2fs/tdb/patches/ext2tdb-rename
new file mode 100644
index 0000000..15bf085
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ext2fs/tdb/patches/replace-includes b/e2fsprogs/lib/ext2fs/tdb/patches/replace-includes
new file mode 100644
index 0000000..b1d0d57
--- /dev/null
+++ b/e2fsprogs/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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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/e2fsprogs/lib/ext2fs/tdb/patches/series b/e2fsprogs/lib/ext2fs/tdb/patches/series
new file mode 100644
index 0000000..722b921
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tdb/patches/series
@@ -0,0 +1,6 @@
+copyright
+replace-includes
+static-prototypes
+static-functions
+tdbtool-includes
+ext2tdb-rename
diff --git a/e2fsprogs/lib/ext2fs/tdb/patches/static-functions b/e2fsprogs/lib/ext2fs/tdb/patches/static-functions
new file mode 100644
index 0000000..ab0fbef
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ext2fs/tdb/patches/static-prototypes b/e2fsprogs/lib/ext2fs/tdb/patches/static-prototypes
new file mode 100644
index 0000000..cf8af61
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ext2fs/tdb/patches/tdbtool-includes b/e2fsprogs/lib/ext2fs/tdb/patches/tdbtool-includes
new file mode 100644
index 0000000..c076c79
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ext2fs/tdbtool.c b/e2fsprogs/lib/ext2fs/tdbtool.c
new file mode 100644
index 0000000..130fc58
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tdbtool.c
@@ -0,0 +1,620 @@
+/*
+   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 <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/e2fsprogs/lib/ext2fs/test_io.c b/e2fsprogs/lib/ext2fs/test_io.c
new file mode 100644
index 0000000..d79c6d5
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/test_io.c
@@ -0,0 +1,530 @@
+/*
+ * 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%
+ */
+
+#if HAVE_SECURE_GETENV
+#define _GNU_SOURCE
+#endif
+#if HAVE_SECURE_GETENV
+#define _GNU_SOURCE
+#endif
+#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);
+};
+
+static errcode_t test_open(const char *name, int flags, io_channel *channel);
+static errcode_t test_close(io_channel channel);
+static errcode_t test_set_blksize(io_channel channel, int blksize);
+static errcode_t test_read_blk(io_channel channel, unsigned long block,
+			       int count, void *data);
+static errcode_t test_write_blk(io_channel channel, unsigned long block,
+				int count, const void *data);
+static errcode_t test_read_blk64(io_channel channel, unsigned long long block,
+			       int count, void *data);
+static errcode_t test_write_blk64(io_channel channel, unsigned long long block,
+				int count, const void *data);
+static errcode_t test_flush(io_channel channel);
+static errcode_t test_write_byte(io_channel channel, unsigned long offset,
+				 int count, const void *buf);
+static errcode_t test_set_option(io_channel channel, const char *option,
+				 const char *arg);
+static errcode_t test_get_stats(io_channel channel, io_stats *stats);
+static errcode_t test_discard(io_channel channel, unsigned long long block,
+			      unsigned long long count);
+
+static struct struct_io_manager struct_test_manager = {
+	EXT2_ET_MAGIC_IO_MANAGER,
+	"Test I/O Manager",
+	test_open,
+	test_close,
+	test_set_blksize,
+	test_read_blk,
+	test_write_blk,
+	test_flush,
+	test_write_byte,
+	test_set_option,
+	test_get_stats,
+	test_read_blk64,
+	test_write_blk64,
+	test_discard,
+};
+
+io_manager test_io_manager = &struct_test_manager;
+
+/*
+ * 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
+
+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' : ' ');
+	}
+}
+
+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 ((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
+}
+
+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;
+
+	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;
+
+	*channel = io;
+	return 0;
+
+cleanup:
+	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;
+}
+
+/*
+ * 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 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;
+}
diff --git a/e2fsprogs/lib/ext2fs/tst_badblocks.c b/e2fsprogs/lib/ext2fs/tst_badblocks.c
new file mode 100644
index 0000000..717b95b
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tst_badblocks.c
@@ -0,0 +1,359 @@
+/*
+ * 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 <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 };
+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++;
+	}
+	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++;
+	}
+}
+
+int 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));
+		return 1;
+	}
+	retval = ext2fs_write_bb_FILE(bb, 0, f);
+	if (retval) {
+		com_err("file_test", retval, "while writing bad blocks");
+		return 1;
+	}
+	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");
+		return 1;
+	}
+	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++;
+	}
+	return 0;
+}
+
+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);
+
+	return test_fail;
+
+}
diff --git a/e2fsprogs/lib/ext2fs/tst_bitmaps.c b/e2fsprogs/lib/ext2fs/tst_bitmaps.c
new file mode 100644
index 0000000..d433e77
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tst_bitmaps.c
@@ -0,0 +1,652 @@
+/*
+ * 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 <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(test_fs);
+	test_fs = 0;
+}
+
+void setup_cmd(int argc, char **argv)
+{
+	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(test_fs);
+		test_fs = 0;
+	}
+
+	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)
+{
+	if (check_fs_open(argv[0]))
+		return;
+
+	ext2fs_close(test_fs);
+	test_fs = 0;
+}
+
+
+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)
+{
+	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)
+{
+	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[])
+{
+	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[])
+{
+	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[])
+{
+	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[])
+{
+	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", out);
+}
+
+
+void do_zerob(int argc, char *argv[])
+{
+	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[])
+{
+	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[])
+{
+	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[])
+{
+	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[])
+{
+	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_zeroi(int argc, char *argv[])
+{
+	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/e2fsprogs/lib/ext2fs/tst_bitmaps_cmd.ct b/e2fsprogs/lib/ext2fs/tst_bitmaps_cmd.ct
new file mode 100644
index 0000000..1e1e5d3
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tst_bitmaps_cmd.ct
@@ -0,0 +1,45 @@
+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_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_zeroi, "Clear inode bitmap",
+	clear_inode_bitmap, zeroi;
+
+end;
diff --git a/e2fsprogs/lib/ext2fs/tst_bitmaps_cmds b/e2fsprogs/lib/ext2fs/tst_bitmaps_cmds
new file mode 100644
index 0000000..31e2a60
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tst_bitmaps_cmds
@@ -0,0 +1,99 @@
+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
+clearb 13
+ffzb 12 20
+setb 13
+clearb 12 7
+testb 12 7
+setb 15
+testb 12 7
+clearb 15
+testb 12 7
+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
+cleari 4
+ffzi 2 6
+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
+quit
+
diff --git a/e2fsprogs/lib/ext2fs/tst_bitmaps_exp b/e2fsprogs/lib/ext2fs/tst_bitmaps_exp
new file mode 100644
index 0000000..2d62b66
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tst_bitmaps_exp
@@ -0,0 +1,211 @@
+tst_bitmaps 1.0.  Type '?' for a list of commands.
+
+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: clearb 13
+Clearing block 13, was set before
+tst_bitmaps: ffzb 12 20
+First unmarked block is 13
+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 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: cleari 4
+Clearing inode 4, was set before
+tst_bitmaps: ffzi 2 6
+First unmarked inode is 4
+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: quit
+tst_bitmaps: 
diff --git a/e2fsprogs/lib/ext2fs/tst_bitops.c b/e2fsprogs/lib/ext2fs/tst_bitops.c
new file mode 100644
index 0000000..b64735c
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tst_bitops.c
@@ -0,0 +1,293 @@
+/*
+ * 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 <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(1);
+	}
+
+        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 = malloc(1 << 29);
+	if (!bigarray) {
+		fprintf(stderr, "Failed to allocate scratch memory!\n");
+		exit(1);
+	}
+
+        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");
+
+	exit(0);
+}
diff --git a/e2fsprogs/lib/ext2fs/tst_byteswap.c b/e2fsprogs/lib/ext2fs/tst_byteswap.c
new file mode 100644
index 0000000..d0f2ee4
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tst_byteswap.c
@@ -0,0 +1,92 @@
+/*
+ * 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 <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/e2fsprogs/lib/ext2fs/tst_fs_struct.c b/e2fsprogs/lib/ext2fs/tst_fs_struct.c
new file mode 100644
index 0000000..6f44df1
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ext2fs/tst_getsectsize.c b/e2fsprogs/lib/ext2fs/tst_getsectsize.c
new file mode 100644
index 0000000..5591b5d
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tst_getsectsize.c
@@ -0,0 +1,53 @@
+/*
+ * 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 <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;
+
+	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);
+	exit(0);
+}
diff --git a/e2fsprogs/lib/ext2fs/tst_getsize.c b/e2fsprogs/lib/ext2fs/tst_getsize.c
new file mode 100644
index 0000000..9a578fa
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tst_getsize.c
@@ -0,0 +1,45 @@
+/*
+ * 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 <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;
+	blk_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_size(argv[1], 1024, &blocks);
+	if (retval) {
+		com_err(argv[0], retval, "while getting device size");
+		exit(1);
+	}
+	printf("%s is device has %u blocks.\n", argv[1], blocks);
+	return 0;
+}
diff --git a/e2fsprogs/lib/ext2fs/tst_inode_size.c b/e2fsprogs/lib/ext2fs/tst_inode_size.c
new file mode 100644
index 0000000..3f0ab82
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tst_inode_size.c
@@ -0,0 +1,87 @@
+/*
+ * 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 <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);
+	/* 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/e2fsprogs/lib/ext2fs/tst_iscan.c b/e2fsprogs/lib/ext2fs/tst_iscan.c
new file mode 100644
index 0000000..efeeb77
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tst_iscan.c
@@ -0,0 +1,224 @@
+/*
+ * 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 <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", 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", 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/e2fsprogs/lib/ext2fs/tst_super_size.c b/e2fsprogs/lib/ext2fs/tst_super_size.c
new file mode 100644
index 0000000..6e0ee54
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tst_super_size.c
@@ -0,0 +1,147 @@
+/*
+ * 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 <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_blocks, 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_reserved, 100 * 4);
+	check_field(s_checksum, 4);
+	do_field("Superblock end", 0, 0, cur_offset, 1024);
+#endif
+	return 0;
+}
diff --git a/e2fsprogs/lib/ext2fs/tst_types.c b/e2fsprogs/lib/ext2fs/tst_types.c
new file mode 100644
index 0000000..5274984
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/tst_types.c
@@ -0,0 +1,63 @@
+/*
+ * 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 <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/e2fsprogs/lib/ext2fs/undo_io.c b/e2fsprogs/lib/ext2fs/undo_io.c
new file mode 100644
index 0000000..df55abf
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/undo_io.c
@@ -0,0 +1,622 @@
+/*
+ * 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%
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#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 "tdb.h"
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+#ifdef __GNUC__
+#define ATTR(x) __attribute__(x)
+#else
+#define ATTR(x)
+#endif
+
+/*
+ * For checking structure magic numbers...
+ */
+
+#define EXT2_CHECK_MAGIC(struct, code) \
+	  if ((struct)->magic != (code)) return (code)
+
+struct undo_private_data {
+	int	magic;
+	TDB_CONTEXT *tdb;
+	char *tdb_file;
+
+	/* The backing io channel */
+	io_channel real;
+
+	int tdb_data_size;
+	int tdb_written;
+
+	/* to support offset in unix I/O manager */
+	ext2_loff_t offset;
+};
+
+static errcode_t undo_open(const char *name, int flags, io_channel *channel);
+static errcode_t undo_close(io_channel channel);
+static errcode_t undo_set_blksize(io_channel channel, int blksize);
+static errcode_t undo_read_blk64(io_channel channel, unsigned long long block,
+				 int count, void *data);
+static errcode_t undo_write_blk64(io_channel channel, unsigned long long block,
+				  int count, const void *data);
+static errcode_t undo_read_blk(io_channel channel, unsigned long block,
+			       int count, void *data);
+static errcode_t undo_write_blk(io_channel channel, unsigned long block,
+				int count, const void *data);
+static errcode_t undo_flush(io_channel channel);
+static errcode_t undo_write_byte(io_channel channel, unsigned long offset,
+				int size, const void *data);
+static errcode_t undo_set_option(io_channel channel, const char *option,
+				 const char *arg);
+static errcode_t undo_get_stats(io_channel channel, io_stats *stats);
+
+static struct struct_io_manager struct_undo_manager = {
+	EXT2_ET_MAGIC_IO_MANAGER,
+	"Undo I/O Manager",
+	undo_open,
+	undo_close,
+	undo_set_blksize,
+	undo_read_blk,
+	undo_write_blk,
+	undo_flush,
+	undo_write_byte,
+	undo_set_option,
+	undo_get_stats,
+	undo_read_blk64,
+	undo_write_blk64,
+};
+
+io_manager undo_io_manager = &struct_undo_manager;
+static io_manager undo_io_backing_manager ;
+static char *tdb_file;
+static int actual_size;
+
+static unsigned char mtime_key[] = "filesystem MTIME";
+static unsigned char blksize_key[] = "filesystem BLKSIZE";
+static unsigned char uuid_key[] = "filesystem UUID";
+
+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_file_system_identity(io_channel undo_channel,
+							TDB_CONTEXT *tdb)
+{
+	errcode_t retval;
+	struct ext2_super_block super;
+	TDB_DATA tdb_key, tdb_data;
+	struct undo_private_data *data;
+	io_channel channel;
+	int block_size ;
+
+	data = (struct undo_private_data *) undo_channel->private_data;
+	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;
+
+	/* Write to tdb file in the file system byte order */
+	tdb_key.dptr = mtime_key;
+	tdb_key.dsize = sizeof(mtime_key);
+	tdb_data.dptr = (unsigned char *) &(super.s_mtime);
+	tdb_data.dsize = sizeof(super.s_mtime);
+
+	retval = tdb_store(tdb, tdb_key, tdb_data, TDB_INSERT);
+	if (retval == -1) {
+		retval = EXT2_ET_TDB_SUCCESS + tdb_error(tdb);
+		goto err_out;
+	}
+
+	tdb_key.dptr = uuid_key;
+	tdb_key.dsize = sizeof(uuid_key);
+	tdb_data.dptr = (unsigned char *)&(super.s_uuid);
+	tdb_data.dsize = sizeof(super.s_uuid);
+
+	retval = tdb_store(tdb, tdb_key, tdb_data, TDB_INSERT);
+	if (retval == -1) {
+		retval = EXT2_ET_TDB_SUCCESS + tdb_error(tdb);
+	}
+
+err_out:
+	io_channel_set_blksize(channel, block_size);
+	return retval;
+}
+
+static errcode_t write_block_size(TDB_CONTEXT *tdb, int block_size)
+{
+	errcode_t retval;
+	TDB_DATA tdb_key, tdb_data;
+
+	tdb_key.dptr = blksize_key;
+	tdb_key.dsize = sizeof(blksize_key);
+	tdb_data.dptr = (unsigned char *)&(block_size);
+	tdb_data.dsize = sizeof(block_size);
+
+	retval = tdb_store(tdb, tdb_key, tdb_data, TDB_INSERT);
+	if (retval == -1) {
+		retval = EXT2_ET_TDB_SUCCESS + tdb_error(tdb);
+	}
+
+	return retval;
+}
+
+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;
+	TDB_DATA tdb_key, tdb_data;
+	unsigned char *read_ptr;
+	unsigned long long end_block;
+
+	data = (struct undo_private_data *) channel->private_data;
+
+	if (data->tdb == 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;
+	}
+	/*
+	 * 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) / data->tdb_data_size;
+
+	tdb_transaction_start(data->tdb);
+	while (block_num <= end_block ) {
+
+		tdb_key.dptr = (unsigned char *)&block_num;
+		tdb_key.dsize = sizeof(block_num);
+		/*
+		 * Check if we have the record already
+		 */
+		if (tdb_exists(data->tdb, tdb_key)) {
+			/* Try the next block */
+			block_num++;
+			continue;
+		}
+		/*
+		 * 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 recalcuate the block number with respect
+		 * to the backing I/O manager.
+		 */
+		offset = block_num * data->tdb_data_size;
+		backing_blk_num = (offset - data->offset) / channel->block_size;
+
+		count = data->tdb_data_size +
+				((offset - data->offset) % channel->block_size);
+		retval = ext2fs_get_mem(count, &read_ptr);
+		if (retval) {
+			tdb_transaction_cancel(data->tdb);
+			return retval;
+		}
+
+		memset(read_ptr, 0, count);
+		actual_size = 0;
+		if ((count % channel->block_size) == 0)
+			sz = count / channel->block_size;
+		else
+			sz = -count;
+		retval = io_channel_read_blk64(data->real, backing_blk_num,
+					     sz, read_ptr);
+		if (retval) {
+			if (retval != EXT2_ET_SHORT_READ) {
+				free(read_ptr);
+				tdb_transaction_cancel(data->tdb);
+				return retval;
+			}
+			/*
+			 * short read so update the record size
+			 * accordingly
+			 */
+			tdb_data.dsize = actual_size;
+		} else {
+			tdb_data.dsize = data->tdb_data_size;
+		}
+		tdb_data.dptr = read_ptr +
+				((offset - data->offset) % channel->block_size);
+#ifdef DEBUG
+		printf("Printing with key %lld data %x and size %d\n",
+		       block_num,
+		       tdb_data.dptr,
+		       tdb_data.dsize);
+#endif
+		if (!data->tdb_written) {
+			data->tdb_written = 1;
+			/* Write the blocksize to tdb file */
+			retval = write_block_size(data->tdb,
+						  data->tdb_data_size);
+			if (retval) {
+				tdb_transaction_cancel(data->tdb);
+				retval = EXT2_ET_TDB_ERR_IO;
+				free(read_ptr);
+				return retval;
+			}
+		}
+		retval = tdb_store(data->tdb, tdb_key, tdb_data, TDB_INSERT);
+		if (retval == -1) {
+			/*
+			 * TDB_ERR_EXISTS cannot happen because we
+			 * have already verified it doesn't exist
+			 */
+			tdb_transaction_cancel(data->tdb);
+			retval = EXT2_ET_TDB_ERR_IO;
+			free(read_ptr);
+			return retval;
+		}
+		free(read_ptr);
+		/* Next block */
+		block_num++;
+	}
+	tdb_transaction_commit(data->tdb);
+
+	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 errcode_t undo_open(const char *name, int flags, io_channel *channel)
+{
+	io_channel	io = NULL;
+	struct undo_private_data *data = NULL;
+	errcode_t	retval;
+
+	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;
+
+	if (undo_io_backing_manager) {
+		retval = undo_io_backing_manager->open(name, flags,
+						       &data->real);
+		if (retval)
+			goto cleanup;
+	} else {
+		data->real = 0;
+	}
+
+	/* setup the tdb file */
+	data->tdb = tdb_open(tdb_file, 0, TDB_CLEAR_IF_FIRST,
+			     O_RDWR | O_CREAT | O_TRUNC | O_EXCL, 0600);
+	if (!data->tdb) {
+		retval = errno;
+		goto cleanup;
+	}
+
+	/*
+	 * 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);
+
+	*channel = io;
+	return 0;
+
+cleanup:
+	if (data && data->real)
+		io_channel_close(data->real);
+	if (data)
+		ext2fs_free_mem(&data);
+	if (io)
+		ext2fs_free_mem(&io);
+	return retval;
+}
+
+static errcode_t undo_close(io_channel channel)
+{
+	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 (--channel->refcount > 0)
+		return 0;
+	/* Before closing write the file system identity */
+	retval = write_file_system_identity(channel, data->tdb);
+	if (retval)
+		return retval;
+	if (data->real)
+		retval = io_channel_close(data->real);
+	if (data->tdb)
+		tdb_close(data->tdb);
+	ext2fs_free_mem(&channel->private_data);
+	if (channel->name)
+		ext2fs_free_mem(&channel->name);
+	ext2fs_free_mem(&channel);
+
+	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 (data->real)
+		retval = io_channel_set_blksize(data->real, blksize);
+	/*
+	 * Set the block size used for tdb
+	 */
+	if (!data->tdb_data_size) {
+		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;
+}
+
+/*
+ * 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 (!data->tdb_data_size || !data->tdb_written) {
+			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;
+}
diff --git a/e2fsprogs/lib/ext2fs/unix_io.c b/e2fsprogs/lib/ext2fs/unix_io.c
new file mode 100644
index 0000000..419564f
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/unix_io.c
@@ -0,0 +1,964 @@
+/*
+ * 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%
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
+#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
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.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
+#if HAVE_LINUX_FALLOC_H
+#include <linux/falloc.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"
+
+/*
+ * 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;
+};
+
+#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;
+};
+
+#define IS_ALIGNED(n, align) ((((unsigned long) n) & \
+			       ((unsigned long) ((align)-1))) == 0)
+
+static errcode_t unix_open(const char *name, int flags, io_channel *channel);
+static errcode_t unix_close(io_channel channel);
+static errcode_t unix_set_blksize(io_channel channel, int blksize);
+static errcode_t unix_read_blk(io_channel channel, unsigned long block,
+			       int count, void *data);
+static errcode_t unix_write_blk(io_channel channel, unsigned long block,
+				int count, const void *data);
+static errcode_t unix_flush(io_channel channel);
+static errcode_t unix_write_byte(io_channel channel, unsigned long offset,
+				int size, const void *data);
+static errcode_t unix_set_option(io_channel channel, const char *option,
+				 const char *arg);
+static errcode_t unix_get_stats(io_channel channel, io_stats *stats)
+;
+static void reuse_cache(io_channel channel, struct unix_private_data *data,
+		 struct unix_cache *cache, unsigned long long block);
+static errcode_t unix_read_blk64(io_channel channel, unsigned long long block,
+			       int count, void *data);
+static errcode_t unix_write_blk64(io_channel channel, unsigned long long block,
+				int count, const void *data);
+static errcode_t unix_discard(io_channel channel, unsigned long long block,
+			      unsigned long long count);
+
+static struct struct_io_manager struct_unix_manager = {
+	EXT2_ET_MAGIC_IO_MANAGER,
+	"Unix I/O Manager",
+	unix_open,
+	unix_close,
+	unix_set_blksize,
+	unix_read_blk,
+	unix_write_blk,
+	unix_flush,
+	unix_write_byte,
+	unix_set_option,
+	unix_get_stats,
+	unix_read_blk64,
+	unix_write_blk64,
+	unix_discard,
+};
+
+io_manager unix_io_manager = &struct_unix_manager;
+
+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)
+		*stats = &data->io_stats;
+
+	return retval;
+}
+
+/*
+ * 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;
+
+	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 (ext2fs_llseek(data->dev, location, SEEK_SET) != location) {
+		retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
+		goto error_out;
+	}
+	if ((channel->align == 0) ||
+	    (IS_ALIGNED(buf, channel->align) &&
+	     IS_ALIGNED(size, channel->align))) {
+		actual = read(data->dev, buf, size);
+		if (actual != size) {
+		short_read:
+			if (actual < 0)
+				actual = 0;
+			retval = EXT2_ET_SHORT_READ;
+			goto error_out;
+		}
+		return 0;
+	}
+
+#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...
+	 */
+	while (size > 0) {
+		actual = read(data->dev, data->bounce, channel->block_size);
+		if (actual != channel->block_size)
+			goto short_read;
+		actual = size;
+		if (size > channel->block_size)
+			actual = channel->block_size;
+		memcpy(buf, data->bounce, actual);
+		size -= actual;
+		buf += actual;
+	}
+	return 0;
+
+error_out:
+	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 unix_private_data *data,
+			       unsigned long long block,
+			       int count, const void *bufv)
+{
+	ssize_t		size;
+	ext2_loff_t	location;
+	int		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 (ext2fs_llseek(data->dev, location, SEEK_SET) != location) {
+		retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
+		goto error_out;
+	}
+
+	if ((channel->align == 0) ||
+	    (IS_ALIGNED(buf, channel->align) &&
+	     IS_ALIGNED(size, channel->align))) {
+		actual = write(data->dev, buf, size);
+		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...
+	 */
+	while (size > 0) {
+		if (size < channel->block_size) {
+			actual = read(data->dev, data->bounce,
+				      channel->block_size);
+			if (actual != channel->block_size) {
+				retval = EXT2_ET_SHORT_READ;
+				goto error_out;
+			}
+		}
+		actual = size;
+		if (size > channel->block_size)
+			actual = channel->block_size;
+		memcpy(data->bounce, buf, actual);
+		actual = write(data->dev, data->bounce, channel->block_size);
+		if (actual != channel->block_size)
+			goto short_write;
+		size -= actual;
+		buf += 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 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) {
+		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 void reuse_cache(io_channel channel, struct unix_private_data *data,
+		 struct unix_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 unix_private_data *data,
+				     int invalidate)
+
+{
+	struct unix_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 */
+
+#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(const char *name, int flags, io_channel *channel)
+{
+	io_channel	io = NULL;
+	struct unix_private_data *data = NULL;
+	errcode_t	retval;
+	int		open_flags;
+	int		f_nocache = 0;
+	ext2fs_struct_stat st;
+#ifdef __linux__
+	struct 		utsname ut;
+#endif
+
+	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 unix_private_data), &data);
+	if (retval)
+		goto cleanup;
+
+	io->manager = unix_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 unix_private_data));
+	data->magic = EXT2_ET_MAGIC_UNIX_IO_CHANNEL;
+	data->io_stats.num_fields = 2;
+	data->dev = -1;
+
+	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;
+		io->align = ext2fs_get_dio_alignment(data->dev);
+	}
+#elif defined(F_NOCACHE)
+	if (flags & IO_FLAG_DIRECT_IO) {
+		f_nocache = F_NOCACHE;
+		io->align = 4096;
+	}
+#endif
+	data->flags = flags;
+
+	data->dev = ext2fs_open_file(io->name, open_flags, 0);
+	if (data->dev < 0) {
+		retval = errno;
+		goto cleanup;
+	}
+	if (f_nocache) {
+		if (fcntl(data->dev, f_nocache, 1) < 0) {
+			retval = errno;
+			goto cleanup;
+		}
+	}
+
+	/*
+	 * 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_stat(io->name, &st) == 0) {
+		if (S_ISBLK(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__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+	/*
+	 * Some operating systems require that the buffers be aligned,
+	 * regardless of O_DIRECT
+	 */
+	if (!io->align)
+		io->align = 512;
+#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_stat(io->name, &st) == 0) &&
+	    (S_ISBLK(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
+	*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 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);
+
+	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;
+
+	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) {
+#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 unix_read_blk64(io_channel channel, unsigned long long block,
+			       int count, void *buf)
+{
+	struct unix_private_data *data;
+	struct unix_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 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 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 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);
+#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);
+		}
+		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 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, 1)))
+		return retval;
+#endif
+
+	if (lseek(data->dev, offset + data->offset, SEEK_SET) < 0)
+		return errno;
+
+	actual = write(data->dev, buf, size);
+	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
+	fsync(data->dev);
+	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;
+	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;
+	}
+	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
+		__uint64_t range[2];
+
+		range[0] = (__uint64_t)(block) * channel->block_size;
+		range[1] = (__uint64_t)(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,
+				(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;
+}
diff --git a/e2fsprogs/lib/ext2fs/unlink.c b/e2fsprogs/lib/ext2fs/unlink.c
new file mode 100644
index 0000000..7ffeb9e
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/unlink.c
@@ -0,0 +1,99 @@
+/*
+ * 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 <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 ((dirent->name_len & 0xFF) != ls->namelen)
+			return 0;
+		if (strncmp(ls->name, dirent->name, dirent->name_len & 0xFF))
+			return 0;
+	}
+	if (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 EXT2FS_ATTR((unused)))
+{
+	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 = 0;
+	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/e2fsprogs/lib/ext2fs/valid_blk.c b/e2fsprogs/lib/ext2fs/valid_blk.c
new file mode 100644
index 0000000..7c3defc
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/valid_blk.c
@@ -0,0 +1,60 @@
+/*
+ * 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 <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 */
+		}
+	}
+	return 1;
+}
+
+int ext2fs_inode_has_valid_blocks(struct ext2_inode *inode)
+{
+	return ext2fs_inode_has_valid_blocks2(NULL, inode);
+}
diff --git a/e2fsprogs/lib/ext2fs/version.c b/e2fsprogs/lib/ext2fs/version.c
new file mode 100644
index 0000000..ab406fe
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/version.c
@@ -0,0 +1,56 @@
+/*
+ * 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%
+ */
+
+#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/e2fsprogs/lib/ext2fs/write_bb_file.c b/e2fsprogs/lib/ext2fs/write_bb_file.c
new file mode 100644
index 0000000..70bcf08
--- /dev/null
+++ b/e2fsprogs/lib/ext2fs/write_bb_file.c
@@ -0,0 +1,34 @@
+/*
+ * 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 <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/e2fsprogs/lib/fpopen.c b/e2fsprogs/lib/fpopen.c
new file mode 100644
index 0000000..0df25e4
--- /dev/null
+++ b/e2fsprogs/lib/fpopen.c
@@ -0,0 +1,115 @@
+/*
+ * 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 <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/e2fsprogs/lib/quota/Android.mk b/e2fsprogs/lib/quota/Android.mk
new file mode 100644
index 0000000..dcd7b7e
--- /dev/null
+++ b/e2fsprogs/lib/quota/Android.mk
@@ -0,0 +1,74 @@
+LOCAL_PATH := $(call my-dir)
+
+libext2_quota_src_files := \
+	mkquota.c \
+	quotaio.c \
+	quotaio_tree.c \
+	quotaio_v2.c \
+	../../e2fsck/dict.c
+
+libext2_quota_c_includes := external/e2fsprogs/lib
+
+libext2_quota_cflags := -O2 -g -W -Wall \
+	-DHAVE_UNISTD_H \
+	-DHAVE_ERRNO_H \
+	-DHAVE_NETINET_IN_H \
+	-DHAVE_SYS_IOCTL_H \
+	-DHAVE_SYS_MMAN_H \
+	-DHAVE_SYS_MOUNT_H \
+	-DHAVE_SYS_PRCTL_H \
+	-DHAVE_SYS_RESOURCE_H \
+	-DHAVE_SYS_SELECT_H \
+	-DHAVE_SYS_STAT_H \
+	-DHAVE_SYS_TYPES_H \
+	-DHAVE_STDLIB_H \
+	-DHAVE_STRDUP \
+	-DHAVE_MMAP \
+	-DHAVE_UTIME_H \
+	-DHAVE_GETPAGESIZE \
+	-DHAVE_LSEEK64 \
+	-DHAVE_LSEEK64_PROTOTYPE \
+	-DHAVE_EXT2_IOCTLS \
+	-DHAVE_LINUX_FD_H \
+	-DHAVE_TYPE_SSIZE_T \
+	-DHAVE_SYS_TIME_H \
+        -DHAVE_SYS_PARAM_H \
+	-DHAVE_SYSCONF \
+	-Wno-unused-parameter
+
+libext2_quota_shared_libraries := libext2fs libext2_com_err
+
+libext2_quota_static_libraries := libext2fs libext2_com_err
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_quota_src_files)
+LOCAL_C_INCLUDES := $(libext2_quota_c_includes)
+LOCAL_CFLAGS := $(libext2_quota_cflags)
+LOCAL_SYSTEM_SHARED_LIBRARIES := libc $(libext2_quota_shared_libraries)
+LOCAL_MODULE := libext2_quota
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_quota_src_files)
+LOCAL_C_INCLUDES := $(libext2_quota_c_includes)
+LOCAL_CFLAGS := $(libext2_quota_cflags)
+LOCAL_STATIC_LIBRARIES := libc $(libext2_quota_static_libraries)
+LOCAL_MODULE := libext2_quota
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_quota_src_files)
+LOCAL_C_INCLUDES := $(libext2_quota_c_includes)
+LOCAL_CFLAGS := $(libext2_quota_cflags)
+LOCAL_MODULE := libext2_quota-host
+LOCAL_MODULE_TAGS := optional
+LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(libext2_quota_shared_libraries))
+
+include $(BUILD_HOST_SHARED_LIBRARY)
diff --git a/e2fsprogs/lib/quota/Makefile.in b/e2fsprogs/lib/quota/Makefile.in
new file mode 100644
index 0000000..ec4f6c4
--- /dev/null
+++ b/e2fsprogs/lib/quota/Makefile.in
@@ -0,0 +1,162 @@
+# Makefile for the QUOTA library
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = lib/quota
+INSTALL = @INSTALL@
+
+@MCONFIG@
+
+all::
+
+SMANPAGES=
+
+
+OBJS=		mkquota.o quotaio.o quotaio_v2.o quotaio_tree.o dict.o
+
+SRCS=		$(srcdir)/mkquota.c \
+		$(srcdir)/quotaio.c \
+		$(srcdir)/quotaio_tree.c \
+		$(srcdir)/quotaio_v2.c \
+		$(srcdir)/../../e2fsck/dict.c
+
+LIBRARY= libquota
+LIBDIR= quota
+
+#ELF_VERSION = 1.0
+#ELF_SO_VERSION = 1
+#ELF_IMAGE = libquota
+#ELF_MYDIR = quota
+#ELF_INSTALL_DIR = $(root_libdir)
+#ELF_OTHER_LIBS = -lext2fs
+
+#BSDLIB_VERSION = 1.0
+#BSDLIB_IMAGE = libquota
+#BSDLIB_MYDIR = quota
+#BSDLIB_INSTALL_DIR = $(root_libdir)
+
+@MAKEFILE_LIBRARY@
+#MAKEFILE_ELF#
+#MAKEFILE_BSDLIB#
+@MAKEFILE_PROFILE@
+@MAKEFILE_CHECKER@
+
+.c.o:
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+@CHECKER_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
+#ELF_CMT#	$(Q) $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
+#BSDLIB_CMT#	$(Q) $(CC) $(ALL_CFLAGS) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
+
+all:: $(SMANPAGES) quota.pc
+
+quota.pc: $(srcdir)/quota.pc.in $(top_builddir)/config.status
+	$(E) "	CONFIG.STATUS $@"
+	$(Q) cd $(top_builddir); CONFIG_FILES=lib/quota/quota.pc ./config.status
+
+dict.o:
+	$(E) "	CC $<"
+	$(Q) $(CC) -c $(ALL_CFLAGS) $(top_srcdir)/e2fsck/dict.c -o $@
+@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/dict.o -c \
+@PROFILE_CMT@	$(top_srcdir)/e2fsck/dict.c
+@CHECKER_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c \
+@CHECKER_CMT@	$(top_srcdir)/e2fsck/dict.c
+#ELF_CMT#	$(Q) $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c \
+#ELF_CMT#	$(top_srcdir)/e2fsck/dict.c
+#BSDLIB_CMT#	$(Q) $(CC) $(ALL_CFLAGS) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c \
+#BSDLIB_CMT#	$(top_srcdir)/e2fsck/dict.c
+
+installdirs::
+	$(E) "	MKINSTALLDIRS $(libdir) $(includedir)/quota $(man3dir)"
+	$(Q) $(MKINSTALLDIRS) $(DESTDIR)$(libdir)  \
+		$(DESTDIR)$(includedir)/quota $(DESTDIR)$(man3dir) \
+		$(DESTDIR)$(libdir)/pkgconfig
+
+install:: all installdirs
+	$(E) "	INSTALL_DATA $(libdir)/libquota.a"
+	$(Q) $(INSTALL_DATA) libquota.a $(DESTDIR)$(libdir)/libquota.a
+	-$(Q) $(RANLIB) $(DESTDIR)$(libdir)/libquota.a
+	$(Q) $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libquota.a
+	$(E) "	INSTALL_DATA $(includedir)/quota/mkquota.h"
+	$(Q) $(INSTALL_DATA) $(srcdir)/mkquota.h $(DESTDIR)$(includedir)/quota/mkquota.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
+	$(E) "	INSTALL_DATA $(libdir)/pkgconfig/quota.pc"
+	$(Q) $(INSTALL_DATA) quota.pc $(DESTDIR)$(libdir)/pkgconfig/quota.pc
+
+uninstall::
+	$(RM) -f $(DESTDIR)$(libdir)/libquota.a \
+		$(DESTDIR)$(libdir)/pkgconfig/quota.pc
+	for i in $(SMANPAGES); do \
+		$(RM) -f $(DESTDIR)$(man3dir)/$$i; \
+	done
+
+clean::
+	$(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* checker/*
+	$(RM) -f ../libquota.a ../libquota_p.a $(SMANPAGES)
+
+#check:: tst_uuid
+#	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_uuid
+
+mostlyclean:: clean
+distclean:: clean
+	$(RM) -f .depend Makefile quota.pc \
+		$(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+#
+# Hack to parallel makes recognize dependencies correctly.
+#
+../../lib/libquota.a: libquota.a
+../../lib/libquota.so: image
+../../lib/libquota.dylib: image
+
+$(OBJS):
+
+# +++ Dependency line eater +++
+# 
+# Makefile dependencies follow.  This must be the last section in
+# the Makefile.in file
+#
+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/bitops.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/quotaio.h $(srcdir)/dqblk_v2.h \
+ $(srcdir)/quotaio_tree.h $(srcdir)/quotaio_v2.h $(srcdir)/mkquota.h \
+ $(top_srcdir)/lib/../e2fsck/dict.h $(srcdir)/common.h
+quotaio.o: $(srcdir)/quotaio.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h $(srcdir)/quotaio.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/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 $(srcdir)/quotaio_tree.h \
+ $(srcdir)/quotaio.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/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 $(srcdir)/quotaio_v2.h \
+ $(srcdir)/quotaio.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/bitops.h \
+ $(srcdir)/dqblk_v2.h $(srcdir)/quotaio_tree.h
+dict.o: $(srcdir)/../../e2fsck/dict.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/../../e2fsck/dict.h
diff --git a/e2fsprogs/lib/quota/common.h b/e2fsprogs/lib/quota/common.h
new file mode 100644
index 0000000..7f3f4b9
--- /dev/null
+++ b/e2fsprogs/lib/quota/common.h
@@ -0,0 +1,28 @@
+/*
+ *
+ *	Various things common for all utilities
+ *
+ */
+
+#ifndef __QUOTA_COMMON_H__
+#define __QUOTA_COMMON_H__
+
+#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(format, ...)
+#endif
+
+#endif /* __QUOTA_COMMON_H__ */
diff --git a/e2fsprogs/lib/quota/dqblk_v2.h b/e2fsprogs/lib/quota/dqblk_v2.h
new file mode 100644
index 0000000..d12512a
--- /dev/null
+++ b/e2fsprogs/lib/quota/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/e2fsprogs/lib/quota/mkquota.c b/e2fsprogs/lib/quota/mkquota.c
new file mode 100644
index 0000000..46e17b6
--- /dev/null
+++ b/e2fsprogs/lib/quota/mkquota.c
@@ -0,0 +1,560 @@
+/*
+ * mkquota.c --- create quota files for a filesystem
+ *
+ * Aditya Kali <adityakali@google.com>
+ */
+#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 "mkquota.h"
+#include "common.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;
+}
+#endif
+
+/*
+ * Returns 0 if not able to find the quota file, otherwise returns its
+ * inode number.
+ */
+int quota_file_exists(ext2_filsys fs, int qtype, int fmt)
+{
+	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, int qtype)
+{
+	ext2_ino_t *inump;
+
+	inump = (qtype == USRQUOTA) ? &fs->super->s_usr_quota_inum :
+		&fs->super->s_grp_quota_inum;
+
+	log_debug("setting quota ino in superblock: ino=%u, type=%d", ino,
+		 qtype);
+	*inump = ino;
+	ext2fs_mark_super_dirty(fs);
+}
+
+errcode_t quota_remove_inode(ext2_filsys fs, int qtype)
+{
+	ext2_ino_t qf_ino;
+
+	ext2fs_read_bitmaps(fs);
+	qf_ino = (qtype == USRQUOTA) ? fs->super->s_usr_quota_inum :
+		fs->super->s_grp_quota_inum;
+	quota_set_sb_inum(fs, 0, qtype);
+	/* Truncate the inode only if its a reserved one. */
+	if (qf_ino < EXT2_FIRST_INODE(fs->super))
+		quota_inode_truncate(fs, qf_ino);
+
+	ext2fs_mark_super_dirty(fs);
+	fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+	ext2fs_write_bitmaps(fs);
+	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) {
+			dq->dq_h = qh;
+			update_grace_times(dq);
+			qh->qh_ops->commit_dquot(dq);
+		}
+	}
+}
+
+errcode_t quota_write_inode(quota_ctx_t qctx, int qtype)
+{
+	int		retval = 0, i;
+	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_err("Unable to allocate quota handle");
+		goto out;
+	}
+
+	ext2fs_read_bitmaps(fs);
+
+	for (i = 0; i < MAXQUOTAS; i++) {
+		if ((qtype != -1) && (i != qtype))
+			continue;
+
+		dict = qctx->quota_dict[i];
+		if (!dict)
+			continue;
+
+		retval = quota_file_create(h, fs, i, fmt);
+		if (retval < 0) {
+			log_err("Cannot initialize io on quotafile");
+			continue;
+		}
+
+		write_dquots(dict, h);
+		retval = quota_file_close(h);
+		if (retval < 0) {
+			log_err("Cannot finish IO on new quotafile: %s",
+				strerror(errno));
+			if (h->qh_qf.e2_file)
+				ext2fs_file_close(h->qh_qf.e2_file);
+			quota_inode_truncate(fs, h->qh_qf.ino);
+			continue;
+		}
+
+		/* Set quota inode numbers in superblock. */
+		quota_set_sb_inum(fs, h->qh_qf.ino, i);
+		ext2fs_mark_super_dirty(fs);
+		ext2fs_mark_bb_dirty(fs);
+		fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+	}
+
+	ext2fs_write_bitmaps(fs);
+out:
+	if (h)
+		ext2fs_free_mem(&h);
+	return retval;
+}
+
+/******************************************************************/
+/* Helper functions for computing quota in memory.                */
+/******************************************************************/
+
+static int dict_uint_cmp(const void *a, const void *b)
+{
+	unsigned int	c, d;
+
+	c = VOIDPTR_TO_UINT(a);
+	d = VOIDPTR_TO_UINT(b);
+
+	return c - d;
+}
+
+static inline qid_t get_qid(struct ext2_inode *inode, int qtype)
+{
+	if (qtype == USRQUOTA)
+		return inode_uid(*inode);
+	return inode_gid(*inode);
+}
+
+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, int qtype)
+{
+	int	i, err = 0;
+	dict_t	*dict;
+	quota_ctx_t ctx;
+
+	err = ext2fs_get_mem(sizeof(struct quota_ctx), &ctx);
+	if (err) {
+		log_err("Failed to allocate quota context");
+		return err;
+	}
+
+	memset(ctx, 0, sizeof(struct quota_ctx));
+	for (i = 0; i < MAXQUOTAS; i++) {
+		if ((qtype != -1) && (i != qtype))
+			continue;
+		err = ext2fs_get_mem(sizeof(dict_t), &dict);
+		if (err) {
+			log_err("Failed to allocate dictionary");
+			quota_release_context(&ctx);
+			return err;
+		}
+		ctx->quota_dict[i] = 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)
+{
+	dict_t	*dict;
+	int	i;
+	quota_ctx_t ctx;
+
+	if (!qctx)
+		return;
+
+	ctx = *qctx;
+	for (i = 0; i < MAXQUOTAS; i++) {
+		dict = ctx->quota_dict[i];
+		ctx->quota_dict[i] = 0;
+		if (dict) {
+			dict_free_nodes(dict);
+			free(dict);
+		}
+	}
+	*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 *inode, ext2_ino_t ino,
+		    qsize_t space)
+{
+	struct dquot	*dq;
+	dict_t		*dict;
+	int		i;
+
+	if (!qctx)
+		return;
+
+	log_debug("ADD_DATA: Inode: %u, UID/GID: %u/%u, space: %ld", ino,
+			inode_uid(*inode),
+			inode_gid(*inode), space);
+	for (i = 0; i < MAXQUOTAS; i++) {
+		dict = qctx->quota_dict[i];
+		if (dict) {
+			dq = get_dq(dict, get_qid(inode, i));
+			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 *inode, ext2_ino_t ino,
+		    qsize_t space)
+{
+	struct dquot	*dq;
+	dict_t		*dict;
+	int		i;
+
+	if (!qctx)
+		return;
+
+	log_debug("SUB_DATA: Inode: %u, UID/GID: %u/%u, space: %ld", ino,
+			inode_uid(*inode),
+			inode_gid(*inode), space);
+	for (i = 0; i < MAXQUOTAS; i++) {
+		dict = qctx->quota_dict[i];
+		if (dict) {
+			dq = get_dq(dict, get_qid(inode, i));
+			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 *inode,
+		       ext2_ino_t ino, int adjust)
+{
+	struct dquot	*dq;
+	dict_t		*dict;
+	int		i;
+
+	if (!qctx)
+		return;
+
+	log_debug("ADJ_INODE: Inode: %u, UID/GID: %u/%u, adjust: %d", ino,
+			inode_uid(*inode),
+			inode_gid(*inode), adjust);
+	for (i = 0; i < MAXQUOTAS; i++) {
+		dict = qctx->quota_dict[i];
+		if (dict) {
+			dq = get_dq(dict, get_qid(inode, i));
+			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 inode;
+	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;
+	}
+
+	while (1) {
+		ret = ext2fs_get_next_inode(scan, &ino, &inode);
+		if (ret) {
+			log_err("while getting next inode. ret=%ld", ret);
+			ext2fs_close_inode_scan(scan);
+			return ret;
+		}
+		if (ino == 0)
+			break;
+		if (inode.i_links_count &&
+		    (ino == EXT2_ROOT_INO ||
+		     ino >= EXT2_FIRST_INODE(fs->super))) {
+			space = ext2fs_inode_i_blocks(fs, &inode) << 9;
+			quota_data_add(qctx, &inode, ino, space);
+			quota_data_inodes(qctx, &inode, ino, +1);
+		}
+	}
+
+	ext2fs_close_inode_scan(scan);
+
+	return 0;
+}
+
+struct scan_dquots_data {
+	dict_t		*quota_dict;
+	int             update_limits; /* update limits from disk */
+	int		update_usage;
+	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);
+	dq->dq_id = dquot->dq_id;
+	dq->dq_dqb.u.v2_mdqb.dqb_off = dquot->dq_dqb.u.v2_mdqb.dqb_off;
+
+	/* Check if there is inconsistancy. */
+	if (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 %d:"
+			"actual (%llu, %llu) != expected (%llu, %llu)\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 all dquots from quota file into memory
+ */
+static errcode_t quota_read_all_dquots(struct quota_handle *qh,
+                                       quota_ctx_t qctx, int update_limits)
+{
+	struct scan_dquots_data scan_data;
+
+	scan_data.quota_dict = qctx->quota_dict[qh->qh_type];
+	scan_data.update_limits = update_limits;
+	scan_data.update_usage = 0;
+
+	return qh->qh_ops->scan_dquots(qh, scan_dquots_callback, &scan_data);
+}
+
+/*
+ * Write all memory dquots into quota file
+ */
+#if 0 /* currently unused, but may be useful in the future? */
+static errcode_t quota_write_all_dquots(struct quota_handle *qh,
+                                        quota_ctx_t qctx)
+{
+	errcode_t err;
+
+	err = ext2fs_read_bitmaps(qctx->fs);
+	if (err)
+		return err;
+	write_dquots(qctx->quota_dict[qh->qh_type], qh);
+	ext2fs_mark_bb_dirty(qctx->fs);
+	qctx->fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+	ext2fs_write_bitmaps(qctx->fs);
+	return 0;
+}
+#endif
+
+/*
+ * Updates the in-memory quota limits from the given quota inode.
+ */
+errcode_t quota_update_limits(quota_ctx_t qctx, ext2_ino_t qf_ino, int type)
+{
+	struct quota_handle *qh;
+	errcode_t err;
+
+	if (!qctx)
+		return 0;
+
+	err = ext2fs_get_mem(sizeof(struct quota_handle), &qh);
+	if (err) {
+		log_err("Unable to allocate quota handle");
+		return err;
+	}
+
+	err = quota_file_open(qh, qctx->fs, qf_ino, type, -1, 0);
+	if (err) {
+		log_err("Open quota file failed");
+		goto out;
+	}
+
+	quota_read_all_dquots(qh, qctx, 1);
+
+	err = quota_file_close(qh);
+	if (err) {
+		log_err("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, int qtype,
+				   int *usage_inconsistent)
+{
+	ext2_filsys fs = qctx->fs;
+	struct quota_handle qh;
+	struct scan_dquots_data scan_data;
+	ext2_ino_t qf_ino;
+	errcode_t err = 0;
+
+	if (!qctx->quota_dict[qtype])
+		goto out;
+
+	qf_ino = qtype == USRQUOTA ? fs->super->s_usr_quota_inum :
+				     fs->super->s_grp_quota_inum;
+	err = quota_file_open(&qh, fs, qf_ino, qtype, -1, 0);
+	if (err) {
+		log_err("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.usage_is_inconsistent = 0;
+	err = qh.qh_ops->scan_dquots(&qh, scan_dquots_callback, &scan_data);
+	if (err) {
+		log_err("Error scanning dquots");
+		goto out;
+	}
+	*usage_inconsistent = scan_data.usage_is_inconsistent;
+
+out:
+	return err;
+}
diff --git a/e2fsprogs/lib/quota/mkquota.h b/e2fsprogs/lib/quota/mkquota.h
new file mode 100644
index 0000000..ee15071
--- /dev/null
+++ b/e2fsprogs/lib/quota/mkquota.h
@@ -0,0 +1,64 @@
+/** mkquota.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, -1);
+ *	{
+ *		quota_compute_usage(qctx, -1);
+ *		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>
+ */
+
+#ifndef __QUOTA_QUOTAIO_H__
+#define __QUOTA_QUOTAIO_H__
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "quotaio.h"
+#include "../e2fsck/dict.h"
+
+typedef struct quota_ctx *quota_ctx_t;
+
+struct quota_ctx {
+	ext2_filsys	fs;
+	dict_t		*quota_dict[MAXQUOTAS];
+};
+
+/* In mkquota.c */
+errcode_t quota_init_context(quota_ctx_t *qctx, ext2_filsys fs, int qtype);
+void quota_data_inodes(quota_ctx_t qctx, struct ext2_inode *inode, ext2_ino_t ino,
+		int adjust);
+void quota_data_add(quota_ctx_t qctx, struct ext2_inode *inode, ext2_ino_t ino,
+		qsize_t space);
+void quota_data_sub(quota_ctx_t qctx, struct ext2_inode *inode, ext2_ino_t ino,
+		qsize_t space);
+errcode_t quota_write_inode(quota_ctx_t qctx, int qtype);
+errcode_t quota_update_limits(quota_ctx_t qctx, ext2_ino_t qf_ino, int type);
+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, int qtype);
+int quota_file_exists(ext2_filsys fs, int qtype, int fmt);
+void quota_set_sb_inum(ext2_filsys fs, ext2_ino_t ino, int qtype);
+errcode_t quota_compare_and_update(quota_ctx_t qctx, int qtype,
+				   int *usage_inconsistent);
+
+#endif  /* __QUOTA_QUOTAIO_H__ */
diff --git a/e2fsprogs/lib/quota/quota.pc.in b/e2fsprogs/lib/quota/quota.pc.in
new file mode 100644
index 0000000..1e4b887
--- /dev/null
+++ b/e2fsprogs/lib/quota/quota.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: quota
+Description: Quota management library
+Version: @E2FSPROGS_VERSION@
+Requires:
+Cflags: -I${includedir}/quota -I${includedir}
+Libs: -L${libdir} -lquota
diff --git a/e2fsprogs/lib/quota/quotaio.c b/e2fsprogs/lib/quota/quotaio.c
new file mode 100644
index 0000000..b518bc8
--- /dev/null
+++ b/e2fsprogs/lib/quota/quotaio.c
@@ -0,0 +1,381 @@
+/** 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 <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 "common.h"
+#include "quotaio.h"
+
+static const char * const extensions[MAXQUOTAS] = {"user", "group"};
+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 {
+	u_int32_t dqh_magic;
+	u_int32_t dqh_version;
+} __attribute__ ((packed));
+
+/**
+ * Convert type of quota to written representation
+ */
+const char *type2name(int type)
+{
+	return extensions[type];
+}
+
+/**
+ * Creates a quota file name for given type and format.
+ */
+const char *quota_get_qf_name(int type, int fmt, char *buf)
+{
+	if (!buf)
+		return NULL;
+	snprintf(buf, QUOTA_NAME_LEN, "%s.%s",
+		 basenames[fmt], extensions[type]);
+
+	return buf;
+}
+
+const char *quota_get_qf_path(const char *mntpt, int qtype, int fmt,
+			      char *path_buf, size_t path_buf_size)
+{
+	char qf_name[QUOTA_NAME_LEN];
+
+	if (!mntpt || !path_buf || !path_buf_size)
+		return NULL;
+
+	strncpy(path_buf, mntpt, path_buf_size);
+	strncat(path_buf, "/", 1);
+	strncat(path_buf, quota_get_qf_name(qtype, fmt, qf_name),
+		path_buf_size - strlen(path_buf));
+
+	return path_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;
+	}
+}
+
+static int compute_num_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 *num_blocks = private;
+
+	*num_blocks += 1;
+	return 0;
+}
+
+errcode_t quota_inode_truncate(ext2_filsys fs, ext2_ino_t ino)
+{
+	struct ext2_inode inode;
+	errcode_t err;
+
+	if ((err = ext2fs_read_inode(fs, ino, &inode)))
+		return err;
+
+	if ((ino == EXT4_USR_QUOTA_INO) || (ino == EXT4_GRP_QUOTA_INO)) {
+		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;
+}
+
+static ext2_off64_t compute_inode_size(ext2_filsys fs, ext2_ino_t ino)
+{
+	blk64_t num_blocks = 0;
+
+	ext2fs_block_iterate3(fs, ino,
+			      BLOCK_FLAG_READ_ONLY,
+			      NULL,
+			      compute_num_blocks_proc,
+			      &num_blocks);
+	return num_blocks * fs->blocksize;
+}
+
+/* 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(struct quota_handle *h, ext2_filsys fs,
+			  ext2_ino_t qf_ino, int type, int fmt, int flags)
+{
+	ext2_file_t e2_file;
+	errcode_t err;
+
+	if (fmt == -1)
+		fmt = QFMT_VFS_V1;
+
+	err = ext2fs_read_bitmaps(fs);
+	if (err)
+		return err;
+
+	log_debug("Opening quota ino=%lu, type=%d", qf_ino, type);
+	err = ext2fs_file_open(fs, qf_ino, flags, &e2_file);
+	if (err) {
+		log_err("ext2fs_file_open failed: %s", error_message(err));
+		return err;
+	}
+	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_io_flags = 0;
+	h->qh_type = type;
+	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, type, fmt) == 0)) {
+		log_err("qh_ops->check_file failed");
+		ext2fs_file_close(e2_file);
+		return -1;
+	}
+
+	if (h->qh_ops->init_io && (h->qh_ops->init_io(h) < 0)) {
+		log_err("qh_ops->init_io failed");
+		ext2fs_file_close(e2_file);
+		return -1;
+	}
+
+	return 0;
+}
+
+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))
+		quota_inode_truncate(fs, ino);
+
+	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 (fs->super->s_feature_incompat &
+			EXT3_FEATURE_INCOMPAT_EXTENTS)
+		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, int type, int fmt)
+{
+	ext2_file_t e2_file;
+	int err;
+	unsigned long qf_inum;
+
+	if (fmt == -1)
+		fmt = QFMT_VFS_V1;
+
+	h->qh_qf.fs = fs;
+	if (type == USRQUOTA)
+		qf_inum = EXT4_USR_QUOTA_INO;
+	else if (type == GRPQUOTA)
+		qf_inum = EXT4_GRP_QUOTA_INO;
+	else
+		return -1;
+
+	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->e2fs_write = quota_write_nomount;
+	h->e2fs_read = quota_read_nomount;
+
+	log_debug("Creating quota ino=%lu, type=%d", qf_inum, type);
+	err = ext2fs_file_open(fs, qf_inum,
+			EXT2_FILE_WRITE | EXT2_FILE_CREATE, &e2_file);
+	if (err) {
+		log_err("ext2fs_file_open failed: %d", err);
+		goto out_err;
+	}
+	h->qh_qf.e2_file = e2_file;
+
+	h->qh_io_flags = 0;
+	h->qh_type = type;
+	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");
+		goto out_err1;
+	}
+
+	return 0;
+
+out_err1:
+	ext2fs_file_close(e2_file);
+out_err:
+
+	if (qf_inum)
+		quota_inode_truncate(fs, qf_inum);
+
+	return -1;
+}
+
+/*
+ * Close quotafile and release handle
+ */
+errcode_t quota_file_close(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 -1;
+		h->qh_io_flags &= ~IOFL_INFODIRTY;
+	}
+
+	if (h->qh_ops->end_io && h->qh_ops->end_io(h) < 0)
+		return -1;
+	if (h->qh_qf.e2_file) {
+		ext2fs_file_flush(h->qh_qf.e2_file);
+		ext2fs_file_set_size2(h->qh_qf.e2_file,
+			compute_inode_size(h->qh_qf.fs, h->qh_qf.ino));
+		ext2fs_file_close(h->qh_qf.e2_file);
+	}
+
+	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/e2fsprogs/lib/quota/quotaio.h b/e2fsprogs/lib/quota/quotaio.h
new file mode 100644
index 0000000..1c062f1
--- /dev/null
+++ b/e2fsprogs/lib/quota/quotaio.h
@@ -0,0 +1,165 @@
+/** quotaio.h
+ *
+ * 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/ext2fs.h"
+#include "dqblk_v2.h"
+
+typedef int64_t qsize_t;	/* Type in which we store size limitations */
+
+#define MAXQUOTAS 2
+#define USRQUOTA 0
+#define GRPQUOTA 1
+
+/*
+ * Definitions of magics and versions of current quota files
+ */
+#define INITQMAGICS {\
+	0xd9c01f11,	/* USRQUOTA */\
+	0xd9c01927	/* GRPQUOTA */\
+}
+
+/* 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 {
+	int qh_type;		/* Type of quotafile */
+	int qh_fmt;		/* Quotafile format */
+	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 */
+};
+
+/* 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(struct quota_handle *h, ext2_filsys fs,
+			  ext2_ino_t qf_ino, int 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,
+			    int type, int fmt);
+
+/* Close quotafile */
+errcode_t quota_file_close(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 *type2name(int type);
+
+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(int type, int fmt, char *buf);
+const char *quota_get_qf_path(const char *mntpt, int qtype, int fmt,
+			      char *path_buf, size_t path_buf_size);
+
+#endif /* GUARD_QUOTAIO_H */
diff --git a/e2fsprogs/lib/quota/quotaio_tree.c b/e2fsprogs/lib/quota/quotaio_tree.c
new file mode 100644
index 0000000..964494d
--- /dev/null
+++ b/e2fsprogs/lib/quota/quotaio_tree.c
@@ -0,0 +1,655 @@
+/*
+ * Implementation of new quotafile format
+ *
+ * Jan Kara <jack@suse.cz> - sponsored by SuSE CR
+ */
+
+#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)
+{
+	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, uint 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, uint 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, uint 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, uint blk)
+{
+	dqbuf_t tmpbuf = getdqbuf();
+	struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf;
+	uint 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, uint 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 uint 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,
+			  uint * treeblk, int depth)
+{
+	dqbuf_t buf;
+	int newson = 0, newact = 0;
+	u_int32_t *ref;
+	uint 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 = (u_int32_t *) 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)
+{
+	uint tmp = QT_TREEOFF;
+
+	if (do_insert_tree(h, dquot, &tmp, 0) < 0)
+		log_err("Cannot write quota (id %u): %s",
+			(uint) dquot->dq_id, strerror(errno));
+}
+
+/* Write dquot to file */
+void qtree_write_dquot(struct dquot *dquot)
+{
+	ssize_t 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);
+	ret = ext2fs_get_mem(info->dqi_entry_size, &ddquot);
+	if (ret) {
+		errno = ENOMEM;
+		log_err("Quota write failed (id %u): %s",
+			(uint)dquot->dq_id, strerror(errno));
+		return;
+	}
+
+	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",
+			(uint)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, uint 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,
+			  (uint) (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,
+			uint * blk, int depth)
+{
+	dqbuf_t buf = getdqbuf();
+	uint newblk;
+	u_int32_t *ref = (u_int32_t *) 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)
+{
+	uint 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, uint 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,
+				     uint blk, int depth)
+{
+	dqbuf_t buf = getdqbuf();
+	ext2_loff_t ret = 0;
+	u_int32_t *ref = (u_int32_t *) 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;
+	ssize_t 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;
+}
+
+/*
+ * 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, uint 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 0;
+
+	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 void check_reference(struct quota_handle *h, uint blk)
+{
+	if (blk >= h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks)
+		log_err("Illegal reference (%u >= %u) in %s quota file. "
+			"Quota file is probably corrupted.\n"
+			"Please run e2fsck (8) to fix it.",
+			blk,
+			h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks,
+			type2name(h->qh_type));
+}
+
+static int report_tree(struct dquot *dquot, uint blk, int depth, char *bitmap,
+		       int (*process_dquot) (struct dquot *, void *),
+		       void *data)
+{
+	int entries = 0, i;
+	dqbuf_t buf = getdqbuf();
+	u_int32_t *ref = (u_int32_t *) buf;
+
+	if (!buf)
+		return 0;
+
+	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]);
+			check_reference(dquot->dq_h, blk);
+			if (blk && !get_bit(bitmap, blk))
+				entries += report_block(dquot, blk, bitmap,
+							process_dquot, data);
+		}
+	} else {
+		for (i = 0; i < QT_BLKSIZE >> 2; i++) {
+			blk = ext2fs_le32_to_cpu(ref[i]);
+			if (blk) {
+				check_reference(dquot->dq_h, blk);
+				entries += report_tree(dquot, blk, depth + 1,
+						       bitmap, process_dquot,
+						       data);
+			}
+		}
+	}
+	freedqbuf(buf);
+	return entries;
+}
+
+static uint find_set_bits(char *bmp, int blocks)
+{
+	uint i, used = 0;
+
+	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)
+{
+	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;
+	}
+	v2info->dqi_used_entries = report_tree(dquot, QT_TREEOFF, 0, bitmap,
+					       process_dquot, data);
+	v2info->dqi_data_blocks = find_set_bits(bitmap, info->dqi_blocks);
+	ext2fs_free_mem(&bitmap);
+	ext2fs_free_mem(&dquot);
+	return 0;
+}
diff --git a/e2fsprogs/lib/quota/quotaio_tree.h b/e2fsprogs/lib/quota/quotaio_tree.h
new file mode 100644
index 0000000..6ee54c9
--- /dev/null
+++ b/e2fsprogs/lib/quota/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 u_int32_t 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 {
+	u_int32_t dqdh_next_free;	/* Number of next block with free
+					 * entry */
+	u_int32_t dqdh_prev_free; /* Number of previous block with free
+				   * entry */
+	u_int16_t dqdh_entries; /* Number of valid entries in block */
+	u_int16_t dqdh_pad1;
+	u_int32_t 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);
+};
+
+/* Inmemory 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/e2fsprogs/lib/quota/quotaio_v2.c b/e2fsprogs/lib/quota/quotaio_v2.c
new file mode 100644
index 0000000..de53e7d
--- /dev/null
+++ b/e2fsprogs/lib/quota/quotaio_v2.c
@@ -0,0 +1,282 @@
+/*
+ * Implementation of new quotafile format
+ *
+ * Jan Kara <jack@suse.cz> - sponsored by SuSE CR
+ */
+
+#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 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;
+
+	if (fmt != QFMT_VFS_V1)
+		return 0;
+
+	if (!v2_read_header(h, &dqh))
+		return 0;
+
+	if (ext2fs_le32_to_cpu(dqh.dqh_magic) != file_magics[type]) {
+		if (ext2fs_be32_to_cpu(dqh.dqh_magic) == file_magics[type])
+			log_err("Your quota file is stored in wrong endianity");
+		return 0;
+	}
+	if (V2_VERSION != 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_dqinfo ddqinfo;
+
+	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);
+	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);
+	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, int verbose)
+{
+	log_err("Not Implemented.");
+	return -1;
+}
diff --git a/e2fsprogs/lib/quota/quotaio_v2.h b/e2fsprogs/lib/quota/quotaio_v2.h
new file mode 100644
index 0000000..0bb4363
--- /dev/null
+++ b/e2fsprogs/lib/quota/quotaio_v2.h
@@ -0,0 +1,54 @@
+/*
+ *
+ *	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 1
+
+struct v2_disk_dqheader {
+	u_int32_t dqh_magic;	/* Magic number identifying file */
+	u_int32_t 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 {
+	u_int32_t dqi_bgrace;	/* Time before block soft limit becomes
+				 * hard limit */
+	u_int32_t dqi_igrace;	/* Time before inode soft limit becomes
+				 * hard limit */
+	u_int32_t dqi_flags;	/* Flags for quotafile (DQF_*) */
+	u_int32_t dqi_blocks;	/* Number of blocks in file */
+	u_int32_t dqi_free_blk;	/* Number of first free block in the list */
+	u_int32_t dqi_free_entry;	/* Number of block with at least one
+					 * free entry */
+} __attribute__ ((packed));
+
+struct v2r1_disk_dqblk {
+	u_int32_t dqb_id;	/* id this quota applies to */
+	u_int32_t dqb_pad;
+	u_int64_t dqb_ihardlimit;	/* absolute limit on allocated inodes */
+	u_int64_t dqb_isoftlimit;	/* preferred inode limit */
+	u_int64_t dqb_curinodes;	/* current # allocated inodes */
+	u_int64_t dqb_bhardlimit;	/* absolute limit on disk space
+					 * (in QUOTABLOCK_SIZE) */
+	u_int64_t dqb_bsoftlimit;	/* preferred limit on disk space
+					 * (in QUOTABLOCK_SIZE) */
+	u_int64_t dqb_curspace;	/* current space occupied (in bytes) */
+	u_int64_t dqb_btime;	/* time limit for excessive disk use */
+	u_int64_t dqb_itime;	/* time limit for excessive inode use */
+} __attribute__ ((packed));
+
+#endif
diff --git a/e2fsprogs/lib/ss/Makefile.in b/e2fsprogs/lib/ss/Makefile.in
new file mode 100644
index 0000000..1b23b38
--- /dev/null
+++ b/e2fsprogs/lib/ss/Makefile.in
@@ -0,0 +1,233 @@
+#
+# Makefile for lib/ss
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = lib/ss
+INSTALL = @INSTALL@
+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
+COMPILE_ET=../et/compile_et --build-tree
+MK_CMDS=_SS_DIR_OVERRIDE=. ./mk_cmds
+
+.c.o:
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $<
+	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+@CHECKER_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
+@ELF_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -DSHARED_ELF_LIB -fPIC -o elfshared/$*.o -c $<
+@BSDLIB_CMT@	$(Q) $(CC) $(ALL_CFLAGS) $(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@
+@MAKEFILE_CHECKER@
+
+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) "	MKINSTALLDIRS $(libdir) $(includedir)/ss $(datadir)/ss $(bindir)"
+	$(Q) $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
+		$(DESTDIR)$(includedir)/ss $(DESTDIR)$(datadir)/ss \
+		$(DESTDIR)$(bindir) $(DESTDIR)$(libdir)/pkgconfig
+
+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 $(libdir)/pkgconfig/ss.pc"
+	$(Q) $(INSTALL_DATA) ss.pc $(DESTDIR)$(libdir)/pkgconfig/ss.pc
+
+uninstall::
+	$(RM) -f $(DESTDIR)$(libdir)/libss.a $(DESTDIR)$(bindir)/mk_cmds \
+		$(DESTDIR)$(libdir)/pkgconfig/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) \
+		$(LIBSS) $(LIBCOM_ERR)
+
+check:: all test_ss
+	$(E) "	RUN TEST test_ss"
+	-@(LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./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
+
+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/e2fsprogs/lib/ss/ct_c.awk b/e2fsprogs/lib/ss/ct_c.awk
new file mode 100644
index 0000000..a4424c8
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ss/ct_c.sed b/e2fsprogs/lib/ss/ct_c.sed
new file mode 100644
index 0000000..8d6452b
--- /dev/null
+++ b/e2fsprogs/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 cannoicalize 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 syntatic 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/e2fsprogs/lib/ss/data.c b/e2fsprogs/lib/ss/data.c
new file mode 100644
index 0000000..8f7cda5
--- /dev/null
+++ b/e2fsprogs/lib/ss/data.c
@@ -0,0 +1,22 @@
+/*
+ * 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 <stdio.h>
+#include "ss_internal.h"
+
+static const char copyright[] =
+    "Copyright 1987, 1988, 1989 by the Massachusetts Institute of Technology";
+
+ss_data **_ss_table = (ss_data **)NULL;
+char *_ss_pager_name = (char *)NULL;
diff --git a/e2fsprogs/lib/ss/error.c b/e2fsprogs/lib/ss/error.c
new file mode 100644
index 0000000..c7ebc4a
--- /dev/null
+++ b/e2fsprogs/lib/ss/error.c
@@ -0,0 +1,74 @@
+/*
+ * 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 <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));
+	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/e2fsprogs/lib/ss/execute_cmd.c b/e2fsprogs/lib/ss/execute_cmd.c
new file mode 100644
index 0000000..02dfbfd
--- /dev/null
+++ b/e2fsprogs/lib/ss/execute_cmd.c
@@ -0,0 +1,228 @@
+/*
+ * 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.
+ */
+
+#ifdef HAS_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#else
+extern int errno;
+#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 *));
+	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/e2fsprogs/lib/ss/get_readline.c b/e2fsprogs/lib/ss/get_readline.c
new file mode 100644
index 0000000..4421052
--- /dev/null
+++ b/e2fsprogs/lib/ss/get_readline.c
@@ -0,0 +1,97 @@
+/*
+ * 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.
+ */
+
+#ifdef HAS_STDLIB_H
+#include <stdlib.h>
+#endif
+#include "ss_internal.h"
+#define	size	sizeof(ss_data *)
+#ifdef HAVE_DLOPEN
+#include <dlfcn.h>
+#endif
+
+static void ss_release_readline(ss_data *info)
+{
+#ifdef HAVE_DLOPEN
+	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.6:libreadline.so.5:libreadline.so.4:libreadline.so:libedit.so.2:libedit.so:libeditline.so.0:libeditline.so"
+
+void ss_get_readline(int sci_idx)
+{
+#ifdef HAVE_DLOPEN
+	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;
+#endif
+}
+
+
diff --git a/e2fsprogs/lib/ss/help.c b/e2fsprogs/lib/ss/help.c
new file mode 100644
index 0000000..fbc040f
--- /dev/null
+++ b/e2fsprogs/lib/ss/help.c
@@ -0,0 +1,178 @@
+/*
+ * 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.
+ */
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#else
+extern int errno;
+#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);
+	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) {
+	info->info_dirs = (char **)NULL;
+	*code_ptr = errno;
+	return;
+    }
+    info->info_dirs = dirs;
+    dirs[n_dirs + 1] = (char *)NULL;
+    dirs[n_dirs] = malloc((unsigned)strlen(info_dir)+1);
+    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/e2fsprogs/lib/ss/invocation.c b/e2fsprogs/lib/ss/invocation.c
new file mode 100644
index 0000000..57666ec
--- /dev/null
+++ b/e2fsprogs/lib/ss/invocation.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.
+ */
+
+#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)
+{
+	register int sci_idx;
+	register ss_data *new_table;
+	register ss_data **table;
+
+	*code_ptr = 0;
+	table = _ss_table;
+	new_table = (ss_data *) malloc(sizeof(ss_data));
+
+	if (table == (ss_data **) NULL) {
+		table = (ss_data **) malloc(2 * size);
+		table[0] = table[1] = (ss_data *)NULL;
+	}
+	initialize_ss_error_table ();
+
+	for (sci_idx = 1; table[sci_idx] != (ss_data *)NULL; sci_idx++)
+		;
+	table = (ss_data **) realloc((char *)table,
+				     ((unsigned)sci_idx+2)*size);
+	if (table == NULL) {
+		*code_ptr = errno;
+		return 0;
+	}
+	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 *));
+	*new_table->info_dirs = (char *)NULL;
+	new_table->info_ptr = info_ptr;
+	new_table->prompt = malloc((unsigned)strlen(subsystem_name)+4);
+	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 *));
+	*(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);
+}
+
+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/e2fsprogs/lib/ss/list_rqs.c b/e2fsprogs/lib/ss/list_rqs.c
new file mode 100644
index 0000000..220534c
--- /dev/null
+++ b/e2fsprogs/lib/ss/list_rqs.c
@@ -0,0 +1,90 @@
+/*
+ * 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 "ss_internal.h"
+#include <signal.h>
+#include <setjmp.h>
+#include <sys/wait.h>
+
+typedef void sigret_t;
+
+static char const twentyfive_spaces[26] =
+    "                         ";
+static char const NL[2] = "\n";
+
+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 spacing;
+    ss_request_table **table;
+
+    char buffer[BUFSIZ];
+    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");
+    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;
+            buffer[0] = '\0';
+            if (entry->flags & SS_OPT_DONT_LIST)
+                continue;
+            for (name = entry->command_names; *name; name++) {
+                int len = strlen(*name);
+                strncat(buffer, *name, len);
+                spacing += len + 2;
+                if (name[1]) {
+                    strcat(buffer, ", ");
+                }
+            }
+            if (spacing > 23) {
+                strcat(buffer, NL);
+                fputs(buffer, output);
+                spacing = 0;
+                buffer[0] = '\0';
+            }
+            strncat(buffer, twentyfive_spaces, 25-spacing);
+            strcat(buffer, entry->info_string);
+            strcat(buffer, NL);
+            fputs(buffer, output);
+        }
+    }
+    fclose(output);
+#ifndef NO_FORK
+    wait(&waitb);
+#endif
+    (void) signal(SIGINT, func);
+}
diff --git a/e2fsprogs/lib/ss/listen.c b/e2fsprogs/lib/ss/listen.c
new file mode 100644
index 0000000..bd7c8c0
--- /dev/null
+++ b/e2fsprogs/lib/ss/listen.c
@@ -0,0 +1,199 @@
+/*
+ * 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 "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/e2fsprogs/lib/ss/mit-sipb-copyright.h b/e2fsprogs/lib/ss/mit-sipb-copyright.h
new file mode 100644
index 0000000..ffcfc38
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ss/mk_cmds.1 b/e2fsprogs/lib/ss/mk_cmds.1
new file mode 100644
index 0000000..216e483
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ss/mk_cmds.sh.in b/e2fsprogs/lib/ss/mk_cmds.sh.in
new file mode 100644
index 0000000..572966c
--- /dev/null
+++ b/e2fsprogs/lib/ss/mk_cmds.sh.in
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+#
+
+datarootdir=@datarootdir@
+DIR="${DIR-@datadir@/ss}"
+SS_DIR="@SS_DIR@"
+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
+    DIR="$SS_DIR"
+#    echo "Falling back to $DIR..."
+    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
+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 -w "${BASE}.c"
+	exit 0
+fi
diff --git a/e2fsprogs/lib/ss/pager.c b/e2fsprogs/lib/ss/pager.c
new file mode 100644
index 0000000..bb149d6
--- /dev/null
+++ b/e2fsprogs/lib/ss/pager.c
@@ -0,0 +1,156 @@
+/*
+ * 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.
+ */
+
+#if HAVE_SECURE_GETENV
+#define _GNU_SOURCE
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#else
+extern int errno;
+#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/e2fsprogs/lib/ss/parse.c b/e2fsprogs/lib/ss/parse.c
new file mode 100644
index 0000000..54b768b
--- /dev/null
+++ b/e2fsprogs/lib/ss/parse.c
@@ -0,0 +1,149 @@
+/*
+ * 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.
+ */
+
+#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, *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++;
+		argv = NEW_ARGV (argv, argc);
+		argv[argc++] = cp;
+		argv[argc] = NULL;
+	    }
+	    else {
+		/* random-token mode */
+		parse_mode = TOKEN;
+		cp = line_ptr;
+		argv = NEW_ARGV (argv, argc);
+		if (argv == NULL) {
+			*argc_ptr = errno;
+			return 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/e2fsprogs/lib/ss/prompt.c b/e2fsprogs/lib/ss/prompt.c
new file mode 100644
index 0000000..6fe4263
--- /dev/null
+++ b/e2fsprogs/lib/ss/prompt.c
@@ -0,0 +1,30 @@
+/*
+ * 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 <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/e2fsprogs/lib/ss/request_tbl.c b/e2fsprogs/lib/ss/request_tbl.c
new file mode 100644
index 0000000..16cb421
--- /dev/null
+++ b/e2fsprogs/lib/ss/request_tbl.c
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+#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/e2fsprogs/lib/ss/requests.c b/e2fsprogs/lib/ss/requests.c
new file mode 100644
index 0000000..2e06100
--- /dev/null
+++ b/e2fsprogs/lib/ss/requests.c
@@ -0,0 +1,65 @@
+/*
+ * 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 <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/e2fsprogs/lib/ss/ss.h b/e2fsprogs/lib/ss/ss.h
new file mode 100644
index 0000000..7333ffc
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ss/ss.pc.in b/e2fsprogs/lib/ss/ss.pc.in
new file mode 100644
index 0000000..5c9eccb
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ss/ss_err.et b/e2fsprogs/lib/ss/ss_err.et
new file mode 100644
index 0000000..80e9dfa
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ss/ss_internal.h b/e2fsprogs/lib/ss/ss_internal.h
new file mode 100644
index 0000000..19a6be7
--- /dev/null
+++ b/e2fsprogs/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);
+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/e2fsprogs/lib/ss/std_rqs.ct b/e2fsprogs/lib/ss/std_rqs.ct
new file mode 100644
index 0000000..500288a
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ss/test_cmd.ct b/e2fsprogs/lib/ss/test_cmd.ct
new file mode 100644
index 0000000..fb49f78
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ss/test_script b/e2fsprogs/lib/ss/test_script
new file mode 100644
index 0000000..8af7fdc
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ss/test_script_expected b/e2fsprogs/lib/ss/test_script_expected
new file mode 100644
index 0000000..543f828
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/ss/test_ss.c b/e2fsprogs/lib/ss/test_ss.c
new file mode 100644
index 0000000..41d84ea
--- /dev/null
+++ b/e2fsprogs/lib/ss/test_ss.c
@@ -0,0 +1,150 @@
+/*
+ * 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 <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/e2fsprogs/lib/uuid/Android.mk b/e2fsprogs/lib/uuid/Android.mk
new file mode 100644
index 0000000..8332660
--- /dev/null
+++ b/e2fsprogs/lib/uuid/Android.mk
@@ -0,0 +1,95 @@
+LOCAL_PATH := $(call my-dir)
+
+libext2_uuid_src_files := \
+	clear.c \
+	compare.c \
+	copy.c \
+	gen_uuid.c \
+	isnull.c \
+	pack.c \
+	parse.c \
+	unpack.c \
+	unparse.c \
+	uuid_time.c
+
+
+libext2_uuid_c_includes := external/e2fsprogs/lib
+
+libext2_uuid_cflags := -O2 -g -W -Wall \
+	-DHAVE_INTTYPES_H \
+	-DHAVE_UNISTD_H \
+	-DHAVE_ERRNO_H \
+	-DHAVE_NETINET_IN_H \
+	-DHAVE_SYS_IOCTL_H \
+	-DHAVE_SYS_MMAN_H \
+	-DHAVE_SYS_MOUNT_H \
+	-DHAVE_SYS_PRCTL_H \
+	-DHAVE_SYS_RESOURCE_H \
+	-DHAVE_SYS_SELECT_H \
+	-DHAVE_SYS_STAT_H \
+	-DHAVE_SYS_TYPES_H \
+	-DHAVE_STDLIB_H \
+	-DHAVE_STRDUP \
+	-DHAVE_MMAP \
+	-DHAVE_UTIME_H \
+	-DHAVE_GETPAGESIZE \
+	-DHAVE_LSEEK64 \
+	-DHAVE_LSEEK64_PROTOTYPE \
+	-DHAVE_EXT2_IOCTLS \
+	-DHAVE_LINUX_FD_H \
+	-DHAVE_TYPE_SSIZE_T \
+	-DHAVE_SYS_TIME_H \
+        -DHAVE_SYS_PARAM_H \
+	-DHAVE_SYSCONF \
+	-Wno-unused-function \
+	-Wno-unused-parameter
+
+libext2_uuid_system_shared_libraries := libc
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_uuid_src_files)
+LOCAL_C_INCLUDES := $(libext2_uuid_c_includes)
+LOCAL_CFLAGS := $(libext2_uuid_cflags)
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) $(LOCAL_PATH)/..
+LOCAL_SYSTEM_SHARED_LIBRARIES := $(libext2_uuid_system_shared_libraries)
+LOCAL_MODULE := libext2_uuid
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_uuid_src_files)
+LOCAL_C_INCLUDES := $(libext2_uuid_c_includes)
+LOCAL_CFLAGS := $(libext2_uuid_cflags)
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
+LOCAL_MODULE := libext2_uuid-host
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_SHARED_LIBRARY)
+
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_uuid_src_files)
+LOCAL_C_INCLUDES := $(libext2_uuid_c_includes)
+LOCAL_CFLAGS := $(libext2_uuid_cflags)
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
+LOCAL_STATIC_LIBRARIES := libc
+LOCAL_MODULE := libext2_uuid_static
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_STATIC_LIBRARY)
+
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_uuid_src_files)
+LOCAL_C_INCLUDES := $(libext2_uuid_c_includes)
+LOCAL_CFLAGS := $(libext2_uuid_cflags)
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
+LOCAL_MODULE := libext2_uuid-host
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/e2fsprogs/lib/uuid/COPYING b/e2fsprogs/lib/uuid/COPYING
new file mode 100644
index 0000000..2f17068
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/uuid/Makefile.in b/e2fsprogs/lib/uuid/Makefile.in
new file mode 100644
index 0000000..14d08c1
--- /dev/null
+++ b/e2fsprogs/lib/uuid/Makefile.in
@@ -0,0 +1,215 @@
+# Makefile for the UUID library
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = lib/uuid
+INSTALL = @INSTALL@
+
+@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@
+@MAKEFILE_CHECKER@
+
+.c.o:
+	$(E) "	CC $<"
+	$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+@CHECKER_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
+@ELF_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
+@BSDLIB_CMT@	$(Q) $(CC) $(ALL_CFLAGS) $(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) "	MKINSTALLDIRS $(libdir) $(includedir)/uuid $(man3dir)"
+	$(Q) $(MKINSTALLDIRS) $(DESTDIR)$(libdir)  \
+		$(DESTDIR)$(includedir)/uuid $(DESTDIR)$(man3dir) \
+		$(DESTDIR)$(libdir)/pkgconfig
+
+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 $(libdir)/pkgconfig/uuid.pc"
+	$(Q) $(INSTALL_DATA) uuid.pc $(DESTDIR)$(libdir)/pkgconfig/uuid.pc
+
+uninstall::
+	$(RM) -f $(DESTDIR)$(libdir)/libuuid.a \
+		$(DESTDIR)$(libdir)/pkgconfig/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/* checker/* uuid.h
+	$(RM) -f ../libuuid.a ../libuuid_p.a tst_uuid uuid_time $(SMANPAGES)
+
+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/e2fsprogs/lib/uuid/clear.c b/e2fsprogs/lib/uuid/clear.c
new file mode 100644
index 0000000..2d91fee
--- /dev/null
+++ b/e2fsprogs/lib/uuid/clear.c
@@ -0,0 +1,43 @@
+/*
+ * 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 "string.h"
+
+#include "uuidP.h"
+
+void uuid_clear(uuid_t uu)
+{
+	memset(uu, 0, 16);
+}
+
diff --git a/e2fsprogs/lib/uuid/compare.c b/e2fsprogs/lib/uuid/compare.c
new file mode 100644
index 0000000..f28a726
--- /dev/null
+++ b/e2fsprogs/lib/uuid/compare.c
@@ -0,0 +1,55 @@
+/*
+ * 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 "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/e2fsprogs/lib/uuid/configure.in b/e2fsprogs/lib/uuid/configure.in
new file mode 100644
index 0000000..bf9509f
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/uuid/copy.c b/e2fsprogs/lib/uuid/copy.c
new file mode 100644
index 0000000..ead33aa
--- /dev/null
+++ b/e2fsprogs/lib/uuid/copy.c
@@ -0,0 +1,45 @@
+/*
+ * 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 "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/e2fsprogs/lib/uuid/gen_uuid.c b/e2fsprogs/lib/uuid/gen_uuid.c
new file mode 100644
index 0000000..ddc14d7
--- /dev/null
+++ b/e2fsprogs/lib/uuid/gen_uuid.c
@@ -0,0 +1,673 @@
+/*
+ * 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
+
+
+#ifdef _WIN32
+#define _WIN32_WINNT 0x0500
+#include <windows.h>
+#define UUID MYUUID
+#endif
+#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
+#include <sys/wait.h>
+#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_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
+
+#ifdef _WIN32
+static void gettimeofday (struct timeval *tv, void *dummy)
+{
+	FILETIME	ftime;
+	uint64_t	n;
+
+	GetSystemTimeAsFileTime (&ftime);
+	n = (((uint64_t) ftime.dwHighDateTime << 32)
+	     + (uint64_t) ftime.dwLowDateTime);
+	if (n) {
+		n /= 10;
+		n -= ((369 * 365 + 89) * (uint64_t) 86400) * 1000000;
+	}
+
+	tv->tv_sec = n / 1000000;
+	tv->tv_usec = n % 1000000;
+}
+
+static int getuid (void)
+{
+	return 1;
+}
+#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((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 = get_random_fd();
+	int lose_counter = 0;
+	unsigned char *cp = buf;
+
+	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;
+	struct flock			fl;
+	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);
+		state_f = fdopen(state_fd, "r+");
+		if (!state_f) {
+			close(state_fd);
+			state_fd = -1;
+		}
+	}
+	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);
+			close(state_fd);
+			state_fd = -1;
+			break;
+		}
+	}
+	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, last.tv_sec, (long)last.tv_usec,
+			      adjustment);
+		fflush(state_f);
+		if (ftruncate(state_fd, len) < 0) {
+			fprintf(state_f, "                   \n");
+			fflush(state_f);
+		}
+		rewind(state_f);
+		fl.l_type = F_UNLCK;
+		fcntl(state_fd, F_SETLK, &fl);
+	}
+
+	*clock_high = clock_reg >> 32;
+	*clock_low = clock_reg;
+	*ret_clock_seq = clock_seq;
+	return 0;
+}
+
+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);
+	}
+}
+
+
+/*
+ * 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;
+}
+
+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/e2fsprogs/lib/uuid/gen_uuid_nt.c b/e2fsprogs/lib/uuid/gen_uuid_nt.c
new file mode 100644
index 0000000..aa44bfd
--- /dev/null
+++ b/e2fsprogs/lib/uuid/gen_uuid_nt.c
@@ -0,0 +1,92 @@
+/*
+ * gen_uuid_nt.c -- Use NT api to generate uuid
+ *
+ * Written by Andrey Shedel (andreys@ns.cr.cyco.com)
+ */
+
+
+#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 dangerouse 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/e2fsprogs/lib/uuid/isnull.c b/e2fsprogs/lib/uuid/isnull.c
new file mode 100644
index 0000000..931e7e7
--- /dev/null
+++ b/e2fsprogs/lib/uuid/isnull.c
@@ -0,0 +1,48 @@
+/*
+ * 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 "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/e2fsprogs/lib/uuid/pack.c b/e2fsprogs/lib/uuid/pack.c
new file mode 100644
index 0000000..097516d
--- /dev/null
+++ b/e2fsprogs/lib/uuid/pack.c
@@ -0,0 +1,69 @@
+/*
+ * 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 <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/e2fsprogs/lib/uuid/parse.c b/e2fsprogs/lib/uuid/parse.c
new file mode 100644
index 0000000..074383e
--- /dev/null
+++ b/e2fsprogs/lib/uuid/parse.c
@@ -0,0 +1,79 @@
+/*
+ * 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 <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/e2fsprogs/lib/uuid/tst_uuid.c b/e2fsprogs/lib/uuid/tst_uuid.c
new file mode 100644
index 0000000..8c1b655
--- /dev/null
+++ b/e2fsprogs/lib/uuid/tst_uuid.c
@@ -0,0 +1,195 @@
+/*
+ * 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%
+ */
+
+
+#ifdef _WIN32
+#define _WIN32_WINNT 0x0500
+#include <windows.h>
+#define UUID MYUUID
+#endif
+
+#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",
+	       time_gen, time_reg, 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");
+	}
+
+	uuid_parse(str, tst);
+	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/e2fsprogs/lib/uuid/unpack.c b/e2fsprogs/lib/uuid/unpack.c
new file mode 100644
index 0000000..beaaff3
--- /dev/null
+++ b/e2fsprogs/lib/uuid/unpack.c
@@ -0,0 +1,63 @@
+/*
+ * 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 <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/e2fsprogs/lib/uuid/unparse.c b/e2fsprogs/lib/uuid/unparse.c
new file mode 100644
index 0000000..a95bbb0
--- /dev/null
+++ b/e2fsprogs/lib/uuid/unparse.c
@@ -0,0 +1,76 @@
+/*
+ * 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 <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/e2fsprogs/lib/uuid/uuid.3.in b/e2fsprogs/lib/uuid/uuid.3.in
new file mode 100644
index 0000000..18760fe
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/uuid/uuid.h b/e2fsprogs/lib/uuid/uuid.h
new file mode 100644
index 0000000..ca846da
--- /dev/null
+++ b/e2fsprogs/lib/uuid/uuid.h
@@ -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/e2fsprogs/lib/uuid/uuid.h.in b/e2fsprogs/lib/uuid/uuid.h.in
new file mode 100644
index 0000000..ca846da
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/uuid/uuid.pc.in b/e2fsprogs/lib/uuid/uuid.pc.in
new file mode 100644
index 0000000..eaa4e4d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/uuid/uuidP.h b/e2fsprogs/lib/uuid/uuidP.h
new file mode 100644
index 0000000..e897bbb
--- /dev/null
+++ b/e2fsprogs/lib/uuid/uuidP.h
@@ -0,0 +1,63 @@
+/*
+ * 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];
+};
+
+
+/*
+ * prototypes
+ */
+void uuid_pack(const struct uuid *uu, uuid_t ptr);
+void uuid_unpack(const uuid_t in, struct uuid *uu);
diff --git a/e2fsprogs/lib/uuid/uuid_clear.3.in b/e2fsprogs/lib/uuid/uuid_clear.3.in
new file mode 100644
index 0000000..92d2bf2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/uuid/uuid_compare.3.in b/e2fsprogs/lib/uuid/uuid_compare.3.in
new file mode 100644
index 0000000..7f32963
--- /dev/null
+++ b/e2fsprogs/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 lexigraphically 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/e2fsprogs/lib/uuid/uuid_copy.3.in b/e2fsprogs/lib/uuid/uuid_copy.3.in
new file mode 100644
index 0000000..5f5e8c6
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/uuid/uuid_generate.3.in b/e2fsprogs/lib/uuid/uuid_generate.3.in
new file mode 100644
index 0000000..998e042
--- /dev/null
+++ b/e2fsprogs/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 subsituted.  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 elemntary 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/e2fsprogs/lib/uuid/uuid_is_null.3.in b/e2fsprogs/lib/uuid/uuid_is_null.3.in
new file mode 100644
index 0000000..e14288d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/uuid/uuid_parse.3.in b/e2fsprogs/lib/uuid/uuid_parse.3.in
new file mode 100644
index 0000000..f85acfa
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/uuid/uuid_time.3.in b/e2fsprogs/lib/uuid/uuid_time.3.in
new file mode 100644
index 0000000..2a4c700
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/uuid/uuid_time.c b/e2fsprogs/lib/uuid/uuid_time.c
new file mode 100644
index 0000000..849427f
--- /dev/null
+++ b/e2fsprogs/lib/uuid/uuid_time.c
@@ -0,0 +1,171 @@
+/*
+ * 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%
+ */
+
+#ifdef _WIN32
+#define _WIN32_WINNT 0x0500
+#include <windows.h>
+#define UUID MYUUID
+#endif
+
+#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", tv.tv_sec, (long)tv.tv_usec,
+	       ctime(&time_reg));
+
+	return 0;
+}
+#endif
diff --git a/e2fsprogs/lib/uuid/uuid_types.h b/e2fsprogs/lib/uuid/uuid_types.h
new file mode 100644
index 0000000..169a88a
--- /dev/null
+++ b/e2fsprogs/lib/uuid/uuid_types.h
@@ -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 (4 == 8)
+typedef int		int64_t;
+typedef unsigned int	uint64_t;
+#elif (4 == 8)
+typedef long		int64_t;
+typedef unsigned long	uint64_t;
+#elif (8 == 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 (4 == 2)
+typedef	int		int16_t;
+typedef	unsigned int	uint16_t;
+#elif (2 == 2)
+typedef	short		int16_t;
+typedef	unsigned short	uint16_t;
+#else
+  ?==error: undefined 16 bit type
+#endif
+
+#if (4 == 4)
+typedef	int		int32_t;
+typedef	unsigned int	uint32_t;
+#elif (4 == 4)
+typedef	long		int32_t;
+typedef	unsigned long	uint32_t;
+#elif (2 == 4)
+typedef	short		int32_t;
+typedef	unsigned short	uint32_t;
+#else
+ ?== error: undefined 32 bit type
+#endif
+
+#endif
diff --git a/e2fsprogs/lib/uuid/uuid_types.h.in b/e2fsprogs/lib/uuid/uuid_types.h.in
new file mode 100644
index 0000000..f21ff4e
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/uuid/uuid_unparse.3.in b/e2fsprogs/lib/uuid/uuid_unparse.3.in
new file mode 100644
index 0000000..0e83845
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/lib/uuid/uuidd.h b/e2fsprogs/lib/uuid/uuidd.h
new file mode 100644
index 0000000..c71f4b7
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/misc/Android.mk b/e2fsprogs/misc/Android.mk
new file mode 100644
index 0000000..79ba61d
--- /dev/null
+++ b/e2fsprogs/misc/Android.mk
@@ -0,0 +1,457 @@
+LOCAL_PATH := $(call my-dir)
+
+#########################################################################
+# Build mke2fs
+mke2fs_src_files := \
+	mke2fs.c \
+	util.c \
+	default_profile.c
+
+mke2fs_c_includes := \
+	external/e2fsprogs/e2fsck
+
+mke2fs_cflags := -O2 -g -W -Wall \
+	-DHAVE_UNISTD_H \
+	-DHAVE_ERRNO_H \
+	-DHAVE_NETINET_IN_H \
+	-DHAVE_SYS_IOCTL_H \
+	-DHAVE_SYS_MMAN_H \
+	-DHAVE_SYS_MOUNT_H \
+	-DHAVE_SYS_RESOURCE_H \
+	-DHAVE_SYS_SELECT_H \
+	-DHAVE_SYS_STAT_H \
+	-DHAVE_SYS_TYPES_H \
+	-DHAVE_STDLIB_H \
+	-DHAVE_STRCASECMP \
+	-DHAVE_STRDUP \
+	-DHAVE_MMAP \
+	-DHAVE_UTIME_H \
+	-DHAVE_GETPAGESIZE \
+	-DHAVE_EXT2_IOCTLS \
+	-DHAVE_TYPE_SSIZE_T \
+	-DHAVE_GETOPT_H \
+	-DHAVE_SYS_TIME_H \
+	-DHAVE_SYS_PARAM_H \
+	-DHAVE_SYSCONF
+
+mke2fs_cflags_linux := \
+	-DHAVE_LINUX_FD_H \
+	-DHAVE_SYS_PRCTL_H \
+	-DHAVE_LSEEK64 \
+	-DHAVE_LSEEK64_PROTOTYPE
+
+mke2fs_cflags += -DNO_CHECK_BB
+
+mke2fs_shared_libraries := \
+	libext2fs \
+	libext2_blkid \
+	libext2_uuid \
+	libext2_profile \
+	libext2_quota \
+	libext2_com_err \
+	libext2_e2p
+
+mke2fs_system_shared_libraries := libc
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(mke2fs_src_files)
+LOCAL_C_INCLUDES := $(mke2fs_c_includes)
+LOCAL_CFLAGS := $(mke2fs_cflags) $(mke2fs_cflags_linux)
+LOCAL_SYSTEM_SHARED_LIBRARIES := $(mke2fs_system_shared_libraries)
+LOCAL_SHARED_LIBRARIES := $(mke2fs_shared_libraries)
+LOCAL_MODULE := mke2fs
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(mke2fs_src_files)
+LOCAL_C_INCLUDES := $(mke2fs_c_includes)
+ifeq ($(HOST_OS),linux)
+LOCAL_CFLAGS := $(mke2fs_cflags) $(mke2fs_cflags_linux)
+else
+LOCAL_CFLAGS := $(mke2fs_cflags)
+endif
+LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(mke2fs_shared_libraries))
+LOCAL_MODULE := mke2fs_host
+LOCAL_MODULE_STEM := mke2fs
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_EXECUTABLE)
+
+###########################################################################
+# Build tune2fs
+#
+tune2fs_src_files := \
+	tune2fs.c \
+	util.c
+
+tune2fs_c_includes := \
+	external/e2fsprogs/e2fsck
+
+tune2fs_cflags := -O2 -g -W -Wall \
+	-DHAVE_UNISTD_H \
+	-DHAVE_ERRNO_H \
+	-DHAVE_NETINET_IN_H \
+	-DHAVE_SYS_IOCTL_H \
+	-DHAVE_SYS_MMAN_H \
+	-DHAVE_SYS_MOUNT_H \
+	-DHAVE_SYS_PRCTL_H \
+	-DHAVE_SYS_RESOURCE_H \
+	-DHAVE_SYS_SELECT_H \
+	-DHAVE_SYS_STAT_H \
+	-DHAVE_SYS_TYPES_H \
+	-DHAVE_STDLIB_H \
+	-DHAVE_STRCASECMP \
+	-DHAVE_STRDUP \
+	-DHAVE_MMAP \
+	-DHAVE_UTIME_H \
+	-DHAVE_GETPAGESIZE \
+	-DHAVE_LSEEK64 \
+	-DHAVE_LSEEK64_PROTOTYPE \
+	-DHAVE_EXT2_IOCTLS \
+	-DHAVE_LINUX_FD_H \
+	-DHAVE_TYPE_SSIZE_T \
+	-DHAVE_GETOPT_H \
+	-DHAVE_SYS_TIME_H \
+	-DHAVE_SYS_PARAM_H \
+	-DHAVE_SYSCONF
+
+tune2fs_cflags += -DNO_CHECK_BB
+
+tune2fs_shared_libraries := \
+	libext2fs \
+	libext2_com_err \
+	libext2_blkid \
+	libext2_quota \
+	libext2_uuid \
+	libext2_e2p
+
+tune2fs_system_shared_libraries := libc
+
+
+tune2fs_static_libraries := \
+	libext2_com_err \
+	libext2_blkid \
+	libext2_quota \
+	libext2_uuid_static \
+	libext2_e2p \
+	libext2fs
+
+tune2fs_system_static_libraries := libc
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(tune2fs_src_files)
+LOCAL_C_INCLUDES := $(tune2fs_c_includes)
+LOCAL_CFLAGS := $(tune2fs_cflags)
+LOCAL_SHARED_LIBRARIES := $(tune2fs_shared_libraries)
+LOCAL_SYSTEM_SHARED_LIBRARIES := $(tune2fs_system_shared_libraries)
+LOCAL_MODULE := tune2fs
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(tune2fs_src_files)
+LOCAL_C_INCLUDES := $(tune2fs_c_includes)
+LOCAL_CFLAGS := $(tune2fs_cflags)
+LOCAL_STATIC_LIBRARIES := $(tune2fs_static_libraries) $(tune2fs_system_static_libraries)
+LOCAL_FORCE_STATIC_EXECUTABLE := true
+LOCAL_MODULE := tune2fs_static
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(tune2fs_src_files)
+LOCAL_C_INCLUDES := $(tune2fs_c_includes)
+LOCAL_CFLAGS := $(tune2fs_cflags) -DBUILD_AS_LIB
+LOCAL_STATIC_LIBRARIES := $(tune2fs_static_libraries) $(tune2fs_system_static_libraries)
+LOCAL_MODULE := libtune2fs
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(tune2fs_src_files)
+LOCAL_C_INCLUDES := $(tune2fs_c_includes)
+LOCAL_CFLAGS := $(tune2fs_cflags)
+LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(tune2fs_shared_libraries))
+LOCAL_MODULE := tune2fs_host
+LOCAL_MODULE_STEM := tune2fs
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_EXECUTABLE)
+
+#########################################################################
+# Build badblocks
+#
+include $(CLEAR_VARS)
+
+badblocks_src_files := \
+	badblocks.c
+
+badblocks_c_includes :=
+
+badblocks_cflags := -O2 -g -W -Wall \
+	-DHAVE_UNISTD_H \
+	-DHAVE_ERRNO_H \
+	-DHAVE_NETINET_IN_H \
+	-DHAVE_SYS_IOCTL_H \
+	-DHAVE_SYS_MMAN_H \
+	-DHAVE_SYS_MOUNT_H \
+	-DHAVE_SYS_PRCTL_H \
+	-DHAVE_SYS_RESOURCE_H \
+	-DHAVE_SYS_SELECT_H \
+	-DHAVE_SYS_STAT_H \
+	-DHAVE_SYS_TYPES_H \
+	-DHAVE_STDLIB_H \
+	-DHAVE_STRCASECMP \
+	-DHAVE_STRDUP \
+	-DHAVE_MMAP \
+	-DHAVE_UTIME_H \
+	-DHAVE_GETPAGESIZE \
+	-DHAVE_LSEEK64 \
+	-DHAVE_LSEEK64_PROTOTYPE \
+	-DHAVE_EXT2_IOCTLS \
+	-DHAVE_LINUX_FD_H \
+	-DHAVE_TYPE_SSIZE_T \
+	-DHAVE_GETOPT_H \
+	-DHAVE_SYS_TIME_H \
+	-DHAVE_SYS_PARAM_H \
+	-DHAVE_SYSCONF
+
+badblocks_shared_libraries := \
+	libext2fs \
+	libext2_com_err \
+	libext2_uuid \
+	libext2_blkid \
+	libext2_e2p
+
+badblocks_system_shared_libraries := libc
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(badblocks_src_files)
+LOCAL_C_INCLUDES := $(badblocks_c_includes)
+LOCAL_CFLAGS := $(badblocks_cflags)
+LOCAL_SHARED_LIBRARIES := $(badblocks_shared_libraries)
+LOCAL_SYSTEM_SHARED_LIBRARIES := $(badblocks_system_shared_libraries)
+LOCAL_MODULE := badblocks
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(badblocks_src_files)
+LOCAL_C_INCLUDES := $(badblocks_c_includes)
+LOCAL_CFLAGS := $(badblocks_cflags)
+LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(badblocks_shared_libraries))
+LOCAL_MODULE := badblocks_host
+LOCAL_MODULE_STEM := badblocks
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_EXECUTABLE)
+
+#########################################################################
+# Build chattr
+#
+include $(CLEAR_VARS)
+
+chattr_src_files := \
+	chattr.c
+
+chattr_c_includes := \
+	external/e2fsprogs/lib
+
+chattr_cflags := -O2 -g -W -Wall \
+	-DHAVE_UNISTD_H \
+	-DHAVE_ERRNO_H \
+	-DHAVE_NETINET_IN_H \
+	-DHAVE_SYS_IOCTL_H \
+	-DHAVE_SYS_MMAN_H \
+	-DHAVE_SYS_MOUNT_H \
+	-DHAVE_SYS_PRCTL_H \
+	-DHAVE_SYS_RESOURCE_H \
+	-DHAVE_SYS_SELECT_H \
+	-DHAVE_SYS_STAT_H \
+	-DHAVE_SYS_TYPES_H \
+	-DHAVE_STDLIB_H \
+	-DHAVE_STRCASECMP \
+	-DHAVE_STRDUP \
+	-DHAVE_MMAP \
+	-DHAVE_UTIME_H \
+	-DHAVE_GETPAGESIZE \
+	-DHAVE_LSEEK64 \
+	-DHAVE_LSEEK64_PROTOTYPE \
+	-DHAVE_EXT2_IOCTLS \
+	-DHAVE_LINUX_FD_H \
+	-DHAVE_TYPE_SSIZE_T \
+	-DHAVE_GETOPT_H \
+	-DHAVE_SYS_TIME_H \
+	-DHAVE_SYS_PARAM_H \
+	-DHAVE_SYSCONF
+
+chattr_shared_libraries := \
+	libext2_com_err \
+	libext2_e2p
+
+chattr_system_shared_libraries := libc
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(chattr_src_files)
+LOCAL_C_INCLUDES := $(chattr_c_includes)
+LOCAL_CFLAGS := $(chattr_cflags)
+LOCAL_SHARED_LIBRARIES := $(chattr_shared_libraries)
+LOCAL_SYSTEM_SHARED_LIBRARIES := $(chattr_system_shared_libraries)
+LOCAL_MODULE := chattr
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(chattr_src_files)
+LOCAL_C_INCLUDES := $(chattr_c_includes)
+LOCAL_CFLAGS := $(chattr_cflags)
+LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(chattr_shared_libraries))
+LOCAL_MODULE := chattr_host
+LOCAL_MODULE_STEM := chattr
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_EXECUTABLE)
+
+#########################################################################
+# Build lsattr
+#
+include $(CLEAR_VARS)
+
+lsattr_src_files := \
+	lsattr.c
+
+lsattr_c_includes := \
+	external/e2fsprogs/lib
+
+lsattr_cflags := -O2 -g -W -Wall \
+	-DHAVE_UNISTD_H \
+	-DHAVE_ERRNO_H \
+	-DHAVE_NETINET_IN_H \
+	-DHAVE_SYS_IOCTL_H \
+	-DHAVE_SYS_MMAN_H \
+	-DHAVE_SYS_MOUNT_H \
+	-DHAVE_SYS_PRCTL_H \
+	-DHAVE_SYS_RESOURCE_H \
+	-DHAVE_SYS_SELECT_H \
+	-DHAVE_SYS_STAT_H \
+	-DHAVE_SYS_TYPES_H \
+	-DHAVE_STDLIB_H \
+	-DHAVE_STRCASECMP \
+	-DHAVE_STRDUP \
+	-DHAVE_MMAP \
+	-DHAVE_UTIME_H \
+	-DHAVE_GETPAGESIZE \
+	-DHAVE_LSEEK64 \
+	-DHAVE_LSEEK64_PROTOTYPE \
+	-DHAVE_EXT2_IOCTLS \
+	-DHAVE_LINUX_FD_H \
+	-DHAVE_TYPE_SSIZE_T \
+	-DHAVE_GETOPT_H \
+	-DHAVE_SYS_TIME_H \
+	-DHAVE_SYS_PARAM_H \
+	-DHAVE_SYSCONF
+
+lsattr_shared_libraries := \
+	libext2_com_err \
+	libext2_e2p
+
+lsattr_system_shared_libraries := libc
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(lsattr_src_files)
+LOCAL_C_INCLUDES := $(lsattr_c_includes)
+LOCAL_CFLAGS := $(lsattr_cflags)
+LOCAL_SHARED_LIBRARIES := $(lsattr_shared_libraries)
+LOCAL_SYSTEM_SHARED_LIBRARIES := $(lsattr_system_shared_libraries)
+LOCAL_MODULE := lsattr
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(lsattr_src_files)
+LOCAL_C_INCLUDES := $(lsattr_c_includes)
+LOCAL_CFLAGS := $(lsattr_cflags)
+LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(lsattr_shared_libraries))
+LOCAL_MODULE := lsattr_host
+LOCAL_MODULE_STEM := lsattr
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_EXECUTABLE)
+
+#########################################################################
+# Build blkid
+#
+include $(CLEAR_VARS)
+
+blkid_src_files := \
+    blkid.c
+
+blkid_c_includes :=
+
+blkid_cflags := -O2 -g -W -Wall \
+    -DHAVE_UNISTD_H \
+    -DHAVE_ERRNO_H \
+    -DHAVE_NETINET_IN_H \
+    -DHAVE_SYS_IOCTL_H \
+    -DHAVE_SYS_MMAN_H \
+    -DHAVE_SYS_MOUNT_H \
+    -DHAVE_SYS_PRCTL_H \
+    -DHAVE_SYS_RESOURCE_H \
+    -DHAVE_SYS_SELECT_H \
+    -DHAVE_SYS_STAT_H \
+    -DHAVE_SYS_TYPES_H \
+    -DHAVE_STDLIB_H \
+    -DHAVE_STRCASECMP \
+    -DHAVE_STRDUP \
+    -DHAVE_MMAP \
+    -DHAVE_UTIME_H \
+    -DHAVE_GETPAGESIZE \
+    -DHAVE_LSEEK64 \
+    -DHAVE_LSEEK64_PROTOTYPE \
+    -DHAVE_EXT2_IOCTLS \
+    -DHAVE_LINUX_FD_H \
+    -DHAVE_TYPE_SSIZE_T \
+    -DHAVE_GETOPT_H \
+    -DHAVE_SYS_TIME_H \
+    -DHAVE_SYS_PARAM_H \
+    -DHAVE_SYSCONF \
+    -DHAVE_TERMIO_H
+
+blkid_shared_libraries := \
+    libext2fs \
+    libext2_blkid \
+    libext2_com_err \
+    libext2_e2p
+
+blkid_system_shared_libraries := libc
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(blkid_src_files)
+LOCAL_C_INCLUDES := $(blkid_c_includes)
+LOCAL_CFLAGS := $(blkid_cflags)
+LOCAL_SHARED_LIBRARIES := $(blkid_shared_libraries)
+LOCAL_SYSTEM_SHARED_LIBRARIES := $(blkid_system_shared_libraries)
+LOCAL_MODULE := blkid
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_EXECUTABLE)
diff --git a/e2fsprogs/misc/Makefile.in b/e2fsprogs/misc/Makefile.in
new file mode 100644
index 0000000..553c361
--- /dev/null
+++ b/e2fsprogs/misc/Makefile.in
@@ -0,0 +1,712 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = misc
+INSTALL = @INSTALL@
+
+@MCONFIG@
+
+@DEFRAG_CMT@@LINUX_CMT@E4DEFRAG_PROG= e4defrag
+@DEFRAG_CMT@@LINUX_CMT@E4DEFRAG_MAN= e4defrag.8
+
+@IMAGER_CMT@E2IMAGE_PROG= e2image
+@IMAGER_CMT@E2IMAGE_MAN= e2image.8
+
+@UUIDD_CMT@UUIDD_PROG= uuidd
+@UUIDD_CMT@UUIDD_MAN= uuidd.8
+
+@BLKID_CMT@BLKID_PROG= blkid
+@BLKID_CMT@BLKID_MAN= blkid.8
+
+@BLKID_CMT@FINDFS_LINK= findfs
+@BLKID_CMT@FINDFS_MAN= findfs.8
+
+SPROGS=		mke2fs badblocks tune2fs dumpe2fs $(BLKID_PROG) logsave \
+			$(E2IMAGE_PROG) @FSCK_PROG@ e2undo
+USPROGS=	mklost+found filefrag e2freefrag $(UUIDD_PROG) $(E4DEFRAG_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) @FSCK_MAN@
+FMANPAGES=	mke2fs.conf.5 ext4.5
+
+UPROGS=		chattr lsattr @UUID_CMT@ uuidgen
+UMANPAGES=	chattr.1 lsattr.1 @UUID_CMT@ uuidgen.1
+
+LPROGS=		@E2INITRD_PROG@
+
+TUNE2FS_OBJS=	tune2fs.o util.o
+MKLPF_OBJS=	mklost+found.o
+MKE2FS_OBJS=	mke2fs.o util.o profile.o prof_err.o default_profile.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
+E2FREEFRAG_OBJS= e2freefrag.o
+
+PROFILED_TUNE2FS_OBJS=	profiled/tune2fs.o profiled/util.o
+PROFILED_MKLPF_OBJS=	profiled/mklost+found.o
+PROFILED_MKE2FS_OBJS=	profiled/mke2fs.o profiled/util.o profiled/profile.o \
+			profiled/prof_err.o profiled/default_profile.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
+
+SRCS=	$(srcdir)/tune2fs.c $(srcdir)/mklost+found.c $(srcdir)/mke2fs.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)/../e2fsck/profile.c \
+		$(srcdir)/e2undo.c $(srcdir)/e2freefrag.c
+
+LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) 
+DEPLIBS= $(LIBEXT2FS) $(DEPLIBCOM_ERR)
+PROFILED_LIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR)
+PROFILED_DEPLIBS= $(PROFILED_LIBEXT2FS) $(DEPPROFILED_LIBCOM_ERR)
+
+STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) 
+STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) 
+
+LIBS_E2P= $(LIBE2P) $(LIBCOM_ERR) 
+DEPLIBS_E2P= $(LIBE2P) $(DEPLIBCOM_ERR) 
+
+COMPILE_ET=$(top_builddir)/lib/et/compile_et --build-tree
+
+.c.o:
+	$(E) "	CC $<"
+	$(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
+	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+
+all:: profiled $(SPROGS) $(UPROGS) $(USPROGS) $(SMANPAGES) $(UMANPAGES) \
+	$(FMANPAGES) $(LPROGS) $(E4DEFRAG_PROG)
+
+@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 e2freefrag.profiled
+
+profiled:
+@PROFILE_CMT@	$(E) "	MKDIR $@"
+@PROFILE_CMT@	$(Q) mkdir profiled
+
+prof_err.c prof_err.h: $(srcdir)/../e2fsck/prof_err.et
+	$(E) "	COMPILE_ET prof_err.et"
+	$(Q) $(COMPILE_ET) $(srcdir)/../e2fsck/prof_err.et
+
+profile.h: $(top_srcdir)/e2fsck/profile.h
+	$(E) "	CP $<"
+	$(Q) cp $< $@
+
+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
+profile.o:
+	$(E) "	CC $<"
+	$(Q) $(CC) -c $(ALL_CFLAGS) $(srcdir)/../e2fsck/profile.c -o $@
+@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/profile.o -c \
+@PROFILE_CMT@	$(srcdir)/../e2fsck/profile.c
+
+findsuper: findsuper.o
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o findsuper findsuper.o $(LIBS)
+
+partinfo: partinfo.o
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o partinfo partinfo.o
+
+e2initrd_helper: e2initrd_helper.o $(DEPLIBS) $(DEPLIBBLKID) $(LIBEXT2FS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o e2initrd_helper e2initrd_helper.o $(LIBS) \
+		$(LIBBLKID) $(LIBEXT2FS) $(LIBINTL)
+
+tune2fs: $(TUNE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBBLKID) \
+		$(DEPLIBUUID) $(DEPLIBQUOTA) $(LIBEXT2FS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o tune2fs $(TUNE2FS_OBJS) $(LIBS) \
+		$(LIBBLKID) $(LIBUUID) $(LIBQUOTA) $(LIBEXT2FS) $(LIBS_E2P) \
+		$(LIBINTL)
+
+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_LIBQUOTA) $(STATIC_LIBE2P) $(LIBINTL)
+
+tune2fs.profiled: $(TUNE2FS_OBJS) $(PROFILED_DEPLIBS) \
+		$(PROFILED_E2P) $(DEPPROFILED_LIBBLKID) $(DEPPROFILED_LIBUUID) \
+		$(DEPPROFILED_LIBQUOTA)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o tune2fs.profiled \
+		$(PROFILED_TUNE2FS_OBJS) $(PROFILED_LIBBLKID) \
+		$(PROFILED_LIBUUID) $(PROFILED_LIBQUOTA) $(PROFILED_LIBE2P) \
+		$(LIBINTL) $(PROFILED_LIBS)
+
+blkid: $(BLKID_OBJS) $(DEPLIBBLKID) $(LIBEXT2FS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o blkid $(BLKID_OBJS) $(LIBBLKID) $(LIBINTL) \
+		$(LIBEXT2FS)
+
+blkid.static: $(BLKID_OBJS) $(STATIC_DEPLIBS) $(DEPSTATIC_LIBBLKID)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o blkid.static $(BLKID_OBJS) $(STATIC_LIBS) \
+		$(STATIC_LIBBLKID) $(LIBINTL)
+
+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)
+
+e2image: $(E2IMAGE_OBJS) $(DEPLIBS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o e2image $(E2IMAGE_OBJS) $(LIBS) $(LIBINTL)
+
+e2image.profiled: $(E2IMAGE_OBJS) $(PROFILED_DEPLIBS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e2image.profiled \
+		$(PROFILED_E2IMAGE_OBJS) $(PROFILED_LIBS) $(LIBINTL)
+
+e2undo: $(E2UNDO_OBJS) $(DEPLIBS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o e2undo $(E2UNDO_OBJS) $(LIBS) $(LIBINTL)
+
+e2undo.profiled: $(E2UNDO_OBJS) $(PROFILED_DEPLIBS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e2undo.profiled \
+		$(PROFILED_E2UNDO_OBJS) $(PROFILED_LIBS) $(LIBINTL)
+
+e4defrag: $(E4DEFRAG_OBJS) $(DEPLIBS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o e4defrag $(E4DEFRAG_OBJS) $(LIBS)
+
+e4defrag.profiled: $(E4DEFRAG_OBJS) $(PROFILED_DEPLIBS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e4defrag.profiled \
+		$(PROFILED_E4DEFRAG_OBJS) $(PROFILED_LIBS)
+
+base_device: base_device.c
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(srcdir)/base_device.c \
+		-DDEBUG -o base_device
+
+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)
+
+mke2fs: $(MKE2FS_OBJS) $(DEPLIBS) $(LIBE2P) $(DEPLIBBLKID) $(DEPLIBUUID) \
+		$(DEPLIBQUOTA) $(LIBEXT2FS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o mke2fs $(MKE2FS_OBJS) $(LIBS) $(LIBBLKID) \
+		$(LIBUUID) $(LIBQUOTA) $(LIBEXT2FS) $(LIBE2P) $(LIBINTL)
+
+mke2fs.static: $(MKE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIBUUID) \
+		$(DEPSTATIC_LIBQUOTA) $(DEPSTATIC_LIBBLKID)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -static -o mke2fs.static $(MKE2FS_OBJS) \
+		$(STATIC_LIBQUOTA) $(STATIC_LIBS) $(STATIC_LIBE2P) \
+		$(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(LIBINTL)
+
+mke2fs.profiled: $(MKE2FS_OBJS) $(PROFILED_DEPLIBS) \
+	$(PROFILED_LIBE2P) $(PROFILED_DEPLIBBLKID) $(PROFILED_DEPLIBUUID) \
+	$(PROFILED_LIBQUOTA)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o mke2fs.profiled \
+		$(PROFILED_MKE2FS_OBJS) $(PROFILED_LIBBLKID) \
+		$(PROFILED_LIBUUID) $(PROFILED_LIBQUOTA) $(PROFILED_LIBE2P) $(LIBINTL) \
+		$(PROFILED_LIBS)
+
+chattr: $(CHATTR_OBJS) $(DEPLIBS_E2P)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o chattr $(CHATTR_OBJS) $(LIBS_E2P) $(LIBINTL)
+
+lsattr: $(LSATTR_OBJS) $(DEPLIBS_E2P)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o lsattr $(LSATTR_OBJS) $(LIBS_E2P) $(LIBINTL)
+
+uuidgen: $(UUIDGEN_OBJS) $(DEPLIBUUID)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o uuidgen $(UUIDGEN_OBJS) $(LIBUUID) $(LIBINTL)
+
+uuidgen.profiled: $(UUIDGEN_OBJS) $(PROFILED_DEPLIBUUID)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o uuidgen.profiled \
+		$(PROFILED_UUIDGEN_OBJS) $(PROFILED_LIBUUID) $(LIBINTL)
+
+uuidd: $(UUIDD_OBJS) $(DEPLIBUUID)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o uuidd $(UUIDD_OBJS) $(LIBUUID) $(LIBINTL)
+
+uuidd.profiled: $(UUIDD_OBJS) $(PROFILED_DEPLIBUUID)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o uuidd.profiled $(PROFILED_UUIDD_OBJS) \
+		$(PROFILED_LIBUUID) $(LIBINTL)
+
+dumpe2fs: $(DUMPE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBUUID)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o dumpe2fs $(DUMPE2FS_OBJS) $(LIBS) \
+		$(LIBS_E2P) $(LIBUUID) $(LIBINTL)
+
+dumpe2fs.profiled: $(DUMPE2FS_OBJS) $(PROFILED_DEPLIBS) \
+		$(PROFILED_LIBE2P) $(PROFILED_DEPLIBUUID)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o dumpe2fs.profiled \
+		$(PROFILED_DUMPE2FS_OBJS) $(PROFILED_LIBS) \
+		$(PROFILED_LIBE2P) $(PROFILED_LIBUUID) $(LIBINTL)
+
+fsck: $(FSCK_OBJS) $(DEPLIBBLKID)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBBLKID) $(LIBINTL)
+
+fsck.profiled: $(FSCK_OBJS) $(PROFILED_DEPLIBBLKID)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o fsck.profiled $(PROFILED_FSCK_OBJS) \
+		$(PROFILED_LIBBLKID) $(LIBINTL)
+
+badblocks: $(BADBLOCKS_OBJS) $(DEPLIBS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o badblocks $(BADBLOCKS_OBJS) $(LIBS) $(LIBINTL)
+
+badblocks.profiled: $(BADBLOCKS_OBJS) $(PROFILED_DEPLIBS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o badblocks.profiled \
+		$(PROFILED_BADBLOCKS_OBJS) $(PROFILED_LIBS) $(LIBINTL)
+
+logsave: logsave.o
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o logsave logsave.o
+
+logsave.profiled: logsave.o
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o logsave.profiled profiled/logsave.o
+
+e2freefrag: $(E2FREEFRAG_OBJS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o e2freefrag $(E2FREEFRAG_OBJS) $(LIBS)
+
+e2freefrag.profiled: $(E2FREEFRAG_OBJS) $(PROFILED_DEPLIBS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e2freefrag.profiled \
+		$(PROFILED_E2FREEFRAG_OBJS) $(PROFILED_LIBS)
+
+filefrag: $(FILEFRAG_OBJS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -o filefrag $(FILEFRAG_OBJS) 
+
+filefrag.profiled: $(FILEFRAG_OBJS)
+	$(E) "	LD $@"
+	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o filefrag.profiled \
+		$(PROFILED_FILEFRAG_OBJS) 
+
+tst_ismounted: $(srcdir)/ismounted.c $(STATIC_LIBEXT2FS) $(DEPLIBCOM_ERR)
+	$(E) "	LD $@"
+	$(CC) -o tst_ismounted $(srcdir)/ismounted.c -DDEBUG $(ALL_CFLAGS) \
+		$(LIBCOM_ERR)
+
+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
+
+dumpe2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/dumpe2fs.8.in 
+	$(E) "	SUBST $@"
+	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/dumpe2fs.8.in dumpe2fs.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 
+
+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) "	MKINSTALLDIRS $(sbindir) $(root_sbindir) $(bindir) $(man1dir) $(man8dir) $(libdir) $(root_sysconfdir)"
+	$(Q) $(MKINSTALLDIRS) $(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 ext4dev; 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) 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 ext4dev; 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 \
+			$(DESTDIR)$(root_sbindir)/mkfs.ext4dev
+	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)/mkfs.ext4dev.8 \
+		$(DESTDIR)$(man8dir)/fsck.ext2.8 \
+		$(DESTDIR)$(man8dir)/fsck.ext3.8 \
+		$(DESTDIR)$(man8dir)/fsck.ext4.8 \
+		$(DESTDIR)$(man8dir)/fsck.ext4dev.8
+
+	for i in $(UMANPAGES); do \
+		$(RM) -f $(DESTDIR)$(man1dir)/$$i; \
+	done
+	for i in $(FINDFS_LINK) e2label ; 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 \
+		logsave.profiled filefrag.profiled uuidgen.profiled \
+		uuidd.profiled e2image.profiled 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/bitops.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/jfs_user.h \
+ $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(srcdir)/util.h \
+ $(top_srcdir)/lib/quota/mkquota.h $(top_srcdir)/lib/quota/quotaio.h \
+ $(top_srcdir)/lib/quota/dqblk_v2.h $(top_srcdir)/lib/quota/quotaio_tree.h \
+ $(top_srcdir)/lib/../e2fsck/dict.h $(top_srcdir)/version.h \
+ $(srcdir)/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 \
+ $(srcdir)/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/bitops.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(srcdir)/util.h profile.h prof_err.h $(top_srcdir)/version.h \
+ $(srcdir)/nls-enable.h $(top_srcdir)/lib/quota/mkquota.h \
+ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
+ $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.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)/version.h $(srcdir)/nls-enable.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)/version.h $(srcdir)/nls-enable.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/bitops.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/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)/version.h \
+ $(srcdir)/nls-enable.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_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_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
+ $(srcdir)/nls-enable.h
+fsck.o: $(srcdir)/fsck.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/version.h \
+ $(srcdir)/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/bitops.h \
+ $(srcdir)/nls-enable.h $(srcdir)/util.h
+uuidgen.o: $(srcdir)/uuidgen.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/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/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/bitops.h \
+ $(top_srcdir)/lib/ext2fs/fiemap.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
+profile.o: $(srcdir)/../e2fsck/profile.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/../e2fsck/profile.h prof_err.h
+e2undo.o: $(srcdir)/e2undo.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/tdb.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/bitops.h \
+ $(srcdir)/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/bitops.h \
+ $(srcdir)/e2freefrag.h
diff --git a/e2fsprogs/misc/badblocks.8.in b/e2fsprogs/misc/badblocks.8.in
new file mode 100644
index 0000000..f507f63
--- /dev/null
+++ b/e2fsprogs/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 \-e
+.I max_bad_blocks
+]
+[
+.B \-d
+.I read_delay_factor
+]
+[
+.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 filesystem.   
+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 \-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
+.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
+.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 filesystem 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 filesystem, 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/e2fsprogs/misc/badblocks.c b/e2fsprogs/misc/badblocks.c
new file mode 100644
index 0000000..87c87f6
--- /dev/null
+++ b/e2fsprogs/misc/badblocks.c
@@ -0,0 +1,1331 @@
+/*
+ * 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 <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>
+
+#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 "nls-enable.h"
+
+#ifndef O_LARGEFILE
+#define O_LARGEFILE 0
+#endif
+
+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;		/* 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] [-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"),
+		 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];
+	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
+	len = mbstowcs(NULL, line_buf, sizeof(line_buf));
+#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;
+			fcntl(dev, F_SETFL, flag);
+		}
+		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, 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, 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((blocks_at_once + 1) * block_size);
+	} else {
+		blkbuf = allocate_buffer(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 (max_bb && 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(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 (max_bb && 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 (max_bb && 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(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 (max_bb && 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) {
+				try = 1;
+				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 || (ret > UINT_MAX) ||
+	    (ret == ULONG_MAX && errno == ERANGE)) {
+		com_err (program_name, 0, _("invalid %s - %s"), descr, str);
+		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;
+	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;
+	blk64_t 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;
+	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");
+			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 (optind > argc - 1)
+		usage();
+	device_name = argv[optind++];
+	if (optind > argc - 1) {
+		errcode = ext2fs_get_device_size2(device_name,
+						 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"),
+		     first_block, 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"),
+			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, 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/e2fsprogs/misc/base_device.c b/e2fsprogs/misc/base_device.c
new file mode 100644
index 0000000..aad2ba0
--- /dev/null
+++ b/e2fsprogs/misc/base_device.c
@@ -0,0 +1,169 @@
+/*
+ * 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 <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
+ * pathames.
+ */
+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)
+{
+	const 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");
+	}
+	exit(0);
+}
+#endif
diff --git a/e2fsprogs/misc/base_device.tst b/e2fsprogs/misc/base_device.tst
new file mode 100644
index 0000000..609a58d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/misc/blkid.8.in b/e2fsprogs/misc/blkid.8.in
new file mode 100644
index 0000000..9c42686
--- /dev/null
+++ b/e2fsprogs/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. filesystem, 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/e2fsprogs/misc/blkid.c b/e2fsprogs/misc/blkid.c
new file mode 100644
index 0000000..388abad
--- /dev/null
+++ b/e2fsprogs/misc/blkid.c
@@ -0,0 +1,426 @@
+/*
+ * 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 <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"
+
+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 */
+		}
+		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;
+
+#ifdef TIOCGSIZE
+	if (ioctl (0, TIOCGSIZE, &t_win) == 0)
+		return (t_win.ts_cols);
+#endif
+#ifdef TIOCGWINSZ
+	if (ioctl (0, TIOCGWINSZ, &w_win) == 0)
+		return (w_win.ws_col);
+#endif
+        cp = getenv("COLUMNS");
+	if (cp)
+		return strtol(cp, NULL, 10);
+	return 80;
+}
+
+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':
+			if (optarg && !*optarg)
+				read = NULL;
+			else
+				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':
+			if (optarg && !*optarg)
+				write = NULL;
+			else
+				write = optarg;
+			break;
+		case 'h':
+			err = 0;
+		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/e2fsprogs/misc/chattr.1.in b/e2fsprogs/misc/chattr.1.in
new file mode 100644
index 0000000..932ef4b
--- /dev/null
+++ b/e2fsprogs/misc/chattr.1.in
@@ -0,0 +1,182 @@
+.\" -*- 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
+]
+[
+.I mode
+]
+.I files...
+.SH DESCRIPTION
+.B chattr
+changes the file attributes on a Linux file system.
+.PP
+The format of a symbolic mode is +-=[acdeijstuACDST].
+.PP
+The operator `+' causes the selected attributes to be added to the
+existing attributes of the files; `-' causes them to be removed; and
+`=' causes them to be the only attributes that the files have.
+.PP
+The letters `acdeijstuACDST' select the new attributes for the files:
+append only (a), compressed (c), no dump (d), extent format (e), immutable (i),
+data journalling (j), secure deletion (s), no tail-merging (t),
+undeletable (u), no atime updates (A), no copy on write (C),
+synchronous directory updates (D), synchronous updates (S),
+and top of directory hierarchy (T).
+.PP
+The following attributes are read-only, and may be listed by
+.BR lsattr (1)
+but not modified by chattr: huge file (h), compression error (E),
+indexed directory (I), compression raw access (X), and compressed dirty
+file (Z).
+.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.
+.SH ATTRIBUTES
+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.
+.PP
+A file with the `a' attribute set can only be open in append mode for writing.
+Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE
+capability can set or clear this attribute.
+.PP
+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.
+.PP
+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
+the No_COW attribute.)
+.PP
+When a directory with the `D' attribute set is modified,
+the changes are written synchronously on the disk; this is equivalent to
+the `dirsync' mount option applied to a subset of the files.
+.PP
+A file with the `d' attribute set is not candidate for backup when the
+.BR dump (8)
+program is run.
+.PP
+The 'E' attribute is used by the experimental compression patches to
+indicate that a compressed file has a compression error.  It may not be
+set or reset using
+.BR chattr (1),
+although it can be displayed by
+.BR lsattr (1).
+.PP
+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).
+.PP
+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 reset using
+.BR chattr (1),
+although it can be displayed by
+.BR lsattr (1).
+.PP
+The 'h' attribute indicates the file is storing its blocks in units of the
+filesystem blocksize instead of in units of sectors, and means that the file
+is (or at one time was) larger than 2TB.  It may not be set or reset using
+.BR chattr (1),
+although it can be displayed by
+.BR lsattr (1).
+.PP
+A file with the `i' attribute cannot be modified: it cannot be deleted or
+renamed, no link can be created to this file and no data can be written
+to the file.  Only the superuser or a process possessing the
+CAP_LINUX_IMMUTABLE capability can set or clear this attribute.
+.PP
+A file with the `j' attribute has all of its data written to the ext3
+journal before being written to the file itself, if the filesystem is
+mounted with the "data=ordered" or "data=writeback" options.  When the
+filesystem 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.
+.PP
+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.
+.PP
+When a file with the `S' attribute set is modified,
+the changes are written synchronously on the disk; this is equivalent to
+the `sync' mount option applied to a subset of the files.
+.PP
+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.
+.PP
+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 filesystems which
+support tail-merging).  This is necessary for applications such as LILO
+which read the filesystem directly, and which don't understand tail-merged
+files.  Note: As of this writing, the ext2 or ext3 filesystems do not
+(yet, except in very experimental patches) support tail-merging.
+.PP
+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.
+.PP
+The 'X' attribute is used by the experimental compression patches to
+indicate that a raw contents of a compressed file can be accessed
+directly.  It currently may not be set or reset using
+.BR chattr (1),
+although it can be displayed by
+.BR lsattr (1).
+.PP
+The 'Z' attribute is used by the experimental compression patches to
+indicate a compressed file is dirty.  It may not be set or reset 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 filesystems as implemented in the current
+mainline Linux kernels.
+.PP
+The `j' option is only useful if the filesystem is mounted as ext3.
+.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)
diff --git a/e2fsprogs/misc/chattr.c b/e2fsprogs/misc/chattr.c
new file mode 100644
index 0000000..3567cfe
--- /dev/null
+++ b/e2fsprogs/misc/chattr.c
@@ -0,0 +1,326 @@
+/*
+ * 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 <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 "../version.h"
+#include "nls-enable.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 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] [-+=AaCcDdeijsSu] [-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_NODUMP_FL, 'd' },
+	{ EXT4_EXTENTS_FL, 'e'},
+	{ EXT2_IMMUTABLE_FL, 'i' },
+	{ EXT3_JOURNAL_DATA_FL, 'j' },
+	{ EXT2_SECRM_FL, 's' },
+	{ EXT2_UNRM_FL, 'u' },
+	{ EXT2_NOTAIL_FL, 't' },
+	{ EXT2_TOPDIR_FL, 'T' },
+	{ FS_NOCOW_FL, 'C' },
+	{ 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 == '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;
+		break;
+	}
+	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 (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)) {
+		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/e2fsprogs/misc/default_profile.c b/e2fsprogs/misc/default_profile.c
new file mode 100644
index 0000000..ce312ff
--- /dev/null
+++ b/e2fsprogs/misc/default_profile.c
@@ -0,0 +1,55 @@
+const char *mke2fs_default_profile = 
+  "[defaults]\n"
+  "	base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr\n"
+  "	default_mntopts = acl,user_xattr\n"
+  "	enable_periodic_fsck = 0\n"
+  "	blocksize = 4096\n"
+  "	inode_size = 256\n"
+  "	inode_ratio = 16384\n"
+  "\n"
+  "[fs_types]\n"
+  "	ext3 = {\n"
+  "		features = has_journal\n"
+  "	}\n"
+  "	ext4 = {\n"
+  "		features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize\n"
+  "		auto_64-bit_support = 1\n"
+  "		inode_size = 256\n"
+  "	}\n"
+  "	ext4dev = {\n"
+  "		features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize\n"
+  "		inode_size = 256\n"
+  "		options = test_fs=1\n"
+  "	}\n"
+  "	small = {\n"
+  "		blocksize = 1024\n"
+  "		inode_size = 128\n"
+  "		inode_ratio = 4096\n"
+  "	}\n"
+  "	floppy = {\n"
+  "		blocksize = 1024\n"
+  "		inode_size = 128\n"
+  "		inode_ratio = 8192\n"
+  "	}\n"
+  "	big = {\n"
+  "		inode_ratio = 32768\n"
+  "	}\n"
+  "	huge = {\n"
+  "		inode_ratio = 65536\n"
+  "	}\n"
+  "	news = {\n"
+  "		inode_ratio = 4096\n"
+  "	}\n"
+  "	largefile = {\n"
+  "		inode_ratio = 1048576\n"
+  "		blocksize = -1\n"
+  "	}\n"
+  "	largefile4 = {\n"
+  "		inode_ratio = 4194304\n"
+  "		blocksize = -1\n"
+  "	}\n"
+  "	hurd = {\n"
+  "	     blocksize = 4096\n"
+  "	     inode_size = 128\n"
+  "	}\n"
+;
diff --git a/e2fsprogs/misc/dumpe2fs.8.in b/e2fsprogs/misc/dumpe2fs.8.in
new file mode 100644
index 0000000..befaf94
--- /dev/null
+++ b/e2fsprogs/misc/dumpe2fs.8.in
@@ -0,0 +1,87 @@
+.\" -*- 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 filesystem information
+.SH SYNOPSIS
+.B dumpe2fs
+[
+.B \-bfhixV
+]
+[
+.B \-o superblock=\fIsuperblock
+]
+[
+.B \-o blocksize=\fIblocksize
+]
+.I device
+.SH DESCRIPTION
+.B dumpe2fs
+prints the super block and blocks group information for the filesystem
+present on
+.I device.
+.PP
+.B Note:
+When used with a mounted filesystem, the printed
+information may be old or inconsistent.
+.SH OPTIONS
+.TP
+.B \-b
+print the blocks which are reserved as bad in the filesystem.
+.TP
+.B \-o superblock=\fIsuperblock
+use the block
+.I superblock
+when examining the filesystem.
+This option is not usually needed except by a filesystem wizard who 
+is examining the remains of a very badly corrupted filesystem.
+.TP
+.B \-o blocksize=\fIblocksize
+use blocks of
+.I blocksize
+bytes when examining the filesystem.
+This option is not usually needed except by a filesystem wizard who 
+is examining the remains of a very badly corrupted filesystem.
+.TP
+.B \-f
+force dumpe2fs to display a filesystem even though it may have some 
+filesystem feature flags which dumpe2fs may not understand (and which
+can cause some of dumpe2fs's display to be suspect).
+.TP 
+.B \-h
+only display the superblock information and not any of the block
+group descriptor detail information.
+.TP
+.B \-i
+display the filesystem data from an image file created by 
+.BR e2image ,
+using 
+.I device
+as the pathname to the image file.
+.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 BUGS
+You need to know the physical filesystem 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 mke2fs (8),
+.BR tune2fs (8).
+.BR ext4 (5)
+
diff --git a/e2fsprogs/misc/dumpe2fs.c b/e2fsprogs/misc/dumpe2fs.c
new file mode 100644
index 0000000..9e5d2df
--- /dev/null
+++ b/e2fsprogs/misc/dumpe2fs.c
@@ -0,0 +1,639 @@
+/*
+ * 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
+ */
+
+#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 "jfs_user.h"
+#include <uuid/uuid.h>
+
+#include "../version.h"
+#include "nls-enable.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 [-bfhixV] [-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 (fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_GDT_CSUM)
+		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 (fs->super->s_feature_incompat &
+		   EXT4_FEATURE_INCOMPAT_FLEX_BG) {
+		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)
+{
+	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 (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+				       EXT4_FEATURE_RO_COMPAT_BIGALLOC))
+		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 (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
+		old_desc_blocks = fs->super->s_first_meta_bg;
+	else
+		old_desc_blocks = fs->desc_blocks;
+	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);
+
+		printf (_("Group %lu: (Blocks "), i);
+		print_range(first_block, last_block);
+		fputs(")", stdout);
+		print_bg_opts(fs, i);
+		if (fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_GDT_CSUM) {
+			unsigned csum = ext2fs_bg_checksum(fs, i);
+			unsigned exp_csum = ext2fs_group_desc_csum(fs, i);
+
+			printf(_("  Checksum 0x%04x"), csum);
+			if (csum != exp_csum)
+				printf(_(" (EXPECTED 0x%04x)"), exp_csum);
+			printf(_(", unused inodes %u\n"),
+			       ext2fs_bg_itable_unused(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);
+		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);
+		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"));
+		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;
+	ino_t			ino = fs->super->s_journal_inum;
+	char			buf[1024];
+	__u32			*mask_ptr, mask, m;
+	int			i, j, size, printed = 0;
+
+	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) != JFS_MAGIC_NUMBER) {
+		fprintf(stderr, "%s",
+			_("Journal superblock magic number invalid!\n"));
+		exit(1);
+	}
+	printf("%s", _("Journal features:        "));
+	for (i=0, mask_ptr=&jsb->s_feature_compat; i <3; i++,mask_ptr++) {
+		mask = be32_to_cpu(*mask_ptr);
+		for (j=0,m=1; j < 32; j++, m<<=1) {
+			if (mask & m) {
+				printf(" %s", e2p_jrnl_feature2string(i, m));
+				printed++;
+			}
+		}
+	}
+	if (printed == 0)
+		printf(" (none)");
+	printf("\n");
+	fputs(_("Journal size:             "), stdout);
+	if ((fs->super->s_feature_ro_compat &
+	     EXT4_FEATURE_RO_COMPAT_HUGE_FILE) &&
+	    (inode.i_flags & EXT4_HUGE_FILE_FL))
+		size = inode.i_blocks / (fs->blocksize / 1024);
+	else
+		size = inode.i_blocks >> 1;
+	if (size < 8192)
+		printf("%uk\n", size);
+	else
+		printf("%uM\n", size >> 10);
+	printf(_("Journal length:           %u\n"
+		 "Journal sequence:         0x%08x\n"
+		 "Journal start:            %u\n"),
+	       (unsigned int)ntohl(jsb->s_maxlen),
+	       (unsigned int)ntohl(jsb->s_sequence),
+	       (unsigned int)ntohl(jsb->s_start));
+	if (jsb->s_errno != 0)
+		printf(_("Journal errno:            %d\n"),
+		       (int) ntohl(jsb->s_errno));
+}
+
+static void print_journal_information(ext2_filsys fs)
+{
+	errcode_t	retval;
+	char		buf[1024];
+	char		str[80];
+	unsigned int	i;
+	journal_superblock_t	*jsb;
+
+	/* 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(JFS_MAGIC_NUMBER)) ||
+	    (jsb->s_header.h_blocktype !=
+	     (unsigned) ntohl(JFS_SUPERBLOCK_V2))) {
+		com_err(program_name, 0, "%s",
+			_("Couldn't find journal superblock magic numbers"));
+		exit(1);
+	}
+
+	printf(_("\nJournal 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"),
+	       (unsigned int)ntohl(jsb->s_blocksize),  (unsigned int)ntohl(jsb->s_maxlen),
+	       (unsigned int)ntohl(jsb->s_first), (unsigned int)ntohl(jsb->s_sequence),
+	       (unsigned int)ntohl(jsb->s_start), (unsigned int)ntohl(jsb->s_nr_users));
+
+	for (i=0; i < ntohl(jsb->s_nr_users); i++) {
+		uuid_unparse(&jsb->s_users[i*16], str);
+		printf(i ? "                          %s\n"
+		       : _("Journal users:            %s\n"),
+		       str);
+	}
+}
+
+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;
+	ext2_filsys	fs;
+	int		print_badblocks = 0;
+	blk64_t		use_superblock = 0;
+	int		use_blocksize = 0;
+	int		image_dump = 0;
+	int		force = 0;
+	int		flags;
+	int		header_only = 0;
+	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
+	add_error_table(&et_ext2_error_table);
+	fprintf (stderr, "dumpe2fs %s (%s)\n", E2FSPROGS_VERSION,
+		 E2FSPROGS_DATE);
+	if (argc && *argv)
+		program_name = *argv;
+
+	while ((c = getopt (argc, argv, "bfhixVo:")) != EOF) {
+		switch (c) {
+		case 'b':
+			print_badblocks++;
+			break;
+		case 'f':
+			force++;
+			break;
+		case 'h':
+			header_only++;
+			break;
+		case 'i':
+			image_dump++;
+			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;
+	if (force)
+		flags |= EXT2_FLAG_FORCE;
+	if (image_dump)
+		flags |= EXT2_FLAG_IMAGE_FILE;
+
+	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);
+	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;
+	if (fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+		blocks64 = 1;
+	if (print_badblocks) {
+		list_bad_blocks(fs, 1);
+	} else {
+		list_super (fs->super);
+		if (fs->super->s_feature_incompat &
+		      EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) {
+			print_journal_information(fs);
+			ext2fs_close(fs);
+			exit(0);
+		}
+		if ((fs->super->s_feature_compat &
+		     EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
+		    (fs->super->s_journal_inum != 0))
+			print_inline_journal_information(fs);
+		list_bad_blocks(fs, 0);
+		if (header_only) {
+			ext2fs_close (fs);
+			exit (0);
+		}
+		retval = ext2fs_read_bitmaps (fs);
+		list_desc (fs);
+		if (retval) {
+			printf(_("\n%s: %s: error reading bitmaps: %s\n"),
+			       program_name, device_name,
+			       error_message(retval));
+		}
+	}
+	ext2fs_close (fs);
+	remove_error_table(&et_ext2_error_table);
+	exit (0);
+}
diff --git a/e2fsprogs/misc/e2freefrag.8.in b/e2fsprogs/misc/e2freefrag.8.in
new file mode 100644
index 0000000..564be74
--- /dev/null
+++ b/e2fsprogs/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 filesystem 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
+.IR chunk_kb
+is reported.  It also displays the minimum/maximum/average free chunk size in
+the filesystem, along with a histogram of all free chunks.  This information
+can be used to gauge the level of free space fragmentation in the filesystem.
+.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 filesystem block size.
+.TP
+.BI \-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/e2fsprogs/misc/e2freefrag.c b/e2fsprogs/misc/e2freefrag.c
new file mode 100644
index 0000000..00fdc4e
--- /dev/null
+++ b/e2fsprogs/misc/e2freefrag.c
@@ -0,0 +1,335 @@
+/*
+ * 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 <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
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "e2freefrag.h"
+
+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);
+}
+
+static errcode_t get_chunk_info(ext2_filsys fs, struct chunk_info *info,
+				FILE *f)
+{
+	unsigned long total_chunks;
+	const char *unitp = "KMGTPEZY";
+	int units = 10;
+	unsigned long start = 0, end;
+	int i, retval = 0;
+
+	scan_block_bitmap(fs, info);
+
+	fprintf(f, "Total blocks: %llu\nFree blocks: %u (%0.1f%%)\n",
+		ext2fs_blocks_count(fs->super), fs->super->s_free_blocks_count,
+		(double)fs->super->s_free_blocks_count * 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 /
+				fs->super->s_free_blocks_count);
+		}
+		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(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;
+
+	fprintf(f, "Device: %s\n", fs->device_name);
+	fprintf(f, "Blocksize: %u bytes\n", fs->blocksize);
+
+	retval = ext2fs_read_block_bitmap(fs);
+	if (retval) {
+		com_err(fs->device_name, retval, "while reading block bitmap");
+		close_device(fs->device_name, fs);
+		exit(1);
+	}
+
+	init_chunk_info(fs, chunk_info);
+
+	retval = get_chunk_info(fs, chunk_info, f);
+	if (retval) {
+		com_err(fs->device_name, retval, "while collecting 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;
+
+	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)
+#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;
+#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/e2fsprogs/misc/e2freefrag.h b/e2fsprogs/misc/e2freefrag.h
new file mode 100644
index 0000000..80d1eef
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/misc/e2image.8.in b/e2fsprogs/misc/e2image.8.in
new file mode 100644
index 0000000..75002d7
--- /dev/null
+++ b/e2fsprogs/misc/e2image.8.in
@@ -0,0 +1,285 @@
+.\" -*- 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 filesystem metadata to a file
+.SH SYNOPSIS
+.B e2image
+[
+.B \-r|Q
+]
+[
+.B \-fr
+]
+.I device
+.I image-file
+.br
+.B e2image
+.B \-I
+.I device
+.I image-file
+.br
+.B e2image
+.B \-ra
+[
+.B \-cfnp
+]
+[
+.B \-o
+.I src_offset
+]
+[
+.B \-O
+.I dest_offset
+]
+.I src_fs
+[
+.I dest_fs
+]
+.SH DESCRIPTION
+The
+.B e2image
+program will save critical ext2, ext3, or ext4 filesystem 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 filesystems.  In the future,
+e2fsck will be enhanced to be able to use the image file to help
+recover a badly damaged filesystem.
+.PP
+When saving an e2image for debugging purposes, using either the
+.B \-r
+or
+.B \-Q
+options, the filesystem must be unmounted or be mounted read/only, in order
+for the image file to be in a consistent state.  This requirement can be
+overriden using the
+.B \-f
+option, but the resulting image file is very likely not going to be useful.
+.PP
+If
+.I image-file
+is \-, 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.  This restriction will hopefully be lifted in a future version of
+.BR e2image .)
+.PP
+It is a very good idea to create image files for all of
+filesystems 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 filesystem other than
+the filesystem whose data it contains, to ensure that this data is
+accessible in the case where the filesystem 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 .
+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
+filesystems and how many inodes are in use.  For a typical 10 gigabyte
+filesystem, with 200,000 inodes in use out of 1.2 million inodes, the
+image file will be approximately 35 megabytes; a 4 gigabyte filesystem 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
+.SH RESTORING FILESYSTEM METADATA USING AN IMAGE FILE
+.PP
+The
+.B \-I
+option will cause e2image to install the metadata stored in the image
+file back to the device.  It can be used to restore the filesystem 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 filesystem has changed since the image
+file was created, data
+.B will
+be lost.  In general, you should make a full image
+backup of the filesystem first, in case you wish to try other recovery
+strategies afterwards.
+.PP
+.SH RAW IMAGE FILES
+The
+.B \-r
+option will create a raw image file instead of a normal image file.
+A raw image file differs
+from a normal image file in two ways.  First, the filesystem metadata is
+placed in the proper position so that e2fsck, dumpe2fs, debugfs,
+etc.\& can be run directly on the raw image file.  In order to minimize
+the amount of disk space consumed by a raw image file, the file 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
+filesystem itself!)  Secondly, the raw image file also includes indirect
+blocks and directory blocks, which the standard image file does not have,
+although this may change in the future.
+.PP
+Raw image files are sometimes used when sending filesystems to the maintainer
+as part of bug reports to e2fsprogs.  When used in this capacity, the
+recommended command is as follows (replace hda1 with the appropriate device):
+.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 filesystem that the bug reporter
+may wish to keep confidential.  To address this concern, the
+.B \-s
+option can be specified.  This will cause
+.B e2image
+to scramble directory entries and zero out any unused portions
+of the directory blocks before writing the image file.  However,
+the
+.B \-s
+option will prevent analysis of problems related to hash-tree indexed
+directories.
+.PP
+Note that this will work even if you substitute "/dev/hda1" for another raw
+disk image, or QCOW2 image previously created by
+.BR e2image .
+.PP
+.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 disk
+space by storing data in special format with pack data closely together, hence
+avoiding holes while still minimizing size.
+.PP
+In order to send filesystem to the maintainer as a part of bug report to
+e2fsprogs, use following commands (replace hda1 with the appropriate device):
+.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.
+However, the filenames in the directory blocks can still reveal
+information about the contents of the filesystem that the bug reporter
+may wish to keep confidential.  To address this concern, the
+.B \-s
+option can be specified.  This will cause
+.B e2image
+to scramble directory entries and zero out any unused portions
+of the directory blocks before writing the image file.  However, the
+.B \-s
+option will prevent analysis of problems related to hash-tree indexed
+directories.
+.PP
+Note that QCOW2 image created by
+.B e2image
+is 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.
+.PP
+.SH INCLUDING DATA
+Normally
+.B e2image
+only includes fs metadata, not regular file data.  The
+.B \-a
+option can be specified to include all data.  This will
+give 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 or QCOW2 formats.  The
+.B \-p
+switch may be given to show progress.  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), the
+.B \-c
+option which cause e2image to try reading a block from the destination
+to see if it is identical to the block which
+.B e2image
+is about to copy.  If the block is already the same, the write can be
+skipped.  The
+.B \-n
+option will cause all of the writes to be no-ops, and print the blocks
+that would have been written.
+.PP
+.SH OFFSETS
+Normally a filesystem 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 filesystem 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 filesystem.
+.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 fs with:
+.PP
+.br
+\	\fBe2image \-aro 1048576 img /dev/sda1\fR
+.br
+.PP
+Or you can clone a fs 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 filesystem
+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)
+
diff --git a/e2fsprogs/misc/e2image.c b/e2fsprogs/misc/e2image.c
new file mode 100644
index 0000000..a924d10
--- /dev/null
+++ b/e2fsprogs/misc/e2image.c
@@ -0,0 +1,1662 @@
+/*
+ * 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%
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#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 "et/com_err.h"
+#include "uuid/uuid.h"
+#include "e2p/e2p.h"
+#include "ext2fs/e2image.h"
+#include "ext2fs/qcow2.h"
+
+#include "../version.h"
+#include "nls-enable.h"
+
+#define QCOW_OFLAG_COPIED     (1LL << 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 ] [ -fr ] 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,
+				_("while allocating buffer"));
+			exit(1);
+		}
+	}
+	if (nop_flag) {
+		printf(_("Writing block %llu\n"), (unsigned long long) block);
+		if (fd != 1)
+			seek_relative(fd, blocksize);
+		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"), block);
+		else
+			com_err(program_name, err, _("error in write()"));
+
+		exit(1);
+	}
+	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 = 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 = 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 = 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 = 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 = 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 = fs->blocksize;
+
+	if (stat(device_name, &st) == 0)
+		hdr.fs_device = st.st_rdev;
+
+	if (fstat(fd, &st) == 0) {
+		hdr.image_device = st.st_dev;
+		hdr.image_inode = st.st_ino;
+	}
+	memcpy(hdr.fs_uuid, fs->super->s_uuid, sizeof(hdr.fs_uuid));
+
+	hdr.image_time = 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 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;
+
+	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 &&
+			    EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+						       EXT4_FEATURE_RO_COMPAT_GDT_CSUM))
+				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) / ((1024 * 1024) / (b))) / (d))
+
+static int print_progress(blk64_t num, blk64_t total)
+{
+	return fprintf(stderr, _("%llu / %llu blocks (%d%%)"), num, 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, _("while allocating buffer"));
+		exit(1);
+	}
+	retval = ext2fs_get_memzero(fs->blocksize, &zero_buf);
+	if (retval) {
+		com_err(program_name, retval, _("while allocating buffer"));
+		exit(1);
+	}
+	if (show_progress) {
+		fprintf(stderr, _("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,
+				_("Stopping now will destroy the filesystem, "
+				 "interrupt again if you are sure\n"));
+			if (show_progress) {
+				fprintf(stderr, _("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) {
+				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"), 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];
+		while (bscount--)
+			fputc('\b', stderr);
+		strftime(buff, 30, "%T", gmtime(&duration));
+		fprintf(stderr, _("\b\b\b\b\b\b\b\bCopied %llu / %llu "
+			 "blocks (%llu%%) in %s at %.2f MB/s       \n"),
+		       total_written, meta_blocks_count,
+		       calc_percent(total_written, meta_blocks_count), buff,
+		       calc_rate(total_written, fs->blocksize, duration));
+	}
+#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, _("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, _("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, _("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 int 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;
+
+	/* 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 += 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 sequentialy.
+	 */
+	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,
+			_("while allocating ext2_qcow2_image"));
+		exit(1);
+	}
+
+	retval = initialize_qcow2_image(fd, fs, img);
+	if (retval) {
+		com_err(program_name, retval,
+			_("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, _("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"), 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, _("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,
+			_("Programming error: multiple sequential refcount "
+			  "blocks created!\n"));
+						exit(1);
+					}
+				}
+				offset += img->cluster_size;
+				seek_set(fd, offset);
+				continue;
+			}
+
+			offset += img->cluster_size;
+		}
+	}
+	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)
+{
+	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,
+			_("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,
+				_("while allocating scramble block bitmap"));
+			exit(1);
+		}
+	}
+
+	mark_table_blocks(fs);
+	if (show_progress)
+		printf(_("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) &&
+		     ext2fs_inode_has_valid_blocks2(fs, &inode)) ||
+		    ino == fs->super->s_journal_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;
+	int fd = 0;
+	io_manager	io_ptr;
+	io_channel	io;
+
+	if (type) {
+		com_err(program_name, 0, _("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, _("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, _("while opening device file"));
+		exit(1);
+	}
+
+	ext2fs_rewrite_to_io(fs, io);
+
+	seek_set(fd, fs->image_header->offset_inode);
+
+	retval = ext2fs_image_inode_read(fs, fd, 0);
+	if (retval) {
+		com_err(image_fn, 0, "while restoring the image table");
+		exit(1);
+	}
+
+	close(fd);
+	ext2fs_close (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;
+	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;
+
+#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;
+	add_error_table(&et_ext2_error_table);
+	while ((c = getopt(argc, argv, "nrsIQafo:O:pc")) != EOF)
+		switch (c) {
+		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, _("-a 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,
+			_("Offsets are only allowed with raw images."));
+		exit(1);
+	}
+	if (move_mode && img_type != E2IMAGE_RAW) {
+		com_err(program_name, 0,
+			_("Move mode is only allowed with raw images."));
+		exit(1);
+	}
+	if (move_mode && !all_data) {
+		com_err(program_name, 0,
+			_("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, _("checking if mounted"));
+		exit(1);
+	}
+
+	if (img_type && !ignore_rw_mount &&
+	    (mount_flags & EXT2_MF_MOUNTED) &&
+	   !(mount_flags & EXT2_MF_READONLY)) {
+		fprintf(stderr, _("\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", source_offset);
+	retval = ext2fs_open2(device_name, offset_opt, open_flag, 0, 0,
+			      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);
+		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, _("QCOW2 image can not be written to "
+					   "the stdout!\n"));
+		exit(1);
+	}
+	if (fd != 1) {
+		if (fstat(fd, &st)) {
+			com_err(program_name, 0, "Can not stat output\n");
+			exit(1);
+		}
+		if (S_ISBLK(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);
+			if (ret == -QCOW_ENCRYPTED)
+				fprintf(stderr, _("Image (%s) is encrypted\n"),
+					image_fn);
+			com_err(program_name, ret,
+				_("while trying to convert qcow2 image"
+				  " (%s) into raw image (%s)"),
+				device_name, image_fn);
+		}
+		goto out;
+	}
+
+	if (check) {
+		if (img_type != E2IMAGE_RAW) {
+			fprintf(stderr, _("The -c option only supported "
+					  "in raw mode\n"));
+			exit(1);
+		}
+		if (fd == 1) {
+			fprintf(stderr, _("The -c option is not supported "
+					  "when writing to stdout\n"));
+			exit(1);
+		}
+		retval = ext2fs_get_mem(fs->blocksize, &check_buf);
+		if (retval) {
+			com_err(program_name, retval,
+				_("while allocating check_buf"));
+			exit(1);
+		}
+	}
+	if (show_progress && (img_type != E2IMAGE_RAW)) {
+		fprintf(stderr, _("The -p option only supported "
+				  "in raw mode\n"));
+		exit(1);
+	}
+	if (img_type)
+		write_raw_image_file(fs, fd, img_type, flags);
+	else
+		write_image_file(fs, fd);
+
+	ext2fs_close (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/e2fsprogs/misc/e2initrd_helper.c b/e2fsprogs/misc/e2initrd_helper.c
new file mode 100644
index 0000000..22672a3
--- /dev/null
+++ b/e2fsprogs/misc/e2initrd_helper.c
@@ -0,0 +1,396 @@
+/*
+ * 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 <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 "../version.h"
+#include "nls-enable.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 = blkid_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 = blkid_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/e2fsprogs/misc/e2label.8.in b/e2fsprogs/misc/e2label.8.in
new file mode 100644
index 0000000..aff08d9
--- /dev/null
+++ b/e2fsprogs/misc/e2label.8.in
@@ -0,0 +1,53 @@
+.\" -*- 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 filesystem
+.SH SYNOPSIS
+.B e2label
+.I device
+[
+.I new-label
+]
+.SH DESCRIPTION
+.B e2label
+will display or change the filesystem label on the ext2, ext3, or ext4 
+filesystem located on
+.I device.  
+.PP
+If the optional argument 
+.I new-label
+is not present, 
+.B e2label
+will simply display the current filesystem label.
+.PP
+If the optional argument
+.I new-label
+is present, then 
+.B e2label
+will set the filesystem label to be
+.IR new-label .
+Ext2 filesystem labels can be at most 16 characters long; if
+.I new-label 
+is longer than 16 characters, 
+.B e2label
+will truncate it and print a warning message.  
+.PP
+It is also possible to set the filesystem 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/e2fsprogs/misc/e2label.c b/e2fsprogs/misc/e2label.c
new file mode 100644
index 0000000..e96101a
--- /dev/null
+++ b/e2fsprogs/misc/e2label.c
@@ -0,0 +1,120 @@
+/*
+ * 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 <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 "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);
+	strncpy(label, sb.s_volume_name, VOLNAMSZ);
+	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/e2fsprogs/misc/e2undo.8.in b/e2fsprogs/misc/e2undo.8.in
new file mode 100644
index 0000000..4bf0798
--- /dev/null
+++ b/e2fsprogs/misc/e2undo.8.in
@@ -0,0 +1,44 @@
+.\" -*- 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 filesystem
+.SH SYNOPSIS
+.B e2undo
+[
+.B \-f
+]
+.I undo_log device
+.SH DESCRIPTION
+.B e2undo
+will replay the undo log
+.I undo_log
+for an ext2/ext3/ext4 filesystem 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 filesystem UUID and last modified time to make sure the
+undo log matches with the filesystem 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.
+.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/e2fsprogs/misc/e2undo.c b/e2fsprogs/misc/e2undo.c
new file mode 100644
index 0000000..d515373
--- /dev/null
+++ b/e2fsprogs/misc/e2undo.c
@@ -0,0 +1,224 @@
+/*
+ * 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 <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 "ext2fs/tdb.h"
+#include "ext2fs/ext2fs.h"
+#include "nls-enable.h"
+
+static unsigned char mtime_key[] = "filesystem MTIME";
+static unsigned char uuid_key[] = "filesystem UUID";
+static unsigned char blksize_key[] = "filesystem BLKSIZE";
+
+static char *prg_name;
+
+static void usage(void)
+{
+	fprintf(stderr,
+		_("Usage: %s <transaction file> <filesystem>\n"), prg_name);
+	exit(1);
+}
+
+static int check_filesystem(TDB_CONTEXT *tdb, io_channel channel)
+{
+	__u32   s_mtime;
+	__u8    s_uuid[16];
+	errcode_t retval;
+	TDB_DATA tdb_key, tdb_data;
+	struct ext2_super_block super;
+
+	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", _("Failed to read the file system data \n"));
+		return retval;
+	}
+
+	tdb_key.dptr = mtime_key;
+	tdb_key.dsize = sizeof(mtime_key);
+	tdb_data = tdb_fetch(tdb, tdb_key);
+	if (!tdb_data.dptr) {
+		retval = EXT2_ET_TDB_SUCCESS + tdb_error(tdb);
+		com_err(prg_name, retval,
+			_("Failed tdb_fetch %s\n"), tdb_errorstr(tdb));
+		return retval;
+	}
+
+	s_mtime = *(__u32 *)tdb_data.dptr;
+	if (super.s_mtime != s_mtime) {
+
+		com_err(prg_name, 0,
+			_("The file system Mount time didn't match %u\n"),
+			s_mtime);
+
+		return  -1;
+	}
+
+
+	tdb_key.dptr = uuid_key;
+	tdb_key.dsize = sizeof(uuid_key);
+	tdb_data = tdb_fetch(tdb, tdb_key);
+	if (!tdb_data.dptr) {
+		retval = EXT2_ET_TDB_SUCCESS + tdb_error(tdb);
+		com_err(prg_name, retval,
+			_("Failed tdb_fetch %s\n"), tdb_errorstr(tdb));
+		return retval;
+	}
+	memcpy(s_uuid, tdb_data.dptr, sizeof(s_uuid));
+	if (memcmp(s_uuid, super.s_uuid, sizeof(s_uuid))) {
+		com_err(prg_name, 0, "%s",
+			_("The file system UUID didn't match \n"));
+		return -1;
+	}
+
+	return 0;
+}
+
+static int set_blk_size(TDB_CONTEXT *tdb, io_channel channel)
+{
+	int block_size;
+	errcode_t retval;
+	TDB_DATA tdb_key, tdb_data;
+
+	tdb_key.dptr = blksize_key;
+	tdb_key.dsize = sizeof(blksize_key);
+	tdb_data = tdb_fetch(tdb, tdb_key);
+	if (!tdb_data.dptr) {
+		retval = EXT2_ET_TDB_SUCCESS + tdb_error(tdb);
+		com_err(prg_name, retval,
+			_("Failed tdb_fetch %s\n"), tdb_errorstr(tdb));
+		return retval;
+	}
+
+	block_size = *(int *)tdb_data.dptr;
+#ifdef DEBUG
+	printf("Block size %d\n", block_size);
+#endif
+	io_channel_set_blksize(channel, block_size);
+
+	return 0;
+}
+
+int main(int argc, char *argv[])
+{
+	int c,force = 0;
+	TDB_CONTEXT *tdb;
+	TDB_DATA key, data;
+	io_channel channel;
+	errcode_t retval;
+	int  mount_flags;
+	blk64_t  blk_num;
+	char *device_name, *tdb_file;
+	io_manager manager = unix_io_manager;
+
+#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, "f")) != EOF) {
+		switch (c) {
+			case 'f':
+				force = 1;
+				break;
+			default:
+				usage();
+		}
+	}
+
+	if (argc != optind + 2)
+		usage();
+
+	tdb_file = argv[optind];
+	device_name = argv[optind+1];
+
+	tdb = tdb_open(tdb_file, 0, 0, O_RDONLY, 0600);
+
+	if (!tdb) {
+		com_err(prg_name, errno,
+				_("Failed tdb_open %s\n"), tdb_file);
+		exit(1);
+	}
+
+	retval = ext2fs_check_if_mounted(device_name, &mount_flags);
+	if (retval) {
+		com_err(prg_name, retval, _("Error while determining whether "
+				"%s is mounted.\n"), device_name);
+		exit(1);
+	}
+
+	if (mount_flags & EXT2_MF_MOUNTED) {
+		com_err(prg_name, retval, "%s", _("e2undo should only be run "
+						"on unmounted file system\n"));
+		exit(1);
+	}
+
+	retval = manager->open(device_name,
+				IO_FLAG_EXCLUSIVE | IO_FLAG_RW,  &channel);
+	if (retval) {
+		com_err(prg_name, retval,
+				_("Failed to open %s\n"), device_name);
+		exit(1);
+	}
+
+	if (!force && check_filesystem(tdb, channel)) {
+		exit(1);
+	}
+
+	if (set_blk_size(tdb, channel)) {
+		exit(1);
+	}
+
+	for (key = tdb_firstkey(tdb); key.dptr; key = tdb_nextkey(tdb, key)) {
+		if (!strcmp((char *) key.dptr, (char *) mtime_key) ||
+		    !strcmp((char *) key.dptr, (char *) uuid_key) ||
+		    !strcmp((char *) key.dptr, (char *) blksize_key)) {
+			continue;
+		}
+
+		data = tdb_fetch(tdb, key);
+		if (!data.dptr) {
+			com_err(prg_name, 0,
+				_("Failed tdb_fetch %s\n"), tdb_errorstr(tdb));
+			exit(1);
+		}
+		blk_num = *(blk64_t *)key.dptr;
+		printf(_("Replayed transaction of size %zd at location %llu\n"),
+							data.dsize, blk_num);
+		retval = io_channel_write_blk64(channel, blk_num,
+						-data.dsize, data.dptr);
+		if (retval == -1) {
+			com_err(prg_name, retval,
+					_("Failed write %s\n"),
+					strerror(errno));
+			exit(1);
+		}
+	}
+	io_channel_close(channel);
+	tdb_close(tdb);
+
+	return 0;
+}
diff --git a/e2fsprogs/misc/e4defrag.8.in b/e2fsprogs/misc/e4defrag.8.in
new file mode 100644
index 0000000..75e1bc9
--- /dev/null
+++ b/e2fsprogs/misc/e4defrag.8.in
@@ -0,0 +1,80 @@
+.TH E4DEFRAG 8 "May 2009" "e4defrag version 2.0"
+.SH NAME
+e4defrag \- online defragmenter for ext4 filesystem
+.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 filesystem 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 filesystem.
+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 filesystem (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
+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/e2fsprogs/misc/e4defrag.c b/e2fsprogs/misc/e4defrag.c
new file mode 100644
index 0000000..d83e2e6
--- /dev/null
+++ b/e2fsprogs/misc/e4defrag.c
@@ -0,0 +1,2082 @@
+/*
+ * 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 <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 <linux/fs.h>
+#include <sys/ioctl.h>
+#include <ext2fs/fiemap.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/statfs.h>
+#include <sys/syscall.h>
+#include <sys/vfs.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];
+
+
+/* Local definitions of some syscalls glibc may not yet have */
+
+#ifndef HAVE_POSIX_FADVISE
+#warning Using locally defined posix_fadvise interface.
+
+#ifndef __NR_fadvise64_64
+#error Your kernel headers dont define __NR_fadvise64_64
+#endif
+
+/*
+ * fadvise() -		Give advice about file access.
+ *
+ * @fd:			defrag target file's descriptor.
+ * @offset:		file offset.
+ * @len:		area length.
+ * @advise:		process flag.
+ */
+static int posix_fadvise(int fd, loff_t offset, size_t len, int advise)
+{
+	return syscall(__NR_fadvise64_64, fd, offset, len, advise);
+}
+#endif /* ! HAVE_FADVISE64_64 */
+
+#ifndef HAVE_SYNC_FILE_RANGE
+#warning Using locally defined sync_file_range interface.
+
+#ifndef __NR_sync_file_range
+#ifndef __NR_sync_file_range2 /* ppc */
+#error Your kernel headers dont define __NR_sync_file_range
+#endif
+#endif
+
+/*
+ * sync_file_range() -	Sync file region.
+ *
+ * @fd:			defrag target file's descriptor.
+ * @offset:		file offset.
+ * @length:		area length.
+ * @flag:		process flag.
+ */
+int sync_file_range(int fd, loff_t offset, loff_t length, unsigned int flag)
+{
+#ifdef __NR_sync_file_range
+	return syscall(__NR_sync_file_range, fd, offset, length, flag);
+#else
+	return syscall(__NR_sync_file_range2, fd, flag, offset, length);
+#endif
+}
+#endif /* ! HAVE_SYNC_FILE_RANGE */
+
+#ifndef HAVE_FALLOCATE64
+#warning Using locally defined fallocate syscall interface.
+
+#ifndef __NR_fallocate
+#error Your kernel headers dont define __NR_fallocate
+#endif
+
+/*
+ * fallocate64() -	Manipulate file space.
+ *
+ * @fd:			defrag target file's descriptor.
+ * @mode:		process flag.
+ * @offset:		file offset.
+ * @len:		file size.
+ */
+static int fallocate64(int fd, int mode, loff_t offset, loff_t len)
+{
+	return syscall(__NR_fallocate, fd, mode, offset, len);
+}
+#endif /* ! HAVE_FALLOCATE */
+
+/*
+ * 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)
+{
+	int 	maxlen = 0;
+	int	len, ret;
+	FILE	*fp = NULL;
+	char	*mnt_type = 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;
+
+		mnt_type = realloc(mnt_type, strlen(mnt->mnt_type) + 1);
+		if (mnt_type == NULL) {
+			endmntent(fp);
+			return -1;
+		}
+		memset(mnt_type, 0, strlen(mnt->mnt_type) + 1);
+		strncpy(mnt_type, mnt->mnt_type, strlen(mnt->mnt_type));
+		strncpy(lost_found_dir, mnt->mnt_dir, PATH_MAX);
+		strncpy(devname, mnt->mnt_fsname, strlen(mnt->mnt_fsname) + 1);
+	}
+
+	endmntent(fp);
+	if (mnt_type && strcmp(mnt_type, FS_EXT4) == 0) {
+		FREE(mnt_type);
+		return 0;
+	} else {
+		FREE(mnt_type);
+		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;
+	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 = (loff_t)defrag_data.orig_start * block_size;
+	length = (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)
+		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;
+	loff_t	offset;
+
+	if (pagesize < 1)
+		return -1;
+
+	offset = (loff_t)defrag_data.orig_start * block_size;
+	offset = (offset / pagesize) * pagesize;
+
+	/* Sync file for fadvise process */
+	if (sync_file_range(fd, offset,
+		(loff_t)pagesize * page_num, sync_flag) < 0)
+		return -1;
+
+	/* 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 (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) {
+			/* 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;
+
+	/* Calcuate best extents count */
+	if (feature_incompat & EXT4_FEATURE_INCOMPAT_FLEX_BG) {
+		flex_bg_num = 1 << 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 + 24];
+	struct fiemap_extent_list *physical_list_head = NULL;
+	struct fiemap_extent_list *logical_list_head = NULL;
+
+	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,
+						ext_list_tmp->data.physical,
+						ext_list_tmp->data.logical,
+						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, size_per_ext);
+				else
+					printf("%-40s%10d/%-10d%6llu KB\n",
+						file, now_ext_count,
+						best_ext_count, 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, 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, size_per_ext);
+			else
+				printf("\033[79;0H\033[K%-40s"
+						"%10d/%-10d%6llu KB\n",
+						msg_buffer, now_ext_count,
+						best_ext_count, 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, loff_t start, 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)
+{
+	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 (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;
+	}
+
+	if (current_uid == ROOT_UID)
+		best = get_best_count(blk_count);
+	else
+		best = 1;
+
+	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 = fallocate64(donor_fd, 0,
+		  (loff_t)orig_group_tmp->start->data.logical * block_size,
+		  (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;
+	}
+
+	/* Calcuate 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	success_flag = 0;
+	char	dir_name[PATH_MAX + 1];
+	char	dev_name[PATH_MAX + 1];
+	struct stat64	buf;
+	ext2_filsys fs = NULL;
+
+	/* 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, 0, 0, block_size,
+					unix_io_manager, &fs);
+			if (ret) {
+				if (mode_flag & DETAIL) {
+					perror("Can't get super block info");
+					PRINT_FILE_NAME(argv[i]);
+				}
+				continue;
+			}
+
+			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(fs);
+		}
+
+		switch (arg_type) {
+			int mount_dir_len = 0;
+
+		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_piont_dir") */
+			if (dir_name[mount_dir_len] != '\0') {
+				/*
+				 * "e4defrag mount_piont_dir/lost+found"
+				 * or "e4defrag mount_piont_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_piont_dir/else_dir" */
+				memset(lost_found_dir, 0, PATH_MAX + 1);
+			}
+		case DEVNAME:
+			if (arg_type == DEVNAME) {
+				strncpy(lost_found_dir, dir_name,
+					strnlen(dir_name, PATH_MAX));
+				strncat(lost_found_dir, "/lost+found/",
+					PATH_MAX - strnlen(lost_found_dir,
+							   PATH_MAX));
+			}
+
+			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,
+							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,
+							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,
+						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/e2fsprogs/misc/ext4.5.in b/e2fsprogs/misc/ext4.5.in
new file mode 100644
index 0000000..98494ec
--- /dev/null
+++ b/e2fsprogs/misc/ext4.5.in
@@ -0,0 +1,257 @@
+.\" -*- 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
+ext2 \- 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
+handle mount requests for ext2 and ext3 file systems.
+.SH FILE SYSTEM FEATURES
+A file system formated for ext2, ext3, or ext4 can be have some
+collection of the follow 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.
+.RS 1.2i
+.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 \-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
+.BR nodelalloc mount option).
+.IP
+This feature requires that the
+.B extent
+features be enabled.
+.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
+This ext4 feature allows more than 65000 subdirectories per directory.
+.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 current need to reserve this much
+space.  Without this feature, the kernel will reserve the amount of
+space for features currently 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 ext_attr
+.br
+This feature enables the use of extended attributes.  This feature is
+supported by ext2, ext3, and ext4.
+.TP
+.B filetype
+.br
+This feature enables the storage file type information in directory
+entries.  This feature is supported by ext2, ext3, and ext4.
+.TP
+.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 filesystem consistency even across unclean
+shutdowns.  Setting the filesystem feature is equivalent to using the
+.B \-j
+option.  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 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_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 filesystem 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 .
+.\" .br
+.\" .B Future feature, available in e2fsprogs 1.43-WIP
+.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 descriptor 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 filesystem from being multiply mounted and is useful in
+shared storage environments.
+@QUOTA_MAN_COMMENT@.TP
+@QUOTA_MAN_COMMENT@.B quota
+@QUOTA_MAN_COMMENT@.br
+@QUOTA_MAN_COMMENT@Create quota inodes (inode #3 for userquota and inode
+@QUOTA_MAN_COMMENT@#4 for group quota) and set them in the superblock.
+@QUOTA_MAN_COMMENT@With this feature, the quotas will be enabled
+@QUOTA_MAN_COMMENT@automatically when the filesystem is mounted.
+@QUOTA_MAN_COMMENT@.IP
+@QUOTA_MAN_COMMENT@Causes the quota files (i.e., user.quota and
+@QUOTA_MAN_COMMENT@group.quota which existed
+@QUOTA_MAN_COMMENT@in the older quota design) to be hidden inodes.
+@QUOTA_MAN_COMMENT@.IP
+@QUOTA_MAN_COMMENT@.B Warning:
+@QUOTA_MAN_COMMENT@The quota feature is still under development,
+@QUOTA_MAN_COMMENT@and may not be fully supported with your kernel
+@QUOTA_MAN_COMMENT@or may have various bugs.  Please
+@QUOTA_MAN_COMMENT@see https://ext4.wiki.kernel.org/index.php/Quota
+@QUOTA_MAN_COMMENT@for more details.
+.TP
+.B resize_inode
+.br
+This file system feature indicates that space has been reserved so
+the block group descriptor table can be extended by the file system is
+resized while the file system is mounted.  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
+filesystem 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
+feature be enabled.
+.TP
+.B sparse_super
+.br
+This file system feature is set on all modern ext2, ext3, and ext4 file
+system.  It indicates that backup copies of the superblock and block
+group descriptors be present only on a few block groups, and not all of
+them.
+.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 block 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.
+.RE
+.SH SEE ALSO
+.BR mke2fs (8),
+.BR mke2fs.conf (5),
+.BR e2fsck (8),
+.BR dumpe2fs (8),
+.BR tune2fs (8),
+.BR debugfs (8)
diff --git a/e2fsprogs/misc/filefrag.8.in b/e2fsprogs/misc/filefrag.8.in
new file mode 100644
index 0000000..a6d7b27
--- /dev/null
+++ b/e2fsprogs/misc/filefrag.8.in
@@ -0,0 +1,62 @@
+.\" -*- 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 \-BeksvxX
+]
+[
+.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 filesystems, but can be
+used on files for any filesystem.
+.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 for output instead of the filesystem blocksize.
+For compatibility with earlier versions of
+.BR filefrag ,
+if
+.I blocksize
+is unspecified it defaults to 1024 bytes.
+.TP
+.B \-e
+Print output in extent format, even for block-mapped files.
+.TP
+.BI \-k
+Use 1024\-byte blocksize for output (identical to '\-b 1024').
+.TP
+.B \-s
+Sync the file before requesting the mapping.
+.TP
+.B \-v
+Be verbose when checking for file fragmentation.
+.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/e2fsprogs/misc/filefrag.c b/e2fsprogs/misc/filefrag.c
new file mode 100644
index 0000000..1a30a28
--- /dev/null
+++ b/e2fsprogs/misc/filefrag.c
@@ -0,0 +1,524 @@
+/*
+ * 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%
+ */
+
+#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
+#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>
+#include <ext2fs/ext2fs.h>
+#include <ext2fs/ext2_types.h>
+#include <ext2fs/fiemap.h>
+
+int verbose = 0;
+int blocksize;		/* Use specified blocksize (default 1kB) */
+int sync_file = 0;	/* fsync 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 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 int_log2(int arg)
+{
+	int     l = 0;
+
+	arg >>= 1;
+	while (arg) {
+		l++;
+		arg >>= 1;
+	}
+	return l;
+}
+
+static int int_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) {
+		if (errno == EPERM) {
+			fprintf(stderr, "No permission to use FIBMAP ioctl; "
+				"must have root privileges\n");
+		}
+	}
+	*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_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;
+	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;
+	physical_blk = fm_extent->fe_physical >> blk_shift;
+
+	if (expected)
+		sprintf(flags, ext_fmt == hex_fmt ? "%*llx: " : "%*llu: ",
+			physical_width, expected >> blk_shift);
+	else
+		sprintf(flags, "%.*s  ", physical_width, "                   ");
+
+	if (fm_extent->fe_flags & FIEMAP_EXTENT_UNKNOWN)
+		strcat(flags, "unknown,");
+	if (fm_extent->fe_flags & FIEMAP_EXTENT_DELALLOC)
+		strcat(flags, "delalloc,");
+	if (fm_extent->fe_flags & FIEMAP_EXTENT_DATA_ENCRYPTED)
+		strcat(flags, "encrypted,");
+	if (fm_extent->fe_flags & FIEMAP_EXTENT_NOT_ALIGNED)
+		strcat(flags, "not_aligned,");
+	if (fm_extent->fe_flags & FIEMAP_EXTENT_DATA_INLINE)
+		strcat(flags, "inline,");
+	if (fm_extent->fe_flags & FIEMAP_EXTENT_DATA_TAIL)
+		strcat(flags, "tail_packed,");
+	if (fm_extent->fe_flags & FIEMAP_EXTENT_UNWRITTEN)
+		strcat(flags, "unwritten,");
+	if (fm_extent->fe_flags & FIEMAP_EXTENT_MERGED)
+		strcat(flags, "merged,");
+
+	if (fm_extent->fe_logical + fm_extent->fe_length >= (__u64) st->st_size)
+		strcat(flags, "eof,");
+
+	/* Remove trailing comma, if any */
+	if (flags[0])
+		flags[strlen(flags) - 1] = '\0';
+
+	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,
+	       ext_len, flags);
+}
+
+static int filefrag_fiemap(int fd, int blk_shift, int *num_extents,
+			   ext2fs_struct_stat *st)
+{
+	char buf[16384];
+	struct fiemap *fiemap = (struct fiemap *)buf;
+	struct fiemap_extent *fm_ext = &fiemap->fm_extents[0];
+	int count = (sizeof(buf) - sizeof(*fiemap)) /
+			sizeof(struct fiemap_extent);
+	unsigned long long expected = 0;
+	unsigned long flags = 0;
+	unsigned int i;
+	static int fiemap_incompat_printed;
+	int fiemap_header_printed = 0;
+	int tot_extents = 0, n = 0;
+	int last = 0;
+	int rc;
+
+	memset(fiemap, 0, sizeof(struct fiemap));
+
+	if (sync_file)
+		flags |= FIEMAP_FLAG_SYNC;
+
+	if (xattr_map)
+		flags |= FIEMAP_FLAG_XATTR;
+
+	do {
+		fiemap->fm_length = ~0ULL;
+		fiemap->fm_flags = flags;
+		fiemap->fm_extent_count = count;
+		rc = ioctl(fd, FS_IOC_FIEMAP, (unsigned long) fiemap);
+		if (rc < 0) {
+			if (errno == EBADR && fiemap_incompat_printed == 0) {
+				printf("FIEMAP failed with unsupported "
+				       "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++) {
+			if (fm_ext[i].fe_logical != 0 &&
+			    fm_ext[i].fe_physical != expected) {
+				tot_extents++;
+			} else {
+				expected = 0;
+				if (!tot_extents)
+					tot_extents = 1;
+			}
+			if (verbose)
+				print_extent_info(&fm_ext[i], n, expected,
+						  blk_shift, st);
+
+			expected = fm_ext[i].fe_physical + fm_ext[i].fe_length;
+			if (fm_ext[i].fe_flags & FIEMAP_EXTENT_LAST)
+				last = 1;
+			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;
+	unsigned long		i, last_block;
+	unsigned long long	logical;
+				/* Blocks per indirect block */
+	const long		bpib = st->st_blksize / 4;
+	int			count;
+
+	if (force_extent) {
+		memset(&fm_ext, 0, sizeof(fm_ext));
+		fm_ext.fe_flags = FIEMAP_EXTENT_MERGED;
+	}
+
+	if (sync_file)
+		fsync(fd);
+
+	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) {
+			(*num_extents)++;
+			if (force_extent) {
+				print_extent_header();
+				fm_ext.fe_physical = block * st->st_blksize;
+			}
+		}
+		count++;
+		if (force_extent && last_block != 0 &&
+		    (block != last_block + 1 ||
+		     fm_ext.fe_logical + fm_ext.fe_length != logical)) {
+			print_extent_info(&fm_ext, *num_extents - 1,
+					  (last_block + 1) * st->st_blksize,
+					  blk_shift, st);
+			fm_ext.fe_logical = logical;
+			fm_ext.fe_physical = block * st->st_blksize;
+			fm_ext.fe_length = 0;
+			(*num_extents)++;
+		} else if (verbose && last_block && (block != last_block + 1)) {
+			printf("Discontinuity: Block %ld is at %lu (was %lu)\n",
+			       i, block, last_block + 1);
+			(*num_extents)++;
+		}
+		fm_ext.fe_length += st->st_blksize;
+		last_block = block;
+	}
+
+	if (force_extent)
+		print_extent_info(&fm_ext, *num_extents - 1,
+				  last_block * st->st_blksize, blk_shift, st);
+
+	return count;
+}
+
+static void frag_report(const char *filename)
+{
+	static struct statfs fsinfo;
+	ext2fs_struct_stat st;
+	int		blk_shift;
+	long		fd;
+	unsigned long	numblocks;
+	int		data_blocks_per_cyl = 1;
+	int		num_extents = 1, expected = ~0;
+	int		is_ext2 = 0;
+	static dev_t	last_device;
+	unsigned int	flags;
+	int		width;
+
+#if defined(HAVE_OPEN64) && !defined(__OSX_AVAILABLE_BUT_DEPRECATED)
+	fd = open64(filename, O_RDONLY);
+#else
+	fd = open(filename, O_RDONLY);
+#endif
+	if (fd < 0) {
+		perror("open");
+		return;
+	}
+
+#if defined(HAVE_FSTAT64) && !defined(__OSX_AVAILABLE_BUT_DEPRECATED)
+	if (fstat64(fd, &st) < 0) {
+#else
+	if (fstat(fd, &st) < 0) {
+#endif
+		close(fd);
+		perror("stat");
+		return;
+	}
+
+	if (last_device != st.st_dev) {
+		if (fstatfs(fd, &fsinfo) < 0) {
+			close(fd);
+			perror("fstatfs");
+			return;
+		}
+		if (verbose)
+			printf("Filesystem type is: %lx\n",
+			       (unsigned long) fsinfo.f_type);
+	}
+	st.st_blksize = fsinfo.f_bsize;
+	if (ioctl(fd, EXT3_IOC_GETFLAGS, &flags) < 0)
+		flags = 0;
+	if (!(flags & EXT4_EXTENTS_FL) &&
+	    ((fsinfo.f_type == 0xef51) || (fsinfo.f_type == 0xef52) ||
+	     (fsinfo.f_type == 0xef53)))
+		is_ext2++;
+
+	if (is_ext2) {
+		long cylgroups = div_ceil(fsinfo.f_blocks, fsinfo.f_bsize * 8);
+
+		if (verbose && last_device != st.st_dev)
+			printf("Filesystem cylinder groups approximately %ld\n",
+			       cylgroups);
+
+		data_blocks_per_cyl = fsinfo.f_bsize * 8 -
+					(fsinfo.f_files / 8 / cylgroups) - 3;
+	}
+	last_device = st.st_dev;
+
+	width = int_log10(fsinfo.f_blocks);
+	if (width > physical_width)
+		physical_width = width;
+
+	numblocks = (st.st_size + fsinfo.f_bsize - 1) / fsinfo.f_bsize;
+	if (blocksize != 0)
+		blk_shift = int_log2(blocksize);
+	else
+		blk_shift = int_log2(fsinfo.f_bsize);
+
+	width = int_log10(numblocks);
+	if (width > logical_width)
+		logical_width = width;
+	if (verbose)
+		printf("File size of %s is %llu (%lu block%s of %d bytes)\n",
+		       filename, (unsigned long long)st.st_size,
+		       numblocks * fsinfo.f_bsize >> blk_shift,
+		       numblocks == 1 ? "" : "s", 1 << blk_shift);
+
+	if (force_bmap ||
+	    filefrag_fiemap(fd, blk_shift, &num_extents, &st) != 0) {
+		expected = filefrag_fibmap(fd, blk_shift, &num_extents,
+					   &st, numblocks, is_ext2);
+		if (expected < 0) {
+			if (errno == EINVAL || errno == ENOTTY) {
+				fprintf(stderr, "%s: FIBMAP unsupported\n",
+					filename);
+			} else if (errno != EPERM) {
+				fprintf(stderr, "%s: FIBMAP error: %s",
+					filename, strerror(errno));
+			}
+			goto out_close;
+		}
+		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);
+}
+
+static void usage(const char *progname)
+{
+	fprintf(stderr, "Usage: %s [-b{blocksize}] [-BeklsvxX] file ...\n",
+		progname);
+	exit(1);
+}
+
+int main(int argc, char**argv)
+{
+	char **cpp;
+	int c;
+
+	while ((c = getopt(argc, argv, "Bb::eksvxX")) != EOF)
+		switch (c) {
+		case 'B':
+			force_bmap++;
+			break;
+		case 'b':
+			if (optarg) {
+				char *end;
+				blocksize = strtoul(optarg, &end, 0);
+				if (end) {
+					switch (end[0]) {
+					case 'g':
+					case 'G':
+						blocksize *= 1024;
+						/* no break */
+					case 'm':
+					case 'M':
+						blocksize *= 1024;
+						/* no break */
+					case 'k':
+					case 'K':
+						blocksize *= 1024;
+						break;
+					default:
+						break;
+					}
+				}
+			} 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':
+			force_extent++;
+			if (!verbose)
+				verbose++;
+			break;
+		case 'k':
+			blocksize = 1024;
+			break;
+		case 's':
+			sync_file++;
+			break;
+		case 'v':
+			verbose++;
+			break;
+		case 'x':
+			xattr_map++;
+			break;
+		case 'X':
+			ext_fmt = hex_fmt;
+			break;
+		default:
+			usage(argv[0]);
+			break;
+		}
+	if (optind == argc)
+		usage(argv[0]);
+	for (cpp=argv+optind; *cpp; cpp++)
+		frag_report(*cpp);
+	return 0;
+}
+#endif
diff --git a/e2fsprogs/misc/findfs.8.in b/e2fsprogs/misc/findfs.8.in
new file mode 100644
index 0000000..d44cbc7
--- /dev/null
+++ b/e2fsprogs/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 filesystem 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 filesystem which has 
+a label matching
+.I label
+or a UUID equal to 
+.IR uuid .
+If the filesystem is found, the device name for the filesystem 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/e2fsprogs/misc/findsuper.c b/e2fsprogs/misc/findsuper.c
new file mode 100644
index 0000000..b03c8aa
--- /dev/null
+++ b/e2fsprogs/misc/findsuper.c
@@ -0,0 +1,264 @@
+/*
+ * 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 figgure 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 recognised 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 <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 "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 */
+	loff_t sk=0, skl=0;
+	int fd;
+	char *s;
+	time_t tm, last = time(0);
+	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  last_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);
+
+		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.s_volume_name);
+	}
+	printf(_("\n%11Lu: finished with errno %d\n"), sk, errno);
+	close(fd);
+
+	return errno;
+}
diff --git a/e2fsprogs/misc/fsck.8.in b/e2fsprogs/misc/fsck.8.in
new file mode 100644
index 0000000..50fd8ce
--- /dev/null
+++ b/e2fsprogs/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 filesystems on different physical disk drives 
+in parallel to reduce the total amount of time needed to check all of the
+filesystems.
+.PP
+If no filesystems are specified on the command line, and the 
+.B \-A 
+option is not specified, 
+.B fsck
+will default to checking filesystems 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
+filesystems 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 filesystems that match 
+.I fslist
+are checked.  The
+.I fslist
+parameter is a comma-separated list of filesystems and options
+specifiers.  All of the filesystems in this comma-separated list may be
+prefixed by a negation operator 
+.RB ' no '
+or 
+.RB ' ! ',
+which requests that only those filesystems not listed in
+.I fslist
+will be checked.  If all of the filesystems in 
+.I fslist
+are not prefixed by a negation operator, then only those filesystems
+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 filesystems 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 filesystems 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 filesystems 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 filesystem 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 filesystem 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 filesystem 
+given as an argument to the 
+.B \-t 
+option, 
+.B fsck
+will use the specified filesystem 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 filesystem will be checked first unless the
+.B \-P
+option is specified (see below).  After that, 
+filesystems will be checked in the order specified by the 
+.I fs_passno 
+(the sixth) field in the 
+.I /etc/fstab
+file.  
+Filesystems with a 
+.I fs_passno
+value of 0 are skipped and are not checked at all.  Filesystems with a
+.I fs_passno
+value of greater than zero will be checked in order, 
+with filesystems with the lowest
+.I fs_passno 
+number being checked first.
+If there are multiple filesystems with the same pass number, 
+fsck will attempt to check them in parallel, although it will avoid running 
+multiple filesystem checks on the same physical disk.  
+.sp
+Hence, a very common configuration in 
+.I /etc/fstab
+files is to set the root filesystem to have a 
+.I fs_passno
+value of 1
+and to set all other filesystems to have a
+.I fs_passno
+value of 2.  This will allow
+.B fsck
+to automatically run filesystem 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 filesystem
+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 filesystem checkers (currently 
+only for ext2 and ext3) which support them.   Fsck will manage the
+filesystem 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 filesystems and return an exit code of 0
+for mounted filesystems.
+.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 filesystem in parallel with the other filesystems.
+This is not the safest thing in the world to do,
+since if the root filesystem 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
+filesystem 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 filesystem-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 filesystem-specific
+checkers.  If you're doing something complicated, please just
+execute the filesystem-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 filesystem-specific fsck's are not standardized.
+If in doubt, please consult the man pages of the filesystem-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 filesystem-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 filesystem-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 filesystem (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 filesystem-specific checkers, the 
+.B \-y 
+option will cause the fs-specific fsck to always attempt to fix any
+detected filesystem corruption automatically.  Sometimes an expert may
+be able to do better driving the fsck manually.  Note that 
+.B not
+all filesystem-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 filesystems in parallel,
+regardless of whether the filesystems 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/e2fsprogs/misc/fsck.c b/e2fsprogs/misc/fsck.c
new file mode 100644
index 0000000..72505d7
--- /dev/null
+++ b/e2fsprogs/misc/fsck.c
@@ -0,0 +1,1342 @@
+/*
+ * 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 <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 "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 = blkid_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, ":")) {
+	sprintf(prog, tpl, s, type);
+	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[80];
+	int  argc, i;
+	struct fsck_instance *inst, *p;
+	pid_t	pid;
+
+	inst = malloc(sizeof(struct fsck_instance));
+	if (!inst)
+		return ENOMEM;
+	memset(inst, 0, sizeof(struct fsck_instance));
+
+	sprintf(prog, "fsck.%s", type);
+	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;
+		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 skep 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 = blkid_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 ((i+1) < argc &&
+					   !strncmp(argv[i+1], "-", 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/e2fsprogs/misc/fsck.h b/e2fsprogs/misc/fsck.h
new file mode 100644
index 0000000..8a0f70e
--- /dev/null
+++ b/e2fsprogs/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 tabel 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/e2fsprogs/misc/ismounted.c b/e2fsprogs/misc/ismounted.c
new file mode 100644
index 0000000..ee662f4
--- /dev/null
+++ b/e2fsprogs/misc/ismounted.c
@@ -0,0 +1,217 @@
+/*
+ * 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 <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/e2fsprogs/misc/jfs_user.h b/e2fsprogs/misc/jfs_user.h
new file mode 100644
index 0000000..3070cd5
--- /dev/null
+++ b/e2fsprogs/misc/jfs_user.h
@@ -0,0 +1,8 @@
+#ifndef _JFS_USER_H
+#define _JFS_USER_H
+
+typedef unsigned short kdev_t;
+
+#include <ext2fs/kernel-jbd.h>
+
+#endif /* _JFS_USER_H */
diff --git a/e2fsprogs/misc/logsave.8.in b/e2fsprogs/misc/logsave.8.in
new file mode 100644
index 0000000..f0fbe41
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/misc/logsave.c b/e2fsprogs/misc/logsave.c
new file mode 100644
index 0000000..e85bd6c
--- /dev/null
+++ b/e2fsprogs/misc/logsave.c
@@ -0,0 +1,333 @@
+/*
+ * 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 <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 EGAIN/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, " died with exit status %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);
+			rc = 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/e2fsprogs/misc/lsattr.1.in b/e2fsprogs/misc/lsattr.1.in
new file mode 100644
index 0000000..7798a34
--- /dev/null
+++ b/e2fsprogs/misc/lsattr.1.in
@@ -0,0 +1,45 @@
+.\" -*- 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 \-RVadv
+]
+[
+.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 \-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/e2fsprogs/misc/lsattr.c b/e2fsprogs/misc/lsattr.c
new file mode 100644
index 0000000..43acace
--- /dev/null
+++ b/e2fsprogs/misc/lsattr.c
@@ -0,0 +1,212 @@
+/*
+ * 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 <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 "../version.h"
+#include "nls-enable.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;
+
+#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 [-RVadlv] [files...]\n"), program_name);
+	exit(1);
+}
+
+static int list_attributes (const char * name)
+{
+	unsigned long flags;
+	unsigned long generation;
+
+	if (fgetflags (name, &flags) == -1) {
+		com_err (program_name, errno, _("While reading flags on %s"),
+			 name);
+		return -1;
+	}
+	if (generation_opt) {
+		if (fgetversion (name, &generation) == -1) {
+			com_err (program_name, errno,
+				 _("While reading version on %s"),
+				 name);
+			return -1;
+		}
+		printf ("%5lu ", 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 (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;
+	while ((c = getopt (argc, argv, "RVadlv")) != 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;
+			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/e2fsprogs/misc/mke2fs-hurd.conf b/e2fsprogs/misc/mke2fs-hurd.conf
new file mode 100644
index 0000000..4f0527d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/misc/mke2fs.8.in b/e2fsprogs/misc/mke2fs.8.in
new file mode 100644
index 0000000..fea50da
--- /dev/null
+++ b/e2fsprogs/misc/mke2fs.8.in
@@ -0,0 +1,700 @@
+.\" -*- 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 filesystem
+.SH SYNOPSIS
+.B mke2fs
+[
+.B \-c
+|
+.B \-l
+.I filename
+]
+[
+.B \-b
+.I block-size
+]
+[
+.B \-D
+]
+[
+.B \-f
+.I fragment-size
+]
+[
+.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
+.IR feature [,...]
+]
+[
+.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
+]
+.I device
+[
+.I blocks-count
+]
+@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 blocks-count
+@JDEV@]
+.SH DESCRIPTION
+.B mke2fs
+is used to create an ext2, ext3, or ext4 filesystem, usually in a disk
+partition.
+.I device
+is the special file corresponding to the device (e.g
+.IR /dev/hdXX ).
+.I blocks-count
+is the number of blocks on the device.  If omitted,
+.B mke2fs
+automagically figures the file system size.  If called as
+.B mkfs.ext3
+a journal is created as if the
+.B \-j
+option was specified.
+.PP
+The defaults of the parameters for the newly created filesystem, 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 1024,
+2048 and 4096 bytes per block.  If omitted,
+block-size is heuristically determined by the filesystem size and
+the expected usage of the filesystem (see the
+.B \-T
+option).  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 filesystems 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
+.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 " extended-options"
+Set extended options for the filesystem.  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 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 filesystem for a RAID array with
+.I stride-size
+filesystem 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 filesystem 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 filesystem for a RAID array with
+.I stripe-width
+filesystem 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 resize= max-online-resize
+Reserve enough space so that the block group descriptor table can grow
+to support a filesystem 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 filesystem
+initialization noticeably, but it requires the kernel to finish
+initializing the filesystem in the background when the filesystem 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 filesystem 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
+.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
+filesystem to change based on the user running \fBmke2fs\fR.
+.TP
+.B test_fs
+Set a flag in the filesystem superblock indicating that it may be
+mounted using experimental kernel code, such as the ext4dev filesystem.
+.TP
+.BI 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 filesystem initialization. This is set
+as default.
+.TP
+.BI nodiscard
+Do not attempt to discard blocks at mkfs time.
+@QUOTA_MAN_COMMENT@.TP
+@QUOTA_MAN_COMMENT@.BI quotatype
+@QUOTA_MAN_COMMENT@Specify which quota type ('usr' or 'grp') is to be
+@QUOTA_MAN_COMMENT@initialized. This option has effect only if the
+@QUOTA_MAN_COMMENT@.B quota
+@QUOTA_MAN_COMMENT@feature is set. Without this extended option, the default
+@QUOTA_MAN_COMMENT@behavior is to initialize both user and group quotas.
+.RE
+.TP
+.BI \-f " fragment-size"
+Specify the size of fragments in bytes.
+.TP
+.B \-F
+Force
+.B mke2fs
+to create a filesystem, 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 filesystem even if the filesystem 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 filesystem.  (For administrators who are creating
+filesystems 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 filesystem.  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
+filesystem 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 filesystem, 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 filesystem after it is created, so be
+careful deciding the correct value for this parameter.  Note that resizing
+a filesystem changes the numer 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 filesystem and can also negatively impact performance.
+It is not
+possible to change this value after the filesystem is created.
+.IP
+In kernels after 2.6.10 and some
+earlier vendor kernels it is possible to utilize inodes larger than
+128 bytes to store
+extended attributes for improved performance.
+Extended attributes
+stored in large inodes are not visible with older kernels, and such
+filesystems will not be mountable with 2.4 kernels at all.  
+.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 filesystem 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 filesystem)
+stored within the filesystem.  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 filesystem) of size
+.I journal-size
+megabytes.
+The size of the journal must be at least 1024 filesystem blocks
+(i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.)
+and may be no more than 10,240,000 filesystem blocks or half the total
+file system size (whichever is smaller)
+@JDEV@.TP
+@JDEV@.BI device= external-journal
+@JDEV@Attach the filesystem 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 filesystem.
+@JDEV@In addition, while there is support for attaching
+@JDEV@multiple filesystems 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 filesystem.
+.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 filesystem 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 filesystem 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 filesystem.  The default percentage
+is 5%.
+.TP
+.BI \-M " last-mounted-directory"
+Set the last mounted directory for the filesystem.  This might be useful
+for the sake of utilities that key off of the last mounted directory to
+determine where the filesystem should be mounted.
+.TP
+.B \-n
+Causes
+.B mke2fs
+to not actually create a filesystem, but display what it
+would do if it were to create a filesystem.  This can be used to
+determine the location of the backup superblocks for a particular
+filesystem, so long as the
+.B mke2fs
+parameters that were passed when the
+filesystem 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 filesystem (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
+filesystem.  The creator field is set by default to the name of the OS the
+.B mke2fs
+executable was compiled for.
+.TP
+.B "\-O \fIfeature\fR[,...]"
+Create a filesystem with the given features (filesystem options),
+overriding the default filesystem 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 filesystem and usage types.  See the
+.BR mke2fs.conf (5)
+manual page for more details.
+The filesystem type-specific configuration setting found in the
+.I [fs_types]
+section will override the global default found in
+.IR [defaults] .
+.sp
+The filesystem 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 filesystem type being created, or in the
+.I [defaults]
+section of the configuration file.
+.sp
+The filesystem 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 ('^') or a minus ('-') character.
+Features with dependencies will not be removed successfully.
+The pseudo-filesystem feature "none" will clear all filesystem 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 filesystem revision for the new filesystem.  Note that 1.2
+kernels only support revision 0 filesystems.  The default is to
+create revision 1 filesystems.
+.TP
+.B \-S
+Write superblock and group descriptors only.  This is useful if all of
+the superblock and backup superblocks are corrupted, and a last-ditch
+recovery method is desired.  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.  It is critical to
+specify the correct filesystem blocksize when using this option,
+or there is no chance of recovery.
+.\" .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 filesystem 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 filesystem 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 filesystem options that
+should be set in the newly created filesystem, the
+resulting filesystem may not be supported by the requested
+.IR fs-type .
+(e.g., "\fBmke2fs \-t ext3 \-O extent /dev/sdXX\fR" will create a
+filesystem 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 filesystem that does not have a journal and hence will not
+be supported by the ext3 filesystem code in the Linux kernel.)
+.TP
+.BI \-T " usage-type[,...]"
+Specify how the filesystem is going to be used, so that
+.B mke2fs
+can choose optimal filesystem 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 filesystem to
+be created.  If the filesystem size is less than or equal to 3 megabytes,
+.B mke2fs
+will use the filesystem type
+.IR floppy .
+If the filesystem size is greater than 3 but less than or equal to
+512 megabytes,
+.BR mke2fs (8)
+will use the filesystem type
+.IR small .
+If the filesystem size is greater than or equal to 4 terabytes but less than
+16 terabytes,
+.BR mke2fs (8)
+will use the filesystem type
+.IR big .
+If the filesystem size is greater than or equal to 16 terabytes,
+.BR mke2fs (8)
+will use the filesystem type
+.IR huge .
+Otherwise,
+.BR mke2fs (8)
+will use the default filesystem type
+.IR default .
+.TP
+.BI \-U " UUID"
+Create the filesystem with the specified UUID.
+.TP
+.B \-v
+Verbose execution.
+.TP
+.B \-V
+Print the version number of
+.B mke2fs
+and exit.
+.SH ENVIRONMENT
+.TP
+.BI 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
+.BI MKE2FS_CONFIG
+Determines the location of the configuration file (see
+.BR mke2fs.conf (5)).
+.TP
+.BI 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
+.BI MKE2FS_DEVICE_SECTSIZE
+If set to non-zero integer value, its value is used to determine physical
+sector size of the
+.IR device .
+.TP
+.BI MKE2FS_SKIP_CHECK_MSG
+If set, do not show the message of filesystem 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 BUGS
+.B mke2fs
+accepts the
+.B \-f
+option but currently ignores it because the second
+extended file system does not support fragments yet.
+.br
+There may be other ones.  Please, report them to the author.
+.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/e2fsprogs/misc/mke2fs.c b/e2fsprogs/misc/mke2fs.c
new file mode 100644
index 0000000..ee73d39
--- /dev/null
+++ b/e2fsprogs/misc/mke2fs.c
@@ -0,0 +1,2754 @@
+/*
+ * 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 /* for inclusion of PATH_MAX in Solaris */
+
+#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
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#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 "profile.h"
+#include "prof_err.h"
+#include "../version.h"
+#include "nls-enable.h"
+#include "quota/mkquota.h"
+
+#define STRIDE_LENGTH 8
+
+#define MAX_32_NUM ((((unsigned long long) 1) << 32) - 1)
+
+#ifndef __sparc__
+#define ZAP_BOOTBLOCK
+#endif
+
+#ifndef ROOT_SYSCONFDIR
+#define ROOT_SYSCONFDIR "/etc"
+#endif
+
+#define DISCARD_STEP_MB		(2048)
+
+extern int isatty(int);
+extern FILE *fpopen(const char *cmd, const char *mode);
+
+static const char * program_name = "mke2fs";
+static const char * device_name /* = NULL */;
+
+/* Command line options */
+static int	cflag;
+static int	verbose;
+static 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 uid_t	root_uid;
+static gid_t	root_gid;
+int	journal_size;
+int	journal_flags;
+static int	lazy_itable_init;
+static char	*bad_blocks_filename = NULL;
+static __u32	fs_stride;
+static int	quotatype = -1;  /* Initialize both user and group quotas by default */
+
+static struct ext2_super_block fs_param;
+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 */
+static char **fs_types;
+
+static profile_t	profile;
+
+static int sys_page_size = 4096;
+static int linux_version_code = 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]\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] "
+	"[-jnqvDFKSV] 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;
+}
+
+static 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 ((((major * 256) + minor) * 256) + rev);
+}
+#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, 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, EXT2FS_B2C(fs, blk));
+	ext2fs_badblocks_list_iterate_end(bb_iter);
+}
+
+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);
+		}
+		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, blk, error_message(retval));
+			exit(1);
+		}
+		if (sync_kludge) {
+			if (sync_kludge == 1)
+				sync();
+			else if ((i % sync_kludge) == 0)
+				sync();
+		}
+	}
+	ext2fs_zero_blocks2(0, 0, 0, 0, 0);
+	ext2fs_numeric_progress_close(fs, &progress,
+				      _("done                            \n"));
+}
+
+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 = malloc(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))
+				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;
+
+	retval = ext2fs_create_journal_superblock(fs,
+				  ext2fs_blocks_count(fs->super), 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)"),
+				err_blk, err_count);
+			exit(1);
+		}
+		blk += c;
+		count -= c;
+		ext2fs_numeric_progress_update(fs, &progress, blk);
+	}
+	ext2fs_zero_blocks2(0, 0, 0, 0, 0);
+
+	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);
+	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 			buf[80];
+        char                    *os;
+	blk64_t			group_block;
+	dgrp_t			i;
+	int			need, col_left;
+
+	if (ext2fs_blocks_count(&fs_param) != ext2fs_blocks_count(s))
+		fprintf(stderr, _("warning: %llu blocks unused.\n\n"),
+		       ext2fs_blocks_count(&fs_param) - ext2fs_blocks_count(s));
+
+	memset(buf, 0, sizeof(buf));
+	strncpy(buf, s->s_volume_name, sizeof(s->s_volume_name));
+	printf(_("Filesystem label=%s\n"), buf);
+	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 (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+				       EXT4_FEATURE_RO_COMPAT_BIGALLOC))
+		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,
+	       ext2fs_blocks_count(s));
+	printf(_("%llu blocks (%2.2f%%) reserved for the super user\n"),
+		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 (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+				       EXT4_FEATURE_RO_COMPAT_BIGALLOC))
+		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);
+
+	if (fs->group_desc_count == 1) {
+		printf("\n");
+		return;
+	}
+
+	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", group_block);
+	}
+	printf("\n\n");
+}
+
+/*
+ * 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;
+
+	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 (!(fs_param.s_feature_incompat &
+			      EXT4_FEATURE_INCOMPAT_64BIT)) {
+				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, "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, "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);
+				}
+				param->s_feature_compat |=
+					EXT2_FEATURE_COMPAT_RESIZE_INODE;
+
+				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, "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")) {
+			if (!arg) {
+				r_usage++;
+				badopt = token;
+				continue;
+			}
+			if (!strncmp(arg, "usr", 3)) {
+				quotatype = 0;
+			} else if (!strncmp(arg, "grp", 3)) {
+				quotatype = 1;
+			} else {
+				fprintf(stderr,
+					_("Invalid quotatype parameter: %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"
+			"\tstride=<RAID per-disk data chunk in blocks>\n"
+			"\tstripe-width=<RAID stride * data disks in blocks>\n"
+			"\tresize=<resize maximum size in blocks>\n"
+			"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+			"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+			"\troot_uid=<uid of root directory>\n"
+			"\troot_gid=<gid of root directory>\n"
+			"\ttest_fs\n"
+			"\tdiscard\n"
+			"\tnodiscard\n"
+			"\tquotatype=<usr OR grp>\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);
+
+	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,
+	/* 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_MMP |
+		EXT4_FEATURE_INCOMPAT_64BIT,
+	/* 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|
+#ifdef CONFIG_QUOTA
+		EXT4_FEATURE_RO_COMPAT_QUOTA|
+#endif
+		0
+};
+
+
+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 = 0;
+	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 = 0;
+
+	if (init_list(&list))
+		return 0;
+
+	if (creator_os && (!strcasecmp(creator_os, "GNU") ||
+			   !strcasecmp(creator_os, "hurd")))
+		is_hurd = 1;
+
+	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);
+}
+
+static 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);
+}
+
+static 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 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;
+}
+
+static 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 };
+
+#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,
+			       struct ext2_super_block *fs_param,
+			       int psector_size)
+{
+	int rc = -1;
+	int blocksize;
+	blkid_probe pr;
+	blkid_topology tp;
+	unsigned long min_io;
+	unsigned long opt_io;
+	struct stat statbuf;
+
+	/* 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;
+
+	min_io = blkid_topology_get_minimum_io_size(tp);
+	opt_io = blkid_topology_get_optimal_io_size(tp);
+	blocksize = EXT2_BLOCK_SIZE(fs_param);
+	if ((min_io == 0) && (psector_size > blocksize))
+		min_io = psector_size;
+	if ((opt_io == 0) && min_io)
+		opt_io = min_io;
+	if ((opt_io == 0) && (psector_size > blocksize))
+		opt_io = psector_size;
+
+	/* setting stripe/stride to blocksize is pointless */
+	if (min_io > blocksize)
+		fs_param->s_raid_stride = min_io / blocksize;
+	if (opt_io > blocksize)
+		fs_param->s_raid_stripe_width = opt_io / blocksize;
+
+	rc = blkid_topology_get_alignment_offset(tp);
+out:
+	blkid_free_probe(pr);
+	return rc;
+}
+#endif
+
+static void PRS(int argc, char *argv[])
+{
+	int		b, c;
+	int		cluster_size = 0;
+	char 		*tmp, **cpp;
+	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;
+	unsigned long long num_inodes = 0; /* unsigned long long to catch too-large input */
+	errcode_t	retval;
+	char *		oldpath = getenv("PATH");
+	char *		extended_opts = 0;
+	char *		fs_type = 0;
+	char *		usage_types = 0;
+	blk64_t		dev_size;
+	/*
+	 * 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;
+#ifdef __linux__
+	struct 		utsname ut;
+#endif
+	long		sysval;
+	int		s_opt = -1, r_opt = -1;
+	char		*fs_features = 0;
+	int		use_bsize;
+	char		*newpath;
+	int		pathlen = sizeof(PATH_SET) + 1;
+
+	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);
+
+	tmp = getenv("MKE2FS_SYNC");
+	if (tmp)
+		sync_kludge = atoi(tmp);
+
+	/* 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 ((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 */
+
+#ifdef __linux__
+	if (uname(&ut)) {
+		perror("uname");
+		exit(1);
+	}
+	linux_version_code = parse_version_number(ut.release);
+	if (linux_version_code && linux_version_code < (2*65536 + 2*256))
+		fs_param.s_rev_level = 0;
+#endif
+
+	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:cg:i:jl:m:no:qr:s:t:vC:DE:FG:I:J:KL:M:N:O:R:ST:U:V")) != 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':
+			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 '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);
+			}
+			break;
+		case 'i':
+			inode_ratio = strtoul(optarg, &tmp, 0);
+			if (inode_ratio < EXT2_MIN_BLOCK_SIZE ||
+			    inode_ratio > EXT2_MAX_BLOCK_SIZE * 1024 ||
+			    *tmp) {
+				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;
+			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;
+			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':
+			fs_features = 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);
+			}
+			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;
+		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 = unix_io_manager;
+		} else
+#endif
+			io_ptr = unix_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(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();
+
+	if (!force)
+		check_plausibility(device_name);
+	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 && (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 && (fs_blocks_count > dev_size)) {
+		com_err(program_name, 0, "%s",
+			_("Filesystem larger than apparent device size."));
+		proceed_question();
+	}
+
+	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);
+
+	/*
+	 * 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,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",
+					      "");
+	}
+	edit_feature(fs_features ? fs_features : tmp,
+		     &fs_param.s_feature_compat);
+	if (tmp)
+		free(tmp);
+
+	/* 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 ((linux_version_code < (2*65536 + 6*256)) &&
+			    (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) &&
+	    !(fs_param.s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT) &&
+	    get_bool_from_profile(fs_types, "auto_64-bit_support", 0)) {
+		fs_param.s_feature_incompat |= EXT4_FEATURE_INCOMPAT_64BIT;
+		fs_param.s_feature_compat &= ~EXT2_FEATURE_COMPAT_RESIZE_INODE;
+	}
+	if ((fs_blocks_count > MAX_32_NUM) &&
+	    !(fs_param.s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)) {
+		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, fs_blocks_count, device_name,
+			EXT2_BLOCK_SIZE(&fs_param));
+		exit(1);
+	}
+
+	ext2fs_blocks_count_set(&fs_param, fs_blocks_count);
+
+	if (fs_param.s_feature_incompat & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) {
+		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);
+		}
+		fs_param.s_feature_ro_compat |=
+			EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
+	} else if (s_opt == 0)
+		fs_param.s_feature_ro_compat &=
+			~EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
+
+	if (journal_size != 0) {
+		if (r_opt == EXT2_GOOD_OLD_REV) {
+			fprintf(stderr, "%s", _("Journals not supported with "
+						"revision 0 filesystems\n"));
+			exit(1);
+		}
+		fs_param.s_feature_compat |=
+			EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+	}
+
+	/* 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 (fs_param.s_feature_incompat &
+	    EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) {
+		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 = 0;
+ 	}
+
+	/* Check the user's mkfs options for 64bit */
+	if ((fs_param.s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT) &&
+	    !(fs_param.s_feature_incompat & EXT3_FEATURE_INCOMPAT_EXTENTS)) {
+		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 ((fs_param.s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) &&
+	    ((tmp = getenv("MKE2FS_FIRST_META_BG"))))
+		fs_param.s_first_meta_bg = atoi(tmp);
+	if (fs_param.s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_BIGALLOC) {
+		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, &fs_param, psector_size);
+	if (retval < 0) {
+		fprintf(stderr,
+			_("warning: Unable to get device geometry for %s\n"),
+			device_name);
+	} else if (retval) {
+		printf(_("%s alignment is offset by %lu bytes.\n"),
+		       device_name, retval);
+		printf(_("This may result in very poor performance, "
+			  "(re)-partitioning suggested.\n"));
+	}
+#endif
+
+	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 (fs_param.s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+		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();
+		}
+		fprintf(stderr, _("Warning: %d-byte blocks too big for system "
+				  "(max %d), forced to continue\n"),
+			blocksize, sys_page_size);
+	}
+
+	lazy_itable_init = 0;
+	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;
+
+	/* 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);
+
+	/* Can't support bigalloc feature without extents feature */
+	if ((fs_param.s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_BIGALLOC) &&
+	    !(fs_param.s_feature_incompat & EXT3_FEATURE_INCOMPAT_EXTENTS)) {
+		com_err(program_name, 0, "%s",
+			_("Can't support bigalloc feature without "
+			  "extents feature"));
+		exit(1);
+	}
+
+	if ((fs_param.s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) &&
+	    (fs_param.s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INODE)) {
+		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 &&
+	    (fs_param.s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_BIGALLOC))
+		fprintf(stderr, "%s", _("\nWarning: the bigalloc feature is "
+				  "still under development\n"
+				  "See https://ext4.wiki.kernel.org/"
+				  "index.php/Bigalloc for more information\n\n"));
+
+	if (!quiet &&
+	    (fs_param.s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_QUOTA))
+		fprintf(stderr, "%s", _("\nWarning: the quota feature is "
+				  "still under development\n"
+				  "See https://ext4.wiki.kernel.org/"
+				  "index.php/Quota for more information\n\n"));
+
+	/* Since sparse_super is the default, we would only have a problem
+	 * here if it was explicitly disabled.
+	 */
+	if ((fs_param.s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INODE) &&
+	    !(fs_param.s_feature_ro_compat&EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)) {
+		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 (fs_param.s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_BIGALLOC) {
+		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 && (fs_param.s_feature_incompat &
+			      EXT4_FEATURE_INCOMPAT_FLEX_BG))
+		flex_bg_size = get_int_from_profile(fs_types,
+						    "flex_bg_size", 16);
+	if (flex_bg_size) {
+		if (!(fs_param.s_feature_incompat &
+		      EXT4_FEATURE_INCOMPAT_FLEX_BG)) {
+			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;
+	}
+
+	/* 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 (fs_param.s_feature_incompat &
+			    EXT4_FEATURE_INCOMPAT_64BIT)
+				num_inodes = MAX_32_NUM;
+			else {
+				com_err(program_name, 0,
+					_("too many inodes (%llu), raise "
+					  "inode ratio?"), n);
+				exit(1);
+			}
+		}
+	} else if (num_inodes > MAX_32_NUM) {
+		com_err(program_name, 0,
+			_("too many inodes (%llu), specify < 2^32 inodes"),
+			  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);
+
+	free(fs_type);
+	free(usage_types);
+}
+
+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 = unix_io_manager;
+	int csum_flag, force_undo;
+
+	csum_flag = EXT2_HAS_RO_COMPAT_FEATURE(&fs_param,
+					       EXT4_FEATURE_RO_COMPAT_GDT_CSUM);
+	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;
+
+	/*
+	 * 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 (!access(tdb_file, F_OK)) {
+		if (unlink(tdb_file) < 0) {
+			retval = errno;
+			goto errout;
+		}
+	}
+
+	set_undo_io_backing_manager(*io_ptr);
+	*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);
+	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;
+	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, fs->blocksize);
+	if (retval)
+		return retval;
+	cur = fs->blocksize;
+
+	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	cluster, num_clusters, tot_free;
+	unsigned num = 0;
+	int	grp_free, num_free, group;
+
+	num_clusters = EXT2FS_B2C(fs, ext2fs_blocks_count(fs->super));
+	tot_free = num_free = group = grp_free = 0;
+	for (cluster = EXT2FS_B2C(fs, fs->super->s_first_data_block);
+	     cluster < num_clusters; cluster++) {
+		if (!ext2fs_test_block_bitmap2(fs->block_map,
+					       EXT2FS_C2B(fs, cluster))) {
+			grp_free++;
+			tot_free++;
+		}
+		num++;
+		if ((num == fs->super->s_clusters_per_group) ||
+		    (cluster == num_clusters-1)) {
+			ext2fs_bg_free_blocks_count_set(fs, group, grp_free);
+			ext2fs_group_desc_csum_set(fs, group);
+			num = 0;
+			grp_free = 0;
+			group++;
+		}
+	}
+	ext2fs_free_blocks_count_set(fs->super, EXT2FS_C2B(fs, tot_free));
+}
+
+static int create_quota_inodes(ext2_filsys fs)
+{
+	quota_ctx_t qctx;
+
+	quota_init_context(&qctx, fs, -1);
+	quota_compute_usage(qctx);
+	quota_write_inode(qctx, quotatype);
+	quota_release_context(&qctx);
+
+	return 0;
+}
+
+int main (int argc, char *argv[])
+{
+	errcode_t	retval = 0;
+	ext2_filsys	fs;
+	badblocks_list	bb_list = 0;
+	unsigned int	journal_blocks;
+	unsigned int	i, checkinterval;
+	int		max_mnt_count;
+	int		val, hash_alg;
+	int		flags;
+	int		old_bitmaps;
+	io_manager	io_ptr;
+	char		tdb_string[40];
+	char		*hash_alg_str;
+	int		itable_zeroed = 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
+	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;
+
+	if (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;
+	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);
+	}
+
+	/* Calculate journal blocks */
+	if (!journal_device && ((journal_size) ||
+		(fs_param.s_feature_compat &
+		 EXT3_FEATURE_COMPAT_HAS_JOURNAL)))
+		journal_blocks = figure_journal_size(journal_size, fs);
+
+	/* Can't undo discard ... */
+	if (!noaction && discard && (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;
+		}
+	}
+
+	sprintf(tdb_string, "tdb_data_size=%d", fs->blocksize <= 4096 ?
+		32768 : fs->blocksize * 8);
+	io_channel_set_options(fs->io, tdb_string);
+
+	if (fs_param.s_flags & EXT2_FLAGS_TEST_FILESYS)
+		fs->super->s_flags |= EXT2_FLAGS_TEST_FILESYS;
+
+	if ((fs_param.s_feature_incompat &
+	     (EXT3_FEATURE_INCOMPAT_EXTENTS|EXT4_FEATURE_INCOMPAT_FLEX_BG)) ||
+	    (fs_param.s_feature_ro_compat &
+	     (EXT4_FEATURE_RO_COMPAT_HUGE_FILE|EXT4_FEATURE_RO_COMPAT_GDT_CSUM|
+	      EXT4_FEATURE_RO_COMPAT_DIR_NLINK|
+	      EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE)))
+		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 (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);
+
+	/*
+	 * 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;
+	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)
+		fs->super->s_feature_incompat &=
+			~EXT2_FEATURE_INCOMPAT_FILETYPE;
+
+	/*
+	 * Set the volume label...
+	 */
+	if (volume_label) {
+		memset(fs->super->s_volume_name, 0,
+		       sizeof(fs->super->s_volume_name));
+		strncpy(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(fs->super->s_last_mounted, mount_dir,
+			sizeof(fs->super->s_last_mounted));
+	}
+
+	if (!quiet || noaction)
+		show_stats(fs);
+
+	if (noaction)
+		exit(0);
+
+	if (fs->super->s_feature_incompat &
+	    EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) {
+		create_journal_dev(fs);
+		exit(ext2fs_close(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: "));
+	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"));
+
+	retval = ext2fs_convert_subcluster_bitmap(fs, &fs->block_map);
+	if (retval) {
+		com_err(program_name, retval, "%s",
+			_("\n\twhile converting subcluster bitmap"));
+		exit(1);
+	}
+
+	if (super_only) {
+		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 (fs->super->s_feature_ro_compat &
+		    EXT4_FEATURE_RO_COMPAT_GDT_CSUM) {
+			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"),
+				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 (fs->super->s_feature_compat &
+		    EXT2_FEATURE_COMPAT_RESIZE_INODE) {
+			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 (!force)
+			check_plausibility(journal_device);
+		check_mount(journal_device, force, _("journal"));
+
+		retval = ext2fs_open(journal_device, EXT2_FLAG_RW|
+				     EXT2_FLAG_JOURNAL_DEV_OK, 0,
+				     fs->blocksize, unix_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(jfs);
+		free(journal_device);
+	} else if ((journal_size) ||
+		   (fs_param.s_feature_compat &
+		    EXT3_FEATURE_COMPAT_HAS_JOURNAL)) {
+		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 (!journal_blocks) {
+			fs->super->s_feature_compat &=
+				~EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+			goto no_journal;
+		}
+		if (!quiet) {
+			printf(_("Creating journal (%u blocks): "),
+			       journal_blocks);
+			fflush(stdout);
+		}
+		retval = ext2fs_add_journal_inode(fs, journal_blocks,
+						  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 &&
+	    fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_MMP) {
+		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);
+	}
+
+	if (EXT2_HAS_RO_COMPAT_FEATURE(&fs_param,
+				       EXT4_FEATURE_RO_COMPAT_BIGALLOC))
+		fix_cluster_bg_counts(fs);
+	if (EXT2_HAS_RO_COMPAT_FEATURE(&fs_param,
+				       EXT4_FEATURE_RO_COMPAT_QUOTA))
+		create_quota_inodes(fs);
+
+	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(fs);
+	if (retval) {
+		fprintf(stderr, "%s",
+			_("\nWarning, had trouble writing out superblocks."));
+	} 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/e2fsprogs/misc/mke2fs.conf.5.in b/e2fsprogs/misc/mke2fs.conf.5.in
new file mode 100644
index 0000000..0625d0e
--- /dev/null
+++ b/e2fsprogs/misc/mke2fs.conf.5.in
@@ -0,0 +1,431 @@
+.\" -*- 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 filesystems.
+.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 [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 an command-line option provided by the user.
+.TP 
+.I [fs_types]
+Contains relations which define defaults that should be used for specific
+filesystem types.  The filesystem type can be specified explicitly using
+the 
+.B -T
+option to
+.BR mke2fs (8).
+.SH THE [defaults] STANZA
+The following relations are defined in the 
+.I [defaults]
+stanza.
+.TP
+.I base_features
+This relation specifies the filesystems features which are enabled in
+newly created filesystems.  It may be overridden by the
+.I base_features
+relation found in the filesystem or usage type subsection of
+the
+.I [fs_types] 
+stanza.
+.TP
+.I default_features
+This relation specifies a set of features that should be added or
+removed to the features listed in the
+.I base_features
+relation.  It may be overridden by the filesystem-specific 
+.I default_features
+in the filesystem or usage type subsection of
+.IR [fs_types] ,
+and by the 
+.B -O
+command-line option
+to 
+.BR mke2fs (8).
+.TP
+.I enable_periodic_fsck
+This boolean relation specifies whether periodic filesystem 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 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 filesystem image
+because the inode table isn't being initialized lazily.
+.TP
+.I fs_type
+This relation specifies the default filesystem 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 does not specify a default filesystem type, mke2fs will use a
+default filesystem type of
+.IR ext3
+if a journal was requested via a command-line option, or
+.I ext2
+if not.
+.TP
+.I blocksize
+This relation specifies the default blocksize if the user does not
+specify a blocksize on the command line, and the filesystem-type
+specific section of the configuration file does not specify a blocksize.
+.TP
+.I hash_alg
+This relation specifies the default hash algorithm used for the
+new filesystems with hashed b-tree directories.  Valid algorithms
+accepted are:
+.IR legacy ,
+.IR half_md4 ,
+and
+.IR tea .
+.TP
+.I inode_ratio
+This relation specifies the default inode ratio if the user does not
+specify one on the command line, and the filesystem-type
+specific section of the configuration file does not specify a default
+inode ratio.
+.TP
+.I inode_size
+This relation specifies the default inode size if the user does not
+specify one on the command line, and the filesystem-type
+specific section of the configuration file does not specify a default
+inode size.
+.TP
+.I reserved_ratio
+This relation specifies the default percentage of filesystem blocks
+reserved for the super-user, if the user does not
+specify one on the command line, and the filesystem-type
+specific section of the configuration file does not specify a default
+reserved ratio. This value can be a floating point number.
+.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.
+.SH THE [fs_types] STANZA
+Each tag in the
+.I [fs_types] 
+stanza names a filesystem 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 filesystem
+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 filesystem 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 filesystem type of ext4 will be used.  If the filesystem 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 filesystem  will have an inode size of 128.
+.P
+The exception to this resolution is the
+.I features
+tag, which is specifies a set of changes to the features used by the
+filesystem, 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 filesystem feature set
+consisting of the sparse_super, filetype, resize_inode, dir_index,
+extents_and flex_bg features.
+.P
+For each filesystem type, the following tags may be used in that 
+fs_type's subsection:
+.TP
+.I base_features
+This relation specifies the features which are initially enabled for this
+filesystem 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 features
+This relation specifies a comma-separated list of features edit
+requests which modify the feature set
+used by the newly constructed filesystem.  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 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 fully initialized by 
+.BR mke2fs (8).
+This speeds up filesystem
+initialization noticeably, but it requires the kernel to finish
+initializing the filesystem in the background when the filesystem is
+first mounted.
+.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 filesystem 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 filesystems 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 filesystem.
+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 filesystem 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-filesystem type basis.
+.TP
+.I discard
+This boolean relation specifies whether the
+.BR mke2fs (8)
+should attempt to discard device prior to filesystem 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)
+.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/e2fsprogs/misc/mke2fs.conf.in b/e2fsprogs/misc/mke2fs.conf.in
new file mode 100644
index 0000000..0871f77
--- /dev/null
+++ b/e2fsprogs/misc/mke2fs.conf.in
@@ -0,0 +1,53 @@
+[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 = 256
+	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
+	}
+	ext4dev = {
+		features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
+		inode_size = 256
+		options = test_fs=1
+	}
+	small = {
+		blocksize = 1024
+		inode_size = 128
+		inode_ratio = 4096
+	}
+	floppy = {
+		blocksize = 1024
+		inode_size = 128
+		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
+	}
diff --git a/e2fsprogs/misc/mklost+found.8.in b/e2fsprogs/misc/mklost+found.8.in
new file mode 100644
index 0000000..712740c
--- /dev/null
+++ b/e2fsprogs/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 filesystem.
+.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 filesystem, it does not need to allocate blocks in
+the filesystem to store a large number of unlinked files.  This ensures that
+.B e2fsck
+will not have to allocate data blocks in the filesystem 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/e2fsprogs/misc/mklost+found.c b/e2fsprogs/misc/mklost+found.c
new file mode 100644
index 0000000..db7d868
--- /dev/null
+++ b/e2fsprogs/misc/mklost+found.c
@@ -0,0 +1,86 @@
+/*
+ * 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 <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 "nls-enable.h"
+
+#define LPF "lost+found"
+
+int main (int argc, char ** argv)
+{
+	char name [EXT2_NAME_LEN];
+	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/e2fsprogs/misc/nls-enable.h b/e2fsprogs/misc/nls-enable.h
new file mode 100644
index 0000000..a91dcc1
--- /dev/null
+++ b/e2fsprogs/misc/nls-enable.h
@@ -0,0 +1,21 @@
+#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
diff --git a/e2fsprogs/misc/partinfo.c b/e2fsprogs/misc/partinfo.c
new file mode 100644
index 0000000..5961654
--- /dev/null
+++ b/e2fsprogs/misc/partinfo.c
@@ -0,0 +1,77 @@
+/*
+ * partinfo.c
+ *
+ * Originally written by Alain Knaff, <alknaff@innet.lu>.
+ *
+ * Cleaned up by Theodore Ts'o, <tytso@mit.edu>.
+ *
+ */
+
+#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 "nls-enable.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/e2fsprogs/misc/profile-to-c.awk b/e2fsprogs/misc/profile-to-c.awk
new file mode 100644
index 0000000..f964efd
--- /dev/null
+++ b/e2fsprogs/misc/profile-to-c.awk
@@ -0,0 +1,12 @@
+#!/bin/awk
+BEGIN {
+  printf("const char *mke2fs_default_profile = \n");
+}
+
+{
+  printf("  \"%s\\n\"\n", $0);
+}
+
+END {
+  printf(";\n", str)
+}
diff --git a/e2fsprogs/misc/tune2fs.8.in b/e2fsprogs/misc/tune2fs.8.in
new file mode 100644
index 0000000..da21080
--- /dev/null
+++ b/e2fsprogs/misc/tune2fs.8.in
@@ -0,0 +1,696 @@
+.\" 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 filesystem parameters on ext2/ext3/ext4 filesystems
+.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 \-j
+]
+[
+.B \-J
+.I journal-options
+]
+[
+.B \-m
+.I reserved-blocks-percentage
+]
+[
+.B \-o
+.RI [^]mount-options [,...]
+]
+[
+.B \-r
+.I reserved-blocks-count
+]
+[
+.B \-s
+.I sparse-super-flag
+]
+[
+.B \-u
+.I user
+]
+[
+.B \-g
+.I group
+]
+[
+.B \-C
+.I mount-count
+]
+[
+.B \-E
+.I extended-options
+]
+[
+.B \-L
+.I volume-name
+]
+[
+.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
+]
+device
+.SH DESCRIPTION
+.BI tune2fs
+allows the system administrator to adjust various tunable filesystem 
+parameters on Linux ext2, ext3, or ext4 filesystems.  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-name\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 filesystem will be checked by 
+.BR e2fsck (8).  
+If
+.I max-mount-counts
+is 0 or \-1, the number of times the filesystem is mounted will be disregarded 
+by
+.BR e2fsck (8)
+and the kernel.
+.sp
+Staggering the mount-counts at which filesystems are forcibly
+checked will avoid all filesystems being checked at one time
+when using journaled filesystems.
+.sp
+You should strongly consider the consequences of disabling
+mount-count-dependent checking entirely.  Bad disk drives, cables,
+memory, and kernel bugs could all corrupt a filesystem without
+marking the filesystem dirty or in error.  If you are using
+journaling on your filesystem, your filesystem will
+.B never
+be marked dirty, so it will not normally be checked.  A
+filesystem error detected by the kernel will still force
+an fsck on the next reboot, but it may already be too late
+to prevent data loss at that point.
+.sp
+See also the
+.B \-i
+option for time-dependent checking.
+.TP
+.BI \-C " mount-count"
+Set the number of times the filesystem 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 filesystem at the next reboot.
+.TP
+.BI \-e " error-behavior"
+Change the behavior of the kernel code when errors are detected.
+In all cases, a filesystem error will cause
+.BR e2fsck (8)
+to check the filesystem 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 filesystem read-only.
+.TP
+.B panic
+Cause a kernel panic.
+.RE
+.TP
+.BI \-E " extended-options"
+Set extended options for the filesystem.  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 filesystem 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 filesystem for a RAID array with
+.I stride-size
+filesystem blocks. This is the number of blocks read or written to disk
+before moving to next disk. This mostly affects placement of filesystem
+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 filesystem for a RAID array with
+.I stripe-width
+filesystem 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 filesystems with hashed b-tree
+directories.  Valid algorithms accepted are:
+.IR legacy ,
+.IR half_md4 ,
+and
+.IR tea .
+.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
+.B test_fs
+Set a flag in the filesystem superblock indicating that it may be
+mounted using experimental kernel code, such as the ext4dev filesystem.
+.TP
+.B ^test_fs
+Clear the test_fs flag, indicating the filesystem should only be mounted
+using production-level filesystem 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
+filesystem feature from a filesystem which has 
+an external journal (or is corrupted
+such that it appears to have an external journal), but that 
+external journal is not available.   
+.sp
+.B WARNING:
+Removing an external journal from a filesystem which was not cleanly unmounted
+without first replaying the external journal can result in
+severe data loss and filesystem corruption.
+.TP
+.BI \-g " group"
+Set the group which can use the reserved filesystem 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 filesystem 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
+It is strongly recommended that either
+.B \-c
+(mount-count-dependent) or
+.B \-i
+(time-dependent) checking be enabled to force periodic full
+.BR e2fsck (8)
+checking of the filesystem.  Failure to do so may lead to filesystem
+corruption (due to bad disks, cables, memory, or kernel bugs) going
+unnoticed, ultimately resulting in data loss or corruption.
+.TP
+.B \-j
+Add an ext3 journal to the filesystem.  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 filesystem) 
+stored within the filesystem.  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 filesystem, an
+immutable file,
+.BR .journal ,
+will be created in the top-level directory of the filesystem, as it is
+the only safe way to create the journal inode while the filesystem is
+mounted.  While the ext3 journal is visible, it is not safe to
+delete it, or modify it while the filesystem is mounted; for this
+reason the file is marked immutable.
+While checking unmounted filesystems, 
+.BR e2fsck (8)
+will automatically move 
+.B .journal
+files to the invisible, reserved journal inode.  For all filesystems
+except for the root filesystem,  this should happen automatically and
+naturally during the next reboot cycle.  Since the root filesystem 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 filesystem
+to ext3 if the  
+.BR /etc/fstab
+file specifies the ext3 filesystem for the root filesystem in order to
+avoid requiring the use of a rescue floppy to add an ext3 journal to
+the root filesystem.
+.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 filesystem of size
+.I journal-size
+megabytes.   The size of the journal must be at least 1024 filesystem blocks
+(i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.)
+and may be no more than 102,400 filesystem blocks.
+There must be enough free space in the filesystem to create a journal of
+that size.
+@JDEV@.TP
+@JDEV@.BI device= external-journal
+@JDEV@Attach the filesystem 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 filesystems which will be using it.
+@JDEV@In addition, while there is support for attaching
+@JDEV@multiple filesystems 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 filesystem.
+.TP
+.B \-l
+List the contents of the filesystem 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 filesystem.  
+Ext2 filesystem 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.  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 filesystem which may only be allocated
+by privileged processes.   Reserving some number of filesystem blocks 
+for use by privileged processes is done 
+to avoid filesystem 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 filesystem.  Normally, the default percentage 
+of reserved blocks is 5%.
+.TP
+.BI \-M " last-mounted-directory"
+Set the last-mounted directory for the filesystem.
+.TP
+.BR \-o " [^]\fImount-option\fR[,...]"
+Set or clear the indicated default mount options in the filesystem.
+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 filesystem's superblock; 
+mount options without a prefix character or prefixed with a plus 
+character ('+') will be added to the filesystem.
+.IP
+The following mount options can be set or cleared using
+.BR tune2fs :
+.RS 1.2i
+.TP
+.B debug
+Enable debugging code for this filesystem.
+.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 filesystem is mounted with journalling enabled, all data
+(not just metadata) is committed into the journal prior to being written
+into the main filesystem.
+.TP
+.B journal_data_ordered
+When the filesystem is mounted with journalling 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 filesystem is mounted with journalling enabled, data may be
+written into the main filesystem 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 filesystem features (options) in the filesystem.
+More than one filesystem feature can be cleared or set by separating
+features with commas.  Filesystem features prefixed with a 
+caret character ('^') will be cleared in the filesystem's superblock; 
+filesystem features without a prefix character or prefixed with a plus 
+character ('+') will be added to the filesystem.  For a detailed
+description of the file system features, please see the man page
+.BR ext4 (5).
+.IP
+The following filesystem features can be set or cleared using
+.BR tune2fs :
+.RS 1.2i
+.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 extent
+Enable the use of extent trees to store the location of data blocks in inodes.
+.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 filesystem consistency even across unclean shutdowns.
+Setting the filesystem feature is equivalent to using the 
+.B \-j
+option.
+.TP
+.B huge_file
+Support files larger than 2 terabytes in size.
+.TP
+.B large_file
+Filesystem can contain files that are greater than 2GB.
+.TP
+.B resize_inode
+Reserve space so the block group descriptor table may grow in the
+future.
+.B Tune2fs 
+only supports clearing this filesystem feature.
+.TP
+.B mmp
+Enable or disable multiple mount protection (MMP) feature.
+@QUOTA_MAN_COMMENT@.TP
+@QUOTA_MAN_COMMENT@.B quota
+@QUOTA_MAN_COMMENT@Enable internal file system quota inodes.
+.TP
+.B sparse_super
+Limit the number of backup superblocks to save space on large filesystems.
+.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 filesystem, to reduce
+.BR e2fsck (8)
+time.  This 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.
+.RE
+.IP
+After setting or clearing 
+.BR sparse_super ,
+.BR uninit_bg ,
+.BR filetype ,
+or
+.B resize_inode
+filesystem features,
+.BR e2fsck (8)
+must be run on the filesystem to return the filesystem 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 filesystem features may prevent the filesystem from being
+mounted by kernels which do not support those features.  In particular, the
+.BR uninit_bg
+and
+.BR flex_bg
+features are only supported by the ext4 filesystem.
+.TP
+.BI \-p " mmp_check_interval"
+Set the desired MMP check interval in seconds. It is 5 seconds by default.
+.TP
+.BI \-r " reserved-blocks-count"
+Set the number of reserved filesystem 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
+.BR [^]usrquota
+Sets/clears user quota inode in the superblock.
+.TP
+.BR [^]grpquota
+Sets/clears group quota inode in the superblock.
+.RE
+.TP
+.BI \-T " time-last-checked"
+Set the time the filesystem 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 filesystem, and then check the filesystem 
+during off hours to make sure it hasn't been corrupted due to 
+hardware problems, etc.  If the filesystem was clean, then this option can 
+be used to set the last checked time on the original filesystem.  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 filesystem 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 filesystem 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 filesystem 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.
+.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/e2fsprogs/misc/tune2fs.c b/e2fsprogs/misc/tune2fs.c
new file mode 100644
index 0000000..a893c6c
--- /dev/null
+++ b/e2fsprogs/misc/tune2fs.c
@@ -0,0 +1,2274 @@
+/*
+ * 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 <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> */
+#endif
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <libgen.h>
+#include <limits.h>
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "et/com_err.h"
+#include "uuid/uuid.h"
+#include "e2p/e2p.h"
+#include "jfs_user.h"
+#include "util.h"
+#include "blkid/blkid.h"
+#include "quota/mkquota.h"
+
+#include "../version.h"
+#include "nls-enable.h"
+
+#define QOPT_ENABLE	(1)
+#define QOPT_DISABLE	(-1)
+
+extern int ask_yn(const char *string, int def);
+
+const char *program_name = "tune2fs";
+char *device_name;
+char *new_label, *new_last_mounted, *new_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 usrquota, grpquota;
+
+int journal_size, journal_flags;
+char *journal_device;
+
+static struct list_head blk_move_list;
+
+struct blk_move {
+	struct list_head list;
+	blk64_t old_loc;
+	blk64_t new_loc;
+};
+
+
+static const char *please_fsck = N_("Please run e2fsck on the filesystem.\n");
+
+#ifdef CONFIG_BUILD_FINDFS
+void do_findfs(int argc, char **argv);
+#endif
+
+static void usage(void)
+{
+	fprintf(stderr,
+		_("Usage: %s [-c max_mounts_count] [-e errors_behavior] "
+		  "[-g group]\n"
+		  "\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+		  "\t[-m reserved_blocks_percent] "
+		  "[-o [^]mount_options[,...]] [-p mmp_update_interval]\n"
+		  "\t[-r reserved_blocks_count] [-u user] [-C mount_count] "
+		  "[-L volume_label]\n"
+		  "\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
+#ifdef CONFIG_QUOTA
+		  "\t[-Q quota_options]\n"
+#endif
+		  "\t[-E extended-option[,...]] [-T last_check_time] "
+		  "[-U UUID]\n\t[ -I new_inode_size ] device\n"), program_name);
+	exit(1);
+}
+
+static __u32 ok_features[3] = {
+	/* Compat */
+	EXT3_FEATURE_COMPAT_HAS_JOURNAL |
+		EXT2_FEATURE_COMPAT_DIR_INDEX,
+	/* Incompat */
+	EXT2_FEATURE_INCOMPAT_FILETYPE |
+		EXT3_FEATURE_INCOMPAT_EXTENTS |
+		EXT4_FEATURE_INCOMPAT_FLEX_BG |
+		EXT4_FEATURE_INCOMPAT_MMP,
+	/* 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 |
+#ifdef CONFIG_QUOTA
+		EXT4_FEATURE_RO_COMPAT_QUOTA |
+#endif
+		EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER
+};
+
+static __u32 clear_ok_features[3] = {
+	/* Compat */
+	EXT3_FEATURE_COMPAT_HAS_JOURNAL |
+		EXT2_FEATURE_COMPAT_RESIZE_INODE |
+		EXT2_FEATURE_COMPAT_DIR_INDEX,
+	/* Incompat */
+	EXT2_FEATURE_INCOMPAT_FILETYPE |
+		EXT4_FEATURE_INCOMPAT_FLEX_BG |
+		EXT4_FEATURE_INCOMPAT_MMP,
+	/* 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|
+#ifdef CONFIG_QUOTA
+		EXT4_FEATURE_RO_COMPAT_QUOTA |
+#endif
+		EXT4_FEATURE_RO_COMPAT_GDT_CSUM
+};
+
+/*
+ * Remove an external journal from the filesystem
+ */
+static int remove_journal_device(ext2_filsys fs)
+{
+	char		*journal_path;
+	ext2_filsys	jfs;
+	char		buf[1024];
+	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 (!(jfs->super->s_feature_incompat &
+	      EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)) {
+		fprintf(stderr, _("%s is not a journal device.\n"),
+			journal_path);
+		goto no_valid_journal;
+	}
+
+	/* Get the journal superblock */
+	if ((retval = io_channel_read_blk64(jfs->io, 1, -1024, buf))) {
+		com_err(program_name, retval, "%s",
+			_("while reading journal superblock"));
+		goto no_valid_journal;
+	}
+
+	jsb = (journal_superblock_t *) buf;
+	if ((jsb->s_header.h_magic != (unsigned)ntohl(JFS_MAGIC_NUMBER)) ||
+	    (jsb->s_header.h_blocktype != (unsigned)ntohl(JFS_SUPERBLOCK_V2))) {
+		fputs(_("Journal superblock not found!\n"), stderr);
+		goto no_valid_journal;
+	}
+
+	/* Find the filesystem UUID */
+	nr_users = ntohl(jsb->s_nr_users);
+	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) {
+		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 */
+	if ((retval = io_channel_write_blk64(jfs->io, 1, -1024, buf))) {
+		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;
+	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;
+	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;
+		}
+		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;
+	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)
+{
+	if (fs->super->s_state & EXT2_VALID_FS)
+		return 0;
+	printf("\n%s\n", _(please_fsck));
+	if (mount_flags & EXT2_MF_READONLY)
+		printf(_("(and reboot afterwards!)\n"));
+	return 1;
+}
+
+static void request_fsck_afterwards(ext2_filsys fs)
+{
+	static int requested = 0;
+
+	if (requested++)
+		return;
+	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"));
+}
+
+/*
+ * 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;
+	struct ext2_group_desc *gd;
+	__u32		old_features[3];
+	dgrp_t		i;
+	int		type_err;
+	unsigned int	mask_err;
+
+#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 (sb->s_feature_incompat &
+		    EXT3_FEATURE_INCOMPAT_RECOVER) {
+			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_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;
+		sb->s_feature_compat &= ~EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+	}
+
+	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_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_GDT_CSUM)) {
+		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;
+	}
+
+	if (FEATURE_OFF(E2P_FEATURE_RO_INCOMPAT,
+			EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) {
+		for (i = 0; i < fs->group_desc_count; i++) {
+			gd = ext2fs_group_desc(fs, fs->group_desc, i);
+			if ((gd->bg_flags & EXT2_BG_INODE_ZEROED) == 0) {
+				/* 
+				 * XXX what we really should do is zap
+				 * uninitialized inode tables instead.
+				 */
+				request_fsck_afterwards(fs);
+				break;
+			}
+			gd->bg_itable_unused = 0;
+			gd->bg_flags = 0;
+			gd->bg_checksum = 0;
+		}
+		fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+	}
+
+	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 both user quota and group quota by default */
+			usrquota = QOPT_ENABLE;
+			grpquota = QOPT_ENABLE;
+		}
+		sb->s_feature_ro_compat &= ~EXT4_FEATURE_RO_COMPAT_QUOTA;
+	}
+
+	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 both user quota and group quota by default */
+		usrquota = QOPT_DISABLE;
+		grpquota = QOPT_DISABLE;
+	}
+
+	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)
+{
+	unsigned long journal_blocks;
+	errcode_t	retval;
+	ext2_filsys	jfs;
+	io_manager	io_ptr;
+
+	if (fs->super->s_feature_compat &
+	    EXT3_FEATURE_COMPAT_HAS_JOURNAL) {
+		fputs(_("The filesystem already has a journal.\n"), stderr);
+		goto err;
+	}
+	if (journal_device) {
+		check_plausibility(journal_device);
+		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(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);
+		journal_blocks = figure_journal_size(journal_size, fs);
+
+		retval = ext2fs_add_journal_inode(fs, journal_blocks,
+						  journal_flags);
+		if (retval) {
+			fprintf(stderr, "\n");
+			com_err(program_name, retval, "%s",
+				_("\n\twhile trying to create journal file"));
+			return retval;
+		} else
+			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 void handle_quota_options(ext2_filsys fs)
+{
+	quota_ctx_t qctx;
+	ext2_ino_t qf_ino;
+
+	if (!usrquota && !grpquota)
+		/* Nothing to do. */
+		return;
+
+	quota_init_context(&qctx, fs, -1);
+
+	if (usrquota == QOPT_ENABLE || grpquota == QOPT_ENABLE)
+		quota_compute_usage(qctx);
+
+	if (usrquota == QOPT_ENABLE && !fs->super->s_usr_quota_inum) {
+		if ((qf_ino = quota_file_exists(fs, USRQUOTA,
+						QFMT_VFS_V1)) > 0)
+			quota_update_limits(qctx, qf_ino, USRQUOTA);
+		quota_write_inode(qctx, USRQUOTA);
+	} else if (usrquota == QOPT_DISABLE) {
+		quota_remove_inode(fs, USRQUOTA);
+	}
+
+	if (grpquota == QOPT_ENABLE && !fs->super->s_grp_quota_inum) {
+		if ((qf_ino = quota_file_exists(fs, GRPQUOTA,
+						QFMT_VFS_V1)) > 0)
+			quota_update_limits(qctx, qf_ino, GRPQUOTA);
+		quota_write_inode(qctx, GRPQUOTA);
+	} else if (grpquota == QOPT_DISABLE) {
+		quota_remove_inode(fs, GRPQUOTA);
+	}
+
+	quota_release_context(&qctx);
+
+	if ((usrquota == QOPT_ENABLE) || (grpquota == QOPT_ENABLE)) {
+		fprintf(stderr, "%s", _("\nWarning: the quota feature is still "
+				  "under development\n"
+				  "See https://ext4.wiki.kernel.org/"
+				  "index.php/Quota for more information\n\n"));
+		fs->super->s_feature_ro_compat |= EXT4_FEATURE_RO_COMPAT_QUOTA;
+		ext2fs_mark_super_dirty(fs);
+	} else if (!fs->super->s_usr_quota_inum &&
+		   !fs->super->s_grp_quota_inum) {
+		fs->super->s_feature_ro_compat &= ~EXT4_FEATURE_RO_COMPAT_QUOTA;
+		ext2fs_mark_super_dirty(fs);
+	}
+
+	return;
+}
+
+#ifdef CONFIG_QUOTA
+static void parse_quota_opts(const char *opts)
+{
+	char	*buf, *token, *next, *p;
+	int	len;
+
+	len = strlen(opts);
+	buf = malloc(len+1);
+	if (!buf) {
+		fputs(_("Couldn't allocate memory to parse quota "
+			"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;
+		}
+
+		if (strcmp(token, "usrquota") == 0) {
+			usrquota = QOPT_ENABLE;
+		} else if (strcmp(token, "^usrquota") == 0) {
+			usrquota = QOPT_DISABLE;
+		} else if (strcmp(token, "grpquota") == 0) {
+			grpquota = QOPT_ENABLE;
+		} else if (strcmp(token, "^grpquota") == 0) {
+			grpquota = QOPT_DISABLE;
+		} else {
+			fputs(_("\nBad quota options specified.\n\n"
+				"Following valid quota options are available "
+				"(pass by separating with comma):\n"
+				"\t[^]usrquota\n"
+				"\t[^]grpquota\n"
+				"\n\n"), stderr);
+			free(buf);
+			exit(1);
+		}
+	}
+	free(buf);
+}
+#endif
+
+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 = blkid_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;
+	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;
+	char optstring[100] = "c:e:fg:i:jlm:o:r:s:u:C:E:I:J:L:M:O:T:U:";
+
+#ifdef CONFIG_QUOTA
+	strcat(optstring, "Q:");
+#endif
+	open_flag = 0;
+
+	printf("tune2fs %s (%s)\n", E2FSPROGS_VERSION, E2FSPROGS_DATE);
+	while ((c = getopt(argc, argv, optstring)) != EOF)
+		switch (c) {
+		case 'c':
+			max_mount_count = strtol(optarg, &tmp, 0);
+			if (*tmp || max_mount_count > 16000) {
+				com_err(program_name, 0,
+					_("bad mounts count - %s"),
+					optarg);
+				usage();
+			}
+			if (max_mount_count == 0)
+				max_mount_count = -1;
+			c_flag = 1;
+			open_flag = EXT2_FLAG_RW;
+			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 = 1;
+			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;
+#ifdef CONFIG_QUOTA
+		case 'Q':
+			Q_flag = 1;
+			parse_quota_opts(optarg);
+			open_flag = EXT2_FLAG_RW;
+			break;
+#endif
+		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':
+			new_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;
+		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 = blkid_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)
+{
+	char	*buf, *token, *next, *p, *arg;
+	int	len, hash_alg;
+	int	r_usage = 0;
+
+	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);
+			fs->super->s_mmp_update_interval = intv;
+			ext2fs_mark_super_dirty(fs);
+		} else if (!strcmp(token, "test_fs")) {
+			fs->super->s_flags |= EXT2_FLAGS_TEST_FILESYS;
+			printf("Setting test filesystem flag\n");
+			ext2fs_mark_super_dirty(fs);
+		} else if (!strcmp(token, "^test_fs")) {
+			fs->super->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;
+			}
+			fs->super->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
+			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"
+			"\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"));
+		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_BLOCKS_PER_GROUP(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);
+
+	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;
+	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;
+}
+
+static errcode_t ext2fs_calculate_summary_stats(ext2_filsys fs)
+{
+	blk64_t		blk;
+	ext2_ino_t	ino;
+	unsigned int	group = 0;
+	unsigned int	count = 0;
+	int		total_free = 0;
+	int		group_free = 0;
+
+	/*
+	 * First calculate the block statistics
+	 */
+	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++;
+		}
+		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);
+			count = 0;
+			group_free = 0;
+		}
+	}
+	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;
+	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_fast_test_inode_bitmap2(fs->inode_map, ino)) {
+			group_free++;
+			total_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);
+			count = 0;
+			group_free = 0;
+		}
+	}
+	fs->super->s_free_inodes_count = total_free;
+	ext2fs_mark_super_dirty(fs);
+	return 0;
+}
+
+#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);
+
+	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;
+	char *dev_name, *tmp_name;
+
+#if 0 /* FIXME!! */
+	/*
+	 * Configuration via a conf file would be
+	 * nice
+	 */
+	profile_get_string(profile, "scratch_files",
+					"directory", 0, 0,
+					&tdb_dir);
+#endif
+	tmp_name = strdup(name);
+	if (!tmp_name) {
+	alloc_fn_fail:
+		com_err(program_name, ENOMEM, "%s",
+			_("Couldn't allocate memory for tdb filename\n"));
+		return ENOMEM;
+	}
+	dev_name = basename(tmp_name);
+
+	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;
+
+	tdb_file = malloc(strlen(tdb_dir) + 9 + strlen(dev_name) + 7 + 1);
+	if (!tdb_file)
+		goto alloc_fn_fail;
+	sprintf(tdb_file, "%s/tune2fs-%s.e2undo", tdb_dir, dev_name);
+
+	if (!access(tdb_file, F_OK)) {
+		if (unlink(tdb_file) < 0) {
+			retval = errno;
+			com_err(program_name, retval,
+				_("while trying to delete %s"),
+				tdb_file);
+			free(tdb_file);
+			return retval;
+		}
+	}
+
+	set_undo_io_backing_manager(*io_ptr);
+	*io_ptr = undo_io_manager;
+	set_undo_io_backup_file(tdb_file);
+	printf(_("To undo the tune2fs operation please run "
+		 "the command\n    e2undo %s %s\n\n"),
+		 tdb_file, name);
+	free(tdb_file);
+	free(tmp_name);
+	return retval;
+}
+
+#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;
+
+#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;
+	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;
+
+retry_open:
+	if ((open_flag & EXT2_FLAG_RW) == 0 || f_flag)
+		open_flag |= EXT2_FLAG_SKIP_MMP;
+
+	open_flag |= EXT2_FLAG_64BITS;
+
+	/* 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_MMP_FAILED)
+			fprintf(stderr, "%s",
+			     _("Couldn't find valid filesystem superblock.\n"));
+
+		ext2fs_free(fs);
+		exit(1);
+	}
+	fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE;
+
+	if (I_flag && !io_ptr_orig) {
+		/*
+		 * 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;
+		}
+
+		/*
+		 * If inode resize is requested use the
+		 * Undo I/O manager
+		 */
+		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(fs);
+			goto retry_open;
+		}
+	}
+
+	sb = fs->super;
+	fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+
+	if (print_label) {
+		/* For e2label emulation */
+		printf("%.*s\n", (int) sizeof(sb->s_volume_name),
+		       sb->s_volume_name);
+		remove_error_table(&et_ext2_error_table);
+		goto closefs;
+	}
+
+	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);
+		rc = 1;
+		goto closefs;
+	}
+	/* Normally we only need to write out the superblock */
+	fs->flags |= EXT2_FLAG_SUPER_ONLY;
+
+	if (c_flag) {
+		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 (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, 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)"),
+				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"),
+		       reserved_blocks);
+	}
+	if (s_flag == 1) {
+		if (sb->s_feature_ro_compat &
+		    EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)
+			fputs(_("\nThe filesystem already has sparse "
+				"superblocks.\n"), stderr);
+		else {
+			sb->s_feature_ro_compat |=
+				EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
+			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 superflag 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(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(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);
+			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 (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;
+		}
+		handle_quota_options(fs);
+	}
+
+	if (U_flag) {
+		int set_csum = 0;
+		dgrp_t i;
+
+		if (sb->s_feature_ro_compat &
+		    EXT4_FEATURE_RO_COMPAT_GDT_CSUM) {
+			/*
+			 * Changing the UUID requires rewriting all metadata,
+			 * which can race with a mounted fs.  Don't allow that.
+			 */
+			if (mount_flags & EXT2_MF_MOUNTED) {
+				fputs(_("The UUID may only be "
+					"changed when the filesystem is "
+					"unmounted.\n"), stderr);
+				exit(1);
+			}
+			if (check_fsck_needed(fs))
+				exit(1);
+
+			/*
+			 * 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;
+		}
+		if ((strcasecmp(new_UUID, "null") == 0) ||
+		    (strcasecmp(new_UUID, "clear") == 0)) {
+			uuid_clear(sb->s_uuid);
+		} else if (strcasecmp(new_UUID, "time") == 0) {
+			uuid_generate_time(sb->s_uuid);
+		} else if (strcasecmp(new_UUID, "random") == 0) {
+			uuid_generate(sb->s_uuid);
+		} else if (uuid_parse(new_UUID, sb->s_uuid)) {
+			com_err(program_name, 0, "%s",
+				_("Invalid UUID format\n"));
+			rc = 1;
+			goto closefs;
+		}
+		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 (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 (fs->super->s_feature_incompat &
+		    EXT4_FEATURE_INCOMPAT_FLEX_BG) {
+			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
+		 */
+		fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
+		if (resize_inode(fs, new_inode_size) == 0) {
+			printf(_("Setting inode size %lu\n"),
+							new_inode_size);
+		} else {
+			printf("%s", _("Failed to change inode size\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 (rc) {
+		ext2fs_mmp_stop(fs);
+#ifndef BUILD_AS_LIB
+		exit(1);
+#endif
+	}
+	return (ext2fs_close(fs) ? 1 : 0);
+}
diff --git a/e2fsprogs/misc/tune2fs.h b/e2fsprogs/misc/tune2fs.h
new file mode 100644
index 0000000..7b7e431
--- /dev/null
+++ b/e2fsprogs/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 exectuable.
+ * Is the entrypoint for libtune2fs.
+ */
+int tune2fs_main(int argc, char **argv);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/e2fsprogs/misc/util.c b/e2fsprogs/misc/util.c
new file mode 100644
index 0000000..e62cc7f
--- /dev/null
+++ b/e2fsprogs/misc/util.c
@@ -0,0 +1,304 @@
+/*
+ * 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%
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#include <stdio.h>
+#include <string.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_LINUX_MAJOR_H
+#include <linux/major.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#include <time.h>
+
+#include "et/com_err.h"
+#include "e2p/e2p.h"
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "nls-enable.h"
+#include "blkid/blkid.h"
+#include "util.h"
+
+#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;
+}
+
+void proceed_question(void)
+{
+	char buf[256];
+	const char *short_yes = _("yY");
+
+	fflush(stdout);
+	fflush(stderr);
+	fputs(_("Proceed anyway? (y,n) "), stdout);
+	buf[0] = 0;
+	if (!fgets(buf, sizeof(buf), stdin) ||
+	    strchr(short_yes, buf[0]) == 0)
+		exit(1);
+}
+
+void check_plausibility(const char *device)
+{
+	int val;
+	ext2fs_struct_stat s;
+
+	val = ext2fs_stat(device, &s);
+
+	if(val == -1) {
+		fprintf(stderr, _("Could not stat %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 defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+	/* On FreeBSD, all disk devices are character specials */
+	if (!S_ISBLK(s.st_mode) && !S_ISCHR(s.st_mode))
+#else
+	if (!S_ISBLK(s.st_mode))
+#endif
+	{
+		printf(_("%s is not a block special device.\n"), device);
+		proceed_question();
+		return;
+	}
+
+#ifdef HAVE_LINUX_MAJOR_H
+#ifndef MAJOR
+#define MAJOR(dev)	((dev)>>8)
+#define MINOR(dev)	((dev) & 0xff)
+#endif
+#ifndef SCSI_BLK_MAJOR
+#ifdef SCSI_DISK0_MAJOR
+#ifdef SCSI_DISK8_MAJOR
+#define SCSI_DISK_MAJOR(M) ((M) == SCSI_DISK0_MAJOR || \
+  ((M) >= SCSI_DISK1_MAJOR && (M) <= SCSI_DISK7_MAJOR) || \
+  ((M) >= SCSI_DISK8_MAJOR && (M) <= SCSI_DISK15_MAJOR))
+#else
+#define SCSI_DISK_MAJOR(M) ((M) == SCSI_DISK0_MAJOR || \
+  ((M) >= SCSI_DISK1_MAJOR && (M) <= SCSI_DISK7_MAJOR))
+#endif /* defined(SCSI_DISK8_MAJOR) */
+#define SCSI_BLK_MAJOR(M) (SCSI_DISK_MAJOR((M)) || (M) == SCSI_CDROM_MAJOR)
+#else
+#define SCSI_BLK_MAJOR(M)  ((M) == SCSI_DISK_MAJOR || (M) == SCSI_CDROM_MAJOR)
+#endif /* defined(SCSI_DISK0_MAJOR) */
+#endif /* defined(SCSI_BLK_MAJOR) */
+	if (((MAJOR(s.st_rdev) == HD_MAJOR &&
+	      MINOR(s.st_rdev)%64 == 0) ||
+	     (SCSI_BLK_MAJOR(MAJOR(s.st_rdev)) &&
+	      MINOR(s.st_rdev)%16 == 0))) {
+		printf(_("%s is entire device, not just one partition!\n"),
+		       device);
+		proceed_question();
+	}
+#endif
+}
+
+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 = blkid_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, "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\n"
+			"The journal size must be between "
+			"1024 and 10240000 filesystem blocks.\n\n"), stderr);
+		free(buf);
+		exit(1);
+	}
+	free(buf);
+}
+
+/*
+ * 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.
+ */
+unsigned int figure_journal_size(int size, ext2_filsys fs)
+{
+	int j_blocks;
+
+	j_blocks = ext2fs_default_journal_size(ext2fs_blocks_count(fs->super));
+	if (j_blocks < 0) {
+		fputs(_("\nFilesystem too small for a journal\n"), stderr);
+		return 0;
+	}
+
+	if (size > 0) {
+		j_blocks = size * 1024 / (fs->blocksize	/ 1024);
+		if (j_blocks < 1024 || j_blocks > 10240000) {
+			fprintf(stderr, _("\nThe requested journal "
+				"size is %d blocks; it must be\n"
+				"between 1024 and 10240000 blocks.  "
+				"Aborting.\n"),
+				j_blocks);
+			exit(1);
+		}
+		if ((unsigned) j_blocks > ext2fs_free_blocks_count(fs->super) / 2) {
+			fputs(_("\nJournal size too big for filesystem.\n"),
+			      stderr);
+			exit(1);
+		}
+	}
+	return j_blocks;
+}
+
+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: last update: %s node: %s device: %s\n",
+		       ctime(&t), mmp->mmp_nodename, mmp->mmp_bdevname);
+	}
+}
diff --git a/e2fsprogs/misc/util.h b/e2fsprogs/misc/util.h
new file mode 100644
index 0000000..f872c38
--- /dev/null
+++ b/e2fsprogs/misc/util.h
@@ -0,0 +1,27 @@
+/*
+ * 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_flags;
+extern char	*journal_device;
+
+#ifndef HAVE_STRCASECMP
+extern int strcasecmp (char *s1, char *s2);
+#endif
+extern char *get_progname(char *argv_zero);
+extern void proceed_question(void);
+extern void check_plausibility(const char *device);
+extern void parse_journal_opts(const char *opts);
+extern void check_mount(const char *device, int force, const char *type);
+extern unsigned int figure_journal_size(int 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/e2fsprogs/misc/uuidd.8.in b/e2fsprogs/misc/uuidd.8.in
new file mode 100644
index 0000000..e65e391
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/misc/uuidd.c b/e2fsprogs/misc/uuidd.c
new file mode 100644
index 0000000..c00c9e2
--- /dev/null
+++ b/e2fsprogs/misc/uuidd.c
@@ -0,0 +1,598 @@
+/*
+ * 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 <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 "nls-enable.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[37];
+	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/e2fsprogs/misc/uuidd.rc b/e2fsprogs/misc/uuidd.rc
new file mode 100644
index 0000000..d35645a
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/misc/uuidgen.1.in b/e2fsprogs/misc/uuidgen.1.in
new file mode 100644
index 0000000..985e80d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/misc/uuidgen.c b/e2fsprogs/misc/uuidgen.c
new file mode 100644
index 0000000..7385a5c
--- /dev/null
+++ b/e2fsprogs/misc/uuidgen.c
@@ -0,0 +1,79 @@
+/*
+ * 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 <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 "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/e2fsprogs/po/LINGUAS b/e2fsprogs/po/LINGUAS
new file mode 100644
index 0000000..4307252
--- /dev/null
+++ b/e2fsprogs/po/LINGUAS
@@ -0,0 +1 @@
+ca cs de es fr id it nl pl sv tr vi zh_CN
diff --git a/e2fsprogs/po/Makefile.in.in b/e2fsprogs/po/Makefile.in.in
new file mode 100644
index 0000000..8dbd0c5
--- /dev/null
+++ b/e2fsprogs/po/Makefile.in.in
@@ -0,0 +1,373 @@
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2004 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU General Public
+# License but which still want to provide support for the GNU gettext
+# functionality.
+# Please note that the actual code of GNU gettext is covered by the GNU
+# General Public License and is *not* in the public domain.
+#
+# Origin: gettext-0.14
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+datadir = @datadir@
+localedir = $(datadir)/locale
+gettextsrcdir = $(datadir)/gettext/po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+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 $(DOMAIN).pot stamp-po \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+
+# 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 -o $${lang}.gmo $${lang}.po"; \
+	cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -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:
+
+# 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
+	test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
+	@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.
+$(DOMAIN).pot-update: $(srcdir)/POTFILES.in remove-potcdate.sed \
+	$(srcdir)/at-expand.pl
+	$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+	  --directory=$(top_builddir) \
+	  --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
+	  --files-from=$(srcdir)/POTFILES.in \
+	  --copyright-holder='$(COPYRIGHT_HOLDER)' \
+	  --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)'
+	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; 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): $(srcdir)/$(DOMAIN).pot
+	@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+	if test -f "$(srcdir)/$${lang}.po"; then \
+	  test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+	  echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
+	  cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
+	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 \
+	  $(mkinstalldirs) $(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
+	$(mkinstalldirs) $(DESTDIR)$(datadir)
+	@catalogs='$(CATALOGS)'; \
+	for cat in $$catalogs; do \
+	  cat=`basename $$cat`; \
+	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+	  dir=$(localedir)/$$lang/LC_MESSAGES; \
+	  $(mkinstalldirs) $(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 \
+	  $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+	else \
+	  : ; \
+	fi
+installdirs-data-no:
+installdirs-data-yes:
+	$(mkinstalldirs) $(DESTDIR)$(datadir)
+	@catalogs='$(CATALOGS)'; \
+	for cat in $$catalogs; do \
+	  cat=`basename $$cat`; \
+	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+	  dir=$(localedir)/$$lang/LC_MESSAGES; \
+	  $(mkinstalldirs) $(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
+
+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:
+	$(MAKE) update-po
+	@$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: $(DISTFILES)
+	dists="$(DISTFILES)"; \
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  dists="$$dists Makevars.template"; \
+	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); \
+	  else \
+	    cp -p $(srcdir)/$$file $(distdir); \
+	  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"; then PATH=`pwd`/../src:$$PATH; fi; \
+	tmpdir=`pwd`; \
+	echo "$$lang:"; \
+	test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+	echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+	cd $(srcdir); \
+	if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$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 "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)
+	@:
+
+Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
+	       $(SHELL) ./config.status
+
+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/e2fsprogs/po/Makevars b/e2fsprogs/po/Makevars
new file mode 100644
index 0000000..cdd9d30
--- /dev/null
+++ b/e2fsprogs/po/Makevars
@@ -0,0 +1,41 @@
+# 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 =
diff --git a/e2fsprogs/po/POTFILES.in b/e2fsprogs/po/POTFILES.in
new file mode 100644
index 0000000..fb0df5a
--- /dev/null
+++ b/e2fsprogs/po/POTFILES.in
@@ -0,0 +1,49 @@
+e2fsck/badblocks.c
+e2fsck/dict.c
+e2fsck/dirinfo.c
+e2fsck/dx_dirinfo.c
+e2fsck/ehandler.c
+e2fsck/emptydir.c
+e2fsck/extend.c
+e2fsck/flushb.c
+e2fsck/iscan.c
+e2fsck/journal.c
+e2fsck/message.c
+e2fsck/pass1b.c
+e2fsck/pass1.c
+e2fsck/pass2.c
+e2fsck/pass3.c
+e2fsck/pass4.c
+e2fsck/pass5.c
+e2fsck/problem.c
+e2fsck/recovery.c
+e2fsck/region.c
+e2fsck/scantest.c
+e2fsck/super.c
+e2fsck/unix.c
+e2fsck/util.c
+misc/badblocks.c
+misc/base_device.c
+misc/blkid.c
+misc/chattr.c
+misc/dumpe2fs.c
+misc/e2image.c
+misc/e2label.c
+misc/e2undo.c
+misc/fsck.c
+misc/logsave.c
+misc/lsattr.c
+misc/mke2fs.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
+e2fsck/prof_err.c
diff --git a/e2fsprogs/po/Rules-quot b/e2fsprogs/po/Rules-quot
new file mode 100644
index 0000000..9c2a995
--- /dev/null
+++ b/e2fsprogs/po/Rules-quot
@@ -0,0 +1,47 @@
+# 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"; 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) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 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/e2fsprogs/po/at-expand.pl b/e2fsprogs/po/at-expand.pl
new file mode 100644
index 0000000..3786ee1
--- /dev/null
+++ b/e2fsprogs/po/at-expand.pl
@@ -0,0 +1,147 @@
+#!/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).\n",
+ "#.  \n",
+ "#.	%b	<blk>			block number\n",
+ "#.	%B	<blkcount>		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_dir_acl\n",
+ "#.	%Iu	<inode> -> i_uid\n",
+ "#.	%Ig	<inode> -> i_gid\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/e2fsprogs/po/boldquot.sed b/e2fsprogs/po/boldquot.sed
new file mode 100644
index 0000000..4b937aa
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/po/ca.gmo b/e2fsprogs/po/ca.gmo
new file mode 100644
index 0000000..981eebd
--- /dev/null
+++ b/e2fsprogs/po/ca.gmo
Binary files differ
diff --git a/e2fsprogs/po/ca.po b/e2fsprogs/po/ca.po
new file mode 100644
index 0000000..96230b6
--- /dev/null
+++ b/e2fsprogs/po/ca.po
@@ -0,0 +1,6654 @@
+# Translation of e2fsprogs-1.40.8 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.
+#
+#. 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).
+#.  
+#. 	%b	<blk>			block number
+#. 	%B	<blkcount>		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_dir_acl
+#. 	%Iu	<inode> -> i_uid
+#. 	%Ig	<inode> -> i_gid
+#. 	%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: 2013-06-16 08:17-0400\n"
+"PO-Revision-Date: 2013-09-25 05:59+0200\n"
+"Last-Translator: Walter Garcia-Fontes <walter.garcia@upf.edu>\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-Poedit-Bookmarks: 434,-1,-1,-1,-1,-1,-1,-1,-1,-1\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:180
+#, 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/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:1332 e2fsck/unix.c:1420 misc/badblocks.c:1214
+#: misc/badblocks.c:1222 misc/badblocks.c:1236 misc/badblocks.c:1248
+#: misc/dumpe2fs.c:588 misc/e2image.c:1196 misc/e2image.c:1324
+#: misc/e2image.c:1337 misc/mke2fs.c:196 misc/tune2fs.c:1907 resize/main.c:315
+#, 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:203
+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:131
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode.  Cleared.\n"
+msgstr "Avís: s'ha trobat el bloc invàlid %u en el node-i de blocs erronis.  S'ha esborrat.\n"
+
+#: 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:61 e2fsck/ehandler.c:110
+msgid "Ignore error"
+msgstr "Ignora l'error"
+
+#: e2fsck/ehandler.c:62
+msgid "Force rewrite"
+msgstr "Força la rescriptura"
+
+#: e2fsck/ehandler.c:104
+#, 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:107
+#, 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 invà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 del búfer (mida=%d)\n"
+
+#: 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 els búfers.\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_del_búfer_del_node_i] dispositiu\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:961
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "en obrir %s per a buidar-lo"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:967 resize/main.c:288
+#, c-format
+msgid "while trying to flush %s"
+msgstr "en intentar buidar %s"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1091
+msgid "while opening inode scan"
+msgstr "en obrir l'escaneig de nodes-i"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1109
+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:522
+msgid "reading journal superblock\n"
+msgstr "s'està llegint el súperbloc del registre de transaccions\n"
+
+#: e2fsck/journal.c:579
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: no s'ha trobat cap súperbloc del registre de transaccions vàlid\n"
+
+#: e2fsck/journal.c:588
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: el registre de transaccions és massa curt\n"
+
+#: e2fsck/journal.c:880
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: recuperació del registre de transaccions\n"
+
+#: e2fsck/journal.c:882
+#, 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:909
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "en intentar tornar a obrir %s"
+
+#: e2fsck/message.c:113
+msgid "aextended attribute"
+msgstr "aatribut ampliat"
+
+#: e2fsck/message.c:114
+msgid "Aerror allocating"
+msgstr "Aerror en la ubicació"
+
+#: e2fsck/message.c:115
+msgid "bblock"
+msgstr "bbloc"
+
+#: e2fsck/message.c:116
+msgid "Bbitmap"
+msgstr "Bmapa de bits"
+
+#: e2fsck/message.c:117
+msgid "ccompress"
+msgstr "ccompressió"
+
+#: e2fsck/message.c:118
+msgid "Cconflicts with some other fs @b"
+msgstr "Centra en conflicte amb algun altre @b del sistema de fitxers"
+
+#: e2fsck/message.c:119
+msgid "iinode"
+msgstr "inode-i"
+
+#: e2fsck/message.c:120
+msgid "Iillegal"
+msgstr "Iil·legal"
+
+#: e2fsck/message.c:121
+msgid "jjournal"
+msgstr "jregistre de transaccions"
+
+#: e2fsck/message.c:122
+msgid "Ddeleted"
+msgstr "Dsuprimit"
+
+#: e2fsck/message.c:123
+msgid "ddirectory"
+msgstr "ddirectori"
+
+#: 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 "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:131
+msgid "Lis a link"
+msgstr "Lés un enllaç"
+
+#: e2fsck/message.c:132
+msgid "mmultiply-claimed"
+msgstr "mreclamat múltiplement"
+
+#: e2fsck/message.c:133
+msgid "ninvalid"
+msgstr "nno vàlid"
+
+#: e2fsck/message.c:134
+msgid "oorphaned"
+msgstr "oorfe"
+
+#: e2fsck/message.c:135
+msgid "pproblem in"
+msgstr "pproblema en"
+
+#: e2fsck/message.c:136
+msgid "qquota"
+msgstr ""
+
+#: e2fsck/message.c:137
+msgid "rroot @i"
+msgstr "r@i arrel"
+
+#: e2fsck/message.c:138
+msgid "sshould be"
+msgstr "shauria de ser"
+
+#: e2fsck/message.c:139
+msgid "Ssuper@b"
+msgstr "Ssúper@b"
+
+#: e2fsck/message.c:140
+msgid "uunattached"
+msgstr "udesacoblat(s)"
+
+#: e2fsck/message.c:141
+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:142
+msgid "xextent"
+msgstr "xextensió"
+
+#: e2fsck/message.c:143
+msgid "zzero-length"
+msgstr "zmida zero"
+
+#: e2fsck/message.c:154
+msgid "<The NULL inode>"
+msgstr "<El node-i NULL>"
+
+#: e2fsck/message.c:155
+msgid "<The bad blocks inode>"
+msgstr "<El node-i de blocs erronis>"
+
+#: e2fsck/message.c:157
+#, fuzzy
+msgid "<The user quota inode>"
+msgstr "<El node-i del registre de transaccions>"
+
+#: e2fsck/message.c:158
+#, fuzzy
+msgid "<The group quota inode>"
+msgstr "<El node-i del descriptor de grup>"
+
+#: e2fsck/message.c:159
+msgid "<The boot loader inode>"
+msgstr "<El node-i del carregador>"
+
+#: e2fsck/message.c:160
+msgid "<The undelete directory inode>"
+msgstr "<El node-i del directori de desfer les supressions>"
+
+#: e2fsck/message.c:161
+msgid "<The group descriptor inode>"
+msgstr "<El node-i del descriptor de grup>"
+
+#: e2fsck/message.c:162
+msgid "<The journal inode>"
+msgstr "<El node-i del registre de transaccions>"
+
+#: e2fsck/message.c:163
+msgid "<Reserved inode 9>"
+msgstr "<Node-i reservat 9>"
+
+#: e2fsck/message.c:164
+msgid "<Reserved inode 10>"
+msgstr "<Node-i reservat 10>"
+
+#: e2fsck/message.c:333
+msgid "regular file"
+msgstr "fitxer normal"
+
+#: e2fsck/message.c:335
+msgid "directory"
+msgstr "directori"
+
+#: e2fsck/message.c:337
+msgid "character device"
+msgstr "dispositiu"
+
+#: e2fsck/message.c:339
+msgid "block device"
+msgstr "dispositiu d'accés per bloc"
+
+#: e2fsck/message.c:341
+msgid "named pipe"
+msgstr "conducte amb nom"
+
+#: e2fsck/message.c:343
+msgid "symbolic link"
+msgstr "enllaç simbòlic"
+
+#: e2fsck/message.c:345 misc/uuidd.c:161
+msgid "socket"
+msgstr "sòcol"
+
+#: e2fsck/message.c:347
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "tips de fitxer desconegut amb mode 0%o"
+
+#: e2fsck/message.c:422
+#, fuzzy
+msgid "indirect block"
+msgstr "s'està llegint el bloc de directori"
+
+#: e2fsck/message.c:424
+#, fuzzy
+msgid "double indirect block"
+msgstr "s'està llegint el bloc de directori"
+
+#: e2fsck/message.c:426
+#, fuzzy
+msgid "triple indirect block"
+msgstr "s'està llegint el bloc de directori"
+
+#: e2fsck/message.c:428
+#, fuzzy
+msgid "translator block"
+msgstr "últim bloc"
+
+#: e2fsck/message.c:430
+#, fuzzy
+msgid "block #"
+msgstr "bbloc"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "mapa de nodes-i reclamat múltiplement"
+
+#: e2fsck/pass1b.c:610 e2fsck/pass1b.c:730
+#, fuzzy, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "error intern: no s'ha trobat dup_blk per a %u\n"
+
+#: e2fsck/pass1b.c:821
+msgid "returned from clone_file_block"
+msgstr "s'ha tornat de la funció clone_file_block"
+
+# FIXME (dpm)
+#: e2fsck/pass1b.c:843
+#, fuzzy, 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 %u"
+
+# FIXME (dpm)
+#: e2fsck/pass1b.c:855
+#, 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:475 e2fsck/pass2.c:782
+msgid "reading directory block"
+msgstr "s'està llegint el bloc de directori"
+
+#: e2fsck/pass1.c:598
+msgid "in-use inode map"
+msgstr "mapa de nodes-i en ús"
+
+#: e2fsck/pass1.c:609
+msgid "directory inode map"
+msgstr "mapa de nodes-i de directoris"
+
+#: e2fsck/pass1.c:619
+msgid "regular file inode map"
+msgstr "mapa de nodes-i de fitxers normals"
+
+#: e2fsck/pass1.c:628
+msgid "in-use block map"
+msgstr "mapa de blocs en ús"
+
+#: e2fsck/pass1.c:695
+msgid "opening inode scan"
+msgstr "s'està obring l'escaneig de nodes-i"
+
+#: e2fsck/pass1.c:729
+msgid "getting next inode from scan"
+msgstr "s'està obtenint el node-i següent de l'escaneig"
+
+#: e2fsck/pass1.c:1239
+msgid "Pass 1"
+msgstr "Pas 1"
+
+#: e2fsck/pass1.c:1296
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "s'estan llegint els blocs indirectes del node-i %u"
+
+#: e2fsck/pass1.c:1346
+msgid "bad inode map"
+msgstr "mapa de nodes-i malmesos"
+
+#: e2fsck/pass1.c:1369
+msgid "inode in bad block map"
+msgstr "node-i en el mapa de nodes-i malmesos"
+
+#: e2fsck/pass1.c:1389
+msgid "imagic inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:1416
+msgid "multiply claimed block map"
+msgstr ""
+
+#: e2fsck/pass1.c:1527
+msgid "ext attr block map"
+msgstr ""
+
+#: e2fsck/pass1.c:2299
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr ""
+
+#: e2fsck/pass1.c:2660
+msgid "block bitmap"
+msgstr ""
+
+#: e2fsck/pass1.c:2666
+msgid "inode bitmap"
+msgstr ""
+
+#: e2fsck/pass1.c:2672
+msgid "inode table"
+msgstr ""
+
+#: e2fsck/pass2.c:283
+msgid "Pass 2"
+msgstr "Pas 2"
+
+#: e2fsck/pass2.c:805
+msgid "Can not continue."
+msgstr "No es pot continuar."
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr ""
+
+# FIXME: «Memòria màxima»? (dpm)
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Pic de memòria"
+
+#: e2fsck/pass3.c:136
+msgid "Pass 3"
+msgstr "Pas 3"
+
+#: e2fsck/pass3.c:322
+msgid "inode loop detection bitmap"
+msgstr ""
+
+#: e2fsck/pass4.c:196
+msgid "Pass 4"
+msgstr "Pas 4"
+
+#: e2fsck/pass5.c:74
+msgid "Pass 5"
+msgstr "Pas 5"
+
+#: 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 "Ubica"
+
+#: 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:107
+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:111
+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:116
+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 correct ext2\n
+#. @-expanded: filesystem.  If the device is valid and it really contains an ext2\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 %S <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:122
+#, c-format
+msgid ""
+"\n"
+"The @S could not be read or does not describe a correct ext2\n"
+"@f.  If the @v is valid and it really contains an ext2\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 %S <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"No s'ha pogut llegir el @S, o bé no descriu un @f\n"
+"ext2 correcte. Si el @v és vàlid i realment conté un @f\n"
+"ext2 (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 %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:131
+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:138
+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:145
+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:150
+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:155
+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:160
+#, 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:169
+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:174
+#, 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:179
+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:183
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "El Hurd no és compatible amb la funcionalitat de tipus de fitxer.\n"
+
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+#: e2fsck/problem.c:188
+#, fuzzy, c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "El @S té un @j ext3 @n (@i %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:193
+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:198
+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:203
+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:208
+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:213
+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:221
+#, fuzzy
+msgid "@j @S is corrupt.\n"
+msgstr "El @S del @j ext3 està malmès.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal %s is present.\n
+#: e2fsck/problem.c:226
+#, fuzzy, c-format
+msgid "@S has_@j flag is clear, but a @j %s is present.\n"
+msgstr "El senyalador de recuperació està buit, però el @j té dades.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:231
+#, fuzzy
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "El @S té el senyalador ext3 «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:236
+#, fuzzy
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "El senyalador de recuperació està buit, però el @j té dades.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:241
+msgid "Clear @j"
+msgstr "Esborra el @j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.  
+#: e2fsck/problem.c:246 e2fsck/problem.c:695
+msgid "@f has feature flag(s) set, but is a revision 0 @f.  "
+msgstr "El @f té els senyaladors de funcionalitat (feature) definits, però és un @f de revisió 0.  "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:251
+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:256
+#, fuzzy
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "@b @I #%B (%b) trobat a l'@i @o %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:261
+#, fuzzy
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "@b ja esborrat #%B (%b) trobat a l'@i @o %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:266
+#, 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:271
+#, 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:276
+#, fuzzy
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "El @S del @j ext3 té un senyalador desconegut de funcionalitat de només lectura definit.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:281
+#, fuzzy
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "El @S del @j ext3 té un senyalador desconegut de funcionalitat de només lectura definit.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:286
+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:291
+#, 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:296
+#, 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:301
+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:307
+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:312
+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:317
+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:322
+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:328
+msgid "Resize_@i not enabled, but the resize @i is non-zero.  "
+msgstr ""
+
+#. @-expanded: Resize inode not valid.  
+#: e2fsck/problem.c:333
+msgid "Resize @i not valid.  "
+msgstr ""
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:338
+#, fuzzy
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr "La darrera hora de muntatge del @S és en el futur.  "
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:343
+#, fuzzy
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr "La darrera hora d'escriptura del @S és en el futur.  "
+
+#. @-expanded: superblock hint for external superblock should be %X.  
+#: e2fsck/problem.c:347
+#, c-format
+msgid "@S hint for external superblock @s %X.  "
+msgstr ""
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:352
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.  
+#: e2fsck/problem.c:357
+msgid "@g descriptor %g checksum is %04x, should be %04y.  "
+msgstr ""
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:362
+#, 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:367
+msgid "@g descriptor %g has invalid unused inodes count %b.  "
+msgstr ""
+
+#. @-expanded: Last group block bitmap uninitialized.  
+#: e2fsck/problem.c:372
+msgid "Last @g @b @B uninitialized.  "
+msgstr ""
+
+#: e2fsck/problem.c:377
+#, 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:381
+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)  
+#: e2fsck/problem.c:386
+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)  "
+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).  
+#: e2fsck/problem.c:392
+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).  "
+msgstr ""
+
+#. @-expanded: One or more block group descriptor checksums are invalid.  
+#: e2fsck/problem.c:398
+msgid "One or more @b @g descriptor checksums are invalid.  "
+msgstr ""
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:403
+#, fuzzy
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Establiment del nombre de blocs reservats a %lu\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:408
+#, fuzzy
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Establiment del nombre de blocs reservats a %lu\n"
+
+#. @-expanded: Making quota inode %i (%Q) hidden.\n
+#: e2fsck/problem.c:413
+#, fuzzy
+msgid "Making @q @i %i (%Q) hidden.\n"
+msgstr ""
+"S'està traslladant el @j de /%s al @i ocult.\n"
+"\n"
+
+#. @-expanded: superblock has invalid MMP block.  
+#: e2fsck/problem.c:418
+#, fuzzy
+msgid "@S has invalid MMP block.  "
+msgstr "mida de bloc invàlida - %s"
+
+#. @-expanded: superblock has invalid MMP magic.  
+#: e2fsck/problem.c:423
+msgid "@S has invalid MMP magic.  "
+msgstr ""
+
+#: e2fsck/problem.c:428
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:433
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr ""
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:440
+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:444
+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:449
+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:454
+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:459
+#, 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:464
+#, 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:469
+#, 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:474
+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:479
+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:484
+msgid "@g %g's @i table at %b @C.\n"
+msgstr ""
+
+#. @-expanded: group %g's block bitmap (%b) is bad.  
+#: e2fsck/problem.c:489
+msgid "@g %g's @b @B (%b) is bad.  "
+msgstr ""
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.  
+#: e2fsck/problem.c:494
+msgid "@g %g's @i @B (%b) is bad.  "
+msgstr ""
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.  
+#: e2fsck/problem.c:499
+msgid "@i %i, i_size is %Is, @s %N.  "
+msgstr ""
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.  
+#: e2fsck/problem.c:504
+msgid "@i %i, i_@bs is %Ib, @s %N.  "
+msgstr ""
+
+#. @-expanded: illegal %B (%b) in inode %i.  
+#: e2fsck/problem.c:509
+#, fuzzy
+msgid "@I %B (%b) in @i %i.  "
+msgstr "Hi ha un número (%B) de @b no vàlid (%b) al @i de @b erronis.  "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.  
+#: e2fsck/problem.c:514
+msgid "%B (%b) overlaps @f metadata in @i %i.  "
+msgstr ""
+
+#. @-expanded: inode %i has illegal block(s).  
+#: e2fsck/problem.c:519
+#, 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:524
+#, 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:529
+#, fuzzy
+msgid "@I %B (%b) in bad @b @i.  "
+msgstr "Hi ha un número (%B) de @b no vàlid (%b) al @i de @b erronis.  "
+
+#. @-expanded: Bad block inode has illegal block(s).  
+#: e2fsck/problem.c:534
+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:539
+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:544
+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:549
+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:556
+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:561
+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:567
+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:572
+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:578
+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:583
+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:589
+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:595
+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:600
+#, 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:605
+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:610
+#, 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:615
+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:620
+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:625 e2fsck/problem.c:1474
+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:630
+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:635
+#, c-format
+msgid "@A icount link information: %m\n"
+msgstr ""
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:640
+#, c-format
+msgid "@A @d @b array: %m\n"
+msgstr ""
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:645
+#, 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:650
+#, 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:655
+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:660
+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:666
+#, 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:674
+#, 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:679
+#, c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set.  "
+msgstr ""
+
+#. @-expanded: inode %i has compression flag set on filesystem without compression support.  
+#: e2fsck/problem.c:685
+#, c-format
+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.  "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.  
+#: e2fsck/problem.c:690
+#, 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:700
+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:705
+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:710
+#, 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:716
+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:721
+msgid "@A refcount structure (%N): %m\n"
+msgstr ""
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.  
+#: e2fsck/problem.c:726
+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:731
+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:736
+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:741
+#, fuzzy
+msgid "@a @b %b has reference count %r, @s %N.  "
+msgstr "el nombre de referències del @i %s és %Il, @s %N."
+
+#. @-expanded: Error writing extended attribute block %b (%m).  
+#: e2fsck/problem.c:746
+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:751
+msgid "@a @b %b has h_@bs > 1.  "
+msgstr ""
+
+#. @-expanded: error allocating extended attribute block %b.  
+#: e2fsck/problem.c:756
+msgid "@A @a @b %b.  "
+msgstr "S'ha produït un @A del @b d'@a %b.  "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).  
+#: e2fsck/problem.c:761
+msgid "@a @b %b is corrupt (allocation collision).  "
+msgstr "El @b d'@a està malmès (col·lisió en la ubicació).  "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).  
+#: e2fsck/problem.c:766
+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:771
+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:776
+#, 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:780
+#, fuzzy
+msgid "%B (%b) causes @d to be too big.  "
+msgstr "El @b #%B (%b) fa que el @d sigui massa gran.  "
+
+#: e2fsck/problem.c:785
+#, fuzzy
+msgid "%B (%b) causes file to be too big.  "
+msgstr "El @b #%B (%b) fa que el fitxer sigui massa gran.  "
+
+#: e2fsck/problem.c:790
+#, fuzzy
+msgid "%B (%b) causes symlink to be too big.  "
+msgstr "El @b #%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:795
+#, 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:800
+#, 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:805
+#, 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:810
+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:815
+#, 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:820
+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:825
+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:831
+#, 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:836
+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:841
+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:846
+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:851
+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:856
+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:861
+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:866
+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:871
+#, 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:876
+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:882
+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:887
+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:892
+#, 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 amb l'extensió.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:897
+#, 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:902
+#, c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr ""
+
+#: e2fsck/problem.c:907
+#, 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:912
+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:916
+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:921
+#, fuzzy, c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "S'ha produït en iterar pels @bs de @d: %m\n"
+
+#. @-expanded: quota inode is not regular file.  
+#: e2fsck/problem.c:926
+#, fuzzy
+msgid "@q @i is not regular file.  "
+msgstr "El @j no és un fitxer normal.  "
+
+#. @-expanded: quota inode is not in use, but contains data.  
+#: e2fsck/problem.c:931
+#, fuzzy
+msgid "@q @i is not in use, but contains data.  "
+msgstr "El @i del @j no s'utilitza, però conté dades.  "
+
+#. @-expanded: quota inode is visible to the user.  
+#: e2fsck/problem.c:936
+#, fuzzy
+msgid "@q @i is visible to the user.  "
+msgstr "El @i %i s'està utilitzant, però té dtime definit."
+
+#. @-expanded: The bad block inode looks invalid.  
+#: e2fsck/problem.c:941
+#, fuzzy
+msgid "The bad @b @i looks @n.  "
+msgstr "<El node-i de blocs erronis>"
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:946
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+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:953
+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:959
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\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:967
+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:973
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "@b(s) reclamat(s) múltiplement del @i %i:"
+
+#: e2fsck/problem.c:988
+#, 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:993
+#, 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:998
+#, 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:1003 e2fsck/problem.c:1318
+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:1008
+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:1014
+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:1019
+#, fuzzy
+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é %B @b(s) @m, compartits amb %N fitxer(s):\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1025
+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:1030
+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:1035
+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:1040
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"@bs reclamats múltiplement ja reassignats o clonats.\n"
+"\n"
+
+#: e2fsck/problem.c:1053
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "No s'ha pogut clonar el fitxer: %m\n"
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1059
+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:1064
+#, 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:1069
+msgid "@E has @n @i #: %Di.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.  
+#: e2fsck/problem.c:1074
+msgid "@E has @D/unused @i %Di.  "
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'  
+#: e2fsck/problem.c:1079
+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:1084
+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:1089
+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:1094
+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:1099
+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:1104
+#, 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:1109
+#, 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:1114
+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:1119
+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:1124
+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:1129
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr ""
+
+#. @-expanded: i_dir_acl for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1134
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr ""
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1139
+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:1144
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1149
+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:1154
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "@i de @d %i, @b %B, desplaçament %N: el nom de fitxer és massa llarg\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1159
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "@i de @d %i, @b %B, desplaçament %N: el nom de fitxer és massa llarg\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.  
+#: e2fsck/problem.c:1164
+#, fuzzy
+msgid "@d @i %i has an unallocated %B.  "
+msgstr "El @i de @d %i té un @b #%B no ubicat.  "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1169
+#, 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:1174
+#, 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:1179
+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:1184
+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:1189
+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:1194
+msgid "@E is duplicate '..' @e.\n"
+msgstr "L'@E és un duplicat de l'@e «..»\n"
+
+#: e2fsck/problem.c:1199 e2fsck/problem.c:1499
+#, 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:1204
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr ""
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1209
+#, 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:1214
+#, 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:1219
+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:1224
+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:1229
+#, c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr ""
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1234
+#, c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "S'ha produït un error en desubicar el @i %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1239
+#, 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:1244
+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:1249
+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:1254
+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:1259
+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:1264
+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:1269
+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:1274
+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:1279
+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:1284
+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:1289
+#, fuzzy
+msgid "@p @h %d: %B not referenced\n"
+msgstr "S'ha produït un @p al @h %d: el node (%B) no està referenciat\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1294
+#, fuzzy
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "S'ha produït un @p al @h %d: el node (%B) està referenciat dues vegades\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1299
+#, fuzzy
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "@p en el @h %d: el node (%B) té una profunditat (%N) @na\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1304
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr ""
+
+#. @-expanded: invalid HTREE directory inode %d (%q).  
+#: e2fsck/problem.c:1309
+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:1313
+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:1323
+#, 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:1328
+#, fuzzy
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "@p en el @h %d: el node (%B) té una profunditat (%N) @na\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1333
+#, fuzzy
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "@p en el @h %d: el node (%B) té una profunditat (%N) @na\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1338
+#, fuzzy
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "@p en el @h %d: el node (%B) té una profunditat (%N) @na\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1343
+#, fuzzy
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "@p en el @h %d: el node (%B) té una profunditat (%N) @na\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.  
+#: e2fsck/problem.c:1348
+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:1353
+#, 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:1358
+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:1363
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1368
+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:1372
+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:1377
+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:1382
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1389
+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:1394
+msgid "@r not allocated.  "
+msgstr "El @r no està ubicat.  "
+
+#. @-expanded: No room in lost+found directory.  
+#: e2fsck/problem.c:1399
+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:1404
+#, 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:1409
+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:1414
+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:1419
+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:1424
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "No s'ha pogut expandir el directori /@l: %m\n"
+
+#: e2fsck/problem.c:1429
+#, 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:1434
+#, 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:1439
+#, 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:1444
+#, 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:1449
+#, 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:1454
+#, 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:1459
+#, 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:1464
+#, 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:1469
+#, 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:1479
+#, 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:1484
+#, 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:1489
+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:1494
+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:1504
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l no és un @d (node-i=%i)\n"
+
+#: e2fsck/problem.c:1511
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Pas 3A: optimització dels directoris\n"
+
+#: e2fsck/problem.c:1516
+#, fuzzy, c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "No s'ha pogut crear l'iterador dirs_to_hash: %m"
+
+#: e2fsck/problem.c:1521
+#, fuzzy
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "No s'ha pogut optimitzar el directori %q (%d): %m"
+
+#: e2fsck/problem.c:1526
+msgid "Optimizing directories: "
+msgstr "S'estan optimitzant els directoris: "
+
+#: e2fsck/problem.c:1543
+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:1548
+#, c-format
+msgid "@u @z @i %i.  "
+msgstr "@i de @z %i @u.  "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1553
+#, 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:1558
+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:1562
+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"
+
+# FIXME
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1572
+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:1577
+msgid "Padding at end of @i @B is not set. "
+msgstr ""
+
+#. @-expanded: Padding at end of block bitmap is not set. 
+#: e2fsck/problem.c:1582
+msgid "Padding at end of @b @B is not set. "
+msgstr ""
+
+#. @-expanded: block bitmap differences: 
+#: e2fsck/problem.c:1587
+msgid "@b @B differences: "
+msgstr ""
+
+#. @-expanded: inode bitmap differences: 
+#: e2fsck/problem.c:1607
+msgid "@i @B differences: "
+msgstr ""
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1627
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "El nombre de nodes-i lliures no es 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:1632
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "El nombre de directoris no es correcte per al @g núm. %g (%i, recompte=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:1637
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "El nombre de nodes-i lliures no es correcte (%i, recompte=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:1642
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "El nombre de @bs lliures no es correcte per al @g núm. %g (%i, recompte=%j).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:1647
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "El nombre de @bs lliures no es 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:1652
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1658
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr ""
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:1663
+#, c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr ""
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:1668
+#, 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:1693
+#, 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:1698
+#, c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr ""
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:1705
+#, fuzzy
+msgid "Recreate @j"
+msgstr "Torna a crear"
+
+#: e2fsck/problem.c:1710
+msgid "Update quota info for quota type %N"
+msgstr ""
+
+#: e2fsck/problem.c:1829
+#, 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:1954 e2fsck/problem.c:1958
+msgid "IGNORED"
+msgstr "IGNORAT"
+
+#: 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:188
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr "en fer la crida a ext2fs_block_iterate per al node-i %d"
+
+#: e2fsck/super.c:211
+#, fuzzy, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %d"
+msgstr "en fer la crida a ext2fs_adjust_ea_refcount per al node-i %d"
+
+#: e2fsck/super.c:272
+msgid "Truncating"
+msgstr "Truncament"
+
+#: e2fsck/super.c:273
+msgid "Clearing"
+msgstr "Neteja"
+
+#: e2fsck/unix.c:74
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfvtDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] device\n"
+msgstr ""
+"Forma d'ús: %s [-panyrcdfvtDFV] [-b súperbloc] [-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:80
+#, c-format
+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:86
+#, c-format
+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"
+msgstr ""
+
+#: e2fsck/unix.c:131
+#, fuzzy, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u fitxers (%0d.%d%% no contigus), %u/%u blocs\n"
+
+#: e2fsck/unix.c:157
+#, 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:161
+#, 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:166
+#, c-format
+msgid "%12u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%12u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+# ind: indirect, dind: double indirect, tind: triple indirect (dpm)
+#: e2fsck/unix.c:171
+#, fuzzy, 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:179
+msgid "             Extent depth histogram: "
+msgstr ""
+
+#: e2fsck/unix.c:188
+#, 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:192
+#, fuzzy, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%u nodes-i, %u blocs\n"
+msgstr[1] "%u nodes-i, %u blocs\n"
+
+#: e2fsck/unix.c:194
+#, fuzzy, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] "fitxer normal"
+msgstr[1] "fitxer normal"
+
+#: e2fsck/unix.c:196
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] "fitxer normal"
+msgstr[1] "fitxer normal"
+
+#: e2fsck/unix.c:198
+#, fuzzy, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "directori"
+msgstr[1] "directori"
+
+#: e2fsck/unix.c:200
+#, fuzzy, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] "dispositiu"
+msgstr[1] "dispositiu"
+
+#: e2fsck/unix.c:203
+#, fuzzy, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] "dispositiu d'accés per bloc"
+msgstr[1] "dispositiu d'accés per bloc"
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:207
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:209
+#, fuzzy, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "enllaç simbòlic"
+msgstr[1] "enllaç simbòlic"
+
+#: e2fsck/unix.c:211
+#, fuzzy, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] "enllaç simbòlic"
+msgstr[1] "enllaç simbòlic"
+
+#: e2fsck/unix.c:215
+#, fuzzy, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "sòcol"
+msgstr[1] "sòcol"
+
+#: e2fsck/unix.c:219
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:232 misc/badblocks.c:983 misc/tune2fs.c:1985 misc/util.c:147
+#: resize/main.c:259
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "en determinar si %s està muntat."
+
+#: e2fsck/unix.c:252
+#, fuzzy, c-format
+msgid "Warning!  %s is %s.\n"
+msgstr "Avís!  %s està muntat.\n"
+
+#: e2fsck/unix.c:259
+#, c-format
+msgid "%s is %s.\n"
+msgstr ""
+
+#: e2fsck/unix.c:262
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"No es pot continuar, s'interromprà.\n"
+"\n"
+
+#: e2fsck/unix.c:264
+#, 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\aAVÍS!!!  L'execució de l'e2fsck en un sistema de fitxers muntat\n"
+"pot causar-li danys GREUS.\a\a\a\n"
+"\n"
+
+#: e2fsck/unix.c:269
+msgid "Do you really want to continue"
+msgstr "Esteu segur que voleu continuar?"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "check aborted.\n"
+msgstr "s'ha interromput la comprovació.\n"
+
+#: e2fsck/unix.c:361
+msgid " contains a file system with errors"
+msgstr " conté un sistema de fitxers amb errors"
+
+#: e2fsck/unix.c:363
+msgid " was not cleanly unmounted"
+msgstr " no es va desmuntar correctament"
+
+#: e2fsck/unix.c:365
+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:369
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " s'ha muntat %u vegades sense haver estat comprovat"
+
+#: e2fsck/unix.c:376
+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:382
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " no s'ha comprovat des de fa %u dies"
+
+#: e2fsck/unix.c:391
+msgid ", check forced.\n"
+msgstr ", es forçarà la comprovació.\n"
+
+#: e2fsck/unix.c:424
+#, fuzzy, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: net, %u/%u fitxers, %u/%u blocs"
+
+#: e2fsck/unix.c:443
+msgid " (check deferred; on battery)"
+msgstr " (s'ha ajornat la comprovació; s'està utilitzant la bateria)"
+
+#: e2fsck/unix.c:446
+msgid " (check after next mount)"
+msgstr " (es comprovarà després del muntatge següent)"
+
+#: e2fsck/unix.c:448
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (es comprovarà en %ld muntades)"
+
+#: e2fsck/unix.c:598
+#, 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:667
+#, c-format
+msgid "Invalid EA version.\n"
+msgstr "La versió dels atributs ampliats no és vàlida.\n"
+
+#: e2fsck/unix.c:694
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Es desconeix l'opció ampliada: %s\n"
+
+#: e2fsck/unix.c:719
+#, 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:788
+#, 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:792
+msgid "Invalid completion information file descriptor"
+msgstr ""
+
+#: e2fsck/unix.c:807
+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:828
+#, 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:859 e2fsck/unix.c:931 misc/tune2fs.c:811 misc/tune2fs.c:1100
+#: misc/tune2fs.c:1118
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "No s'ha pogut resoldre «%s»"
+
+#: e2fsck/unix.c:910
+#, fuzzy
+msgid "The -n and -D options are incompatible."
+msgstr ""
+"%s: les opcions -n i -w són mutualment exclusives.\n"
+"\n"
+
+#: e2fsck/unix.c:915
+#, fuzzy
+msgid "The -n and -c options are incompatible."
+msgstr ""
+"%s: les opcions -n i -w són mutualment exclusives.\n"
+"\n"
+
+#: e2fsck/unix.c:920
+#, fuzzy
+msgid "The -n and -l/-L options are incompatible."
+msgstr ""
+"%s: les opcions -n i -w són mutualment exclusives.\n"
+"\n"
+
+#: e2fsck/unix.c:974
+#, c-format
+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:1022
+#, 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:1031
+#, 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:1120
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1137 e2fsck/unix.c:1142
+#, fuzzy
+msgid "while checking MMP block"
+msgstr "en configurar el súperbloc"
+
+#: e2fsck/unix.c:1144 misc/tune2fs.c:1912
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+
+#: e2fsck/unix.c:1194
+#, c-format
+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:1202
+msgid "while trying to initialize program"
+msgstr "en intentar inicialitzar el programa"
+
+#: e2fsck/unix.c:1225
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tS'utilitza %s, %s\n"
+
+#: e2fsck/unix.c:1237
+msgid "need terminal for interactive repairs"
+msgstr "cal un terminal per a les reparacions interactives"
+
+#: e2fsck/unix.c:1290
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s provant els blocs de còpia de seguretat...\n"
+
+#: e2fsck/unix.c:1292
+msgid "Superblock invalid,"
+msgstr "Súperbloc no vàlid,"
+
+#: e2fsck/unix.c:1293
+msgid "Group descriptors look bad..."
+msgstr "Els descriptors de grup no estan en bon estat..."
+
+#: e2fsck/unix.c:1303
+#, fuzzy, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s provant els blocs de còpia de seguretat...\n"
+
+#: e2fsck/unix.c:1307
+#, fuzzy, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: no s'ha trobat cap súperbloc del registre de transaccions vàlid\n"
+
+#: e2fsck/unix.c:1335
+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:1341
+msgid "Could this be a zero-length partition?\n"
+msgstr "Pot ser que això sigui una partició de mida zero?\n"
+
+#: e2fsck/unix.c:1344
+#, 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:1349
+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:1352
+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:1355
+#, fuzzy
+msgid "Possibly non-existent device?\n"
+msgstr "Pot ser que no existeixi el dispositiu o bé que sigui d'intercanvi?\n"
+
+#: e2fsck/unix.c:1358
+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:1423
+msgid "Get a newer version of e2fsck!"
+msgstr "Hauríeu d'obtenir una versió més recent de l'e2fsck"
+
+#: e2fsck/unix.c:1467
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr "en comprovar el registre de transaccions per a %s"
+
+#: e2fsck/unix.c:1478
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr "Avís: s'ometrà la recuperació del registre de canvis perquè s'està comprovant el sistema de fitxers en mode de només-lectura.\n"
+
+#: e2fsck/unix.c:1491
+#, 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:1497
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr "en recuperar el registre de canvis ext3 de %s"
+
+#: e2fsck/unix.c:1521
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s té funcionalitats no implementades:"
+
+#: e2fsck/unix.c:1536
+#, fuzzy, c-format
+msgid "%s: warning: compression support is experimental.\n"
+msgstr "Avís: el funcionament amb compressió és experimentat.\n"
+
+#: e2fsck/unix.c:1542
+#, c-format
+msgid ""
+"%s: e2fsck not compiled with HTREE support,\n"
+"\tbut filesystem %s has HTREE directories.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1594
+#, fuzzy, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "en llegir el node-i dels blocs erronis"
+
+#: e2fsck/unix.c:1597
+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:1638
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Creació del registre de canvis (%d blocs): "
+
+#: e2fsck/unix.c:1648
+msgid " Done.\n"
+msgstr " Fet.\n"
+
+#: e2fsck/unix.c:1649
+msgid ""
+"\n"
+"*** journal has been re-created - filesystem is now ext3 again ***\n"
+msgstr ""
+"\n"
+"*** registre de canvis recreat - el sist. de fitxers torna a ser ext3 ***\n"
+
+#: e2fsck/unix.c:1672
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "S'està tornant a iniciar l'e2fsck des del començament...\n"
+
+#: e2fsck/unix.c:1676
+msgid "while resetting context"
+msgstr "en reiniciar el context"
+
+#: e2fsck/unix.c:1683
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: s'ha cancel·lat l'e2fsck.\n"
+
+#: e2fsck/unix.c:1688
+msgid "aborted"
+msgstr "s'ha interromput"
+
+#: e2fsck/unix.c:1700 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** S'HA MODIFICAT EL SISTEMA DE FITXERS *****\n"
+
+#: e2fsck/unix.c:1704
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr "%s: ***** REINICIEU EL LINUX *****\n"
+
+#: e2fsck/unix.c:1712 e2fsck/util.c:73
+#, 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/unix.c:1752
+msgid "while setting block group checksum info"
+msgstr "en establir la informació de suma de verificació del grup de blocs"
+
+#: e2fsck/util.c:190 misc/util.c:70
+msgid "yY"
+msgstr "sS"
+
+#: e2fsck/util.c:191
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:205
+msgid "<y>"
+msgstr "<s>"
+
+#: e2fsck/util.c:207
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:209
+msgid " (y/n)"
+msgstr " (s/n)"
+
+#: e2fsck/util.c:223
+msgid "cancelled!\n"
+msgstr "s'ha cancel·lat\n"
+
+#: e2fsck/util.c:238
+msgid "yes\n"
+msgstr "sí\n"
+
+#: e2fsck/util.c:240
+msgid "no\n"
+msgstr "no\n"
+
+#: e2fsck/util.c:250
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? no\n"
+"\n"
+
+#: e2fsck/util.c:254
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? sí\n"
+"\n"
+
+#: e2fsck/util.c:258
+msgid "yes"
+msgstr "sí"
+
+#: e2fsck/util.c:258
+msgid "no"
+msgstr "no"
+
+#: e2fsck/util.c:273
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr ""
+
+#: e2fsck/util.c:278
+msgid "reading inode and block bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:286
+#, 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:298
+msgid "writing block and inode bitmaps"
+msgstr "escriptura dels mapes de bits de bloc i de node-i"
+
+#: e2fsck/util.c:303
+#, 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:315
+#, 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:396
+#, fuzzy, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Memòria utilitzada: %dk/%dk (%dk/%dk), "
+
+#: e2fsck/util.c:400
+#, fuzzy, c-format
+msgid "Memory used: %lu, "
+msgstr "Memòria utilitzada: %d, "
+
+#: e2fsck/util.c:407
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "temps: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:412
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "temps transcorregut: %6.3f\n"
+
+#: e2fsck/util.c:447 e2fsck/util.c:461
+#, fuzzy, c-format
+msgid "while reading inode %lu in %s"
+msgstr "en llegir el node-i %ld a %s"
+
+#: e2fsck/util.c:475 e2fsck/util.c:488
+#, fuzzy, c-format
+msgid "while writing inode %lu in %s"
+msgstr "en escriure el node-i %ld a %s"
+
+#: e2fsck/util.c:637
+msgid "while allocating zeroizing buffer"
+msgstr ""
+
+#: e2fsck/util.c:785
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr ""
+
+#: misc/badblocks.c:69
+#, fuzzy
+msgid "done                                                 \n"
+msgstr "fet                                \n"
+
+#: misc/badblocks.c:92
+#, 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"
+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:103
+#, 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:218
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr ""
+
+#: misc/badblocks.c:322
+msgid "Testing with random pattern: "
+msgstr "Comprovació amb un patró arbitrari: "
+
+#: misc/badblocks.c:340
+msgid "Testing with pattern 0x"
+msgstr "Comprovació amb el patró 0x"
+
+#: misc/badblocks.c:372 misc/badblocks.c:445
+msgid "during seek"
+msgstr "durant la cerca"
+
+#: misc/badblocks.c:383
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Valor estrany (%ld) a do_read\n"
+
+#: misc/badblocks.c:469
+msgid "during ext2fs_sync_device"
+msgstr "durant l'execució de ext2fs_sync_device"
+
+#: misc/badblocks.c:489 misc/badblocks.c:749
+msgid "while beginning bad block list iteration"
+msgstr "en iniciar la iteració per la llista de blocs erronis"
+
+#: misc/badblocks.c:503 misc/badblocks.c:602 misc/badblocks.c:759
+msgid "while allocating buffers"
+msgstr "en ubicar els búfers"
+
+#: misc/badblocks.c:507
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Comprovació dels blocs %lu a %lu\n"
+
+#: misc/badblocks.c:512
+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:521
+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:528 misc/badblocks.c:634 misc/badblocks.c:676
+#: misc/badblocks.c:822
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Hi ha massa blocs erronis, s'interromprà la comprovació\n"
+
+#: misc/badblocks.c:609
+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:611 misc/badblocks.c:772
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Dels blocs %lu a %lu\n"
+
+#: misc/badblocks.c:666
+msgid "Reading and comparing: "
+msgstr "Lectura i comparació: "
+
+#: misc/badblocks.c:771
+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:777
+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:784
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"S'ha interceptat una interrupció; s'iniciaran les tasques de neteja\n"
+
+#: misc/badblocks.c:867
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "durant l'escriptura de les dades de prova, bloc %lu"
+
+#: misc/badblocks.c:988 misc/util.c:152
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s està muntat; "
+
+# FIXME: Hope - esperem ? (dpm)
+#: misc/badblocks.c:990
+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:995
+msgid "it's not safe to run badblocks!\n"
+msgstr "l'execució de badblocks no és segura!\n"
+
+#: misc/badblocks.c:1000 misc/util.c:163
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s està essent utilitzat pel sistema; "
+
+#: misc/badblocks.c:1003
+msgid "badblocks forced anyway.\n"
+msgstr "s'ha forçat badblocks de totes maneres.\n"
+
+#: misc/badblocks.c:1023
+#, c-format
+msgid "invalid %s - %s"
+msgstr "%s no vàlid - %s"
+
+#: misc/badblocks.c:1133
+#, 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:1163
+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:1169
+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:1183
+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:1189
+msgid "while trying to determine device size"
+msgstr "en intentar determinar la mida del dispositiu"
+
+#: misc/badblocks.c:1194
+msgid "last block"
+msgstr "últim bloc"
+
+#: misc/badblocks.c:1200
+msgid "first block"
+msgstr "primer bloc"
+
+#: misc/badblocks.c:1203
+#, c-format
+msgid "invalid starting block (%lu): must be less than %lu"
+msgstr "bloc d'inici no vàlid (%lu): hauria de ser menor de %lu"
+
+#: misc/badblocks.c:1259
+msgid "while creating in-memory bad blocks list"
+msgstr "en crear la llista de blocs erronis en memòria"
+
+#: misc/badblocks.c:1274
+msgid "while adding to in-memory bad block list"
+msgstr "en afegir a la llista de blocs erronis en memòria"
+
+#: misc/badblocks.c:1298
+#, fuzzy, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Pas completat; s'han trobat %u blocs erronis.\n"
+
+#: misc/chattr.c:86
+#, fuzzy, c-format
+msgid "Usage: %s [-RVf] [-+=AaCcDdeijsSu] [-v version] files...\n"
+msgstr "Forma d'ús: %s [-RVf] [-+=AacDdijsSu] [-v versió] fitxers...\n"
+
+#: misc/chattr.c:155
+#, c-format
+msgid "bad version - %s\n"
+msgstr "versió no vàlida - %s\n"
+
+#: misc/chattr.c:201 misc/lsattr.c:116
+#, c-format
+msgid "while trying to stat %s"
+msgstr "en intentar mostrar la informació de %s"
+
+#: misc/chattr.c:208
+#, c-format
+msgid "while reading flags on %s"
+msgstr "en llegir els senyaladors a %s"
+
+#: misc/chattr.c:213 misc/chattr.c:225
+#, c-format
+msgid "Flags of %s set as "
+msgstr "S'han establert els senyaladors de %s com a "
+
+#: misc/chattr.c:234
+#, c-format
+msgid "while setting flags on %s"
+msgstr "en establir els senyaladors a %s"
+
+#: misc/chattr.c:242
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "S'ha establert la versió de %s a %lu\n"
+
+#: misc/chattr.c:246
+#, c-format
+msgid "while setting version on %s"
+msgstr "en establir la versió a %s"
+
+#: misc/chattr.c:266
+#, c-format
+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:306
+msgid "= is incompatible with - and +\n"
+msgstr "= no és compatible amb - i +\n"
+
+#: misc/chattr.c:314
+msgid "Must use '-v', =, - or +\n"
+msgstr "Cal utilitzar «-v», =, - o +\n"
+
+#: misc/dumpe2fs.c:55
+#, fuzzy, c-format
+msgid "Usage: %s [-bfhixV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Forma d'ús: %s [-bfhixV] [-ob superbloc] [-oB midadelbloc] dispositiu\n"
+
+#: misc/dumpe2fs.c:159
+#, fuzzy
+msgid "blocks"
+msgstr "bbloc"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr ""
+
+#: misc/dumpe2fs.c:196
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Grup %lu: (blocs "
+
+#: misc/dumpe2fs.c:204
+#, fuzzy, c-format
+msgid "  Checksum 0x%04x"
+msgstr "Suma de verificació 0x%04x, nodes-i no utilitzats %d\n"
+
+#: misc/dumpe2fs.c:206
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr ""
+
+#: misc/dumpe2fs.c:207
+#, fuzzy, c-format
+msgid ", unused inodes %u\n"
+msgstr ", %u nodes-i no utilitzats\n"
+
+#: misc/dumpe2fs.c:212
+#, c-format
+msgid "  %s superblock at "
+msgstr " superbloc %s a "
+
+#: misc/dumpe2fs.c:213
+msgid "Primary"
+msgstr "Primari"
+
+#: misc/dumpe2fs.c:213
+msgid "Backup"
+msgstr "Còpia de seguretat"
+
+#: misc/dumpe2fs.c:217
+#, c-format
+msgid ", Group descriptors at "
+msgstr ", descriptors de grup a "
+
+#: misc/dumpe2fs.c:221
+#, c-format
+msgid ""
+"\n"
+"  Reserved GDT blocks at "
+msgstr ""
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " Group descriptor at "
+msgstr " descriptor de grup a "
+
+#: misc/dumpe2fs.c:234
+msgid "  Block bitmap at "
+msgstr " Mapa de bits del bloc a "
+
+#: misc/dumpe2fs.c:238
+msgid ", Inode bitmap at "
+msgstr ", mapa de bits del node-i a "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+"  Inode table at "
+msgstr ""
+"\n"
+"  taula de nodes-i a "
+
+#: misc/dumpe2fs.c:248
+#, fuzzy, c-format
+msgid ""
+"\n"
+"  %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+"  %u blocs lliures, %u nodes-i lliures, %u directoris %s"
+
+#: misc/dumpe2fs.c:255
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u nodes-i no utilitzats\n"
+
+#: misc/dumpe2fs.c:258
+msgid "  Free blocks: "
+msgstr "  Blocs liures: "
+
+#: misc/dumpe2fs.c:269
+msgid "  Free inodes: "
+msgstr "  Nodes-i lliures: "
+
+#: misc/dumpe2fs.c:300
+msgid "while printing bad block list"
+msgstr "en imprimir la llista de blocs erronis"
+
+#: misc/dumpe2fs.c:306
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Blocs erronis: %u"
+
+#: misc/dumpe2fs.c:333 misc/tune2fs.c:306
+msgid "while reading journal inode"
+msgstr "en llegir el node-i del registre de transaccions"
+
+#: misc/dumpe2fs.c:339
+#, fuzzy
+msgid "while opening journal inode"
+msgstr "en llegir el node-i del registre de transaccions"
+
+#: misc/dumpe2fs.c:345
+#, fuzzy
+msgid "while reading journal super block"
+msgstr "en llegir el superbloc del registre de transaccions"
+
+#: misc/dumpe2fs.c:355
+#, fuzzy, c-format
+msgid "Journal features:        "
+msgstr "Usuaris del registre de canvis:       %s\n"
+
+#: misc/dumpe2fs.c:368
+msgid "Journal size:             "
+msgstr "Mida del registre de canvis:              "
+
+#: misc/dumpe2fs.c:379
+#, fuzzy, c-format
+msgid ""
+"Journal length:           %u\n"
+"Journal sequence:         0x%08x\n"
+"Journal start:            %u\n"
+msgstr ""
+"\n"
+"Mida de bloc del reg. de canvis:      %u\n"
+"Llargada del reg. de canvis:          %u\n"
+"Primer bloc del reg. de canvis:       %u\n"
+"Seqüència del reg. de canvis:         0x%08x\n"
+"Inici del registre de canvis:         %u\n"
+"Nombre d'usuaris del reg. de canvis:  %u\n"
+
+#: misc/dumpe2fs.c:386
+#, fuzzy, c-format
+msgid "Journal errno:            %d\n"
+msgstr "Usuaris del registre de canvis:       %s\n"
+
+#: misc/dumpe2fs.c:401 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "en llegir el superbloc del registre de transaccions"
+
+#: misc/dumpe2fs.c:409
+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:413
+#, c-format
+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 canvis:      %u\n"
+"Llargada del reg. de canvis:          %u\n"
+"Primer bloc del reg. de canvis:       %u\n"
+"Seqüència del reg. de canvis:         0x%08x\n"
+"Inici del registre de canvis:         %u\n"
+"Nombre d'usuaris del reg. de canvis:  %u\n"
+
+#: misc/dumpe2fs.c:426
+#, c-format
+msgid "Journal users:            %s\n"
+msgstr "Usuaris del registre de canvis:       %s\n"
+
+#: misc/dumpe2fs.c:442 misc/mke2fs.c:666 misc/tune2fs.c:1137
+#, c-format
+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:468
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Paràmetre del superbloc no vàlid: %s\n"
+
+#: misc/dumpe2fs.c:483
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Paràmetre de mida de bloc no vàlida: %s\n"
+
+#: misc/dumpe2fs.c:494
+#, 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:554 misc/mke2fs.c:1555
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tEn utilitzar %s\n"
+
+#: misc/dumpe2fs.c:590 misc/e2image.c:1326 misc/tune2fs.c:1923
+#: resize/main.c:317
+#, c-format
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "No s'ha trobat un súperbloc del sistema de fitxers vàlid.\n"
+
+#: misc/dumpe2fs.c:618
+#, c-format
+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"
+
+#: misc/e2image.c:90
+#, fuzzy, c-format
+msgid "Usage: %s [-rsIQa] device image_file\n"
+msgstr "Forma d'ús: %s [-rsI] dispositiu fitxer_imatge\n"
+
+#: misc/e2image.c:138
+#, c-format
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr ""
+
+#: misc/e2image.c:144
+msgid "Couldn't allocate header buffer\n"
+msgstr ""
+
+#: misc/e2image.c:174
+msgid "while writing superblock"
+msgstr "en escriure el superbloc"
+
+#: misc/e2image.c:182
+msgid "while writing inode table"
+msgstr "en escriure la taula de nodes-i"
+
+#: misc/e2image.c:189
+msgid "while writing block bitmap"
+msgstr "en escriure el mapa de bits dels blocs"
+
+#: misc/e2image.c:196
+msgid "while writing inode bitmap"
+msgstr "en escriure el mapa de bits dels nodes-i"
+
+#: misc/e2image.c:1365
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr ""
+
+#: 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 súperbloc\n"
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: s'ha produït un error en llegir el súperbloc\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:2080
+#, 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 súperbloc\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:803
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Forma d'ús: e2label dispositiu [etiquetanova]\n"
+
+#: misc/e2undo.c:36
+#, c-format
+msgid "Usage: %s <transaction file> <filesystem>\n"
+msgstr "Forma d'ús: %s <fitxer de transaccions> <sistema de fitxers>\n"
+
+#: misc/e2undo.c:52
+msgid "Failed to read the file system data \n"
+msgstr "No s'han pogut llegir les dades del sistema de fitxers \n"
+
+#: misc/e2undo.c:62 misc/e2undo.c:83 misc/e2undo.c:108 misc/e2undo.c:206
+#, c-format
+msgid "Failed tdb_fetch %s\n"
+msgstr "Ha fallat la tdb_fetch %s\n"
+
+#: misc/e2undo.c:70
+#, c-format
+msgid "The file system Mount time didn't match %u\n"
+msgstr "L'hora de muntatge del sistema de fitxers no concorda amb %u\n"
+
+#: misc/e2undo.c:89
+msgid "The file system UUID didn't match \n"
+msgstr "L'UUID del sistema de fitxers no concorda \n"
+
+#: misc/e2undo.c:163
+#, c-format
+msgid "Failed tdb_open %s\n"
+msgstr "Ha fallat la tdb_open %s\n"
+
+#: misc/e2undo.c:169
+#, c-format
+msgid "Error while determining whether %s is mounted.\n"
+msgstr "S'ha produït un error en determinar si %s està muntat.\n"
+
+#: misc/e2undo.c:175
+msgid "e2undo should only be run on unmounted file system\n"
+msgstr "e2undo només s'hauria d'executar en un sistema de fitxers sense muntar\n"
+
+#: misc/e2undo.c:184
+#, c-format
+msgid "Failed to open %s\n"
+msgstr "No s'ha pogut obrir %s\n"
+
+#: misc/e2undo.c:210
+#, fuzzy, c-format
+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ó %ld\n"
+
+#: misc/e2undo.c:216
+#, c-format
+msgid "Failed write %s\n"
+msgstr "Ha fallat l'escriptura %s\n"
+
+#: 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
+#, 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\aAVÍS: El fitxer /etc/fstab no conté el camp passno de l'fsck.\n"
+"\tS'intentarà areglar-ho temporalment, però ho hauríeu de\n"
+"\tsolucionar arreglant el fitxer /etc/fstab com més aviat millor.\n"
+"\n"
+
+#: misc/fsck.c:478
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: no s'ha trobat\n"
+
+#: misc/fsck.c:594
+#, 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:616
+#, 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:622
+#, 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:661
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "S'ha finalitzat amb %s (estat de sortida %d)\n"
+
+#: misc/fsck.c:721
+#, 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:742
+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:761
+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:884
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr ""
+
+#: misc/fsck.c:911
+#, 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:967
+msgid "Checking all file systems.\n"
+msgstr "S'estan comprovant tots els sistemes de fitxers.\n"
+
+#: misc/fsck.c:1058
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--en espera-- (pas %d)\n"
+
+#: misc/fsck.c:1078
+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:1120
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: s'han especificat massa dispositius\n"
+
+#: misc/fsck.c:1153 misc/fsck.c:1239
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: s'han especificat massa arguments\n"
+
+#: misc/lsattr.c:74
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr "Forma d'ús: %s [-RVadlv] [fitxers...]\n"
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading flags on %s"
+msgstr "En llegir els senyaladors a %s"
+
+#: misc/lsattr.c:91
+#, c-format
+msgid "While reading version on %s"
+msgstr "En llegir la versió a %s"
+
+#: misc/mke2fs.c:116
+#, 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]\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] [-jnqvDFKSV] device [blocks-count]\n"
+msgstr ""
+
+#: misc/mke2fs.c:221
+#, c-format
+msgid "Running command: %s\n"
+msgstr "S'està executant l'ordre: %s\n"
+
+#: misc/mke2fs.c:225
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "en intentar executar «%s»"
+
+#: misc/mke2fs.c:232
+msgid "while processing list of bad blocks from program"
+msgstr "en processar la llista de blocs erronis des del programa"
+
+#: misc/mke2fs.c:259
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr ""
+
+#: misc/mke2fs.c:261
+#, 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:264
+msgid "Aborting....\n"
+msgstr "S'està interrompent...\n"
+
+#: misc/mke2fs.c:284
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Avís: el súperbloc o descriptors de grup de còpia de seguretat al bloc %u\n"
+"\tcontenen blocs erronis.\n"
+"\n"
+
+#: misc/mke2fs.c:303
+msgid "while marking bad blocks as used"
+msgstr "en marcar els blocs erronis com a utilitzats"
+
+#: misc/mke2fs.c:320
+msgid "Writing inode tables: "
+msgstr "Escriptura de les taules de nodes-i:"
+
+#: misc/mke2fs.c:341
+#, fuzzy, 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 amb inici a %u: %s\n"
+
+#: misc/mke2fs.c:355 misc/mke2fs.c:2257 misc/mke2fs.c:2512
+#, c-format
+msgid "done                            \n"
+msgstr "fet                            \n"
+
+#: misc/mke2fs.c:366
+msgid "while creating root dir"
+msgstr "en crear el directori arrel"
+
+#: misc/mke2fs.c:373
+msgid "while reading root inode"
+msgstr "en llegir el node arrel"
+
+#: misc/mke2fs.c:385
+msgid "while setting root inode ownership"
+msgstr "en establir la propietat del node-i arrel"
+
+#: misc/mke2fs.c:403
+msgid "while creating /lost+found"
+msgstr "en crear /lost+found"
+
+#: misc/mke2fs.c:410
+msgid "while looking up /lost+found"
+msgstr "en cercar el /lost+found"
+
+#: misc/mke2fs.c:423
+msgid "while expanding /lost+found"
+msgstr "en expandir el /lost+found"
+
+#: misc/mke2fs.c:438
+msgid "while setting bad block inode"
+msgstr "en establir el node-i de blocs erronis"
+
+#: misc/mke2fs.c:465
+#, 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:475
+#, 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:491
+#, 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:507
+msgid "while initializing journal superblock"
+msgstr "en inicialitzar el súperbloc del registre de transaccions"
+
+#: misc/mke2fs.c:515
+msgid "Zeroing journal device: "
+msgstr "S'estan escrivint zeros al dispositiu de registre de transaccions:"
+
+#: misc/mke2fs.c:527
+#, fuzzy, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "en escriure zeros al dispositiu de registre de transaccions (bloc %u, recompte %d)"
+
+#: misc/mke2fs.c:545
+msgid "while writing journal superblock"
+msgstr "en escriure el súperbloc del registre de transaccions"
+
+#: misc/mke2fs.c:560
+#, fuzzy, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"avís: %u blocs no utilitzats.\n"
+"\n"
+
+#: misc/mke2fs.c:565
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Etiqueta del sistema de fitxers=%s\n"
+
+#: misc/mke2fs.c:568
+#, fuzzy, c-format
+msgid "OS type: %s\n"
+msgstr "Tipus de sistema operatiu: "
+
+# FIXME: log
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Mida del bloc=%u (log=%u)\n"
+
+# FIXME: log
+#: misc/mke2fs.c:574
+#, fuzzy, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Mida del bloc=%u (log=%u)\n"
+
+#: misc/mke2fs.c:578
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Mida del fragment=%u (log=%u)\n"
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:582
+#, fuzzy, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u nodes-i, %u blocs\n"
+
+#: misc/mke2fs.c:584
+#, fuzzy, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%u blocs (%2.2f%%) reservats per al superusuari\n"
+
+#: misc/mke2fs.c:587
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Bloc de dades inicial=%u\n"
+
+#: misc/mke2fs.c:589
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:591
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Màxim de blocs del sistema de fitxers=%lu\n"
+
+#: misc/mke2fs.c:595
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u grups de blocs\n"
+
+#: misc/mke2fs.c:597
+#, c-format
+msgid "%u block group\n"
+msgstr "%u grup de blocs\n"
+
+#: misc/mke2fs.c:600
+#, fuzzy, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u blocs per grup, %u fragments per grup\n"
+
+#: misc/mke2fs.c:603
+#, 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:605
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u nodes-i per grup\n"
+
+#: misc/mke2fs.c:612
+#, c-format
+msgid "Superblock backups stored on blocks: "
+msgstr "Còpies de seguretat del superbloc desades en els blocs: "
+
+#: misc/mke2fs.c:691 misc/tune2fs.c:1165
+#, fuzzy, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "el patró_de_prova no és vàlid: %s\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:743
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Paràmetre de canvi de mida no vàlid: %s\n"
+
+#: misc/mke2fs.c:750
+#, c-format
+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:774
+#, c-format
+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 revisió 0\n"
+
+#: misc/mke2fs.c:801 misc/mke2fs.c:810
+#, fuzzy, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "S'ha establert una opció de muntatge no vàlida: %s\n"
+
+#: misc/mke2fs.c:835
+#, fuzzy, c-format
+msgid "Invalid quotatype parameter: %s\n"
+msgstr "Paràmetre del superbloc no vàlid: %s\n"
+
+#: misc/mke2fs.c:846
+#, 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"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_uid=<uid of root directory>\n"
+"\troot_gid=<gid of root directory>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr OR grp>\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:868
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:907
+#, 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:920 misc/tune2fs.c:398
+#, 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:932 misc/tune2fs.c:349
+#, 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:1072
+#, fuzzy, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"Avís: no s'ha definit el sistema de fitxers %s al fitxer mke2fs.conf.\n"
+
+#: misc/mke2fs.c:1076
+#, c-format
+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:1080
+#, fuzzy, c-format
+msgid "Aborting...\n"
+msgstr "S'està interrompent...\n"
+
+#: misc/mke2fs.c:1120
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1276
+#, fuzzy, c-format
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "No s'ha pogut assignar memòria per al sistema de fitxers\n"
+
+#: misc/mke2fs.c:1317
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1357
+#, c-format
+msgid "invalid block size - %s"
+msgstr "mida de bloc invàlida - %s"
+
+#: misc/mke2fs.c:1361
+#, 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:1377
+#, fuzzy, c-format
+msgid "invalid cluster size - %s"
+msgstr "mida de bloc invàlida - %s"
+
+#: misc/mke2fs.c:1387
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr ""
+
+#: misc/mke2fs.c:1399
+msgid "Illegal number for blocks per group"
+msgstr "Nombre no vàlid per als blocs per grup"
+
+#: misc/mke2fs.c:1404
+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:1412
+msgid "Illegal number for flex_bg size"
+msgstr "Número no vàlid per a la mida de flex_bg"
+
+#: misc/mke2fs.c:1418
+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:1428
+#, 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:1438
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "mida de node-i errònia - %s"
+
+#: misc/mke2fs.c:1450
+#, c-format
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr ""
+
+#: misc/mke2fs.c:1460
+msgid "in malloc for bad_blocks_filename"
+msgstr ""
+
+#: misc/mke2fs.c:1473
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "percentatge de blocs reservats no vàlid - %s"
+
+#: misc/mke2fs.c:1488
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "nombre de nodes-i no vàlid - %s"
+
+#: misc/mke2fs.c:1505
+#, c-format
+msgid "bad revision level - %s"
+msgstr "nivell de revisió erroni - %s"
+
+#: misc/mke2fs.c:1519
+#, fuzzy
+msgid "The -t option may only be used once"
+msgstr "-o només es pot especificar una vegada"
+
+#: misc/mke2fs.c:1527
+#, fuzzy
+msgid "The -T option may only be used once"
+msgstr "-o només es pot especificar una vegada"
+
+#: misc/mke2fs.c:1580 misc/mke2fs.c:2591
+#, 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:1586
+#, 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:1592
+#, 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:1603
+#, fuzzy, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "nombre de blocs no vàlid - %s"
+
+#: misc/mke2fs.c:1613
+msgid "filesystem"
+msgstr "sistema de fitxers"
+
+#: misc/mke2fs.c:1626 resize/main.c:367
+msgid "while trying to determine filesystem size"
+msgstr "en intentar determinar la mida del sistema de fitxers"
+
+#: misc/mke2fs.c:1632
+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:1639
+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:1656
+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:1676
+#, c-format
+msgid "Failed to parse fs types list\n"
+msgstr "No s'ha pogut analitzar la llista de sistemes de fitxers\n"
+
+#: misc/mke2fs.c:1730
+#, 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: la mida del dispositiu %s és massa gran per a expressar-la en 32 bits\n"
+"\ts'utilitzarà una mida de bloc de %d.\n"
+
+#: misc/mke2fs.c:1746
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr ""
+
+#: misc/mke2fs.c:1753
+#, c-format
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr "Les funcions del sistema de fitxers no són compatibles amb sistemes de fitxers de revisió 0\n"
+
+#: misc/mke2fs.c:1760
+#, c-format
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr "Els súperblocs dispersos no són compatibles amb sistemes de fitxers de revisió 0\n"
+
+#: misc/mke2fs.c:1772
+#, c-format
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "Els registres de canvis no són compatibles amb sistemes de fitxers de revisió 0\n"
+
+#: misc/mke2fs.c:1786
+#, fuzzy, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "percentatge de blocs reservats no vàlid - %s"
+
+#: misc/mke2fs.c:1802
+#, c-format
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"Les funcions resize_inode i meta_bg no són compatibles.\n"
+"No es poden activar de manera simultània.\n"
+
+#: misc/mke2fs.c:1819
+msgid "while trying to determine hardware sector size"
+msgstr "en intentar determinar la mida del sector del maquinari"
+
+#: misc/mke2fs.c:1825
+#, fuzzy
+msgid "while trying to determine physical sector size"
+msgstr "en intentar determinar la mida del sector del maquinari"
+
+#: misc/mke2fs.c:1858
+#, fuzzy
+msgid "while setting blocksize; too small for device\n"
+msgstr "en establir la informació de suma de verificació del grup de blocs"
+
+#: misc/mke2fs.c:1863
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1881
+#, fuzzy
+msgid "The cluster size may not be smaller than the block 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:1887
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr ""
+
+#: misc/mke2fs.c:1906
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1909
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1911
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1930
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:1934
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+
+#: misc/mke2fs.c:1968
+msgid "Can't support bigalloc feature without extents feature"
+msgstr ""
+
+#: misc/mke2fs.c:1975
+#, c-format
+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:1982 misc/tune2fs.c:740
+#, c-format
+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 ""
+
+#: misc/mke2fs.c:1993
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:2002
+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:2026
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "La funció flex_bg no està habilitada, per la qual cosa no és permès especificar la mida de flex_bg"
+
+#: misc/mke2fs.c:2038
+#, 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:2056
+#, 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:2063
+#, 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:2077
+#, 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 ""
+"El producte inode_size (%u) * inodes_count (%u) és massa gran per a\n"
+"\tun sistema de fitxers amb %lu blocs. Especifiqueu una inode_ratio (-i)\n"
+"\tmajor o bé un nombre menor de nodes-i (-N).\n"
+
+#: misc/mke2fs.c:2196
+#, 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"
+
+#: misc/mke2fs.c:2210
+#, fuzzy
+msgid "while trying to setup undo file\n"
+msgstr ""
+"\n"
+"\ten intentar crear el fitxer del registre de transaccions"
+
+#: misc/mke2fs.c:2236
+#, fuzzy
+msgid "Discarding device blocks: "
+msgstr "Mida de bloc del dispositiu de registre de transaccions a utilitzar: %d\n"
+
+#: misc/mke2fs.c:2252
+msgid "failed - "
+msgstr ""
+
+#: misc/mke2fs.c:2360
+msgid "while setting up superblock"
+msgstr "en configurar el súperbloc"
+
+#: misc/mke2fs.c:2369
+#, c-format
+msgid "Discard succeeded and will return 0s  - skipping inode table wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:2452
+#, c-format
+msgid "unknown os - %s"
+msgstr "sistema operatiu desconegut - %s"
+
+#: misc/mke2fs.c:2504
+#, fuzzy, c-format
+msgid "Allocating group tables: "
+msgstr "Escriptura de les taules de nodes-i:"
+
+#: misc/mke2fs.c:2508
+msgid "while trying to allocate filesystem tables"
+msgstr "en intentar assignar les taules del sistema de fitxers"
+
+#: misc/mke2fs.c:2517
+#, fuzzy
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr "en escriure el mapa de bits dels blocs"
+
+#: misc/mke2fs.c:2560
+#, fuzzy, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "en escriure zeros al bloc %u al final del sistema de fitxers"
+
+#: misc/mke2fs.c:2573
+msgid "while reserving blocks for online resize"
+msgstr "en reservar blocs per al canvi de mida en línia"
+
+#: misc/mke2fs.c:2584 misc/tune2fs.c:645
+msgid "journal"
+msgstr "registre de transaccions"
+
+#: misc/mke2fs.c:2596
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Addició d'un registre de transaccions al dispositiu %s:"
+
+#: misc/mke2fs.c:2603
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\ten intentar afegir un registre de canvis al dispositiu %s"
+
+#: misc/mke2fs.c:2608 misc/mke2fs.c:2640 misc/tune2fs.c:674 misc/tune2fs.c:688
+#, c-format
+msgid "done\n"
+msgstr "fet\n"
+
+#: misc/mke2fs.c:2617
+#, c-format
+msgid "Skipping journal creation in super-only mode\n"
+msgstr ""
+
+#: misc/mke2fs.c:2628
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Creació del registre de transaccions (%u blocs): "
+
+#: misc/mke2fs.c:2636
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\ten intentar crear el registre de canvis"
+
+#: misc/mke2fs.c:2647 misc/tune2fs.c:451
+#, c-format
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+
+#: misc/mke2fs.c:2652
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2665
+#, c-format
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Escriptura de la informació dels súperblocs i de comptabilitat del sistema de fitxers:"
+
+#: misc/mke2fs.c:2672
+#, c-format
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+"\n"
+"Avís: hi ha hagut problemes en escriure els súperblocs."
+
+#: misc/mke2fs.c:2674
+#, c-format
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"fet\n"
+"\n"
+
+#: misc/mklost+found.c:50
+#, c-format
+msgid "Usage: mklost+found\n"
+msgstr "Forma d'ús: mklost+found\n"
+
+#: misc/partinfo.c:41
+#, 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:51
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "No es pot obrir %s: %s"
+
+#: misc/partinfo.c:57
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "No es pot obtenir la geometria de %s: %s"
+
+#: misc/partinfo.c:65
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "No es pot obtenir la mida de %s: %s"
+
+#: misc/partinfo.c:71
+#, 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:107
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr "Hauríeu d'executar l'e2fsck en el sistema de fitxers.\n"
+
+#: misc/tune2fs.c:116
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-p mmp_update_interval]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]\n"
+"\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[ -I new_inode_size ] device\n"
+msgstr ""
+
+#: misc/tune2fs.c:209
+msgid "while trying to open external journal"
+msgstr "en intentar obrir el registre de transaccions extern"
+
+#: misc/tune2fs.c:214
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s no és un dispositiu de registre de transaccions.\n"
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "No s'ha trobat el súperbloc del registre de transaccions\n"
+
+#: misc/tune2fs.c:240
+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:261
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:269
+msgid "Journal removed\n"
+msgstr "S'ha suprimit el registre de transaccions\n"
+
+#: misc/tune2fs.c:313
+msgid "while reading bitmaps"
+msgstr "en llegir els mapes de bits"
+
+#: misc/tune2fs.c:321
+msgid "while clearing journal inode"
+msgstr "en netejar el node-i del registre de transaccions"
+
+#: misc/tune2fs.c:332
+msgid "while writing journal inode"
+msgstr "en escriure al node-i del registre de transaccions"
+
+#: misc/tune2fs.c:367
+#, c-format
+msgid "(and reboot afterwards!)\n"
+msgstr "(i reinicieu després)\n"
+
+#: misc/tune2fs.c:401
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "La funció de neteja del sistema de fitxers «%s» no està implementada.\n"
+
+#: misc/tune2fs.c:407
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "L'establiment de la funció del sistema de fitxers «%s» no està implementada.\n"
+
+#: misc/tune2fs.c:416
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"La funció 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:424
+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:443
+#, fuzzy
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"La funció 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:461
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:470
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:478
+#, fuzzy
+msgid "Error while reading bitmaps\n"
+msgstr "en llegir els mapes de bits"
+
+#: misc/tune2fs.c:487
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+
+#: misc/tune2fs.c:492
+#, fuzzy
+msgid "while reading MMP block."
+msgstr "en llegir el node-i dels blocs erronis"
+
+#: misc/tune2fs.c:524
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+
+#: misc/tune2fs.c:535
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"La funció 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:595
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:640
+msgid "The filesystem already has a journal.\n"
+msgstr "El sistema de fitxers ja té un registre de transaccions.\n"
+
+#: misc/tune2fs.c:658
+#, 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:662
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Creació del registre de transaccions al dispositiu %s:"
+
+#: misc/tune2fs.c:670
+#, 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:676
+msgid "Creating journal inode: "
+msgstr "Creació del node-i del registre de transaccions:"
+
+#: misc/tune2fs.c:685
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\ten intentar crear el fitxer del registre de transaccions"
+
+#: misc/tune2fs.c:763
+#, fuzzy
+msgid "Couldn't allocate memory to parse quota options!\n"
+msgstr "No s'ha pogut assignar memòria per a analitzar les opcions\n"
+
+#: misc/tune2fs.c:785
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:846
+#, 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:870 misc/tune2fs.c:883
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "nombre de muntatges erroni - %s"
+
+#: misc/tune2fs.c:899
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "comportament d'error erroni - %s"
+
+#: misc/tune2fs.c:926
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "nom de grup/gid erroni - %s"
+
+#: misc/tune2fs.c:959
+#, c-format
+msgid "bad interval - %s"
+msgstr "interval erroni - %s"
+
+#: misc/tune2fs.c:988
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "ràtio de blocs reservats errònia - %s"
+
+#: misc/tune2fs.c:1003
+msgid "-o may only be specified once"
+msgstr "-o només es pot especificar una vegada"
+
+#: misc/tune2fs.c:1012
+msgid "-O may only be specified once"
+msgstr "-O només es pot especificar una vegada"
+
+#: misc/tune2fs.c:1027
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "número de blocs reservats erroni - %s"
+
+#: misc/tune2fs.c:1056
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "nom d'usuari/uid erroni - %s"
+
+#: misc/tune2fs.c:1073
+#, c-format
+msgid "bad inode size - %s"
+msgstr "mida del node-i errònia - %s"
+
+#: misc/tune2fs.c:1080
+#, 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:1174
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:1179
+#, 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] "Establiment del nombre màxim de muntatges a %d\n"
+msgstr[1] "Establiment del nombre màxim de muntatges a %d\n"
+
+#: misc/tune2fs.c:1202
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:1217
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:1232
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Algorisme de resum no vàlid: %s\n"
+
+#: misc/tune2fs.c:1238
+#, 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:1257
+#, c-format
+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"
+msgstr ""
+
+#: misc/tune2fs.c:1723
+#, fuzzy
+msgid "Failed to read inode bitmap\n"
+msgstr "en llegir els mapes de bits"
+
+#: misc/tune2fs.c:1728
+#, fuzzy
+msgid "Failed to read block bitmap\n"
+msgstr "en escriure el mapa de bits dels blocs"
+
+#: misc/tune2fs.c:1745 resize/resize2fs.c:870
+msgid "blocks to be moved"
+msgstr "blocs a moure"
+
+#: misc/tune2fs.c:1748
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:1754
+msgid "Not enough space to increase inode size \n"
+msgstr ""
+
+#: misc/tune2fs.c:1759
+#, fuzzy
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "en reservar blocs per al canvi de mida en línia"
+
+#: misc/tune2fs.c:1791
+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:1818
+#, fuzzy
+msgid "Couldn't allocate memory for tdb filename\n"
+msgstr "No s'ha pogut assignar memòria per al sistema de fitxers\n"
+
+#: misc/tune2fs.c:1840
+#, c-format
+msgid "while trying to delete %s"
+msgstr "en intentar suprimir %s"
+
+#: misc/tune2fs.c:1850
+#, fuzzy, c-format
+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"
+
+#: misc/tune2fs.c:1919
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:1937
+#, fuzzy, c-format
+msgid "The inode size is already %lu\n"
+msgstr "La mida del node-i ja és %d\n"
+
+#: misc/tune2fs.c:1943
+#, c-format
+msgid "Shrinking the inode size is not supported\n"
+msgstr "La reducció de la mida del node-i no està implementada\n"
+
+#: misc/tune2fs.c:1949
+#, fuzzy, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "mida de node-i no vàlida (%d) (mín %d/màx %d)"
+
+#: misc/tune2fs.c:1996
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Establiment del nombre màxim de muntatges a %d\n"
+
+#: misc/tune2fs.c:2002
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Establiment del nombre de muntatges actual a %d\n"
+
+#: misc/tune2fs.c:2007
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Establiment del comportament d'error a %d\n"
+
+#: misc/tune2fs.c:2012
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Establiment del GID dels blocs reservats a %lu\n"
+
+#: misc/tune2fs.c:2017
+#, fuzzy, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "Establiment de l'interval entre comprovacions a %lu segons\n"
+
+#: misc/tune2fs.c:2024
+#, 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:2031
+#, fuzzy, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "Establiment del nombre de blocs reservats a %lu\n"
+
+#: misc/tune2fs.c:2037
+#, fuzzy, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "el nombre de blocs reservats és massa gran (%lu)"
+
+#: misc/tune2fs.c:2044
+#, fuzzy, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Establiment del nombre de blocs reservats a %lu\n"
+
+#: misc/tune2fs.c:2050
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"El sitema de fitxers ja té súperblocs dispersos.\n"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set.  %s"
+msgstr ""
+"\n"
+"S'ha establert el senyalador de súperbloc dispers. %s"
+
+#: misc/tune2fs.c:2062
+msgid ""
+"\n"
+"Clearing the sparse superflag not supported.\n"
+msgstr ""
+"\n"
+"La neteja del senyalador de súperbloc dispers no està implementada.\n"
+
+#: misc/tune2fs.c:2070
+#, 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:2076
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Establiment de l'UID dels blocs reservats a %lu\n"
+
+#: misc/tune2fs.c:2108
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+
+#: misc/tune2fs.c:2126
+#, fuzzy
+msgid "The quota feature 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:2159
+msgid "Invalid UUID format\n"
+msgstr "El format de l'UUID no és vàlid\n"
+
+#: misc/tune2fs.c:2172
+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:2180
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2193
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Establiment de la mida de node-i a %lu\n"
+
+#: misc/tune2fs.c:2196
+#, fuzzy, c-format
+msgid "Failed to change inode size\n"
+msgstr "No s'ha pogut obrir %s\n"
+
+#: misc/tune2fs.c:2207
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:2212
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:2219
+#, fuzzy, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Establiment del nombre de muntatges actual a %d\n"
+
+#: misc/util.c:74
+msgid "Proceed anyway? (y,n) "
+msgstr "Voleu continuar de totes maneres? (s,n)"
+
+#: misc/util.c:89
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr "No s'ha pogut fer al crida stat %s --%s\n"
+
+#: misc/util.c:92
+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"
+
+#: misc/util.c:103
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "el %s no és un dispositiu especial de blocs.\n"
+
+#: misc/util.c:132
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr "%s és el dispositiu complet, no pas només una partició\n"
+
+#: misc/util.c:154
+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:159
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "no es farà un %s aquí\n"
+
+#: misc/util.c:166
+msgid "mke2fs forced anyway.\n"
+msgstr "s'ha forçat el mke2fs de totes maneres.\n"
+
+#: misc/util.c:182
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "No s'ha pogut ubicat memòria per a analitzar les opcions del registre de transaccions\n"
+
+#: misc/util.c:207
+#, fuzzy, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr "No s'han trobat els números màgics del superbloc del registre de transaccions"
+
+#: misc/util.c:228
+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"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/util.c:258
+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:265
+#, 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:273
+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:287
+#, 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:48
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr ""
+
+#: misc/uuidd.c:50
+#, c-format
+msgid "       %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr ""
+
+#: misc/uuidd.c:52
+#, c-format
+msgid "       %s -k\n"
+msgstr ""
+
+#: misc/uuidd.c:154
+#, fuzzy
+msgid "bad arguments"
+msgstr "%s: s'han especificat massa arguments\n"
+
+#: misc/uuidd.c:172
+msgid "connect"
+msgstr ""
+
+#: misc/uuidd.c:191
+msgid "write"
+msgstr ""
+
+#: misc/uuidd.c:199
+msgid "read count"
+msgstr ""
+
+#: misc/uuidd.c:205
+msgid "bad response length"
+msgstr ""
+
+#: misc/uuidd.c:270
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr ""
+
+#: misc/uuidd.c:278
+#, fuzzy, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "No s'ha pogut analitzar l'especificador de data/hora: %s"
+
+#: misc/uuidd.c:307
+#, fuzzy, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "No s'ha pogut reconnectar %i: %m\n"
+
+#: misc/uuidd.c:315
+#, fuzzy, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "No s'ha pogut reconnectar %i: %m\n"
+
+#: misc/uuidd.c:353
+#, fuzzy, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "S'ha produït un error en llegir el @i %i: %m\n"
+
+#: misc/uuidd.c:361
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:380
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:390
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:399
+#, 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:420
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:432
+#, fuzzy, c-format
+msgid "Invalid operation %d\n"
+msgstr "La versió dels atributs ampliats no és vàlida.\n"
+
+#: misc/uuidd.c:476 misc/uuidd.c:498
+#, c-format
+msgid "Bad number: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:533 misc/uuidd.c:562
+#, fuzzy, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "S'ha produït un error en crear el @d /@l (%s): %m\n"
+
+#: misc/uuidd.c:543
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:547
+#, c-format
+msgid "List of UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:568
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr ""
+
+#: misc/uuidd.c:585
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:591
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr ""
+
+#: 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'extensió:\n"
+
+# FIXME: «Sorted» (dpm)
+#: resize/extent.c:203
+#, fuzzy, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tNúm=%d, Mida=%d, Cursor=%d, Ordenat=%d\n"
+
+#: resize/main.c:43
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]\n"
+"\n"
+msgstr ""
+"Forma d'ús: %s [-d senyaladors_de_depuració] [-f] [-F] [-M] [-P] [-p] dispositiu [mida nova]\n"
+"\n"
+
+#: resize/main.c:65
+msgid "Extending the inode table"
+msgstr "Ampliació de la taula de nodes-i"
+
+#: resize/main.c:68
+msgid "Relocating blocks"
+msgstr "Reubicació dels blocs"
+
+#: resize/main.c:71
+msgid "Scanning inode table"
+msgstr "Escaneig de la taula de nodes-i"
+
+#: resize/main.c:74
+msgid "Updating inode references"
+msgstr "Actualització de les referències dels nodes-i"
+
+#: resize/main.c:77
+msgid "Moving inode table"
+msgstr "Trasllat de la taula de nodes-i"
+
+#: resize/main.c:80
+msgid "Unknown pass?!?"
+msgstr "Pas desconegut!?"
+
+#: resize/main.c:83
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Inici del pas %d (màx = %lu)\n"
+
+#: resize/main.c:154
+#, c-format
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested.  Proceed\n"
+"at your own risk!  Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:271
+#, c-format
+msgid "while opening %s"
+msgstr "en obrir %s"
+
+#: resize/main.c:279
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "eon obtenir la informació d'«stat» per a %s"
+
+#: resize/main.c:337 resize/main.c:450
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Executeu «e2fsck -f %s» primer.\n"
+"\n"
+
+#: resize/main.c:341
+#, fuzzy, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Mida mínima estimada del sistema de fitxers: %u\n"
+
+#: resize/main.c:377
+#, fuzzy, c-format
+msgid "Invalid new size: %s\n"
+msgstr "mida de node-i errònia - %s"
+
+#: resize/main.c:393
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr ""
+
+#: resize/main.c:401
+#, fuzzy, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "La mida de bloc del dispositiu de registre de transaccions (%d) és menor que la mida mínima de bloc %d\n"
+
+#: resize/main.c:407
+msgid "Invalid stride length"
+msgstr ""
+
+#: resize/main.c:431
+#, 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 partició (o dispositiu) contenidora té una mida de només %u (%dk) blocs.\n"
+"N'heu requerit una mida nova de %u blocs.\n"
+"\n"
+
+#: resize/main.c:438
+#, fuzzy, c-format
+msgid ""
+"The filesystem is already %llu blocks long.  Nothing to do!\n"
+"\n"
+msgstr ""
+"El sistema de fitxer ja té %u blocs. No cal fer res\n"
+"\n"
+
+#: resize/main.c:455
+#, fuzzy, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr ""
+"El sistema de fitxers a %s té ara una mida de %u blocs.\n"
+"\n"
+
+#: resize/main.c:464
+#, c-format
+msgid "while trying to resize %s"
+msgstr "en intentar redimensionar %s"
+
+#: resize/main.c:467
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+
+#: resize/main.c:473
+#, fuzzy, c-format
+msgid ""
+"The filesystem on %s is now %llu blocks long.\n"
+"\n"
+msgstr ""
+"El sistema de fitxers a %s té ara una mida de %u blocs.\n"
+"\n"
+
+#: resize/main.c:488
+#, fuzzy, c-format
+msgid "while trying to truncate %s"
+msgstr "en intentar mostrar la informació de %s"
+
+#: resize/online.c:79
+#, 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:83
+#, fuzzy
+msgid "On-line shrinking not supported"
+msgstr "La reducció de mida en línia de %u a %u no és compatible.\n"
+
+#: resize/online.c:108
+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:117
+#, fuzzy
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "en reservar blocs per al canvi de mida en línia"
+
+#: resize/online.c:124
+#, fuzzy
+msgid "Kernel does not support resizing a file system this large"
+msgstr "El nucli no és compatible amb el canvi de mida en línia"
+
+#: resize/online.c:132
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "en intentar obrir el punt de muntatge %s"
+
+#: resize/online.c:137
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr ""
+
+#: resize/online.c:156 resize/online.c:173
+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:159 resize/online.c:179
+msgid "While checking for on-line resizing support"
+msgstr "En comprovar la compatibilitat amb el canvi de mida en línia"
+
+#: resize/online.c:176
+msgid "Kernel does not support online resizing"
+msgstr "El nucli no és compatible amb el canvi de mida en línia"
+
+#: resize/online.c:209
+#, fuzzy, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "Canvi de mida en línia de %s a %u (%dk) blocs.\n"
+
+#: resize/online.c:219
+msgid "While trying to extend the last group"
+msgstr "En intentar ampliar el darrer grup"
+
+#: resize/online.c:273
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "En intentar afegir el grup #%d"
+
+#: resize/online.c:284
+#, 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:369
+#, c-format
+msgid "inodes (%llu) must be less than %u"
+msgstr "el nombre de nodes-i (%llu) ha de ser menor que %u"
+
+#: resize/resize2fs.c:631
+msgid "reserved blocks"
+msgstr "blocs reservats"
+
+#: resize/resize2fs.c:875
+msgid "meta-data blocks"
+msgstr "blocs de metadades"
+
+# FIXME: (dpm)
+#: resize/resize2fs.c:1837
+#, c-format
+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
+msgid "EXT2FS Library version 1.42.8"
+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 "s'està llegint el súperbloc del registre de transaccions\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 ", descriptors de grup a "
+
+#: lib/ext2fs/ext2_err.c:34
+#, fuzzy
+msgid "Can't write group descriptors"
+msgstr ", descriptors de grup 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 "en escriure el mapa de bits dels nodes-i"
+
+#: lib/ext2fs/ext2_err.c:39
+#, fuzzy
+msgid "Can't read an inode bitmap"
+msgstr "escriptura dels mapes de bits de bloc i de node-i"
+
+#: lib/ext2fs/ext2_err.c:40
+#, fuzzy
+msgid "Can't write an block bitmap"
+msgstr "en escriure el mapa de bits dels blocs"
+
+#: lib/ext2fs/ext2_err.c:41
+#, fuzzy
+msgid "Can't read an block bitmap"
+msgstr "en escriure el mapa de bits dels blocs"
+
+#: lib/ext2fs/ext2_err.c:42
+#, fuzzy
+msgid "Can't write an inode table"
+msgstr "en escriure la taula de nodes-i"
+
+#: lib/ext2fs/ext2_err.c:43
+#, fuzzy
+msgid "Can't read an inode table"
+msgstr "Escaneig de la taula de nodes-i"
+
+#: 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 "La mida del sistema de fitxers és més gran que la mida aparent del dispositiu."
+
+#: 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 ", mapa de bits del node-i a "
+
+#: lib/ext2fs/ext2_err.c:51
+#, fuzzy
+msgid "Block bitmap not loaded"
+msgstr " Mapa de bits del bloc a "
+
+#: lib/ext2fs/ext2_err.c:52
+#, fuzzy
+msgid "Illegal inode number"
+msgstr "Nombre de blocs invàlid\n"
+
+#: lib/ext2fs/ext2_err.c:53
+#, fuzzy
+msgid "Illegal block number"
+msgstr "Nombre de blocs invàlid\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 "s'estan llegint els blocs indirectes del node-i %u"
+
+#: lib/ext2fs/ext2_err.c:65
+#, fuzzy
+msgid "Illegal doubly indirect block found"
+msgstr "s'estan llegint els blocs indirectes del node-i %u"
+
+#: lib/ext2fs/ext2_err.c:66
+#, fuzzy
+msgid "Illegal triply indirect block found"
+msgstr "s'estan llegint els blocs indirectes del node-i %u"
+
+#: lib/ext2fs/ext2_err.c:67
+#, fuzzy
+msgid "Block bitmaps are not the same"
+msgstr " Mapa de bits del bloc a "
+
+#: lib/ext2fs/ext2_err.c:68
+#, fuzzy
+msgid "Inode bitmaps are not the same"
+msgstr ", mapa de bits del node-i 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 ""
+
+#: 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 té funcionalitats no implementades:"
+
+#: lib/ext2fs/ext2_err.c:79
+#, fuzzy
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "%s té funcionalitats no implementades:"
+
+#: 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 en la ubicació"
+
+#: 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 "No s'ha pogut assignar memòria per al sistema de fitxers\n"
+
+#: lib/ext2fs/ext2_err.c:84
+#, fuzzy
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "No s'ha pogut assignar memòria per al sistema de fitxers\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 "El bloc de directori %u (#%d) en el node-i %u és buit\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 "Mida de bloc del dispositiu de registre de transaccions a utilitzar: %d\n"
+
+#: lib/ext2fs/ext2_err.c:95
+#, fuzzy
+msgid "Journal superblock not found"
+msgstr "No s'ha trobat el súperbloc del registre de transaccions\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 "en intentar obrir el registre de transaccions extern"
+
+#: lib/ext2fs/ext2_err.c:99
+#, fuzzy
+msgid "Journal not found"
+msgstr "No s'ha trobat el súperbloc del registre de transaccions\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 "aatribut ampliat"
+
+#: 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 "<El node-i del descriptor de grup>"
+
+#: 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 "Paràmetre de canvi de mida no vàlid: %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 ""
+
+# 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
+#, fuzzy
+msgid "No 'next' extent"
+msgstr "xextensió"
+
+#: 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 "No s'ha trobat /@l.  "
+
+#: 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: fsck 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 "<El node-i del descriptor de 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 "Còpies de seguretat del superbloc desades en els blocs: "
+
+#: lib/ext2fs/ext2_err.c:164
+msgid "Unknown checksum algorithm"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match MMP block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr ""
+
+#: e2fsck/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr ""
+
+#: e2fsck/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr ""
+
+#: e2fsck/prof_err.c:13
+#, fuzzy
+msgid "Profile section not found"
+msgstr "en crear /lost+found"
+
+#: e2fsck/prof_err.c:14
+#, fuzzy
+msgid "Profile relation not found"
+msgstr "en crear /lost+found"
+
+#: e2fsck/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+
+#: e2fsck/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr ""
+
+#: e2fsck/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr ""
+
+#: e2fsck/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr ""
+
+#: e2fsck/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr ""
+
+#: e2fsck/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr ""
+
+#: e2fsck/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr ""
+
+#: e2fsck/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr ""
+
+#: e2fsck/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr ""
+
+#: e2fsck/prof_err.c:32
+#, fuzzy
+msgid "Invalid profile_section object"
+msgstr "S'ha definit una opció del sistema de fitxers no vàlida: %s\n"
+
+#: e2fsck/prof_err.c:33
+msgid "No more sections"
+msgstr ""
+
+#: e2fsck/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr ""
+
+#: e2fsck/prof_err.c:35
+msgid "No profile file open"
+msgstr ""
+
+#: e2fsck/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:37
+#, fuzzy
+msgid "Couldn't open profile file"
+msgstr "No s'ha pogut clonar el fitxer: %m\n"
+
+#: e2fsck/prof_err.c:38
+msgid "Section already exists"
+msgstr ""
+
+#: e2fsck/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr ""
+
+#: e2fsck/prof_err.c:40
+msgid "Invalid integer value"
+msgstr ""
+
+#: e2fsck/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr ""
+
+#~ 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 "Error while deleting extent: %m\n"
+#~ msgstr "S'ha produït un error suprimir l'extensió: %m\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 "%s is mounted.  "
+#~ msgstr "%s està muntat.  "
+
+#~ msgid "Couldn't determine journal size"
+#~ msgstr "No s'ha pogut determinar la mida del registre de canvis"
+
+#~ msgid "bad block size - %s"
+#~ msgstr "mida del bloc erroni - %s"
+
+#~ 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 ext2fs_block_iterate"
+#~ msgstr "en fer la crida a ext2fs_block_iterate"
+
+#~ msgid "while calling iterator function"
+#~ msgstr "en fer la crida a la funció d'iteració"
+
+#~ msgid "while allocating inode buffer"
+#~ msgstr "en ubicar la memòria intermèdia per al node-i"
+
+#~ msgid "while reading inode table (group %d)"
+#~ msgstr "en llegir la taula dels nodes-i (grup %d)"
+
+#~ msgid "while writing inode table (group %d)"
+#~ msgstr "en escriure la taula dels nodes-i (grup %d)"
+
+#~ msgid "%s: Filesystem byte order already normalized.\n"
+#~ msgstr "%s: l'ordre dels bytes del sistema de fitxers ja està normalitzat.\n"
+
+#~ msgid "invalid starting block - %s"
+#~ msgstr "bloc d'inici no vàlid - %s"
diff --git a/e2fsprogs/po/cs.gmo b/e2fsprogs/po/cs.gmo
new file mode 100644
index 0000000..5c7c07f
--- /dev/null
+++ b/e2fsprogs/po/cs.gmo
Binary files differ
diff --git a/e2fsprogs/po/cs.po b/e2fsprogs/po/cs.po
new file mode 100644
index 0000000..1879fd4
--- /dev/null
+++ b/e2fsprogs/po/cs.po
@@ -0,0 +1,7023 @@
+# 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.
+#
+#. 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).
+#.  
+#. 	%b	<blk>			block number
+#. 	%B	<blkcount>		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_dir_acl
+#. 	%Iu	<inode> -> i_uid
+#. 	%Ig	<inode> -> i_gid
+#. 	%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: 2013-06-16 08:17-0400\n"
+"PO-Revision-Date: 2013-11-26 17:10+0100\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"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:180
+#, 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/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:1332 e2fsck/unix.c:1420 misc/badblocks.c:1214
+#: misc/badblocks.c:1222 misc/badblocks.c:1236 misc/badblocks.c:1248
+#: misc/dumpe2fs.c:588 misc/e2image.c:1196 misc/e2image.c:1324
+#: misc/e2image.c:1337 misc/mke2fs.c:196 misc/tune2fs.c:1907 resize/main.c:315
+#, c-format
+msgid "while trying to open %s"
+msgstr "při pokusu otevřít %s"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "při pokusu popen „%s“"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:203
+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:105
+msgid "while updating bad block inode"
+msgstr "při aktualizaci iuzlu špatných bloků"
+
+#: e2fsck/badblocks.c:131
+#, 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/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:61 e2fsck/ehandler.c:110
+msgid "Ignore error"
+msgstr "Ignorovat chybu"
+
+#: e2fsck/ehandler.c:62
+msgid "Force rewrite"
+msgstr "Vynutit přepsání"
+
+#: e2fsck/ehandler.c:104
+#, 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:107
+#, c-format
+msgid "Error writing block %lu (%s).  "
+msgstr "Chyba při zápisu bloku %lu (%s). "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "prázdné bloky adresářů"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "mapa prázdných adresářů"
+
+#: e2fsck/emptydir.c:98
+#, 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:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Neplatný počet bloků!\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Nemohu alokovat vyrovnávací paměť bloku (velikost=%d)\n"
+
+#: 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/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Použití: %s [-F] [-I bloky_inode_bufferů] zařízení\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:961
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "při otevírání %s pro synchronizaci"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:967 resize/main.c:288
+#, c-format
+msgid "while trying to flush %s"
+msgstr "při pokusu synchronizovat %s"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1091
+msgid "while opening inode scan"
+msgstr "při zahájení průchodu iuzly"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1109
+msgid "while getting next inode"
+msgstr "při získávání dalšího iuzlu"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "prozkoumáno %u iuzlů.\n"
+
+#: e2fsck/journal.c:522
+msgid "reading journal superblock\n"
+msgstr "čtení superbloku žurnálu\n"
+
+#: e2fsck/journal.c:579
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: nenalezen platný superblok žurnálu\n"
+
+#: e2fsck/journal.c:588
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: žurnál příliš krátký\n"
+
+#: e2fsck/journal.c:880
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: obnovuje se žurnál\n"
+
+#: e2fsck/journal.c:882
+#, 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:909
+#, 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:113
+msgid "aextended attribute"
+msgstr "arozšířený atribut"
+
+#: e2fsck/message.c:114
+msgid "Aerror allocating"
+msgstr "Achyba při alokaci"
+
+#: e2fsck/message.c:115
+msgid "bblock"
+msgstr "bblok"
+
+#: e2fsck/message.c:116
+msgid "Bbitmap"
+msgstr "Bbitmap"
+
+#: e2fsck/message.c:117
+msgid "ccompress"
+msgstr "ckomprimovat"
+
+#: e2fsck/message.c:118
+msgid "Cconflicts with some other fs @b"
+msgstr "Ckoliduje s jiným blokem systému souborů"
+
+#: e2fsck/message.c:119
+msgid "iinode"
+msgstr "iinode"
+
+#: e2fsck/message.c:120
+msgid "Iillegal"
+msgstr "Inepovolen"
+
+#: e2fsck/message.c:121
+msgid "jjournal"
+msgstr "jžurnál"
+
+#: e2fsck/message.c:122
+msgid "Ddeleted"
+msgstr "Dodstraněn"
+
+#: e2fsck/message.c:123
+msgid "ddirectory"
+msgstr "dadresář"
+
+#: 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 "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:131
+msgid "Lis a link"
+msgstr "Lje odkaz"
+
+#: e2fsck/message.c:132
+msgid "mmultiply-claimed"
+msgstr "mvíce krát alokováno"
+
+#: e2fsck/message.c:133
+msgid "ninvalid"
+msgstr "nneplatný"
+
+#: e2fsck/message.c:134
+msgid "oorphaned"
+msgstr "oosiřel"
+
+#: e2fsck/message.c:135
+msgid "pproblem in"
+msgstr "pproblém v"
+
+#: e2fsck/message.c:136
+msgid "qquota"
+msgstr "qkvóta"
+
+#: e2fsck/message.c:137
+msgid "rroot @i"
+msgstr "rkořenový iuzel"
+
+#: e2fsck/message.c:138
+msgid "sshould be"
+msgstr "smělo by být"
+
+#: e2fsck/message.c:139
+msgid "Ssuper@b"
+msgstr "Ssuperblok"
+
+#: e2fsck/message.c:140
+msgid "uunattached"
+msgstr "unepřipojen"
+
+#: e2fsck/message.c:141
+msgid "vdevice"
+msgstr "vzařízení"
+
+#: e2fsck/message.c:142
+msgid "xextent"
+msgstr "xrozsah"
+
+#: e2fsck/message.c:143
+msgid "zzero-length"
+msgstr "znulové délky"
+
+#: e2fsck/message.c:154
+msgid "<The NULL inode>"
+msgstr "<Iuzel NULL>"
+
+#: e2fsck/message.c:155
+msgid "<The bad blocks inode>"
+msgstr "<Iuzel špatných bloků>"
+
+#: e2fsck/message.c:157
+msgid "<The user quota inode>"
+msgstr "<Iuzel kvóty uživatelů>"
+
+#: e2fsck/message.c:158
+msgid "<The group quota inode>"
+msgstr "<Iuzel kvóty skupin>"
+
+#: e2fsck/message.c:159
+msgid "<The boot loader inode>"
+msgstr "<Iuzel zavaděče systému>"
+
+#: e2fsck/message.c:160
+msgid "<The undelete directory inode>"
+msgstr "<Iuzel adresáře undelete>"
+
+#: e2fsck/message.c:161
+msgid "<The group descriptor inode>"
+msgstr "<Iuzel deskriptoru skupiny>"
+
+#: e2fsck/message.c:162
+msgid "<The journal inode>"
+msgstr "<Iuzel žurnálu>"
+
+#: e2fsck/message.c:163
+msgid "<Reserved inode 9>"
+msgstr "<Rezervovaný iuzel 9>"
+
+#: e2fsck/message.c:164
+msgid "<Reserved inode 10>"
+msgstr "<Rezervovaný iuzel 10>"
+
+#: e2fsck/message.c:333
+msgid "regular file"
+msgstr "obyčejný soubor"
+
+#: e2fsck/message.c:335
+msgid "directory"
+msgstr "adresář"
+
+#: e2fsck/message.c:337
+msgid "character device"
+msgstr "znakové zařízení"
+
+#: e2fsck/message.c:339
+msgid "block device"
+msgstr "blokové zařízení"
+
+#: e2fsck/message.c:341
+msgid "named pipe"
+msgstr "pojmenovaná roura"
+
+#: e2fsck/message.c:343
+msgid "symbolic link"
+msgstr "symbolický odkaz"
+
+#: e2fsck/message.c:345 misc/uuidd.c:161
+msgid "socket"
+msgstr "soket"
+
+#: e2fsck/message.c:347
+#, 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:422
+msgid "indirect block"
+msgstr "nepřímý blok"
+
+# Expansion of %B in singular nominativ
+#: e2fsck/message.c:424
+msgid "double indirect block"
+msgstr "dvojnásobně nepřímý blok"
+
+# Expansion of %B in singular nominativ
+#: e2fsck/message.c:426
+msgid "triple indirect block"
+msgstr "trojnásobně nepřímý blok"
+
+# Expansion of %B in singular nominativ
+#: e2fsck/message.c:428
+msgid "translator block"
+msgstr "překladový blok"
+
+# Expansion of %B in singular nominativ
+#: e2fsck/message.c:430
+msgid "block #"
+msgstr "blok č."
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "mapa několikrát alokovaných iuzlů"
+
+#: e2fsck/pass1b.c:610 e2fsck/pass1b.c:730
+#, 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:821
+msgid "returned from clone_file_block"
+msgstr "vrácený z clone_file_block"
+
+#: e2fsck/pass1b.c:843
+#, 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:855
+#, 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:475 e2fsck/pass2.c:782
+msgid "reading directory block"
+msgstr "čtení adresářového bloku"
+
+#: e2fsck/pass1.c:598
+msgid "in-use inode map"
+msgstr "mapa používaných iuzlů"
+
+#: e2fsck/pass1.c:609
+msgid "directory inode map"
+msgstr "mapa iuzlů adresářů"
+
+#: e2fsck/pass1.c:619
+msgid "regular file inode map"
+msgstr "mapa iuzlů obyčejných souborů"
+
+#: e2fsck/pass1.c:628
+msgid "in-use block map"
+msgstr "mapa používaných bloků"
+
+#: e2fsck/pass1.c:695
+msgid "opening inode scan"
+msgstr "otevírání průzkumu iuzlů"
+
+#: e2fsck/pass1.c:729
+msgid "getting next inode from scan"
+msgstr "získávání dalšího iuzlu z průzkumu"
+
+#: e2fsck/pass1.c:1239
+msgid "Pass 1"
+msgstr "Průchod 1"
+
+#: e2fsck/pass1.c:1296
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "čtu nepřímé bloky iuzlu %u"
+
+#: e2fsck/pass1.c:1346
+msgid "bad inode map"
+msgstr "mapa špatných iuzlů"
+
+#: e2fsck/pass1.c:1369
+msgid "inode in bad block map"
+msgstr "iuzel v mapě špatných bloků"
+
+#: e2fsck/pass1.c:1389
+msgid "imagic inode map"
+msgstr "mapa imagic iuzlů"
+
+#: e2fsck/pass1.c:1416
+msgid "multiply claimed block map"
+msgstr "mapa několikrát alokovaných bloků"
+
+#: e2fsck/pass1.c:1527
+msgid "ext attr block map"
+msgstr "mapa bloků rozšířených atributů"
+
+#: e2fsck/pass1.c:2299
+#, 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:2660
+msgid "block bitmap"
+msgstr "bitmapa bloků"
+
+#: e2fsck/pass1.c:2666
+msgid "inode bitmap"
+msgstr "bitmapa iuzlů"
+
+#: e2fsck/pass1.c:2672
+msgid "inode table"
+msgstr "tabulka iuzlů"
+
+#: e2fsck/pass2.c:283
+msgid "Pass 2"
+msgstr "Průchod 2"
+
+#: e2fsck/pass2.c:805
+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:136
+msgid "Pass 3"
+msgstr "Průchod 3"
+
+#: e2fsck/pass3.c:322
+msgid "inode loop detection bitmap"
+msgstr "bitmapa detekce cyklů iuzlů"
+
+#: e2fsck/pass4.c:196
+msgid "Pass 4"
+msgstr "Průchod 4"
+
+#: e2fsck/pass5.c:74
+msgid "Pass 5"
+msgstr "Průchod 5"
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(žádná výzva)"
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr "Opravit"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Vymazat"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Přemístit"
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr "Alokovat"
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr "Zvětšit"
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr "Připojit do /lost+found"
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr "Vytvořit"
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr "Zachránit"
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr "Useknout"
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr "Vyčistit iuzel"
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr "Přerušit"
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr "Rozdělit"
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr "Pokračovat"
+
+#: e2fsck/problem.c:65
+msgid "Clone multiply-claimed blocks"
+msgstr "Klonovat více krát alokované bloky"
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr "Odstranit soubor"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Potlačit zprávy"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "Odstranit odkaz"
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "Vymazat index HTree"
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr "Znovu vytvořit"
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr "(ŽÁDNÝ)"
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr "OPRAVENO"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "VYMAZÁNO"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "PŘEMÍSTĚNO"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "ALOKOVÁNO"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "ZVĚTŠENO"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "PŘIPOJENO"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "VYTVOŘENO"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "ZACHRÁNĚNO"
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr "USEKNUTO"
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr "INODE VYMAZÁNA"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "PŘERUŠENO"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr "ROZDĚLENO"
+
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr "POKRAČUJI"
+
+#: e2fsck/problem.c:93
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "VÍCE KRÁT ALOKOVANÉ BLOKU NAKLONOVÁNY"
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr "SOUBOR ODSTRANĚN"
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr "POTLAČENO"
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr "ODKAZ ODSTRANĚN"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "INDEX HTREE VYMAZÁN"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "BUDE ZNOVU VYTVOŘENO"
+
+#. @-expanded: block bitmap for group %g is not in group.  (block %b)\n
+#: e2fsck/problem.c:107
+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:111
+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:116
+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 correct ext2\n
+#. @-expanded: filesystem.  If the device is valid and it really contains an ext2\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 %S <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:122
+#, c-format
+msgid ""
+"\n"
+"The @S could not be read or does not describe a correct ext2\n"
+"@f.  If the @v is valid and it really contains an ext2\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 %S <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Superblok nemohl být načten nebo nepopisuje správný systém souborů\n"
+"ext2. Pokud je zařízení platné a opravdu obsahuje systém souborů\n"
+"ext2 (a ne swap nebo něco jiného), pak je superblok\n"
+"poškozen a můžete zkusit spustit e2fsck s jiným superblokem:\n"
+"    e2fsck -b %S <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:131
+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:138
+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:145
+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:150
+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:155
+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:160
+#, 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:169
+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:174
+#, 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:179
+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:183
+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:188
+#, 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:193
+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:198
+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:203
+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:208
+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:213
+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:221
+msgid "@j @S is corrupt.\n"
+msgstr "Superblok žurnálu je poškozen.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal %s is present.\n
+#: e2fsck/problem.c:226
+#, c-format
+msgid "@S has_@j flag is clear, but a @j %s is present.\n"
+msgstr "Příznak superbloku has_journal (má_žurnál) není nastaven, avšak žurnálový %s je přítomen.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:231
+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:236
+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:241
+msgid "Clear @j"
+msgstr "Vymazat žurnál"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.  
+#: e2fsck/problem.c:246 e2fsck/problem.c:695
+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:251
+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:256
+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:261
+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:266
+#, 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:271
+#, 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:276
+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:281
+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:286
+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:291
+#, 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:296
+#, 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:301
+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:307
+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:312
+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:317
+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:322
+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:328
+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:333
+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:338
+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:343
+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:347
+#, 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:352
+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:357
+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:362
+#, 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:367
+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:372
+msgid "Last @g @b @B uninitialized.  "
+msgstr "Poslední bitmapa bloků skupiny není inicializována.  "
+
+#: e2fsck/problem.c:377
+#, 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:381
+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)  
+#: e2fsck/problem.c:386
+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)  "
+msgstr ""
+"Čas posledního připojení superbloku leží v budoucnosti.\n"
+"\t(rozdíl menší než den, pravděpodobně jsou chybně nastaveny hardwarové hodiny  "
+
+#. @-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).  
+#: e2fsck/problem.c:392
+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).  "
+msgstr ""
+"Čas posledního zápisu superbloku leží v budoucnosti.\n"
+"\t(rozdíl menší než den, pravděpodobně jsou chybně nastaveny hardwarové hodiny. "
+
+#. @-expanded: One or more block group descriptor checksums are invalid.  
+#: e2fsck/problem.c:398
+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:403
+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:408
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Nastavuje se počet volných bloků na %c (byl %b)\n"
+
+#. @-expanded: Making quota inode %i (%Q) hidden.\n
+#: e2fsck/problem.c:413
+msgid "Making @q @i %i (%Q) hidden.\n"
+msgstr "Iuzel kvóty %i (%Q) se označuje jako skrytý.\n"
+
+#. @-expanded: superblock has invalid MMP block.  
+#: e2fsck/problem.c:418
+msgid "@S has invalid MMP block.  "
+msgstr "Superblok má špatný blok MMP.  "
+
+#. @-expanded: superblock has invalid MMP magic.  
+#: e2fsck/problem.c:423
+msgid "@S has invalid MMP magic.  "
+msgstr "Superblok má neplatná čísla MMP.  "
+
+#: e2fsck/problem.c:428
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:433
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:440
+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:444
+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:449
+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:454
+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:459
+#, 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:464
+#, 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:469
+#, 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:474
+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:479
+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:484
+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:489
+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:494
+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:499
+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:504
+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:509
+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:514
+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:519
+#, 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:524
+#, 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:529
+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:534
+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:539
+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:544
+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:549
+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:556
+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:561
+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:567
+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:572
+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:578
+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:583
+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:589
+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:595
+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:600
+#, 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:605
+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:610
+#, 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:615
+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:620
+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:625 e2fsck/problem.c:1474
+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:630
+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:635
+#, 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:640
+#, 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:645
+#, 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:650
+#, 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:655
+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:660
+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:666
+#, 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:674
+#, 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:679
+#, 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: inode %i has compression flag set on filesystem without compression support.  
+#: e2fsck/problem.c:685
+#, c-format
+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. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.  
+#: e2fsck/problem.c:690
+#, 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:700
+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:705
+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:710
+#, 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:716
+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:721
+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:726
+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:731
+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:736
+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:741
+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:746
+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:751
+msgid "@a @b %b has h_@bs > 1.  "
+msgstr "Blok rozšířených atributů %b má h_blocks > 1. "
+
+#. @-expanded: error allocating extended attribute block %b.  
+#: e2fsck/problem.c:756
+msgid "@A @a @b %b.  "
+msgstr "Chyba při alokaci bloku rozšířených atributů %b. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).  
+#: e2fsck/problem.c:761
+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:766
+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:771
+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:776
+#, 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:780
+msgid "%B (%b) causes @d to be too big.  "
+msgstr "%B (%b) způsobuje, že adresář je příliš velký. "
+
+#: e2fsck/problem.c:785
+msgid "%B (%b) causes file to be too big.  "
+msgstr "%B (%b) způsobuje, že soubor je příliš velký. "
+
+#: e2fsck/problem.c:790
+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:795
+#, 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:800
+#, 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:805
+#, 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:810
+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:815
+#, 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:820
+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:825
+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:831
+#, 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:836
+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:841
+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:846
+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:851
+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:856
+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:861
+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:866
+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:871
+#, 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:876
+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:882
+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:887
+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:892
+#, 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:897
+#, 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:902
+#, 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:907
+#, 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:912
+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:916
+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:921
+#, 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 regular file.  
+#: e2fsck/problem.c:926
+msgid "@q @i is not regular file.  "
+msgstr "Iuzel kvóty není obyčejný soubor. "
+
+#. @-expanded: quota inode is not in use, but contains data.  
+#: e2fsck/problem.c:931
+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:936
+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:941
+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:946
+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"
+
+# ??? 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:953
+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:959
+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: \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:967
+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:973
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "Více krát alokovaný(é) blok(y) v iuzlu %i:"
+
+#: e2fsck/problem.c:988
+#, 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:993
+#, 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:998
+#, 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:1003 e2fsck/problem.c:1318
+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:1008
+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:1014
+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:1019
+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:1025
+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:1030
+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:1035
+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:1040
+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:1053
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Nemohu klonovat soubor: %m\n"
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1059
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Průchod 2: Kontroluje se strukturu adresářů\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1064
+#, 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:1069
+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:1074
+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:1079
+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:1084
+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:1089
+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:1094
+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:1099
+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:1104
+#, 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:1109
+#, 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:1114
+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:1119
+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:1124
+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:1129
+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_dir_acl for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1134
+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"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1139
+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:1144
+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:1149
+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:1154
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "Iuzel adresáře %i, %B, posun %N: adresář poškozen\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1159
+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:1164
+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:1169
+#, 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:1174
+#, 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:1179
+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:1184
+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:1189
+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:1194
+msgid "@E is duplicate '..' @e.\n"
+msgstr "Položka „%Dn“ v %p (%i) je duplikátní položka „..“.\n"
+
+#: e2fsck/problem.c:1199 e2fsck/problem.c:1499
+#, 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:1204
+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:1209
+#, 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:1214
+#, 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:1219
+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:1224
+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:1229
+#, 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:1234
+#, 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:1239
+#, 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:1244
+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:1249
+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:1254
+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:1259
+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:1264
+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:1269
+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:1274
+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:1279
+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:1284
+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:1289
+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:1294
+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:1299
+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:1304
+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:1309
+msgid "@n @h %d (%q).  "
+msgstr "Neplatný iuzel HTREE adresáře %d (%q). "
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1313
+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:1323
+#, 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:1328
+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:1333
+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:1338
+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:1343
+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:1348
+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:1353
+#, 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:1358
+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:1363
+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:1368
+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:1372
+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:1377
+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:1382
+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: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1389
+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:1394
+msgid "@r not allocated.  "
+msgstr "Kořenový iuzel nealokován. "
+
+#. @-expanded: No room in lost+found directory.  
+#: e2fsck/problem.c:1399
+msgid "No room in @l @d.  "
+msgstr "Není místo v adresáři lost+found. "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1404
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "Nepřipojený adresářový iuzel %i (%p)\n"
+
+#. @-expanded: /lost+found not found.  
+#: e2fsck/problem.c:1409
+msgid "/@l not found.  "
+msgstr "/lost+found nenalezeno. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1414
+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:1419
+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:1424
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Nemohu zvětšit /lost+found: %m\n"
+
+#: e2fsck/problem.c:1429
+#, 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:1434
+#, 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:1439
+#, 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:1444
+#, 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:1449
+#, 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:1454
+#, 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:1459
+#, 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:1464
+#, 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:1469
+#, 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:1479
+#, 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:1484
+#, 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:1489
+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:1494
+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:1504
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/lost+found není adresář (ino=%i)\n"
+
+#: e2fsck/problem.c:1511
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Průchod 3A: Optimalizuji adresáře\n"
+
+#: e2fsck/problem.c:1516
+#, 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:1521
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Nemohu optimalizovat adresář %q (%d): %m\n"
+
+#: e2fsck/problem.c:1526
+msgid "Optimizing directories: "
+msgstr "Optimalizuji adresáře: "
+
+#: e2fsck/problem.c:1543
+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:1548
+#, c-format
+msgid "@u @z @i %i.  "
+msgstr "Osiřelý iuzel %i s nulovou délkou. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1553
+#, 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:1558
+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:1562
+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: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1572
+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:1577
+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:1582
+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:1587
+msgid "@b @B differences: "
+msgstr "Rozdíly v bitmapě bloků: "
+
+#. @-expanded: inode bitmap differences: 
+#: e2fsck/problem.c:1607
+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:1627
+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:1632
+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:1637
+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:1642
+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:1647
+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:1652
+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:1658
+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:1663
+#, 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:1668
+#, 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:1693
+#, 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:1698
+#, 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: Recreate journal
+#: e2fsck/problem.c:1705
+msgid "Recreate @j"
+msgstr "Znovu vytvořit žurnál"
+
+#: e2fsck/problem.c:1710
+msgid "Update quota info for quota type %N"
+msgstr "Aktualizovat údaje o kvótách pro druh kvót %N"
+
+#: e2fsck/problem.c:1829
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Neobsloužený kód chyby (0x%x)!\n"
+
+#: e2fsck/problem.c:1954 e2fsck/problem.c:1958
+msgid "IGNORED"
+msgstr "IGNOROVÁNO"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Použitá paměť: %d, 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: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:188
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr "při volání ext2fs_block_iterate pro iuzel %d"
+
+#: e2fsck/super.c:211
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %d"
+msgstr "při volání ext2fs_adjust_ea_refcount2 pro iuzel %d"
+
+#: e2fsck/super.c:272
+msgid "Truncating"
+msgstr "Usekávám"
+
+#: e2fsck/super.c:273
+msgid "Clearing"
+msgstr "Mažu"
+
+#: e2fsck/unix.c:74
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfvtDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] device\n"
+msgstr ""
+"Použití: %s [-panyrcdfvtDFV] [-b superblok] [-B velikost_bloku]\n"
+"\t\t[-I bloky_iuzlových_bufferů] [-P velikost_zpracovávaných_iuzlů]\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] zařízení\n"
+
+#: e2fsck/unix.c:80
+#, c-format
+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:86
+#, c-format
+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"
+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"
+
+#: e2fsck/unix.c:131
+#, 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:157
+#, 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:161
+#, 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:166
+#, 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:171
+#, 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:179
+msgid "             Extent depth histogram: "
+msgstr "             Histogram hloubky rozsahu: "
+
+#: e2fsck/unix.c:188
+#, 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:192
+#, 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:194
+#, 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:196
+#, 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:198
+#, 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:200
+#, 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:203
+#, 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:205
+#, 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:207
+#, 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:209
+#, 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:211
+#, 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:215
+#, 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:219
+#, 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:232 misc/badblocks.c:983 misc/tune2fs.c:1985 misc/util.c:147
+#: resize/main.c:259
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "při zjišťování, jestli je %s připojen."
+
+#: e2fsck/unix.c:252
+#, c-format
+msgid "Warning!  %s is %s.\n"
+msgstr "Pozor! %s je %s.\n"
+
+#: e2fsck/unix.c:259
+#, c-format
+msgid "%s is %s.\n"
+msgstr "%s je %s.\n"
+
+#: e2fsck/unix.c:262
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Nemohu pokračovat, končím.\n"
+"\n"
+
+#: e2fsck/unix.c:264
+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:269
+msgid "Do you really want to continue"
+msgstr "Chcete opravdu pokračovat"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "check aborted.\n"
+msgstr "kontrola přerušena.\n"
+
+#: e2fsck/unix.c:361
+msgid " contains a file system with errors"
+msgstr " obsahuje systém souborů s chybami"
+
+#: e2fsck/unix.c:363
+msgid " was not cleanly unmounted"
+msgstr " nebyl čistě odpojen"
+
+#: e2fsck/unix.c:365
+msgid " primary superblock features different from backup"
+msgstr " vlastnosti primárního superbloku se liší od záložního"
+
+#: e2fsck/unix.c:369
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " byl připojen %ukrát bez kontroly"
+
+#: e2fsck/unix.c:376
+msgid " has filesystem last checked time in the future"
+msgstr " má čas poslední kontroly systému souborů v budoucnosti"
+
+#: e2fsck/unix.c:382
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " nebyl kontrolován %u dní"
+
+#: e2fsck/unix.c:391
+msgid ", check forced.\n"
+msgstr ", kontrola vynucena.\n"
+
+#: e2fsck/unix.c:424
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: čistý, %'u/%'u souborů, %'llu/%'llu bloků"
+
+#: e2fsck/unix.c:443
+msgid " (check deferred; on battery)"
+msgstr " (kontrola odložena, běžím na baterii)"
+
+#: e2fsck/unix.c:446
+msgid " (check after next mount)"
+msgstr " (kontrola po příštím připojení)"
+
+#: e2fsck/unix.c:448
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (kontrola za %ld připojení)"
+
+#: e2fsck/unix.c:598
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "CHYBA: Nemohu otevřít /dev/null (%s)\n"
+
+#: e2fsck/unix.c:667
+#, c-format
+msgid "Invalid EA version.\n"
+msgstr "Neplatná verze EA.\n"
+
+#: e2fsck/unix.c:694
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Neznámý rozšířený přepínač: %s\n"
+
+#: e2fsck/unix.c:719
+#, 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:788
+#, 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:792
+msgid "Invalid completion information file descriptor"
+msgstr "Neplatný deskriptor souborů informace o dokončení"
+
+#: e2fsck/unix.c:807
+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:828
+#, 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:859 e2fsck/unix.c:931 misc/tune2fs.c:811 misc/tune2fs.c:1100
+#: misc/tune2fs.c:1118
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Nelze vyřešit „%s“"
+
+#: e2fsck/unix.c:910
+msgid "The -n and -D options are incompatible."
+msgstr "Přepínače -n a -D se vzájemně vylučují."
+
+#: e2fsck/unix.c:915
+msgid "The -n and -c options are incompatible."
+msgstr "Přepínače -n a -c se vzájemně vylučují."
+
+#: e2fsck/unix.c:920
+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:974
+#, c-format
+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:1022
+#, 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:1031
+#, 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:1120
+#, 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:1137 e2fsck/unix.c:1142
+msgid "while checking MMP block"
+msgstr "při kontrole bloku MMP"
+
+#: e2fsck/unix.c:1144 misc/tune2fs.c:1912
+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"
+
+#: e2fsck/unix.c:1194
+#, c-format
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Chyba: stará verze knihovny ext2fs!\n"
+
+#: e2fsck/unix.c:1202
+msgid "while trying to initialize program"
+msgstr "při pokusu inicializovat program"
+
+#: e2fsck/unix.c:1225
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tPoužívám %s, %s\n"
+
+#: e2fsck/unix.c:1237
+msgid "need terminal for interactive repairs"
+msgstr "pro interaktivní opravy potřebuji terminál"
+
+#: e2fsck/unix.c:1290
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s zkouším záložní bloky…\n"
+
+#: e2fsck/unix.c:1292
+msgid "Superblock invalid,"
+msgstr "Neplatný superblok,"
+
+#: e2fsck/unix.c:1293
+msgid "Group descriptors look bad..."
+msgstr "Deskriptory skupin vypadají špatně…"
+
+#: e2fsck/unix.c:1303
+#, 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:1307
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: návrat k původnímu superbloku\n"
+
+#: e2fsck/unix.c:1335
+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:1341
+msgid "Could this be a zero-length partition?\n"
+msgstr "Mohl by toto být oddíl nulové délky?\n"
+
+#: e2fsck/unix.c:1344
+#, 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:1349
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Pravděpodobně neexistující nebo odkládací zařízení?\n"
+
+#: e2fsck/unix.c:1352
+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:1355
+msgid "Possibly non-existent device?\n"
+msgstr "Pravděpodobně neexistující zařízení?\n"
+
+#: e2fsck/unix.c:1358
+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:1423
+msgid "Get a newer version of e2fsck!"
+msgstr "Sežeňte novější verzi e2fsck!"
+
+#: e2fsck/unix.c:1467
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr "při kontrole žurnálu ext3 pro %s"
+
+#: e2fsck/unix.c:1478
+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:1491
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "nemohu nastavit příznaky superbloku na %s\n"
+
+#: e2fsck/unix.c:1497
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr "při obnově žurnálu ext3 %s"
+
+#: e2fsck/unix.c:1521
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s má nepodporovanou vlastnost(i):"
+
+#: e2fsck/unix.c:1536
+#, c-format
+msgid "%s: warning: compression support is experimental.\n"
+msgstr "%s: pozor: podpora komprese je experimentální.\n"
+
+#: e2fsck/unix.c:1542
+#, c-format
+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"
+
+#: e2fsck/unix.c:1594
+#, 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:1597
+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:1638
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Vytváří se žurnál (%d bloků): "
+
+#: e2fsck/unix.c:1648
+msgid " Done.\n"
+msgstr " Hotovo.\n"
+
+#: e2fsck/unix.c:1649
+msgid ""
+"\n"
+"*** journal has been re-created - filesystem is now ext3 again ***\n"
+msgstr ""
+"\n"
+"*** žurnál by znovu vytvořen – souborový systém se opět stal ext3 ***\n"
+
+#: e2fsck/unix.c:1672
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Spouštím e2fsck od začátku…\n"
+
+#: e2fsck/unix.c:1676
+msgid "while resetting context"
+msgstr "při nulování kontextu"
+
+#: e2fsck/unix.c:1683
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck přerušen.\n"
+
+#: e2fsck/unix.c:1688
+msgid "aborted"
+msgstr "přerušen"
+
+#: e2fsck/unix.c:1700 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:1704
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr "%s: ***** ZNOVU ZAVEĎTE LINUX *****\n"
+
+#: e2fsck/unix.c:1712 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/unix.c:1752
+msgid "while setting block group checksum info"
+msgstr "při nastavování informace o kontrolním součtu skupiny bloků"
+
+#: e2fsck/util.c:190 misc/util.c:70
+msgid "yY"
+msgstr "aA"
+
+#: e2fsck/util.c:191
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:205
+msgid "<y>"
+msgstr "<a>"
+
+#: e2fsck/util.c:207
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:209
+msgid " (y/n)"
+msgstr " (a/n)"
+
+#: e2fsck/util.c:223
+msgid "cancelled!\n"
+msgstr "přerušeno!\n"
+
+#: e2fsck/util.c:238
+msgid "yes\n"
+msgstr "ano\n"
+
+#: e2fsck/util.c:240
+msgid "no\n"
+msgstr "ne\n"
+
+#: e2fsck/util.c:250
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? ne\n"
+"\n"
+
+#: e2fsck/util.c:254
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? ano\n"
+"\n"
+
+#: e2fsck/util.c:258
+msgid "yes"
+msgstr "ano"
+
+#: e2fsck/util.c:258
+msgid "no"
+msgstr "ne"
+
+#: e2fsck/util.c:273
+#, 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:278
+msgid "reading inode and block bitmaps"
+msgstr "čtení bitmap iuzlů a bloků"
+
+#: e2fsck/util.c:286
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "při opakovaném pokusu načíst bitmapy pro %s"
+
+#: e2fsck/util.c:298
+msgid "writing block and inode bitmaps"
+msgstr "zápisu bitmap bloků a iuzlů"
+
+#: e2fsck/util.c:303
+#, 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:315
+#, 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:396
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Použitá paměť: %luk/%luk (%luk/%luk), "
+
+#: e2fsck/util.c:400
+#, c-format
+msgid "Memory used: %lu, "
+msgstr "Použitá paměť: %lu, "
+
+#: e2fsck/util.c:407
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "čas: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:412
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "strávený čas: %6.3f\n"
+
+#: e2fsck/util.c:447 e2fsck/util.c:461
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "při čtení iuzlu %lu v %s"
+
+#: e2fsck/util.c:475 e2fsck/util.c:488
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "při zápisu iuzlu %lu v %s"
+
+#: e2fsck/util.c:637
+msgid "while allocating zeroizing buffer"
+msgstr "Při alokaci nulovací vyrovnávací paměti"
+
+#: e2fsck/util.c:785
+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:69
+msgid "done                                                 \n"
+msgstr "hotovo                                               \n"
+
+#: misc/badblocks.c:92
+#, 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"
+msgstr ""
+"Použití: %s [-b velikost_bloku] [-i vstupní_soubor] [-o výstupní_soubor]\n"
+"   [-svwnf] [-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:103
+#, 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:218
+#, 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:322
+msgid "Testing with random pattern: "
+msgstr "Zkouším s náhodným vzorkem: "
+
+#: misc/badblocks.c:340
+msgid "Testing with pattern 0x"
+msgstr "Zkouším se vzorkem 0x"
+
+#: misc/badblocks.c:372 misc/badblocks.c:445
+msgid "during seek"
+msgstr "při posunu"
+
+#: misc/badblocks.c:383
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Divná hodnota (%ld) v do_read\n"
+
+#: misc/badblocks.c:469
+msgid "during ext2fs_sync_device"
+msgstr "při ext2fs_sync_device"
+
+#: misc/badblocks.c:489 misc/badblocks.c:749
+msgid "while beginning bad block list iteration"
+msgstr "při začátku iterace v seznamu špatných bloků"
+
+#: misc/badblocks.c:503 misc/badblocks.c:602 misc/badblocks.c:759
+msgid "while allocating buffers"
+msgstr "při alokaci vyrovnávacích paměti"
+
+#: misc/badblocks.c:507
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Ověřují se bloky %lu až %lu\n"
+
+#: misc/badblocks.c:512
+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:521
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Hledají se špatné bloky (test jen pro čtení): "
+
+#: misc/badblocks.c:528 misc/badblocks.c:634 misc/badblocks.c:676
+#: misc/badblocks.c:822
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Příliš mnoho špatných bloků, přerušuji test\n"
+
+#: misc/badblocks.c:609
+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:611 misc/badblocks.c:772
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Od bloku %lu do %lu\n"
+
+#: misc/badblocks.c:666
+msgid "Reading and comparing: "
+msgstr "Čtení a porovnání: "
+
+#: misc/badblocks.c:771
+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:777
+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:784
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Zachyceno přerušení, uklízí se\n"
+
+#: misc/badblocks.c:867
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "při testovacím zápisu dat, blok %lu"
+
+#: misc/badblocks.c:988 misc/util.c:152
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s je připojen; "
+
+#: misc/badblocks.c:990
+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:995
+msgid "it's not safe to run badblocks!\n"
+msgstr "není bezpečné spouštět badblocks!\n"
+
+#: misc/badblocks.c:1000 misc/util.c:163
+#, 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:1003
+msgid "badblocks forced anyway.\n"
+msgstr "badblocks přesto vynucen.\n"
+
+#: misc/badblocks.c:1023
+#, c-format
+msgid "invalid %s - %s"
+msgstr "neplatný %s – %s"
+
+#: misc/badblocks.c:1133
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "Nemohu alokovat paměť pro zkušební_vzorek – %s"
+
+#: misc/badblocks.c:1163
+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:1169
+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:1183
+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:1189
+msgid "while trying to determine device size"
+msgstr "při pokusu zjistit velikost zařízení"
+
+#: misc/badblocks.c:1194
+msgid "last block"
+msgstr "poslední blok"
+
+#: misc/badblocks.c:1200
+msgid "first block"
+msgstr "první blok"
+
+#: misc/badblocks.c:1203
+#, c-format
+msgid "invalid starting block (%lu): must be less than %lu"
+msgstr "špatný počáteční blok (%lu): musí být menší než %lu"
+
+#: misc/badblocks.c:1259
+msgid "while creating in-memory bad blocks list"
+msgstr "při vytváření seznam špatných bloků v paměti"
+
+#: misc/badblocks.c:1274
+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:1298
+#, 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:86
+#, c-format
+msgid "Usage: %s [-RVf] [-+=AaCcDdeijsSu] [-v version] files...\n"
+msgstr "Použití: %s [-RVf] [-+=AaCcDdeijsSu] [-v verze] soubory…\n"
+
+#: misc/chattr.c:155
+#, c-format
+msgid "bad version - %s\n"
+msgstr "špatná verze – %s\n"
+
+#: misc/chattr.c:201 misc/lsattr.c:116
+#, c-format
+msgid "while trying to stat %s"
+msgstr "při pokusu stat %s"
+
+#: misc/chattr.c:208
+#, c-format
+msgid "while reading flags on %s"
+msgstr "při čtení příznaků %s"
+
+#: misc/chattr.c:213 misc/chattr.c:225
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Příznaky %s nastaveny na "
+
+#: misc/chattr.c:234
+#, c-format
+msgid "while setting flags on %s"
+msgstr "při nastavování příznaků %s"
+
+#: misc/chattr.c:242
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Verze %s nastavena na %lu\n"
+
+#: misc/chattr.c:246
+#, c-format
+msgid "while setting version on %s"
+msgstr "při nastavování verze %s"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Nemohu alokovat proměnou path v chattr_dir_proc"
+
+#: misc/chattr.c:306
+msgid "= is incompatible with - and +\n"
+msgstr "= je neslučitelné s - a +\n"
+
+#: misc/chattr.c:314
+msgid "Must use '-v', =, - or +\n"
+msgstr "Musíte použít '-v', =, - nebo +\n"
+
+#: misc/dumpe2fs.c:55
+#, c-format
+msgid "Usage: %s [-bfhixV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Použití: %s [-bfhixV] [-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:196
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Skupina %lu: (Bloky "
+
+#: misc/dumpe2fs.c:204
+#, c-format
+msgid "  Checksum 0x%04x"
+msgstr "  Kontrolní součet 0x%04x"
+
+#: misc/dumpe2fs.c:206
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (OČEKÁVÁNO 0x%04x)"
+
+#: misc/dumpe2fs.c:207
+#, c-format
+msgid ", unused inodes %u\n"
+msgstr ", nepoužitých iuzlů %u\n"
+
+#: misc/dumpe2fs.c:212
+#, c-format
+msgid "  %s superblock at "
+msgstr "  %s superblok v "
+
+#: misc/dumpe2fs.c:213
+msgid "Primary"
+msgstr "Primární"
+
+#: misc/dumpe2fs.c:213
+msgid "Backup"
+msgstr "Záložní"
+
+#: misc/dumpe2fs.c:217
+#, c-format
+msgid ", Group descriptors at "
+msgstr ", Deskriptory skupin v "
+
+#: misc/dumpe2fs.c:221
+#, c-format
+msgid ""
+"\n"
+"  Reserved GDT blocks at "
+msgstr ""
+"\n"
+"  Rezervované GDT bloky na "
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " Group descriptor at "
+msgstr " Deskriptor skupiny v "
+
+#: misc/dumpe2fs.c:234
+msgid "  Block bitmap at "
+msgstr "  Bitmapa bloků v "
+
+#: misc/dumpe2fs.c:238
+msgid ", Inode bitmap at "
+msgstr ", Bitmapa iuzlů v "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+"  Inode table at "
+msgstr ""
+"\n"
+"  Tabulka iuzlů v "
+
+# The second string is i18ned `blocks' or `clusters'
+#: misc/dumpe2fs.c:248
+#, 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:255
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u nepoužitých iuzlů\n"
+
+#: misc/dumpe2fs.c:258
+msgid "  Free blocks: "
+msgstr "  Volné bloky: "
+
+#: misc/dumpe2fs.c:269
+msgid "  Free inodes: "
+msgstr "  Volné iuzly: "
+
+#: misc/dumpe2fs.c:300
+msgid "while printing bad block list"
+msgstr "při tisku seznamu špatných bloků"
+
+#: misc/dumpe2fs.c:306
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Špatné bloky: %u"
+
+#: misc/dumpe2fs.c:333 misc/tune2fs.c:306
+msgid "while reading journal inode"
+msgstr "při čtení iuzlu žurnálu"
+
+#: misc/dumpe2fs.c:339
+msgid "while opening journal inode"
+msgstr "při otevírání iuzlu žurnálu"
+
+#: misc/dumpe2fs.c:345
+msgid "while reading journal super block"
+msgstr "při čtení superbloku žurnálu"
+
+#: misc/dumpe2fs.c:355
+#, c-format
+msgid "Journal features:        "
+msgstr "Vlastnosti žurnálu:      "
+
+#: misc/dumpe2fs.c:368
+msgid "Journal size:             "
+msgstr "Velikost žurnálu:         "
+
+#: misc/dumpe2fs.c:379
+#, c-format
+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"
+
+#: misc/dumpe2fs.c:386
+#, c-format
+msgid "Journal errno:            %d\n"
+msgstr "Chybové číslo žurnálu:    %d\n"
+
+#: misc/dumpe2fs.c:401 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "při čtení superbloku žurnálu"
+
+#: misc/dumpe2fs.c:409
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Nemohu najít magická čísla superbloku žurnálu"
+
+#: misc/dumpe2fs.c:413
+#, c-format
+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"
+
+#: misc/dumpe2fs.c:426
+#, c-format
+msgid "Journal users:            %s\n"
+msgstr "Uživatelé žurnálu:        %s\n"
+
+#: misc/dumpe2fs.c:442 misc/mke2fs.c:666 misc/tune2fs.c:1137
+#, c-format
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Nemohu alokovat paměť pro zpracování přepínačů!\n"
+
+#: misc/dumpe2fs.c:468
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Neplatný parametr superblok: %s\n"
+
+#: misc/dumpe2fs.c:483
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Neplatný parametr blocksize (velikost_bloku): %s\n"
+
+#: misc/dumpe2fs.c:494
+#, 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:554 misc/mke2fs.c:1555
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tPoužívám %s\n"
+
+#: misc/dumpe2fs.c:590 misc/e2image.c:1326 misc/tune2fs.c:1923
+#: resize/main.c:317
+#, c-format
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Nemohu najít platný superblok systému souborů.\n"
+
+#: misc/dumpe2fs.c:618
+#, c-format
+msgid ""
+"\n"
+"%s: %s: error reading bitmaps: %s\n"
+msgstr ""
+"\n"
+"%s: %s: chyba při čtení bitmap: %s\n"
+
+#: misc/e2image.c:90
+#, c-format
+msgid "Usage: %s [-rsIQa] device image_file\n"
+msgstr "Použití: %s [-rsIQa] ZAŘÍZENÍ SOUBOR_S_OBRAZEM\n"
+
+#: misc/e2image.c:138
+#, c-format
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Chyba: hlavička je větší než wrt_size\n"
+
+#: misc/e2image.c:144
+msgid "Couldn't allocate header buffer\n"
+msgstr "Nemohu alokovat vyrovnávací paměť hlavičky\n"
+
+#: misc/e2image.c:174
+msgid "while writing superblock"
+msgstr "při zápisu superbloku"
+
+#: misc/e2image.c:182
+msgid "while writing inode table"
+msgstr "při zápisu tabulky iuzlů"
+
+#: misc/e2image.c:189
+msgid "while writing block bitmap"
+msgstr "při zápisu bitmapy bloků"
+
+#: misc/e2image.c:196
+msgid "while writing inode bitmap"
+msgstr "při zápisu bitmapy iuzlů"
+
+#: misc/e2image.c:1365
+#, 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/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:2080
+#, 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:803
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Použití: e2label zařízení [novájmenovka]\n"
+
+#: misc/e2undo.c:36
+#, c-format
+msgid "Usage: %s <transaction file> <filesystem>\n"
+msgstr "Použití: %s <TRANSAKČNÍ_SOUBOR> <SOUBOROVÝ_SYSTÉM>\n"
+
+#: misc/e2undo.c:52
+msgid "Failed to read the file system data \n"
+msgstr "Nemohu načíst data souborového systému \n"
+
+#: misc/e2undo.c:62 misc/e2undo.c:83 misc/e2undo.c:108 misc/e2undo.c:206
+#, c-format
+msgid "Failed tdb_fetch %s\n"
+msgstr "tdb_fetch %s selhalo\n"
+
+#: misc/e2undo.c:70
+#, c-format
+msgid "The file system Mount time didn't match %u\n"
+msgstr "Čas připojení systému souborů se neshoduje s %u\n"
+
+#: misc/e2undo.c:89
+msgid "The file system UUID didn't match \n"
+msgstr "UUID systému souborů se neshoduje \n"
+
+#: misc/e2undo.c:163
+#, c-format
+msgid "Failed tdb_open %s\n"
+msgstr "tdb_open %s selhalo\n"
+
+#: misc/e2undo.c:169
+#, c-format
+msgid "Error while determining whether %s is mounted.\n"
+msgstr "Chyba při zjišťování, jestli je %s připojen.\n"
+
+#: misc/e2undo.c:175
+msgid "e2undo should only be run on unmounted file system\n"
+msgstr "e2undo by měl být pouštěn jen na nepřipojeném systému souborů\n"
+
+#: misc/e2undo.c:184
+#, c-format
+msgid "Failed to open %s\n"
+msgstr "Selhalo otevření %s\n"
+
+#: misc/e2undo.c:210
+#, c-format
+msgid "Replayed transaction of size %zd at location %llu\n"
+msgstr "Přehraná transakce o velikosti %zd na pozici %llu\n"
+
+#: misc/e2undo.c:216
+#, c-format
+msgid "Failed write %s\n"
+msgstr "Selhal zápis %s\n"
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "VAROVÁNÍ: nemohu otevřít %s: %s\n"
+
+#: misc/fsck.c:353
+#, 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: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 ""
+"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:478
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: nenalezen\n"
+
+#: misc/fsck.c:594
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: wait: Žádný další synovský proces?!?\n"
+
+#: misc/fsck.c:616
+#, 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:622
+#, 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:661
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Dokončen s %s (stav ukončení %d)\n"
+
+#: misc/fsck.c:721
+#, 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:742
+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:761
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Nemohu alokovat paměť pro typy systému souborů\n"
+
+#: misc/fsck.c:884
+#, 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:911
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: nemohu zkontrolovat %s: fsck.%s nenalezen\n"
+
+#: misc/fsck.c:967
+msgid "Checking all file systems.\n"
+msgstr "Kontrolují se všechny systémy souborů.\n"
+
+#: misc/fsck.c:1058
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--čekám-- (průchod %d)\n"
+
+#: misc/fsck.c:1078
+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:1120
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: příliš mnoho zařízení\n"
+
+#: misc/fsck.c:1153 misc/fsck.c:1239
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: příliš mnoho argumentů\n"
+
+#: misc/lsattr.c:74
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr "Použití: %s [-RVadlv] [soubory…]\n"
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Při čtení příznaků %s"
+
+#: misc/lsattr.c:91
+#, c-format
+msgid "While reading version on %s"
+msgstr "Při čtení verze %s"
+
+#: misc/mke2fs.c:116
+#, 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]\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] [-jnqvDFKSV] 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ů]\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[-jnqvDFKSV] zařízení [počet-bloků]\n"
+
+#: misc/mke2fs.c:221
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Spouštím příkaz: %s\n"
+
+#: misc/mke2fs.c:225
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "při pokusu spustit „%s“"
+
+#: misc/mke2fs.c:232
+msgid "while processing list of bad blocks from program"
+msgstr "při zpracovávání seznamu špatných bloků z programu"
+
+#: misc/mke2fs.c:259
+#, 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:261
+#, 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:264
+msgid "Aborting....\n"
+msgstr "Končím…\n"
+
+#: misc/mke2fs.c:284
+#, 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:303
+msgid "while marking bad blocks as used"
+msgstr "při označování špatných bloků jako použité"
+
+#: misc/mke2fs.c:320
+msgid "Writing inode tables: "
+msgstr "Zapisuji tabulky iuzlů: "
+
+#: misc/mke2fs.c:341
+#, 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:355 misc/mke2fs.c:2257 misc/mke2fs.c:2512
+#, c-format
+msgid "done                            \n"
+msgstr "hotovo                          \n"
+
+#: misc/mke2fs.c:366
+msgid "while creating root dir"
+msgstr "při vytváření kořenového adresáře"
+
+#: misc/mke2fs.c:373
+msgid "while reading root inode"
+msgstr "při čtení kořenového iuzlu"
+
+#: misc/mke2fs.c:385
+msgid "while setting root inode ownership"
+msgstr "při nastavování vlastnictví kořenového iuzlu"
+
+#: misc/mke2fs.c:403
+msgid "while creating /lost+found"
+msgstr "při vytváření /lost+found"
+
+#: misc/mke2fs.c:410
+msgid "while looking up /lost+found"
+msgstr "při vyhledávání /lost+found"
+
+#: misc/mke2fs.c:423
+msgid "while expanding /lost+found"
+msgstr "při zvětšování /lost+found"
+
+#: misc/mke2fs.c:438
+msgid "while setting bad block inode"
+msgstr "při nastavování iuzlu špatných bloků"
+
+#: misc/mke2fs.c:465
+#, 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:475
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Varování: nemohu načíst blok 0: %s\n"
+
+#: misc/mke2fs.c:491
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Varování: nemohu vymazat sektor %d: %s\n"
+
+#: misc/mke2fs.c:507
+msgid "while initializing journal superblock"
+msgstr "při inicializaci superbloku žurnálu"
+
+#: misc/mke2fs.c:515
+msgid "Zeroing journal device: "
+msgstr "Nuluji zařízení žurnálu: "
+
+#: misc/mke2fs.c:527
+#, 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:545
+msgid "while writing journal superblock"
+msgstr "při zápisu superbloku žurnálu"
+
+# TODO pluralize
+#: misc/mke2fs.c:560
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"pozor: nepoužito %'llu bloků.\n"
+"\n"
+
+#: misc/mke2fs.c:565
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Jmenovka systému souborů=%s\n"
+
+#: misc/mke2fs.c:568
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Typ OS: %s\n"
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Velikost bloku=%u (log=%u)\n"
+
+#: misc/mke2fs.c:574
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Velikost clusteru=%u (log=%u)\n"
+
+#: misc/mke2fs.c:578
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Velikost fragmentu=%u (log=%u)\n"
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "Krok=%u bloků, Šířka pásu=%u bloků\n"
+
+#: misc/mke2fs.c:582
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u iuzlů, %llu bloků\n"
+
+#: misc/mke2fs.c:584
+#, 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:587
+#, c-format
+msgid "First data block=%u\n"
+msgstr "První blok dat=%u\n"
+
+#: misc/mke2fs.c:589
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Vlastník kořenového adresáře=%u:%u\n"
+
+#: misc/mke2fs.c:591
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Maximum bloků v systému souborů=%'lu\n"
+
+#: misc/mke2fs.c:595
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u skupin bloků\n"
+
+#: misc/mke2fs.c:597
+#, c-format
+msgid "%u block group\n"
+msgstr "%u skupina bloků\n"
+
+#: misc/mke2fs.c:600
+#, 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:603
+#, 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:605
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u iuzlů ve skupině\n"
+
+#: misc/mke2fs.c:612
+#, c-format
+msgid "Superblock backups stored on blocks: "
+msgstr "Zálohy superbloku uloženy v blocích: "
+
+#: misc/mke2fs.c:691 misc/tune2fs.c:1165
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "Neplatný interval_aktualizace_mmp: %s\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Neplatný parametr kroku (stride): %s\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Neplatný parametr šířka-pásu (stripe-width): %s\n"
+
+#: misc/mke2fs.c:743
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Neplatný parametr změny velikosti: %s\n"
+
+#: misc/mke2fs.c:750
+#, c-format
+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:774
+#, c-format
+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:801 misc/mke2fs.c:810
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Neplatný vlastník kořenu: „%s“\n"
+
+#: misc/mke2fs.c:835
+#, c-format
+msgid "Invalid quotatype parameter: %s\n"
+msgstr "Neplatný parametr druhu kvót: %s\n"
+
+#: misc/mke2fs.c:846
+#, 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"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_uid=<uid of root directory>\n"
+"\troot_gid=<gid of root directory>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr OR grp>\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"
+"\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"
+"\tresize=<maximální velikost změny velikosti v blocích>\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_uid=<UID kořenového adresáře>\n"
+"\troot_gid=<GID kořenového adresáře>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<druh kvót: usr (uživatelé), nebo grp (skupiny)>\n"
+"\n"
+
+#: misc/mke2fs.c:868
+#, 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:907
+#, 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:920 misc/tune2fs.c:398
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Neplatný sada přepínačů systému souborů: %s\n"
+
+#: misc/mke2fs.c:932 misc/tune2fs.c:349
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Nastaven neplatný přepínač připojení: %s\n"
+
+#: misc/mke2fs.c:1072
+#, 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:1076
+#, c-format
+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:1080
+#, c-format
+msgid "Aborting...\n"
+msgstr "Přerušuje se…\n"
+
+#: misc/mke2fs.c:1120
+#, 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:1276
+#, c-format
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Nemohu alokovat paměť pro novou proměnnou PATH.\n"
+
+#: misc/mke2fs.c:1317
+#, 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:1357
+#, c-format
+msgid "invalid block size - %s"
+msgstr "špatná velikost bloku – %s"
+
+#: misc/mke2fs.c:1361
+#, 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:1377
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "špatná velikost clusteru – %s"
+
+#: misc/mke2fs.c:1387
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "Přepínač „-R“ je zastaralý, použijte místo něj „-E“"
+
+#: misc/mke2fs.c:1399
+msgid "Illegal number for blocks per group"
+msgstr "Neplatný počet bloků ve skupině"
+
+#: misc/mke2fs.c:1404
+msgid "blocks per group must be multiple of 8"
+msgstr "bloky ve skupině musí být násobek 8"
+
+#: misc/mke2fs.c:1412
+msgid "Illegal number for flex_bg size"
+msgstr "Neplatné číslo pro velikost flex_bg"
+
+#: misc/mke2fs.c:1418
+msgid "flex_bg size must be a power of 2"
+msgstr "Velikost flex_bg musí být mocninou 2"
+
+#: misc/mke2fs.c:1428
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "špatný podíl iuzlů %s (min %d/max %d)"
+
+#: misc/mke2fs.c:1438
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "špatná velikost iuzlu – %s"
+
+#: misc/mke2fs.c:1450
+#, c-format
+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:1460
+msgid "in malloc for bad_blocks_filename"
+msgstr "v malloc pro bad_blocks_filename"
+
+#: misc/mke2fs.c:1473
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "špatné procento rezervovaných bloků – %s"
+
+#: misc/mke2fs.c:1488
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "chybný počet iuzlů – %s"
+
+#: misc/mke2fs.c:1505
+#, c-format
+msgid "bad revision level - %s"
+msgstr "špatné číslo revize – %s"
+
+#: misc/mke2fs.c:1519
+msgid "The -t option may only be used once"
+msgstr "Přepínač -t lze použít jen jednou"
+
+#: misc/mke2fs.c:1527
+msgid "The -T option may only be used once"
+msgstr "Přepínač -T lze použít jen jednou"
+
+#: misc/mke2fs.c:1580 misc/mke2fs.c:2591
+#, 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:1586
+#, 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:1592
+#, 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:1603
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "špatné bloky „%s“ na zařízení „%s“"
+
+#: misc/mke2fs.c:1613
+msgid "filesystem"
+msgstr "systém souborů"
+
+#: misc/mke2fs.c:1626 resize/main.c:367
+msgid "while trying to determine filesystem size"
+msgstr "při pokusu zjistit velikost systému souborů"
+
+#: misc/mke2fs.c:1632
+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:1639
+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:1656
+msgid "Filesystem larger than apparent device size."
+msgstr "Systém souborů větší než velikost zařízení."
+
+#: misc/mke2fs.c:1676
+#, c-format
+msgid "Failed to parse fs types list\n"
+msgstr "Seznam druhů souborových systému se nezdařilo rozebrat\n"
+
+#: misc/mke2fs.c:1730
+#, 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:1746
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "fs_types (druhy SS) pro řešení v mke2fs.conf: "
+
+#: misc/mke2fs.c:1753
+#, c-format
+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:1760
+#, c-format
+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:1772
+#, c-format
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "Revize 0 systému souborů žurnály nepodporuje\n"
+
+#: misc/mke2fs.c:1786
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "špatné procento rezervovaných bloků – %lf"
+
+#: misc/mke2fs.c:1802
+#, c-format
+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:1819
+msgid "while trying to determine hardware sector size"
+msgstr "při pokusu zjistit velikost hardwarového sektoru"
+
+#: misc/mke2fs.c:1825
+msgid "while trying to determine physical sector size"
+msgstr "při pokusu určit velikost fyzického sektoru"
+
+#: misc/mke2fs.c:1858
+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:1863
+#, 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:1881
+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:1887
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "definice velikosti clusteru vyžaduje vlastnost bigalloc"
+
+#: misc/mke2fs.c:1906
+#, 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:1909
+#, 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:1911
+#, 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:1930
+#, 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:1934
+#, 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:1968
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "Vlastnost bigalloc nelze bez vlastnosti rozsahů zapnout"
+
+#: misc/mke2fs.c:1975
+#, c-format
+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"
+
+#: misc/mke2fs.c:1982 misc/tune2fs.c:740
+#, c-format
+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"
+
+#: misc/mke2fs.c:1993
+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:2002
+msgid "blocks per group count out of range"
+msgstr "počet bloků ve skupině mimo rozsah"
+
+#: misc/mke2fs.c:2026
+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:2038
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "špatná velikost iuzlu %d (min %d/max %d)"
+
+#: misc/mke2fs.c:2056
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "příliš mnoho iuzlů (%'llu), zvýšit poměr iuzlů?"
+
+#: misc/mke2fs.c:2063
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "příliš mnoho iuzlů (%'llu), zadejte < 2^32 iuzlů"
+
+#: misc/mke2fs.c:2077
+#, 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:2196
+#, 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"
+
+#: misc/mke2fs.c:2210
+msgid "while trying to setup undo file\n"
+msgstr "při pokusu nastavit soubor pro odvolání změn\n"
+
+#: misc/mke2fs.c:2236
+msgid "Discarding device blocks: "
+msgstr "Zahazují se bloky zařízení: "
+
+# Continuation of "Calling BLKDISCARD from %llu to %llu "
+#: misc/mke2fs.c:2252
+msgid "failed - "
+msgstr "selhalo – "
+
+#: misc/mke2fs.c:2360
+msgid "while setting up superblock"
+msgstr "při nastavování superbloku"
+
+#: misc/mke2fs.c:2369
+#, c-format
+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:2452
+#, c-format
+msgid "unknown os - %s"
+msgstr "neznámý os – %s"
+
+#: misc/mke2fs.c:2504
+#, c-format
+msgid "Allocating group tables: "
+msgstr "Alokují se tabulky skupin: "
+
+#: misc/mke2fs.c:2508
+msgid "while trying to allocate filesystem tables"
+msgstr "při pokusu alokovat tabulky systému souborů"
+
+#: misc/mke2fs.c:2517
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tpři převodu bitmapy subclusterů"
+
+#: misc/mke2fs.c:2560
+#, 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:2573
+msgid "while reserving blocks for online resize"
+msgstr "při rezervaci bloků pro změnu velikosti za běhu"
+
+#: misc/mke2fs.c:2584 misc/tune2fs.c:645
+msgid "journal"
+msgstr "žurnál"
+
+#: misc/mke2fs.c:2596
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Přidávám žurnál k zařízení %s: "
+
+#: misc/mke2fs.c:2603
+#, 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:2608 misc/mke2fs.c:2640 misc/tune2fs.c:674 misc/tune2fs.c:688
+#, c-format
+msgid "done\n"
+msgstr "hotovo\n"
+
+#: misc/mke2fs.c:2617
+#, c-format
+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:2628
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Vytváří se žurnál (%'u bloků): "
+
+#: misc/mke2fs.c:2636
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tpři pokusu vytvořit žurnál"
+
+#: misc/mke2fs.c:2647 misc/tune2fs.c:451
+#, c-format
+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:2652
+#, 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:2665
+#, c-format
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Zapisuji superbloky a účtovací informace systému souborů: "
+
+#: misc/mke2fs.c:2672
+#, c-format
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+"\n"
+"Varování, měl jsem problémy při zápisu superbloků."
+
+#: misc/mke2fs.c:2674
+#, c-format
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"hotovo\n"
+"\n"
+
+#: misc/mklost+found.c:50
+#, c-format
+msgid "Usage: mklost+found\n"
+msgstr "Použití: mklost+found\n"
+
+#: misc/partinfo.c:41
+#, 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:51
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Nelze otevřít %s: %s"
+
+#: misc/partinfo.c:57
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Nelze získat geometrii %s: %s"
+
+#: misc/partinfo.c:65
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Nelze získat velikost %s: %s"
+
+#: misc/partinfo.c:71
+#, 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:107
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr "Spusťte prosím na tomto systému souborů e2fsck.\n"
+
+#: misc/tune2fs.c:116
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-p mmp_update_interval]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]\n"
+"\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[ -I new_inode_size ] device\n"
+msgstr ""
+"Použití: %s [-c max_počet_připojení] [-e chování_při_chybách]\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[-p interval_aktualizace_mmp] [-r počet_rezervovaných_bloků]\n"
+"\t[-u uživatel] [-C počet_připojení] [-L jmenovka_svazku]\n"
+"\t[-M poslední_adresář_připojení] [-O [^]vlastnost[,…]]\n"
+"\t[-E rozšířený-přepínač[,…]] [-T čas_poslední_kontroly] [-U UUID]\n"
+"\t[-I nová_velikost_iuzlu] zařízení\n"
+
+#: misc/tune2fs.c:209
+msgid "while trying to open external journal"
+msgstr "při pokusu otevřít externí žurnál"
+
+#: misc/tune2fs.c:214
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s není zařízení žurnálu.\n"
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "Superblok žurnálu nenalezen!\n"
+
+#: misc/tune2fs.c:240
+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:261
+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:269
+msgid "Journal removed\n"
+msgstr "Žurnál odstraněn\n"
+
+#: misc/tune2fs.c:313
+msgid "while reading bitmaps"
+msgstr "při čtení bitmap"
+
+#: misc/tune2fs.c:321
+msgid "while clearing journal inode"
+msgstr "při čištění iuzlu žurnálu"
+
+#: misc/tune2fs.c:332
+msgid "while writing journal inode"
+msgstr "při zápisu iuzlu žurnálu"
+
+#: misc/tune2fs.c:367
+#, c-format
+msgid "(and reboot afterwards!)\n"
+msgstr "(a po té rebootujte!)\n"
+
+#: misc/tune2fs.c:401
+#, 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:407
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Nastavená vlastnosti systému souborů „%s“ není podporováno.\n"
+
+#: misc/tune2fs.c:416
+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:424
+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:443
+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:461
+#, 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:470
+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:478
+msgid "Error while reading bitmaps\n"
+msgstr "Chyba při čtení bitmap\n"
+
+#: misc/tune2fs.c:487
+#, 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:492
+msgid "while reading MMP block."
+msgstr "při čtení bloku MMP."
+
+#: misc/tune2fs.c:524
+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:535
+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:595
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Pozor: přepínač „^quota“ přebije argumenty „–Q“.\n"
+
+#: misc/tune2fs.c:640
+msgid "The filesystem already has a journal.\n"
+msgstr "Systém souborů již žurnál má.\n"
+
+#: misc/tune2fs.c:658
+#, 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:662
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Vytváří se žurnál na zařízení %s: "
+
+#: misc/tune2fs.c:670
+#, 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:676
+msgid "Creating journal inode: "
+msgstr "Vytváří se iuzel žurnálu: "
+
+#: misc/tune2fs.c:685
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tpři pokusu vytvořit soubor žurnálu"
+
+#: misc/tune2fs.c:763
+msgid "Couldn't allocate memory to parse quota options!\n"
+msgstr "Nemohu alokovat paměť pro zpracování přepínačů kvóty!\n"
+
+#: misc/tune2fs.c:785
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\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[^]usrquota  (kvóty uživatelů)\n"
+"\t[^]grpquota  (kvóty skupin)\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:846
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Nemohu zpracovat určení data/času: %s"
+
+#: misc/tune2fs.c:870 misc/tune2fs.c:883
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "špatný počet připojení - %s"
+
+#: misc/tune2fs.c:899
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "špatné chování při chybách - %s"
+
+#: misc/tune2fs.c:926
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "špatné gid/jméno skupiny - %s"
+
+#: misc/tune2fs.c:959
+#, c-format
+msgid "bad interval - %s"
+msgstr "Špatný interval - %s"
+
+#: misc/tune2fs.c:988
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "špatný podíl rezervovaných bloků - %s"
+
+#: misc/tune2fs.c:1003
+msgid "-o may only be specified once"
+msgstr "-o může být zadáno jen jednou"
+
+#: misc/tune2fs.c:1012
+msgid "-O may only be specified once"
+msgstr "-O může být zadáno jen jednou"
+
+#: misc/tune2fs.c:1027
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "špatný počet rezervovaných bloků - %s"
+
+#: misc/tune2fs.c:1056
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "špatné uid/jméno uživatele - %s"
+
+#: misc/tune2fs.c:1073
+#, c-format
+msgid "bad inode size - %s"
+msgstr "špatná velikost iuzlu – %s"
+
+#: misc/tune2fs.c:1080
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Velikost iuzlu musí být mocnina dvou – %s"
+
+#: misc/tune2fs.c:1174
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "interval_aktualizace_mmp je příliš velký: %lu\n"
+
+#: misc/tune2fs.c:1179
+#, 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:1202
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Neplatný kroku (stride) RAIDu: %s\n"
+
+#: misc/tune2fs.c:1217
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Neplatná šířka pruhu RAIDu (stripe-width): %s\n"
+
+#: misc/tune2fs.c:1232
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Neplatný hashovací algoritmus: %s\n"
+
+#: misc/tune2fs.c:1238
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Implicitní hashovací algoritmus se nastavuje na %s (%d)\n"
+
+#: misc/tune2fs.c:1257
+#, c-format
+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"
+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"
+"\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"
+"\ttest_fs\n"
+"\t^test_fs\n"
+
+#: misc/tune2fs.c:1723
+msgid "Failed to read inode bitmap\n"
+msgstr "Čtení bitmapy iuzlů selhalo.\n"
+
+#: misc/tune2fs.c:1728
+msgid "Failed to read block bitmap\n"
+msgstr "Čtení bitmapy bloků selhalo\n"
+
+#: misc/tune2fs.c:1745 resize/resize2fs.c:870
+msgid "blocks to be moved"
+msgstr "bloky pro přesun"
+
+#: misc/tune2fs.c:1748
+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:1754
+msgid "Not enough space to increase inode size \n"
+msgstr "Nedostatek místa pro zvětšení iuzlu\n"
+
+#: misc/tune2fs.c:1759
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Během změny velikosti iuzlu selhala realokace bloků\n"
+
+#: misc/tune2fs.c:1791
+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:1818
+msgid "Couldn't allocate memory for tdb filename\n"
+msgstr "Nemohu alokovat paměť pro název souboru TDB\n"
+
+#: misc/tune2fs.c:1840
+#, c-format
+msgid "while trying to delete %s"
+msgstr "při pokusu smazat %s"
+
+#: misc/tune2fs.c:1850
+#, c-format
+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"
+
+#: misc/tune2fs.c:1919
+#, 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:1937
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Velikost iuzlu již je %lu\n"
+
+#: misc/tune2fs.c:1943
+#, c-format
+msgid "Shrinking the inode size is not supported\n"
+msgstr "Zmenšování velikosti iuzlu není podporováno\n"
+
+#: misc/tune2fs.c:1949
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "špatná velikost iuzlu %lu (max %d)\n"
+
+#: misc/tune2fs.c:1996
+#, 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:2002
+#, 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:2007
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Nastavuje se chování při chybách na %d\n"
+
+#: misc/tune2fs.c:2012
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Nastavuje se GID rezervovaných bloků na %lu\n"
+
+#: misc/tune2fs.c:2017
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "interval mezi kontrolami je příliš dlouhý (%'lu)"
+
+#: misc/tune2fs.c:2024
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Interval mezi kontrolami se nastavuje na %'lu sekund\n"
+
+#: misc/tune2fs.c:2031
+#, 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:2037
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "počet rezervovaných bloků je příliš velký (%'llu)"
+
+#: misc/tune2fs.c:2044
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Počet rezervovaných bloků se nastavuje na %'llu\n"
+
+#: misc/tune2fs.c:2050
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Systém souborů již má řídké superbloky.\n"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set.  %s"
+msgstr ""
+"\n"
+"Příznak řídkých superbloků nastaven.  %s"
+
+#: misc/tune2fs.c:2062
+msgid ""
+"\n"
+"Clearing the sparse superflag not supported.\n"
+msgstr ""
+"\n"
+"Odstranění superpříznaku řídkosti není podporováno.\n"
+
+#: misc/tune2fs.c:2070
+#, 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:2076
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Nastavuje se UID rezervovaných bloků na %lu\n"
+
+#: misc/tune2fs.c:2108
+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:2126
+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:2159
+msgid "Invalid UUID format\n"
+msgstr "Neplatný formát UUID\n"
+
+#: misc/tune2fs.c:2172
+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:2180
+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:2193
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Velikost iuzlu se nastavuje na %lu\n"
+
+#: misc/tune2fs.c:2196
+#, c-format
+msgid "Failed to change inode size\n"
+msgstr "Změna velikosti iuzlu selhala.\n"
+
+#: misc/tune2fs.c:2207
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Velikost kroku (stride) se nastavuje na %d\n"
+
+#: misc/tune2fs.c:2212
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Šířka pruhu (stripe width) se nastavuje na %d\n"
+
+#: misc/tune2fs.c:2219
+#, 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:74
+msgid "Proceed anyway? (y,n) "
+msgstr "Přesto pokračovat? (a,n) "
+
+#: misc/util.c:89
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr "Nemohu stat %s --- %s\n"
+
+#: misc/util.c:92
+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"
+
+#: misc/util.c:103
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s není speciální blokové zařízení.\n"
+
+#: misc/util.c:132
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr "%s je celé zařízení, ne jen jeden oddíl!\n"
+
+#: misc/util.c:154
+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:159
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "nebudu tady vytvářet %s!\n"
+
+#: misc/util.c:166
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs stejně vynucen.\n"
+
+#: misc/util.c:182
+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:207
+#, 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:228
+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"
+"\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"
+"\n"
+"Velikost žurnálu musí být mezi 1024 a 10240000 bloky systému souborů.\n"
+"\n"
+
+#: misc/util.c:258
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Systém souborů příliš malý na žurnál\n"
+
+#: misc/util.c:265
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks.  Aborting.\n"
+msgstr ""
+"\n"
+"Požadovaná velikost žurnálu je %'d bloků; musí být\n"
+"mezi 1024 a 102400 bloky. Končím.\n"
+
+#: misc/util.c:273
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Velikost žurnálu příliš velká pro systém souborů.\n"
+
+#: misc/util.c:287
+#, 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:48
+#, 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:50
+#, 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:52
+#, c-format
+msgid "       %s -k\n"
+msgstr "       %s -k\n"
+
+#: misc/uuidd.c:154
+msgid "bad arguments"
+msgstr "chybné argumenty"
+
+#: misc/uuidd.c:172
+msgid "connect"
+msgstr "připojení"
+
+#: misc/uuidd.c:191
+msgid "write"
+msgstr "zápis"
+
+#: misc/uuidd.c:199
+msgid "read count"
+msgstr "čtení počtu"
+
+#: misc/uuidd.c:205
+msgid "bad response length"
+msgstr "chybná délka odpovědi"
+
+#: misc/uuidd.c:270
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "démon uuidd již běží jako PID %s\n"
+
+#: misc/uuidd.c:278
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Nebylo možné vytvořit unixový proudový socket: %s"
+
+#: misc/uuidd.c:307
+#, 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:315
+#, 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:353
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Chyba při čtení z klienta, délka = %d\n"
+
+#: misc/uuidd.c:361
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "operace %d, příchozí počet = %d\n"
+
+#: misc/uuidd.c:380
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "Vytvořeno časové UUID: %s\n"
+
+#: misc/uuidd.c:390
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "Vytvořeno náhodné UUID: %s\n"
+
+#: misc/uuidd.c:399
+#, 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:420
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Vytvořeno %d UUID:\n"
+
+#: misc/uuidd.c:432
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Neplatná operace %d\n"
+
+#: misc/uuidd.c:476 misc/uuidd.c:498
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Chybné číslo: %s\n"
+
+#: misc/uuidd.c:533 misc/uuidd.c:562
+#, 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:543
+#, 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:547
+#, c-format
+msgid "List of UUID's:\n"
+msgstr "Seznam UUID:\n"
+
+#: misc/uuidd.c:568
+#, 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:585
+#, 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:591
+#, 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:202
+msgid "# Extent dump:\n"
+msgstr "# Výpis rozsahu:\n"
+
+#: resize/extent.c:203
+#, 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:43
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]\n"
+"\n"
+msgstr ""
+"Použití: %s [-d ladicí_přepínače] [-f] [-F] [-M] [-P] [-p]\n"
+"         zařízení [nová_velikost]\n"
+"\n"
+
+#: resize/main.c:65
+msgid "Extending the inode table"
+msgstr "Zvětšuji tabulku iuzlů"
+
+#: resize/main.c:68
+msgid "Relocating blocks"
+msgstr "Přesouvám bloky"
+
+#: resize/main.c:71
+msgid "Scanning inode table"
+msgstr "Procházím tabulku iuzlů"
+
+#: resize/main.c:74
+msgid "Updating inode references"
+msgstr "Aktualizuji odkazy na iuzly"
+
+#: resize/main.c:77
+msgid "Moving inode table"
+msgstr "Přesouvám tabulku iuzlů"
+
+#: resize/main.c:80
+msgid "Unknown pass?!?"
+msgstr "Neznámý průchod?!?"
+
+#: resize/main.c:83
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Začátek průchodu %d (max = %lu)\n"
+
+#: resize/main.c:154
+#, c-format
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested.  Proceed\n"
+"at 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:271
+#, c-format
+msgid "while opening %s"
+msgstr "při otevírání %s"
+
+#: resize/main.c:279
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "při zjišťování stat informací o %s"
+
+#: resize/main.c:337 resize/main.c:450
+#, 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:341
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Odhadovaná minimální velikost systému souborů: %llu\n"
+
+#: resize/main.c:377
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Chybná nová velikost: %s\n"
+
+#: resize/main.c:393
+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:401
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Nová velikost je menší než minimum (%llu)\n"
+
+#: resize/main.c:407
+msgid "Invalid stride length"
+msgstr "Neplatná délka kroku"
+
+#: resize/main.c:431
+#, 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:438
+#, c-format
+msgid ""
+"The filesystem is already %llu blocks long.  Nothing to do!\n"
+"\n"
+msgstr ""
+"Souborový systém již je dlouhý %'llu bloků. Není co dělat!\n"
+"\n"
+
+#: resize/main.c:455
+#, 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:464
+#, c-format
+msgid "while trying to resize %s"
+msgstr "při pokusu změnit velikost %s"
+
+#: resize/main.c:467
+#, 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:473
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu blocks long.\n"
+"\n"
+msgstr ""
+"Systém souborů na %s je nyní %'llu bloků dlouhý.\n"
+"\n"
+
+#: resize/main.c:488
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "při pokusu zkrátit %s"
+
+#: resize/online.c:79
+#, 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:83
+msgid "On-line shrinking not supported"
+msgstr "Zmenšování za běhu není podporováno"
+
+#: resize/online.c:108
+msgid "Filesystem does not support online resizing"
+msgstr "Systém souborů nepodporuje změnu velikosti za běhu"
+
+#: resize/online.c:117
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "Nedostatek rezervovaných GDT bloků pro změnu velikosti za běhu"
+
+#: resize/online.c:124
+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:132
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "při pokusu otevřít přípojný bod %s"
+
+#: resize/online.c:137
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Vyžádáno staré rozhraní pro změnu velikosti.\n"
+
+#: resize/online.c:156 resize/online.c:173
+msgid "Permission denied to resize filesystem"
+msgstr "Povolení ke změně velikosti systému souborů zamítnuto"
+
+#: resize/online.c:159 resize/online.c:179
+msgid "While checking for on-line resizing support"
+msgstr "Při zjišťování podpory změny velikosti za běhu"
+
+#: resize/online.c:176
+msgid "Kernel does not support online resizing"
+msgstr "Jádro nepodporuje změnu velikost za běhu"
+
+#: resize/online.c:209
+#, 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:219
+msgid "While trying to extend the last group"
+msgstr "Při pokusu rozšířit poslední skupinu"
+
+#: resize/online.c:273
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Při pokusu přidat skupinu č. %d"
+
+#: resize/online.c:284
+#, 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:369
+#, c-format
+msgid "inodes (%llu) must be less than %u"
+msgstr "iuzlů (%'llu) musí být méně než %'u"
+
+#: resize/resize2fs.c:631
+msgid "reserved blocks"
+msgstr "rezervované bloky"
+
+#: resize/resize2fs.c:875
+msgid "meta-data blocks"
+msgstr "bloky meta-dat"
+
+#: resize/resize2fs.c:1837
+#, c-format
+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.42.8"
+msgstr "Knihovna EXT2FS verze 1.42.8"
+
+#: 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 an block bitmap"
+msgstr "Bitmapu bloků nelze zapsat"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read an 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: fsck being run"
+msgstr "MMP: právě běží kontrola souborového systému"
+
+#: 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 MMP block"
+msgstr "Kontrolní součet bloku MMP neodpovídá bloku MMP"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Soubor ext2 již existuje"
+
+#: e2fsck/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profil verze 0.0"
+
+#: e2fsck/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Chybné magické číslo v profile_node"
+
+#: e2fsck/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Sekce s profilem nenalezena"
+
+#: e2fsck/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Relace profilu nenalezena"
+
+#: e2fsck/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í"
+
+#: e2fsck/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Hlavička sekce profilu má nenulovou hodnotu"
+
+#: e2fsck/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Chybný zřetězený seznam ve struktuře profilu"
+
+#: e2fsck/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Chybná úroveň skupiny ve struktuře profilu"
+
+#: e2fsck/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Chybný ukazatel na rodiče ve struktuře profilu"
+
+#: e2fsck/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Chybné magické číslo v iterátoru profilu"
+
+#: e2fsck/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Uzlu sekce nelze nastavit hodnotu"
+
+#: e2fsck/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Do knihovny profilu předán neplatný argument"
+
+#: e2fsck/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Pokus změnit profil, který je jen pro čtení"
+
+#: e2fsck/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "Hlavička sekce profilu není na nejvyšší úrovni"
+
+#: e2fsck/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Chyba syntaxe ve hlavičce sekce profilu"
+
+#: e2fsck/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Chyba syntaxe v relaci profilu"
+
+#: e2fsck/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Nadbytečná uzavírací závorka v profilu"
+
+#: e2fsck/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "V profilu chybí otevírací závorka"
+
+#: e2fsck/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Chybné magické číslo v profile_t"
+
+#: e2fsck/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Chybné magické číslo v profile_section_t"
+
+#: e2fsck/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "Průchod skrze všechny vrcholové sekce není podporován"
+
+#: e2fsck/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Neplatný objekt profile_section"
+
+#: e2fsck/prof_err.c:33
+msgid "No more sections"
+msgstr "Žádné další sekce"
+
+#: e2fsck/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Do dotazovací rutiny předána chybná množina názvů"
+
+#: e2fsck/prof_err.c:35
+msgid "No profile file open"
+msgstr "Žádný soubor s profilem k otevření"
+
+#: e2fsck/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Chybné magické číslo v profile_file_t"
+
+#: e2fsck/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Soubor s profilem nebylo možné otevřít"
+
+#: e2fsck/prof_err.c:38
+msgid "Section already exists"
+msgstr "Sekce již existuje"
+
+#: e2fsck/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Neplatná pravdivostní hodnota"
+
+#: e2fsck/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Neplatná celočíselná hodnota"
+
+#: e2fsck/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Chybné magické číslo v profile_file_data_t"
+
+#~ 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 "%s is mounted.  "
+#~ msgstr "%s je připojen. "
+
+#~ 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 "Error while deleting extent: %m\n"
+#~ msgstr "Chyba při mazání rozsahu: %m\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 "bad block size - %s"
+#~ msgstr "špatná velikost bloku – %s"
+
+#~ 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 ext2fs_block_iterate"
+#~ msgstr "při volání ext2fs_block_iterate"
+
+#~ msgid "while calling iterator function"
+#~ msgstr "při volání funkce iterátoru"
+
+#~ msgid "while allocating inode buffer"
+#~ msgstr "při alokaci vyrovnávací paměti inode"
+
+#~ msgid "while reading inode table (group %d)"
+#~ msgstr "při čtení tabulky inode (skupina %d)"
+
+#~ msgid "while writing inode table (group %d)"
+#~ msgstr "při zápisu tabulky inode (skupina %d)"
+
+#~ 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 ""
+#~ "Extended options are separated by commas, and may take an argument which\n"
+#~ "is set off by an equals ('=') sign.  Valid raid options are:\n"
+#~ "\tea_ver=<ea_version (1 or 2)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "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é přepínače raid jsou:\n"
+#~ "\tea_ver=<verze_ea (1 nebo 2)\n"
+#~ "\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 "Usage:  findsuper device [skipbytes [startkb]]\n"
+#~ msgstr "Použití:  findsuper zařízení [přeskakovatbajtů [startkb]]\n"
+
+#~ msgid "skipbytes should be a number, not %s\n"
+#~ msgstr "přeskakovatbajtů by mělo být číslo, ne %s\n"
+
+#~ msgid "skipbytes must be a multiple of the sector size\n"
+#~ msgstr "přeskakovatbajtů musí být násobek velikosti sektoru\n"
+
+#~ msgid "startkb should be a number, not %s\n"
+#~ msgstr "startkb by mělo být číslo, ne %s\n"
+
+#~ msgid "startkb should be positive, not %Ld\n"
+#~ msgstr "startkb by mělo být kladné, ne %Ld\n"
+
+#~ msgid "starting at %Ld, with %d byte increments\n"
+#~ msgstr "začínám na %Ld s přírůstky %d bajtů\n"
+
+#~ msgid "       thisoff     block fs_blk_sz  blksz grp last_mount\n"
+#~ msgstr "       tentopos    blok  fs_blk_sz  blksz grp last_mount\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%14Ld: finished with errno %d\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%14Ld: dokončeno s errno %d\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 "resize2fs %s (%s)\n"
+#~ msgstr "resize2fs %s (%s)\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/e2fsprogs/po/de.gmo b/e2fsprogs/po/de.gmo
new file mode 100644
index 0000000..ce1399c
--- /dev/null
+++ b/e2fsprogs/po/de.gmo
Binary files differ
diff --git a/e2fsprogs/po/de.po b/e2fsprogs/po/de.po
new file mode 100644
index 0000000..d1ed005
--- /dev/null
+++ b/e2fsprogs/po/de.po
@@ -0,0 +1,6603 @@
+# 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.
+#
+#. 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).
+#.  
+#. 	%b	<blk>			block number
+#. 	%B	<blkcount>		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_dir_acl
+#. 	%Iu	<inode> -> i_uid
+#. 	%Ig	<inode> -> i_gid
+#. 	%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.6\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2012-09-21 12:16-0400\n"
+"PO-Revision-Date: 2013-01-27 00:23+0100\n"
+"Last-Translator: Philipp Thomas <pth@suse.de>\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"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:177
+#, 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/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:1334 e2fsck/unix.c:1422 misc/badblocks.c:1214
+#: misc/badblocks.c:1222 misc/badblocks.c:1236 misc/badblocks.c:1248
+#: misc/dumpe2fs.c:588 misc/e2image.c:1189 misc/e2image.c:1307
+#: misc/e2image.c:1320 misc/mke2fs.c:193 misc/tune2fs.c:1898 resize/main.c:303
+#, c-format
+msgid "while trying to open %s"
+msgstr "beim Versuch, %s zu öffnen"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "beim Versuch, „%s“ mittels „popen“ zu öffnen"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:200
+msgid "while reading in list of bad blocks from file"
+msgstr "beim Lesen der „Bad Block“-Liste aus der Datei"
+
+#: e2fsck/badblocks.c:105
+msgid "while updating bad block inode"
+msgstr "beim Updaten des „Bad Block“-Inodes"
+
+#: e2fsck/badblocks.c:131
+#, 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/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:61 e2fsck/ehandler.c:110
+msgid "Ignore error"
+msgstr "Ignoriere Fehler"
+
+#: e2fsck/ehandler.c:62
+msgid "Force rewrite"
+msgstr "Rückschreiben erzwingen"
+
+#: e2fsck/ehandler.c:104
+#, c-format
+msgid "Error writing block %lu (%s) while %s.  "
+msgstr "Schreibfehler - Block %lu (%s) während %s. "
+
+#: e2fsck/ehandler.c:107
+#, c-format
+msgid "Error writing block %lu (%s).  "
+msgstr "Schreibfehler - Block %lu (%s). "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "leere Verzeichnisblöcke"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "leere Verzeichnisliste"
+
+#: e2fsck/emptydir.c:98
+#, 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:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Blockanzahl nicht zulässig!\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Es konnte kein Blockpuffer (Größe=%d) reserviert werden\n"
+
+#: 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!  Kann Puffer nicht leeren.\n"
+
+#: e2fsck/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Aufruf: %s [-F] [-I inode_buffer_blocks] Gerät\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:963
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "beim Öffnen von %s für die Puffer-Leerung"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:969 resize/main.c:276
+#, c-format
+msgid "while trying to flush %s"
+msgstr "während des Rückschreibeversuches auf %s"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1084
+msgid "while opening inode scan"
+msgstr "beim Start des Inode-Scans"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1102
+msgid "while getting next inode"
+msgstr "beim Laden des nächsten Inodes"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%u Inodes untersucht.\n"
+
+#: e2fsck/journal.c:512
+msgid "reading journal superblock\n"
+msgstr "Lese Journal-Superblock\n"
+
+#: e2fsck/journal.c:569
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: keinen gültigen Journal-Superblock gefunden\n"
+
+#: e2fsck/journal.c:578
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: Das Journal ist zu kurz\n"
+
+#: e2fsck/journal.c:870
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: stelle das Journal wieder her\n"
+
+#: e2fsck/journal.c:872
+#, 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:899
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "beim Versuch, %s erneut zu öffnen"
+
+#: e2fsck/message.c:113
+msgid "aextended attribute"
+msgstr "aerweiterte Attribute"
+
+#: e2fsck/message.c:114
+msgid "Aerror allocating"
+msgstr "AFehler beim Reservieren von Platz für"
+
+#: e2fsck/message.c:115
+msgid "bblock"
+msgstr "bBlock"
+
+#: e2fsck/message.c:116
+msgid "Bbitmap"
+msgstr "BBitmap"
+
+#: e2fsck/message.c:117
+msgid "ccompress"
+msgstr "ckomprimieren"
+
+#: e2fsck/message.c:118
+msgid "Cconflicts with some other fs @b"
+msgstr "CKonflikte mit einem anderen Dateisystemenblock"
+
+#: e2fsck/message.c:119
+msgid "iinode"
+msgstr "iInode"
+
+#: e2fsck/message.c:120
+msgid "Iillegal"
+msgstr "Iillegal(er)"
+
+#: e2fsck/message.c:121
+msgid "jjournal"
+msgstr "jJournal"
+
+#: e2fsck/message.c:122
+msgid "Ddeleted"
+msgstr "Dgelöscht"
+
+#: e2fsck/message.c:123
+msgid "ddirectory"
+msgstr "dVerzeichnis"
+
+#: 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 "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:131
+msgid "Lis a link"
+msgstr "List eine Verknüpfung"
+
+#: e2fsck/message.c:132
+msgid "mmultiply-claimed"
+msgstr "mmehrfach beansprucht"
+
+#: e2fsck/message.c:133
+msgid "ninvalid"
+msgstr "nungültig"
+
+#: e2fsck/message.c:134
+msgid "oorphaned"
+msgstr "overwaist"
+
+#: e2fsck/message.c:135
+msgid "pproblem in"
+msgstr "pProblem in"
+
+#: e2fsck/message.c:136
+msgid "qquota"
+msgstr "qQuota"
+
+#: e2fsck/message.c:137
+msgid "rroot @i"
+msgstr "rRoot @i"
+
+#: e2fsck/message.c:138
+msgid "sshould be"
+msgstr "ssollte sein"
+
+#: e2fsck/message.c:139
+msgid "Ssuper@b"
+msgstr "SSuper@b"
+
+#: e2fsck/message.c:140
+msgid "uunattached"
+msgstr "unicht verbunden"
+
+#: e2fsck/message.c:141
+msgid "vdevice"
+msgstr "vGerät"
+
+#: e2fsck/message.c:142
+msgid "xextent"
+msgstr "xErweiterung"
+
+#: e2fsck/message.c:143
+msgid "zzero-length"
+msgstr "zmit Länge Null"
+
+#: e2fsck/message.c:154
+msgid "<The NULL inode>"
+msgstr "<Der NULL Inode>"
+
+#: e2fsck/message.c:155
+msgid "<The bad blocks inode>"
+msgstr "<Der „Bad Blocks“-Inode>"
+
+#: e2fsck/message.c:157
+msgid "<The user quota inode>"
+msgstr "<Die Benutzerquota-Inode>"
+
+#: e2fsck/message.c:158
+msgid "<The group quota inode>"
+msgstr "<Die Gruppenquota-Inode>"
+
+#: e2fsck/message.c:159
+msgid "<The boot loader inode>"
+msgstr "<Der „Boot Loader“-Inode>"
+
+#: e2fsck/message.c:160
+msgid "<The undelete directory inode>"
+msgstr "<Der „undelete directory“-Inode>"
+
+#: e2fsck/message.c:161
+msgid "<The group descriptor inode>"
+msgstr "<Des „group descriptor“-Inode>"
+
+#: e2fsck/message.c:162
+msgid "<The journal inode>"
+msgstr "<Der Journal-Inode>"
+
+#: e2fsck/message.c:163
+msgid "<Reserved inode 9>"
+msgstr "<Der reservierte Inode 9>"
+
+#: e2fsck/message.c:164
+msgid "<Reserved inode 10>"
+msgstr "<Der reservierte Inode 10>"
+
+#: e2fsck/message.c:333
+msgid "regular file"
+msgstr "'reguläre Datei"
+
+#: e2fsck/message.c:335
+msgid "directory"
+msgstr "Verzeichnis"
+
+#: e2fsck/message.c:337
+msgid "character device"
+msgstr "zeichenorientiertes Gerät"
+
+#: e2fsck/message.c:339
+msgid "block device"
+msgstr "Blockgerät"
+
+#: e2fsck/message.c:341
+msgid "named pipe"
+msgstr "named pipe"
+
+#: e2fsck/message.c:343
+msgid "symbolic link"
+msgstr "symbolische Verknüpfung"
+
+#: e2fsck/message.c:345 misc/uuidd.c:161
+msgid "socket"
+msgstr " Socket"
+
+#: e2fsck/message.c:347
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "unbekannter Dateityp mit Modus 0%o"
+
+#: e2fsck/message.c:423
+msgid "indirect block"
+msgstr "indirekte Blöcke"
+
+#: e2fsck/message.c:425
+msgid "double indirect block"
+msgstr "doppelt indirekte Blöcke"
+
+#: e2fsck/message.c:427
+msgid "triple indirect block"
+msgstr "dreifach indirekte Blöcke"
+
+#: e2fsck/message.c:429
+msgid "translator block"
+msgstr "Übersetzerblock"
+
+#: e2fsck/message.c:431
+msgid "block #"
+msgstr "Block Nr."
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "mehrfach beanspruchte Inode-Liste"
+
+#: e2fsck/pass1b.c:610 e2fsck/pass1b.c:729
+#, 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:820
+msgid "returned from clone_file_block"
+msgstr "zurückgegeben von clone_file_block"
+
+#: e2fsck/pass1b.c:842
+#, 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:854
+#, 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:476 e2fsck/pass2.c:782
+msgid "reading directory block"
+msgstr "lese Verzeichnisblock"
+
+#: e2fsck/pass1.c:599
+msgid "in-use inode map"
+msgstr "„in-use inode“-Liste"
+
+#: e2fsck/pass1.c:610
+msgid "directory inode map"
+msgstr "„directory inode“-Liste"
+
+#: e2fsck/pass1.c:620
+msgid "regular file inode map"
+msgstr "„regular file inode“-Liste"
+
+#: e2fsck/pass1.c:629
+msgid "in-use block map"
+msgstr "„in-use block“-Liste"
+
+#: e2fsck/pass1.c:696
+msgid "opening inode scan"
+msgstr "Starte Inode-Scan"
+
+#: e2fsck/pass1.c:730
+msgid "getting next inode from scan"
+msgstr "beim Lesen des nächsten Inodes"
+
+#: e2fsck/pass1.c:1240
+msgid "Pass 1"
+msgstr "Durchgang 1"
+
+#: e2fsck/pass1.c:1297
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "lese indirekte Blöcke von Inode %u"
+
+#: e2fsck/pass1.c:1347
+msgid "bad inode map"
+msgstr "fehlerhafte Inode-Liste"
+
+#: e2fsck/pass1.c:1370
+msgid "inode in bad block map"
+msgstr "Inode in „Bad Blocks“-Liste"
+
+#: e2fsck/pass1.c:1390
+msgid "imagic inode map"
+msgstr "i„magic inode“-Liste"
+
+#: e2fsck/pass1.c:1417
+msgid "multiply claimed block map"
+msgstr "mehrfach referenzierte Blockliste"
+
+#: e2fsck/pass1.c:1518
+msgid "ext attr block map"
+msgstr "ext attr block map"
+
+#: e2fsck/pass1.c:2266
+#, 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:2627
+msgid "block bitmap"
+msgstr "Block-Bitmap"
+
+#: e2fsck/pass1.c:2633
+msgid "inode bitmap"
+msgstr "Inode-Bitmap"
+
+#: e2fsck/pass1.c:2639
+msgid "inode table"
+msgstr "Inode-Tabelle"
+
+#: e2fsck/pass2.c:283
+msgid "Pass 2"
+msgstr "Durchgang 2"
+
+#: e2fsck/pass2.c:805
+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:136
+msgid "Pass 3"
+msgstr "Durchgang 3"
+
+#: e2fsck/pass3.c:322
+msgid "inode loop detection bitmap"
+msgstr "„inode loop detection“-Bitmap"
+
+#: e2fsck/pass4.c:195
+msgid "Pass 4"
+msgstr "Durchgang 4"
+
+#: e2fsck/pass5.c:74
+msgid "Pass 5"
+msgstr "Durchgang 5"
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(nicht interaktiv)"
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr "Repariere"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Bereinige"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Zurücksetzen"
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr "Gebe frei"
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr "Erweitere"
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr "Verbinde nach /lost+found"
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr "Erstelle"
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr "Rette"
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr "Verkürze"
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr "Bereinige Inode"
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr "Abbrechen"
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr "Aufteilen"
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr "Fortsetzen"
+
+#: e2fsck/problem.c:65
+msgid "Clone multiply-claimed blocks"
+msgstr "mehrfach referenzierte BLöcke werden geklont"
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr "Lösche Datei"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Ausgaben unterdrücken"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "Trennen"
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "Bereinige HTree-Index"
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr "Zurücksetzen"
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr "(NICHTS)"
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr "REPARIERT"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "BEREINIGT"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "ZURÜCKGESETZT"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "FREIGEGEBEN"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "ERWEITERT"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "WIEDER VERBUNDEN"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "ANGELEGT"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "GERETTET"
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr "BEENDET"
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr "INODE BEREINIGT"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "ABGEBROCHEN"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr "ABGESPALTEn"
+
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr "SETZE FORT"
+
+#: e2fsck/problem.c:93
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "MEHRFACH REFERENZIERTE BLÖCKE GEKLONT"
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr "DATEI GELÖSCHT"
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr "UNTERDRÜCKT"
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr "GETRENNT"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "HTREE-INDEX BEREINIGT"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "WIRD WIEDER AUFGEBAUT"
+
+#. @-expanded: block bitmap for group %g is not in group.  (block %b)\n
+#: e2fsck/problem.c:107
+msgid "@b @B for @g %g is not in @g.  (@b %b)\n"
+msgstr "@b @B für @g %g ist nicht in @g. (@b %b)\n"
+
+#. @-expanded: inode bitmap for group %g is not in group.  (block %b)\n
+#: e2fsck/problem.c:111
+msgid "@i @B for @g %g is not in @g.  (@b %b)\n"
+msgstr "@i @B für @g %g ist nicht 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:116
+msgid ""
+"@i table for @g %g is not in @g.  (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"@i Tabelle für @g %g ist nicht in @g. (@b %b)\n"
+"WARNUNG: GROSSER DATENVERLUST IST MÖGLICH.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a correct ext2\n
+#. @-expanded: filesystem.  If the device is valid and it really contains an ext2\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 %S <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:122
+#, c-format
+msgid ""
+"\n"
+"The @S could not be read or does not describe a correct ext2\n"
+"@f.  If the @v is valid and it really contains an ext2\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 %S <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Der @S ist unlesbar bzw. beschreibt kein gültiges ext2\n"
+"@f. Wenn @v gültig ist und ein ext2\n"
+"@f (kein swap oder ufs usw.) enthält, dann ist der @S\n"
+"beschädigt, und sie könnten e2fsck mit einem anderen @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:131
+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 @f-Größe ( laut @S) ist %b @bs\n"
+"Die physikalische Größe von @v ist %c @bs\n"
+"Entweder der @S oder die Partionstabelle ist 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:138
+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 @b-Größen verschiedene Fragmentgrößen.\n"
+
+#. @-expanded: superblock blocks_per_group = %b, should have been %c\n
+#: e2fsck/problem.c:145
+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:150
+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:155
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"@f hat keinen UUID; es wird eine generiert.\n"
+"\n"
+
+#: e2fsck/problem.c:160
+#, 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:169
+msgid "Corruption found in @S.  (%s = %N).\n"
+msgstr "Beschädigung gefunden in @S. (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:174
+#, c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr "Fehler bei der Feststellung der Größe des physischen @v: %m\n"
+
+#. @-expanded: inode count in superblock is %i, should be %j.\n
+#: e2fsck/problem.c:179
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "@i-Anzahl in @S ist %i, sollte %j sein.\n"
+
+#: e2fsck/problem.c:183
+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:188
+#, c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "@S hat ein defektes @j (@i %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:193
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "Externes @j hat mehrere @f-Nutzer (nicht unterstützt).\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:198
+msgid "Can't find external @j\n"
+msgstr "Kann kein externes @j finden\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:203
+msgid "External @j has bad @S\n"
+msgstr "Externes @j hat ungültigen @S\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:208
+msgid "External @j does not support this @f\n"
+msgstr "Externes @j unterstützt nicht @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:213
+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 Type %N (nicht unterstützt).\n"
+"Es ist möglich, dass ihr e2fsck älter ist und/oder dieses @j-Format nicht unterstützt.\n"
+"Es ist ebenso möglich, dass der @j-@S defekt ist.\n"
+
+#. @-expanded: journal superblock is corrupt.\n
+#: e2fsck/problem.c:221
+msgid "@j @S is corrupt.\n"
+msgstr "der @j-@S ist defekt.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal %s is present.\n
+#: e2fsck/problem.c:226
+#, c-format
+msgid "@S has_@j flag is clear, but a @j %s is present.\n"
+msgstr ""
+"Der Bitschalter has_journal im Superblock ist nicht gesetzt, aber ein \n"
+"@j %s ist vorhanden.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:231
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr ""
+"Im @S ist der Bitschalter „needs_recovery“ gesetzt, aber ein @j ist\n"
+"nicht vorhanden.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:236
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr ""
+"Der Bitschalter „Wiederherstellung nötig“ im @S ist nicht gesetzt, aber das\n"
+"@j enthält Daten.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:241
+msgid "Clear @j"
+msgstr "Bereinige @j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.  
+#: e2fsck/problem.c:246 e2fsck/problem.c:695
+msgid "@f has feature flag(s) set, but is a revision 0 @f.  "
+msgstr "@f hat Eigenschfts-Bitschalter gesetzt, ist aber ein Revision-0-@f. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:251
+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:256
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "@I @b #%B (%b) in @o @i %i gefunden.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:261
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Bereits bereinigter %B (%b) in @o @i %i gefunden.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:266
+#, c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "@I @o @i %i im @S.\n"
+
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+#: e2fsck/problem.c:271
+#, c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "Illegaler Inode %i in der Liste der verwaisten Inodes.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:276
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr "der @j-@S hat einen unbekannten Nur-Lesen-Bitschalter gesetzt.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:281
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "im @j-@S ist ein unbekannter Bitschalter für inkompatible Eigenschaft gesetzt.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:286
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "diese @j-Version wird von diesem e2fsck nicht unterstützt.\n"
+
+#. @-expanded: Moving journal from /%s to hidden inode.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:291
+#, c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Verschiebe @j von /%s zum versteckten Inode.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:296
+#, c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+"Fehler beim Verschieben von @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:301
+msgid ""
+"Found @n V2 @j @S fields (from V1 @j).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+"Unvollständige V2-@j-@S-Felder (vom V1-Journal) gefunden.\n"
+"Die Felder nach dem V1-@j-@S werden bereinigt...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:307
+msgid "Run @j anyway"
+msgstr "Starte @j trotzdem"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:312
+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 @j wird daher trotzdem gestartet.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:317
+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:322
+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:328
+msgid "Resize_@i not enabled, but the resize @i is non-zero.  "
+msgstr "Resize_@i ist nicht aktiviert, aber die zu modifgizierende @i ist nicht-Null."
+
+#. @-expanded: Resize inode not valid.  
+#: e2fsck/problem.c:333
+msgid "Resize @i not valid.  "
+msgstr "Resize-@i ist ungültig.  "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:338
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Der Zeitpunkt des letzten Einhängens von @S (%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:343
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr ""
+"Der Zeitpunkt des letzten Schreibens von @S (%t,\n"
+"\tjetzt = %T) liegt in der Zukunft.\n"
+
+#. @-expanded: superblock hint for external superblock should be %X.  
+#: e2fsck/problem.c:347
+#, c-format
+msgid "@S hint for external superblock @s %X.  "
+msgstr "@S-Hinweis für externen Superblock @s %X.  "
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:352
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Füge Verzeinishash-Hilfe zu @f hinzu.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.  
+#: e2fsck/problem.c:357
+msgid "@g descriptor %g checksum is %04x, should be %04y.  "
+msgstr "Die Prüfsumme des @g-Deskriptors %g ist %04x, sie sollte %04y sein.  "
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:362
+#, c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr "@g-Deskriptor %g ist als nicht initialisiert gekennzeichnet ohne eine gesetzte Eigenschaft.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.  
+#: e2fsck/problem.c:367
+msgid "@g descriptor %g has invalid unused inodes count %b.  "
+msgstr "@g-Deskriptor %g hat eine ungültige Anzahl ungenutzter Inodes von %b.  "
+
+#. @-expanded: Last group block bitmap uninitialized.  
+#: e2fsck/problem.c:372
+msgid "Last @g @b @B uninitialized.  "
+msgstr "Die letzte Gruppen-Blockbitmap ist nicht initialisiert.  "
+
+#: e2fsck/problem.c:377
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "Journaltransaktion %i war beschädigt, die Wiederholung wurde abgegrochen.\n"
+
+#: e2fsck/problem.c:381
+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)  
+#: e2fsck/problem.c:386
+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)  "
+msgstr ""
+"Der Zeitpunkt des letzten Einhängens von @S liegt in der Zukunft.\n"
+"\t(weniger als ein Tag, wahrscheinlich aufgrund falsch gesetzter Hardware-Uhr)  "
+
+#. @-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).  
+#: e2fsck/problem.c:392
+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).  "
+msgstr ""
+"Der Zeitpunkt des letzten Schreibens von @S liegt in der Zukunft.\n"
+"\t(weniger als ein Tag, wahrscheinlich aufgrund falsch gesetzter Hardware-Uhr)  "
+
+#. @-expanded: One or more block group descriptor checksums are invalid.  
+#: e2fsck/problem.c:398
+msgid "One or more @b @g descriptor checksums are invalid.  "
+msgstr "Die Prüfsumme eines oder mehrerer @g-Deskriptoren ist ungültig.  "
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:403
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Setze die Anzahl der freien Inodes auf %j (war %i)\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:408
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Setze die Anzahl der freien Blöcke auf %c (war %b)\n"
+
+#. @-expanded: Making quota inode %i (%Q) hidden.\n
+#: e2fsck/problem.c:413
+msgid "Making @q @i %i (%Q) hidden.\n"
+msgstr "Quota-Inode %i (%Q) wird versteckt.\n"
+
+#. @-expanded: superblock has invalid MMP block.  
+#: e2fsck/problem.c:418
+msgid "@S has invalid MMP block.  "
+msgstr "der @S hat einen ungültigen MMP-Block.  "
+
+#. @-expanded: superblock has invalid MMP magic.  
+#: e2fsck/problem.c:423
+msgid "@S has invalid MMP magic.  "
+msgstr "der @S besitzt eine falsche MMP-Kennung.  "
+
+#: e2fsck/problem.c:428
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:433
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:440
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "Durchgang 1: Prüfe @is, @bs und Größen\n"
+
+#. @-expanded: root inode is not a directory.  
+#: e2fsck/problem.c:444
+msgid "@r is not a @d.  "
+msgstr "@r ist kein @d.  "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).  
+#: e2fsck/problem.c:449
+msgid "@r has dtime set (probably due to old mke2fs).  "
+msgstr "@r hat dtime gesetzt (vielleicht durch ein zu altes mke2fs).  "
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.  
+#: e2fsck/problem.c:454
+msgid "Reserved @i %i (%Q) has @n mode.  "
+msgstr "Reservierte @i %i (%Q) hat einen ungültigen Modus.  "
+
+#. @-expanded: deleted inode %i has zero dtime.  
+#: e2fsck/problem.c:459
+#, c-format
+msgid "@D @i %i has zero dtime.  "
+msgstr "dtime in @D @i %i ist Null.  "
+
+#. @-expanded: inode %i is in use, but has dtime set.  
+#: e2fsck/problem.c:464
+#, c-format
+msgid "@i %i is in use, but has dtime set.  "
+msgstr "@i %i ist in Benutzung, aber hat dtime gesetzt.  "
+
+#. @-expanded: inode %i is a zero-length directory.  
+#: e2fsck/problem.c:469
+#, c-format
+msgid "@i %i is a @z @d.  "
+msgstr "@i %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:474
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "die Blockbitmap von @g %g auf %b überschneided sich mit einem anderen FS-Block.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:479
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "die @i-@B von @g %g bei %b überschneided sich mit einem anderen FS-Block.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:484
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "die @i-Tablle von Gruppe %g bei %b steht in Konflikt mit einem anderen Dateisystemblock.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.  
+#: e2fsck/problem.c:489
+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:494
+msgid "@g %g's @i @B (%b) is bad.  "
+msgstr "die @i-@B (%b) von @g %g ist ungültig.  "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.  
+#: e2fsck/problem.c:499
+msgid "@i %i, i_size is %Is, @s %N.  "
+msgstr "@i %i, i_size ist %Is, sollte %N sein.  "
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.  
+#: e2fsck/problem.c:504
+msgid "@i %i, i_@bs is %Ib, @s %N.  "
+msgstr "@i %i, i_@bs ist %Ib, sollte %N sein.  "
+
+#. @-expanded: illegal %B (%b) in inode %i.  
+#: e2fsck/problem.c:509
+msgid "@I %B (%b) in @i %i.  "
+msgstr "illegaler %B (%b) in @i %i.  "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.  
+#: e2fsck/problem.c:514
+msgid "%B (%b) overlaps @f metadata in @i %i.  "
+msgstr "%B (%b) überlappt @f-Metadaten in @i %i.  "
+
+#. @-expanded: inode %i has illegal block(s).  
+#: e2fsck/problem.c:519
+#, c-format
+msgid "@i %i has illegal @b(s).  "
+msgstr "@i %i hat unzulässige(n) Block/Blöcke.  "
+
+#. @-expanded: Too many illegal blocks in inode %i.\n
+#: e2fsck/problem.c:524
+#, c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Zu viele unzulässige @bs in @i %i.\n"
+
+#. @-expanded: illegal %B (%b) in bad block inode.  
+#: e2fsck/problem.c:529
+msgid "@I %B (%b) in bad @b @i.  "
+msgstr "@I %B (%b) in ungültiger @b-@i.  "
+
+#. @-expanded: Bad block inode has illegal block(s).  
+#: e2fsck/problem.c:534
+msgid "Bad @b @i has illegal @b(s).  "
+msgstr "Bad-@b @i hat unzulässige(n) Block/Blöcke.  "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:539
+msgid "Duplicate or bad @b in use!\n"
+msgstr "Doppelter oder unzulässiger @b in Gebrauch!\n"
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.  
+#: e2fsck/problem.c:544
+msgid "Bad @b %b used as bad @b @i indirect @b.  "
+msgstr "Ungültiger @b %b wird benutzt als indirekter Block der Badblock-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:549
+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"
+"Die Badblock-Indode ist wahrscheinlich beschädigt worden. Sie sollten\n"
+"nun innehalten und „e2fsck -c“ ausführen, um nach defekten Blöcken in\n"
+"dem @f zu suchen.\n"
+
+#. @-expanded: \n
+#. @-expanded: If the block is really bad, the filesystem can not be fixed.\n
+#: e2fsck/problem.c:556
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+"\n"
+"Wenn der @b wirklich defekt ist, kann das @f 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:561
+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 @b von 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:567
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "Der primäre @S (%b) ist auf 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:572
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "Block %b im primären Deskriptor @g ist auf der Liste der defekten Blöcke\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:578
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Warnung: der @S von 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:583
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr "Warnung: die Kopie des Gruppen-Deskriptors 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:589
+msgid "Programming error?  @b #%b claimed for no reason in process_bad_@b.\n"
+msgstr "Programmfehler?  @b #%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:595
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "@A %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:600
+#, c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "@A einen @b-Puffer zum Verschieben von %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:605
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "Verschiebe Gruppe %g's %s von %b nach %c...\n"
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:610
+#, c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "Verschiebe @g %g's %s nach %c...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:615
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Warnung: @b %b von %s konnte nicht gelesen werden: %m\n"
+
+#. @-expanded: Warning: could not write block %b for %s: %m\n
+#: e2fsck/problem.c:620
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Warnung: @b %b von %s konnte nicht geschrieben werden: %m\n"
+
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+#: e2fsck/problem.c:625 e2fsck/problem.c:1460
+msgid "@A @i @B (%N): %m\n"
+msgstr "@A die @i-@B (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:630
+msgid "@A @b @B (%N): %m\n"
+msgstr "@A die @i-@B (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:635
+#, c-format
+msgid "@A icount link information: %m\n"
+msgstr "@A die „icount link information“: %m\n"
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:640
+#, c-format
+msgid "@A @d @b array: %m\n"
+msgstr "@A das @d-@b-Feld: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:645
+#, c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Fehler während des Durchsuchens der @is (%i): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i: %m\n
+#: e2fsck/problem.c:650
+#, c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr "Fehler beim Iterieren über die Blöcke in @i %i: %m\n"
+
+#. @-expanded: Error storing inode count information (inode=%i, count=%N): %m\n
+#: e2fsck/problem.c:655
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr "Fehler beim Speichern der @i Anzahl-Informationen (@i=%i, count=%N): %m\n"
+
+#. @-expanded: Error storing directory block information (inode=%i, block=%b, num=%N): %m\n
+#: e2fsck/problem.c:660
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr "Fehler beim Speichern der @d-@b-Informationen (@i=%i, @b=%b, num=%N): %m\n"
+
+#. @-expanded: Error reading inode %i: %m\n
+#: e2fsck/problem.c:666
+#, c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Fehler beim Lesen von @i %i: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.  
+#: e2fsck/problem.c:674
+#, c-format
+msgid "@i %i has imagic flag set.  "
+msgstr "@i %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:679
+#, c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set.  "
+msgstr ""
+"Spezielle (@v/socket/fifo/symlink) Datei (@i %i) hat den Bitschalter für\n"
+"unveränderbar oder nur-anängen gesetzt.  "
+
+#. @-expanded: inode %i has compression flag set on filesystem without compression support.  
+#: e2fsck/problem.c:685
+#, c-format
+msgid "@i %i has @cion flag set on @f without @cion support.  "
+msgstr "@i %i hat den Bitschalter für @c gesetzt auf einem @f ohne Unterstützung dafür.  "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.  
+#: e2fsck/problem.c:690
+#, c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size.  "
+msgstr "Spezielle (@v/socket/fifo) @i %i hat die Größe Null. "
+
+#. @-expanded: journal inode is not in use, but contains data.  
+#: e2fsck/problem.c:700
+msgid "@j @i is not in use, but contains data.  "
+msgstr "@j %i wird nicht verwendet, aber enthält Daten.  "
+
+#. @-expanded: journal is not regular file.  
+#: e2fsck/problem.c:705
+msgid "@j is not regular file.  "
+msgstr "@j ist keine reguläre Datei.  "
+
+#. @-expanded: inode %i was part of the orphaned inode list.  
+#: e2fsck/problem.c:710
+#, c-format
+msgid "@i %i was part of the @o @i list.  "
+msgstr "@i %i war Teil der Liste verwaister Inodes.  "
+
+#. @-expanded: inodes that were part of a corrupted orphan linked list found.  
+#: e2fsck/problem.c:716
+msgid "@is that were part of a corrupted orphan linked list found.  "
+msgstr "@is gefunden, die Teil einer defekten verketteten Liste von verwaisten @is waren.  "
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:721
+msgid "@A refcount structure (%N): %m\n"
+msgstr "@A die refcount-Structure (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.  
+#: e2fsck/problem.c:726
+msgid "Error reading @a @b %b for @i %i.  "
+msgstr "Fehler beim Lesen des Blocks für erweiterte Attribute %b f @i %i.  "
+
+#. @-expanded: inode %i has a bad extended attribute block %b.  
+#: e2fsck/problem.c:731
+msgid "@i %i has a bad @a @b %b.  "
+msgstr "@i %i hat einen defekten erweiterte-Attribute-Block %b.  "
+
+#. @-expanded: Error reading extended attribute block %b (%m).  
+#: e2fsck/problem.c:736
+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:741
+msgid "@a @b %b has reference count %r, @s %N.  "
+msgstr "Der Referenzzähler des Blocks für @a %b ist %r, richtig wäre %N.  "
+
+#. @-expanded: Error writing extended attribute block %b (%m).  
+#: e2fsck/problem.c:746
+msgid "Error writing @a @b %b (%m).  "
+msgstr "Fehler beim Schreiben des Blocks für @a %b (%m).  "
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.  
+#: e2fsck/problem.c:751
+msgid "@a @b %b has h_@bs > 1.  "
+msgstr "der Block für @a %b hat h_blocks > 1.  "
+
+#. @-expanded: error allocating extended attribute block %b.  
+#: e2fsck/problem.c:756
+msgid "@A @a @b %b.  "
+msgstr "@A den Block für erweiterte Attribute %b.  "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).  
+#: e2fsck/problem.c:761
+msgid "@a @b %b is corrupt (allocation collision).  "
+msgstr "der @b für @a %b ist defekt (Kollision der Platzanforderungen).  "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).  
+#: e2fsck/problem.c:766
+msgid "@a @b %b is corrupt (@n name).  "
+msgstr "@a @b %b ist defekt (ungültiger Name).  "
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).  
+#: e2fsck/problem.c:771
+msgid "@a @b %b is corrupt (@n value).  "
+msgstr "der @b für @a %b ist defekt (ungültiger Wert).  "
+
+#. @-expanded: inode %i is too big.  
+#: e2fsck/problem.c:776
+#, c-format
+msgid "@i %i is too big.  "
+msgstr "@i %i ist zu groß.  "
+
+#. @-expanded: %B (%b) causes directory to be too big.  
+#: e2fsck/problem.c:780
+msgid "%B (%b) causes @d to be too big.  "
+msgstr "%B (%b) macht @d zu groß.  "
+
+#: e2fsck/problem.c:785
+msgid "%B (%b) causes file to be too big.  "
+msgstr "@b #%B (%b) macht die Datei zu groß.  "
+
+#: e2fsck/problem.c:790
+msgid "%B (%b) causes symlink to be too big.  "
+msgstr "@b #%B (%b) macht den Symlink zu groß.  "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:795
+#, c-format
+msgid "@i %i has INDEX_FL flag set on @f without htree support.\n"
+msgstr "@i %i hat INDEX_FL Flag auf @f gesetzt ohne HTREE-Unterstützung.\n"
+
+#. @-expanded: inode %i has INDEX_FL flag set but is not a directory.\n
+#: e2fsck/problem.c:800
+#, c-format
+msgid "@i %i has INDEX_FL flag set but is not a @d.\n"
+msgstr "@i %i hat den INDEX_FL-Bitschalter gesetzt, ist aber kein @d.\n"
+
+#. @-expanded: HTREE directory inode %i has an invalid root node.\n
+#: e2fsck/problem.c:805
+#, c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "@h %i hat einen unvollständigen Wurzelknoten („root node“).\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:810
+msgid "@h %i has an unsupported hash version (%N)\n"
+msgstr "@h %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:815
+#, 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:820
+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:825
+msgid ""
+"Bad @b @i has an indirect @b (%b) that conflicts with\n"
+"@f metadata.  "
+msgstr ""
+"der @i für defekte Blöcke hat einen indirekten @b (%b), der mit\n"
+"den @f-Metadaten in Konflikt steht.  "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:831
+#, c-format
+msgid "Resize @i (re)creation failed: %m."
+msgstr "Erzeugung von Vergrösserungs-@i scheiterte: %m."
+
+#. @-expanded: inode %i has a extra size (%IS) which is invalid\n
+#: e2fsck/problem.c:836
+msgid "@i %i has a extra size (%IS) which is @n\n"
+msgstr "@h %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:841
+msgid "@a in @i %i has a namelen (%N) which is @n\n"
+msgstr "ein erweitertes Attribut in @i %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:846
+msgid "@a in @i %i has a value offset (%N) which is @n\n"
+msgstr "ein erweitertes Attribut in @i %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:851
+msgid "@a in @i %i has a value @b (%N) which is @n (must be 0)\n"
+msgstr "ein erweitertes Attribut in @i %i hat einen ungültigen Werteblock von %N (muß 0 sein)\n"
+
+#. @-expanded: extended attribute in inode %i has a value size (%N) which is invalid\n
+#: e2fsck/problem.c:856
+msgid "@a in @i %i has a value size (%N) which is @n\n"
+msgstr "ein erweitertes Attribut in @i %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:861
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "ein erweitertes Attribut in @i %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:866
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "@i %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:871
+#, c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Fehler beim Iterieren über den @xs-Baum @x in @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:876
+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 @i %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:882
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, @n physical @b %b, len %N)\n"
+msgstr ""
+"@i %i hat eine @ne Erweiterung\n"
+"\t(logischer @b %c, @n physischer @b %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:887
+msgid ""
+"@i %i has an @n extent\n"
+"\t(logical @b %c, physical @b %b, @n len %N)\n"
+msgstr ""
+"@i %i hat eine ungültige Erweiterung\n"
+"\t(logischer @b %c, physischer @b %b, @n Länge %N)\n"
+
+#. @-expanded: inode %i has EXTENTS_FL flag set on filesystem without extents support.\n
+#: e2fsck/problem.c:892
+#, c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr "@i %i hat  EXTENTS_FL-Bitschalter gesetzt, obwohl das @f Erweiterungen nicht unterstützt.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:897
+#, c-format
+msgid "@i %i is in extent format, but @S is missing EXTENTS feature\n"
+msgstr "@i %i besitzt das Erweiterungsformat, aber dem @S fehlt die Eigenschaft EXTENTS\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:902
+#, c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr "der @i %i fehlt EXTENT_FL, sie hat aber das Format einer Erweiterung\n"
+
+#: e2fsck/problem.c:907
+#, 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:912
+msgid ""
+"@i %i has out of order extents\n"
+"\t(@n logical @b %c, physical @b %b, len %N)\n"
+msgstr ""
+"@i %i hat unregelmässige Erweiterungen\n"
+"\t(@n logischer @b %c, physischer @b %b, Länge %N)\n"
+
+#. @-expanded: inode %i has an invalid extent node (blk %b, lblk %c)\n
+#: e2fsck/problem.c:916
+msgid "@i %i has an invalid extent node (blk %b, lblk %c)\n"
+msgstr "@i %i hat einen ungültigen Erweiterungs-Knoten (blk %b, lblk %c)\n"
+
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+#: e2fsck/problem.c:921
+#, c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Fehler beim Umwandeln der Subcluster-Blockbitmap: %m\n"
+
+#. @-expanded: quota inode is not regular file.  
+#: e2fsck/problem.c:926
+msgid "@q @i is not regular file.  "
+msgstr "die @q-@i ist keine reguläre Datei.  "
+
+#. @-expanded: quota inode is not in use, but contains data.  
+#: e2fsck/problem.c:931
+msgid "@q @i is not in use, but contains data.  "
+msgstr "@q-@i wird nicht benutzt, enthält aber Daten.  "
+
+#. @-expanded: quota inode is visible to the user.  
+#: e2fsck/problem.c:936
+msgid "@q @i is visible to the user.  "
+msgstr "die @q-@i ist sichtbar für den Benutzer.  "
+
+#. @-expanded: The bad block inode looks invalid.  
+#: e2fsck/problem.c:941
+msgid "The bad @b @i looks @n.  "
+msgstr "Die 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:946
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+msgstr ""
+"@i %i hat eine Erweitertung der Länge Null\n"
+"\t(@n logischer @b %c, physischer @b %b)\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:953
+msgid ""
+"\n"
+"Running additional passes to resolve @bs claimed by more than one @i...\n"
+"Pass 1B: Rescanning for @m @bs\n"
+msgstr ""
+"\n"
+"Führe zusätzliche Läufe durch, um die von mehr als einer @i 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:959
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "@me(r) Block/Blöcke in @i %i:"
+
+#: e2fsck/problem.c:974
+#, c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Fehlen beim Prüfen der Inodes (%i): %m\n"
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:979
+#, c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "@A die @i-@B (inode_dup_map): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:984
+#, c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr "Fehler beim Iterieren über die Blöcke in @i %i (%s): %m\n"
+
+#. @-expanded: Error adjusting refcount for extended attribute block %b (inode %i): %m\n
+#: e2fsck/problem.c:989 e2fsck/problem.c:1304
+msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
+msgstr "Fehler bei der Anpassung des Referenzzählers des Blocks für @a %b (@i %i): %m\n"
+
+#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
+#: e2fsck/problem.c:994
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr "Durchgang 1C: Durchsuche Verzeichnisse nach @is mit mehrfach belegten Blöcken.\n"
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1000
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Durchgang 1D: Gleiche mehrfach belegte Blöcke ab\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:1005
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+"  has %r @m @b(s), shared with %N file(s):\n"
+msgstr ""
+"Datei %Q (@i #%i, Änderungszeit %IM) \n"
+"  hat %r mehrfach belegte(n) Block/Böcke, gemeinsam genutzt mit %N Datei(en):\n"
+
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+#: e2fsck/problem.c:1011
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (@i #%i, Änderungszeit %IM)\n"
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1016
+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:1021
+msgid ""
+"(There are %N @is containing @m @bs.)\n"
+"\n"
+msgstr ""
+"(es gibt %N @is, die mehrfach belegte Blöcke enthalten.)\n"
+"\n"
+
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1026
+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:1039
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Kann eine Datei nicht klonen: %m\n"
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1045
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Durchgang 2: Prüfe die @dstruktur\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1050
+#, c-format
+msgid "@n @i number for '.' in @d @i %i.\n"
+msgstr "Falsche @inummer für „.“ in Verzeichnisinode %i.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+#: e2fsck/problem.c:1055
+msgid "@E has @n @i #: %Di.\n"
+msgstr "@E hat falsche @i-Nr.: %Di.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.  
+#: e2fsck/problem.c:1060
+msgid "@E has @D/unused @i %Di.  "
+msgstr "@E hat gelöschte/unbenutzt @i %Di.  "
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'  
+#: e2fsck/problem.c:1065
+msgid "@E @L to '.'  "
+msgstr "@E @L nach „.“  "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1070
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr "@E zeigt auf eine @i (%Di) in einem defekten @b.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1075
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "@E @L mit @d %P (%Di).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to the root inode.\n
+#: e2fsck/problem.c:1080
+msgid "@E @L to the @r.\n"
+msgstr "@E @L mit der @r.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1085
+msgid "@E has illegal characters in its name.\n"
+msgstr "@E hat ein unzulässiges Zeichen im Namen.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1090
+#, c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Fehlende „.“ in @d @i %i.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1095
+#, c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Fehlender Eintrag „..“ in @dinode %i.\n"
+
+#. @-expanded: First entry '%Dn' (inode=%Di) in directory inode %i (%p) should be '.'\n
+#: e2fsck/problem.c:1100
+msgid "First @e '%Dn' (@i=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr "Der erste @e „%Dn“ (@i=%Di) in @d-@i %i (%p) sollte „.“ sein\n"
+
+#. @-expanded: Second entry '%Dn' (inode=%Di) in directory inode %i should be '..'\n
+#: e2fsck/problem.c:1105
+msgid "Second @e '%Dn' (@i=%Di) in @d @i %i @s '..'\n"
+msgstr "Der zweite @e „%Dn“ (inode=%Di) in @d-@i %i sollte „..“ sein\n"
+
+#. @-expanded: i_faddr for inode %i (%Q) is %IF, should be zero.\n
+#: e2fsck/problem.c:1110
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "i_faddr @F %IF, sollte Null sein.\n"
+
+#. @-expanded: i_file_acl for inode %i (%Q) is %If, should be zero.\n
+#: e2fsck/problem.c:1115
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl @F %If, sollte Null sein.\n"
+
+#. @-expanded: i_dir_acl for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1120
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr "i_dir_acl @F %Id, sollte Null sein.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1125
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "i_frag @F %N, sollte Null sein.\n"
+
+#. @-expanded: i_fsize for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1130
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "i_fsize @F %N, @s null.\n"
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1135
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr "@i %i (%Q) hat einen ungültigen Modus (%Im).\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+#: e2fsck/problem.c:1140
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "@d-@i %i, @b %B, Offset %N: @d defekt\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1145
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "@d-@i %i, @b %B, offset %N: Dateiname zu lang\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.  
+#: e2fsck/problem.c:1150
+msgid "@d @i %i has an unallocated %B.  "
+msgstr "@d-@i %i hat einen nicht zugewiesenen %B.  "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1155
+#, c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "@d-@e „.“ in @d-@i %i ist nicht NULL-terminiert\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1160
+#, c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "@d-@e „..“ in @d-@i %i ist nicht NULL-terminiert\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1165
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "@i %i (%Q) ist ein @I zeichenorientiertes Gerät.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1170
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "@i %i (%Q) ist ein @I blockorientiertes Gerät.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1175
+msgid "@E is duplicate '.' @e.\n"
+msgstr "@E ist ein doppelter @e für „.“.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1180
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E ist ein doppelter @e für „..“.\n"
+
+#: e2fsck/problem.c:1185 e2fsck/problem.c:1485
+#, c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "Interner Fehler: kann dir_info für %i nicht finden.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has rec_len of %Dr, should be %N.\n
+#: e2fsck/problem.c:1190
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr "@E hat eine rec_len von %Dr, sollte %N sein.\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1195
+#, c-format
+msgid "@A icount structure: %m\n"
+msgstr "@A die icount-Structur: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1200
+#, c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr "Fehler beim Durchlaufen der @dblöcke: %m\n"
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1205
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Fehler beim Lesen des @dblocks %b (@i %i): %m\n"
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1210
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr "Fehler beim Schreiben von @dblock %b (@i %i): %m\n"
+
+#. @-expanded: error allocating new directory block for inode %i (%s): %m\n
+#: e2fsck/problem.c:1215
+#, c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "@A einen neuen @dblock für @i %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1220
+#, c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Fehler bei der Freigabe von @i %i: %m\n"
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1225
+#, 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:1230
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "@i %i (%Q) ist ein @I FIFO.\n"
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1235
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "@i %i (%Q) ist ein illegaler Socket.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1240
+msgid "Setting filetype for @E to %N.\n"
+msgstr "Setze den Dateitype für @E auf %N.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has an incorrect filetype (was %Dt, should be %N).\n
+#: e2fsck/problem.c:1245
+msgid "@E has an incorrect filetype (was %Dt, @s %N).\n"
+msgstr "@E hat einen falschen Dateityp (war %Dt, sollte %N sein).\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+#: e2fsck/problem.c:1250
+msgid "@E has filetype set.\n"
+msgstr "@E hat Dateityp gesetzt.\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1255
+msgid "@E has a @z name.\n"
+msgstr "@E hat einen Namen der Länge Null.\n"
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1260
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Symlink %Q (@i #%i) is invalid.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1265
+msgid "@a @b @F @n (%If).\n"
+msgstr "@a @b @F ist falsch (%If).\n"
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1270
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr "@f enthält große Dateien, aber im @S den Bitschalter LARGE_FILE nicht gesetzt.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1275
+msgid "@p @h %d: %B not referenced\n"
+msgstr "@p @h %d: %B ist nicht referenziert\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1280
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "@p @h %d: %B doppelt referenziert\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1285
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "@p @h %d: %B hat ungültigen Minimumhash\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1290
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "@p @h %d: %B hat ungültigen Maximalhash\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).  
+#: e2fsck/problem.c:1295
+msgid "@n @h %d (%q).  "
+msgstr "Ungültige @h %d (%q).  "
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1299
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "@p @h %d (%q): falsche Blocknummer %b.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: root node is invalid\n
+#: e2fsck/problem.c:1309
+#, c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "@p @h %d: Wurzelknotenist ungültig\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1314
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "@p @h %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:1319
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "@p @h %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:1324
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr "@p @h %d: %B hat eine unsortierte Hashtabelle\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid depth (%N)\n
+#: e2fsck/problem.c:1329
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "@p @h %d: %B hat eine ungültige Tiefe (%N)\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.  
+#: e2fsck/problem.c:1334
+msgid "Duplicate @E found.  "
+msgstr "Doppelter @E gefunden.  "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1339
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"@E hat keinen eindeutigen Dateinnamen.\n"
+"Benenne in %s um"
+
+#. @-expanded: Duplicate entry '%Dn' found.\n
+#. @-expanded: \tMarking %p (%i) to be rebuilt.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1344
+msgid ""
+"Duplicate @e '%Dn' found.\n"
+"\tMarking %p (%i) to be rebuilt.\n"
+"\n"
+msgstr ""
+"Doppelter @e „%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:1349
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr "i_blocks_hi @F %N, sollte Null sein.\n"
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1354
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "Unerwarteter @b in @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:1358
+msgid "@E references @i %Di in @g %g where _INODE_UNINIT is set.\n"
+msgstr "@E referenziert @i %Di in @g %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:1363
+msgid "@E references @i %Di found in @g %g's unused inodes area.\n"
+msgstr "@E verweist auf @i %Di,  die im Bereich ungenutzter Inodes von @g %g zu finden ist.\n"
+
+#. @-expanded: i_file_acl_hi for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1368
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi @F %N, sollte Null sein.\n"
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1375
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Durchgang 3: Prüfe @d-Verknüpfungen\n"
+
+#. @-expanded: root inode not allocated.  
+#: e2fsck/problem.c:1380
+msgid "@r not allocated.  "
+msgstr "@r nicht zugeordnet. "
+
+#. @-expanded: No room in lost+found directory.  
+#: e2fsck/problem.c:1385
+msgid "No room in @l @d.  "
+msgstr "Kein Platz im Verzeichnis @l.  "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1390
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "Nicht verbundene @d-@i %i (%p)\n"
+
+#. @-expanded: /lost+found not found.  
+#: e2fsck/problem.c:1395
+msgid "/@l not found.  "
+msgstr "/@l nicht gefunden.  "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1400
+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:1405
+msgid "Bad or non-existent /@l.  Cannot reconnect.\n"
+msgstr "Falsches oder fehlendes Verzeichnis /@l.  Wiederverbinden nicht möglich.\n"
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1410
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Erweitern von /@l nicht möglich: %m\n"
+
+#: e2fsck/problem.c:1415
+#, 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:1420
+#, c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Fehler während der Suche nach /@l: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1425
+#, c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@b: %m während des Versuches, @d /@l zu erzeugen.\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1430
+#, c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@i: %m während des Versuches, @d /@l zu erzeugen.\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1435
+#, c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_@b: %m während des Versuches, @d /@l zu erzeugen.\n"
+
+#. @-expanded: ext2fs_write_dir_block: %m while writing the directory block for /lost+found\n
+#: e2fsck/problem.c:1440
+#, 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 @d-@bs für /@l\n"
+
+#. @-expanded: Error while adjusting inode count on inode %i\n
+#: e2fsck/problem.c:1445
+#, c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr "Fehler während des Anpassens der @i-Anzahl auf @i %i\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1450
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"Konnte den Eigentümer von @i %i nicht reparieren: %m\n"
+"\n"
+
+#. @-expanded: Couldn't fix parent of inode %i: Couldn't find parent directory entry\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1455
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d @e\n"
+"\n"
+msgstr ""
+"Eigentümer von @i %i konnte nicht repariert werden: \n"
+"@deintrag des Eigentümers wurde nicht gefunden.\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1465
+#, 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:1470
+#, c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "Fehler beim Erzeugen des Verzeichnisses /@l (%s): %m\n"
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1475
+msgid "@r is not a @d; aborting.\n"
+msgstr "die Wurzelinode ist kein @d; Abbruch.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1480
+msgid "Cannot proceed without a @r.\n"
+msgstr "Ohne Wurzelinode ist weiteres Arbeiten nicht möglich.\n"
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1490
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l ist kein @d (ino=%i)\n"
+
+#: e2fsck/problem.c:1497
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Durchgang 3A: Optimiere Verzeichnisse\n"
+
+#: e2fsck/problem.c:1502
+#, 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:1507
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Verzeichnis %q (%d) konnte nicht optimiert werden: %m\n"
+
+#: e2fsck/problem.c:1512
+msgid "Optimizing directories: "
+msgstr "Optimiere Verzeichnisse: "
+
+#: e2fsck/problem.c:1529
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Durchgang 4: Überprüfe die Referenzzähler\n"
+
+#. @-expanded: unattached zero-length inode %i.  
+#: e2fsck/problem.c:1534
+#, c-format
+msgid "@u @z @i %i.  "
+msgstr "@ue @I %i @z.  "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1539
+#, c-format
+msgid "@u @i %i\n"
+msgstr "@ue @i %i\n"
+
+#. @-expanded: inode %i ref count is %Il, should be %N.  
+#: e2fsck/problem.c:1544
+msgid "@i %i ref count is %Il, @s %N.  "
+msgstr "Der Referenzzähler von @i %i ist %Il, @s aber %N sein.  "
+
+#. @-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:1548
+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 EIN TROTTEL (SIE) 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: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1558
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Durchgang 5: Überprüfe die zusammengefasste Gruppeninformation\n"
+
+#. @-expanded: Padding at end of inode bitmap is not set. 
+#: e2fsck/problem.c:1563
+msgid "Padding at end of @i @B is not set. "
+msgstr "Auffüllbyte am Ende von @i @B ist nicht gesetzt. "
+
+#. @-expanded: Padding at end of block bitmap is not set. 
+#: e2fsck/problem.c:1568
+msgid "Padding at end of @b @B is not set. "
+msgstr "Auffüllbyte am Ende von @b @B ist nicht gesetzt. "
+
+#. @-expanded: block bitmap differences: 
+#: e2fsck/problem.c:1573
+msgid "@b @B differences: "
+msgstr "Unterschiede in der @b-@B: "
+
+#. @-expanded: inode bitmap differences: 
+#: e2fsck/problem.c:1593
+msgid "@i @B differences: "
+msgstr "Unterschiede in der @i-@B: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1613
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Die Anzahl freier @is ist falsch für @g #%g (%i, gezählt=%j).\n"
+
+#. @-expanded: Directories count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1618
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr "Die Anzahl der Verzeichnisse ist falsch für @g #%g (%i, gezählt=%j).\n"
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:1623
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "Die Anzahl freier @is ist falsch (%i, gezählt=%j).\n"
+
+#. @-expanded: Free blocks count wrong for group #%g (%b, counted=%c).\n
+#: e2fsck/problem.c:1628
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr "Die Anzahl freier Blöcke in @g #%g ist falsch (%b, gezählt=%c).\n"
+
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+#: e2fsck/problem.c:1633
+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:1638
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr "PROGRAMMIERFEHLER: Dateisystem (#%N) @B-Endpunkte (%b, %c) passen nicht mit den berechneten @B-Endpunkten (%i, %j) überein\n"
+
+#: e2fsck/problem.c:1644
+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:1649
+#, c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr "Fehler beim hineinkopieren von @i @B: %m\n"
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:1654
+#, 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:1679
+#, c-format
+msgid "@g %g @b(s) in use but @g is marked BLOCK_UNINIT\n"
+msgstr "Blöcke von @g %g sind in Beutzung, obwohl @g als BLOCK_UNINIT markiert ist\n"
+
+#. @-expanded: group %g inode(s) in use but group is marked INODE_UNINIT\n
+#: e2fsck/problem.c:1684
+#, c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr "Die @isw der @g %g sind in Benutzung, obwohl @g als INODE_UNINIT markiert ist\n"
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:1691
+msgid "Recreate @j"
+msgstr "@j wird wiederhergestellt"
+
+#: e2fsck/problem.c:1696
+msgid "Update quota info for quota type %N"
+msgstr "Quota-Info für Typ %N wird aktualisiert"
+
+#: e2fsck/problem.c:1815
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Unbenutzter Fehlercode (0x%x)!\n"
+
+#: e2fsck/problem.c:1940 e2fsck/problem.c:1944
+msgid "IGNORED"
+msgstr "IGNORIERT"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, 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 der Inode=%d\n"
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr "beim Starten der Inodeprüfung"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "während der Inodeprüfung"
+
+#: e2fsck/super.c:188
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr "während des Aufrufs von ext2fs_block_iterate für Inode %d"
+
+#: e2fsck/super.c:211
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %d"
+msgstr "während des Aufrufs von ext2fs_adjust_ea_refcount2 für Inode %d"
+
+#: e2fsck/super.c:272
+msgid "Truncating"
+msgstr "Kürzen"
+
+#: e2fsck/super.c:273
+msgid "Clearing"
+msgstr "Bereinigen"
+
+#: e2fsck/unix.c:74
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfvtDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] device\n"
+msgstr ""
+"Aufruf: %s [-panyrcdfvtDFV] [-b Superblock] [-B Blockgröße]\n"
+"\t\t[-I Inode_Puffer_Blöcke] [-P Prozess_Inodegröße]\n"
+"\t\t[-l|-L Bad_Blocks_Datei] [-C Dateideskriptor] [-j externes_Journal]\n"
+"\t\t[-E erweiterte_Optionen] Gerät\n"
+
+#: e2fsck/unix.c:80
+#, c-format
+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        \" Ja \" auf alle Fragen annehmen\n"
+" -c        suche nach defekten Blöcken\n"
+" -f        erzwinge die Überprüfung auch wenn alles i.O. erscheint\n"
+
+#: e2fsck/unix.c:86
+#, c-format
+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"
+msgstr ""
+" -v                   sei gesprächig\n"
+" -b Superbloc         Nutze Superblockkopie\n"
+" -B Blockgröße        erzwinge Blockgröße beim Suchen vom Superblock\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"
+
+#: e2fsck/unix.c:131
+#, 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:157
+#, 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:161
+#, 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:166
+#, 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:171
+#, 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:179
+msgid "             Extent depth histogram: "
+msgstr " Histogramm der Tiefe von Erweiterungen: "
+
+#: e2fsck/unix.c:188
+#, 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:192
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u ungültiger Block\n"
+msgstr[1] "%12u ungültige Blöcke\n"
+
+#: e2fsck/unix.c:194
+#, 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:196
+#, 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:198
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u Verzeichnis\n"
+msgstr[1] "%12u Verzeichnisse\n"
+
+#: e2fsck/unix.c:200
+#, 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:203
+#, 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:205
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u Fifo\n"
+msgstr[1] "%12u Fifos\n"
+
+#: e2fsck/unix.c:207
+#, 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:210
+#, 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:212
+#, 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:216
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u Socket\n"
+msgstr[1] "%12u Sockets\n"
+
+#: e2fsck/unix.c:220
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u Datei\n"
+msgstr[1] "%12u Dateien\n"
+
+#: e2fsck/unix.c:234 misc/badblocks.c:983 misc/tune2fs.c:1970 misc/util.c:147
+#: resize/main.c:247
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "bei der Prüfung, ob %s eingehängt ist."
+
+#: e2fsck/unix.c:254
+#, c-format
+msgid "Warning!  %s is %s.\n"
+msgstr "Warnung!  %s ist %s.\n"
+
+#: e2fsck/unix.c:261
+#, c-format
+msgid "%s is %s.\n"
+msgstr "%s ist %s.\n"
+
+#: e2fsck/unix.c:264
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Fortsetzung nicht möglich, breche ab.\n"
+"\n"
+
+#: e2fsck/unix.c:266
+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:271
+msgid "Do you really want to continue"
+msgstr "Wirklich fortfahren"
+
+#: e2fsck/unix.c:273
+#, c-format
+msgid "check aborted.\n"
+msgstr "Prüfung abgebrochen.\n"
+
+#: e2fsck/unix.c:363
+msgid " contains a file system with errors"
+msgstr " enthält ein fehlerhaftes Dateisystem"
+
+#: e2fsck/unix.c:365
+msgid " was not cleanly unmounted"
+msgstr " wurde nicht ordnungsgemäß ausgehängt"
+
+#: e2fsck/unix.c:367
+msgid " primary superblock features different from backup"
+msgstr "Eigenschaften des primären Superblocks unterscheiden sich vom Backup"
+
+#: e2fsck/unix.c:371
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " wurde %u mal ohne Überprüfung eingehängt"
+
+#: e2fsck/unix.c:378
+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:384
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " wurde %u Tage ohne Überprüfung genutzt"
+
+#: e2fsck/unix.c:393
+msgid ", check forced.\n"
+msgstr ", Prüfung erzwungen.\n"
+
+#: e2fsck/unix.c:426
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: sauber, %u/%u Dateien, %llu/%llu Blöcke"
+
+#: e2fsck/unix.c:445
+msgid " (check deferred; on battery)"
+msgstr " (Prüfung nach nächstem Einhängen)"
+
+#: e2fsck/unix.c:448
+msgid " (check after next mount)"
+msgstr " (Prüfung nach nächstem Einhängen)"
+
+#: e2fsck/unix.c:450
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (Prüfung nach %ld Einhängevorgängen)"
+
+#: e2fsck/unix.c:600
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "Fehler: Kann /dev/null (%s) nicht öffnen\n"
+
+#: e2fsck/unix.c:669
+#, c-format
+msgid "Invalid EA version.\n"
+msgstr "Invalid EA version.\n"
+
+#: e2fsck/unix.c:696
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Unbekannte erweiterte Option: %s\n"
+
+#: e2fsck/unix.c:721
+#, 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:790
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Fehler bei Überprüfung des Datei-Deskriptors %d: %s\n"
+
+#: e2fsck/unix.c:794
+msgid "Invalid completion information file descriptor"
+msgstr "Ungültiger „completion information“-Datei-Deskriptor"
+
+#: e2fsck/unix.c:809
+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:830
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "Die -t Option wird von dieser e2fsck-Version nicht unterstützt.\n"
+
+#: e2fsck/unix.c:861 e2fsck/unix.c:933 misc/tune2fs.c:802 misc/tune2fs.c:1091
+#: misc/tune2fs.c:1109
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Nicht möglich „%s“ aufzulösen"
+
+#: e2fsck/unix.c:912
+msgid "The -n and -D options are incompatible."
+msgstr "Die Optionen -n und -D schliessen sich gegenseitig aus."
+
+#: e2fsck/unix.c:917
+msgid "The -n and -c options are incompatible."
+msgstr "Die Optionen -n und -c schliessen sich gegenseitig aus."
+
+#: e2fsck/unix.c:922
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Die Optionen -n und -l/-L schliessen sich gegenseitig aus."
+
+#: e2fsck/unix.c:976
+#, c-format
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr "Die -c und -l/-L Optionen dürfen nicht gleichzeitig verwendet werden.\n"
+
+#: e2fsck/unix.c:1024
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr "2FSCK_JBD_DEBUG \"%s\" ist keine Ganzzahl\n"
+
+#: e2fsck/unix.c:1033
+#, 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:1122
+#, 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 gesammte Wartezeit ist %u Sekunden.\n"
+"Bitte warten...\n"
+
+#: e2fsck/unix.c:1139 e2fsck/unix.c:1144
+msgid "while checking MMP block"
+msgstr "beim Prüfen des MMP-Blocks"
+
+#: e2fsck/unix.c:1146 misc/tune2fs.c:1903
+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, daß das Dateisystem auf keinem Knoten benutzt wird,\n"
+"starten Sie bitte:\n"
+"„tune2fs -f -E clear_mmp {device}“\n"
+
+#: e2fsck/unix.c:1196
+#, c-format
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Fehler: ext2fs-Bibliotheks-Version ist zu alt!\n"
+
+#: e2fsck/unix.c:1204
+msgid "while trying to initialize program"
+msgstr "bei der Programminitialisierung"
+
+#: e2fsck/unix.c:1227
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tBenutze %s, %s\n"
+
+#: e2fsck/unix.c:1239
+msgid "need terminal for interactive repairs"
+msgstr "Benötige ein Terminal für interaktive Reparaturen"
+
+#: e2fsck/unix.c:1292
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s versuche es mit Backup-Blöcken...\n"
+
+#: e2fsck/unix.c:1294
+msgid "Superblock invalid,"
+msgstr "Superblock ungültig"
+
+#: e2fsck/unix.c:1295
+msgid "Group descriptors look bad..."
+msgstr "Gruppen-Deskriptoren scheinen defekt zu sein..."
+
+#: e2fsck/unix.c:1305
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s beim Benutzen der Backup-Blöcke"
+
+#: e2fsck/unix.c:1309
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: es wird zum originalen Superblock zurück gekehrt\n"
+
+#: e2fsck/unix.c:1337
+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:1343
+msgid "Could this be a zero-length partition?\n"
+msgstr "Könnte es eine Partion der Länge Null sein?\n"
+
+#: e2fsck/unix.c:1346
+#, 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:1351
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Möglicherweise ist die Partition nicht vorhanden oder eine Swap-Partition?\n"
+
+#: e2fsck/unix.c:1354
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+"Ist das Dateisystem eingehängt or exklusiv von einem anderen Programm\n"
+"\n"
+"geöffnet worden?\n"
+
+#: e2fsck/unix.c:1357
+msgid "Possibly non-existent device?\n"
+msgstr "Ist das Gerät möglicherweise nicht vorhanden?\n"
+
+#: e2fsck/unix.c:1360
+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 -n Option\n"
+"um es im Nur-Lesen-Modus zu prüfen.\n"
+
+#: e2fsck/unix.c:1425
+msgid "Get a newer version of e2fsck!"
+msgstr "Neuere Version von e2fsck benötigt!"
+
+#: e2fsck/unix.c:1469
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr "während der Prüfung des ext3-Journals für %s"
+
+#: e2fsck/unix.c:1480
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr "Warnung: Überspringe Journal-Wiederherstellung, da das Dateisystem im Nur-Lesen-Modus ist.\n"
+
+#: e2fsck/unix.c:1493
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "Superblock-Flags konntan auf %s nicht gesetzt werden\n"
+
+#: e2fsck/unix.c:1499
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr "bei der Wiederherstellung des ext3-Journals von %s"
+
+#: e2fsck/unix.c:1523
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s besitzt nicht unterstützte Eigenschaft(en):"
+
+#: e2fsck/unix.c:1538
+#, c-format
+msgid "%s: warning: compression support is experimental.\n"
+msgstr "%s: Warnung: Die Kompressionsunterstützung ist experimentell.\n"
+
+#: e2fsck/unix.c:1544
+#, c-format
+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"
+
+#: e2fsck/unix.c:1596
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: %s beim Lesen des Bad-Block-Inodes\n"
+
+#: e2fsck/unix.c:1599
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Das verheißt nichts gutes, aber wir versuchen es trotzdem ..\n"
+
+#: e2fsck/unix.c:1640
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Erstelle Journal (%d Blöcke): "
+
+#: e2fsck/unix.c:1650
+msgid " Done.\n"
+msgstr " Erledigt.\n"
+
+#: e2fsck/unix.c:1651
+msgid ""
+"\n"
+"*** journal has been re-created - filesystem is now ext3 again ***\n"
+msgstr ""
+"\n"
+"*** Journal wurde wiederhergestellt - Dateisystem ist nun wieder ext3 ***\n"
+
+#: e2fsck/unix.c:1674
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Beginne e2fsck neu ...\n"
+
+#: e2fsck/unix.c:1678
+msgid "while resetting context"
+msgstr "beim Rücksetzen des Kontexts"
+
+#: e2fsck/unix.c:1685
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck abgebrochen.\n"
+
+#: e2fsck/unix.c:1690
+msgid "aborted"
+msgstr "abgebrochen"
+
+#: e2fsck/unix.c:1702 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:1706
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr "%s: ***** LINUX MUSS NEU GESTARTET WERDEN *****\n"
+
+#: e2fsck/unix.c:1714 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/unix.c:1754
+msgid "while setting block group checksum info"
+msgstr "beim Setzen der Blockgruppen-Prüfsummeninfo"
+
+#: e2fsck/util.c:189 misc/util.c:70
+msgid "yY"
+msgstr "jJ"
+
+#: e2fsck/util.c:190
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:204
+msgid "<y>"
+msgstr "<j>"
+
+#: e2fsck/util.c:206
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:208
+msgid " (y/n)"
+msgstr " (j/n)"
+
+#: e2fsck/util.c:222
+msgid "cancelled!\n"
+msgstr "abgebrochen!\n"
+
+#: e2fsck/util.c:237
+msgid "yes\n"
+msgstr "ja\n"
+
+#: e2fsck/util.c:239
+msgid "no\n"
+msgstr "nein\n"
+
+#: e2fsck/util.c:249
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? nein\n"
+"\n"
+
+#: e2fsck/util.c:253
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? ja\n"
+"\n"
+
+#: e2fsck/util.c:257
+msgid "yes"
+msgstr "ja"
+
+#: e2fsck/util.c:257
+msgid "no"
+msgstr "nein"
+
+#: e2fsck/util.c:272
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: illegal bitmap block(s) für %s"
+
+#: e2fsck/util.c:277
+msgid "reading inode and block bitmaps"
+msgstr "lese Inode und Block bitmaps"
+
+#: e2fsck/util.c:285
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "während des wiederholten Versuches, Bitmaps für %s einzulesen"
+
+#: e2fsck/util.c:297
+msgid "writing block and inode bitmaps"
+msgstr "Schreibe Block- und Inode-Bitmaps"
+
+#: e2fsck/util.c:302
+#, 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:314
+#, 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 -a oder -p Option)\n"
+
+#: e2fsck/util.c:395
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Benutzter Speicher: %luk/%luk (%luk/%luk), "
+
+#: e2fsck/util.c:399
+#, c-format
+msgid "Memory used: %lu, "
+msgstr "Benutzter Speicher: %lu, "
+
+#: e2fsck/util.c:406
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "Zeit: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:411
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "abgelaufende Zeit: %6.3f\n"
+
+#: e2fsck/util.c:446 e2fsck/util.c:460
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "beim Lesen von Inode %lu in %s"
+
+#: e2fsck/util.c:474 e2fsck/util.c:487
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "beim Schreiben von Inode %lu in %s"
+
+#: e2fsck/util.c:636
+msgid "while allocating zeroizing buffer"
+msgstr "beim reservieren eines Puffers zum Nullen"
+
+#: e2fsck/util.c:788
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr "UNERWARTETE INKONSISTENZ: das Dateisystem wird modifiziert während fsck läuft.\n"
+
+#: misc/badblocks.c:69
+msgid "done                                                 \n"
+msgstr "erledigt                                             \n"
+
+#: misc/badblocks.c:93
+#, 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"
+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_Bad_Blocks] [-p Anzahl_Durchgänge]\n"
+"        [-t Testmuster [-t Testmuster [...]]]\n"
+"        Gerät [letzter_Block [Startblock]]\n"
+
+#: misc/badblocks.c:104
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: Die Optionen -n und -w schliessen sich gegenseitig aus.\n"
+"\n"
+
+#: misc/badblocks.c:219
+#, 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:322
+msgid "Testing with random pattern: "
+msgstr "Teste mit zufälligen Mustern: "
+
+#: misc/badblocks.c:340
+msgid "Testing with pattern 0x"
+msgstr "Teste mit Muster 0x"
+
+#: misc/badblocks.c:372 misc/badblocks.c:445
+msgid "during seek"
+msgstr "beim Suchen"
+
+#: misc/badblocks.c:383
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Merkwürdiger Wert (%ld) in do_read\n"
+
+#: misc/badblocks.c:469
+msgid "during ext2fs_sync_device"
+msgstr "während ext2fs_sync_device"
+
+#: misc/badblocks.c:489 misc/badblocks.c:749
+msgid "while beginning bad block list iteration"
+msgstr "beim Beginn des „Bad Block“-Listendurchlaufs"
+
+#: misc/badblocks.c:503 misc/badblocks.c:602 misc/badblocks.c:759
+msgid "while allocating buffers"
+msgstr "beim Zuweisen von Puffern"
+
+#: misc/badblocks.c:507
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Prüfe von Block %lu bis %lu\n"
+
+#: misc/badblocks.c:512
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Suche nach defekten Blöcken im Nur-Lesen-Modus\n"
+
+#: misc/badblocks.c:521
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Suche nach defekten Blöcken (Nur-Lesen-Modus):"
+
+#: misc/badblocks.c:528 misc/badblocks.c:634 misc/badblocks.c:676
+#: misc/badblocks.c:822
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Zu viele defekte Blöcke - Test wird abgebrochen\n"
+
+#: misc/badblocks.c:609
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Suche nach defekten Blöcken (Lesen+Schreiben-Modus)\n"
+
+#: misc/badblocks.c:611 misc/badblocks.c:772
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Von Block %lu bis %lu\n"
+
+#: misc/badblocks.c:666
+msgid "Reading and comparing: "
+msgstr "Lesen und Vergleichen:"
+
+#: misc/badblocks.c:771
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr "Suche nach defekten Blöcken im zerstörungsfreien Lesen+Schreiben-Modus\n"
+
+#: misc/badblocks.c:777
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Suche nach defekten Blöcken (zerstörungsfreier Lesen+Schreiben-Modus)\n"
+
+#: misc/badblocks.c:784
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Unterbrochen, räume auf\n"
+
+#: misc/badblocks.c:867
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "beim Schreiben der Test-Daten; Block %lu"
+
+#: misc/badblocks.c:988 misc/util.c:152
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s ist eingehängt; "
+
+#: misc/badblocks.c:990
+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:995
+msgid "it's not safe to run badblocks!\n"
+msgstr "es ist zu unsicher, Badblocks zu starten!\n"
+
+#: misc/badblocks.c:1000 misc/util.c:163
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s wird offensichtlich vom System genutzt; "
+
+#: misc/badblocks.c:1003
+msgid "badblocks forced anyway.\n"
+msgstr "Badblocks wird trotzdem erzwungen. Hoffentlich ist /etc/mtab nicht korrekt.\n"
+
+#: misc/badblocks.c:1023
+#, c-format
+msgid "invalid %s - %s"
+msgstr "ungültige %s - %s"
+
+#: misc/badblocks.c:1133
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "Kann keinen Speicher für Testmuster reservieren - %s"
+
+#: misc/badblocks.c:1163
+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:1169
+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:1183
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr "Größe des Gerätes ist nicht feststellbar. Sie müssen sie manuell angeben.\n"
+
+#: misc/badblocks.c:1189
+msgid "while trying to determine device size"
+msgstr "beim Versuch, die Gerätegröße festzustellen"
+
+#: misc/badblocks.c:1194
+msgid "last block"
+msgstr "letzter Block"
+
+#: misc/badblocks.c:1200
+msgid "first block"
+msgstr "erster Block"
+
+#: misc/badblocks.c:1203
+#, c-format
+msgid "invalid starting block (%lu): must be less than %lu"
+msgstr "Ungültiger Startblock (%lu): er muss kleiner als %lu sein"
+
+#: misc/badblocks.c:1259
+msgid "while creating in-memory bad blocks list"
+msgstr "erstelle Bad-Block-Liste im Speicher"
+
+#: misc/badblocks.c:1274
+msgid "while adding to in-memory bad block list"
+msgstr "füge zur Bad-Block-Liste im Speicher hinzu"
+
+#: misc/badblocks.c:1298
+#, 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:86
+#, c-format
+msgid "Usage: %s [-RVf] [-+=AaCcDdeijsSu] [-v version] files...\n"
+msgstr "Aufruf: %s [-RVf] [-+=AaCcDdeijsSu] [-v Version] Dateien...\n"
+
+#: misc/chattr.c:155
+#, c-format
+msgid "bad version - %s\n"
+msgstr "falsche Version - %s\n"
+
+#: misc/chattr.c:202 misc/lsattr.c:116
+#, c-format
+msgid "while trying to stat %s"
+msgstr "beim Auslesen des Status von %s"
+
+#: misc/chattr.c:209
+#, c-format
+msgid "while reading flags on %s"
+msgstr "beim Lesens der Flags in %s"
+
+#: misc/chattr.c:218 misc/chattr.c:237
+#, c-format
+msgid "Clearing extent flag not supported on %s"
+msgstr ""
+"Das Zurücksetzen des Kennzeichens für „Erweiterung“ wird auf %s\n"
+"\tnicht unterstützt"
+
+#: misc/chattr.c:223 misc/chattr.c:242
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Flags von %s wie folgt gesetzt: "
+
+#: misc/chattr.c:251
+#, c-format
+msgid "while setting flags on %s"
+msgstr "beim Setzen der Flags in %s"
+
+#: misc/chattr.c:259
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Version von %s gesetzt auf %lu\n"
+
+#: misc/chattr.c:263
+#, c-format
+msgid "while setting version on %s"
+msgstr "beim Setzen der Version in %s"
+
+#: misc/chattr.c:283
+#, c-format
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Konnte Pfad-Variable in chattr_dir_proc nicht reservieren"
+
+#: misc/chattr.c:323
+msgid "= is incompatible with - and +\n"
+msgstr "= ist inkompatibel mit - und +\n"
+
+#: misc/chattr.c:331
+msgid "Must use '-v', =, - or +\n"
+msgstr "Benutze „-v“, =, - oder +\n"
+
+#: misc/dumpe2fs.c:55
+#, c-format
+msgid "Usage: %s [-bfhixV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Aufruf: %s [-bfhixV] [-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:196
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Gruppe %lu: (Blöcke "
+
+#: misc/dumpe2fs.c:204
+#, c-format
+msgid "  Checksum 0x%04x"
+msgstr " Prüfsumme 0x%04x"
+
+#: misc/dumpe2fs.c:206
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (0x%04x ERWARTET)"
+
+#: misc/dumpe2fs.c:207
+#, c-format
+msgid ", unused inodes %u\n"
+msgstr ", ungenutzte Inodes %u\n"
+
+#: misc/dumpe2fs.c:212
+#, c-format
+msgid "  %s superblock at "
+msgstr "  %s Superblock in "
+
+#: misc/dumpe2fs.c:213
+msgid "Primary"
+msgstr "Primary"
+
+#: misc/dumpe2fs.c:213
+msgid "Backup"
+msgstr "Backup"
+
+#: misc/dumpe2fs.c:217
+#, c-format
+msgid ", Group descriptors at "
+msgstr ", Gruppendeskriptoren in "
+
+#: misc/dumpe2fs.c:221
+#, c-format
+msgid ""
+"\n"
+"  Reserved GDT blocks at "
+msgstr ""
+"\n"
+"  reservierte GDT Blöcke bei "
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " Group descriptor at "
+msgstr ", Gruppendeskriptor in "
+
+#: misc/dumpe2fs.c:234
+msgid "  Block bitmap at "
+msgstr "  Block bitmap in "
+
+#: misc/dumpe2fs.c:238
+msgid ", Inode bitmap at "
+msgstr ", Inode Bitmap in "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+"  Inode table at "
+msgstr ""
+"\n"
+"  Inode-Tabelle in "
+
+#: misc/dumpe2fs.c:248
+#, 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:255
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u ungenutzte Inodes\n"
+
+#: misc/dumpe2fs.c:258
+msgid "  Free blocks: "
+msgstr "  Freie Blöcke: "
+
+#: misc/dumpe2fs.c:269
+msgid "  Free inodes: "
+msgstr "  Freie Inodes: "
+
+#: misc/dumpe2fs.c:300
+msgid "while printing bad block list"
+msgstr "beim Ausgeben der „Bad Block“-Liste"
+
+#: misc/dumpe2fs.c:306
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Bad Blocks: %u"
+
+#: misc/dumpe2fs.c:333 misc/tune2fs.c:302
+msgid "while reading journal inode"
+msgstr "beim Lesen des Journal-Inodes"
+
+#: misc/dumpe2fs.c:339
+msgid "while opening journal inode"
+msgstr "beim Lesen des Journal-Inodes"
+
+#: misc/dumpe2fs.c:345
+msgid "while reading journal super block"
+msgstr "beim Lesen des Journal-Superblocks"
+
+#: misc/dumpe2fs.c:355
+#, c-format
+msgid "Journal features:        "
+msgstr "Jounaleigenschaften:        "
+
+#: misc/dumpe2fs.c:368
+msgid "Journal size:             "
+msgstr "Journalgrösse:            "
+
+#: misc/dumpe2fs.c:379
+#, c-format
+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"
+
+#: misc/dumpe2fs.c:386
+#, c-format
+msgid "Journal errno:            %d\n"
+msgstr "Jounal-Fehlernummer:      %d\n"
+
+#: misc/dumpe2fs.c:401 misc/tune2fs.c:218
+msgid "while reading journal superblock"
+msgstr "beim Lesen des Journal-Superblocks"
+
+#: misc/dumpe2fs.c:409
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Konnte die magische Nummer des Journal-Superblocks nicht finden"
+
+#: misc/dumpe2fs.c:413
+#, c-format
+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 Anzahl Nutzer:    %u\n"
+
+#: misc/dumpe2fs.c:426
+#, c-format
+msgid "Journal users:            %s\n"
+msgstr "Jounalnutzer:            %s\n"
+
+#: misc/dumpe2fs.c:442 misc/mke2fs.c:665 misc/tune2fs.c:1128
+#, c-format
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Speicher zum Parsen der Optionen konnte nicht reserviert werden!\n"
+
+#: misc/dumpe2fs.c:468
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Ungültiger Superblock-Parameter: %s\n"
+
+#: misc/dumpe2fs.c:483
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Ungültiger Blockgrössen-Parameter: %s\n"
+
+#: misc/dumpe2fs.c:494
+#, 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 Kommatas 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össe>\n"
+"\n"
+
+#: misc/dumpe2fs.c:554 misc/mke2fs.c:1528
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tBenutze %s\n"
+
+#: misc/dumpe2fs.c:590 misc/e2image.c:1309 misc/tune2fs.c:1914
+#: resize/main.c:305
+#, c-format
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Kann keinen gültigen Dateisystem-Superblock finden.\n"
+
+#: misc/dumpe2fs.c:618
+#, c-format
+msgid ""
+"\n"
+"%s: %s: error reading bitmaps: %s\n"
+msgstr ""
+"\n"
+"%s: %s: Fehler beim Lesen von Bitmaps: %s\n"
+
+#: misc/e2image.c:87
+#, c-format
+msgid "Usage: %s [-rsIQ] device image_file\n"
+msgstr "Aufruf: %s [-rsIO] Gerätedatei Abbild-Datei\n"
+
+#: misc/e2image.c:135
+#, c-format
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Fehler: Größe des Headers übersteigt wrt_size\n"
+
+#: misc/e2image.c:141
+msgid "Couldn't allocate header buffer\n"
+msgstr "Header-Puffer konnte nicht zugewiesen werden\n"
+
+#: misc/e2image.c:171
+msgid "while writing superblock"
+msgstr "beim Schreiben des Superblocks"
+
+#: misc/e2image.c:179
+msgid "while writing inode table"
+msgstr "beim Schreiben der Inode-Tabelle"
+
+#: misc/e2image.c:186
+msgid "while writing block bitmap"
+msgstr "beim Schreiben der Block-Bitmap"
+
+#: misc/e2image.c:193
+msgid "while writing inode bitmap"
+msgstr "beim Schreiben der Inode-Bitmap"
+
+#: misc/e2image.c:1341
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "beim Versuch, das Qcow2-Image (%s) in ein rohes Image (%s) zu konvertieren"
+
+#: misc/e2label.c:58
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: Kann %s nicht öffnen.\n"
+
+#: misc/e2label.c:63
+#, c-format
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: cannot seek to superblock\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:2065
+#, c-format
+msgid "Warning: label too long, truncating.\n"
+msgstr "Warnung: Name zu lang, kürze ihn.\n"
+
+#: misc/e2label.c:100
+#, c-format
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: cannot seek to superblock again\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:794
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Aufruf: e2label Gerät [neuer_Name]\n"
+
+#: misc/e2undo.c:36
+#, c-format
+msgid "Usage: %s <transaction file> <filesystem>\n"
+msgstr "Aufruf: %s <Transaktionsdatei> <Dateisystem>\n"
+
+#: misc/e2undo.c:52
+msgid "Failed to read the file system data \n"
+msgstr "Die Dateisystemdaten konnten nicht gelesenb werden \n"
+
+#: misc/e2undo.c:62 misc/e2undo.c:83 misc/e2undo.c:108 misc/e2undo.c:206
+#, c-format
+msgid "Failed tdb_fetch %s\n"
+msgstr "tdb_fetch von %s ist misslungen\n"
+
+#: misc/e2undo.c:70
+#, c-format
+msgid "The file system Mount time didn't match %u\n"
+msgstr "Die Zeit des letzten Einhängens des Dateisystems war nicht %u\n"
+
+#: misc/e2undo.c:89
+msgid "The file system UUID didn't match \n"
+msgstr "Die UUID des Dateisystems stimmte nicht überein \n"
+
+#: misc/e2undo.c:163
+#, c-format
+msgid "Failed tdb_open %s\n"
+msgstr "tdb_open von %s ist misslungen\n"
+
+#: misc/e2undo.c:169
+#, c-format
+msgid "Error while determining whether %s is mounted.\n"
+msgstr "Fehler beim Überprüfen, ob %s eingehängt ist.\n"
+
+#: misc/e2undo.c:175
+msgid "e2undo should only be run on unmounted file system\n"
+msgstr "e2undo sollte nur auf nicht-eingehängten Dateisystemen laufen\n"
+
+#: misc/e2undo.c:184
+#, c-format
+msgid "Failed to open %s\n"
+msgstr "%s konnte nicht geöffnet werden\n"
+
+#: misc/e2undo.c:210
+#, c-format
+msgid "Replayed transaction of size %zd at location %llu\n"
+msgstr "Zurückgespielte Transaktion der Größe %zd an Position %llu\n"
+
+#: misc/e2undo.c:216
+#, c-format
+msgid "Failed write %s\n"
+msgstr "Gescheitertes Schreiben von %s\n"
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "WARNUNG: Konnte %s nicht öffnen: %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.  Ich werde dieses\n"
+"\tignorieren, aber Sie sollten ihre /etc/fstab so schnell\n"
+"\twie möglich korrigieren.\n"
+"\n"
+
+#: misc/fsck.c:478
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: nicht gefunden\n"
+
+#: misc/fsck.c:594
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: wait: kein Kindprozess mehr?!?\n"
+
+#: misc/fsck.c:616
+#, 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:622
+#, 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:661
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Beendet mit %s (exit status %d)\n"
+
+#: misc/fsck.c:721
+#, 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:742
+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:761
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Kann keinen Speicher für Dateisystemtypen reservieren.\n"
+
+#: misc/fsck.c:884
+#, c-format
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr ""
+"%s: überspringe die ungültige Zeile in /etc/fstab: bind mount mit\n"
+" Durchgangsnummer für fsck, die nicht Null ist\n"
+
+#: misc/fsck.c:911
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: kann %s nicht überprüfen: fsck.%s nicht gefunden\n"
+
+#: misc/fsck.c:967
+msgid "Checking all file systems.\n"
+msgstr "Alle Dateisysteme werden überprüft.\n"
+
+#: misc/fsck.c:1058
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--warten-- (Durchgang %d)\n"
+
+#: misc/fsck.c:1078
+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:1120
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: zu viele Geräte\n"
+
+#: misc/fsck.c:1153 misc/fsck.c:1239
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: zu viele Argumente\n"
+
+#: misc/lsattr.c:74
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr "Aufruf: %s [-RVadlv] [Dateien...]\n"
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Beim Lesen der Flags von %s"
+
+#: misc/lsattr.c:91
+#, c-format
+msgid "While reading version on %s"
+msgstr "Beim Lesen der Version von %s"
+
+#: misc/mke2fs.c:115
+#, 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]\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] [-jnqvDFKSV] device [blocks-count]\n"
+msgstr ""
+"Aufruf: %s [-c|-l Dateiname] [-b Blockgröße] [-C Clustergröße]\n"
+"\t[-i Bytes-pro-Inode] [-I Inodegrösse] [-J Journal-Optionen]\n"
+"\t[-G Größe_der_Metagruppe] [-N Anzahl_der_Inodes]\n"
+"\t[-m Reservierte-Blöcke-Prozent] [-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 fs-Revision] [-E erweiterte-Option[,...]]\n"
+"\t[-t Dateisystemtyp] [-T Verwendungs-Typ ] [-U UUID] [-jnqvFKSV]\n"
+"\tGerät [Block-Anzahl]\n"
+
+#: misc/mke2fs.c:218
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Es wird ausgeführt: %s\n"
+
+#: misc/mke2fs.c:222
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "während des Versuchs, „%s“ auszuführen"
+
+#: misc/mke2fs.c:229
+msgid "while processing list of bad blocks from program"
+msgstr "beim Auswerten der „Bad Block“-Liste vom Programm"
+
+#: misc/mke2fs.c:256
+#, 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:258
+#, 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 Ordung sein, um ein\n"
+"\tDateisystem zu erstellen.\n"
+
+#: misc/mke2fs.c:261
+msgid "Aborting....\n"
+msgstr "Abbruch...\n"
+
+#: misc/mke2fs.c:281
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Warnung: die Sicherung des Superblock bzw. Gruppendeskriptors in Block %u enthält\n"
+"\tdefekte Blöcke.\n"
+"\n"
+
+#: misc/mke2fs.c:300
+msgid "while marking bad blocks as used"
+msgstr "beim Markieren von defekten Blöcken als „belegt“"
+
+#: misc/mke2fs.c:317
+msgid "Writing inode tables: "
+msgstr "Inode-Tabellen werden geschrieben: "
+
+#: misc/mke2fs.c:339
+#, 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:353 misc/mke2fs.c:2181 misc/mke2fs.c:2435
+#, c-format
+msgid "done                            \n"
+msgstr "erledigt                        \n"
+
+#: misc/mke2fs.c:364
+msgid "while creating root dir"
+msgstr "beim Erstellen des Wurzelverzeichnisses"
+
+#: misc/mke2fs.c:371
+msgid "while reading root inode"
+msgstr "beim Lesen des Root-Inode"
+
+#: misc/mke2fs.c:385
+msgid "while setting root inode ownership"
+msgstr "beim Setzen des Root-Inode-Eigentümers"
+
+#: misc/mke2fs.c:403
+msgid "while creating /lost+found"
+msgstr "beim Erstellen von /lost+found"
+
+#: misc/mke2fs.c:410
+msgid "while looking up /lost+found"
+msgstr "beim Suchen von /lost+found"
+
+#: misc/mke2fs.c:423
+msgid "while expanding /lost+found"
+msgstr "beim Expandieren von /lost+found"
+
+#: misc/mke2fs.c:438
+msgid "while setting bad block inode"
+msgstr "beim Setzen des „Bad Block“-Inodes"
+
+#: misc/mke2fs.c:465
+#, 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:475
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Warnung: konnte Block %s nicht lesen\n"
+
+#: misc/mke2fs.c:491
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Warnung: konnte Sektor %d: %s nicht löschen\n"
+
+#: misc/mke2fs.c:507
+msgid "while initializing journal superblock"
+msgstr "beim Initialisieren des Journal-Superblocks"
+
+#: misc/mke2fs.c:515
+msgid "Zeroing journal device: "
+msgstr "Überschreibe Journal-Device mit Nullen: "
+
+#: misc/mke2fs.c:527
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "beim Überschreiben des Journal-Device mit Nullen (Block %llu, Nr. %d)"
+
+#: misc/mke2fs.c:546
+msgid "while writing journal superblock"
+msgstr "beim Schreiben des Journal-Superblocks"
+
+#: misc/mke2fs.c:561
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"Warnung: %llu Blöcke unbenutzt.\n"
+"\n"
+
+#: misc/mke2fs.c:566
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Dateisystem-Label=%s\n"
+
+#: misc/mke2fs.c:569
+#, c-format
+msgid "OS type: %s\n"
+msgstr "OS-Typ: %s\n"
+
+#: misc/mke2fs.c:571
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Blockgröße=%u (log=%u)\n"
+
+#: misc/mke2fs.c:575
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Clustergröße=%u (log=%u)\n"
+
+#: misc/mke2fs.c:579
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Fragmentgröße=%u (log=%u)\n"
+
+#: misc/mke2fs.c:581
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "Stride=%u Blöcke, Stripebreite=%u Blöcke\n"
+
+#: misc/mke2fs.c:583
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u Inodes, %llu Blöcke\n"
+
+#: misc/mke2fs.c:585
+#, 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:588
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Erster Datenblock=%u\n"
+
+#: misc/mke2fs.c:590
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Maximale Dateisystem-Blöcke=%lu\n"
+
+#: misc/mke2fs.c:594
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u Blockgruppen\n"
+
+#: misc/mke2fs.c:596
+#, c-format
+msgid "%u block group\n"
+msgstr "%u Blockgruppe\n"
+
+#: misc/mke2fs.c:599
+#, 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:602
+#, 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:604
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u Inodes pro Gruppe\n"
+
+#: misc/mke2fs.c:611
+#, c-format
+msgid "Superblock backups stored on blocks: "
+msgstr "Superblock-Sicherungskopien gespeichert in den Blöcken: "
+
+#: misc/mke2fs.c:690 misc/tune2fs.c:1156
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "Ungültiges mmp_update_interval: %s\n"
+
+#: misc/mke2fs.c:704
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Ungültiger \"stride\"-Parameter: %s\n"
+
+#: misc/mke2fs.c:719
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Ungültiger Stripebreite-Parameter: %s\n"
+
+#: misc/mke2fs.c:742
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Ungültiger \"resize\"-Parameter: %s\n"
+
+#: misc/mke2fs.c:749
+#, c-format
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr "Das Maximum der Vergrösserung muss oberhalb als der Dateisystem-Grösse liegen.\n"
+
+#: misc/mke2fs.c:773
+#, c-format
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+"Online-Grössenänderungen werden bei Revison 0 Dateisystemen nicht\n"
+"\tunterstützt\n"
+
+#: misc/mke2fs.c:811
+#, c-format
+msgid "Invalid quotatype parameter: %s\n"
+msgstr "Ungültiger Quotatyp-Parameter: %s\n"
+
+#: misc/mke2fs.c:822
+#, 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"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr OR grp>\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"
+"\terhalten welches mit Gleichheitszeichen („=“) zugewiesen wird.\n"
+"\n"
+"gültige erweiterte Optionen sind:\n"
+"\tstride=<RAID Segmentgrösse in Blöcken>\n"
+"\tstripe-width=<RAID Stride * Datenplatten in Blöcken>\n"
+"\tresize=<Obergrenze für Grössenänderung in Blöcken>\n"
+"\tlazy_itable_init=<0 für Ab-, 1 für Einschalten>\n"
+"\tlazy_journal_init=<0 für Ab-, 1 fúr Einschalten>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr ODER grp>\n"
+"\n"
+
+#: misc/mke2fs.c:842
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+"\n"
+"Warnung: RAID Stripe-Breite %u ist kein ganzzahliges Vielfaches von\n"
+"\tStride %u.\n"
+"\n"
+
+#: misc/mke2fs.c:881
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+"Syntax Fehler in der Konfigurationsdatei von mkefs (%s, Zeile %d)\n"
+"\t%s\n"
+
+#: misc/mke2fs.c:894 misc/tune2fs.c:393
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Ungültige Dateisystem-Option gesetzt: %s\n"
+
+#: misc/mke2fs.c:906 misc/tune2fs.c:345
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Ungültige Einhänge-Option gesetzt: %s\n"
+
+#: misc/mke2fs.c:1046
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+"\n"
+"Ihre mke2fs.conf Datei enhält keine Definitiion des %s Dateisystems.\n"
+
+#: misc/mke2fs.c:1050
+#, c-format
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+"Sie müssen wahrscheinlich eine aktualisierte mke2fs.conf Datei installieren.\n"
+"\n"
+
+#: misc/mke2fs.c:1054
+#, c-format
+msgid "Aborting...\n"
+msgstr "Breche ab...\n"
+
+#: misc/mke2fs.c:1094
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+"\n"
+"Warnung: Der fs_type %s ist in mke2fs.conf nicht definiert\n"
+"\n"
+
+#: misc/mke2fs.c:1252
+#, c-format
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Kann keinen Speicher für den neuen PATH reservieren\n"
+
+#: misc/mke2fs.c:1293
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "Das Profil konnte nicht erfolgreich initiiert werden (Fehler: %ld).\n"
+
+#: misc/mke2fs.c:1333
+#, c-format
+msgid "invalid block size - %s"
+msgstr "bad block Größe - %s"
+
+#: misc/mke2fs.c:1337
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr "Warnung: Blockgröße %d ist auf den meisten Systemen unbrauchbar.\n"
+
+#: misc/mke2fs.c:1353
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "unzulässige Clustergröße - %s"
+
+#: misc/mke2fs.c:1365
+msgid "Illegal number for blocks per group"
+msgstr "unzulässige Angabe für Blöcke pro Gruppe"
+
+#: misc/mke2fs.c:1370
+msgid "blocks per group must be multiple of 8"
+msgstr "Anzahl der Blöcke pro Gruppe muss ein Vielfaches von 8 sein"
+
+#: misc/mke2fs.c:1378
+msgid "Illegal number for flex_bg size"
+msgstr "Illegale Zahl für flex_bg Größe"
+
+#: misc/mke2fs.c:1384
+msgid "flex_bg size must be a power of 2"
+msgstr "flex_bg Größe muss eine Zweierpotenz sein"
+
+#: misc/mke2fs.c:1394
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "Unzulässiges Inode-Verhältnis %s (Min %d/Max %d"
+
+#: misc/mke2fs.c:1404
+#, c-format
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr "Warnung: die Option -K ist veraltet und sollte nicht mehr verwendet werden. Verwenden Sie bitte stattdessen die erweiterte Option „-E nodiscard“\n"
+
+#: misc/mke2fs.c:1418
+msgid "in malloc for bad_blocks_filename"
+msgstr "in malloc for bad_blocks_filename"
+
+#: misc/mke2fs.c:1428
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "Unzulässige \"Reservierte Blöcke\"-Prozentangabe - %s"
+
+#: misc/mke2fs.c:1446
+#, c-format
+msgid "bad revision level - %s"
+msgstr "ungültiges Intervall - %s"
+
+#: misc/mke2fs.c:1458
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "Unzulässige Inode-Größe - %s"
+
+#: misc/mke2fs.c:1478
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "ungültiges Intervall - %s"
+
+#: misc/mke2fs.c:1495
+msgid "The -t option may only be used once"
+msgstr "Die Option -t darf nur eimal angegeben werden"
+
+#: misc/mke2fs.c:1503
+msgid "The -T option may only be used once"
+msgstr "Die Option -T darf nur eimal angegeben werden"
+
+#: misc/mke2fs.c:1553 misc/mke2fs.c:2514
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "beim Versuch, das Journal-Device %s zu öffnen\n"
+
+#: misc/mke2fs.c:1559
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr "Journal-Device Blockgröße (%d) kleiner als Minimum-Blockgröße %d\n"
+
+#: misc/mke2fs.c:1565
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Verwende die Blockgrösse des Geräts: %d\n"
+
+#: misc/mke2fs.c:1576
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "ungültige Blöcke  „%s“ auf Gerät „%s“"
+
+#: misc/mke2fs.c:1586
+msgid "filesystem"
+msgstr "Dateisystem"
+
+#: misc/mke2fs.c:1599 resize/main.c:355
+msgid "while trying to determine filesystem size"
+msgstr "beim Bestimmen der Dateisystemgröße"
+
+#: misc/mke2fs.c:1605
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Konnte die Gerätegröße nicht ermitteln. Geben\n"
+"Sie die Größe des Dateisystems an\n"
+
+#: misc/mke2fs.c:1612
+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 ""
+"Zurückgegebene Gerätegröße ist gleich null. Es wurde eine ungültige\n"
+"\tPartition angegeben oder die Partitionstabelle wurde nach einem\n"
+"\tfdisk-Lauf nicht wieder eingelesen, weil eine veränderte Partition\n"
+"\tin Gebrauch und gesperrt ist. Sie könnten gezwungen sein, neu zu\n"
+"\tbooten, um die Partitionstabelle neu einzulesen.\n"
+
+#: misc/mke2fs.c:1629
+msgid "Filesystem larger than apparent device size."
+msgstr "Dateisystem ist größer als augenscheinlich das Gerät selbst."
+
+#: misc/mke2fs.c:1649
+#, c-format
+msgid "Failed to parse fs types list\n"
+msgstr "Analyse der Liste von Dateisystemen war nicht möglich\n"
+
+#: misc/mke2fs.c:1703
+#, 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 von Gerät %3$s (0x%2$llx) lässt sich bei Verwendung einer\n"
+"\tBlockgröße von %4$d nicht mit 32 Bits darstellen.\n"
+
+#: misc/mke2fs.c:1719
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "fs_types für mke2fs.conf Lösung: "
+
+#: misc/mke2fs.c:1726
+#, c-format
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+"Dateisystem-Eigenschaften werden für Dateisysteme der Revision 0 nicht\n"
+"\tunterstützt\n"
+
+#: misc/mke2fs.c:1733
+#, c-format
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+"Verteilte Superblöcke werden für Dateisysteme der Revision 0 nicht\n"
+"\tunterstützt\n"
+
+#: misc/mke2fs.c:1745
+#, c-format
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "Journale werden für Dateisysteme der Revision 0 nicht unterstützt\n"
+
+#: misc/mke2fs.c:1759
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "Unzulässige \"Reservierte Blöcke\"-Prozentangabe - %lf"
+
+#: misc/mke2fs.c:1775
+#, c-format
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"Die Eigenschaften resize_inode und meta_bg sind nicht kompatibel.\n"
+"Sie können nicht gleichzeitig aktiviert werden.\n"
+
+#: misc/mke2fs.c:1792
+msgid "while trying to determine hardware sector size"
+msgstr "beim Ermitteln der Hardware-Sektorgröße"
+
+#: misc/mke2fs.c:1798
+msgid "while trying to determine physical sector size"
+msgstr "beim Ermitteln der physischen Sektorgröße"
+
+#: misc/mke2fs.c:1831
+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:1836
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr "Warnung: die vorgegebene Blockgröße %d ist kleiner als die physische Sektorgröße %d\n"
+
+#: misc/mke2fs.c:1867
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr "Warnung: Die Geometrie für Gerät %s konnte nicht erfragt werden\n"
+
+#: misc/mke2fs.c:1870
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "Die Ausrichtung von %s ist um %lu Bytes verschoben.\n"
+
+#: misc/mke2fs.c:1872
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+"Das könnte zu sehr schlechter Leistung führen. Eine (Neu-)Partionierung\n"
+" wird empfohlen.\n"
+
+#: misc/mke2fs.c:1883
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr "%d-Byte Blöcke zu groß für das System (max %d)"
+
+#: misc/mke2fs.c:1887
+#, c-format
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr "Warnung: %d-byte Blöcke sind zu groß für das System (max %d), fahre dennoch fort\n"
+
+#: misc/mke2fs.c:1925
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+"Für Online-Grössenänderungen reservierte Blöcke werden auf Dateisystemen\n"
+"\tohne Unterstützung für Lückenkompression  nicht unterstützt"
+
+#: misc/mke2fs.c:1934
+msgid "blocks per group count out of range"
+msgstr "Anzahl der Blöcke pro Gruppe ausserhalb des gültigen Bereichs"
+
+#: misc/mke2fs.c:1949
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "Eigenschaft flex_bg wurde nicht aktiviert, daher darf flex_bg Grösse nicht angegeben werden"
+
+#: misc/mke2fs.c:1961
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "ungültige Inode-Größe %d (min %d/max %d)"
+
+#: misc/mke2fs.c:1979
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "zu viele Inodes (%llu), Inode-Verhältnis erhöhen?"
+
+#: misc/mke2fs.c:1986
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "zu viele Inodes (%llu), sie müssen weniger als 2^32 Inodes angeben"
+
+#: misc/mke2fs.c:2000
+#, 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 ""
+"Inodegröße (%u) * Anzahl_Inodes (%u) ist zu gross für ein\n"
+"\tDateisystem mit %llu Blöcken, geben Sie bitte entweder ein höheres\n"
+"\tInodeverhältnis (-i) oder eine niedrigere Anzahl an Inodes (-N) an.\n"
+
+#: misc/mke2fs.c:2119
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+"    e2undo %s %s\n"
+"\n"
+msgstr ""
+"Überschreibe das bestehende Dateisystem; dies kann rückgängig gemacht werden\n"
+"durch den Befehl:\n"
+"    e2undo %s %s\n"
+"\n"
+
+#: misc/mke2fs.c:2133
+msgid "while trying to setup undo file\n"
+msgstr "beim Erstellen der Undodatei\n"
+
+#: misc/mke2fs.c:2159
+msgid "Discarding device blocks: "
+msgstr "Blöcke des Gerätes werden verworfen: "
+
+#: misc/mke2fs.c:2176
+msgid "failed - "
+msgstr "nicht erfolgreich - "
+
+#: misc/mke2fs.c:2283
+msgid "while setting up superblock"
+msgstr "beim Erstellen des Superblocks"
+
+#: misc/mke2fs.c:2292
+#, c-format
+msgid "Discard succeeded and will return 0s  - skipping inode table wipe\n"
+msgstr "Verwerfen war erfolgreich und wird Nullen zurückliefern - das Löschen der Inode-Tabelle wird übersprungen \n"
+
+#: misc/mke2fs.c:2375
+#, c-format
+msgid "unknown os - %s"
+msgstr "unbekanntes OS - %s"
+
+#: misc/mke2fs.c:2427
+#, c-format
+msgid "Allocating group tables: "
+msgstr "Platz für Gruppentabellen wird angefordert: "
+
+#: misc/mke2fs.c:2431
+msgid "while trying to allocate filesystem tables"
+msgstr "beim Zuordnen von Dateisystemtabellen"
+
+#: misc/mke2fs.c:2440
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tbeim Konvertieren der Subcluster-Bitmap"
+
+#: misc/mke2fs.c:2483
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "beim Nullen von Block %llu am Ende des Dateisystems"
+
+#: misc/mke2fs.c:2496
+msgid "while reserving blocks for online resize"
+msgstr "beim Lesen des Bad-Block-Inodes"
+
+#: misc/mke2fs.c:2507 misc/tune2fs.c:640
+msgid "journal"
+msgstr "Journal"
+
+#: misc/mke2fs.c:2519
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Erstelle Journal auf Gerät %s: "
+
+#: misc/mke2fs.c:2526
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tbeim Erstellen des Journals auf Gerät %s"
+
+#: misc/mke2fs.c:2531 misc/mke2fs.c:2563 misc/tune2fs.c:669 misc/tune2fs.c:683
+#, c-format
+msgid "done\n"
+msgstr "erledigt\n"
+
+#: misc/mke2fs.c:2540
+#, c-format
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Die Erzeugung eines Journals wird im Nur-Super Modus übersprungen\n"
+
+#: misc/mke2fs.c:2551
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Erstelle Journal (%u Blöcke): "
+
+#: misc/mke2fs.c:2559
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tbeim Erstellen des Journals"
+
+#: misc/mke2fs.c:2570 misc/tune2fs.c:446
+#, c-format
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Fehler beim Aktivieren des Schutzes vor mehrfachem Einhängen."
+
+#: misc/mke2fs.c:2575
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr "Der Schutz vor mehrfachem Einhängen wurde mit einem Intervall von %d Sekunden aktiviert\n"
+
+#: misc/mke2fs.c:2588
+#, c-format
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Schreibe Superblöcke und Dateisystem-Accountinginformationen: "
+
+#: misc/mke2fs.c:2595
+#, c-format
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+"\n"
+"Warnung: Probleme beim Schreiben der Superblöcke."
+
+#: misc/mke2fs.c:2597
+#, c-format
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"erledigt\n"
+"\n"
+
+#: misc/mklost+found.c:50
+#, c-format
+msgid "Usage: mklost+found\n"
+msgstr "Aufruf: mklost+found\n"
+
+#: misc/partinfo.c:41
+#, 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 Partitionen jedes angegebenen Gerätes aus.\n"
+"Zum Beispiel: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:51
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Kann %s nicht öffnen: %s"
+
+#: misc/partinfo.c:57
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Geometrie von %s kann nicht ermittelt werden: %s"
+
+#: misc/partinfo.c:65
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Grösse von %s kann nicht gelesen werden: %s"
+
+#: misc/partinfo.c:71
+#, 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össe=%8lu Ende=%8d\n"
+
+#: misc/tune2fs.c:107
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr "Lassen Sie bitte e2fsck über das Dateisystem laufen.\n"
+
+#: misc/tune2fs.c:116
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-p mmp_update_interval]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]\n"
+"\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[ -I new_inode_size ] device\n"
+msgstr ""
+"Aufruf: %s [-c max-Anzahl-Einhängen] [-e Fehler-Verhalten] [-g Gruppe]\n"
+"\t[-i Intervall[d|m|w]] [-j] [-J Journal-Optionen] [-l]\n"
+"\t[-m reservierte_Blöcke_Prozent] [-o [^]Einhäng_Optionen[,...]] [-p mmp_update_intervall]\n"
+"\t[-r Anzahl_reservierte_Blöcke] [-u Benutzer] [-C Anzahl_Einhängen]\n"
+"\t[-L Volume_Label] [-M letztes_eingehängtes_Verzeichnis]\n"
+"\t[-O [^]Eigenschaft[,...]] [-E erweiterte-Option[,...]]\n"
+"\t[-T letzter_Prüfzeitpunkt] [-U UUID] [-I neue_Inodegrösse] Gerät\n"
+
+#: misc/tune2fs.c:205
+msgid "while trying to open external journal"
+msgstr "beim Öffnen des externen Journals"
+
+#: misc/tune2fs.c:210
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s ist kein Journal-Gerät.\n"
+
+#: misc/tune2fs.c:225
+msgid "Journal superblock not found!\n"
+msgstr "Journal-Superblock nicht gefunden!\n"
+
+#: misc/tune2fs.c:236
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "UUID des Dateisystems auf Journal-Gerät nicht gefunden.\n"
+
+#: misc/tune2fs.c:257
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+"Das Journal-Gerät konnte nicht gefunden werden. Es wurde NICHT entfernt\n"
+"Verwenden Sie die Option  -f, um das fehlende Journal-Gerät zu entfernen.\n"
+
+#: misc/tune2fs.c:265
+msgid "Journal removed\n"
+msgstr "Journal gelöscht\n"
+
+#: misc/tune2fs.c:309
+msgid "while reading bitmaps"
+msgstr "beim Lesen von Bitmaps"
+
+#: misc/tune2fs.c:317
+msgid "while clearing journal inode"
+msgstr "beim Bereinigen des Journal-Inodes"
+
+#: misc/tune2fs.c:328
+msgid "while writing journal inode"
+msgstr "beim Schreiben des Journal-Inodes"
+
+#: misc/tune2fs.c:363
+#, c-format
+msgid "(and reboot afterwards!)\n"
+msgstr "(und hinterher das System neu starten!)\n"
+
+#: misc/tune2fs.c:396
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Das Zurücksetzen von Dateisystem-Eigenschaft „%s“ wird nicht unterstützt.\n"
+
+#: misc/tune2fs.c:402
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Das Setzen der Dateisystem-Eigenschaft „%s“ wird nicht unterstützt.\n"
+
+#: misc/tune2fs.c:411
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Die has_jounal Eigenschaft kann nur zurückgesetzt werden, wenn das\n"
+"Dateisystem nicht oder im Nur-Lesen-Modus eingehängt ist.\n"
+
+#: misc/tune2fs.c:419
+msgid ""
+"The needs_recovery flag is set.  Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"Das needs_recovery Flag ist gesetzt. Bitte starten sie e2fsck vor\n"
+"der Zurücksetzung des has_journal Flags.\n"
+
+#: misc/tune2fs.c:438
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"Die Eigenschaft \"Schutz vor mehrfachem Einhängen\" kann nur nicht\n"
+"zurückgesetzt werden, wenn das Dateisystem nicht oder nur zum Lesen\n"
+"eingehängt ist.\n"
+
+#: misc/tune2fs.c:456
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+"Schutz vor mehrfachem Einhängen wurde aktiviert mit einem Aktualisierungs-\n"
+"intervall von %ds.\n"
+
+#: misc/tune2fs.c:465
+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 deaktiviert werden,\n"
+"wenn das Dateisystem nur lesbar ist.\n"
+
+#: misc/tune2fs.c:473
+msgid "Error while reading bitmaps\n"
+msgstr "Fehler beim Lesen der Bitmaps\n"
+
+#: misc/tune2fs.c:482
+#, 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, tatsächlich: %x\n"
+
+#: misc/tune2fs.c:487
+msgid "while reading MMP block."
+msgstr "beim Lesen des MMP-Blockes."
+
+#: misc/tune2fs.c:519
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+"Das Zurücksetzen der Kennung flex_bg würde das Dateisystem inkonsistent\n"
+"machen.\n"
+
+#: misc/tune2fs.c:530
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+"Die huge_file Eigenschaft kann nur zurückgesetzt werden, wenn das\n"
+"Dateisystem nicht oder im Nur-Lesen-Modus eingehängt ist.\n"
+
+#: misc/tune2fs.c:590
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Warnung: die Option „^quota“ hat Vorrang vor „-Q“ Optionen.\n"
+
+#: misc/tune2fs.c:635
+msgid "The filesystem already has a journal.\n"
+msgstr "Das Dateisystem hat schon ein Journal.\n"
+
+#: misc/tune2fs.c:653
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\tbeim Öffnen des Journals auf %s\n"
+
+#: misc/tune2fs.c:657
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Erstelle Journal auf Gerät %s: "
+
+#: misc/tune2fs.c:665
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "beim Hinzufügen des Dateisystems zum Journal auf %s"
+
+#: misc/tune2fs.c:671
+msgid "Creating journal inode: "
+msgstr "Erstelle Journal-Inode: "
+
+#: misc/tune2fs.c:680
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tbeim Erstellen der Journaldatei"
+
+#: misc/tune2fs.c:754
+msgid "Couldn't allocate memory to parse quota options!\n"
+msgstr "Speicher zum Parsen der Quota-Optionen konnte nicht reserviert werden!\n"
+
+#: misc/tune2fs.c:776
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Es wurden ungültige Quota-Optionen angegeben.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"Die folgenden Quotaoptionen sind verfügbar (durch Komma getrennt angeben):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:837
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Konnte Datum/Zeit nicht parsen: %s"
+
+#: misc/tune2fs.c:861 misc/tune2fs.c:874
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "Ungültiger Mounts-Zähler - %s"
+
+#: misc/tune2fs.c:890
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "ungültiges Fehler-Verhalten - %s"
+
+#: misc/tune2fs.c:917
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "ungültige(r) GID oder Gruppenname - %s"
+
+#: misc/tune2fs.c:950
+#, c-format
+msgid "bad interval - %s"
+msgstr "ungültiges Intervall - %s"
+
+#: misc/tune2fs.c:979
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "ungültiges Reservierte-Blöcke-Verhältnis - %s"
+
+#: misc/tune2fs.c:994
+msgid "-o may only be specified once"
+msgstr "-o darf nur eimal angegeben werden"
+
+#: misc/tune2fs.c:1003
+msgid "-O may only be specified once"
+msgstr "-O darf nur eimal angegeben werden"
+
+#: misc/tune2fs.c:1018
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "ungültige Anzahl von reservierten Blöcken - %s"
+
+#: misc/tune2fs.c:1047
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "ungültige(r) UID/Benutzername - %s"
+
+#: misc/tune2fs.c:1064
+#, c-format
+msgid "bad inode size - %s"
+msgstr "Unzulässige Inodegröße - %s"
+
+#: misc/tune2fs.c:1071
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Inodegrösse muss eine Zweierpotenz sein- %s"
+
+#: misc/tune2fs.c:1165
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "mmp_update_interval ist zu groß: %lu\n"
+
+#: misc/tune2fs.c:1170
+#, 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] "Setze das Intervall für den Schutz vor mehrfachem Einhängen auf %lu Sekunde\n"
+msgstr[1] "Setze das Intervall für den Schutz vor mehrfachem Einhängen auf %lu Sekunden\n"
+
+#: misc/tune2fs.c:1193
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Ungültiger RAID Stride: %s\n"
+
+#: misc/tune2fs.c:1208
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Ungültige RAID Stripe-Breite: %s\n"
+
+#: misc/tune2fs.c:1223
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Ungültiger Hashalgorithmus: %s\n"
+
+#: misc/tune2fs.c:1229
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Der standard Hashalgorithmus wird auf %s (%d) gesetzt\n"
+
+#: misc/tune2fs.c:1248
+#, c-format
+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"
+msgstr ""
+"\n"
+"Ungültige Optionen wurden angegeben.\n"
+"\n"
+"Erweiterte Optionen werden mit Kommatas getrennt angegeben und erwarten\n"
+"\teventuell ein Argument, welches mit Gleichheitszeichen („=“)\n"
+"\tzugewiesenwird.\n"
+"\n"
+"Gültige erweiterte Optionen sind:\n"
+"\tclear_mmp\n"
+"\thash_alg=<Hashalgorithmus>\n"
+"\tmount_opts=<erweiterte Standard-Einhängoptionen>\n"
+"\tstride=<RAID Segmentgrösse pro PLatte in Blöcken>\n"
+"\tstripe-width=<RAID Stride*Datenplatten in Blöcken>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+
+#: misc/tune2fs.c:1714
+msgid "Failed to read inode bitmap\n"
+msgstr "Die Inode-Bitmap konnte nicht gelesen werden\n"
+
+#: misc/tune2fs.c:1719
+msgid "Failed to read block bitmap\n"
+msgstr "Die Block-Bitmaps konnten nicht gelesen werden\n"
+
+#: misc/tune2fs.c:1736 resize/resize2fs.c:802
+msgid "blocks to be moved"
+msgstr "zu verschiebende Blöcke"
+
+#: misc/tune2fs.c:1739
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "Beim Vergrössern der Inodes konnte keine Block-Bitmap angelegt werden\n"
+
+#: misc/tune2fs.c:1745
+msgid "Not enough space to increase inode size \n"
+msgstr "Der Platz reicht nicht aus um die Inodegrösse zu erhöhen \n"
+
+#: misc/tune2fs.c:1750
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Beim Vergrössern der Inodes konnten die Blöcke nicht verschoben werden \n"
+
+#: misc/tune2fs.c:1782
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+"Fehler beim Verändern der Inodegrösse.\n"
+"Starten Sie e2undo um die Änderungen am Dateisystem rückgängig zu machen. \n"
+
+#: misc/tune2fs.c:1809
+msgid "Couldn't allocate memory for tdb filename\n"
+msgstr "Kann keinen Speicher für den tdb-Dateinamen reservieren\n"
+
+#: misc/tune2fs.c:1831
+#, c-format
+msgid "while trying to delete %s"
+msgstr "beim Versuch, %s zu löschen"
+
+#: misc/tune2fs.c:1841
+#, c-format
+msgid ""
+"To undo the tune2fs operation please run the command\n"
+"    e2undo %s %s\n"
+"\n"
+msgstr ""
+"Um die Aktionen von tune2fs rückgängig zu machen, starten Sie bitte den\n"
+"Befehl\n"
+"    e2undo %s %s\n"
+"\n"
+
+#: misc/tune2fs.c:1910
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+"Die Kennung des MMP Blockes ist ungültig. Versuchen Sie ihn durch folgendes\n"
+"Kommando zu reparieren:\n"
+"„e2fsck -f %s“\n"
+
+#: misc/tune2fs.c:1928
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Die Inodegrösse ist bereits %lu\n"
+
+#: misc/tune2fs.c:1934
+#, c-format
+msgid "Shrinking the inode size is not supported\n"
+msgstr "Das Schrumpfen der Inodegrösse wird nicht unterstützt\n"
+
+#: misc/tune2fs.c:1981
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Die maximale Anzahl von Einhängungen wird auf %d gesetzt\n"
+
+#: misc/tune2fs.c:1987
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Die derzeitige Anzahl von Einhängungen wird auf %d gesetzt\n"
+
+#: misc/tune2fs.c:1992
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Das Fehler-Verhalten wird auf %d gesetzt\n"
+
+#: misc/tune2fs.c:1997
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Die GID für reservierte Blöcke wird auf %lu gesetzt\n"
+
+#: misc/tune2fs.c:2002
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "Das Intervall zwischen den Prüfungen ist zu groß (%lu)"
+
+#: misc/tune2fs.c:2009
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Das Intervall zwischen zwei Checks wird auf %lu Sekunden gesetzt\n"
+
+#: misc/tune2fs.c:2016
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "Der Prozentsatz reservierter Böcke wird auf %g%% (%llu Blöcke) gesetzt\n"
+
+#: misc/tune2fs.c:2022
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "Die Anzahl der reservierten Blöcke ist zu gross (%llu)"
+
+#: misc/tune2fs.c:2029
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Die Anzahl der reservierten Blöcke wird auf %llu gesetzt\n"
+
+#: misc/tune2fs.c:2035
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Das Dateisystem hat bereits verteilte Superblöcke.\n"
+
+#: misc/tune2fs.c:2042
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set.  %s"
+msgstr ""
+"\n"
+"Kennzeichen für verteilten Superblock gesetzt. %s"
+
+#: misc/tune2fs.c:2047
+msgid ""
+"\n"
+"Clearing the sparse superflag not supported.\n"
+msgstr ""
+"\n"
+"Das Zurücksetzen des Kennzeichens für „verteilter Superblock“ wird nicht\n"
+"\tunterstützt.\n"
+
+#: misc/tune2fs.c:2055
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "Die Zeit des letzten Dateisystemchecks wird auf %s gesetzt\n"
+
+#: misc/tune2fs.c:2061
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Die UID für reservierte Blöcke wird auf %lu gesetzt\n"
+
+#: misc/tune2fs.c:2093
+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\n"
+"verwendet werden\n"
+
+#: misc/tune2fs.c:2111
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"Quotas können nur aktiviert bzw. deaktiviert werden, wenn das Dateisystem nicht\n"
+"eingehängt ist\n"
+
+#: misc/tune2fs.c:2144
+msgid "Invalid UUID format\n"
+msgstr "Ungültiges UUID Format\n"
+
+#: misc/tune2fs.c:2157
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"Die Grösse der Inodes kann nur geändert werden, wenn das Dateisystem\n"
+"nicht eingehängt ist.\n"
+
+#: misc/tune2fs.c:2165
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+"Das Ändern der Inodegrösse wird auf Dateisystemen mit aktivierter flex_bg\n"
+"Eigenschaft nicht unterstützt.\n"
+
+#: misc/tune2fs.c:2178
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Die Inode-Größe wird auf %lu gesetzt\n"
+
+#: misc/tune2fs.c:2181
+#, c-format
+msgid "Failed to change inode size\n"
+msgstr "Die Inode-Größe konnte nicht geändert werdeb\n"
+
+#: misc/tune2fs.c:2192
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Die Stride-Größe wird auf %d gesetzt\n"
+
+#: misc/tune2fs.c:2197
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Die Stripe-Breite wird auf %d gesetzt\n"
+
+#: misc/tune2fs.c:2204
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Als erweiterte Einhäng-Optionen werden in Zukunft „%s“ verwendet\n"
+
+#: misc/util.c:74
+msgid "Proceed anyway? (y,n) "
+msgstr "Trotzdem fortsetzen? (j,n) "
+
+#: misc/util.c:89
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr "Status für %s konnte nicht ermittelt werden --- %s\n"
+
+#: misc/util.c:92
+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 richtig angegeben?\n"
+
+#: misc/util.c:103
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s ist kein spezielles Block-Gerät.\n"
+
+#: misc/util.c:132
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr "%s ist das ganze Gerät, nicht nur eine Partition!\n"
+
+#: misc/util.c:154
+msgid "mke2fs forced anyway.  Hope /etc/mtab is incorrect.\n"
+msgstr "mke2fs trotzdem erzwungen. Hoffentlich ist /etc/mtab ungültig.\n"
+
+#: misc/util.c:159
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "werde dort kein %s erstellen!\n"
+
+#: misc/util.c:166
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs wird sowieso erzwungen.\n"
+
+#: misc/util.c:182
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Konnte keinen Speicher zur Analyse der Journal-Optionen anfordern!\n"
+
+#: misc/util.c:207
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"\n"
+"Das Journalgerät %s ist nicht auffindbar\n"
+
+#: misc/util.c:228
+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"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Ungültige Journal-Optionen wurden angegeben.\n"
+"\n"
+"Journal-Optionen werden durch Kommatas getrennt. Manche erwarten ein\n"
+"\tArgument, welches mit Gleichheitszeichen („=“) zugewiesen wird.\n"
+"\n"
+"Gültige Journal-Optionen sind:\n"
+"\tsize=<Journalgröße in Megabytes>\n"
+"\tdevice=<Journal-Gerät>\n"
+"\n"
+"Die Grösse des Journals muss zwischen 1024 und 10240000 Dateisystem-Blöcken\n"
+"\tliegen.\n"
+"\n"
+
+#: misc/util.c:258
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Das Dateisystem ist zu klein für ein Journal\n"
+
+#: misc/util.c:265
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks.  Aborting.\n"
+msgstr ""
+"\n"
+"Die angegebene Journalgröße beträgt %d Blöcke. Sie muss aber zwischen\n"
+"1024 und 10240000 Dateisystem-Blöcken liegen. Abbruch! \n"
+
+#: misc/util.c:273
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Das Journal ist zu groß für dieses Dateisystem.\n"
+
+#: misc/util.c:287
+#, 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 ""
+"Das Dateisystem wird automatisch nach jeweils %d Einhäng-Vorgängen bzw.\n"
+"alle %g Tage überprüft, je nachdem, was zuerst eintritt. Dies kann durch\n"
+"tune2fs -c oder -i geändert werden.\n"
+
+#: misc/uuidd.c:48
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr "Aufruf %s [-d] [-p Pid-Datei] [-s Socketpfad] [-T Timeout]\n"
+
+#: misc/uuidd.c:50
+#, c-format
+msgid "       %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr "       %s [-r|t] [-n Zahl] [-s Socketpfad]\n"
+
+#: misc/uuidd.c:52
+#, c-format
+msgid "       %s -k\n"
+msgstr "       %s -k\n"
+
+#: misc/uuidd.c:154
+msgid "bad arguments"
+msgstr "unzulässige Argumente"
+
+#: misc/uuidd.c:172
+msgid "connect"
+msgstr "verbinden"
+
+#: misc/uuidd.c:191
+msgid "write"
+msgstr "schreiben"
+
+#: misc/uuidd.c:199
+msgid "read count"
+msgstr "Anzhl Lesezugriffe"
+
+#: misc/uuidd.c:205
+msgid "bad response length"
+msgstr "Ungültige Antwort-Länge"
+
+#: misc/uuidd.c:270
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "Der Uuid-Daemon läuft bereits mit PID %s\n"
+
+#: misc/uuidd.c:278
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Der Unix Streamsocket konnte nicht erzeugt werden: %s"
+
+#: misc/uuidd.c:307
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Verbinden mit dem Unix-Socket %s war nicht möglich: %s\n"
+
+#: misc/uuidd.c:315
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Das Lauschen am Unix-Socket %s war nicht möglich: %s\n"
+
+#: misc/uuidd.c:353
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Fehler beim Lesen vom Klienten, Länge = %d\n"
+
+#: misc/uuidd.c:361
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "Operation %d, eingehende Zahl = %d\n"
+
+#: misc/uuidd.c:380
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "Erzeugte Zeit-UUID: %s\n"
+
+#: misc/uuidd.c:390
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "Erzeugte Zufalls-UUID: %s\n"
+
+#: misc/uuidd.c:399
+#, 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 %d weitere UUID wurden erzeugt\n"
+msgstr[1] "Zeit-UUID %s und %d weitere UUIDs wurden erzeugt\n"
+
+#: misc/uuidd.c:420
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Erzeugte %d UUIDs:\n"
+
+#: misc/uuidd.c:432
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Ungültige Operation %d\n"
+
+#: misc/uuidd.c:476 misc/uuidd.c:498
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Unzulässige Zahl: %s\n"
+
+#: misc/uuidd.c:533 misc/uuidd.c:562
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Fehler beim Aufruf des UUID-Dämons (%s): %s\n"
+
+#: misc/uuidd.c:543
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] "%s und eine weitere UUID\n"
+msgstr[1] "%s und weitere %d UUIDs\n"
+
+#: misc/uuidd.c:547
+#, c-format
+msgid "List of UUID's:\n"
+msgstr "Liste der UUIDs:\n"
+
+#: misc/uuidd.c:568
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Unerwartete Länge der Antwort von Server %d\n"
+
+#: misc/uuidd.c:585
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr "Der uuidd mit pid %d konnte nicht beendet werden: %s\n"
+
+#: misc/uuidd.c:591
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr "Der uuidd mit pid %d wurde gewaltsam beendet\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 "# Extent dump:\n"
+
+#: resize/extent.c:203
+#, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tZahl=%llu, Größe=%llu, Cursor=%llu, Sortiert=%llu\n"
+
+#: resize/main.c:43
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]\n"
+"\n"
+msgstr ""
+"Aufruf: %s [-d Debug_Optionen] [-f] [-F] [-M] [-P] [-p] Gerät [neue_Größe]\n"
+"\n"
+
+#: resize/main.c:65
+msgid "Extending the inode table"
+msgstr "Vergrößere die Inode-Tabelle"
+
+#: resize/main.c:68
+msgid "Relocating blocks"
+msgstr "Verteile die Blöcke neu"
+
+#: resize/main.c:71
+msgid "Scanning inode table"
+msgstr "Prüfe die Inode-Tabelle"
+
+#: resize/main.c:74
+msgid "Updating inode references"
+msgstr "Aktualisiere die Inode-Referenzen"
+
+#: resize/main.c:77
+msgid "Moving inode table"
+msgstr "Verschiebe die Inode-Tabelle"
+
+#: resize/main.c:80
+msgid "Unknown pass?!?"
+msgstr "Unbekannter Durchgang?!?"
+
+#: resize/main.c:83
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Start von Durchgang %d (max = %lu)\n"
+
+#: resize/main.c:259
+#, c-format
+msgid "while opening %s"
+msgstr "beim Öffnen von %s"
+
+# c-format
+#: resize/main.c:267
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "beim Ermitteln der Statusinformation für %s"
+
+#: resize/main.c:325 resize/main.c:437
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Bitte zuerst „e2fsck -f %s“ laufen lassen.\n"
+"\n"
+
+#: resize/main.c:329
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Geschätzte minimale Grösse des Dateisystems: %llu\n"
+
+#: resize/main.c:365
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Unzulässige neue Größe: %s\n"
+
+#: resize/main.c:381
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr "Die neue Größe kann nicht mehr mit 32 Bits dargestellt werden\n"
+
+#: resize/main.c:389
+#, 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:395
+msgid "Invalid stride length"
+msgstr "Ungültige Stride-Länge"
+
+#: resize/main.c:419
+#, 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 Partition (oder das Gerät) ist nur %llu (%dk) Blöcke groß.\n"
+"Sie hatten aber %llu Blöcke vorgegeben.\n"
+"\n"
+
+#: resize/main.c:426
+#, c-format
+msgid ""
+"The filesystem is already %llu blocks long.  Nothing to do!\n"
+"\n"
+msgstr ""
+"Das Dateisystem ist schon %llu Blöcke groß. Nichts zu tun!\n"
+"\n"
+
+#: resize/main.c:457
+#, c-format
+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"
+
+#: resize/main.c:463
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr ""
+"Die Grösse des Dateisystems auf %s wird auf %llu (%dk) Blöcke geändert.\n"
+"\n"
+
+#: resize/main.c:472
+#, c-format
+msgid "while trying to resize %s"
+msgstr "beim Versuch, die Größe von %s zu ändern"
+
+#: resize/main.c:475
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+"Bitte führen Sie „e2fsck -fy %s“ aus, um das Dateisystem\n"
+"nach der abgebrochenen Grössenänderung zu reparieren.\n"
+
+#: resize/main.c:481
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu blocks long.\n"
+"\n"
+msgstr ""
+"Das Dateisystem auf %s ist nun %llu Blöcke groß.\n"
+"\n"
+
+#: resize/main.c:496
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "beim Versuch, %s zu kürzen"
+
+#: resize/online.c:40
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr "Das Dateisystem auf %s ist auf %s eingehängt; Online-Grössenveränderung nötig\n"
+
+#: resize/online.c:44
+msgid "On-line shrinking not supported"
+msgstr "Die Online-Verkleinerung wird nicht unterstützt"
+
+#: resize/online.c:69
+msgid "Filesystem does not support online resizing"
+msgstr "Das Dateisystem unterstützt keine Online-Grössenveränderung"
+
+#: resize/online.c:78
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "nicht genug reservierte GDT-Blöcke für die Größenänderung"
+
+#: resize/online.c:85
+msgid "Kernel does not support resizing a file system this large"
+msgstr "Der Kernel lässt eine Veränderung der Größe eines Dateisystems diesen Ausmaßes nicht zu"
+
+#: resize/online.c:93
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "beim Versuch, Einhängpunkt %s zu öffnen"
+
+#: resize/online.c:115 resize/online.c:132
+msgid "Permission denied to resize filesystem"
+msgstr "Zugriff verweigert für die Grössenänderung des Dateisystems"
+
+#: resize/online.c:118 resize/online.c:138
+msgid "While checking for on-line resizing support"
+msgstr "Beim Überprüfen, ob Online-Vergrösserung unterstützt wird"
+
+#: resize/online.c:135
+msgid "Kernel does not support online resizing"
+msgstr "Der Kernel unterstützt die Online-Vergrösserung nicht"
+
+#: resize/online.c:168
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr "Eine Online-Grössenänderung von %s auf %llu (%dk) Blöcke wird durchgeführt.\n"
+
+#: resize/online.c:178
+msgid "While trying to extend the last group"
+msgstr "Beim Versuch, die letzte Gruppe zu erweitern"
+
+#: resize/online.c:232
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Beim Versuch, Gruppe %d hinzu zu fügen"
+
+#: resize/online.c:243
+#, c-format
+msgid "Filesystem at %s is mounted on %s, and on-line resizing is not supported on this system.\n"
+msgstr "Dateisystem auf %s ist auf %s eingehängt und Online-Grössenänderung wird auf diesem System nicht unterstützt.\n"
+
+#: resize/resize2fs.c:346
+#, c-format
+msgid "inodes (%llu) must be less than %u"
+msgstr "Die Anzahl der Indoes (%llu) muss unter %u liegen"
+
+#: resize/resize2fs.c:582
+msgid "reserved blocks"
+msgstr "reservierte Blöcke"
+
+#: resize/resize2fs.c:807
+msgid "meta-data blocks"
+msgstr "Metadaten-Blöcke"
+
+#: resize/resize2fs.c:1753
+#, c-format
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr "Das sollte niemals passieren: Die zu verändernde Inode ist defekt!\n"
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.42.6"
+msgstr "EXT2FS Bibliothek Version 1.42.6"
+
+#: lib/ext2fs/ext2_err.c:12
+msgid "Wrong magic number for ext2_filsys structure"
+msgstr "Falsche magische Zahl für ext2_filsys Struktur"
+
+#: lib/ext2fs/ext2_err.c:13
+msgid "Wrong magic number for badblocks_list structure"
+msgstr "Falsche magische Zahl für badblocks_list Struktur"
+
+#: lib/ext2fs/ext2_err.c:14
+msgid "Wrong magic number for badblocks_iterate structure"
+msgstr "Falsche magische Zahl für badblocks_iterate Struktur"
+
+#: lib/ext2fs/ext2_err.c:15
+msgid "Wrong magic number for inode_scan structure"
+msgstr "Falsche magische Zahl für inode_scan Struktur"
+
+#: lib/ext2fs/ext2_err.c:16
+msgid "Wrong magic number for io_channel structure"
+msgstr "Falsche magische Zahl für io_channel Struktur"
+
+#: lib/ext2fs/ext2_err.c:17
+msgid "Wrong magic number for unix io_channel structure"
+msgstr "Falsche magische Zahl für unix io_channel Struktur"
+
+#: lib/ext2fs/ext2_err.c:18
+msgid "Wrong magic number for io_manager structure"
+msgstr "Falsche magische Zahl für io_manager Struktur"
+
+#: lib/ext2fs/ext2_err.c:19
+msgid "Wrong magic number for block_bitmap structure"
+msgstr "Falsche magische Zahl für block_bitmap Struktur"
+
+#: lib/ext2fs/ext2_err.c:20
+msgid "Wrong magic number for inode_bitmap structure"
+msgstr "Falsche magische Zahl für inode_bitmap Struktur"
+
+#: lib/ext2fs/ext2_err.c:21
+msgid "Wrong magic number for generic_bitmap structure"
+msgstr "Falsche magische Zahl für generic_bitmap Struktur"
+
+#: lib/ext2fs/ext2_err.c:22
+msgid "Wrong magic number for test io_channel structure"
+msgstr "Falsche magische Zahl für 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 Verzeichnisblock-Liste Struktur"
+
+#: lib/ext2fs/ext2_err.c:24
+msgid "Wrong magic number for icount structure"
+msgstr "Falsche magische Zahl für icount Struktur"
+
+#: lib/ext2fs/ext2_err.c:25
+msgid "Wrong magic number for Powerquest io_channel structure"
+msgstr "Falsche magische Zahl für Powerquest io_channel Struktur"
+
+#: lib/ext2fs/ext2_err.c:26
+msgid "Wrong magic number for ext2 file structure"
+msgstr "Falsche magische Zahl für ext2 file Struktur"
+
+#: lib/ext2fs/ext2_err.c:27
+msgid "Wrong magic number for Ext2 Image Header"
+msgstr "Falsche magische Zahl für Ext2 Abbild-Vorspann"
+
+#: lib/ext2fs/ext2_err.c:28
+msgid "Wrong magic number for inode io_channel structure"
+msgstr "Falsche magische Zahl für Inode io_channel Struktur"
+
+#: lib/ext2fs/ext2_err.c:29
+msgid "Wrong magic number for ext4 extent handle"
+msgstr "Falsche magische Zahl für die ext4 Extent Handle"
+
+#: 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 Dateisystemrevision ist zu hoch"
+
+#: lib/ext2fs/ext2_err.c:32
+msgid "Attempt to write to filesystem opened read-only"
+msgstr "Es wird versucht, auf ein nur zum Lesen geöffnetes Dateisystem zu schreiben"
+
+#: lib/ext2fs/ext2_err.c:33
+msgid "Can't read group descriptors"
+msgstr "Die Gruppendeskriptoren können nicht gelesen werden"
+
+#: lib/ext2fs/ext2_err.c:34
+msgid "Can't write group descriptors"
+msgstr "Die Gruppendeskriptoren können nicht geschrieben werden"
+
+#: lib/ext2fs/ext2_err.c:35
+msgid "Corrupt group descriptor: bad block for block bitmap"
+msgstr "Beschädigter Gruppendeskriptor: nicht lesbarer Block ür die Block-Bitmap"
+
+#: lib/ext2fs/ext2_err.c:36
+msgid "Corrupt group descriptor: bad block for inode bitmap"
+msgstr "Beschädigter Gruppendeskriptor: nicht lesbarer Block ür die Inode-Bitmap"
+
+#: lib/ext2fs/ext2_err.c:37
+msgid "Corrupt group descriptor: bad block for inode table"
+msgstr "Beschädigter Gruppendeskriptor: nicht lesbarer Block ür die Inodetabelle"
+
+#: lib/ext2fs/ext2_err.c:38
+msgid "Can't write an inode bitmap"
+msgstr "Die Inode-Bitmap kann nicht geschrieben werden"
+
+#: lib/ext2fs/ext2_err.c:39
+msgid "Can't read an inode bitmap"
+msgstr "Die Inode-Bitmap kann nicht gelesen werden"
+
+#: lib/ext2fs/ext2_err.c:40
+msgid "Can't write a block bitmap"
+msgstr "Die Block-Bitmap kann nicht geschrieben werden"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read a block bitmap"
+msgstr "Die Block-Bitmap kann nicht gelesen werden"
+
+#: lib/ext2fs/ext2_err.c:42
+msgid "Can't write an inode table"
+msgstr "Eine Inodetabelle kann nicht geschrieben werden"
+
+#: lib/ext2fs/ext2_err.c:43
+msgid "Can't read an inode table"
+msgstr "Eine Inodetabelle kann 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 "EXT2 Verzeichnis beschädigt"
+
+#: lib/ext2fs/ext2_err.c:47
+msgid "Attempt to read block from filesystem resulted in short read"
+msgstr "Ein Block konnte nicht in einem Zug gelesen werden"
+
+#: lib/ext2fs/ext2_err.c:48
+msgid "Attempt to write block to filesystem resulted in short write"
+msgstr "Ein Block konnte nicht vollständig in einem Zug geschrieben werden"
+
+#: lib/ext2fs/ext2_err.c:49
+msgid "No free space in the directory"
+msgstr "Kein freier Platz im Verzeichnis vorhanden"
+
+#: 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 "Unzulässige Inodenummer"
+
+#: lib/ext2fs/ext2_err.c:53
+msgid "Illegal block number"
+msgstr "Unzulässige Blocknummer"
+
+#: 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 "Der Platz reicht nicht aus, um das gewünschte Dateisystem zu erzeugen"
+
+#: lib/ext2fs/ext2_err.c:56
+msgid "Illegal block number passed to ext2fs_mark_block_bitmap"
+msgstr "ext2fs_mark_block_bitmap wurde eine unzulässige Blocknummer übergeben"
+
+#: lib/ext2fs/ext2_err.c:57
+msgid "Illegal block number passed to ext2fs_unmark_block_bitmap"
+msgstr "ext2fs_unmark_block_bitmap wurde eine unzulässige Blocknummer übergeben"
+
+#: lib/ext2fs/ext2_err.c:58
+msgid "Illegal block number passed to ext2fs_test_block_bitmap"
+msgstr "ext2fs_test_block_bitmap wurde eine unzulässige Blocknummer übergeben"
+
+#: lib/ext2fs/ext2_err.c:59
+msgid "Illegal inode number passed to ext2fs_mark_inode_bitmap"
+msgstr "ext2fs_mark_inode_bitmap wurde eine unzulässige Blocknummer übergeben"
+
+#: lib/ext2fs/ext2_err.c:60
+msgid "Illegal inode number passed to ext2fs_unmark_inode_bitmap"
+msgstr "ext2fs_unmark_inode_bitmap wurde eine unzulässige Blocknummer übergeben"
+
+#: lib/ext2fs/ext2_err.c:61
+msgid "Illegal inode number passed to ext2fs_test_inode_bitmap"
+msgstr "ext2fs_test_inode_bitmap wurde eine unzulässige Blocknummer übergeben"
+
+#: lib/ext2fs/ext2_err.c:62
+msgid "Attempt to fudge end of block bitmap past the real end"
+msgstr "Es wurde versucht, das Ende der Blockbitmap über das echte Ende hinaus zu verschieben"
+
+#: lib/ext2fs/ext2_err.c:63
+msgid "Attempt to fudge end of inode bitmap past the real end"
+msgstr "Es wurde versucht, das Ende der Inodebitmap über das echte Ende hinaus zu verschieben"
+
+#: lib/ext2fs/ext2_err.c:64
+msgid "Illegal indirect block found"
+msgstr "Es wurde ein doppelt indirekter Block gefunden"
+
+#: lib/ext2fs/ext2_err.c:65
+msgid "Illegal doubly indirect block found"
+msgstr "Es wurden doppelt indirekte Blöcke gefunden"
+
+#: lib/ext2fs/ext2_err.c:66
+msgid "Illegal triply indirect block found"
+msgstr "Es wurde ein dreifach indirekter Block gefunden"
+
+#: lib/ext2fs/ext2_err.c:67
+msgid "Block bitmaps are not the same"
+msgstr "Die Blockbitmaps sind nicht identisch"
+
+#: lib/ext2fs/ext2_err.c:68
+msgid "Inode bitmaps are not the same"
+msgstr "Die Inodebitmaps sind nicht identisch"
+
+#: lib/ext2fs/ext2_err.c:69
+msgid "Illegal or malformed device name"
+msgstr "Unzulässiger oder deformierter Gerätename"
+
+#: lib/ext2fs/ext2_err.c:70
+msgid "A block group is missing an inode table"
+msgstr "Einer Blockgruppe fehlt eine INodetabelle"
+
+#: lib/ext2fs/ext2_err.c:71
+msgid "The ext2 superblock is corrupt"
+msgstr "Der Ext2-Superblock ist beschädigt"
+
+#: lib/ext2fs/ext2_err.c:72
+msgid "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"
+msgstr "ext2fs_mark_generic_bitmap wurde eine unzulässige generische Bitnummer übergeben"
+
+#: lib/ext2fs/ext2_err.c:73
+msgid "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"
+msgstr "ext2fs_unmark_generic_bitmap wurde eine unzulässige generische Bitnummer übergeben"
+
+#: lib/ext2fs/ext2_err.c:74
+msgid "Illegal generic bit number passed to ext2fs_test_generic_bitmap"
+msgstr "ext2fs_test_generic_bitmap wurde eine unzulässige generische Bitnummer ü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 Rückruf-Funktion wird sich um diesen Fall nicht kümmern"
+
+#: lib/ext2fs/ext2_err.c:77
+msgid "The inode is from a bad block in the inode table"
+msgstr "Der Inode kommt von einem defekten Block in der Inodetabelle"
+
+#: lib/ext2fs/ext2_err.c:78
+msgid "Filesystem has unsupported feature(s)"
+msgstr "%s 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 "E/A Kanal ist beim Suchen während des Lesens oder Schreibens gescheitert"
+
+#: lib/ext2fs/ext2_err.c:81
+msgid "Memory allocation failed"
+msgstr "Die Reservierung von Hauptspeicher ist gescheitert"
+
+#: lib/ext2fs/ext2_err.c:82
+msgid "Invalid argument passed to ext2 library"
+msgstr "Der Ext2-Bibliothek wurde ein ungültiges Argument übergeben"
+
+#: lib/ext2fs/ext2_err.c:83
+msgid "Could not allocate block in ext2 filesystem"
+msgstr "Kann keinen Block im Ext2 Dateisystem reservieren"
+
+#: lib/ext2fs/ext2_err.c:84
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "Kann keinen Inode im Ext2 Dateisystem reservieren"
+
+#: lib/ext2fs/ext2_err.c:85
+msgid "Ext2 inode is not a directory"
+msgstr "Die Ext2-Inode ist kein 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 ist nur zum Lesen geöffnet"
+
+#: lib/ext2fs/ext2_err.c:89
+msgid "Ext2 directory block not found"
+msgstr "Der Ext2-Verzeichnisblock 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 "Benutzer erbat den Abbruch"
+
+#: lib/ext2fs/ext2_err.c:93
+msgid "Ext2 file too big"
+msgstr "Ext2 Dataei zu groß"
+
+#: lib/ext2fs/ext2_err.c:94
+msgid "Supplied journal device not a block device"
+msgstr "Das angegebene Journalgerät ist kein Blockgerät"
+
+#: lib/ext2fs/ext2_err.c:95
+msgid "Journal superblock not found"
+msgstr "Der Journal-Superblock wurde nicht"
+
+#: lib/ext2fs/ext2_err.c:96
+msgid "Journal must be at least 1024 blocks"
+msgstr "Das Journal muß mindestens 1024 Blöcke umfassen"
+
+#: 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 Öffnen 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 "Verzeichnishash wird nicht unterstützt"
+
+#: lib/ext2fs/ext2_err.c:101
+msgid "Illegal extended attribute block number"
+msgstr "Unzulässige Nummer für den Block für erweiterte Attribute"
+
+#: lib/ext2fs/ext2_err.c:102
+msgid "Cannot create filesystem with requested number of inodes"
+msgstr "Ein Dateisystem mit der gewünschten Anzahl von Inodes kann nicht erzeugt werden"
+
+#: lib/ext2fs/ext2_err.c:103
+msgid "E2image snapshot not in use"
+msgstr "Der E2image-Schnappschusse wird nicht benutzt"
+
+#: lib/ext2fs/ext2_err.c:104
+msgid "Too many reserved group descriptor blocks"
+msgstr "Zu viele reservierte Gruppenbeschreibungsblöcke"
+
+#: lib/ext2fs/ext2_err.c:105
+msgid "Resize inode is corrupt"
+msgstr "Der zu modifizierende 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-Bmap mit fehlendem indirektem Block zu setzen"
+
+#: lib/ext2fs/ext2_err.c:107
+msgid "TDB: Success"
+msgstr "TDB: Erfolg"
+
+#: lib/ext2fs/ext2_err.c:108
+msgid "TDB: Corrupt database"
+msgstr "TDB: Defekte Datenbank"
+
+#: 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: Der Datensatz existiert bereits"
+
+#: lib/ext2fs/ext2_err.c:113
+msgid "TDB: Lock exists on other keys"
+msgstr "TDB: Die Sperre existiert für andere Schüssel"
+
+#: 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 istg nicht erlaubt"
+
+#: lib/ext2fs/ext2_err.c:117
+msgid "Ext2fs directory block list is empty"
+msgstr "Die Ext2fs-Verzeichnisblockliste 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, ein Blockmapping mittels nur-lesenden Blockiteratoren zu modifizieren"
+
+#: lib/ext2fs/ext2_err.c:119
+msgid "Wrong magic number for ext4 extent saved path"
+msgstr "Falsche magische Zahl für den gesicherten Pfad eine Ext4-Erweiterung"
+
+#: lib/ext2fs/ext2_err.c:120
+msgid "Wrong magic number for 64-bit generic bitmap"
+msgstr "Falsche magische Zahl für die 64-bittige generischge Bitmap"
+
+#: lib/ext2fs/ext2_err.c:121
+msgid "Wrong magic number for 64-bit block bitmap"
+msgstr "Falsche magische Zahl für eine 64-bittige Blockbitmap"
+
+#: lib/ext2fs/ext2_err.c:122
+msgid "Wrong magic number for 64-bit inode bitmap"
+msgstr "Falsche magische Zahl für eine 64-bittige Inodebitmap"
+
+#: 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 Erweiterungs-Vorspann"
+
+#: lib/ext2fs/ext2_err.c:131
+msgid "Corrupt extent index"
+msgstr "Defekter Erweiterungsindex"
+
+#: lib/ext2fs/ext2_err.c:132
+msgid "Corrupt extent"
+msgstr "Defekte Erweiterung"
+
+#: lib/ext2fs/ext2_err.c:133
+msgid "No free space in extent map"
+msgstr "Kein freier Platz mehr in der Erweiterungstabelle"
+
+#: 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 „oben“ Erweiterung"
+
+#: lib/ext2fs/ext2_err.c:138
+msgid "No 'down' extent"
+msgstr "Keine „unten“ 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 "Ext2fs-Operation wird nicht unterstützt"
+
+#: lib/ext2fs/ext2_err.c:141
+msgid "No room to insert extent in node"
+msgstr "Kein PLatz vorhanden, um die Erweiterung im Knoten einzufügen"
+
+#: lib/ext2fs/ext2_err.c:142
+msgid "Splitting would result in empty node"
+msgstr "Aufteilen würde in einem leeren Knoten enden"
+
+#: lib/ext2fs/ext2_err.c:143
+msgid "Extent not found"
+msgstr "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, die Erweiterungen beinhalten, nicht unterstützt"
+
+#: lib/ext2fs/ext2_err.c:145
+msgid "Extent length is invalid"
+msgstr "Länge der Erweiterung ist 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-bittigen Blocknummern"
+
+#: lib/ext2fs/ext2_err.c:147
+msgid "Can't check if filesystem is mounted due to missing mtab file"
+msgstr "Überprüfung ob das Dateisystem eingehängt ist mangels mtab Datei nicht möglich"
+
+#: lib/ext2fs/ext2_err.c:148
+msgid "Filesystem too large to use legacy bitmaps"
+msgstr "Das Dateisystem ist für die Verwendung von altertümlichen Bitmaps zu groß"
+
+#: lib/ext2fs/ext2_err.c:149
+msgid "MMP: invalid magic number"
+msgstr "MMP: ungültige 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
+msgid "MMP: fsck being run"
+msgstr "MMP: fsck wird ausgeführt"
+
+#: lib/ext2fs/ext2_err.c:152
+msgid "MMP: block number beyond filesystem range"
+msgstr "MMP: die Blocknummer ist jenseits des Bereichs des Dateisystems"
+
+#: lib/ext2fs/ext2_err.c:153
+msgid "MMP: undergoing an unknown operation"
+msgstr "MMP: eine unbekannte Operation wird ausgeführt"
+
+#: lib/ext2fs/ext2_err.c:154
+msgid "MMP: filesystem still in use"
+msgstr "MMP: das Dateisystem wird noch verwendet"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr "MMP: das Öffnen mit O_DIRECT ist gescheitert"
+
+#: e2fsck/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profil Versikon 0.0"
+
+#: e2fsck/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Ungültige magische Zahl in profile_node"
+
+#: e2fsck/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Die Profilsektion wurde nicht gefunden"
+
+#: e2fsck/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Der Profilbezug wurde nicht gefunden"
+
+#: e2fsck/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr "Es wird versucht, einen Bezug zu einem Knoten hinzu zu fügen, der keine Sektion ist"
+
+#: e2fsck/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Ein Profilsektion-Vorspann hat einen Wert der nicht Null ist"
+
+#: e2fsck/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "UNgültige verkettete Liste in den Profilstrukturen"
+
+#: e2fsck/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Ungültige Gruppenebene in den Profilstrukturen"
+
+#: e2fsck/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Ungültiger Zeiger auf Eltern in den Profilstrukturen"
+
+#: e2fsck/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Ungültige magische Zahl im Profil-Iterator"
+
+#: e2fsck/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Der Wert kann beim Sektionsknoten nicht gesetzt werden"
+
+#: e2fsck/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Ein ungültiges Argument wurde der Profilierungsbibliothek übergeben"
+
+#: e2fsck/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Es wird versucht, ein nur lesbares Profil zu modifizieren"
+
+#: e2fsck/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "Vorspann der Profilsektion ist nicht auf der obersten Ebene"
+
+#: e2fsck/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Syntaxfehler im Vorspann des Profilsektor"
+
+#: e2fsck/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Syntaxfehler im Profilbezug"
+
+#: e2fsck/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Überzählige schliessende Klammern im Profil"
+
+#: e2fsck/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Fehlende öffnende Klammer im Profil"
+
+#: e2fsck/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Ungültige magische Zahl in profile_t"
+
+#: e2fsck/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Ungültige magische Zahl in profile_section_t"
+
+#: e2fsck/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "Iteration über alle Sektionen der obersten Ebene wird nicht unterstützt"
+
+#: e2fsck/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Ungültiges Profilsektionsobjekt"
+
+#: e2fsck/prof_err.c:33
+msgid "No more sections"
+msgstr "Keine weiteren Sektionen vorhanden"
+
+#: e2fsck/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Eine ungültiger Satz von Namen wurde der Abfrageroutine übergeben"
+
+#: e2fsck/prof_err.c:35
+msgid "No profile file open"
+msgstr "Es ist keine Profildatei offen"
+
+#: e2fsck/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Ungültige magische Zahl in profile_file_t"
+
+#: e2fsck/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Die Profildatei konnte nicht geöffnet werden"
+
+#: e2fsck/prof_err.c:38
+msgid "Section already exists"
+msgstr "Die Sektion existiert bereits"
+
+#: e2fsck/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Ungültiger boolscher Wert"
+
+#: e2fsck/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Ungültiger Wert für eine Ganzzahl"
+
+#: e2fsck/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Ungültige magische Zahl in profile_data_t"
+
+#~ msgid "%s is mounted.  "
+#~ msgstr "%s ist eingehängt.  "
+
+#~ msgid "@g %g @b @B uninitialized but @i @B in use.\n"
+#~ msgstr "Die @b @B von @g %g ist nicht initialisiert aber @i @B wird verwendet.\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 "<The ACL index inode>"
+#~ msgstr "<Der „ACL Index“-Inode>"
+
+#~ msgid "<The ACL data inode>"
+#~ msgstr "<Der „ACL Data“-Inode>"
+
+#~ msgid "short write (only %d bytes) for writing image header"
+#~ msgstr "short write (only %d bytes) for writing image header"
+
+#~ msgid "invalid fragment size - %s"
+#~ msgstr "falsche Fragmentgröße - %s"
+
+#~ 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"
+
+#~ msgid "Journal NOT removed\n"
+#~ msgstr "Journal NICHT gelöscht\n"
diff --git a/e2fsprogs/po/e2fsprogs.pot b/e2fsprogs/po/e2fsprogs.pot
new file mode 100644
index 0000000..65f4850
--- /dev/null
+++ b/e2fsprogs/po/e2fsprogs.pot
@@ -0,0 +1,6480 @@
+# 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 by Theodore Ts'o
+# This file is distributed under the same license as the e2fsprogs package.
+# Theodore Ts'o <tytso@mit.edu>, 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).
+#.  
+#.	%b	<blk>			block number
+#.	%B	<blkcount>		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_dir_acl
+#.	%Iu	<inode> -> i_uid
+#.	%Ig	<inode> -> i_gid
+#.	%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.42.9\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2013-12-28 22:33-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:180
+#, 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:1336
+#: e2fsck/unix.c:1426 misc/badblocks.c:1226 misc/badblocks.c:1234
+#: misc/badblocks.c:1248 misc/badblocks.c:1260 misc/dumpe2fs.c:602
+#: misc/e2image.c:1384 misc/e2image.c:1567 misc/e2image.c:1586
+#: misc/mke2fs.c:196 misc/tune2fs.c:1930 resize/main.c:316
+#, 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:203
+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:131
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode.  Cleared.\n"
+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:61 e2fsck/ehandler.c:110
+msgid "Ignore error"
+msgstr ""
+
+#: e2fsck/ehandler.c:62
+msgid "Force rewrite"
+msgstr ""
+
+#: e2fsck/ehandler.c:104
+#, c-format
+msgid "Error writing block %lu (%s) while %s.  "
+msgstr ""
+
+#: e2fsck/ehandler.c:107
+#, 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 ""
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+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/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr ""
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:965
+#, c-format
+msgid "while opening %s for flushing"
+msgstr ""
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:971 resize/main.c:289
+#, 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:1278
+msgid "while opening inode scan"
+msgstr ""
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1297
+msgid "while getting next inode"
+msgstr ""
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr ""
+
+#: e2fsck/journal.c:525
+msgid "reading journal superblock\n"
+msgstr ""
+
+#: e2fsck/journal.c:582
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr ""
+
+#: e2fsck/journal.c:591
+#, c-format
+msgid "%s: journal too short\n"
+msgstr ""
+
+#: e2fsck/journal.c:883
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr ""
+
+#: e2fsck/journal.c:885
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr ""
+
+#: e2fsck/journal.c:912
+#, c-format
+msgid "while trying to re-open %s"
+msgstr ""
+
+#: e2fsck/message.c:113
+msgid "aextended attribute"
+msgstr ""
+
+#: e2fsck/message.c:114
+msgid "Aerror allocating"
+msgstr ""
+
+#: e2fsck/message.c:115
+msgid "bblock"
+msgstr ""
+
+#: e2fsck/message.c:116
+msgid "Bbitmap"
+msgstr ""
+
+#: e2fsck/message.c:117
+msgid "ccompress"
+msgstr ""
+
+#: e2fsck/message.c:118
+msgid "Cconflicts with some other fs @b"
+msgstr ""
+
+#: e2fsck/message.c:119
+msgid "iinode"
+msgstr ""
+
+#: e2fsck/message.c:120
+msgid "Iillegal"
+msgstr ""
+
+#: e2fsck/message.c:121
+msgid "jjournal"
+msgstr ""
+
+#: e2fsck/message.c:122
+msgid "Ddeleted"
+msgstr ""
+
+#: e2fsck/message.c:123
+msgid "ddirectory"
+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 "llost+found"
+msgstr ""
+
+#: e2fsck/message.c:131
+msgid "Lis a link"
+msgstr ""
+
+#: e2fsck/message.c:132
+msgid "mmultiply-claimed"
+msgstr ""
+
+#: e2fsck/message.c:133
+msgid "ninvalid"
+msgstr ""
+
+#: e2fsck/message.c:134
+msgid "oorphaned"
+msgstr ""
+
+#: e2fsck/message.c:135
+msgid "pproblem in"
+msgstr ""
+
+#: e2fsck/message.c:136
+msgid "qquota"
+msgstr ""
+
+#: e2fsck/message.c:137
+msgid "rroot @i"
+msgstr ""
+
+#: e2fsck/message.c:138
+msgid "sshould be"
+msgstr ""
+
+#: e2fsck/message.c:139
+msgid "Ssuper@b"
+msgstr ""
+
+#: e2fsck/message.c:140
+msgid "uunattached"
+msgstr ""
+
+#: e2fsck/message.c:141
+msgid "vdevice"
+msgstr ""
+
+#: e2fsck/message.c:142
+msgid "xextent"
+msgstr ""
+
+#: e2fsck/message.c:143
+msgid "zzero-length"
+msgstr ""
+
+#: e2fsck/message.c:154
+msgid "<The NULL inode>"
+msgstr ""
+
+#: e2fsck/message.c:155
+msgid "<The bad blocks inode>"
+msgstr ""
+
+#: e2fsck/message.c:157
+msgid "<The user quota inode>"
+msgstr ""
+
+#: e2fsck/message.c:158
+msgid "<The group quota inode>"
+msgstr ""
+
+#: e2fsck/message.c:159
+msgid "<The boot loader inode>"
+msgstr ""
+
+#: e2fsck/message.c:160
+msgid "<The undelete directory inode>"
+msgstr ""
+
+#: e2fsck/message.c:161
+msgid "<The group descriptor inode>"
+msgstr ""
+
+#: e2fsck/message.c:162
+msgid "<The journal inode>"
+msgstr ""
+
+#: e2fsck/message.c:163
+msgid "<Reserved inode 9>"
+msgstr ""
+
+#: e2fsck/message.c:164
+msgid "<Reserved inode 10>"
+msgstr ""
+
+#: e2fsck/message.c:333
+msgid "regular file"
+msgstr ""
+
+#: e2fsck/message.c:335
+msgid "directory"
+msgstr ""
+
+#: e2fsck/message.c:337
+msgid "character device"
+msgstr ""
+
+#: e2fsck/message.c:339
+msgid "block device"
+msgstr ""
+
+#: e2fsck/message.c:341
+msgid "named pipe"
+msgstr ""
+
+#: e2fsck/message.c:343
+msgid "symbolic link"
+msgstr ""
+
+#: e2fsck/message.c:345 misc/uuidd.c:161
+msgid "socket"
+msgstr ""
+
+#: e2fsck/message.c:347
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr ""
+
+#: e2fsck/message.c:422
+msgid "indirect block"
+msgstr ""
+
+#: e2fsck/message.c:424
+msgid "double indirect block"
+msgstr ""
+
+#: e2fsck/message.c:426
+msgid "triple indirect block"
+msgstr ""
+
+#: e2fsck/message.c:428
+msgid "translator block"
+msgstr ""
+
+#: e2fsck/message.c:430
+msgid "block #"
+msgstr ""
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr ""
+
+#: e2fsck/pass1b.c:610 e2fsck/pass1b.c:730
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr ""
+
+#: e2fsck/pass1b.c:821
+msgid "returned from clone_file_block"
+msgstr ""
+
+#: e2fsck/pass1b.c:843
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr ""
+
+#: e2fsck/pass1b.c:855
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr ""
+
+#: e2fsck/pass1.c:475 e2fsck/pass2.c:782
+msgid "reading directory block"
+msgstr ""
+
+#: e2fsck/pass1.c:598
+msgid "in-use inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:609
+msgid "directory inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:619
+msgid "regular file inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:628 misc/e2image.c:1253
+msgid "in-use block map"
+msgstr ""
+
+#: e2fsck/pass1.c:695
+msgid "opening inode scan"
+msgstr ""
+
+#: e2fsck/pass1.c:729
+msgid "getting next inode from scan"
+msgstr ""
+
+#: e2fsck/pass1.c:1239
+msgid "Pass 1"
+msgstr ""
+
+#: e2fsck/pass1.c:1296
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr ""
+
+#: e2fsck/pass1.c:1346
+msgid "bad inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:1369
+msgid "inode in bad block map"
+msgstr ""
+
+#: e2fsck/pass1.c:1389
+msgid "imagic inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:1416
+msgid "multiply claimed block map"
+msgstr ""
+
+#: e2fsck/pass1.c:1527
+msgid "ext attr block map"
+msgstr ""
+
+#: e2fsck/pass1.c:2311
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr ""
+
+#: e2fsck/pass1.c:2674
+msgid "block bitmap"
+msgstr ""
+
+#: e2fsck/pass1.c:2680
+msgid "inode bitmap"
+msgstr ""
+
+#: e2fsck/pass1.c:2686
+msgid "inode table"
+msgstr ""
+
+#: e2fsck/pass2.c:283
+msgid "Pass 2"
+msgstr ""
+
+#: e2fsck/pass2.c:805
+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:137
+msgid "Pass 3"
+msgstr ""
+
+#: e2fsck/pass3.c:323
+msgid "inode loop detection bitmap"
+msgstr ""
+
+#: e2fsck/pass4.c:196
+msgid "Pass 4"
+msgstr ""
+
+#: e2fsck/pass5.c:74
+msgid "Pass 5"
+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 ""
+
+#: 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 ""
+
+#: e2fsck/problem.c:107
+#. @-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:111
+#. @-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:116
+#. @-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:122
+#, c-format
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a correct ext2\n
+#. @-expanded: filesystem.  If the device is valid and it really contains an ext2\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 %S <device>\n
+#. @-expanded: \n
+msgid ""
+"\n"
+"The @S could not be read or does not describe a correct ext2\n"
+"@f.  If the @v is valid and it really contains an ext2\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 %S <@v>\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:131
+#. @-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:138
+#. @-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:145
+#. @-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:150
+#. @-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:155
+#. @-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:160
+#, 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:169
+#. @-expanded: Corruption found in superblock.  (%s = %N).\n
+msgid "Corruption found in @S.  (%s = %N).\n"
+msgstr ""
+
+#: e2fsck/problem.c:174
+#, 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:179
+#. @-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:183
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr ""
+
+#: e2fsck/problem.c:188
+#, c-format
+#. @-expanded: superblock has an invalid journal (inode %i).\n
+msgid "@S has an @n @j (@i %i).\n"
+msgstr ""
+
+#: e2fsck/problem.c:193
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr ""
+
+#: e2fsck/problem.c:198
+#. @-expanded: Can't find external journal\n
+msgid "Can't find external @j\n"
+msgstr ""
+
+#: e2fsck/problem.c:203
+#. @-expanded: External journal has bad superblock\n
+msgid "External @j has bad @S\n"
+msgstr ""
+
+#: e2fsck/problem.c:208
+#. @-expanded: External journal does not support this filesystem\n
+msgid "External @j does not support this @f\n"
+msgstr ""
+
+#: e2fsck/problem.c:213
+#. @-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:221
+#. @-expanded: journal superblock is corrupt.\n
+msgid "@j @S is corrupt.\n"
+msgstr ""
+
+#: e2fsck/problem.c:226
+#, c-format
+#. @-expanded: superblock has_journal flag is clear, but a journal %s is present.\n
+msgid "@S has_@j flag is clear, but a @j %s is present.\n"
+msgstr ""
+
+#: e2fsck/problem.c:231
+#. @-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:236
+#. @-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:241
+#. @-expanded: Clear journal
+msgid "Clear @j"
+msgstr ""
+
+#: e2fsck/problem.c:246 e2fsck/problem.c:700
+#. @-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:251
+#. @-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:256
+#. @-expanded: illegal %B (%b) found in orphaned inode %i.\n
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:261
+#. @-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:266
+#, c-format
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+msgid "@I @o @i %i in @S.\n"
+msgstr ""
+
+#: e2fsck/problem.c:271
+#, c-format
+#. @-expanded: illegal inode %i in orphaned inode list.\n
+msgid "@I @i %i in @o @i list.\n"
+msgstr ""
+
+#: e2fsck/problem.c:276
+#. @-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:281
+#. @-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:286
+#. @-expanded: journal version not supported by this e2fsck.\n
+msgid "@j version not supported by this e2fsck.\n"
+msgstr ""
+
+#: e2fsck/problem.c:291
+#, 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:296
+#, c-format
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:301
+#. @-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:307
+#. @-expanded: Run journal anyway
+msgid "Run @j anyway"
+msgstr ""
+
+#: e2fsck/problem.c:312
+#. @-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:317
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+msgid ""
+"Backing up @j @i @b information.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:322
+#. @-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:328
+#. @-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:333
+#. @-expanded: Resize inode not valid.  
+msgid "Resize @i not valid.  "
+msgstr ""
+
+#: e2fsck/problem.c:338
+#. @-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:343
+#. @-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:347
+#, c-format
+#. @-expanded: superblock hint for external superblock should be %X.  
+msgid "@S hint for external superblock @s %X.  "
+msgstr ""
+
+#: e2fsck/problem.c:352
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:357
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.  
+msgid "@g descriptor %g checksum is %04x, should be %04y.  "
+msgstr ""
+
+#: e2fsck/problem.c:362
+#, 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:367
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.  
+msgid "@g descriptor %g has invalid unused inodes count %b.  "
+msgstr ""
+
+#: e2fsck/problem.c:372
+#. @-expanded: Last group block bitmap uninitialized.  
+msgid "Last @g @b @B uninitialized.  "
+msgstr ""
+
+#: e2fsck/problem.c:377
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr ""
+
+#: e2fsck/problem.c:381
+msgid "The test_fs flag is set (and ext4 is available).  "
+msgstr ""
+
+#: e2fsck/problem.c:386
+#. @-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)  
+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)  "
+msgstr ""
+
+#: e2fsck/problem.c:392
+#. @-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).  
+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).  "
+msgstr ""
+
+#: e2fsck/problem.c:398
+#. @-expanded: One or more block group descriptor checksums are invalid.  
+msgid "One or more @b @g descriptor checksums are invalid.  "
+msgstr ""
+
+#: e2fsck/problem.c:403
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr ""
+
+#: e2fsck/problem.c:408
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr ""
+
+#: e2fsck/problem.c:413
+#. @-expanded: Making quota inode %i (%Q) hidden.\n
+msgid "Making @q @i %i (%Q) hidden.\n"
+msgstr ""
+
+#: e2fsck/problem.c:418
+#. @-expanded: superblock has invalid MMP block.  
+msgid "@S has invalid MMP block.  "
+msgstr ""
+
+#: e2fsck/problem.c:423
+#. @-expanded: superblock has invalid MMP magic.  
+msgid "@S has invalid MMP magic.  "
+msgstr ""
+
+#: e2fsck/problem.c:428
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:433
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:438
+#. @-expanded: superblock 64bit filesystems needs extents to access the whole disk.  
+msgid "@S 64bit filesystems needs extents to access the whole disk.  "
+msgstr ""
+
+#: e2fsck/problem.c:445
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr ""
+
+#: e2fsck/problem.c:449
+#. @-expanded: root inode is not a directory.  
+msgid "@r is not a @d.  "
+msgstr ""
+
+#: e2fsck/problem.c:454
+#. @-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:459
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.  
+msgid "Reserved @i %i (%Q) has @n mode.  "
+msgstr ""
+
+#: e2fsck/problem.c:464
+#, c-format
+#. @-expanded: deleted inode %i has zero dtime.  
+msgid "@D @i %i has zero dtime.  "
+msgstr ""
+
+#: e2fsck/problem.c:469
+#, 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:474
+#, c-format
+#. @-expanded: inode %i is a zero-length directory.  
+msgid "@i %i is a @z @d.  "
+msgstr ""
+
+#: e2fsck/problem.c:479
+#. @-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:484
+#. @-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:489
+#. @-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:494
+#. @-expanded: group %g's block bitmap (%b) is bad.  
+msgid "@g %g's @b @B (%b) is bad.  "
+msgstr ""
+
+#: e2fsck/problem.c:499
+#. @-expanded: group %g's inode bitmap (%b) is bad.  
+msgid "@g %g's @i @B (%b) is bad.  "
+msgstr ""
+
+#: e2fsck/problem.c:504
+#. @-expanded: inode %i, i_size is %Is, should be %N.  
+msgid "@i %i, i_size is %Is, @s %N.  "
+msgstr ""
+
+#: e2fsck/problem.c:509
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.  
+msgid "@i %i, i_@bs is %Ib, @s %N.  "
+msgstr ""
+
+#: e2fsck/problem.c:514
+#. @-expanded: illegal %B (%b) in inode %i.  
+msgid "@I %B (%b) in @i %i.  "
+msgstr ""
+
+#: e2fsck/problem.c:519
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.  
+msgid "%B (%b) overlaps @f metadata in @i %i.  "
+msgstr ""
+
+#: e2fsck/problem.c:524
+#, c-format
+#. @-expanded: inode %i has illegal block(s).  
+msgid "@i %i has illegal @b(s).  "
+msgstr ""
+
+#: e2fsck/problem.c:529
+#, c-format
+#. @-expanded: Too many illegal blocks in inode %i.\n
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:534
+#. @-expanded: illegal %B (%b) in bad block inode.  
+msgid "@I %B (%b) in bad @b @i.  "
+msgstr ""
+
+#: e2fsck/problem.c:539
+#. @-expanded: Bad block inode has illegal block(s).  
+msgid "Bad @b @i has illegal @b(s).  "
+msgstr ""
+
+#: e2fsck/problem.c:544
+#. @-expanded: Duplicate or bad block in use!\n
+msgid "Duplicate or bad @b in use!\n"
+msgstr ""
+
+#: e2fsck/problem.c:549
+#. @-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:554
+#. @-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:561
+#. @-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:566
+#. @-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:572
+#. @-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:577
+#. @-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:583
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr ""
+
+#: e2fsck/problem.c:588
+#. @-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:594
+#. @-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:600
+#. @-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:605
+#, c-format
+#. @-expanded: error allocating block buffer for relocating %s\n
+msgid "@A @b buffer for relocating %s\n"
+msgstr ""
+
+#: e2fsck/problem.c:610
+#. @-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:615
+#, c-format
+#. @-expanded: Relocating group %g's %s to %c...\n
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr ""
+
+#: e2fsck/problem.c:620
+#. @-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:625
+#. @-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:630 e2fsck/problem.c:1479
+#. @-expanded: error allocating inode bitmap (%N): %m\n
+msgid "@A @i @B (%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:635
+#. @-expanded: error allocating block bitmap (%N): %m\n
+msgid "@A @b @B (%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:640
+#, c-format
+#. @-expanded: error allocating icount link information: %m\n
+msgid "@A icount link information: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:645
+#, c-format
+#. @-expanded: error allocating directory block array: %m\n
+msgid "@A @d @b array: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:650
+#, c-format
+#. @-expanded: Error while scanning inodes (%i): %m\n
+msgid "Error while scanning @is (%i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:655
+#, 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:660
+#. @-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:665
+#. @-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:671
+#, c-format
+#. @-expanded: Error reading inode %i: %m\n
+msgid "Error reading @i %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:679
+#, c-format
+#. @-expanded: inode %i has imagic flag set.  
+msgid "@i %i has imagic flag set.  "
+msgstr ""
+
+#: e2fsck/problem.c:684
+#, 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:690
+#, c-format
+#. @-expanded: inode %i has compression flag set on filesystem without compression support.  
+msgid "@i %i has @cion flag set on @f without @cion support.  "
+msgstr ""
+
+#: e2fsck/problem.c:695
+#, 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:705
+#. @-expanded: journal inode is not in use, but contains data.  
+msgid "@j @i is not in use, but contains data.  "
+msgstr ""
+
+#: e2fsck/problem.c:710
+#. @-expanded: journal is not regular file.  
+msgid "@j is not regular file.  "
+msgstr ""
+
+#: e2fsck/problem.c:715
+#, 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:721
+#. @-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:726
+#. @-expanded: error allocating refcount structure (%N): %m\n
+msgid "@A refcount structure (%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:731
+#. @-expanded: Error reading extended attribute block %b for inode %i.  
+msgid "Error reading @a @b %b for @i %i.  "
+msgstr ""
+
+#: e2fsck/problem.c:736
+#. @-expanded: inode %i has a bad extended attribute block %b.  
+msgid "@i %i has a bad @a @b %b.  "
+msgstr ""
+
+#: e2fsck/problem.c:741
+#. @-expanded: Error reading extended attribute block %b (%m).  
+msgid "Error reading @a @b %b (%m).  "
+msgstr ""
+
+#: e2fsck/problem.c:746
+#. @-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:751
+#. @-expanded: Error writing extended attribute block %b (%m).  
+msgid "Error writing @a @b %b (%m).  "
+msgstr ""
+
+#: e2fsck/problem.c:756
+#. @-expanded: extended attribute block %b has h_blocks > 1.  
+msgid "@a @b %b has h_@bs > 1.  "
+msgstr ""
+
+#: e2fsck/problem.c:761
+#. @-expanded: error allocating extended attribute block %b.  
+msgid "@A @a @b %b.  "
+msgstr ""
+
+#: e2fsck/problem.c:766
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).  
+msgid "@a @b %b is corrupt (allocation collision).  "
+msgstr ""
+
+#: e2fsck/problem.c:771
+#. @-expanded: extended attribute block %b is corrupt (invalid name).  
+msgid "@a @b %b is corrupt (@n name).  "
+msgstr ""
+
+#: e2fsck/problem.c:776
+#. @-expanded: extended attribute block %b is corrupt (invalid value).  
+msgid "@a @b %b is corrupt (@n value).  "
+msgstr ""
+
+#: e2fsck/problem.c:781
+#, c-format
+#. @-expanded: inode %i is too big.  
+msgid "@i %i is too big.  "
+msgstr ""
+
+#: e2fsck/problem.c:785
+#. @-expanded: %B (%b) causes directory to be too big.  
+msgid "%B (%b) causes @d to be too big.  "
+msgstr ""
+
+#: e2fsck/problem.c:790
+msgid "%B (%b) causes file to be too big.  "
+msgstr ""
+
+#: e2fsck/problem.c:795
+msgid "%B (%b) causes symlink to be too big.  "
+msgstr ""
+
+#: e2fsck/problem.c:800
+#, 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:805
+#, 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:810
+#, 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:815
+#. @-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:820
+#, 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:825
+#. @-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:830
+#. @-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:836
+#, c-format
+#. @-expanded: Resize inode (re)creation failed: %m.
+msgid "Resize @i (re)creation failed: %m."
+msgstr ""
+
+#: e2fsck/problem.c:841
+#. @-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:846
+#. @-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:851
+#. @-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:856
+#. @-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:861
+#. @-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:866
+#. @-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:871
+#. @-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:876
+#, 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:881
+#. @-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:887
+#. @-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:892
+#. @-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:897
+#, 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:902
+#, 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:907
+#, 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:912
+#, c-format
+msgid "Fast symlink %i has EXTENT_FL set.  "
+msgstr ""
+
+#: e2fsck/problem.c:917
+#. @-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:921
+#. @-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:926
+#, c-format
+#. @-expanded: Error converting subcluster block bitmap: %m\n
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:931
+#. @-expanded: quota inode is not regular file.  
+msgid "@q @i is not regular file.  "
+msgstr ""
+
+#: e2fsck/problem.c:936
+#. @-expanded: quota inode is not in use, but contains data.  
+msgid "@q @i is not in use, but contains data.  "
+msgstr ""
+
+#: e2fsck/problem.c:941
+#. @-expanded: quota inode is visible to the user.  
+msgid "@q @i is visible to the user.  "
+msgstr ""
+
+#: e2fsck/problem.c:946
+#. @-expanded: The bad block inode looks invalid.  
+msgid "The bad @b @i looks @n.  "
+msgstr ""
+
+#: e2fsck/problem.c:951
+#. @-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:958
+#. @-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:964
+#. @-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:972
+#. @-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:978
+#, c-format
+#. @-expanded: multiply-claimed block(s) in inode %i:
+msgid "@m @b(s) in @i %i:"
+msgstr ""
+
+#: e2fsck/problem.c:993
+#, c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:998
+#, 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:1003
+#, 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:1008 e2fsck/problem.c:1323
+#. @-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:1013
+#. @-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:1019
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr ""
+
+#: e2fsck/problem.c:1024
+#. @-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:1030
+#. @-expanded: \t%Q (inode #%i, mod time %IM)\n
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1035
+#. @-expanded: \t<filesystem metadata>\n
+msgid "\t<@f metadata>\n"
+msgstr ""
+
+#: e2fsck/problem.c:1040
+#. @-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:1045
+#. @-expanded: multiply-claimed blocks already reassigned or cloned.\n
+#. @-expanded: \n
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1058
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1064
+#. @-expanded: Pass 2: Checking directory structure\n
+msgid "Pass 2: Checking @d structure\n"
+msgstr ""
+
+#: e2fsck/problem.c:1069
+#, 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:1074
+#. @-expanded: entry '%Dn' in %p (%i) has invalid inode #: %Di.\n
+msgid "@E has @n @i #: %Di.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1079
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.  
+msgid "@E has @D/unused @i %Di.  "
+msgstr ""
+
+#: e2fsck/problem.c:1084
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'  
+msgid "@E @L to '.'  "
+msgstr ""
+
+#: e2fsck/problem.c:1089
+#. @-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:1094
+#. @-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:1099
+#. @-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:1104
+#. @-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:1109
+#, c-format
+#. @-expanded: Missing '.' in directory inode %i.\n
+msgid "Missing '.' in @d @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1114
+#, c-format
+#. @-expanded: Missing '..' in directory inode %i.\n
+msgid "Missing '..' in @d @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1119
+#. @-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:1124
+#. @-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:1129
+#. @-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:1134
+#. @-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:1139
+#. @-expanded: i_dir_acl for inode %i (%Q) is %Id, should be zero.\n
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1144
+#. @-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:1149
+#. @-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:1154
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+msgid "@i %i (%Q) has @n mode (%Im).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1159
+#. @-expanded: directory inode %i, %B, offset %N: directory corrupted\n
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr ""
+
+#: e2fsck/problem.c:1164
+#. @-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:1169
+#. @-expanded: directory inode %i has an unallocated %B.  
+msgid "@d @i %i has an unallocated %B.  "
+msgstr ""
+
+#: e2fsck/problem.c:1174
+#, 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:1179
+#, 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:1184
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1189
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1194
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+msgid "@E is duplicate '.' @e.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1199
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+msgid "@E is duplicate '..' @e.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1204 e2fsck/problem.c:1504
+#, c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1209
+#. @-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:1214
+#, c-format
+#. @-expanded: error allocating icount structure: %m\n
+msgid "@A icount structure: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1219
+#, c-format
+#. @-expanded: Error iterating over directory blocks: %m\n
+msgid "Error iterating over @d @bs: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1224
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1229
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1234
+#, 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:1239
+#, c-format
+#. @-expanded: Error deallocating inode %i: %m\n
+msgid "Error deallocating @i %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1244
+#, 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:1249
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1254
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1259
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+msgid "Setting filetype for @E to %N.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1264
+#. @-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:1269
+#. @-expanded: entry '%Dn' in %p (%i) has filetype set.\n
+msgid "@E has filetype set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1274
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+msgid "@E has a @z name.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1279
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1284
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+msgid "@a @b @F @n (%If).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1289
+#. @-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:1294
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+msgid "@p @h %d: %B not referenced\n"
+msgstr ""
+
+#: e2fsck/problem.c:1299
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+msgid "@p @h %d: %B referenced twice\n"
+msgstr ""
+
+#: e2fsck/problem.c:1304
+#. @-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:1309
+#. @-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:1314
+#. @-expanded: invalid HTREE directory inode %d (%q).  
+msgid "@n @h %d (%q).  "
+msgstr ""
+
+#: e2fsck/problem.c:1318
+#. @-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:1328
+#, 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:1333
+#. @-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:1338
+#. @-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:1343
+#. @-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:1348
+#. @-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:1353
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.  
+msgid "Duplicate @E found.  "
+msgstr ""
+
+#: e2fsck/problem.c:1358
+#, 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:1363
+#. @-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:1368
+#. @-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:1373
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1377
+#. @-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:1382
+#. @-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:1387
+#. @-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:1394
+#. @-expanded: Pass 3: Checking directory connectivity\n
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr ""
+
+#: e2fsck/problem.c:1399
+#. @-expanded: root inode not allocated.  
+msgid "@r not allocated.  "
+msgstr ""
+
+#: e2fsck/problem.c:1404
+#. @-expanded: No room in lost+found directory.  
+msgid "No room in @l @d.  "
+msgstr ""
+
+#: e2fsck/problem.c:1409
+#, c-format
+#. @-expanded: Unconnected directory inode %i (%p)\n
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1414
+#. @-expanded: /lost+found not found.  
+msgid "/@l not found.  "
+msgstr ""
+
+#: e2fsck/problem.c:1419
+#. @-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:1424
+#. @-expanded: Bad or non-existent /lost+found.  Cannot reconnect.\n
+msgid "Bad or non-existent /@l.  Cannot reconnect.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1429
+#, c-format
+#. @-expanded: Could not expand /lost+found: %m\n
+msgid "Could not expand /@l: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1434
+#, c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1439
+#, 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:1444
+#, 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:1449
+#, 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:1454
+#, 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:1459
+#, 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:1464
+#, 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:1469
+#, 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:1474
+#, 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:1484
+#, c-format
+#. @-expanded: Error creating root directory (%s): %m\n
+msgid "Error creating root @d (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1489
+#, c-format
+#. @-expanded: Error creating /lost+found directory (%s): %m\n
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1494
+#. @-expanded: root inode is not a directory; aborting.\n
+msgid "@r is not a @d; aborting.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1499
+#. @-expanded: Cannot proceed without a root inode.\n
+msgid "Cannot proceed without a @r.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1509
+#, 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:1516
+msgid "Pass 3A: Optimizing directories\n"
+msgstr ""
+
+#: e2fsck/problem.c:1521
+#, c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1526
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1531
+msgid "Optimizing directories: "
+msgstr ""
+
+#: e2fsck/problem.c:1548
+msgid "Pass 4: Checking reference counts\n"
+msgstr ""
+
+#: e2fsck/problem.c:1553
+#, c-format
+#. @-expanded: unattached zero-length inode %i.  
+msgid "@u @z @i %i.  "
+msgstr ""
+
+#: e2fsck/problem.c:1558
+#, c-format
+#. @-expanded: unattached inode %i\n
+msgid "@u @i %i\n"
+msgstr ""
+
+#: e2fsck/problem.c:1563
+#. @-expanded: inode %i ref count is %Il, should be %N.  
+msgid "@i %i ref count is %Il, @s %N.  "
+msgstr ""
+
+#: e2fsck/problem.c:1567
+#. @-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:1577
+#. @-expanded: Pass 5: Checking group summary information\n
+msgid "Pass 5: Checking @g summary information\n"
+msgstr ""
+
+#: e2fsck/problem.c:1582
+#. @-expanded: Padding at end of inode bitmap is not set. 
+msgid "Padding at end of @i @B is not set. "
+msgstr ""
+
+#: e2fsck/problem.c:1587
+#. @-expanded: Padding at end of block bitmap is not set. 
+msgid "Padding at end of @b @B is not set. "
+msgstr ""
+
+#: e2fsck/problem.c:1592
+#. @-expanded: block bitmap differences: 
+msgid "@b @B differences: "
+msgstr ""
+
+#: e2fsck/problem.c:1612
+#. @-expanded: inode bitmap differences: 
+msgid "@i @B differences: "
+msgstr ""
+
+#: e2fsck/problem.c:1632
+#. @-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:1637
+#. @-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:1642
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1647
+#. @-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:1652
+#. @-expanded: Free blocks count wrong (%b, counted=%c).\n
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1657
+#. @-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:1663
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1668
+#, c-format
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1673
+#, c-format
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+msgid "Error copying in replacement @b @B: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1698
+#, 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:1703
+#, 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:1710
+#. @-expanded: Recreate journal
+msgid "Recreate @j"
+msgstr ""
+
+#: e2fsck/problem.c:1715
+msgid "Update quota info for quota type %N"
+msgstr ""
+
+#: e2fsck/problem.c:1834
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr ""
+
+#: e2fsck/problem.c:1959 e2fsck/problem.c:1963
+msgid "IGNORED"
+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 ""
+
+#: e2fsck/scantest.c:119
+msgid "while starting inode scan"
+msgstr ""
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr ""
+
+#: e2fsck/super.c:190
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr ""
+
+#: e2fsck/super.c:213
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %d"
+msgstr ""
+
+#: e2fsck/super.c:274
+msgid "Truncating"
+msgstr ""
+
+#: e2fsck/super.c:275
+msgid "Clearing"
+msgstr ""
+
+#: e2fsck/unix.c:74
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfvtDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] device\n"
+msgstr ""
+
+#: e2fsck/unix.c:80
+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:86
+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"
+msgstr ""
+
+#: e2fsck/unix.c:131
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr ""
+
+#: e2fsck/unix.c:157
+#, 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:161
+#, 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:166
+#, 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:171
+#, c-format
+msgid "             # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr ""
+
+#: e2fsck/unix.c:179
+msgid "             Extent depth histogram: "
+msgstr ""
+
+#: e2fsck/unix.c:188
+#, 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:192
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:194
+#, c-format
+msgid "%12u large file\n"
+msgid_plural "%12u large files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:196
+#, c-format
+msgid ""
+"\n"
+"%12u regular file\n"
+msgid_plural ""
+"\n"
+"%12u regular files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:198
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:200
+#, c-format
+msgid "%12u character device file\n"
+msgid_plural "%12u character device files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:203
+#, c-format
+msgid "%12u block device file\n"
+msgid_plural "%12u block device files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:205
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:207
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:211
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:215
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:219
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:232 misc/badblocks.c:987 misc/tune2fs.c:2008 misc/util.c:147
+#: resize/main.c:260
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr ""
+
+#: e2fsck/unix.c:252
+#, c-format
+msgid "Warning!  %s is %s.\n"
+msgstr ""
+
+#: e2fsck/unix.c:259
+#, c-format
+msgid "%s is %s.\n"
+msgstr ""
+
+#: e2fsck/unix.c:262
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:264
+msgid ""
+"\n"
+"\n"
+"WARNING!!!  The filesystem is mounted.   If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:269
+msgid "Do you really want to continue"
+msgstr ""
+
+#: e2fsck/unix.c:271
+msgid "check aborted.\n"
+msgstr ""
+
+#: e2fsck/unix.c:361
+msgid " contains a file system with errors"
+msgstr ""
+
+#: e2fsck/unix.c:363
+msgid " was not cleanly unmounted"
+msgstr ""
+
+#: e2fsck/unix.c:365
+msgid " primary superblock features different from backup"
+msgstr ""
+
+#: e2fsck/unix.c:369
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:376
+msgid " has filesystem last checked time in the future"
+msgstr ""
+
+#: e2fsck/unix.c:382
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:391
+msgid ", check forced.\n"
+msgstr ""
+
+#: e2fsck/unix.c:424
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr ""
+
+#: e2fsck/unix.c:444
+msgid " (check deferred; on battery)"
+msgstr ""
+
+#: e2fsck/unix.c:447
+msgid " (check after next mount)"
+msgstr ""
+
+#: e2fsck/unix.c:449
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr ""
+
+#: e2fsck/unix.c:600
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr ""
+
+#: e2fsck/unix.c:669
+msgid "Invalid EA version.\n"
+msgstr ""
+
+#: e2fsck/unix.c:696
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:721
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: e2fsck/unix.c:790
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:794
+msgid "Invalid completion information file descriptor"
+msgstr ""
+
+#: e2fsck/unix.c:809
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr ""
+
+#: e2fsck/unix.c:830
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr ""
+
+#: e2fsck/unix.c:861 e2fsck/unix.c:935 misc/tune2fs.c:828 misc/tune2fs.c:1123
+#: misc/tune2fs.c:1141
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr ""
+
+#: e2fsck/unix.c:914
+msgid "The -n and -D options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:919
+msgid "The -n and -c options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:924
+msgid "The -n and -l/-L options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:978
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1026
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1035
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1124
+#, c-format
+msgid ""
+"MMP interval is %u seconds and total wait time is %u seconds. Please "
+"wait...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1141 e2fsck/unix.c:1146
+msgid "while checking MMP block"
+msgstr ""
+
+#: e2fsck/unix.c:1148 misc/tune2fs.c:1935
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+
+#: e2fsck/unix.c:1199
+msgid "Error: ext2fs library version out of date!\n"
+msgstr ""
+
+#: e2fsck/unix.c:1206
+msgid "while trying to initialize program"
+msgstr ""
+
+#: e2fsck/unix.c:1229
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1241
+msgid "need terminal for interactive repairs"
+msgstr ""
+
+#: e2fsck/unix.c:1294
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1296
+msgid "Superblock invalid,"
+msgstr ""
+
+#: e2fsck/unix.c:1297
+msgid "Group descriptors look bad..."
+msgstr ""
+
+#: e2fsck/unix.c:1307
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr ""
+
+#: e2fsck/unix.c:1311
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr ""
+
+#: e2fsck/unix.c:1340
+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:1347
+msgid "Could this be a zero-length partition?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1349
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr ""
+
+#: e2fsck/unix.c:1355
+msgid "Possibly non-existent or swap device?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1357
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1361
+msgid "Possibly non-existent device?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1364
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1429
+msgid "Get a newer version of e2fsck!"
+msgstr ""
+
+#: e2fsck/unix.c:1473
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr ""
+
+#: e2fsck/unix.c:1485
+msgid ""
+"Warning: skipping journal recovery because doing a read-only filesystem "
+"check.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1497
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1504
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr ""
+
+#: e2fsck/unix.c:1528
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr ""
+
+#: e2fsck/unix.c:1543
+#, c-format
+msgid "%s: warning: compression support is experimental.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1549
+#, c-format
+msgid ""
+"%s: e2fsck not compiled with HTREE support,\n"
+"\tbut filesystem %s has HTREE directories.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1601
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr ""
+
+#: e2fsck/unix.c:1604
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1645
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr ""
+
+#: e2fsck/unix.c:1655
+msgid " Done.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1657
+msgid ""
+"\n"
+"*** journal has been re-created - filesystem is now ext3 again ***\n"
+msgstr ""
+
+#: e2fsck/unix.c:1681
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1685
+msgid "while resetting context"
+msgstr ""
+
+#: e2fsck/unix.c:1692
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1697
+msgid "aborted"
+msgstr ""
+
+#: e2fsck/unix.c:1709 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+
+#: e2fsck/unix.c:1713
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr ""
+
+#: e2fsck/unix.c:1721 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1761
+msgid "while setting block group checksum info"
+msgstr ""
+
+#: e2fsck/util.c:190 misc/util.c:70
+msgid "yY"
+msgstr ""
+
+#: e2fsck/util.c:191
+msgid "nN"
+msgstr ""
+
+#: e2fsck/util.c:205
+msgid "<y>"
+msgstr ""
+
+#: e2fsck/util.c:207
+msgid "<n>"
+msgstr ""
+
+#: e2fsck/util.c:209
+msgid " (y/n)"
+msgstr ""
+
+#: e2fsck/util.c:223
+msgid "cancelled!\n"
+msgstr ""
+
+#: e2fsck/util.c:238
+msgid "yes\n"
+msgstr ""
+
+#: e2fsck/util.c:240
+msgid "no\n"
+msgstr ""
+
+#: e2fsck/util.c:250
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:254
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:258
+msgid "yes"
+msgstr ""
+
+#: e2fsck/util.c:258
+msgid "no"
+msgstr ""
+
+#: e2fsck/util.c:273
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr ""
+
+#: e2fsck/util.c:278
+msgid "reading inode and block bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:286
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:298
+msgid "writing block and inode bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:303
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:315
+#, 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:396
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr ""
+
+#: e2fsck/util.c:400
+#, c-format
+msgid "Memory used: %lu, "
+msgstr ""
+
+#: e2fsck/util.c:407
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr ""
+
+#: e2fsck/util.c:412
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr ""
+
+#: e2fsck/util.c:447 e2fsck/util.c:461
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr ""
+
+#: e2fsck/util.c:475 e2fsck/util.c:488
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr ""
+
+#: e2fsck/util.c:637
+msgid "while allocating zeroizing buffer"
+msgstr ""
+
+#: e2fsck/util.c:785
+msgid ""
+"UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is "
+"running.\n"
+msgstr ""
+
+#: misc/badblocks.c:69
+msgid "done                                                 \n"
+msgstr ""
+
+#: misc/badblocks.c:92
+#, 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"
+msgstr ""
+
+#: misc/badblocks.c:103
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+
+#: misc/badblocks.c:218
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr ""
+
+#: misc/badblocks.c:322
+msgid "Testing with random pattern: "
+msgstr ""
+
+#: misc/badblocks.c:340
+msgid "Testing with pattern 0x"
+msgstr ""
+
+#: misc/badblocks.c:372 misc/badblocks.c:445
+msgid "during seek"
+msgstr ""
+
+#: misc/badblocks.c:383
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr ""
+
+#: misc/badblocks.c:470
+msgid "during ext2fs_sync_device"
+msgstr ""
+
+#: misc/badblocks.c:490 misc/badblocks.c:752
+msgid "while beginning bad block list iteration"
+msgstr ""
+
+#: misc/badblocks.c:505 misc/badblocks.c:605 misc/badblocks.c:763
+msgid "while allocating buffers"
+msgstr ""
+
+#: misc/badblocks.c:509
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr ""
+
+#: misc/badblocks.c:514
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr ""
+
+#: misc/badblocks.c:523
+msgid "Checking for bad blocks (read-only test): "
+msgstr ""
+
+#: misc/badblocks.c:530 misc/badblocks.c:637 misc/badblocks.c:679
+#: misc/badblocks.c:826
+msgid "Too many bad blocks, aborting test\n"
+msgstr ""
+
+#: misc/badblocks.c:612
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:614 misc/badblocks.c:776
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr ""
+
+#: misc/badblocks.c:669
+msgid "Reading and comparing: "
+msgstr ""
+
+#: misc/badblocks.c:775
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:781
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr ""
+
+#: misc/badblocks.c:788
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+
+#: misc/badblocks.c:871
+#, c-format
+msgid "during test data write, block %lu"
+msgstr ""
+
+#: misc/badblocks.c:992 misc/util.c:152
+#, c-format
+msgid "%s is mounted; "
+msgstr ""
+
+#: misc/badblocks.c:994
+msgid "badblocks forced anyway.  Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/badblocks.c:999
+msgid "it's not safe to run badblocks!\n"
+msgstr ""
+
+#: misc/badblocks.c:1004 misc/util.c:163
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr ""
+
+#: misc/badblocks.c:1007
+msgid "badblocks forced anyway.\n"
+msgstr ""
+
+#: misc/badblocks.c:1027
+#, c-format
+msgid "invalid %s - %s"
+msgstr ""
+
+#: misc/badblocks.c:1138
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr ""
+
+#: misc/badblocks.c:1168
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr ""
+
+#: misc/badblocks.c:1174
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr ""
+
+#: misc/badblocks.c:1188
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+
+#: misc/badblocks.c:1194
+msgid "while trying to determine device size"
+msgstr ""
+
+#: misc/badblocks.c:1199
+msgid "last block"
+msgstr ""
+
+#: misc/badblocks.c:1205
+msgid "first block"
+msgstr ""
+
+#: misc/badblocks.c:1208
+#, c-format
+msgid "invalid starting block (%llu): must be less than %llu"
+msgstr ""
+
+#: misc/badblocks.c:1215
+#, c-format
+msgid "invalid end block (%llu): must be 32-bit value"
+msgstr ""
+
+#: misc/badblocks.c:1271
+msgid "while creating in-memory bad blocks list"
+msgstr ""
+
+#: misc/badblocks.c:1280
+msgid "input file - bad format"
+msgstr ""
+
+#: misc/badblocks.c:1288 misc/badblocks.c:1297
+msgid "while adding to in-memory bad block list"
+msgstr ""
+
+#: misc/badblocks.c:1322
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr ""
+
+#: misc/chattr.c:86
+#, c-format
+msgid "Usage: %s [-RVf] [-+=AaCcDdeijsSu] [-v version] files...\n"
+msgstr ""
+
+#: misc/chattr.c:155
+#, c-format
+msgid "bad version - %s\n"
+msgstr ""
+
+#: misc/chattr.c:201 misc/lsattr.c:116
+#, c-format
+msgid "while trying to stat %s"
+msgstr ""
+
+#: misc/chattr.c:208
+#, c-format
+msgid "while reading flags on %s"
+msgstr ""
+
+#: misc/chattr.c:213 misc/chattr.c:225
+#, c-format
+msgid "Flags of %s set as "
+msgstr ""
+
+#: misc/chattr.c:234
+#, c-format
+msgid "while setting flags on %s"
+msgstr ""
+
+#: misc/chattr.c:242
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr ""
+
+#: misc/chattr.c:246
+#, c-format
+msgid "while setting version on %s"
+msgstr ""
+
+#: misc/chattr.c:267
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr ""
+
+#: misc/chattr.c:307
+msgid "= is incompatible with - and +\n"
+msgstr ""
+
+#: misc/chattr.c:315
+msgid "Must use '-v', =, - or +\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:55
+#, c-format
+msgid "Usage: %s [-bfhixV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:159
+msgid "blocks"
+msgstr ""
+
+#: misc/dumpe2fs.c:169
+msgid "clusters"
+msgstr ""
+
+#: misc/dumpe2fs.c:197
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr ""
+
+#: misc/dumpe2fs.c:205
+#, c-format
+msgid "  Checksum 0x%04x"
+msgstr ""
+
+#: misc/dumpe2fs.c:207
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr ""
+
+#: misc/dumpe2fs.c:208
+#, c-format
+msgid ", unused inodes %u\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:213
+#, c-format
+msgid "  %s superblock at "
+msgstr ""
+
+#: misc/dumpe2fs.c:214
+msgid "Primary"
+msgstr ""
+
+#: misc/dumpe2fs.c:214
+msgid "Backup"
+msgstr ""
+
+#: misc/dumpe2fs.c:218
+msgid ", Group descriptors at "
+msgstr ""
+
+#: misc/dumpe2fs.c:222
+msgid ""
+"\n"
+"  Reserved GDT blocks at "
+msgstr ""
+
+#: misc/dumpe2fs.c:229
+msgid " Group descriptor at "
+msgstr ""
+
+#: misc/dumpe2fs.c:235
+msgid "  Block bitmap at "
+msgstr ""
+
+#: misc/dumpe2fs.c:239
+msgid ", Inode bitmap at "
+msgstr ""
+
+#: misc/dumpe2fs.c:243
+msgid ""
+"\n"
+"  Inode table at "
+msgstr ""
+
+#: misc/dumpe2fs.c:249
+#, c-format
+msgid ""
+"\n"
+"  %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+
+#: misc/dumpe2fs.c:256
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:259
+msgid "  Free blocks: "
+msgstr ""
+
+#: misc/dumpe2fs.c:274
+msgid "  Free inodes: "
+msgstr ""
+
+#: misc/dumpe2fs.c:310
+msgid "while printing bad block list"
+msgstr ""
+
+#: misc/dumpe2fs.c:316
+#, c-format
+msgid "Bad blocks: %u"
+msgstr ""
+
+#: misc/dumpe2fs.c:345 misc/tune2fs.c:313
+msgid "while reading journal inode"
+msgstr ""
+
+#: misc/dumpe2fs.c:351
+msgid "while opening journal inode"
+msgstr ""
+
+#: misc/dumpe2fs.c:357
+msgid "while reading journal super block"
+msgstr ""
+
+#: misc/dumpe2fs.c:364
+msgid "Journal superblock magic number invalid!\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:367
+msgid "Journal features:        "
+msgstr ""
+
+#: misc/dumpe2fs.c:380
+msgid "Journal size:             "
+msgstr ""
+
+#: misc/dumpe2fs.c:391
+#, c-format
+msgid ""
+"Journal length:           %u\n"
+"Journal sequence:         0x%08x\n"
+"Journal start:            %u\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:398
+#, c-format
+msgid "Journal errno:            %d\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:415 misc/tune2fs.c:229
+msgid "while reading journal superblock"
+msgstr ""
+
+#: misc/dumpe2fs.c:423
+msgid "Couldn't find journal superblock magic numbers"
+msgstr ""
+
+#: misc/dumpe2fs.c:427
+#, c-format
+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 ""
+
+#: misc/dumpe2fs.c:440
+#, c-format
+msgid "Journal users:            %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:456 misc/mke2fs.c:666 misc/tune2fs.c:1160
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:482
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:497
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:508
+#, 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:568 misc/mke2fs.c:1605
+#, c-format
+msgid "\tUsing %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:604 misc/e2image.c:1569 misc/tune2fs.c:1946
+#: resize/main.c:318
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:632
+#, c-format
+msgid ""
+"\n"
+"%s: %s: error reading bitmaps: %s\n"
+msgstr ""
+
+#: misc/e2image.c:101
+#, c-format
+msgid "Usage: %s [ -r|Q ] [ -fr ] device image-file\n"
+msgstr ""
+
+#: misc/e2image.c:103
+#, c-format
+msgid "       %s -I device image-file\n"
+msgstr ""
+
+#: misc/e2image.c:104
+#, c-format
+msgid ""
+"       %s -ra  [  -cfnp  ] [ -o src_offset ] [ -O dest_offset ] src_fs "
+"[ dest_fs ]\n"
+msgstr ""
+
+#: misc/e2image.c:169 misc/e2image.c:573 misc/e2image.c:578
+#: misc/e2image.c:1167
+msgid "while allocating buffer"
+msgstr ""
+
+#: misc/e2image.c:174
+#, c-format
+msgid "Writing block %llu\n"
+msgstr ""
+
+#: misc/e2image.c:188
+#, c-format
+msgid "error writing block %llu"
+msgstr ""
+
+#: misc/e2image.c:190
+msgid "error in write()"
+msgstr ""
+
+#: misc/e2image.c:206
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr ""
+
+#: misc/e2image.c:211
+msgid "Couldn't allocate header buffer\n"
+msgstr ""
+
+#: misc/e2image.c:239
+msgid "while writing superblock"
+msgstr ""
+
+#: misc/e2image.c:248
+msgid "while writing inode table"
+msgstr ""
+
+#: misc/e2image.c:256
+msgid "while writing block bitmap"
+msgstr ""
+
+#: misc/e2image.c:264
+msgid "while writing inode bitmap"
+msgstr ""
+
+#: misc/e2image.c:500
+#, c-format
+msgid "Corrupt directory block %llu: bad rec_len (%d)\n"
+msgstr ""
+
+#: misc/e2image.c:512
+#, c-format
+msgid "Corrupt directory block %llu: bad name_len (%d)\n"
+msgstr ""
+
+#: misc/e2image.c:553
+#, c-format
+msgid "%llu / %llu blocks (%d%%)"
+msgstr ""
+
+#: misc/e2image.c:582 misc/e2image.c:620
+#, c-format
+msgid "Copying "
+msgstr ""
+
+#: misc/e2image.c:617
+#, c-format
+msgid ""
+"Stopping now will destroy the filesystem, interrupt again if you are sure\n"
+msgstr ""
+
+#: misc/e2image.c:642
+#, c-format
+msgid " %s remaining at %.2f MB/s"
+msgstr ""
+
+#: misc/e2image.c:654 misc/e2image.c:1177
+#, c-format
+msgid "error reading block %llu"
+msgstr ""
+
+#: misc/e2image.c:709
+#, c-format
+msgid ""
+"\b\b\b\b\b\b\b\bCopied %llu / %llu blocks (%llu%%) in %s at %.2f MB/"
+"s       \n"
+msgstr ""
+
+#: misc/e2image.c:746
+msgid "while allocating l1 table"
+msgstr ""
+
+#: misc/e2image.c:791
+msgid "while allocating l2 cache"
+msgstr ""
+
+#: misc/e2image.c:814
+#, c-format
+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:1135
+msgid "while allocating ext2_qcow2_image"
+msgstr ""
+
+#: misc/e2image.c:1142
+msgid "while initializing ext2_qcow2_image"
+msgstr ""
+
+#: misc/e2image.c:1199 misc/e2image.c:1217
+#, c-format
+msgid "Programming error: multiple sequential refcount blocks created!\n"
+msgstr ""
+
+#: misc/e2image.c:1257
+msgid "while allocating block bitmap"
+msgstr ""
+
+#: misc/e2image.c:1266
+msgid "while allocating scramble block bitmap"
+msgstr ""
+
+#: misc/e2image.c:1273
+#, c-format
+msgid "Scanning inodes...\n"
+msgstr ""
+
+#: misc/e2image.c:1285
+msgid "Can't allocate block buffer"
+msgstr ""
+
+#: misc/e2image.c:1324 misc/e2image.c:1338
+#, c-format
+msgid "while iterating over inode %u"
+msgstr ""
+
+#: misc/e2image.c:1368
+msgid "Raw and qcow2 images cannotbe installed"
+msgstr ""
+
+#: misc/e2image.c:1391
+msgid "error reading bitmaps"
+msgstr ""
+
+#: misc/e2image.c:1403
+msgid "while opening device file"
+msgstr ""
+
+#: misc/e2image.c:1510
+msgid "-a option can only be used with raw or QCOW2 images."
+msgstr ""
+
+#: misc/e2image.c:1516
+msgid "Offsets are only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1521
+msgid "Move mode is only allowed with raw images."
+msgstr ""
+
+#: misc/e2image.c:1526
+msgid "Move mode requires all data mode."
+msgstr ""
+
+#: misc/e2image.c:1536
+msgid "checking if mounted"
+msgstr ""
+
+#: misc/e2image.c:1543
+#, c-format
+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:1594
+msgid "QCOW2 image can not be written to the stdout!\n"
+msgstr ""
+
+#: misc/e2image.c:1610
+#, c-format
+msgid "Image (%s) is compressed\n"
+msgstr ""
+
+#: misc/e2image.c:1613
+#, c-format
+msgid "Image (%s) is encrypted\n"
+msgstr ""
+
+#: misc/e2image.c:1616
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr ""
+
+#: misc/e2image.c:1625
+#, c-format
+msgid "The -c option only supported in raw mode\n"
+msgstr ""
+
+#: misc/e2image.c:1630
+#, c-format
+msgid "The -c option is not supported when writing to stdout\n"
+msgstr ""
+
+#: misc/e2image.c:1637
+msgid "while allocating check_buf"
+msgstr ""
+
+#: misc/e2image.c:1642
+#, c-format
+msgid "The -p option only supported in raw mode\n"
+msgstr ""
+
+#: misc/e2image.c:1653
+#, c-format
+msgid "%d blocks already contained the data to be copied.\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:2103
+#, 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:820
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr ""
+
+#: misc/e2undo.c:36
+#, c-format
+msgid "Usage: %s <transaction file> <filesystem>\n"
+msgstr ""
+
+#: misc/e2undo.c:52
+msgid "Failed to read the file system data \n"
+msgstr ""
+
+#: misc/e2undo.c:62 misc/e2undo.c:83 misc/e2undo.c:108 misc/e2undo.c:206
+#, c-format
+msgid "Failed tdb_fetch %s\n"
+msgstr ""
+
+#: misc/e2undo.c:70
+#, c-format
+msgid "The file system Mount time didn't match %u\n"
+msgstr ""
+
+#: misc/e2undo.c:89
+msgid "The file system UUID didn't match \n"
+msgstr ""
+
+#: misc/e2undo.c:163
+#, c-format
+msgid "Failed tdb_open %s\n"
+msgstr ""
+
+#: misc/e2undo.c:169
+#, c-format
+msgid "Error while determining whether %s is mounted.\n"
+msgstr ""
+
+#: misc/e2undo.c:175
+msgid "e2undo should only be run on unmounted file system\n"
+msgstr ""
+
+#: misc/e2undo.c:184
+#, c-format
+msgid "Failed to open %s\n"
+msgstr ""
+
+#: misc/e2undo.c:210
+#, c-format
+msgid "Replayed transaction of size %zd at location %llu\n"
+msgstr ""
+
+#: misc/e2undo.c:216
+#, c-format
+msgid "Failed write %s\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:478
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr ""
+
+#: misc/fsck.c:594
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr ""
+
+#: misc/fsck.c:616
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr ""
+
+#: misc/fsck.c:622
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr ""
+
+#: misc/fsck.c:661
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr ""
+
+#: misc/fsck.c:721
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr ""
+
+#: misc/fsck.c:742
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+
+#: misc/fsck.c:761
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr ""
+
+#: misc/fsck.c:884
+#, c-format
+msgid ""
+"%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass "
+"number\n"
+msgstr ""
+
+#: misc/fsck.c:911
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr ""
+
+#: misc/fsck.c:967
+msgid "Checking all file systems.\n"
+msgstr ""
+
+#: misc/fsck.c:1058
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr ""
+
+#: misc/fsck.c:1078
+msgid ""
+"Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr ""
+
+#: misc/fsck.c:1120
+#, c-format
+msgid "%s: too many devices\n"
+msgstr ""
+
+#: misc/fsck.c:1153 misc/fsck.c:1239
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr ""
+
+#: misc/lsattr.c:74
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr ""
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading flags on %s"
+msgstr ""
+
+#: misc/lsattr.c:91
+#, c-format
+msgid "While reading version on %s"
+msgstr ""
+
+#: misc/mke2fs.c:116
+#, 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]\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] [-jnqvDFKSV] device [blocks-"
+"count]\n"
+msgstr ""
+
+#: misc/mke2fs.c:221
+#, c-format
+msgid "Running command: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:225
+#, c-format
+msgid "while trying to run '%s'"
+msgstr ""
+
+#: misc/mke2fs.c:232
+msgid "while processing list of bad blocks from program"
+msgstr ""
+
+#: misc/mke2fs.c:259
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr ""
+
+#: misc/mke2fs.c:261
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+
+#: misc/mke2fs.c:264
+msgid "Aborting....\n"
+msgstr ""
+
+#: misc/mke2fs.c:284
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:303
+msgid "while marking bad blocks as used"
+msgstr ""
+
+#: misc/mke2fs.c:320
+msgid "Writing inode tables: "
+msgstr ""
+
+#: misc/mke2fs.c:341
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:355 misc/mke2fs.c:2314 misc/mke2fs.c:2577
+msgid "done                            \n"
+msgstr ""
+
+#: misc/mke2fs.c:366
+msgid "while creating root dir"
+msgstr ""
+
+#: misc/mke2fs.c:373
+msgid "while reading root inode"
+msgstr ""
+
+#: misc/mke2fs.c:385
+msgid "while setting root inode ownership"
+msgstr ""
+
+#: misc/mke2fs.c:403
+msgid "while creating /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:410
+msgid "while looking up /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:423
+msgid "while expanding /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:438
+msgid "while setting bad block inode"
+msgstr ""
+
+#: misc/mke2fs.c:465
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr ""
+
+#: misc/mke2fs.c:475
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:491
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:507
+msgid "while initializing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:515
+msgid "Zeroing journal device: "
+msgstr ""
+
+#: misc/mke2fs.c:527
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr ""
+
+#: misc/mke2fs.c:545
+msgid "while writing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:560
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:565
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr ""
+
+#: misc/mke2fs.c:568
+#, c-format
+msgid "OS type: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:574
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:578
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:582
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:584
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr ""
+
+#: misc/mke2fs.c:587
+#, c-format
+msgid "First data block=%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:589
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:591
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr ""
+
+#: misc/mke2fs.c:595
+#, c-format
+msgid "%u block groups\n"
+msgstr ""
+
+#: misc/mke2fs.c:597
+#, c-format
+msgid "%u block group\n"
+msgstr ""
+
+#: misc/mke2fs.c:600
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:603
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:605
+#, c-format
+msgid "%u inodes per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:612
+msgid "Superblock backups stored on blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:689
+#, c-format
+msgid "%s requires '-O 64bit'\n"
+msgstr ""
+
+#: misc/mke2fs.c:695
+#, c-format
+msgid "'%s' must be before 'resize=%u'\n"
+msgstr ""
+
+#: misc/mke2fs.c:708
+#, c-format
+msgid "Invalid desc_size: '%s'\n"
+msgstr ""
+
+#: misc/mke2fs.c:722 misc/tune2fs.c:1188
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:736
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:751
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:774
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:781
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:805
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:832 misc/mke2fs.c:841
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr ""
+
+#: misc/mke2fs.c:866
+#, c-format
+msgid "Invalid quotatype parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:877
+#, 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"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_uid=<uid of root directory>\n"
+"\troot_gid=<gid of root directory>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr OR grp>\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:899
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:938
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: misc/mke2fs.c:951 misc/tune2fs.c:415
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:963 misc/tune2fs.c:356
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1103
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1107
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1111
+msgid "Aborting...\n"
+msgstr ""
+
+#: misc/mke2fs.c:1152
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1324
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1365
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1405
+#, c-format
+msgid "invalid block size - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1409
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1425
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1435
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr ""
+
+#: misc/mke2fs.c:1447
+msgid "Illegal number for blocks per group"
+msgstr ""
+
+#: misc/mke2fs.c:1452
+msgid "blocks per group must be multiple of 8"
+msgstr ""
+
+#: misc/mke2fs.c:1460
+msgid "Illegal number for flex_bg size"
+msgstr ""
+
+#: misc/mke2fs.c:1466
+msgid "flex_bg size must be a power of 2"
+msgstr ""
+
+#: misc/mke2fs.c:1476
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:1486
+#, c-format
+msgid "invalid inode size - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1499
+msgid ""
+"Warning: -K option is deprecated and should not be used anymore. Use '-E "
+"nodiscard' extended option instead!\n"
+msgstr ""
+
+#: misc/mke2fs.c:1510
+msgid "in malloc for bad_blocks_filename"
+msgstr ""
+
+#: misc/mke2fs.c:1523
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1538
+#, c-format
+msgid "bad num inodes - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1555
+#, c-format
+msgid "bad revision level - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1569
+msgid "The -t option may only be used once"
+msgstr ""
+
+#: misc/mke2fs.c:1577
+msgid "The -T option may only be used once"
+msgstr ""
+
+#: misc/mke2fs.c:1630 misc/mke2fs.c:2657
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1636
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1642
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1653
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr ""
+
+#: misc/mke2fs.c:1663
+msgid "filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:1676 resize/main.c:368
+msgid "while trying to determine filesystem size"
+msgstr ""
+
+#: misc/mke2fs.c:1682
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+
+#: misc/mke2fs.c:1689
+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:1706
+msgid "Filesystem larger than apparent device size."
+msgstr ""
+
+#: misc/mke2fs.c:1726
+msgid "Failed to parse fs types list\n"
+msgstr ""
+
+#: misc/mke2fs.c:1767
+msgid "while trying to determine hardware sector size"
+msgstr ""
+
+#: misc/mke2fs.c:1773
+msgid "while trying to determine physical sector size"
+msgstr ""
+
+#: misc/mke2fs.c:1806
+msgid "while setting blocksize; too small for device\n"
+msgstr ""
+
+#: misc/mke2fs.c:1811
+#, c-format
+msgid ""
+"Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1832
+#, 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:1848
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr ""
+
+#: misc/mke2fs.c:1855
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1863
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1875
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1889
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr ""
+
+#: misc/mke2fs.c:1906
+msgid ""
+"Extents MUST be enabled for a 64-bit filesystem.  Pass -O extents to "
+"rectify.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1926
+msgid "The cluster size may not be smaller than the block size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1932
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr ""
+
+#: misc/mke2fs.c:1951
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1954
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1956
+#, c-format
+msgid ""
+"This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1975
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:1979
+#, c-format
+msgid ""
+"Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+
+#: misc/mke2fs.c:2013
+msgid "Can't support bigalloc feature without extents feature"
+msgstr ""
+
+#: misc/mke2fs.c:2020
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2029
+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:2036 misc/tune2fs.c:757
+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 ""
+
+#: misc/mke2fs.c:2047
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:2056
+msgid "blocks per group count out of range"
+msgstr ""
+
+#: misc/mke2fs.c:2080
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+
+#: misc/mke2fs.c:2092
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:2110
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr ""
+
+#: misc/mke2fs.c:2117
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr ""
+
+#: misc/mke2fs.c:2131
+#, 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:2253
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+"    e2undo %s %s\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2267
+msgid "while trying to setup undo file\n"
+msgstr ""
+
+#: misc/mke2fs.c:2293
+msgid "Discarding device blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:2309
+msgid "failed - "
+msgstr ""
+
+#: misc/mke2fs.c:2418
+msgid "while setting up superblock"
+msgstr ""
+
+#: misc/mke2fs.c:2434
+msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:2517
+#, c-format
+msgid "unknown os - %s"
+msgstr ""
+
+#: misc/mke2fs.c:2569
+msgid "Allocating group tables: "
+msgstr ""
+
+#: misc/mke2fs.c:2573
+msgid "while trying to allocate filesystem tables"
+msgstr ""
+
+#: misc/mke2fs.c:2582
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+
+#: misc/mke2fs.c:2625
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:2639
+msgid "while reserving blocks for online resize"
+msgstr ""
+
+#: misc/mke2fs.c:2650 misc/tune2fs.c:662
+msgid "journal"
+msgstr ""
+
+#: misc/mke2fs.c:2662
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr ""
+
+#: misc/mke2fs.c:2669
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+
+#: misc/mke2fs.c:2674 misc/mke2fs.c:2704 misc/tune2fs.c:691 misc/tune2fs.c:705
+msgid "done\n"
+msgstr ""
+
+#: misc/mke2fs.c:2681
+msgid "Skipping journal creation in super-only mode\n"
+msgstr ""
+
+#: misc/mke2fs.c:2692
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr ""
+
+#: misc/mke2fs.c:2700
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+
+#: misc/mke2fs.c:2712 misc/tune2fs.c:468
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+
+#: misc/mke2fs.c:2717
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2730
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+
+#: misc/mke2fs.c:2737
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+
+#: misc/mke2fs.c:2739
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+
+#: misc/mklost+found.c:50
+msgid "Usage: mklost+found\n"
+msgstr ""
+
+#: misc/partinfo.c:41
+#, 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:51
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:57
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:65
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:71
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d   start=%8d size=%8lu end=%8d\n"
+msgstr ""
+
+#: misc/tune2fs.c:111
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:120
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-p "
+"mmp_update_interval]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]\n"
+"\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
+"\t[-Q quota_options]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[ -I new_inode_size ] device\n"
+msgstr ""
+
+#: misc/tune2fs.c:216
+msgid "while trying to open external journal"
+msgstr ""
+
+#: misc/tune2fs.c:221
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:236
+msgid "Journal superblock not found!\n"
+msgstr ""
+
+#: misc/tune2fs.c:247
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:268
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:276
+msgid "Journal removed\n"
+msgstr ""
+
+#: misc/tune2fs.c:320
+msgid "while reading bitmaps"
+msgstr ""
+
+#: misc/tune2fs.c:328
+msgid "while clearing journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:339
+msgid "while writing journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:371 misc/tune2fs.c:384
+#, c-format
+msgid "(and reboot afterwards!)\n"
+msgstr ""
+
+#: misc/tune2fs.c:418
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:424
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:433
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:441
+msgid ""
+"The needs_recovery flag is set.  Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+
+#: misc/tune2fs.c:460
+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:478
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:487
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:495
+msgid "Error while reading bitmaps\n"
+msgstr ""
+
+#: misc/tune2fs.c:504
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+
+#: misc/tune2fs.c:509
+msgid "while reading MMP block."
+msgstr ""
+
+#: misc/tune2fs.c:541
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+
+#: misc/tune2fs.c:552
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:612
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:657
+msgid "The filesystem already has a journal.\n"
+msgstr ""
+
+#: misc/tune2fs.c:675
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:679
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr ""
+
+#: misc/tune2fs.c:687
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr ""
+
+#: misc/tune2fs.c:693
+msgid "Creating journal inode: "
+msgstr ""
+
+#: misc/tune2fs.c:702
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+
+#: misc/tune2fs.c:781
+msgid "Couldn't allocate memory to parse quota options!\n"
+msgstr ""
+
+#: misc/tune2fs.c:803
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with "
+"comma):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:863
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr ""
+
+#: misc/tune2fs.c:891 misc/tune2fs.c:904
+#, c-format
+msgid "bad mounts count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:920
+#, c-format
+msgid "bad error behavior - %s"
+msgstr ""
+
+#: misc/tune2fs.c:947
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:980
+#, c-format
+msgid "bad interval - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1009
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1024
+msgid "-o may only be specified once"
+msgstr ""
+
+#: misc/tune2fs.c:1033
+msgid "-O may only be specified once"
+msgstr ""
+
+#: misc/tune2fs.c:1050
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1079
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1096
+#, c-format
+msgid "bad inode size - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1103
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr ""
+
+#: misc/tune2fs.c:1197
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:1202
+#, 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:1225
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:1240
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:1255
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:1261
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:1280
+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"
+msgstr ""
+
+#: misc/tune2fs.c:1746
+msgid "Failed to read inode bitmap\n"
+msgstr ""
+
+#: misc/tune2fs.c:1751
+msgid "Failed to read block bitmap\n"
+msgstr ""
+
+#: misc/tune2fs.c:1768 resize/resize2fs.c:870
+msgid "blocks to be moved"
+msgstr ""
+
+#: misc/tune2fs.c:1771
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:1777
+msgid "Not enough space to increase inode size \n"
+msgstr ""
+
+#: misc/tune2fs.c:1782
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr ""
+
+#: misc/tune2fs.c:1814
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+
+#: misc/tune2fs.c:1841
+msgid "Couldn't allocate memory for tdb filename\n"
+msgstr ""
+
+#: misc/tune2fs.c:1863
+#, c-format
+msgid "while trying to delete %s"
+msgstr ""
+
+#: misc/tune2fs.c:1873
+#, c-format
+msgid ""
+"To undo the tune2fs operation please run the command\n"
+"    e2undo %s %s\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:1942
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:1960
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:1967
+msgid "Shrinking inode size is not supported\n"
+msgstr ""
+
+#: misc/tune2fs.c:1972
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:2019
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:2025
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:2030
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:2035
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2040
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr ""
+
+#: misc/tune2fs.c:2047
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr ""
+
+#: misc/tune2fs.c:2054
+#, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr ""
+
+#: misc/tune2fs.c:2060
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr ""
+
+#: misc/tune2fs.c:2067
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2073
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2080
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set.  %s"
+msgstr ""
+
+#: misc/tune2fs.c:2085
+msgid ""
+"\n"
+"Clearing the sparse superflag not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2093
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2099
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2131
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+
+#: misc/tune2fs.c:2149
+msgid ""
+"The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2168
+msgid "The UUID may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2196
+msgid "Invalid UUID format\n"
+msgstr ""
+
+#: misc/tune2fs.c:2209
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2217
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2230
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2233
+msgid "Failed to change inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:2244
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:2249
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:2256
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr ""
+
+#: misc/util.c:74
+msgid "Proceed anyway? (y,n) "
+msgstr ""
+
+#: misc/util.c:89
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr ""
+
+#: misc/util.c:92
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+
+#: misc/util.c:103
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr ""
+
+#: misc/util.c:132
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr ""
+
+#: misc/util.c:154
+msgid "mke2fs forced anyway.  Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/util.c:159
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr ""
+
+#: misc/util.c:166
+msgid "mke2fs forced anyway.\n"
+msgstr ""
+
+#: misc/util.c:182
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr ""
+
+#: misc/util.c:207
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+
+#: misc/util.c:228
+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"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/util.c:258
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+
+#: misc/util.c:265
+#, 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:273
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+
+#: misc/util.c:287
+#, 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:48
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr ""
+
+#: misc/uuidd.c:50
+#, c-format
+msgid "       %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr ""
+
+#: misc/uuidd.c:52
+#, c-format
+msgid "       %s -k\n"
+msgstr ""
+
+#: misc/uuidd.c:154
+msgid "bad arguments"
+msgstr ""
+
+#: misc/uuidd.c:172
+msgid "connect"
+msgstr ""
+
+#: misc/uuidd.c:191
+msgid "write"
+msgstr ""
+
+#: misc/uuidd.c:199
+msgid "read count"
+msgstr ""
+
+#: misc/uuidd.c:205
+msgid "bad response length"
+msgstr ""
+
+#: misc/uuidd.c:270
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr ""
+
+#: misc/uuidd.c:278
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr ""
+
+#: misc/uuidd.c:307
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:315
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:353
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:361
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:380
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:390
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:399
+#, 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:420
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:432
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr ""
+
+#: misc/uuidd.c:476 misc/uuidd.c:498
+#, c-format
+msgid "Bad number: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:533 misc/uuidd.c:562
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr ""
+
+#: misc/uuidd.c:543
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:547
+msgid "List of UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:568
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr ""
+
+#: misc/uuidd.c:585
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:591
+#, 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:44
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:66
+msgid "Extending the inode table"
+msgstr ""
+
+#: resize/main.c:69
+msgid "Relocating blocks"
+msgstr ""
+
+#: resize/main.c:72
+msgid "Scanning inode table"
+msgstr ""
+
+#: resize/main.c:75
+msgid "Updating inode references"
+msgstr ""
+
+#: resize/main.c:78
+msgid "Moving inode table"
+msgstr ""
+
+#: resize/main.c:81
+msgid "Unknown pass?!?"
+msgstr ""
+
+#: resize/main.c:84
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr ""
+
+#: resize/main.c:155
+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:272
+#, c-format
+msgid "while opening %s"
+msgstr ""
+
+#: resize/main.c:280
+#, c-format
+msgid "while getting stat information for %s"
+msgstr ""
+
+#: resize/main.c:338 resize/main.c:451
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:342
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr ""
+
+#: resize/main.c:378
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr ""
+
+#: resize/main.c:394
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr ""
+
+#: resize/main.c:402
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr ""
+
+#: resize/main.c:408
+msgid "Invalid stride length"
+msgstr ""
+
+#: resize/main.c:432
+#, 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:439
+#, c-format
+msgid ""
+"The filesystem is already %llu blocks long.  Nothing to do!\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:456
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/main.c:465
+#, c-format
+msgid "while trying to resize %s"
+msgstr ""
+
+#: resize/main.c:468
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+
+#: resize/main.c:474
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu blocks long.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:489
+#, c-format
+msgid "while trying to truncate %s"
+msgstr ""
+
+#: resize/online.c:79
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+
+#: resize/online.c:83
+msgid "On-line shrinking not supported"
+msgstr ""
+
+#: resize/online.c:108
+msgid "Filesystem does not support online resizing"
+msgstr ""
+
+#: resize/online.c:117
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr ""
+
+#: resize/online.c:124
+msgid "Kernel does not support resizing a file system this large"
+msgstr ""
+
+#: resize/online.c:132
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr ""
+
+#: resize/online.c:137
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr ""
+
+#: resize/online.c:156 resize/online.c:173
+msgid "Permission denied to resize filesystem"
+msgstr ""
+
+#: resize/online.c:159 resize/online.c:179
+msgid "While checking for on-line resizing support"
+msgstr ""
+
+#: resize/online.c:176
+msgid "Kernel does not support online resizing"
+msgstr ""
+
+#: resize/online.c:215
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/online.c:225
+msgid "While trying to extend the last group"
+msgstr ""
+
+#: resize/online.c:279
+#, c-format
+msgid "While trying to add group #%d"
+msgstr ""
+
+#: resize/online.c:290
+#, 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:371
+#, c-format
+msgid "inodes (%llu) must be less than %u"
+msgstr ""
+
+#: resize/resize2fs.c:630
+msgid "reserved blocks"
+msgstr ""
+
+#: resize/resize2fs.c:875
+msgid "meta-data blocks"
+msgstr ""
+
+#: resize/resize2fs.c:1873
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.42.9"
+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: fsck 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 MMP block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr ""
+
+#: e2fsck/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr ""
+
+#: e2fsck/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr ""
+
+#: e2fsck/prof_err.c:13
+msgid "Profile section not found"
+msgstr ""
+
+#: e2fsck/prof_err.c:14
+msgid "Profile relation not found"
+msgstr ""
+
+#: e2fsck/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+
+#: e2fsck/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr ""
+
+#: e2fsck/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr ""
+
+#: e2fsck/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr ""
+
+#: e2fsck/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr ""
+
+#: e2fsck/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr ""
+
+#: e2fsck/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr ""
+
+#: e2fsck/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr ""
+
+#: e2fsck/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr ""
+
+#: e2fsck/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr ""
+
+#: e2fsck/prof_err.c:33
+msgid "No more sections"
+msgstr ""
+
+#: e2fsck/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr ""
+
+#: e2fsck/prof_err.c:35
+msgid "No profile file open"
+msgstr ""
+
+#: e2fsck/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr ""
+
+#: e2fsck/prof_err.c:38
+msgid "Section already exists"
+msgstr ""
+
+#: e2fsck/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr ""
+
+#: e2fsck/prof_err.c:40
+msgid "Invalid integer value"
+msgstr ""
+
+#: e2fsck/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr ""
diff --git a/e2fsprogs/po/en@boldquot.header b/e2fsprogs/po/en@boldquot.header
new file mode 100644
index 0000000..fedb6a0
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/po/en@quot.header b/e2fsprogs/po/en@quot.header
new file mode 100644
index 0000000..a9647fc
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/po/es.gmo b/e2fsprogs/po/es.gmo
new file mode 100644
index 0000000..4787c65
--- /dev/null
+++ b/e2fsprogs/po/es.gmo
Binary files differ
diff --git a/e2fsprogs/po/es.po b/e2fsprogs/po/es.po
new file mode 100644
index 0000000..bb43ba7
--- /dev/null
+++ b/e2fsprogs/po/es.po
@@ -0,0 +1,7047 @@
+# Mensajes en español para GNU e2fsprogs.
+# Copyright (C) 2008 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.
+#
+#
+#. 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).
+#.  
+#. 	%b	<blk>			block number
+#. 	%B	<blkcount>		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_dir_acl
+#. 	%Iu	<inode> -> i_uid
+#. 	%Ig	<inode> -> i_gid
+#. 	%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.40.8\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2012-06-12 14:40-0400\n"
+"PO-Revision-Date: 2008-06-01 23:56+0200\n"
+"Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n"
+"Language-Team: Spanish <es@li.org>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: KBabel 1.11.4\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:176
+#, 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/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:1298 e2fsck/unix.c:1386 misc/badblocks.c:1214
+#: misc/badblocks.c:1222 misc/badblocks.c:1236 misc/badblocks.c:1248
+#: misc/dumpe2fs.c:588 misc/e2image.c:1189 misc/e2image.c:1307
+#: misc/e2image.c:1320 misc/mke2fs.c:192 misc/tune2fs.c:1907 resize/main.c:303
+#, c-format
+msgid "while trying to open %s"
+msgstr "mientras se intentaba abrir %s"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "mientras se intentaba abrir una tubería a '%s'"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:199
+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:105
+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:131
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode.  Cleared.\n"
+msgstr ""
+"Atención: se encontró un bloque ilegal %u en el nodo-i de bloques dañados. "
+"Limpiado.\n"
+
+#: 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:61 e2fsck/ehandler.c:110
+msgid "Ignore error"
+msgstr "Se descarta el error"
+
+#: e2fsck/ehandler.c:62
+msgid "Force rewrite"
+msgstr "Se fuerza la reescritura"
+
+#: e2fsck/ehandler.c:104
+#, c-format
+msgid "Error writing block %lu (%s) while %s.  "
+msgstr "Error al escribir el bloque %lu (%s) mientras %s.  "
+
+#: e2fsck/ehandler.c:107
+#, c-format
+msgid "Error writing block %lu (%s).  "
+msgstr "Error al escribir el bloque %lu (%s).  "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "bloques de directorio vacíos"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "mapa de directorios vacío"
+
+#: e2fsck/emptydir.c:98
+#, 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:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "¡Número inválido de bloques!\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "No se puede reservar el bloque del búfer (tamaño=%d)\n"
+
+#: 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 del BLKFLSBUF! No se "
+"pueden vaciar los búfers.\n"
+
+#: e2fsck/iscan.c:44
+#, c-format
+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"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:930
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "mientras se abría %s para su vaciado"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:936 resize/main.c:276
+#, c-format
+msgid "while trying to flush %s"
+msgstr "mientras se intentaba vaciar %s"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1084
+msgid "while opening inode scan"
+msgstr "mientras se iniciaba la exploración de los nodos-i"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1102
+msgid "while getting next inode"
+msgstr "mientras se obtenía el nodo-i siguiente"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%u nodos-i explorados.\n"
+
+#: e2fsck/journal.c:512
+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:569
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr ""
+"%s: no se encontró un superbloque válido en el fichero de transacciones\n"
+
+#: e2fsck/journal.c:578
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: el fichero de transacciones es demasiado corto\n"
+
+#: e2fsck/journal.c:870
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: recuperando el fichero de transacciones\n"
+
+#: e2fsck/journal.c:872
+#, 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:899
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "mientras se intentaba reabrir %s"
+
+#: e2fsck/message.c:113
+msgid "aextended attribute"
+msgstr "aatributo extendido"
+
+#: e2fsck/message.c:114
+msgid "Aerror allocating"
+msgstr "Aerror en la reserva"
+
+#: e2fsck/message.c:115
+msgid "bblock"
+msgstr "bbloque"
+
+#: e2fsck/message.c:116
+msgid "Bbitmap"
+msgstr "Bmapa de bits"
+
+#: e2fsck/message.c:117
+msgid "ccompress"
+msgstr "ccompresión"
+
+#: e2fsck/message.c:118
+msgid "Cconflicts with some other fs @b"
+msgstr "CEntra en conflicto con algún otro sistema de ficheros @b"
+
+#: e2fsck/message.c:119
+msgid "iinode"
+msgstr "inodo-i"
+
+#: e2fsck/message.c:120
+msgid "Iillegal"
+msgstr "Iilegal"
+
+#: e2fsck/message.c:121
+msgid "jjournal"
+msgstr "jfichero de transacciones"
+
+#: e2fsck/message.c:122
+msgid "Ddeleted"
+msgstr "Dborrado"
+
+#: e2fsck/message.c:123
+msgid "ddirectory"
+msgstr "ddirectorio"
+
+#: 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 "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:131
+msgid "Lis a link"
+msgstr "Les un enlace"
+
+#: e2fsck/message.c:132
+msgid "mmultiply-claimed"
+msgstr "mreclamado en múltiples ocasiones"
+
+#: e2fsck/message.c:133
+msgid "ninvalid"
+msgstr "ninválido"
+
+#: e2fsck/message.c:134
+msgid "oorphaned"
+msgstr "ohuérfano"
+
+#: e2fsck/message.c:135
+msgid "pproblem in"
+msgstr "pproblema en"
+
+#: e2fsck/message.c:136
+msgid "qquota"
+msgstr ""
+
+#: e2fsck/message.c:137
+msgid "rroot @i"
+msgstr "r@i raíz"
+
+#: e2fsck/message.c:138
+msgid "sshould be"
+msgstr "sdebería ser"
+
+#: e2fsck/message.c:139
+msgid "Ssuper@b"
+msgstr "Ssuper@b"
+
+#: e2fsck/message.c:140
+msgid "uunattached"
+msgstr "udesacoplado"
+
+#: e2fsck/message.c:141
+msgid "vdevice"
+msgstr "vdispositivo"
+
+#: e2fsck/message.c:142
+#, fuzzy
+msgid "xextent"
+msgstr "eentrada"
+
+#: e2fsck/message.c:143
+msgid "zzero-length"
+msgstr "zlongitud cero"
+
+#: e2fsck/message.c:154
+msgid "<The NULL inode>"
+msgstr "<El nodo-i NULO>"
+
+#: e2fsck/message.c:155
+msgid "<The bad blocks inode>"
+msgstr "<El nodo-i de bloques dañados>"
+
+#: e2fsck/message.c:157
+#, fuzzy
+msgid "<The user quota inode>"
+msgstr "<El nodo-i del fichero de transacciones>"
+
+#: e2fsck/message.c:158
+#, fuzzy
+msgid "<The group quota inode>"
+msgstr "<El nodo-i descriptor del grupo>"
+
+#: e2fsck/message.c:159
+msgid "<The boot loader inode>"
+msgstr "<El nodo-i del cargador de arranque>"
+
+#: e2fsck/message.c:160
+msgid "<The undelete directory inode>"
+msgstr "<El nodo-i del directorio de desborrado>"
+
+#: e2fsck/message.c:161
+msgid "<The group descriptor inode>"
+msgstr "<El nodo-i descriptor del grupo>"
+
+#: e2fsck/message.c:162
+msgid "<The journal inode>"
+msgstr "<El nodo-i del fichero de transacciones>"
+
+#: e2fsck/message.c:163
+msgid "<Reserved inode 9>"
+msgstr "<Se ha reservado el nodo-i 9>"
+
+#: e2fsck/message.c:164
+msgid "<Reserved inode 10>"
+msgstr "<Se ha reservado el nodo-i 10>"
+
+#: e2fsck/message.c:333
+msgid "regular file"
+msgstr "fichero regular"
+
+#: e2fsck/message.c:335
+msgid "directory"
+msgstr "directorio"
+
+#: e2fsck/message.c:337
+msgid "character device"
+msgstr "dispositivo de caracteres"
+
+#: e2fsck/message.c:339
+msgid "block device"
+msgstr "dispositivo de bloque"
+
+#: e2fsck/message.c:341
+msgid "named pipe"
+msgstr "tubería designada"
+
+#: e2fsck/message.c:343
+msgid "symbolic link"
+msgstr "enlace simbólico"
+
+#: e2fsck/message.c:345 misc/uuidd.c:161
+msgid "socket"
+msgstr "zócalo"
+
+#: e2fsck/message.c:347
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "tipo de fichero desconocido con modo 0%o"
+
+#: e2fsck/message.c:423
+#, fuzzy
+msgid "indirect block"
+msgstr "leyendo bloque de directorio"
+
+#: e2fsck/message.c:425
+#, fuzzy
+msgid "double indirect block"
+msgstr "leyendo bloque de directorio"
+
+#: e2fsck/message.c:427
+#, fuzzy
+msgid "triple indirect block"
+msgstr "leyendo bloque de directorio"
+
+#: e2fsck/message.c:429
+#, fuzzy
+msgid "translator block"
+msgstr "Reubicando bloques"
+
+#: e2fsck/message.c:431
+#, fuzzy
+msgid "block #"
+msgstr "bbloque"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "mapa de nodos-i reclamados en múltiples ocasiones"
+
+#: e2fsck/pass1b.c:610 e2fsck/pass1b.c:729
+#, fuzzy, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "error interno: no se encontró el dup_blk para %u\n"
+
+#: e2fsck/pass1b.c:820
+msgid "returned from clone_file_block"
+msgstr "regresado del clone_file_block"
+
+#: e2fsck/pass1b.c:842
+#, fuzzy, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "Error interno: no se puede encontrar el dir_info para %i.\n"
+
+#: e2fsck/pass1b.c:854
+#, fuzzy, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "Error interno: no se puede encontrar el dir_info para %i.\n"
+
+#: e2fsck/pass1.c:476 e2fsck/pass2.c:782
+msgid "reading directory block"
+msgstr "leyendo bloque de directorio"
+
+#: e2fsck/pass1.c:599
+msgid "in-use inode map"
+msgstr "mapa de nodos-i usados"
+
+#: e2fsck/pass1.c:610
+msgid "directory inode map"
+msgstr "mapa de nodos-i de directorio"
+
+#: e2fsck/pass1.c:620
+msgid "regular file inode map"
+msgstr "mapa de nodos-i de ficheros normales"
+
+#: e2fsck/pass1.c:629
+msgid "in-use block map"
+msgstr "mapa de bloques usados"
+
+#: e2fsck/pass1.c:696
+msgid "opening inode scan"
+msgstr "iniciando la exploración de los nodos-i"
+
+#: e2fsck/pass1.c:730
+msgid "getting next inode from scan"
+msgstr "obteniendo el siguiente nodo-i para examinar"
+
+#: e2fsck/pass1.c:1240
+msgid "Pass 1"
+msgstr "Paso 1"
+
+#: e2fsck/pass1.c:1297
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "leyendo bloques indirectos del nodo-i %u"
+
+#: e2fsck/pass1.c:1347
+msgid "bad inode map"
+msgstr "mapa de nodos-i dañados"
+
+#: e2fsck/pass1.c:1370
+msgid "inode in bad block map"
+msgstr "el nodo-i está en el mapa de bloques dañados"
+
+#: e2fsck/pass1.c:1390
+msgid "imagic inode map"
+msgstr "mapa de nodos-i con 'imagic'"
+
+#: e2fsck/pass1.c:1417
+msgid "multiply claimed block map"
+msgstr "mapa de bloques reclamados en múltiples ocasiones"
+
+#: e2fsck/pass1.c:1518
+msgid "ext attr block map"
+msgstr "mapa de bloques de atributos extendidos"
+
+#: e2fsck/pass1.c:2266
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr ""
+
+#: e2fsck/pass1.c:2627
+msgid "block bitmap"
+msgstr "mapa de bits de bloques"
+
+#: e2fsck/pass1.c:2633
+msgid "inode bitmap"
+msgstr "mapa de bits de nodos-i"
+
+#: e2fsck/pass1.c:2639
+msgid "inode table"
+msgstr "tabla de nodos-i"
+
+#: e2fsck/pass2.c:283
+msgid "Pass 2"
+msgstr "Paso 2"
+
+#: e2fsck/pass2.c:805
+#, fuzzy
+msgid "Can not continue."
+msgstr ""
+"No se puede continuar, se finaliza.\n"
+"\n"
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr "mapa de bits de nodos-i pasados"
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Memoria pico"
+
+#: e2fsck/pass3.c:136
+msgid "Pass 3"
+msgstr "Paso 3"
+
+#: e2fsck/pass3.c:322
+msgid "inode loop detection bitmap"
+msgstr "mapa de bits de detección de ciclos de nodos-i"
+
+#: e2fsck/pass4.c:195
+msgid "Pass 4"
+msgstr "Paso 4"
+
+#: e2fsck/pass5.c:74
+msgid "Pass 5"
+msgstr "Paso 5"
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(no hay 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:52
+msgid "Fix"
+msgstr "Arreglar"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Borrar"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Reubicar"
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr "Reservar"
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr "Expandir"
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr "Conectar a /lost+found"
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr "Crear"
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr "Recuperar"
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr "Truncar"
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr "Borrar nodo-i"
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr "Interrumpir"
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr "Dividir"
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr "Continuar"
+
+#: e2fsck/problem.c:65
+msgid "Clone multiply-claimed blocks"
+msgstr "Clonar los bloques reclamados en múltiples ocasiones"
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr "Borrar fichero"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Eliminar mensajes"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "Desvincular"
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "Borrar el índice del árbol-H"
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr "Recrear"
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr "(NINGUNO)"
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr "ARREGLADO"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "BORRADO"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "REUBICADO"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "RESERVADO"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "EXPANDIDO"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "RECONECTADO"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "CREADO"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "RECUPERADO"
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr "TRUNCADO"
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr "NODO-I BORRADO"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "INTERRUMPIDO"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr "DIVIDIDO"
+
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr "CONTINUANDO"
+
+#: e2fsck/problem.c:93
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "SE CLONARON LOS BLOQUES RECLAMADOS EN MÚLTIPLES OCASIONES"
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr "FICHERO BORRADO"
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr "SUPRIMIDO"
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr "DESVINCULADO"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "SE BORRÓ EL ÍNDICE DEL ÁRBOL-H"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "SE RECREARÁ"
+
+#. @-expanded: block bitmap for group %g is not in group.  (block %b)\n
+#: e2fsck/problem.c:107
+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:111
+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:116
+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 SEVERA.\n"
+
+#. @-expanded: \n
+#. @-expanded: The superblock could not be read or does not describe a correct ext2\n
+#. @-expanded: filesystem.  If the device is valid and it really contains an ext2\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 %S <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:122
+#, c-format
+msgid ""
+"\n"
+"The @S could not be read or does not describe a correct ext2\n"
+"@f.  If the @v is valid and it really contains an ext2\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 %S <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"El @S podría no ser leido o no describe un @f ext2 correcto.\n"
+"Si el @v es válido y en verdad contiene un @f ext2 (y no uno \n"
+"de intercambio, ufs o algo más), entonces el @S está corrompido\n"
+"y podría intentarse ejecutar el 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:131
+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"
+"¡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:138
+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 ""
+"El tamaño_del_@b del @S es %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:145
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "El @bs_per_group del @S = %b y debería haber sido %c\n"
+
+#. @-expanded: superblock first_data_block = %b, should have been %c\n
+#: e2fsck/problem.c:150
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "El first_data_@b del @S = %b y debería haber sido %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:155
+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:160
+#, 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 se quiera intentar ejecutar e2fsck con\n"
+"la opción '-b %S'. El problema podría estar únicamente en el\n"
+"descriptor primario del grupo de bloques y posiblemente el\n"
+"descriptor del grupo de bloques de respaldo pudiera estar bien.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock.  (%s = %N).\n
+#: e2fsck/problem.c:169
+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:174
+#, 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:179
+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:183
+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:188
+#, fuzzy, c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "@S tiene un @j ext3 @n (@i %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:193
+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:198
+msgid "Can't find external @j\n"
+msgstr "No puedo encontrar un @j externo\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:203
+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:208
+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:213
+#, 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 ""
+"El @S del @j ext3 es de un tipo desconocido %N (no implementado).\n"
+"Es posible 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:221
+#, fuzzy
+msgid "@j @S is corrupt.\n"
+msgstr "El @S del @j ext3 está corrupto.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal %s is present.\n
+#: e2fsck/problem.c:226
+#, fuzzy, c-format
+msgid "@S has_@j flag is clear, but a @j %s is present.\n"
+msgstr ""
+"La bandera de recuperación del ext3 está limpia, pero el @j\n"
+"contiene información.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:231
+#, fuzzy
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr ""
+"El @S tiene ext3 y la bandera need_recovery está activada, pero no hay @j.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:236
+#, fuzzy
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr ""
+"La bandera de recuperación del ext3 está limpia, pero el @j\n"
+"contiene información.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:241
+msgid "Clear @j"
+msgstr "Borrar el @j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.  
+#: e2fsck/problem.c:246 e2fsck/problem.c:695
+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:251
+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:256
+#, fuzzy
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "@b @I #%B (%b) encontrado en un @i @o %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:261
+#, fuzzy
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Ya se borró el @b #%B (%b) encontrado en el @i @o %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:266
+#, 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:271
+#, c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "@i @I %i en la lista de @i @o.\n"
+
+#. @-expanded: journal superblock has an unknown read-only feature flag set.\n
+#: e2fsck/problem.c:276
+#, fuzzy
+msgid "@j @S has an unknown read-only feature flag set.\n"
+msgstr ""
+"El @S del @j ext3 tiene puesta una bandera desconocida en una característica "
+"de sólo lectura.\n"
+
+#. @-expanded: journal superblock has an unknown incompatible feature flag set.\n
+#: e2fsck/problem.c:281
+#, fuzzy
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr ""
+"El @S del @j ext3 tiene puesta una bandera desconocida en una característica "
+"incompatible.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:286
+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:291
+#, 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:296
+#, 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:301
+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:307
+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:312
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr ""
+"La bandera de recuperación no está activada 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:317
+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:322
+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:328
+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:333
+msgid "Resize @i not valid.  "
+msgstr "El nodo-i de cambio del tamaño no es válido.  "
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:338
+#, fuzzy
+msgid ""
+"@S last mount time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr "La última vez que se montó el superbloque es en el futuro.  "
+
+#. @-expanded: superblock last write time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:343
+#, fuzzy
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr "La última vez que se escribió en el superbloque es en el futuro.  "
+
+#. @-expanded: superblock hint for external superblock should be %X.  
+#: e2fsck/problem.c:347
+#, 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:352
+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:357
+msgid "@g descriptor %g checksum is %04x, should be %04y.  "
+msgstr ""
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:362
+#, 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:367
+msgid "@g descriptor %g has invalid unused inodes count %b.  "
+msgstr ""
+
+#. @-expanded: Last group block bitmap uninitialized.  
+#: e2fsck/problem.c:372
+msgid "Last @g @b @B uninitialized.  "
+msgstr ""
+
+#: e2fsck/problem.c:377
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr ""
+
+#: e2fsck/problem.c:381
+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)  
+#: e2fsck/problem.c:386
+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)  "
+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).  
+#: e2fsck/problem.c:392
+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).  "
+msgstr ""
+
+#. @-expanded: One or more block group descriptor checksums are invalid.  
+#: e2fsck/problem.c:398
+msgid "One or more @b @g descriptor checksums are invalid.  "
+msgstr ""
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:403
+#, fuzzy
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr "Se pone la cantidad de bloques reservados a %lu\n"
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:408
+#, fuzzy
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Se pone la cantidad de bloques reservados a %lu\n"
+
+#. @-expanded: Making quota inode %i (%Q) hidden.\n
+#: e2fsck/problem.c:413
+#, fuzzy
+msgid "Making @q @i %i (%Q) hidden.\n"
+msgstr ""
+"Moviendo el @j de /%s a un nodo-i oculto.\n"
+"\n"
+
+#. @-expanded: superblock has invalid MMP block.  
+#: e2fsck/problem.c:418
+#, fuzzy
+msgid "@S has invalid MMP block.  "
+msgstr "tamaño del bloque inválido - %s"
+
+#. @-expanded: superblock has invalid MMP magic.  
+#: e2fsck/problem.c:423
+msgid "@S has invalid MMP magic.  "
+msgstr ""
+
+#: e2fsck/problem.c:428
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:433
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr ""
+
+# 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:440
+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:444
+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:449
+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:454
+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:459
+#, c-format
+msgid "@D @i %i has zero dtime.  "
+msgstr "@i %i @D, tiene un dtime cero.  "
+
+#. @-expanded: inode %i is in use, but has dtime set.  
+#: e2fsck/problem.c:464
+#, c-format
+msgid "@i %i is in use, but has dtime set.  "
+msgstr "@i %i está en uso, pero tiene puesto dtime.  "
+
+#. @-expanded: inode %i is a zero-length directory.  
+#: e2fsck/problem.c:469
+#, c-format
+msgid "@i %i is a @z @d.  "
+msgstr "@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:474
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "@b del @B del @g %g @C está en %b.\n"
+
+#. @-expanded: group %g's inode bitmap at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:479
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "El @i del @B del @g %g @C en %b.\n"
+
+#. @-expanded: group %g's inode table at %b conflicts with some other fs block.\n
+#: e2fsck/problem.c:484
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "La tabla de @i del @g %g @C en %b.\n"
+
+#. @-expanded: group %g's block bitmap (%b) is bad.  
+#: e2fsck/problem.c:489
+msgid "@g %g's @b @B (%b) is bad.  "
+msgstr "El @b del @B (%B) del @g %g está dañado.  "
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.  
+#: e2fsck/problem.c:494
+msgid "@g %g's @i @B (%b) is bad.  "
+msgstr "El @i del @B (%B) del @g %g está dañado.  "
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.  
+#: e2fsck/problem.c:499
+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:504
+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:509
+#, fuzzy
+msgid "@I %B (%b) in @i %i.  "
+msgstr "@I @b #%B (%b) en @i %i.  "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.  
+#: e2fsck/problem.c:514
+#, fuzzy
+msgid "%B (%b) overlaps @f metadata in @i %i.  "
+msgstr "@b #%B (%b) se encima con los metadatos del @f en el @i %i.  "
+
+#. @-expanded: inode %i has illegal block(s).  
+#: e2fsck/problem.c:519
+#, 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:524
+#, 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:529
+#, fuzzy
+msgid "@I %B (%b) in bad @b @i.  "
+msgstr "@b @I #%B (%b) en el @b del @i dañado.  "
+
+#. @-expanded: Bad block inode has illegal block(s).  
+#: e2fsck/problem.c:534
+msgid "Bad @b @i has illegal @b(s).  "
+msgstr "@b del @i dañado tiene @b(s) inválido(s).  "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:539
+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:544
+msgid "Bad @b %b used as bad @b @i indirect @b.  "
+msgstr "El @b %b dañado se usa de forma indirecta como @b del @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:549
+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:556
+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:561
+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 @b de la lista de @bs y esperar\n"
+"que el @b 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:567
+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:572
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr ""
+"El bloque %b en los descriptores primarios del @g está en la lista de @bs "
+"dañados\n"
+
+#. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
+#: e2fsck/problem.c:578
+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:583
+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:589
+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:595
+msgid "@A %N contiguous @b(s) in @b @g %g for %s: %m\n"
+msgstr "@A %N, es contigua a los @bs en el @b del @g %g para %s: %m\n"
+
+#. @-expanded: error allocating block buffer for relocating %s\n
+#: e2fsck/problem.c:600
+#, c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "@A del búfer del @b por reubicar %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:605
+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:610
+#, 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:615
+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:620
+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:625 e2fsck/problem.c:1460
+msgid "@A @i @B (%N): %m\n"
+msgstr "Hay un @A del @B del @i (%N): %m\n"
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:630
+msgid "@A @b @B (%N): %m\n"
+msgstr "Hay un @A del @b del @B (%N): %m\n"
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:635
+#, c-format
+msgid "@A icount link information: %m\n"
+msgstr "@A en la cuenta-i de la información del enlace: %m\n"
+
+# array -> matriz
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:640
+#, c-format
+msgid "@A @d @b array: %m\n"
+msgstr "@A el arreglo del @b de @ds: %m\n"
+
+#. @-expanded: Error while scanning inodes (%i): %m\n
+#: e2fsck/problem.c:645
+#, 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:650
+#, 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:655
+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:660
+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:666
+#, 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:674
+#, 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:679
+#, c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set.  "
+msgstr ""
+"El fichero especial (dispositivo/zócalo/fifo/enlace símbolico) (@i %i)\n"
+"no es modificable o tiene la bandera 'append-only' (sólo añadir).  "
+
+#. @-expanded: inode %i has compression flag set on filesystem without compression support.  
+#: e2fsck/problem.c:685
+#, c-format
+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.  "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.  
+#: e2fsck/problem.c:690
+#, c-format
+msgid "Special (@v/socket/fifo) @i %i has non-zero size.  "
+msgstr ""
+"El fichero especial (dispositivo/zócalo/fifo) (@i %i)\n"
+"tiene un tamaño distinto de cero.  "
+
+#. @-expanded: journal inode is not in use, but contains data.  
+#: e2fsck/problem.c:700
+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:705
+msgid "@j is not regular file.  "
+msgstr "el @j no es un fichero regular.  "
+
+#. @-expanded: inode %i was part of the orphaned inode list.  
+#: e2fsck/problem.c:710
+#, 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:716
+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:721
+msgid "@A refcount structure (%N): %m\n"
+msgstr "@A de la estructura refcount (%N): %m\n"
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.  
+#: e2fsck/problem.c:726
+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:731
+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:736
+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:741
+#, fuzzy
+msgid "@a @b %b has reference count %r, @s %N.  "
+msgstr "El @b del @a %b tiene una cuenta de referencia %B y @s %N.  "
+
+#. @-expanded: Error writing extended attribute block %b (%m).  
+#: e2fsck/problem.c:746
+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:751
+msgid "@a @b %b has h_@bs > 1.  "
+msgstr "El @b del @a %b tiene h_@bs > 1.  "
+
+#. @-expanded: error allocating extended attribute block %b.  
+#: e2fsck/problem.c:756
+msgid "@A @a @b %b.  "
+msgstr "@A de @a @b %b.  "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).  
+#: e2fsck/problem.c:761
+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:766
+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:771
+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:776
+#, c-format
+msgid "@i %i is too big.  "
+msgstr "el @i %i es muy grande.  "
+
+#. @-expanded: %B (%b) causes directory to be too big.  
+#: e2fsck/problem.c:780
+#, fuzzy
+msgid "%B (%b) causes @d to be too big.  "
+msgstr "el @b #%B (%b) causa que el @d sea muy grande.  "
+
+#: e2fsck/problem.c:785
+#, fuzzy
+msgid "%B (%b) causes file to be too big.  "
+msgstr "el @b #%B (%b) causa que el fichero sea muy grande.  "
+
+#: e2fsck/problem.c:790
+#, fuzzy
+msgid "%B (%b) causes symlink to be too big.  "
+msgstr "el @b #%B (%b) causa que el enlace simbólico sea muy grande.  "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:795
+#, 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:800
+#, 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:805
+#, 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:810
+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:815
+#, 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:820
+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:825
+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:831
+#, 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:836
+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:841
+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:846
+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:851
+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:856
+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:861
+#, fuzzy
+msgid "@a in @i %i has a hash (%N) which is @n\n"
+msgstr "El @a en el @i %i tiene una longitud de nombre (%N) que es @n\n"
+
+#. @-expanded: inode %i is a %It but it looks like it is really a directory.\n
+#: e2fsck/problem.c:866
+msgid "@i %i is a %It but it looks like it is really a directory.\n"
+msgstr "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:871
+#, fuzzy, c-format
+msgid "Error while reading over @x tree in @i %i: %m\n"
+msgstr "Error mientras se iteraba sobre los @bs 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:876
+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:882
+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:887
+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:892
+#, fuzzy, c-format
+msgid "@i %i has EXTENTS_FL flag set on @f without extents support.\n"
+msgstr ""
+"el @i %i tiene la bandera INDEX_FL puesta en el @f sin el árbol-h "
+"implementado.\n"
+
+#. @-expanded: inode %i is in extent format, but superblock is missing EXTENTS feature\n
+#: e2fsck/problem.c:897
+#, 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:902
+#, c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr ""
+
+#: e2fsck/problem.c:907
+#, 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:912
+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:916
+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:921
+#, fuzzy, c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Error al iterar sobre los @bs del @d: %m\n"
+
+#. @-expanded: quota inode is not regular file.  
+#: e2fsck/problem.c:926
+#, fuzzy
+msgid "@q @i is not regular file.  "
+msgstr "el @j no es un fichero regular.  "
+
+#. @-expanded: quota inode is not in use, but contains data.  
+#: e2fsck/problem.c:931
+#, fuzzy
+msgid "@q @i is not in use, but contains data.  "
+msgstr "El @i del @j no está en uso, pero contiene información.  "
+
+#. @-expanded: quota inode is visible to the user.  
+#: e2fsck/problem.c:936
+#, fuzzy
+msgid "@q @i is visible to the user.  "
+msgstr "@i %i está en uso, pero tiene puesto dtime.  "
+
+#. @-expanded: The bad block inode looks invalid.  
+#: e2fsck/problem.c:941
+#, fuzzy
+msgid "The bad @b @i looks @n.  "
+msgstr "<El nodo-i de bloques dañados>"
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:946
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\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:953
+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:959
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "Bloque(s) reclamado(s) en múltiples ocasiones en nodo- %i.  "
+
+#: e2fsck/problem.c:974
+#, 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:979
+#, c-format
+msgid "@A @i @B (@i_dup_map): %m\n"
+msgstr "@A del @B del @i (@i_dup_map): %m\n"
+
+#. @-expanded: Error while iterating over blocks in inode %i (%s): %m\n
+#: e2fsck/problem.c:984
+#, 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:989 e2fsck/problem.c:1304
+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:994
+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:1000
+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:1005
+#, fuzzy
+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 %B @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:1011
+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:1016
+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:1021
+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:1026
+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:1039
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "No se puede clonar el fichero: %m\n"
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1045
+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:1050
+#, 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:1055
+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:1060
+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:1065
+msgid "@E @L to '.'  "
+msgstr "@E @L a '.'  "
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1070
+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"
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to directory %P (%Di).\n
+#: e2fsck/problem.c:1075
+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:1080
+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:1085
+msgid "@E has illegal characters in its name.\n"
+msgstr "La @E contiene caracteres no válidos en el nombre.\n"
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1090
+#, 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:1095
+#, 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:1100
+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:1105
+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:1110
+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:1115
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "El i_file_acl @F %If, @s cero.\n"
+
+#. @-expanded: i_dir_acl for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1120
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr "El i_dir_acl @F %Id, @s cero.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1125
+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:1130
+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:1135
+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:1140
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "El @i del @d %i, @b %B, desplazamiento %N: el @d está dañado\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1145
+#, fuzzy
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr ""
+"El @i del @d %i, @b %B, desplazamiento %N: el nombre del fichero es muy "
+"largo\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.  
+#: e2fsck/problem.c:1150
+#, fuzzy
+msgid "@d @i %i has an unallocated %B.  "
+msgstr "El @i %i del @d tiene un @b #%B que no está reservado.  "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1155
+#, c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "La @e en el @d '.' en el @i del @d %i no está terminada con NULL\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1160
+#, c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "La @e al @d '..' en el @i %i del @d no está terminada con NULL\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1165
+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:1170
+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:1175
+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:1180
+msgid "@E is duplicate '..' @e.\n"
+msgstr "La @E está duplicada en la @e '..'.\n"
+
+#: e2fsck/problem.c:1185 e2fsck/problem.c:1485
+#, 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:1190
+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:1195
+#, c-format
+msgid "@A icount structure: %m\n"
+msgstr "@A de la estructura icount: %m\n"
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1200
+#, 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:1205
+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:1210
+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:1215
+#, c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr "@A del @b del @d para el @i %i (%s): %m\n"
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1220
+#, 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:1225
+#, fuzzy, c-format
+msgid "@d @e for '.' in %p (%i) is big.\n"
+msgstr "La @e del @d para '.' es grande.  "
+
+#. @-expanded: inode %i (%Q) is an illegal FIFO.\n
+#: e2fsck/problem.c:1230
+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:1235
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "El @i %i (%Q) es un sócket @I.\n"
+
+#. @-expanded: Setting filetype for entry '%Dn' in %p (%i) to %N.\n
+#: e2fsck/problem.c:1240
+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:1245
+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:1250
+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:1255
+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:1260
+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:1265
+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:1270
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr ""
+"El @f contiene ficheros muy 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:1275
+#, fuzzy
+msgid "@p @h %d: %B not referenced\n"
+msgstr "Hay un @p en el @h %d: el nodo (%B) no ha sido referenciado.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1280
+#, fuzzy
+msgid "@p @h %d: %B referenced twice\n"
+msgstr "Hay un @p en el @h %d: el nodo (%B) ha sido referenciado dos veces.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad min hash\n
+#: e2fsck/problem.c:1285
+#, fuzzy
+msgid "@p @h %d: %B has bad min hash\n"
+msgstr "Hay un @p en el @h %d: el nodo (%B) tiene un hash mínimo incorrecto.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has bad max hash\n
+#: e2fsck/problem.c:1290
+#, fuzzy
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr "Hay un @p en el @h %d: el nodo (%B) tiene un hash máximo incorrecto.\n"
+
+#. @-expanded: invalid HTREE directory inode %d (%q).  
+#: e2fsck/problem.c:1295
+msgid "@n @h %d (%q).  "
+msgstr "El @h %d es @n (%q).  "
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1299
+msgid "@p @h %d (%q): bad @b number %b.\n"
+msgstr "Hay un @p en 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:1309
+#, c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "Hay un @p en 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:1314
+#, fuzzy
+msgid "@p @h %d: %B has @n limit (%N)\n"
+msgstr "Hay un @p en el @h %d: el nodo (%B) tiene un límite @n (%N).\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid count (%N)\n
+#: e2fsck/problem.c:1319
+#, fuzzy
+msgid "@p @h %d: %B has @n count (%N)\n"
+msgstr "Hay un @p en el @h %d: el nodo (%B) tiene una cuenta @n (%N).\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has an unordered hash table\n
+#: e2fsck/problem.c:1324
+#, fuzzy
+msgid "@p @h %d: %B has an unordered hash table\n"
+msgstr ""
+"Hay un @p en el @h %d: el nodo (%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:1329
+#, fuzzy
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr "Hay un @p en el @h %d: el nodo (%B) su profundidad es @n.\n"
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.  
+#: e2fsck/problem.c:1334
+msgid "Duplicate @E found.  "
+msgstr "@E está duplicada.  "
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1339
+#, no-c-format
+msgid ""
+"@E has a non-unique filename.\n"
+"Rename to %s"
+msgstr ""
+"La @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:1344
+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:1349
+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:1354
+#, fuzzy
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "El @d del @i %i (%p) está desconectado\n"
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1358
+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:1363
+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:1368
+#, fuzzy
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "El i_file_acl @F %If, @s cero.\n"
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1375
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Paso 3: Revisando la conectividad de directorios\n"
+
+#. @-expanded: root inode not allocated.  
+#: e2fsck/problem.c:1380
+msgid "@r not allocated.  "
+msgstr "El @r no ha sido reservado.  "
+
+#. @-expanded: No room in lost+found directory.  
+#: e2fsck/problem.c:1385
+msgid "No room in @l @d.  "
+msgstr "No hay espacio en el @d @l.  "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1390
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "El @d del @i %i (%p) está desconectado\n"
+
+#. @-expanded: /lost+found not found.  
+#: e2fsck/problem.c:1395
+msgid "/@l not found.  "
+msgstr "No se encontró /@l.  "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1400
+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:1405
+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:1410
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "No se puede expandir /@l: %m\n"
+
+#: e2fsck/problem.c:1415
+#, 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:1420
+#, 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:1425
+#, 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:1430
+#, 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:1435
+#, 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:1440
+#, 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:1445
+#, 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:1450
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+"No se puede corregir 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:1455
+#, 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:1465
+#, 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:1470
+#, 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:1475
+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:1480
+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:1490
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "El /@l no es un @d (ino=%i)\n"
+
+#: e2fsck/problem.c:1497
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Paso 3A: Optimizando directorios\n"
+
+#: e2fsck/problem.c:1502
+#, fuzzy, c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "Falla al crear el iterador dirs_to_hash: %m"
+
+#: e2fsck/problem.c:1507
+#, fuzzy
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Fallo al optimizar el directorio %q (%d): %m"
+
+#: e2fsck/problem.c:1512
+msgid "Optimizing directories: "
+msgstr "Optimizando directorios: "
+
+#: e2fsck/problem.c:1529
+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:1534
+#, c-format
+msgid "@u @z @i %i.  "
+msgstr "@i %i que tiene @z está @u.  "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1539
+#, 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:1544
+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:1548
+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: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1558
+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:1563
+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:1568
+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:1573
+msgid "@b @B differences: "
+msgstr "Diferencias del @B del @b: "
+
+#. @-expanded: inode bitmap differences: 
+#: e2fsck/problem.c:1593
+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:1613
+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:1618
+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:1623
+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:1628
+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:1633
+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:1638
+msgid ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
+"endpoints (%i, %j)\n"
+msgstr ""
+"ERROR DE PROGRAMACIÓN: el @f (#%N) los puntos finales del %B (%b, %c) no "
+"coinciden con los puntos finales del @B calculados (%i, %j)\n"
+
+#: e2fsck/problem.c:1644
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "Error interno: el final del bitmap no tiene sentido (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:1649
+#, 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:1654
+#, 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:1679
+#, 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:1684
+#, c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr ""
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:1691
+#, fuzzy
+msgid "Recreate @j"
+msgstr "Recrear"
+
+#: e2fsck/problem.c:1696
+msgid "Update quota info for quota type %N"
+msgstr ""
+
+#: e2fsck/problem.c:1815
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "¡Código de error no previsto (0x%x)!\n"
+
+#: e2fsck/problem.c:1940 e2fsck/problem.c:1944
+msgid "IGNORED"
+msgstr "SE IGNORA"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Memoria utilizada: %d, 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:119
+msgid "while starting inode scan"
+msgstr "mientras se comenzaba a explorar los nodos-i"
+
+#: e2fsck/scantest.c:130
+msgid "while doing inode scan"
+msgstr "mientras se exploraba los nodos-i"
+
+#: e2fsck/super.c:188
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr "mientras se llamaba a ext2fs_block_iterate para el nodo-i %d"
+
+#: e2fsck/super.c:211
+#, fuzzy, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %d"
+msgstr "mientras se llamaba a ext2fs_adjust_ea_refcount para el nodo-i %d"
+
+#: e2fsck/super.c:272
+msgid "Truncating"
+msgstr "Truncando"
+
+#: e2fsck/super.c:273
+msgid "Clearing"
+msgstr "Borrando"
+
+#: e2fsck/unix.c:74
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-panyrcdfvtDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] device\n"
+msgstr ""
+"Modo de empleo: %s [-panyrcdfvstDFSV] [-b superbloque] [-B tamañodelbloque]\n"
+"\t\t[-I bloques_del_búfer_del_nodo-i] [-P tamaño_del_proceso_del_nodo-i]\n"
+"\t\t[-l|-L fichero_de_bloques_dañados] [-C fd] [-j fichero-de-transacciones-"
+"externo]\n"
+"\t\t[-E opciones-extendidas] dispositivo\n"
+
+#: e2fsck/unix.c:80
+#, c-format
+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                   Contestar \"si\" 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 aún si el sistema de ficheros\n"
+"                      está etiquetado como limpio\n"
+
+#: e2fsck/unix.c:86
+#, c-format
+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"
+msgstr ""
+" -v                      Genera más mensajes de diagnóstico\n"
+" -b superbloque          Utiliza el superbloque alternativo\n"
+" -B tamañodelbloque      Fuerza el tamañodelbloque cuando busca "
+"al                         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"
+
+#: e2fsck/unix.c:130
+#, fuzzy, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s: %u/%u ficheros (%0d.%d%% no contiguos), %u/%u bloques\n"
+
+#: e2fsck/unix.c:137
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%8u inode used (%2.2f%%)\n"
+msgid_plural ""
+"\n"
+"%8u inodes used (%2.2f%%)\n"
+msgstr[0] ""
+"\n"
+"%8d nodo-i utilizado (%d%%)\n"
+msgstr[1] ""
+"\n"
+"%8d nodos i utilizados (%d%%)\n"
+
+#: e2fsck/unix.c:141
+#, fuzzy, c-format
+msgid "%8u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%8u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] "%8d nodo-i no contiguo (%0d.%d%%)\n"
+msgstr[1] "%8d nodos i no contiguos (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:146
+#, fuzzy, c-format
+msgid "%8u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%8u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] "%8d nodo-i no contiguo (%0d.%d%%)\n"
+msgstr[1] "%8d nodos i no contiguos (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:151
+#, c-format
+msgid "         # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr "         # de nodos-i con bloques ind/dind/tind: %u/%u/%u\n"
+
+#: e2fsck/unix.c:159
+msgid "         Extent depth histogram: "
+msgstr ""
+
+#: e2fsck/unix.c:168
+#, fuzzy, c-format
+msgid "%8llu block used (%2.2f%%)\n"
+msgid_plural "%8llu blocks used (%2.2f%%)\n"
+msgstr[0] "%8d bloque usado (%d%%)\n"
+msgstr[1] "%d bloques usados (%d%%)\n"
+
+#: e2fsck/unix.c:171
+#, fuzzy, c-format
+msgid "%8u bad block\n"
+msgid_plural "%8u bad blocks\n"
+msgstr[0] "%8d bloque dañado\n"
+msgstr[1] "%8d bloques dañados\n"
+
+#: e2fsck/unix.c:173
+#, fuzzy, c-format
+msgid "%8u large file\n"
+msgid_plural "%8u large files\n"
+msgstr[0] "%8d fichero grande\n"
+msgstr[1] "%8d ficheros grandes\n"
+
+#: e2fsck/unix.c:175
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%8u regular file\n"
+msgid_plural ""
+"\n"
+"%8u regular files\n"
+msgstr[0] "fichero regular"
+msgstr[1] "fichero regular"
+
+#: e2fsck/unix.c:177
+#, fuzzy, c-format
+msgid "%8u directory\n"
+msgid_plural "%8u directories\n"
+msgstr[0] "%8d directorio\n"
+msgstr[1] "%8d directorios\n"
+
+#: e2fsck/unix.c:179
+#, fuzzy, c-format
+msgid "%8u character device file\n"
+msgid_plural "%8u character device files\n"
+msgstr[0] "dispositivo de caracteres"
+msgstr[1] "dispositivo de caracteres"
+
+#: e2fsck/unix.c:182
+#, fuzzy, c-format
+msgid "%8u block device file\n"
+msgid_plural "%8u block device files\n"
+msgstr[0] "dispositivo de bloque"
+msgstr[1] "dispositivo de bloque"
+
+#: e2fsck/unix.c:184
+#, fuzzy, c-format
+msgid "%8u fifo\n"
+msgid_plural "%8u fifos\n"
+msgstr[0] "%8d fifo\n"
+msgstr[1] "%8d fifos\n"
+
+#: e2fsck/unix.c:186
+#, fuzzy, c-format
+msgid "%8u link\n"
+msgid_plural "%8u links\n"
+msgstr[0] "%8d vínculo\n"
+msgstr[1] "%8d vínculos\n"
+
+#: e2fsck/unix.c:189
+#, fuzzy, c-format
+msgid "%8u symbolic link"
+msgid_plural "%8u symbolic links"
+msgstr[0] "enlace simbólico"
+msgstr[1] "enlace simbólico"
+
+#: e2fsck/unix.c:191
+#, fuzzy, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] "(%d vínculo simbólico rápido)\n"
+msgstr[1] "(%d vínculos simbólicos rápidos)\n"
+
+#: e2fsck/unix.c:195
+#, fuzzy, c-format
+msgid "%8u socket\n"
+msgid_plural "%8u sockets\n"
+msgstr[0] "zócalo"
+msgstr[1] "zócalo"
+
+#: e2fsck/unix.c:198
+#, fuzzy, c-format
+msgid "%8u file\n"
+msgid_plural "%8u files\n"
+msgstr[0] "%8d fichero\n"
+msgstr[1] "%8d ficheros\n"
+
+#: e2fsck/unix.c:212 misc/badblocks.c:983 misc/tune2fs.c:1979 misc/util.c:147
+#: resize/main.c:247
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "mientras se determinaba si %s está montado."
+
+#: e2fsck/unix.c:230
+#, fuzzy, c-format
+msgid "Warning!  %s is %s.\n"
+msgstr "¡Atención! %s está montado.\n"
+
+#: e2fsck/unix.c:237
+#, c-format
+msgid "%s is %s.\n"
+msgstr ""
+
+#: e2fsck/unix.c:240
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"No se puede continuar, se finaliza.\n"
+"\n"
+
+#: e2fsck/unix.c:242
+#, 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\a¡¡ATENCIÓN!!  Ejecutar e2fsck en un sistema de ficheros montado\n"
+"puede causar GRAVES daños al sistema de ficheros.\a\a\a\n"
+"\n"
+
+#: e2fsck/unix.c:247
+msgid "Do you really want to continue"
+msgstr "¿De verdad quiere continuar?"
+
+#: e2fsck/unix.c:249
+#, c-format
+msgid "check aborted.\n"
+msgstr "revisión terminada.\n"
+
+#: e2fsck/unix.c:339
+msgid " contains a file system with errors"
+msgstr " contiene un sistema de ficheros con errores"
+
+#: e2fsck/unix.c:341
+msgid " was not cleanly unmounted"
+msgstr " no fue desmontado limpiamente"
+
+#: e2fsck/unix.c:343
+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:347
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " ha sido montado %u veces sin ser revisado"
+
+#: e2fsck/unix.c:354
+#, fuzzy
+msgid " has filesystem last checked time in the future"
+msgstr "Se pone la hora de la última revisión al sistema de ficheros a %s\n"
+
+#: e2fsck/unix.c:360
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " ya lleva %u días sin ser revisado"
+
+#: e2fsck/unix.c:369
+msgid ", check forced.\n"
+msgstr ", se fuerza la revisión.\n"
+
+#: e2fsck/unix.c:402
+#, fuzzy, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: limpio, %u/%u ficheros, %u/%u bloques"
+
+#: e2fsck/unix.c:421
+msgid " (check deferred; on battery)"
+msgstr " (comprobación aplazada; con baterías)"
+
+# O "revisión después del siguiente montaje".
+#: e2fsck/unix.c:424
+msgid " (check after next mount)"
+msgstr " (comprobación en el siguiente montaje)"
+
+#: e2fsck/unix.c:426
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (comprobación después de %ld montajes)"
+
+#: e2fsck/unix.c:576
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "ERROR: no se puede abrir /dev/null (%s)\n"
+
+#: e2fsck/unix.c:645
+#, c-format
+msgid "Invalid EA version.\n"
+msgstr "Versión de EA no válida.\n"
+
+#: e2fsck/unix.c:672
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Opción extendida desconocida: %s\n"
+
+#: e2fsck/unix.c:697
+#, 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:766
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Error al validar el descriptor de ficheros %d: %s\n"
+
+#: e2fsck/unix.c:770
+msgid "Invalid completion information file descriptor"
+msgstr "Información de consistencia no válida en el descriptor de ficheros"
+
+#: e2fsck/unix.c:785
+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:806
+#, 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:837 e2fsck/unix.c:909 misc/tune2fs.c:811 misc/tune2fs.c:1100
+#: misc/tune2fs.c:1118
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "No es posible resolver '%s'"
+
+#: e2fsck/unix.c:888
+#, fuzzy
+msgid "The -n and -D options are incompatible."
+msgstr ""
+"%s: Las opciones -n y -w se excluyen mutuamente.\n"
+"\n"
+
+#: e2fsck/unix.c:893
+#, fuzzy
+msgid "The -n and -c options are incompatible."
+msgstr ""
+"%s: Las opciones -n y -w se excluyen mutuamente.\n"
+"\n"
+
+#: e2fsck/unix.c:898
+#, fuzzy
+msgid "The -n and -l/-L options are incompatible."
+msgstr ""
+"%s: Las opciones -n y -w se excluyen mutuamente.\n"
+"\n"
+
+#: e2fsck/unix.c:943
+#, c-format
+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:991
+#, 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:1000
+#, 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:1089
+#, c-format
+msgid ""
+"MMP interval is %u seconds and total wait time is %u seconds. Please "
+"wait...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1106 e2fsck/unix.c:1111
+#, fuzzy
+msgid "while checking MMP block"
+msgstr "mientras se ajustaba el superbloque"
+
+#: e2fsck/unix.c:1113 misc/tune2fs.c:1912
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+
+#: e2fsck/unix.c:1163
+#, c-format
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "¡Error: la versión de la biblioteca ext2fs está caduca!\n"
+
+#: e2fsck/unix.c:1171
+msgid "while trying to initialize program"
+msgstr "mientras se intentaba inicializar el programa"
+
+#: e2fsck/unix.c:1194
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tAl emplear %s, %s\n"
+
+#: e2fsck/unix.c:1206
+msgid "need terminal for interactive repairs"
+msgstr "se necesita una terminal para hacer las reparaciones interactivas"
+
+#: e2fsck/unix.c:1256
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s intentando los bloques de respaldo...\n"
+
+#: e2fsck/unix.c:1258
+msgid "Superblock invalid,"
+msgstr "Superbloque es inválido,"
+
+#: e2fsck/unix.c:1259
+msgid "Group descriptors look bad..."
+msgstr "Los descriptores de los grupos parecen dañados..."
+
+#: e2fsck/unix.c:1269
+#, fuzzy, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s intentando los bloques de respaldo...\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/unix.c:1273
+#, fuzzy, c-format
+msgid "%s: going back to original superblock\n"
+msgstr ""
+"%s: no se encontró un superbloque válido en el fichero de transacciones\n"
+
+#: e2fsck/unix.c:1301
+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:1307
+msgid "Could this be a zero-length partition?\n"
+msgstr "¿Esta podría ser una partición de longitud cero?\n"
+
+#: e2fsck/unix.c:1310
+#, 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:1315
+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:1318
+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:1321
+#, fuzzy
+msgid "Possibly non-existent device?\n"
+msgstr "¿Es posible que no exista o que sea un dispositivo de intercambio?\n"
+
+#: e2fsck/unix.c:1324
+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:1389
+msgid "Get a newer version of e2fsck!"
+msgstr "¡Consiga una versión más moderna de e2fsck!"
+
+#: e2fsck/unix.c:1437
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr "mientras se revisaba el fichero de transacciones ext3 para %s"
+
+#: e2fsck/unix.c:1448
+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:1461
+#, 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:1467
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr "mientras se recuperaba el fichero de transacciones ext3 de %s"
+
+#: e2fsck/unix.c:1492
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s tiene características no soportadas:"
+
+#: e2fsck/unix.c:1507
+#, fuzzy, c-format
+msgid "%s: warning: compression support is experimental.\n"
+msgstr "Atención: el soporte a la compresión es experimental.\n"
+
+#: e2fsck/unix.c:1513
+#, fuzzy, c-format
+msgid ""
+"%s: e2fsck not compiled with HTREE support,\n"
+"\tbut filesystem %s has HTREE directories.\n"
+msgstr ""
+"E2fsck no está compilado con soporte a ÁRBOLES-H,\n"
+"\tpero el sistema de ficheros %s tiene directorios con ÁRBOLES-H.\n"
+
+#: e2fsck/unix.c:1565
+#, fuzzy, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "mientras se leían los bloques dañados del nodo-i"
+
+#: e2fsck/unix.c:1568
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr "Esto no se se ve muy bien, pero se intentará continuar...\n"
+
+#: e2fsck/unix.c:1609
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Creando el fichero de transacciones (%d bloques): "
+
+#: e2fsck/unix.c:1619
+msgid " Done.\n"
+msgstr " Hecho.\n"
+
+#: e2fsck/unix.c:1620
+msgid ""
+"\n"
+"*** journal has been re-created - filesystem is now ext3 again ***\n"
+msgstr ""
+"\n"
+"*** el fichero de transacciones se ha creado de nuevo ***\n"
+"*** el sistema de ficheros vuelve a ser ext3 ***\n"
+
+#: e2fsck/unix.c:1643
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Se reinicia e2fsck desde el principio...\n"
+
+#: e2fsck/unix.c:1647
+msgid "while resetting context"
+msgstr "mientras se reajusta el contexto"
+
+#: e2fsck/unix.c:1654
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: se cancela e2fsck.\n"
+
+#: e2fsck/unix.c:1659
+msgid "aborted"
+msgstr "finalizado"
+
+#: e2fsck/unix.c:1671 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:1675
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr "%s: ***** REINICIE LINUX *****\n"
+
+#: e2fsck/unix.c:1683 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/unix.c:1723
+#, fuzzy
+msgid "while setting block group checksum info"
+msgstr "mientras se ponía el nodo-i de bloques dañados"
+
+#: e2fsck/util.c:189 misc/util.c:70
+msgid "yY"
+msgstr "sS"
+
+#: e2fsck/util.c:190
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:204
+msgid "<y>"
+msgstr "<s>"
+
+#: e2fsck/util.c:206
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:208
+msgid " (y/n)"
+msgstr " (s/n)"
+
+#: e2fsck/util.c:222
+msgid "cancelled!\n"
+msgstr "¡cancelado!\n"
+
+#: e2fsck/util.c:237
+msgid "yes\n"
+msgstr "si\n"
+
+#: e2fsck/util.c:239
+msgid "no\n"
+msgstr "no\n"
+
+#: e2fsck/util.c:249
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"¿%s? no\n"
+"\n"
+
+#: e2fsck/util.c:253
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"¿%s? si\n"
+"\n"
+
+#: e2fsck/util.c:257
+msgid "yes"
+msgstr "si"
+
+#: e2fsck/util.c:257
+msgid "no"
+msgstr "no"
+
+#: e2fsck/util.c:272
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: bloque(s) ilegal(es) de mapas de bits para %s"
+
+#: e2fsck/util.c:277
+msgid "reading inode and block bitmaps"
+msgstr "leyendo los mapas de bits del nodo-i y del bloque"
+
+#: e2fsck/util.c:285
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "mientras se intentaban leer los mapas de bits para %s"
+
+#: e2fsck/util.c:297
+#, fuzzy
+msgid "writing block and inode bitmaps"
+msgstr "escribiendo los mapas de bits del bloque"
+
+#: e2fsck/util.c:302
+#, fuzzy, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr ""
+"mientras se reintentaba escribir los mapas de bits de los nodos-i para %s"
+
+#: e2fsck/util.c:314
+#, 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:395
+#, fuzzy, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Memoria utilizada: %dk/%dk (%dk/%dk), "
+
+#: e2fsck/util.c:399
+#, fuzzy, c-format
+msgid "Memory used: %lu, "
+msgstr "Memoria utilizada: %d, "
+
+#: e2fsck/util.c:406
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "fecha: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:411
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "tiempo transcurrido: %6.3f\n"
+
+#: e2fsck/util.c:446 e2fsck/util.c:460
+#, fuzzy, c-format
+msgid "while reading inode %lu in %s"
+msgstr "mientras se leía el nodo-i %ld en %s"
+
+#: e2fsck/util.c:474 e2fsck/util.c:487
+#, fuzzy, c-format
+msgid "while writing inode %lu in %s"
+msgstr "mientras se escribía el nodo-i %ld en %s"
+
+#: e2fsck/util.c:636
+msgid "while allocating zeroizing buffer"
+msgstr "mientras se reservaba el búfer relleno con ceros"
+
+#: e2fsck/util.c:788
+msgid ""
+"UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is "
+"running.\n"
+msgstr ""
+
+#: misc/badblocks.c:69
+#, fuzzy
+msgid "done                                                 \n"
+msgstr "hecho                               \n"
+
+#: misc/badblocks.c:93
+#, 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"
+msgstr ""
+"Modo de empleo: %s [-b tamaño_del_bloque] [-i fichero_de_entrada] [-svwnf]\n"
+" [-c bloques_a_la_vez] [-p núm_de_pasos] [-t patrón_de_prueba [-t "
+"patrón_de_prueba \n"
+" [...]]]\n"
+" dispositivo [bloque_final [bloque_inicial]]\n"
+
+#: misc/badblocks.c:104
+#, 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:219
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr ""
+
+#: misc/badblocks.c:322
+msgid "Testing with random pattern: "
+msgstr "Probando con un patrón aleatorio: "
+
+#: misc/badblocks.c:340
+msgid "Testing with pattern 0x"
+msgstr "Probando con el patrón 0x"
+
+#: misc/badblocks.c:372 misc/badblocks.c:445
+msgid "during seek"
+msgstr "durante la búsqueda"
+
+#: misc/badblocks.c:383
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Valor extraño (%ld) en do_read\n"
+
+#: misc/badblocks.c:469
+msgid "during ext2fs_sync_device"
+msgstr "durante el ext2fs_sync_device"
+
+#: misc/badblocks.c:489 misc/badblocks.c:749
+msgid "while beginning bad block list iteration"
+msgstr "mientras se comenzaba la iteración en la lista de bloques dañados"
+
+#: misc/badblocks.c:503 misc/badblocks.c:602 misc/badblocks.c:759
+msgid "while allocating buffers"
+msgstr "mientras se reservaban los búferes"
+
+#: misc/badblocks.c:507
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Revisando los bloques del %lu al %lu\n"
+
+#: misc/badblocks.c:512
+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:521
+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:528 misc/badblocks.c:634 misc/badblocks.c:676
+#: misc/badblocks.c:822
+msgid "Too many bad blocks, aborting test\n"
+msgstr ""
+
+#: misc/badblocks.c:609
+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:611 misc/badblocks.c:772
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Del bloque %lu al %lu\n"
+
+#: misc/badblocks.c:666
+msgid "Reading and comparing: "
+msgstr "Leyendo y comparando: "
+
+#: misc/badblocks.c:771
+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:777
+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:784
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Se interceptó una interrupción, se limpia todo\n"
+
+#: misc/badblocks.c:867
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "durante la prueba de escritura de datos del bloque %lu"
+
+#: misc/badblocks.c:988 misc/util.c:152
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s está montado; "
+
+#: misc/badblocks.c:990
+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:995
+msgid "it's not safe to run badblocks!\n"
+msgstr "¡No es seguro ejecutar los bloques dañados!\n"
+
+#: misc/badblocks.c:1000 misc/util.c:163
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s está aparentemente en uso por el sistema; "
+
+#: misc/badblocks.c:1003
+msgid "badblocks forced anyway.\n"
+msgstr "los bloques dañados se fuerzan de todas formas.\n"
+
+#: misc/badblocks.c:1023
+#, fuzzy, c-format
+msgid "invalid %s - %s"
+msgstr "tamaño del bloque inválido - %s"
+
+#: misc/badblocks.c:1133
+#, 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:1163
+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:1169
+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:1183
+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:1189
+msgid "while trying to determine device size"
+msgstr "mientras se intentaba determinar el tamaño del dispositivo"
+
+#: misc/badblocks.c:1194
+#, fuzzy
+msgid "last block"
+msgstr "Reubicando bloques"
+
+#: misc/badblocks.c:1200
+#, fuzzy
+msgid "first block"
+msgstr "Primer bloque de datos=%u\n"
+
+#: misc/badblocks.c:1203
+#, fuzzy, c-format
+msgid "invalid starting block (%lu): must be less than %lu"
+msgstr "bloque inicial no válido (%d): debe ser menos que %lu"
+
+#: misc/badblocks.c:1259
+msgid "while creating in-memory bad blocks list"
+msgstr "cuando se creaba la lista de bloques dañados en memoria"
+
+#: misc/badblocks.c:1274
+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:1298
+#, fuzzy, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr "Paso terminado, se encontraron %u bloques dañados.\n"
+
+#: misc/chattr.c:86
+#, fuzzy, c-format
+msgid "Usage: %s [-RVf] [-+=AacDdeijsSu] [-v version] files...\n"
+msgstr "modo de empleo: %s [-RV] [-+=AacDdijsSu] [-v versión] ficheros...\n"
+
+#: misc/chattr.c:154
+#, c-format
+msgid "bad version - %s\n"
+msgstr "versión incorrecta - %s\n"
+
+#: misc/chattr.c:201 misc/lsattr.c:116
+#, c-format
+msgid "while trying to stat %s"
+msgstr "mientras se intentaba ver el estado del fichero %s"
+
+#: misc/chattr.c:208
+#, c-format
+msgid "while reading flags on %s"
+msgstr "mientras se estaban leyendo las banderas en %s"
+
+#: misc/chattr.c:217 misc/chattr.c:236
+#, fuzzy, c-format
+msgid "Clearing extent flag not supported on %s"
+msgstr ""
+"No se soporta desactivar la característica '%s' del sistema de ficheros.\n"
+
+#: misc/chattr.c:222 misc/chattr.c:241
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Las banderas de %s están puestas como "
+
+#: misc/chattr.c:250
+#, c-format
+msgid "while setting flags on %s"
+msgstr "mientras se ponían las banderas en %s"
+
+#: misc/chattr.c:258
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "La versión de %s está puesta como %lu\n"
+
+#: misc/chattr.c:262
+#, c-format
+msgid "while setting version on %s"
+msgstr "mientras se estaba poniendo la versión en %s"
+
+#: misc/chattr.c:282
+#, c-format
+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:322
+msgid "= is incompatible with - and +\n"
+msgstr "= es incompatible con - y +\n"
+
+#: misc/chattr.c:330
+msgid "Must use '-v', =, - or +\n"
+msgstr "Se debe usar '-v', =, - o +\n"
+
+#: misc/dumpe2fs.c:55
+#, fuzzy, c-format
+msgid "Usage: %s [-bfhixV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr ""
+"Modo de empleo: %s [-bfhixV] [-ob superbloque] [-oB tamañodelbloque] "
+"dispositivo\n"
+
+#: misc/dumpe2fs.c:159
+#, fuzzy
+msgid "blocks"
+msgstr "bbloque"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr ""
+
+#: misc/dumpe2fs.c:196
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Grupo %lu: (Bloques "
+
+#: misc/dumpe2fs.c:204
+#, c-format
+msgid "  Checksum 0x%04x"
+msgstr ""
+
+#: misc/dumpe2fs.c:206
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr ""
+
+#: misc/dumpe2fs.c:207
+#, fuzzy, c-format
+msgid ", unused inodes %u\n"
+msgstr "número de los nodos-i inválido - %s"
+
+#: misc/dumpe2fs.c:212
+#, c-format
+msgid "  %s superblock at "
+msgstr "  %s superbloque en "
+
+#: misc/dumpe2fs.c:213
+msgid "Primary"
+msgstr "Primario"
+
+#: misc/dumpe2fs.c:213
+msgid "Backup"
+msgstr "Respaldo"
+
+#: misc/dumpe2fs.c:217
+#, c-format
+msgid ", Group descriptors at "
+msgstr ", descriptores de grupo en "
+
+#: misc/dumpe2fs.c:221
+#, c-format
+msgid ""
+"\n"
+"  Reserved GDT blocks at "
+msgstr ""
+"\n"
+"  Se reservaron los bloques GDT en "
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " Group descriptor at "
+msgstr " Descriptor de grupo en "
+
+#: misc/dumpe2fs.c:234
+msgid "  Block bitmap at "
+msgstr "  Mapa de bits de bloque en "
+
+#: misc/dumpe2fs.c:238
+msgid ", Inode bitmap at "
+msgstr ", mapa de bits de nodo-i en "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+"  Inode table at "
+msgstr ""
+"\n"
+"  tabla de nodos-i en "
+
+#: misc/dumpe2fs.c:248
+#, fuzzy, c-format
+msgid ""
+"\n"
+"  %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+"\n"
+"  %d bloques libres, %d nodos-i libres, % directorios\n"
+
+#: misc/dumpe2fs.c:255
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:258
+msgid "  Free blocks: "
+msgstr "  Bloques libres: "
+
+#: misc/dumpe2fs.c:269
+msgid "  Free inodes: "
+msgstr "  Nodos-i libres: "
+
+#: misc/dumpe2fs.c:300
+msgid "while printing bad block list"
+msgstr "mientras se imprimía la lista de bloques dañados"
+
+#: misc/dumpe2fs.c:306
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Bloques dañados: %u"
+
+#: misc/dumpe2fs.c:333 misc/tune2fs.c:302
+msgid "while reading journal inode"
+msgstr "mientras se leía el nodo-i del fichero de transacciones"
+
+#: misc/dumpe2fs.c:339
+#, fuzzy
+msgid "while opening journal inode"
+msgstr "mientras se leía el nodo-i del fichero de transacciones"
+
+#: misc/dumpe2fs.c:345
+#, fuzzy
+msgid "while reading journal super block"
+msgstr "mientras se leía el superbloque del fichero de transacciones"
+
+#: misc/dumpe2fs.c:355
+#, fuzzy, c-format
+msgid "Journal features:        "
+msgstr "Usuarios del fichero de transacciones:           %s\n"
+
+#: misc/dumpe2fs.c:368
+msgid "Journal size:             "
+msgstr "Tamaño de fichero de transacciones:  "
+
+#: misc/dumpe2fs.c:379
+#, fuzzy, c-format
+msgid ""
+"Journal length:           %u\n"
+"Journal sequence:         0x%08x\n"
+"Journal start:            %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"
+
+#: misc/dumpe2fs.c:386
+#, fuzzy, c-format
+msgid "Journal errno:            %d\n"
+msgstr "Usuarios del fichero de transacciones:           %s\n"
+
+#: misc/dumpe2fs.c:401 misc/tune2fs.c:218
+msgid "while reading journal superblock"
+msgstr "mientras se leía el superbloque del fichero de transacciones"
+
+#: misc/dumpe2fs.c:409
+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:413
+#, c-format
+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"
+
+#: misc/dumpe2fs.c:426
+#, c-format
+msgid "Journal users:            %s\n"
+msgstr "Usuarios del fichero de transacciones:           %s\n"
+
+#: misc/dumpe2fs.c:442 misc/mke2fs.c:662 misc/tune2fs.c:1137
+#, c-format
+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:468
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Parámetro de superbloque no válido: %s\n"
+
+#: misc/dumpe2fs.c:483
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Parámetro de tamaño del bloque no válido: %s\n"
+
+#: misc/dumpe2fs.c:494
+#, 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"
+"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:554 misc/mke2fs.c:1525
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tSe emplea %s\n"
+
+#: misc/dumpe2fs.c:590 misc/e2image.c:1309 misc/tune2fs.c:1923
+#: resize/main.c:305
+#, c-format
+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:618
+#, c-format
+msgid ""
+"\n"
+"%s: %s: error reading bitmaps: %s\n"
+msgstr ""
+"\n"
+"%s: %s: error al leer los mapas de bits: %s\n"
+
+#: misc/e2image.c:87
+#, fuzzy, c-format
+msgid "Usage: %s [-rsIQ] device image_file\n"
+msgstr "Modo de empleo: %s [-rsI] dispositivo fichero_de_imagen\n"
+
+#: misc/e2image.c:135
+#, c-format
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr ""
+
+#: misc/e2image.c:141
+msgid "Couldn't allocate header buffer\n"
+msgstr "No se puede reservar el búfer del encabezado\n"
+
+#: misc/e2image.c:171
+msgid "while writing superblock"
+msgstr "mientras se escribía el superbloque"
+
+#: misc/e2image.c:179
+msgid "while writing inode table"
+msgstr "mientras se escribía la tabla de nodos-i"
+
+#: misc/e2image.c:186
+msgid "while writing block bitmap"
+msgstr "mientras se escribía el mapa de bits del bloque"
+
+#: misc/e2image.c:193
+msgid "while writing inode bitmap"
+msgstr "mientras se escribía el mapa de bits del nodo-i"
+
+#: misc/e2image.c:1341
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr ""
+
+#: 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:2074
+#, 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:803
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Modo de empleo: e2label dispositivo [nuevabandera]\n"
+
+#: misc/e2undo.c:36
+#, c-format
+msgid "Usage: %s <transaction file> <filesystem>\n"
+msgstr ""
+
+#: misc/e2undo.c:52
+#, fuzzy
+msgid "Failed to read the file system data \n"
+msgstr "Falla al crear el iterador dirs_to_hash: %m"
+
+#: misc/e2undo.c:62 misc/e2undo.c:83 misc/e2undo.c:108 misc/e2undo.c:206
+#, c-format
+msgid "Failed tdb_fetch %s\n"
+msgstr ""
+
+#: misc/e2undo.c:70
+#, c-format
+msgid "The file system Mount time didn't match %u\n"
+msgstr ""
+
+#: misc/e2undo.c:89
+msgid "The file system UUID didn't match \n"
+msgstr ""
+
+#: misc/e2undo.c:163
+#, fuzzy, c-format
+msgid "Failed tdb_open %s\n"
+msgstr "mientras se abría %s"
+
+#: misc/e2undo.c:169
+#, fuzzy, c-format
+msgid "Error while determining whether %s is mounted.\n"
+msgstr "mientras se determinaba si %s está montado."
+
+#: misc/e2undo.c:175
+msgid "e2undo should only be run on unmounted file system\n"
+msgstr ""
+
+#: misc/e2undo.c:184
+#, fuzzy, c-format
+msgid "Failed to open %s\n"
+msgstr "mientras se intentaba abrir %s"
+
+#: misc/e2undo.c:210
+#, c-format
+msgid "Replayed transaction of size %zd at location %llu\n"
+msgstr ""
+
+#: misc/e2undo.c:216
+#, c-format
+msgid "Failed write %s\n"
+msgstr ""
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "ATENCIÓN: no se puede abrir %s: %s\n"
+
+#: misc/fsck.c:353
+#, 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: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\aATENCIÓN: El /etc/fstab no contiene el campo passno fsck.\n"
+"Se intentará hacer un truco, pero se debería arreglar el \n"
+"fichero /etc/fstab tan pronto como sea posible.\n"
+"\n"
+
+#: misc/fsck.c:478
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: no se encontró\n"
+
+#: misc/fsck.c:594
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: espera: ¿¡¿No hay más procesos hijos?!?\n"
+
+#: misc/fsck.c:616
+#, 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:622
+#, 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:661
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Se finaliza con %s (estado de salida %d)\n"
+
+#: misc/fsck.c:721
+#, 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:742
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"Puede ser que todos o ninguno de los tipos de sistemas de ficheros que se \n"
+"pasaron con -t deban estar con el prefijo 'no' o '!0.\n"
+
+#: misc/fsck.c:761
+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:884
+#, c-format
+msgid ""
+"%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass "
+"number\n"
+msgstr ""
+
+#: misc/fsck.c:911
+#, 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:967
+msgid "Checking all file systems.\n"
+msgstr "Revisando todos los sistemas de ficheros.\n"
+
+#: misc/fsck.c:1058
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--esperando-- (paso %d)\n"
+
+#: misc/fsck.c:1078
+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:1120
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: demasiados dispositivos\n"
+
+#: misc/fsck.c:1153 misc/fsck.c:1239
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: demasiados argumentos\n"
+
+#: misc/lsattr.c:74
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr "Modo de empleo: %s [-RVadlv] [ficheros...]\n"
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Mientras se leían las banderas en %s"
+
+#: misc/lsattr.c:91
+#, c-format
+msgid "While reading version on %s"
+msgstr "Mientras se leía la versión en %s"
+
+#: misc/mke2fs.c:114
+#, 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]\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] [-jnqvDFKSV] device [blocks-"
+"count]\n"
+msgstr ""
+"Modo de empleo: %s [-c|-l nombre-del-fichero] [-b tamaño-del-bloque]\n"
+"\t[-f tamaño-del-fragmento] [-i bytes-por-nodo-i] [-I tamaño-del-nodo-i]\n"
+"\t[-J opciones-de-fichero-de-transacciones] [-N número-de-nodos-i]\n"
+"\t[-m porcentaje-de-bloques-reservados] [-o SO-creador]\n"
+"\t[-g bloques-por-grupo] [-L etiqueta-de-volumen]\n"
+"\t[-M último-directorio-montado] [-O característica[,...]]\n"
+"\t[-r revisión-del-sf] [-E opción-extendida{,...]]\n"
+"\t[-T tipo-del-sf] [-jnqvFSV] dispositivo [cuenta-de-bloques]\n"
+
+#: misc/mke2fs.c:217
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Ejecutando orden: %s\n"
+
+#: misc/mke2fs.c:221
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "mientras se intentaba ejecutar '%s'"
+
+#: misc/mke2fs.c:228
+msgid "while processing list of bad blocks from program"
+msgstr "mientras se procesaba la lista de bloques dañados del programa"
+
+#: misc/mke2fs.c:255
+#, 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:257
+#, 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:260
+msgid "Aborting....\n"
+msgstr "Finalizando...\n"
+
+#: misc/mke2fs.c:280
+#, 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:299
+msgid "while marking bad blocks as used"
+msgstr "mientras se marcaban los bloques dañados como utilizados"
+
+#: misc/mke2fs.c:316
+msgid "Writing inode tables: "
+msgstr "Escribiendo las tablas de nodos-i: "
+
+#: misc/mke2fs.c:337
+#, fuzzy, 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 al principio de %u: "
+"%s\n"
+
+#: misc/mke2fs.c:351 misc/mke2fs.c:2175 misc/mke2fs.c:2429
+#, c-format
+msgid "done                            \n"
+msgstr "hecho                           \n"
+
+#: misc/mke2fs.c:362
+msgid "while creating root dir"
+msgstr "mientras se creaba el directorio raíz"
+
+#: misc/mke2fs.c:369
+msgid "while reading root inode"
+msgstr "mientras se leía el nodo-i raíz"
+
+#: misc/mke2fs.c:383
+msgid "while setting root inode ownership"
+msgstr "mientras se ponían los permisos del dueño del nodo-i raíz"
+
+#: misc/mke2fs.c:401
+msgid "while creating /lost+found"
+msgstr "mientras se creaba /lost+found"
+
+#: misc/mke2fs.c:408
+msgid "while looking up /lost+found"
+msgstr "mientras se revisaba /lost+found"
+
+#: misc/mke2fs.c:421
+msgid "while expanding /lost+found"
+msgstr "mientras se expandía /lost+found"
+
+#: misc/mke2fs.c:436
+msgid "while setting bad block inode"
+msgstr "mientras se ponía el nodo-i de bloques dañados"
+
+#: misc/mke2fs.c:463
+#, 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:473
+#, 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:489
+#, 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:505
+msgid "while initializing journal superblock"
+msgstr "mientras se inicializaba el superbloque del fichero de transacciones"
+
+#: misc/mke2fs.c:513
+msgid "Zeroing journal device: "
+msgstr "Se rellena con ceros el dispositivo del fichero de transacciones: "
+
+#: misc/mke2fs.c:525
+#, fuzzy, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr ""
+"mientras se inicializaba con ceros el fichero de transacciones del "
+"dispositivo (bloque %u, cuenta %d)"
+
+#: misc/mke2fs.c:543
+msgid "while writing journal superblock"
+msgstr "mientras se escribía el superbloque del fichero de transacciones"
+
+#: misc/mke2fs.c:558
+#, fuzzy, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"Atención: hay %u bloques sin usar.\n"
+"\n"
+
+#: misc/mke2fs.c:563
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Etiqueta del sistema de ficheros=%s\n"
+
+#: misc/mke2fs.c:566
+#, fuzzy, c-format
+msgid "OS type: %s\n"
+msgstr "Tipo de SO: "
+
+#: misc/mke2fs.c:568
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Tamaño del bloque=%u (bitácora=%u)\n"
+
+#: misc/mke2fs.c:572
+#, fuzzy, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Tamaño del bloque=%u (bitácora=%u)\n"
+
+#: misc/mke2fs.c:576
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Tamaño del fragmento=%u (bitácora=%u)\n"
+
+#: misc/mke2fs.c:578
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:580
+#, fuzzy, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u nodos-i, %u bloques\n"
+
+#: misc/mke2fs.c:582
+#, fuzzy, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr "%u bloques (%2.2f%%) reservados para el superusuario\n"
+
+#: misc/mke2fs.c:585
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Primer bloque de datos=%u\n"
+
+#: misc/mke2fs.c:587
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Número máximo de bloques del sistema de ficheros=%lu\n"
+
+#: misc/mke2fs.c:591
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u bloque de grupos\n"
+
+#: misc/mke2fs.c:593
+#, c-format
+msgid "%u block group\n"
+msgstr "%u bloque de grupo\n"
+
+#: misc/mke2fs.c:596
+#, fuzzy, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr "%u bloques por grupo, %u fragmentos por grupo\n"
+
+#: misc/mke2fs.c:599
+#, 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:601
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u nodos-i por grupo\n"
+
+#: misc/mke2fs.c:608
+#, c-format
+msgid "Superblock backups stored on blocks: "
+msgstr "Respaldo del superbloque guardado en los bloques: "
+
+#: misc/mke2fs.c:687 misc/tune2fs.c:1165
+#, fuzzy, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "patrón_de_prueba no válido: %s\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Tamaño de zancada no válido: %s\n"
+
+#: misc/mke2fs.c:716
+#, fuzzy, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Parámetro de zancada no válido: %s\n"
+
+#: misc/mke2fs.c:739
+#, 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:746
+#, c-format
+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:770
+#, c-format
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+"El cambio de tamaño en línea no está soportado con sistemas de archivos de "
+"revisión 0\n"
+
+#: misc/mke2fs.c:808
+#, fuzzy, c-format
+msgid "Invalid quotatype parameter: %s\n"
+msgstr "Tamaño de zancada no válido: %s\n"
+
+#: misc/mke2fs.c:819
+#, 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"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr OR grp>\n"
+"\n"
+msgstr ""
+"\n"
+"Las opciones especificadas son incorrectas: %s\n"
+"\n"
+"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"
+"\tstride=<longitud de la zancada en bloques>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\tresize=<máximo de variación de tamaño en bloques>\n"
+"\n"
+"\ttest_fs\n"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:878
+#, 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:891 misc/tune2fs.c:393
+#, 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:903 misc/tune2fs.c:345
+#, 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:1043
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1047
+#, c-format
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1051
+#, fuzzy, c-format
+msgid "Aborting...\n"
+msgstr "Finalizando...\n"
+
+#: misc/mke2fs.c:1091
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1249
+#, fuzzy, c-format
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "No se puede reservar memoria para los tipos de sistema de ficheros\n"
+
+#: misc/mke2fs.c:1290
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1330
+#, c-format
+msgid "invalid block size - %s"
+msgstr "tamaño del bloque inválido - %s"
+
+#: misc/mke2fs.c:1334
+#, 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:1350
+#, fuzzy, c-format
+msgid "invalid cluster size - %s"
+msgstr "tamaño del bloque inválido - %s"
+
+#: misc/mke2fs.c:1362
+msgid "Illegal number for blocks per group"
+msgstr "Número ilegal de bloques por grupo"
+
+#: misc/mke2fs.c:1367
+msgid "blocks per group must be multiple of 8"
+msgstr "los bloques por grupo deben ser un múltiplo de 8"
+
+#: misc/mke2fs.c:1375
+#, fuzzy
+msgid "Illegal number for flex_bg size"
+msgstr "¡Número inválido de bloques!\n"
+
+#: misc/mke2fs.c:1381
+msgid "flex_bg size must be a power of 2"
+msgstr ""
+
+#: misc/mke2fs.c:1391
+#, 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:1401
+#, c-format
+msgid ""
+"Warning: -K option is deprecated and should not be used anymore. Use '-E "
+"nodiscard' extended option instead!\n"
+msgstr ""
+
+#: misc/mke2fs.c:1415
+msgid "in malloc for bad_blocks_filename"
+msgstr "en malloc para fichero_de_bloques_dañados"
+
+#: misc/mke2fs.c:1425
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "el porcentaje de bloques reservados es inválido - %s"
+
+#: misc/mke2fs.c:1443
+#, c-format
+msgid "bad revision level - %s"
+msgstr "nivel de revisión incorrecto - %s"
+
+#: misc/mke2fs.c:1455
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "tamaño de los nodos-i inválido - %s"
+
+#: misc/mke2fs.c:1475
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "número de los nodos-i inválido - %s"
+
+#: misc/mke2fs.c:1492
+#, fuzzy
+msgid "The -t option may only be used once"
+msgstr "-o solo podría ser especificado una vez"
+
+#: misc/mke2fs.c:1500
+#, fuzzy
+msgid "The -T option may only be used once"
+msgstr "-o solo podría ser especificado una vez"
+
+#: misc/mke2fs.c:1550 misc/mke2fs.c:2508
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr ""
+"mientras se intentaba abrir el fichero de transacciones del dispositivo %s\n"
+
+#: misc/mke2fs.c:1556
+#, 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:1562
+#, fuzzy, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Añadiendo el fichero de transacciones al dispositivo %s: "
+
+# The specified number of blocks is invalid.
+#: misc/mke2fs.c:1573
+#, fuzzy, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "cuenta de bloques no válida - %s"
+
+#: misc/mke2fs.c:1583
+msgid "filesystem"
+msgstr "sistema de ficheros"
+
+#: misc/mke2fs.c:1596 resize/main.c:374
+msgid "while trying to determine filesystem size"
+msgstr "mientras se intentaba determinar el tamaño del sistema de ficheros"
+
+#: misc/mke2fs.c:1602
+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"
+
+#: misc/mke2fs.c:1609
+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ó que el tamaño del disposivo 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:1626
+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:1646
+#, c-format
+msgid "Failed to parse fs types list\n"
+msgstr ""
+
+#: misc/mke2fs.c:1700
+#, 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:1716
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr ""
+
+#: misc/mke2fs.c:1723
+#, c-format
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1730
+#, fuzzy, c-format
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+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:1742
+#, fuzzy, c-format
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr ""
+"\n"
+"El tamaño del fichero de transacciones es muy grande para el sistema de "
+"ficheros.\n"
+
+#: misc/mke2fs.c:1756
+#, fuzzy, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "el porcentaje de bloques reservados es inválido - %s"
+
+#: misc/mke2fs.c:1772
+#, c-format
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1789
+msgid "while trying to determine hardware sector size"
+msgstr "mientras se intentaba determinar el tamaño del sector por hardware"
+
+#: misc/mke2fs.c:1795
+#, fuzzy
+msgid "while trying to determine physical sector size"
+msgstr "mientras se intentaba determinar el tamaño del sector por hardware"
+
+#: misc/mke2fs.c:1828
+#, fuzzy
+msgid "while setting blocksize; too small for device\n"
+msgstr "mientras se ponía el nodo-i de bloques dañados"
+
+#: misc/mke2fs.c:1833
+#, c-format
+msgid ""
+"Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1864
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1867
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1869
+#, c-format
+msgid ""
+"This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1880
+#, 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:1884
+#, 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), se hace un esfuerzo para continuar\n"
+
+#: misc/mke2fs.c:1920
+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:1929
+msgid "blocks per group count out of range"
+msgstr "la cuenta de bloques por grupo está fuera del intervalo"
+
+#: misc/mke2fs.c:1944
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+
+#: misc/mke2fs.c:1956
+#, 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:1974
+#, 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:1981
+#, 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:1995
+#, 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 ""
+"tamaño_de_nodos_i (%u) * número_de_nodos_i (%u) es demasiado\n"
+"grande para un sistema de ficheros con %lu bloques; especifique\n"
+"un ratio mayor de nodos-i (-i) o un menor número de nodos-i (-N).\n"
+
+#: misc/mke2fs.c:2114
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+"    e2undo %s %s\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2128
+#, fuzzy
+msgid "while trying to setup undo file\n"
+msgstr ""
+"\n"
+"\tmientras intentaba crear el fichero de transacciones"
+
+#: misc/mke2fs.c:2154
+#, fuzzy
+msgid "Discarding device blocks: "
+msgstr "Añadiendo el fichero de transacciones al dispositivo %s: "
+
+#: misc/mke2fs.c:2170
+msgid "failed - "
+msgstr ""
+
+#: misc/mke2fs.c:2277
+msgid "while setting up superblock"
+msgstr "mientras se ajustaba el superbloque"
+
+#: misc/mke2fs.c:2286
+#, c-format
+msgid "Discard succeeded and will return 0s  - skipping inode table wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:2369
+#, c-format
+msgid "unknown os - %s"
+msgstr "sistema operativo desconocido - %s"
+
+#: misc/mke2fs.c:2421
+#, fuzzy, c-format
+msgid "Allocating group tables: "
+msgstr "Escribiendo las tablas de nodos-i: "
+
+#: misc/mke2fs.c:2425
+msgid "while trying to allocate filesystem tables"
+msgstr "mientras se intentaba reservar las tablas del sistema de ficheros"
+
+#: misc/mke2fs.c:2434
+#, fuzzy
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr "mientras se escribía el mapa de bits del bloque"
+
+#: misc/mke2fs.c:2477
+#, fuzzy, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr ""
+"mientras se inicializaba a cero el bloque %u al final del sistema de ficheros"
+
+#: misc/mke2fs.c:2490
+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:2501 misc/tune2fs.c:640
+msgid "journal"
+msgstr "fichero de transacciones"
+
+#: misc/mke2fs.c:2513
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Añadiendo el fichero de transacciones al dispositivo %s: "
+
+#: misc/mke2fs.c:2520
+#, 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:2525 misc/mke2fs.c:2557 misc/tune2fs.c:669 misc/tune2fs.c:683
+#, c-format
+msgid "done\n"
+msgstr "hecho\n"
+
+#: misc/mke2fs.c:2534
+#, c-format
+msgid "Skipping journal creation in super-only mode\n"
+msgstr ""
+
+#: misc/mke2fs.c:2545
+#, fuzzy, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Creando el fichero de transacciones (%d bloques): "
+
+#: misc/mke2fs.c:2553
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tmientras se intentaba crear el fichero de transacciones"
+
+#: misc/mke2fs.c:2564 misc/tune2fs.c:446
+#, c-format
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+
+#: misc/mke2fs.c:2569
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2582
+#, c-format
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+"Escribiendo superbloques y la información contable del sistema de ficheros: "
+
+#: misc/mke2fs.c:2589
+#, c-format
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+"\n"
+"Atención, se tuvo un problema al escribir los superbloques."
+
+#: misc/mke2fs.c:2591
+#, c-format
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"hecho\n"
+"\n"
+
+#: misc/mklost+found.c:50
+#, c-format
+msgid "Usage: mklost+found\n"
+msgstr "Modo de empleo: mklost+found\n"
+
+#: misc/partinfo.c:41
+#, 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 ""
+"Modo de empleo: %s <dev1> <dev2> <dev3>\n"
+"\n"
+"Este programa muestra la información de la partición para un conjunto de\n"
+"dispositivos. Una forma común de utilizar este programa es:\n"
+"\n"
+"\t%s /dev/hda?\n"
+"\n"
+
+#: misc/partinfo.c:51
+#, fuzzy, c-format
+msgid "Cannot open %s: %s"
+msgstr "e2label: no se puede abrir %s\n"
+
+#: misc/partinfo.c:57
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:65
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:71
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d   start=%8d size=%8lu end=%8d\n"
+msgstr ""
+
+#: misc/tune2fs.c:107
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr "Por favor ejecute e2fsck sobre el sistema de ficheros.\n"
+
+#: misc/tune2fs.c:116
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-p "
+"mmp_update_interval]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]\n"
+"\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[ -I new_inode_size ] device\n"
+msgstr ""
+"Modo de empleo: %s [-c cuenta-máxima-de-montajes]\n"
+"\t[-e comportamiento-de-errores] [-g grupo] [-i intervalo[d|m|w]] \n"
+"\t[-j] [-J opciones-del-fichero-de-transacciones]\n"
+"\t[-l] [-s bandera-esparcimiento] [-m porcentaje-de-bloques-reservados]\n"
+"\t[-o [^]opciones-de-montaje[,...]] [-r cuenta-de-bloques-reservados]\n"
+"\t[-u usuario] [-C cuenta-de-montajes] [-L etiqueta-de-volumen]\n"
+"\t[-M último-directorio-montado] [-O [^]característica[,...]]\n"
+"\t[-T última-fecha-de-revisón] [-U UUID] dispositivo\n"
+
+#: misc/tune2fs.c:205
+msgid "while trying to open external journal"
+msgstr "mientras se intentaba abrir el fichero de transacciones externo"
+
+#: misc/tune2fs.c:210
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s no es un dispositivo con fichero de transacciones.\n"
+
+#: misc/tune2fs.c:225
+msgid "Journal superblock not found!\n"
+msgstr "¡No se encontró el superbloque del fichero de transacciones!\n"
+
+#: misc/tune2fs.c:236
+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:257
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:265
+msgid "Journal removed\n"
+msgstr "Fichero de transacciones eliminado\n"
+
+#: misc/tune2fs.c:309
+msgid "while reading bitmaps"
+msgstr "mientras se leían los mapas de bits"
+
+#: misc/tune2fs.c:317
+msgid "while clearing journal inode"
+msgstr "mientras se borraba el nodo-i del fichero de transacciones"
+
+#: misc/tune2fs.c:328
+msgid "while writing journal inode"
+msgstr "mientras se escribía el nodo-i del fichero de transacciones"
+
+#: misc/tune2fs.c:363
+#, c-format
+msgid "(and reboot afterwards!)\n"
+msgstr ""
+
+#: misc/tune2fs.c:396
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr ""
+"No se soporta desactivar la característica '%s' del sistema de ficheros.\n"
+
+#: misc/tune2fs.c:402
+#, fuzzy, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Se pone la hora de la última revisión al sistema de ficheros a %s\n"
+
+#: misc/tune2fs.c:411
+#, fuzzy
+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á montada o está en modo de sólo lectura.\n"
+
+#: misc/tune2fs.c:419
+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:438
+#, fuzzy
+msgid ""
+"The multiple mount protection feature can't\n"
+"be set if the filesystem is mounted or\n"
+"read-only.\n"
+msgstr ""
+"La bandera 'has_journal' sólo puede ser borrada cuando el sistema de\n"
+"ficheros no está montada o está en modo de sólo lectura.\n"
+
+#: misc/tune2fs.c:456
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:465
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:473
+#, fuzzy
+msgid "Error while reading bitmaps\n"
+msgstr "mientras se leían los mapas de bits"
+
+#: misc/tune2fs.c:482
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+
+#: misc/tune2fs.c:487
+#, fuzzy
+msgid "while reading MMP block."
+msgstr "mientras se leían los bloques dañados del nodo-i"
+
+#: misc/tune2fs.c:519
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+
+#: misc/tune2fs.c:530
+#, fuzzy
+msgid ""
+"The huge_file 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á montada o está en modo de sólo lectura.\n"
+
+#: misc/tune2fs.c:590
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:635
+msgid "The filesystem already has a journal.\n"
+msgstr "El sistema de ficheros ya tiene un fichero de transacciones.\n"
+
+#: misc/tune2fs.c:653
+#, 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:657
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Creando un fichero de transacciones en el dispositivo %s: "
+
+#: misc/tune2fs.c:665
+#, 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:671
+msgid "Creating journal inode: "
+msgstr "Creando el nodo-i del fichero de transacciones: "
+
+#: misc/tune2fs.c:680
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tmientras intentaba crear el fichero de transacciones"
+
+#: misc/tune2fs.c:763
+#, fuzzy
+msgid "Couldn't allocate memory to parse quota options!\n"
+msgstr ""
+"¡No se puede reservar memoria para analizar sintácticamente las opciones!\n"
+
+#: misc/tune2fs.c:785
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with "
+"comma):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:846
+#, 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:870 misc/tune2fs.c:883
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "cuenta de montajes incorrectos - %s"
+
+#: misc/tune2fs.c:899
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "comportamiento de errores incorrecto - %s"
+
+#: misc/tune2fs.c:926
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "nombre del gid/grupo incorrecto - %s"
+
+#: misc/tune2fs.c:959
+#, c-format
+msgid "bad interval - %s"
+msgstr "intervalo incorrecto - %s"
+
+#: misc/tune2fs.c:988
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "proporción de bloques reservados incorrecta - %s"
+
+#: misc/tune2fs.c:1003
+msgid "-o may only be specified once"
+msgstr "-o solo podría ser especificado una vez"
+
+#: misc/tune2fs.c:1012
+msgid "-O may only be specified once"
+msgstr "-O sólo se puede especificar una vez"
+
+#: misc/tune2fs.c:1027
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "cuenta de bloques reservados incorrecta - %s"
+
+#: misc/tune2fs.c:1056
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "nombre de uid/usuario incorrecto - %s"
+
+#: misc/tune2fs.c:1073
+#, fuzzy, c-format
+msgid "bad inode size - %s"
+msgstr "tamaño de los nodos-i inválido - %s"
+
+#: misc/tune2fs.c:1080
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr ""
+
+#: misc/tune2fs.c:1174
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:1179
+#, 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] "Se pone la cuenta de montajes máxima a %d\n"
+msgstr[1] "Se pone la cuenta de montajes máxima a %d\n"
+
+#: misc/tune2fs.c:1202
+#, fuzzy, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Parámetro de zancada no válido: %s\n"
+
+#: misc/tune2fs.c:1217
+#, fuzzy, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Parámetro de zancada no válido: %s\n"
+
+#: misc/tune2fs.c:1232
+#, fuzzy, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Tamaño de zancada no válido: %s\n"
+
+#: misc/tune2fs.c:1238
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:1257
+#, fuzzy, c-format
+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"
+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"
+"\tstride=<longitud de la zancada en bloques>\n"
+"\tresize=<máximo de variación de tamaño en bloques>\n"
+"\n"
+
+#: misc/tune2fs.c:1723
+#, fuzzy
+msgid "Failed to read inode bitmap\n"
+msgstr "mientras se leían los mapas de bits"
+
+#: misc/tune2fs.c:1728
+#, fuzzy
+msgid "Failed to read block bitmap\n"
+msgstr "leyendo los mapas de bits del nodo-i y del bloque"
+
+#: misc/tune2fs.c:1745 resize/resize2fs.c:784
+msgid "blocks to be moved"
+msgstr "bloques por ser movidos"
+
+#: misc/tune2fs.c:1748
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:1754
+msgid "Not enough space to increase inode size \n"
+msgstr ""
+
+#: misc/tune2fs.c:1759
+#, fuzzy
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "mientras se reservaban los bloques para el cambio de tamaño en línea"
+
+#: misc/tune2fs.c:1791
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+
+#: misc/tune2fs.c:1818
+#, fuzzy
+msgid "Couldn't allocate memory for tdb filename\n"
+msgstr "No se puede reservar memoria para los tipos de sistema de ficheros\n"
+
+#: misc/tune2fs.c:1840
+#, fuzzy, c-format
+msgid "while trying to delete %s"
+msgstr "mientras se intentaba modificar el tamaño %s"
+
+#: misc/tune2fs.c:1850
+#, c-format
+msgid ""
+"To undo the tune2fs operation please run the command\n"
+"    e2undo %s %s\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:1919
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:1937
+#, fuzzy, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Se pone el gid de los bloques reservados %lu\n"
+
+#: misc/tune2fs.c:1943
+#, fuzzy, c-format
+msgid "Shrinking the inode size is not supported\n"
+msgstr "Se pone la hora de la última revisión al sistema de ficheros a %s\n"
+
+#: misc/tune2fs.c:1990
+#, 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:1996
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Se pone la cuenta de montajes actual a %d\n"
+
+#: misc/tune2fs.c:2001
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Se pone el comportamiento de errores a %d\n"
+
+#: misc/tune2fs.c:2006
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Se pone el gid de los bloques reservados %lu\n"
+
+#: misc/tune2fs.c:2011
+#, fuzzy, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "Se pone el intervalo entre revisiones en %lu segundos\n"
+
+#: misc/tune2fs.c:2018
+#, 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:2025
+#, fuzzy, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "Se pone el porcentaje de bloques reservados a %lu (%u bloques)\n"
+
+#: misc/tune2fs.c:2031
+#, fuzzy, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "la cantidad de bloques reservados es muy grande (%lu)"
+
+#: misc/tune2fs.c:2038
+#, fuzzy, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Se pone la cantidad de bloques reservados a %lu\n"
+
+#: misc/tune2fs.c:2044
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"El sistema de ficheros ya tiene superbloques dispersos.\n"
+
+#: misc/tune2fs.c:2051
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set.  %s"
+msgstr ""
+"\n"
+"La bandera de superbloques dispersos está puesta.  %s"
+
+#: misc/tune2fs.c:2056
+msgid ""
+"\n"
+"Clearing the sparse superflag not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2064
+#, 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:2070
+#, 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:2102
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+
+#: misc/tune2fs.c:2120
+#, fuzzy
+msgid ""
+"The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"La bandera 'has_journal' sólo puede ser borrada cuando el sistema de\n"
+"ficheros no está montada o está en modo de sólo lectura.\n"
+
+#: misc/tune2fs.c:2153
+msgid "Invalid UUID format\n"
+msgstr "Formato del UUID no válido\n"
+
+#: misc/tune2fs.c:2166
+#, fuzzy
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"La bandera 'has_journal' sólo puede ser borrada cuando el sistema de\n"
+"ficheros no está montada o está en modo de sólo lectura.\n"
+
+#: misc/tune2fs.c:2174
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2187
+#, fuzzy, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Se pone el gid de los bloques reservados %lu\n"
+
+#: misc/tune2fs.c:2190
+#, fuzzy, c-format
+msgid "Failed to change inode size\n"
+msgstr "mientras se intentaba abrir %s"
+
+#: misc/tune2fs.c:2201
+#, fuzzy, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Se pone el gid de los bloques reservados %lu\n"
+
+#: misc/tune2fs.c:2206
+#, fuzzy, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Se pone el gid de los bloques reservados %lu\n"
+
+#: misc/tune2fs.c:2213
+#, fuzzy, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Se pone la cuenta de montajes actual a %d\n"
+
+#: misc/util.c:74
+msgid "Proceed anyway? (y,n) "
+msgstr "¿Continuar de todas formas? (s,n) "
+
+#: misc/util.c:89
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr "No se puede poner %s --- %s\n"
+
+#: misc/util.c:92
+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"
+
+#: misc/util.c:103
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s no es un dispositivo especial de bloques.\n"
+
+#: misc/util.c:132
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr "¡%s es todo el dispositivo, no sólo una partición!\n"
+
+#: misc/util.c:154
+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:159
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "¡No se hará un %s aquí!\n"
+
+#: misc/util.c:166
+msgid "mke2fs forced anyway.\n"
+msgstr "Se fuerza de todas formas mke2fs.\n"
+
+#: misc/util.c:182
+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:207
+#, fuzzy, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+"No se pueden encontrar los números mágicos del superbloque del fichero de "
+"transacciones"
+
+#: misc/util.c:228
+#, 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"
+"\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"
+"        device=<dispositivo del fichero de transacciones>\n"
+"\n"
+"El tamaño del fichero de transacciones debe estar entre 1024 y 102400 "
+"bloques del sistema de ficheros.\n"
+"\n"
+
+#: misc/util.c:258
+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:265
+#, c-format
+msgid ""
+"\n"
+"The 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 es de %d bloques;\n"
+"debería estar entre 1024 y 10240000 bloques.  Se finaliza.\n"
+
+#: misc/util.c:273
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"El tamaño del fichero de transacciones es muy grande para el sistema de "
+"ficheros.\n"
+
+#: misc/util.c:287
+#, 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:48
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr ""
+
+#: misc/uuidd.c:50
+#, c-format
+msgid "       %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr ""
+
+#: misc/uuidd.c:52
+#, c-format
+msgid "       %s -k\n"
+msgstr ""
+
+#: misc/uuidd.c:154
+#, fuzzy
+msgid "bad arguments"
+msgstr "%s: demasiados argumentos\n"
+
+#: misc/uuidd.c:172
+msgid "connect"
+msgstr ""
+
+#: misc/uuidd.c:191
+msgid "write"
+msgstr ""
+
+#: misc/uuidd.c:199
+msgid "read count"
+msgstr ""
+
+#: misc/uuidd.c:205
+#, fuzzy
+msgid "bad response length"
+msgstr "Parámetro de zancada no válido: %s\n"
+
+#: misc/uuidd.c:270
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr ""
+
+#: misc/uuidd.c:278
+#, fuzzy, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr ""
+"No se puede analizar sintácticamente el especificador de fecha/hora: %s"
+
+#: misc/uuidd.c:307
+#, fuzzy, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "No se puede encontrar el superbloque del ext2,"
+
+#: misc/uuidd.c:315
+#, fuzzy, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "No se puede reconectar %i: %m\n"
+
+#: misc/uuidd.c:353
+#, fuzzy, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Error al leer el @i %i: %m\n"
+
+#: misc/uuidd.c:361
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:380
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:390
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:399
+#, 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:420
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:432
+#, fuzzy, c-format
+msgid "Invalid operation %d\n"
+msgstr "Versión de EA no válida.\n"
+
+#: misc/uuidd.c:476 misc/uuidd.c:498
+#, c-format
+msgid "Bad number: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:533 misc/uuidd.c:562
+#, fuzzy, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Error al crear el @d /@l (%s): %m\n"
+
+#: misc/uuidd.c:543
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:547
+#, c-format
+msgid "List of UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:568
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr ""
+
+#: misc/uuidd.c:585
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:591
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr ""
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "Modo de empleo: %s [-r] [-t]\n"
+
+#: resize/extent.c:202
+msgid "# Extent dump:\n"
+msgstr "# Vaciado extenso:\n"
+
+#: resize/extent.c:203
+#, fuzzy, c-format
+msgid "#\tNum=%llu, Size=%llu, Cursor=%llu, Sorted=%llu\n"
+msgstr "#\tNúm=%d, Tamaño=%d, Cursor=%d, Ordenado=%d\n"
+
+#: resize/main.c:43
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]\n"
+"\n"
+msgstr ""
+"Modo de empleo: %s [-d banderas_de_depuración] [-f] [-F] \n"
+"\t[-p] dispositivo [nuevo-tamaño]\n"
+"\n"
+
+#: resize/main.c:65
+msgid "Extending the inode table"
+msgstr "Extendiendo la tabla de nodos-i"
+
+#: resize/main.c:68
+msgid "Relocating blocks"
+msgstr "Reubicando bloques"
+
+#: resize/main.c:71
+msgid "Scanning inode table"
+msgstr "Revisando la tabla de nodos-i"
+
+#: resize/main.c:74
+msgid "Updating inode references"
+msgstr "Actualizando las referencias a los nodos-i"
+
+#: resize/main.c:77
+msgid "Moving inode table"
+msgstr "Moviendo la tabla de nodos-i"
+
+#: resize/main.c:80
+msgid "Unknown pass?!?"
+msgstr "¿¡¿Paso desconocido?!?"
+
+#: resize/main.c:83
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Se comienza el paso %d (máx = %lu)\n"
+
+#: resize/main.c:259
+#, c-format
+msgid "while opening %s"
+msgstr "mientras se abría %s"
+
+#: resize/main.c:267
+#, fuzzy, c-format
+msgid "while getting stat information for %s"
+msgstr "mientras se estaba poniendo la versión en %s"
+
+#: resize/main.c:331
+#, c-format
+msgid ""
+"%s: The combination of flex_bg and\n"
+"\t!resize_inode features is not supported by resize2fs.\n"
+msgstr ""
+
+#: resize/main.c:344 resize/main.c:452
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Por favor ejecute antes 'e2fsck -f %s'.\n"
+"\n"
+
+#: resize/main.c:348
+#, fuzzy, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr ""
+"%s está montado; ¡No se puede cambiar el tamaño de un sistema de ficheros "
+"montado!\n"
+"\n"
+
+#: resize/main.c:384
+#, fuzzy, c-format
+msgid "Invalid new size: %s\n"
+msgstr "tamaño de los nodos-i inválido - %s"
+
+#: resize/main.c:392
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr ""
+
+#: resize/main.c:404
+#, fuzzy, c-format
+msgid "New size smaller than minimum (%llu)\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"
+
+#: resize/main.c:410
+#, fuzzy
+msgid "Invalid stride length"
+msgstr "Parámetro de zancada no válido: %s\n"
+
+#: resize/main.c:434
+#, 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 partición contenida (o el dispositivo) sólo tiene %u (%dk) bloques.\n"
+"Y se ha solicitado un nuevo tamaño de %u bloques.\n"
+"\n"
+
+#: resize/main.c:441
+#, fuzzy, c-format
+msgid ""
+"The filesystem is already %llu blocks long.  Nothing to do!\n"
+"\n"
+msgstr ""
+"El sistema de ficheros ya tiene %u bloques. ¡No hay nada que hacer!\n"
+"\n"
+
+#: resize/main.c:456
+#, fuzzy, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr ""
+"El sistema de ficheros en %s tiene ahora %u bloques.\n"
+"\n"
+
+#: resize/main.c:465
+#, c-format
+msgid "while trying to resize %s"
+msgstr "mientras se intentaba modificar el tamaño %s"
+
+#: resize/main.c:468
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+
+#: resize/main.c:474
+#, fuzzy, c-format
+msgid ""
+"The filesystem on %s is now %llu blocks long.\n"
+"\n"
+msgstr ""
+"El sistema de ficheros en %s tiene ahora %u bloques.\n"
+"\n"
+
+#: resize/main.c:489
+#, fuzzy, c-format
+msgid "while trying to truncate %s"
+msgstr "mientras se intentaba ver el estado del fichero %s"
+
+#: resize/online.c:40
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+
+#: resize/online.c:44
+#, fuzzy
+msgid "On-line shrinking not supported"
+msgstr ""
+"No se soporta desactivar la característica '%s' del sistema de ficheros.\n"
+
+#: resize/online.c:63
+msgid "Filesystem does not support online resizing"
+msgstr ""
+
+#: resize/online.c:70
+#, fuzzy, c-format
+msgid "while trying to open mountpoint %s"
+msgstr ""
+"\n"
+"\tmientras se intentaba abrir el fichero de transacciones en %s\n"
+
+#: resize/online.c:92 resize/online.c:116
+msgid "Permission denied to resize filesystem"
+msgstr ""
+
+#: resize/online.c:95 resize/online.c:122
+#, fuzzy
+msgid "While checking for on-line resizing support"
+msgstr "mientras se reservaban los bloques para el cambio de tamaño en línea"
+
+#: resize/online.c:107
+#, fuzzy
+msgid "Kernel does not support resizing a file system this large"
+msgstr "El @j externo no tiene implementado este @f\n"
+
+#: resize/online.c:119
+#, fuzzy
+msgid "Kernel does not support online resizing"
+msgstr "El @j externo no tiene implementado este @f\n"
+
+#: resize/online.c:152
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/online.c:162
+#, fuzzy
+msgid "While trying to extend the last group"
+msgstr "mientras se intentaba abrir el fichero de transacciones externo"
+
+#: resize/online.c:216
+#, fuzzy, c-format
+msgid "While trying to add group #%d"
+msgstr "mientras se intentaba abrir %s"
+
+#: resize/online.c:227
+#, 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:348
+#, c-format
+msgid "inodes (%llu) must be less than %u"
+msgstr "los nodos-i (%llu) deben ser menos de %u"
+
+#: resize/resize2fs.c:576
+msgid "reserved blocks"
+msgstr "bloques reservados"
+
+#: resize/resize2fs.c:789
+msgid "meta-data blocks"
+msgstr "bloques de metadatos"
+
+#: resize/resize2fs.c:1735
+#, c-format
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr ""
+"Esto nunca debería suceder: ¡Se cambia el tamaño del nodo-i corrupto!\n"
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.42.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 "leyendo el superbloque del fichero de transacciones\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 ", descriptores de grupo en "
+
+#: lib/ext2fs/ext2_err.c:34
+#, fuzzy
+msgid "Can't write group descriptors"
+msgstr ", descriptores de grupo en "
+
+#: 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 "escribiendo los mapas de bits de los nodos-i"
+
+#: lib/ext2fs/ext2_err.c:39
+#, fuzzy
+msgid "Can't read an inode bitmap"
+msgstr "escribiendo los mapas de bits de los nodos-i"
+
+#: lib/ext2fs/ext2_err.c:40
+#, fuzzy
+msgid "Can't write a block bitmap"
+msgstr "leyendo los mapas de bits del nodo-i y del bloque"
+
+#: lib/ext2fs/ext2_err.c:41
+#, fuzzy
+msgid "Can't read a block bitmap"
+msgstr "leyendo los mapas de bits del nodo-i y del bloque"
+
+#: lib/ext2fs/ext2_err.c:42
+#, fuzzy
+msgid "Can't write an inode table"
+msgstr "mientras se escribía la tabla de nodos-i"
+
+#: lib/ext2fs/ext2_err.c:43
+#, fuzzy
+msgid "Can't read an inode table"
+msgstr "Revisando la tabla de nodos-i"
+
+#: 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 ""
+"El sistema de ficheros es más grande que el tamaño aparente del dispositivo."
+
+#: 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 ", mapa de bits de nodo-i en "
+
+#: lib/ext2fs/ext2_err.c:51
+#, fuzzy
+msgid "Block bitmap not loaded"
+msgstr "  Mapa de bits de bloque en "
+
+#: lib/ext2fs/ext2_err.c:52
+#, fuzzy
+msgid "Illegal inode number"
+msgstr "¡Número inválido de bloques!\n"
+
+#: lib/ext2fs/ext2_err.c:53
+#, fuzzy
+msgid "Illegal block number"
+msgstr "¡Número inválido de bloques!\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 "leyendo bloques indirectos del nodo-i %u"
+
+#: lib/ext2fs/ext2_err.c:65
+#, fuzzy
+msgid "Illegal doubly indirect block found"
+msgstr "leyendo bloques indirectos del nodo-i %u"
+
+#: lib/ext2fs/ext2_err.c:66
+#, fuzzy
+msgid "Illegal triply indirect block found"
+msgstr "leyendo bloques indirectos del nodo-i %u"
+
+#: lib/ext2fs/ext2_err.c:67
+#, fuzzy
+msgid "Block bitmaps are not the same"
+msgstr "  Mapa de bits de bloque en "
+
+#: lib/ext2fs/ext2_err.c:68
+#, fuzzy
+msgid "Inode bitmaps are not the same"
+msgstr ", mapa de bits de nodo-i en "
+
+#: 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 tiene características no soportadas:"
+
+#: lib/ext2fs/ext2_err.c:79
+#, fuzzy
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr ""
+"El sistema de ficheros %s tiene activadas características no soportadas.\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 "Aerror en la reserva"
+
+#: 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 "No se puede reservar memoria para los tipos de sistema de ficheros\n"
+
+#: lib/ext2fs/ext2_err.c:84
+#, fuzzy
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "No se puede reservar memoria para los tipos de sistema de ficheros\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 "El bloque del directorio %u (#%d) está vacío en el nodo-i %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 "Añadiendo el fichero de transacciones al dispositivo %s: "
+
+#: lib/ext2fs/ext2_err.c:95
+#, fuzzy
+msgid "Journal superblock not found"
+msgstr "¡No se encontró el superbloque del fichero de transacciones!\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 "mientras se intentaba abrir el fichero de transacciones externo"
+
+#: lib/ext2fs/ext2_err.c:99
+#, fuzzy
+msgid "Journal not found"
+msgstr "¡No se encontró el superbloque del fichero de transacciones!\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 "aatributo extendido"
+
+#: 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 "<El nodo-i descriptor del grupo>"
+
+#: 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 "Tamaño de zancada no válido: %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 "eentrada"
+
+#: 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 "No se encontró /@l.  "
+
+#: 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: fsck 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 "tamaño inválido del sistema de ficheros - %s"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr ""
+
+#: e2fsck/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr ""
+
+#: e2fsck/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr ""
+
+#: e2fsck/prof_err.c:13
+#, fuzzy
+msgid "Profile section not found"
+msgstr "mientras se creaba /lost+found"
+
+#: e2fsck/prof_err.c:14
+#, fuzzy
+msgid "Profile relation not found"
+msgstr "mientras se creaba /lost+found"
+
+#: e2fsck/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+
+#: e2fsck/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr ""
+
+#: e2fsck/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr ""
+
+#: e2fsck/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr ""
+
+#: e2fsck/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr ""
+
+#: e2fsck/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr ""
+
+#: e2fsck/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr ""
+
+#: e2fsck/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr ""
+
+#: e2fsck/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr ""
+
+#: e2fsck/prof_err.c:32
+#, fuzzy
+msgid "Invalid profile_section object"
+msgstr "Se puso una opción no válida para el sistema de ficheros: %s\n"
+
+#: e2fsck/prof_err.c:33
+msgid "No more sections"
+msgstr ""
+
+#: e2fsck/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr ""
+
+#: e2fsck/prof_err.c:35
+msgid "No profile file open"
+msgstr ""
+
+#: e2fsck/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:37
+#, fuzzy
+msgid "Couldn't open profile file"
+msgstr "No se puede clonar el fichero: %m\n"
+
+#: e2fsck/prof_err.c:38
+msgid "Section already exists"
+msgstr ""
+
+#: e2fsck/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr ""
+
+#: e2fsck/prof_err.c:40
+#, fuzzy
+msgid "Invalid integer value"
+msgstr "Parámetro de zancada no válido: %s\n"
+
+#: e2fsck/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr ""
+
+#~ 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 is mounted.  "
+#~ msgstr "%s está montado.  "
+
+#~ msgid "Couldn't determine journal size"
+#~ msgstr "No se puede determinar el tamaño del fichero de transacciones"
+
+#~ msgid "bad block size - %s"
+#~ msgstr "tamaño de los bloques dañados - %s"
+
+#~ 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 "Journal NOT removed\n"
+#~ msgstr "NO se ha eliminado el fichero de transacciones\n"
+
+#~ msgid "#\t\t %u -> %u (%d)\n"
+#~ msgstr "#\t\t %u -> %u (%d)\n"
+
+#~ 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"
+
+#, fuzzy
+#~ msgid "Error while deleting extent: %m\n"
+#~ msgstr "Error mientras se intentaba encontrar /@l: %m\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 retrying to write block bitmaps for %s"
+#~ msgstr ""
+#~ "mientras se reintentaba escribir los mapas de bits del bloque para %s"
+
+#~ msgid "%s failed for %s: %s\n"
+#~ msgstr "%s falló para %s: %s\n"
+
+# Bueno, en estos casos, y ante la imposibilidad de traducir las palabras
+# considero al menos que se debe traducir a la gramática española:
+# -> ioctl de HDIO_GETGEO
+#~ msgid "HDIO_GETGEO ioctl"
+#~ msgstr "HDIO_GETGEO ioctl"
+
+#~ msgid "BLKGETSIZE ioctl"
+#~ msgstr "BLKGETSIZE ioctl"
+
+#~ 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 "while calling ext2fs_block_iterate"
+#~ msgstr "mientras se llamaba a ext2fs_block_iterate"
+
+#~ msgid "while calling iterator function"
+#~ msgstr "mientras se llamaba a la función iteradora"
+
+#~ msgid "while allocating inode buffer"
+#~ msgstr "mientras se reservaba al búfer del nodo-i"
+
+#~ msgid "while reading inode table (group %d)"
+#~ msgstr "mientras se leía la tabla de nodos-i (grupo %d)"
+
+#~ msgid "while writing inode table (group %d)"
+#~ msgstr "mientras se escribía la tabla de nodos-i (grupo %d)"
+
+#~ 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 "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 ""
+#~ "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 "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 "Usage:  findsuper device [skipbytes [startkb]]\n"
+#~ msgstr ""
+#~ "Modo de empleo: findsuper dispositivo [bytesporsaltar [principio (en "
+#~ "kb)]]\n"
+
+#~ msgid "skipbytes should be a number, not %s\n"
+#~ msgstr "bytesporsaltar debe ser un número, no %s\n"
+
+#~ msgid "skipbytes must be a multiple of the sector size\n"
+#~ msgstr "bytesporsaltar debe ser un múltiplo del tamaño del sector\n"
+
+#~ msgid "startkb should be a number, not %s\n"
+#~ msgstr "principio debe ser un número, no %s\n"
+
+#~ msgid "startkb should be positive, not %lld\n"
+#~ msgstr "principio debe ser positivo, no %lld\n"
+
+#~ msgid "starting at %lld, with %d byte increments\n"
+#~ msgstr "se comienza en %lld, con incrementos de %d bytes\n"
+
+#~ msgid "       thisoff     block fs_blk_sz  blksz grp last_mount\n"
+#~ msgstr "      este        bloque  fs_blk_sz  blksz grp ultimo_montado\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%14lld: finished with errno %d\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%14lld: se finaliza con el error número %d\n"
+
+#~ msgid "(unknown os)"
+#~ msgstr "(so desconocido)"
+
+#~ msgid "resize2fs %s (%s)\n"
+#~ msgstr "resize2fs %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 "ino=%u, blockcnt=%lld, %u->%u\n"
+#~ msgstr "ino=%u, blockcnt=%lld, %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/e2fsprogs/po/fr.gmo b/e2fsprogs/po/fr.gmo
new file mode 100644
index 0000000..10dca61
--- /dev/null
+++ b/e2fsprogs/po/fr.gmo
Binary files differ
diff --git a/e2fsprogs/po/fr.po b/e2fsprogs/po/fr.po
new file mode 100644
index 0000000..dd27dca
--- /dev/null
+++ b/e2fsprogs/po/fr.po
@@ -0,0 +1,6984 @@
+# 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-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).
+#.  
+#. 	%b	<blk>			block number
+#. 	%B	<blkcount>		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_dir_acl
+#. 	%Iu	<inode> -> i_uid
+#. 	%Ig	<inode> -> i_gid
+#. 	%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.42.8\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2013-06-16 08:17-0400\n"
+"PO-Revision-Date: 2013-08-04 16:52+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"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:180
+#, 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/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:1332 e2fsck/unix.c:1420 misc/badblocks.c:1214
+#: misc/badblocks.c:1222 misc/badblocks.c:1236 misc/badblocks.c:1248
+#: misc/dumpe2fs.c:588 misc/e2image.c:1196 misc/e2image.c:1324
+#: misc/e2image.c:1337 misc/mke2fs.c:196 misc/tune2fs.c:1907 resize/main.c:315
+#, c-format
+msgid "while trying to open %s"
+msgstr "lors de la tentative d'ouverture de %s"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "lors de la tentative d'ouverture via popen() « %s »"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:203
+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:105
+msgid "while updating bad block inode"
+msgstr "lors de la mise à jour de l'i-noeud des blocs défectueux"
+
+#: e2fsck/badblocks.c:131
+#, 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/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:61 e2fsck/ehandler.c:110
+msgid "Ignore error"
+msgstr "Ignorer l'erreur"
+
+#: e2fsck/ehandler.c:62
+msgid "Force rewrite"
+msgstr "Forcer la ré-écriture"
+
+#: e2fsck/ehandler.c:104
+#, 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:107
+#, c-format
+msgid "Error writing block %lu (%s).  "
+msgstr "Erreur lors de d'écriture du bloc %lu (%s). "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "blocs des répertoires vides"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "carte des répertoires vide"
+
+#: e2fsck/emptydir.c:98
+#, 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:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Nombre illégal de blocs !\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Ne peut allouer le tampon de bloc (taille=%d)\n"
+
+#: 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/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Utilisation : %s [-F] [-I nombre_blocs_du_tampon_d_i_noeud] périphérique\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:961
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "lors de l'ouverture de %s pour la vidange"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:967 resize/main.c:288
+#, c-format
+msgid "while trying to flush %s"
+msgstr "lors de la tentative de vidange de %s"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1091
+msgid "while opening inode scan"
+msgstr "lors de l'ouverture de l'examen d'i-noeuds"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1109
+msgid "while getting next inode"
+msgstr "lors de l'obtention de l'i-noeud suivant"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%u i-noeuds examinés.\n"
+
+#: e2fsck/journal.c:522
+msgid "reading journal superblock\n"
+msgstr "lecture en cours du superbloc du journal\n"
+
+#: e2fsck/journal.c:579
+#, 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:588
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s : journal trop court\n"
+
+#: e2fsck/journal.c:880
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s : récupération du journal\n"
+
+#: e2fsck/journal.c:882
+#, 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:909
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "lors de la tentative de ré-ouverture de %s"
+
+#: e2fsck/message.c:113
+msgid "aextended attribute"
+msgstr "aattribut étendu"
+
+#: e2fsck/message.c:114
+msgid "Aerror allocating"
+msgstr "Aerreur lors de l'allocation"
+
+#: e2fsck/message.c:115
+msgid "bblock"
+msgstr "bbloc"
+
+#: e2fsck/message.c:116
+msgid "Bbitmap"
+msgstr "Bbitmap"
+
+#: e2fsck/message.c:117
+msgid "ccompress"
+msgstr "ccompress"
+
+#: e2fsck/message.c:118
+msgid "Cconflicts with some other fs @b"
+msgstr "Cest en conflit avec des @bs d'autres systèmes de fichiers"
+
+#: e2fsck/message.c:119
+msgid "iinode"
+msgstr "ii-noeud"
+
+#: e2fsck/message.c:120
+msgid "Iillegal"
+msgstr "Iillégal"
+
+#: e2fsck/message.c:121
+msgid "jjournal"
+msgstr "jjournal"
+
+#: e2fsck/message.c:122
+msgid "Ddeleted"
+msgstr "Deffacé"
+
+#: e2fsck/message.c:123
+msgid "ddirectory"
+msgstr "drépertoire"
+
+#: 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 "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:131
+msgid "Lis a link"
+msgstr "Lest un lien"
+
+#: e2fsck/message.c:132
+msgid "mmultiply-claimed"
+msgstr "mréclamé(s) plusieurs fois"
+
+#: e2fsck/message.c:133
+msgid "ninvalid"
+msgstr "ninvalide"
+
+#: e2fsck/message.c:134
+msgid "oorphaned"
+msgstr "oorphelin"
+
+#: e2fsck/message.c:135
+msgid "pproblem in"
+msgstr "pproblème avec"
+
+#: e2fsck/message.c:136
+msgid "qquota"
+msgstr "qquota"
+
+#: e2fsck/message.c:137
+msgid "rroot @i"
+msgstr "r@i racine"
+
+#: e2fsck/message.c:138
+msgid "sshould be"
+msgstr "sdevrait être"
+
+#: e2fsck/message.c:139
+msgid "Ssuper@b"
+msgstr "Ssuper@b"
+
+#: e2fsck/message.c:140
+msgid "uunattached"
+msgstr "unon attaché"
+
+#: e2fsck/message.c:141
+msgid "vdevice"
+msgstr "vpériphérique"
+
+#: e2fsck/message.c:142
+msgid "xextent"
+msgstr "xextent"
+
+#: e2fsck/message.c:143
+msgid "zzero-length"
+msgstr "zde longueur zéro"
+
+#: e2fsck/message.c:154
+msgid "<The NULL inode>"
+msgstr "<L'i-noeud NUL>"
+
+#: e2fsck/message.c:155
+msgid "<The bad blocks inode>"
+msgstr "<L'i-noeud des blocs défectueux>"
+
+#: e2fsck/message.c:157
+msgid "<The user quota inode>"
+msgstr "<L'i-noeud de quota utilisateur>"
+
+#: e2fsck/message.c:158
+msgid "<The group quota inode>"
+msgstr "<L'i-noeud de quota de groupe>"
+
+#: e2fsck/message.c:159
+msgid "<The boot loader inode>"
+msgstr "<L'i-noeud du chargeur d'amorce>"
+
+#: e2fsck/message.c:160
+msgid "<The undelete directory inode>"
+msgstr "<L'i-noeud du répertoire de récupération de fichiers effacés>"
+
+#: e2fsck/message.c:161
+msgid "<The group descriptor inode>"
+msgstr "<L'i-noeud descripteur de groupe>"
+
+#: e2fsck/message.c:162
+msgid "<The journal inode>"
+msgstr "<L'i-noeud de journal>"
+
+#: e2fsck/message.c:163
+msgid "<Reserved inode 9>"
+msgstr "<L'i-noeud réservé 9>"
+
+#: e2fsck/message.c:164
+msgid "<Reserved inode 10>"
+msgstr "<L'i-noeud réservé 10>"
+
+#: e2fsck/message.c:333
+msgid "regular file"
+msgstr "fichier normal"
+
+#: e2fsck/message.c:335
+msgid "directory"
+msgstr "répertoire"
+
+#: e2fsck/message.c:337
+msgid "character device"
+msgstr "fichier de périphérique en mode caractère"
+
+#: e2fsck/message.c:339
+msgid "block device"
+msgstr "fichier de périphérique en mode bloc"
+
+#: e2fsck/message.c:341
+msgid "named pipe"
+msgstr "tube nommé"
+
+#: e2fsck/message.c:343
+msgid "symbolic link"
+msgstr "lien symbolique"
+
+#: e2fsck/message.c:345 misc/uuidd.c:161
+msgid "socket"
+msgstr "socket"
+
+#: e2fsck/message.c:347
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "type de fichier inconnu avec un mode 0%o"
+
+#: e2fsck/message.c:422
+msgid "indirect block"
+msgstr "bloc indirect"
+
+#: e2fsck/message.c:424
+msgid "double indirect block"
+msgstr "bloc doublement indirect"
+
+#: e2fsck/message.c:426
+msgid "triple indirect block"
+msgstr "bloc triplement indirect"
+
+#: e2fsck/message.c:428
+msgid "translator block"
+msgstr "bloc de traduction"
+
+#: e2fsck/message.c:430
+msgid "block #"
+msgstr "bloc n°"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "carte des i-noeuds réclamés plusieurs fois"
+
+#: e2fsck/pass1b.c:610 e2fsck/pass1b.c:730
+#, 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:821
+msgid "returned from clone_file_block"
+msgstr "retourné de clone_file_block"
+
+#: e2fsck/pass1b.c:843
+#, 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:855
+#, 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:475 e2fsck/pass2.c:782
+msgid "reading directory block"
+msgstr "lecture des blocs de répertoire"
+
+#: e2fsck/pass1.c:598
+msgid "in-use inode map"
+msgstr "carte des i-noeuds utilisés"
+
+#: e2fsck/pass1.c:609
+msgid "directory inode map"
+msgstr "carte des i-noeuds de répertoires"
+
+#: e2fsck/pass1.c:619
+msgid "regular file inode map"
+msgstr "carte des i-noeuds de fichiers normaux"
+
+#: e2fsck/pass1.c:628
+msgid "in-use block map"
+msgstr "carte des blocs utilisés"
+
+#: e2fsck/pass1.c:695
+msgid "opening inode scan"
+msgstr "l'ouverture de l'examen des i-noeuds"
+
+#: e2fsck/pass1.c:729
+msgid "getting next inode from scan"
+msgstr "l'obtention de l'i-noeud suivant depuis l'examen"
+
+#: e2fsck/pass1.c:1239
+msgid "Pass 1"
+msgstr "Passe 1"
+
+#: e2fsck/pass1.c:1296
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "lecture des blocs indirects de l'i-noeud %u"
+
+#: e2fsck/pass1.c:1346
+msgid "bad inode map"
+msgstr "carte des i-noeuds défectueux"
+
+#: e2fsck/pass1.c:1369
+msgid "inode in bad block map"
+msgstr "i-noeud dans la carte des blocs défectueux"
+
+#: e2fsck/pass1.c:1389
+msgid "imagic inode map"
+msgstr "carte d'i-noeuds magiques"
+
+#: e2fsck/pass1.c:1416
+msgid "multiply claimed block map"
+msgstr "carte des blocs réclamés plusieurs fois"
+
+#: e2fsck/pass1.c:1527
+msgid "ext attr block map"
+msgstr "carte des blocs d'attributs étendus"
+
+#: e2fsck/pass1.c:2299
+#, 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:2660
+msgid "block bitmap"
+msgstr "bitmap de blocs"
+
+#: e2fsck/pass1.c:2666
+msgid "inode bitmap"
+msgstr "bitmap d'i-noeuds"
+
+#: e2fsck/pass1.c:2672
+msgid "inode table"
+msgstr "table d'i-noeuds"
+
+#: e2fsck/pass2.c:283
+msgid "Pass 2"
+msgstr "Passe 2"
+
+#: e2fsck/pass2.c:805
+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:136
+msgid "Pass 3"
+msgstr "Passe 3"
+
+#: e2fsck/pass3.c:322
+msgid "inode loop detection bitmap"
+msgstr "bitmap de détection des boucles d'i-noeuds"
+
+#: e2fsck/pass4.c:196
+msgid "Pass 4"
+msgstr "Passe 4"
+
+#: e2fsck/pass5.c:74
+msgid "Pass 5"
+msgstr "Passe 5"
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(pas d'invite)"
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr "Corriger"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Effacer"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Relocaliser"
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr "Allouer"
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr "Étendre"
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr "Connecter à /lost+found"
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr "Créer"
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr "Récupérer"
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr "Tronquer"
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr "Effacer l'i-noeud"
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr "Arrêter"
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr "Scinder"
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr "Continuer"
+
+#: e2fsck/problem.c:65
+msgid "Clone multiply-claimed blocks"
+msgstr "Cloner les blocs réclamés plusieurs fois"
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr "Détruire le fichier"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Supprimer les messages"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "Délier"
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "Effacer l'index HTree"
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr "Recréer"
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr "(AUCUN)"
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr "CORRIGÉ"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "EFFACÉ"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "RELOCALISÉ"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "ALLOUÉ"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "ÉTENDU"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "RECONNECTÉ"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "CRÉÉ"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "RÉCUPÉRÉ"
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr "TRONQUÉ"
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr "INODE EFFACÉ"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "ARRÊTÉ"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr "SCINDÉ"
+
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr "POURSUITE"
+
+#: e2fsck/problem.c:93
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "BLOCS RÉCLAMÉS PLUSIEURS FOIS CLONÉS"
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr "FICHIER DÉTRUIT"
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr "SUPPRIMÉ"
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr "DÉLIÉ"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "INDEX HTREE EFFACÉ"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "RECRÉERA"
+
+#. @-expanded: block bitmap for group %g is not in group.  (block %b)\n
+#: e2fsck/problem.c:107
+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:111
+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:116
+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 correct ext2\n
+#. @-expanded: filesystem.  If the device is valid and it really contains an ext2\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 %S <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:122
+#, c-format
+msgid ""
+"\n"
+"The @S could not be read or does not describe a correct ext2\n"
+"@f.  If the @v is valid and it really contains an ext2\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 %S <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Le @S n'a pu être lu ou ne contient pas un @f\n"
+"ext2 correct. Si le @v est valide et qu'il contient réellement\n"
+"un @f ext2 (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 %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:131
+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:138
+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:145
+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:150
+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:155
+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:160
+#, 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:169
+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:174
+#, 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:179
+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:183
+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:188
+#, 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:193
+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:198
+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:203
+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:208
+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:213
+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:221
+msgid "@j @S is corrupt.\n"
+msgstr "Le @S du @j est corrompu.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal %s is present.\n
+#: e2fsck/problem.c:226
+#, c-format
+msgid "@S has_@j flag is clear, but a @j %s is present.\n"
+msgstr "Le drapeau has_@j du @S n'est pas activé, mais un @j %s est présent.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:231
+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:236
+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:241
+msgid "Clear @j"
+msgstr "Effacer le @j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.  
+#: e2fsck/problem.c:246 e2fsck/problem.c:695
+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:251
+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:256
+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:261
+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:266
+#, 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:271
+#, 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:276
+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:281
+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:286
+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:291
+#, 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:296
+#, 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:301
+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:307
+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:312
+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:317
+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:322
+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:328
+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:333
+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:338
+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:343
+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:347
+#, 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:352
+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:357
+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:362
+#, 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:367
+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:372
+msgid "Last @g @b @B uninitialized.  "
+msgstr "Le @B de @b du dernier @g n'est pas initialisé. "
+
+#: e2fsck/problem.c:377
+#, 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:381
+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)  
+#: e2fsck/problem.c:386
+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)  "
+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)  "
+
+#. @-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).  
+#: e2fsck/problem.c:392
+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).  "
+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)  "
+
+#. @-expanded: One or more block group descriptor checksums are invalid.  
+#: e2fsck/problem.c:398
+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:403
+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:408
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Définition du compteur des @bs libres à %c (était %b)\n"
+
+#. @-expanded: Making quota inode %i (%Q) hidden.\n
+#: e2fsck/problem.c:413
+msgid "Making @q @i %i (%Q) hidden.\n"
+msgstr "Dissimulation de l'@i de @q %i (%Q).\n"
+
+#. @-expanded: superblock has invalid MMP block.  
+#: e2fsck/problem.c:418
+msgid "@S has invalid MMP block.  "
+msgstr "Le @S a un @b MMP invalide. "
+
+#. @-expanded: superblock has invalid MMP magic.  
+#: e2fsck/problem.c:423
+msgid "@S has invalid MMP magic.  "
+msgstr "@S a un numéro magique MMP invalide. "
+
+#: e2fsck/problem.c:428
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:433
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "exet2fs_check_desc: %m\n"
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:440
+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:444
+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:449
+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:454
+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:459
+#, 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:464
+#, 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:469
+#, 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:474
+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:479
+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:484
+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:489
+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:494
+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:499
+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:504
+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:509
+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:514
+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:519
+#, 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:524
+#, 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:529
+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:534
+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:539
+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:544
+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:549
+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:556
+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:561
+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:567
+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:572
+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:578
+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:583
+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:589
+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:595
+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:600
+#, 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:605
+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:610
+#, 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:615
+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:620
+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:625 e2fsck/problem.c:1474
+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:630
+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:635
+#, 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:640
+#, 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:645
+#, 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:650
+#, 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:655
+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:660
+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:666
+#, 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:674
+#, 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:679
+#, 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: inode %i has compression flag set on filesystem without compression support.  
+#: e2fsck/problem.c:685
+#, c-format
+msgid "@i %i has @cion flag set on @f without @cion support.  "
+msgstr "l'@i %i a le drapeau de @cion qui est initialisé sur un @f sans support de @cion. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.  
+#: e2fsck/problem.c:690
+#, 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:700
+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:705
+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:710
+#, 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:716
+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:721
+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:726
+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:731
+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:736
+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:741
+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:746
+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:751
+msgid "@a @b %b has h_@bs > 1.  "
+msgstr "le @b %b d'@a a h_blocks > 1. "
+
+#. @-expanded: error allocating extended attribute block %b.  
+#: e2fsck/problem.c:756
+msgid "@A @a @b %b.  "
+msgstr "@A du @b %b d'@a. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).  
+#: e2fsck/problem.c:761
+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:766
+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:771
+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:776
+#, 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:780
+msgid "%B (%b) causes @d to be too big.  "
+msgstr "le %B (%b) rend le @d trop grand. "
+
+#: e2fsck/problem.c:785
+msgid "%B (%b) causes file to be too big.  "
+msgstr "le %B (%b) rend le fichier trop grand. "
+
+#: e2fsck/problem.c:790
+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:795
+#, 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:800
+#, 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:805
+#, 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:810
+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:815
+#, 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:820
+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:825
+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 entre en conflit avec les métadonnées du @f. "
+
+#. @-expanded: Resize inode (re)creation failed: %m.
+#: e2fsck/problem.c:831
+#, 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:836
+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:841
+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:846
+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:851
+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:856
+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:861
+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:866
+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:871
+#, 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:876
+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:882
+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:887
+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:892
+#, 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:897
+#, 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:902
+#, 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:907
+#, 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:912
+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 hors de portée\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:916
+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:921
+#, 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 regular file.  
+#: e2fsck/problem.c:926
+msgid "@q @i is not 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:931
+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:936
+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:941
+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:946
+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: 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:953
+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:959
+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: \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:967
+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:973
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "@b(s) @m dans l'@i %i :"
+
+#: e2fsck/problem.c:988
+#, 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:993
+#, 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:998
+#, 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:1003 e2fsck/problem.c:1318
+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:1008
+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:1014
+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:1019
+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:1025
+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:1030
+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:1035
+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:1040
+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:1053
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "N'a pu cloner le fichier : %m\n"
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1059
+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:1064
+#, 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:1069
+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:1074
+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:1079
+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:1084
+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:1089
+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:1094
+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:1099
+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:1104
+#, 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:1109
+#, 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:1114
+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:1119
+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:1124
+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:1129
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl @F %If, @s zéro.\n"
+
+#. @-expanded: i_dir_acl for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1134
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr "i_dir_acl @F %Id, @s zéro.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1139
+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:1144
+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:1149
+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:1154
+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:1159
+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:1164
+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:1169
+#, 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:1174
+#, 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:1179
+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:1184
+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:1189
+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:1194
+msgid "@E is duplicate '..' @e.\n"
+msgstr "l'@E est un doublon de l'@e « .. ».\n"
+
+#: e2fsck/problem.c:1199 e2fsck/problem.c:1499
+#, 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:1204
+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:1209
+#, 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:1214
+#, 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:1219
+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:1224
+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:1229
+#, 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:1234
+#, 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:1239
+#, 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:1244
+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:1249
+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:1254
+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:1259
+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:1264
+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:1269
+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:1274
+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:1279
+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:1284
+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:1289
+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:1294
+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:1299
+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:1304
+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:1309
+msgid "@n @h %d (%q).  "
+msgstr "@h %d @n (%q). "
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1313
+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:1323
+#, 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:1328
+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:1333
+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:1338
+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:1343
+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:1348
+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:1353
+#, 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:1358
+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:1363
+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:1368
+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:1372
+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:1377
+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:1382
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi @F %N, @s zéro.\n"
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1389
+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:1394
+msgid "@r not allocated.  "
+msgstr "l'@r n'est pas alloué. "
+
+#. @-expanded: No room in lost+found directory.  
+#: e2fsck/problem.c:1399
+msgid "No room in @l @d.  "
+msgstr "Pas d'espace dans le @d @l. "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1404
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "@i %i (%p) de @d non connecté\n"
+
+#. @-expanded: /lost+found not found.  
+#: e2fsck/problem.c:1409
+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:1414
+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:1419
+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:1424
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Ne peut étendre /@l : %m\n"
+
+#: e2fsck/problem.c:1429
+#, 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:1434
+#, 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:1439
+#, 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:1444
+#, 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:1449
+#, 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:1454
+#, 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:1459
+#, 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:1464
+#, 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:1469
+#, 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:1479
+#, 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:1484
+#, 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:1489
+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:1494
+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:1504
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l n'est pas un @d (ino=%i)\n"
+
+#: e2fsck/problem.c:1511
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Passe 3A : optimisation des répertoires\n"
+
+#: e2fsck/problem.c:1516
+#, 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:1521
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Échec d'optimisation du répertoire %q (%d) : %m\n"
+
+#: e2fsck/problem.c:1526
+msgid "Optimizing directories: "
+msgstr "Optimisation des répertoires : "
+
+#: e2fsck/problem.c:1543
+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:1548
+#, c-format
+msgid "@u @z @i %i.  "
+msgstr "@i %i @z @u. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1553
+#, 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:1558
+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:1562
+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: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1572
+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:1577
+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:1582
+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:1587
+msgid "@b @B differences: "
+msgstr "différences de @B de @bs : "
+
+#. @-expanded: inode bitmap differences: 
+#: e2fsck/problem.c:1607
+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:1627
+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:1632
+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:1637
+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:1642
+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:1647
+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:1652
+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:1658
+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:1663
+#, 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:1668
+#, 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:1693
+#, 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:1698
+#, 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: Recreate journal
+#: e2fsck/problem.c:1705
+msgid "Recreate @j"
+msgstr "Recréer le @j"
+
+#: e2fsck/problem.c:1710
+msgid "Update quota info for quota type %N"
+msgstr "Mise à jour de l'information de quota pour le type de quota %N"
+
+#: e2fsck/problem.c:1829
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Code d'erreur non traité (0x%x) !\n"
+
+#: e2fsck/problem.c:1954 e2fsck/problem.c:1958
+msgid "IGNORED"
+msgstr "IGNORÉ"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Mémoire utilisée : %d, 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: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:188
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr "lors de l'appel de ext2fs_block_iterate pour l'i-noeud %d"
+
+#: e2fsck/super.c:211
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %d"
+msgstr "lors de l'appel à ext2fs_adjust_ea_refcount2 pour l'i-noeud %d"
+
+#: e2fsck/super.c:272
+msgid "Truncating"
+msgstr "Lors de la troncature de"
+
+#: e2fsck/super.c:273
+msgid "Clearing"
+msgstr "Lors de l'effacement de"
+
+#: e2fsck/unix.c:74
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfvtDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] device\n"
+msgstr ""
+"Utilisation : %s [-panyrcdfvtDFV] [-b super-bloc] [-B taille-de-bloc]\n"
+"\t\t[-I nombre-blocs-du-tampon-i-noeuds] [-P taille-i-noeud-processus]\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:80
+#, c-format
+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:86
+#, c-format
+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"
+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"
+
+#: e2fsck/unix.c:131
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr "%s : %u/%u fichiers (%0d.%d%% non contigüs), %llu/%llu blocs\n"
+
+#: e2fsck/unix.c:157
+#, 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:161
+#, 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:166
+#, 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:171
+#, 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:179
+msgid "             Extent depth histogram: "
+msgstr "             Histogramme des profondeurs d'extents : "
+
+#: e2fsck/unix.c:188
+#, 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:192
+#, 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:194
+#, 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:196
+#, 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:198
+#, 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:200
+#, 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:203
+#, 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:205
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u fifo\n"
+msgstr[1] "%12u fifos\n"
+
+#: e2fsck/unix.c:207
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u lien\n"
+msgstr[1] "%12u liens\n"
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u lien symbolique"
+msgstr[1] "%12u liens symboliques"
+
+#: e2fsck/unix.c:211
+#, 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:215
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u socket\n"
+msgstr[1] "%12u sockets\n"
+
+#: e2fsck/unix.c:219
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u fichier\n"
+msgstr[1] "%12u fichiers\n"
+
+#: e2fsck/unix.c:232 misc/badblocks.c:983 misc/tune2fs.c:1985 misc/util.c:147
+#: resize/main.c:259
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "lors de la détermination à savoir si %s est monté."
+
+#: e2fsck/unix.c:252
+#, c-format
+msgid "Warning!  %s is %s.\n"
+msgstr "Attention ! %s est %s.\n"
+
+#: e2fsck/unix.c:259
+#, c-format
+msgid "%s is %s.\n"
+msgstr "%s est %s.\n"
+
+#: e2fsck/unix.c:262
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Ne peut continuer, arrêt immédiat.\n"
+"\n"
+
+#: e2fsck/unix.c:264
+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:269
+msgid "Do you really want to continue"
+msgstr "Souhaitez-vous réellement continuer"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "check aborted.\n"
+msgstr "vérification stoppée.\n"
+
+#: e2fsck/unix.c:361
+msgid " contains a file system with errors"
+msgstr " contient un système de fichiers comportant des erreurs"
+
+#: e2fsck/unix.c:363
+msgid " was not cleanly unmounted"
+msgstr " n'a pas été démonté proprement"
+
+#: e2fsck/unix.c:365
+msgid " primary superblock features different from backup"
+msgstr " les fonctionnalités du superbloc primaire diffèrent de celles de la sauvegarde"
+
+#: e2fsck/unix.c:369
+#, 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:376
+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:382
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " a passé %u jours sans avoir été vérifié"
+
+#: e2fsck/unix.c:391
+msgid ", check forced.\n"
+msgstr ", vérification forcée.\n"
+
+#: e2fsck/unix.c:424
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s : propre, %u/%u fichiers, %llu/%llu blocs"
+
+#: e2fsck/unix.c:443
+msgid " (check deferred; on battery)"
+msgstr " (vérification remise à plus tard : sur batterie)"
+
+#: e2fsck/unix.c:446
+msgid " (check after next mount)"
+msgstr " (vérification lors du prochain montage)"
+
+#: e2fsck/unix.c:448
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (vérification dans %ld montages)"
+
+#: e2fsck/unix.c:598
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "ERREUR : ne peut ouvrir /dev/null (%s)\n"
+
+#: e2fsck/unix.c:667
+#, c-format
+msgid "Invalid EA version.\n"
+msgstr "Version EA invalide.\n"
+
+#: e2fsck/unix.c:694
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Option étendue inconnue : %s\n"
+
+#: e2fsck/unix.c:719
+#, 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:788
+#, 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:792
+msgid "Invalid completion information file descriptor"
+msgstr "Descripteur de fichier d'information de complétion invalide"
+
+#: e2fsck/unix.c:807
+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:828
+#, 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:859 e2fsck/unix.c:931 misc/tune2fs.c:811 misc/tune2fs.c:1100
+#: misc/tune2fs.c:1118
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Impossible de résoudre « %s »"
+
+#: e2fsck/unix.c:910
+msgid "The -n and -D options are incompatible."
+msgstr "Les options -n et -D sont incompatibles."
+
+#: e2fsck/unix.c:915
+msgid "The -n and -c options are incompatible."
+msgstr "Les options -n et -c sont incompatibles."
+
+#: e2fsck/unix.c:920
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Les options -n et -l/-L sont incompatibles."
+
+#: e2fsck/unix.c:974
+#, c-format
+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:1022
+#, 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:1031
+#, 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:1120
+#, 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:1137 e2fsck/unix.c:1142
+msgid "while checking MMP block"
+msgstr "lors de la vérification du block MMP"
+
+#: e2fsck/unix.c:1144 misc/tune2fs.c:1912
+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"
+
+#: e2fsck/unix.c:1194
+#, c-format
+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:1202
+msgid "while trying to initialize program"
+msgstr "lors de la tentative d'initialisation du programme"
+
+#: e2fsck/unix.c:1225
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tUtilisation de %s, %s\n"
+
+#: e2fsck/unix.c:1237
+msgid "need terminal for interactive repairs"
+msgstr "a besoin d'un terminal pour des réparations en mode interactif"
+
+#: e2fsck/unix.c:1290
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s : %s tentons d'utiliser les blocs de sauvetage...\n"
+
+#: e2fsck/unix.c:1292
+msgid "Superblock invalid,"
+msgstr "Superbloc invalide,"
+
+#: e2fsck/unix.c:1293
+msgid "Group descriptors look bad..."
+msgstr "Les descripteurs de groupe semblent en mauvais état..."
+
+#: e2fsck/unix.c:1303
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s : %s lors de l'utilisation des blocs de sauvetage"
+
+#: e2fsck/unix.c:1307
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s : retour au superblock originel\n"
+
+#: e2fsck/unix.c:1335
+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:1341
+msgid "Could this be a zero-length partition?\n"
+msgstr "Peut-être cette partition est-elle de taille zéro ?\n"
+
+#: e2fsck/unix.c:1344
+#, 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:1349
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Périphérique peut-être inexistent ou pour le swap ?\n"
+
+#: e2fsck/unix.c:1352
+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:1355
+msgid "Possibly non-existent device?\n"
+msgstr "Périphérique peut-être inexistant ?\n"
+
+#: e2fsck/unix.c:1358
+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:1423
+msgid "Get a newer version of e2fsck!"
+msgstr "Veuillez obtenir une version plus récente d'e2fsck !"
+
+#: e2fsck/unix.c:1467
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr "lors de la vérification du journal ext3 pour %s"
+
+#: e2fsck/unix.c:1478
+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:1491
+#, 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:1497
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr "lors de la récupération du journal ext3 de %s"
+
+#: e2fsck/unix.c:1521
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s a une(des) fonctionnalité(s) non supportée(s) :"
+
+#: e2fsck/unix.c:1536
+#, c-format
+msgid "%s: warning: compression support is experimental.\n"
+msgstr "%s : avertissement : le support de la compression est expérimental.\n"
+
+#: e2fsck/unix.c:1542
+#, c-format
+msgid ""
+"%s: e2fsck not compiled with HTREE support,\n"
+"\tbut filesystem %s has HTREE directories.\n"
+msgstr ""
+"%s : e2fsck n'est pas compilé avec le support pour HTREE,\n"
+"\tmais le système de fichiers %s a des répertoires HTREE.\n"
+
+#: e2fsck/unix.c:1594
+#, 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:1597
+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:1638
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Création du journal (%d blocs) : "
+
+#: e2fsck/unix.c:1648
+msgid " Done.\n"
+msgstr "Complété.\n"
+
+#: e2fsck/unix.c:1649
+msgid ""
+"\n"
+"*** journal has been re-created - filesystem is now ext3 again ***\n"
+msgstr ""
+"\n"
+"*** le journal a été re-créé - le système de fichiers est de nouveau ext3 ***\n"
+
+#: e2fsck/unix.c:1672
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Re-démarrons e2fsck depuis le début...\n"
+
+#: e2fsck/unix.c:1676
+msgid "while resetting context"
+msgstr "lors de la réinitialisation du contexte"
+
+#: e2fsck/unix.c:1683
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s : e2fsck a été annulé.\n"
+
+#: e2fsck/unix.c:1688
+msgid "aborted"
+msgstr "arrêté"
+
+#: e2fsck/unix.c:1700 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:1704
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr "%s : ***** RÉ-AMORCER LINUX *****\n"
+
+#: e2fsck/unix.c:1712 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/unix.c:1752
+msgid "while setting block group checksum info"
+msgstr "lors de l'initialisation de l'information de checksum du groupe de blocs"
+
+#: e2fsck/util.c:190 misc/util.c:70
+msgid "yY"
+msgstr "oO"
+
+#: e2fsck/util.c:191
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:205
+msgid "<y>"
+msgstr "<o>"
+
+#: e2fsck/util.c:207
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:209
+msgid " (y/n)"
+msgstr " (o/n)"
+
+#: e2fsck/util.c:223
+msgid "cancelled!\n"
+msgstr "annulé !\n"
+
+#: e2fsck/util.c:238
+msgid "yes\n"
+msgstr "oui\n"
+
+#: e2fsck/util.c:240
+msgid "no\n"
+msgstr "non\n"
+
+#: e2fsck/util.c:250
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s ? non\n"
+"\n"
+
+#: e2fsck/util.c:254
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s ? oui\n"
+"\n"
+
+#: e2fsck/util.c:258
+msgid "yes"
+msgstr "oui"
+
+#: e2fsck/util.c:258
+msgid "no"
+msgstr "non"
+
+#: e2fsck/util.c:273
+#, 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:278
+msgid "reading inode and block bitmaps"
+msgstr "la lecture des bitmaps d'i-noeuds et de blocs"
+
+#: e2fsck/util.c:286
+#, 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:298
+msgid "writing block and inode bitmaps"
+msgstr "l'écriture des bitmaps de blocs et d'i-noeuds"
+
+#: e2fsck/util.c:303
+#, 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:315
+#, 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:396
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Mémoire utilisée : %luk/%luk (%luk/%luk), "
+
+#: e2fsck/util.c:400
+#, c-format
+msgid "Memory used: %lu, "
+msgstr "Mémoire utilisée : %lu, "
+
+#: e2fsck/util.c:407
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "temps : %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:412
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "temps écoulé : %6.3f\n"
+
+#: e2fsck/util.c:447 e2fsck/util.c:461
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "lors de la lecture de l'i-noeud %lu dans %s"
+
+#: e2fsck/util.c:475 e2fsck/util.c:488
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "lors de l'écriture de l'i-noeud %lu dans %s"
+
+#: e2fsck/util.c:637
+msgid "while allocating zeroizing buffer"
+msgstr "lors de l'allocation d'un tampon de mise à zéro"
+
+#: e2fsck/util.c:785
+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:69
+msgid "done                                                 \n"
+msgstr "complété                                             \n"
+
+#: misc/badblocks.c:92
+#, 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"
+msgstr ""
+"Utilisation : %s [-b taille_de_bloc] [-i fichier_d_entrée] [-o fichier_de_sortie]\n"
+"       [-svwnf] [-c blocs_à_la_fois] [-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:103
+#, 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:218
+#, 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:322
+msgid "Testing with random pattern: "
+msgstr "Test en cours avec un motif aléatoire : "
+
+#: misc/badblocks.c:340
+msgid "Testing with pattern 0x"
+msgstr "Test en cours avec le motif 0x"
+
+#: misc/badblocks.c:372 misc/badblocks.c:445
+msgid "during seek"
+msgstr "lors de la recherche"
+
+#: misc/badblocks.c:383
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Valeur bizarre (%ld) dans do_read\n"
+
+#: misc/badblocks.c:469
+msgid "during ext2fs_sync_device"
+msgstr "lors de l'exécution d'ext2fs_sync_device"
+
+#: misc/badblocks.c:489 misc/badblocks.c:749
+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:503 misc/badblocks.c:602 misc/badblocks.c:759
+msgid "while allocating buffers"
+msgstr "lors de l'allocation des tampons"
+
+#: misc/badblocks.c:507
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Vérification des blocs %lu à %lu\n"
+
+#: misc/badblocks.c:512
+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:521
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Vérification des blocs défectueux (test en mode lecture seule) : "
+
+#: misc/badblocks.c:528 misc/badblocks.c:634 misc/badblocks.c:676
+#: misc/badblocks.c:822
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Trop de blocs défectueux, test abandonné\n"
+
+#: misc/badblocks.c:609
+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:611 misc/badblocks.c:772
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Du bloc %lu au bloc %lu\n"
+
+#: misc/badblocks.c:666
+msgid "Reading and comparing: "
+msgstr "Lecture et comparaison : "
+
+#: misc/badblocks.c:771
+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:777
+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:784
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Interruption, nettoyage en cours\n"
+
+#: misc/badblocks.c:867
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "lors du test d'écriture de données, bloc %lu"
+
+#: misc/badblocks.c:988 misc/util.c:152
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s est monté ; "
+
+#: misc/badblocks.c:990
+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:995
+msgid "it's not safe to run badblocks!\n"
+msgstr "il n'est pas prudent d'exécuter badblocks !\n"
+
+#: misc/badblocks.c:1000 misc/util.c:163
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s est apparemment utilisé par le système ; "
+
+#: misc/badblocks.c:1003
+msgid "badblocks forced anyway.\n"
+msgstr "blocs erronés forcés de toutes manières.\n"
+
+#: misc/badblocks.c:1023
+#, c-format
+msgid "invalid %s - %s"
+msgstr "%s invalide - %s"
+
+#: misc/badblocks.c:1133
+#, 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:1163
+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:1169
+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:1183
+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:1189
+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:1194
+msgid "last block"
+msgstr "dernier bloc"
+
+#: misc/badblocks.c:1200
+msgid "first block"
+msgstr "premier bloc"
+
+#: misc/badblocks.c:1203
+#, c-format
+msgid "invalid starting block (%lu): must be less than %lu"
+msgstr "bloc de départ invalide (%lu) : doit être moins de %lu"
+
+#: misc/badblocks.c:1259
+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:1274
+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:1298
+#, 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:86
+#, c-format
+msgid "Usage: %s [-RVf] [-+=AaCcDdeijsSu] [-v version] files...\n"
+msgstr "Utilisation : %s [-RVf] [-+=AaCcDdeijsSu] [-v version] fichiers...\n"
+
+#: misc/chattr.c:155
+#, c-format
+msgid "bad version - %s\n"
+msgstr "version erronée - %s\n"
+
+#: misc/chattr.c:201 misc/lsattr.c:116
+#, c-format
+msgid "while trying to stat %s"
+msgstr "lors de l'évaluation par stat() de %s"
+
+#: misc/chattr.c:208
+#, c-format
+msgid "while reading flags on %s"
+msgstr "lors de la lecture des drapeaux sur %s"
+
+#: misc/chattr.c:213 misc/chattr.c:225
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Drapeaux de %s initialisés comme "
+
+#: misc/chattr.c:234
+#, c-format
+msgid "while setting flags on %s"
+msgstr "lors de l'initialisation des drapeaux sur %s"
+
+#: misc/chattr.c:242
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Version de %s initialisée à %lu\n"
+
+#: misc/chattr.c:246
+#, c-format
+msgid "while setting version on %s"
+msgstr "lors de l'initialisation de la version sur %s"
+
+#: misc/chattr.c:266
+#, c-format
+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:306
+msgid "= is incompatible with - and +\n"
+msgstr "= est incompatible avec - et +\n"
+
+#: misc/chattr.c:314
+msgid "Must use '-v', =, - or +\n"
+msgstr "Vous devez utiliser « -v », = - ou +\n"
+
+#: misc/dumpe2fs.c:55
+#, c-format
+msgid "Usage: %s [-bfhixV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Utilisation : %s [-bfhixV] [-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:196
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Groupe %lu : (Blocs "
+
+#: misc/dumpe2fs.c:204
+#, c-format
+msgid "  Checksum 0x%04x"
+msgstr "  Checksum 0x%04x"
+
+#: misc/dumpe2fs.c:206
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (ATTENDU 0x%04x)"
+
+#: misc/dumpe2fs.c:207
+#, c-format
+msgid ", unused inodes %u\n"
+msgstr ", i-noeuds non utilisés %u\n"
+
+#: misc/dumpe2fs.c:212
+#, c-format
+msgid "  %s superblock at "
+msgstr " superbloc %s à "
+
+#: misc/dumpe2fs.c:213
+msgid "Primary"
+msgstr "Primaire"
+
+#: misc/dumpe2fs.c:213
+msgid "Backup"
+msgstr "Secours"
+
+#: misc/dumpe2fs.c:217
+#, c-format
+msgid ", Group descriptors at "
+msgstr ", Descripteurs de groupes à "
+
+#: misc/dumpe2fs.c:221
+#, c-format
+msgid ""
+"\n"
+"  Reserved GDT blocks at "
+msgstr ""
+"\n"
+"  Blocs réservés GDT à "
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " Group descriptor at "
+msgstr " Descripteur de groupe à "
+
+#: misc/dumpe2fs.c:234
+msgid "  Block bitmap at "
+msgstr " Bitmap de blocs à "
+
+#: misc/dumpe2fs.c:238
+msgid ", Inode bitmap at "
+msgstr ", Bitmap d'i-noeuds à "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+"  Inode table at "
+msgstr ""
+"\n"
+" Table d'i-noeuds à "
+
+#: misc/dumpe2fs.c:248
+#, 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:255
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u i-noeuds non utilisés\n"
+
+#: misc/dumpe2fs.c:258
+msgid "  Free blocks: "
+msgstr " Blocs libres : "
+
+#: misc/dumpe2fs.c:269
+msgid "  Free inodes: "
+msgstr " I-noeuds libres : "
+
+#: misc/dumpe2fs.c:300
+msgid "while printing bad block list"
+msgstr "lors de l'affichage de la liste des blocs défectueux"
+
+#: misc/dumpe2fs.c:306
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Blocs défectueux : %u"
+
+#: misc/dumpe2fs.c:333 misc/tune2fs.c:306
+msgid "while reading journal inode"
+msgstr "lors de la lecture de l'i-noeud du journal"
+
+#: misc/dumpe2fs.c:339
+msgid "while opening journal inode"
+msgstr "lors de l'ouverture de l'i-noeud du journal"
+
+#: misc/dumpe2fs.c:345
+msgid "while reading journal super block"
+msgstr "lors de la lecture du journal du superbloc"
+
+#: misc/dumpe2fs.c:355
+#, c-format
+msgid "Journal features:        "
+msgstr "Fonctionalités du journal : "
+
+#: misc/dumpe2fs.c:368
+msgid "Journal size:             "
+msgstr "Taille du journal :         "
+
+#: misc/dumpe2fs.c:379
+#, c-format
+msgid ""
+"Journal length:           %u\n"
+"Journal sequence:         0x%08x\n"
+"Journal start:            %u\n"
+msgstr ""
+"Longueur du journal :      %u\n"
+"Séquence du journal :      0x%08x\n"
+"Début du journal :         %u\n"
+
+#: misc/dumpe2fs.c:386
+#, c-format
+msgid "Journal errno:            %d\n"
+msgstr "Numéro erreur du journal: %d\n"
+
+#: misc/dumpe2fs.c:401 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "lors de la lecture du journal du superbloc"
+
+#: misc/dumpe2fs.c:409
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Ne peut trouver les numéros magiques du superbloc du journal"
+
+#: misc/dumpe2fs.c:413
+#, c-format
+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"
+"Taille de bloc du journal :        %u\n"
+"Longueur du journal :              %u\n"
+"Premier bloc du journal :          %u\n"
+"Séquence du journal :              0x%08x\n"
+"Début du journal :                 %u\n"
+"Nombre d'utilisateurs du journal : %u\n"
+
+#: misc/dumpe2fs.c:426
+#, c-format
+msgid "Journal users:            %s\n"
+msgstr "Usagers du journal :      %s\n"
+
+#: misc/dumpe2fs.c:442 misc/mke2fs.c:666 misc/tune2fs.c:1137
+#, c-format
+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:468
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Paramètre de superbloc invalide : %s\n"
+
+#: misc/dumpe2fs.c:483
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Paramètre de taille de bloc invalide : %s\n"
+
+#: misc/dumpe2fs.c:494
+#, 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:554 misc/mke2fs.c:1555
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tUtilisation de %s\n"
+
+#: misc/dumpe2fs.c:590 misc/e2image.c:1326 misc/tune2fs.c:1923
+#: resize/main.c:317
+#, c-format
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Impossible de trouver un superbloc de système de fichiers valide.\n"
+
+#: misc/dumpe2fs.c:618
+#, c-format
+msgid ""
+"\n"
+"%s: %s: error reading bitmaps: %s\n"
+msgstr ""
+"\n"
+"%s : %s : erreur lors de la lecture des bitmaps : %s\n"
+
+#: misc/e2image.c:90
+#, c-format
+msgid "Usage: %s [-rsIQa] device image_file\n"
+msgstr "Utilisation : %s [-rsIQa] périphérique fichier_image\n"
+
+#: misc/e2image.c:138
+#, c-format
+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:144
+msgid "Couldn't allocate header buffer\n"
+msgstr "Ne peut allouer un tampon d'en-tête\n"
+
+#: misc/e2image.c:174
+msgid "while writing superblock"
+msgstr "lors de l'écriture du superbloc"
+
+#: misc/e2image.c:182
+msgid "while writing inode table"
+msgstr "lors de l'écriture de la table d'i-noeuds"
+
+#: misc/e2image.c:189
+msgid "while writing block bitmap"
+msgstr "lors de l'écriture du bitmap de blocs"
+
+#: misc/e2image.c:196
+msgid "while writing inode bitmap"
+msgstr "lors de l'écriture du bitmap d'i-noeuds"
+
+#: misc/e2image.c:1365
+#, 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/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:2080
+#, 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:803
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Utilisation : e2label périphérique [nouvelle_étiquette]\n"
+
+#: misc/e2undo.c:36
+#, c-format
+msgid "Usage: %s <transaction file> <filesystem>\n"
+msgstr "Utilisation : %s <fichier transaction> <système de fichiers>\n"
+
+#: misc/e2undo.c:52
+msgid "Failed to read the file system data \n"
+msgstr "Échec de lecture des données du système de fichiers \n"
+
+#: misc/e2undo.c:62 misc/e2undo.c:83 misc/e2undo.c:108 misc/e2undo.c:206
+#, c-format
+msgid "Failed tdb_fetch %s\n"
+msgstr "Échec tdb_fetch %s\n"
+
+#: misc/e2undo.c:70
+#, c-format
+msgid "The file system Mount time didn't match %u\n"
+msgstr "La date de montage du système de fichiers ne correspond pas à %u\n"
+
+#: misc/e2undo.c:89
+msgid "The file system UUID didn't match \n"
+msgstr "L'UUID du système de fichiers ne correspond pas \n"
+
+#: misc/e2undo.c:163
+#, c-format
+msgid "Failed tdb_open %s\n"
+msgstr "Échec tdb_open %s\n"
+
+#: misc/e2undo.c:169
+#, c-format
+msgid "Error while determining whether %s is mounted.\n"
+msgstr "Erreur lors la détermination à savoir si %s est monté.\n"
+
+#: misc/e2undo.c:175
+msgid "e2undo should only be run on unmounted file system\n"
+msgstr "e2undo ne devrait être lancé que sur un système de fichiers non monté\n"
+
+#: misc/e2undo.c:184
+#, c-format
+msgid "Failed to open %s\n"
+msgstr "Échec lors de l'ouverture de %s\n"
+
+#: misc/e2undo.c:210
+#, c-format
+msgid "Replayed transaction of size %zd at location %llu\n"
+msgstr "Rejeu de la transaction de taille %zd à la position %llu\n"
+
+#: misc/e2undo.c:216
+#, c-format
+msgid "Failed write %s\n"
+msgstr "Échec écriture %s\n"
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "ATTENTION : impossible d'ouvrir %s : %s\n"
+
+#: misc/fsck.c:353
+#, 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: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 ""
+"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:478
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck : %s : non trouvé\n"
+
+#: misc/fsck.c:594
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s : wait : plus de processus fils ?!?\n"
+
+#: misc/fsck.c:616
+#, 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:622
+#, 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:661
+#, 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:721
+#, 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:742
+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:761
+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:884
+#, 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:911
+#, 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:967
+msgid "Checking all file systems.\n"
+msgstr "Vérification de tous les systèmes de fichiers.\n"
+
+#: misc/fsck.c:1058
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--en attente-- (passe %d)\n"
+
+#: misc/fsck.c:1078
+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:1120
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s : trop de périphériques\n"
+
+#: misc/fsck.c:1153 misc/fsck.c:1239
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s : trop d'arguments\n"
+
+#: misc/lsattr.c:74
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr "Utilisation : %s [-RVadlv] [fichiers...]\n"
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Lors de la lecture des drapeaux sur %s"
+
+#: misc/lsattr.c:91
+#, c-format
+msgid "While reading version on %s"
+msgstr "Lors de la lecture de la version sur %s"
+
+#: misc/mke2fs.c:116
+#, 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]\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] [-jnqvDFKSV] 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[-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] [-jnqvFKSV] périphérique [nombre-de-blocs]\n"
+
+#: misc/mke2fs.c:221
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Exécution de la commande : %s\n"
+
+#: misc/mke2fs.c:225
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "durant la tentative d'exécution de « %s »"
+
+#: misc/mke2fs.c:232
+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:259
+#, 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:261
+#, 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:264
+msgid "Aborting....\n"
+msgstr "Arrêt immédiat...\n"
+
+#: misc/mke2fs.c:284
+#, 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:303
+msgid "while marking bad blocks as used"
+msgstr "lors du marquage des blocs défectueux en tant qu'utilisés"
+
+#: misc/mke2fs.c:320
+msgid "Writing inode tables: "
+msgstr "Écriture des tables d'i-noeuds : "
+
+#: misc/mke2fs.c:341
+#, 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:355 misc/mke2fs.c:2257 misc/mke2fs.c:2512
+#, c-format
+msgid "done                            \n"
+msgstr "complété                        \n"
+
+#: misc/mke2fs.c:366
+msgid "while creating root dir"
+msgstr "lors de la création du répertoire racine"
+
+#: misc/mke2fs.c:373
+msgid "while reading root inode"
+msgstr "lors de la lecture de l'i-noeud racine"
+
+#: misc/mke2fs.c:385
+msgid "while setting root inode ownership"
+msgstr "lors de l'initialisation de la propriété de l'i-noeud racine"
+
+#: misc/mke2fs.c:403
+msgid "while creating /lost+found"
+msgstr "lors de la création de /lost+found"
+
+#: misc/mke2fs.c:410
+msgid "while looking up /lost+found"
+msgstr "lors de la recherche de /lost+found"
+
+#: misc/mke2fs.c:423
+msgid "while expanding /lost+found"
+msgstr "lors de l'extension de /lost+found"
+
+#: misc/mke2fs.c:438
+msgid "while setting bad block inode"
+msgstr "lors de l'initialisation de l'i-noeud des blocs défectueux"
+
+#: misc/mke2fs.c:465
+#, 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:475
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Avertissement : impossible de lire le bloc 0 : %s\n"
+
+#: misc/mke2fs.c:491
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Avertissement : impossible d'effacer le secteur %d : %s\n"
+
+#: misc/mke2fs.c:507
+msgid "while initializing journal superblock"
+msgstr "lors de l'initialisation du journal du superbloc"
+
+#: misc/mke2fs.c:515
+msgid "Zeroing journal device: "
+msgstr "Mise à zéro du périphérique de journal : "
+
+#: misc/mke2fs.c:527
+#, 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:545
+msgid "while writing journal superblock"
+msgstr "lors de l'écriture du superbloc de journal"
+
+#: misc/mke2fs.c:560
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"Avertissement : %llu blocs inutilisés.\n"
+"\n"
+
+#: misc/mke2fs.c:565
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Étiquette de système de fichiers=%s\n"
+
+#: misc/mke2fs.c:568
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Type de système d'exploitation : %s\n"
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Taille de bloc=%u (log=%u)\n"
+
+#: misc/mke2fs.c:574
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Taille de cluster=%u (log=%u)\n"
+
+#: misc/mke2fs.c:578
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Taille de fragment=%u (log=%u)\n"
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "« Stride » = %u blocs, « Stripe width » = %u blocs\n"
+
+#: misc/mke2fs.c:582
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u i-noeuds, %llu blocs\n"
+
+#: misc/mke2fs.c:584
+#, 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:587
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Premier bloc de données=%u\n"
+
+#: misc/mke2fs.c:589
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Propriétaire du répertoire racine=%u:%u\n"
+
+#: misc/mke2fs.c:591
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Nombre maximum de blocs du système de fichiers=%lu\n"
+
+#: misc/mke2fs.c:595
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u groupes de blocs\n"
+
+#: misc/mke2fs.c:597
+#, c-format
+msgid "%u block group\n"
+msgstr "%u groupe de bloc\n"
+
+#: misc/mke2fs.c:600
+#, 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:603
+#, 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:605
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u i-noeuds par groupe\n"
+
+#: misc/mke2fs.c:612
+#, c-format
+msgid "Superblock backups stored on blocks: "
+msgstr "Superblocs de secours stockés sur les blocs : "
+
+#: misc/mke2fs.c:691 misc/tune2fs.c:1165
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "mmp_update_interval invalide : %s\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Paramètre « stride » invalide : %s\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Paramètre « stripe-width » invalide : %s\n"
+
+#: misc/mke2fs.c:743
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Paramètre de changement de taille invalide : %s\n"
+
+#: misc/mke2fs.c:750
+#, c-format
+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:774
+#, c-format
+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:801 misc/mke2fs.c:810
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "root_owner invalide : « %s »\n"
+
+#: misc/mke2fs.c:835
+#, c-format
+msgid "Invalid quotatype parameter: %s\n"
+msgstr "Paramètre de type de quota invalide : %s\n"
+
+#: misc/mke2fs.c:846
+#, 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"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_uid=<uid of root directory>\n"
+"\troot_gid=<gid of root directory>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr OR grp>\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"
+"\tstride=<taille en blocs des morceaux par disque RAID>\n"
+"\tstripe-width=<stride RAID * nombre de disques en blocs>\n"
+"\tresize=<taille maximale de changement de taille en blocs>\n"
+"\tlazy_itable_init=<0 pour désactiver, 1 pour activer>\n"
+"\tlazy_journal_init=<0 pour désactiver, 1 pour activer>\n"
+"\troot_uid=<uid du répertoire racine>\n"
+"\troot_gid=<gid du répertoire racine>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr OU grp>\n"
+"\n"
+
+#: misc/mke2fs.c:868
+#, 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:907
+#, 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:920 misc/tune2fs.c:398
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Jeu d'options de système de fichiers invalide : %s\n"
+
+#: misc/mke2fs.c:932 misc/tune2fs.c:349
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Jeu d'options pour le montage invalide : %s\n"
+
+#: misc/mke2fs.c:1072
+#, 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:1076
+#, c-format
+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:1080
+#, c-format
+msgid "Aborting...\n"
+msgstr "Arrêt immédiat...\n"
+
+#: misc/mke2fs.c:1120
+#, 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:1276
+#, c-format
+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:1317
+#, 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:1357
+#, c-format
+msgid "invalid block size - %s"
+msgstr "taille invalide des blocs - %s"
+
+#: misc/mke2fs.c:1361
+#, 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:1377
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "taille de cluster invalide - %s"
+
+#: misc/mke2fs.c:1387
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "« -R » est déprécié, utiliser plutôt « -E »"
+
+#: misc/mke2fs.c:1399
+msgid "Illegal number for blocks per group"
+msgstr "Nombre de blocs par groupe illégal"
+
+#: misc/mke2fs.c:1404
+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:1412
+msgid "Illegal number for flex_bg size"
+msgstr "Nombre illégal pour la taille flex_bg"
+
+#: misc/mke2fs.c:1418
+msgid "flex_bg size must be a power of 2"
+msgstr "La taille flex_bg doit être une puissance de 2"
+
+#: misc/mke2fs.c:1428
+#, 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:1438
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "taille d'i-noeud invalide - %s"
+
+#: misc/mke2fs.c:1450
+#, c-format
+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:1460
+msgid "in malloc for bad_blocks_filename"
+msgstr "dans malloc pour bad_blocks_filename"
+
+#: misc/mke2fs.c:1473
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "pourcentage de blocs réservés invalide - %s"
+
+#: misc/mke2fs.c:1488
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "mauvais nombre d'i-noeuds - %s"
+
+#: misc/mke2fs.c:1505
+#, c-format
+msgid "bad revision level - %s"
+msgstr "mauvais numéro de version - %s"
+
+#: misc/mke2fs.c:1519
+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:1527
+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:1580 misc/mke2fs.c:2591
+#, 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:1586
+#, 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:1592
+#, 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:1603
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "blocs '%s' invalides sur le périphérique %s"
+
+#: misc/mke2fs.c:1613
+msgid "filesystem"
+msgstr "système de fichiers"
+
+#: misc/mke2fs.c:1626 resize/main.c:367
+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:1632
+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:1639
+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:1656
+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:1676
+#, c-format
+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:1730
+#, 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:1746
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "résolution de fs_types pour mke2fs.conf : "
+
+#: misc/mke2fs.c:1753
+#, c-format
+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:1760
+#, c-format
+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:1772
+#, c-format
+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:1786
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "pourcentage de blocs réservés invalide - %lf"
+
+#: misc/mke2fs.c:1802
+#, c-format
+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:1819
+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:1825
+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:1858
+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:1863
+#, 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:1881
+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:1887
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "Spécifier une taille de cluster nécessite la fonctionalité bigalloc"
+
+#: misc/mke2fs.c:1906
+#, 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:1909
+#, 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:1911
+#, 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:1930
+#, 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:1934
+#, 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:1968
+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:1975
+#, c-format
+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"
+"Avertissement : la fonctionalité bigalloc est encore en cours de développement\n"
+"Voir https://ext4.wiki.kernel.org/index.php/Bigalloc pour plus d'informations\n"
+"\n"
+
+#: misc/mke2fs.c:1982 misc/tune2fs.c:740
+#, c-format
+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"
+"Avertissement : la fonctionalité quota est encore en cours de développement\n"
+"Voir https://ext4.wiki.kernel.org/index.php/Quota pour plus d'informations\n"
+"\n"
+
+#: misc/mke2fs.c:1993
+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:2002
+msgid "blocks per group count out of range"
+msgstr "compteur de blocs par groupe hors limite"
+
+#: misc/mke2fs.c:2026
+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:2038
+#, 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:2056
+#, 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:2063
+#, 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:2077
+#, 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:2196
+#, 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"
+
+#: misc/mke2fs.c:2210
+msgid "while trying to setup undo file\n"
+msgstr "lors de la tentative de mise en place du fichier d'annulation\n"
+
+#: misc/mke2fs.c:2236
+msgid "Discarding device blocks: "
+msgstr "Rejet des blocs de périphérique : "
+
+#: misc/mke2fs.c:2252
+msgid "failed - "
+msgstr "échoué - "
+
+#: misc/mke2fs.c:2360
+msgid "while setting up superblock"
+msgstr "lors de l'initialisation du superbloc"
+
+#: misc/mke2fs.c:2369
+#, c-format
+msgid "Discard succeeded and will return 0s  - skipping inode table wipe\n"
+msgstr "L'effacement a réussi et retournera des 0s  - saut de l'effacement de la table des i-noeuds\n"
+
+#: misc/mke2fs.c:2452
+#, c-format
+msgid "unknown os - %s"
+msgstr "système d'exploitation inconnu - %s"
+
+#: misc/mke2fs.c:2504
+#, c-format
+msgid "Allocating group tables: "
+msgstr "Allocation des tables de groupe : "
+
+#: misc/mke2fs.c:2508
+msgid "while trying to allocate filesystem tables"
+msgstr "lors de la tentative d'allocation des tables de systèmes de fichiers"
+
+#: misc/mke2fs.c:2517
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tlors de la conversion du bitmap de sous-cluster"
+
+#: misc/mke2fs.c:2560
+#, 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:2573
+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:2584 misc/tune2fs.c:645
+msgid "journal"
+msgstr "journal"
+
+#: misc/mke2fs.c:2596
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Ajout du journal au périphérique %s : "
+
+#: misc/mke2fs.c:2603
+#, 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:2608 misc/mke2fs.c:2640 misc/tune2fs.c:674 misc/tune2fs.c:688
+#, c-format
+msgid "done\n"
+msgstr "complété\n"
+
+#: misc/mke2fs.c:2617
+#, c-format
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Pas de création de journal en mode super-seul\n"
+
+#: misc/mke2fs.c:2628
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Création du journal (%u blocs) : "
+
+#: misc/mke2fs.c:2636
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tlors de la tentative de création du journal"
+
+#: misc/mke2fs.c:2647 misc/tune2fs.c:451
+#, c-format
+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:2652
+#, 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:2665
+#, c-format
+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:2672
+#, c-format
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+"\n"
+"Attention, des problèmes sont survenus lors de l'écriture des superblocs."
+
+#: misc/mke2fs.c:2674
+#, c-format
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"complété\n"
+"\n"
+
+#: misc/mklost+found.c:50
+#, c-format
+msgid "Usage: mklost+found\n"
+msgstr "Utilisation : mklost+found\n"
+
+#: misc/partinfo.c:41
+#, 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:51
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Impossible d'ouvrir %s : %s"
+
+#: misc/partinfo.c:57
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Impossible d'obtenir la géométrie de %s : %s"
+
+#: misc/partinfo.c:65
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Impossible d'obtenir la taille de %s : %s"
+
+#: misc/partinfo.c:71
+#, 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:107
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr "SVP exécutez e2fsck sur le système de fichiers.\n"
+
+#: misc/tune2fs.c:116
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-p mmp_update_interval]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]\n"
+"\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[ -I new_inode_size ] device\n"
+msgstr ""
+"Utilisation : %s [-c limite-maximale-de-montage]\n"
+"\t[-e comportement-en-cas-d-erreur] [-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[-p intervale-mise-à-jour-mmp] [-r nombre-de-blocs-réservés]\n"
+"\t[-u utilisateur] [-C nombre-de-montage] [-L étiquette-du-volume]\n"
+"\t[-M dernier-répertoire-monté] [-O [^]fonctionnalité[,...]]\n"
+"\t[-E option-étendue[,...]] [-T date-de-dernière-vérification]\n"
+"\t[-U UUID] [-I nouvelle-taille-i-noeuds] périphérique\n"
+
+#: misc/tune2fs.c:209
+msgid "while trying to open external journal"
+msgstr "lors de la tentative d'ouverture du journal externe"
+
+#: misc/tune2fs.c:214
+#, 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:229
+msgid "Journal superblock not found!\n"
+msgstr "Le superbloc de journal n'a pas été trouvé !\n"
+
+#: misc/tune2fs.c:240
+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:261
+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:269
+msgid "Journal removed\n"
+msgstr "Journal enlevé\n"
+
+#: misc/tune2fs.c:313
+msgid "while reading bitmaps"
+msgstr "lors de la lecture des bitmaps"
+
+#: misc/tune2fs.c:321
+msgid "while clearing journal inode"
+msgstr "lors de l'effacement de l'i-noeud du journal"
+
+#: misc/tune2fs.c:332
+msgid "while writing journal inode"
+msgstr "lors de l'écriture de l'i-noeud du journal"
+
+#: misc/tune2fs.c:367
+#, c-format
+msgid "(and reboot afterwards!)\n"
+msgstr "(et rebootez après !)\n"
+
+#: misc/tune2fs.c:401
+#, 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:407
+#, 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:416
+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:424
+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:443
+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:461
+#, 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:470
+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:478
+msgid "Error while reading bitmaps\n"
+msgstr "Erreur lors de la lecture des bitmaps\n"
+
+#: misc/tune2fs.c:487
+#, 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:492
+msgid "while reading MMP block."
+msgstr "lors de la lecture du bloc MMP."
+
+#: misc/tune2fs.c:524
+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:535
+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:595
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Avertissement : l'option « ^quota » supplante les arguments « -Q ».\n"
+
+#: misc/tune2fs.c:640
+msgid "The filesystem already has a journal.\n"
+msgstr "Le système de fichiers a déjà un journal.\n"
+
+#: misc/tune2fs.c:658
+#, 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:662
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Création du journal sur le périphérique %s : "
+
+#: misc/tune2fs.c:670
+#, 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:676
+msgid "Creating journal inode: "
+msgstr "Création de l'i-noeud du journal : "
+
+#: misc/tune2fs.c:685
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tlors de la tentative de création du fichier journal"
+
+#: misc/tune2fs.c:763
+msgid "Couldn't allocate memory to parse quota options!\n"
+msgstr "Impossible d'allouer de la mémoire pour analyser les options de quota !\n"
+
+#: misc/tune2fs.c:785
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\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[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:846
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Ne peut analyser la spécification de date/heure : %s"
+
+#: misc/tune2fs.c:870 misc/tune2fs.c:883
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "compteur de montages erroné - %s"
+
+#: misc/tune2fs.c:899
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "mauvais comportement en cas d'erreur - %s"
+
+#: misc/tune2fs.c:926
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "nom gid/groupe erroné - %s"
+
+#: misc/tune2fs.c:959
+#, c-format
+msgid "bad interval - %s"
+msgstr "intervalle erroné - %s"
+
+#: misc/tune2fs.c:988
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "taux de blocs réservés erroné - %s"
+
+#: misc/tune2fs.c:1003
+msgid "-o may only be specified once"
+msgstr "-o ne peut être spécifié qu'une fois"
+
+#: misc/tune2fs.c:1012
+msgid "-O may only be specified once"
+msgstr "-O ne peut être spécifié qu'une fois"
+
+#: misc/tune2fs.c:1027
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "compteur de blocs réservés erroné - %s"
+
+#: misc/tune2fs.c:1056
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "nom utilisateur/uid erroné - %s"
+
+#: misc/tune2fs.c:1073
+#, c-format
+msgid "bad inode size - %s"
+msgstr "taille d'i-noeud invalide - %s"
+
+#: misc/tune2fs.c:1080
+#, 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:1174
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "mmp_update_interval trop grand : %lu\n"
+
+#: misc/tune2fs.c:1179
+#, 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:1202
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Paramètre « stride RAID » invalide : %s\n"
+
+#: misc/tune2fs.c:1217
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Paramètre « stripe-width RAID » invalide : %s\n"
+
+#: misc/tune2fs.c:1232
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Algorithme de hachage invalide : %s\n"
+
+#: misc/tune2fs.c:1238
+#, 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:1257
+#, c-format
+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"
+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"
+"\tstride=<taille en blocs des morceaux par disque RAID>\n"
+"\tstripe-width=<stride RAID * nombre de disques en blocs>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+
+#: misc/tune2fs.c:1723
+msgid "Failed to read inode bitmap\n"
+msgstr "Échec de lecture du bitmap d'i-noeuds\n"
+
+#: misc/tune2fs.c:1728
+msgid "Failed to read block bitmap\n"
+msgstr "Échec de lecture du bitmap de bloc\n"
+
+#: misc/tune2fs.c:1745 resize/resize2fs.c:870
+msgid "blocks to be moved"
+msgstr "blocs à déplacer"
+
+#: misc/tune2fs.c:1748
+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:1754
+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:1759
+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:1791
+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:1818
+msgid "Couldn't allocate memory for tdb filename\n"
+msgstr "Impossible d'allouer de la mémoire pour le nom du fichier tdb\n"
+
+#: misc/tune2fs.c:1840
+#, c-format
+msgid "while trying to delete %s"
+msgstr "lors de la tentative d'effacement de %s"
+
+#: misc/tune2fs.c:1850
+#, c-format
+msgid ""
+"To undo the tune2fs operation please run the command\n"
+"    e2undo %s %s\n"
+"\n"
+msgstr ""
+"Pour défaire l'opération de tune2fs, veuillez lancer la commande\n"
+"    e2undo %s %s\n"
+"\n"
+
+#: misc/tune2fs.c:1919
+#, 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:1937
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "La taille des i-noeuds est déjà %lu\n"
+
+#: misc/tune2fs.c:1943
+#, c-format
+msgid "Shrinking the inode size is not supported\n"
+msgstr "La réduction de la taille des i-noeuds n'est pas supportée\n"
+
+#: misc/tune2fs.c:1949
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "Taille d'i-noeud invalide %lu (max %d)\n"
+
+#: misc/tune2fs.c:1996
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Définition du nombre maximal de montages à %d\n"
+
+#: misc/tune2fs.c:2002
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Définition du nombre courant de montages à %d\n"
+
+#: misc/tune2fs.c:2007
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Définition du comportement en cas d'erreur à %d\n"
+
+#: misc/tune2fs.c:2012
+#, 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:2017
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "l'intervalle entre les vérifications est trop grand (%lu)"
+
+#: misc/tune2fs.c:2024
+#, 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:2031
+#, 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:2037
+#, 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:2044
+#, 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:2050
+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:2057
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set.  %s"
+msgstr ""
+"\n"
+"Drapeau de superbloc creux activé. %s"
+
+#: misc/tune2fs.c:2062
+msgid ""
+"\n"
+"Clearing the sparse superflag not supported.\n"
+msgstr ""
+"\n"
+"La suppression du superflag creux n'est pas supportée.\n"
+
+#: misc/tune2fs.c:2070
+#, 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:2076
+#, 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:2108
+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:2126
+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:2159
+msgid "Invalid UUID format\n"
+msgstr "Format UUID invalide\n"
+
+#: misc/tune2fs.c:2172
+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:2180
+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:2193
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Définition de la taille des i-noeuds à %lu\n"
+
+#: misc/tune2fs.c:2196
+#, c-format
+msgid "Failed to change inode size\n"
+msgstr "N'a pu changer la taille d'i-noeud \n"
+
+#: misc/tune2fs.c:2207
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Définition de la taille de « stride » à %d\n"
+
+#: misc/tune2fs.c:2212
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Définition de la taille du « stripe width » à %d\n"
+
+#: misc/tune2fs.c:2219
+#, 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:74
+msgid "Proceed anyway? (y,n) "
+msgstr "Procéder malgré tout ? (o,n) "
+
+#: misc/util.c:89
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr "Ne peut évaluer par stat() %s --- %s\n"
+
+#: misc/util.c:92
+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"
+
+#: misc/util.c:103
+#, 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"
+
+#: misc/util.c:132
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr "%s est le périphérique en intégralité, pas seulement une partition !\n"
+
+#: misc/util.c:154
+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:159
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "ne fera pas un %s ici !\n"
+
+#: misc/util.c:166
+msgid "mke2fs forced anyway.\n"
+msgstr "l'exécution de mke2fs est tout de même forcée.\n"
+
+#: misc/util.c:182
+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:207
+#, 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:228
+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"
+"\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"
+"\n"
+"La taille du journal doit être comprise entre 1024 et 10240000 blocs du\n"
+"système de fichiers.\n"
+"\n"
+
+#: misc/util.c:258
+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:265
+#, 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 taille 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:273
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"La taille du journal est trop grande pour le système de fichiers.\n"
+
+#: misc/util.c:287
+#, 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:48
+#, 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:50
+#, c-format
+msgid "       %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr "       %s [-r|t] [-n num] [-s chemin-socket]\n"
+
+#: misc/uuidd.c:52
+#, c-format
+msgid "       %s -k\n"
+msgstr "       %s -k\n"
+
+#: misc/uuidd.c:154
+msgid "bad arguments"
+msgstr "mauvais arguments"
+
+#: misc/uuidd.c:172
+msgid "connect"
+msgstr "connection"
+
+#: misc/uuidd.c:191
+msgid "write"
+msgstr "écriture"
+
+#: misc/uuidd.c:199
+msgid "read count"
+msgstr "nombre de lectures"
+
+#: misc/uuidd.c:205
+msgid "bad response length"
+msgstr "longueur de réponse invalide"
+
+#: misc/uuidd.c:270
+#, 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:278
+#, 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:307
+#, 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:315
+#, 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:353
+#, 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:361
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "opération %d, num entrant = %d\n"
+
+#: misc/uuidd.c:380
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "UUID de temps généré : %s\n"
+
+#: misc/uuidd.c:390
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "UUID aléatoire généré : %s\n"
+
+#: misc/uuidd.c:399
+#, 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:420
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Généré %d UUIDs :\n"
+
+#: misc/uuidd.c:432
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Operation %d invalide\n"
+
+#: misc/uuidd.c:476 misc/uuidd.c:498
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Nombre invalide : %s\n"
+
+#: misc/uuidd.c:533 misc/uuidd.c:562
+#, 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:543
+#, 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:547
+#, c-format
+msgid "List of UUID's:\n"
+msgstr "Liste des UUIDs :\n"
+
+#: misc/uuidd.c:568
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Longueur de réponse inattendue depuis le serveur %d\n"
+
+#: misc/uuidd.c:585
+#, 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:591
+#, 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:202
+msgid "# Extent dump:\n"
+msgstr "# Vidange des extents :\n"
+
+#: resize/extent.c:203
+#, 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:43
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]\n"
+"\n"
+msgstr ""
+"Utilisation : %s [-d drapeaux_de_debug] [-f] [-F] [-M] [ -P] [-p] périphérique\n"
+" [nouvelle_taille]\n"
+"\n"
+
+#: resize/main.c:65
+msgid "Extending the inode table"
+msgstr "Extension de la table d'i-noeuds"
+
+#: resize/main.c:68
+msgid "Relocating blocks"
+msgstr "Relocalisation de blocs"
+
+#: resize/main.c:71
+msgid "Scanning inode table"
+msgstr "Examen de la table d'i-noeuds"
+
+#: resize/main.c:74
+msgid "Updating inode references"
+msgstr "Mise à jour des références d'i-noeuds"
+
+#: resize/main.c:77
+msgid "Moving inode table"
+msgstr "Déplacement de la table d'i-noeuds"
+
+#: resize/main.c:80
+msgid "Unknown pass?!?"
+msgstr "Passe inconnue ?!?!"
+
+#: resize/main.c:83
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Début de la passe %d (max = %lu)\n"
+
+#: resize/main.c:154
+#, c-format
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested.  Proceed\n"
+"at 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:271
+#, c-format
+msgid "while opening %s"
+msgstr "lors de l'ouverture de %s"
+
+#: resize/main.c:279
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "lors de la récupérartion de l'état de %s"
+
+#: resize/main.c:337 resize/main.c:450
+#, 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:341
+#, 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:377
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "taille d'i-noeud invalide - %s\n"
+
+#: resize/main.c:393
+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:401
+#, 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:407
+msgid "Invalid stride length"
+msgstr "Longueur « stride » invalide"
+
+#: resize/main.c:431
+#, 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:438
+#, c-format
+msgid ""
+"The filesystem is already %llu blocks long.  Nothing to do!\n"
+"\n"
+msgstr ""
+"Le système de fichiers a déjà %llu blocs. Rien à modifier !\n"
+"\n"
+
+#: resize/main.c:455
+#, 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:464
+#, c-format
+msgid "while trying to resize %s"
+msgstr "lors de la tentative de changement de taille de %s"
+
+#: resize/main.c:467
+#, 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:473
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu blocks long.\n"
+"\n"
+msgstr ""
+"Le système de fichiers %s a maintenant une taille de %llu blocs.\n"
+"\n"
+
+#: resize/main.c:488
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "lors de la troncature de %s"
+
+#: resize/online.c:79
+#, 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:83
+msgid "On-line shrinking not supported"
+msgstr "La réduction en ligne n'est pas supportée"
+
+#: resize/online.c:108
+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:117
+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:124
+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:132
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "lors de la tentative d'ouverture du point de montage %s"
+
+#: resize/online.c:137
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Utilisation de l'ancienne interface de changement de taille.\n"
+
+#: resize/online.c:156 resize/online.c:173
+msgid "Permission denied to resize filesystem"
+msgstr "Permission de redimensionner le système de fichiers refusée"
+
+#: resize/online.c:159 resize/online.c:179
+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:176
+msgid "Kernel does not support online resizing"
+msgstr "Le noyau ne supporte pas le changement de taille en ligne"
+
+#: resize/online.c:209
+#, 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:219
+msgid "While trying to extend the last group"
+msgstr "Lors de la tentative d'étendre le dernier groupe"
+
+#: resize/online.c:273
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Lors de la tentative d'ajout du groupe numéro %d"
+
+#: resize/online.c:284
+#, 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:369
+#, c-format
+msgid "inodes (%llu) must be less than %u"
+msgstr "le nombre d'i-noeuds (%llu) doit être plus petit que %u"
+
+#: resize/resize2fs.c:631
+msgid "reserved blocks"
+msgstr "blocs réservés"
+
+#: resize/resize2fs.c:875
+msgid "meta-data blocks"
+msgstr "blocs de métadonnées"
+
+#: resize/resize2fs.c:1837
+#, c-format
+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.42.8"
+msgstr "Librairie EXT2FS version 1.42.8"
+
+#: 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 an block bitmap"
+msgstr "Ne peut écrire un bitmap de blocs"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read an 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: fsck being run"
+msgstr "MMP : fsck 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 MMP block"
+msgstr "La somme de contrôle du bloc MMP ne correspond pas au bloc MMP"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Le fichier ext2 existe déjà"
+
+#: e2fsck/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profilage version 0.0"
+
+#: e2fsck/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Valeur magique invalide dans profile_node"
+
+#: e2fsck/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Section de profilage non trouvée"
+
+#: e2fsck/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Relation de profilage non trouvée"
+
+#: e2fsck/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"
+
+#: e2fsck/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"
+
+#: e2fsck/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Liste chaînée invalide dans les structures de profilage"
+
+#: e2fsck/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Niveau de groupe invalide dans les structures de profilage"
+
+#: e2fsck/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Pointeur parent invalide dans les structures de profilage"
+
+#: e2fsck/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Valeur magique invalide dans l'iterateur de profilage"
+
+#: e2fsck/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Ne peut définire la valeur sur un noeud de section"
+
+#: e2fsck/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Argument invalide passé à la bibliothèque de profilage"
+
+#: e2fsck/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Tentative de modifier un profilage en lecture seule"
+
+#: e2fsck/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"
+
+#: e2fsck/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Erreur de syntaxe dans l'en-tête de section de profilage"
+
+#: e2fsck/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Erreur de syntaxe dans la relation de profilage"
+
+#: e2fsck/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Accolade fermante superflue dans le profilage"
+
+#: e2fsck/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Accolade ouvrante manquante dans le profilage"
+
+#: e2fsck/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Valeur magique invalide dans profile_t"
+
+#: e2fsck/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Valeur magique invalide dans profile_section_t"
+
+#: e2fsck/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"
+
+#: e2fsck/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Object profile_section invalide"
+
+#: e2fsck/prof_err.c:33
+msgid "No more sections"
+msgstr "Plus de sections"
+
+#: e2fsck/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Ensemble de nom invalide passé à la routine de requête"
+
+#: e2fsck/prof_err.c:35
+msgid "No profile file open"
+msgstr "Pas de fichier de profilage ouvert"
+
+#: e2fsck/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Valeur magique invalide dans profile_file_t"
+
+#: e2fsck/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "N'a pu ouvrir le fichier de profilage"
+
+#: e2fsck/prof_err.c:38
+msgid "Section already exists"
+msgstr "La section existe déjà"
+
+#: e2fsck/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Valeur booléenne invalide"
+
+#: e2fsck/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Valeur entière invalide"
+
+#: e2fsck/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Valeur magique invalide dans profile_file_data_t"
+
+#~ msgid "Clearing extent flag not supported on %s"
+#~ msgstr "La suppression du drapeau extent n'est pas supportée sur %s"
+
+#~ msgid ""
+#~ "%s: The combination of flex_bg and\n"
+#~ "\t!resize_inode features is not supported by resize2fs.\n"
+#~ msgstr ""
+#~ "%s : La combinaison des fonctionnalités\n"
+#~ "\tflex_bg et !resize_inode n'est pas supportée par resize2fs.\n"
+
+#~ msgid "%s is mounted.  "
+#~ msgstr "%s est monté. "
+
+#~ msgid "@g %g @b @B uninitialized but @i @B in use.\n"
+#~ msgstr ""
+#~ "Le @B de @b du @g %g n'est pas initialisé\n"
+#~ "alors que le @B d'@i est en cours d'utilisation.\n"
+
+#~ msgid "@i %i should not have EOFBLOCKS_FL set (size %Is, lblk %r)\n"
+#~ msgstr "L'@i %i ne devrait pas avoir EOFBLOCKS_FL défini (taille %Is, lblk %r)\n"
+
+#~ msgid "Couldn't determine journal size"
+#~ msgstr "N'a pu déterminer la taille du journal"
+
+#~ msgid "#\t\t %llu -> %llu (%llu)\n"
+#~ msgstr "#\t\t %llu -> %llu (%llu)\n"
+
+#~ msgid "Missing indirect block not present"
+#~ msgstr "Bloc indirect manquant"
+
+#~ msgid "<The ACL index inode>"
+#~ msgstr "<L'i-noeud d'index ACL>"
+
+#~ msgid "<The ACL data inode>"
+#~ msgstr "<L'i-noeud des données ACL>"
+
+#~ msgid "short write (only %d bytes) for writing image header"
+#~ msgstr "écriture écourtée (seulement %d octets) pour l'écriture de l'en-tête image"
+
+#~ msgid "invalid fragment size - %s"
+#~ msgstr "taille de fragment invalide - %s"
+
+#~ msgid "Warning: fragments not supported.  Ignoring -f option\n"
+#~ msgstr "Avertissement : fragments non supportés. L'option -f est ignorée\n"
+
+#~ msgid "Calling BLKDISCARD from %llu to %llu "
+#~ msgstr "Appel de BLKDISCARD de %llu à %llu "
+
+#~ msgid "succeeded.\n"
+#~ msgstr "avec succès.\n"
+
+#~ msgid "Journal NOT removed\n"
+#~ msgstr "Le journal N'A PAS été enlevé\n"
+
+#~ msgid "@S doesn't have has_@j flag, but has ext3 @j %s.\n"
+#~ msgstr "Le @S ne semble pas avoir le drapeau has_journal, mais a un %s de @j ext3.\n"
+
+#~ msgid "Error while deleting extent: %m\n"
+#~ msgstr "Erreur lors de la suppression de l'extent : %m\n"
+
+#~ msgid "Recreate journal to make the filesystem ext3 again?\n"
+#~ msgstr "Recréer le journal pour rendre le système de fichiers ext3 de nouveau ?\n"
+
+#~ msgid "bad block size - %s"
+#~ msgstr "taille des blocs défectueux - %s"
+
+#~ msgid "while retrying to write block bitmaps for %s"
+#~ msgstr "lors d'une nouvelle tentative d'écriture des bitmaps de blocs pour %s"
+
+#~ msgid "%s failed for %s: %s\n"
+#~ msgstr "%s a échoué pour %s : %s\n"
+
+#~ msgid "open"
+#~ msgstr "open"
+
+#~ msgid "HDIO_GETGEO ioctl"
+#~ msgstr "HDIO_GETGEO ioctl"
+
+#~ msgid "BLKGETSIZE ioctl"
+#~ msgstr "BLKGETSIZE ioctl"
+
+#~ msgid "@a in @i %i has a hash (%N) which is @n (must be 0)\n"
+#~ msgstr "l'@a dans l'@i %i a un hash (%N) qui est @n (doit être 0)\n"
+
+#~ msgid "while calling ext2fs_block_iterate"
+#~ msgstr "lors de l'appel de ext2fs_block_iterate"
+
+#~ msgid "while calling iterator function"
+#~ msgstr "lors de l'appel de la fonction itération"
+
+#~ msgid "while allocating inode buffer"
+#~ msgstr "lors de l'allocation d'un tampon d'i-noeud"
+
+#~ msgid "while reading inode table (group %d)"
+#~ msgstr "lors de la lecture de la table d'i-noeuds (groupe %d)"
+
+#~ msgid "while writing inode table (group %d)"
+#~ msgstr "lors de l'écriture de la table d'i-noeuds (groupe %d)"
+
+#~ msgid "Pass 0: Doing byte-swap of filesystem\n"
+#~ msgstr "Passe 0 : traitement de l'échange octet par octet du système de fichiers\n"
+
+#~ msgid ""
+#~ "%s: the filesystem must be freshly checked using fsck\n"
+#~ "and not mounted before trying to byte-swap it.\n"
+#~ msgstr ""
+#~ "%s : le système de fichiers doit avoir été récemment vérifié en utilisant\n"
+#~ "fsck et ne doit pas avoir été monté avant d'essayer un échange par octet de\n"
+#~ "celui-ci.\n"
+
+#~ msgid "Byte swap"
+#~ msgstr "Échange d'octets"
+
+#~ msgid "Byte-swapping filesystems not compiled in this version of e2fsck\n"
+#~ msgstr ""
+#~ "Les systèmes de fichiers avec échange d'octets ne sont pas compilés pour\n"
+#~ "cette version d'e2fsck\n"
+
+#~ msgid "Incompatible options not allowed when byte-swapping.\n"
+#~ msgstr "Les options incompatibles ne sont pas autorisées lors de l'échanges d'octets.\n"
+
+#~ msgid "%s: Filesystem byte order already normalized.\n"
+#~ msgstr "%s : l'ordre des octets du système de fichiers a déjà été normalisé.\n"
+
+#~ msgid "invalid starting block - %s"
+#~ msgstr "bloc de départ invalide - %s"
+
+#~ msgid "Note: This is a byte-swapped filesystem\n"
+#~ msgstr "Note : ce système de fichiers est à échange d'octets\n"
+
+#~ msgid ""
+#~ "Filesystem too large.  No more than 2**31-1 blocks\n"
+#~ "\t (8TB using a blocksize of 4k) are currently supported."
+#~ msgstr ""
+#~ "Système de fichiers trop grand. Pas plus de 2^31-1 blocs (8TO pour\n"
+#~ "\t une taille de blocs de 4K) ne sont actuellement supportés."
+
+#~ 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"
+#~ "Avertissement : certains noyaux 2.4 ne tolèrent pas les tailles de blocs\n"
+#~ "\tsupérieures à 4096 avec ext3. Utilisez -b 4096 si cela vous\n"
+#~ "\tpose problème.\n"
+#~ "\n"
+
+#~ msgid "Warning: %d-byte inodes not usable on older systems\n"
+#~ msgstr ""
+#~ "Avertissement : les i-noeuds de %d octets ne sont pas utilisables sur les\n"
+#~ "anciens systèmes\n"
+
+#~ msgid "invalid blocks range: %lu-%lu"
+#~ msgstr "étendue invalide des blocs : %lu- %lu"
+
+#~ msgid ""
+#~ "\n"
+#~ "The filesystem already has sparse superblocks disabled.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Les superblocs creux sont déjà désactivés sur le système de fichiers.\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Sparse superblock flag cleared.  %s"
+#~ msgstr ""
+#~ "\n"
+#~ "Drapeau de superbloc creux désactivé. %s"
+
+#~ msgid "Clone duplicate/bad blocks"
+#~ msgstr "Cloner les blocs duplicatas/défectueux"
+
+#~ msgid "Error allocating @a @b %b.  "
+#~ msgstr "ERREUR d'allocation d'un @b %b d'@a. "
+
+#~ msgid ""
+#~ "Duplicate @bs found... invoking duplicate @b passes.\n"
+#~ "Pass 1B: Rescan for duplicate/bad @bs\n"
+#~ msgstr ""
+#~ "@bs duplicatas repérés... invocation de la passe des @bs duplicatas.\n"
+#~ "Passe 1B: nouvelle scrutation pour les @bs duplicatas/erronés\n"
+
+#~ msgid "Duplicate/bad @b(s) in @i %i:"
+#~ msgstr "@b(s) duplicatas/erronés dans l'@i %i :"
+
+#~ msgid ""
+#~ "Extended options are separated by commas, and may take an argument which\n"
+#~ "is set off by an equals ('=') sign.  Valid raid options are:\n"
+#~ "\tea_ver=<ea_version (1 or 2)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Les options étendues sont séparées par des virgules, et peuvent prendre un argument\n"
+#~ "lequel peut être initialisé par un signe d'égalité ('='). Les options RAID valides sont:\n"
+#~ "\tea_ver=<ea_version (1 or 2)\n"
+#~ "\n"
+
+#~ msgid "Usage:  findsuper device [skipbytes [startkb]]\n"
+#~ msgstr "Usage :  findsuper périphérique [octets_à_escamoter [début_en_Ko]]\n"
+
+#~ msgid "skipbytes should be a number, not %s\n"
+#~ msgstr "octets à escamoter doit être un nombre, non pas %s\n"
+
+#~ msgid "skipbytes must be a multiple of the sector size\n"
+#~ msgstr "octets à escamoter doit être un multiple de la taille de secteur\n"
+
+#~ msgid "startkb should be a number, not %s\n"
+#~ msgstr "début en Ko doit être un nombre, non pas %s\n"
+
+#~ msgid "startkb should be positive, not %Ld\n"
+#~ msgstr "début en Ko doit être positif, non pas %Ld\n"
+
+#~ msgid "starting at %Ld, with %d byte increments\n"
+#~ msgstr "début à %Ld, avec un incrément de %d octets\n"
+
+#~ msgid "       thisoff     block fs_blk_sz  blksz grp last_mount\n"
+#~ msgstr "       thisoff     block fs_blk_sz  blksz grp last_mount\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%14Ld: finished with errno %d\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%14Ld: terminé avec errno %d\n"
+
+#~ 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 ""
+#~ "Usage : %s <périph1> <périph2> <périph3>\n"
+#~ "\n"
+#~ "Ce programme affiche les informations des partitions pour un ensemble de périphériques\n"
+#~ "Une façon usuelle d'utiliser ce programme est:\n"
+#~ "\n"
+#~ "\t%s /dev/hda?\n"
+#~ "\n"
+
+#~ msgid "Forcibly clearing HTREE flag on @i %d (%q).  (Beta test code)\n"
+#~ msgstr "Forcer la mise à zéro du drapeau HTREE sur l'@i %d (%q). (Code en phase beta test)\n"
+
+#~ msgid "(unknown os)"
+#~ msgstr "(système d'exploitation inconnu)"
+
+#~ msgid "resize2fs %s (%s)\n"
+#~ msgstr "resize2fs %s (%s)\n"
+
+#~ msgid "Number of free blocks: %d/%d, Needed: %d\n"
+#~ msgstr "Nombre de blocs libres : %d/%d, A besoin de: %d\n"
+
+#~ msgid "Going into desperation mode for block allocations\n"
+#~ msgstr "Passage en mode désespéré pour l'allocation de blocs\n"
+
+#~ msgid "Moving %d blocks %u->%u\n"
+#~ msgstr "Déplacement de %d blocs %u->%u\n"
+
+#~ msgid "ino=%u, blockcnt=%lld, %u->%u\n"
+#~ msgstr "ino=%u, blockcnt=%lld, %u->%u\n"
+
+#~ msgid "Inode moved %u->%u\n"
+#~ msgstr "I-noeud déplacé %u->%u\n"
+
+#~ msgid "Inode translate (dir=%u, name=%.*s, %u->%u)\n"
+#~ msgstr "Translation d'i-noeud (répertoire=%u, nom=%.*s, %u->%u)\n"
+
+#~ msgid "Itable move group %d block %u->%u (diff %d)\n"
+#~ msgstr "Déplacement du groupe Itable %d bloc %u->%u (diff %d)\n"
+
+#~ msgid "%d blocks of zeros...\n"
+#~ msgstr "%d blocs de zéros...\n"
+
+#~ msgid "Inode table move finished.\n"
+#~ msgstr "Déplacement de la table d'i-noeuds complété.\n"
diff --git a/e2fsprogs/po/id.gmo b/e2fsprogs/po/id.gmo
new file mode 100644
index 0000000..68deee9
--- /dev/null
+++ b/e2fsprogs/po/id.gmo
Binary files differ
diff --git a/e2fsprogs/po/id.po b/e2fsprogs/po/id.po
new file mode 100644
index 0000000..61ccea4
--- /dev/null
+++ b/e2fsprogs/po/id.po
@@ -0,0 +1,6720 @@
+# 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).
+#.  
+#. 	%b	<blk>			block number
+#. 	%B	<blkcount>		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_dir_acl
+#. 	%Iu	<inode> -> i_uid
+#. 	%Ig	<inode> -> i_gid
+#. 	%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: 2012-06-12 14:40-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"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:176
+#, 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/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:1298 e2fsck/unix.c:1386 misc/badblocks.c:1214
+#: misc/badblocks.c:1222 misc/badblocks.c:1236 misc/badblocks.c:1248
+#: misc/dumpe2fs.c:588 misc/e2image.c:1189 misc/e2image.c:1307
+#: misc/e2image.c:1320 misc/mke2fs.c:192 misc/tune2fs.c:1907 resize/main.c:303
+#, 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:199
+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:131
+#, 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/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:61 e2fsck/ehandler.c:110
+msgid "Ignore error"
+msgstr "Mengabaikan error"
+
+#: e2fsck/ehandler.c:62
+msgid "Force rewrite"
+msgstr "Memaksa menulis kembali"
+
+#: e2fsck/ehandler.c:104
+#, c-format
+msgid "Error writing block %lu (%s) while %s.  "
+msgstr "Error menulis block %lu (%s) ketika %s.  "
+
+#: e2fsck/ehandler.c:107
+#, 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/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:930
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "ketika membuka %s untuk flushing"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:936 resize/main.c:276
+#, c-format
+msgid "while trying to flush %s"
+msgstr "ketika mencoba untuk memflush %s"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1084
+msgid "while opening inode scan"
+msgstr "ketika mencoba membuka inode scan"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1102
+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:512
+msgid "reading journal superblock\n"
+msgstr "membaca journal superblock\n"
+
+#: e2fsck/journal.c:569
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: journal superblock tidak valid ditemukan\n"
+
+#: e2fsck/journal.c:578
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: journal terlalu pendek\n"
+
+#: e2fsck/journal.c:870
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: merecovery journal\n"
+
+#: e2fsck/journal.c:872
+#, 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:899
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "ketika mencoba untuk membuka %s"
+
+#: e2fsck/message.c:113
+msgid "aextended attribute"
+msgstr "aextended attribute"
+
+#: e2fsck/message.c:114
+msgid "Aerror allocating"
+msgstr "Aerror mengalokasikan"
+
+#: e2fsck/message.c:115
+msgid "bblock"
+msgstr "bblock"
+
+#: e2fsck/message.c:116
+msgid "Bbitmap"
+msgstr "Bbitmap"
+
+#: e2fsck/message.c:117
+msgid "ccompress"
+msgstr "ccompress"
+
+#: e2fsck/message.c:118
+msgid "Cconflicts with some other fs @b"
+msgstr "Ckonflik dengan beberapa sistem berkas lain @b"
+
+#: e2fsck/message.c:119
+msgid "iinode"
+msgstr "iinode"
+
+#: e2fsck/message.c:120
+msgid "Iillegal"
+msgstr "Iilegal"
+
+#: e2fsck/message.c:121
+msgid "jjournal"
+msgstr "jjournal"
+
+#: e2fsck/message.c:122
+msgid "Ddeleted"
+msgstr "Ddeleted"
+
+#: e2fsck/message.c:123
+msgid "ddirectory"
+msgstr "ddirektori"
+
+#: 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 "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:131
+msgid "Lis a link"
+msgstr "Ladalah sebuah link"
+
+#: e2fsck/message.c:132
+msgid "mmultiply-claimed"
+msgstr "mmultiply-claimed"
+
+#: e2fsck/message.c:133
+msgid "ninvalid"
+msgstr "ninvalid"
+
+#: e2fsck/message.c:134
+msgid "oorphaned"
+msgstr "oorphaned"
+
+#: e2fsck/message.c:135
+msgid "pproblem in"
+msgstr "pproblem dalam"
+
+#: e2fsck/message.c:136
+msgid "qquota"
+msgstr ""
+
+#: e2fsck/message.c:137
+msgid "rroot @i"
+msgstr "rroot @i"
+
+#: e2fsck/message.c:138
+msgid "sshould be"
+msgstr "sseharusnya"
+
+#: e2fsck/message.c:139
+msgid "Ssuper@b"
+msgstr "Ssuper@b"
+
+#: e2fsck/message.c:140
+msgid "uunattached"
+msgstr "uunattached"
+
+#: e2fsck/message.c:141
+msgid "vdevice"
+msgstr "vperangkat"
+
+#: e2fsck/message.c:142
+msgid "xextent"
+msgstr "xextent"
+
+#: e2fsck/message.c:143
+msgid "zzero-length"
+msgstr "zzero-length"
+
+#: e2fsck/message.c:154
+msgid "<The NULL inode>"
+msgstr "<Inode Kosong>"
+
+#: e2fsck/message.c:155
+msgid "<The bad blocks inode>"
+msgstr "<Bad block inode>"
+
+#: e2fsck/message.c:157
+#, fuzzy
+msgid "<The user quota inode>"
+msgstr "<Inode journal>"
+
+#: e2fsck/message.c:158
+#, fuzzy
+msgid "<The group quota inode>"
+msgstr "<inode deskripsi grup>"
+
+#: e2fsck/message.c:159
+msgid "<The boot loader inode>"
+msgstr "<boot loader inode>"
+
+#: e2fsck/message.c:160
+msgid "<The undelete directory inode>"
+msgstr "<undelete direktori inode>"
+
+#: e2fsck/message.c:161
+msgid "<The group descriptor inode>"
+msgstr "<inode deskripsi grup>"
+
+#: e2fsck/message.c:162
+msgid "<The journal inode>"
+msgstr "<Inode journal>"
+
+#: e2fsck/message.c:163
+msgid "<Reserved inode 9>"
+msgstr "<Inode terpesan 9>"
+
+#: e2fsck/message.c:164
+msgid "<Reserved inode 10>"
+msgstr "<Inode Terpesan 10>"
+
+#: e2fsck/message.c:333
+msgid "regular file"
+msgstr "berkas biasa"
+
+#: e2fsck/message.c:335
+msgid "directory"
+msgstr "direktori"
+
+#: e2fsck/message.c:337
+msgid "character device"
+msgstr "karakter device"
+
+#: e2fsck/message.c:339
+msgid "block device"
+msgstr "block device"
+
+#: e2fsck/message.c:341
+msgid "named pipe"
+msgstr "named pipe"
+
+#: e2fsck/message.c:343
+msgid "symbolic link"
+msgstr "symbolic link"
+
+#: e2fsck/message.c:345 misc/uuidd.c:161
+msgid "socket"
+msgstr "socket"
+
+#: e2fsck/message.c:347
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "tipe file tidak diketahui dengan mode 0%o"
+
+#: e2fsck/message.c:423
+msgid "indirect block"
+msgstr "block tidak langsung"
+
+#: e2fsck/message.c:425
+msgid "double indirect block"
+msgstr "blok tidak langsung berdua"
+
+#: e2fsck/message.c:427
+msgid "triple indirect block"
+msgstr "blok tidak langsung bertiga"
+
+#: e2fsck/message.c:429
+msgid "translator block"
+msgstr "blok penerjemah"
+
+#: e2fsck/message.c:431
+msgid "block #"
+msgstr "blok #"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "kalikan peta inode yang dituntut"
+
+#: e2fsck/pass1b.c:610 e2fsck/pass1b.c:729
+#, 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:820
+msgid "returned from clone_file_block"
+msgstr "kembali dari clone_file_block"
+
+#: e2fsck/pass1b.c:842
+#, 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:854
+#, 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:476 e2fsck/pass2.c:782
+msgid "reading directory block"
+msgstr "membaca direktori block"
+
+#: e2fsck/pass1.c:599
+msgid "in-use inode map"
+msgstr "in-use inode map"
+
+#: e2fsck/pass1.c:610
+msgid "directory inode map"
+msgstr "direktori inode map"
+
+#: e2fsck/pass1.c:620
+msgid "regular file inode map"
+msgstr "regular file inode map"
+
+#: e2fsck/pass1.c:629
+msgid "in-use block map"
+msgstr "in-use block map"
+
+#: e2fsck/pass1.c:696
+msgid "opening inode scan"
+msgstr "membuka inode scan"
+
+#: e2fsck/pass1.c:730
+msgid "getting next inode from scan"
+msgstr "memperoleh inode selanjutnya dari scan"
+
+#: e2fsck/pass1.c:1240
+msgid "Pass 1"
+msgstr "Tahap 1"
+
+#: e2fsck/pass1.c:1297
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "membaca indirect block dari inode %u"
+
+#: e2fsck/pass1.c:1347
+msgid "bad inode map"
+msgstr "inode map buruk"
+
+#: e2fsck/pass1.c:1370
+msgid "inode in bad block map"
+msgstr "inode dalam bad block map"
+
+#: e2fsck/pass1.c:1390
+msgid "imagic inode map"
+msgstr "imagic inode map"
+
+#: e2fsck/pass1.c:1417
+msgid "multiply claimed block map"
+msgstr "multiply diklaim block map"
+
+#: e2fsck/pass1.c:1518
+msgid "ext attr block map"
+msgstr "ext attr block map"
+
+#: e2fsck/pass1.c:2266
+#, 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:2627
+msgid "block bitmap"
+msgstr "block bitmap"
+
+#: e2fsck/pass1.c:2633
+msgid "inode bitmap"
+msgstr "inode bitmap"
+
+#: e2fsck/pass1.c:2639
+msgid "inode table"
+msgstr "inode table"
+
+#: e2fsck/pass2.c:283
+msgid "Pass 2"
+msgstr "Tahap 2"
+
+#: e2fsck/pass2.c:805
+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:136
+msgid "Pass 3"
+msgstr "Tahap 3"
+
+#: e2fsck/pass3.c:322
+msgid "inode loop detection bitmap"
+msgstr "inode deteksi loop bitmap"
+
+#: e2fsck/pass4.c:195
+msgid "Pass 4"
+msgstr "Tahap 4"
+
+#: e2fsck/pass5.c:74
+msgid "Pass 5"
+msgstr "Tahap 5"
+
+#: 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:107
+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:111
+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:116
+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 correct ext2\n
+#. @-expanded: filesystem.  If the device is valid and it really contains an ext2\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 %S <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:122
+#, c-format
+msgid ""
+"\n"
+"The @S could not be read or does not describe a correct ext2\n"
+"@f.  If the @v is valid and it really contains an ext2\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 %S <@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:131
+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:138
+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:145
+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:150
+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:155
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"@f tidak memiliki sebuah UUID; membuat satu.\n"
+"\n"
+
+#: e2fsck/problem.c:160
+#, 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:169
+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:174
+#, 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:179
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "@i terhitung dalam @S adalah %i, @s %j.\n"
+
+#: e2fsck/problem.c:183
+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:188
+#, 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:193
+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:198
+msgid "Can't find external @j\n"
+msgstr "Tidak dapat menemukan external @j\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:203
+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:208
+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:213
+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:221
+msgid "@j @S is corrupt.\n"
+msgstr "@j @S telah terkorupsi.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal %s is present.\n
+#: e2fsck/problem.c:226
+#, c-format
+msgid "@S has_@j flag is clear, but a @j %s 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:231
+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:236
+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:241
+msgid "Clear @j"
+msgstr "Hapus @j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.  
+#: e2fsck/problem.c:246 e2fsck/problem.c:695
+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:251
+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:256
+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:261
+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:266
+#, 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:271
+#, 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:276
+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:281
+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:286
+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:291
+#, 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:296
+#, 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:301
+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:307
+msgid "Run @j anyway"
+msgstr "Jalankan @j bagaimanapun"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:312
+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:317
+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:322
+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:328
+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:333
+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:338
+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:343
+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:347
+#, 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:352
+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:357
+#, 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:362
+#, 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:367
+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:372
+msgid "Last @g @b @B uninitialized.  "
+msgstr "Terakhir @g @b @B tidak terinitialisasi.  "
+
+#: e2fsck/problem.c:377
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "Jurnal transaksi %i terkorupsi, balasan dibatalkan.\n"
+
+#: e2fsck/problem.c:381
+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)  
+#: e2fsck/problem.c:386
+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)  "
+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).  
+#: e2fsck/problem.c:392
+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).  "
+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:398
+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:403
+#, 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:408
+#, fuzzy
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Menset jumlah reserved blok ke %lu\n"
+
+#. @-expanded: Making quota inode %i (%Q) hidden.\n
+#: e2fsck/problem.c:413
+#, fuzzy
+msgid "Making @q @i %i (%Q) hidden.\n"
+msgstr ""
+"Memindahkan @j dari /%s ke tersembunyi @i.\n"
+"\n"
+
+#. @-expanded: superblock has invalid MMP block.  
+#: e2fsck/problem.c:418
+#, fuzzy
+msgid "@S has invalid MMP block.  "
+msgstr "Ukuran blok tidak valid - %s"
+
+#. @-expanded: superblock has invalid MMP magic.  
+#: e2fsck/problem.c:423
+msgid "@S has invalid MMP magic.  "
+msgstr ""
+
+#: e2fsck/problem.c:428
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:433
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr ""
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:440
+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:444
+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:449
+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:454
+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:459
+#, 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:464
+#, 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:469
+#, 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:474
+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:479
+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:484
+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:489
+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:494
+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:499
+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:504
+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:509
+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:514
+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:519
+#, 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:524
+#, 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:529
+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:534
+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:539
+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:544
+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:549
+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:556
+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:561
+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:567
+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:572
+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:578
+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:583
+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:589
+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:595
+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:600
+#, 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:605
+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:610
+#, 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:615
+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:620
+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:625 e2fsck/problem.c:1460
+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:630
+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:635
+#, 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:640
+#, 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:645
+#, 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:650
+#, 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:655
+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:660
+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:666
+#, 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:674
+#, 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:679
+#, 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: inode %i has compression flag set on filesystem without compression support.  
+#: e2fsck/problem.c:685
+#, c-format
+msgid "@i %i has @cion flag set on @f without @cion support.  "
+msgstr "@i %i memiliki @cion flag terset pada @f tanpa layanan @cion.  "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.  
+#: e2fsck/problem.c:690
+#, 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:700
+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:705
+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:710
+#, 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:716
+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:721
+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:726
+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:731
+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:736
+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:741
+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:746
+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:751
+msgid "@a @b %b has h_@bs > 1.  "
+msgstr "@a @b %b memiliki h_@bs > 1.  "
+
+#. @-expanded: error allocating extended attribute block %b.  
+#: e2fsck/problem.c:756
+msgid "@A @a @b %b.  "
+msgstr "@A @a @b %b.  "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).  
+#: e2fsck/problem.c:761
+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:766
+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:771
+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:776
+#, 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:780
+msgid "%B (%b) causes @d to be too big.  "
+msgstr "%B (%b) menyebabkan @d terlalu besar.  "
+
+#: e2fsck/problem.c:785
+msgid "%B (%b) causes file to be too big.  "
+msgstr "%B (%b) menyebabkan berkas terlalu besar.  "
+
+#: e2fsck/problem.c:790
+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:795
+#, 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:800
+#, 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:805
+#, 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:810
+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:815
+#, 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:820
+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:825
+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:831
+#, 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:836
+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:841
+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:846
+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:851
+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:856
+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:861
+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:866
+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:871
+#, 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:876
+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:882
+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:887
+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:892
+#, 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:897
+#, 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:902
+#, 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:907
+#, 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:912
+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:916
+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:921
+#, fuzzy, c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Error mengiterasi melalui @d @bs: %m\n"
+
+#. @-expanded: quota inode is not regular file.  
+#: e2fsck/problem.c:926
+#, fuzzy
+msgid "@q @i is not regular file.  "
+msgstr "@j bukan sebuah file regular.  "
+
+#. @-expanded: quota inode is not in use, but contains data.  
+#: e2fsck/problem.c:931
+#, 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:936
+#, 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:941
+#, 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:946
+#, 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: \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:953
+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:959
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "@m @b(s) dalam @i %i:"
+
+#: e2fsck/problem.c:974
+#, 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:979
+#, 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:984
+#, 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:989 e2fsck/problem.c:1304
+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:994
+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:1000
+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:1005
+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:1011
+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:1016
+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:1021
+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:1026
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"@m @bs telah diassign atau dikopi.\n"
+"\n"
+
+#: e2fsck/problem.c:1039
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Tidak dapat menyalin file: %m\n"
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1045
+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:1050
+#, 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:1055
+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:1060
+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:1065
+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:1070
+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:1075
+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:1080
+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:1085
+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:1090
+#, 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:1095
+#, 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:1100
+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:1105
+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:1110
+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:1115
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl @F %If, @s nol.\n"
+
+#. @-expanded: i_dir_acl for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1120
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr "i_dir_acl @F %Id, @s nol.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1125
+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:1130
+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:1135
+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:1140
+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:1145
+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:1150
+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:1155
+#, 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:1160
+#, 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:1165
+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:1170
+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:1175
+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:1180
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E adalah duplikasi dari '..' @e.\n"
+
+#: e2fsck/problem.c:1185 e2fsck/problem.c:1485
+#, 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:1190
+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:1195
+#, 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:1200
+#, 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:1205
+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:1210
+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:1215
+#, 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:1220
+#, 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:1225
+#, 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:1230
+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:1235
+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:1240
+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:1245
+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:1250
+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:1255
+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:1260
+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:1265
+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:1270
+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:1275
+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:1280
+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:1285
+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:1290
+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:1295
+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:1299
+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:1309
+#, 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:1314
+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:1319
+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:1324
+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:1329
+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:1334
+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:1339
+#, 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:1344
+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:1349
+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:1354
+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:1358
+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:1363
+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:1368
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi @F %N, @s nol.\n"
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1375
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Tahap 3: Memeriksa konektivitas @d\n"
+
+#. @-expanded: root inode not allocated.  
+#: e2fsck/problem.c:1380
+msgid "@r not allocated.  "
+msgstr "@r tidak dialokasikan.  "
+
+#. @-expanded: No room in lost+found directory.  
+#: e2fsck/problem.c:1385
+msgid "No room in @l @d.  "
+msgstr "Tidak ada ruang dalam @l @d.  "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1390
+#, 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:1395
+msgid "/@l not found.  "
+msgstr "/@l tidak ditemukan.  "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1400
+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:1405
+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:1410
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Tidak dapat mengexpan /@l: %m\n"
+
+#: e2fsck/problem.c:1415
+#, 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:1420
+#, 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:1425
+#, 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:1430
+#, 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:1435
+#, 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:1440
+#, 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:1445
+#, 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:1450
+#, 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:1455
+#, 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:1465
+#, 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:1470
+#, 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:1475
+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:1480
+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:1490
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l bukan sebuah @d (ino=%i)\n"
+
+#: e2fsck/problem.c:1497
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Tahap 3A: Mengoptimasi direktori\n"
+
+#: e2fsck/problem.c:1502
+#, 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:1507
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Gagal mengoptimasi direktori %q (%d): %m\n"
+
+#: e2fsck/problem.c:1512
+msgid "Optimizing directories: "
+msgstr "Mengoptimasi direktori: "
+
+#: e2fsck/problem.c:1529
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Tahap 4: Memeriksa jumlah referensi\n"
+
+#. @-expanded: unattached zero-length inode %i.  
+#: e2fsck/problem.c:1534
+#, c-format
+msgid "@u @z @i %i.  "
+msgstr "@u @z @i %i.  "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1539
+#, 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:1544
+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:1548
+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: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1558
+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:1563
+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:1568
+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:1573
+msgid "@b @B differences: "
+msgstr "@b @B perbedaan: "
+
+#. @-expanded: inode bitmap differences: 
+#: e2fsck/problem.c:1593
+msgid "@i @B differences: "
+msgstr "@i @B perbedaan: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1613
+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:1618
+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:1623
+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:1628
+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:1633
+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:1638
+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:1644
+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:1649
+#, 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:1654
+#, 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:1679
+#, 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:1684
+#, 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: Recreate journal
+#: e2fsck/problem.c:1691
+msgid "Recreate @j"
+msgstr "Membuat kembali @j"
+
+#: e2fsck/problem.c:1696
+msgid "Update quota info for quota type %N"
+msgstr ""
+
+#: e2fsck/problem.c:1815
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Kode error tidak tertangani (0x%x)!\n"
+
+#: e2fsck/problem.c:1940 e2fsck/problem.c:1944
+msgid "IGNORED"
+msgstr "DIABAIKAN"
+
+#: 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:188
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr "ketika memanggil ext2fs_block_iterate untuk inode %d"
+
+#: e2fsck/super.c:211
+#, fuzzy, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %d"
+msgstr "ketika memanggil ext2fs_adjust_ea_refcount untuk inode %d"
+
+#: e2fsck/super.c:272
+msgid "Truncating"
+msgstr "Truncating"
+
+#: e2fsck/super.c:273
+msgid "Clearing"
+msgstr "Menghapus"
+
+#: e2fsck/unix.c:74
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfvtDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] 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:80
+#, c-format
+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:86
+#, c-format
+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"
+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:130
+#, 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:137
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%8u inode used (%2.2f%%)\n"
+msgid_plural ""
+"\n"
+"%8u inodes used (%2.2f%%)\n"
+msgstr[0] "%u inodes discan.\n"
+msgstr[1] "%u inodes discan.\n"
+
+#: e2fsck/unix.c:141
+#, c-format
+msgid "%8u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%8u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:146
+#, c-format
+msgid "%8u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%8u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:151
+#, 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:159
+msgid "         Extent depth histogram: "
+msgstr "         Kedalaman Extensi histogram: "
+
+#: e2fsck/unix.c:168
+#, c-format
+msgid "%8llu block used (%2.2f%%)\n"
+msgid_plural "%8llu blocks used (%2.2f%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:171
+#, fuzzy, c-format
+msgid "%8u bad block\n"
+msgid_plural "%8u bad blocks\n"
+msgstr[0] "%u inodes, %u blok\n"
+msgstr[1] "%u inodes, %u blok\n"
+
+#: e2fsck/unix.c:173
+#, fuzzy, c-format
+msgid "%8u large file\n"
+msgid_plural "%8u large files\n"
+msgstr[0] "berkas biasa"
+msgstr[1] "berkas biasa"
+
+#: e2fsck/unix.c:175
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%8u regular file\n"
+msgid_plural ""
+"\n"
+"%8u regular files\n"
+msgstr[0] "berkas biasa"
+msgstr[1] "berkas biasa"
+
+#: e2fsck/unix.c:177
+#, fuzzy, c-format
+msgid "%8u directory\n"
+msgid_plural "%8u directories\n"
+msgstr[0] "direktori"
+msgstr[1] "direktori"
+
+#: e2fsck/unix.c:179
+#, fuzzy, c-format
+msgid "%8u character device file\n"
+msgid_plural "%8u character device files\n"
+msgstr[0] "karakter device"
+msgstr[1] "karakter device"
+
+#: e2fsck/unix.c:182
+#, fuzzy, c-format
+msgid "%8u block device file\n"
+msgid_plural "%8u block device files\n"
+msgstr[0] "block device"
+msgstr[1] "block device"
+
+#: e2fsck/unix.c:184
+#, c-format
+msgid "%8u fifo\n"
+msgid_plural "%8u fifos\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:186
+#, c-format
+msgid "%8u link\n"
+msgid_plural "%8u links\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:189
+#, fuzzy, c-format
+msgid "%8u symbolic link"
+msgid_plural "%8u symbolic links"
+msgstr[0] "symbolic link"
+msgstr[1] "symbolic link"
+
+#: e2fsck/unix.c:191
+#, 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:195
+#, fuzzy, c-format
+msgid "%8u socket\n"
+msgid_plural "%8u sockets\n"
+msgstr[0] "socket"
+msgstr[1] "socket"
+
+#: e2fsck/unix.c:198
+#, c-format
+msgid "%8u file\n"
+msgid_plural "%8u files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:212 misc/badblocks.c:983 misc/tune2fs.c:1979 misc/util.c:147
+#: resize/main.c:247
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "ketika sedang menentukan apakah %s sedang dimount."
+
+#: e2fsck/unix.c:230
+#, fuzzy, c-format
+msgid "Warning!  %s is %s.\n"
+msgstr "Peringatan! %s sedang dimount.\n"
+
+#: e2fsck/unix.c:237
+#, c-format
+msgid "%s is %s.\n"
+msgstr ""
+
+#: e2fsck/unix.c:240
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Tidak dapat melanjutkan, membatalkan.\n"
+"\n"
+
+#: e2fsck/unix.c:242
+#, 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:247
+msgid "Do you really want to continue"
+msgstr "Apakah anda yakin ingin melanjutkan"
+
+#: e2fsck/unix.c:249
+#, c-format
+msgid "check aborted.\n"
+msgstr "pemeriksaan dibatalkan.\n"
+
+#: e2fsck/unix.c:339
+msgid " contains a file system with errors"
+msgstr " berisi sebuah file system dengan errors"
+
+#: e2fsck/unix.c:341
+msgid " was not cleanly unmounted"
+msgstr " tidak bersih setelah diunmount."
+
+#: e2fsck/unix.c:343
+msgid " primary superblock features different from backup"
+msgstr " superblok utama memiliki feature berbeda dari backup"
+
+#: e2fsck/unix.c:347
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " telah dimount %u kali tanpa dilakukan pemeriksaan"
+
+#: e2fsck/unix.c:354
+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:360
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " telah lewat %u hari tanpa dilakukan pemeriksaan"
+
+#: e2fsck/unix.c:369
+msgid ", check forced.\n"
+msgstr ", pemeriksaan dipaksakan.\n"
+
+#: e2fsck/unix.c:402
+#, fuzzy, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: bersih, %u/%u berkas, %u/%u blok"
+
+#: e2fsck/unix.c:421
+msgid " (check deferred; on battery)"
+msgstr " (pemeriksaan dibatalkan; power menggunakan batere)"
+
+#: e2fsck/unix.c:424
+msgid " (check after next mount)"
+msgstr " (pemeriksaan dilakukan setelah mount selanjutnya)"
+
+#: e2fsck/unix.c:426
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (pemeriksaan dilakukan dalam %ld mounts)"
+
+#: e2fsck/unix.c:576
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "ERROR: Tidak dapat membuka /dev/null (%s)\n"
+
+#: e2fsck/unix.c:645
+#, c-format
+msgid "Invalid EA version.\n"
+msgstr "Versi EA tidak valid.\n"
+
+#: e2fsck/unix.c:672
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Pilihan extended tidak diketahui: %s\n"
+
+#: e2fsck/unix.c:697
+#, 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:766
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Error memvalidasi berkas deskripsi %d: %s\n"
+
+#: e2fsck/unix.c:770
+msgid "Invalid completion information file descriptor"
+msgstr "Informasi File berkas completion tidak valid"
+
+#: e2fsck/unix.c:785
+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:806
+#, 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:837 e2fsck/unix.c:909 misc/tune2fs.c:811 misc/tune2fs.c:1100
+#: misc/tune2fs.c:1118
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Tidak dapat meresolve '%s'"
+
+#: e2fsck/unix.c:888
+msgid "The -n and -D options are incompatible."
+msgstr "Pilihan -n dan -D tidak kompatibel."
+
+#: e2fsck/unix.c:893
+msgid "The -n and -c options are incompatible."
+msgstr "Pilihan -n dan -c tidak kompatibel."
+
+#: e2fsck/unix.c:898
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Pilihan -n dan -l/-L tidak kompatibel."
+
+#: e2fsck/unix.c:943
+#, c-format
+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:991
+#, 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:1000
+#, 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:1089
+#, c-format
+msgid ""
+"MMP interval is %u seconds and total wait time is %u seconds. Please "
+"wait...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1106 e2fsck/unix.c:1111
+#, fuzzy
+msgid "while checking MMP block"
+msgstr "ketika mensetup superblok"
+
+#: e2fsck/unix.c:1113 misc/tune2fs.c:1912
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+
+#: e2fsck/unix.c:1163
+#, c-format
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Error: ext2fs versi librari ketinggalan jaman!\n"
+
+#: e2fsck/unix.c:1171
+msgid "while trying to initialize program"
+msgstr "ketika mencoba untuk menginisialisasi aplikasi"
+
+#: e2fsck/unix.c:1194
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tMenggunakan %s, %s\n"
+
+#: e2fsck/unix.c:1206
+msgid "need terminal for interactive repairs"
+msgstr "butuh terminal untuk reparasi interactive"
+
+#: e2fsck/unix.c:1256
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s mencoba membackup blok...\n"
+
+#: e2fsck/unix.c:1258
+msgid "Superblock invalid,"
+msgstr "Superblok tidak valid,"
+
+#: e2fsck/unix.c:1259
+msgid "Group descriptors look bad..."
+msgstr "Deskripsi grup terlihat buruk..."
+
+#: e2fsck/unix.c:1269
+#, fuzzy, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s mencoba membackup blok...\n"
+
+#: e2fsck/unix.c:1273
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: kembali ke superblock asli\n"
+
+#: e2fsck/unix.c:1301
+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:1307
+msgid "Could this be a zero-length partition?\n"
+msgstr "Mungkinkan ini sebuah partisi dengan panjang nol?\n"
+
+#: e2fsck/unix.c:1310
+#, 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:1315
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Mungkin tidak ada atau sebuah perangkat swap?\n"
+
+#: e2fsck/unix.c:1318
+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:1321
+#, fuzzy
+msgid "Possibly non-existent device?\n"
+msgstr "Mungkin tidak ada atau sebuah perangkat swap?\n"
+
+#: e2fsck/unix.c:1324
+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:1389
+msgid "Get a newer version of e2fsck!"
+msgstr "Dapatkan versi yang lebih baru dari e2fsck!"
+
+#: e2fsck/unix.c:1437
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr "ketika memeriksa ext3 jurnal untuk %s"
+
+#: e2fsck/unix.c:1448
+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:1461
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "tidak dapat menset superblok flag di %s\n"
+
+#: e2fsck/unix.c:1467
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr "ketika merecovery ext3 jurnal dari %s"
+
+#: e2fsck/unix.c:1492
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s memiliki feature yang tidak disupport:"
+
+#: e2fsck/unix.c:1507
+#, fuzzy, c-format
+msgid "%s: warning: compression support is experimental.\n"
+msgstr "Peringatan: support untuk kompresi adalah experimental.\n"
+
+#: e2fsck/unix.c:1513
+#, fuzzy, c-format
+msgid ""
+"%s: 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"
+
+#: e2fsck/unix.c:1565
+#, fuzzy, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "ketika sedang membaca inode blok buruk"
+
+#: e2fsck/unix.c:1568
+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:1609
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Membuat jurnal (%d blok): "
+
+#: e2fsck/unix.c:1619
+msgid " Done.\n"
+msgstr " Selesai.\n"
+
+#: e2fsck/unix.c:1620
+msgid ""
+"\n"
+"*** journal has been re-created - filesystem is now ext3 again ***\n"
+msgstr ""
+"\n"
+"*** jurnal telah dibuat kembali - sistem berkas sekarang ext3 lagi ***\n"
+
+#: e2fsck/unix.c:1643
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Mengulang kembali e2fsck dari awal...\n"
+
+#: e2fsck/unix.c:1647
+msgid "while resetting context"
+msgstr "ketika mereset context"
+
+#: e2fsck/unix.c:1654
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck dibatalkan.\n"
+
+#: e2fsck/unix.c:1659
+msgid "aborted"
+msgstr "dibatalkan"
+
+#: e2fsck/unix.c:1671 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** FILE SYSTEM TELAH TERMODIFIKASI *****\n"
+
+#: e2fsck/unix.c:1675
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr "%s: ***** REBOOT LINUX *****\n"
+
+#: e2fsck/unix.c:1683 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** PERINGATAN: Sistem berkas masih memiliki errors *********\n"
+"\n"
+
+#: e2fsck/unix.c:1723
+msgid "while setting block group checksum info"
+msgstr "ketika sedang menset informasi checksum di grup blok"
+
+#: e2fsck/util.c:189 misc/util.c:70
+msgid "yY"
+msgstr "yY"
+
+#: e2fsck/util.c:190
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:204
+msgid "<y>"
+msgstr "<y>"
+
+#: e2fsck/util.c:206
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:208
+msgid " (y/n)"
+msgstr "(y/n)"
+
+#: e2fsck/util.c:222
+msgid "cancelled!\n"
+msgstr "dibatalkan!\n"
+
+#: e2fsck/util.c:237
+msgid "yes\n"
+msgstr "ya\n"
+
+#: e2fsck/util.c:239
+msgid "no\n"
+msgstr "tidak\n"
+
+#: e2fsck/util.c:249
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? tidak\n"
+"\n"
+
+#: e2fsck/util.c:253
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? ya\n"
+"\n"
+
+#: e2fsck/util.c:257
+msgid "yes"
+msgstr "ya"
+
+#: e2fsck/util.c:257
+msgid "no"
+msgstr "tidak"
+
+#: e2fsck/util.c:272
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: ilegal bitmap blok untuk %s"
+
+#: e2fsck/util.c:277
+msgid "reading inode and block bitmaps"
+msgstr "membaca inode dan blok bitmap"
+
+#: e2fsck/util.c:285
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "ketika sedang mencoba untuk membaca bitmap untuk %s"
+
+#: e2fsck/util.c:297
+msgid "writing block and inode bitmaps"
+msgstr "menulis blok dan inode bitmaps"
+
+#: e2fsck/util.c:302
+#, 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:314
+#, 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:395
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Memori yang digunakan: %luk/%luk (%luk/%luk), "
+
+#: e2fsck/util.c:399
+#, c-format
+msgid "Memory used: %lu, "
+msgstr "Memori yang digunakan: %lu, "
+
+#: e2fsck/util.c:406
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "waktu: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:411
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "waktu yang dijalani: %6.3f\n"
+
+#: e2fsck/util.c:446 e2fsck/util.c:460
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "ketika  membaca inode %lu dalam %s"
+
+#: e2fsck/util.c:474 e2fsck/util.c:487
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "ketika menulis inode %lu dalam %s"
+
+#: e2fsck/util.c:636
+msgid "while allocating zeroizing buffer"
+msgstr "ketika mengalokasikan zeroizing buffer"
+
+#: e2fsck/util.c:788
+msgid ""
+"UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is "
+"running.\n"
+msgstr ""
+
+#: misc/badblocks.c:69
+#, fuzzy
+msgid "done                                                 \n"
+msgstr "selesai                              \n"
+
+#: misc/badblocks.c:93
+#, 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"
+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:104
+#, 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:219
+#, fuzzy, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr "%6.2f%% selesai, %s berjalan"
+
+#: misc/badblocks.c:322
+msgid "Testing with random pattern: "
+msgstr "Memeriksa dengan pattern random: "
+
+#: misc/badblocks.c:340
+msgid "Testing with pattern 0x"
+msgstr "Memeriksa dengan pattern 0x"
+
+#: misc/badblocks.c:372 misc/badblocks.c:445
+msgid "during seek"
+msgstr "ketika mencari(seek)"
+
+#: misc/badblocks.c:383
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Nilai aneh (%ld) dalam do_read\n"
+
+#: misc/badblocks.c:469
+msgid "during ext2fs_sync_device"
+msgstr "ketika ext2fs_sync_device"
+
+#: misc/badblocks.c:489 misc/badblocks.c:749
+msgid "while beginning bad block list iteration"
+msgstr "ketika di awal iterasi daftara blok buruk"
+
+#: misc/badblocks.c:503 misc/badblocks.c:602 misc/badblocks.c:759
+msgid "while allocating buffers"
+msgstr "ketika mengalokasikan buffer"
+
+#: misc/badblocks.c:507
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Memeriksa blok %lu ke %lu\n"
+
+#: misc/badblocks.c:512
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Memeriksa blok buruk dalam mode baca-saja (read-only)\n"
+
+#: misc/badblocks.c:521
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Memeriksa blok buruk (pemeriksaan baca-saja): "
+
+#: misc/badblocks.c:528 misc/badblocks.c:634 misc/badblocks.c:676
+#: misc/badblocks.c:822
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Terlalu banyak blok buruk, membatalkan pemeriksaan\n"
+
+#: misc/badblocks.c:609
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Memeriksa untuk blok buruk dalam mode baca-tulis\n"
+
+#: misc/badblocks.c:611 misc/badblocks.c:772
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Dari blok %lu ke %lu\n"
+
+#: misc/badblocks.c:666
+msgid "Reading and comparing: "
+msgstr "Membaca dan membandingkan: "
+
+#: misc/badblocks.c:771
+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:777
+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:784
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Interupsi tertangkap, membersihkan\n"
+
+#: misc/badblocks.c:867
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "ketika memerikas data ditulis, blok %lu"
+
+#: misc/badblocks.c:988 misc/util.c:152
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s sedang dimount; "
+
+#: misc/badblocks.c:990
+msgid "badblocks forced anyway.  Hope /etc/mtab is incorrect.\n"
+msgstr "badbloks tetap dipaksakan. Mudah-mudahan /etc/mtab tidak benar\n"
+
+#: misc/badblocks.c:995
+msgid "it's not safe to run badblocks!\n"
+msgstr "ini tidak aman untuk menjalankan badblocks!\n"
+
+#: misc/badblocks.c:1000 misc/util.c:163
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s kelihatannya sedang digunakan oleh system; "
+
+#: misc/badblocks.c:1003
+msgid "badblocks forced anyway.\n"
+msgstr "badblocks dipaksakan saja.\n"
+
+#: misc/badblocks.c:1023
+#, c-format
+msgid "invalid %s - %s"
+msgstr "tidak valid %s - %s"
+
+#: misc/badblocks.c:1133
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "tidak dapat mengalokasikan memori untuk test_pattern - %s"
+
+#: misc/badblocks.c:1163
+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:1169
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr "Random test_pattern tidak diperbolehkan dalam mode baca-saja"
+
+#: misc/badblocks.c:1183
+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:1189
+msgid "while trying to determine device size"
+msgstr "ketika mencoba untuk menentukakn ukuran perangkat"
+
+#: misc/badblocks.c:1194
+msgid "last block"
+msgstr "blok terakhir"
+
+#: misc/badblocks.c:1200
+msgid "first block"
+msgstr "blok pertama"
+
+#: misc/badblocks.c:1203
+#, c-format
+msgid "invalid starting block (%lu): must be less than %lu"
+msgstr "awal blok tidak valid (%lu): harus lebih kecil dari %lu"
+
+#: misc/badblocks.c:1259
+msgid "while creating in-memory bad blocks list"
+msgstr "ketika membuat daftar blok buruk dalam memori"
+
+#: misc/badblocks.c:1274
+msgid "while adding to in-memory bad block list"
+msgstr "ketika menambahkan daftar blok buruk dalam memori"
+
+#: misc/badblocks.c:1298
+#, 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:86
+#, c-format
+msgid "Usage: %s [-RVf] [-+=AacDdeijsSu] [-v version] files...\n"
+msgstr "Penggunaan: %s [-RVf] [-+=AacDdeijsSu] [-v versi] berkas...\n"
+
+#: misc/chattr.c:154
+#, c-format
+msgid "bad version - %s\n"
+msgstr "versi buruk - %s\n"
+
+#: misc/chattr.c:201 misc/lsattr.c:116
+#, c-format
+msgid "while trying to stat %s"
+msgstr "ketika mencoba untuk melakukan statistik %s"
+
+#: misc/chattr.c:208
+#, c-format
+msgid "while reading flags on %s"
+msgstr "ketika membaca flags di %s"
+
+#: misc/chattr.c:217 misc/chattr.c:236
+#, c-format
+msgid "Clearing extent flag not supported on %s"
+msgstr "Menghapus tanda ekstensi yang tidak didukung di %s"
+
+#: misc/chattr.c:222 misc/chattr.c:241
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Flags dari %s diset sebagai "
+
+#: misc/chattr.c:250
+#, c-format
+msgid "while setting flags on %s"
+msgstr "ketika menset flags di %s"
+
+#: misc/chattr.c:258
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Versi dari %s diset sebagai %lu\n"
+
+#: misc/chattr.c:262
+#, c-format
+msgid "while setting version on %s"
+msgstr "ketika menset versi di %s"
+
+#: misc/chattr.c:282
+#, c-format
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Tidak dapat mengalokasikan variable path di chattr_dir_proc"
+
+#: misc/chattr.c:322
+msgid "= is incompatible with - and +\n"
+msgstr "= tidak kompatibel dengan - dan +\n"
+
+#: misc/chattr.c:330
+msgid "Must use '-v', =, - or +\n"
+msgstr "Harus menggunakan '-v', =, - atau +\n"
+
+#: misc/dumpe2fs.c:55
+#, c-format
+msgid "Usage: %s [-bfhixV] [-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:196
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Grup %lu: (blok "
+
+#: misc/dumpe2fs.c:204
+#, fuzzy, c-format
+msgid "  Checksum 0x%04x"
+msgstr "  Checksum 0x%04x, inode yang tidak digunakan %d\n"
+
+#: misc/dumpe2fs.c:206
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr ""
+
+#: misc/dumpe2fs.c:207
+#, fuzzy, c-format
+msgid ", unused inodes %u\n"
+msgstr ", %u inode yang tidak digunakan\n"
+
+#: misc/dumpe2fs.c:212
+#, c-format
+msgid "  %s superblock at "
+msgstr "  %s superblok di "
+
+#: misc/dumpe2fs.c:213
+msgid "Primary"
+msgstr "Utama"
+
+#: misc/dumpe2fs.c:213
+msgid "Backup"
+msgstr "Cadangan"
+
+#: misc/dumpe2fs.c:217
+#, c-format
+msgid ", Group descriptors at "
+msgstr ", Grup deskripsi di "
+
+#: misc/dumpe2fs.c:221
+#, c-format
+msgid ""
+"\n"
+"  Reserved GDT blocks at "
+msgstr ""
+"\n"
+"  Reserved GDT blok di "
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " Group descriptor at "
+msgstr " Grup deskripsi di "
+
+#: misc/dumpe2fs.c:234
+msgid "  Block bitmap at "
+msgstr "  Blok bitmap di "
+
+#: misc/dumpe2fs.c:238
+msgid ", Inode bitmap at "
+msgstr ", Inode bitmap di "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+"  Inode table at "
+msgstr ""
+"\n"
+"  Inode tabel di "
+
+#: misc/dumpe2fs.c:248
+#, 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:255
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u inode yang tidak digunakan\n"
+
+#: misc/dumpe2fs.c:258
+msgid "  Free blocks: "
+msgstr "  Blok bebas: "
+
+#: misc/dumpe2fs.c:269
+msgid "  Free inodes: "
+msgstr "  Inode bebas: "
+
+#: misc/dumpe2fs.c:300
+msgid "while printing bad block list"
+msgstr "ketika mencetak daftar blok buruk"
+
+#: misc/dumpe2fs.c:306
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Blok buruk: %u"
+
+#: misc/dumpe2fs.c:333 misc/tune2fs.c:302
+msgid "while reading journal inode"
+msgstr "ketika membaca jurnal inode"
+
+#: misc/dumpe2fs.c:339
+msgid "while opening journal inode"
+msgstr "ketika membuka jurnal inode"
+
+#: misc/dumpe2fs.c:345
+msgid "while reading journal super block"
+msgstr "ketika membaca super blok jurnal"
+
+#: misc/dumpe2fs.c:355
+#, c-format
+msgid "Journal features:        "
+msgstr "Fasilitas jurnal:        "
+
+#: misc/dumpe2fs.c:368
+msgid "Journal size:             "
+msgstr "Ukuran jurnal:            "
+
+#: misc/dumpe2fs.c:379
+#, c-format
+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"
+
+#: misc/dumpe2fs.c:386
+#, fuzzy, c-format
+msgid "Journal errno:            %d\n"
+msgstr "Pengguna jurnal:         %s\n"
+
+#: misc/dumpe2fs.c:401 misc/tune2fs.c:218
+msgid "while reading journal superblock"
+msgstr "ketikan membaca superblok jurnal"
+
+#: misc/dumpe2fs.c:409
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Tidak dapat mencari nomor magic di jurnal superblok"
+
+#: misc/dumpe2fs.c:413
+#, c-format
+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"
+
+#: misc/dumpe2fs.c:426
+#, c-format
+msgid "Journal users:            %s\n"
+msgstr "Pengguna jurnal:         %s\n"
+
+#: misc/dumpe2fs.c:442 misc/mke2fs.c:662 misc/tune2fs.c:1137
+#, c-format
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Tidak dapat mengalokasikan memori untuk memparse pilihan!\n"
+
+#: misc/dumpe2fs.c:468
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Parameter superblok tidak valid: %s\n"
+
+#: misc/dumpe2fs.c:483
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Parameter ukuran-blok tidak valid: %s\n"
+
+#: misc/dumpe2fs.c:494
+#, 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:554 misc/mke2fs.c:1525
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tMenggunakan %s\n"
+
+#: misc/dumpe2fs.c:590 misc/e2image.c:1309 misc/tune2fs.c:1923
+#: resize/main.c:305
+#, c-format
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Tidak dapat mencari superblok sistem berkas yang valid.\n"
+
+#: misc/dumpe2fs.c:618
+#, c-format
+msgid ""
+"\n"
+"%s: %s: error reading bitmaps: %s\n"
+msgstr ""
+"\n"
+"%s: %s: error membaca bitmaps: %s\n"
+
+#: misc/e2image.c:87
+#, fuzzy, c-format
+msgid "Usage: %s [-rsIQ] device image_file\n"
+msgstr "Penggunaan: %s [-rsI] perangkat image_file\n"
+
+#: misc/e2image.c:135
+#, c-format
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr ""
+
+#: misc/e2image.c:141
+msgid "Couldn't allocate header buffer\n"
+msgstr "Tidak dapat mengalokasikan buffer header\n"
+
+#: misc/e2image.c:171
+msgid "while writing superblock"
+msgstr "ketika menulis superblok"
+
+#: misc/e2image.c:179
+msgid "while writing inode table"
+msgstr "ketika menulis tabel inode"
+
+#: misc/e2image.c:186
+msgid "while writing block bitmap"
+msgstr "ketika menulis blok bitmap"
+
+#: misc/e2image.c:193
+msgid "while writing inode bitmap"
+msgstr "ketika menulis inode bitmap"
+
+#: misc/e2image.c:1341
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr ""
+
+#: 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:2074
+#, 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:803
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Penggunaan: e2label perangkat [labelbaru]\n"
+
+#: misc/e2undo.c:36
+#, c-format
+msgid "Usage: %s <transaction file> <filesystem>\n"
+msgstr "Penggunaan: %s <berkas transaksi> <sistem berkas>\n"
+
+#: misc/e2undo.c:52
+msgid "Failed to read the file system data \n"
+msgstr "Gagal membaca data filesystem \n"
+
+#: misc/e2undo.c:62 misc/e2undo.c:83 misc/e2undo.c:108 misc/e2undo.c:206
+#, c-format
+msgid "Failed tdb_fetch %s\n"
+msgstr "Gagal tdb_fetch %s\n"
+
+#: misc/e2undo.c:70
+#, c-format
+msgid "The file system Mount time didn't match %u\n"
+msgstr "Sistem berkas waktu mount tidak cocok %u\n"
+
+#: misc/e2undo.c:89
+msgid "The file system UUID didn't match \n"
+msgstr "Sistem berkas UUID tidak cocok \n"
+
+#: misc/e2undo.c:163
+#, c-format
+msgid "Failed tdb_open %s\n"
+msgstr "Gagal tdb_open %s\n"
+
+#: misc/e2undo.c:169
+#, c-format
+msgid "Error while determining whether %s is mounted.\n"
+msgstr "Error ketika menentukan apakah %s sudah dimount.\n"
+
+#: misc/e2undo.c:175
+msgid "e2undo should only be run on unmounted file system\n"
+msgstr ""
+"e2undo seharusnya hanya dijalankan di sistem berkas yang sudah diunmount\n"
+
+#: misc/e2undo.c:184
+#, c-format
+msgid "Failed to open %s\n"
+msgstr "Gagal membuka %s\n"
+
+#: misc/e2undo.c:210
+#, fuzzy, c-format
+msgid "Replayed transaction of size %zd at location %llu\n"
+msgstr "Balasan ukuran transaksi %zd di lokasi %ld\n"
+
+#: misc/e2undo.c:216
+#, c-format
+msgid "Failed write %s\n"
+msgstr "Gagal menulis %s\n"
+
+#: 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:478
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: tidak ditemukan\n"
+
+#: misc/fsck.c:594
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: tunggu: Tidak ada lagi proses anak?!?\n"
+
+#: misc/fsck.c:616
+#, 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:622
+#, 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:661
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Berakhir dengan %s (status keluar %d)\n"
+
+#: misc/fsck.c:721
+#, 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:742
+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:761
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Tidak dapat mengalokasikan memori untuk tipe sistem berkas\n"
+
+#: misc/fsck.c:884
+#, 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:911
+#, 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:967
+msgid "Checking all file systems.\n"
+msgstr "Memeriksa semua filesytem.\n"
+
+#: misc/fsck.c:1058
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--menunggu-- (tahap %d)\n"
+
+#: misc/fsck.c:1078
+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:1120
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: terlalu banyak perangkat\n"
+
+#: misc/fsck.c:1153 misc/fsck.c:1239
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: terlalu banyak argumen\n"
+
+#: misc/lsattr.c:74
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr "Penggunaan: %s [-RVadlv] [berkas...]\n"
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Ketika membaca flags di %s"
+
+#: misc/lsattr.c:91
+#, c-format
+msgid "While reading version on %s"
+msgstr "Ketika membaca versi di %s"
+
+#: misc/mke2fs.c:114
+#, 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]\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] [-jnqvDFKSV] 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:217
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Menjalankan perintah: %s\n"
+
+#: misc/mke2fs.c:221
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "ketika mencoba untuk menjalankan '%s'"
+
+#: misc/mke2fs.c:228
+msgid "while processing list of bad blocks from program"
+msgstr "ketika memproses daftar dari blok buruk dari aplikasi"
+
+#: misc/mke2fs.c:255
+#, 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:257
+#, 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:260
+msgid "Aborting....\n"
+msgstr "Membatalkan...\n"
+
+#: misc/mke2fs.c:280
+#, 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:299
+msgid "while marking bad blocks as used"
+msgstr "ketika menandai blok buruk sebagai digunakan"
+
+#: misc/mke2fs.c:316
+msgid "Writing inode tables: "
+msgstr "Menulis tabel inode: "
+
+#: misc/mke2fs.c:337
+#, 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:351 misc/mke2fs.c:2175 misc/mke2fs.c:2429
+#, c-format
+msgid "done                            \n"
+msgstr "selesai                        \n"
+
+#: misc/mke2fs.c:362
+msgid "while creating root dir"
+msgstr "ketika membuat direktori root"
+
+#: misc/mke2fs.c:369
+msgid "while reading root inode"
+msgstr "ketika membaca inode root"
+
+#: misc/mke2fs.c:383
+msgid "while setting root inode ownership"
+msgstr "ketika menset kepemilikan inode root"
+
+#: misc/mke2fs.c:401
+msgid "while creating /lost+found"
+msgstr "ketika membuat /lost+found"
+
+#: misc/mke2fs.c:408
+msgid "while looking up /lost+found"
+msgstr "ketika mencari /lost+found"
+
+#: misc/mke2fs.c:421
+msgid "while expanding /lost+found"
+msgstr "ketika mengekspansi /lost+found"
+
+#: misc/mke2fs.c:436
+msgid "while setting bad block inode"
+msgstr "ketika menset inode blok buruk"
+
+#: misc/mke2fs.c:463
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Kehabisan memori menghapus sektor %d-%d\n"
+
+#: misc/mke2fs.c:473
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Peringatan: tidak dapat membaca blok 0: %s\n"
+
+#: misc/mke2fs.c:489
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Peringatan: tidak dapat menghapus sektor %d: %s\n"
+
+#: misc/mke2fs.c:505
+msgid "while initializing journal superblock"
+msgstr "ketika menginisialisasi jurnal superblok"
+
+#: misc/mke2fs.c:513
+msgid "Zeroing journal device: "
+msgstr "Mengosongkan perangkat jurnal: "
+
+#: misc/mke2fs.c:525
+#, fuzzy, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "ketika mengosongkan perangkat jurnal (blok %u, jumlah %d)"
+
+#: misc/mke2fs.c:543
+msgid "while writing journal superblock"
+msgstr "ketika menulis jurnal superblok"
+
+#: misc/mke2fs.c:558
+#, fuzzy, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"peringatan: %u blok tidak digunakan.\n"
+"\n"
+
+#: misc/mke2fs.c:563
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Sistem berkas label=%s\n"
+
+#: misc/mke2fs.c:566
+#, fuzzy, c-format
+msgid "OS type: %s\n"
+msgstr "Tipe OS: "
+
+#: misc/mke2fs.c:568
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Ukuran blok=%u (log=%u)\n"
+
+#: misc/mke2fs.c:572
+#, fuzzy, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Ukuran blok=%u (log=%u)\n"
+
+#: misc/mke2fs.c:576
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Ukuran pecahan=%u (log=%u)\n"
+
+#: misc/mke2fs.c:578
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "Stride=%u blok, Lebar stripe=%u blok\n"
+
+#: misc/mke2fs.c:580
+#, fuzzy, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u inodes, %u blok\n"
+
+#: misc/mke2fs.c:582
+#, 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:585
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Data blok pertama=%u\n"
+
+#: misc/mke2fs.c:587
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Maksimum blok sistem berkas=%lu\n"
+
+#: misc/mke2fs.c:591
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u grup blok\n"
+
+#: misc/mke2fs.c:593
+#, c-format
+msgid "%u block group\n"
+msgstr "%u grup blok\n"
+
+#: misc/mke2fs.c:596
+#, 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:599
+#, 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:601
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u inode per grup\n"
+
+#: misc/mke2fs.c:608
+#, c-format
+msgid "Superblock backups stored on blocks: "
+msgstr "Cadangan superblok disimpan di blok: "
+
+#: misc/mke2fs.c:687 misc/tune2fs.c:1165
+#, fuzzy, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "pilihan mount tidak valid diset: %s\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Parameter stride tidak valid: %s\n"
+
+#: misc/mke2fs.c:716
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Parameter stripe-width tidak valid: %s\n"
+
+#: misc/mke2fs.c:739
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Parameter resize tidak valid: %s\n"
+
+#: misc/mke2fs.c:746
+#, c-format
+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:770
+#, c-format
+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:808
+#, fuzzy, c-format
+msgid "Invalid quotatype parameter: %s\n"
+msgstr "Parameter stride tidak valid: %s\n"
+
+#: misc/mke2fs.c:819
+#, 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"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr OR grp>\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:839
+#, 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:878
+#, 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:891 misc/tune2fs.c:393
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Pilihan sistem berkas tidak valid diset: %s\n"
+
+#: misc/mke2fs.c:903 misc/tune2fs.c:345
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "pilihan mount tidak valid diset: %s\n"
+
+#: misc/mke2fs.c:1043
+#, 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:1047
+#, c-format
+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:1051
+#, fuzzy, c-format
+msgid "Aborting...\n"
+msgstr "Membatalkan...\n"
+
+#: misc/mke2fs.c:1091
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1249
+#, fuzzy, c-format
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Tidak dapat mengalokasikan memori untuk nama berkas tdb\n"
+
+#: misc/mke2fs.c:1290
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1330
+#, c-format
+msgid "invalid block size - %s"
+msgstr "Ukuran blok tidak valid - %s"
+
+#: misc/mke2fs.c:1334
+#, 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:1350
+#, fuzzy, c-format
+msgid "invalid cluster size - %s"
+msgstr "Ukuran blok tidak valid - %s"
+
+#: misc/mke2fs.c:1362
+msgid "Illegal number for blocks per group"
+msgstr "Jumlah ilegal untuk blok per grup"
+
+#: misc/mke2fs.c:1367
+msgid "blocks per group must be multiple of 8"
+msgstr "blok per grup harus kelipatan dari 8"
+
+#: misc/mke2fs.c:1375
+msgid "Illegal number for flex_bg size"
+msgstr "Jumlah ilegal untuk ukuran flex_bg"
+
+#: misc/mke2fs.c:1381
+msgid "flex_bg size must be a power of 2"
+msgstr "ukuran flex_bg harus kelipatan dari 2"
+
+#: misc/mke2fs.c:1391
+#, 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:1401
+#, c-format
+msgid ""
+"Warning: -K option is deprecated and should not be used anymore. Use '-E "
+"nodiscard' extended option instead!\n"
+msgstr ""
+
+#: misc/mke2fs.c:1415
+msgid "in malloc for bad_blocks_filename"
+msgstr "dalam malloc untuk bad_block_filename"
+
+#: misc/mke2fs.c:1425
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "persentasi reserved blok tidak valid - %s"
+
+#: misc/mke2fs.c:1443
+#, c-format
+msgid "bad revision level - %s"
+msgstr "level revisi buruk - %s"
+
+#: misc/mke2fs.c:1455
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "ukuran inode tidak valid - %s"
+
+#: misc/mke2fs.c:1475
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "jumlah inode buruk - %s"
+
+#: misc/mke2fs.c:1492
+#, fuzzy
+msgid "The -t option may only be used once"
+msgstr "-o hanya boleh dispesifikasikan sekali"
+
+#: misc/mke2fs.c:1500
+#, fuzzy
+msgid "The -T option may only be used once"
+msgstr "-o hanya boleh dispesifikasikan sekali"
+
+#: misc/mke2fs.c:1550 misc/mke2fs.c:2508
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "ketika mencoba membuka perangkat jurnal %s\n"
+
+#: misc/mke2fs.c:1556
+#, 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:1562
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Menggunakan perangkat jurnal ukuranblok: %d\n"
+
+#: misc/mke2fs.c:1573
+#, fuzzy, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "jumlah blok tidak valid - %s"
+
+#: misc/mke2fs.c:1583
+msgid "filesystem"
+msgstr "sistem berkas"
+
+#: misc/mke2fs.c:1596 resize/main.c:374
+msgid "while trying to determine filesystem size"
+msgstr "ketika mencoba untuk menentukan ukuran sistem berkas"
+
+#: misc/mke2fs.c:1602
+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:1609
+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:1626
+msgid "Filesystem larger than apparent device size."
+msgstr "Sistem berkas lebih besar dari ukuran perangkat yang terlihat."
+
+#: misc/mke2fs.c:1646
+#, c-format
+msgid "Failed to parse fs types list\n"
+msgstr "Gagal untuk memparse daftar type fs\n"
+
+#: misc/mke2fs.c:1700
+#, 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:1716
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "fs_types untuk mke2fs.conf resolution: "
+
+#: misc/mke2fs.c:1723
+#, c-format
+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:1730
+#, c-format
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr "Sparse superblok tidak dilayani dengan sistem berkas revisi 0\n"
+
+#: misc/mke2fs.c:1742
+#, c-format
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "Jurnal tidak dilayani dengan sistem berkas revisi 0\n"
+
+#: misc/mke2fs.c:1756
+#, fuzzy, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "persentasi reserved blok tidak valid - %s"
+
+#: misc/mke2fs.c:1772
+#, c-format
+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:1789
+msgid "while trying to determine hardware sector size"
+msgstr "ketika mencoba untuk menentukan ukuran sektor perangkat"
+
+#: misc/mke2fs.c:1795
+msgid "while trying to determine physical sector size"
+msgstr "ketika mencoba untuk menentukan ukuran fisik sektor"
+
+#: misc/mke2fs.c:1828
+msgid "while setting blocksize; too small for device\n"
+msgstr ""
+"ketika sedang melakukan konfigurasi ukuran blok;terlalu kecil untuk "
+"perangkat\n"
+
+#: misc/mke2fs.c:1833
+#, 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:1864
+#, 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:1867
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "%s penyesuaian ofset sebesar %lu bytes.\n"
+
+#: misc/mke2fs.c:1869
+#, 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:1880
+#, 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:1884
+#, 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:1920
+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:1929
+msgid "blocks per group count out of range"
+msgstr "jumlah blok per grup diluar jangkauan"
+
+#: misc/mke2fs.c:1944
+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:1956
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "ukuran inode tidak valid %d (min %d/max %d)"
+
+#: misc/mke2fs.c:1974
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "terlalu banyak inode (%llu), naikkan rasio inode?"
+
+#: misc/mke2fs.c:1981
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "terlalu banyak inode (%llu), spesifikasikan < 2³2 inode"
+
+#: misc/mke2fs.c:1995
+#, 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:2114
+#, 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"
+
+#: misc/mke2fs.c:2128
+#, fuzzy
+msgid "while trying to setup undo file\n"
+msgstr ""
+"\n"
+"\tketika mencoba membuat file jurnal"
+
+#: misc/mke2fs.c:2154
+#, fuzzy
+msgid "Discarding device blocks: "
+msgstr "Menggunakan perangkat jurnal ukuranblok: %d\n"
+
+#: misc/mke2fs.c:2170
+#, fuzzy
+msgid "failed - "
+msgstr "gagal.\n"
+
+#: misc/mke2fs.c:2277
+msgid "while setting up superblock"
+msgstr "ketika mensetup superblok"
+
+#: misc/mke2fs.c:2286
+#, c-format
+msgid "Discard succeeded and will return 0s  - skipping inode table wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:2369
+#, c-format
+msgid "unknown os - %s"
+msgstr "os tidak diketahui - %s"
+
+#: misc/mke2fs.c:2421
+#, fuzzy, c-format
+msgid "Allocating group tables: "
+msgstr "Menulis tabel inode: "
+
+#: misc/mke2fs.c:2425
+msgid "while trying to allocate filesystem tables"
+msgstr "ketika mencoba mengalokasikan tabel sistem berkas"
+
+#: misc/mke2fs.c:2434
+#, fuzzy
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr "ketika menulis blok bitmap"
+
+#: misc/mke2fs.c:2477
+#, 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:2490
+msgid "while reserving blocks for online resize"
+msgstr "ketika menreserve blok untuk online resize"
+
+#: misc/mke2fs.c:2501 misc/tune2fs.c:640
+msgid "journal"
+msgstr "jurnal"
+
+#: misc/mke2fs.c:2513
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Menambahkan jurnal ke perangkat %s: "
+
+#: misc/mke2fs.c:2520
+#, 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:2525 misc/mke2fs.c:2557 misc/tune2fs.c:669 misc/tune2fs.c:683
+#, c-format
+msgid "done\n"
+msgstr "selesai\n"
+
+#: misc/mke2fs.c:2534
+#, c-format
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Melewatkan pembuatan jurnal dalam mode super-saja\n"
+
+#: misc/mke2fs.c:2545
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Membuat jurnal (%u blok): "
+
+#: misc/mke2fs.c:2553
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tketika mencoba untuk membuat jurnal"
+
+#: misc/mke2fs.c:2564 misc/tune2fs.c:446
+#, c-format
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+
+#: misc/mke2fs.c:2569
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2582
+#, c-format
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Menulis superblok dan informasi akuntasi sistem berkas: "
+
+#: misc/mke2fs.c:2589
+#, c-format
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+"\n"
+"Peringatan, memiliki masalah menulis diluar superblok."
+
+#: misc/mke2fs.c:2591
+#, c-format
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"selesai\n"
+"\n"
+
+#: misc/mklost+found.c:50
+#, c-format
+msgid "Usage: mklost+found\n"
+msgstr "Penggunaan: mklost+found\n"
+
+#: misc/partinfo.c:41
+#, 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:51
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "tidak dapat membuka %s: %s"
+
+#: misc/partinfo.c:57
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Tidak dapat memperoleh geometry dari %s; %s"
+
+#: misc/partinfo.c:65
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Tidak dapat memperoleh ukuran dari %s: %s"
+
+#: misc/partinfo.c:71
+#, 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:107
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr "Tolong jalankan e2fsck untuk sistem berkas.\n"
+
+#: misc/tune2fs.c:116
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-p "
+"mmp_update_interval]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]\n"
+"\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[ -I new_inode_size ] 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:205
+msgid "while trying to open external journal"
+msgstr "ketika mencoba membuka jurnal external"
+
+#: misc/tune2fs.c:210
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s bukan sebuah perangkat jurnal.\n"
+
+#: misc/tune2fs.c:225
+msgid "Journal superblock not found!\n"
+msgstr "Jurnal superblok tidak ditemukan!\n"
+
+#: misc/tune2fs.c:236
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "Sistem berkas UUID tidak ditemukan dalam perangkat jurnal.\n"
+
+#: misc/tune2fs.c:257
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:265
+msgid "Journal removed\n"
+msgstr "Jurnal dihapus\n"
+
+#: misc/tune2fs.c:309
+msgid "while reading bitmaps"
+msgstr "ketika membaca bitmap"
+
+#: misc/tune2fs.c:317
+msgid "while clearing journal inode"
+msgstr "ketika menghapus inode jurnal"
+
+#: misc/tune2fs.c:328
+msgid "while writing journal inode"
+msgstr "ketika menulis inode jurnal"
+
+#: misc/tune2fs.c:363
+#, c-format
+msgid "(and reboot afterwards!)\n"
+msgstr "(dan reboot setelah ini!)\n"
+
+#: misc/tune2fs.c:396
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Menghapus feature sistem berkas '%s' tidak dilayani.\n"
+
+#: misc/tune2fs.c:402
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Tatanan fitur sistem berkas '%s' tidak dilayani.\n"
+
+#: misc/tune2fs.c:411
+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:419
+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:438
+#, 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:456
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:465
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:473
+#, fuzzy
+msgid "Error while reading bitmaps\n"
+msgstr "ketika membaca bitmap"
+
+#: misc/tune2fs.c:482
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+
+#: misc/tune2fs.c:487
+#, fuzzy
+msgid "while reading MMP block."
+msgstr "ketika sedang membaca inode blok buruk"
+
+#: misc/tune2fs.c:519
+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:530
+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:590
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:635
+msgid "The filesystem already has a journal.\n"
+msgstr "Sistem berkas telah memiliki sebuah jurnal.\n"
+
+#: misc/tune2fs.c:653
+#, 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:657
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Membuat jurnal di perangkat %s: "
+
+#: misc/tune2fs.c:665
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "ketika menambahkan sistem berkas di jurnal di %s"
+
+#: misc/tune2fs.c:671
+msgid "Creating journal inode: "
+msgstr "Membuat jurnal inode: "
+
+#: misc/tune2fs.c:680
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tketika mencoba membuat file jurnal"
+
+#: misc/tune2fs.c:763
+#, fuzzy
+msgid "Couldn't allocate memory to parse quota options!\n"
+msgstr "Tidak dapat mengalokasikan memori untuk memparse pilihan!\n"
+
+#: misc/tune2fs.c:785
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with "
+"comma):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:846
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Tidak dapat memparse date/time specifier: %s"
+
+#: misc/tune2fs.c:870 misc/tune2fs.c:883
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "jumlah mount buruk - %s"
+
+#: misc/tune2fs.c:899
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "perilaku error buruk - %s"
+
+#: misc/tune2fs.c:926
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "nama gid/grup buruk - %s"
+
+#: misc/tune2fs.c:959
+#, c-format
+msgid "bad interval - %s"
+msgstr "interval buruk - %s"
+
+#: misc/tune2fs.c:988
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "rasio reserved blok buruk - %s"
+
+#: misc/tune2fs.c:1003
+msgid "-o may only be specified once"
+msgstr "-o hanya boleh dispesifikasikan sekali"
+
+#: misc/tune2fs.c:1012
+msgid "-O may only be specified once"
+msgstr "-O hanya boleh dispesifikasikan sekali"
+
+#: misc/tune2fs.c:1027
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "jumlah reserved blok buruk - %s"
+
+#: misc/tune2fs.c:1056
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "nama uid/pengguna buruk - %s"
+
+#: misc/tune2fs.c:1073
+#, c-format
+msgid "bad inode size - %s"
+msgstr "ukuran inode buruk - %s"
+
+#: misc/tune2fs.c:1080
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Ukuran inode harus kelipatan dari dua - %s"
+
+#: misc/tune2fs.c:1174
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:1179
+#, 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:1202
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Invalid RAID stride: %s\n"
+
+#: misc/tune2fs.c:1217
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Invalid RAID stripe-width: %s\n"
+
+#: misc/tune2fs.c:1232
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Algoritma hash tidak valid: %s\n"
+
+#: misc/tune2fs.c:1238
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Menset default algoritma hash ke %s (%d)\n"
+
+#: misc/tune2fs.c:1257
+#, fuzzy, c-format
+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"
+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:1723
+#, fuzzy
+msgid "Failed to read inode bitmap\n"
+msgstr "ketika membaca bitmap"
+
+#: misc/tune2fs.c:1728
+#, fuzzy
+msgid "Failed to read block bitmap\n"
+msgstr "membaca inode dan blok bitmap"
+
+#: misc/tune2fs.c:1745 resize/resize2fs.c:784
+msgid "blocks to be moved"
+msgstr "blok akan dipindahkan"
+
+#: misc/tune2fs.c:1748
+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:1754
+msgid "Not enough space to increase inode size \n"
+msgstr "Tidak cukup ruang untuk meningkatkan ukuran inode \n"
+
+#: misc/tune2fs.c:1759
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Gagal untuk memindahkan blok ketika pengubahan ukuran inode \n"
+
+#: misc/tune2fs.c:1791
+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:1818
+msgid "Couldn't allocate memory for tdb filename\n"
+msgstr "Tidak dapat mengalokasikan memori untuk nama berkas tdb\n"
+
+#: misc/tune2fs.c:1840
+#, c-format
+msgid "while trying to delete %s"
+msgstr "ketika mencoba untuk menghapus %s"
+
+#: misc/tune2fs.c:1850
+#, c-format
+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"
+
+#: misc/tune2fs.c:1919
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:1937
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Ukuran inode telah %lu\n"
+
+#: misc/tune2fs.c:1943
+#, c-format
+msgid "Shrinking the inode size is not supported\n"
+msgstr "Mengecilkan ukuran inode yang tidak dilayani\n"
+
+#: misc/tune2fs.c:1990
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Menset maksimal jumlah mount ke %d\n"
+
+#: misc/tune2fs.c:1996
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Menset jumlah mount sekarang ke %d\n"
+
+#: misc/tune2fs.c:2001
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Menset perilaku error ke %d\n"
+
+#: misc/tune2fs.c:2006
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Menset gid reserved blok ke %lu\n"
+
+#: misc/tune2fs.c:2011
+#, fuzzy, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "Menset interval diantara check ke %lu detik\n"
+
+#: misc/tune2fs.c:2018
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Menset interval diantara check ke %lu detik\n"
+
+#: misc/tune2fs.c:2025
+#, 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:2031
+#, fuzzy, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "jumlah reserved blok terlalu besar (%lu)"
+
+#: misc/tune2fs.c:2038
+#, fuzzy, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Menset jumlah reserved blok ke %lu\n"
+
+#: misc/tune2fs.c:2044
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Sistem berkas telah memiliki sparse superblok.\n"
+
+#: misc/tune2fs.c:2051
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set.  %s"
+msgstr ""
+"\n"
+"Sparse superblok flag diset. %s"
+
+#: misc/tune2fs.c:2056
+msgid ""
+"\n"
+"Clearing the sparse superflag not supported.\n"
+msgstr ""
+"\n"
+"Menghapus sparse superflag tidak dilayani.\n"
+
+#: misc/tune2fs.c:2064
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "Menset waktu sistem berkas terakhir diperiksa ke %s\n"
+
+#: misc/tune2fs.c:2070
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Menset uid reserved blok ke %lu\n"
+
+#: misc/tune2fs.c:2102
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+
+#: misc/tune2fs.c:2120
+#, 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:2153
+msgid "Invalid UUID format\n"
+msgstr "Invalid format UUID\n"
+
+#: misc/tune2fs.c:2166
+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:2174
+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:2187
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Menset ukuran inode %lu\n"
+
+#: misc/tune2fs.c:2190
+#, fuzzy, c-format
+msgid "Failed to change inode size\n"
+msgstr "Gagal untuk memindahkan blok ketika pengubahan ukuran inode \n"
+
+#: misc/tune2fs.c:2201
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Menset ukuran stride ke %d\n"
+
+#: misc/tune2fs.c:2206
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Menset lebar stripe ke %d\n"
+
+#: misc/tune2fs.c:2213
+#, fuzzy, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Menset jumlah mount sekarang ke %d\n"
+
+#: misc/util.c:74
+msgid "Proceed anyway? (y,n) "
+msgstr "Jalankan saja? (y,n) "
+
+#: misc/util.c:89
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr "Tidak dapat melakukan statistik %s --- %s\n"
+
+#: misc/util.c:92
+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"
+
+#: misc/util.c:103
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s bukan sebuah perangkat blok spesial.\n"
+
+#: misc/util.c:132
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr "%s adalah seluruh perangkatm bukan hanya sebuah partisi!\n"
+
+#: misc/util.c:154
+msgid "mke2fs forced anyway.  Hope /etc/mtab is incorrect.\n"
+msgstr "mke2fs dipaksakan saja. Mudah mudahan /etc/mtab tidak benar.\n"
+
+#: misc/util.c:159
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "tidak akan membuat sebuah %s disini!\n"
+
+#: misc/util.c:166
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs dipaksakan saja.\n"
+
+#: misc/util.c:182
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Tidak dapat mengalokasikan memori untuk memparse pilihan jurnal!\n"
+
+#: misc/util.c:207
+#, 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:228
+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"
+"\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:258
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Sistem berkas terlalu kecil untuk sebuah jurnal\n"
+
+#: misc/util.c:265
+#, 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:273
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Ukuran jurnal terlalu besar untuk sistem berkas.\n"
+
+#: misc/util.c:287
+#, 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:48
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr ""
+
+#: misc/uuidd.c:50
+#, c-format
+msgid "       %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr ""
+
+#: misc/uuidd.c:52
+#, c-format
+msgid "       %s -k\n"
+msgstr ""
+
+#: misc/uuidd.c:154
+#, fuzzy
+msgid "bad arguments"
+msgstr "%s: terlalu banyak argumen\n"
+
+#: misc/uuidd.c:172
+msgid "connect"
+msgstr ""
+
+#: misc/uuidd.c:191
+msgid "write"
+msgstr ""
+
+#: misc/uuidd.c:199
+msgid "read count"
+msgstr ""
+
+#: misc/uuidd.c:205
+#, fuzzy
+msgid "bad response length"
+msgstr "Panjang stride tidak valid"
+
+#: misc/uuidd.c:270
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr ""
+
+#: misc/uuidd.c:278
+#, fuzzy, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Tidak dapat memparse date/time specifier: %s"
+
+#: misc/uuidd.c:307
+#, fuzzy, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Tidak dapat menghubungkan %i: %m\n"
+
+#: misc/uuidd.c:315
+#, fuzzy, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Tidak dapat menghubungkan %i: %m\n"
+
+#: misc/uuidd.c:353
+#, fuzzy, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Error membaca @i %i: %m\n"
+
+#: misc/uuidd.c:361
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:380
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:390
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:399
+#, 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:420
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:432
+#, fuzzy, c-format
+msgid "Invalid operation %d\n"
+msgstr "Versi EA tidak valid.\n"
+
+#: misc/uuidd.c:476 misc/uuidd.c:498
+#, c-format
+msgid "Bad number: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:533 misc/uuidd.c:562
+#, fuzzy, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Error membuat /@l @d (%s): %m\n"
+
+#: misc/uuidd.c:543
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:547
+#, c-format
+msgid "List of UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:568
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr ""
+
+#: misc/uuidd.c:585
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:591
+#, 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:43
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]\n"
+"\n"
+msgstr ""
+"Penggunaan: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] perangkat "
+"[ukuran_baru]\n"
+"\n"
+
+#: resize/main.c:65
+msgid "Extending the inode table"
+msgstr "Memperbesar tabel inode"
+
+#: resize/main.c:68
+msgid "Relocating blocks"
+msgstr "Memindahkan blok"
+
+#: resize/main.c:71
+msgid "Scanning inode table"
+msgstr "Memeriksa tabel inode"
+
+#: resize/main.c:74
+msgid "Updating inode references"
+msgstr "Memperbarui referensi inode"
+
+#: resize/main.c:77
+msgid "Moving inode table"
+msgstr "Memindahkan tabel inode"
+
+#: resize/main.c:80
+msgid "Unknown pass?!?"
+msgstr "Tahap tidak diketahui?!?"
+
+#: resize/main.c:83
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Awal tahap %d (max = %lu)\n"
+
+#: resize/main.c:259
+#, c-format
+msgid "while opening %s"
+msgstr "ketika membuka %s"
+
+#: resize/main.c:267
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "ketika memperoleh informasi statistik untuk %s"
+
+#: resize/main.c:331
+#, c-format
+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"
+
+#: resize/main.c:344 resize/main.c:452
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Tolong jalankan 'e2fsck -f %s' terlebih dahulu.\n"
+"\n"
+
+#: resize/main.c:348
+#, fuzzy, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Estimasi minimum dari ukuran sistem berkas: %u\n"
+
+#: resize/main.c:384
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Ukuran inode baru tidak valid: %s\n"
+
+#: resize/main.c:392
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr ""
+
+#: resize/main.c:404
+#, fuzzy, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Ukuran baru lebih kecil daripada minimum (%u)\n"
+
+#: resize/main.c:410
+msgid "Invalid stride length"
+msgstr "Panjang stride tidak valid"
+
+#: resize/main.c:434
+#, 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:441
+#, fuzzy, c-format
+msgid ""
+"The filesystem is already %llu 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:456
+#, 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:465
+#, c-format
+msgid "while trying to resize %s"
+msgstr "ketika mencoba untuk mengubah ukuran %s"
+
+#: resize/main.c:468
+#, 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:474
+#, fuzzy, c-format
+msgid ""
+"The filesystem on %s is now %llu blocks long.\n"
+"\n"
+msgstr ""
+"Sistem berkas di %s sekarang memiliki panjang %u blok.\n"
+"\n"
+
+#: resize/main.c:489
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "ketika mencoba untuk memotong %s"
+
+#: resize/online.c:40
+#, 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:44
+#, fuzzy
+msgid "On-line shrinking not supported"
+msgstr "On-line shrinking dari %u ke %u tidak dilayani.\n"
+
+#: resize/online.c:63
+msgid "Filesystem does not support online resizing"
+msgstr "Sistem berkas tidak melayani online resizing"
+
+#: resize/online.c:70
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "ketika mencoba membuka mountpoint %s"
+
+#: resize/online.c:92 resize/online.c:116
+msgid "Permission denied to resize filesystem"
+msgstr "Ijin ditolak ketika mengubah ukuran sistem berkas"
+
+#: resize/online.c:95 resize/online.c:122
+msgid "While checking for on-line resizing support"
+msgstr "Ketika memeriksa untuk layanan on-line resizing"
+
+#: resize/online.c:107
+#, fuzzy
+msgid "Kernel does not support resizing a file system this large"
+msgstr "Kernel tidak melayani online resizing"
+
+#: resize/online.c:119
+msgid "Kernel does not support online resizing"
+msgstr "Kernel tidak melayani online resizing"
+
+#: resize/online.c:152
+#, 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:162
+msgid "While trying to extend the last group"
+msgstr "Ketika mencoba untuk mengexten grup terakhir"
+
+#: resize/online.c:216
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Ketika mencoba untuk menambahkan grup #%d"
+
+#: resize/online.c:227
+#, 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:348
+#, c-format
+msgid "inodes (%llu) must be less than %u"
+msgstr "inode (%llu) harus lebih kecil dari %u"
+
+#: resize/resize2fs.c:576
+msgid "reserved blocks"
+msgstr "reserved blok"
+
+#: resize/resize2fs.c:789
+msgid "meta-data blocks"
+msgstr "meta-data blok"
+
+#: resize/resize2fs.c:1735
+#, c-format
+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.42.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: fsck 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 ""
+
+#: e2fsck/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr ""
+
+#: e2fsck/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr ""
+
+#: e2fsck/prof_err.c:13
+#, fuzzy
+msgid "Profile section not found"
+msgstr "ketika membuat /lost+found"
+
+#: e2fsck/prof_err.c:14
+#, fuzzy
+msgid "Profile relation not found"
+msgstr "ketika membuat /lost+found"
+
+#: e2fsck/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+
+#: e2fsck/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr ""
+
+#: e2fsck/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr ""
+
+#: e2fsck/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr ""
+
+#: e2fsck/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr ""
+
+#: e2fsck/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr ""
+
+#: e2fsck/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr ""
+
+#: e2fsck/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr ""
+
+#: e2fsck/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr ""
+
+#: e2fsck/prof_err.c:32
+#, fuzzy
+msgid "Invalid profile_section object"
+msgstr "Pilihan sistem berkas tidak valid diset: %s\n"
+
+#: e2fsck/prof_err.c:33
+msgid "No more sections"
+msgstr ""
+
+#: e2fsck/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr ""
+
+#: e2fsck/prof_err.c:35
+msgid "No profile file open"
+msgstr ""
+
+#: e2fsck/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:37
+#, fuzzy
+msgid "Couldn't open profile file"
+msgstr "Tidak dapat menyalin file: %m\n"
+
+#: e2fsck/prof_err.c:38
+msgid "Section already exists"
+msgstr ""
+
+#: e2fsck/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr ""
+
+#: e2fsck/prof_err.c:40
+#, fuzzy
+msgid "Invalid integer value"
+msgstr "Panjang stride tidak valid"
+
+#: e2fsck/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr ""
+
+#~ 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 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 "%s is mounted.  "
+#~ msgstr "%s sedang dimount.   "
+
+#~ msgid "Couldn't determine journal size"
+#~ msgstr "Tidak dapat menentukan ukuran jurnal"
+
+#~ msgid "short write (only %d bytes) for writing image header"
+#~ msgstr "menulis pendek (hanya %d bytes) untuk menulis header image"
+
+#~ 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 "#\t\t %u -> %u (%d)\n"
+#~ msgstr "#\t\t %u -> %u (%d)\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 "Error while deleting extent: %m\n"
+#~ msgstr "Error ketika menghapus extensi: %m\n"
+
+#~ msgid "Recreate journal to make the filesystem ext3 again?\n"
+#~ msgstr "Membuat kembali jurnal untuk membuat sistem berkas ext3 lagi?\n"
+
+#~ msgid "bad block size - %s"
+#~ msgstr "ukuran blok buruk - %s"
+
+#~ 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/e2fsprogs/po/insert-header.sin b/e2fsprogs/po/insert-header.sin
new file mode 100644
index 0000000..b26de01
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/po/it.gmo b/e2fsprogs/po/it.gmo
new file mode 100644
index 0000000..8b8311c
--- /dev/null
+++ b/e2fsprogs/po/it.gmo
Binary files differ
diff --git a/e2fsprogs/po/it.po b/e2fsprogs/po/it.po
new file mode 100644
index 0000000..48a0b00
--- /dev/null
+++ b/e2fsprogs/po/it.po
@@ -0,0 +1,6899 @@
+# Italian translation for e2fsprogs
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Andrea Spadaccini <lupin85@email.it>, 2004
+# Marco Colombo <m.colombo@ed.ac.uk>, 2004
+# TODO: Sistemare @b, da 'blocco' a 'blocc', e specificare manualmente i 
+# singolari ed i plurali
+#. 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).
+#.  
+#. 	%b	<blk>			block number
+#. 	%B	<blkcount>		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_dir_acl
+#. 	%Iu	<inode> -> i_uid
+#. 	%Ig	<inode> -> i_gid
+#. 	%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.36-b2\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2012-06-12 14:40-0400\n"
+"PO-Revision-Date: 2005-01-18 17:52+0100\n"
+"Last-Translator: Andrea Spadaccini <lupin85@email.it>\n"
+"Language-Team: Italian <tp@lists.linux.it>\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:176
+#, 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 "durante il controllo sull'integrità dell'inode numero 1"
+
+#: e2fsck/badblocks.c:58
+msgid "while reading the bad blocks inode"
+msgstr "durante la lettura dell'inode numero 1"
+
+#: e2fsck/badblocks.c:72 e2fsck/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:1298 e2fsck/unix.c:1386 misc/badblocks.c:1214
+#: misc/badblocks.c:1222 misc/badblocks.c:1236 misc/badblocks.c:1248
+#: misc/dumpe2fs.c:588 misc/e2image.c:1189 misc/e2image.c:1307
+#: misc/e2image.c:1320 misc/mke2fs.c:192 misc/tune2fs.c:1907 resize/main.c:303
+#, c-format
+msgid "while trying to open %s"
+msgstr "durante l'apertura di %s"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "provando ad effettuare il popen di '%s'"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:199
+msgid "while reading in list of bad blocks from file"
+msgstr "durante la lettura della lista di blocchi non validi da file"
+
+#: e2fsck/badblocks.c:105
+msgid "while updating bad block inode"
+msgstr "aggiornando l'inode di un blocco difettoso"
+
+#: e2fsck/badblocks.c:131
+#, fuzzy, c-format
+msgid "Warning: illegal block %u found in bad block inode.  Cleared.\n"
+msgstr ""
+"Attenzione blocco illegale %u trovato nell'inode di un blocco difettoso. "
+"Azzerato.\n"
+
+#: e2fsck/ehandler.c:55
+#, c-format
+msgid "Error reading block %lu (%s) while %s.  "
+msgstr "Errore durante la lettura del blocco %lu (%s) durante %s. "
+
+#: e2fsck/ehandler.c:58
+#, c-format
+msgid "Error reading block %lu (%s).  "
+msgstr "Errore durante la lettura del blocco %lu (%s). "
+
+#: e2fsck/ehandler.c:61 e2fsck/ehandler.c:110
+msgid "Ignore error"
+msgstr "Ignora l'errore"
+
+#: e2fsck/ehandler.c:62
+msgid "Force rewrite"
+msgstr "Forza la riscrittura"
+
+#: e2fsck/ehandler.c:104
+#, c-format
+msgid "Error writing block %lu (%s) while %s.  "
+msgstr "Errore durante la scrittura del blocco %lu (%s) mentre %s."
+
+#: e2fsck/ehandler.c:107
+#, c-format
+msgid "Error writing block %lu (%s).  "
+msgstr "Errore durante la scrittura del 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
+#, fuzzy, c-format
+msgid "Empty directory block %u (#%d) in inode %u\n"
+msgstr "Blocco directory %d (#%d) vuoto nell'inode %d\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/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Utilizzo: %s disco\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported!  Can't flush buffers.\n"
+msgstr "Ioctl BLKFLSBUF non supportato! Impossibile svuotare i buffer.\n"
+
+#: e2fsck/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Utilizzo: %s [-F] [-I blocchi_buffer_inode] device\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:930
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "aprendo %s per lo svuotamento"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:936 resize/main.c:276
+#, c-format
+msgid "while trying to flush %s"
+msgstr "provando a svuotare %s"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1084
+msgid "while opening inode scan"
+msgstr "avviando la scansione degli inode"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1102
+msgid "while getting next inode"
+msgstr "leggendo l'inode successivo"
+
+#: e2fsck/iscan.c:136
+#, fuzzy, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%d inode analizzati.\n"
+
+#: e2fsck/journal.c:512
+msgid "reading journal superblock\n"
+msgstr "lettura del superblocco del journal\n"
+
+#: e2fsck/journal.c:569
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: non è stato trovato un superblocco valido del journal\n"
+
+#: e2fsck/journal.c:578
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: journal troppo corto\n"
+
+#: e2fsck/journal.c:870
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: ripristino del journal\n"
+
+#: e2fsck/journal.c:872
+#, 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:899
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "durante la riapertura di %s"
+
+#: e2fsck/message.c:113
+msgid "aextended attribute"
+msgstr "aattributo esteso"
+
+#: e2fsck/message.c:114
+msgid "Aerror allocating"
+msgstr "Aerrore allocando"
+
+#: e2fsck/message.c:115
+msgid "bblock"
+msgstr "bblocco"
+
+#: e2fsck/message.c:116
+msgid "Bbitmap"
+msgstr "Bmappa dei bit"
+
+#: e2fsck/message.c:117
+msgid "ccompress"
+msgstr "ccomprimi"
+
+#: e2fsck/message.c:118
+msgid "Cconflicts with some other fs @b"
+msgstr "Centra in conflitto con altri @b(i) del fs"
+
+#: e2fsck/message.c:119
+msgid "iinode"
+msgstr "iinode"
+
+#: e2fsck/message.c:120
+msgid "Iillegal"
+msgstr "Iillegale"
+
+#: e2fsck/message.c:121
+msgid "jjournal"
+msgstr "jjournal"
+
+#: e2fsck/message.c:122
+msgid "Ddeleted"
+msgstr "Dcancellato"
+
+#: e2fsck/message.c:123
+msgid "ddirectory"
+msgstr "ddirectory"
+
+#: 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 "ffilesystem"
+
+#: 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 "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:131
+msgid "Lis a link"
+msgstr "Lè un collegamento"
+
+#: e2fsck/message.c:132
+#, fuzzy
+msgid "mmultiply-claimed"
+msgstr "mappa degli inode richiesta più volte"
+
+#: e2fsck/message.c:133
+msgid "ninvalid"
+msgstr ""
+
+#: e2fsck/message.c:134
+msgid "oorphaned"
+msgstr "oorfano"
+
+#: e2fsck/message.c:135
+msgid "pproblem in"
+msgstr "pproblema in"
+
+#: e2fsck/message.c:136
+msgid "qquota"
+msgstr ""
+
+#: e2fsck/message.c:137
+msgid "rroot @i"
+msgstr "r@i root"
+
+#: e2fsck/message.c:138
+msgid "sshould be"
+msgstr "sdovrebbe essere"
+
+#: e2fsck/message.c:139
+msgid "Ssuper@b"
+msgstr "Ssuper@b"
+
+#: e2fsck/message.c:140
+msgid "uunattached"
+msgstr ""
+
+#: e2fsck/message.c:141
+msgid "vdevice"
+msgstr "vdevice"
+
+#: e2fsck/message.c:142
+#, fuzzy
+msgid "xextent"
+msgstr "eelemento"
+
+#: e2fsck/message.c:143
+msgid "zzero-length"
+msgstr "zlunghezza-zero"
+
+#: e2fsck/message.c:154
+msgid "<The NULL inode>"
+msgstr "<Inode NULL>"
+
+#: e2fsck/message.c:155
+msgid "<The bad blocks inode>"
+msgstr "<Inode numero 1>"
+
+#: e2fsck/message.c:157
+#, fuzzy
+msgid "<The user quota inode>"
+msgstr "<Inode del journal>"
+
+#: e2fsck/message.c:158
+#, fuzzy
+msgid "<The group quota inode>"
+msgstr "<Inode del descrittore di gruppo>"
+
+#: e2fsck/message.c:159
+msgid "<The boot loader inode>"
+msgstr "<Inode del boot loader>"
+
+#: e2fsck/message.c:160
+msgid "<The undelete directory inode>"
+msgstr "<Inode della directory undelete>"
+
+#: e2fsck/message.c:161
+msgid "<The group descriptor inode>"
+msgstr "<Inode del descrittore di gruppo>"
+
+#: e2fsck/message.c:162
+msgid "<The journal inode>"
+msgstr "<Inode del journal>"
+
+#: e2fsck/message.c:163
+msgid "<Reserved inode 9>"
+msgstr "<Inode riservato 9>"
+
+#: e2fsck/message.c:164
+msgid "<Reserved inode 10>"
+msgstr "<Inode riservato 10>"
+
+#: e2fsck/message.c:333
+#, fuzzy
+msgid "regular file"
+msgstr "mappa degli inode dei file regolari"
+
+#: e2fsck/message.c:335
+#, fuzzy
+msgid "directory"
+msgstr "ddirectory"
+
+#: e2fsck/message.c:337
+msgid "character device"
+msgstr ""
+
+#: e2fsck/message.c:339
+#, fuzzy
+msgid "block device"
+msgstr "vdevice"
+
+#: e2fsck/message.c:341
+msgid "named pipe"
+msgstr ""
+
+#: e2fsck/message.c:343
+msgid "symbolic link"
+msgstr ""
+
+#: e2fsck/message.c:345 misc/uuidd.c:161
+msgid "socket"
+msgstr ""
+
+#: e2fsck/message.c:347
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr ""
+
+#: e2fsck/message.c:423
+#, fuzzy
+msgid "indirect block"
+msgstr "lettura dei blocchi indiretti dell'inode %u"
+
+#: e2fsck/message.c:425
+#, fuzzy
+msgid "double indirect block"
+msgstr "lettura dei blocchi indiretti dell'inode %u"
+
+#: e2fsck/message.c:427
+#, fuzzy
+msgid "triple indirect block"
+msgstr "lettura dei blocchi indiretti dell'inode %u"
+
+#: e2fsck/message.c:429
+#, fuzzy
+msgid "translator block"
+msgstr "Rilocazione dei blocchi"
+
+#: e2fsck/message.c:431
+#, fuzzy
+msgid "block #"
+msgstr "bblocco"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "mappa degli inode richiesta più volte"
+
+#: e2fsck/pass1b.c:610 e2fsck/pass1b.c:729
+#, fuzzy, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "errore interno; impossibile trovare dup_blk per %d\n"
+
+#: e2fsck/pass1b.c:820
+msgid "returned from clone_file_block"
+msgstr "ritornato da clone_file_block"
+
+#: e2fsck/pass1b.c:842
+#, fuzzy, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "Errore interno: impossibile trovare dir_info per %i.\n"
+
+#: e2fsck/pass1b.c:854
+#, fuzzy, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "Errore interno: impossibile trovare dir_info per %i.\n"
+
+#: e2fsck/pass1.c:476 e2fsck/pass2.c:782
+#, fuzzy
+msgid "reading directory block"
+msgstr "lettura dei blocchi indiretti dell'inode %u"
+
+#: e2fsck/pass1.c:599
+msgid "in-use inode map"
+msgstr "mappa degli inode in utilizzo"
+
+#: e2fsck/pass1.c:610
+msgid "directory inode map"
+msgstr "mappa degli inode delle directory"
+
+#: e2fsck/pass1.c:620
+msgid "regular file inode map"
+msgstr "mappa degli inode dei file regolari"
+
+#: e2fsck/pass1.c:629
+msgid "in-use block map"
+msgstr "mappa dei blocchi in utilizzo"
+
+#: e2fsck/pass1.c:696
+#, fuzzy
+msgid "opening inode scan"
+msgstr "scansione degli inode"
+
+#: e2fsck/pass1.c:730
+#, fuzzy
+msgid "getting next inode from scan"
+msgstr "leggendo l'inode successivo"
+
+#: e2fsck/pass1.c:1240
+msgid "Pass 1"
+msgstr "Passo 1"
+
+#: e2fsck/pass1.c:1297
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "lettura dei blocchi indiretti dell'inode %u"
+
+#: e2fsck/pass1.c:1347
+msgid "bad inode map"
+msgstr "mappa degli inode non valida"
+
+#: e2fsck/pass1.c:1370
+msgid "inode in bad block map"
+msgstr "inode nella mappa dei blocchi difettosi"
+
+#: e2fsck/pass1.c:1390
+msgid "imagic inode map"
+msgstr "mappa degli inode imagic"
+
+#: e2fsck/pass1.c:1417
+msgid "multiply claimed block map"
+msgstr "mappa dei blocchi richiesta più volte"
+
+#: e2fsck/pass1.c:1518
+msgid "ext attr block map"
+msgstr ""
+
+#: e2fsck/pass1.c:2266
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr ""
+
+#: e2fsck/pass1.c:2627
+msgid "block bitmap"
+msgstr "mappa dei bit del blocco"
+
+#: e2fsck/pass1.c:2633
+msgid "inode bitmap"
+msgstr "mappa dei bit dell'inode"
+
+#: e2fsck/pass1.c:2639
+msgid "inode table"
+msgstr "tavola degli inode"
+
+#: e2fsck/pass2.c:283
+msgid "Pass 2"
+msgstr "Passo 2"
+
+#: e2fsck/pass2.c:805
+#, fuzzy
+msgid "Can not continue."
+msgstr ""
+"Impossibile continuare, operazione annullata.\n"
+"\n"
+
+#: e2fsck/pass3.c:77
+msgid "inode done bitmap"
+msgstr ""
+
+#: e2fsck/pass3.c:86
+msgid "Peak memory"
+msgstr "Memoria di picco"
+
+#: e2fsck/pass3.c:136
+msgid "Pass 3"
+msgstr "Passo 3"
+
+#: e2fsck/pass3.c:322
+#, fuzzy
+msgid "inode loop detection bitmap"
+msgstr "mappa dei bit del ciclo di rilevamento inode"
+
+#: e2fsck/pass4.c:195
+msgid "Pass 4"
+msgstr "Passo 4"
+
+#: e2fsck/pass5.c:74
+msgid "Pass 5"
+msgstr "Passo 5"
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(nessun prompt)"
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr "Sistema"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Azzera"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Riloca"
+
+#: 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 "Salva"
+
+#: 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 "Cancella file"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Sopprimi messaggi"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "Effettua l'unlink -- Scollega FIXME"
+
+#: 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 "SISTEMATO"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "AZZERATO"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "RILOCATO"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "ALLOCATO"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "ESPANSO"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "RICONNESSO"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "CREATO"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "SALVATO"
+
+#: 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 ""
+
+#: 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 CANCELLATO"
+
+#: 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 PULITO"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "RICREERA'"
+
+#. @-expanded: block bitmap for group %g is not in group.  (block %b)\n
+#: e2fsck/problem.c:107
+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:111
+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:116
+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 correct ext2\n
+#. @-expanded: filesystem.  If the device is valid and it really contains an ext2\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 %S <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:122
+#, c-format
+msgid ""
+"\n"
+"The @S could not be read or does not describe a correct ext2\n"
+"@f.  If the @v is valid and it really contains an ext2\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 %S <@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:131
+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:138
+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:145
+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:150
+#, 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:155
+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:160
+#, 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:169
+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:174
+#, 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:179
+#, 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:183
+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:188
+#, 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:193
+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:198
+msgid "Can't find external @j\n"
+msgstr "Impossibile trovare il @j esterno\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:203
+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:208
+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:213
+#, 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:221
+#, 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 %s is present.\n
+#: e2fsck/problem.c:226
+#, fuzzy, c-format
+msgid "@S has_@j flag is clear, but a @j %s is present.\n"
+msgstr "flag del recupero ext3 pulito, ma il @j contiene ancora dati.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:231
+#, 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:236
+#, 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:241
+msgid "Clear @j"
+msgstr "Azzerare @j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.  
+#: e2fsck/problem.c:246 e2fsck/problem.c:695
+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:251
+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:256
+#, 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:261
+#, 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:266
+#, 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:271
+#, 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:276
+#, 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:281
+#, 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:286
+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:291
+#, 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:296
+#, 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:301
+#, 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:307
+msgid "Run @j anyway"
+msgstr "Eseguire @j comunque"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:312
+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:317
+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:322
+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:328
+msgid "Resize_@i not enabled, but the resize @i is non-zero.  "
+msgstr ""
+
+#. @-expanded: Resize inode not valid.  
+#: e2fsck/problem.c:333
+#, 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:338
+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:343
+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:347
+#, c-format
+msgid "@S hint for external superblock @s %X.  "
+msgstr ""
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:352
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.  
+#: e2fsck/problem.c:357
+msgid "@g descriptor %g checksum is %04x, should be %04y.  "
+msgstr ""
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:362
+#, 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:367
+msgid "@g descriptor %g has invalid unused inodes count %b.  "
+msgstr ""
+
+#. @-expanded: Last group block bitmap uninitialized.  
+#: e2fsck/problem.c:372
+msgid "Last @g @b @B uninitialized.  "
+msgstr ""
+
+#: e2fsck/problem.c:377
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr ""
+
+#: e2fsck/problem.c:381
+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)  
+#: e2fsck/problem.c:386
+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)  "
+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).  
+#: e2fsck/problem.c:392
+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).  "
+msgstr ""
+
+#. @-expanded: One or more block group descriptor checksums are invalid.  
+#: e2fsck/problem.c:398
+msgid "One or more @b @g descriptor checksums are invalid.  "
+msgstr ""
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:403
+#, 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:408
+#, fuzzy
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Impostazione del numero di blocchi riservati a %lu\n"
+
+#. @-expanded: Making quota inode %i (%Q) hidden.\n
+#: e2fsck/problem.c:413
+#, fuzzy
+msgid "Making @q @i %i (%Q) hidden.\n"
+msgstr ""
+"Spostamento di @j da /%s all'inode nascosto.\n"
+"\n"
+
+#. @-expanded: superblock has invalid MMP block.  
+#: e2fsck/problem.c:418
+#, fuzzy
+msgid "@S has invalid MMP block.  "
+msgstr "dimensione del blocco difettoso - %s"
+
+#. @-expanded: superblock has invalid MMP magic.  
+#: e2fsck/problem.c:423
+msgid "@S has invalid MMP magic.  "
+msgstr ""
+
+#: e2fsck/problem.c:428
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:433
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr ""
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:440
+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:444
+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:449
+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:454
+#, 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:459
+#, 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:464
+#, 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:469
+#, 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:474
+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:479
+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:484
+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:489
+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:494
+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:499
+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:504
+#, 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:509
+#, 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:514
+msgid "%B (%b) overlaps @f metadata in @i %i.  "
+msgstr ""
+
+#. @-expanded: inode %i has illegal block(s).  
+#: e2fsck/problem.c:519
+#, 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:524
+#, 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:529
+#, 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:534
+#, 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:539
+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:544
+#, 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:549
+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:556
+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:561
+#, 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:567
+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:572
+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:578
+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:583
+#, 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:589
+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:595
+#, 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:600
+#, 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:605
+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:610
+#, 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:615
+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:620
+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:625 e2fsck/problem.c:1460
+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:630
+#, 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:635
+#, 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:640
+#, 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:645
+#, 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:650
+#, 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:655
+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:660
+#, 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:666
+#, 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:674
+#, 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:679
+#, 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: inode %i has compression flag set on filesystem without compression support.  
+#: e2fsck/problem.c:685
+#, c-format
+msgid "@i %i has @cion flag set on @f without @cion support.  "
+msgstr ""
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.  
+#: e2fsck/problem.c:690
+#, 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:700
+#, 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:705
+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:710
+#, 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:716
+#, 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:721
+#, 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:726
+#, 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:731
+#, 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:736
+#, 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:741
+#, 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:746
+#, 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:751
+#, 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 block %b.  
+#: e2fsck/problem.c:756
+#, fuzzy
+msgid "@A @a @b %b.  "
+msgstr "L'@i %i ha un @a di @b %b non valido. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).  
+#: e2fsck/problem.c:761
+#, 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:766
+#, 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:771
+#, 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:776
+#, 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:780
+#, fuzzy
+msgid "%B (%b) causes @d to be too big.  "
+msgstr "Il @b #%B (%b) fa diventare il @d troppo grande. "
+
+#: e2fsck/problem.c:785
+#, fuzzy
+msgid "%B (%b) causes file to be too big.  "
+msgstr "Il @b #%B (%b) fa diventare il file troppo grande. "
+
+#: e2fsck/problem.c:790
+#, 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:795
+#, 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:800
+#, 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:805
+#, 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:810
+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:815
+#, 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:820
+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:825
+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:831
+#, 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:836
+#, 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:841
+#, 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:846
+#, 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:851
+#, 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:856
+#, 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:861
+#, 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:866
+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:871
+#, 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:876
+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:882
+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:887
+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:892
+#, 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:897
+#, 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:902
+#, c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr ""
+
+#: e2fsck/problem.c:907
+#, 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:912
+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:916
+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:921
+#, 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 regular file.  
+#: e2fsck/problem.c:926
+#, fuzzy
+msgid "@q @i is not regular file.  "
+msgstr "Il @j non è un file regolare. "
+
+#. @-expanded: quota inode is not in use, but contains data.  
+#: e2fsck/problem.c:931
+#, 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:936
+#, 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:941
+#, 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:946
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\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:953
+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:959
+#, fuzzy, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "@b @I #%B (%b) nell'@i %i. "
+
+#: e2fsck/problem.c:974
+#, 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:979
+#, 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:984
+#, 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:989 e2fsck/problem.c:1304
+#, 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:994
+#, 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:1000
+#, 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:1005
+#, 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:1011
+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:1016
+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:1021
+#, 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:1026
+#, fuzzy
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"@b(i) duplicati già riassegnati o clonati.\n"
+"\n"
+
+#: e2fsck/problem.c:1039
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Impossibile clonare il file: %m\n"
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1045
+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:1050
+#, 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:1055
+#, 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:1060
+#, 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:1065
+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:1070
+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:1075
+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:1080
+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:1085
+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:1090
+#, 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:1095
+#, 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:1100
+#, 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:1105
+#, 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:1110
+#, 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:1115
+#, fuzzy
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl @F %If @s zero.\n"
+
+#. @-expanded: i_dir_acl for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1120
+#, fuzzy
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr "i_dir_acl @F %Id @s zero.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1125
+#, 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:1130
+#, 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:1135
+#, 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:1140
+#, 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:1145
+#, 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:1150
+#, 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:1155
+#, 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:1160
+#, 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:1165
+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:1170
+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:1175
+#, 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:1180
+msgid "@E is duplicate '..' @e.\n"
+msgstr "L'@E è un duplicato dell'@e '..'.\n"
+
+#: e2fsck/problem.c:1185 e2fsck/problem.c:1485
+#, 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:1190
+#, 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:1195
+#, 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:1200
+#, 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:1205
+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:1210
+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:1215
+#, 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:1220
+#, 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:1225
+#, 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:1230
+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:1235
+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:1240
+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:1245
+#, 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:1250
+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:1255
+#, 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:1260
+#, 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:1265
+msgid "@a @b @F @n (%If).\n"
+msgstr ""
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1270
+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:1275
+#, 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:1280
+#, 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:1285
+#, 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:1290
+#, 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:1295
+#, 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:1299
+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:1309
+#, 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:1314
+#, 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:1319
+#, 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:1324
+#, 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:1329
+#, 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:1334
+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:1339
+#, 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:1344
+#, 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:1349
+#, 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:1354
+#, fuzzy
+msgid "Unexpected @b in @h %d (%q).\n"
+msgstr "@h %d non valido (%q). "
+
+#. @-expanded: entry '%Dn' in %p (%i) references inode %Di in group %g where _INODE_UNINIT is set.\n
+#: e2fsck/problem.c:1358
+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:1363
+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:1368
+#, fuzzy
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl @F %If @s zero.\n"
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1375
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Passo 3: Controllo della connettività di @d\n"
+
+#. @-expanded: root inode not allocated.  
+#: e2fsck/problem.c:1380
+msgid "@r not allocated.  "
+msgstr "@r non allocato."
+
+#. @-expanded: No room in lost+found directory.  
+#: e2fsck/problem.c:1385
+msgid "No room in @l @d.  "
+msgstr "Non c'è spazio nella @d @l"
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1390
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr ""
+
+#. @-expanded: /lost+found not found.  
+#: e2fsck/problem.c:1395
+msgid "/@l not found.  "
+msgstr "/@l non trovata. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1400
+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:1405
+#, 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:1410
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Impossibile espandere /@l: %m\n"
+
+#: e2fsck/problem.c:1415
+#, 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:1420
+#, 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:1425
+#, 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:1430
+#, 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:1435
+#, 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:1440
+#, 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:1445
+#, 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:1450
+#, 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:1455
+#, 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:1465
+#, 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:1470
+#, 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:1475
+#, 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:1480
+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:1490
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l non è una @d (ino=%i)\n"
+
+#: e2fsck/problem.c:1497
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Passo 3A: Ottimizzazione delle directory\n"
+
+#: e2fsck/problem.c:1502
+#, 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:1507
+#, fuzzy
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Impossibile ottimizzare la directory %q (%d): %m"
+
+#: e2fsck/problem.c:1512
+msgid "Optimizing directories: "
+msgstr "Ottimizzazione delle directory: "
+
+#: e2fsck/problem.c:1529
+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:1534
+#, fuzzy, c-format
+msgid "@u @z @i %i.  "
+msgstr "@i @o @I %i nel @S.\n"
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1539
+#, c-format
+msgid "@u @i %i\n"
+msgstr ""
+
+#. @-expanded: inode %i ref count is %Il, should be %N.  
+#: e2fsck/problem.c:1544
+#, 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:1548
+#, fuzzy
+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 FILESYSTEM MONTATO (LIVE).\n"
+"@i_link_info[%i] è %N, @i.i_links_count è %Il. Dovrebbero essere identici!\n"
+
+#. @-expanded: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1558
+#, 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:1563
+#, 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:1568
+#, 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:1573
+msgid "@b @B differences: "
+msgstr "Differenze nella @B dei @b: "
+
+#. @-expanded: inode bitmap differences: 
+#: e2fsck/problem.c:1593
+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:1613
+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:1618
+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:1623
+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:1628
+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:1633
+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:1638
+msgid ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
+"endpoints (%i, %j)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1644
+#, 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:1649
+#, 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:1654
+#, 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:1679
+#, 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:1684
+#, c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr ""
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:1691
+#, fuzzy
+msgid "Recreate @j"
+msgstr "Ricrea"
+
+#: e2fsck/problem.c:1696
+msgid "Update quota info for quota type %N"
+msgstr ""
+
+#: e2fsck/problem.c:1815
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Codice errore non gestito (0x%x)!\n"
+
+#: e2fsck/problem.c:1940 e2fsck/problem.c:1944
+msgid "IGNORED"
+msgstr "IGNORATO"
+
+#: 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:188
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr "chiamando ext2fs_block_iterate per l'inode %d"
+
+#: e2fsck/super.c:211
+#, fuzzy, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %d"
+msgstr "chiamando ext2fs_adjust_ea_refocunt per l'inode %d"
+
+#: e2fsck/super.c:272
+msgid "Truncating"
+msgstr ""
+
+#: e2fsck/super.c:273
+msgid "Clearing"
+msgstr ""
+
+#: e2fsck/unix.c:74
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-panyrcdfvtDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] 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:80
+#, c-format
+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 effettuare cambiamenti nel filesystem\n"
+" -y                   Risposta affermativa a tutte le domande\n"
+" -c                   Cerca blocchi non validi, ed aggiungili alla lista dei "
+"blocchi non validi\n"
+" -f                   Forza il controllo anche se il filesystem è segnato "
+"come pulito\n"
+
+#: e2fsck/unix.c:86
+#, fuzzy, c-format
+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"
+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:130
+#, 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:137
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%8u inode used (%2.2f%%)\n"
+msgid_plural ""
+"\n"
+"%8u inodes used (%2.2f%%)\n"
+msgstr[0] "%d inode analizzati.\n"
+msgstr[1] "%d inode analizzati.\n"
+
+#: e2fsck/unix.c:141
+#, c-format
+msgid "%8u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%8u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:146
+#, c-format
+msgid "%8u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%8u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:151
+#, 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:159
+msgid "         Extent depth histogram: "
+msgstr ""
+
+#: e2fsck/unix.c:168
+#, c-format
+msgid "%8llu block used (%2.2f%%)\n"
+msgid_plural "%8llu blocks used (%2.2f%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:171
+#, fuzzy, c-format
+msgid "%8u bad block\n"
+msgid_plural "%8u bad blocks\n"
+msgstr[0] "%u inode, %u blocchi\n"
+msgstr[1] "%u inode, %u blocchi\n"
+
+#: e2fsck/unix.c:173
+#, fuzzy, c-format
+msgid "%8u large file\n"
+msgid_plural "%8u large files\n"
+msgstr[0] "mappa degli inode dei file regolari"
+msgstr[1] "mappa degli inode dei file regolari"
+
+#: e2fsck/unix.c:175
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%8u regular file\n"
+msgid_plural ""
+"\n"
+"%8u regular files\n"
+msgstr[0] "mappa degli inode dei file regolari"
+msgstr[1] "mappa degli inode dei file regolari"
+
+#: e2fsck/unix.c:177
+#, fuzzy, c-format
+msgid "%8u directory\n"
+msgid_plural "%8u directories\n"
+msgstr[0] "ddirectory"
+msgstr[1] "ddirectory"
+
+#: e2fsck/unix.c:179
+#, c-format
+msgid "%8u character device file\n"
+msgid_plural "%8u character device files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:182
+#, fuzzy, c-format
+msgid "%8u block device file\n"
+msgid_plural "%8u block device files\n"
+msgstr[0] "vdevice"
+msgstr[1] "vdevice"
+
+#: e2fsck/unix.c:184
+#, c-format
+msgid "%8u fifo\n"
+msgid_plural "%8u fifos\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:186
+#, c-format
+msgid "%8u link\n"
+msgid_plural "%8u links\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:189
+#, c-format
+msgid "%8u symbolic link"
+msgid_plural "%8u symbolic links"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:191
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:195
+#, c-format
+msgid "%8u socket\n"
+msgid_plural "%8u sockets\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:198
+#, c-format
+msgid "%8u file\n"
+msgid_plural "%8u files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:212 misc/badblocks.c:983 misc/tune2fs.c:1979 misc/util.c:147
+#: resize/main.c:247
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "determinando se %s è montato."
+
+#: e2fsck/unix.c:230
+#, fuzzy, c-format
+msgid "Warning!  %s is %s.\n"
+msgstr "Attenzione! %s è montato.\n"
+
+#: e2fsck/unix.c:237
+#, c-format
+msgid "%s is %s.\n"
+msgstr ""
+
+#: e2fsck/unix.c:240
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Impossibile continuare, operazione annullata.\n"
+"\n"
+
+#: e2fsck/unix.c:242
+#, 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\aATTENZIONE!!! Eseguire e2fsck su un filesystem montato potrebbe\n"
+"causare SERI danni al filesystem.\a\a\a\n"
+"\n"
+
+#: e2fsck/unix.c:247
+msgid "Do you really want to continue"
+msgstr "Continuare"
+
+#: e2fsck/unix.c:249
+#, c-format
+msgid "check aborted.\n"
+msgstr "controllo annullato.\n"
+
+#: e2fsck/unix.c:339
+msgid " contains a file system with errors"
+msgstr " contiene un filesystem con errori"
+
+#: e2fsck/unix.c:341
+msgid " was not cleanly unmounted"
+msgstr " non è stato smontato in maniera corretta"
+
+#: e2fsck/unix.c:343
+msgid " primary superblock features different from backup"
+msgstr ""
+
+#: e2fsck/unix.c:347
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " è stato montato %u volte senza essere controllato"
+
+#: e2fsck/unix.c:354
+#, fuzzy
+msgid " has filesystem last checked time in the future"
+msgstr ""
+"Impostazione di data ed ora dell'ultimo controllo del filesystem a %s\n"
+
+#: e2fsck/unix.c:360
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " non è stato controllato negli ultimi %u giorni"
+
+#: e2fsck/unix.c:369
+msgid ", check forced.\n"
+msgstr ", controllo forzato.\n"
+
+#: e2fsck/unix.c:402
+#, 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:421
+#, fuzzy
+msgid " (check deferred; on battery)"
+msgstr " (controllo dopo il prossimo mount)"
+
+#: e2fsck/unix.c:424
+msgid " (check after next mount)"
+msgstr " (controllo dopo il prossimo mount)"
+
+#: e2fsck/unix.c:426
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (controllo tra %ld mount)"
+
+#: e2fsck/unix.c:576
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "ERRORE: Impossibile aprire /dev/null (%s)\n"
+
+#: e2fsck/unix.c:645
+#, c-format
+msgid "Invalid EA version.\n"
+msgstr "Versione EA non valida.\n"
+
+#: e2fsck/unix.c:672
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:697
+#, c-format
+msgid ""
+"Syntax error in e2fsck config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: e2fsck/unix.c:766
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Errore convalidando il descrittore di file %d: %s\n"
+
+#: e2fsck/unix.c:770
+#, fuzzy
+msgid "Invalid completion information file descriptor"
+msgstr "Informazioni di completamento descrittore di file non valide"
+
+#: e2fsck/unix.c:785
+#, 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:806
+#, 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:837 e2fsck/unix.c:909 misc/tune2fs.c:811 misc/tune2fs.c:1100
+#: misc/tune2fs.c:1118
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Impossibile risolvere '%s'"
+
+#: e2fsck/unix.c:888
+msgid "The -n and -D options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:893
+msgid "The -n and -c options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:898
+#, 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:943
+#, c-format
+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:991
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1000
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1089
+#, c-format
+msgid ""
+"MMP interval is %u seconds and total wait time is %u seconds. Please "
+"wait...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1106 e2fsck/unix.c:1111
+#, fuzzy
+msgid "while checking MMP block"
+msgstr "impostando il superblocco"
+
+#: e2fsck/unix.c:1113 misc/tune2fs.c:1912
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+
+#: e2fsck/unix.c:1163
+#, c-format
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Errore: versione obsoleta della libreria ext2fs!\n"
+
+#: e2fsck/unix.c:1171
+msgid "while trying to initialize program"
+msgstr "tentando di inizializzare il programma"
+
+#: e2fsck/unix.c:1194
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tUtilizzando %s, %s\n"
+
+#: e2fsck/unix.c:1206
+msgid "need terminal for interactive repairs"
+msgstr "serve il terminale per il riparo interattivo"
+
+#: e2fsck/unix.c:1256
+#, fuzzy, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s cercando tra i blocchi di backup...\n"
+
+#: e2fsck/unix.c:1258
+msgid "Superblock invalid,"
+msgstr ""
+
+#: e2fsck/unix.c:1259
+msgid "Group descriptors look bad..."
+msgstr "I descrittori di gruppo sembrano non validi..."
+
+#: e2fsck/unix.c:1269
+#, fuzzy, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s cercando tra i blocchi di backup...\n"
+
+#: e2fsck/unix.c:1273
+#, 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:1301
+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 filesystem sembra troppo alta per questa versione di "
+"e2fsck.\n"
+"(O il superblocco del filesystem è corrotto)\n"
+"\n"
+
+#: e2fsck/unix.c:1307
+msgid "Could this be a zero-length partition?\n"
+msgstr "E' possibile che questa sia una partizione di dimensione zero?\n"
+
+#: e2fsck/unix.c:1310
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr "Serve accesso di tipo %s al filesystem, o è necessario essere root\n"
+
+#: e2fsck/unix.c:1315
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Device non esistente o di swap?\n"
+
+#: e2fsck/unix.c:1318
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1321
+#, fuzzy
+msgid "Possibly non-existent device?\n"
+msgstr "Device non esistente o di swap?\n"
+
+#: e2fsck/unix.c:1324
+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:1389
+msgid "Get a newer version of e2fsck!"
+msgstr "Utilizzare una versione più nuova di e2fsck."
+
+#: e2fsck/unix.c:1437
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr "controllando il journal ext3 per %s"
+
+#: e2fsck/unix.c:1448
+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:1461
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "impossibile impostarei i flag del superblocco a %s\n"
+
+#: e2fsck/unix.c:1467
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr "ripristinando il journal ext3 di %s"
+
+#: e2fsck/unix.c:1492
+#, 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:1507
+#, fuzzy, c-format
+msgid "%s: warning: compression support is experimental.\n"
+msgstr "Attenzione: il supporto per la compressione è sperimentale.\n"
+
+#: e2fsck/unix.c:1513
+#, fuzzy, c-format
+msgid ""
+"%s: e2fsck not compiled with HTREE support,\n"
+"\tbut filesystem %s has HTREE directories.\n"
+msgstr ""
+"E2fsck non è stato compilato con il supporto HTREE,\n"
+"\tma il filesystem %s contiene directory HTREE.\n"
+
+#: e2fsck/unix.c:1565
+#, fuzzy, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "leggendo l'inode numero 1"
+
+#: e2fsck/unix.c:1568
+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:1609
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Creazione del journal (%d blocchi): "
+
+#: e2fsck/unix.c:1619
+#, fuzzy
+msgid " Done.\n"
+msgstr "fatto\n"
+
+#: e2fsck/unix.c:1620
+msgid ""
+"\n"
+"*** journal has been re-created - filesystem is now ext3 again ***\n"
+msgstr ""
+
+#: e2fsck/unix.c:1643
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Riavvio di e2fsck dall'inizio...\n"
+
+#: e2fsck/unix.c:1647
+msgid "while resetting context"
+msgstr "resettando il contesto"
+
+#: e2fsck/unix.c:1654
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck cancellato.\n"
+
+#: e2fsck/unix.c:1659
+msgid "aborted"
+msgstr "annullato"
+
+#: e2fsck/unix.c:1671 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** IL FILESYSTEM E' STATO MODIFICATO *****\n"
+
+#: e2fsck/unix.c:1675
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr "%s: ***** RIAVVIARE LINUX *****\n"
+
+#: e2fsck/unix.c:1683 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** ATTENZIONE: Il filesystem contiene ancora errori "
+"************\n"
+"\n"
+
+#: e2fsck/unix.c:1723
+#, fuzzy
+msgid "while setting block group checksum info"
+msgstr "impostando l'inode del blocco difettoso"
+
+#: e2fsck/util.c:189 misc/util.c:70
+msgid "yY"
+msgstr "sS"
+
+#: e2fsck/util.c:190
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:204
+msgid "<y>"
+msgstr "<s>"
+
+#: e2fsck/util.c:206
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:208
+msgid " (y/n)"
+msgstr " (s/n)"
+
+#: e2fsck/util.c:222
+msgid "cancelled!\n"
+msgstr "cancellato!\n"
+
+#: e2fsck/util.c:237
+msgid "yes\n"
+msgstr "sì\n"
+
+#: e2fsck/util.c:239
+msgid "no\n"
+msgstr "no\n"
+
+#: e2fsck/util.c:249
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? no\n"
+"\n"
+
+#: e2fsck/util.c:253
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? sì\n"
+"\n"
+
+#: e2fsck/util.c:257
+msgid "yes"
+msgstr "sì"
+
+#: e2fsck/util.c:257
+msgid "no"
+msgstr "no"
+
+#: e2fsck/util.c:272
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr ""
+
+#: e2fsck/util.c:277
+msgid "reading inode and block bitmaps"
+msgstr "lettura delle mappe di bit inode e blocco"
+
+#: e2fsck/util.c:285
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "riprovando a leggere le mappe di bit per %s"
+
+#: e2fsck/util.c:297
+#, fuzzy
+msgid "writing block and inode bitmaps"
+msgstr "scrivendo le mappe di bit di blocco"
+
+#: e2fsck/util.c:302
+#, 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:314
+#, 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:395
+#, fuzzy, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Memoria usata: %dk/%dk (%dk/%dk), "
+
+#: e2fsck/util.c:399
+#, fuzzy, c-format
+msgid "Memory used: %lu, "
+msgstr "Memoria usata: %d, "
+
+#: e2fsck/util.c:406
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "durata: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:411
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "tempo rimanente: %6.3f\n"
+
+#: e2fsck/util.c:446 e2fsck/util.c:460
+#, fuzzy, c-format
+msgid "while reading inode %lu in %s"
+msgstr "leggendo l'inode %ld in %s"
+
+#: e2fsck/util.c:474 e2fsck/util.c:487
+#, fuzzy, c-format
+msgid "while writing inode %lu in %s"
+msgstr "scrivendo l'inode %ld in %s"
+
+#: e2fsck/util.c:636
+msgid "while allocating zeroizing buffer"
+msgstr "allocando i buffer zeroizing"
+
+#: e2fsck/util.c:788
+msgid ""
+"UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is "
+"running.\n"
+msgstr ""
+
+#: misc/badblocks.c:69
+#, fuzzy
+msgid "done                                                 \n"
+msgstr "fatto                           \n"
+
+#: misc/badblocks.c:93
+#, 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"
+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:104
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+
+#: misc/badblocks.c:219
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr ""
+
+#: misc/badblocks.c:322
+msgid "Testing with random pattern: "
+msgstr "Controllo con un modello casuale: "
+
+#: misc/badblocks.c:340
+msgid "Testing with pattern 0x"
+msgstr "Controllo con modello 0x"
+
+#: misc/badblocks.c:372 misc/badblocks.c:445
+msgid "during seek"
+msgstr "durante la ricerca"
+
+#: misc/badblocks.c:383
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Valore strano (%ld) nella do_read\n"
+
+#: misc/badblocks.c:469
+msgid "during ext2fs_sync_device"
+msgstr "durante la ext2fs_sync_device"
+
+#: misc/badblocks.c:489 misc/badblocks.c:749
+msgid "while beginning bad block list iteration"
+msgstr "iniziando a scorrere la lista dei blocchi difettosi"
+
+#: misc/badblocks.c:503 misc/badblocks.c:602 misc/badblocks.c:759
+msgid "while allocating buffers"
+msgstr "allocando i buffer"
+
+#: misc/badblocks.c:507
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Controllo dei blocchi da %lu a %lu\n"
+
+#: misc/badblocks.c:512
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Ricerca dei blocchi non validi in modalità sola lettura\n"
+
+#: misc/badblocks.c:521
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Ricerca dei blocchi non validi (test a sola lettura): "
+
+#: misc/badblocks.c:528 misc/badblocks.c:634 misc/badblocks.c:676
+#: misc/badblocks.c:822
+msgid "Too many bad blocks, aborting test\n"
+msgstr ""
+
+#: misc/badblocks.c:609
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Ricerca dei blocchi non validi in modalità lettura-scrittura\n"
+
+#: misc/badblocks.c:611 misc/badblocks.c:772
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Dal blocco %lu al blocco %lu\n"
+
+#: misc/badblocks.c:666
+msgid "Reading and comparing: "
+msgstr "Lettura e confronto: "
+
+#: misc/badblocks.c:771
+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:777
+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:784
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Rilevato interrupt, pulizia in corso\n"
+
+#: misc/badblocks.c:867
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "durante la scrittura dei dati del test, blocco %lu"
+
+#: misc/badblocks.c:988 misc/util.c:152
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s è montato: "
+
+#: misc/badblocks.c:990
+#, 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:995
+msgid "it's not safe to run badblocks!\n"
+msgstr "non è sicuro eseguire badblocks!\n"
+
+#: misc/badblocks.c:1000 misc/util.c:163
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr ""
+
+#: misc/badblocks.c:1003
+#, fuzzy
+msgid "badblocks forced anyway.\n"
+msgstr "forzato comunque badblocks. Speriamo che /etc/mtab si errato.\n"
+
+#: misc/badblocks.c:1023
+#, fuzzy, c-format
+msgid "invalid %s - %s"
+msgstr "dimensione del blocco difettoso - %s"
+
+#: misc/badblocks.c:1133
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "impossibile allocare memoria per il modello di prova - %s"
+
+#: misc/badblocks.c:1163
+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:1169
+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:1183
+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:1189
+msgid "while trying to determine device size"
+msgstr "tentando di determinare la dimensione del device"
+
+#: misc/badblocks.c:1194
+#, fuzzy
+msgid "last block"
+msgstr "Rilocazione dei blocchi"
+
+#: misc/badblocks.c:1200
+#, fuzzy
+msgid "first block"
+msgstr "Primo blocco dati=%u\n"
+
+# fuzzy
+#: misc/badblocks.c:1203
+#, fuzzy, c-format
+msgid "invalid starting block (%lu): must be less than %lu"
+msgstr "blocco iniziale non valido - %s"
+
+#: misc/badblocks.c:1259
+#, fuzzy
+msgid "while creating in-memory bad blocks list"
+msgstr "creando la lista dei blocchi non validi in memoria"
+
+#: misc/badblocks.c:1274
+#, fuzzy
+msgid "while adding to in-memory bad block list"
+msgstr "aggiungendo un elemento alla lista dei blocchi difettosi in memoria"
+
+#: misc/badblocks.c:1298
+#, 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:86
+#, fuzzy, c-format
+msgid "Usage: %s [-RVf] [-+=AacDdeijsSu] [-v version] files...\n"
+msgstr "uso: %s [-RV] [-+=AacDdijsSu] [-v versione] file...\n"
+
+#: misc/chattr.c:154
+#, c-format
+msgid "bad version - %s\n"
+msgstr "versione non valida - %s\n"
+
+#: misc/chattr.c:201 misc/lsattr.c:116
+#, c-format
+msgid "while trying to stat %s"
+msgstr "tentando di fare lo stat di %s"
+
+#: misc/chattr.c:208
+#, c-format
+msgid "while reading flags on %s"
+msgstr "leggendo i flag di %s"
+
+#: misc/chattr.c:217 misc/chattr.c:236
+#, c-format
+msgid "Clearing extent flag not supported on %s"
+msgstr ""
+
+#: misc/chattr.c:222 misc/chattr.c:241
+#, c-format
+msgid "Flags of %s set as "
+msgstr "flag di %s impostati come"
+
+#: misc/chattr.c:250
+#, c-format
+msgid "while setting flags on %s"
+msgstr "impostando i flag di %s"
+
+#: misc/chattr.c:258
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Versione di %s impostata a %lu\n"
+
+#: misc/chattr.c:262
+#, c-format
+msgid "while setting version on %s"
+msgstr "impostando la versione a %s"
+
+#: misc/chattr.c:282
+#, c-format
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Impossibile allocare la variabile di percorso nella chattr_dir_proc"
+
+#: misc/chattr.c:322
+msgid "= is incompatible with - and +\n"
+msgstr "= è incompatibile con + e -\n"
+
+#: misc/chattr.c:330
+msgid "Must use '-v', =, - or +\n"
+msgstr "Si deve usare '-v', =, - o +\n"
+
+#: misc/dumpe2fs.c:55
+#, fuzzy, c-format
+msgid "Usage: %s [-bfhixV] [-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:196
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Gruppo %lu: (Blocchi "
+
+#: misc/dumpe2fs.c:204
+#, c-format
+msgid "  Checksum 0x%04x"
+msgstr ""
+
+#: misc/dumpe2fs.c:206
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr ""
+
+#: misc/dumpe2fs.c:207
+#, fuzzy, c-format
+msgid ", unused inodes %u\n"
+msgstr "dimensione inode non valida - %s"
+
+#: misc/dumpe2fs.c:212
+#, c-format
+msgid "  %s superblock at "
+msgstr " superblocco %s a "
+
+#: misc/dumpe2fs.c:213
+msgid "Primary"
+msgstr "Primario"
+
+#: misc/dumpe2fs.c:213
+msgid "Backup"
+msgstr "Backup"
+
+#: misc/dumpe2fs.c:217
+#, c-format
+msgid ", Group descriptors at "
+msgstr ", Descrittori di gruppo a "
+
+#: misc/dumpe2fs.c:221
+#, fuzzy, c-format
+msgid ""
+"\n"
+"  Reserved GDT blocks at "
+msgstr "blocchi riservati"
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " Group descriptor at "
+msgstr " Descrittori di gruppo a"
+
+#: misc/dumpe2fs.c:234
+msgid "  Block bitmap at "
+msgstr "  Mappa dei bit di blocco a  "
+
+#: misc/dumpe2fs.c:238
+msgid ", Inode bitmap at "
+msgstr ", mappa dei bit inode a "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+"  Inode table at "
+msgstr ""
+"\n"
+"  Tavola degli inode a "
+
+#: misc/dumpe2fs.c:248
+#, 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:255
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:258
+msgid "  Free blocks: "
+msgstr "  Blocchi liberi: "
+
+#: misc/dumpe2fs.c:269
+msgid "  Free inodes: "
+msgstr "  Inode liberi: "
+
+#: misc/dumpe2fs.c:300
+msgid "while printing bad block list"
+msgstr "stampando la lista dei blocchi difettosi"
+
+#: misc/dumpe2fs.c:306
+#, fuzzy, c-format
+msgid "Bad blocks: %u"
+msgstr "Blocchi non validi: %d"
+
+#: misc/dumpe2fs.c:333 misc/tune2fs.c:302
+msgid "while reading journal inode"
+msgstr "leggendo l'inode del journal"
+
+#: misc/dumpe2fs.c:339
+#, fuzzy
+msgid "while opening journal inode"
+msgstr "leggendo l'inode del journal"
+
+#: misc/dumpe2fs.c:345
+#, fuzzy
+msgid "while reading journal super block"
+msgstr "leggendo il superblocco del journal"
+
+#: misc/dumpe2fs.c:355
+#, c-format
+msgid "Journal features:        "
+msgstr ""
+
+#: misc/dumpe2fs.c:368
+msgid "Journal size:             "
+msgstr ""
+
+#: misc/dumpe2fs.c:379
+#, fuzzy, c-format
+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"
+
+#: misc/dumpe2fs.c:386
+#, c-format
+msgid "Journal errno:            %d\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:401 misc/tune2fs.c:218
+msgid "while reading journal superblock"
+msgstr "leggendo il superblocco del journal"
+
+#: misc/dumpe2fs.c:409
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Impossibile trovare i magic numbers del superblocco del journal"
+
+#: misc/dumpe2fs.c:413
+#, fuzzy, c-format
+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"
+
+#: misc/dumpe2fs.c:426
+#, c-format
+msgid "Journal users:            %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:442 misc/mke2fs.c:662 misc/tune2fs.c:1137
+#, fuzzy, c-format
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Impossibile allocare memoria per fare il parsing delle opzioni raid!\n"
+
+#: misc/dumpe2fs.c:468
+#, fuzzy, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/dumpe2fs.c:483
+#, fuzzy, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/dumpe2fs.c:494
+#, 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:554 misc/mke2fs.c:1525
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tUsando %s\n"
+
+#: misc/dumpe2fs.c:590 misc/e2image.c:1309 misc/tune2fs.c:1923
+#: resize/main.c:305
+#, c-format
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Impossibile trovare un valido superblocco per il filesystem.\n"
+
+#: misc/dumpe2fs.c:618
+#, c-format
+msgid ""
+"\n"
+"%s: %s: error reading bitmaps: %s\n"
+msgstr ""
+"\n"
+"%s: %s: errore leggendo le mappe di bit: %s\n"
+
+#: misc/e2image.c:87
+#, fuzzy, c-format
+msgid "Usage: %s [-rsIQ] device image_file\n"
+msgstr "Uso: %s [-r] dispositivo file_immagine\n"
+
+#: misc/e2image.c:135
+#, c-format
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr ""
+
+#: misc/e2image.c:141
+msgid "Couldn't allocate header buffer\n"
+msgstr "Impossibile allocare il buffer d'intestazione\n"
+
+#: misc/e2image.c:171
+msgid "while writing superblock"
+msgstr "scrivendo il superblocco"
+
+#: misc/e2image.c:179
+msgid "while writing inode table"
+msgstr "scrivendo la tavola degli inode"
+
+#: misc/e2image.c:186
+msgid "while writing block bitmap"
+msgstr "scrivendo la mappa dei bit del blocco"
+
+#: misc/e2image.c:193
+msgid "while writing inode bitmap"
+msgstr "scrivendo la mappa dei bit dell'inode"
+
+#: misc/e2image.c:1341
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr ""
+
+#: 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 filesystem ext2\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:2074
+#, 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:803
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Uso: e2label device [nuova_etichetta]\n"
+
+#: misc/e2undo.c:36
+#, c-format
+msgid "Usage: %s <transaction file> <filesystem>\n"
+msgstr ""
+
+#: misc/e2undo.c:52
+#, fuzzy
+msgid "Failed to read the file system data \n"
+msgstr "Impossibile creare un iteratore dirs_to_hash: %m"
+
+#: misc/e2undo.c:62 misc/e2undo.c:83 misc/e2undo.c:108 misc/e2undo.c:206
+#, c-format
+msgid "Failed tdb_fetch %s\n"
+msgstr ""
+
+#: misc/e2undo.c:70
+#, c-format
+msgid "The file system Mount time didn't match %u\n"
+msgstr ""
+
+#: misc/e2undo.c:89
+msgid "The file system UUID didn't match \n"
+msgstr ""
+
+#: misc/e2undo.c:163
+#, fuzzy, c-format
+msgid "Failed tdb_open %s\n"
+msgstr "avviando la scansione degli inode"
+
+#: misc/e2undo.c:169
+#, fuzzy, c-format
+msgid "Error while determining whether %s is mounted.\n"
+msgstr "determinando se %s è montato."
+
+#: misc/e2undo.c:175
+msgid "e2undo should only be run on unmounted file system\n"
+msgstr ""
+
+#: misc/e2undo.c:184
+#, fuzzy, c-format
+msgid "Failed to open %s\n"
+msgstr "durante l'apertura di %s"
+
+#: misc/e2undo.c:210
+#, c-format
+msgid "Replayed transaction of size %zd at location %llu\n"
+msgstr ""
+
+#: misc/e2undo.c:216
+#, c-format
+msgid "Failed write %s\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 ""
+"\a\a\aATTENZIONE: 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:478
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: non trovato\n"
+
+#: misc/fsck.c:594
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: aspetta: Non ci sono processi figli?!?\n"
+
+#: misc/fsck.c:616
+#, 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:622
+#, 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:661
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Terminato con %s (stato di uscita %d)\n"
+
+#: misc/fsck.c:721
+#, 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:742
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+"Tutti o nessun tipo di filesystem passati con l'opzione -t devono essere "
+"preceduti\n"
+"da 'no' o '!'.\n"
+
+#: misc/fsck.c:761
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Impossibile allocare memoria per i tipi di filesystem\n"
+
+#: misc/fsck.c:884
+#, c-format
+msgid ""
+"%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass "
+"number\n"
+msgstr ""
+
+#: misc/fsck.c:911
+#, 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:967
+msgid "Checking all file systems.\n"
+msgstr "Controllo di tutti i filesystem.\n"
+
+#: misc/fsck.c:1058
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--attesa-- (passo %d)\n"
+
+#: misc/fsck.c:1078
+#, 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:1120
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: troppi device\n"
+
+#: misc/fsck.c:1153 misc/fsck.c:1239
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: troppi parametri\n"
+
+#: misc/lsattr.c:74
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr "Uso: %s [RVadlv] [file ...]\n"
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Durante la lettura dei flag di %s"
+
+#: misc/lsattr.c:91
+#, c-format
+msgid "While reading version on %s"
+msgstr "Durante la lettura della versione di %s"
+
+#: misc/mke2fs.c:114
+#, 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]\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] [-jnqvDFKSV] 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:217
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Esecuzione del comando: %s\n"
+
+#: misc/mke2fs.c:221
+#, fuzzy, c-format
+msgid "while trying to run '%s'"
+msgstr "provando a caricare '%s'"
+
+#: misc/mke2fs.c:228
+msgid "while processing list of bad blocks from program"
+msgstr "analizzando una lista di blocchi non validi dal programma"
+
+#: misc/mke2fs.c:255
+#, 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:257
+#, fuzzy, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+"I blocchi da %d a %d devono essere validi per costruire un filesystem.\n"
+
+#: misc/mke2fs.c:260
+msgid "Aborting....\n"
+msgstr "Annullamento....\n"
+
+#: misc/mke2fs.c:280
+#, 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:299
+msgid "while marking bad blocks as used"
+msgstr "contrassegnando i blocchi non validi come utilizzati"
+
+#: misc/mke2fs.c:316
+msgid "Writing inode tables: "
+msgstr "Scrittura delle tavole degli inode: "
+
+#: misc/mke2fs.c:337
+#, 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:351 misc/mke2fs.c:2175 misc/mke2fs.c:2429
+#, c-format
+msgid "done                            \n"
+msgstr "fatto                           \n"
+
+#: misc/mke2fs.c:362
+msgid "while creating root dir"
+msgstr "creando la directory root"
+
+#: misc/mke2fs.c:369
+msgid "while reading root inode"
+msgstr "creando l'inode root"
+
+#: misc/mke2fs.c:383
+msgid "while setting root inode ownership"
+msgstr "impostando i permessi dell'inode root"
+
+#: misc/mke2fs.c:401
+msgid "while creating /lost+found"
+msgstr "creando /lost+found"
+
+#: misc/mke2fs.c:408
+msgid "while looking up /lost+found"
+msgstr "cercando /lost+found"
+
+#: misc/mke2fs.c:421
+msgid "while expanding /lost+found"
+msgstr "espandendo /lost+found"
+
+#: misc/mke2fs.c:436
+msgid "while setting bad block inode"
+msgstr "impostando l'inode del blocco difettoso"
+
+#: misc/mke2fs.c:463
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Fine memoria cancellando i settori %d-%d\n"
+
+#: misc/mke2fs.c:473
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Attenzione: impossibile leggere il blocco 0: %s\n"
+
+#: misc/mke2fs.c:489
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Attenzione: impossibile cancellare il settore %d: %s\n"
+
+#: misc/mke2fs.c:505
+msgid "while initializing journal superblock"
+msgstr "inizializzando il superblocco del journal"
+
+#: misc/mke2fs.c:513
+msgid "Zeroing journal device: "
+msgstr "Azzeramento del device di journaling: "
+
+#: misc/mke2fs.c:525
+#, 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:543
+msgid "while writing journal superblock"
+msgstr "scrivendo il superblocco del journal"
+
+#: misc/mke2fs.c:558
+#, fuzzy, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"attenzione: %d blocchi inutilizzati.\n"
+"\n"
+
+#: misc/mke2fs.c:563
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Etichetta del filesystem=%s\n"
+
+#: misc/mke2fs.c:566
+#, fuzzy, c-format
+msgid "OS type: %s\n"
+msgstr "Tipo SO: "
+
+#: misc/mke2fs.c:568
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Dimensione blocco=%u (log=%u)\n"
+
+#: misc/mke2fs.c:572
+#, fuzzy, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Dimensione blocco=%u (log=%u)\n"
+
+#: misc/mke2fs.c:576
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Dimensione frammento=%u (log=%u)\n"
+
+#: misc/mke2fs.c:578
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:580
+#, fuzzy, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u inode, %u blocchi\n"
+
+#: misc/mke2fs.c:582
+#, 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:585
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Primo blocco dati=%u\n"
+
+#: misc/mke2fs.c:587
+#, fuzzy, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Etichetta del filesystem=%s\n"
+
+#: misc/mke2fs.c:591
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u gruppi di blocchi\n"
+
+#: misc/mke2fs.c:593
+#, fuzzy, c-format
+msgid "%u block group\n"
+msgstr "%u gruppo di blocchi\n"
+
+#: misc/mke2fs.c:596
+#, 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:599
+#, 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:601
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u inode per gruppo\n"
+
+#: misc/mke2fs.c:608
+#, c-format
+msgid "Superblock backups stored on blocks: "
+msgstr "Backup del superblocco salvati nei blocchi: "
+
+#: misc/mke2fs.c:687 misc/tune2fs.c:1165
+#, fuzzy, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "modello di prova non valido: %s\n"
+
+#: misc/mke2fs.c:701
+#, fuzzy, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/mke2fs.c:716
+#, fuzzy, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/mke2fs.c:739
+#, fuzzy, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/mke2fs.c:746
+#, c-format
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:770
+#, c-format
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:808
+#, fuzzy, c-format
+msgid "Invalid quotatype parameter: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/mke2fs.c:819
+#, 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"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr OR grp>\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"
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:878
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: misc/mke2fs.c:891 misc/tune2fs.c:393
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Set di opzioni del filesystem non valido: %s\n"
+
+#: misc/mke2fs.c:903 misc/tune2fs.c:345
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Insieme di opzioni di mount non valido: %s\n"
+
+#: misc/mke2fs.c:1043
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1047
+#, c-format
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1051
+#, fuzzy, c-format
+msgid "Aborting...\n"
+msgstr "Annullamento....\n"
+
+#: misc/mke2fs.c:1091
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1249
+#, fuzzy, c-format
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Impossibile allocare memoria per i tipi di filesystem\n"
+
+#: misc/mke2fs.c:1290
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1330
+#, fuzzy, c-format
+msgid "invalid block size - %s"
+msgstr "dimensione del blocco difettoso - %s"
+
+#: misc/mke2fs.c:1334
+#, 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:1350
+#, fuzzy, c-format
+msgid "invalid cluster size - %s"
+msgstr "dimensione del blocco difettoso - %s"
+
+#: misc/mke2fs.c:1362
+msgid "Illegal number for blocks per group"
+msgstr "Numero di blocchi per gruppo non valido"
+
+#: misc/mke2fs.c:1367
+msgid "blocks per group must be multiple of 8"
+msgstr "i blocchi per gruppo devono essere multipli di 8"
+
+#: misc/mke2fs.c:1375
+#, fuzzy
+msgid "Illegal number for flex_bg size"
+msgstr "Numero di blocchi non valido!\n"
+
+#: misc/mke2fs.c:1381
+msgid "flex_bg size must be a power of 2"
+msgstr ""
+
+#: misc/mke2fs.c:1391
+#, 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:1401
+#, c-format
+msgid ""
+"Warning: -K option is deprecated and should not be used anymore. Use '-E "
+"nodiscard' extended option instead!\n"
+msgstr ""
+
+#: misc/mke2fs.c:1415
+msgid "in malloc for bad_blocks_filename"
+msgstr "nella malloc per bad_blocks_filename"
+
+#: misc/mke2fs.c:1425
+#, fuzzy, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "percentuale di blocchi riservati non valida - %s"
+
+#: misc/mke2fs.c:1443
+#, fuzzy, c-format
+msgid "bad revision level - %s"
+msgstr "versione non valida - %s\n"
+
+#: misc/mke2fs.c:1455
+#, fuzzy, c-format
+msgid "invalid inode size - %s"
+msgstr "dimensione inode non valida - %s"
+
+#: misc/mke2fs.c:1475
+#, fuzzy, c-format
+msgid "bad num inodes - %s"
+msgstr "dimensione inode non valida - %s"
+
+#: misc/mke2fs.c:1492
+#, fuzzy
+msgid "The -t option may only be used once"
+msgstr "-o può essere specificata solo una volta"
+
+#: misc/mke2fs.c:1500
+#, fuzzy
+msgid "The -T option may only be used once"
+msgstr "-o può essere specificata solo una volta"
+
+#: misc/mke2fs.c:1550 misc/mke2fs.c:2508
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "durante l'apertura del dispositivo di journaling %s\n"
+
+#: misc/mke2fs.c:1556
+#, 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:1562
+#, fuzzy, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Aggiunta del journal al device %s: "
+
+#: misc/mke2fs.c:1573
+#, fuzzy, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "numero dei blocchi non validi - %s"
+
+#: misc/mke2fs.c:1583
+msgid "filesystem"
+msgstr "filesystem"
+
+#: misc/mke2fs.c:1596 resize/main.c:374
+msgid "while trying to determine filesystem size"
+msgstr "tentando di determinare la dimensione del filesystem"
+
+#: misc/mke2fs.c:1602
+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 filesystem\n"
+
+#: misc/mke2fs.c:1609
+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:1626
+msgid "Filesystem larger than apparent device size."
+msgstr "Il filesystem è più grande della dimensione apparente del device."
+
+#: misc/mke2fs.c:1646
+#, c-format
+msgid "Failed to parse fs types list\n"
+msgstr ""
+
+#: misc/mke2fs.c:1700
+#, 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:1716
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr ""
+
+#: misc/mke2fs.c:1723
+#, c-format
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1730
+#, c-format
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1742
+#, fuzzy, c-format
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr ""
+"\n"
+"Dimensione del journal troppo grande per il filesystem.\n"
+
+#: misc/mke2fs.c:1756
+#, fuzzy, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "percentuale di blocchi riservati non valida - %s"
+
+#: misc/mke2fs.c:1772
+#, c-format
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1789
+msgid "while trying to determine hardware sector size"
+msgstr "provando a determinare la dimensione del settore hardware"
+
+#: misc/mke2fs.c:1795
+#, fuzzy
+msgid "while trying to determine physical sector size"
+msgstr "provando a determinare la dimensione del settore hardware"
+
+#: misc/mke2fs.c:1828
+#, fuzzy
+msgid "while setting blocksize; too small for device\n"
+msgstr "impostando l'inode del blocco difettoso"
+
+#: misc/mke2fs.c:1833
+#, c-format
+msgid ""
+"Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1864
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1867
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1869
+#, c-format
+msgid ""
+"This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1880
+#, 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:1884
+#, 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:1920
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:1929
+msgid "blocks per group count out of range"
+msgstr "conteggio dei blocchi per gruppo fuori dall'intervallo"
+
+#: misc/mke2fs.c:1944
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+
+#: misc/mke2fs.c:1956
+#, 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:1974
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr ""
+
+#: misc/mke2fs.c:1981
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr ""
+
+#: misc/mke2fs.c:1995
+#, 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:2114
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+"    e2undo %s %s\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2128
+#, fuzzy
+msgid "while trying to setup undo file\n"
+msgstr ""
+"\n"
+"\tcercando di creare il file di journal"
+
+#: misc/mke2fs.c:2154
+#, fuzzy
+msgid "Discarding device blocks: "
+msgstr "Aggiunta del journal al device %s: "
+
+#: misc/mke2fs.c:2170
+msgid "failed - "
+msgstr ""
+
+#: misc/mke2fs.c:2277
+#, fuzzy
+msgid "while setting up superblock"
+msgstr "impostando il superblocco"
+
+#: misc/mke2fs.c:2286
+#, c-format
+msgid "Discard succeeded and will return 0s  - skipping inode table wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:2369
+#, c-format
+msgid "unknown os - %s"
+msgstr "so sconosciuto - %s"
+
+#: misc/mke2fs.c:2421
+#, fuzzy, c-format
+msgid "Allocating group tables: "
+msgstr "Scrittura delle tavole degli inode: "
+
+#: misc/mke2fs.c:2425
+msgid "while trying to allocate filesystem tables"
+msgstr "tentando di allocare le tabelle del filesystem"
+
+#: misc/mke2fs.c:2434
+#, fuzzy
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr "scrivendo la mappa dei bit del blocco"
+
+#: misc/mke2fs.c:2477
+#, fuzzy, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr "azzerando il blocco %u alla fine del filesystem"
+
+#: misc/mke2fs.c:2490
+#, fuzzy
+msgid "while reserving blocks for online resize"
+msgstr "leggendo l'inode dei blocchi non validi"
+
+#: misc/mke2fs.c:2501 misc/tune2fs.c:640
+msgid "journal"
+msgstr "journal"
+
+#: misc/mke2fs.c:2513
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Aggiunta del journal al device %s: "
+
+#: misc/mke2fs.c:2520
+#, 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:2525 misc/mke2fs.c:2557 misc/tune2fs.c:669 misc/tune2fs.c:683
+#, c-format
+msgid "done\n"
+msgstr "fatto\n"
+
+#: misc/mke2fs.c:2534
+#, c-format
+msgid "Skipping journal creation in super-only mode\n"
+msgstr ""
+
+#: misc/mke2fs.c:2545
+#, fuzzy, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Creazione del journal (%d blocchi): "
+
+#: misc/mke2fs.c:2553
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tcercando di creare il journal"
+
+#: misc/mke2fs.c:2564 misc/tune2fs.c:446
+#, c-format
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+
+#: misc/mke2fs.c:2569
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2582
+#, c-format
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+"Scrittura delle informazioni dei superblocchi e dell'accounting del "
+"filesystem: "
+
+#: misc/mke2fs.c:2589
+#, c-format
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+"\n"
+"Attenzione, problemi durante la scrittura dei superblocchi."
+
+#: misc/mke2fs.c:2591
+#, c-format
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"fatto\n"
+"\n"
+
+#: misc/mklost+found.c:50
+#, c-format
+msgid "Usage: mklost+found\n"
+msgstr "Uso: mklost+found\n"
+
+#: misc/partinfo.c:41
+#, 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:51
+#, fuzzy, c-format
+msgid "Cannot open %s: %s"
+msgstr "e2label: impossibile aprire %s\n"
+
+#: misc/partinfo.c:57
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:65
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:71
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d   start=%8d size=%8lu end=%8d\n"
+msgstr ""
+
+#: misc/tune2fs.c:107
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr "Eseguire e2fsck sul filesystem.\n"
+
+#: misc/tune2fs.c:116
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-p "
+"mmp_update_interval]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]\n"
+"\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[ -I new_inode_size ] 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:205
+msgid "while trying to open external journal"
+msgstr "cercando di aprire il journal esterno"
+
+#: misc/tune2fs.c:210
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s non è un dispositivo di journaling.\n"
+
+#: misc/tune2fs.c:225
+msgid "Journal superblock not found!\n"
+msgstr "Superblocco del journal non trovato!\n"
+
+#: misc/tune2fs.c:236
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "UUID del filesystem non trovato sul dispositivo di journaling.\n"
+
+#: misc/tune2fs.c:257
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:265
+msgid "Journal removed\n"
+msgstr "Journal rimosso\n"
+
+#: misc/tune2fs.c:309
+msgid "while reading bitmaps"
+msgstr "leggendo le mappe dei bit"
+
+#: misc/tune2fs.c:317
+msgid "while clearing journal inode"
+msgstr "azzerando l'inode del journal"
+
+#: misc/tune2fs.c:328
+msgid "while writing journal inode"
+msgstr "scrivendo l'inode del journal"
+
+#: misc/tune2fs.c:363
+#, c-format
+msgid "(and reboot afterwards!)\n"
+msgstr ""
+
+#: misc/tune2fs.c:396
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:402
+#, fuzzy, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr ""
+"Impostazione di data ed ora dell'ultimo controllo del filesystem a %s\n"
+
+#: misc/tune2fs.c:411
+#, fuzzy
+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 filesystem non\n"
+"è montato o è montato solo in lettura.\n"
+
+#: misc/tune2fs.c:419
+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:438
+#, fuzzy
+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 filesystem non\n"
+"è montato o è montato solo in lettura.\n"
+
+#: misc/tune2fs.c:456
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:465
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:473
+#, fuzzy
+msgid "Error while reading bitmaps\n"
+msgstr "leggendo le mappe dei bit"
+
+#: misc/tune2fs.c:482
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+
+#: misc/tune2fs.c:487
+#, fuzzy
+msgid "while reading MMP block."
+msgstr "leggendo l'inode numero 1"
+
+#: misc/tune2fs.c:519
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+
+#: misc/tune2fs.c:530
+#, fuzzy
+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 filesystem non\n"
+"è montato o è montato solo in lettura.\n"
+
+#: misc/tune2fs.c:590
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:635
+msgid "The filesystem already has a journal.\n"
+msgstr "Il filesystem ha già un journal.\n"
+
+#: misc/tune2fs.c:653
+#, 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:657
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Creando il journal per il device %s: "
+
+#: misc/tune2fs.c:665
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "aggiungendo un filesystem al journal in %s"
+
+#: misc/tune2fs.c:671
+msgid "Creating journal inode: "
+msgstr "Creazione dell'inode del journal: "
+
+#: misc/tune2fs.c:680
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tcercando di creare il file di journal"
+
+#: misc/tune2fs.c:763
+#, fuzzy
+msgid "Couldn't allocate memory to parse quota options!\n"
+msgstr "Impossibile allocare memoria per fare il parsing delle opzioni raid!\n"
+
+#: misc/tune2fs.c:785
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with "
+"comma):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:846
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Impossibile comprendere il formato di data/ora: %s"
+
+#: misc/tune2fs.c:870 misc/tune2fs.c:883
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "numero di mount non validi - %s"
+
+#: misc/tune2fs.c:899
+#, fuzzy, c-format
+msgid "bad error behavior - %s"
+msgstr "comportamento relativo ad un errore non valido - %s"
+
+#: misc/tune2fs.c:926
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "gid/nome gruppo non valido - %s"
+
+#: misc/tune2fs.c:959
+#, c-format
+msgid "bad interval - %s"
+msgstr "intervallo non valido - %s"
+
+#: misc/tune2fs.c:988
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "percentuale di blocchi riservati non valida - %s"
+
+#: misc/tune2fs.c:1003
+msgid "-o may only be specified once"
+msgstr "-o può essere specificata solo una volta"
+
+#: misc/tune2fs.c:1012
+msgid "-O may only be specified once"
+msgstr "-O può essere specificata solo una volta"
+
+#: misc/tune2fs.c:1027
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "numero di blocchi riservati non valido - %s"
+
+#: misc/tune2fs.c:1056
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "uid/nome utente non valido - %s"
+
+#: misc/tune2fs.c:1073
+#, fuzzy, c-format
+msgid "bad inode size - %s"
+msgstr "dimensione inode non valida - %s"
+
+#: misc/tune2fs.c:1080
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr ""
+
+#: misc/tune2fs.c:1174
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:1179
+#, 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:1202
+#, fuzzy, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Insieme di opzioni di mount non valido: %s\n"
+
+#: misc/tune2fs.c:1217
+#, fuzzy, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/tune2fs.c:1232
+#, fuzzy, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/tune2fs.c:1238
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:1257
+#, fuzzy, c-format
+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"
+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:1723
+#, fuzzy
+msgid "Failed to read inode bitmap\n"
+msgstr "leggendo le mappe dei bit"
+
+#: misc/tune2fs.c:1728
+#, fuzzy
+msgid "Failed to read block bitmap\n"
+msgstr "lettura delle mappe di bit inode e blocco"
+
+#: misc/tune2fs.c:1745 resize/resize2fs.c:784
+msgid "blocks to be moved"
+msgstr "blocchi da spostare"
+
+#: misc/tune2fs.c:1748
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:1754
+msgid "Not enough space to increase inode size \n"
+msgstr ""
+
+#: misc/tune2fs.c:1759
+#, fuzzy
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "leggendo l'inode dei blocchi non validi"
+
+#: misc/tune2fs.c:1791
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+
+#: misc/tune2fs.c:1818
+#, fuzzy
+msgid "Couldn't allocate memory for tdb filename\n"
+msgstr "Impossibile allocare memoria per i tipi di filesystem\n"
+
+#: misc/tune2fs.c:1840
+#, fuzzy, c-format
+msgid "while trying to delete %s"
+msgstr "provando a ridimensionare %s"
+
+#: misc/tune2fs.c:1850
+#, c-format
+msgid ""
+"To undo the tune2fs operation please run the command\n"
+"    e2undo %s %s\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:1919
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:1937
+#, fuzzy, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Impostazione del gid dei blocchi riservati a %lu\n"
+
+#: misc/tune2fs.c:1943
+#, fuzzy, c-format
+msgid "Shrinking the inode size is not supported\n"
+msgstr ""
+"Impostazione di data ed ora dell'ultimo controllo del filesystem a %s\n"
+
+#: misc/tune2fs.c:1990
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Impostazione del numero massimo di mount a %d\n"
+
+#: misc/tune2fs.c:1996
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Impostazione del numero attuale di mount a %d\n"
+
+#: misc/tune2fs.c:2001
+#, fuzzy, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Impostazione del comportamento da errore a %d\n"
+
+#: misc/tune2fs.c:2006
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Impostazione del gid dei blocchi riservati a %lu\n"
+
+#: misc/tune2fs.c:2011
+#, fuzzy, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "Impostazione dell'intervallo tra i controlli a %lu secondi\n"
+
+#: misc/tune2fs.c:2018
+#, 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:2025
+#, 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:2031
+#, fuzzy, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "il numero di blocchi riservati è troppo alto (%lu)"
+
+#: misc/tune2fs.c:2038
+#, fuzzy, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Impostazione del numero di blocchi riservati a %lu\n"
+
+#: misc/tune2fs.c:2044
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Il filesystem ha già dei superblocchi sparsi.\n"
+
+#: misc/tune2fs.c:2051
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set.  %s"
+msgstr ""
+
+#: misc/tune2fs.c:2056
+msgid ""
+"\n"
+"Clearing the sparse superflag not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2064
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr ""
+"Impostazione di data ed ora dell'ultimo controllo del filesystem a %s\n"
+
+#: misc/tune2fs.c:2070
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Impostazione dell'uid dei blocchi riservati a %lu\n"
+
+#: misc/tune2fs.c:2102
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+
+#: misc/tune2fs.c:2120
+#, fuzzy
+msgid ""
+"The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"Il flag has_journal può essere azzerato quando il filesystem non\n"
+"è montato o è montato solo in lettura.\n"
+
+#: misc/tune2fs.c:2153
+msgid "Invalid UUID format\n"
+msgstr "Formato UUID non valido\n"
+
+#: misc/tune2fs.c:2166
+#, fuzzy
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+"Il flag has_journal può essere azzerato quando il filesystem non\n"
+"è montato o è montato solo in lettura.\n"
+
+#: misc/tune2fs.c:2174
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2187
+#, fuzzy, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Impostazione del gid dei blocchi riservati a %lu\n"
+
+#: misc/tune2fs.c:2190
+#, fuzzy, c-format
+msgid "Failed to change inode size\n"
+msgstr "durante l'apertura di %s"
+
+#: misc/tune2fs.c:2201
+#, fuzzy, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Impostazione del gid dei blocchi riservati a %lu\n"
+
+#: misc/tune2fs.c:2206
+#, fuzzy, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Impostazione del gid dei blocchi riservati a %lu\n"
+
+#: misc/tune2fs.c:2213
+#, 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:74
+msgid "Proceed anyway? (y,n) "
+msgstr "Procedere comunque? (s,n) "
+
+#: misc/util.c:89
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr "Impossibile fare stat di %s --- %s\n"
+
+#: misc/util.c:92
+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"
+
+#: misc/util.c:103
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s non è un device speciale a blocchi.\n"
+
+#: misc/util.c:132
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr "%s è un device intero, non solo una partizione.\n"
+
+#: misc/util.c:154
+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:159
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "non farò un %s qui!\n"
+
+#: misc/util.c:166
+msgid "mke2fs forced anyway.\n"
+msgstr ""
+
+#: misc/util.c:182
+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:207
+#, 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:228
+#, 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"
+"\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:258
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Filesystem troppo piccolo per un journal\n"
+
+#: misc/util.c:265
+#, 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:273
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Dimensione del journal troppo grande per il filesystem.\n"
+
+#: misc/util.c:287
+#, 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:48
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr ""
+
+#: misc/uuidd.c:50
+#, c-format
+msgid "       %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr ""
+
+#: misc/uuidd.c:52
+#, c-format
+msgid "       %s -k\n"
+msgstr ""
+
+#: misc/uuidd.c:154
+#, fuzzy
+msgid "bad arguments"
+msgstr "%s: troppi parametri\n"
+
+#: misc/uuidd.c:172
+msgid "connect"
+msgstr ""
+
+#: misc/uuidd.c:191
+msgid "write"
+msgstr ""
+
+#: misc/uuidd.c:199
+msgid "read count"
+msgstr ""
+
+#: misc/uuidd.c:205
+#, fuzzy
+msgid "bad response length"
+msgstr "Parametro di stride non valido.\n"
+
+#: misc/uuidd.c:270
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr ""
+
+#: misc/uuidd.c:278
+#, fuzzy, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Impossibile comprendere il formato di data/ora: %s"
+
+#: misc/uuidd.c:307
+#, fuzzy, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Impossibile trovare il superblocco ext2"
+
+#: misc/uuidd.c:315
+#, fuzzy, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr "Impossibile riconnettere %i: %m\n"
+
+#: misc/uuidd.c:353
+#, fuzzy, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Errore durante la lettura dell'@i %i: %m\n"
+
+#: misc/uuidd.c:361
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:380
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:390
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:399
+#, 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:420
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:432
+#, fuzzy, c-format
+msgid "Invalid operation %d\n"
+msgstr "Versione EA non valida.\n"
+
+#: misc/uuidd.c:476 misc/uuidd.c:498
+#, c-format
+msgid "Bad number: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:533 misc/uuidd.c:562
+#, fuzzy, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Errore creando la @d /@l (%s): %m\n"
+
+#: misc/uuidd.c:543
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:547
+#, c-format
+msgid "List of UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:568
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr ""
+
+#: misc/uuidd.c:585
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:591
+#, 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:43
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]\n"
+"\n"
+msgstr ""
+"Uso: %s [-d flag_di_debug] [-f] [-F] [-p] device [nuova-dimensione]\n"
+"\n"
+
+#: resize/main.c:65
+msgid "Extending the inode table"
+msgstr "Estensione della tavola degli inode"
+
+#: resize/main.c:68
+msgid "Relocating blocks"
+msgstr "Rilocazione dei blocchi"
+
+#: resize/main.c:71
+msgid "Scanning inode table"
+msgstr "Scansione della tavola degli inode"
+
+#: resize/main.c:74
+msgid "Updating inode references"
+msgstr "Aggiornamento dei riferimenti degli inode"
+
+#: resize/main.c:77
+msgid "Moving inode table"
+msgstr "Spostamento della tavola degli inode"
+
+#: resize/main.c:80
+msgid "Unknown pass?!?"
+msgstr "Passo sconosciuto?!?"
+
+#: resize/main.c:83
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Inizio del passo %d (max = %lu)\n"
+
+#: resize/main.c:259
+#, fuzzy, c-format
+msgid "while opening %s"
+msgstr "avviando la scansione degli inode"
+
+#: resize/main.c:267
+#, fuzzy, c-format
+msgid "while getting stat information for %s"
+msgstr "impostando la versione a %s"
+
+#: resize/main.c:331
+#, c-format
+msgid ""
+"%s: The combination of flex_bg and\n"
+"\t!resize_inode features is not supported by resize2fs.\n"
+msgstr ""
+
+#: resize/main.c:344 resize/main.c:452
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Eseguire prima 'e2fsck -f %s'.\n"
+"\n"
+
+#: resize/main.c:348
+#, fuzzy, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr ""
+"%s è montato; impossibile ridimensionare un filesystem montato!\n"
+"\n"
+
+#: resize/main.c:384
+#, fuzzy, c-format
+msgid "Invalid new size: %s\n"
+msgstr "dimensione inode non valida - %s"
+
+#: resize/main.c:392
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr ""
+
+#: resize/main.c:404
+#, 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:410
+#, fuzzy
+msgid "Invalid stride length"
+msgstr "Parametro di stride non valido.\n"
+
+#: resize/main.c:434
+#, 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:441
+#, fuzzy, c-format
+msgid ""
+"The filesystem is already %llu blocks long.  Nothing to do!\n"
+"\n"
+msgstr ""
+"Il filesystem è già lungo %d blocchi. Nulla da fare!\n"
+"\n"
+
+#: resize/main.c:456
+#, 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:465
+#, c-format
+msgid "while trying to resize %s"
+msgstr "provando a ridimensionare %s"
+
+#: resize/main.c:468
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+
+#: resize/main.c:474
+#, fuzzy, c-format
+msgid ""
+"The filesystem on %s is now %llu blocks long.\n"
+"\n"
+msgstr ""
+"Il filesystem su %s è ora lungo %d blocchi.\n"
+"\n"
+
+#: resize/main.c:489
+#, fuzzy, c-format
+msgid "while trying to truncate %s"
+msgstr "tentando di fare lo stat di %s"
+
+#: resize/online.c:40
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+
+#: resize/online.c:44
+#, fuzzy
+msgid "On-line shrinking not supported"
+msgstr ""
+"Impostazione di data ed ora dell'ultimo controllo del filesystem a %s\n"
+
+#: resize/online.c:63
+msgid "Filesystem does not support online resizing"
+msgstr ""
+
+#: resize/online.c:70
+#, fuzzy, c-format
+msgid "while trying to open mountpoint %s"
+msgstr ""
+"\n"
+"\ttentando di aprire il journal in %s\n"
+
+#: resize/online.c:92 resize/online.c:116
+msgid "Permission denied to resize filesystem"
+msgstr ""
+
+#: resize/online.c:95 resize/online.c:122
+#, fuzzy
+msgid "While checking for on-line resizing support"
+msgstr "leggendo l'inode dei blocchi non validi"
+
+#: resize/online.c:107
+#, fuzzy
+msgid "Kernel does not support resizing a file system this large"
+msgstr "Il @j esterno non supporta questo @f\n"
+
+#: resize/online.c:119
+#, fuzzy
+msgid "Kernel does not support online resizing"
+msgstr "Il @j esterno non supporta questo @f\n"
+
+#: resize/online.c:152
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/online.c:162
+#, fuzzy
+msgid "While trying to extend the last group"
+msgstr "cercando di aprire il journal esterno"
+
+#: resize/online.c:216
+#, fuzzy, c-format
+msgid "While trying to add group #%d"
+msgstr "durante l'apertura di %s"
+
+#: resize/online.c:227
+#, 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:348
+#, c-format
+msgid "inodes (%llu) must be less than %u"
+msgstr ""
+
+#: resize/resize2fs.c:576
+msgid "reserved blocks"
+msgstr "blocchi riservati"
+
+#: resize/resize2fs.c:789
+msgid "meta-data blocks"
+msgstr ""
+
+#: resize/resize2fs.c:1735
+#, c-format
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.42.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 "lettura del superblocco del journal\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 ", 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 "lettura delle mappe di bit inode e 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 ""
+
+#: lib/ext2fs/ext2_err.c:45
+#, fuzzy
+msgid "Filesystem has unexpected block size"
+msgstr "Il filesystem è più grande della dimensione apparente del device."
+
+#: 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 ", mappa dei bit inode a "
+
+#: lib/ext2fs/ext2_err.c:51
+#, fuzzy
+msgid "Block bitmap not loaded"
+msgstr "  Mappa dei bit di blocco a  "
+
+#: lib/ext2fs/ext2_err.c:52
+#, fuzzy
+msgid "Illegal inode number"
+msgstr "Numero di blocchi non valido!\n"
+
+#: lib/ext2fs/ext2_err.c:53
+#, fuzzy
+msgid "Illegal block number"
+msgstr "Numero di blocchi non valido!\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 "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 ""
+
+#: 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 "L'@h %i ha una versione dell'hash non supportata (%N)\n"
+
+#: lib/ext2fs/ext2_err.c:79
+#, fuzzy
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "L'@h %i ha una versione dell'hash non supportata (%N)\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 "Aerrore allocando"
+
+#: 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 "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 ""
+
+#: 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 "Aggiunta del journal al device %s: "
+
+#: 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 ""
+
+#: 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 "Parametro di stride non valido.\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 "eelemento"
+
+#: 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 non trovata. "
+
+#: 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: fsck 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 "dimensione filesystem non valida - %s"
+
+#: lib/ext2fs/ext2_err.c:155
+msgid "MMP: open with O_DIRECT failed"
+msgstr ""
+
+#: e2fsck/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr ""
+
+#: e2fsck/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr ""
+
+#: e2fsck/prof_err.c:13
+#, fuzzy
+msgid "Profile section not found"
+msgstr "creando /lost+found"
+
+#: e2fsck/prof_err.c:14
+#, fuzzy
+msgid "Profile relation not found"
+msgstr "creando /lost+found"
+
+#: e2fsck/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+
+#: e2fsck/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr ""
+
+#: e2fsck/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr ""
+
+#: e2fsck/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr ""
+
+#: e2fsck/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr ""
+
+#: e2fsck/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr ""
+
+#: e2fsck/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr ""
+
+#: e2fsck/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr ""
+
+#: e2fsck/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr ""
+
+#: e2fsck/prof_err.c:32
+#, fuzzy
+msgid "Invalid profile_section object"
+msgstr "Set di opzioni del filesystem non valido: %s\n"
+
+#: e2fsck/prof_err.c:33
+msgid "No more sections"
+msgstr ""
+
+#: e2fsck/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr ""
+
+#: e2fsck/prof_err.c:35
+msgid "No profile file open"
+msgstr ""
+
+#: e2fsck/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:37
+#, fuzzy
+msgid "Couldn't open profile file"
+msgstr "Impossibile clonare il file: %m\n"
+
+#: e2fsck/prof_err.c:38
+msgid "Section already exists"
+msgstr ""
+
+#: e2fsck/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr ""
+
+#: e2fsck/prof_err.c:40
+#, fuzzy
+msgid "Invalid integer value"
+msgstr "Parametro di stride non valido.\n"
+
+#: e2fsck/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr ""
+
+#~ msgid "<The ACL index inode>"
+#~ msgstr "<Inode dell'indice ACL>"
+
+#~ msgid "<The ACL data inode>"
+#~ msgstr "<Inode dei dati ACL>"
+
+#~ msgid "%s is mounted.  "
+#~ msgstr "%s è montato. "
+
+#~ msgid "bad block size - %s"
+#~ msgstr "dimensione del blocco difettoso - %s"
+
+#, fuzzy
+#~ msgid "invalid fragment size - %s"
+#~ msgstr "dimensione del frammento non valida - %s"
+
+#~ msgid "Warning: fragments not supported.  Ignoring -f option\n"
+#~ msgstr "Attenzione: frammenti non supportati. Opzione -f ignorata\n"
+
+#~ msgid "Journal NOT removed\n"
+#~ msgstr "Journal NON rimosso\n"
+
+#~ msgid "#\t\t %u -> %u (%d)\n"
+#~ msgstr "#\t\t %u -> %u (%d)\n"
+
+#~ msgid "@S doesn't have has_@j flag, but has ext3 @j %s.\n"
+#~ msgstr "Il @S non ha il flag has_@j, ma ha il @j ext3 %s.\n"
+
+#, fuzzy
+#~ msgid "@a in @i %i has a hash (%N) which is @n (must be 0)\n"
+#~ msgstr "L'@h %i ha un livello di profondità (%N) troppo elevato\n"
+
+#~ msgid "while calling ext2fs_block_iterate"
+#~ msgstr "chiamando ext2fs_block_iterate"
+
+#~ msgid "while calling iterator function"
+#~ msgstr "chiamando la funzione iteratrice"
+
+#~ msgid "while allocating inode buffer"
+#~ msgstr "allocando il buffer inode"
+
+#~ msgid "while reading inode table (group %d)"
+#~ msgstr "leggendo la tavola degli inode (gruppo %d)"
+
+#~ msgid "while writing inode table (group %d)"
+#~ msgstr "scrivendo la tavola degli inode (gruppo %d)"
+
+#~ msgid "Pass 0: Doing byte-swap of filesystem\n"
+#~ msgstr "Pass 0: Esecuzione del byte-swap del filesystem\n"
+
+#~ msgid ""
+#~ "%s: the filesystem must be freshly checked using fsck\n"
+#~ "and not mounted before trying to byte-swap it.\n"
+#~ msgstr ""
+#~ "%s: il filesystem dev'essere controllato da poco utilizzando fsck\n"
+#~ "e dev'essere smontato prima di provare ad eseguirne il byte-swap.\n"
+
+#~ msgid "Byte swap"
+#~ msgstr "Byte-swap"
+
+#~ msgid "%s: Filesystem byte order already normalized.\n"
+#~ msgstr "%s: Ordine dei byte del filesystem già normalizzato.\n"
+
+#~ msgid "while retrying to write block bitmaps for %s"
+#~ msgstr "riprovando a scrivere le mappe di bit di blocco per %s"
+
+#, fuzzy
+#~ msgid "Note: This is a byte-swapped filesystem\n"
+#~ msgstr "Nota: Questo è un filesystem a byte scambiati\n"
+
+#, fuzzy
+#~ msgid "Warning: %d-byte inodes not usable on older systems\n"
+#~ msgstr ""
+#~ "Attenzione: gli inode di %d byte non sono utilizzabili su molti sistemi\n"
+
+#~ msgid "Clone duplicate/bad blocks"
+#~ msgstr "Clona i blocchi duplicati/non validi"
+
+#, fuzzy
+#~ msgid "Error allocating @a @b %b.  "
+#~ msgstr "Errore allocando l'@a di @b %b. "
+
+#~ msgid ""
+#~ "Duplicate @bs found... invoking duplicate @b passes.\n"
+#~ "Pass 1B: Rescan for duplicate/bad @bs\n"
+#~ msgstr ""
+#~ "@b(i) duplicati trovati... invocare i passi relativi ai @b(i) duplicati.\n"
+#~ "Passo 1B: Nuova analisi relativa ai @b(i) duplicati/non validi\n"
+
+#~ msgid "Duplicate/bad @b(s) in @i %i:"
+#~ msgstr "@b duplicato/non valido(i) in @i %i:"
+
+#~ msgid "Forcibly clearing HTREE flag on @i %d (%q).  (Beta test code)\n"
+#~ msgstr ""
+#~ "Pulizia forzata del flag HTREE nell'@i %d (%q). (Codice in beta testing)\n"
+
+#~ msgid ""
+#~ "Extended options are separated by commas, and may take an argument which\n"
+#~ "is set off by an equals ('=') sign.  Valid raid options are:\n"
+#~ "\tea_ver=<ea_version (1 or 2)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Le opzioni estese sono separate da virgole, e potrebbero avere un "
+#~ "parametro,\n"
+#~ "specificato da un segno di uguale ('='). Opzioni raid valide sono:\n"
+#~ "\tea_ver=<versione_ea (1 o 2)\n"
+#~ "\n"
+#~ "\tea_ver=<versione_ea (1 o 2)\n"
+#~ "\n"
+
+#~ msgid "done                        \n"
+#~ msgstr "fatto                       \n"
+
+#~ msgid "bad blocks range: %lu-%lu"
+#~ msgstr "intervallo blocchi non validi: %lu-%lu"
+
+#~ msgid "Usage:  findsuper device [skipbytes [startkb]]\n"
+#~ msgstr "Uso: findsuper device [byte_da_saltare [kb_inizio]]\n"
+
+#, fuzzy
+#~ msgid "skipbytes should be a number, not %s\n"
+#~ msgstr "byte_da_saltare deve essere un numero, non %s\n"
+
+#, fuzzy
+#~ msgid "skipbytes must be a multiple of the sector size\n"
+#~ msgstr ""
+#~ "byte_da_saltare deve essere un multiplo della dimensione del settore\n"
+
+#~ msgid "startkb should be a number, not %s\n"
+#~ msgstr "kb_inizio deve essere un numero, non %s\n"
+
+#~ msgid "startkb should be positive, not %lld\n"
+#~ msgstr "kb_inizio deve essere positivo, non %lld\n"
+
+#~ msgid "starting at %lld, with %d byte increments\n"
+#~ msgstr "inizio a %lld, con incrementi di %d byte\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%14lld: finished with errno %d\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%14lld: terminato con errore numero %d\n"
+
+#~ msgid "(unknown os)"
+#~ msgstr "(so sconosciuto)"
+
+#~ msgid "%s failed for %s: %s\n"
+#~ msgstr "%s è fallito per %s: %s\n"
+
+#, fuzzy
+#~ msgid "HDIO_GETGEO ioctl"
+#~ msgstr "ioctl HDIO_GETGEO"
+
+#, fuzzy
+#~ msgid "BLKGETSIZE ioctl"
+#~ msgstr "ioctl BLKGETSIZE"
+
+#~ msgid ""
+#~ "\n"
+#~ "The filesystem already has sparse superblocks disabled.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Il filesystem ha già dei superblocchi sparsi disattivati.\n"
+
+#~ msgid "resize2fs %s (%s)\n"
+#~ msgstr "resize2fs %s (%s)\n"
+
+#~ msgid "Number of free blocks: %d/%d, Needed: %d\n"
+#~ msgstr "Numero di blocchi liberi: %d/%d, richiesti: %d\n"
+
+#~ msgid "Going into desperation mode for block allocations\n"
+#~ msgstr "Attivazione 'desperation mode' per l'allocazione dei blocchi\n"
+
+#~ msgid "Moving %d blocks %u->%u\n"
+#~ msgstr "Spostamento di %d blocchi %u-%u\n"
+
+#~ msgid "ino=%u, blockcnt=%lld, %u->%u\n"
+#~ msgstr "ino=%u, numblocchi=%lld, %u->%u\n"
+
+#~ msgid "Inode moved %u->%u\n"
+#~ msgstr "Inode mosso %u->%u\n"
+
+#~ msgid "%d blocks of zeros...\n"
+#~ msgstr "%d blocchi di zeri...\n"
+
+#~ msgid "Inode table move finished.\n"
+#~ msgstr "Spostamento della tavola degli inode terminato.\n"
diff --git a/e2fsprogs/po/nl.gmo b/e2fsprogs/po/nl.gmo
new file mode 100644
index 0000000..fec6fd9
--- /dev/null
+++ b/e2fsprogs/po/nl.gmo
Binary files differ
diff --git a/e2fsprogs/po/nl.po b/e2fsprogs/po/nl.po
new file mode 100644
index 0000000..5d927ab
--- /dev/null
+++ b/e2fsprogs/po/nl.po
@@ -0,0 +1,6844 @@
+# Dutch translations for e2fsprogs.
+# Copyright (C) 2013 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+#
+# "Ze hield me staande en zei dat mijn opstel
+# haar 'vreselijk was tegengevallen'.
+# Ik was meteen in de zevende hemel."
+#
+#
+# Benno Schulenberg <benno@vertaalt.nl>, 2005, 2006, 2007, 2008, 2010, 2011, 2012, 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).
+#.  
+#. 	%b	<blk>			block number
+#. 	%B	<blkcount>		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_dir_acl
+#. 	%Iu	<inode> -> i_uid
+#. 	%Ig	<inode> -> i_gid
+#. 	%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: 2013-06-16 08:17-0400\n"
+"PO-Revision-Date: 2013-07-30 12:44+0200\n"
+"Last-Translator: Benno Schulenberg <benno@vertaalt.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-Generator: Lokalize 1.0\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:180
+#, 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/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:1332 e2fsck/unix.c:1420 misc/badblocks.c:1214
+#: misc/badblocks.c:1222 misc/badblocks.c:1236 misc/badblocks.c:1248
+#: misc/dumpe2fs.c:588 misc/e2image.c:1196 misc/e2image.c:1324
+#: misc/e2image.c:1337 misc/mke2fs.c:196 misc/tune2fs.c:1907 resize/main.c:315
+#, c-format
+msgid "while trying to open %s"
+msgstr "tijdens openen van %s"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "tijdens een popen() van %s"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:203
+msgid "while reading in list of bad blocks from file"
+msgstr "tijdens lezen van lijst van slechte blokken uit bestand"
+
+#: e2fsck/badblocks.c:105
+msgid "while updating bad block inode"
+msgstr "tijdens bijwerken van de inode van een slecht blok"
+
+#: e2fsck/badblocks.c:131
+#, 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/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:61 e2fsck/ehandler.c:110
+msgid "Ignore error"
+msgstr "Fout negeren"
+
+#: e2fsck/ehandler.c:62
+msgid "Force rewrite"
+msgstr "Herschrijven afdwingen"
+
+#: e2fsck/ehandler.c:104
+#, c-format
+msgid "Error writing block %lu (%s) while %s.  "
+msgstr "Fout tijdens schrijven van blok %lu (%s) tijdens %s.  "
+
+#: e2fsck/ehandler.c:107
+#, c-format
+msgid "Error writing block %lu (%s).  "
+msgstr "Fout tijdens schrijven van blok %lu (%s).  "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "lege mapblokken"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "lege maptabel"
+
+#: e2fsck/emptydir.c:98
+#, 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:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Ongeldig aantal blokken!\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Kan geen blokbuffer reserveren (grootte=%d).\n"
+
+#: 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/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Gebruik:  %s [-F] [-I inodebufferblokken] apparaat\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:961
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "tijdens openen van %s om deze leeg te maken"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:967 resize/main.c:288
+#, c-format
+msgid "while trying to flush %s"
+msgstr "tijdens leegmaken van %s"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1091
+msgid "while opening inode scan"
+msgstr "tijdens openen voor inode-scan"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1109
+msgid "while getting next inode"
+msgstr "tijdens halen van volgende inode"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%u inodes gescand.\n"
+
+#: e2fsck/journal.c:522
+msgid "reading journal superblock\n"
+msgstr "lezen van journal-superblok...\n"
+
+#: e2fsck/journal.c:579
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: geen geldig journal-superblok gevonden\n"
+
+#: e2fsck/journal.c:588
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: journal is te kort\n"
+
+#: e2fsck/journal.c:880
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: herstellen van journal...\n"
+
+#: e2fsck/journal.c:882
+#, 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:909
+#, 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:113
+msgid "aextended attribute"
+msgstr "a<fout>"
+
+#: e2fsck/message.c:114
+msgid "Aerror allocating"
+msgstr "A<fout>"
+
+#: e2fsck/message.c:115
+msgid "bblock"
+msgstr "b<fout>"
+
+#: e2fsck/message.c:116
+msgid "Bbitmap"
+msgstr "B<fout>"
+
+#: e2fsck/message.c:117
+msgid "ccompress"
+msgstr "c<fout>"
+
+#: e2fsck/message.c:118
+msgid "Cconflicts with some other fs @b"
+msgstr "C<fout>"
+
+#: e2fsck/message.c:119
+msgid "iinode"
+msgstr "i<fout>"
+
+#: e2fsck/message.c:120
+msgid "Iillegal"
+msgstr "I<fout>"
+
+#: e2fsck/message.c:121
+msgid "jjournal"
+msgstr "j<fout>"
+
+#: e2fsck/message.c:122
+msgid "Ddeleted"
+msgstr "D<fout>"
+
+#: e2fsck/message.c:123
+msgid "ddirectory"
+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 "llost+found"
+msgstr "l<fout>"
+
+#: e2fsck/message.c:131
+msgid "Lis a link"
+msgstr "L<fout>"
+
+#: e2fsck/message.c:132
+msgid "mmultiply-claimed"
+msgstr "m<fout>"
+
+#: e2fsck/message.c:133
+msgid "ninvalid"
+msgstr "n<fout>"
+
+#: e2fsck/message.c:134
+msgid "oorphaned"
+msgstr "o<fout>"
+
+#: e2fsck/message.c:135
+msgid "pproblem in"
+msgstr "p<fout>"
+
+#: e2fsck/message.c:136
+msgid "qquota"
+msgstr "q<fout>"
+
+#: e2fsck/message.c:137
+msgid "rroot @i"
+msgstr "r<fout>"
+
+#: e2fsck/message.c:138
+msgid "sshould be"
+msgstr "s<fout>"
+
+#: e2fsck/message.c:139
+msgid "Ssuper@b"
+msgstr "S<fout>"
+
+#: e2fsck/message.c:140
+msgid "uunattached"
+msgstr "u<fout>"
+
+#: e2fsck/message.c:141
+msgid "vdevice"
+msgstr "v<fout>"
+
+#: e2fsck/message.c:142
+msgid "xextent"
+msgstr "x<fout>"
+
+#: e2fsck/message.c:143
+msgid "zzero-length"
+msgstr "z<fout>"
+
+#: e2fsck/message.c:154
+msgid "<The NULL inode>"
+msgstr "<de NULL-inode>"
+
+#: e2fsck/message.c:155
+msgid "<The bad blocks inode>"
+msgstr "<de slechteblokken-inode>"
+
+#: e2fsck/message.c:157
+msgid "<The user quota inode>"
+msgstr "<de gebruikersquota-inode>"
+
+#: e2fsck/message.c:158
+msgid "<The group quota inode>"
+msgstr "<de groepsquota-inode>"
+
+#: e2fsck/message.c:159
+msgid "<The boot loader inode>"
+msgstr "<de opstart-inode>"
+
+#: e2fsck/message.c:160
+msgid "<The undelete directory inode>"
+msgstr "<de wis-ongedaanmakingsmap-inode>"
+
+#: e2fsck/message.c:161
+msgid "<The group descriptor inode>"
+msgstr "<de groepsbeschrijver-inode>"
+
+#: e2fsck/message.c:162
+msgid "<The journal inode>"
+msgstr "<de journal-inode>"
+
+#: e2fsck/message.c:163
+msgid "<Reserved inode 9>"
+msgstr "<gereserveerde inode 9>"
+
+#: e2fsck/message.c:164
+msgid "<Reserved inode 10>"
+msgstr "<gereserveerde inode 10>"
+
+#: e2fsck/message.c:333
+msgid "regular file"
+msgstr "normaal bestand"
+
+#: e2fsck/message.c:335
+msgid "directory"
+msgstr "map"
+
+#: e2fsck/message.c:337
+msgid "character device"
+msgstr "byte-apparaat"
+
+#: e2fsck/message.c:339
+msgid "block device"
+msgstr "blok-apparaat"
+
+#: e2fsck/message.c:341
+msgid "named pipe"
+msgstr "benoemde pijp"
+
+#: e2fsck/message.c:343
+msgid "symbolic link"
+msgstr "symbolische koppeling"
+
+#: e2fsck/message.c:345 misc/uuidd.c:161
+msgid "socket"
+msgstr "socket"
+
+#: e2fsck/message.c:347
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "onbekend bestandstype met modus 0%o"
+
+#: e2fsck/message.c:422
+msgid "indirect block"
+msgstr "indirect blok"
+
+#: e2fsck/message.c:424
+msgid "double indirect block"
+msgstr "dubbel-indirect blok"
+
+#: e2fsck/message.c:426
+msgid "triple indirect block"
+msgstr "drievoudig-indirect blok"
+
+#: e2fsck/message.c:428
+msgid "translator block"
+msgstr "vertalerblok"
+
+#: e2fsck/message.c:430
+msgid "block #"
+msgstr "bloknummer"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "kaart van meervoudig-geclaimde inodes"
+
+#: e2fsck/pass1b.c:610 e2fsck/pass1b.c:730
+#, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "*interne fout*: kan geen 'dup_blk' voor %llu vinden\n"
+
+#: e2fsck/pass1b.c:821
+msgid "returned from clone_file_block"
+msgstr "### teruggekeerd van clone_file_block()"
+
+#: e2fsck/pass1b.c:843
+#, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "*interne fout*: kan de record van EA-blokken voor %llu niet opvragen"
+
+#: e2fsck/pass1b.c:855
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "*interne fout*: kan de record van EA-inodes voor %u niet opvragen"
+
+#: e2fsck/pass1.c:475 e2fsck/pass2.c:782
+msgid "reading directory block"
+msgstr "tijdens lezen van mapblok"
+
+#: e2fsck/pass1.c:598
+msgid "in-use inode map"
+msgstr "bitkaart van gebruikte inodes"
+
+#: e2fsck/pass1.c:609
+msgid "directory inode map"
+msgstr "bitkaart van mappen"
+
+#: e2fsck/pass1.c:619
+msgid "regular file inode map"
+msgstr "bitkaart van normale bestanden"
+
+#: e2fsck/pass1.c:628
+msgid "in-use block map"
+msgstr "bitkaart van gebruikte blokken"
+
+#: e2fsck/pass1.c:695
+msgid "opening inode scan"
+msgstr "tijdens starten van inode-scan"
+
+#: e2fsck/pass1.c:729
+msgid "getting next inode from scan"
+msgstr "tijdens halen van volgende inode"
+
+#: e2fsck/pass1.c:1239
+msgid "Pass 1"
+msgstr "Stap 1"
+
+#: e2fsck/pass1.c:1296
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "lezen van indirecte blokken van inode %u"
+
+#: e2fsck/pass1.c:1346
+msgid "bad inode map"
+msgstr "bitkaart van slechte inodes"
+
+#: e2fsck/pass1.c:1369
+msgid "inode in bad block map"
+msgstr "inode staat in kaart van slechte blokken"
+
+#: e2fsck/pass1.c:1389
+msgid "imagic inode map"
+msgstr "imagic-inodekaart"
+
+#: e2fsck/pass1.c:1416
+msgid "multiply claimed block map"
+msgstr "kaart van meervoudig-geclaimde blokken"
+
+#: e2fsck/pass1.c:1527
+msgid "ext attr block map"
+msgstr "kaart van blokken met uitgebreide kenmerken"
+
+#: e2fsck/pass1.c:2299
+#, 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:2660
+msgid "block bitmap"
+msgstr "blok-bitkaart"
+
+#: e2fsck/pass1.c:2666
+msgid "inode bitmap"
+msgstr "inode-bitkaart"
+
+#: e2fsck/pass1.c:2672
+msgid "inode table"
+msgstr "inodetabel"
+
+#: e2fsck/pass2.c:283
+msgid "Pass 2"
+msgstr "Stap 2"
+
+#: e2fsck/pass2.c:805
+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:136
+msgid "Pass 3"
+msgstr "Stap 3"
+
+#: e2fsck/pass3.c:322
+msgid "inode loop detection bitmap"
+msgstr "bitkaart van inode-lusdetectie"
+
+#: e2fsck/pass4.c:196
+msgid "Pass 4"
+msgstr "Stap 4"
+
+#: e2fsck/pass5.c:74
+msgid "Pass 5"
+msgstr "Stap 5"
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(geen prompt)"
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr "Repareren"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Wissen"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Herplaatsen"
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr "Plaatsen"
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr "Uitbreiden"
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr "Verbinden met /lost+found"
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr "Aanmaken"
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr "Bergen"
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr "Afkappen"
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr "Inode wissen"
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr "Afbreken"
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr "Splitsen"
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr "Doorgaan"
+
+#: e2fsck/problem.c:65
+msgid "Clone multiply-claimed blocks"
+msgstr "Meervoudig-geclaimde blokken klonen"
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr "Bestand verwijderen"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Berichten onderdrukken"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "Losmaken"
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "'htree'-index wissen"
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr "Heraanmaken"
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr "(GEEN)"
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr "GEREPAREERD"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "GEWIST"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "HERPLAATST"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "GEPLAATST"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "UITGEBREID"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "HERVERBONDEN"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "AANGEMAAKT"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "GEBORGEN"
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr "AFGEKAPT"
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr "INODE GEWIST"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "AFGEBROKEN"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr "GESPLITST"
+
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr "VERDERGAAND"
+
+#: e2fsck/problem.c:93
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "MEERVOUDIG-GECLAIMDE BLOKKEN GEKLOOND"
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr "BESTAND VERWIJDERD"
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr "ONDERDRUKT"
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr "LOSGEMAAKT"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "'HTREE'-INDEX GEWIST"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "ZAL HERAANMAKEN"
+
+#. @-expanded: block bitmap for group %g is not in group.  (block %b)\n
+#: e2fsck/problem.c:107
+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:111
+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:116
+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 correct ext2\n
+#. @-expanded: filesystem.  If the device is valid and it really contains an ext2\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 %S <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:122
+#, c-format
+msgid ""
+"\n"
+"The @S could not be read or does not describe a correct ext2\n"
+"@f.  If the @v is valid and it really contains an ext2\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 %S <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Het superblok is onleesbaar of omschrijft geen geldig ext2-bestandssysteem.\n"
+"Als het apparaat juist is en werkelijk een ext2-bestandssysteem bevat\n"
+"(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 %S <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:131
+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:138
+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:145
+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:150
+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:155
+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:160
+#, 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; een reservekopie is\n"
+"mogelijk nog in orde.\n"
+"\n"
+
+#. @-expanded: Corruption found in superblock.  (%s = %N).\n
+#: e2fsck/problem.c:169
+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:174
+#, 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:179
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "Inodetal in superblok is %i, zou %j moeten zijn.\n"
+
+#: e2fsck/problem.c:183
+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:188
+#, 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:193
+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:198
+msgid "Can't find external @j\n"
+msgstr "Kan geen extern journal vinden.\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:203
+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:208
+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:213
+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:221
+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 %s is present.\n
+#: e2fsck/problem.c:226
+#, c-format
+msgid "@S has_@j flag is clear, but a @j %s is present.\n"
+msgstr "Journal-vlag in superblok is niet gezet, maar er is wel een journal %s.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:231
+msgid "@S needs_recovery flag is set, but no @j is present.\n"
+msgstr "Reddingsvlag 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:236
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "Reddingsvlag in superblok is niet gezet, maar het journal bevat gegevens.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:241
+msgid "Clear @j"
+msgstr "Journal wissen"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.  
+#: e2fsck/problem.c:246 e2fsck/problem.c:695
+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:251
+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:256
+msgid "@I %B (%b) found in @o @i %i.\n"
+msgstr "Ongeldig blok %B (%b) gevonden in verweesde inode %i.\n"
+
+#. @-expanded: Already cleared %B (%b) found in orphaned inode %i.\n
+#: e2fsck/problem.c:261
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Reeds-gewist blok %B (%b) gevonden in verweesde inode %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:266
+#, 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:271
+#, 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:276
+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:281
+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:286
+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:291
+#, 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:296
+#, 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:301
+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:307
+msgid "Run @j anyway"
+msgstr "Journal toch afspelen"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:312
+msgid "Recovery flag not set in backup @S, so running @j anyway.\n"
+msgstr ""
+"Reservekopieën van het superblok kennen geen reddingsvlag;\n"
+"het niet-lege journal wordt daarom afgespeeld.\n"
+
+#. @-expanded: Backing up journal inode block information.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:317
+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:322
+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:328
+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:333
+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:338
+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:343
+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:347
+#, 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:352
+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:357
+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:362
+#, 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:367
+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:372
+msgid "Last @g @b @B uninitialized.  "
+msgstr "Blok-bitkaart van laatste groepsbeschrijver is ongeïnitialiseerd.  "
+
+#: e2fsck/problem.c:377
+#, 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:381
+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)  
+#: e2fsck/problem.c:386
+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)  "
+msgstr ""
+"Laatste aankoppelingstijd ligt volgens het superblok in de toekomst.\n"
+"    (Maar minder dan een dag; vermoedelijk is de hardwareklok onjuist ingesteld.)  "
+
+#. @-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).  
+#: e2fsck/problem.c:392
+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).  "
+msgstr ""
+"Laatste schrijftijd ligt volgens het superblok in de toekomst.\n"
+"    (Maar minder dan een dag; vermoedelijk is de hardwareklok onjuist ingesteld.)  "
+
+#. @-expanded: One or more block group descriptor checksums are invalid.  
+#: e2fsck/problem.c:398
+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:403
+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:408
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Het aantal vrije blokken is op %c gezet (was %b)\n"
+
+#. @-expanded: Making quota inode %i (%Q) hidden.\n
+#: e2fsck/problem.c:413
+msgid "Making @q @i %i (%Q) hidden.\n"
+msgstr "De quota-inode %i (%Q) wordt verborgen.\n"
+
+#. @-expanded: superblock has invalid MMP block.  
+#: e2fsck/problem.c:418
+msgid "@S has invalid MMP block.  "
+msgstr "Superblok heeft ongeldig MMP-blok.  "
+
+#. @-expanded: superblock has invalid MMP magic.  
+#: e2fsck/problem.c:423
+msgid "@S has invalid MMP magic.  "
+msgstr "Superblok heeft ongeldig magisch getal voor MMP.  "
+
+#: e2fsck/problem.c:428
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2(): %m\n"
+
+#: e2fsck/problem.c:433
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc(): %m\n"
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:440
+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:444
+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:449
+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:454
+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:459
+#, 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:464
+#, 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:469
+#, 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:474
+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:479
+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:484
+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:489
+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:494
+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:499
+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:504
+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:509
+msgid "@I %B (%b) in @i %i.  "
+msgstr "Ongeldig blok %B (%b) in inode %i.  "
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.  
+#: e2fsck/problem.c:514
+msgid "%B (%b) overlaps @f metadata in @i %i.  "
+msgstr "Blok %B (%b) overlapt metadata van bestandssysteem in inode %i.  "
+
+#. @-expanded: inode %i has illegal block(s).  
+#: e2fsck/problem.c:519
+#, 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:524
+#, 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:529
+msgid "@I %B (%b) in bad @b @i.  "
+msgstr "Ongeldig blok %B (%b) in slechteblokken-inode.  "
+
+#. @-expanded: Bad block inode has illegal block(s).  
+#: e2fsck/problem.c:534
+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:539
+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:544
+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:549
+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:556
+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:561
+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:567
+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:572
+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:578
+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:583
+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:589
+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:595
+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:600
+#, 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:605
+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:610
+#, 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:615
+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:620
+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:625 e2fsck/problem.c:1474
+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:630
+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:635
+#, 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:640
+#, 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:645
+#, 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:650
+#, 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:655
+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:660
+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:666
+#, 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:674
+#, 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:679
+#, 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) heeft de onveranderbaar-\n"
+"of de alleen-toevoegenvlag gezet (inode %i).  "
+
+#. @-expanded: inode %i has compression flag set on filesystem without compression support.  
+#: e2fsck/problem.c:685
+#, c-format
+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.  "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.  
+#: e2fsck/problem.c:690
+#, 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:700
+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:705
+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:710
+#, 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:716
+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:721
+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:726
+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:731
+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:736
+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:741
+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:746
+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:751
+msgid "@a @b %b has h_@bs > 1.  "
+msgstr "Blok %b met uitgebreide kenmerken heeft h_blocks > 1.  "
+
+#. @-expanded: error allocating extended attribute block %b.  
+#: e2fsck/problem.c:756
+msgid "@A @a @b %b.  "
+msgstr "Fout tijdens reserveren van blok %b met uitgebreide kenmerken.  "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).  
+#: e2fsck/problem.c:761
+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:766
+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:771
+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:776
+#, 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:780
+msgid "%B (%b) causes @d to be too big.  "
+msgstr "Blok %B (%b) maakt map te groot.  "
+
+#: e2fsck/problem.c:785
+msgid "%B (%b) causes file to be too big.  "
+msgstr "Blok %B (%b) maakt bestand te groot.  "
+
+#: e2fsck/problem.c:790
+msgid "%B (%b) causes symlink to be too big.  "
+msgstr "Blok %B (%b) maakt symbolische koppeling te groot.  "
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:795
+#, 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:800
+#, 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:805
+#, 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:810
+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:815
+#, 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:820
+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:825
+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:831
+#, 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:836
+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:841
+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:846
+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:851
+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:856
+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:861
+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:866
+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:871
+#, 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:876
+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:882
+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:887
+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:892
+#, 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:897
+#, 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-functievlag niet gezet.\n"
+
+#. @-expanded: inode %i missing EXTENT_FL, but is in extents format\n
+#: e2fsck/problem.c:902
+#, 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:907
+#, 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:912
+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:916
+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:921
+#, c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Fout tijdens converteren van subclusterblokken-bitkaart: %m\n"
+
+#. @-expanded: quota inode is not regular file.  
+#: e2fsck/problem.c:926
+msgid "@q @i is not regular file.  "
+msgstr "Quota-inode is geen normaal bestand.  "
+
+#. @-expanded: quota inode is not in use, but contains data.  
+#: e2fsck/problem.c:931
+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:936
+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:941
+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:946
+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: 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:953
+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:959
+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: \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:967
+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:973
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "Meervoudig-geclaimd blok (of blokken) in inode %i:"
+
+#: e2fsck/problem.c:988
+#, 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:993
+#, 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:998
+#, 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:1003 e2fsck/problem.c:1318
+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:1008
+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:1014
+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:1019
+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:1025
+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:1030
+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:1035
+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:1040
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"Meervoudig-geclaimde blokken zijn al gekloond of opnieuw toegekend.\n"
+"\n"
+
+#: e2fsck/problem.c:1053
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Kan bestand niet klonen: %m\n"
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1059
+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:1064
+#, 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:1069
+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:1074
+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:1079
+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:1084
+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:1089
+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:1094
+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:1099
+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:1104
+#, 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:1109
+#, 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:1114
+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:1119
+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:1124
+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:1129
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "'i_file_acl' @F is %If, moet nul zijn.\n"
+
+#. @-expanded: i_dir_acl for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1134
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr "'i_dir_acl' @F is %Id, moet nul zijn.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1139
+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:1144
+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:1149
+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:1154
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "Map-inode %i, blok %B, positie %N: map is beschadigd\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1159
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "Map-inode %i, blok %B, positie %N: bestandsnaam is te lang\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.  
+#: e2fsck/problem.c:1164
+msgid "@d @i %i has an unallocated %B.  "
+msgstr "Map-inode %i bevat een ongereserveerd blok %B.  "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1169
+#, 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:1174
+#, 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:1179
+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:1184
+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:1189
+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:1194
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E is een duplicaat-'..'-item.\n"
+
+#: e2fsck/problem.c:1199 e2fsck/problem.c:1499
+#, c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "*Interne fout*: 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:1204
+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:1209
+#, 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:1214
+#, 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:1219
+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:1224
+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:1229
+#, 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:1234
+#, 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:1239
+#, 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:1244
+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:1249
+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:1254
+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:1259
+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:1264
+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:1269
+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:1274
+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:1279
+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:1284
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr "Bestandssysteem bevat grote bestanden, maar heeft in het superblok niet de 'large-file'-vlag gezet.\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B not referenced\n
+#: e2fsck/problem.c:1289
+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:1294
+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:1299
+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:1304
+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:1309
+msgid "@n @h %d (%q).  "
+msgstr "Ongeldige 'htree'-map-inode %d (%q).  "
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1313
+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:1323
+#, 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:1328
+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:1333
+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:1338
+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:1343
+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:1348
+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:1353
+#, 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:1358
+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:1363
+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:1368
+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:1372
+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:1377
+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:1382
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "'i_file_acl' @F is %N, moet nul zijn.\n"
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1389
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Stap 3: Controle van verbindingen tussen mappen\n"
+
+#. @-expanded: root inode not allocated.  
+#: e2fsck/problem.c:1394
+msgid "@r not allocated.  "
+msgstr "Hoofd-inode is niet gereserveerd.  "
+
+#. @-expanded: No room in lost+found directory.  
+#: e2fsck/problem.c:1399
+msgid "No room in @l @d.  "
+msgstr "Geen ruimte meer in /lost+found.  "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1404
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "Onverbonden map-inode %i (%p)\n"
+
+#. @-expanded: /lost+found not found.  
+#: e2fsck/problem.c:1409
+msgid "/@l not found.  "
+msgstr "/lost+found niet gevonden.  "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1414
+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:1419
+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:1424
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Kan /lost+found niet uitbreiden: %m\n"
+
+#: e2fsck/problem.c:1429
+#, 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:1434
+#, 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:1439
+#, 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:1444
+#, 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:1449
+#, 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:1454
+#, 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:1459
+#, 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:1464
+#, 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:1469
+#, 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:1479
+#, 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:1484
+#, 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:1489
+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:1494
+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:1504
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/lost+found (inode %i) is geen map\n"
+
+#: e2fsck/problem.c:1511
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Stap 3A: Optimalisatie van mappen\n"
+
+#: e2fsck/problem.c:1516
+#, 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:1521
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Optimaliseren van map %q (%d) is mislukt: %m\n"
+
+#: e2fsck/problem.c:1526
+msgid "Optimizing directories: "
+msgstr "Optimaliseren van mappen: "
+
+#: e2fsck/problem.c:1543
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Stap 4: Controle van verwijzingsaantallen\n"
+
+#. @-expanded: unattached zero-length inode %i.  
+#: e2fsck/problem.c:1548
+#, c-format
+msgid "@u @z @i %i.  "
+msgstr "Onverbonden inode %i met lengte nul.  "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1553
+#, 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:1558
+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:1562
+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: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1572
+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:1577
+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:1582
+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:1587
+msgid "@b @B differences: "
+msgstr "Blok-bitkaart-verschillen: "
+
+#. @-expanded: inode bitmap differences: 
+#: e2fsck/problem.c:1607
+msgid "@i @B differences: "
+msgstr "Inode-bitkaart-verschillen: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1627
+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:1632
+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:1637
+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:1642
+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:1647
+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:1652
+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:1658
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "*Interne fout*: einde van bitmap is gefoezeld (%N)\n"
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:1663
+#, 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:1668
+#, 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:1693
+#, 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:1698
+#, 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: Recreate journal
+#: e2fsck/problem.c:1705
+msgid "Recreate @j"
+msgstr "Journal heraanmaken"
+
+#: e2fsck/problem.c:1710
+msgid "Update quota info for quota type %N"
+msgstr "Quota-informatie bijwerken voor quotatype %N"
+
+#: e2fsck/problem.c:1829
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Onbekende foutcode (0x%x)!\n"
+
+#: e2fsck/problem.c:1954 e2fsck/problem.c:1958
+msgid "IGNORED"
+msgstr "GENEGEERD"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Gebruikt geheugen: %d, 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: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:188
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr "tijdens aanroep van ext2fs_block_iterate() voor inode %d"
+
+#: e2fsck/super.c:211
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %d"
+msgstr "tijdens aanroep van ext2fs_adjust_ea_refcount2() voor inode %d"
+
+#: e2fsck/super.c:272
+msgid "Truncating"
+msgstr "Afkappen"
+
+#: e2fsck/super.c:273
+msgid "Clearing"
+msgstr "Wissen"
+
+#: e2fsck/unix.c:74
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfvtDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] device\n"
+msgstr ""
+"Gebruik:  %s [-cdfknpstvyDFSV] [-b superblok] [-B blokgrootte]\n"
+"          [-C bestandsdescriptor] [-E uitgebreide_opties]\n"
+"          [-I inodebufferblokken] [-j extern_journal]\n"
+"          [-l|-L slechte_blokkenbestand] [-P procesinode-grootte]\n"
+"          apparaat\n"
+
+#: e2fsck/unix.c:80
+#, c-format
+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:86
+#, c-format
+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"
+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 slechte_blokkenbestand   Deze lijst aan de slechte_blokkenlijst toevoegen.\n"
+" -L slechte_blokkenbestand   Deze slechte_blokkenlijst gebruiken.\n"
+
+#: e2fsck/unix.c:131
+#, 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:157
+#, 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:161
+#, 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:166
+#, 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:171
+#, 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:179
+msgid "             Extent depth histogram: "
+msgstr "             Extents-dieptehistogram: "
+
+#: e2fsck/unix.c:188
+#, 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:192
+#, 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:194
+#, 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:196
+#, 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:198
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u map\n"
+msgstr[1] "%12u mappen\n"
+
+#: e2fsck/unix.c:200
+#, 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:203
+#, 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:205
+#, 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:207
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u koppeling\n"
+msgstr[1] "%12u koppelingen\n"
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u symbolische koppeling"
+msgstr[1] "%12u symbolische koppelingen"
+
+#: e2fsck/unix.c:211
+#, 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:215
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u socket\n"
+msgstr[1] "%12u sockets\n"
+
+#: e2fsck/unix.c:219
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u bestand\n"
+msgstr[1] "%12u bestanden\n"
+
+#: e2fsck/unix.c:232 misc/badblocks.c:983 misc/tune2fs.c:1985 misc/util.c:147
+#: resize/main.c:259
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "tijdens bepalen of %s aangekoppeld is."
+
+#: e2fsck/unix.c:252
+#, c-format
+msgid "Warning!  %s is %s.\n"
+msgstr "Waarschuwing!  %s is %s.\n"
+
+#: e2fsck/unix.c:259
+#, c-format
+msgid "%s is %s.\n"
+msgstr "%s is %s.\n"
+
+#: e2fsck/unix.c:262
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Kan niet doorgaan.  Gestopt.\n"
+"\n"
+
+#: e2fsck/unix.c:264
+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:269
+msgid "Do you really want to continue"
+msgstr "Wilt u echt doorgaan"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "check aborted.\n"
+msgstr "De controle is afgebroken.\n"
+
+#: e2fsck/unix.c:361
+msgid " contains a file system with errors"
+msgstr " bevat een bestandssysteem met fouten"
+
+#: e2fsck/unix.c:363
+msgid " was not cleanly unmounted"
+msgstr " is niet goed ontkoppeld"
+
+#: e2fsck/unix.c:365
+msgid " primary superblock features different from backup"
+msgstr " het primaire superblok heeft andere functievlaggen gezet dan de reserveblokken"
+
+#: e2fsck/unix.c:369
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " is %u keer aangekoppeld geweest zonder controle"
+
+#: e2fsck/unix.c:376
+msgid " has filesystem last checked time in the future"
+msgstr " is schijnbaar het laatst gecontroleerd in de toekomst"
+
+#: e2fsck/unix.c:382
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " is gedurende %u dagen niet gecontroleerd"
+
+#: e2fsck/unix.c:391
+msgid ", check forced.\n"
+msgstr ", gedwongen controle.\n"
+
+#: e2fsck/unix.c:424
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: schoon, %u/%u bestanden, %llu/%llu blokken"
+
+#: e2fsck/unix.c:443
+msgid " (check deferred; on battery)"
+msgstr " (controle is uitgesteld; computer loopt op accu)"
+
+#: e2fsck/unix.c:446
+msgid " (check after next mount)"
+msgstr " (controle bij volgende aankoppeling)"
+
+#: e2fsck/unix.c:448
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (controle na %ld aankoppelingen)"
+
+#: e2fsck/unix.c:598
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "FOUT: kan /dev/null niet openen (%s)\n"
+
+#: e2fsck/unix.c:667
+#, c-format
+msgid "Invalid EA version.\n"
+msgstr "Ongeldige versie van uitgebreide kenmerken.\n"
+
+#: e2fsck/unix.c:694
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Onbekende uitgebreide optie: %s\n"
+
+#: e2fsck/unix.c:719
+#, 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:788
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Fout tijdens valideren van bestandsdesriptor %d: %s\n"
+
+#: e2fsck/unix.c:792
+msgid "Invalid completion information file descriptor"
+msgstr "Ongeldige completeringsinformatie voor bestandsdescriptor."
+
+#: e2fsck/unix.c:807
+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:828
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr "De optie '-t' wordt niet ondersteund door deze versie van e2fsck.\n"
+
+#: e2fsck/unix.c:859 e2fsck/unix.c:931 misc/tune2fs.c:811 misc/tune2fs.c:1100
+#: misc/tune2fs.c:1118
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Kan apparaat '%s' niet vinden."
+
+#: e2fsck/unix.c:910
+msgid "The -n and -D options are incompatible."
+msgstr "De opties '-n' en '-D' gaan niet samen."
+
+#: e2fsck/unix.c:915
+msgid "The -n and -c options are incompatible."
+msgstr "De opties '-n' en '-c' gaan niet samen."
+
+#: e2fsck/unix.c:920
+msgid "The -n and -l/-L options are incompatible."
+msgstr "De opties '-n' en '-l' of '-L' gaan niet samen."
+
+#: e2fsck/unix.c:974
+#, c-format
+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:1022
+#, 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:1031
+#, 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:1120
+#, 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:1137 e2fsck/unix.c:1142
+msgid "while checking MMP block"
+msgstr "tijdens controleren van MMP-blok"
+
+#: e2fsck/unix.c:1144 misc/tune2fs.c:1912
+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"
+
+#: e2fsck/unix.c:1194
+#, c-format
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Fout: de ext2fs-bibliotheek is te oud!\n"
+
+#: e2fsck/unix.c:1202
+msgid "while trying to initialize program"
+msgstr "tijdens programma-initialisatie"
+
+#: e2fsck/unix.c:1225
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "    gebruik makend van %s, %s\n"
+
+#: e2fsck/unix.c:1237
+msgid "need terminal for interactive repairs"
+msgstr "voor interactieve reparaties is een terminal vereist"
+
+#: e2fsck/unix.c:1290
+#, 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:1292
+msgid "Superblock invalid,"
+msgstr "Superblok is ongeldig --"
+
+#: e2fsck/unix.c:1293
+msgid "Group descriptors look bad..."
+msgstr "Groepsbeschrijvers zien er slecht uit --"
+
+#: e2fsck/unix.c:1303
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s tijdens gebruik van de reservekopieblokken"
+
+#: e2fsck/unix.c:1307
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: er wordt teruggevallen op het eerste superblok\n"
+
+#: e2fsck/unix.c:1335
+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:1341
+msgid "Could this be a zero-length partition?\n"
+msgstr "Is dit misschien een partitie met lengte nul?\n"
+
+#: e2fsck/unix.c:1344
+#, 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:1349
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Mogelijk een niet-bestaand apparaat of een swap-apparaat?\n"
+
+#: e2fsck/unix.c:1352
+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:1355
+msgid "Possibly non-existent device?\n"
+msgstr "Mogelijk een niet-bestaand apparaat?\n"
+
+#: e2fsck/unix.c:1358
+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:1423
+msgid "Get a newer version of e2fsck!"
+msgstr "Installeer een nieuwere versie van e2fsck!"
+
+#: e2fsck/unix.c:1467
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr "tijdens controle van het ext3-journal van %s"
+
+#: e2fsck/unix.c:1478
+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:1491
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "Kan superblokvlaggen van %s niet zetten.\n"
+
+#: e2fsck/unix.c:1497
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr "tijdens afspelen van het ext3-journal van %s"
+
+#: e2fsck/unix.c:1521
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "Bestandssysteem %s heeft functies ingeschakeld die niet ondersteund worden:"
+
+#: e2fsck/unix.c:1536
+#, c-format
+msgid "%s: warning: compression support is experimental.\n"
+msgstr "%s: Waarschuwing: compressie-ondersteuning is nog experimenteel.\n"
+
+#: e2fsck/unix.c:1542
+#, c-format
+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"
+
+#: e2fsck/unix.c:1594
+#, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "%s: %s tijdens lezen van slechteblokken-inode\n"
+
+#: e2fsck/unix.c:1597
+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:1638
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Aanmaken van journal (%d blokken): "
+
+#: e2fsck/unix.c:1648
+msgid " Done.\n"
+msgstr " voltooid.\n"
+
+#: e2fsck/unix.c:1649
+msgid ""
+"\n"
+"*** journal has been re-created - filesystem is now ext3 again ***\n"
+msgstr ""
+"\n"
+"*** journal is opnieuw aangemaakt -- het bestandssysteem is nu weer ext3 ***\n"
+
+#: e2fsck/unix.c:1672
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "E2fsck wordt opnieuw gestart vanaf het begin...\n"
+
+#: e2fsck/unix.c:1676
+msgid "while resetting context"
+msgstr "tijdens wissen van de context"
+
+#: e2fsck/unix.c:1683
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: 'e2fsck' is geannuleerd.\n"
+
+#: e2fsck/unix.c:1688
+msgid "aborted"
+msgstr "afgebroken"
+
+#: e2fsck/unix.c:1700 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** BESTANDSSYSTEEM IS VERANDERD *****\n"
+
+#: e2fsck/unix.c:1704
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr "%s: ***** HERSTART UW SYSTEEM *****\n"
+
+#: e2fsck/unix.c:1712 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/unix.c:1752
+msgid "while setting block group checksum info"
+msgstr "tijdens zetten van controlesom van blokgroep"
+
+#: e2fsck/util.c:190 misc/util.c:70
+msgid "yY"
+msgstr "jJyY"
+
+#: e2fsck/util.c:191
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:205
+msgid "<y>"
+msgstr "<j>"
+
+#: e2fsck/util.c:207
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:209
+msgid " (y/n)"
+msgstr " (j/n)"
+
+#: e2fsck/util.c:223
+msgid "cancelled!\n"
+msgstr "geannuleerd!\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:238
+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:240
+msgid "no\n"
+msgstr "nee\n"
+
+#: e2fsck/util.c:250
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? nee\n"
+"\n"
+
+#: e2fsck/util.c:254
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? ja\n"
+"\n"
+
+#: e2fsck/util.c:258
+msgid "yes"
+msgstr "ja"
+
+#: e2fsck/util.c:258
+msgid "no"
+msgstr "nee"
+
+#: e2fsck/util.c:273
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps(): ongeldige bitkaartblokken voor %s"
+
+#: e2fsck/util.c:278
+msgid "reading inode and block bitmaps"
+msgstr "lezen van inode- en blok-bitkaarten"
+
+#: e2fsck/util.c:286
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "tijdens herlezen van bitkaarten voor %s"
+
+#: e2fsck/util.c:298
+msgid "writing block and inode bitmaps"
+msgstr "schrijven van blok- en inode-bitkaarten"
+
+#: e2fsck/util.c:303
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "tijdens herschrijven van blok- en inode-bitkaarten voor %s"
+
+#: e2fsck/util.c:315
+#, 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:396
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Gebruikt geheugen: %luk/%luk (%luk/%luk), "
+
+#: e2fsck/util.c:400
+#, c-format
+msgid "Memory used: %lu, "
+msgstr "Gebruikt geheugen: %lu, "
+
+#: e2fsck/util.c:407
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "tijd: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:412
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "verlopen tijd: %6.3f\n"
+
+#: e2fsck/util.c:447 e2fsck/util.c:461
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "tijdens lezen van inode %lu in %s"
+
+#: e2fsck/util.c:475 e2fsck/util.c:488
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "tijdens schrijven van inode %lu in %s"
+
+#: e2fsck/util.c:637
+msgid "while allocating zeroizing buffer"
+msgstr "tijdens reserveren van nulmakingsbuffer"
+
+#: e2fsck/util.c:785
+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:69
+msgid "done                                                 \n"
+msgstr "voltooid                                             \n"
+
+#: misc/badblocks.c:92
+#, 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"
+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 [...]]]  [-fnsvw]\n"
+"          apparaat  [eindblok [beginblok]]\n"
+
+#: misc/badblocks.c:103
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+"%s: De opties '-n' en '-w' gaan niet samen.\n"
+"\n"
+
+#: misc/badblocks.c:218
+#, 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:322
+msgid "Testing with random pattern: "
+msgstr "Test wordt uitgevoerd met dit willekeurige patroon: "
+
+#: misc/badblocks.c:340
+msgid "Testing with pattern 0x"
+msgstr "Test wordt uitgevoerd met patroon 0x"
+
+#: misc/badblocks.c:372 misc/badblocks.c:445
+msgid "during seek"
+msgstr "tijdens 'seek'"
+
+#: misc/badblocks.c:383
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Vreemde waarde (%ld) bij leespoging\n"
+
+#: misc/badblocks.c:469
+msgid "during ext2fs_sync_device"
+msgstr "tijdens leegmaken van de buffers"
+
+#: misc/badblocks.c:489 misc/badblocks.c:749
+msgid "while beginning bad block list iteration"
+msgstr "tijdens voorbereiding van het langslopen van de lijst met slechte blokken"
+
+#: misc/badblocks.c:503 misc/badblocks.c:602 misc/badblocks.c:759
+msgid "while allocating buffers"
+msgstr "tijdens reserveren van buffers"
+
+#: misc/badblocks.c:507
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Controleren van blokken %lu tot %lu\n"
+
+#: misc/badblocks.c:512
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Zoeken naar slechte blokken in alleen-lezen-modus\n"
+
+#: misc/badblocks.c:521
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Zoeken naar slechte blokken (alleen-lezen-test): "
+
+#: misc/badblocks.c:528 misc/badblocks.c:634 misc/badblocks.c:676
+#: misc/badblocks.c:822
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Te veel slechte blokken -- controle is afgebroken\n"
+
+#: misc/badblocks.c:609
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Zoeken naar slechte blokken in lezen-en-schrijven-modus\n"
+
+#: misc/badblocks.c:611 misc/badblocks.c:772
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Van blok %lu tot %lu\n"
+
+#: misc/badblocks.c:666
+msgid "Reading and comparing: "
+msgstr "Lezen en vergelijken: "
+
+#: misc/badblocks.c:771
+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:777
+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:784
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Interrupt ontvangen, bezig met opschonen...\n"
+
+#: misc/badblocks.c:867
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "tijdens schrijven van testpatroon, blok %lu"
+
+#: misc/badblocks.c:988 misc/util.c:152
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s is aangekoppeld; "
+
+#: misc/badblocks.c:990
+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:995
+msgid "it's not safe to run badblocks!\n"
+msgstr "het is niet veilig om 'badblocks' uit te voeren!\n"
+
+#: misc/badblocks.c:1000 misc/util.c:163
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s wordt blijkbaar gebruikt door het systeem; "
+
+#: misc/badblocks.c:1003
+msgid "badblocks forced anyway.\n"
+msgstr "maar 'badblocks' wordt gedwongen uitgevoerd.\n"
+
+#: misc/badblocks.c:1023
+#, c-format
+msgid "invalid %s - %s"
+msgstr "ongeldige %s: %s"
+
+#: misc/badblocks.c:1133
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "kan geen geheugen reserveren voor testpatroon -- %s"
+
+#: misc/badblocks.c:1163
+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:1169
+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:1183
+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:1189
+msgid "while trying to determine device size"
+msgstr "tijdens bepalen van apparaatgrootte"
+
+#: misc/badblocks.c:1194
+msgid "last block"
+msgstr "laatste blok"
+
+#: misc/badblocks.c:1200
+msgid "first block"
+msgstr "eerste blok"
+
+#: misc/badblocks.c:1203
+#, c-format
+msgid "invalid starting block (%lu): must be less than %lu"
+msgstr "ongeldig beginblok: %lu -- moet kleiner dan %lu zijn"
+
+#: misc/badblocks.c:1259
+msgid "while creating in-memory bad blocks list"
+msgstr "tijdens opstellen van lijst van slechte blokken in geheugen"
+
+#: misc/badblocks.c:1274
+msgid "while adding to in-memory bad block list"
+msgstr "tijdens toevoegen aan lijst van slechte blokken in geheugen"
+
+#: misc/badblocks.c:1298
+#, 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:86
+#, c-format
+msgid "Usage: %s [-RVf] [-+=AaCcDdeijsSu] [-v version] files...\n"
+msgstr "Gebruik:  %s [-RVf] [-+=AaCcDdeijsSu] [-v VERSIE] BESTAND...\n"
+
+#: misc/chattr.c:155
+#, c-format
+msgid "bad version - %s\n"
+msgstr "ongeldige versie: %s\n"
+
+#: misc/chattr.c:201 misc/lsattr.c:116
+#, c-format
+msgid "while trying to stat %s"
+msgstr "tijdens opvragen van de status van %s"
+
+#: misc/chattr.c:208
+#, c-format
+msgid "while reading flags on %s"
+msgstr "tijdens lezen van vlaggen op %s"
+
+#: misc/chattr.c:213 misc/chattr.c:225
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Vlaggen van %s gezet als "
+
+#: misc/chattr.c:234
+#, c-format
+msgid "while setting flags on %s"
+msgstr "tijdens zetten van vlaggen op %s"
+
+#: misc/chattr.c:242
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Versie van %s gezet als %lu\n"
+
+#: misc/chattr.c:246
+#, c-format
+msgid "while setting version on %s"
+msgstr "tijdens zetten van versie op %s"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Kan geen padvariabele reserveren in chattr_dir_proc()"
+
+#: misc/chattr.c:306
+msgid "= is incompatible with - and +\n"
+msgstr "'=' gaat niet samen met '-' en '+'\n"
+
+#: misc/chattr.c:314
+msgid "Must use '-v', =, - or +\n"
+msgstr "Gebruik '-v', '=', '-' of '+'.\n"
+
+#: misc/dumpe2fs.c:55
+#, c-format
+msgid "Usage: %s [-bfhixV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Gebruik:  %s [-bfhixV] [-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:196
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Groep %lu: (Blokken "
+
+#: misc/dumpe2fs.c:204
+#, c-format
+msgid "  Checksum 0x%04x"
+msgstr "  Controlesom is 0x%04x"
+
+#: misc/dumpe2fs.c:206
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (0x%04x WERD VERWACHT)"
+
+#: misc/dumpe2fs.c:207
+#, c-format
+msgid ", unused inodes %u\n"
+msgstr ", %u ongebruikte inodes\n"
+
+#: misc/dumpe2fs.c:212
+#, c-format
+msgid "  %s superblock at "
+msgstr "  %s superblok op "
+
+#: misc/dumpe2fs.c:213
+msgid "Primary"
+msgstr "Primair"
+
+#: misc/dumpe2fs.c:213
+msgid "Backup"
+msgstr "Reservekopie"
+
+#: misc/dumpe2fs.c:217
+#, c-format
+msgid ", Group descriptors at "
+msgstr ", Groepsbeschrijvers op "
+
+#: misc/dumpe2fs.c:221
+#, c-format
+msgid ""
+"\n"
+"  Reserved GDT blocks at "
+msgstr ""
+"\n"
+"  Blokken voor groepsbeschrijverstabel gereserveerd op "
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " Group descriptor at "
+msgstr " Groepsbeschrijver op "
+
+#: misc/dumpe2fs.c:234
+msgid "  Block bitmap at "
+msgstr "  Blok-bitkaart op "
+
+#: misc/dumpe2fs.c:238
+msgid ", Inode bitmap at "
+msgstr ", Inode-bitkaart op "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+"  Inode table at "
+msgstr ""
+"\n"
+"  Inodetabel op "
+
+#: misc/dumpe2fs.c:248
+#, 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:255
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u ongebruikte inodes\n"
+
+#: misc/dumpe2fs.c:258
+msgid "  Free blocks: "
+msgstr "  Vrije blokken: "
+
+#: misc/dumpe2fs.c:269
+msgid "  Free inodes: "
+msgstr "  Vrije inodes: "
+
+#: misc/dumpe2fs.c:300
+msgid "while printing bad block list"
+msgstr "tijdens printen van lijst van slechte blokken"
+
+#: misc/dumpe2fs.c:306
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Slechte blokken: %u"
+
+#: misc/dumpe2fs.c:333 misc/tune2fs.c:306
+msgid "while reading journal inode"
+msgstr "tijdens lezen van journal-inode"
+
+#: misc/dumpe2fs.c:339
+msgid "while opening journal inode"
+msgstr "tijdens openen van journal-inode"
+
+#: misc/dumpe2fs.c:345
+msgid "while reading journal super block"
+msgstr "tijdens lezen van journal-superblok"
+
+#: misc/dumpe2fs.c:355
+#, c-format
+msgid "Journal features:        "
+msgstr "Journal-functies:         "
+
+#: misc/dumpe2fs.c:368
+msgid "Journal size:             "
+msgstr "Grootte van journal:      "
+
+#: misc/dumpe2fs.c:379
+#, c-format
+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"
+
+#: misc/dumpe2fs.c:386
+#, c-format
+msgid "Journal errno:            %d\n"
+msgstr "Journal-foutmnummer:      %d\n"
+
+#: misc/dumpe2fs.c:401 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "tijdens lezen van journal-superblok"
+
+#: misc/dumpe2fs.c:409
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Kan magische getallen van journal-superblok niet vinden"
+
+#: misc/dumpe2fs.c:413
+#, c-format
+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"
+
+#: misc/dumpe2fs.c:426
+#, c-format
+msgid "Journal users:            %s\n"
+msgstr "Journal-gebruikers:       %s\n"
+
+#: misc/dumpe2fs.c:442 misc/mke2fs.c:666 misc/tune2fs.c:1137
+#, c-format
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Kan geen geheugen reserveren om opties te ontleden!\n"
+
+#: misc/dumpe2fs.c:468
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Ongeldig superblok opgegeven: %s\n"
+
+#: misc/dumpe2fs.c:483
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Ongeldige blokgrootte opgegeven: %s\n"
+
+#: misc/dumpe2fs.c:494
+#, 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:554 misc/mke2fs.c:1555
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tgebruik makend van %s\n"
+
+#: misc/dumpe2fs.c:590 misc/e2image.c:1326 misc/tune2fs.c:1923
+#: resize/main.c:317
+#, c-format
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Kan geen geldig bestandssysteem-superblok vinden.\n"
+
+#: misc/dumpe2fs.c:618
+#, c-format
+msgid ""
+"\n"
+"%s: %s: error reading bitmaps: %s\n"
+msgstr ""
+"\n"
+"%s: %s: fout tijdens lezen van bitkaarten: %s\n"
+
+#: misc/e2image.c:90
+#, c-format
+msgid "Usage: %s [-rsIQa] device image_file\n"
+msgstr "Gebruik:  %s [-rsIQa] apparaat imagebestand\n"
+
+#: misc/e2image.c:138
+#, c-format
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Fout: header-grootte is groter dan wrt_size\n"
+
+#: misc/e2image.c:144
+msgid "Couldn't allocate header buffer\n"
+msgstr "Kan geen header-buffer reserveren.\n"
+
+#: misc/e2image.c:174
+msgid "while writing superblock"
+msgstr "tijdens schrijven van superblok"
+
+#: misc/e2image.c:182
+msgid "while writing inode table"
+msgstr "tijdens aanmaken van inodetabel"
+
+#: misc/e2image.c:189
+msgid "while writing block bitmap"
+msgstr "tijdens schrijven van blok-bitkaart"
+
+#: misc/e2image.c:196
+msgid "while writing inode bitmap"
+msgstr "tijdens schrijven van inode-bitkaart"
+
+#: misc/e2image.c:1365
+#, 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/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:2080
+#, 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:803
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Gebruik:  e2label apparaat [nieuw_label]\n"
+
+#: misc/e2undo.c:36
+#, c-format
+msgid "Usage: %s <transaction file> <filesystem>\n"
+msgstr "Gebruik:  %s <transactiebestand> <bestandssysteem>\n"
+
+#: misc/e2undo.c:52
+msgid "Failed to read the file system data \n"
+msgstr "Lezen van bestandssysteemgegevens is mislukt \n"
+
+#: misc/e2undo.c:62 misc/e2undo.c:83 misc/e2undo.c:108 misc/e2undo.c:206
+#, c-format
+msgid "Failed tdb_fetch %s\n"
+msgstr "Lezen van transactiegegevens is mislukt: %s\n"
+
+#: misc/e2undo.c:70
+#, c-format
+msgid "The file system Mount time didn't match %u\n"
+msgstr "aankoppelingstijd van bestandssysteem komt niet overeen met %u uit transactiebestand\n"
+
+#: misc/e2undo.c:89
+msgid "The file system UUID didn't match \n"
+msgstr "UUID's van bestandssysteem en uit transactiebestand komen niet overeen\n"
+
+#: misc/e2undo.c:163
+#, c-format
+msgid "Failed tdb_open %s\n"
+msgstr "Openen van transactiebestand %s is mislukt\n"
+
+#: misc/e2undo.c:169
+#, c-format
+msgid "Error while determining whether %s is mounted.\n"
+msgstr "Fout tijdens bepalen of %s aangekoppeld is.\n"
+
+#: misc/e2undo.c:175
+msgid "e2undo should only be run on unmounted file system\n"
+msgstr "Voer 'e2undo' alleen uit op een niet-aangekoppeld bestandssysteem.\n"
+
+#: misc/e2undo.c:184
+#, c-format
+msgid "Failed to open %s\n"
+msgstr "Openen van %s is mislukt\n"
+
+#: misc/e2undo.c:210
+#, c-format
+msgid "Replayed transaction of size %zd at location %llu\n"
+msgstr "Een transactie met grootte %zd is afgespeeld op locatie %llu.\n"
+
+#: misc/e2undo.c:216
+#, c-format
+msgid "Failed write %s\n"
+msgstr "Schrijven is mislukt: %s\n"
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "WAARSCHUWING: kan %s niet openen: %s\n"
+
+#: misc/fsck.c:353
+#, 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: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 ""
+"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:478
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: niet gevonden\n"
+
+#: misc/fsck.c:594
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: wait: geen dochterprocessen meer?!?\n"
+
+#: misc/fsck.c:616
+#, 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:622
+#, 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:661
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Afgesloten met %s (afsluitwaarde %d).\n"
+
+#: misc/fsck.c:721
+#, 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:742
+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:761
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Kan geen geheugen reserveren voor bestandssysteemsoorten.\n"
+
+#: misc/fsck.c:884
+#, 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:911
+#, 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:967
+msgid "Checking all file systems.\n"
+msgstr "Alle bestandssystemen worden gecontroleerd.\n"
+
+#: misc/fsck.c:1058
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--wachten-- (volgnummer %d)\n"
+
+#: misc/fsck.c:1078
+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:1120
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: te veel apparaten\n"
+
+#: misc/fsck.c:1153 misc/fsck.c:1239
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: te veel argumenten\n"
+
+#: misc/lsattr.c:74
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr "Gebruik:  %s [-RVadlv] [bestand...]\n"
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Tijdens lezen van vlaggen op %s"
+
+#: misc/lsattr.c:91
+#, c-format
+msgid "While reading version on %s"
+msgstr "Tijdens lezen van versie op %s"
+
+#: misc/mke2fs.c:116
+#, 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]\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] [-jnqvDFKSV] device [blocks-count]\n"
+msgstr ""
+"Gebruik:  %s [-b blokgrootte] [-c|-l bestandsnaam] [-C clustergrootte]\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[,...]] [-U UUID]\n"
+"          [-r bestandssysteemversie] [-t bestandssysteemsoort] [-T gebruikstype]\n"
+"          [-E uitgebreide_optie[,...]] [-jnqvDFKSV]  apparaat  [aantal_blokken]\n"
+
+#: misc/mke2fs.c:221
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Uitgevoerde opdracht is: %s\n"
+
+#: misc/mke2fs.c:225
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "tijdens uitvoering van '%s'"
+
+#: misc/mke2fs.c:232
+msgid "while processing list of bad blocks from program"
+msgstr "tijdens verwerken van de gemaakte lijst van slechte blokken"
+
+#: misc/mke2fs.c:259
+#, 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:261
+#, 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:264
+msgid "Aborting....\n"
+msgstr "Gestopt...\n"
+
+#: misc/mke2fs.c:284
+#, 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:303
+msgid "while marking bad blocks as used"
+msgstr "tijdens het markeren van slechte blokken (als zijnde in gebruik)"
+
+#: misc/mke2fs.c:320
+msgid "Writing inode tables: "
+msgstr "Schrijven van inodetabellen: "
+
+#: misc/mke2fs.c:341
+#, 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:355 misc/mke2fs.c:2257 misc/mke2fs.c:2512
+#, c-format
+msgid "done                            \n"
+msgstr "voltooid                        \n"
+
+#: misc/mke2fs.c:366
+msgid "while creating root dir"
+msgstr "tijdens aanmaken van hoofdmap"
+
+#: misc/mke2fs.c:373
+msgid "while reading root inode"
+msgstr "tijdens lezen van hoofd-inode"
+
+#: misc/mke2fs.c:385
+msgid "while setting root inode ownership"
+msgstr "tijdens zetten van eigenaar van hoofd-inode"
+
+#: misc/mke2fs.c:403
+msgid "while creating /lost+found"
+msgstr "tijdens aanmaken van /lost+found"
+
+#: misc/mke2fs.c:410
+msgid "while looking up /lost+found"
+msgstr "tijdens zoeken van /lost+found"
+
+#: misc/mke2fs.c:423
+msgid "while expanding /lost+found"
+msgstr "tijdens uitbreiden van /lost+found"
+
+#: misc/mke2fs.c:438
+msgid "while setting bad block inode"
+msgstr "tijdens zetten van slechteblokken-inode"
+
+#: misc/mke2fs.c:465
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Onvoldoende geheugen tijdens wissen van sectoren %d-%d.\n"
+
+#: misc/mke2fs.c:475
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Waarschuwing: kan blok 0 niet lezen: %s\n"
+
+#: misc/mke2fs.c:491
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Waarschuwing: kan sector %d niet wissen: %s\n"
+
+#: misc/mke2fs.c:507
+msgid "while initializing journal superblock"
+msgstr "tijdens initialiseren van het journal-superblok"
+
+#: misc/mke2fs.c:515
+msgid "Zeroing journal device: "
+msgstr "Nulmaken van journal-apparaat: "
+
+#: misc/mke2fs.c:527
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "tijdens nulmaken van journal-apparaat (blok %llu, nummer %d)"
+
+#: misc/mke2fs.c:545
+msgid "while writing journal superblock"
+msgstr "tijdens schrijven van journal-superblok"
+
+#: misc/mke2fs.c:560
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"Waarschuwing: %llu ongebruikte blokken.\n"
+"\n"
+
+#: misc/mke2fs.c:565
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Bestandssysteemlabel=%s\n"
+
+#: misc/mke2fs.c:568
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Soort besturingssysteem: %s\n"
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Blokgrootte=%u (log=%u)\n"
+
+#: misc/mke2fs.c:574
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Clustergrootte=%u (log=%u)\n"
+
+#: misc/mke2fs.c:578
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Fragmentgrootte=%u (log=%u)\n"
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "'stride'=%u blokken, 'stripe'-breedte=%u blokken\n"
+
+#: misc/mke2fs.c:582
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u inodes, %llu blokken\n"
+
+#: misc/mke2fs.c:584
+#, 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:587
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Eerste gegevensblok=%u\n"
+
+#: misc/mke2fs.c:589
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Hoofdmap-eigenaar=%u:%u\n"
+
+#: misc/mke2fs.c:591
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Maximum aantal bestandssysteemblokken=%lu\n"
+
+#: misc/mke2fs.c:595
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u blokgroepen\n"
+
+#: misc/mke2fs.c:597
+#, c-format
+msgid "%u block group\n"
+msgstr "%u blokgroep\n"
+
+#: misc/mke2fs.c:600
+#, 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:603
+#, 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:605
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u inodes per groep\n"
+
+#: misc/mke2fs.c:612
+#, c-format
+msgid "Superblock backups stored on blocks: "
+msgstr "Superblokreservekopieën opgeslagen in blokken: "
+
+#: misc/mke2fs.c:691 misc/tune2fs.c:1165
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "Ongeldig mmp_update_interval: %s\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Ongeldig argument van 'stride': %s\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Ongeldig argument van 'stripe_width': %s\n"
+
+#: misc/mke2fs.c:743
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Ongeldig argument van 'resize': %s\n"
+
+#: misc/mke2fs.c:750
+#, c-format
+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:774
+#, c-format
+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:801 misc/mke2fs.c:810
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Ongeldige hoofdmap-eigenaar: '%s'\n"
+
+#: misc/mke2fs.c:835
+#, c-format
+msgid "Invalid quotatype parameter: %s\n"
+msgstr "Ongeldig argument van 'quotatype': %s\n"
+
+#: misc/mke2fs.c:846
+#, 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"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_uid=<uid of root directory>\n"
+"\troot_gid=<gid of root directory>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr OR grp>\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"
+"    stride=<aantal blokken dat samen per RAID-schijf wordt gelezen/geschreven>\n"
+"    stripe_width=<aantal blokken per stripe> (meestal stride × aantal schijven)\n"
+"    resize=<maximum grootte van bestandssysteem in blokken>\n"
+"    lazy_itable_init=<0 voor uitschakelen, 1 voor inschakelen>\n"
+"    lazy_journal_init=<0 voor uitschakelen, 1 voor inschakelen>\n"
+"    root_uid=<UID van hoofdmap>\n"
+"    root_gid=<GID van hoofdmap>\n"
+"    test_fs\n"
+"    discard\n"
+"    nodiscard\n"
+"    quotatype=<usr OF grp>\n"
+
+#: misc/mke2fs.c:868
+#, 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:907
+#, 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:920 misc/tune2fs.c:398
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Ongeldige bestandssysteemfunctie: %s\n"
+
+#: misc/mke2fs.c:932 misc/tune2fs.c:349
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Ongeldige aankoppelingsoptie: %s\n"
+
+#: misc/mke2fs.c:1072
+#, 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:1076
+#, c-format
+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:1080
+#, c-format
+msgid "Aborting...\n"
+msgstr "Gestopt...\n"
+
+#: misc/mke2fs.c:1120
+#, 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:1276
+#, c-format
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Kan geen geheugen reserveren voor nieuwe PATH.\n"
+
+#: misc/mke2fs.c:1317
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "Initialiseren van profile is mislukt (fout: %ld).\n"
+
+#: misc/mke2fs.c:1357
+#, c-format
+msgid "invalid block size - %s"
+msgstr "ongeldige blokgrootte: %s"
+
+#: misc/mke2fs.c:1361
+#, 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:1377
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "ongeldige clustergrootte: %s"
+
+#: misc/mke2fs.c:1387
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "'optie '-R' is verouderd; gebruik '-E'"
+
+#: misc/mke2fs.c:1399
+msgid "Illegal number for blocks per group"
+msgstr "Ongeldig aantal blokken per groep"
+
+#: misc/mke2fs.c:1404
+msgid "blocks per group must be multiple of 8"
+msgstr "argument van -g (blokken per groep) is geen veelvoud van 8"
+
+#: misc/mke2fs.c:1412
+msgid "Illegal number for flex_bg size"
+msgstr "Ongeldig getal voor metagroepgrootte"
+
+#: misc/mke2fs.c:1418
+msgid "flex_bg size must be a power of 2"
+msgstr "Metagroepgrootte moet een macht van 2 zijn"
+
+#: misc/mke2fs.c:1428
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "ongeldige inodeverhouding %s (min %d / max %d)"
+
+#: misc/mke2fs.c:1438
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "ongeldige grootte van inode: %s"
+
+#: misc/mke2fs.c:1450
+#, c-format
+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:1460
+msgid "in malloc for bad_blocks_filename"
+msgstr "onvoldoende geheugen in bad_blocks_filename()"
+
+#: misc/mke2fs.c:1473
+#, 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:1488
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "ongeldig aantal inodes: %s"
+
+# lib/prange.c:299 lib/prange.c:316
+#: misc/mke2fs.c:1505
+#, c-format
+msgid "bad revision level - %s"
+msgstr "ongeldig versienummer: %s"
+
+#: misc/mke2fs.c:1519
+msgid "The -t option may only be used once"
+msgstr "Optie '-t' mag slechts één keer gegeven worden"
+
+#: misc/mke2fs.c:1527
+msgid "The -T option may only be used once"
+msgstr "Optie '-T' mag slechts één keer gegeven worden"
+
+#: misc/mke2fs.c:1580 misc/mke2fs.c:2591
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "tijdens openen van journal-apparaat %s\n"
+
+#: misc/mke2fs.c:1586
+#, 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:1592
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Blokgrootte van het journal-apparaat wordt gebruikt: %d\n"
+
+#: misc/mke2fs.c:1603
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "ongeldige blokken '%s' op apparaat '%s'"
+
+#: misc/mke2fs.c:1613
+msgid "filesystem"
+msgstr "bestandssysteem"
+
+#: misc/mke2fs.c:1626 resize/main.c:367
+msgid "while trying to determine filesystem size"
+msgstr "tijdens bepalen van grootte van bestandssysteem"
+
+#: misc/mke2fs.c:1632
+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:1639
+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:1656
+msgid "Filesystem larger than apparent device size."
+msgstr "Bestandssysteem is groter dan de schijnbare apparaatgrootte."
+
+#: misc/mke2fs.c:1676
+#, c-format
+msgid "Failed to parse fs types list\n"
+msgstr "Verwerken van lijst met bestandssysteemsoorten is mislukt\n"
+
+#: misc/mke2fs.c:1730
+#, 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:1746
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "Lijst met bestandssysteemsoorten voor mke2fs.conf: "
+
+#: misc/mke2fs.c:1753
+#, c-format
+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:1760
+#, c-format
+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:1772
+#, c-format
+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:1786
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "ongeldig percentage gereserveerde blokken: %lf"
+
+#: misc/mke2fs.c:1802
+#, c-format
+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:1819
+msgid "while trying to determine hardware sector size"
+msgstr "tijdens bepalen van de hardware-sectorgrootte"
+
+#: misc/mke2fs.c:1825
+msgid "while trying to determine physical sector size"
+msgstr "tijdens bepalen van de fysieke sectorgrootte"
+
+#: misc/mke2fs.c:1858
+msgid "while setting blocksize; too small for device\n"
+msgstr "tijdens instellen van de blokgrootte; te klein voor apparaat\n"
+
+#: misc/mke2fs.c:1863
+#, 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:1881
+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:1887
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "het opgeven van een clustergrootte vereist de 'bigalloc'-functie"
+
+#: misc/mke2fs.c:1906
+#, 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:1909
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "Uitlijning van %s is %lu bytes verschoven.\n"
+
+#: misc/mke2fs.c:1911
+#, 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:1930
+#, 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:1934
+#, 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:1968
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "Kan 'bigalloc'-functie niet ondersteunen zonder 'extents'-functie"
+
+#: misc/mke2fs.c:1975
+#, c-format
+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"
+
+#: misc/mke2fs.c:1982 misc/tune2fs.c:740
+#, c-format
+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"
+
+#: misc/mke2fs.c:1993
+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:2002
+msgid "blocks per group count out of range"
+msgstr "teller van blokken-per-groep ligt buiten het toegestane bereik"
+
+#: misc/mke2fs.c:2026
+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:2038
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "ongeldige inode-grootte %d (min %d / max %d)"
+
+#: misc/mke2fs.c:2056
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "te veel inodes (%llu) -- inodeverhouding verhogen?"
+
+#: misc/mke2fs.c:2063
+#, 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:2077
+#, 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 (-i),\n"
+"   of verklein het aantal inodes (-N).\n"
+
+#: misc/mke2fs.c:2196
+#, 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"
+
+#: misc/mke2fs.c:2210
+msgid "while trying to setup undo file\n"
+msgstr "tijdens aanmaken van 'undo'-bestand\n"
+
+#: misc/mke2fs.c:2236
+msgid "Discarding device blocks: "
+msgstr "Verwerpen van blokken: "
+
+#: misc/mke2fs.c:2252
+msgid "failed - "
+msgstr "is mislukt - "
+
+#: misc/mke2fs.c:2360
+msgid "while setting up superblock"
+msgstr "tijdens aanmaken van superblok"
+
+#: misc/mke2fs.c:2369
+#, c-format
+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"
+
+#: misc/mke2fs.c:2452
+#, c-format
+msgid "unknown os - %s"
+msgstr "onbekend besturingssysteem: %s"
+
+#: misc/mke2fs.c:2504
+#, c-format
+msgid "Allocating group tables: "
+msgstr "Reserveren van groepstabellen: "
+
+#: misc/mke2fs.c:2508
+msgid "while trying to allocate filesystem tables"
+msgstr "tijdens reserveren van bestandssysteemtabellen"
+
+#: misc/mke2fs.c:2517
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"    tijdens converteren van subcluster-bitkaart"
+
+#: misc/mke2fs.c:2560
+#, 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:2573
+msgid "while reserving blocks for online resize"
+msgstr "tijdens reserveren van uitbreidingsblokken"
+
+#: misc/mke2fs.c:2584 misc/tune2fs.c:645
+msgid "journal"
+msgstr "journal"
+
+#: misc/mke2fs.c:2596
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Toevoegen van journal aan apparaat %s: "
+
+#: misc/mke2fs.c:2603
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"    tijdens toevoegen van journal aan apparaat %s"
+
+#: misc/mke2fs.c:2608 misc/mke2fs.c:2640 misc/tune2fs.c:674 misc/tune2fs.c:688
+#, c-format
+msgid "done\n"
+msgstr "voltooid\n"
+
+#: misc/mke2fs.c:2617
+#, c-format
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Aanmaken van journal wordt overgeslagen wegens optie '-S'.\n"
+
+#: misc/mke2fs.c:2628
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Aanmaken van journal (%u blokken): "
+
+#: misc/mke2fs.c:2636
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"    tijdens aanmaken van journal"
+
+#: misc/mke2fs.c:2647 misc/tune2fs.c:451
+#, c-format
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Fout tijdens inschakelen van MMP (bescherming tegen meervoudige aankoppelingen)."
+
+#: misc/mke2fs.c:2652
+#, 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:2665
+#, c-format
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Schrijven van superblokken en bestandssysteem-metagegevens: "
+
+#: misc/mke2fs.c:2672
+#, c-format
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+"\n"
+"Waarschuwing: problemen tijdens schrijven van superblokken."
+
+#: misc/mke2fs.c:2674
+#, c-format
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"voltooid\n"
+"\n"
+
+#: misc/mklost+found.c:50
+#, c-format
+msgid "Usage: mklost+found\n"
+msgstr "Gebruik:  mklost+found\n"
+
+#: misc/partinfo.c:41
+#, 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:51
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Kan %s niet openen: %s"
+
+#: misc/partinfo.c:57
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Kan geometrie van %s niet bepalen: %s"
+
+#: misc/partinfo.c:65
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Kan grootte van %s niet bepalen: %s"
+
+#: misc/partinfo.c:71
+#, 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:107
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr "Controleer het bestandssysteem met 'e2fsck'.\n"
+
+#: misc/tune2fs.c:116
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-p mmp_update_interval]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]\n"
+"\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[ -I new_inode_size ] device\n"
+msgstr ""
+"Gebruik:  %s [-c maximum_aantal_aankoppelingen] [-C aankoppelingental]\n"
+"          [-e gedrag_bij_fouten] [-E uitgebreide_optie[,...]] [-f] [-g groep]\n"
+"          [-i interval[d|w|m]] [-j] [-J journal-opties] [-l] [-L label]\n"
+"          [-m percentage_gereserveerde_blokken] [-M laatste_aankoppelingspunt]\n"
+"          [-o [^]aankoppelingsopties[,...]] [-O [^]functie[,...]]\n"
+"          [-p MMP-bijwerkingsinterval] [-r aantal_gereserveerde_blokken]\n"
+"          [-T tijdstip_van_laatste_controle] [-u gebruiker] [-U UUID]\n"
+"          [-I nieuwe_inode-grootte]  apparaat\n"
+
+#: misc/tune2fs.c:209
+msgid "while trying to open external journal"
+msgstr "tijdens openen van extern journal"
+
+#: misc/tune2fs.c:214
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s: is geen journal-apparaat.\n"
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "Geen journal-superblok gevonden!\n"
+
+#: misc/tune2fs.c:240
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "UUID van bestandssysteem niet gevonden op journal-apparaat.\n"
+
+#: misc/tune2fs.c:261
+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:269
+msgid "Journal removed\n"
+msgstr "Journal is verwijderd.\n"
+
+#: misc/tune2fs.c:313
+msgid "while reading bitmaps"
+msgstr "tijdens lezen van bitkaarten"
+
+#: misc/tune2fs.c:321
+msgid "while clearing journal inode"
+msgstr "tijdens wissen van journal-inode"
+
+#: misc/tune2fs.c:332
+msgid "while writing journal inode"
+msgstr "tijdens schrijven van journal-inode"
+
+#: misc/tune2fs.c:367
+#, c-format
+msgid "(and reboot afterwards!)\n"
+msgstr "(En herstart daarna uw computer!)\n"
+
+#: misc/tune2fs.c:401
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Het uitschakelen van bestandssysteemfunctie '%s' is niet mogelijk.\n"
+
+#: misc/tune2fs.c:407
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Het inschakelen van bestandssysteemfunctie '%s' is niet mogelijk.\n"
+
+#: misc/tune2fs.c:416
+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:424
+msgid ""
+"The needs_recovery flag is set.  Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+"De reddingsvlag van het journal is gezet.\n"
+"Voer eerst 'e2fsck' uit, voordat u de journal-vlag wist.\n"
+
+#: misc/tune2fs.c:443
+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:461
+#, 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:470
+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:478
+msgid "Error while reading bitmaps\n"
+msgstr "Fout tijdens lezen van bitkaarten\n"
+
+#: misc/tune2fs.c:487
+#, 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:492
+msgid "while reading MMP block."
+msgstr "tijdens lezen van MMP-blok"
+
+#: misc/tune2fs.c:524
+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:535
+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:595
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Waarschuwing: '^quota'-optie overstijgt '-Q'-argumenten.\n"
+
+#: misc/tune2fs.c:640
+msgid "The filesystem already has a journal.\n"
+msgstr "Het bestandssysteem heeft al een journal.\n"
+
+#: misc/tune2fs.c:658
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"    tijdens openen van journal op %s\n"
+
+#: misc/tune2fs.c:662
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Aanmaken van journal op apparaat %s: "
+
+#: misc/tune2fs.c:670
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "tijdens toevoegen van bestandssysteem aan journal op %s"
+
+#: misc/tune2fs.c:676
+msgid "Creating journal inode: "
+msgstr "Aanmaken van journal-inode: "
+
+#: misc/tune2fs.c:685
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"    tijdens aanmaken van journal-inode"
+
+#: misc/tune2fs.c:763
+msgid "Couldn't allocate memory to parse quota options!\n"
+msgstr "Kan geen geheugen reserveren om quota-opties te ontleden!\n"
+
+#: misc/tune2fs.c:785
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Ongeldige quota-optie opgegeven.\n"
+"\n"
+"Geldige quota-opties zijn (te scheiden met een komma):\n"
+"    [^]usrquota\n"
+"    [^]grpquota\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:846
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Kan datum/tijd-specificatie niet ontleden: %s"
+
+#: misc/tune2fs.c:870 misc/tune2fs.c:883
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "onjuist aankoppelingenaantal: %s"
+
+#: misc/tune2fs.c:899
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "onjuist argument van -e (gedrag bij een fout): %s"
+
+#: misc/tune2fs.c:926
+#, 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:959
+#, c-format
+msgid "bad interval - %s"
+msgstr "onjuist interval: %s"
+
+#: misc/tune2fs.c:988
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "onjuiste verhouding (%s) voor gereserveerde blokken"
+
+#: misc/tune2fs.c:1003
+msgid "-o may only be specified once"
+msgstr "Optie '-o' mag slechts één keer gegeven worden"
+
+#: misc/tune2fs.c:1012
+msgid "-O may only be specified once"
+msgstr "Optie '-o' mag slechts één keer gegeven worden"
+
+#: misc/tune2fs.c:1027
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "onjuist aantal gereserveerde blokken: %s"
+
+#: misc/tune2fs.c:1056
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "onjuiste UID of gebruikersnaam: %s"
+
+#: misc/tune2fs.c:1073
+#, c-format
+msgid "bad inode size - %s"
+msgstr "ongeldige grootte van inode: %s"
+
+#: misc/tune2fs.c:1080
+#, 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:1174
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "MMP-bijwerkingsinterval is te groot: %lu\n"
+
+#: misc/tune2fs.c:1179
+#, 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:1202
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Ongeldig argument van 'stride': %s\n"
+
+#: misc/tune2fs.c:1217
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Ongeldig argument van 'stripe_width': %s\n"
+
+#: misc/tune2fs.c:1232
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Ongeldig hash-algoritme: %s\n"
+
+#: misc/tune2fs.c:1238
+#, 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:1257
+#, c-format
+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"
+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"
+"    stride=<aantal blokken dat samen per RAID-schijf wordt gelezen/geschreven>\n"
+"    stripe_width=<aantal blokken per stripe> (meestal stride × aantal schijven)\n"
+"    test_fs\n"
+"    ^test_fs\n"
+
+#: misc/tune2fs.c:1723
+msgid "Failed to read inode bitmap\n"
+msgstr "Lezen van inode-bitkaart is mislukt\n"
+
+#: misc/tune2fs.c:1728
+msgid "Failed to read block bitmap\n"
+msgstr "Lezen van blok-bitkaart is mislukt\n"
+
+#: misc/tune2fs.c:1745 resize/resize2fs.c:870
+msgid "blocks to be moved"
+msgstr "te verplaatsen blokken"
+
+#: misc/tune2fs.c:1748
+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:1754
+msgid "Not enough space to increase inode size \n"
+msgstr "Er is onvoldoende ruimte om de inode-grootte te vergroten. \n"
+
+#: misc/tune2fs.c:1759
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Herplaatsen van blokken tijdens inode-grootteverandering is mislukt. \n"
+
+#: misc/tune2fs.c:1791
+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:1818
+msgid "Couldn't allocate memory for tdb filename\n"
+msgstr "Kan geen geheugen reserveren voor 'tdb'-bestandsnaam\n"
+
+#: misc/tune2fs.c:1840
+#, c-format
+msgid "while trying to delete %s"
+msgstr "tijdens verwijderen van %s"
+
+#: misc/tune2fs.c:1850
+#, c-format
+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"
+
+#: misc/tune2fs.c:1919
+#, 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:1937
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "De inode-grootte is al %lu\n"
+
+#: misc/tune2fs.c:1943
+#, c-format
+msgid "Shrinking the inode size is not supported\n"
+msgstr "Het verkleinen van de inode-grootte is niet mogelijk.\n"
+
+#: misc/tune2fs.c:1949
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "ongeldige inode-grootte %lu (max %d)\n"
+
+#: misc/tune2fs.c:1996
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Het maximum aantal aankoppelingen is op %d gezet\n"
+
+#: misc/tune2fs.c:2002
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Het huidige aantal aankoppelingen is op %d gezet\n"
+
+#: misc/tune2fs.c:2007
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Gedrag bij fouten is op %d gezet\n"
+
+#: misc/tune2fs.c:2012
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "GID van gereserveerde blokken is op %lu gezet\n"
+
+#: misc/tune2fs.c:2017
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "interval tussen controles is te groot (%lu)"
+
+#: misc/tune2fs.c:2024
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Interval tussen controles is op %lu seconden gezet\n"
+
+#: misc/tune2fs.c:2031
+#, 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:2037
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "aantal gereserveerde blokken is te groot (%llu)"
+
+#: misc/tune2fs.c:2044
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Het aantal gereserveerde blokken is op %llu gezet\n"
+
+#: misc/tune2fs.c:2050
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Het bestandssysteem is al zuinig met superblokken.\n"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set.  %s"
+msgstr ""
+"\n"
+"De zuinig-met-superblokkenvlag is aangezet.  %s"
+
+#: misc/tune2fs.c:2062
+msgid ""
+"\n"
+"Clearing the sparse superflag not supported.\n"
+msgstr ""
+"\n"
+"Het uitzetten van de zuinig-met-superblokkenvlag is niet mogelijk.\n"
+
+#: misc/tune2fs.c:2070
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr "Tijd van laatste controle is op %s gezet\n"
+
+#: misc/tune2fs.c:2076
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "UID van gereserveerde blokken is op %lu gezet\n"
+
+#: misc/tune2fs.c:2108
+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:2126
+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:2159
+msgid "Invalid UUID format\n"
+msgstr "Onjuiste UUID-indeling\n"
+
+#: misc/tune2fs.c:2172
+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:2180
+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:2193
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "De inode-groote is op %lu gezet\n"
+
+#: misc/tune2fs.c:2196
+#, c-format
+msgid "Failed to change inode size\n"
+msgstr "Het veranderen van de inode-grootte is mislukt. \n"
+
+#: misc/tune2fs.c:2207
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "De 'stride'-lengte is op %d gezet\n"
+
+#: misc/tune2fs.c:2212
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "De 'stripe'-breedte is op %d gezet\n"
+
+#: misc/tune2fs.c:2219
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "De uitgebreide standaard aankoppelingsopties zijn op '%s' gezet\n"
+
+#: misc/util.c:74
+msgid "Proceed anyway? (y,n) "
+msgstr "Toch doorgaan? (j,n) "
+
+#: misc/util.c:89
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr "Kan de status van %s niet opvragen -- %s\n"
+
+#: misc/util.c:92
+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"
+
+#: misc/util.c:103
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s is geen blok-apparaat.\n"
+
+#: misc/util.c:132
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr "%s is het hele apparaat, niet slechts een partitie!\n"
+
+#: misc/util.c:154
+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:159
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "zal hier geen %s maken!\n"
+
+#: misc/util.c:166
+msgid "mke2fs forced anyway.\n"
+msgstr "'mke2fs' wordt gedwongen uitgevoerd.\n"
+
+#: misc/util.c:182
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Kan geen geheugen reserveren om journal-opties te ontleden!\n"
+
+#: misc/util.c:207
+#, 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:228
+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"
+"\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"
+"\n"
+"De grootte van het journal is minimaal 1024 en maximaal 10240000 blokken.\n"
+"\n"
+
+#: misc/util.c:258
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Bestandssysteem is te klein voor een journal.\n"
+
+#: misc/util.c:265
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks.  Aborting.\n"
+msgstr ""
+"\n"
+"De 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:273
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Journal-afmeting is te groot voor bestandssysteem.\n"
+
+#: misc/util.c:287
+#, 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:48
+#, 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:50
+#, c-format
+msgid "       %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr "          %s [-r|t] [-n nummer] [-s socket-pad]\n"
+
+#: misc/uuidd.c:52
+#, c-format
+msgid "       %s -k\n"
+msgstr "          %s -k\n"
+
+#: misc/uuidd.c:154
+msgid "bad arguments"
+msgstr "ongeldige argumenten"
+
+#: misc/uuidd.c:172
+msgid "connect"
+msgstr "verbinden"
+
+#: misc/uuidd.c:191
+msgid "write"
+msgstr "schrijven"
+
+#: misc/uuidd.c:199
+msgid "read count"
+msgstr "gelezen aantal"
+
+#: misc/uuidd.c:205
+msgid "bad response length"
+msgstr "ongeldige antwoordlengte"
+
+#: misc/uuidd.c:270
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "uuidd-dienst draait al onder PID %s\n"
+
+#: misc/uuidd.c:278
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Kan geen UNIX-stream-socket aanmaken: %s"
+
+#: misc/uuidd.c:307
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Kan UNIX-stream-socket %s niet binden: %s\n"
+
+#: misc/uuidd.c:315
+#, 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:353
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Fout tijdens lezen van cliënt; lengte = %d\n"
+
+#: misc/uuidd.c:361
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "bewerking %d, gegeven getal = %d\n"
+
+#: misc/uuidd.c:380
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "Gegenereerde tijds-UUID: %s\n"
+
+#: misc/uuidd.c:390
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "Gegenereerde willekeurige UUID: %s\n"
+
+#: misc/uuidd.c:399
+#, 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:420
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Er zijn %d UUID's gegenereerd:\n"
+
+#: misc/uuidd.c:432
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Ongeldige bewerking %d\n"
+
+#: misc/uuidd.c:476 misc/uuidd.c:498
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Ongeldig getal: %s\n"
+
+#: misc/uuidd.c:533 misc/uuidd.c:562
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Fout bij aanroepen van uuidd-dienst (%s): %s\n"
+
+#: misc/uuidd.c:543
+#, 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:547
+#, c-format
+msgid "List of UUID's:\n"
+msgstr "Lijst van UUID's:\n"
+
+#: misc/uuidd.c:568
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Onverwachte antwoordlengte (%d) van server\n"
+
+#: misc/uuidd.c:585
+#, 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:591
+#, 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:202
+msgid "# Extent dump:\n"
+msgstr "# (debug) Extent dump:\n"
+
+#: resize/extent.c:203
+#, 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:43
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]\n"
+"\n"
+msgstr ""
+"Gebruik:  %s [-d debugvlaggen] [-fFMpP] apparaat [nieuwe_grootte]\n"
+"\n"
+
+#: resize/main.c:65
+msgid "Extending the inode table"
+msgstr "Uitbreiden van inodetabel"
+
+#: resize/main.c:68
+msgid "Relocating blocks"
+msgstr "Verplaatsen van blokken"
+
+#: resize/main.c:71
+msgid "Scanning inode table"
+msgstr "Scannen van inodetabel"
+
+#: resize/main.c:74
+msgid "Updating inode references"
+msgstr "Bijwerken van inode-verwijzingen"
+
+#: resize/main.c:77
+msgid "Moving inode table"
+msgstr "Verplaatsen van inodetabel"
+
+#: resize/main.c:80
+msgid "Unknown pass?!?"
+msgstr "Onbekende stap?!?"
+
+#: resize/main.c:83
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Begin van stap %d (max = %lu)\n"
+
+#: resize/main.c:154
+#, c-format
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested.  Proceed\n"
+"at 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:271
+#, c-format
+msgid "while opening %s"
+msgstr "tijdens openen van %s"
+
+#: resize/main.c:279
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "tijdens opvragen van status van %s"
+
+#: resize/main.c:337 resize/main.c:450
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Voer eerst 'e2fsck -f %s' uit.\n"
+"\n"
+
+#: resize/main.c:341
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Geschatte minimum grootte van het bestandssysteem: %llu\n"
+
+#: resize/main.c:377
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Ongeldige nieuwe grootte: %s\n"
+
+#: resize/main.c:393
+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:401
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Nieuwe grootte is kleiner dan minimum (%llu).\n"
+
+#: resize/main.c:407
+msgid "Invalid stride length"
+msgstr "Ongeldige lengte voor 'stride'"
+
+#: resize/main.c:431
+#, 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:438
+#, c-format
+msgid ""
+"The filesystem is already %llu blocks long.  Nothing to do!\n"
+"\n"
+msgstr ""
+"Het bestandssysteem is al %llu blokken groot.  Er is niets te doen!\n"
+"\n"
+
+#: resize/main.c:455
+#, 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:464
+#, c-format
+msgid "while trying to resize %s"
+msgstr "tijdens veranderen van de grootte van %s"
+
+#: resize/main.c:467
+#, 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:473
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu blocks long.\n"
+"\n"
+msgstr ""
+"Het bestandssysteem op %s is nu %llu blokken groot.\n"
+"\n"
+
+#: resize/main.c:488
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "tijdens inkorten van %s"
+
+#: resize/online.c:79
+#, 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:83
+msgid "On-line shrinking not supported"
+msgstr "Het live krimpen wordt niet ondersteund"
+
+#: resize/online.c:108
+msgid "Filesystem does not support online resizing"
+msgstr "Bestandssysteem ondersteunt live vergroten/verkleinen niet"
+
+#: resize/online.c:117
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "Niet genoeg gereserveerde GDT-blokken om grootte te kunnen veranderen"
+
+#: resize/online.c:124
+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:132
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "tijdens openen van aankoppelingspunt %s"
+
+#: resize/online.c:137
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Oude interface voor grootteverandering is gevraagd.\n"
+
+#: resize/online.c:156 resize/online.c:173
+msgid "Permission denied to resize filesystem"
+msgstr "Toegang geweigerd voor het vergroten/verkleinen van bestandssysteem"
+
+#: resize/online.c:159 resize/online.c:179
+msgid "While checking for on-line resizing support"
+msgstr "Tijdens controle op ondersteuning voor live vergroten/verkleinen"
+
+#: resize/online.c:176
+msgid "Kernel does not support online resizing"
+msgstr "De kernel ondersteunt het live vergroten/verkleinen niet"
+
+#: resize/online.c:209
+#, 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:219
+msgid "While trying to extend the last group"
+msgstr "Tijdens uitbreiden van de laatste groep"
+
+#: resize/online.c:273
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Tijdens toevoegen van groep #%d"
+
+#: resize/online.c:284
+#, 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:369
+#, c-format
+msgid "inodes (%llu) must be less than %u"
+msgstr "aantal inodes (%llu) moet kleiner zijn dan %u"
+
+#: resize/resize2fs.c:631
+msgid "reserved blocks"
+msgstr "gereserveerde blokken"
+
+#: resize/resize2fs.c:875
+msgid "meta-data blocks"
+msgstr "blokken voor metagegevens"
+
+#: resize/resize2fs.c:1837
+#, c-format
+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.42.8"
+msgstr "EXT2FS-bibliotheek  versie 1.42.8"
+
+#: 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 "Bestandssysteemrevisie 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 an block bitmap"
+msgstr "Kan een blok-bitkaart niet schrijven"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read an 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: fsck being run"
+msgstr "MMP: 'fsck' 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 uitgebreidekenmerken-blok 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 MMP block"
+msgstr "Controlesom van MMP-blok komt niet overeen met MMP-blok"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Ext2-bestand bestaat al"
+
+#: e2fsck/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profile  versie 0.0"
+
+#: e2fsck/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Ongeldig magisch getal in 'profile_node'"
+
+#: e2fsck/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Profile-sectie niet gevonden"
+
+#: e2fsck/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Profile-relatie niet gevonden"
+
+#: e2fsck/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"
+
+#: e2fsck/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"
+
+#: e2fsck/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Ongeldige gekoppelde lijst in profile-structuren"
+
+#: e2fsck/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Ongeldig groepsniveau in profile-structuren"
+
+#: e2fsck/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Ongeldige pointer naar ouder in profile-structuren"
+
+#: e2fsck/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Ongeldig magisch getal in profile-iterator"
+
+#: e2fsck/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Kan waarde niet instellen in sectieknoop"
+
+#: e2fsck/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Ongeldig argument gegeven aan Profile-bibliotheek"
+
+#: e2fsck/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Poging tot wijzigen van een alleen-lezen profile"
+
+#: e2fsck/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "Profile-sectiekop is niet op topniveau"
+
+#: e2fsck/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Syntaxfout in profile-sectiekop"
+
+#: e2fsck/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Syntaxfout in profile-relatie"
+
+#: e2fsck/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Overtollige sluitaccolade in profile"
+
+#: e2fsck/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Ontbrekende openingsaccolade in profile"
+
+#: e2fsck/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Ongeldig magisch getal in 'profile_t'"
+
+#: e2fsck/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Ongeldig magisch getal in 'profile_section_t'"
+
+#: e2fsck/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.
+#: e2fsck/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Ongeldig 'profile_section'-object"
+
+#: e2fsck/prof_err.c:33
+msgid "No more sections"
+msgstr "Er zijn geen verdere secties"
+
+#: e2fsck/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Ongeldige naamset gegeven aan bevragingsroutine"
+
+#: e2fsck/prof_err.c:35
+msgid "No profile file open"
+msgstr "Er is geen open profile-bestand"
+
+#: e2fsck/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Ongeldig magisch getal in 'profile_file_t'"
+
+#: e2fsck/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Kan profile-bestand niet openen"
+
+#: e2fsck/prof_err.c:38
+msgid "Section already exists"
+msgstr "Sectie bestaat al"
+
+#: e2fsck/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Ongeldige booleaanse waarde"
+
+#: e2fsck/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Ongeldig geheel getal"
+
+#: e2fsck/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Ongeldig magisch getal in 'profile_file_data_t'"
+
+#~ 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 "%s is mounted.  "
+#~ msgstr "Partitie %s is aangekoppeld.  "
+
+#~ 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 index inode>"
+#~ msgstr "<de ACL-index-inode>"
+
+#~ 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 "Error while deleting extent: %m\n"
+#~ msgstr "Fout tijdens verwijderen van extent: %m\n"
+
+#~ msgid "Recreate journal to make the filesystem ext3 again?\n"
+#~ msgstr "Het journal heraanmaken om het bestandssysteem weer ext3 te maken?\n"
+
+#~ msgid "bad block size - %s"
+#~ msgstr "ongeldige blokgrootte: %s"
+
+#~ 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 ext2fs_block_iterate"
+#~ msgstr "tijdens aanroep van ext2fs_block_iterate()"
+
+#~ msgid "while calling iterator function"
+#~ msgstr "tijdens aanroep van iterator-functie"
+
+#~ msgid "while allocating inode buffer"
+#~ msgstr "tijdens reserveren van inodebuffer"
+
+#~ msgid "while reading inode table (group %d)"
+#~ msgstr "tijdens lezen van inodetabel (groep %d)"
+
+#~ msgid "while writing inode table (group %d)"
+#~ msgstr "tijdens schrijven van inodetabel (groep %d)"
+
+#~ 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/e2fsprogs/po/pl.gmo b/e2fsprogs/po/pl.gmo
new file mode 100644
index 0000000..6bee3eb
--- /dev/null
+++ b/e2fsprogs/po/pl.gmo
Binary files differ
diff --git a/e2fsprogs/po/pl.po b/e2fsprogs/po/pl.po
new file mode 100644
index 0000000..8a7db2c
--- /dev/null
+++ b/e2fsprogs/po/pl.po
@@ -0,0 +1,6677 @@
+# Polish translation for e2fsprogs.
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Theodore Tso (msgids)
+# This file is distributed under the same license as the e2fsprogs package.
+# Jakub Bogusz <qboosh@pld-linux.org>, 2002-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).
+#.  
+#. 	%b	<blk>			block number
+#. 	%B	<blkcount>		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_dir_acl
+#. 	%Iu	<inode> -> i_uid
+#. 	%Ig	<inode> -> i_gid
+#. 	%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: 2013-06-16 08:17-0400\n"
+"PO-Revision-Date: 2013-08-04 20:41+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"
+"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:180
+#, 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/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:1332 e2fsck/unix.c:1420 misc/badblocks.c:1214
+#: misc/badblocks.c:1222 misc/badblocks.c:1236 misc/badblocks.c:1248
+#: misc/dumpe2fs.c:588 misc/e2image.c:1196 misc/e2image.c:1324
+#: misc/e2image.c:1337 misc/mke2fs.c:196 misc/tune2fs.c:1907 resize/main.c:315
+#, c-format
+msgid "while trying to open %s"
+msgstr "podczas próby otworzenia %s"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "podczas próby popen '%s'"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:203
+msgid "while reading in list of bad blocks from file"
+msgstr "podczas wczytywania z pliku listy wadliwych bloków"
+
+#: e2fsck/badblocks.c:105
+msgid "while updating bad block inode"
+msgstr "podczas uaktualniania i-węzła wadliwego bloku"
+
+#: e2fsck/badblocks.c:131
+#, 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/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:61 e2fsck/ehandler.c:110
+msgid "Ignore error"
+msgstr "Zignorować błąd"
+
+#: e2fsck/ehandler.c:62
+msgid "Force rewrite"
+msgstr "Wymusić ponowny zapis"
+
+#: e2fsck/ehandler.c:104
+#, c-format
+msgid "Error writing block %lu (%s) while %s.  "
+msgstr "Błąd przy zapisie bloku %lu (%s) podczas %s. "
+
+#: e2fsck/ehandler.c:107
+#, c-format
+msgid "Error writing block %lu (%s).  "
+msgstr "Błąd przy zapisie bloku %lu (%s). "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "puste bloki katalogu"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "pusta mapa katalogu"
+
+#: e2fsck/emptydir.c:98
+#, 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:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Niedopuszczalna liczba bloków!\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Nie można przydzielić bufora bloku (rozmiar=%d)\n"
+
+#: 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/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Składnia: %s [-F] [-I bloki_bufora_i-węzłów] urządzenie\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:961
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "podczas otwierania %s w celu opróżnienia"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:967 resize/main.c:288
+#, c-format
+msgid "while trying to flush %s"
+msgstr "podczas próby opróżnienia %s"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1091
+msgid "while opening inode scan"
+msgstr "podczas otwierania obrazu i-węzłów"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1109
+msgid "while getting next inode"
+msgstr "podczas pobierania następnego i-węzła"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "Przeszukano i-węzłów: %u.\n"
+
+#: e2fsck/journal.c:522
+msgid "reading journal superblock\n"
+msgstr "odczyt superbloku kroniki\n"
+
+#: e2fsck/journal.c:579
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: nie znaleziono poprawnego superbloku kroniki\n"
+
+#: e2fsck/journal.c:588
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: kronika za krótka\n"
+
+#: e2fsck/journal.c:880
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: odtwarzanie z kroniki\n"
+
+#: e2fsck/journal.c:882
+#, 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:909
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "podczas próby ponownego otwarcia %s"
+
+#: e2fsck/message.c:113
+msgid "aextended attribute"
+msgstr "arozszerzony atrybut"
+
+#: e2fsck/message.c:114
+msgid "Aerror allocating"
+msgstr "Abłąd podczas przydzielania"
+
+#: e2fsck/message.c:115
+msgid "bblock"
+msgstr "bblok"
+
+#: e2fsck/message.c:116
+msgid "Bbitmap"
+msgstr "Bbitmapa"
+
+#: e2fsck/message.c:117
+msgid "ccompress"
+msgstr "ckompresja"
+
+#: e2fsck/message.c:118
+msgid "Cconflicts with some other fs @b"
+msgstr "Ckonflikt z innym @biem systemu plików"
+
+#: e2fsck/message.c:119
+msgid "iinode"
+msgstr "ii-węzeł"
+
+#: e2fsck/message.c:120
+msgid "Iillegal"
+msgstr "Iniedopuszczalny"
+
+#: e2fsck/message.c:121
+msgid "jjournal"
+msgstr "jkronika"
+
+#: e2fsck/message.c:122
+msgid "Ddeleted"
+msgstr "Dusunięty"
+
+#: e2fsck/message.c:123
+msgid "ddirectory"
+msgstr "dkatalog"
+
+#: 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 "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:131
+msgid "Lis a link"
+msgstr "Ljest dowiązaniem"
+
+#: e2fsck/message.c:132
+msgid "mmultiply-claimed"
+msgstr "mwielokrotnie zadeklarowany"
+
+#: e2fsck/message.c:133
+msgid "ninvalid"
+msgstr "nbłędny"
+
+#: e2fsck/message.c:134
+msgid "oorphaned"
+msgstr "oosierocony"
+
+#: e2fsck/message.c:135
+msgid "pproblem in"
+msgstr "pproblem w"
+
+#: e2fsck/message.c:136
+msgid "qquota"
+msgstr "qlimit"
+
+#: e2fsck/message.c:137
+msgid "rroot @i"
+msgstr "rgłówny @i"
+
+#: e2fsck/message.c:138
+msgid "sshould be"
+msgstr "spowinno być"
+
+#: e2fsck/message.c:139
+msgid "Ssuper@b"
+msgstr "Ssuper@b"
+
+#: e2fsck/message.c:140
+msgid "uunattached"
+msgstr "uniedołączony"
+
+#: e2fsck/message.c:141
+msgid "vdevice"
+msgstr "vurządzenie"
+
+#: e2fsck/message.c:142
+msgid "xextent"
+msgstr "xekstent"
+
+#: e2fsck/message.c:143
+msgid "zzero-length"
+msgstr "zzerowej długości"
+
+#: e2fsck/message.c:154
+msgid "<The NULL inode>"
+msgstr "<pusty i-węzeł>"
+
+#: e2fsck/message.c:155
+msgid "<The bad blocks inode>"
+msgstr "<i-węzeł wadliwych bloków>"
+
+#: e2fsck/message.c:157
+msgid "<The user quota inode>"
+msgstr "<i-węzeł limitów użytkowników>"
+
+#: e2fsck/message.c:158
+msgid "<The group quota inode>"
+msgstr "<i-węzeł limitów grup>"
+
+#: e2fsck/message.c:159
+msgid "<The boot loader inode>"
+msgstr "<i-węzeł boot-loadera>"
+
+#: e2fsck/message.c:160
+msgid "<The undelete directory inode>"
+msgstr "<i-węzeł katalogu undelete>"
+
+#: e2fsck/message.c:161
+msgid "<The group descriptor inode>"
+msgstr "<i-węzeł deskryptora grupy>"
+
+#: e2fsck/message.c:162
+msgid "<The journal inode>"
+msgstr "<i-węzeł kroniki>"
+
+#: e2fsck/message.c:163
+msgid "<Reserved inode 9>"
+msgstr "<zarezerwowany i-węzeł 9>"
+
+#: e2fsck/message.c:164
+msgid "<Reserved inode 10>"
+msgstr "<zarezerwowany i-węzeł 10>"
+
+#: e2fsck/message.c:333
+msgid "regular file"
+msgstr "plik zwykły"
+
+#: e2fsck/message.c:335
+msgid "directory"
+msgstr "katalog"
+
+#: e2fsck/message.c:337
+msgid "character device"
+msgstr "urządzenie znakowe"
+
+#: e2fsck/message.c:339
+msgid "block device"
+msgstr "urządzenie blokowe"
+
+#: e2fsck/message.c:341
+msgid "named pipe"
+msgstr "nazwany potok"
+
+#: e2fsck/message.c:343
+msgid "symbolic link"
+msgstr "dowiązanie symboliczne"
+
+#: e2fsck/message.c:345 misc/uuidd.c:161
+msgid "socket"
+msgstr "gniazdo"
+
+#: e2fsck/message.c:347
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "nieznany rodzaj pliku typu 0%o"
+
+#: e2fsck/message.c:422
+msgid "indirect block"
+msgstr "blok pośredni"
+
+#: e2fsck/message.c:424
+msgid "double indirect block"
+msgstr "blok podwójnie pośredni"
+
+#: e2fsck/message.c:426
+msgid "triple indirect block"
+msgstr "blok potrójnie pośredni"
+
+#: e2fsck/message.c:428
+msgid "translator block"
+msgstr "blok tłumaczący"
+
+#: e2fsck/message.c:430
+msgid "block #"
+msgstr "blok #"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "wielokrotnie zadeklarowana mapa i-węzłów"
+
+#: e2fsck/pass1b.c:610 e2fsck/pass1b.c:730
+#, 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:821
+msgid "returned from clone_file_block"
+msgstr "powrót z clone_file_block"
+
+#: e2fsck/pass1b.c:843
+#, 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:855
+#, 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:475 e2fsck/pass2.c:782
+msgid "reading directory block"
+msgstr "odczytu bloku katalogu"
+
+#: e2fsck/pass1.c:598
+msgid "in-use inode map"
+msgstr "mapa używanych i-węzłów"
+
+#: e2fsck/pass1.c:609
+msgid "directory inode map"
+msgstr "mapa i-węzłów katalogów"
+
+#: e2fsck/pass1.c:619
+msgid "regular file inode map"
+msgstr "mapa i-węzłów zwykłych plików"
+
+#: e2fsck/pass1.c:628
+msgid "in-use block map"
+msgstr "mapa używanych bloków"
+
+#: e2fsck/pass1.c:695
+msgid "opening inode scan"
+msgstr "rozpoczynania przeszukiwania i-węzłów"
+
+#: e2fsck/pass1.c:729
+msgid "getting next inode from scan"
+msgstr "pobierania następnego i-węzła"
+
+#: e2fsck/pass1.c:1239
+msgid "Pass 1"
+msgstr "Przebieg 1"
+
+#: e2fsck/pass1.c:1296
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "odczytu niebezpośrednich bloków i-węzła %u"
+
+#: e2fsck/pass1.c:1346
+msgid "bad inode map"
+msgstr "błędna mapa i-węzłów"
+
+#: e2fsck/pass1.c:1369
+msgid "inode in bad block map"
+msgstr "i-węzeł w mapie wadliwych bloków"
+
+#: e2fsck/pass1.c:1389
+msgid "imagic inode map"
+msgstr "mapa i-węzłów imagic"
+
+#: e2fsck/pass1.c:1416
+msgid "multiply claimed block map"
+msgstr "wielokrotnie zadeklarowana mapa bloków"
+
+#: e2fsck/pass1.c:1527
+msgid "ext attr block map"
+msgstr "mapa bloków rozszerzonych atrybutów"
+
+#: e2fsck/pass1.c:2299
+#, 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:2660
+msgid "block bitmap"
+msgstr "bitmapa bloków"
+
+#: e2fsck/pass1.c:2666
+msgid "inode bitmap"
+msgstr "bitmapa i-węzłów"
+
+#: e2fsck/pass1.c:2672
+msgid "inode table"
+msgstr "tablica i-węzłów"
+
+#: e2fsck/pass2.c:283
+msgid "Pass 2"
+msgstr "Przebieg 2"
+
+#: e2fsck/pass2.c:805
+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:136
+msgid "Pass 3"
+msgstr "Przebieg 3"
+
+#: e2fsck/pass3.c:322
+msgid "inode loop detection bitmap"
+msgstr "bitmapa wykrywania pętli i-węzłów"
+
+#: e2fsck/pass4.c:196
+msgid "Pass 4"
+msgstr "Przebieg 4"
+
+#: e2fsck/pass5.c:74
+msgid "Pass 5"
+msgstr "Przebieg 5"
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(bez pytania)"
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr "Poprawić"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Wyczyścić"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Przenieść"
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr "Przydzielić"
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr "Rozszerzyć"
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr "Dołączyć do /lost+found"
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr "Wyczyścić"
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr "Uratować"
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr "Uciąć"
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr "Wyczyścić i-węzeł"
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr "Przerwać"
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr "Podzielić"
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr "Kontynuować"
+
+#: e2fsck/problem.c:65
+msgid "Clone multiply-claimed blocks"
+msgstr "Sklonować wielokrotnie zadeklarowane bloki"
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr "Usunąć plik"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Pominąć komunikaty"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "Odłączyć"
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "Wyczyścić indeks HTree"
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr "Odtworzyć"
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr "(NIC)"
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr "POPRAWIONO"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "WYCZYSZCZONO"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "PRZENIESIONO"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "PRZYDZIELONO"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "ROZSZERZONO"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "PODŁĄCZONO"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "UTWORZONO"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "URATOWANO"
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr "SKRÓCONO"
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr "I-WĘZEŁ WYCZYSZCZONY"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "PRZERWANO"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr "PODZIELONO"
+
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr "KONTYNUACJA"
+
+#: e2fsck/problem.c:93
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "SKLONOWANO WIELOKROTNIE ZADEKLAROWANE BLOKI"
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr "PLIK USUNIĘTY"
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr "POMINIĘTO"
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr "ODŁĄCZONO"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "INDEKS HTREE WYCZYSZCZONY"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "ZOSTANIE ODTWORZONY"
+
+#. @-expanded: block bitmap for group %g is not in group.  (block %b)\n
+#: e2fsck/problem.c:107
+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:111
+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:116
+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 correct ext2\n
+#. @-expanded: filesystem.  If the device is valid and it really contains an ext2\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 %S <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:122
+#, c-format
+msgid ""
+"\n"
+"The @S could not be read or does not describe a correct ext2\n"
+"@f.  If the @v is valid and it really contains an ext2\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 %S <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"@S nie mógł być odczytany lub nie opisuje prawidłowego systemu\n"
+"plików ext2. Jeżeli @v jest prawidłowe i naprawdę zawiera\n"
+"@f ext2 (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 %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:131
+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:138
+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:145
+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:150
+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:155
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"@f nie miał UUID-a; wygenerowano.\n"
+"\n"
+
+#: e2fsck/problem.c:160
+#, 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:169
+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:174
+#, 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:179
+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:183
+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:188
+#, 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:193
+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:198
+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:203
+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:208
+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:213
+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:221
+msgid "@j @S is corrupt.\n"
+msgstr "@S kroniki jest uszkodzony.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal %s is present.\n
+#: e2fsck/problem.c:226
+#, c-format
+msgid "@S has_@j flag is clear, but a @j %s is present.\n"
+msgstr "flaga has_journal @Su jest wyzerowana, ale @j %s istnieje.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:231
+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:236
+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:241
+msgid "Clear @j"
+msgstr "Wyczyścić kronikę"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.  
+#: e2fsck/problem.c:246 e2fsck/problem.c:695
+msgid "@f has feature flag(s) set, but is a revision 0 @f.  "
+msgstr "@f ma ustawione flagi cech, ale ma wersję 0 systemu plików. "
+
+#. @-expanded: %s orphaned inode %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n
+#: e2fsck/problem.c:251
+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:256
+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:261
+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:266
+#, 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:271
+#, 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:276
+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:281
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr "@S kroniki ma ustawioną flagę nieznanej cechy.\n"
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:286
+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:291
+#, 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:296
+#, 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:301
+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:307
+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:312
+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:317
+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:322
+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:328
+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:333
+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:338
+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:343
+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:347
+#, 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:352
+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:357
+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:362
+#, c-format
+msgid "@g descriptor %g marked uninitialized without feature set.\n"
+msgstr "Deskryptor grupy %g oznaczony jako nie zainicjowany bez zbioru cech.\n"
+
+#. @-expanded: group descriptor %g has invalid unused inodes count %b.  
+#: e2fsck/problem.c:367
+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:372
+msgid "Last @g @b @B uninitialized.  "
+msgstr "@B @bu ostatniej grupy niezainicjowana. "
+
+#: e2fsck/problem.c:377
+#, 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:381
+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)  
+#: e2fsck/problem.c:386
+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)  "
+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)  "
+
+#. @-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).  
+#: e2fsck/problem.c:392
+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).  "
+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)  "
+
+#. @-expanded: One or more block group descriptor checksums are invalid.  
+#: e2fsck/problem.c:398
+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:403
+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:408
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Ustawianie liczby wolnych @bów na %c (było %b)\n"
+
+#. @-expanded: Making quota inode %i (%Q) hidden.\n
+#: e2fsck/problem.c:413
+msgid "Making @q @i %i (%Q) hidden.\n"
+msgstr "Zmiana i-węzła @qów na ukryty.\n"
+
+#. @-expanded: superblock has invalid MMP block.  
+#: e2fsck/problem.c:418
+msgid "@S has invalid MMP block.  "
+msgstr "@S ma błędny blok MMP. "
+
+#. @-expanded: superblock has invalid MMP magic.  
+#: e2fsck/problem.c:423
+msgid "@S has invalid MMP magic.  "
+msgstr "@S ma błędną liczbę magiczną MMP. "
+
+#: e2fsck/problem.c:428
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:433
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:440
+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:444
+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:449
+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:454
+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:459
+#, 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:464
+#, 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:469
+#, 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:474
+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:479
+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:484
+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:489
+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:494
+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:499
+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:504
+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:509
+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:514
+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:519
+#, 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:524
+#, 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:529
+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:534
+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:539
+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:544
+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:549
+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:556
+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:561
+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:567
+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:572
+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:578
+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:583
+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:589
+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:595
+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:600
+#, 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:605
+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:610
+#, 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:615
+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:620
+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:625 e2fsck/problem.c:1474
+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:630
+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:635
+#, 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:640
+#, 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:645
+#, 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:650
+#, 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:655
+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:660
+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:666
+#, 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:674
+#, 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:679
+#, 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: inode %i has compression flag set on filesystem without compression support.  
+#: e2fsck/problem.c:685
+#, c-format
+msgid "@i %i has @cion flag set on @f without @cion support.  "
+msgstr ""
+"@i %i ma ustawioną flagę kompresji na systemie plików bez obsługi\n"
+"kompresji. "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.  
+#: e2fsck/problem.c:690
+#, 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:700
+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:705
+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:710
+#, 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:716
+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:721
+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:726
+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:731
+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:736
+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:741
+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:746
+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:751
+msgid "@a @b %b has h_@bs > 1.  "
+msgstr "@b rozszerzonych atrybutów %b ma h_blocks > 1. "
+
+#. @-expanded: error allocating extended attribute block %b.  
+#: e2fsck/problem.c:756
+msgid "@A @a @b %b.  "
+msgstr "@A @bu rozszerzonych atrybutów %b. "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).  
+#: e2fsck/problem.c:761
+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:766
+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:771
+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:776
+#, 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:780
+msgid "%B (%b) causes @d to be too big.  "
+msgstr "%B (%b) powoduje, że @d jest zbyt duży. "
+
+#: e2fsck/problem.c:785
+msgid "%B (%b) causes file to be too big.  "
+msgstr "%B (%b) powoduje, że plik jest zbyt duży. "
+
+#: e2fsck/problem.c:790
+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:795
+#, 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:800
+#, 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:805
+#, 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:810
+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:815
+#, 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:820
+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:825
+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:831
+#, 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:836
+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:841
+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:846
+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:851
+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:856
+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:861
+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:866
+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:871
+#, 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:876
+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:882
+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:887
+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:892
+#, 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:897
+#, 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:902
+#, 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:907
+#, 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:912
+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(@b @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:916
+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:921
+#, 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 regular file.  
+#: e2fsck/problem.c:926
+msgid "@q @i is not regular file.  "
+msgstr "@i @qów nie jest zwykłym plikiem. "
+
+#. @-expanded: quota inode is not in use, but contains data.  
+#: e2fsck/problem.c:931
+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:936
+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:941
+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:946
+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: 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:953
+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:959
+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: \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:967
+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:973
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "@m @b(i) w i-węźle %i:"
+
+#: e2fsck/problem.c:988
+#, 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:993
+#, 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:998
+#, 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:1003 e2fsck/problem.c:1318
+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:1008
+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:1014
+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:1019
+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:1025
+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:1030
+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:1035
+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:1040
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"Podwójnie zadeklarowane @bi już przepisane lub sklonowane.\n"
+"\n"
+
+#: e2fsck/problem.c:1053
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Nie można sklonować pliku: %m\n"
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1059
+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:1064
+#, 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:1069
+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:1074
+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:1079
+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:1084
+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:1089
+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:1094
+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:1099
+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:1104
+#, 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:1109
+#, 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:1114
+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:1119
+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:1124
+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:1129
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl @F %If, @s zero.\n"
+
+#. @-expanded: i_dir_acl for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1134
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr "i_dir_acl @F %Id, @s zero.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1139
+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:1144
+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:1149
+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:1154
+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:1159
+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:1164
+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:1169
+#, 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:1174
+#, 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:1179
+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:1184
+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:1189
+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:1194
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E jest powielonym @eem '..'.\n"
+
+#: e2fsck/problem.c:1199 e2fsck/problem.c:1499
+#, 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:1204
+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:1209
+#, 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:1214
+#, 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:1219
+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:1224
+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:1229
+#, 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:1234
+#, 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:1239
+#, 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:1244
+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:1249
+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:1254
+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:1259
+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:1264
+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:1269
+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:1274
+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:1279
+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:1284
+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:1289
+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:1294
+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:1299
+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:1304
+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:1309
+msgid "@n @h %d (%q).  "
+msgstr "Błędne @h %d (%q). "
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1313
+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:1323
+#, 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:1328
+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:1333
+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:1338
+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:1343
+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:1348
+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:1353
+#, 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:1358
+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:1363
+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:1368
+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:1372
+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:1377
+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:1382
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi @F %N, @s zero.\n"
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1389
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Przebieg 3: Sprawdzanie łączności @dów\n"
+
+#. @-expanded: root inode not allocated.  
+#: e2fsck/problem.c:1394
+msgid "@r not allocated.  "
+msgstr "@r jest nie przydzielony. "
+
+#. @-expanded: No room in lost+found directory.  
+#: e2fsck/problem.c:1399
+msgid "No room in @l @d.  "
+msgstr "Brak miejsca w @du @l. "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1404
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "Nie podłączony @i @du %i (%p)\n"
+
+#. @-expanded: /lost+found not found.  
+#: e2fsck/problem.c:1409
+msgid "/@l not found.  "
+msgstr "Nie znaleziono /@l. "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1414
+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:1419
+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:1424
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Nie można rozszerzyć /@l: %m\n"
+
+#: e2fsck/problem.c:1429
+#, 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:1434
+#, 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:1439
+#, 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:1444
+#, 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:1449
+#, 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:1454
+#, 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:1459
+#, 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:1464
+#, 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:1469
+#, 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:1479
+#, 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:1484
+#, 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:1489
+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:1494
+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:1504
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l nie jest @diem (@i=%i)\n"
+
+#: e2fsck/problem.c:1511
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Przebieg 3A: Optymalizacja katalogów\n"
+
+#: e2fsck/problem.c:1516
+#, 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:1521
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Optymalizacja katalogu %q (%d) nie powiodła się: %m\n"
+
+#: e2fsck/problem.c:1526
+msgid "Optimizing directories: "
+msgstr "Optymalizacja katalogów: "
+
+#: e2fsck/problem.c:1543
+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:1548
+#, c-format
+msgid "@u @z @i %i.  "
+msgstr "@u @i @z %i. "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1553
+#, 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:1558
+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:1562
+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: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1572
+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:1577
+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:1582
+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:1587
+msgid "@b @B differences: "
+msgstr "Różnice bitmapy @bów: "
+
+#. @-expanded: inode bitmap differences: 
+#: e2fsck/problem.c:1607
+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:1627
+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:1632
+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:1637
+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:1642
+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:1647
+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:1652
+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:1658
+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:1663
+#, 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:1668
+#, 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:1693
+#, 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:1698
+#, 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: Recreate journal
+#: e2fsck/problem.c:1705
+msgid "Recreate @j"
+msgstr "Odtworzyć kronikę"
+
+#: e2fsck/problem.c:1710
+msgid "Update quota info for quota type %N"
+msgstr "Uaktualnić informacje o limitach typu %N"
+
+#: e2fsck/problem.c:1829
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Nie obsłużony kod błędu (0x%x)!\n"
+
+#: e2fsck/problem.c:1954 e2fsck/problem.c:1958
+msgid "IGNORED"
+msgstr "ZIGNOROWANO"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Użyta pamięć: %d, 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: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:188
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr "podczas wywołania ext2fs_block_iterate dla i-węzła %d"
+
+#: e2fsck/super.c:211
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %d"
+msgstr "podczas wywołania ext2fs_adjust_ea_refcount2 dla i-węzła %d"
+
+#: e2fsck/super.c:272
+msgid "Truncating"
+msgstr "Skracanie"
+
+#: e2fsck/super.c:273
+msgid "Clearing"
+msgstr "Czyszczenie"
+
+#: e2fsck/unix.c:74
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfvtDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] device\n"
+msgstr ""
+"Składnia: %s [-panyrcdfvtDFV] [-b superblok] [-B rozm_bloku]\n"
+"\t\t[-I bloków_bufora_i-węzłów] [-P rozmiar_i-węzła]\n"
+"\t\t[-l|-L plik_wadliwych_bloków] [-C fd] [-j zewn-kronika]\n"
+"\t\t[-E rozszerzone-opcje] urządzenie\n"
+
+#: e2fsck/unix.c:80
+#, c-format
+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"
+"Awaryjna pomoc:\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:86
+#, c-format
+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"
+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"
+
+#: e2fsck/unix.c:131
+#, 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:157
+#, 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:161
+#, 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:166
+#, 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:171
+#, 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:179
+msgid "             Extent depth histogram: "
+msgstr "             Histogram głębokości ekstentów: "
+
+#: e2fsck/unix.c:188
+#, 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:192
+#, 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:194
+#, 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:196
+#, 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:198
+#, 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:200
+#, 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:203
+#, 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:205
+#, 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:207
+#, 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:209
+#, 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:211
+#, 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:215
+#, 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:219
+#, 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:232 misc/badblocks.c:983 misc/tune2fs.c:1985 misc/util.c:147
+#: resize/main.c:259
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "podczas sprawdzania, czy %s jest zamontowany."
+
+#: e2fsck/unix.c:252
+#, c-format
+msgid "Warning!  %s is %s.\n"
+msgstr "Uwaga! %s jest %s.\n"
+
+#: e2fsck/unix.c:259
+#, c-format
+msgid "%s is %s.\n"
+msgstr "%s jest %s.\n"
+
+#: e2fsck/unix.c:262
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Nie można kontynuować, przerwano.\n"
+"\n"
+
+#: e2fsck/unix.c:264
+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:269
+msgid "Do you really want to continue"
+msgstr "Naprawdę kontynuować?"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "check aborted.\n"
+msgstr "sprawdzanie przerwane.\n"
+
+#: e2fsck/unix.c:361
+msgid " contains a file system with errors"
+msgstr " zawiera system plików z błędami"
+
+#: e2fsck/unix.c:363
+msgid " was not cleanly unmounted"
+msgstr " nie był czysto odmontowany"
+
+#: e2fsck/unix.c:365
+msgid " primary superblock features different from backup"
+msgstr " cechy głównego superbloku różnią się od kopii zapasowej"
+
+#: e2fsck/unix.c:369
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " był montowany %u razy bez sprawdzania"
+
+#: e2fsck/unix.c:376
+msgid " has filesystem last checked time in the future"
+msgstr " ma czas ostatniego sprawdzenia systemu plików w przyszłości"
+
+#: e2fsck/unix.c:382
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " przetrwał %u dni bez sprawdzania"
+
+#: e2fsck/unix.c:391
+msgid ", check forced.\n"
+msgstr ", wymuszono sprawdzenie.\n"
+
+#: e2fsck/unix.c:424
+#, 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:443
+msgid " (check deferred; on battery)"
+msgstr " (sprawdzenie wstrzymane; zasilanie z baterii)"
+
+#: e2fsck/unix.c:446
+msgid " (check after next mount)"
+msgstr " (sprawdzenie po następnym montowaniu)"
+
+#: e2fsck/unix.c:448
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr "(sprawdzenie za %ld montowań)"
+
+#: e2fsck/unix.c:598
+#, 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:667
+#, c-format
+msgid "Invalid EA version.\n"
+msgstr "Błędna wersja EA.\n"
+
+#: e2fsck/unix.c:694
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Nieznana opcja rozszerzona: %s\n"
+
+#: e2fsck/unix.c:719
+#, 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:788
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Błąd podczas kontroli deskryptora pliku %d: %s\n"
+
+#: e2fsck/unix.c:792
+msgid "Invalid completion information file descriptor"
+msgstr "Błędne informacje dopełniające deskryptora plików"
+
+#: e2fsck/unix.c:807
+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:828
+#, 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:859 e2fsck/unix.c:931 misc/tune2fs.c:811 misc/tune2fs.c:1100
+#: misc/tune2fs.c:1118
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Nie udało się rozwiązać '%s'"
+
+#: e2fsck/unix.c:910
+msgid "The -n and -D options are incompatible."
+msgstr "Opcje -n i -D są niekompatybilne."
+
+#: e2fsck/unix.c:915
+msgid "The -n and -c options are incompatible."
+msgstr "Opcje -n i -c są niekompatybilne."
+
+#: e2fsck/unix.c:920
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Opcje -n i -l/-L są niekompatybilne."
+
+#: e2fsck/unix.c:974
+#, c-format
+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:1022
+#, 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:1031
+#, 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:1120
+#, 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:1137 e2fsck/unix.c:1142
+msgid "while checking MMP block"
+msgstr "podczas sprawdzania bloku MMP"
+
+#: e2fsck/unix.c:1144 misc/tune2fs.c:1912
+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"
+
+#: e2fsck/unix.c:1194
+#, c-format
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Błąd: wersja biblioteki ext2fs jest za stara!\n"
+
+#: e2fsck/unix.c:1202
+msgid "while trying to initialize program"
+msgstr "podczas próby inicjalizacji programu"
+
+#: e2fsck/unix.c:1225
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tUżywane %s, %s\n"
+
+#: e2fsck/unix.c:1237
+msgid "need terminal for interactive repairs"
+msgstr "interaktywna naprawa wymaga terminala"
+
+#: e2fsck/unix.c:1290
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s próba użycia zapasowych bloków...\n"
+
+#: e2fsck/unix.c:1292
+msgid "Superblock invalid,"
+msgstr "Superblok błędny,"
+
+#: e2fsck/unix.c:1293
+msgid "Group descriptors look bad..."
+msgstr "Deskryptory grup wyglądają źle..."
+
+#: e2fsck/unix.c:1303
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s podczas próby użycia zapasowych bloków"
+
+#: e2fsck/unix.c:1307
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: powracanie do oryginalnego superbloku\n"
+
+#: e2fsck/unix.c:1335
+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:1341
+msgid "Could this be a zero-length partition?\n"
+msgstr "Czy to może jest partycja zerowej długości?\n"
+
+#: e2fsck/unix.c:1344
+#, 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:1349
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Zapewne nie istniejące urządzenie lub swap?\n"
+
+#: e2fsck/unix.c:1352
+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:1355
+msgid "Possibly non-existent device?\n"
+msgstr "Zapewne nie istniejące urządzenie?\n"
+
+#: e2fsck/unix.c:1358
+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:1423
+msgid "Get a newer version of e2fsck!"
+msgstr "Potrzeba nowszej wersji e2fsck!"
+
+#: e2fsck/unix.c:1467
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr "podczas sprawdzania kroniki ext3 dla %s"
+
+#: e2fsck/unix.c:1478
+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:1491
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "nie można ustawić flag superbloku na %s\n"
+
+#: e2fsck/unix.c:1497
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr "podczas odtwarzania z kroniki ext3 dla %s"
+
+#: e2fsck/unix.c:1521
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s ma włączone nie obsługiwane cechy:"
+
+#: e2fsck/unix.c:1536
+#, c-format
+msgid "%s: warning: compression support is experimental.\n"
+msgstr "%s: uwaga: obsługa kompresji jest eksperymentalna.\n"
+
+#: e2fsck/unix.c:1542
+#, c-format
+msgid ""
+"%s: e2fsck not compiled with HTREE support,\n"
+"\tbut filesystem %s has HTREE directories.\n"
+msgstr ""
+"%s: e2fsck skompilowany bez obsługi HTREE,\n"
+"\tale system plików %s ma katalogi HTREE.\n"
+
+#: e2fsck/unix.c:1594
+#, 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:1597
+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:1638
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Tworzenie kroniki (%d bloków): "
+
+#: e2fsck/unix.c:1648
+msgid " Done.\n"
+msgstr " Wykonano.\n"
+
+#: e2fsck/unix.c:1649
+msgid ""
+"\n"
+"*** journal has been re-created - filesystem is now ext3 again ***\n"
+msgstr ""
+"\n"
+"*** kronika została ponownie utworzona - system plików to znowu ext3 ***\n"
+
+#: e2fsck/unix.c:1672
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Restart e2fsck od początku...\n"
+
+#: e2fsck/unix.c:1676
+msgid "while resetting context"
+msgstr "podczas resetowania kontekstu"
+
+#: e2fsck/unix.c:1683
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck przerwany.\n"
+
+#: e2fsck/unix.c:1688
+msgid "aborted"
+msgstr "przerwano"
+
+#: e2fsck/unix.c:1700 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:1704
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr "%s: ***** WYMAGANY RESTART LINUKSA *****\n"
+
+#: e2fsck/unix.c:1712 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/unix.c:1752
+msgid "while setting block group checksum info"
+msgstr "podczas ustawiania informacji o sumie kontrolnej grupy bloków"
+
+#: e2fsck/util.c:190 misc/util.c:70
+msgid "yY"
+msgstr "tTyY"
+
+#: e2fsck/util.c:191
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:205
+msgid "<y>"
+msgstr "<t>"
+
+#: e2fsck/util.c:207
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:209
+msgid " (y/n)"
+msgstr " (t/n)"
+
+#: e2fsck/util.c:223
+msgid "cancelled!\n"
+msgstr "anulowano!\n"
+
+#: e2fsck/util.c:238
+msgid "yes\n"
+msgstr "tak\n"
+
+#: e2fsck/util.c:240
+msgid "no\n"
+msgstr "nie\n"
+
+#: e2fsck/util.c:250
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? nie\n"
+"\n"
+
+#: e2fsck/util.c:254
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? tak\n"
+"\n"
+
+#: e2fsck/util.c:258
+msgid "yes"
+msgstr "tak"
+
+#: e2fsck/util.c:258
+msgid "no"
+msgstr "nie"
+
+#: e2fsck/util.c:273
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: niedopuszczalne bloki bitmapy dla %s"
+
+#: e2fsck/util.c:278
+msgid "reading inode and block bitmaps"
+msgstr "odczytu bitmap i-węzłów i bloków"
+
+#: e2fsck/util.c:286
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "podczas ponawiania próby odczytu bitmap dla %s"
+
+#: e2fsck/util.c:298
+msgid "writing block and inode bitmaps"
+msgstr "zapisu bitmap bloków i i-węzłów"
+
+#: e2fsck/util.c:303
+#, 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:315
+#, 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:396
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Użyta pamięć: %luk/%luk (%luk/%luk), "
+
+#: e2fsck/util.c:400
+#, c-format
+msgid "Memory used: %lu, "
+msgstr "Użyta pamięć: %lu, "
+
+#: e2fsck/util.c:407
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "czas: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:412
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "upłynął czas: %6.f\n"
+
+#: e2fsck/util.c:447 e2fsck/util.c:461
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "podczas odczytu i-węzła %lu w %s"
+
+#: e2fsck/util.c:475 e2fsck/util.c:488
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "podczas zapisu i-węzła %lu w %s"
+
+#: e2fsck/util.c:637
+msgid "while allocating zeroizing buffer"
+msgstr "podczas przydzielania bufora zerującego"
+
+#: e2fsck/util.c:785
+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:69
+msgid "done                                                 \n"
+msgstr "zakończono                                           \n"
+
+#: misc/badblocks.c:92
+#, 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"
+msgstr ""
+"Składnia: %s [-b rozm_bloku] [-i plik_wej] [-o plik_wyj] [-svwnf]\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:103
+#, 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:218
+#, 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:322
+msgid "Testing with random pattern: "
+msgstr "Testowanie wzorcem losowym: "
+
+#: misc/badblocks.c:340
+msgid "Testing with pattern 0x"
+msgstr "Testowanie wzorcem 0x"
+
+#: misc/badblocks.c:372 misc/badblocks.c:445
+msgid "during seek"
+msgstr "podczas przeskakiwania"
+
+#: misc/badblocks.c:383
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Dziwna wartość (%ld) w do_read\n"
+
+#: misc/badblocks.c:469
+msgid "during ext2fs_sync_device"
+msgstr "podczas ext2fs_sync_device"
+
+#: misc/badblocks.c:489 misc/badblocks.c:749
+msgid "while beginning bad block list iteration"
+msgstr "podczas rozpoczynania iteracji po liście wadliwych bloków"
+
+#: misc/badblocks.c:503 misc/badblocks.c:602 misc/badblocks.c:759
+msgid "while allocating buffers"
+msgstr "podczas przydzielania buforów"
+
+#: misc/badblocks.c:507
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Sprawdzanie bloków od %lu do %lu\n"
+
+#: misc/badblocks.c:512
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Poszukiwanie wadliwych bloków w trybie tylko do odczytu\n"
+
+#: misc/badblocks.c:521
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Poszukiwanie wadliwych bloków (tylko odczyt): "
+
+#: misc/badblocks.c:528 misc/badblocks.c:634 misc/badblocks.c:676
+#: misc/badblocks.c:822
+msgid "Too many bad blocks, aborting test\n"
+msgstr "Zbyt dużo wadliwych bloków, przerwanie testu\n"
+
+#: misc/badblocks.c:609
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Poszukiwanie wadliwych bloków w trybie odczytu i zapisu\n"
+
+#: misc/badblocks.c:611 misc/badblocks.c:772
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Od bloku %lu do %lu\n"
+
+#: misc/badblocks.c:666
+msgid "Reading and comparing: "
+msgstr "Odczyt i porównywanie: "
+
+#: misc/badblocks.c:771
+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:777
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Poszukiwanie wadliwych bloków (odczyt i niedestruktywny zapis)\n"
+
+#: misc/badblocks.c:784
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Otrzymano przerwanie, sprzątam\n"
+"\n"
+
+#: misc/badblocks.c:867
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "podczas zapisu testowych danych, blok %lu"
+
+#: misc/badblocks.c:988 misc/util.c:152
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s jest zamontowany; "
+
+#: misc/badblocks.c:990
+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:995
+msgid "it's not safe to run badblocks!\n"
+msgstr "nie jest bezpiecznie uruchamiać badblocks!\n"
+
+#: misc/badblocks.c:1000 misc/util.c:163
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s jest najwyraźniej używany przez system; "
+
+#: misc/badblocks.c:1003
+msgid "badblocks forced anyway.\n"
+msgstr "badblocks wymuszone mimo to.\n"
+
+#: misc/badblocks.c:1023
+#, c-format
+msgid "invalid %s - %s"
+msgstr "błędny %s - %s"
+
+#: misc/badblocks.c:1133
+#, 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:1163
+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:1169
+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:1183
+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:1189
+msgid "while trying to determine device size"
+msgstr "podczas próby określenia rozmiaru urządzenia"
+
+#: misc/badblocks.c:1194
+msgid "last block"
+msgstr "ostatni blok"
+
+#: misc/badblocks.c:1200
+msgid "first block"
+msgstr "pierwszy blok"
+
+#: misc/badblocks.c:1203
+#, c-format
+msgid "invalid starting block (%lu): must be less than %lu"
+msgstr "błędny początkowy blok (%lu): musi być mniejszy niż %lu"
+
+#: misc/badblocks.c:1259
+msgid "while creating in-memory bad blocks list"
+msgstr "podczas tworzenia listy wadliwych bloków w pamięci"
+
+#: misc/badblocks.c:1274
+msgid "while adding to in-memory bad block list"
+msgstr "podczas dodawania do listy wadliwych bloków w pamięci"
+
+#: misc/badblocks.c:1298
+#, 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:86
+#, c-format
+msgid "Usage: %s [-RVf] [-+=AaCcDdeijsSu] [-v version] files...\n"
+msgstr "Składnia: %s [-RVf] [-+=AaCcDdeijsSu] [-v wersja] pliki...\n"
+
+#: misc/chattr.c:155
+#, c-format
+msgid "bad version - %s\n"
+msgstr "błędna wersja - %s\n"
+
+#: misc/chattr.c:201 misc/lsattr.c:116
+#, c-format
+msgid "while trying to stat %s"
+msgstr "podczas próby stat %s"
+
+#: misc/chattr.c:208
+#, c-format
+msgid "while reading flags on %s"
+msgstr "podczas odczytu flag %s"
+
+#: misc/chattr.c:213 misc/chattr.c:225
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Flagi %s ustawiono jako "
+
+#: misc/chattr.c:234
+#, c-format
+msgid "while setting flags on %s"
+msgstr "podczas ustawiania flag %s"
+
+#: misc/chattr.c:242
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Wersja %s ustawiona jako %lu\n"
+
+#: misc/chattr.c:246
+#, c-format
+msgid "while setting version on %s"
+msgstr "podczas ustawiania wersji %s"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Nie można przydzielić zmiennej path w chattr_dir_proc"
+
+#: misc/chattr.c:306
+msgid "= is incompatible with - and +\n"
+msgstr "= jest niekompatybilne z - i +\n"
+
+#: misc/chattr.c:314
+msgid "Must use '-v', =, - or +\n"
+msgstr "Trzeba użyć '-v', =, - lub +\n"
+
+#: misc/dumpe2fs.c:55
+#, c-format
+msgid "Usage: %s [-bfhixV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Składnia: %s [-bfhixV] [-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:196
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Grupa %lu: (Bloki "
+
+#: misc/dumpe2fs.c:204
+#, c-format
+msgid "  Checksum 0x%04x"
+msgstr "  Suma kontrolna 0x%04x"
+
+#: misc/dumpe2fs.c:206
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (OCZEKIWANA 0x%04x)"
+
+#: misc/dumpe2fs.c:207
+#, c-format
+msgid ", unused inodes %u\n"
+msgstr ", nie używanych i-węzłów: %u\n"
+
+#: misc/dumpe2fs.c:212
+#, c-format
+msgid "  %s superblock at "
+msgstr "  %s superblok pod "
+
+#: misc/dumpe2fs.c:213
+msgid "Primary"
+msgstr "Główny"
+
+#: misc/dumpe2fs.c:213
+msgid "Backup"
+msgstr "Zapasowy"
+
+#: misc/dumpe2fs.c:217
+#, c-format
+msgid ", Group descriptors at "
+msgstr ", Deskryptory grup pod "
+
+#: misc/dumpe2fs.c:221
+#, c-format
+msgid ""
+"\n"
+"  Reserved GDT blocks at "
+msgstr ""
+"\n"
+"  Zarezerwowane bloki GDT pod "
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " Group descriptor at "
+msgstr ", Deskryptory grup pod "
+
+#: misc/dumpe2fs.c:234
+msgid "  Block bitmap at "
+msgstr "  Bitmapa bloków pod "
+
+#: misc/dumpe2fs.c:238
+msgid ", Inode bitmap at "
+msgstr ", bitmapa i-węzłów pod "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+"  Inode table at "
+msgstr ""
+"\n"
+"  Tablica i-węzłów pod "
+
+#: misc/dumpe2fs.c:248
+#, 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:255
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", nie używanych i-węzłów: %u\n"
+
+#: misc/dumpe2fs.c:258
+msgid "  Free blocks: "
+msgstr "  Wolne bloki: "
+
+#: misc/dumpe2fs.c:269
+msgid "  Free inodes: "
+msgstr "  Wolne i-węzły: "
+
+#: misc/dumpe2fs.c:300
+msgid "while printing bad block list"
+msgstr "podczas wypisywania listy wadliwych bloków"
+
+#: misc/dumpe2fs.c:306
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Wadliwe bloki: %u"
+
+#: misc/dumpe2fs.c:333 misc/tune2fs.c:306
+msgid "while reading journal inode"
+msgstr "podczas odczytu i-węzła kroniki"
+
+#: misc/dumpe2fs.c:339
+msgid "while opening journal inode"
+msgstr "podczas otwierania i-węzła kroniki"
+
+#: misc/dumpe2fs.c:345
+msgid "while reading journal super block"
+msgstr "podczas odczytu superbloku kroniki"
+
+#: misc/dumpe2fs.c:355
+#, c-format
+msgid "Journal features:        "
+msgstr "Cechy kroniki:                "
+
+#: misc/dumpe2fs.c:368
+msgid "Journal size:             "
+msgstr "Rozmiar kroniki:              "
+
+#: misc/dumpe2fs.c:379
+#, c-format
+msgid ""
+"Journal length:           %u\n"
+"Journal sequence:         0x%08x\n"
+"Journal start:            %u\n"
+msgstr ""
+"Długość kroniki:              %u\n"
+"Sekwencja kroniki:            0x%08x\n"
+"Początek kroniki:             %u\n"
+
+#: misc/dumpe2fs.c:386
+#, c-format
+msgid "Journal errno:            %d\n"
+msgstr "Błąd kroniki:             %d\n"
+
+#: misc/dumpe2fs.c:401 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "podczas odczytu superbloku kroniki"
+
+#: misc/dumpe2fs.c:409
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Nie można znaleźć magicznych liczb superbloku kroniki"
+
+#: misc/dumpe2fs.c:413
+#, c-format
+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"
+"Rozmiar bloku kroniki:        %u\n"
+"Długość kroniki:              %u\n"
+"Pierwszy blok kroniki:        %u\n"
+"Sekwencja kroniki:            0x%08x\n"
+"Początek kroniki:             %u\n"
+"Liczba użytkowników kroniki:  %u\n"
+
+#: misc/dumpe2fs.c:426
+#, c-format
+msgid "Journal users:            %s\n"
+msgstr "Użytkownicy kroniki:          %s\n"
+
+#: misc/dumpe2fs.c:442 misc/mke2fs.c:666 misc/tune2fs.c:1137
+#, c-format
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Nie można przydzielić pamięci do analizy opcji!\n"
+
+#: misc/dumpe2fs.c:468
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Błędny parametr superblock: %s\n"
+
+#: misc/dumpe2fs.c:483
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Błędny parametr blocksize: %s\n"
+
+#: misc/dumpe2fs.c:494
+#, 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:554 misc/mke2fs.c:1555
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tUżywane %s\n"
+
+#: misc/dumpe2fs.c:590 misc/e2image.c:1326 misc/tune2fs.c:1923
+#: resize/main.c:317
+#, c-format
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Nie można znaleźć poprawnego superbloku systemu plików.\n"
+
+#: misc/dumpe2fs.c:618
+#, c-format
+msgid ""
+"\n"
+"%s: %s: error reading bitmaps: %s\n"
+msgstr ""
+"\n"
+"%s: %s: błąd podczas czytania bitmap: %s\n"
+
+#: misc/e2image.c:90
+#, c-format
+msgid "Usage: %s [-rsIQa] device image_file\n"
+msgstr "Składnia: %s [-rsIQa] urządzenie plik_obrazu\n"
+
+#: misc/e2image.c:138
+#, c-format
+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:144
+msgid "Couldn't allocate header buffer\n"
+msgstr "Nie można przydzielić bufora nagłówka\n"
+
+#: misc/e2image.c:174
+msgid "while writing superblock"
+msgstr "podczas zapisu superbloku"
+
+#: misc/e2image.c:182
+msgid "while writing inode table"
+msgstr "podczas zapisu tabeli i-węzłów"
+
+#: misc/e2image.c:189
+msgid "while writing block bitmap"
+msgstr "podczas zapisu bitmapy bloków"
+
+#: misc/e2image.c:196
+msgid "while writing inode bitmap"
+msgstr "podczas zapisu bitmapy i-węzłów"
+
+#: misc/e2image.c:1365
+#, 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/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:2080
+#, 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:803
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Składnia: e2label urządzenie [nowa-etykieta]\n"
+
+#: misc/e2undo.c:36
+#, c-format
+msgid "Usage: %s <transaction file> <filesystem>\n"
+msgstr "Składnia: %s <plik_transakcji> <system_plików>\n"
+
+#: misc/e2undo.c:52
+msgid "Failed to read the file system data \n"
+msgstr "Nie udało się odczytać danych systemu plików\n"
+
+#: misc/e2undo.c:62 misc/e2undo.c:83 misc/e2undo.c:108 misc/e2undo.c:206
+#, c-format
+msgid "Failed tdb_fetch %s\n"
+msgstr "tdb_fetch %s nie powiodło się\n"
+
+#: misc/e2undo.c:70
+#, c-format
+msgid "The file system Mount time didn't match %u\n"
+msgstr "Czas montowania systemu plików nie odpowiada %u\n"
+
+#: misc/e2undo.c:89
+msgid "The file system UUID didn't match \n"
+msgstr "UUID systemu plików nie pasuje\n"
+
+#: misc/e2undo.c:163
+#, c-format
+msgid "Failed tdb_open %s\n"
+msgstr "tdb_open %s nie powiodło się\n"
+
+#: misc/e2undo.c:169
+#, c-format
+msgid "Error while determining whether %s is mounted.\n"
+msgstr "Błąd podczas sprawdzania, czy %s jest zamontowany.\n"
+
+#: misc/e2undo.c:175
+msgid "e2undo should only be run on unmounted file system\n"
+msgstr "e2undo powinno być uruchamiane tylko na odmontowanym systemie plików\n"
+
+#: misc/e2undo.c:184
+#, c-format
+msgid "Failed to open %s\n"
+msgstr "Nie udało się otworzyć %s\n"
+
+#: misc/e2undo.c:210
+#, c-format
+msgid "Replayed transaction of size %zd at location %llu\n"
+msgstr "Odtworzono transakcję rozmiaru %zd w położeniu %llu\n"
+
+#: misc/e2undo.c:216
+#, c-format
+msgid "Failed write %s\n"
+msgstr "Nie udało się zapisać %s\n"
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "UWAGA: nie można otworzyć %s: %s\n"
+
+#: misc/fsck.c:353
+#, 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: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 ""
+"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:478
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: nie znaleziono\n"
+
+#: misc/fsck.c:594
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: wait: Nie ma więcej procesów potomnych?!?\n"
+
+#: misc/fsck.c:616
+#, 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:622
+#, 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:661
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Skończono z %s (status wyjścia %d)\n"
+
+#: misc/fsck.c:721
+#, 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:742
+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:761
+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:884
+#, 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:911
+#, 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:967
+msgid "Checking all file systems.\n"
+msgstr "Sprawdzanie wszystkich systemów plików.\n"
+
+#: misc/fsck.c:1058
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--oczekiwanie-- (przebieg %d)\n"
+
+#: misc/fsck.c:1078
+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:1120
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: za dużo urządzeń\n"
+
+#: misc/fsck.c:1153 misc/fsck.c:1239
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: za dużo parametrów\n"
+
+#: misc/lsattr.c:74
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr "Składnia: %s [-RVadlv] [pliki...]\n"
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Podczas odczytu flag %s"
+
+#: misc/lsattr.c:91
+#, c-format
+msgid "While reading version on %s"
+msgstr "Podczas odczytu wersji %s"
+
+#: misc/mke2fs.c:116
+#, 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]\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] [-jnqvDFKSV] 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]\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 cecha[,...]] [-r wersja-fs] [-E opcja-rozszerzona[,...]]\n"
+"\t[-t typ-fs] [-T typ-użycia] [-U UUID] [-jnqvDFKSV] urządzenie [liczba-bloków]\n"
+
+#: misc/mke2fs.c:221
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Uruchamianie polecenia: %s\n"
+
+#: misc/mke2fs.c:225
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "podczas próby uruchomienia '%s'"
+
+#: misc/mke2fs.c:232
+msgid "while processing list of bad blocks from program"
+msgstr "podczas przetwarzania listy wadliwych bloków z programu"
+
+#: misc/mke2fs.c:259
+#, 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:261
+#, 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:264
+msgid "Aborting....\n"
+msgstr "Przerwano...\n"
+
+#: misc/mke2fs.c:284
+#, 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:303
+msgid "while marking bad blocks as used"
+msgstr "podczas zaznaczania wadliwych bloków jako używane"
+
+#: misc/mke2fs.c:320
+msgid "Writing inode tables: "
+msgstr "Zapis tablicy i-węzłów: "
+
+#: misc/mke2fs.c:341
+#, 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:355 misc/mke2fs.c:2257 misc/mke2fs.c:2512
+#, c-format
+msgid "done                            \n"
+msgstr "zakończono                      \n"
+
+#: misc/mke2fs.c:366
+msgid "while creating root dir"
+msgstr "podczas tworzenia głównego katalogu"
+
+#: misc/mke2fs.c:373
+msgid "while reading root inode"
+msgstr "podczas odczytu głównego i-węzła"
+
+#: misc/mke2fs.c:385
+msgid "while setting root inode ownership"
+msgstr "podczas ustawiania właściciela głównego i-węzła"
+
+#: misc/mke2fs.c:403
+msgid "while creating /lost+found"
+msgstr "podczas tworzenia /lost+found"
+
+#: misc/mke2fs.c:410
+msgid "while looking up /lost+found"
+msgstr "podczas szukania /lost+found"
+
+#: misc/mke2fs.c:423
+msgid "while expanding /lost+found"
+msgstr "podczas rozszerzania /lost+found"
+
+#: misc/mke2fs.c:438
+msgid "while setting bad block inode"
+msgstr "podczas ustawiania i-węzła wadliwych bloków"
+
+#: misc/mke2fs.c:465
+#, 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:475
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Uwaga: nie można odczytać bloku 0: %s\n"
+
+#: misc/mke2fs.c:491
+#, 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:507
+msgid "while initializing journal superblock"
+msgstr "podczas inicjalizacji superbloku kroniki"
+
+#: misc/mke2fs.c:515
+msgid "Zeroing journal device: "
+msgstr "Zerowanie urządzenia kroniki: "
+
+#: misc/mke2fs.c:527
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "podczas zerowania urządzenia kroniki (blok %llu, liczba %d)"
+
+#: misc/mke2fs.c:545
+msgid "while writing journal superblock"
+msgstr "podczas zapisu superbloku kroniki"
+
+#: misc/mke2fs.c:560
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"uwaga: %llu bloków nie używanych.\n"
+"\n"
+
+#: misc/mke2fs.c:565
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Etykieta systemu plików=%s\n"
+
+#: misc/mke2fs.c:568
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Typ OS: %s\n"
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Rozmiar bloku=%u (log=%u)\n"
+
+#: misc/mke2fs.c:574
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Rozmiar klastra=%u (log=%u)\n"
+
+#: misc/mke2fs.c:578
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Rozmiar fragmentu=%u (log=%u)\n"
+
+#: misc/mke2fs.c:580
+#, 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:582
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u i-węzłów, %llu bloków\n"
+
+#: misc/mke2fs.c:584
+#, 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:587
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Pierwszy blok danych=%u\n"
+
+#: misc/mke2fs.c:589
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Właściciel głównego katalogu=%u:%u\n"
+
+#: misc/mke2fs.c:591
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Maksymalna liczba bloków systemu plików=%lu\n"
+
+#: misc/mke2fs.c:595
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u grup bloków\n"
+
+#: misc/mke2fs.c:597
+#, c-format
+msgid "%u block group\n"
+msgstr "%u grupa bloków\n"
+
+#: misc/mke2fs.c:600
+#, 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:603
+#, 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:605
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u i-węzłów w grupie\n"
+
+#: misc/mke2fs.c:612
+#, c-format
+msgid "Superblock backups stored on blocks: "
+msgstr "Kopie zapasowe superbloku zapisane w blokach: "
+
+#: misc/mke2fs.c:691 misc/tune2fs.c:1165
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "Błędny okres uaktualniania mmp: %s\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Błędny parametr stride: %s\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Błędny parametr stripe-width: %s\n"
+
+#: misc/mke2fs.c:743
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Błędny parametr resize: %s\n"
+
+#: misc/mke2fs.c:750
+#, c-format
+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:774
+#, c-format
+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:801 misc/mke2fs.c:810
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Błędny root_owner: '%s'\n"
+
+#: misc/mke2fs.c:835
+#, c-format
+msgid "Invalid quotatype parameter: %s\n"
+msgstr "Błędny parametr quotatype: %s\n"
+
+#: misc/mke2fs.c:846
+#, 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"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_uid=<uid of root directory>\n"
+"\troot_gid=<gid of root directory>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr OR grp>\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 '='.\n"
+"\n"
+"Poprawne opcje rozszerzone to:\n"
+"\tstride=<rozmiar porcji danych RAID na dysku w blokach>\n"
+"\tstripe-width=<RAID stride * liczba dysków danych w blokach>\n"
+"\tresize=<maksymalny rozmiar powiększenia w blokach>\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_uid=<uid katalogu głównego>\n"
+"\troot_gid=<gid katalogu głównego>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr LUB grp>\n"
+"\n"
+
+#: misc/mke2fs.c:868
+#, 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:907
+#, 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:920 misc/tune2fs.c:398
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Ustawiona błędna opcja systemu plików: %s\n"
+
+#: misc/mke2fs.c:932 misc/tune2fs.c:349
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Ustawiona błędna opcja montowania: %s\n"
+
+#: misc/mke2fs.c:1072
+#, 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:1076
+#, c-format
+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:1080
+#, c-format
+msgid "Aborting...\n"
+msgstr "Przerwano...\n"
+
+#: misc/mke2fs.c:1120
+#, 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:1276
+#, c-format
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Nie udało się przydzielić pamięci na nową PATH\n"
+
+#: misc/mke2fs.c:1317
+#, 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:1357
+#, c-format
+msgid "invalid block size - %s"
+msgstr "błędny rozmiar bloku - %s"
+
+#: misc/mke2fs.c:1361
+#, 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:1377
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "błędny rozmiar klastra - %s"
+
+#: misc/mke2fs.c:1387
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "'-%' jest przestarzałe, zamiast niego należy używać '-E'"
+
+#: misc/mke2fs.c:1399
+msgid "Illegal number for blocks per group"
+msgstr "Błędna liczba bloków w grupie"
+
+#: misc/mke2fs.c:1404
+msgid "blocks per group must be multiple of 8"
+msgstr "liczba bloków w grupie musi być wielokrotnością 8"
+
+#: misc/mke2fs.c:1412
+msgid "Illegal number for flex_bg size"
+msgstr "Niedopuszczalny rozmiar flex_bg"
+
+#: misc/mke2fs.c:1418
+msgid "flex_bg size must be a power of 2"
+msgstr "rozmiar flex_bg musi być potęgą 2"
+
+#: misc/mke2fs.c:1428
+#, 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:1438
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "błędny rozmiar i-węzła - %s"
+
+#: misc/mke2fs.c:1450
+#, c-format
+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:1460
+msgid "in malloc for bad_blocks_filename"
+msgstr "w malloc dla bad_blocks_filename"
+
+#: misc/mke2fs.c:1473
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "błędny procent zarezerwowanych bloków - %s"
+
+#: misc/mke2fs.c:1488
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "błędna liczba i-węzłów - %s"
+
+#: misc/mke2fs.c:1505
+#, c-format
+msgid "bad revision level - %s"
+msgstr "błędny poziom wersji - %s"
+
+#: misc/mke2fs.c:1519
+msgid "The -t option may only be used once"
+msgstr "Opcja -t może być użyta tylko raz"
+
+#: misc/mke2fs.c:1527
+msgid "The -T option may only be used once"
+msgstr "Opcja -T może być użyta tylko raz"
+
+#: misc/mke2fs.c:1580 misc/mke2fs.c:2591
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "podczas próby otwarcia urządzenia kroniki %s\n"
+
+#: misc/mke2fs.c:1586
+#, 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:1592
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Użycie rozmiaru bloku urządzenia kroniki: %d\n"
+
+#: misc/mke2fs.c:1603
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "błędna liczba bloków '%s' na urządzeniu '%s'"
+
+#: misc/mke2fs.c:1613
+msgid "filesystem"
+msgstr "system plików"
+
+#: misc/mke2fs.c:1626 resize/main.c:367
+msgid "while trying to determine filesystem size"
+msgstr "podczas próby określenia rozmiaru systemu plików"
+
+#: misc/mke2fs.c:1632
+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:1639
+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:1656
+msgid "Filesystem larger than apparent device size."
+msgstr "System plików większy od widocznego rozmiaru urządzenia."
+
+#: misc/mke2fs.c:1676
+#, c-format
+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:1730
+#, 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:1746
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "Rozwinięcie fs_types dla mke2fs.conf: "
+
+#: misc/mke2fs.c:1753
+#, c-format
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr "Cechy systemu plików nie obsługiwane przez systemy plików w wersji 0\n"
+
+#: misc/mke2fs.c:1760
+#, c-format
+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:1772
+#, c-format
+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:1786
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "błędny procent zarezerwowanych bloków - %lf"
+
+#: misc/mke2fs.c:1802
+#, c-format
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+"Cechy resize_inode i meta_bg nie są kompatybilne.\n"
+"Nie można ich włączyć jednocześnie.\n"
+
+#: misc/mke2fs.c:1819
+msgid "while trying to determine hardware sector size"
+msgstr "podczas próby określenia rozmiaru sprzętowego sektora"
+
+#: misc/mke2fs.c:1825
+msgid "while trying to determine physical sector size"
+msgstr "podczas próby określenia rozmiaru sektora fizycznego"
+
+#: misc/mke2fs.c:1858
+msgid "while setting blocksize; too small for device\n"
+msgstr "podczas ustawiania rozmiaru bloku; zbyt mały dla urządzenia\n"
+
+#: misc/mke2fs.c:1863
+#, 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:1881
+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:1887
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "określenie rozmiaru klastra wymaga własności bigalloc"
+
+#: misc/mke2fs.c:1906
+#, 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:1909
+#, 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:1911
+#, 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:1930
+#, 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:1934
+#, 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:1968
+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:1975
+#, c-format
+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"
+"Uwaga: własność bigalloc jest nadal w trakcie rozwoju.\n"
+"Więcej informacji pod https://ext4.wiki.kernel.org/index.php/Bigalloc\n"
+"\n"
+
+#: misc/mke2fs.c:1982 misc/tune2fs.c:740
+#, c-format
+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"
+"Uwaga: własność quota jest nadal w trakcie rozwoju\n"
+"Więcej informacji pod https://ext4.wiki.kernel.org/index.php/Quota\n"
+"\n"
+
+#: misc/mke2fs.c:1993
+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:2002
+msgid "blocks per group count out of range"
+msgstr "liczba bloków w grupie spoza zakresu"
+
+#: misc/mke2fs.c:2026
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "Cecha flex_bg nie jest włączona, więc nie można określić rozmiaru flex_bg"
+
+#: misc/mke2fs.c:2038
+#, 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:2056
+#, 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:2063
+#, 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:2077
+#, 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:2196
+#, 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"
+
+#: misc/mke2fs.c:2210
+msgid "while trying to setup undo file\n"
+msgstr "podczas próby utworzenia pliku cofnięcia (undo)\n"
+
+#: misc/mke2fs.c:2236
+msgid "Discarding device blocks: "
+msgstr "Porzucanie bloków urządzenia: "
+
+#: misc/mke2fs.c:2252
+msgid "failed - "
+msgstr "nie powiodło się - "
+
+#: misc/mke2fs.c:2360
+msgid "while setting up superblock"
+msgstr "podczas ustawiania superbloku"
+
+#: misc/mke2fs.c:2369
+#, c-format
+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:2452
+#, c-format
+msgid "unknown os - %s"
+msgstr "nieznany os - %s"
+
+#: misc/mke2fs.c:2504
+#, c-format
+msgid "Allocating group tables: "
+msgstr "Przydzielanie tablicy grup: "
+
+#: misc/mke2fs.c:2508
+msgid "while trying to allocate filesystem tables"
+msgstr "podczas próby przydzielenia tablic systemu plików"
+
+#: misc/mke2fs.c:2517
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tpodczas próby przekształcenia bitmapy podklastrów"
+
+#: misc/mke2fs.c:2560
+#, 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:2573
+msgid "while reserving blocks for online resize"
+msgstr "podczas rezerwowania bloków na zmianę rozmiaru w locie"
+
+#: misc/mke2fs.c:2584 misc/tune2fs.c:645
+msgid "journal"
+msgstr "kronika"
+
+#: misc/mke2fs.c:2596
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Dodano kronikę do urządzenia %s: "
+
+#: misc/mke2fs.c:2603
+#, 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:2608 misc/mke2fs.c:2640 misc/tune2fs.c:674 misc/tune2fs.c:688
+#, c-format
+msgid "done\n"
+msgstr "wykonano\n"
+
+#: misc/mke2fs.c:2617
+#, c-format
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Pominięto tworzenie kroniki w trybie super-only\n"
+
+#: misc/mke2fs.c:2628
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Tworzenie kroniki (%u bloków): "
+
+#: misc/mke2fs.c:2636
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tpodczas próby utworzenia kroniki"
+
+#: misc/mke2fs.c:2647 misc/tune2fs.c:451
+#, c-format
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+"\n"
+"Błąd podczas włączania funkcji zabezpieczenia przed wielokrotnym montowaniem."
+
+#: misc/mke2fs.c:2652
+#, 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:2665
+#, c-format
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Zapis superbloków i podsumowania systemu plików: "
+
+#: misc/mke2fs.c:2672
+#, c-format
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+"\n"
+"Uwaga, problemy z zapisem superbloków."
+
+#: misc/mke2fs.c:2674
+#, c-format
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"wykonano\n"
+"\n"
+
+#: misc/mklost+found.c:50
+#, c-format
+msgid "Usage: mklost+found\n"
+msgstr "Składnia: mklost+found\n"
+
+#: misc/partinfo.c:41
+#, 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:51
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Nie można otworzyć %s: %s"
+
+#: misc/partinfo.c:57
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Nie można pobrać geometrii %s: %s"
+
+#: misc/partinfo.c:65
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Nie można pobrać rozmiaru %s: %s"
+
+#: misc/partinfo.c:71
+#, 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:107
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr "Proszę uruchomić e2fsck na systemie plików.\n"
+
+#: misc/tune2fs.c:116
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-p mmp_update_interval]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]\n"
+"\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[ -I new_inode_size ] device\n"
+msgstr ""
+"Składnia: %s [-c max_licznik_montowań] [-e trakt._błędów] [-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[,...]] [-p okres_uakt._mmp]\n"
+"\t[-r liczba_zarez._bloków] [-u użytkownik] [-C licznik_montowań]\n"
+"\t[-L etykieta_wolumenu] [-M ostatnio_mont._katalog] [-O [^]cecha[,...]]\n"
+"\t[-E opcja_rozszerzona[,...]] [-T czas_ost._sprawdz.] [-U UUID]\n"
+"\t[-I nowy_rozmiar_i-węzła] urządzenie\n"
+
+#: misc/tune2fs.c:209
+msgid "while trying to open external journal"
+msgstr "podczas próby otworzenia zewnętrznej kroniki"
+
+#: misc/tune2fs.c:214
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s nie jest urządzeniem kroniki.\n"
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "Nie znaleziono superbloku kroniki!\n"
+
+#: misc/tune2fs.c:240
+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:261
+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:269
+msgid "Journal removed\n"
+msgstr "Kronika usunięta\n"
+
+#: misc/tune2fs.c:313
+msgid "while reading bitmaps"
+msgstr "podczas odczytu bitmap"
+
+#: misc/tune2fs.c:321
+msgid "while clearing journal inode"
+msgstr "podczas czyszczenia i-węzła kroniki"
+
+#: misc/tune2fs.c:332
+msgid "while writing journal inode"
+msgstr "podczas zapisu i-węzła kroniki"
+
+#: misc/tune2fs.c:367
+#, c-format
+msgid "(and reboot afterwards!)\n"
+msgstr "(proszę zrestartować potem system!)\n"
+
+#: misc/tune2fs.c:401
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Usuwanie cechy systemu plików '%s' nie jest obsługiwane.\n"
+
+#: misc/tune2fs.c:407
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Ustawianie cechy systemu plików '%s' nie jest obsługiwane.\n"
+
+#: misc/tune2fs.c:416
+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:424
+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:443
+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:461
+#, 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:470
+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:478
+msgid "Error while reading bitmaps\n"
+msgstr "Błąd podczas odczytu bitmap\n"
+
+#: misc/tune2fs.c:487
+#, 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:492
+msgid "while reading MMP block."
+msgstr "podczas odczytu bloku MMP."
+
+#: misc/tune2fs.c:524
+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:535
+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:595
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Uwaga: opcja '^quota' nadpisuje argumenty '-Q'.\n"
+
+#: misc/tune2fs.c:640
+msgid "The filesystem already has a journal.\n"
+msgstr "System plików już ma kronikę.\n"
+
+#: misc/tune2fs.c:658
+#, 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:662
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Tworzenie kroniki na urządzeniu %s: "
+
+#: misc/tune2fs.c:670
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "podczas dodawania systemu plików do kroniki na %s"
+
+#: misc/tune2fs.c:676
+msgid "Creating journal inode: "
+msgstr "Tworzenie i-węzła kroniki: "
+
+#: misc/tune2fs.c:685
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tpodczas próby utworzenia pliku kroniki"
+
+#: misc/tune2fs.c:763
+msgid "Couldn't allocate memory to parse quota options!\n"
+msgstr "Nie można przydzielić pamięci do analizy opcji limitów!\n"
+
+#: misc/tune2fs.c:785
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\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[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:846
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Nie można przeanalizować podanej daty/czasu: %s"
+
+#: misc/tune2fs.c:870 misc/tune2fs.c:883
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "błędna liczba montowań - %s"
+
+#: misc/tune2fs.c:899
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "błędne traktowanie błędów - %s"
+
+#: misc/tune2fs.c:926
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "błędny gid/nazwa grupy - %s"
+
+#: misc/tune2fs.c:959
+#, c-format
+msgid "bad interval - %s"
+msgstr "błędny odstęp - %s"
+
+#: misc/tune2fs.c:988
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "błędny procent zarezerwowanych bloków - %s"
+
+#: misc/tune2fs.c:1003
+msgid "-o may only be specified once"
+msgstr "-o może być podane tylko raz"
+
+#: misc/tune2fs.c:1012
+msgid "-O may only be specified once"
+msgstr "-O może być podane tylko raz"
+
+#: misc/tune2fs.c:1027
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "błędna liczba zarezerwowanych bloków - %s"
+
+#: misc/tune2fs.c:1056
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "błędny uid/nazwa użytkownika - %s"
+
+#: misc/tune2fs.c:1073
+#, c-format
+msgid "bad inode size - %s"
+msgstr "błędny rozmiar i-węzła - %s"
+
+#: misc/tune2fs.c:1080
+#, 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:1174
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "Okres uaktualniania mmp zbyt duży: %lu\n"
+
+#: misc/tune2fs.c:1179
+#, 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:1202
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Błędny parametr RAID stride: %s\n"
+
+#: misc/tune2fs.c:1217
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Błędny parametr RAID stripe-width: %s\n"
+
+#: misc/tune2fs.c:1232
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Błędny algorytm haszowania: %s\n"
+
+#: misc/tune2fs.c:1238
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Ustawianie domyślnego algorytmu haszowania na %s (%d)\n"
+
+#: misc/tune2fs.c:1257
+#, c-format
+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"
+msgstr ""
+"\n"
+"Podano błędne opcje.\n"
+"\n"
+"Opcje rozszerzone są oddzielane przecinkami i mogą przyjmować parametr,\n"
+"\tktóry jest ustawiany znakiem '='.\n"
+"\n"
+"Poprawne opcje to:\n"
+"\tclear_mmp\n"
+"\thash_alg=<algorytm haszowania>\n"
+"\tmount_opts=<rozszerzone domyślne opcje montowania>\n"
+"\tstride=<rozmiar porcji danych RAID na dysku w blokach>\n"
+"\tstripe_width=<RAID stride * liczba dysków danych w blokach>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+
+#: misc/tune2fs.c:1723
+msgid "Failed to read inode bitmap\n"
+msgstr "Nie udało się odczytać bitmapy i-węzłów\n"
+
+#: misc/tune2fs.c:1728
+msgid "Failed to read block bitmap\n"
+msgstr "Nie udało się odczytać bitmapy bloków\n"
+
+#: misc/tune2fs.c:1745 resize/resize2fs.c:870
+msgid "blocks to be moved"
+msgstr "bloki do przeniesienia"
+
+#: misc/tune2fs.c:1748
+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:1754
+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:1759
+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:1791
+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:1818
+msgid "Couldn't allocate memory for tdb filename\n"
+msgstr "Nie można przydzielić pamięci na nazwę plików tdb\n"
+
+#: misc/tune2fs.c:1840
+#, c-format
+msgid "while trying to delete %s"
+msgstr "podczas próby usunięcia %s"
+
+#: misc/tune2fs.c:1850
+#, c-format
+msgid ""
+"To undo the tune2fs operation please run the command\n"
+"    e2undo %s %s\n"
+"\n"
+msgstr ""
+"Aby wycofać operację tune2fs, proszę wydać polecenie\n"
+"    e2undo %s %s\n"
+"\n"
+
+#: misc/tune2fs.c:1919
+#, 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:1937
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Rozmiar i-węzła już wynosi %lu\n"
+
+#: misc/tune2fs.c:1943
+#, c-format
+msgid "Shrinking the inode size is not supported\n"
+msgstr "Zmniejszanie rozmiaru i-węzła nie jest obsługiwane\n"
+
+#: misc/tune2fs.c:1949
+#, 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:1996
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Ustawianie maksymalnej liczby montowań na %d\n"
+
+#: misc/tune2fs.c:2002
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Ustawianie aktualnego licznika montowań na %d\n"
+
+#: misc/tune2fs.c:2007
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Ustawianie traktowania błędów na %d\n"
+
+#: misc/tune2fs.c:2012
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Ustawianie gid-a zarezerwowanych bloków na %lu\n"
+
+#: misc/tune2fs.c:2017
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "odstęp pomiędzy sprawdzeniami jest zbyt duży (%lu)"
+
+#: misc/tune2fs.c:2024
+#, 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:2031
+#, 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:2037
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "liczba zarezerwowanych bloków jest zbyt duża (%llu)"
+
+#: misc/tune2fs.c:2044
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Ustawianie liczby zarezerwowanych bloków na %llu\n"
+
+#: misc/tune2fs.c:2050
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"System plików już ma rzadkie superbloki.\n"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set.  %s"
+msgstr ""
+"\n"
+"Flaga rzadkich superbloków ustawiona. %s"
+
+#: misc/tune2fs.c:2062
+msgid ""
+"\n"
+"Clearing the sparse superflag not supported.\n"
+msgstr ""
+"\n"
+"Usuwanie superflagi sparse nie jest obsługiwane.\n"
+
+#: misc/tune2fs.c:2070
+#, 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:2076
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Ustawianie uid-a zarezerwowanych bloków na %lu\n"
+
+#: misc/tune2fs.c:2108
+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:2126
+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:2159
+msgid "Invalid UUID format\n"
+msgstr "Błędny format UUID-a\n"
+
+#: misc/tune2fs.c:2172
+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:2180
+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ą cechą flex_bg.\n"
+
+#: misc/tune2fs.c:2193
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Ustawianie rozmiaru i-węzła na %lu\n"
+
+#: misc/tune2fs.c:2196
+#, c-format
+msgid "Failed to change inode size\n"
+msgstr "Nie udało się zmienić rozmiaru i-węzła\n"
+
+#: misc/tune2fs.c:2207
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Ustawianie rozmiaru stride na %d\n"
+
+#: misc/tune2fs.c:2212
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Ustawianie szerokości stripe na na %d\n"
+
+#: misc/tune2fs.c:2219
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Ustawianie rozszerzonych domyślnych opcji montowania na '%s'\n"
+
+#: misc/util.c:74
+msgid "Proceed anyway? (y,n) "
+msgstr "Kontynuować mimo to? (t,n) "
+
+#: misc/util.c:89
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr "Nie można wykonać stat na %s --- %s\n"
+
+#: misc/util.c:92
+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"
+
+#: misc/util.c:103
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s nie jest specjalnym urządzeniem blokowym.\n"
+
+#: misc/util.c:132
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr "%s jest całym urządzeniem, a nie tylko jedną partycją!\n"
+
+#: misc/util.c:154
+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:159
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "nie zrobię tutaj %s!\n"
+
+#: misc/util.c:166
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs wymuszone mimo to.\n"
+
+#: misc/util.c:182
+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:207
+#, 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:228
+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"
+"\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"
+"\n"
+"Rozmiar kroniki musi być pomiędzy 1024 a 10240000 blokami systemu plików.\n"
+"\n"
+
+#: misc/util.c:258
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"System plików za mały na kronikę\n"
+
+#: misc/util.c:265
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 10240000 blocks.  Aborting.\n"
+msgstr ""
+"\n"
+"Żądany rozmiar kroniki to %d bloków; musi być\n"
+"pomiędzy 1024 a 10240000 bloków. Przerwano.\n"
+
+#: misc/util.c:273
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Rozmiar kroniki zbyt duży dla systemu plików.\n"
+
+#: misc/util.c:287
+#, 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:48
+#, 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:50
+#, 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:52
+#, c-format
+msgid "       %s -k\n"
+msgstr "          %s -k\n"
+
+#: misc/uuidd.c:154
+msgid "bad arguments"
+msgstr "błędne argumenty"
+
+#: misc/uuidd.c:172
+msgid "connect"
+msgstr "łączenie"
+
+#: misc/uuidd.c:191
+msgid "write"
+msgstr "zapis"
+
+#: misc/uuidd.c:199
+msgid "read count"
+msgstr "odczyt liczby"
+
+#: misc/uuidd.c:205
+msgid "bad response length"
+msgstr "błędna długość odpowiedzi"
+
+#: misc/uuidd.c:270
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr "demon uuidd już działa z pidem %s\n"
+
+#: misc/uuidd.c:278
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Nie udało się utworzyć uniksowego gniazda strumieniowego: %s"
+
+#: misc/uuidd.c:307
+#, 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:315
+#, 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:353
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Błąd odczytu od klienta, długość = %d\n"
+
+#: misc/uuidd.c:361
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "operacja %d, liczba przychodząca = %d\n"
+
+#: misc/uuidd.c:380
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "Wygenerowany UUID czasowy: %s\n"
+
+#: misc/uuidd.c:390
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "Wygenerowany UUID losowy: %s\n"
+
+#: misc/uuidd.c:399
+#, 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:420
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Wygenerowano %d UUID-ów:\n"
+
+#: misc/uuidd.c:432
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Błędna operacja %d\n"
+
+#: misc/uuidd.c:476 misc/uuidd.c:498
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Błędna liczba: %s\n"
+
+#: misc/uuidd.c:533 misc/uuidd.c:562
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Błąd podczas wywołania demona uuidd (%s): %s\n"
+
+#: misc/uuidd.c:543
+#, 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:547
+#, c-format
+msgid "List of UUID's:\n"
+msgstr "Lista UUID-ów:\n"
+
+#: misc/uuidd.c:568
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Nieoczekiwana długość odpowiedzi serwera: %d\n"
+
+#: misc/uuidd.c:585
+#, 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:591
+#, 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:202
+msgid "# Extent dump:\n"
+msgstr "# Zrzut ekstentu:\n"
+
+#: resize/extent.c:203
+#, 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:43
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]\n"
+"\n"
+msgstr ""
+"Składnia: %s [-d flagi_śledzenia] [-f] [-F] [-M] [-P] [-p] urządzenie [nowy_rozm]\n"
+"\n"
+
+#: resize/main.c:65
+msgid "Extending the inode table"
+msgstr "Rozszerzanie tablicy i-węzłów"
+
+#: resize/main.c:68
+msgid "Relocating blocks"
+msgstr "Relokowanie bloków"
+
+#: resize/main.c:71
+msgid "Scanning inode table"
+msgstr "Przeszukiwanie tablicy i-węzłów"
+
+#: resize/main.c:74
+msgid "Updating inode references"
+msgstr "Uaktualnianie odwołań do i-węzłów"
+
+#: resize/main.c:77
+msgid "Moving inode table"
+msgstr "Przenoszenie tablicy i-węzłów"
+
+#: resize/main.c:80
+msgid "Unknown pass?!?"
+msgstr "Nieznany przebieg?!?"
+
+#: resize/main.c:83
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Początkowy przebieg %d (maksymalny = %lu)\n"
+
+#: resize/main.c:154
+#, c-format
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested.  Proceed\n"
+"at 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:271
+#, c-format
+msgid "while opening %s"
+msgstr "podczas otwierania %s"
+
+#: resize/main.c:279
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "podczas pobierania informacji stat dla %s"
+
+#: resize/main.c:337 resize/main.c:450
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Proszę uruchomić najpierw 'e2fsck -f %s'.\n"
+"\n"
+
+#: resize/main.c:341
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Przybliżony minimalny rozmiar systemu plików: %llu\n"
+
+#: resize/main.c:377
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Błędny nowy rozmiar: %s\n"
+
+#: resize/main.c:393
+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:401
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Nowy rozmiar jest mniejszy niż minimalny (%llu)\n"
+
+#: resize/main.c:407
+msgid "Invalid stride length"
+msgstr "Błędna długość stride"
+
+#: resize/main.c:431
+#, 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:438
+#, c-format
+msgid ""
+"The filesystem is already %llu blocks long.  Nothing to do!\n"
+"\n"
+msgstr ""
+"System plików już ma wielkość %llu bloków. Nie ma nic do roboty!\n"
+"\n"
+
+#: resize/main.c:455
+#, 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:464
+#, c-format
+msgid "while trying to resize %s"
+msgstr "podczas próby zmiany rozmiaru %s"
+
+#: resize/main.c:467
+#, 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:473
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu blocks long.\n"
+"\n"
+msgstr ""
+"System plików na %s ma teraz %llu bloków.\n"
+"\n"
+
+#: resize/main.c:488
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "podczas próby skrócenia %s"
+
+#: resize/online.c:79
+#, 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:83
+msgid "On-line shrinking not supported"
+msgstr "Zmniejszanie w locie nie jest obsługiwane"
+
+#: resize/online.c:108
+msgid "Filesystem does not support online resizing"
+msgstr "System plików nie obsługuje zmiany rozmiaru w locie"
+
+#: resize/online.c:117
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "Zbyt mało zarezerwowanych bloków gdt do zmiany rozmiaru"
+
+#: resize/online.c:124
+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:132
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "podczas próby otwarcia punktu montowania %s"
+
+#: resize/online.c:137
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Zażądano starego interfejsu resize.\n"
+
+#: resize/online.c:156 resize/online.c:173
+msgid "Permission denied to resize filesystem"
+msgstr "Brak uprawnień do zmiany rozmiaru systemu plików"
+
+#: resize/online.c:159 resize/online.c:179
+msgid "While checking for on-line resizing support"
+msgstr "Podczas sprawdzania obsługi zmiany rozmiaru w locie"
+
+#: resize/online.c:176
+msgid "Kernel does not support online resizing"
+msgstr "Jądro nie obsługuje zmiany rozmiaru w locie"
+
+#: resize/online.c:209
+#, 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:219
+msgid "While trying to extend the last group"
+msgstr "Podczas próby rozszerzenia ostatniej grupy"
+
+#: resize/online.c:273
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Podczas próby dodania grupy #%d"
+
+#: resize/online.c:284
+#, 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:369
+#, c-format
+msgid "inodes (%llu) must be less than %u"
+msgstr "liczba i-węzłów (%llu) musi być mniejsza niż %u"
+
+#: resize/resize2fs.c:631
+msgid "reserved blocks"
+msgstr "zarezerwowane bloki"
+
+#: resize/resize2fs.c:875
+msgid "meta-data blocks"
+msgstr "bloki metadanych"
+
+#: resize/resize2fs.c:1837
+#, c-format
+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.42.8"
+msgstr "Biblioteka EXT2FS w wersji 1.42.8"
+
+#: 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 an block bitmap"
+msgstr "Nie można zapisać bitmapy bloków"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read an 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 cechy"
+
+#: lib/ext2fs/ext2_err.c:79
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "System plików ma włączone nie obsługiwane cechy 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: fsck being run"
+msgstr "MMP: fsck 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 MMP block"
+msgstr "Suma kontrolna bloku MMP nie zgadza się z blokiem MMP"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Plik ext2 już istnieje"
+
+#: e2fsck/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profil w wersji 0.0"
+
+#: e2fsck/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Błędna wartość magiczna w profile_node"
+
+#: e2fsck/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Nie znaleziono sekcji profilu"
+
+#: e2fsck/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Nie znaleziono relacji profilu"
+
+#: e2fsck/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ą"
+
+#: e2fsck/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr "Nagłówek sekcji profilu ma niezerową wartość"
+
+#: e2fsck/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Błędna lista w strukturach profilu"
+
+#: e2fsck/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Błędny poziom grupy w strukturach profilu"
+
+#: e2fsck/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Błędny wskaźnik rodzica w strukturach profilu"
+
+#: e2fsck/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Błędna wartość magiczna w iteratorze profilu"
+
+#: e2fsck/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Nie można ustawić wartości w węźle sekcji"
+
+#: e2fsck/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Błędny argument przekazany do biblioteki profilu"
+
+#: e2fsck/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Próba zmodyfikowania profilu tylko do odczytu"
+
+#: e2fsck/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "Nagłówek sekcji profilu nie na najwyższym poziomie"
+
+#: e2fsck/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Błąd składni w nagłówku sekcji profilu"
+
+#: e2fsck/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Błąd składni w relacji profilu"
+
+#: e2fsck/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Nadmiarowy nawias zamykający w profilu"
+
+#: e2fsck/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Brakujący nawias otwierający w profilu"
+
+#: e2fsck/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Błędna wartość magiczna w profile_t"
+
+#: e2fsck/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Błędna wartość magiczna w profile_section_t"
+
+#: e2fsck/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"
+
+#: e2fsck/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Błędny obiekt profile_section"
+
+#: e2fsck/prof_err.c:33
+msgid "No more sections"
+msgstr "Nie ma więcej sekcji"
+
+#: e2fsck/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Błędny nameset przekazany do funkcji odpytującej"
+
+#: e2fsck/prof_err.c:35
+msgid "No profile file open"
+msgstr "Brak otwartego pliku profilu"
+
+#: e2fsck/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Błędna wartość magiczna w profile_file_t"
+
+#: e2fsck/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Nie udało się otworzyć pliku profilu"
+
+#: e2fsck/prof_err.c:38
+msgid "Section already exists"
+msgstr "Sekcja już istnieje"
+
+#: e2fsck/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Błędna wartość logiczna"
+
+#: e2fsck/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Błędna wartość całkowita"
+
+#: e2fsck/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Błędna wartość magiczna w profile_file_data_t"
+
+#~ msgid "Clearing extent flag not supported on %s"
+#~ msgstr "Usuwanie flagi ekstentów nie jest obsługiwane na %s"
+
+#~ msgid ""
+#~ "%s: The combination of flex_bg and\n"
+#~ "\t!resize_inode features is not supported by resize2fs.\n"
+#~ msgstr ""
+#~ "%s: Kombinacja cech flex_bg i\n"
+#~ "\t!resize_inode nie jest obsługiwana przez resize2fs.\n"
+
+#~ msgid "%s is mounted.  "
+#~ msgstr "%s jest zamontowany. "
diff --git a/e2fsprogs/po/quot.sed b/e2fsprogs/po/quot.sed
new file mode 100644
index 0000000..0122c46
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/po/remove-potcdate.sin b/e2fsprogs/po/remove-potcdate.sin
new file mode 100644
index 0000000..2436c49
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/po/sv.gmo b/e2fsprogs/po/sv.gmo
new file mode 100644
index 0000000..a80b02e
--- /dev/null
+++ b/e2fsprogs/po/sv.gmo
Binary files differ
diff --git a/e2fsprogs/po/sv.po b/e2fsprogs/po/sv.po
new file mode 100644
index 0000000..f21038f
--- /dev/null
+++ b/e2fsprogs/po/sv.po
@@ -0,0 +1,6670 @@
+# Swedish messages for e2fsprogs.
+# Copyright © 2003, 2005, 2006, 2008, 2009, 2010, 2011, 2012 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.
+#
+# $Revision: 1.74 $
+#
+#. 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).
+#.  
+#. 	%b	<blk>			block number
+#. 	%B	<blkcount>		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_dir_acl
+#. 	%Iu	<inode> -> i_uid
+#. 	%Ig	<inode> -> i_gid
+#. 	%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: 2013-06-16 08:17-0400\n"
+"PO-Revision-Date: 2013-08-19 22:35+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"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:180
+#, 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/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:1332 e2fsck/unix.c:1420 misc/badblocks.c:1214
+#: misc/badblocks.c:1222 misc/badblocks.c:1236 misc/badblocks.c:1248
+#: misc/dumpe2fs.c:588 misc/e2image.c:1196 misc/e2image.c:1324
+#: misc/e2image.c:1337 misc/mke2fs.c:196 misc/tune2fs.c:1907 resize/main.c:315
+#, c-format
+msgid "while trying to open %s"
+msgstr "vid försök att öppna %s"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "vid försök att använda popen \"%s\""
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:203
+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:105
+msgid "while updating bad block inode"
+msgstr "vid uppdatering av inoden för dåliga block"
+
+#: e2fsck/badblocks.c:131
+#, 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/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:61 e2fsck/ehandler.c:110
+msgid "Ignore error"
+msgstr "Ignorera fel"
+
+#: e2fsck/ehandler.c:62
+msgid "Force rewrite"
+msgstr "Framtvinga omskrivning"
+
+#: e2fsck/ehandler.c:104
+#, c-format
+msgid "Error writing block %lu (%s) while %s.  "
+msgstr "Fel vid skrivning av block %lu (%s) vid %s.  "
+
+#: e2fsck/ehandler.c:107
+#, c-format
+msgid "Error writing block %lu (%s).  "
+msgstr "Fel vid skrivning av block %lu (%s).  "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "tomma katalogblock"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "tom katalogkarta"
+
+#: e2fsck/emptydir.c:98
+#, 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:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "Otillåtet antal block!\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Kunde inte allokera blockbuffert (storlek=%d)\n"
+
+#: 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/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "Användning: %s [-F] [-I inodbuffertblock] enhet\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:961
+#, c-format
+msgid "while opening %s for flushing"
+msgstr "vid öppning av %s för utskrivning"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:967 resize/main.c:288
+#, c-format
+msgid "while trying to flush %s"
+msgstr "vid försök att skriva ut %s"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1091
+msgid "while opening inode scan"
+msgstr "vid öppning av inodsökning"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1109
+msgid "while getting next inode"
+msgstr "när nästa inod hämtades"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%u inoder genomsökta.\n"
+
+#: e2fsck/journal.c:522
+msgid "reading journal superblock\n"
+msgstr "läser journalsuperblock\n"
+
+#: e2fsck/journal.c:579
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: inget giltigt journalsuperblock hittades\n"
+
+#: e2fsck/journal.c:588
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: journalen för kort\n"
+
+#: e2fsck/journal.c:880
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: återhämtar journalen\n"
+
+#: e2fsck/journal.c:882
+#, 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:909
+#, 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 orginalsträ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:113
+msgid "aextended attribute"
+msgstr "autökat attribut"
+
+#: e2fsck/message.c:114
+msgid "Aerror allocating"
+msgstr "Afel vid allokering"
+
+#: e2fsck/message.c:115
+msgid "bblock"
+msgstr "bblock"
+
+#: e2fsck/message.c:116
+msgid "Bbitmap"
+msgstr "Bbitkarta"
+
+#: e2fsck/message.c:117
+msgid "ccompress"
+msgstr "ckomprimera"
+
+#: e2fsck/message.c:118
+msgid "Cconflicts with some other fs @b"
+msgstr "Ckonflikt med något annat fs @b"
+
+#: e2fsck/message.c:119
+msgid "iinode"
+msgstr "iinod"
+
+#: e2fsck/message.c:120
+msgid "Iillegal"
+msgstr "Iotillåten"
+
+#: e2fsck/message.c:121
+msgid "jjournal"
+msgstr "jjournal"
+
+#: e2fsck/message.c:122
+msgid "Ddeleted"
+msgstr "Draderad"
+
+#: e2fsck/message.c:123
+msgid "ddirectory"
+msgstr "dkatalog"
+
+#: 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 "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:131
+msgid "Lis a link"
+msgstr "Lär en länk"
+
+#: e2fsck/message.c:132
+msgid "mmultiply-claimed"
+msgstr "mflerfaldigt ianspråkstagna"
+
+#: e2fsck/message.c:133
+msgid "ninvalid"
+msgstr "nogiltig"
+
+#: e2fsck/message.c:134
+msgid "oorphaned"
+msgstr "oföräldralös"
+
+#: e2fsck/message.c:135
+msgid "pproblem in"
+msgstr "pproblem i"
+
+#: e2fsck/message.c:136
+msgid "qquota"
+msgstr "qkvot"
+
+#: e2fsck/message.c:137
+msgid "rroot @i"
+msgstr "rrotinod"
+
+#: e2fsck/message.c:138
+msgid "sshould be"
+msgstr "sskulle varit"
+
+#: e2fsck/message.c:139
+msgid "Ssuper@b"
+msgstr "Ssuperblock"
+
+#: e2fsck/message.c:140
+msgid "uunattached"
+msgstr "ulös"
+
+#: e2fsck/message.c:141
+msgid "vdevice"
+msgstr "venhet"
+
+#: e2fsck/message.c:142
+msgid "xextent"
+msgstr "xutsträckning"
+
+#: e2fsck/message.c:143
+msgid "zzero-length"
+msgstr "znollängds"
+
+#: e2fsck/message.c:154
+msgid "<The NULL inode>"
+msgstr "<Inod noll>"
+
+#: e2fsck/message.c:155
+msgid "<The bad blocks inode>"
+msgstr "<Inoden för dåliga block>"
+
+#: e2fsck/message.c:157
+msgid "<The user quota inode>"
+msgstr "<Inoden för användarkvoter>"
+
+#: e2fsck/message.c:158
+msgid "<The group quota inode>"
+msgstr "<Inoden för gruppkvoter>"
+
+#: e2fsck/message.c:159
+msgid "<The boot loader inode>"
+msgstr "<Uppstartsprograminoden>"
+
+#: e2fsck/message.c:160
+msgid "<The undelete directory inode>"
+msgstr "<Inoden för återhämtning av borttagna kataloger>"
+
+#: e2fsck/message.c:161
+msgid "<The group descriptor inode>"
+msgstr "<Gruppidentifierarinoden>"
+
+#: e2fsck/message.c:162
+msgid "<The journal inode>"
+msgstr "<Journalinoden>"
+
+#: e2fsck/message.c:163
+msgid "<Reserved inode 9>"
+msgstr "<Reserverad inod 9>"
+
+#: e2fsck/message.c:164
+msgid "<Reserved inode 10>"
+msgstr "<Reserverad inod 10>"
+
+#: e2fsck/message.c:333
+msgid "regular file"
+msgstr "normal fil"
+
+#: e2fsck/message.c:335
+msgid "directory"
+msgstr "katalog"
+
+#: e2fsck/message.c:337
+msgid "character device"
+msgstr "teckenenhet"
+
+#: e2fsck/message.c:339
+msgid "block device"
+msgstr "blockenhet"
+
+#: e2fsck/message.c:341
+msgid "named pipe"
+msgstr "namngivet rör"
+
+#: e2fsck/message.c:343
+msgid "symbolic link"
+msgstr "symbolisk länk"
+
+#: e2fsck/message.c:345 misc/uuidd.c:161
+msgid "socket"
+msgstr "uttag (socket)"
+
+#: e2fsck/message.c:347
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "okänd filtyp med typ 0%o"
+
+#: e2fsck/message.c:422
+msgid "indirect block"
+msgstr "indirekt block"
+
+#: e2fsck/message.c:424
+msgid "double indirect block"
+msgstr "dubbelt indirekt block"
+
+#: e2fsck/message.c:426
+msgid "triple indirect block"
+msgstr "trippelt indirekt block"
+
+#: e2fsck/message.c:428
+msgid "translator block"
+msgstr "översättningsblock"
+
+#: e2fsck/message.c:430
+msgid "block #"
+msgstr "block nr."
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "karta över flerfaldigt i anspråkstagna inoder"
+
+#: e2fsck/pass1b.c:610 e2fsck/pass1b.c:730
+#, 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:821
+msgid "returned from clone_file_block"
+msgstr "återvände från clone_file_block"
+
+#: e2fsck/pass1b.c:843
+#, 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:855
+#, 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:475 e2fsck/pass2.c:782
+msgid "reading directory block"
+msgstr "läser katalogblock"
+
+#: e2fsck/pass1.c:598
+msgid "in-use inode map"
+msgstr "karta över använda inoder"
+
+#: e2fsck/pass1.c:609
+msgid "directory inode map"
+msgstr "kataloginodskarta"
+
+#: e2fsck/pass1.c:619
+msgid "regular file inode map"
+msgstr "inodskarta över reguljära filer"
+
+#: e2fsck/pass1.c:628
+msgid "in-use block map"
+msgstr "karta över använda block"
+
+#: e2fsck/pass1.c:695
+msgid "opening inode scan"
+msgstr "öppnar inodsökning"
+
+#: e2fsck/pass1.c:729
+msgid "getting next inode from scan"
+msgstr "hämtar nästa inod från sökning"
+
+#: e2fsck/pass1.c:1239
+msgid "Pass 1"
+msgstr "Pass 1"
+
+#: e2fsck/pass1.c:1296
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "läser indirektblock för inod %u"
+
+#: e2fsck/pass1.c:1346
+msgid "bad inode map"
+msgstr "karta över dåliga inoder"
+
+#: e2fsck/pass1.c:1369
+msgid "inode in bad block map"
+msgstr "inod i karta över dåliga block"
+
+#: e2fsck/pass1.c:1389
+msgid "imagic inode map"
+msgstr "imagic inodskarta"
+
+#: e2fsck/pass1.c:1416
+msgid "multiply claimed block map"
+msgstr "karta över flerfaldigt i anspråkstagna block"
+
+#: e2fsck/pass1.c:1527
+msgid "ext attr block map"
+msgstr "karta över block för utökade attribut"
+
+#: e2fsck/pass1.c:2299
+#, 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:2660
+msgid "block bitmap"
+msgstr "blockbitkarta"
+
+#: e2fsck/pass1.c:2666
+msgid "inode bitmap"
+msgstr "inodbitkarta"
+
+#: e2fsck/pass1.c:2672
+msgid "inode table"
+msgstr "inodstabell"
+
+#: e2fsck/pass2.c:283
+msgid "Pass 2"
+msgstr "Pass 2"
+
+#: e2fsck/pass2.c:805
+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:136
+msgid "Pass 3"
+msgstr "Pass 3"
+
+#: e2fsck/pass3.c:322
+msgid "inode loop detection bitmap"
+msgstr "bitkarta för upptäckt av inodsslingor"
+
+#: e2fsck/pass4.c:196
+msgid "Pass 4"
+msgstr "Pass 4"
+
+#: e2fsck/pass5.c:74
+msgid "Pass 5"
+msgstr "Pass 5"
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(ingen prompt)"
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr "Fixa"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Töm"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Relokera"
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr "Allokera"
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr "Expandera"
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr "Koppla till /lost+found"
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr "Skapa"
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr "Rädda"
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr "Kapa"
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr "Töm inod"
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr "Avbryt"
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr "Dela"
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr "Fortsätt"
+
+#: e2fsck/problem.c:65
+msgid "Clone multiply-claimed blocks"
+msgstr "Klona flerfaldigt ianspråkstagna block"
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr "Ta bort fil"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Undertryck meddelanden"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "Avlänka"
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "Töm HTree-index"
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr "Återskapa"
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr "(INGET)"
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr "FIXAT"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "TÖMD"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "RELOKERAT"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "ALLOKERAT"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "EXPANDERAD"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "ÅTERKOPPLAD"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "SKAPAD"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "RÄDDAD"
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr "KAPAT"
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr "INOD TÖMD"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "AVBRUTET"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr "DELAD"
+
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr "FORTSÄTTER"
+
+#: e2fsck/problem.c:93
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "FLERFALDIG IANSPRÅKSTAGNA BLOCK KLONADE"
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr "FIL BORTTAGEN"
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr "UNDERTRYCKT"
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr "AVLÄNKAD"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "HTREE-INDEX TÖMT"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "KOMMER ÅTERSKAPA"
+
+#. @-expanded: block bitmap for group %g is not in group.  (block %b)\n
+#: e2fsck/problem.c:107
+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:111
+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:116
+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 correct ext2\n
+#. @-expanded: filesystem.  If the device is valid and it really contains an ext2\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 %S <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:122
+#, c-format
+msgid ""
+"\n"
+"The @S could not be read or does not describe a correct ext2\n"
+"@f.  If the @v is valid and it really contains an ext2\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 %S <@v>\n"
+"\n"
+msgstr ""
+"\n"
+"Superblocket kunde inte läsas eller beskriver inte ett korrekt\n"
+"ext2-filsystem.  Om enheten är giltig och den verkligen innehåller ett\n"
+"ext2-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 %S <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:131
+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:138
+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:145
+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:150
+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:155
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr "filsystemet hade ingen UUID; genererar en.\n"
+
+#: e2fsck/problem.c:160
+#, 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:169
+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:174
+#, 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:179
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "inodsantal i superblock är %i, skall vara %j.\n"
+
+#: e2fsck/problem.c:183
+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:188
+#, 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:193
+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:198
+msgid "Can't find external @j\n"
+msgstr "Kan inte hitta extern journal\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:203
+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:208
+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:213
+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:221
+msgid "@j @S is corrupt.\n"
+msgstr "Journalsuperblock är trasigt.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal %s is present.\n
+#: e2fsck/problem.c:226
+#, c-format
+msgid "@S has_@j flag is clear, but a @j %s is present.\n"
+msgstr "Superblocksflagga har_journal är nollställd, men en journal %s finns.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:231
+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:236
+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:241
+msgid "Clear @j"
+msgstr "Töm journal"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.  
+#: e2fsck/problem.c:246 e2fsck/problem.c:695
+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:251
+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:256
+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:261
+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:266
+#, 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:271
+#, 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:276
+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:281
+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:286
+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:291
+#, 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:296
+#, 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:301
+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:307
+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:312
+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:317
+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:322
+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:328
+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:333
+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:338
+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:343
+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:347
+#, 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:352
+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:357
+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:362
+#, 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:367
+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:372
+msgid "Last @g @b @B uninitialized.  "
+msgstr "Sista gruppblockbitkarta oinitierad.  "
+
+#: e2fsck/problem.c:377
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr "Journaltransaktion %i var trasig, återuppspelningen avbröts.\n"
+
+#: e2fsck/problem.c:381
+msgid "The test_fs flag is set (and ext4 is available).  "
+msgstr "Flaggan test_fs är satt (och ext4 är tillgänligt).  "
+
+#. @-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)  
+#: e2fsck/problem.c:386
+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)  "
+msgstr ""
+"Superblockets senaste monteringstid ligger i framtiden.\n"
+"\t(med mindre än en dag, förmodligen för att hårdvaruklockan går fel)"
+
+#. @-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).  
+#: e2fsck/problem.c:392
+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).  "
+msgstr ""
+"Superblockets skrevs senast i framtiden.\n"
+"\t(med mindre än en dag, förmodligen för att hårdvaruklockan går fel)"
+
+#. @-expanded: One or more block group descriptor checksums are invalid.  
+#: e2fsck/problem.c:398
+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:403
+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:408
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Sätter antalet fria block till %c (var %b)\n"
+
+#. @-expanded: Making quota inode %i (%Q) hidden.\n
+#: e2fsck/problem.c:413
+msgid "Making @q @i %i (%Q) hidden.\n"
+msgstr ""
+"Gör kvotinod %i (%Q) dold.\n"
+"\n"
+
+#. @-expanded: superblock has invalid MMP block.  
+#: e2fsck/problem.c:418
+msgid "@S has invalid MMP block.  "
+msgstr "superblocket har ett felaktigt MMP-block.  "
+
+#. @-expanded: superblock has invalid MMP magic.  
+#: e2fsck/problem.c:423
+msgid "@S has invalid MMP magic.  "
+msgstr "superblocket har ogiltigt MMP-magiskt tal.  "
+
+#: e2fsck/problem.c:428
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:433
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:440
+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:444
+msgid "@r is not a @d.  "
+msgstr "Rootinod är inte en katalog.  "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).  
+#: e2fsck/problem.c:449
+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:454
+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:459
+#, 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:464
+#, 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:469
+#, 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:474
+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:479
+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:484
+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:489
+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:494
+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:499
+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:504
+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:509
+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:514
+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:519
+#, 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:524
+#, 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:529
+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:534
+msgid "Bad @b @i has illegal @b(s).  "
+msgstr "Felaktig blockinod har ogiltiga block.  "
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:539
+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:544
+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:549
+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:556
+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:561
+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 garaniter.\n"
+"\n"
+
+#. @-expanded: The primary superblock (%b) is on the bad block list.\n
+#: e2fsck/problem.c:567
+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:572
+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:578
+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:583
+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:589
+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:595
+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:600
+#, c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr "Fil vid allokering av blockbuffert för relokering av %s\n"
+
+#. @-expanded: Relocating group %g's %s from %b to %c...\n
+#: e2fsck/problem.c:605
+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:610
+#, 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:615
+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:620
+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:625 e2fsck/problem.c:1474
+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:630
+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:635
+#, 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:640
+#, 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:645
+#, 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:650
+#, 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:655
+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:660
+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:666
+#, 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:674
+#, 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:679
+#, 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: inode %i has compression flag set on filesystem without compression support.  
+#: e2fsck/problem.c:685
+#, c-format
+msgid "@i %i has @cion flag set on @f without @cion support.  "
+msgstr "Inod %i har kompressionsflagga satt på filsystem utan kompressionsstöd.  "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.  
+#: e2fsck/problem.c:690
+#, 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:700
+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:705
+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:710
+#, 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:716
+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:721
+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:726
+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:731
+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:736
+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:741
+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:746
+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:751
+msgid "@a @b %b has h_@bs > 1.  "
+msgstr "Utökade attribut-block %b har h_blocks > 1.  "
+
+#. @-expanded: error allocating extended attribute block %b.  
+#: e2fsck/problem.c:756
+msgid "@A @a @b %b.  "
+msgstr "Fel vid allokering av block för utökade attribut %b.  "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).  
+#: e2fsck/problem.c:761
+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:766
+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:771
+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:776
+#, 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:780
+msgid "%B (%b) causes @d to be too big.  "
+msgstr "%B (%b) får katalog att bli för stor.  "
+
+#: e2fsck/problem.c:785
+msgid "%B (%b) causes file to be too big.  "
+msgstr "%B (%b) får fil att bli för stor.  "
+
+#: e2fsck/problem.c:790
+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:795
+#, 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:800
+#, 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:805
+#, c-format
+msgid "@h %i has an @n root node.\n"
+msgstr "HTREE kataloginod %i har en ogiltig rotnod.\n"
+
+#. @-expanded: HTREE directory inode %i has an unsupported hash version (%N)\n
+#: e2fsck/problem.c:810
+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:815
+#, 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:820
+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:825
+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:831
+#, 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:836
+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:841
+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:846
+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:851
+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:856
+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:861
+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:866
+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:871
+#, 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:876
+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:882
+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:887
+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:892
+#, 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:897
+#, 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:902
+#, 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:907
+#, 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:912
+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:916
+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:921
+#, 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 regular file.  
+#: e2fsck/problem.c:926
+msgid "@q @i is not regular file.  "
+msgstr "Kvotainoden är inte en vanlig fil.  "
+
+#. @-expanded: quota inode is not in use, but contains data.  
+#: e2fsck/problem.c:931
+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:936
+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:941
+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:946
+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: 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:953
+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:959
+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: \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:967
+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 ytterliggare 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:973
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "Flerfaldigt ianspråkstagna block i inod %i:"
+
+#: e2fsck/problem.c:988
+#, 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:993
+#, 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:998
+#, 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:1003 e2fsck/problem.c:1318
+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:1008
+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:1014
+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:1019
+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:1025
+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:1030
+msgid "\t<@f metadata>\n"
+msgstr "\t<filsystemsmetadata>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1035
+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:1040
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"Flerfaldig ianspråkstagna block redan överlåtna eller klonade.\n"
+"\n"
+
+#: e2fsck/problem.c:1053
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Kunde inte klona fil: %m\n"
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1059
+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:1064
+#, 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:1069
+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:1074
+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:1079
+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:1084
+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:1089
+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:1094
+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:1099
+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:1104
+#, 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:1109
+#, 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:1114
+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:1119
+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:1124
+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:1129
+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_dir_acl for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1134
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr "i_dir_acl 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:1139
+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:1144
+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:1149
+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:1154
+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:1159
+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:1164
+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:1169
+#, c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "\".\"-katalogpost i kataloginod %i är inte nollterminerad\n"
+
+#. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1174
+#, c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr "\"..\"-katalogpost i kataloginod %i är inte nollterminerad\n"
+
+#. @-expanded: inode %i (%Q) is an illegal character device.\n
+#: e2fsck/problem.c:1179
+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:1184
+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:1189
+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:1194
+msgid "@E is duplicate '..' @e.\n"
+msgstr "Post \"%Dn\" i %p (%i) är duplicerad \"..\"-post.\n"
+
+#: e2fsck/problem.c:1199 e2fsck/problem.c:1499
+#, 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:1204
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr ""
+"Post \"%Dn\" i %p (%i) har rec_len %Dr, skulle varit %N.\n"
+"\n"
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1209
+#, 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:1214
+#, 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:1219
+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:1224
+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:1229
+#, 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:1234
+#, 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:1239
+#, 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:1244
+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:1249
+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:1254
+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:1259
+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:1264
+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:1269
+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:1274
+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:1279
+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:1284
+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:1289
+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:1294
+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:1299
+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:1304
+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:1309
+msgid "@n @h %d (%q).  "
+msgstr "Ogiltig HTREE-kataloginod %d (%q).  "
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1313
+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:1323
+#, 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:1328
+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:1333
+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:1338
+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:1343
+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:1348
+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:1353
+#, 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:1358
+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:1363
+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:1368
+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:1372
+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:1377
+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:1382
+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: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1389
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Pass 3: Kontrollerar katalogförbindelser\n"
+
+#. @-expanded: root inode not allocated.  
+#: e2fsck/problem.c:1394
+msgid "@r not allocated.  "
+msgstr "Rotinod inte allokerad.  "
+
+#. @-expanded: No room in lost+found directory.  
+#: e2fsck/problem.c:1399
+msgid "No room in @l @d.  "
+msgstr "Ingen plats i lost+found-katalog.  "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1404
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "Oförbunden kataloginod %i (%p)\n"
+
+#. @-expanded: /lost+found not found.  
+#: e2fsck/problem.c:1409
+msgid "/@l not found.  "
+msgstr "/lost+found inte funnen.  "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1414
+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:1419
+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:1424
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Kunde inte expandera /lost+found: %m\n"
+
+#: e2fsck/problem.c:1429
+#, 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:1434
+#, 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:1439
+#, 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:1444
+#, 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:1449
+#, 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:1454
+#, 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:1459
+#, 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:1464
+#, 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:1469
+#, 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älderkatalogpost\n"
+"\n"
+
+#. @-expanded: Error creating root directory (%s): %m\n
+#: e2fsck/problem.c:1479
+#, 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:1484
+#, 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:1489
+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:1494
+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:1504
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/lost+found är inte en katalog (ino=%i)\n"
+
+#: e2fsck/problem.c:1511
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Pass 3A: Optimerar kataloger\n"
+
+#: e2fsck/problem.c:1516
+#, 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:1521
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Misslyckades att optimera katalog %q (%d): %m\n"
+
+#: e2fsck/problem.c:1526
+msgid "Optimizing directories: "
+msgstr "Optimerar kataloger: "
+
+#: e2fsck/problem.c:1543
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Pass 4: Kontrollerar referensräknare\n"
+
+#. @-expanded: unattached zero-length inode %i.  
+#: e2fsck/problem.c:1548
+#, c-format
+msgid "@u @z @i %i.  "
+msgstr "Lös nollängdsinod %i.  "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1553
+#, 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:1558
+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:1562
+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"
+"    ELLER 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: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1572
+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:1577
+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:1582
+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:1587
+msgid "@b @B differences: "
+msgstr "Blockbitkarteskillnader: "
+
+#. @-expanded: inode bitmap differences: 
+#: e2fsck/problem.c:1607
+msgid "@i @B differences: "
+msgstr "Inodsbitkarteskillnader: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1627
+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:1632
+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:1637
+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:1642
+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:1647
+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:1652
+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:1658
+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:1663
+#, 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:1668
+#, 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:1693
+#, 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:1698
+#, 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: Recreate journal
+#: e2fsck/problem.c:1705
+msgid "Recreate @j"
+msgstr "Återskapa journal"
+
+#: e2fsck/problem.c:1710
+msgid "Update quota info for quota type %N"
+msgstr "Uppdatera kvotinformation för kvottyp %N"
+
+#: e2fsck/problem.c:1829
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Ej hanterad felkod (0x%x)!\n"
+
+#: e2fsck/problem.c:1954 e2fsck/problem.c:1958
+msgid "IGNORED"
+msgstr "IGNORERAT"
+
+#: e2fsck/scantest.c:79
+#, c-format
+msgid "Memory used: %d, elapsed time: %6.3f/%6.3f/%6.3f\n"
+msgstr "Använt minne: %d, 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: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:188
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr "vid anrop av ext2fs_block_iterate för inod %d"
+
+#: e2fsck/super.c:211
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %d"
+msgstr "vid anrop av ext2fs_adjust_ea_refcount2 för inod %d"
+
+#: e2fsck/super.c:272
+msgid "Truncating"
+msgstr "Kapar"
+
+#: e2fsck/super.c:273
+msgid "Clearing"
+msgstr "Tömmer"
+
+#: e2fsck/unix.c:74
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfvtDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] device\n"
+msgstr ""
+"Användning: %s [-panyrcdfvtDFV] [-b superblock] [-B blockstorlek]\n"
+"\t\t[-I inodbuffertblock] [-P processinodsstorlek]\n"
+"\t\t[-l|-L dåliga_block_fil] [-C fd] [-j extern_journal]\n"
+"\t\t[-E utökade-flaggor] enhet\n"
+
+#: e2fsck/unix.c:80
+#, c-format
+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                   Repearera 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:86
+#, c-format
+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"
+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"
+
+#: e2fsck/unix.c:131
+#, 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:157
+#, 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:161
+#, 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:166
+#, 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:171
+#, 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:179
+msgid "             Extent depth histogram: "
+msgstr "             Histogram över utsträckningars djup: "
+
+#: e2fsck/unix.c:188
+#, 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:192
+#, 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:194
+#, 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:196
+#, 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:198
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u katalog\n"
+msgstr[1] "%12u kataloger\n"
+
+#: e2fsck/unix.c:200
+#, 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:203
+#, 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:205
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u fifo\n"
+msgstr[1] "%12u fifon\n"
+
+#: e2fsck/unix.c:207
+#, 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:209
+#, 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:211
+#, 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 snbba symboliska länkar)\n"
+
+#: e2fsck/unix.c:215
+#, 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:219
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u fil\n"
+msgstr[1] "%12u filer\n"
+
+#: e2fsck/unix.c:232 misc/badblocks.c:983 misc/tune2fs.c:1985 misc/util.c:147
+#: resize/main.c:259
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "när det avgjordes om %s är monterat."
+
+#: e2fsck/unix.c:252
+#, c-format
+msgid "Warning!  %s is %s.\n"
+msgstr "Varning!  %s är %s.\n"
+
+#: e2fsck/unix.c:259
+#, c-format
+msgid "%s is %s.\n"
+msgstr "%s är %s.\n"
+
+#: e2fsck/unix.c:262
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Kan inte fortsätta, avbryter.\n"
+"\n"
+
+#: e2fsck/unix.c:264
+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:269
+msgid "Do you really want to continue"
+msgstr "Vill du verkligen fortsätta"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "check aborted.\n"
+msgstr "kontroll avbruten.\n"
+
+#: e2fsck/unix.c:361
+msgid " contains a file system with errors"
+msgstr " innehåller ett filsystem med fel"
+
+#: e2fsck/unix.c:363
+msgid " was not cleanly unmounted"
+msgstr " var inte fläckfritt avmonterat"
+
+#: e2fsck/unix.c:365
+msgid " primary superblock features different from backup"
+msgstr " det primära superblockets egenskaper skiljer från reservens"
+
+#: e2fsck/unix.c:369
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " har monterats %u gånger utan att kontrolleras"
+
+#: e2fsck/unix.c:376
+msgid " has filesystem last checked time in the future"
+msgstr " har tidpunkten för senaste filsystemskontroll i framtiden"
+
+#: e2fsck/unix.c:382
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " har inte kontrollerats på %u dagar"
+
+#: e2fsck/unix.c:391
+msgid ", check forced.\n"
+msgstr ", kontroll framtvingad.\n"
+
+#: e2fsck/unix.c:424
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: rent, %u/%u filer, %llu/%llu block"
+
+#: e2fsck/unix.c:443
+msgid " (check deferred; on battery)"
+msgstr " (kontroll senarelagd; på batteri)"
+
+#: e2fsck/unix.c:446
+msgid " (check after next mount)"
+msgstr " (kontrollera efter nästa montering)"
+
+#: e2fsck/unix.c:448
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (kontrollera om %ld monteringar)"
+
+#: e2fsck/unix.c:598
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "FEL: Kunde inte öppna /dev/null (%s)\n"
+
+#: e2fsck/unix.c:667
+#, c-format
+msgid "Invalid EA version.\n"
+msgstr "Ogiltig EA-version.\n"
+
+#: e2fsck/unix.c:694
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Okänd utökad flagga: %s\n"
+
+#: e2fsck/unix.c:719
+#, 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:788
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Fel vid validering av filidentifierare %d: %s\n"
+
+#: e2fsck/unix.c:792
+msgid "Invalid completion information file descriptor"
+msgstr "Ogiltig filidentifierare för förloppsinformation"
+
+#: e2fsck/unix.c:807
+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:828
+#, 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:859 e2fsck/unix.c:931 misc/tune2fs.c:811 misc/tune2fs.c:1100
+#: misc/tune2fs.c:1118
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Kan inte hitta \"%s\""
+
+#: e2fsck/unix.c:910
+msgid "The -n and -D options are incompatible."
+msgstr "Flaggorna -n och -D är inkompatibla."
+
+#: e2fsck/unix.c:915
+msgid "The -n and -c options are incompatible."
+msgstr "Flaggorna -n och -c är inkompatibla."
+
+#: e2fsck/unix.c:920
+msgid "The -n and -l/-L options are incompatible."
+msgstr "Flaggorna -n och -l/-L är inkompatibla."
+
+#: e2fsck/unix.c:974
+#, c-format
+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:1022
+#, 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:1031
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+"\n"
+"Ogiltigt ickenumerikst argument till -%c (\"%s\")\n"
+"\n"
+
+#: e2fsck/unix.c:1120
+#, 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:1137 e2fsck/unix.c:1142
+msgid "while checking MMP block"
+msgstr "vid uppsättning av MMP-block"
+
+#: e2fsck/unix.c:1144 misc/tune2fs.c:1912
+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"
+
+#: e2fsck/unix.c:1194
+#, c-format
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Fel: ext2fs-bibliotekversion inaktuell!\n"
+
+#: e2fsck/unix.c:1202
+msgid "while trying to initialize program"
+msgstr "vid försök att initiera program"
+
+#: e2fsck/unix.c:1225
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tAnvänder %s, %s\n"
+
+#: e2fsck/unix.c:1237
+msgid "need terminal for interactive repairs"
+msgstr "behöver terminal för interaktiva reparationer"
+
+#: e2fsck/unix.c:1290
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s försöker med reservblock ...\n"
+
+#: e2fsck/unix.c:1292
+msgid "Superblock invalid,"
+msgstr "Superblocket är ogiltigt,"
+
+#: e2fsck/unix.c:1293
+msgid "Group descriptors look bad..."
+msgstr "Gruppbeskrivarna ser trasiga ut ..."
+
+#: e2fsck/unix.c:1303
+#, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "%s: %s när reservblocken användes"
+
+#: e2fsck/unix.c:1307
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr "%s: går tillbaka till orginalsuperblock\n"
+
+#: e2fsck/unix.c:1335
+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:1341
+msgid "Could this be a zero-length partition?\n"
+msgstr "Kan detta vara en nollängdspartition?\n"
+
+#: e2fsck/unix.c:1344
+#, 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:1349
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Kanske inte existerar eller växlingsenhet?\n"
+
+#: e2fsck/unix.c:1352
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr "Filsystemet monterat eller öppnat exklusivt av ett annat program?\n"
+
+#: e2fsck/unix.c:1355
+msgid "Possibly non-existent device?\n"
+msgstr "Kanske en enhet som inte existerar?\n"
+
+#: e2fsck/unix.c:1358
+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:1423
+msgid "Get a newer version of e2fsck!"
+msgstr "Hämta en nyare version av e2fsck!"
+
+#: e2fsck/unix.c:1467
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr "vid kontroll av ext3-journal för %s"
+
+#: e2fsck/unix.c:1478
+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:1491
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "kan inte sätta superblocksflaggor på %s\n"
+
+#: e2fsck/unix.c:1497
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr "vid återhämtning av ext3-journal för %s"
+
+#: e2fsck/unix.c:1521
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s har funktioner som inte stöds:"
+
+#: e2fsck/unix.c:1536
+#, c-format
+msgid "%s: warning: compression support is experimental.\n"
+msgstr "%s: varning: komprimeringsstöd är experimentellt.\n"
+
+#: e2fsck/unix.c:1542
+#, c-format
+msgid ""
+"%s: e2fsck not compiled with HTREE support,\n"
+"\tbut filesystem %s has HTREE directories.\n"
+msgstr ""
+"%s: e2fsck är inte kompilerat med HTREE-stöd,\n"
+"\tmen filsystem %s har HTREE-kataloger.\n"
+
+#: e2fsck/unix.c:1594
+#, 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:1597
+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:1638
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Skapar journal (%d block): "
+
+#: e2fsck/unix.c:1648
+msgid " Done.\n"
+msgstr " Klar.\n"
+
+#: e2fsck/unix.c:1649
+msgid ""
+"\n"
+"*** journal has been re-created - filesystem is now ext3 again ***\n"
+msgstr ""
+"\n"
+"*** journalen har återskapats - filsystemet är nu ext3 igen ***\n"
+
+#: e2fsck/unix.c:1672
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Startar om e2fsck från början ...\n"
+
+#: e2fsck/unix.c:1676
+msgid "while resetting context"
+msgstr "vid återställning av omgivning"
+
+#: e2fsck/unix.c:1683
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck inställd.\n"
+
+#: e2fsck/unix.c:1688
+msgid "aborted"
+msgstr "avbruten"
+
+#: e2fsck/unix.c:1700 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** FILSYSTEMET MODIFIERADES *****\n"
+
+#: e2fsck/unix.c:1704
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr "%s: ***** STARTA OM LINUX *****\n"
+
+#: e2fsck/unix.c:1712 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/unix.c:1752
+msgid "while setting block group checksum info"
+msgstr "när kontrollsummeinformation för blockgrupp sattes"
+
+#: e2fsck/util.c:190 misc/util.c:70
+msgid "yY"
+msgstr "yYjJ"
+
+#: e2fsck/util.c:191
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:205
+msgid "<y>"
+msgstr "<j>"
+
+#: e2fsck/util.c:207
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:209
+msgid " (y/n)"
+msgstr " (j/n)"
+
+#: e2fsck/util.c:223
+msgid "cancelled!\n"
+msgstr "inställd!\n"
+
+#: e2fsck/util.c:238
+msgid "yes\n"
+msgstr "ja\n"
+
+#: e2fsck/util.c:240
+msgid "no\n"
+msgstr "nej\n"
+
+#: e2fsck/util.c:250
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? nej\n"
+"\n"
+
+#: e2fsck/util.c:254
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? ja\n"
+"\n"
+
+#: e2fsck/util.c:258
+msgid "yes"
+msgstr "ja"
+
+#: e2fsck/util.c:258
+msgid "no"
+msgstr "nej"
+
+#: e2fsck/util.c:273
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: ogiltiga bitkarteblock för %s"
+
+#: e2fsck/util.c:278
+msgid "reading inode and block bitmaps"
+msgstr "läser inod- och blockbitkartor"
+
+#: e2fsck/util.c:286
+#, 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:298
+msgid "writing block and inode bitmaps"
+msgstr "skiver block- och inodsbitkartor"
+
+#: e2fsck/util.c:303
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr "vid omskrivning av block- och inodsbitkartor för %s"
+
+#: e2fsck/util.c:315
+#, 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:396
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Använt minne: %lu k/%lu k (%lu k/%lu k), "
+
+#: e2fsck/util.c:400
+#, c-format
+msgid "Memory used: %lu, "
+msgstr "Använt minne: %lu, "
+
+#: e2fsck/util.c:407
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "tid: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:412
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "förfluten tid: %6.3f\n"
+
+#: e2fsck/util.c:447 e2fsck/util.c:461
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "när inod %lu i %s lästes"
+
+#: e2fsck/util.c:475 e2fsck/util.c:488
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "när inod %lu i %s skrevs"
+
+#: e2fsck/util.c:637
+msgid "while allocating zeroizing buffer"
+msgstr "vid allokering av nollställningsbuffert"
+
+#: e2fsck/util.c:785
+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:69
+msgid "done                                                 \n"
+msgstr "klar                                                 \n"
+
+#: misc/badblocks.c:92
+#, 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"
+msgstr ""
+"Användning: %s [-b blockstorlek] [-i infil] [-o utfile] [-svwnf]\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:103
+#, 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:218
+#, 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:322
+msgid "Testing with random pattern: "
+msgstr "Testar med slumpmönster: "
+
+#: misc/badblocks.c:340
+msgid "Testing with pattern 0x"
+msgstr "Testar med mönster 0x"
+
+#: misc/badblocks.c:372 misc/badblocks.c:445
+msgid "during seek"
+msgstr "vid sökning"
+
+#: misc/badblocks.c:383
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "Underligt värde (%ld) i do_read\n"
+
+#: misc/badblocks.c:469
+msgid "during ext2fs_sync_device"
+msgstr "vid ext2fs_sync_device"
+
+#: misc/badblocks.c:489 misc/badblocks.c:749
+msgid "while beginning bad block list iteration"
+msgstr "vid början av iteration över lista av dåliga block"
+
+#: misc/badblocks.c:503 misc/badblocks.c:602 misc/badblocks.c:759
+msgid "while allocating buffers"
+msgstr "vid allokering av buffertar"
+
+#: misc/badblocks.c:507
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "Kontrollerar block %lu till %lu\n"
+
+#: misc/badblocks.c:512
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Letar efter dåliga block i skrivskyddat läge\n"
+
+#: misc/badblocks.c:521
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Letar efter dåliga block (skrivskyddad test): "
+
+#: misc/badblocks.c:528 misc/badblocks.c:634 misc/badblocks.c:676
+#: misc/badblocks.c:822
+msgid "Too many bad blocks, aborting test\n"
+msgstr "För många dåliga block, avbryter testet\n"
+
+#: misc/badblocks.c:609
+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:611 misc/badblocks.c:772
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Från block %lu till %lu\n"
+
+#: misc/badblocks.c:666
+msgid "Reading and comparing: "
+msgstr "Läser och jämför: "
+
+#: misc/badblocks.c:771
+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:777
+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:784
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Avbrott fångat, rensar upp\n"
+
+#: misc/badblocks.c:867
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "vid testdataskrivning, block %lu"
+
+#: misc/badblocks.c:988 misc/util.c:152
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s är monterat, "
+
+#: misc/badblocks.c:990
+msgid "badblocks forced anyway.  Hope /etc/mtab is incorrect.\n"
+msgstr "badblocks framtvingat ändå.  Hoppas /etc/mtab är felaktig.\n"
+
+#: misc/badblocks.c:995
+msgid "it's not safe to run badblocks!\n"
+msgstr "det är inte säkert att köra badblocks!\n"
+
+#: misc/badblocks.c:1000 misc/util.c:163
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr "%s används uppenbarligen av systemet; "
+
+#: misc/badblocks.c:1003
+msgid "badblocks forced anyway.\n"
+msgstr "badblocks framtvingat ändå.\n"
+
+#: misc/badblocks.c:1023
+#, c-format
+msgid "invalid %s - %s"
+msgstr "ogiltig %s - %s"
+
+#: misc/badblocks.c:1133
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "kunde inte allokera minne för testmönster - %s"
+
+#: misc/badblocks.c:1163
+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:1169
+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:1183
+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:1189
+msgid "while trying to determine device size"
+msgstr "vid försök att avgöra enhetsstorlek"
+
+#: misc/badblocks.c:1194
+msgid "last block"
+msgstr "sista block"
+
+#: misc/badblocks.c:1200
+msgid "first block"
+msgstr "första block"
+
+#: misc/badblocks.c:1203
+#, c-format
+msgid "invalid starting block (%lu): must be less than %lu"
+msgstr "felaktigt startblock (%lu): måste vara mindre än %lu"
+
+#: misc/badblocks.c:1259
+msgid "while creating in-memory bad blocks list"
+msgstr "när lista över dåliga block i minnet skapades"
+
+#: misc/badblocks.c:1274
+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:1298
+#, 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:86
+#, c-format
+msgid "Usage: %s [-RVf] [-+=AaCcDdeijsSu] [-v version] files...\n"
+msgstr "Användning: %s [-RVf] [-+=AaCcDdeijsSu] [-v version] filer…\n"
+
+#: misc/chattr.c:155
+#, c-format
+msgid "bad version - %s\n"
+msgstr "felaktig version - %s\n"
+
+#: misc/chattr.c:201 misc/lsattr.c:116
+#, c-format
+msgid "while trying to stat %s"
+msgstr "vid försök att ta status på %s"
+
+#: misc/chattr.c:208
+#, c-format
+msgid "while reading flags on %s"
+msgstr "vid läsning av flaggor på %s"
+
+#: misc/chattr.c:213 misc/chattr.c:225
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Flaggor på %s satta som "
+
+#: misc/chattr.c:234
+#, c-format
+msgid "while setting flags on %s"
+msgstr "vid sättning av flaggor på %s"
+
+#: misc/chattr.c:242
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "Version av %s satt som %lu\n"
+
+#: misc/chattr.c:246
+#, c-format
+msgid "while setting version on %s"
+msgstr "vid sättning av version på %s"
+
+#: misc/chattr.c:266
+#, c-format
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr "Kunde inte allokera sökvägsvariabel i chattr_dir_proc"
+
+#: misc/chattr.c:306
+msgid "= is incompatible with - and +\n"
+msgstr "= är inkompatibelt med - och +\n"
+
+#: misc/chattr.c:314
+msgid "Must use '-v', =, - or +\n"
+msgstr "Måste använda \"-v\", =, - eller +\n"
+
+#: misc/dumpe2fs.c:55
+#, c-format
+msgid "Usage: %s [-bfhixV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Användning: %s [-bfhixV] [-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:196
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Grupp %lu: (Block "
+
+#: misc/dumpe2fs.c:204
+#, c-format
+msgid "  Checksum 0x%04x"
+msgstr "  Kontrollsumma 0x%04x"
+
+#: misc/dumpe2fs.c:206
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (0x%04x FÖRVÄNTADES)"
+
+#: misc/dumpe2fs.c:207
+#, c-format
+msgid ", unused inodes %u\n"
+msgstr ", oanvända inoder %u\n"
+
+#: misc/dumpe2fs.c:212
+#, c-format
+msgid "  %s superblock at "
+msgstr "  %ssuperblock vid "
+
+#: misc/dumpe2fs.c:213
+msgid "Primary"
+msgstr "Primärt "
+
+#: misc/dumpe2fs.c:213
+msgid "Backup"
+msgstr "Reserv"
+
+#: misc/dumpe2fs.c:217
+#, c-format
+msgid ", Group descriptors at "
+msgstr ", Gruppbeskrivare vid "
+
+#: misc/dumpe2fs.c:221
+#, c-format
+msgid ""
+"\n"
+"  Reserved GDT blocks at "
+msgstr ""
+"\n"
+"  Reserverade GDT-block vid "
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " Group descriptor at "
+msgstr " Gruppbeskrivare vid "
+
+#: misc/dumpe2fs.c:234
+msgid "  Block bitmap at "
+msgstr "  Blockbitkarta vid "
+
+#: misc/dumpe2fs.c:238
+msgid ", Inode bitmap at "
+msgstr ", Inodsbitkarta vid "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+"  Inode table at "
+msgstr ""
+"\n"
+"  Inodstabell vid "
+
+#: misc/dumpe2fs.c:248
+#, 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:255
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u oanvända inoder\n"
+
+#: misc/dumpe2fs.c:258
+msgid "  Free blocks: "
+msgstr "  Fria block: "
+
+#: misc/dumpe2fs.c:269
+msgid "  Free inodes: "
+msgstr "  Fria inoder: "
+
+#: misc/dumpe2fs.c:300
+msgid "while printing bad block list"
+msgstr "vid utskrift av lista över dåliga block"
+
+#: misc/dumpe2fs.c:306
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Dåliga block: %u"
+
+#: misc/dumpe2fs.c:333 misc/tune2fs.c:306
+msgid "while reading journal inode"
+msgstr "vid läsning av journalinod"
+
+#: misc/dumpe2fs.c:339
+msgid "while opening journal inode"
+msgstr "när journalinoden öppnades"
+
+#: misc/dumpe2fs.c:345
+msgid "while reading journal super block"
+msgstr "när journalsuperblocket lästes"
+
+#: misc/dumpe2fs.c:355
+#, c-format
+msgid "Journal features:        "
+msgstr "Journalfunktioner:       "
+
+#: misc/dumpe2fs.c:368
+msgid "Journal size:             "
+msgstr "Journalstorlek:           "
+
+#: misc/dumpe2fs.c:379
+#, c-format
+msgid ""
+"Journal length:           %u\n"
+"Journal sequence:         0x%08x\n"
+"Journal start:            %u\n"
+msgstr ""
+"Journallängd:             %u\n"
+"Journalsekvens:           0x%08x\n"
+"Journalstart:             %u\n"
+
+#: misc/dumpe2fs.c:386
+#, c-format
+msgid "Journal errno:            %d\n"
+msgstr "Journalfelnummer:         %d\n"
+
+#: misc/dumpe2fs.c:401 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "vid läsning av journalsuperblock"
+
+#: misc/dumpe2fs.c:409
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Kunde inte hitta journalsuperblockets magiska tal"
+
+#: misc/dumpe2fs.c:413
+#, c-format
+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"
+"Journalblockstorlek:      %u\n"
+"Journallängd:             %u\n"
+"Journalens första block:  %u\n"
+"Journalsekvens:           0x%08x\n"
+"Journalstart:             %u\n"
+"Journalens användarantal: %u\n"
+
+#: misc/dumpe2fs.c:426
+#, c-format
+msgid "Journal users:            %s\n"
+msgstr "Journalanvändare:         %s\n"
+
+#: misc/dumpe2fs.c:442 misc/mke2fs.c:666 misc/tune2fs.c:1137
+#, c-format
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Kunde inte allokera minne för att tolka flaggor!\n"
+
+#: misc/dumpe2fs.c:468
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Ogiltig superblockparameter: %s\n"
+
+#: misc/dumpe2fs.c:483
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Ogiltig blockstorleksparameter: %s\n"
+
+#: misc/dumpe2fs.c:494
+#, 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:554 misc/mke2fs.c:1555
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tAnvänder %s\n"
+
+#: misc/dumpe2fs.c:590 misc/e2image.c:1326 misc/tune2fs.c:1923
+#: resize/main.c:317
+#, c-format
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Kunde inte hitta giltigt filsystemssuperblock.\n"
+
+#: misc/dumpe2fs.c:618
+#, c-format
+msgid ""
+"\n"
+"%s: %s: error reading bitmaps: %s\n"
+msgstr ""
+"\n"
+"%s: %s: fel vid läsning av bitkartor: %s\n"
+
+#: misc/e2image.c:90
+#, c-format
+msgid "Usage: %s [-rsIQa] device image_file\n"
+msgstr "Användning: %s [-rsIQa] enhet avbildsfil\n"
+
+#: misc/e2image.c:138
+#, c-format
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr "Fel: huvudstorlek är större än wrt_size\n"
+
+#: misc/e2image.c:144
+msgid "Couldn't allocate header buffer\n"
+msgstr "Kunde inte allokera huvudbuffert\n"
+
+#: misc/e2image.c:174
+msgid "while writing superblock"
+msgstr "vid skrivning av superblock"
+
+#: misc/e2image.c:182
+msgid "while writing inode table"
+msgstr "vid skrivning av inodtabell"
+
+#: misc/e2image.c:189
+msgid "while writing block bitmap"
+msgstr "vid skrivning av blockbitkarta"
+
+#: misc/e2image.c:196
+msgid "while writing inode bitmap"
+msgstr "vid skrivning av inodbitkarta"
+
+#: misc/e2image.c:1365
+#, 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/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:2080
+#, 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:803
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "Användning: e2label enhet [ny-etikett]\n"
+
+#: misc/e2undo.c:36
+#, c-format
+msgid "Usage: %s <transaction file> <filesystem>\n"
+msgstr "Användning: %s <transaktionsfil> <filsystem>\n"
+
+#: misc/e2undo.c:52
+msgid "Failed to read the file system data \n"
+msgstr "Misslyckades att läsa filsystemdata \n"
+
+#: misc/e2undo.c:62 misc/e2undo.c:83 misc/e2undo.c:108 misc/e2undo.c:206
+#, c-format
+msgid "Failed tdb_fetch %s\n"
+msgstr "Misslyckades med tdb_fetch %s\n"
+
+#: misc/e2undo.c:70
+#, c-format
+msgid "The file system Mount time didn't match %u\n"
+msgstr "Filsystemets monterings tid stämmer inte med %u\n"
+
+#: misc/e2undo.c:89
+msgid "The file system UUID didn't match \n"
+msgstr "Filsystemets UUID stämmer inte med \n"
+
+#: misc/e2undo.c:163
+#, c-format
+msgid "Failed tdb_open %s\n"
+msgstr "tdb_open misslyckades %s\n"
+
+#: misc/e2undo.c:169
+#, c-format
+msgid "Error while determining whether %s is mounted.\n"
+msgstr "Fel när det avgjordes om %s är monterat.\n"
+
+#: misc/e2undo.c:175
+msgid "e2undo should only be run on unmounted file system\n"
+msgstr "e2undo skall endast köras på omonterade filsystem\n"
+
+#: misc/e2undo.c:184
+#, c-format
+msgid "Failed to open %s\n"
+msgstr "Det gick inte att öppna öppna %s\n"
+
+#: misc/e2undo.c:210
+#, c-format
+msgid "Replayed transaction of size %zd at location %llu\n"
+msgstr "Återuppspelning av transaktion med storlek %zd på plats %llu\n"
+
+#: misc/e2undo.c:216
+#, c-format
+msgid "Failed write %s\n"
+msgstr "Misslyckades skriva %s\n"
+
+#: misc/fsck.c:343
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "VARNING: kunde inte öppna %s: %s\n"
+
+#: misc/fsck.c:353
+#, 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: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 ""
+"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:478
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: inte funnen\n"
+
+#: misc/fsck.c:594
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: wait: Inga fler barnprocesser?!?\n"
+
+#: misc/fsck.c:616
+#, 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:622
+#, 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:661
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "Avslutade med %s (slutstatus %d)\n"
+
+#: misc/fsck.c:721
+#, 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:742
+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:761
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Kunde inte allokera minne för filsystemtyper\n"
+
+#: misc/fsck.c:884
+#, 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:911
+#, 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:967
+msgid "Checking all file systems.\n"
+msgstr "Kontrollerar alla filsystem.\n"
+
+#: misc/fsck.c:1058
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--väntar-- (pass %d)\n"
+
+#: misc/fsck.c:1078
+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:1120
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: för många enheter\n"
+
+#: misc/fsck.c:1153 misc/fsck.c:1239
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: för många argument\n"
+
+#: misc/lsattr.c:74
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr "Användning: %s [-RVadlv] [filer...]\n"
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Vid läsning av flaggor på %s"
+
+#: misc/lsattr.c:91
+#, c-format
+msgid "While reading version on %s"
+msgstr "Vid läsning av version på %s"
+
+#: misc/mke2fs.c:116
+#, 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]\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] [-jnqvDFKSV] 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]\n"
+"\t[-m reservade-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] [-jnqvDFKSV] enhet [blockantal]\n"
+
+#: misc/mke2fs.c:221
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Kör kommando: %s\n"
+
+#: misc/mke2fs.c:225
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "vid försök att köra \"%s\""
+
+#: misc/mke2fs.c:232
+msgid "while processing list of bad blocks from program"
+msgstr "vid bearbetning av lista över dåliga block från program"
+
+#: misc/mke2fs.c:259
+#, 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:261
+#, 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:264
+msgid "Aborting....\n"
+msgstr "Avbryter...\n"
+
+#: misc/mke2fs.c:284
+#, 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:303
+msgid "while marking bad blocks as used"
+msgstr "vid markering av dåliga block som använda"
+
+#: misc/mke2fs.c:320
+msgid "Writing inode tables: "
+msgstr "Skriver inodstabeller: "
+
+#: misc/mke2fs.c:341
+#, 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:355 misc/mke2fs.c:2257 misc/mke2fs.c:2512
+#, c-format
+msgid "done                            \n"
+msgstr "klar                            \n"
+
+#: misc/mke2fs.c:366
+msgid "while creating root dir"
+msgstr "vid skapande av rotkatalog"
+
+#: misc/mke2fs.c:373
+msgid "while reading root inode"
+msgstr "vid läsning av rotinod"
+
+#: misc/mke2fs.c:385
+msgid "while setting root inode ownership"
+msgstr "vid inställning av rotinodens ägarskap"
+
+#: misc/mke2fs.c:403
+msgid "while creating /lost+found"
+msgstr "vid skapande av /lost+found"
+
+#: misc/mke2fs.c:410
+msgid "while looking up /lost+found"
+msgstr "vid sökning efter /lost+found"
+
+#: misc/mke2fs.c:423
+msgid "while expanding /lost+found"
+msgstr "vid utvidgning av /lost+found"
+
+#: misc/mke2fs.c:438
+msgid "while setting bad block inode"
+msgstr "vid inställning av inod för dåliga block"
+
+#: misc/mke2fs.c:465
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Slut på mine vid radering av sektorer %d-%d\n"
+
+#: misc/mke2fs.c:475
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Varning: kune inte läsa block 0: %s\n"
+
+#: misc/mke2fs.c:491
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Varning: kunde inte radera sektor %d: %s\n"
+
+#: misc/mke2fs.c:507
+msgid "while initializing journal superblock"
+msgstr "vid initiering av journalsuperblock"
+
+#: misc/mke2fs.c:515
+msgid "Zeroing journal device: "
+msgstr "Nollställer journalenhet: "
+
+#: misc/mke2fs.c:527
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr "vid nollställning av journalenhet (block %llu, antal %d)"
+
+#: misc/mke2fs.c:545
+msgid "while writing journal superblock"
+msgstr "vid skrivning av journalsuperblock"
+
+#: misc/mke2fs.c:560
+#, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"varning: %llu block oanvända.\n"
+"\n"
+
+#: misc/mke2fs.c:565
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Filsystemsetikett=%s\n"
+
+#: misc/mke2fs.c:568
+#, c-format
+msgid "OS type: %s\n"
+msgstr "OS-typ: %s\n"
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Blockstorlek=%u (log=%u)\n"
+
+#: misc/mke2fs.c:574
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Klusterstorlek=%u (log=%u)\n"
+
+#: misc/mke2fs.c:578
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Fragmentstorlek=%u (log=%u)\n"
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr "Kliv=%u block, remsvidd=%u block\n"
+
+#: misc/mke2fs.c:582
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u inoder, %llu block\n"
+
+#: misc/mke2fs.c:584
+#, 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:587
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Första datablock=%u\n"
+
+#: misc/mke2fs.c:589
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr "Rotkatalogägare=%u:%u\n"
+
+#: misc/mke2fs.c:591
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Maximalt antal filsystemsblock=%lu\n"
+
+#: misc/mke2fs.c:595
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u blockgrupper\n"
+
+#: misc/mke2fs.c:597
+#, c-format
+msgid "%u block group\n"
+msgstr "%u blockgrupp\n"
+
+#: misc/mke2fs.c:600
+#, 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:603
+#, 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:605
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "%u inoder per grupp\n"
+
+#: misc/mke2fs.c:612
+#, c-format
+msgid "Superblock backups stored on blocks: "
+msgstr "Superblockkopior lagrade på block: "
+
+#: misc/mke2fs.c:691 misc/tune2fs.c:1165
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "Ogiltigt mmp_update_interval: %s\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Ogiltig stride-parameter: %s\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Ogiltig remsbreddsparameter: %s\n"
+
+#: misc/mke2fs.c:743
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Ogiltig storleksändringsparameter: %s\n"
+
+#: misc/mke2fs.c:750
+#, c-format
+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:774
+#, c-format
+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:801 misc/mke2fs.c:810
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Ogiltig rotägare: ”%s”\n"
+
+#: misc/mke2fs.c:835
+#, c-format
+msgid "Invalid quotatype parameter: %s\n"
+msgstr "Ogiltig quotatype-parameter: %s\n"
+
+#: misc/mke2fs.c:846
+#, 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"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_uid=<uid of root directory>\n"
+"\troot_gid=<gid of root directory>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr OR grp>\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"
+"\tstride=<RAID-datastycken per disk i block>\n"
+"\tstripe-width=<RAID-kliv · datadiskar i block>\n"
+"\tresize=<maximal storleksändringsstorlek i block>\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_uid=<uid för rotkatalogen>\n"
+"\troot_gid=<gid för rotkatalogen>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr ELLER grp>\n"
+"\n"
+
+#: misc/mke2fs.c:868
+#, 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:907
+#, 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:920 misc/tune2fs.c:398
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Ogiltig filsystemsflagga satt: %s\n"
+
+#: misc/mke2fs.c:932 misc/tune2fs.c:349
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Ogiltig monteringsflagga satt: %s\n"
+
+#: misc/mke2fs.c:1072
+#, 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:1076
+#, c-format
+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:1080
+#, c-format
+msgid "Aborting...\n"
+msgstr "Avbryter...\n"
+
+#: misc/mke2fs.c:1120
+#, 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:1276
+#, c-format
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Kunde inte allokera minne för ny SÖKVÄG.\n"
+
+#: misc/mke2fs.c:1317
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr "Kunde inte initiera profilen (fel: %ld).\n"
+
+#: misc/mke2fs.c:1357
+#, c-format
+msgid "invalid block size - %s"
+msgstr "felaktig blockstorlek - %s"
+
+#: misc/mke2fs.c:1361
+#, 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:1377
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "felaktig klusterstorlek - %s"
+
+#: misc/mke2fs.c:1387
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "”-R” undanbedes, använd ”-E” istället"
+
+#: misc/mke2fs.c:1399
+msgid "Illegal number for blocks per group"
+msgstr "Ogiltigt antal för block per grupp"
+
+#: misc/mke2fs.c:1404
+msgid "blocks per group must be multiple of 8"
+msgstr "block per grupp måste vara en multipel av 8"
+
+#: misc/mke2fs.c:1412
+msgid "Illegal number for flex_bg size"
+msgstr "Felaktigt tal för flex_bg-storlek"
+
+#: misc/mke2fs.c:1418
+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:1428
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr "ogiltig inodsförhållande %s (min %d/max %d)"
+
+#: misc/mke2fs.c:1438
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "ogiltig inodsstorlek - %s"
+
+#: misc/mke2fs.c:1450
+#, c-format
+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:1460
+msgid "in malloc for bad_blocks_filename"
+msgstr "i malloc för bad_blocks_filename"
+
+#: misc/mke2fs.c:1473
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "ogiltig procentandel reserverade block - %s"
+
+#: misc/mke2fs.c:1488
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "felaktigt antal inoder - %s"
+
+#: misc/mke2fs.c:1505
+#, c-format
+msgid "bad revision level - %s"
+msgstr "felaktigt versionsnivå - %s"
+
+#: misc/mke2fs.c:1519
+msgid "The -t option may only be used once"
+msgstr "Flaggan -t får endast anges en gång"
+
+#: misc/mke2fs.c:1527
+msgid "The -T option may only be used once"
+msgstr "Flaggan -T får endast anges en gång"
+
+#: misc/mke2fs.c:1580 misc/mke2fs.c:2591
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "vid försök att öppna journalenhet %s\n"
+
+#: misc/mke2fs.c:1586
+#, 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:1592
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "Använder journalenhetens blockstorlek: %d\n"
+
+#: misc/mke2fs.c:1603
+#, 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:1613
+msgid "filesystem"
+msgstr "ett filsystem"
+
+#: misc/mke2fs.c:1626 resize/main.c:367
+msgid "while trying to determine filesystem size"
+msgstr "vid försök att avgöra filsystemstorlek"
+
+#: misc/mke2fs.c:1632
+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:1639
+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:1656
+msgid "Filesystem larger than apparent device size."
+msgstr "Filsystem större än synbar enhetsstorlek."
+
+#: misc/mke2fs.c:1676
+#, c-format
+msgid "Failed to parse fs types list\n"
+msgstr "Misslyckades tolka fs-typlista\n"
+
+#: misc/mke2fs.c:1730
+#, 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:1746
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "upplösning av fs_types för mke2fs.conf: "
+
+#: misc/mke2fs.c:1753
+#, c-format
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr "Filsystemsfunktioner som inte stöds med revision 0-filsystem\n"
+
+#: misc/mke2fs.c:1760
+#, c-format
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr "Glesa superblock stöds inte med revision 0-filsystem\n"
+
+#: misc/mke2fs.c:1772
+#, c-format
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr "Journaler stöds inte med revision 0-filsystem\n"
+
+#: misc/mke2fs.c:1786
+#, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "ogiltig procentandel reserverade block - %lf"
+
+#: misc/mke2fs.c:1802
+#, c-format
+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:1819
+msgid "while trying to determine hardware sector size"
+msgstr "vid försök att avgöra hårdvarusektorstorlek"
+
+#: misc/mke2fs.c:1825
+msgid "while trying to determine physical sector size"
+msgstr "vid försök att avgöra fysisk sektorstorlek"
+
+#: misc/mke2fs.c:1858
+msgid "while setting blocksize; too small for device\n"
+msgstr "när blockstorlek sattes; för liten för enheten\n"
+
+#: misc/mke2fs.c:1863
+#, 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:1881
+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:1887
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr "att ange en klusterstorlek förutsätter funktionen bigalloc"
+
+#: misc/mke2fs.c:1906
+#, 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:1909
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr "%s justering är förskjuten med %lu byte.\n"
+
+#: misc/mke2fs.c:1911
+#, 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:1930
+#, 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:1934
+#, 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:1968
+msgid "Can't support bigalloc feature without extents feature"
+msgstr "Kan inte stödja funktionen bigalloc utan funktionen utsträckningar"
+
+#: misc/mke2fs.c:1975
+#, c-format
+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"
+"Varning: funktionen bigalloc är fortfarande under utveckling\n"
+"Se https://ext4.wiki.kernel.org/index.php/Bigalloc för mer information\n"
+"\n"
+
+#: misc/mke2fs.c:1982 misc/tune2fs.c:740
+#, c-format
+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"
+"Varning: funktionen kvot är fortfarande under utveckling\n"
+"Se https://ext4.wiki.kernel.org/index.php/Quota för mer information\n"
+"\n"
+
+#: misc/mke2fs.c:1993
+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:2002
+msgid "blocks per group count out of range"
+msgstr "antal block per grupp utanför giltigt intervall"
+
+#: misc/mke2fs.c:2026
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr "Funktionen flex_gb är inte aktiverad, så fleg_bg-storleg kan inte anges"
+
+#: misc/mke2fs.c:2038
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr "ogiltig inodstorlek %d (min %d/max %d)"
+
+#: misc/mke2fs.c:2056
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr "för många inoder (%llu), öka inodsförhållandet?"
+
+#: misc/mke2fs.c:2063
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr "för många inoder (%llu), ange < 2³² inoder"
+
+#: misc/mke2fs.c:2077
+#, 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:2196
+#, 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"
+
+#: misc/mke2fs.c:2210
+msgid "while trying to setup undo file\n"
+msgstr "vid försök att skapa en gör-ogjort-fil\n"
+
+#: misc/mke2fs.c:2236
+msgid "Discarding device blocks: "
+msgstr "Utrangerar enhetsblock: "
+
+#: misc/mke2fs.c:2252
+msgid "failed - "
+msgstr "misslyckades - "
+
+#: misc/mke2fs.c:2360
+msgid "while setting up superblock"
+msgstr "vid uppsättning av superblock"
+
+#: misc/mke2fs.c:2369
+#, c-format
+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:2452
+#, c-format
+msgid "unknown os - %s"
+msgstr "okänt os - %s"
+
+#: misc/mke2fs.c:2504
+#, c-format
+msgid "Allocating group tables: "
+msgstr "Allokerar grupptabeller: "
+
+#: misc/mke2fs.c:2508
+msgid "while trying to allocate filesystem tables"
+msgstr "vid försök att allokera filsystemstabeller"
+
+#: misc/mke2fs.c:2517
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\tvid konvertering av underklustrets bitkarta"
+
+#: misc/mke2fs.c:2560
+#, 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:2573
+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:2584 misc/tune2fs.c:645
+msgid "journal"
+msgstr "en journal"
+
+#: misc/mke2fs.c:2596
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Lägger till journal till enhet %s: "
+
+#: misc/mke2fs.c:2603
+#, 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:2608 misc/mke2fs.c:2640 misc/tune2fs.c:674 misc/tune2fs.c:688
+#, c-format
+msgid "done\n"
+msgstr "klar\n"
+
+#: misc/mke2fs.c:2617
+#, c-format
+msgid "Skipping journal creation in super-only mode\n"
+msgstr "Hoppar över att skapa jornal i läget endast super\n"
+
+#: misc/mke2fs.c:2628
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Skapar journal (%u block): "
+
+#: misc/mke2fs.c:2636
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tvid försök att skapa journal"
+
+#: misc/mke2fs.c:2647 misc/tune2fs.c:451
+#, c-format
+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:2652
+#, 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:2665
+#, c-format
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Skriver superblock och filsystemsbokföringsinformation: "
+
+#: misc/mke2fs.c:2672
+#, c-format
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+"\n"
+"Varning, hade problem att skriva ut superblock."
+
+#: misc/mke2fs.c:2674
+#, c-format
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"klar\n"
+"\n"
+
+#: misc/mklost+found.c:50
+#, c-format
+msgid "Usage: mklost+found\n"
+msgstr "Användning: mklost+found\n"
+
+#: misc/partinfo.c:41
+#, 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:51
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Kan inte öppna %s: %s"
+
+#: misc/partinfo.c:57
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr "Kan inte få geometrin för %s: %s"
+
+#: misc/partinfo.c:65
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "Kan inte få storlek av %s: %s"
+
+#: misc/partinfo.c:71
+#, 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:107
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr "Kör e2fsck på filsystemet.\n"
+
+#: misc/tune2fs.c:116
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-p mmp_update_interval]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]\n"
+"\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[ -I new_inode_size ] device\n"
+msgstr ""
+"Användning: %s [-c max_antal_monteringar] [-e felbeteende] [-g grupp]\n"
+"\t[-i intervall[d|m|w]] [-j] [-J journalflaggor] [-l]\n"
+"\t[-m reserverade_block_procent] [-o [^]monteringsflaggor[,...]]\n"
+"\t[-p mmp_uppdateringsintervall] [-r antal_reserverade_block]\n"
+"\t[-u användare] [-C antal_monteringar] [-L volymetikett]\n"
+"\t[-M senast_monterad_katalog] [-O [^]funktion[,...]]\n"
+"\t[-E utökad-flagga[,...]] [-T senaste_kontrolltid] [-U UUID]\n"
+"\t[ -I ny_inodstorlek ] enhet\n"
+
+#: misc/tune2fs.c:209
+msgid "while trying to open external journal"
+msgstr "vid försök att öppna extern journal"
+
+#: misc/tune2fs.c:214
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s är inte en journalenhet.\n"
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "Journalsuperblock inte funnet!\n"
+
+#: misc/tune2fs.c:240
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "Filsystems UUID inte funnet på journalenhet.\n"
+
+#: misc/tune2fs.c:261
+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:269
+msgid "Journal removed\n"
+msgstr "Journal borttagen\n"
+
+#: misc/tune2fs.c:313
+msgid "while reading bitmaps"
+msgstr "vid läsning av bitkartor"
+
+#: misc/tune2fs.c:321
+msgid "while clearing journal inode"
+msgstr "vid nollställning av journalinod"
+
+#: misc/tune2fs.c:332
+msgid "while writing journal inode"
+msgstr "vid skrivning av journalinod"
+
+#: misc/tune2fs.c:367
+#, c-format
+msgid "(and reboot afterwards!)\n"
+msgstr "(och starta om efteråt!)\n"
+
+#: misc/tune2fs.c:401
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Nollställning av filsystemsfunktion \"%s\" stöds inte.\n"
+
+#: misc/tune2fs.c:407
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr "Att sätta filsystemsfunktion \"%s\" stöds inte.\n"
+
+#: misc/tune2fs.c:416
+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:424
+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:443
+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:461
+#, 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:470
+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:478
+msgid "Error while reading bitmaps\n"
+msgstr "Fel vid läsning av bitkartor\n"
+
+#: misc/tune2fs.c:487
+#, 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:492
+msgid "while reading MMP block."
+msgstr "vid läsning av MMP-block."
+
+#: misc/tune2fs.c:524
+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:535
+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:595
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Varning: flaggan \"^quota\" åsidosätter \"-Q\"-argument.\n"
+
+#: misc/tune2fs.c:640
+msgid "The filesystem already has a journal.\n"
+msgstr "Filsystemet har redan en journal.\n"
+
+#: misc/tune2fs.c:658
+#, 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:662
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Skapar journal på enhet %s: "
+
+#: misc/tune2fs.c:670
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "vid tillägg av filsystem till journal på %s"
+
+#: misc/tune2fs.c:676
+msgid "Creating journal inode: "
+msgstr "Skapar journalinod: "
+
+#: misc/tune2fs.c:685
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tvid försök att skapa journalfil"
+
+#: misc/tune2fs.c:763
+msgid "Couldn't allocate memory to parse quota options!\n"
+msgstr "Kunde inte allokera minne för att tolka kvotflaggor!\n"
+
+#: misc/tune2fs.c:785
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Felaktigt kvotalternativ angivet.\n"
+"\n"
+"Följande giltiga kvotalternativ finns (skicka dem separerade med kommatecken):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:846
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Kunde inte tolka datum-/tidsangivelse: %s"
+
+#: misc/tune2fs.c:870 misc/tune2fs.c:883
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "felaktigt antal monteringar - %s"
+
+#: misc/tune2fs.c:899
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "felaktigt felbeteende - %s"
+
+#: misc/tune2fs.c:926
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "felaktigt gid/gruppnamn - %s"
+
+#: misc/tune2fs.c:959
+#, c-format
+msgid "bad interval - %s"
+msgstr "felaktigt intervall - %s"
+
+#: misc/tune2fs.c:988
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "felaktig andel reserverade block - %s"
+
+#: misc/tune2fs.c:1003
+msgid "-o may only be specified once"
+msgstr "-o får endast anges en gång"
+
+#: misc/tune2fs.c:1012
+msgid "-O may only be specified once"
+msgstr "-O får endast anges en gång"
+
+#: misc/tune2fs.c:1027
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "felaktigt antal reserverade block - %s"
+
+#: misc/tune2fs.c:1056
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "felagtigt uid/användarnamn - %s"
+
+#: misc/tune2fs.c:1073
+#, c-format
+msgid "bad inode size - %s"
+msgstr "felaktig inodsstorlek - %s"
+
+#: misc/tune2fs.c:1080
+#, 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:1174
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "mmp_update_interval är för stort: %lu\n"
+
+#: misc/tune2fs.c:1179
+#, 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:1202
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Ogiltig RAID-kliv: %s\n"
+
+#: misc/tune2fs.c:1217
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr "Ogiltig RAID-remsbredd: %s\n"
+
+#: misc/tune2fs.c:1232
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "Ogiltig hash-algoritm: %s\n"
+
+#: misc/tune2fs.c:1238
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr "Sätter standardhashalgoritm till %s (%d)\n"
+
+#: misc/tune2fs.c:1257
+#, c-format
+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"
+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"
+"        mount_opts=<utökade standardmonteringsflaggor>\n"
+"\tstride=<RAID-styckestorlek per disk i block>\n"
+"\tstripe_width=<RAID-kliv·datadiskar i block>\n"
+"\ttest_fs\n"
+"\t^test_fs\n"
+
+#: misc/tune2fs.c:1723
+msgid "Failed to read inode bitmap\n"
+msgstr "Misslyckades att läsa inodsbitkarta\n"
+
+#: misc/tune2fs.c:1728
+msgid "Failed to read block bitmap\n"
+msgstr "Misslyckades att läsa blockbitkarta\n"
+
+#: misc/tune2fs.c:1745 resize/resize2fs.c:870
+msgid "blocks to be moved"
+msgstr "block att flytta"
+
+#: misc/tune2fs.c:1748
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr "Kunde inte allokera blockbitkarta när inodsstorleken ökades\n"
+
+#: misc/tune2fs.c:1754
+msgid "Not enough space to increase inode size \n"
+msgstr "Inte tillräckligt med utrymme för att öka inodsstorleken \n"
+
+#: misc/tune2fs.c:1759
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "Misslyckades omlokalisera block under storleksändring av inoder \n"
+
+#: misc/tune2fs.c:1791
+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:1818
+msgid "Couldn't allocate memory for tdb filename\n"
+msgstr "Kunde inte allokera minne för tdb-filnamn\n"
+
+#: misc/tune2fs.c:1840
+#, c-format
+msgid "while trying to delete %s"
+msgstr "vid försök att ta bort %s"
+
+#: misc/tune2fs.c:1850
+#, c-format
+msgid ""
+"To undo the tune2fs operation please run the command\n"
+"    e2undo %s %s\n"
+"\n"
+msgstr ""
+"För att göra tune2fs-operationen ogjord, kör kommandot\n"
+"    e2undo %s %s\n"
+"\n"
+
+#: misc/tune2fs.c:1919
+#, 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:1937
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Inodsstorleken är redan %lu\n"
+
+#: misc/tune2fs.c:1943
+#, c-format
+msgid "Shrinking the inode size is not supported\n"
+msgstr "Att krympa inodsstorleken stöds inte.\n"
+
+#: misc/tune2fs.c:1949
+#, c-format
+msgid "Invalid inode size %lu (max %d)\n"
+msgstr "Ogiltig inodstorlek %lu (max %d)\n"
+
+#: misc/tune2fs.c:1996
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "Sätter max antal monteringar till %d\n"
+
+#: misc/tune2fs.c:2002
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Sätter aktuellt antal monteringar till %d\n"
+
+#: misc/tune2fs.c:2007
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Sätter felbeteende till %d\n"
+
+#: misc/tune2fs.c:2012
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Sätter gid för reserverade block till %lu\n"
+
+#: misc/tune2fs.c:2017
+#, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "intervall mellan kontroller är för stort (%lu)"
+
+#: misc/tune2fs.c:2024
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr "Sätter intervall mellan kontroller till %lu sekunder\n"
+
+#: misc/tune2fs.c:2031
+#, 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:2037
+#, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "antal reserverade block för stort (%llu)"
+
+#: misc/tune2fs.c:2044
+#, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Sätter antal reserverade block till %llu\n"
+
+#: misc/tune2fs.c:2050
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Filsystemet har redan glesa superblock.\n"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set.  %s"
+msgstr ""
+"\n"
+"Flaggan för glesa superblock satt.  %s"
+
+#: misc/tune2fs.c:2062
+msgid ""
+"\n"
+"Clearing the sparse superflag not supported.\n"
+msgstr ""
+"\n"
+"Nollställning av superflaggan gles stöds inte.\n"
+
+#: misc/tune2fs.c:2070
+#, 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:2076
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr "Sätter uid för reserverade block till %lu\n"
+
+#: misc/tune2fs.c:2108
+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:2126
+msgid "The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr "Kvotafunktionen kan endast ändras när filsystemet är omonterat.\n"
+
+#: misc/tune2fs.c:2159
+msgid "Invalid UUID format\n"
+msgstr "Ogiltigt UUID-format\n"
+
+#: misc/tune2fs.c:2172
+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:2180
+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:2193
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Sätter inodsstorlek till %lu\n"
+
+#: misc/tune2fs.c:2196
+#, c-format
+msgid "Failed to change inode size\n"
+msgstr "Misslyckades att ändra inodsstorlek\n"
+
+#: misc/tune2fs.c:2207
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Sätter klivstorlek till %d\n"
+
+#: misc/tune2fs.c:2212
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr "Sätter remsbredd till %d\n"
+
+#: misc/tune2fs.c:2219
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Sätter utökade standardmonteringsflaggor till \"%s\"\n"
+
+#: misc/util.c:74
+msgid "Proceed anyway? (y,n) "
+msgstr "Fortsätt ändå? (j,n) "
+
+#: misc/util.c:89
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr "Kunde inte ta status på %s --- %s\n"
+
+#: misc/util.c:92
+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"
+
+#: misc/util.c:103
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s är inte en blockspecialenhet.\n"
+
+#: misc/util.c:132
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr "%s är hela enheten, inte bara en partition!\n"
+
+#: misc/util.c:154
+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:159
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "skapar inte %s här!\n"
+
+#: misc/util.c:166
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs framtvingad ändå.\n"
+
+#: misc/util.c:182
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Kunde inte allokera minne för att tolka journalflaggor!\n"
+
+#: misc/util.c:207
+#, 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:228
+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"
+"\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"
+"\n"
+"Journalstorleken måste vara mellan 1024 och 10240000 filsystemsblock.\n"
+"\n"
+
+#: misc/util.c:258
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Filsystem för litet för en journal\n"
+
+#: misc/util.c:265
+#, 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 begärda journalstorleken är %d block; den måste vara\n"
+"mellan 1024 och 10240000 block.  Avbryter.\n"
+
+#: misc/util.c:273
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Journalstorleken för stor för filsystem.\n"
+
+#: misc/util.c:287
+#, 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:48
+#, 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:50
+#, c-format
+msgid "       %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr "       %s [-r|t] [-n ant] [-s socketuttag]\n"
+
+#: misc/uuidd.c:52
+#, c-format
+msgid "       %s -k\n"
+msgstr "       %s -k\n"
+
+#: misc/uuidd.c:154
+msgid "bad arguments"
+msgstr "felaktiga argument"
+
+#: misc/uuidd.c:172
+msgid "connect"
+msgstr "anslut"
+
+#: misc/uuidd.c:191
+msgid "write"
+msgstr "skriv"
+
+#: misc/uuidd.c:199
+msgid "read count"
+msgstr "läsantal"
+
+#: misc/uuidd.c:205
+msgid "bad response length"
+msgstr "felaktig svarslängd"
+
+#: misc/uuidd.c:270
+#, 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:278
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Kunde inte skapa unix-strömuttag: %s"
+
+#: misc/uuidd.c:307
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "Kunde inte binda unix-uttag %s: %s\n"
+
+#: misc/uuidd.c:315
+#, 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:353
+#, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Fel vid läsning från klient, len = %d\n"
+
+#: misc/uuidd.c:361
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "operation %d, inkommande ant = %d\n"
+
+#: misc/uuidd.c:380
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "Genererade tids-UUID: %s\n"
+
+#: misc/uuidd.c:390
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "Genererade slumpmässigt UUID: %s\n"
+
+#: misc/uuidd.c:399
+#, 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:420
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "Genererade %d UUID:er:\n"
+
+#: misc/uuidd.c:432
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Ogiltig operation %d\n"
+
+#: misc/uuidd.c:476 misc/uuidd.c:498
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Felaktigt tal: %s\n"
+
+#: misc/uuidd.c:533 misc/uuidd.c:562
+#, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "Fel vid anrop av uuidd-demonen (%s): %s\n"
+
+#: misc/uuidd.c:543
+#, 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:547
+#, c-format
+msgid "List of UUID's:\n"
+msgstr "Lista över UUID:er:\n"
+
+#: misc/uuidd.c:568
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr "Oväntad svarslängd från servern %d\n"
+
+#: misc/uuidd.c:585
+#, 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:591
+#, 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:202
+msgid "# Extent dump:\n"
+msgstr "# Områdesdump:\n"
+
+#: resize/extent.c:203
+#, 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:43
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]\n"
+"\n"
+msgstr ""
+"Användning: %s [-d felsökningflaggor] [-f] [-F] [-M] [-P] [-p] enhet [ny_storlek]\n"
+"\n"
+
+#: resize/main.c:65
+msgid "Extending the inode table"
+msgstr "Utökar inodstabellen"
+
+#: resize/main.c:68
+msgid "Relocating blocks"
+msgstr "Flyttar om block"
+
+#: resize/main.c:71
+msgid "Scanning inode table"
+msgstr "Söker igenom inodstabell"
+
+#: resize/main.c:74
+msgid "Updating inode references"
+msgstr "Uppdaterar inodsreferenser"
+
+#: resize/main.c:77
+msgid "Moving inode table"
+msgstr "Flyttar inodstabell"
+
+#: resize/main.c:80
+msgid "Unknown pass?!?"
+msgstr "Okänt pass?!?"
+
+#: resize/main.c:83
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Börja pass %d (max = %lu)\n"
+
+#: resize/main.c:154
+#, c-format
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested.  Proceed\n"
+"at 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:271
+#, c-format
+msgid "while opening %s"
+msgstr "när %s öppnades"
+
+#: resize/main.c:279
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "när statusinformation för %s hämtades"
+
+#: resize/main.c:337 resize/main.c:450
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"Kör \"e2fsck -f %s\" först.\n"
+"\n"
+
+#: resize/main.c:341
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Uppskattad minsta storlek på filsystemet: %llu\n"
+
+#: resize/main.c:377
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Ogiltig ny storlek: %s\n"
+
+#: resize/main.c:393
+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:401
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr "Ny storlek mindre än minimum (%llu)\n"
+
+#: resize/main.c:407
+msgid "Invalid stride length"
+msgstr "Ogiltig stride-längd"
+
+#: resize/main.c:431
+#, 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:438
+#, c-format
+msgid ""
+"The filesystem is already %llu blocks long.  Nothing to do!\n"
+"\n"
+msgstr ""
+"Filsystemet är redan %llu block långt.  Inget behöver göras!\n"
+"\n"
+
+#: resize/main.c:455
+#, 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:464
+#, c-format
+msgid "while trying to resize %s"
+msgstr "vid försök att ändra storlek på %s"
+
+#: resize/main.c:467
+#, 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:473
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu blocks long.\n"
+"\n"
+msgstr ""
+"Filsystemet på %s är nu %llu block långt.\n"
+"\n"
+
+#: resize/main.c:488
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "vid försök att korta av %s"
+
+#: resize/online.c:79
+#, 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:83
+msgid "On-line shrinking not supported"
+msgstr "Att krympa uppkopplat stödjs inte"
+
+#: resize/online.c:108
+msgid "Filesystem does not support online resizing"
+msgstr "Filsystemet stödjer inte storleksändring uppkopplat"
+
+#: resize/online.c:117
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "Inte tillräckligt med reserverade gdt-block för storleksändring"
+
+#: resize/online.c:124
+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:132
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "vid försök att öppna monteringspunkt %s"
+
+#: resize/online.c:137
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr "Gammalt gränssnitt för storleksändring begärt.\n"
+
+#: resize/online.c:156 resize/online.c:173
+msgid "Permission denied to resize filesystem"
+msgstr "Rättighet att ändra storlek på filsystem nekas"
+
+#: resize/online.c:159 resize/online.c:179
+msgid "While checking for on-line resizing support"
+msgstr "Vid kontroll av stöd för storleksändring uppkopplat"
+
+#: resize/online.c:176
+msgid "Kernel does not support online resizing"
+msgstr "Kärnan stödjer inte storleksändring uppkopplat"
+
+#: resize/online.c:209
+#, 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:219
+msgid "While trying to extend the last group"
+msgstr "Vid försök att utöka den sista gruppen"
+
+#: resize/online.c:273
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Vid försök att öppna grupp nr. %d"
+
+#: resize/online.c:284
+#, 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:369
+#, c-format
+msgid "inodes (%llu) must be less than %u"
+msgstr "inoder (%llu) måste vara mindre än %u"
+
+#: resize/resize2fs.c:631
+msgid "reserved blocks"
+msgstr "reserverade block"
+
+#: resize/resize2fs.c:875
+msgid "meta-data blocks"
+msgstr "metadatablock"
+
+#: resize/resize2fs.c:1837
+#, c-format
+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.42.8"
+msgstr "EXT2FS-bibliotek version 1.42.8"
+
+#: 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 an block bitmap"
+msgstr "Kan inte skriva en blockbitkarta"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read an 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 "Utsräckningen inte funnen"
+
+#: lib/ext2fs/ext2_err.c:144
+msgid "Operation not supported for inodes containing extents"
+msgstr "Operationsn 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 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: fsck being run"
+msgstr "MMP: fsck 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 MMP block"
+msgstr "Kontrollsumman för MMP-blocket stämmer inte med MMP-blocket"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Ext2-filen finns redan"
+
+#: e2fsck/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profil version 0.0"
+
+#: e2fsck/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Felaktigt magiskt värde i profile_node"
+
+#: e2fsck/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Profilsektionen inte funnen"
+
+#: e2fsck/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Profilrelationen inte funnen"
+
+#: e2fsck/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"
+
+#: e2fsck/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"
+
+#: e2fsck/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr "Felaktig länkad lista i profilstrukturer"
+
+#: e2fsck/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr "Felaktig gruppnivå i profilstrukturer"
+
+#: e2fsck/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr "Felaktig föräldrapekare i profilstrukturer"
+
+#: e2fsck/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Felaktigt magiskt värde i profiliterator"
+
+#: e2fsck/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr "Kan inte sätta värde på sektionsnod"
+
+#: e2fsck/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr "Ogiltigt argument skickat till profilbiblioteket"
+
+#: e2fsck/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr "Försök att ändra en endast läsbar profil"
+
+#: e2fsck/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr "Huvudet till profilsektionen är inte på toppnivån"
+
+#: e2fsck/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr "Syntaxfel i huvudet till profilsektionen"
+
+#: e2fsck/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Syntaxfel i en profilrelation"
+
+#: e2fsck/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Extra avslutande klammer i profilen"
+
+#: e2fsck/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Inledande klammer saknas i profilen"
+
+#: e2fsck/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Felaktigt magiskt värde i profile_t"
+
+#: e2fsck/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr "Felaktigt magiskt värde i profile_section_t"
+
+#: e2fsck/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr "Iteration över alla toppnivåsektioner stödjs inte"
+
+#: e2fsck/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Ogiltigt profile_section-objekt"
+
+#: e2fsck/prof_err.c:33
+msgid "No more sections"
+msgstr "Inga fler sektioner"
+
+#: e2fsck/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr "Felaktig namnmängd skickad till frågerutinen"
+
+#: e2fsck/prof_err.c:35
+msgid "No profile file open"
+msgstr "Ingen profilfil öppen"
+
+#: e2fsck/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr "Felaktigt magiskt värde i profile_file_t"
+
+#: e2fsck/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Kunde inte öppna profilfilen"
+
+#: e2fsck/prof_err.c:38
+msgid "Section already exists"
+msgstr "Sektionen finns redan"
+
+#: e2fsck/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Ogiltigt booleskt värde"
+
+#: e2fsck/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Ogiltigt heltalsvärde"
+
+#: e2fsck/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr "Felaktigt magiskt värde i profile_file_data_t"
diff --git a/e2fsprogs/po/tr.gmo b/e2fsprogs/po/tr.gmo
new file mode 100644
index 0000000..b9b2d6f
--- /dev/null
+++ b/e2fsprogs/po/tr.gmo
Binary files differ
diff --git a/e2fsprogs/po/tr.po b/e2fsprogs/po/tr.po
new file mode 100644
index 0000000..8a8a0cc
--- /dev/null
+++ b/e2fsprogs/po/tr.po
@@ -0,0 +1,7158 @@
+# 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).
+#.  
+#. 	%b	<blk>			block number
+#. 	%B	<blkcount>		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_dir_acl
+#. 	%Iu	<inode> -> i_uid
+#. 	%Ig	<inode> -> i_gid
+#. 	%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: 2013-06-16 08:17-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"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Lokalize 1.5\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:180
+#, 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/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:1332 e2fsck/unix.c:1420 misc/badblocks.c:1214
+#: misc/badblocks.c:1222 misc/badblocks.c:1236 misc/badblocks.c:1248
+#: misc/dumpe2fs.c:588 misc/e2image.c:1196 misc/e2image.c:1324
+#: misc/e2image.c:1337 misc/mke2fs.c:196 misc/tune2fs.c:1907 resize/main.c:315
+#, 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:203
+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:131
+#, 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/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:61 e2fsck/ehandler.c:110
+msgid "Ignore error"
+msgstr "Hata görmezden gelindi"
+
+#: e2fsck/ehandler.c:62
+msgid "Force rewrite"
+msgstr "Yeniden yaz"
+
+#: e2fsck/ehandler.c:104
+#, 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:107
+#, 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/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:961
+#, 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:967 resize/main.c:288
+#, c-format
+msgid "while trying to flush %s"
+msgstr "%s boşaltılmaya çalışılırken hata oluştu"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1091
+msgid "while opening inode scan"
+msgstr "düğüm taraması başlatılırken hata oluştu"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1109
+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:522
+msgid "reading journal superblock\n"
+msgstr "günlük dosyası super bloğu okunuyor\n"
+
+#: e2fsck/journal.c:579
+#, 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:588
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: gümlük dosyası çok kısa\n"
+
+#: e2fsck/journal.c:880
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: günlük dosyasına göre kurtarılıyor\n"
+
+#: e2fsck/journal.c:882
+#, 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:909
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "%s yeniden açılmaya çalışılırken hata oluştu"
+
+#: e2fsck/message.c:113
+msgid "aextended attribute"
+msgstr "aek özellik"
+
+#: e2fsck/message.c:114
+msgid "Aerror allocating"
+msgstr "Aayrılırken hata oluştu"
+
+#: e2fsck/message.c:115
+msgid "bblock"
+msgstr "bblok"
+
+#: e2fsck/message.c:116
+msgid "Bbitmap"
+msgstr "Bbiteşlem"
+
+#: e2fsck/message.c:117
+msgid "ccompress"
+msgstr "csıkıştırma"
+
+#: e2fsck/message.c:118
+msgid "Cconflicts with some other fs @b"
+msgstr "Cbazı dosya sistemi blokları ile çelişiyor"
+
+#: e2fsck/message.c:119
+msgid "iinode"
+msgstr "idüğüm"
+
+#: e2fsck/message.c:120
+msgid "Iillegal"
+msgstr "Ikuraldışı"
+
+#: e2fsck/message.c:121
+msgid "jjournal"
+msgstr "jgünlük"
+
+#: e2fsck/message.c:122
+msgid "Ddeleted"
+msgstr "Dsilinen"
+
+#: e2fsck/message.c:123
+msgid "ddirectory"
+msgstr "ddizin"
+
+#: 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 "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:131
+msgid "Lis a link"
+msgstr "Lbir bağdır"
+
+#: e2fsck/message.c:132
+msgid "mmultiply-claimed"
+msgstr "mçok düğümlü"
+
+#: e2fsck/message.c:133
+msgid "ninvalid"
+msgstr "ngeçersiz"
+
+#: e2fsck/message.c:134
+msgid "oorphaned"
+msgstr "oartık"
+
+#: e2fsck/message.c:135
+msgid "pproblem in"
+msgstr "psorun"
+
+#: e2fsck/message.c:136
+msgid "qquota"
+msgstr ""
+
+#: e2fsck/message.c:137
+msgid "rroot @i"
+msgstr "rkök düğümü"
+
+#: e2fsck/message.c:138
+msgid "sshould be"
+msgstr "solmalıydı"
+
+#: e2fsck/message.c:139
+msgid "Ssuper@b"
+msgstr "Ssüper blok"
+
+#: e2fsck/message.c:140
+msgid "uunattached"
+msgstr "ubağlantısız"
+
+#: e2fsck/message.c:141
+msgid "vdevice"
+msgstr "vaygıt"
+
+#: e2fsck/message.c:142
+msgid "xextent"
+msgstr ""
+
+#: e2fsck/message.c:143
+msgid "zzero-length"
+msgstr "zsıfır uzunluklu"
+
+#: e2fsck/message.c:154
+msgid "<The NULL inode>"
+msgstr "<NULL düğüm>"
+
+#: e2fsck/message.c:155
+msgid "<The bad blocks inode>"
+msgstr "<Hatalı bloklar düğümü>"
+
+#: e2fsck/message.c:157
+#, fuzzy
+msgid "<The user quota inode>"
+msgstr "<günlük düğümü>"
+
+#: e2fsck/message.c:158
+#, fuzzy
+msgid "<The group quota inode>"
+msgstr "<Grup tanımlayıcı düğümü>"
+
+#: e2fsck/message.c:159
+msgid "<The boot loader inode>"
+msgstr "<Önyükleyici düğümü>"
+
+#: e2fsck/message.c:160
+msgid "<The undelete directory inode>"
+msgstr "<Kurtarılan dizinin düğümü>"
+
+#: e2fsck/message.c:161
+msgid "<The group descriptor inode>"
+msgstr "<Grup tanımlayıcı düğümü>"
+
+#: e2fsck/message.c:162
+msgid "<The journal inode>"
+msgstr "<günlük düğümü>"
+
+#: e2fsck/message.c:163
+msgid "<Reserved inode 9>"
+msgstr "<Yedek düğüm 9>"
+
+#: e2fsck/message.c:164
+msgid "<Reserved inode 10>"
+msgstr "<Yedek düğüm 10>"
+
+#: e2fsck/message.c:333
+msgid "regular file"
+msgstr "olağan dosya"
+
+#: e2fsck/message.c:335
+msgid "directory"
+msgstr "dizin"
+
+#: e2fsck/message.c:337
+msgid "character device"
+msgstr "karakter aygıtı"
+
+#: e2fsck/message.c:339
+msgid "block device"
+msgstr "aygıtı engelle"
+
+#: e2fsck/message.c:341
+msgid "named pipe"
+msgstr "isimli veri yolu"
+
+#: e2fsck/message.c:343
+msgid "symbolic link"
+msgstr "sembolik bağ"
+
+#: e2fsck/message.c:345 misc/uuidd.c:161
+msgid "socket"
+msgstr "yuva"
+
+#: e2fsck/message.c:347
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "0%o kipinde bilinmeyen dosya türü"
+
+#: e2fsck/message.c:422
+#, fuzzy
+msgid "indirect block"
+msgstr "kullanımdaki blok eşlemi"
+
+#: e2fsck/message.c:424
+msgid "double indirect block"
+msgstr ""
+
+#: e2fsck/message.c:426
+#, fuzzy
+msgid "triple indirect block"
+msgstr "%u düğümünün dolaylı blokları okunuyor"
+
+#: e2fsck/message.c:428
+#, fuzzy
+msgid "translator block"
+msgstr "meta-veri blokları"
+
+#: e2fsck/message.c:430
+#, fuzzy
+msgid "block #"
+msgstr "bblok"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "tekrarlanan blokların düğüm eşlemi"
+
+#: e2fsck/pass1b.c:610 e2fsck/pass1b.c:730
+#, 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:821
+msgid "returned from clone_file_block"
+msgstr "clone_file_block işlevinden döndürüldü"
+
+#: e2fsck/pass1b.c:843
+#, 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:855
+#, 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:475 e2fsck/pass2.c:782
+msgid "reading directory block"
+msgstr "blok dizini okunuyor"
+
+#: e2fsck/pass1.c:598
+msgid "in-use inode map"
+msgstr "kullanımdaki düğüm eşlemi"
+
+#: e2fsck/pass1.c:609
+msgid "directory inode map"
+msgstr "dizin düğümü eşlemi"
+
+#: e2fsck/pass1.c:619
+msgid "regular file inode map"
+msgstr "normal dosya düğümü eşlemi"
+
+#: e2fsck/pass1.c:628
+msgid "in-use block map"
+msgstr "kullanımdaki blok eşlemi"
+
+#: e2fsck/pass1.c:695
+msgid "opening inode scan"
+msgstr "düğüm tarama açılıyor"
+
+#: e2fsck/pass1.c:729
+msgid "getting next inode from scan"
+msgstr ""
+
+#: e2fsck/pass1.c:1239
+msgid "Pass 1"
+msgstr "1. geçiş"
+
+#: e2fsck/pass1.c:1296
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "%u düğümünün dolaylı blokları okunuyor"
+
+#: e2fsck/pass1.c:1346
+msgid "bad inode map"
+msgstr "hatalı düğüm eşlemi"
+
+#: e2fsck/pass1.c:1369
+msgid "inode in bad block map"
+msgstr "hatalı blok eşlemindeki düğüm"
+
+#: e2fsck/pass1.c:1389
+msgid "imagic inode map"
+msgstr "imagic düğüm eşlemi"
+
+#: e2fsck/pass1.c:1416
+msgid "multiply claimed block map"
+msgstr "tekrarlanan blokların eşlemi"
+
+#: e2fsck/pass1.c:1527
+msgid "ext attr block map"
+msgstr "ek özellik bloğu eşlemi"
+
+#: e2fsck/pass1.c:2299
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr ""
+
+#: e2fsck/pass1.c:2660
+msgid "block bitmap"
+msgstr "blok biteşlemi"
+
+#: e2fsck/pass1.c:2666
+msgid "inode bitmap"
+msgstr "düğüm biteşlemi"
+
+#: e2fsck/pass1.c:2672
+msgid "inode table"
+msgstr "düğüm tablosu"
+
+#: e2fsck/pass2.c:283
+msgid "Pass 2"
+msgstr "2. geçiş"
+
+#: e2fsck/pass2.c:805
+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:136
+msgid "Pass 3"
+msgstr "3. geçiş"
+
+#: e2fsck/pass3.c:322
+msgid "inode loop detection bitmap"
+msgstr "düğüm döngüsü saptama biteşlemi"
+
+#: e2fsck/pass4.c:196
+msgid "Pass 4"
+msgstr "4. geçiş"
+
+#: e2fsck/pass5.c:74
+msgid "Pass 5"
+msgstr "5. geçiş"
+
+#: 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:107
+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:111
+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:116
+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 correct ext2\n
+#. @-expanded: filesystem.  If the device is valid and it really contains an ext2\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 %S <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:122
+#, c-format
+msgid ""
+"\n"
+"The @S could not be read or does not describe a correct ext2\n"
+"@f.  If the @v is valid and it really contains an ext2\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 %S <@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:131
+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:138
+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:145
+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:150
+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:155
+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:160
+#, 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:169
+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:174
+#, 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:179
+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:183
+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:188
+#, 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:193
+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:198
+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:203
+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:208
+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:213
+#, 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:221
+#, 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 %s is present.\n
+#: e2fsck/problem.c:226
+#, fuzzy, c-format
+msgid "@S has_@j flag is clear, but a @j %s 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:231
+#, 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:236
+#, 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:241
+msgid "Clear @j"
+msgstr "Günlüğü Temizle"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.  
+#: e2fsck/problem.c:246 e2fsck/problem.c:695
+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:251
+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:256
+#, 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:261
+#, 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:266
+#, 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:271
+#, 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:276
+#, 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:281
+#, 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:286
+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:291
+#, 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:296
+#, 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:301
+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:307
+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:312
+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:317
+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:322
+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:328
+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:333
+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:338
+#, 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:343
+#, 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:347
+#, 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:352
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.  
+#: e2fsck/problem.c:357
+msgid "@g descriptor %g checksum is %04x, should be %04y.  "
+msgstr ""
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:362
+#, 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:367
+msgid "@g descriptor %g has invalid unused inodes count %b.  "
+msgstr ""
+
+#. @-expanded: Last group block bitmap uninitialized.  
+#: e2fsck/problem.c:372
+msgid "Last @g @b @B uninitialized.  "
+msgstr ""
+
+#: e2fsck/problem.c:377
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr ""
+
+#: e2fsck/problem.c:381
+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)  
+#: e2fsck/problem.c:386
+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)  "
+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).  
+#: e2fsck/problem.c:392
+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).  "
+msgstr ""
+
+#. @-expanded: One or more block group descriptor checksums are invalid.  
+#: e2fsck/problem.c:398
+msgid "One or more @b @g descriptor checksums are invalid.  "
+msgstr ""
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:403
+#, 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:408
+#, fuzzy
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Yedek blok sayısı %lu olarak belirleniyor\n"
+
+#. @-expanded: Making quota inode %i (%Q) hidden.\n
+#: e2fsck/problem.c:413
+#, fuzzy
+msgid "Making @q @i %i (%Q) hidden.\n"
+msgstr ""
+"Günlük /%s den gizli düğüme taşınıyor.\n"
+"\n"
+
+#. @-expanded: superblock has invalid MMP block.  
+#: e2fsck/problem.c:418
+#, fuzzy
+msgid "@S has invalid MMP block.  "
+msgstr "blok uzunluğu hatalı - %s"
+
+#. @-expanded: superblock has invalid MMP magic.  
+#: e2fsck/problem.c:423
+msgid "@S has invalid MMP magic.  "
+msgstr ""
+
+#: e2fsck/problem.c:428
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:433
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr ""
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:440
+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:444
+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:449
+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:454
+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:459
+#, 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:464
+#, 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:469
+#, 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:474
+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:479
+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:484
+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:489
+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:494
+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:499
+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:504
+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:509
+#, 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:514
+#, 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:519
+#, 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:524
+#, 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:529
+#, 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:534
+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:539
+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:544
+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:549
+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:556
+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:561
+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:567
+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:572
+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:578
+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:583
+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:589
+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:595
+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:600
+#, 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:605
+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:610
+#, 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:615
+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:620
+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:625 e2fsck/problem.c:1474
+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:630
+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:635
+#, 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:640
+#, 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:645
+#, 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:650
+#, 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:655
+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:660
+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:666
+#, 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:674
+#, 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:679
+#, 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: inode %i has compression flag set on filesystem without compression support.  
+#: e2fsck/problem.c:685
+#, c-format
+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.  "
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.  
+#: e2fsck/problem.c:690
+#, 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:700
+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:705
+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:710
+#, 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:716
+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:721
+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:726
+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:731
+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:736
+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:741
+#, 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:746
+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:751
+msgid "@a @b %b has h_@bs > 1.  "
+msgstr "Ek özellikler bloğu %b için  h_blocks > 1.  "
+
+#. @-expanded: error allocating extended attribute block %b.  
+#: e2fsck/problem.c:756
+msgid "@A @a @b %b.  "
+msgstr "Ek özellikler bloğu %b ayrılırken hata.  "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).  
+#: e2fsck/problem.c:761
+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:766
+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:771
+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:776
+#, 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:780
+#, fuzzy
+msgid "%B (%b) causes @d to be too big.  "
+msgstr "Blok #%B (%b) çok büyük dizin oluşturuyor.  "
+
+#: e2fsck/problem.c:785
+#, fuzzy
+msgid "%B (%b) causes file to be too big.  "
+msgstr "Blok #%B (%b) çok büyük dosya oluşturuyor.  "
+
+#: e2fsck/problem.c:790
+#, 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:795
+#, 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:800
+#, 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:805
+#, 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:810
+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:815
+#, 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:820
+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:825
+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:831
+#, 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:836
+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:841
+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:846
+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:851
+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:856
+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:861
+#, 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:866
+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:871
+#, 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:876
+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:882
+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:887
+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:892
+#, 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:897
+#, 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:902
+#, c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr ""
+
+#: e2fsck/problem.c:907
+#, 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:912
+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:916
+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:921
+#, fuzzy, c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "Dizin blokları yinelenirken hata: %m\n"
+
+#. @-expanded: quota inode is not regular file.  
+#: e2fsck/problem.c:926
+#, fuzzy
+msgid "@q @i is not 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:931
+#, 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:936
+#, 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:941
+#, 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:946
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\n"
+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:953
+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:959
+msgid ""
+"@i %i, end of extent exceeds allowed value\n"
+"\t(logical @b %c, physical @b %b, len %N)\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:967
+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:973
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "Düğüm %i içinde çok düğümlü bloklar var:"
+
+#: e2fsck/problem.c:988
+#, 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:993
+#, 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:998
+#, 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:1003 e2fsck/problem.c:1318
+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:1008
+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:1014
+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:1019
+#, 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:1025
+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:1030
+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:1035
+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:1040
+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:1053
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Dosya kopyalanamadı: %m\n"
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1059
+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:1064
+#, 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:1069
+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:1074
+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:1079
+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:1084
+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:1089
+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:1094
+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:1099
+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:1104
+#, 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:1109
+#, 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:1114
+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:1119
+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:1124
+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:1129
+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_dir_acl for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1134
+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"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1139
+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:1144
+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:1149
+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:1154
+#, 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:1159
+#, 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:1164
+#, 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:1169
+#, 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:1174
+#, 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:1179
+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:1184
+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:1189
+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:1194
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E tekrarlayan '..' girdisi içeriyor.\n"
+
+#: e2fsck/problem.c:1199 e2fsck/problem.c:1499
+#, 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:1204
+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:1209
+#, 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:1214
+#, 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:1219
+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:1224
+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:1229
+#, 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:1234
+#, 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:1239
+#, 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:1244
+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:1249
+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:1254
+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:1259
+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:1264
+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:1269
+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:1274
+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:1279
+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:1284
+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:1289
+#, 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:1294
+#, 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:1299
+#, 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:1304
+#, 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:1309
+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:1313
+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:1323
+#, 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:1328
+#, 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:1333
+#, 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:1338
+#, 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:1343
+#, 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:1348
+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:1353
+#, 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:1358
+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:1363
+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:1368
+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:1372
+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:1377
+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:1382
+#, 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: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1389
+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:1394
+msgid "@r not allocated.  "
+msgstr "Kök düğümü tahsisli değil.  "
+
+#. @-expanded: No room in lost+found directory.  
+#: e2fsck/problem.c:1399
+msgid "No room in @l @d.  "
+msgstr "lost+found dizininde yer yok.  "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1404
+#, 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:1409
+msgid "/@l not found.  "
+msgstr "/lost+found dizini yok.  "
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1414
+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:1419
+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:1424
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "/lost+found dizini genişletilemiyor: %m\n"
+
+#: e2fsck/problem.c:1429
+#, 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:1434
+#, 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:1439
+#, 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:1444
+#, 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:1449
+#, 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:1454
+#, 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:1459
+#, 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:1464
+#, 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:1469
+#, 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:1479
+#, 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:1484
+#, 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:1489
+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:1494
+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:1504
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/lost+found bir dizin değil (düğüm = %i)\n"
+
+#: e2fsck/problem.c:1511
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Pass 3A: Dizinler eniyileniyor\n"
+
+#: e2fsck/problem.c:1516
+#, fuzzy, c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr "dirs_to_hash yineleyici oluşturulamadı: %m"
+
+#: e2fsck/problem.c:1521
+#, fuzzy
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Dizin %q (%d) eniyilenemedi: %m"
+
+#: e2fsck/problem.c:1526
+msgid "Optimizing directories: "
+msgstr "Eniyilenen dizinler: "
+
+#: e2fsck/problem.c:1543
+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:1548
+#, 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:1553
+#, 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:1558
+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:1562
+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: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1572
+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:1577
+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:1582
+msgid "Padding at end of @b @B is not set. "
+msgstr "Blok biteşleminin sonundaki alan belirlenmemiş. "
+
+#. @-expanded: block bitmap differences: 
+#: e2fsck/problem.c:1587
+msgid "@b @B differences: "
+msgstr "blok biteşlemi farkları: "
+
+#. @-expanded: inode bitmap differences: 
+#: e2fsck/problem.c:1607
+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:1627
+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:1632
+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:1637
+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:1642
+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:1647
+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:1652
+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:1658
+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:1663
+#, 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:1668
+#, 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:1693
+#, 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:1698
+#, c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr ""
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:1705
+#, fuzzy
+msgid "Recreate @j"
+msgstr "Yeniden oluştur"
+
+#: e2fsck/problem.c:1710
+msgid "Update quota info for quota type %N"
+msgstr ""
+
+#: e2fsck/problem.c:1829
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Elde edilemeyen hata kodu ((0x%x)!\n"
+
+#: e2fsck/problem.c:1954 e2fsck/problem.c:1958
+msgid "IGNORED"
+msgstr "YOKSAYILDI"
+
+#: 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:188
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr "Düğüm %d için ext2fs_block_iterate işlevi çağrılırken hata oluştu"
+
+#: e2fsck/super.c:211
+#, fuzzy, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %d"
+msgstr "Düğüm %d için ext2fs_block_iterate işlevi çağrılırken hata oluştu"
+
+#: e2fsck/super.c:272
+msgid "Truncating"
+msgstr "Kırpılıyor"
+
+#: e2fsck/super.c:273
+msgid "Clearing"
+msgstr "Temizleniyor"
+
+#: e2fsck/unix.c:74
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-panyrcdfvtDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] 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:80
+#, c-format
+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:86
+#, c-format
+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"
+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:131
+#, 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:157
+#, 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:161
+#, 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:166
+#, 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:171
+#, 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:179
+msgid "             Extent depth histogram: "
+msgstr ""
+
+#: e2fsck/unix.c:188
+#, 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:192
+#, 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:194
+#, 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:196
+#, 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:198
+#, 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:200
+#, 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:203
+#, 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:205
+#, 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:207
+#, 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:209
+#, 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:211
+#, 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:215
+#, 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:219
+#, 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:232 misc/badblocks.c:983 misc/tune2fs.c:1985 misc/util.c:147
+#: resize/main.c:259
+#, 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:252
+#, fuzzy, c-format
+msgid "Warning!  %s is %s.\n"
+msgstr "Uyarı!  %s bağlı.\n"
+
+#: e2fsck/unix.c:259
+#, c-format
+msgid "%s is %s.\n"
+msgstr ""
+
+#: e2fsck/unix.c:262
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Devam edilemiyor. çıkılıyor.\n"
+"\n"
+
+#: e2fsck/unix.c:264
+#, 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:269
+msgid "Do you really want to continue"
+msgstr "Gerçekten devam etmek istiyor musunuz?"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "check aborted.\n"
+msgstr "denetim durdu.\n"
+
+#: e2fsck/unix.c:361
+msgid " contains a file system with errors"
+msgstr " hatalı bir dosya sistemi içeriyor"
+
+#: e2fsck/unix.c:363
+msgid " was not cleanly unmounted"
+msgstr " usulünce sistemden ayrılmamış"
+
+#: e2fsck/unix.c:365
+msgid " primary superblock features different from backup"
+msgstr " birincil süperblok özellikleri yedeklemeden farklı"
+
+#: e2fsck/unix.c:369
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " denetlenmeksizin %u kere bağlandı"
+
+#: e2fsck/unix.c:376
+#, fuzzy
+msgid " has filesystem last checked time in the future"
+msgstr "Dosya sisteminin son denetim zamanı %s yapılıyor\n"
+
+#: e2fsck/unix.c:382
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " denetlenmeksizin %u gün geçti"
+
+#: e2fsck/unix.c:391
+msgid ", check forced.\n"
+msgstr ", denetim başlatılacak.\n"
+
+#: e2fsck/unix.c:424
+#, fuzzy, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr "%s: temiz, %d/%d dosya, %u/%u blok"
+
+#: e2fsck/unix.c:443
+msgid " (check deferred; on battery)"
+msgstr " (denetleme ertelendi; batarya)"
+
+#: e2fsck/unix.c:446
+msgid " (check after next mount)"
+msgstr " (sistem bağlandıktan sonra denetle)"
+
+#: e2fsck/unix.c:448
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (sistem %ld kere bağlandığında denetle)"
+
+#: e2fsck/unix.c:598
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "HATA: /dev/null açılamadı (%s)\n"
+
+#: e2fsck/unix.c:667
+#, c-format
+msgid "Invalid EA version.\n"
+msgstr "Ek özellik sürümü geçersiz.\n"
+
+#: e2fsck/unix.c:694
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Bilinmeyen ek seçenek: %s\n"
+
+#: e2fsck/unix.c:719
+#, 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:788
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Dosya tanımlayıcı %d değerlendirilirken hata: %s\n"
+
+#: e2fsck/unix.c:792
+msgid "Invalid completion information file descriptor"
+msgstr "Tamamlama bilgisi dosya tanımlayıcısı geçersiz"
+
+#: e2fsck/unix.c:807
+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:828
+#, 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:859 e2fsck/unix.c:931 misc/tune2fs.c:811 misc/tune2fs.c:1100
+#: misc/tune2fs.c:1118
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "'%s' çözümlenemiyor"
+
+#: e2fsck/unix.c:910
+msgid "The -n and -D options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:915
+msgid "The -n and -c options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:920
+#, 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:974
+#, c-format
+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:1022
+#, 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:1031
+#, 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:1120
+#, c-format
+msgid "MMP interval is %u seconds and total wait time is %u seconds. Please wait...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1137 e2fsck/unix.c:1142
+#, fuzzy
+msgid "while checking MMP block"
+msgstr "- süperblok ayarlanırken hata oluştu"
+
+#: e2fsck/unix.c:1144 misc/tune2fs.c:1912
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+
+#: e2fsck/unix.c:1194
+#, c-format
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Hata: ext2fs kitaplık sürümü uygun değil!\n"
+
+#: e2fsck/unix.c:1202
+msgid "while trying to initialize program"
+msgstr "- uygulama başlatılmaya çelışılırken hata oluştu"
+
+#: e2fsck/unix.c:1225
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\t%s, %s kullanılıyor\n"
+
+#: e2fsck/unix.c:1237
+msgid "need terminal for interactive repairs"
+msgstr "etkileşimli onarım için uçbirim gerekli"
+
+#: e2fsck/unix.c:1290
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s blokları yedeklemeye çalışıyor...\n"
+
+#: e2fsck/unix.c:1292
+msgid "Superblock invalid,"
+msgstr "Süperblok geçersiz,"
+
+#: e2fsck/unix.c:1293
+msgid "Group descriptors look bad..."
+msgstr "Grup tanımlayıcılar hatalı görünüyor..."
+
+#: e2fsck/unix.c:1303
+#, fuzzy, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "- hatalı bloklar düğümü okunurken hata oluştu"
+
+#: e2fsck/unix.c:1307
+#, 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:1335
+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:1341
+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:1344
+#, 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:1349
+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:1352
+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:1355
+#, 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:1358
+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:1423
+msgid "Get a newer version of e2fsck!"
+msgstr "e2fsck'nın daha yeni bir sürümünü alın!"
+
+#: e2fsck/unix.c:1467
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr "- %s için ext3 günlüğü denetlenirken hata oluştu"
+
+#: e2fsck/unix.c:1478
+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:1491
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr "%s üzerine süperblok bayrakları konulamadı\n"
+
+#: e2fsck/unix.c:1497
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr "- %s ext3 günlük dosyası kurtarılmaya çalışılırken hata oluştu"
+
+#: e2fsck/unix.c:1521
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s desteklenmeyen özellik(leri):"
+
+#: e2fsck/unix.c:1536
+#, fuzzy, c-format
+msgid "%s: warning: compression support is experimental.\n"
+msgstr "Uyarı: sıkıştırma desteği deneyseldir.\n"
+
+#: e2fsck/unix.c:1542
+#, fuzzy, c-format
+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"
+
+#: e2fsck/unix.c:1594
+#, 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:1597
+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:1638
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Günlük oluşturuluyor (%d blok): "
+
+#: e2fsck/unix.c:1648
+msgid " Done.\n"
+msgstr " Tamamlandı.\n"
+
+#: e2fsck/unix.c:1649
+msgid ""
+"\n"
+"*** journal has been re-created - filesystem is now ext3 again ***\n"
+msgstr ""
+"\n"
+"*** günlük yeniden oluşturuldu - dosya sistemi yeniden ext3 ***\n"
+
+#: e2fsck/unix.c:1672
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "e2fsck baştan başlıyor...\n"
+
+#: e2fsck/unix.c:1676
+msgid "while resetting context"
+msgstr "- bağlam sıfırlanırken hata oluştu"
+
+#: e2fsck/unix.c:1683
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck durduruldu.\n"
+
+#: e2fsck/unix.c:1688
+msgid "aborted"
+msgstr "çıktı"
+
+#: e2fsck/unix.c:1700 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** DOSYA SİSTEMİ DEĞİŞTİRİLDİ *****\n"
+
+#: e2fsck/unix.c:1704
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr "%s: ***** MAKİNAYI YENİDEN BAŞLATIN *****\n"
+
+#: e2fsck/unix.c:1712 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** UYARI: Dosya sistemi hala hatalı **********\n"
+"\n"
+
+#: e2fsck/unix.c:1752
+#, fuzzy
+msgid "while setting block group checksum info"
+msgstr "- hatalı blok düğümü belirlenirken hata oluştu"
+
+#: e2fsck/util.c:190 misc/util.c:70
+msgid "yY"
+msgstr "eE"
+
+#: e2fsck/util.c:191
+msgid "nN"
+msgstr "hH"
+
+#: e2fsck/util.c:205
+msgid "<y>"
+msgstr "<e>"
+
+#: e2fsck/util.c:207
+msgid "<n>"
+msgstr "<h>"
+
+#: e2fsck/util.c:209
+msgid " (y/n)"
+msgstr " (e/h)"
+
+#: e2fsck/util.c:223
+msgid "cancelled!\n"
+msgstr "durduruldu!\n"
+
+#: e2fsck/util.c:238
+msgid "yes\n"
+msgstr "evet\n"
+
+#: e2fsck/util.c:240
+msgid "no\n"
+msgstr "hayır\n"
+
+#: e2fsck/util.c:250
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? hayır\n"
+"\n"
+
+#: e2fsck/util.c:254
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? evet\n"
+"\n"
+
+#: e2fsck/util.c:258
+msgid "yes"
+msgstr "evet"
+
+#: e2fsck/util.c:258
+msgid "no"
+msgstr "hayır"
+
+#: e2fsck/util.c:273
+#, 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:278
+msgid "reading inode and block bitmaps"
+msgstr "düğüm ve blok biteşlemleri okunuyor"
+
+#: e2fsck/util.c:286
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "- %s için biteşlemlerin okunması yinelenirken hata oluştu"
+
+#: e2fsck/util.c:298
+#, fuzzy
+msgid "writing block and inode bitmaps"
+msgstr "blok biteşlemleri yazılıyor"
+
+#: e2fsck/util.c:303
+#, 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:315
+#, 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:396
+#, fuzzy, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Kullanılan bellek: %dk/%dk (%dk/%dk), "
+
+#: e2fsck/util.c:400
+#, fuzzy, c-format
+msgid "Memory used: %lu, "
+msgstr "Kullanılan bellek: %d, "
+
+#: e2fsck/util.c:407
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "zaman: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:412
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "geçen süre: %6.3f\n"
+
+#: e2fsck/util.c:447 e2fsck/util.c:461
+#, fuzzy, c-format
+msgid "while reading inode %lu in %s"
+msgstr "- %ld düğümü %s den okunurken hata oluştu"
+
+#: e2fsck/util.c:475 e2fsck/util.c:488
+#, 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:637
+msgid "while allocating zeroizing buffer"
+msgstr "- sıfırlama tampon belleği ayrılırken hata oluştu"
+
+#: e2fsck/util.c:785
+msgid "UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is running.\n"
+msgstr ""
+
+#: misc/badblocks.c:69
+#, fuzzy
+msgid "done                                                 \n"
+msgstr "bitti                           .\n"
+
+#: misc/badblocks.c:92
+#, 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"
+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:103
+#, 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:218
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr ""
+
+#: misc/badblocks.c:322
+msgid "Testing with random pattern: "
+msgstr "Rasgele şablon ile sınanıyor: "
+
+#: misc/badblocks.c:340
+msgid "Testing with pattern 0x"
+msgstr "Sınama şablonu: 0x"
+
+#: misc/badblocks.c:372 misc/badblocks.c:445
+msgid "during seek"
+msgstr "erişim sırasında"
+
+#: misc/badblocks.c:383
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "do_read için tuhaf değer (%ld)\n"
+
+#: misc/badblocks.c:469
+msgid "during ext2fs_sync_device"
+msgstr "ext2fs_sync_device sırasında"
+
+#: misc/badblocks.c:489 misc/badblocks.c:749
+msgid "while beginning bad block list iteration"
+msgstr "- hatalı blok listesi yinelemesine başlanırken hata oluştu"
+
+#: misc/badblocks.c:503 misc/badblocks.c:602 misc/badblocks.c:759
+msgid "while allocating buffers"
+msgstr "- tampon bellek ayrılırken hata oluştu"
+
+#: misc/badblocks.c:507
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "%lu ile %lu arasındaki bloklar denetleniyor\n"
+
+#: misc/badblocks.c:512
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Hatalı bloklar salt-okunur kipte denetleniyor\n"
+
+#: misc/badblocks.c:521
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Hatalı bloklar için denetleniyor (salt-oku testi): "
+
+#: misc/badblocks.c:528 misc/badblocks.c:634 misc/badblocks.c:676
+#: misc/badblocks.c:822
+msgid "Too many bad blocks, aborting test\n"
+msgstr ""
+
+#: misc/badblocks.c:609
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Hatalı bloklar oku-yaz kipinde denetleniyor\n"
+
+#: misc/badblocks.c:611 misc/badblocks.c:772
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Blok %lu dan %lu ya kadar\n"
+
+#: misc/badblocks.c:666
+msgid "Reading and comparing: "
+msgstr "Okunuyor ve karşılaştırılıyor: "
+
+#: misc/badblocks.c:771
+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:777
+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:784
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Kesme yakalandı, kaldırılıyor\n"
+
+#: misc/badblocks.c:867
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "veri yazma denemesi sırasında, blok %lu"
+
+#: misc/badblocks.c:988 misc/util.c:152
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s bağlandı; "
+
+#: misc/badblocks.c:990
+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:995
+msgid "it's not safe to run badblocks!\n"
+msgstr "'badblocks' çalıştırmak güvenli değil!\n"
+
+#: misc/badblocks.c:1000 misc/util.c:163
+#, 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:1003
+msgid "badblocks forced anyway.\n"
+msgstr "badblocks n'olursa olsun çalıştırılacak.\n"
+
+#: misc/badblocks.c:1023
+#, fuzzy, c-format
+msgid "invalid %s - %s"
+msgstr "blok uzunluğu hatalı - %s"
+
+#: misc/badblocks.c:1133
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr "sınama şablonu - %s için bellek ayrılamadı"
+
+#: misc/badblocks.c:1163
+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:1169
+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:1183
+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:1189
+msgid "while trying to determine device size"
+msgstr "- aygıt alanı saptanmaya çalışılırken hata oluştu"
+
+#: misc/badblocks.c:1194
+#, fuzzy
+msgid "last block"
+msgstr "Bloklar yeniden konumlandırılıyor"
+
+#: misc/badblocks.c:1200
+#, fuzzy
+msgid "first block"
+msgstr "İlk veri bloğu = %u\n"
+
+#: misc/badblocks.c:1203
+#, fuzzy, c-format
+msgid "invalid starting block (%lu): must be less than %lu"
+msgstr "başlangıç bloğu hatalı - %s"
+
+#: misc/badblocks.c:1259
+msgid "while creating in-memory bad blocks list"
+msgstr "hatalı bloklar listesi bellekte oluşturulurken"
+
+#: misc/badblocks.c:1274
+msgid "while adding to in-memory bad block list"
+msgstr "bellekteki hatalı bloklar listesine eklenirken"
+
+#: misc/badblocks.c:1298
+#, 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:86
+#, fuzzy, c-format
+msgid "Usage: %s [-RVf] [-+=AaCcDdeijsSu] [-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:155
+#, c-format
+msgid "bad version - %s\n"
+msgstr "sürüm hatalı - %s\n"
+
+#: misc/chattr.c:201 misc/lsattr.c:116
+#, c-format
+msgid "while trying to stat %s"
+msgstr "- stat %s yapılmaya çalışılırken hata oluştu"
+
+#: misc/chattr.c:208
+#, c-format
+msgid "while reading flags on %s"
+msgstr "- %s üzerinde bayraklar okunurken hata oluştu"
+
+#: misc/chattr.c:213 misc/chattr.c:225
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Belirlenen %s bayrakları: "
+
+#: misc/chattr.c:234
+#, c-format
+msgid "while setting flags on %s"
+msgstr "- %s üzerinde bayraklar belirlenirken hata oluştu"
+
+#: misc/chattr.c:242
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "%s sürümü %lu olarak belirlendi\n"
+
+#: misc/chattr.c:246
+#, c-format
+msgid "while setting version on %s"
+msgstr "- %s üzerinde sürüm belirlenirken hata oluştu"
+
+#: misc/chattr.c:266
+#, c-format
+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:306
+msgid "= is incompatible with - and +\n"
+msgstr "= ile + ve - uyumsuz\n"
+
+#: misc/chattr.c:314
+msgid "Must use '-v', =, - or +\n"
+msgstr "'-v', =, - veya + kullanılmalı\n"
+
+#: misc/dumpe2fs.c:55
+#, fuzzy, c-format
+msgid "Usage: %s [-bfhixV] [-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:196
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Grup %lu:  (Bloklar:  "
+
+#: misc/dumpe2fs.c:204
+#, c-format
+msgid "  Checksum 0x%04x"
+msgstr ""
+
+#: misc/dumpe2fs.c:206
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr ""
+
+#: misc/dumpe2fs.c:207
+#, fuzzy, c-format
+msgid ", unused inodes %u\n"
+msgstr "düğüm sayısı hatalı - %s"
+
+#: misc/dumpe2fs.c:212
+#, c-format
+msgid "  %s superblock at "
+msgstr "   %s süperblok:  "
+
+#: misc/dumpe2fs.c:213
+msgid "Primary"
+msgstr "  İlk"
+
+#: misc/dumpe2fs.c:213
+msgid "Backup"
+msgstr "Yedek"
+
+#: misc/dumpe2fs.c:217
+#, c-format
+msgid ", Group descriptors at "
+msgstr ""
+" \n"
+"  Grup tanımlayıcı:  "
+
+#: misc/dumpe2fs.c:221
+#, c-format
+msgid ""
+"\n"
+"  Reserved GDT blocks at "
+msgstr ""
+"\n"
+"  Yedek GDT blokları "
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " Group descriptor at "
+msgstr ""
+" \n"
+"  Grup tanımlayıcı:  "
+
+#: misc/dumpe2fs.c:234
+msgid "  Block bitmap at "
+msgstr "    Blok biteşlemi:  "
+
+#: misc/dumpe2fs.c:238
+msgid ", Inode bitmap at "
+msgstr ""
+" \n"
+"   Düğüm biteşlemi:  "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+"  Inode table at "
+msgstr ""
+"\n"
+"     Düğüm tablosu:  "
+
+#: misc/dumpe2fs.c:248
+#, 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:255
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:258
+msgid "  Free blocks: "
+msgstr "   Serbest bloklar:  "
+
+#: misc/dumpe2fs.c:269
+msgid "  Free inodes: "
+msgstr "  Serbest düğümler:  "
+
+#: misc/dumpe2fs.c:300
+msgid "while printing bad block list"
+msgstr "- hatalı bloklar listesi basılırken hata oluştu"
+
+#: misc/dumpe2fs.c:306
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Hatalı bloklar: %u"
+
+#: misc/dumpe2fs.c:333 misc/tune2fs.c:306
+msgid "while reading journal inode"
+msgstr "- günlük düğümü okunurken hata oluştu"
+
+#: misc/dumpe2fs.c:339
+#, fuzzy
+msgid "while opening journal inode"
+msgstr "- günlük düğümü okunurken hata oluştu"
+
+#: misc/dumpe2fs.c:345
+#, fuzzy
+msgid "while reading journal super block"
+msgstr "- günlük dosyası süperbloğu okunurken hata oluştu"
+
+#: misc/dumpe2fs.c:355
+#, fuzzy, c-format
+msgid "Journal features:        "
+msgstr "Günlük kullanıcıları:     %s\n"
+
+#: misc/dumpe2fs.c:368
+msgid "Journal size:             "
+msgstr "Günlük boyutu:            "
+
+#: misc/dumpe2fs.c:379
+#, fuzzy, c-format
+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"
+
+#: misc/dumpe2fs.c:386
+#, fuzzy, c-format
+msgid "Journal errno:            %d\n"
+msgstr "Günlük kullanıcıları:     %s\n"
+
+#: misc/dumpe2fs.c:401 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "- günlük dosyası süperbloğu okunurken hata oluştu"
+
+#: misc/dumpe2fs.c:409
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Günlük dosyası süperbloğu tanım numarası bulunamadı"
+
+#: misc/dumpe2fs.c:413
+#, c-format
+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"
+
+#: misc/dumpe2fs.c:426
+#, c-format
+msgid "Journal users:            %s\n"
+msgstr "Günlük kullanıcıları:     %s\n"
+
+#: misc/dumpe2fs.c:442 misc/mke2fs.c:666 misc/tune2fs.c:1137
+#, c-format
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr "Seçenekleri çözümlemek için bellek ayrılamadı!\n"
+
+#: misc/dumpe2fs.c:468
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr "Geçersiz süper blok parametresi: %s\n"
+
+#: misc/dumpe2fs.c:483
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr "Ge.ers,z blok boyut parametresi: %s\n"
+
+#: misc/dumpe2fs.c:494
+#, 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:554 misc/mke2fs.c:1555
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\t%s kullanılıyor\n"
+
+#: misc/dumpe2fs.c:590 misc/e2image.c:1326 misc/tune2fs.c:1923
+#: resize/main.c:317
+#, c-format
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Geçerli süperblok bulunamadı.\n"
+
+#: misc/dumpe2fs.c:618
+#, c-format
+msgid ""
+"\n"
+"%s: %s: error reading bitmaps: %s\n"
+msgstr ""
+"\n"
+"%s: %s: biteşlemler okunurken hata oluştu: %s\n"
+
+#: misc/e2image.c:90
+#, fuzzy, c-format
+msgid "Usage: %s [-rsIQa] 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:138
+#, c-format
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr ""
+
+#: misc/e2image.c:144
+msgid "Couldn't allocate header buffer\n"
+msgstr "Başlık için tampon bellek ayrılamadı\n"
+
+#: misc/e2image.c:174
+msgid "while writing superblock"
+msgstr "- süperbloğa yazılırken hata oluştu"
+
+#: misc/e2image.c:182
+msgid "while writing inode table"
+msgstr "- düğüm tablosuna yazılırken hata oluştu"
+
+#: misc/e2image.c:189
+msgid "while writing block bitmap"
+msgstr "- blok biteşlemi yazılırken hata oluştu"
+
+#: misc/e2image.c:196
+msgid "while writing inode bitmap"
+msgstr "- düğüm biteşlemi yazılırken hata oluştu"
+
+#: misc/e2image.c:1365
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr ""
+
+#: 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:2080
+#, 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:803
+#, 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:36
+#, c-format
+msgid "Usage: %s <transaction file> <filesystem>\n"
+msgstr ""
+
+#: misc/e2undo.c:52
+#, fuzzy
+msgid "Failed to read the file system data \n"
+msgstr "- dosya sistemi tabloları ayrılmaya çalışılırken hata oluştu"
+
+#: misc/e2undo.c:62 misc/e2undo.c:83 misc/e2undo.c:108 misc/e2undo.c:206
+#, c-format
+msgid "Failed tdb_fetch %s\n"
+msgstr ""
+
+#: misc/e2undo.c:70
+#, c-format
+msgid "The file system Mount time didn't match %u\n"
+msgstr ""
+
+#: misc/e2undo.c:89
+msgid "The file system UUID didn't match \n"
+msgstr ""
+
+#: misc/e2undo.c:163
+#, fuzzy, c-format
+msgid "Failed tdb_open %s\n"
+msgstr "%s açılırken"
+
+#: misc/e2undo.c:169
+#, fuzzy, c-format
+msgid "Error while determining whether %s is mounted.\n"
+msgstr "- %s'in bağlı olup olmadığı saptanmaya çalışılırken hata oluştu."
+
+#: misc/e2undo.c:175
+msgid "e2undo should only be run on unmounted file system\n"
+msgstr ""
+
+#: misc/e2undo.c:184
+#, fuzzy, c-format
+msgid "Failed to open %s\n"
+msgstr "- %s açılmaya çalışılırken hata oluştu"
+
+#: misc/e2undo.c:210
+#, c-format
+msgid "Replayed transaction of size %zd at location %llu\n"
+msgstr ""
+
+#: misc/e2undo.c:216
+#, c-format
+msgid "Failed write %s\n"
+msgstr ""
+
+#: 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:478
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: yok\n"
+
+#: misc/fsck.c:594
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: bekliyor: Başka ast süreç yok?!?\n"
+
+#: misc/fsck.c:616
+#, 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:622
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: durum %x, asla olmamalıydı.\n"
+
+#: misc/fsck.c:661
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr "%s ile bitti (çıkış durumu: %d)\n"
+
+#: misc/fsck.c:721
+#, 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:742
+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:761
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Dosya sistemi türleri için bellek ayrılamadı\n"
+
+#: misc/fsck.c:884
+#, 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:911
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: %s denetlenemiyor: fsck.%s yok\n"
+
+#: misc/fsck.c:967
+msgid "Checking all file systems.\n"
+msgstr "Tüm dosya sistemleri denetleniyor.\n"
+
+#: misc/fsck.c:1058
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--beklemede-- (%d. geçiş)\n"
+
+#: misc/fsck.c:1078
+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:1120
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: aygıt sayısı çok fazla\n"
+
+#: misc/fsck.c:1153 misc/fsck.c:1239
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: argüman sayısı fazla\n"
+
+#: misc/lsattr.c:74
+#, c-format
+msgid "Usage: %s [-RVadlv] [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:84
+#, c-format
+msgid "While reading flags on %s"
+msgstr "- %s üzerinde bayraklar okunurken hata oluştu"
+
+#: misc/lsattr.c:91
+#, c-format
+msgid "While reading version on %s"
+msgstr "- %s üzerinde sürüm okunurken hata oluştu"
+
+#: misc/mke2fs.c:116
+#, 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]\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] [-jnqvDFKSV] 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:221
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Çalışan komut: %s\n"
+
+#: misc/mke2fs.c:225
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "- '%s' çalıştırılırken oldu"
+
+#: misc/mke2fs.c:232
+msgid "while processing list of bad blocks from program"
+msgstr "- hatalı bloklar listesi işlenirken hata oluştu"
+
+#: misc/mke2fs.c:259
+#, 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:261
+#, 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:264
+msgid "Aborting....\n"
+msgstr "Çıkılıyor...\n"
+
+#: misc/mke2fs.c:284
+#, 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:303
+msgid "while marking bad blocks as used"
+msgstr "- hatalı bloklar kullanılmış olarak imlenirken hata oluştu"
+
+#: misc/mke2fs.c:320
+msgid "Writing inode tables: "
+msgstr "Düğüm tabloları yazılıyor: "
+
+#: misc/mke2fs.c:341
+#, 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:355 misc/mke2fs.c:2257 misc/mke2fs.c:2512
+#, c-format
+msgid "done                            \n"
+msgstr "bitti                           \n"
+
+#: misc/mke2fs.c:366
+msgid "while creating root dir"
+msgstr "- kök dizin oluşturulurken hata"
+
+#: misc/mke2fs.c:373
+msgid "while reading root inode"
+msgstr "- kök düğümü okunurken hata oluştu"
+
+#: misc/mke2fs.c:385
+msgid "while setting root inode ownership"
+msgstr "- kök düğümünün sahibi belirlenirken hata oluştu"
+
+#: misc/mke2fs.c:403
+msgid "while creating /lost+found"
+msgstr "- /lost+found dizini oluşturulurken hata oluştu"
+
+#: misc/mke2fs.c:410
+msgid "while looking up /lost+found"
+msgstr "- /lost+found dizine bakılırken hata oluştu"
+
+#: misc/mke2fs.c:423
+msgid "while expanding /lost+found"
+msgstr "- /lost+found dizini genişletilirken hata oluştu"
+
+#: misc/mke2fs.c:438
+msgid "while setting bad block inode"
+msgstr "- hatalı blok düğümü belirlenirken hata oluştu"
+
+#: misc/mke2fs.c:465
+#, 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:475
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr "Uyarı: blok 0 okunamadı: %s\n"
+
+#: misc/mke2fs.c:491
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Uyarı: %d. sektör silinemedi: %s\n"
+
+#: misc/mke2fs.c:507
+msgid "while initializing journal superblock"
+msgstr "- gümlük superbloğu ilklendirilirken hata oluştu"
+
+#: misc/mke2fs.c:515
+msgid "Zeroing journal device: "
+msgstr "Günlük aygıtı temizleniyor: "
+
+#: misc/mke2fs.c:527
+#, 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:545
+msgid "while writing journal superblock"
+msgstr "- günlük süperbloğu yazılırken hata oluştu"
+
+#: misc/mke2fs.c:560
+#, fuzzy, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"uyarı: %u blok kullanılmamış.\n"
+"\n"
+
+#: misc/mke2fs.c:565
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Dosya sistemi ismi = %s\n"
+
+#: misc/mke2fs.c:568
+#, fuzzy, c-format
+msgid "OS type: %s\n"
+msgstr "İşl. Sist. türü: "
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Blok boyu = %u (günlük kaydı = %u)\n"
+
+#: misc/mke2fs.c:574
+#, fuzzy, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Blok boyu = %u (günlük kaydı = %u)\n"
+
+#: misc/mke2fs.c:578
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Adımlama boyu = %u (günlük kaydı = %u)\n"
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:582
+#, fuzzy, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u düğüm, %u blok\n"
+
+#: misc/mke2fs.c:584
+#, 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:587
+#, c-format
+msgid "First data block=%u\n"
+msgstr "İlk veri bloğu = %u\n"
+
+#: misc/mke2fs.c:589
+#, c-format
+msgid "Root directory owner=%u:%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:591
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr "Azami dosyasistemi bloğu sayısı = %lu\n"
+
+#: misc/mke2fs.c:595
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u blok grubu\n"
+
+#: misc/mke2fs.c:597
+#, c-format
+msgid "%u block group\n"
+msgstr "%u blok grubu\n"
+
+#: misc/mke2fs.c:600
+#, 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:603
+#, 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:605
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "grup başına %u düğüm\n"
+
+#: misc/mke2fs.c:612
+#, c-format
+msgid "Superblock backups stored on blocks: "
+msgstr "Süperblokların bulunduğu bloklar:"
+
+#: misc/mke2fs.c:691 misc/tune2fs.c:1165
+#, fuzzy, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "sınama şablonu geçersiz: %s\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "'stride' parametresi geçersiz: %s\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Geçersiz çizgi genişlik parametresi: %s\n"
+
+#: misc/mke2fs.c:743
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr "Yeniden boyutlama parametresi geçersiz: %s\n"
+
+#: misc/mke2fs.c:750
+#, c-format
+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:774
+#, c-format
+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:801 misc/mke2fs.c:810
+#, fuzzy, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "Geçersiz dosya sistemi seçeneği belirtidi: %s\n"
+
+#: misc/mke2fs.c:835
+#, fuzzy, c-format
+msgid "Invalid quotatype parameter: %s\n"
+msgstr "'stride' parametresi geçersiz: %s\n"
+
+#: misc/mke2fs.c:846
+#, 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"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_uid=<uid of root directory>\n"
+"\troot_gid=<gid of root directory>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr OR grp>\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:868
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:907
+#, 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:920 misc/tune2fs.c:398
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Geçersiz dosya sistemi seçeneği: %s\n"
+
+#: misc/mke2fs.c:932 misc/tune2fs.c:349
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "Geçersiz dosya sistemi seçeneği belirtidi: %s\n"
+
+#: misc/mke2fs.c:1072
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1076
+#, c-format
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1080
+#, fuzzy, c-format
+msgid "Aborting...\n"
+msgstr "Çıkılıyor...\n"
+
+#: misc/mke2fs.c:1120
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1276
+#, fuzzy, c-format
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "Dosya sistemi türleri için bellek ayrılamadı\n"
+
+#: misc/mke2fs.c:1317
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1357
+#, c-format
+msgid "invalid block size - %s"
+msgstr "blok uzunluğu hatalı - %s"
+
+#: misc/mke2fs.c:1361
+#, 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:1377
+#, fuzzy, c-format
+msgid "invalid cluster size - %s"
+msgstr "blok uzunluğu hatalı - %s"
+
+#: misc/mke2fs.c:1387
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr ""
+
+#: misc/mke2fs.c:1399
+msgid "Illegal number for blocks per group"
+msgstr "Grup başına blok sayısı kuraldışı"
+
+#: misc/mke2fs.c:1404
+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:1412
+#, fuzzy
+msgid "Illegal number for flex_bg size"
+msgstr "Grup başına blok sayısı kuraldışı"
+
+#: misc/mke2fs.c:1418
+msgid "flex_bg size must be a power of 2"
+msgstr ""
+
+#: misc/mke2fs.c:1428
+#, 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:1438
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "düğüm uzunluğu hatalı - %s"
+
+#: misc/mke2fs.c:1450
+#, c-format
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr ""
+
+#: misc/mke2fs.c:1460
+msgid "in malloc for bad_blocks_filename"
+msgstr "- bad_blocks_filename için bellek ayrılırken"
+
+#: misc/mke2fs.c:1473
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr "yedek blok yüzdesi hatalı - %s"
+
+#: misc/mke2fs.c:1488
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "düğüm sayısı hatalı - %s"
+
+#: misc/mke2fs.c:1505
+#, c-format
+msgid "bad revision level - %s"
+msgstr "değişiklik seviyesi hatalı - %s"
+
+#: misc/mke2fs.c:1519
+#, fuzzy
+msgid "The -t option may only be used once"
+msgstr "-o yalnız bir kere kullanılabilir"
+
+#: misc/mke2fs.c:1527
+#, fuzzy
+msgid "The -T option may only be used once"
+msgstr "-o yalnız bir kere kullanılabilir"
+
+#: misc/mke2fs.c:1580 misc/mke2fs.c:2591
+#, 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:1586
+#, 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:1592
+#, fuzzy, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr "%s'e günlük ekleniyor: "
+
+#: misc/mke2fs.c:1603
+#, fuzzy, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "blok sayısı hatalı - %s"
+
+#: misc/mke2fs.c:1613
+msgid "filesystem"
+msgstr "dosya sistemi"
+
+#: misc/mke2fs.c:1626 resize/main.c:367
+msgid "while trying to determine filesystem size"
+msgstr "- dosya sistemi uzunluğu saptanmaya çalışılırken hata oluştu"
+
+#: misc/mke2fs.c:1632
+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:1639
+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:1656
+msgid "Filesystem larger than apparent device size."
+msgstr "Dosya sisteminin uzunluğu görünürdeki uzunluktan büyük."
+
+#: misc/mke2fs.c:1676
+#, c-format
+msgid "Failed to parse fs types list\n"
+msgstr ""
+
+#: misc/mke2fs.c:1730
+#, 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:1746
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr ""
+
+#: misc/mke2fs.c:1753
+#, c-format
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr "Dosyasistemi özellikleri 0 revizyonlu dosyasistemlerinde desteklenmiyor\n"
+
+#: misc/mke2fs.c:1760
+#, c-format
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1772
+#, c-format
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1786
+#, fuzzy, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "yedek blok yüzdesi hatalı - %s"
+
+#: misc/mke2fs.c:1802
+#, c-format
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1819
+msgid "while trying to determine hardware sector size"
+msgstr "- donanımsal sektör boyu saptanmaya çalışılırken"
+
+#: misc/mke2fs.c:1825
+#, fuzzy
+msgid "while trying to determine physical sector size"
+msgstr "- donanımsal sektör boyu saptanmaya çalışılırken"
+
+#: misc/mke2fs.c:1858
+#, fuzzy
+msgid "while setting blocksize; too small for device\n"
+msgstr "- yeniden boyutlama için bloklar yedeklenirken hata oluştu"
+
+#: misc/mke2fs.c:1863
+#, c-format
+msgid "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1881
+#, 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:1887
+msgid "specifying a cluster size requires the bigalloc feature"
+msgstr ""
+
+#: misc/mke2fs.c:1906
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1909
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1911
+#, c-format
+msgid "This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1930
+#, 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:1934
+#, 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:1968
+msgid "Can't support bigalloc feature without extents feature"
+msgstr ""
+
+#: misc/mke2fs.c:1975
+#, c-format
+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:1982 misc/tune2fs.c:740
+#, c-format
+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 ""
+
+#: misc/mke2fs.c:1993
+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:2002
+msgid "blocks per group count out of range"
+msgstr "Grup başına blok sayısı kapsamdışı"
+
+#: misc/mke2fs.c:2026
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+
+#: misc/mke2fs.c:2038
+#, 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:2056
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr ""
+
+#: misc/mke2fs.c:2063
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr ""
+
+#: misc/mke2fs.c:2077
+#, 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:2196
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+"    e2undo %s %s\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2210
+#, fuzzy
+msgid "while trying to setup undo file\n"
+msgstr ""
+"\n"
+"\tgünlük dosyası oluşturulmaya çalışılırken hata oluştu"
+
+#: misc/mke2fs.c:2236
+msgid "Discarding device blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:2252
+msgid "failed - "
+msgstr ""
+
+#: misc/mke2fs.c:2360
+msgid "while setting up superblock"
+msgstr "- süperblok ayarlanırken hata oluştu"
+
+#: misc/mke2fs.c:2369
+#, c-format
+msgid "Discard succeeded and will return 0s  - skipping inode table wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:2452
+#, c-format
+msgid "unknown os - %s"
+msgstr "bilinmeyen işletim sistemi - %s"
+
+#: misc/mke2fs.c:2504
+#, fuzzy, c-format
+msgid "Allocating group tables: "
+msgstr "Düğüm tabloları yazılıyor: "
+
+#: misc/mke2fs.c:2508
+msgid "while trying to allocate filesystem tables"
+msgstr "- dosya sistemi tabloları ayrılmaya çalışılırken hata oluştu"
+
+#: misc/mke2fs.c:2517
+#, fuzzy
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr "- blok biteşlemi yazılırken hata oluştu"
+
+#: misc/mke2fs.c:2560
+#, 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:2573
+msgid "while reserving blocks for online resize"
+msgstr "- yeniden boyutlama için bloklar yedeklenirken hata oluştu"
+
+#: misc/mke2fs.c:2584 misc/tune2fs.c:645
+msgid "journal"
+msgstr "günlük"
+
+#: misc/mke2fs.c:2596
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "%s'e günlük ekleniyor: "
+
+#: misc/mke2fs.c:2603
+#, 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:2608 misc/mke2fs.c:2640 misc/tune2fs.c:674 misc/tune2fs.c:688
+#, c-format
+msgid "done\n"
+msgstr "tamam\n"
+
+#: misc/mke2fs.c:2617
+#, c-format
+msgid "Skipping journal creation in super-only mode\n"
+msgstr ""
+
+#: misc/mke2fs.c:2628
+#, fuzzy, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Günlük oluşturuluyor (%d blok): "
+
+#: misc/mke2fs.c:2636
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tgünlük oluşturulmaya çalışılırken hata oluştu"
+
+#: misc/mke2fs.c:2647 misc/tune2fs.c:451
+#, c-format
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+
+#: misc/mke2fs.c:2652
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2665
+#, c-format
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Süperblokların ve dosya sisteminin hesap bilgileri yazılıyor: "
+
+#: misc/mke2fs.c:2672
+#, c-format
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+"\n"
+"Uyarı, süperblokların tamamına yazma sorunu var."
+
+#: misc/mke2fs.c:2674
+#, c-format
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"bitti\n"
+"\n"
+
+#: misc/mklost+found.c:50
+#, c-format
+msgid "Usage: mklost+found\n"
+msgstr "Kullanımı: mklost+found\n"
+
+#: misc/partinfo.c:41
+#, 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:51
+#, fuzzy, c-format
+msgid "Cannot open %s: %s"
+msgstr "e2label: %s açılamıyor\n"
+
+#: misc/partinfo.c:57
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:65
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:71
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d   start=%8d size=%8lu end=%8d\n"
+msgstr ""
+
+#: misc/tune2fs.c:107
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr "Lütfen dosya sisteminde e2fsck çalıştırın.\n"
+
+#: misc/tune2fs.c:116
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-p mmp_update_interval]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]\n"
+"\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[ -I new_inode_size ] 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:209
+msgid "while trying to open external journal"
+msgstr "- dış günlük açılmaya çalışılırken hata oluştu"
+
+#: misc/tune2fs.c:214
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s bir günlükleme aygıtı değil.\n"
+
+#: misc/tune2fs.c:229
+msgid "Journal superblock not found!\n"
+msgstr "Günlük süperbloğu yok!\n"
+
+#: misc/tune2fs.c:240
+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:261
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:269
+msgid "Journal removed\n"
+msgstr "Günlük silindi\n"
+
+#: misc/tune2fs.c:313
+msgid "while reading bitmaps"
+msgstr "- biteşlemler okunurken hata oluştu"
+
+#: misc/tune2fs.c:321
+msgid "while clearing journal inode"
+msgstr "- günlük düğümü temizlenirken hata oluştu"
+
+#: misc/tune2fs.c:332
+msgid "while writing journal inode"
+msgstr "- günlük düğümü yazılırken hata oluştu"
+
+#: misc/tune2fs.c:367
+#, c-format
+msgid "(and reboot afterwards!)\n"
+msgstr ""
+
+#: misc/tune2fs.c:401
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "'%s' dosya sistemi özelliğini temizleme desteklenmiyor.\n"
+
+#: misc/tune2fs.c:407
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:416
+#, 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:424
+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:443
+#, 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:461
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:470
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:478
+#, fuzzy
+msgid "Error while reading bitmaps\n"
+msgstr "- biteşlemler okunurken hata oluştu"
+
+#: misc/tune2fs.c:487
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+
+#: misc/tune2fs.c:492
+#, fuzzy
+msgid "while reading MMP block."
+msgstr "- hatalı bloklar düğümü okunmaya çalışılırken hata oluştu"
+
+#: misc/tune2fs.c:524
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+
+#: misc/tune2fs.c:535
+#, 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:595
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:640
+msgid "The filesystem already has a journal.\n"
+msgstr "Dosya sisteminde bir günlük dosyası zaten var.\n"
+
+#: misc/tune2fs.c:658
+#, 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:662
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "%s üzerinde günlük dosyası oluşturuluyor: "
+
+#: misc/tune2fs.c:670
+#, 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:676
+msgid "Creating journal inode: "
+msgstr "Günlük düğümü oluşturuluyor: "
+
+#: misc/tune2fs.c:685
+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:763
+#, fuzzy
+msgid "Couldn't allocate memory to parse quota options!\n"
+msgstr "Seçenekleri çözümlemek için bellek ayrılamadı!\n"
+
+#: misc/tune2fs.c:785
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:846
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr "Tarih/zaman belirteci çözümlenemedi: %s"
+
+#: misc/tune2fs.c:870 misc/tune2fs.c:883
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "bağlama sayısı hatalı - %s"
+
+#: misc/tune2fs.c:899
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "hata davranışı hatalı - %s"
+
+#: misc/tune2fs.c:926
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "grup ismi/numarası hatalı -%s"
+
+#: misc/tune2fs.c:959
+#, c-format
+msgid "bad interval - %s"
+msgstr "süre hatalı - %s"
+
+#: misc/tune2fs.c:988
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "yedek blok oranı hatalı - %s"
+
+#: misc/tune2fs.c:1003
+msgid "-o may only be specified once"
+msgstr "-o yalnız bir kere kullanılabilir"
+
+#: misc/tune2fs.c:1012
+msgid "-O may only be specified once"
+msgstr "-O yalnız bir kere kullanılabilir"
+
+#: misc/tune2fs.c:1027
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "yedek blok sayısı hatalı - %s"
+
+#: misc/tune2fs.c:1056
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "kullanıcı ismi/numarası hatalı - %s"
+
+#: misc/tune2fs.c:1073
+#, fuzzy, c-format
+msgid "bad inode size - %s"
+msgstr "düğüm uzunluğu hatalı - %s"
+
+#: misc/tune2fs.c:1080
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr ""
+
+#: misc/tune2fs.c:1174
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:1179
+#, 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:1202
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:1217
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:1232
+#, fuzzy, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr "'stride' parametresi geçersiz: %s\n"
+
+#: misc/tune2fs.c:1238
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:1257
+#, fuzzy, c-format
+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"
+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:1723
+#, fuzzy
+msgid "Failed to read inode bitmap\n"
+msgstr "- biteşlemler okunurken hata oluştu"
+
+#: misc/tune2fs.c:1728
+#, fuzzy
+msgid "Failed to read block bitmap\n"
+msgstr "düğüm ve blok biteşlemleri okunuyor"
+
+#: misc/tune2fs.c:1745 resize/resize2fs.c:870
+msgid "blocks to be moved"
+msgstr "taşınacak bloklar"
+
+#: misc/tune2fs.c:1748
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:1754
+msgid "Not enough space to increase inode size \n"
+msgstr ""
+
+#: misc/tune2fs.c:1759
+#, fuzzy
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr "- yeniden boyutlama için bloklar yedeklenirken hata oluştu"
+
+#: misc/tune2fs.c:1791
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+
+#: misc/tune2fs.c:1818
+#, fuzzy
+msgid "Couldn't allocate memory for tdb filename\n"
+msgstr "Dosya sistemi türleri için bellek ayrılamadı\n"
+
+#: misc/tune2fs.c:1840
+#, fuzzy, c-format
+msgid "while trying to delete %s"
+msgstr "- %s yeniden boyutlandırılırken hata oluştu"
+
+#: misc/tune2fs.c:1850
+#, c-format
+msgid ""
+"To undo the tune2fs operation please run the command\n"
+"    e2undo %s %s\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:1919
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:1937
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:1943
+#, c-format
+msgid "Shrinking the inode size is not supported\n"
+msgstr ""
+
+#: misc/tune2fs.c:1949
+#, 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:1996
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "En fazla bağlama sayısı %d olarak belirleniyor\n"
+
+#: misc/tune2fs.c:2002
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Şimdiki bağlama sayısı %d olarak belirleniyor\n"
+
+#: misc/tune2fs.c:2007
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Hata davranışı %d olarak belirleniyor\n"
+
+#: misc/tune2fs.c:2012
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Yedek blokların grup numarası %lu olarak belirleniyor\n"
+
+#: misc/tune2fs.c:2017
+#, 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:2024
+#, 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:2031
+#, 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:2037
+#, 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:2044
+#, fuzzy, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "Yedek blok sayısı %lu olarak belirleniyor\n"
+
+#: misc/tune2fs.c:2050
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Dosya sistemindeki süperbloklar zaten azaltılmış.\n"
+
+#: misc/tune2fs.c:2057
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set.  %s"
+msgstr ""
+"\n"
+"Süperblok azaltma bayrağı konuldu.  %s"
+
+#: misc/tune2fs.c:2062
+msgid ""
+"\n"
+"Clearing the sparse superflag not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2070
+#, 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:2076
+#, 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:2108
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+
+#: misc/tune2fs.c:2126
+#, 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:2159
+msgid "Invalid UUID format\n"
+msgstr "Geçersiz UUID biçemi\n"
+
+#: misc/tune2fs.c:2172
+#, 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:2180
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2193
+#, fuzzy, c-format
+msgid "Setting inode size %lu\n"
+msgstr "düğüm uzunluğu hatalı - %s"
+
+#: misc/tune2fs.c:2196
+#, fuzzy, c-format
+msgid "Failed to change inode size\n"
+msgstr "- düğüm taraması başlatılırken hata oluştu"
+
+#: misc/tune2fs.c:2207
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:2212
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:2219
+#, 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:74
+msgid "Proceed anyway? (y,n) "
+msgstr "Yine de devam edilsin mi? (e/h) "
+
+#: misc/util.c:89
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr "stat %s yapılamadı --- %s\n"
+
+#: misc/util.c:92
+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"
+
+#: misc/util.c:103
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s blok özellikli bir aygıt değil.\n"
+
+#: misc/util.c:132
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr "%s diskin tamamı! Bir disk bölümü değil!\n"
+
+#: misc/util.c:154
+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:159
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "burada bir %s yapılmayacak!\n"
+
+#: misc/util.c:166
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs ne olursa olsun çalıştırılacak.\n"
+
+#: misc/util.c:182
+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:207
+#, 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:228
+#, 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"
+"\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:258
+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:265
+#, 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:273
+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:287
+#, 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:48
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr ""
+
+#: misc/uuidd.c:50
+#, c-format
+msgid "       %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr ""
+
+#: misc/uuidd.c:52
+#, c-format
+msgid "       %s -k\n"
+msgstr ""
+
+#: misc/uuidd.c:154
+#, fuzzy
+msgid "bad arguments"
+msgstr "%s: argüman sayısı fazla\n"
+
+#: misc/uuidd.c:172
+msgid "connect"
+msgstr ""
+
+#: misc/uuidd.c:191
+msgid "write"
+msgstr ""
+
+#: misc/uuidd.c:199
+msgid "read count"
+msgstr ""
+
+#: misc/uuidd.c:205
+msgid "bad response length"
+msgstr ""
+
+#: misc/uuidd.c:270
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr ""
+
+#: misc/uuidd.c:278
+#, fuzzy, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr "Tarih/zaman belirteci çözümlenemedi: %s"
+
+#: misc/uuidd.c:307
+#, fuzzy, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr "ext2 süperbloğu bulunamadı,"
+
+#: misc/uuidd.c:315
+#, 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:353
+#, fuzzy, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "Düğüm %i okunurken hata oluştu: %m\n"
+
+#: misc/uuidd.c:361
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:380
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:390
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:399
+#, 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:420
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:432
+#, fuzzy, c-format
+msgid "Invalid operation %d\n"
+msgstr "Ek özellik sürümü geçersiz.\n"
+
+#: misc/uuidd.c:476 misc/uuidd.c:498
+#, c-format
+msgid "Bad number: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:533 misc/uuidd.c:562
+#, fuzzy, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "/lost+found dizini oluşturulurken hata (%s): %m\n"
+
+#: misc/uuidd.c:543
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:547
+#, c-format
+msgid "List of UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:568
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr ""
+
+#: misc/uuidd.c:585
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:591
+#, 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:43
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]\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:65
+msgid "Extending the inode table"
+msgstr "Dosya indeksi tablosu genişletiliyor"
+
+#: resize/main.c:68
+msgid "Relocating blocks"
+msgstr "Bloklar yeniden konumlandırılıyor"
+
+#: resize/main.c:71
+msgid "Scanning inode table"
+msgstr "Dosya indeksi tablosu taranıyor"
+
+#: resize/main.c:74
+msgid "Updating inode references"
+msgstr "Dosya indeksi başvuruları güncelleniyor"
+
+#: resize/main.c:77
+msgid "Moving inode table"
+msgstr "Dosya indeksi tablosu taşınıyor"
+
+#: resize/main.c:80
+msgid "Unknown pass?!?"
+msgstr "bilinmeyen geçiş?!?"
+
+#: resize/main.c:83
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Geçiş %d başlıyor (en çok = %lu)\n"
+
+#: resize/main.c:154
+#, c-format
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested.  Proceed\n"
+"at your own risk!  Use the force option if you want to go ahead anyway.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:271
+#, c-format
+msgid "while opening %s"
+msgstr "%s açılırken"
+
+#: resize/main.c:279
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "%s için durum bilgisi alınırken"
+
+#: resize/main.c:337 resize/main.c:450
+#, 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:341
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr ""
+
+#: resize/main.c:377
+#, fuzzy, c-format
+msgid "Invalid new size: %s\n"
+msgstr "düğüm uzunluğu hatalı - %s"
+
+#: resize/main.c:393
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr ""
+
+#: resize/main.c:401
+#, 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:407
+msgid "Invalid stride length"
+msgstr ""
+
+#: resize/main.c:431
+#, 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:438
+#, fuzzy, c-format
+msgid ""
+"The filesystem is already %llu blocks long.  Nothing to do!\n"
+"\n"
+msgstr ""
+"Dosya sistemi zaten %u blok uzunlukta.  Hiçbir şey yapılmadı!\n"
+"\n"
+
+#: resize/main.c:455
+#, 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:464
+#, c-format
+msgid "while trying to resize %s"
+msgstr "- %s yeniden boyutlandırılırken hata oluştu"
+
+#: resize/main.c:467
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+
+#: resize/main.c:473
+#, fuzzy, c-format
+msgid ""
+"The filesystem on %s is now %llu blocks long.\n"
+"\n"
+msgstr ""
+"%s üzerindeki dosya sistemi şimdi %u blok uzunlukta.\n"
+"\n"
+
+#: resize/main.c:488
+#, fuzzy, c-format
+msgid "while trying to truncate %s"
+msgstr "- stat %s yapılmaya çalışılırken hata oluştu"
+
+#: resize/online.c:79
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+
+#: resize/online.c:83
+msgid "On-line shrinking not supported"
+msgstr ""
+
+#: resize/online.c:108
+#, fuzzy
+msgid "Filesystem does not support online resizing"
+msgstr "Dosyasistemi özellikleri 0 revizyonlu dosyasistemlerinde desteklenmiyor\n"
+
+#: resize/online.c:117
+#, fuzzy
+msgid "Not enough reserved gdt blocks for resizing"
+msgstr "- yeniden boyutlama için bloklar yedeklenirken hata oluştu"
+
+#: resize/online.c:124
+#, fuzzy
+msgid "Kernel does not support resizing a file system this large"
+msgstr "Hurd, dosya türü özelliğini desteklemez.\n"
+
+#: resize/online.c:132
+#, 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:137
+#, c-format
+msgid "Old resize interface requested.\n"
+msgstr ""
+
+#: resize/online.c:156 resize/online.c:173
+msgid "Permission denied to resize filesystem"
+msgstr ""
+
+#: resize/online.c:159 resize/online.c:179
+#, fuzzy
+msgid "While checking for on-line resizing support"
+msgstr "- yeniden boyutlama için bloklar yedeklenirken hata oluştu"
+
+#: resize/online.c:176
+#, fuzzy
+msgid "Kernel does not support online resizing"
+msgstr "Dış günlük bu dosya sistemini desteklemiyor\n"
+
+#: resize/online.c:209
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/online.c:219
+#, 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:273
+#, fuzzy, c-format
+msgid "While trying to add group #%d"
+msgstr "- %s açılmaya çalışılırken hata oluştu"
+
+#: resize/online.c:284
+#, 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:369
+#, c-format
+msgid "inodes (%llu) must be less than %u"
+msgstr ""
+
+#: resize/resize2fs.c:631
+msgid "reserved blocks"
+msgstr "yedek bloklar"
+
+#: resize/resize2fs.c:875
+msgid "meta-data blocks"
+msgstr "meta-veri blokları"
+
+#: resize/resize2fs.c:1837
+#, c-format
+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.42.8"
+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 an block bitmap"
+msgstr "blok biteşlemleri yazılıyor"
+
+#: lib/ext2fs/ext2_err.c:41
+#, fuzzy
+msgid "Can't read an 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: fsck 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
+msgid "MMP block checksum does not match MMP block"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr ""
+
+#: e2fsck/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr ""
+
+#: e2fsck/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr ""
+
+#: e2fsck/prof_err.c:13
+#, fuzzy
+msgid "Profile section not found"
+msgstr "- /lost+found dizini oluşturulurken hata oluştu"
+
+#: e2fsck/prof_err.c:14
+#, fuzzy
+msgid "Profile relation not found"
+msgstr "- /lost+found dizini oluşturulurken hata oluştu"
+
+#: e2fsck/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+
+#: e2fsck/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr ""
+
+#: e2fsck/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr ""
+
+#: e2fsck/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr ""
+
+#: e2fsck/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr ""
+
+#: e2fsck/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr ""
+
+#: e2fsck/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr ""
+
+#: e2fsck/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr ""
+
+#: e2fsck/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr ""
+
+#: e2fsck/prof_err.c:32
+#, fuzzy
+msgid "Invalid profile_section object"
+msgstr "Geçersiz dosya sistemi seçeneği: %s\n"
+
+#: e2fsck/prof_err.c:33
+msgid "No more sections"
+msgstr ""
+
+#: e2fsck/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr ""
+
+#: e2fsck/prof_err.c:35
+msgid "No profile file open"
+msgstr ""
+
+#: e2fsck/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:37
+#, fuzzy
+msgid "Couldn't open profile file"
+msgstr "Dosya kopyalanamadı: %m\n"
+
+#: e2fsck/prof_err.c:38
+msgid "Section already exists"
+msgstr ""
+
+#: e2fsck/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr ""
+
+#: e2fsck/prof_err.c:40
+msgid "Invalid integer value"
+msgstr ""
+
+#: e2fsck/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr ""
+
+#~ 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 ext2fs_block_iterate"
+#~ msgstr "ext2fs_block_iterate işlevi çağrılırken hata oluştu"
+
+#~ msgid "while calling iterator function"
+#~ msgstr "- yineleme işlevi çağrılırken hata oluştu"
+
+#~ msgid "while allocating inode buffer"
+#~ msgstr "- düğüm tampon belleği ayrılırken hata oluştu"
+
+#~ msgid "while reading inode table (group %d)"
+#~ msgstr "- düğüm tablosu okunurken hata oluştu (grup %d)"
+
+#~ msgid "while writing inode table (group %d)"
+#~ msgstr "- düğüm tablosu yazılırken hata oluştu (grup %d)"
+
+#~ 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 "%s is mounted.  "
+#~ msgstr "%s bağlandı.  "
+
+#~ 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 "%s: Filesystem byte order already normalized.\n"
+#~ msgstr "%s Dosya sisteminde baytlar zaten normal.\n"
+
+#~ msgid "while retrying to write block bitmaps for %s"
+#~ msgstr "- %s için blok biteşlemlerinin yazılması yinelenirken hata oluştu"
+
+#~ msgid "bad block size - %s"
+#~ msgstr "blok uzunluğu hatalı - %s"
+
+#~ 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 ""
+#~ "%s is mounted; can't resize a mounted filesystem!\n"
+#~ "\n"
+#~ msgstr "%s bağlı; bağlı bir dosya sistemi yeniden boyutlandırılamaz!\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 ""
+#~ "Extended options are separated by commas, and may take an argument which\n"
+#~ "is set off by an equals ('=') sign.  Valid raid options are:\n"
+#~ "\tea_ver=<ea_version (1 or 2)\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"
+
+#~ msgid "Usage:  findsuper device [skipbytes [startkb]]\n"
+#~ msgstr "Kullanımı:  findsuper aygıt [atlanacak_baytlar [başlangıç_kb]]\n"
+
+#~ msgid "skipbytes should be a number, not %s\n"
+#~ msgstr "atlanacak_baytlar bir sayı olmalı, %s değil\n"
+
+#~ msgid "skipbytes must be a multiple of the sector size\n"
+#~ msgstr "atlanacak_baytlar sektör boyunun katları olmalı\n"
+
+#~ msgid "startkb should be a number, not %s\n"
+#~ msgstr "başlangıç_kb bir sayı olmalı, %s değil\n"
+
+#~ msgid "startkb should be positive, not %Ld\n"
+#~ msgstr "başlangıç_kb poritif olmalı, %Ld değil\n"
+
+#~ msgid "starting at %Ld, with %d byte increments\n"
+#~ msgstr "%Ld de başlayıp %d bayt arttırımla\n"
+
+#~ msgid "       thisoff     block fs_blk_sz  blksz grp last_mount\n"
+#~ msgstr "       thisoff     blok ds_blok_boyu  blokboyu grup son_bağlama\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "%14Ld: finished with errno %d\n"
+#~ msgstr ""
+#~ "\n"
+#~ "%14Ld: %d hatası ile bitti\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 "resize2fs %s (%s)\n"
+#~ msgstr "resize2fs %s (%s)\n"
+
+#~ 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/e2fsprogs/po/vi.gmo b/e2fsprogs/po/vi.gmo
new file mode 100644
index 0000000..cf67ae1
--- /dev/null
+++ b/e2fsprogs/po/vi.gmo
Binary files differ
diff --git a/e2fsprogs/po/vi.po b/e2fsprogs/po/vi.po
new file mode 100644
index 0000000..383ccb3
--- /dev/null
+++ b/e2fsprogs/po/vi.po
@@ -0,0 +1,6695 @@
+# Vietnamese translation for e2fsprogs.
+# Copyright © 2013 Theodore Tso (msgids)
+# Copyright © 2013 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-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).
+#.  
+#. 	%b	<blk>			block number
+#. 	%B	<blkcount>		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_dir_acl
+#. 	%Iu	<inode> -> i_uid
+#. 	%Ig	<inode> -> i_gid
+#. 	%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: 2013-06-16 08:17-0400\n"
+"PO-Revision-Date: 2013-07-31 14:26+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"
+"Team-Website: <http://translationproject.org/team/vi.html>\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 1.5.5\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:180
+#, 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/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:1332 e2fsck/unix.c:1420 misc/badblocks.c:1214
+#: misc/badblocks.c:1222 misc/badblocks.c:1236 misc/badblocks.c:1248
+#: misc/dumpe2fs.c:588 misc/e2image.c:1196 misc/e2image.c:1324
+#: misc/e2image.c:1337 misc/mke2fs.c:196 misc/tune2fs.c:1907 resize/main.c:315
+#, c-format
+msgid "while trying to open %s"
+msgstr "trong khi thử mở %s"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "trong khi thử mở popen “%s”"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:203
+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:131
+#, 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 cấm %u trong nút thông tin khối hỏng nên bị xoá.\n"
+
+#: 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:61 e2fsck/ehandler.c:110
+msgid "Ignore error"
+msgstr "Bỏ qua lỗi"
+
+#: e2fsck/ehandler.c:62
+msgid "Force rewrite"
+msgstr "Ép buộc ghi lại"
+
+#: e2fsck/ehandler.c:104
+#, 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:107
+#, 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 "Không cho phép số khối đó!\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/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 KĐN] thiết_bị\n"
+"\n"
+"[KĐN: các khối đệm nút thông tin]\n"
+"\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:961
+#, 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:967 resize/main.c:288
+#, c-format
+msgid "while trying to flush %s"
+msgstr "trong khi cố đẩy dữ liệu %s lên đĩa"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1091
+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:1109
+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:522
+msgid "reading journal superblock\n"
+msgstr "đang đọc siêu khối nhật ký\n"
+
+#: e2fsck/journal.c:579
+#, 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:588
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: nhật ký quá ngắn\n"
+
+#: e2fsck/journal.c:880
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: đang phục hồi nhật ký\n"
+
+#: e2fsck/journal.c:882
+#, 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 có tình trạng chỉ đọc\n"
+
+#: e2fsck/journal.c:909
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "trong khi thử mở lại %s"
+
+#: e2fsck/message.c:113
+msgid "aextended attribute"
+msgstr "athuộc tính đã mở rộng"
+
+#: e2fsck/message.c:114
+msgid "Aerror allocating"
+msgstr "Agặp lỗi khi cấp phát"
+
+#: e2fsck/message.c:115
+msgid "bblock"
+msgstr "bkhối"
+
+#: e2fsck/message.c:116
+msgid "Bbitmap"
+msgstr "Bmảng ảnh"
+
+#: e2fsck/message.c:117
+msgid "ccompress"
+msgstr "cnén"
+
+#: e2fsck/message.c:118
+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:119
+msgid "iinode"
+msgstr "inút thông tin"
+
+#: e2fsck/message.c:120
+msgid "Iillegal"
+msgstr "Icấm"
+
+#: e2fsck/message.c:121
+msgid "jjournal"
+msgstr "jnhật ký"
+
+#: e2fsck/message.c:122
+msgid "Ddeleted"
+msgstr "Dbị xoá"
+
+#: e2fsck/message.c:123
+msgid "ddirectory"
+msgstr "dthư mục"
+
+#: 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 "llost+found"
+msgstr "lmất+tìm"
+
+#: e2fsck/message.c:131
+msgid "Lis a link"
+msgstr "Llà liên kết"
+
+#: e2fsck/message.c:132
+msgid "mmultiply-claimed"
+msgstr "mđa tuyên bố"
+
+#: e2fsck/message.c:133
+msgid "ninvalid"
+msgstr "nkhông hợp lệ"
+
+#: e2fsck/message.c:134
+msgid "oorphaned"
+msgstr "othừa"
+
+#: e2fsck/message.c:135
+msgid "pproblem in"
+msgstr "pvấn đề trong"
+
+#: e2fsck/message.c:136
+msgid "qquota"
+msgstr "qhạn nghạch"
+
+#: e2fsck/message.c:137
+msgid "rroot @i"
+msgstr "r@i gốc"
+
+#: e2fsck/message.c:138
+msgid "sshould be"
+msgstr "snên là"
+
+#: e2fsck/message.c:139
+msgid "Ssuper@b"
+msgstr "Ssiêu@b"
+
+#: e2fsck/message.c:140
+msgid "uunattached"
+msgstr "uchưa-cố-định"
+
+#: e2fsck/message.c:141
+msgid "vdevice"
+msgstr "vthiết-bị"
+
+#: e2fsck/message.c:142
+msgid "xextent"
+msgstr "xmở-rộng"
+
+#: e2fsck/message.c:143
+msgid "zzero-length"
+msgstr "zdài bằng không"
+
+#: e2fsck/message.c:154
+msgid "<The NULL inode>"
+msgstr "<nút thông tin vô giá trị>"
+
+#: e2fsck/message.c:155
+msgid "<The bad blocks inode>"
+msgstr "<Nút thông tin khối hỏng>"
+
+#: e2fsck/message.c:157
+msgid "<The user quota inode>"
+msgstr "<Nút hạn ngạch người dùng>"
+
+#: e2fsck/message.c:158
+msgid "<The group quota inode>"
+msgstr "<Nút hạn ngạch nhóm>"
+
+#: e2fsck/message.c:159
+msgid "<The boot loader inode>"
+msgstr "<nút thông tin bộ nạp khởi động>"
+
+#: e2fsck/message.c:160
+msgid "<The undelete directory inode>"
+msgstr "<nút thông tin hủy xoá thư mục>"
+
+#: e2fsck/message.c:161
+msgid "<The group descriptor inode>"
+msgstr "<nút thông tin mô tả nhóm>"
+
+#: e2fsck/message.c:162
+msgid "<The journal inode>"
+msgstr "<nút thông tin nhật ký>"
+
+#: e2fsck/message.c:163
+msgid "<Reserved inode 9>"
+msgstr "<nút thông tin được dành riêng 9>"
+
+#: e2fsck/message.c:164
+msgid "<Reserved inode 10>"
+msgstr "<nút thông tin được dành riêng 10>"
+
+#: e2fsck/message.c:333
+msgid "regular file"
+msgstr "tập tin thường"
+
+#: e2fsck/message.c:335
+msgid "directory"
+msgstr "thư mục"
+
+#: e2fsck/message.c:337
+msgid "character device"
+msgstr "thiết bị ký tự"
+
+#: e2fsck/message.c:339
+msgid "block device"
+msgstr "thiết bị khối"
+
+#: e2fsck/message.c:341
+msgid "named pipe"
+msgstr "ống dẫn có tên"
+
+#: e2fsck/message.c:343
+msgid "symbolic link"
+msgstr "liên kết tượng trưng"
+
+#: e2fsck/message.c:345 misc/uuidd.c:161
+msgid "socket"
+msgstr "ổ cắm"
+
+#: e2fsck/message.c:347
+#, 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:422
+msgid "indirect block"
+msgstr "khối gián tiếp"
+
+#: e2fsck/message.c:424
+msgid "double indirect block"
+msgstr "khối gián tiếp đôi"
+
+#: e2fsck/message.c:426
+msgid "triple indirect block"
+msgstr "khối gián tiếp gấp ba"
+
+#: e2fsck/message.c:428
+msgid "translator block"
+msgstr "khối dịch"
+
+#: e2fsck/message.c:430
+msgid "block #"
+msgstr "khối #"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr "ánh xạ nút thông tin đa tuyên bố"
+
+#: e2fsck/pass1b.c:610 e2fsck/pass1b.c:730
+#, 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:821
+msgid "returned from clone_file_block"
+msgstr "đã trả lại từ khối tập tin nhái (clone_file_block)"
+
+#: e2fsck/pass1b.c:843
+#, 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:855
+#, 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:475 e2fsck/pass2.c:782
+msgid "reading directory block"
+msgstr "đang đọc khối thư mục"
+
+#: e2fsck/pass1.c:598
+msgid "in-use inode map"
+msgstr "ánh xạ nút thông tin đang được dùng"
+
+#: e2fsck/pass1.c:609
+msgid "directory inode map"
+msgstr "ánh xạ nút thông tin thư mục"
+
+#: e2fsck/pass1.c:619
+msgid "regular file inode map"
+msgstr "ánh xạ nút thông tin tập tin chuẩn"
+
+#: e2fsck/pass1.c:628
+msgid "in-use block map"
+msgstr "ánh xạ khối đang được dùng"
+
+#: e2fsck/pass1.c:695
+msgid "opening inode scan"
+msgstr "đang mở bản quét nút thông tin"
+
+#: e2fsck/pass1.c:729
+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:1239
+msgid "Pass 1"
+msgstr "Lần 1"
+
+#: e2fsck/pass1.c:1296
+#, 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:1346
+msgid "bad inode map"
+msgstr "ánh xạ nút thông tin sai"
+
+#: e2fsck/pass1.c:1369
+msgid "inode in bad block map"
+msgstr "nút thông tin trong ánh xạ khối sai"
+
+#: e2fsck/pass1.c:1389
+msgid "imagic inode map"
+msgstr "ánh xạ nút thông tin ma thuật imagic"
+
+#: e2fsck/pass1.c:1416
+msgid "multiply claimed block map"
+msgstr "ánh xạ khối đa tuyên bố"
+
+#: e2fsck/pass1.c:1527
+msgid "ext attr block map"
+msgstr "ánh xạ khối ext attr (thuộc tính thêm?)"
+
+#: e2fsck/pass1.c:2299
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr "%6lu (%c): mong đợi %6lu còn nhận %6lu vật lý (đếm khối %lld)\n"
+
+#: e2fsck/pass1.c:2660
+msgid "block bitmap"
+msgstr "mảng ảnh khối"
+
+#: e2fsck/pass1.c:2666
+msgid "inode bitmap"
+msgstr "mảng ảnh nút thông tin"
+
+#: e2fsck/pass1.c:2672
+msgid "inode table"
+msgstr "bảng nút thông tin"
+
+#: e2fsck/pass2.c:283
+msgid "Pass 2"
+msgstr "Lần 2"
+
+#: e2fsck/pass2.c:805
+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:136
+msgid "Pass 3"
+msgstr "Lần 3"
+
+#: e2fsck/pass3.c:322
+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:196
+msgid "Pass 4"
+msgstr "Lần 4"
+
+#: e2fsck/pass5.c:74
+msgid "Pass 5"
+msgstr "Lần 5"
+
+#: e2fsck/problem.c:51
+msgid "(no prompt)"
+msgstr "(không nhắc)"
+
+#: e2fsck/problem.c:52
+msgid "Fix"
+msgstr "Sửa chữa"
+
+#: e2fsck/problem.c:53
+msgid "Clear"
+msgstr "Xoá sạch"
+
+#: e2fsck/problem.c:54
+msgid "Relocate"
+msgstr "Định vị lại"
+
+#: e2fsck/problem.c:55
+msgid "Allocate"
+msgstr "Cấp phát"
+
+#: e2fsck/problem.c:56
+msgid "Expand"
+msgstr "Mở rộng"
+
+#: e2fsck/problem.c:57
+msgid "Connect to /lost+found"
+msgstr "Kết nối đến /mất+tìm"
+
+#: e2fsck/problem.c:58
+msgid "Create"
+msgstr "Tạo"
+
+#: e2fsck/problem.c:59
+msgid "Salvage"
+msgstr "Cứu vớt"
+
+#: e2fsck/problem.c:60
+msgid "Truncate"
+msgstr "Cắt ngắn"
+
+#: e2fsck/problem.c:61
+msgid "Clear inode"
+msgstr "Xoá sạch nút thông tin"
+
+#: e2fsck/problem.c:62
+msgid "Abort"
+msgstr "Hủy bỏ"
+
+#: e2fsck/problem.c:63
+msgid "Split"
+msgstr "Chia tách"
+
+#: e2fsck/problem.c:64
+msgid "Continue"
+msgstr "Tiếp tục"
+
+#: e2fsck/problem.c:65
+msgid "Clone multiply-claimed blocks"
+msgstr "Nhái theo các khối đa tuyên bố"
+
+#: e2fsck/problem.c:66
+msgid "Delete file"
+msgstr "Xoá tập tin"
+
+#: e2fsck/problem.c:67
+msgid "Suppress messages"
+msgstr "Thu hồi thông điệp"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "Bỏ liên kết"
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "Xoá sạch chỉ mục hHTREE"
+
+#: e2fsck/problem.c:70
+msgid "Recreate"
+msgstr "Tạo lại"
+
+#: e2fsck/problem.c:79
+msgid "(NONE)"
+msgstr "(KHÔNG)"
+
+#: e2fsck/problem.c:80
+msgid "FIXED"
+msgstr "ĐÃ SỬA CHỮA"
+
+#: e2fsck/problem.c:81
+msgid "CLEARED"
+msgstr "ĐÃ XOÁ SẠCH"
+
+#: e2fsck/problem.c:82
+msgid "RELOCATED"
+msgstr "ĐÃ ĐỊNH VỊ LẠI"
+
+#: e2fsck/problem.c:83
+msgid "ALLOCATED"
+msgstr "ĐÃ CẤP PHÁT"
+
+#: e2fsck/problem.c:84
+msgid "EXPANDED"
+msgstr "ĐÃ MỞ RỘNG"
+
+#: e2fsck/problem.c:85
+msgid "RECONNECTED"
+msgstr "ĐÃ KẾT NỐI LẠI"
+
+#: e2fsck/problem.c:86
+msgid "CREATED"
+msgstr "ĐÃ TẠO"
+
+#: e2fsck/problem.c:87
+msgid "SALVAGED"
+msgstr "ĐÃ CỨU VỚT"
+
+#: e2fsck/problem.c:88
+msgid "TRUNCATED"
+msgstr "ĐÃ CẮT NGẮN"
+
+#: e2fsck/problem.c:89
+msgid "INODE CLEARED"
+msgstr "NÚT THÔNG TIN ĐÃ XOÁ SẠCH"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "BỊ HỦY BỎ"
+
+#: e2fsck/problem.c:91
+msgid "SPLIT"
+msgstr "ĐÃ CHIA TÁCH"
+
+#: e2fsck/problem.c:92
+msgid "CONTINUING"
+msgstr "ĐANG TIẾP TỤC"
+
+#: e2fsck/problem.c:93
+msgid "MULTIPLY-CLAIMED BLOCKS CLONED"
+msgstr "CÁC KHỐI ĐA TUYÊN BỐ ĐÃ ĐƯỢC NHÁI"
+
+#: e2fsck/problem.c:94
+msgid "FILE DELETED"
+msgstr "TẬP TIN ĐÃ BỊ XÓA"
+
+#: e2fsck/problem.c:95
+msgid "SUPPRESSED"
+msgstr "BỊ THU HỒI"
+
+#: e2fsck/problem.c:96
+msgid "UNLINKED"
+msgstr "BỊ BỎ LIÊN KẾT"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "CHỈ MỤC HCÂY ĐÃ ĐƯỢC XOÁ SẠCH"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "SẼ TẠO LẠI"
+
+#. @-expanded: block bitmap for group %g is not in group.  (block %b)\n
+#: e2fsck/problem.c:107
+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:111
+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:116
+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 correct ext2\n
+#. @-expanded: filesystem.  If the device is valid and it really contains an ext2\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 %S <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:122
+#, c-format
+msgid ""
+"\n"
+"The @S could not be read or does not describe a correct ext2\n"
+"@f.  If the @v is valid and it really contains an ext2\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 %S <@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ệ và thật chứa @f ext2 (không phải vùng trao đổi hay gì khác)\n"
+"thì @S bị hỏng: đề nghị bạn thử chạy e2fsck với @S xen kẽ:\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:131
+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:138
+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:145
+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:150
+msgid "@S first_data_@b = %b, should have been %c\n"
+msgstr "@S @b dữ liệu thứ nhất = %b, còn nên là %c\n"
+
+#. @-expanded: filesystem did not have a UUID; generating one.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:155
+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:160
+#, 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:169
+msgid "Corruption found in @S.  (%s = %N).\n"
+msgstr "Tìm sự bị hỏng trong @S.  (%s = %N).\n"
+
+#. @-expanded: Error determining size of the physical device: %m\n
+#: e2fsck/problem.c:174
+#, 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:179
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "Số đếm @i trong @S là %i, @s %j.\n"
+
+#: e2fsck/problem.c:183
+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:188
+#, 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:193
+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:198
+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:203
+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:208
+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:213
+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:221
+msgid "@j @S is corrupt.\n"
+msgstr "@S @j bị hỏng.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal %s is present.\n
+#: e2fsck/problem.c:226
+#, c-format
+msgid "@S has_@j flag is clear, but a @j %s is present.\n"
+msgstr "Cờ @S has_@j vẫn tốt, mà cũng có một @j %s.\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:231
+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.\n"
+
+#. @-expanded: superblock needs_recovery flag is clear, but journal has data.\n
+#: e2fsck/problem.c:236
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "Cờ @S needs_recovery vẫn tốt, còn @j có dữ liệu.\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:241
+msgid "Clear @j"
+msgstr "Xoá sạch @j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.  
+#: e2fsck/problem.c:246 e2fsck/problem.c:695
+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:251
+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:256
+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:261
+msgid "Already cleared %B (%b) found in @o @i %i.\n"
+msgstr "Đã xoá sạch %B (%b) được tìm trong @i @o %i.\n"
+
+#. @-expanded: illegal orphaned inode %i in superblock.\n
+#: e2fsck/problem.c:266
+#, 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:271
+#, 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:276
+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:281
+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:286
+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:291
+#, c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+"Đang di chuyển @j từ /%s sang @i bị ẩn.\n"
+"\n"
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:296
+#, 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:301
+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 xoá sạch các trường nằm ở bên kia @S @j pb1...\n"
+"\n"
+
+#. @-expanded: Run journal anyway
+#: e2fsck/problem.c:307
+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:312
+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:317
+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:322
+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:328
+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:333
+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:338
+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:343
+msgid ""
+"@S last write time (%t,\n"
+"\tnow = %T) is in the future.\n"
+msgstr "Giờ ghi nhớ @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:347
+#, 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:352
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+"Đang thêm mẹo dirhash vào @f.\n"
+"\n"
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.  
+#: e2fsck/problem.c:357
+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:362
+#, 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:367
+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:372
+msgid "Last @g @b @B uninitialized.  "
+msgstr "Chưa khởi tạo @B @b @g cuối cùng.  "
+
+#: e2fsck/problem.c:377
+#, 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:381
+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)  
+#: e2fsck/problem.c:386
+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)  "
+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ị sai lập)."
+
+#. @-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).  
+#: e2fsck/problem.c:392
+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).  "
+msgstr ""
+"Giờ ghi nhớ @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ị sai lập)."
+
+#. @-expanded: One or more block group descriptor checksums are invalid.  
+#: e2fsck/problem.c:398
+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:403
+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:408
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr "Đang đặt số lượng @bs thành %c (là %b)\n"
+
+#. @-expanded: Making quota inode %i (%Q) hidden.\n
+#: e2fsck/problem.c:413
+msgid "Making @q @i %i (%Q) hidden.\n"
+msgstr "Làm cho @q @is %i (%Q) ẩn đi.\n"
+
+#. @-expanded: superblock has invalid MMP block.  
+#: e2fsck/problem.c:418
+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:423
+msgid "@S has invalid MMP magic.  "
+msgstr "@S có số màu nhiệm MMP không hợp lệ."
+
+#: e2fsck/problem.c:428
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr "ext2fs_open2: %m\n"
+
+#: e2fsck/problem.c:433
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr "ext2fs_check_desc: %m\n"
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:440
+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:444
+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:449
+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:454
+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:459
+#, 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:464
+#, 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:469
+#, 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:474
+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:479
+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:484
+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:489
+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:494
+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:499
+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:504
+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:509
+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:514
+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:519
+#, 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:524
+#, 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:529
+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:534
+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:539
+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:544
+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:549
+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:556
+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:561
+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:567
+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:572
+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:578
+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:583
+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:589
+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:595
+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:600
+#, 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:605
+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:610
+#, c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "Đang định vị lại %2$s của @g %1$g sang %3$c...\n"
+
+#. @-expanded: Warning: could not read block %b of %s: %m\n
+#: e2fsck/problem.c:615
+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:620
+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:625 e2fsck/problem.c:1474
+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:630
+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:635
+#, 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:640
+#, 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:645
+#, 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:650
+#, 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:655
+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:660
+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:666
+#, 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:674
+#, 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:679
+#, 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 tượng trưng) đặc biệt\n"
+"(@i %i) đặt cờ không thay đổi (immutable) hay\n"
+"chỉ phu thêm (append-only)."
+
+#. @-expanded: inode %i has compression flag set on filesystem without compression support.  
+#: e2fsck/problem.c:685
+#, c-format
+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."
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.  
+#: e2fsck/problem.c:690
+#, 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:700
+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:705
+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:710
+#, 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:716
+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:721
+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:726
+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:731
+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:736
+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:741
+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:746
+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:751
+msgid "@a @b %b has h_@bs > 1.  "
+msgstr "@b @a %b có h_@b > 1.  "
+
+#. @-expanded: error allocating extended attribute block %b.  
+#: e2fsck/problem.c:756
+msgid "@A @a @b %b.  "
+msgstr "@A @b @a %b.  "
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).  
+#: e2fsck/problem.c:761
+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:766
+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:771
+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:776
+#, c-format
+msgid "@i %i is too big.  "
+msgstr "@i %i quá lớn.     "
+
+#. @-expanded: %B (%b) causes directory to be too big.  
+#: e2fsck/problem.c:780
+msgid "%B (%b) causes @d to be too big.  "
+msgstr "%B (%b) gây ra @d quá lớn.        "
+
+#: e2fsck/problem.c:785
+msgid "%B (%b) causes file to be too big.  "
+msgstr "%B (%b) gây ra tập tin quá lớn.     "
+
+#: e2fsck/problem.c:790
+msgid "%B (%b) causes symlink to be too big.  "
+msgstr "%B (%b) làm cho liên kết tượng trưng quá lớn."
+
+#. @-expanded: inode %i has INDEX_FL flag set on filesystem without htree support.\n
+#: e2fsck/problem.c:795
+#, 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:800
+#, 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:805
+#, 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:810
+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:815
+#, 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:820
+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:825
+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:831
+#, 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:836
+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:841
+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:846
+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:851
+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:856
+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:861
+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:866
+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:871
+#, 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:876
+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:882
+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 hợp lý %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:887
+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 hợp lý %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:892
+#, 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:897
+#, 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:902
+#, 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:907
+#, c-format
+msgid "Fast symlink %i has EXTENT_FL set.  "
+msgstr "Liên kết tượng trưng 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:912
+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 hợp lý %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:916
+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:921
+#, 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 regular file.  
+#: e2fsck/problem.c:926
+msgid "@q @i is not 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:931
+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:936
+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:941
+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:946
+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: 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:953
+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:959
+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: \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:967
+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:973
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr "@b @m trong @i %i:"
+
+#: e2fsck/problem.c:988
+#, 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:993
+#, 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:998
+#, 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:1003 e2fsck/problem.c:1318
+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:1008
+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:1014
+msgid "Pass 1D: Reconciling @m @bs\n"
+msgstr "Lần qua 1D: đang điều hoà 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:1019
+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:1025
+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:1030
+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:1035
+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:1040
+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:1053
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Không thể nhái theo tập tin: %m\n"
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1059
+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:1064
+#, 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:1069
+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:1074
+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:1079
+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:1084
+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:1089
+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:1094
+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:1099
+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:1104
+#, 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:1109
+#, 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:1114
+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:1119
+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:1124
+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:1129
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "i_file_acl @F %If, @s số không.\n"
+
+#. @-expanded: i_dir_acl for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1134
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr "i_dir_acl @F %Id, @s số không.\n"
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1139
+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:1144
+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:1149
+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:1154
+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:1159
+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:1164
+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:1169
+#, 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:1174
+#, 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:1179
+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:1184
+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:1189
+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:1194
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E là @e “..” trùng.\n"
+
+#: e2fsck/problem.c:1199 e2fsck/problem.c:1499
+#, 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:1204
+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:1209
+#, 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:1214
+#, 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:1219
+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:1224
+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:1229
+#, 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:1234
+#, 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:1239
+#, 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:1244
+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:1249
+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:1254
+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:1259
+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:1264
+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:1269
+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:1274
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr "Liên kết tượng trưng %Q (@i #%i) @n.\n"
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1279
+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:1284
+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:1289
+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:1294
+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:1299
+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:1304
+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:1309
+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:1313
+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:1323
+#, 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:1328
+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:1333
+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:1338
+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:1343
+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:1348
+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:1353
+#, 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:1358
+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:1363
+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:1368
+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:1372
+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:1377
+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:1382
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr "i_file_acl_hi @F %N, @s số không.\n"
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1389
+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:1394
+msgid "@r not allocated.  "
+msgstr "Chưa cấp phát @r.  "
+
+#. @-expanded: No room in lost+found directory.  
+#: e2fsck/problem.c:1399
+msgid "No room in @l @d.  "
+msgstr "Không có chỗ còn rảnh trong @d @l.  "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1404
+#, 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:1409
+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:1414
+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:1419
+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:1424
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "Không thể mở rộng /@l: %m\n"
+
+#: e2fsck/problem.c:1429
+#, 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:1434
+#, c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "Gặp lỗi khi thử tìm /@l: %m\n"
+
+#. @-expanded: ext2fs_new_block: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1439
+#, c-format
+msgid "ext2fs_new_@b: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@b: %m trong khi thử tạo @d /@l\n"
+
+#. @-expanded: ext2fs_new_inode: %m while trying to create /lost+found directory\n
+#: e2fsck/problem.c:1444
+#, c-format
+msgid "ext2fs_new_@i: %m while trying to create /@l @d\n"
+msgstr "ext2fs_new_@i: %m trong khi thử tạo @d /@l\n"
+
+#. @-expanded: ext2fs_new_dir_block: %m while creating new directory block\n
+#: e2fsck/problem.c:1449
+#, c-format
+msgid "ext2fs_new_dir_@b: %m while creating new @d @b\n"
+msgstr "ext2fs_new_dir_@b: %m trong khi thử 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:1454
+#, 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:1459
+#, 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:1464
+#, 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:1469
+#, 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:1479
+#, 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:1484
+#, 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:1489
+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:1494
+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:1504
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr "/@l không phải @d (ino=%i)\n"
+
+#: e2fsck/problem.c:1511
+msgid "Pass 3A: Optimizing directories\n"
+msgstr "Lần qua 3A: đang tối ưu hoá các thư mục\n"
+
+#: e2fsck/problem.c:1516
+#, 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:1521
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr "Lỗi tối ưu hoá thư mục %q (%d): %m\n"
+
+#: e2fsck/problem.c:1526
+msgid "Optimizing directories: "
+msgstr "Đang tối ưu hoá các thư mục: "
+
+#: e2fsck/problem.c:1543
+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:1548
+#, c-format
+msgid "@u @z @i %i.  "
+msgstr "@i @u @z %i.  "
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1553
+#, 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:1558
+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:1562
+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 NAO Đ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: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1572
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Lần qua 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:1577
+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:1582
+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:1587
+msgid "@b @B differences: "
+msgstr "Hiệu @B @b:"
+
+#. @-expanded: inode bitmap differences: 
+#: e2fsck/problem.c:1607
+msgid "@i @B differences: "
+msgstr "Hiệu @B @i:"
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1627
+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:1632
+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:1637
+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:1642
+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:1647
+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:1652
+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:1658
+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:1663
+#, 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:1668
+#, 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:1693
+#, 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:1698
+#, 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: Recreate journal
+#: e2fsck/problem.c:1705
+msgid "Recreate @j"
+msgstr "Tạo lại @j"
+
+#: e2fsck/problem.c:1710
+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"
+
+#: e2fsck/problem.c:1829
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr "Mã lỗi chưa quản lý (0x%x)!\n"
+
+#: e2fsck/problem.c:1954 e2fsck/problem.c:1958
+msgid "IGNORED"
+msgstr "BỊ BỎ QUA"
+
+#: 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:188
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr "trong khi gọi hàm lặp lại khối “ext2fs_block_iterate” cho nút thông tin %d"
+
+#: e2fsck/super.c:211
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %d"
+msgstr "trong khi gọi hàm “ext2fs_adjust_ea_refcount” cho nút thông tin %d"
+
+#: e2fsck/super.c:272
+msgid "Truncating"
+msgstr "Đang cắt ngắn"
+
+#: e2fsck/super.c:273
+msgid "Clearing"
+msgstr "Đang xoá sạch"
+
+#: e2fsck/unix.c:74
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfvtDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] device\n"
+msgstr ""
+"Cách dùng: %s [-panyrcdfvtDFV] [-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] thiết_bị\n"
+
+#: e2fsck/unix.c:80
+#, c-format
+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:86
+#, c-format
+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"
+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"
+
+#: e2fsck/unix.c:131
+#, 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:157
+#, 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:161
+#, 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 kề nhau (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:166
+#, 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:171
+#, 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:179
+msgid "             Extent depth histogram: "
+msgstr "             Đồ thị độ sâu: "
+
+#: e2fsck/unix.c:188
+#, 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:192
+#, c-format
+msgid "%12u bad block\n"
+msgid_plural "%12u bad blocks\n"
+msgstr[0] "%12u khối hỏng\n"
+
+#: e2fsck/unix.c:194
+#, 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:196
+#, 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:198
+#, c-format
+msgid "%12u directory\n"
+msgid_plural "%12u directories\n"
+msgstr[0] "%12u thư mục\n"
+
+#: e2fsck/unix.c:200
+#, 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:203
+#, 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:205
+#, c-format
+msgid "%12u fifo\n"
+msgid_plural "%12u fifos\n"
+msgstr[0] "%12u fifo\n"
+
+#: e2fsck/unix.c:207
+#, c-format
+msgid "%12u link\n"
+msgid_plural "%12u links\n"
+msgstr[0] "%12u liên kết\n"
+
+#: e2fsck/unix.c:209
+#, c-format
+msgid "%12u symbolic link"
+msgid_plural "%12u symbolic links"
+msgstr[0] "%12u liên kết tượng trưng"
+
+#: e2fsck/unix.c:211
+#, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] " (%u liên kết tượng trưng nhanh)\n"
+
+#: e2fsck/unix.c:215
+#, c-format
+msgid "%12u socket\n"
+msgid_plural "%12u sockets\n"
+msgstr[0] "%12u socket\n"
+
+#: e2fsck/unix.c:219
+#, c-format
+msgid "%12u file\n"
+msgid_plural "%12u files\n"
+msgstr[0] "%12u tập tin\n"
+
+#: e2fsck/unix.c:232 misc/badblocks.c:983 misc/tune2fs.c:1985 misc/util.c:147
+#: resize/main.c:259
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr "trong khi quyết định nếu %s đã gắn kết chưa."
+
+#: e2fsck/unix.c:252
+#, c-format
+msgid "Warning!  %s is %s.\n"
+msgstr "Cảnh báo!  %s là %s.\n"
+
+#: e2fsck/unix.c:259
+#, c-format
+msgid "%s is %s.\n"
+msgstr "%s là %s.\n"
+
+#: e2fsck/unix.c:262
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Không thể tiếp tục nên hủy bỏ.\n"
+"\n"
+
+#: e2fsck/unix.c:264
+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:269
+msgid "Do you really want to continue"
+msgstr "Bạn thực sự muốn tiếp tục"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid "check aborted.\n"
+msgstr "kiểm tra bị hủy bỏ.\n"
+
+#: e2fsck/unix.c:361
+msgid " contains a file system with errors"
+msgstr " chứa hệ thống tập tin có lỗi"
+
+#: e2fsck/unix.c:363
+msgid " was not cleanly unmounted"
+msgstr " chưa tháo gắn kết sạch"
+
+#: e2fsck/unix.c:365
+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:369
+#, 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:376
+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:382
+#, 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:391
+msgid ", check forced.\n"
+msgstr ", kiểm tra bị ép buộc.\n"
+
+#: e2fsck/unix.c:424
+#, 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:443
+msgid " (check deferred; on battery)"
+msgstr " (kiểm tra bị hoãn; chạy bằng pin)"
+
+#: e2fsck/unix.c:446
+msgid " (check after next mount)"
+msgstr " (kiểm tra sau lần kế tiếp gắn kết)"
+
+#: e2fsck/unix.c:448
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr " (kiểm tra sau %ld lần gắn kết)"
+
+#: e2fsck/unix.c:598
+#, 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:667
+#, c-format
+msgid "Invalid EA version.\n"
+msgstr "Phiên bản EA không hợp lệ.\n"
+
+#: e2fsck/unix.c:694
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr "Tùy chọn đã mở rộng lạ: %s\n"
+
+#: e2fsck/unix.c:719
+#, 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:788
+#, 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:792
+msgid "Invalid completion information file descriptor"
+msgstr "Mô tả tập tin thông tin hoà chỉnh không hợp lệ"
+
+#: e2fsck/unix.c:807
+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:828
+#, 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:859 e2fsck/unix.c:931 misc/tune2fs.c:811 misc/tune2fs.c:1100
+#: misc/tune2fs.c:1118
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr "Không thể quyết định “%s”"
+
+#: e2fsck/unix.c:910
+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:915
+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:920
+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:974
+#, c-format
+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:1022
+#, 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:1031
+#, 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:1120
+#, 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:1137 e2fsck/unix.c:1142
+msgid "while checking MMP block"
+msgstr "trong khi kiểm tra khối MMP"
+
+#: e2fsck/unix.c:1144 misc/tune2fs.c:1912
+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"
+
+#: e2fsck/unix.c:1194
+#, c-format
+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:1202
+msgid "while trying to initialize program"
+msgstr "trong khi cố khởi tạo chương trình"
+
+#: e2fsck/unix.c:1225
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\tDùng %s, %s\n"
+
+#: e2fsck/unix.c:1237
+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:1290
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr "%s: %s đang thử các khối dự trữ...\n"
+
+#: e2fsck/unix.c:1292
+msgid "Superblock invalid,"
+msgstr "Siêu khối không hợp lệ,"
+
+#: e2fsck/unix.c:1293
+msgid "Group descriptors look bad..."
+msgstr "Có vẻ là các mô tả nhóm sai..."
+
+#: e2fsck/unix.c:1303
+#, 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:1307
+#, 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:1335
+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:1341
+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:1344
+#, 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 là người chủ (root)\n"
+
+#: e2fsck/unix.c:1349
+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:1352
+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:1355
+msgid "Possibly non-existent device?\n"
+msgstr "Có thể là thiết bị không tồn tại?\n"
+
+#: e2fsck/unix.c:1358
+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:1423
+msgid "Get a newer version of e2fsck!"
+msgstr "Lấy phiên bản e2fsck mới hơn!"
+
+#: e2fsck/unix.c:1467
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr "trong khi kiểm tra nhật ký ext3 tìm %s"
+
+#: e2fsck/unix.c:1478
+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:1491
+#, 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:1497
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr "trong khi phục hồi nhật ký ext3 của %s"
+
+#: e2fsck/unix.c:1521
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr "%s có tính năng không được hỗ trợ:"
+
+#: e2fsck/unix.c:1536
+#, c-format
+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"
+
+#: e2fsck/unix.c:1542
+#, c-format
+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"
+
+#: e2fsck/unix.c:1594
+#, 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:1597
+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 tiến trình này sẽ thử tiếp tục...\n"
+
+#: e2fsck/unix.c:1638
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Đang tạo nhật ký (%d khối): "
+
+#: e2fsck/unix.c:1648
+msgid " Done.\n"
+msgstr " Hoàn tất.\n"
+
+#: e2fsck/unix.c:1649
+msgid ""
+"\n"
+"*** journal has been re-created - filesystem is now ext3 again ***\n"
+msgstr ""
+"\n"
+"••• nhật ký đã được tạo lại — hệ thống tập tin lúc này là ext3 lại •••\n"
+
+#: e2fsck/unix.c:1672
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "Đang khởi chạy lại hoàn toàn e2fsck...\n"
+
+#: e2fsck/unix.c:1676
+msgid "while resetting context"
+msgstr "trong khi đặt lại ngữ cảnh"
+
+#: e2fsck/unix.c:1683
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck bị hủy bỏ.\n"
+
+#: e2fsck/unix.c:1688
+msgid "aborted"
+msgstr "bị hủy bỏ"
+
+#: e2fsck/unix.c:1700 e2fsck/util.c:67
+#, 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:1704
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr "%s: ••••• HÃY KHỞI ĐỘNG LẠI LINUX •••••\n"
+
+#: e2fsck/unix.c:1712 e2fsck/util.c:73
+#, 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/unix.c:1752
+msgid "while setting block group checksum info"
+msgstr "trong khi đặt thông tin tổng kiểm nhóm khối"
+
+#: e2fsck/util.c:190 misc/util.c:70
+msgid "yY"
+msgstr "cCyY"
+
+#: e2fsck/util.c:191
+msgid "nN"
+msgstr "kKnN"
+
+#: e2fsck/util.c:205
+msgid "<y>"
+msgstr "<c>"
+
+#: e2fsck/util.c:207
+msgid "<n>"
+msgstr "<k>"
+
+#: e2fsck/util.c:209
+msgid " (y/n)"
+msgstr " (c/k)"
+
+#: e2fsck/util.c:223
+msgid "cancelled!\n"
+msgstr "đã hủy!\n"
+
+#: e2fsck/util.c:238
+msgid "yes\n"
+msgstr "có\n"
+
+#: e2fsck/util.c:240
+msgid "no\n"
+msgstr "không\n"
+
+#: e2fsck/util.c:250
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? không\n"
+"\n"
+
+#: e2fsck/util.c:254
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? có\n"
+"\n"
+
+#: e2fsck/util.c:258
+msgid "yes"
+msgstr "có"
+
+#: e2fsck/util.c:258
+msgid "no"
+msgstr "không"
+
+#: e2fsck/util.c:273
+#, 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:278
+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:286
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "trong khi thử đọc mảng ảnh cho %s"
+
+#: e2fsck/util.c:298
+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:303
+#, 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:315
+#, 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:396
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "Vùng nhớ được dùng: %luk/%luk (%luk/%luk), "
+
+#: e2fsck/util.c:400
+#, c-format
+msgid "Memory used: %lu, "
+msgstr "Vùng nhớ được dùng: %lu, "
+
+#: e2fsck/util.c:407
+#, 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:412
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "thời gian đã qua: %6.3f\n"
+
+#: e2fsck/util.c:447 e2fsck/util.c:461
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr "trong khi đọc nút thông tin %lu trong %s"
+
+#: e2fsck/util.c:475 e2fsck/util.c:488
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr "trong khi ghi nút thông tin %lu trong %s"
+
+#: e2fsck/util.c:637
+msgid "while allocating zeroizing buffer"
+msgstr "trong khi cấp phát bộ đếm làm số không"
+
+#: e2fsck/util.c:785
+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:69
+msgid "done                                                 \n"
+msgstr "hoàn tất                                             \n"
+
+#: misc/badblocks.c:92
+#, 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"
+msgstr ""
+"Cách dùng: %s [-b cỡ_khối] [-i tập_tin_nhập] [-o tập_tin_xuất] [-svwnf]\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:103
+#, 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:218
+#, 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:322
+msgid "Testing with random pattern: "
+msgstr "Đang thử ra bằng mẫu ngẫu nhiên: "
+
+#: misc/badblocks.c:340
+msgid "Testing with pattern 0x"
+msgstr "Đang thử ra bằng mẫu 0x"
+
+#: misc/badblocks.c:372 misc/badblocks.c:445
+msgid "during seek"
+msgstr "trong khi di chuyển vị trí"
+
+#: misc/badblocks.c:383
+#, 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:469
+msgid "during ext2fs_sync_device"
+msgstr "trong khi đồng bộ hoá thiết bị “ext2fs_sync_device”"
+
+#: misc/badblocks.c:489 misc/badblocks.c:749
+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:503 misc/badblocks.c:602 misc/badblocks.c:759
+msgid "while allocating buffers"
+msgstr "trong khi cấp phát bộ đệm"
+
+#: misc/badblocks.c:507
+#, 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:512
+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:521
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Đang kiểm tra tìm khối sai (thử ra chỉ đọc): "
+
+#: misc/badblocks.c:528 misc/badblocks.c:634 misc/badblocks.c:676
+#: misc/badblocks.c:822
+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:609
+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:611 misc/badblocks.c:772
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Từ khối %lu đến %lu\n"
+
+#: misc/badblocks.c:666
+msgid "Reading and comparing: "
+msgstr "Đang đọc và so sánh: "
+
+#: misc/badblocks.c:771
+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:777
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr "Đang kiểm tra tìm khối sai (thử ra đọc-ghi không hủy)\n"
+
+#: misc/badblocks.c:784
+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:867
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "trong khi thử ra ghi dữ liệu, khối %lu"
+
+#: misc/badblocks.c:988 misc/util.c:152
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s đã được gắn kết; "
+
+#: misc/badblocks.c:990
+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:995
+msgid "it's not safe to run badblocks!\n"
+msgstr "Không an toàn khi chạy badblocks.\n"
+
+#: misc/badblocks.c:1000 misc/util.c:163
+#, 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:1003
+msgid "badblocks forced anyway.\n"
+msgstr "vẫn ép buộc badblocks (khối sai).\n"
+
+#: misc/badblocks.c:1023
+#, c-format
+msgid "invalid %s - %s"
+msgstr "%s không hợp lệ — %s"
+
+#: misc/badblocks.c:1133
+#, 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:1163
+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:1169
+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:1183
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+"Không thể phân giải 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:1189
+msgid "while trying to determine device size"
+msgstr "trong khi thử quyết định kích cỡ của thiết bị"
+
+#: misc/badblocks.c:1194
+msgid "last block"
+msgstr "khối cuối"
+
+#: misc/badblocks.c:1200
+msgid "first block"
+msgstr "khối đầu"
+
+#: misc/badblocks.c:1203
+#, c-format
+msgid "invalid starting block (%lu): must be less than %lu"
+msgstr "khối đầu không hợp lệ (%lu): phải nhỏ hơn %lu"
+
+#: misc/badblocks.c:1259
+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:1274
+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:1298
+#, 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:86
+#, c-format
+msgid "Usage: %s [-RVf] [-+=AaCcDdeijsSu] [-v version] files...\n"
+msgstr "Cách dùng: %s [-RVf] [-+=AaCcDdeijsSu] [-v phiên_bản] tập_tin...\n"
+
+#: misc/chattr.c:155
+#, c-format
+msgid "bad version - %s\n"
+msgstr "phiên bản sai — %s\n"
+
+#: misc/chattr.c:201 misc/lsattr.c:116
+#, c-format
+msgid "while trying to stat %s"
+msgstr "trong khi thử lấy các thông tin về %s"
+
+#: misc/chattr.c:208
+#, c-format
+msgid "while reading flags on %s"
+msgstr "trong khi đọc các cờ trên %s"
+
+#: misc/chattr.c:213 misc/chattr.c:225
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Các cờ của %s đã đặt thành "
+
+#: misc/chattr.c:234
+#, c-format
+msgid "while setting flags on %s"
+msgstr "trong khi đặt các cờ trên %s"
+
+#: misc/chattr.c:242
+#, 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:246
+#, c-format
+msgid "while setting version on %s"
+msgstr "trong khi đặt phiên bản trên %s"
+
+#: misc/chattr.c:266
+#, c-format
+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:306
+msgid "= is incompatible with - and +\n"
+msgstr "= không tương thích với “-” và “+”\n"
+
+#: misc/chattr.c:314
+msgid "Must use '-v', =, - or +\n"
+msgstr "Phải dùng “-v”, “=”, “-” hay “+”\n"
+
+#: misc/dumpe2fs.c:55
+#, c-format
+msgid "Usage: %s [-bfhixV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr "Cách dùng: %s [-bfhixV] [-o siêu_khối=<số>] [-o cỡ_khối=<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:196
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr "Nhóm %lu: (Khối "
+
+#: misc/dumpe2fs.c:204
+#, c-format
+msgid "  Checksum 0x%04x"
+msgstr "  Tổng kiểm 0x%04x"
+
+#: misc/dumpe2fs.c:206
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr " (CẦN      0x%04x)"
+
+#: misc/dumpe2fs.c:207
+#, c-format
+msgid ", unused inodes %u\n"
+msgstr ", nút không dùng %u\n"
+
+#: misc/dumpe2fs.c:212
+#, c-format
+msgid "  %s superblock at "
+msgstr "  %s siêu khối tại "
+
+#: misc/dumpe2fs.c:213
+msgid "Primary"
+msgstr "Chính"
+
+#: misc/dumpe2fs.c:213
+msgid "Backup"
+msgstr "Sao lưu"
+
+#: misc/dumpe2fs.c:217
+#, c-format
+msgid ", Group descriptors at "
+msgstr ", Mô tả nhóm tại "
+
+#: misc/dumpe2fs.c:221
+#, c-format
+msgid ""
+"\n"
+"  Reserved GDT blocks at "
+msgstr ""
+"\n"
+"  Các khối GDT đã dành riêng tại "
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " Group descriptor at "
+msgstr " Mô tả nhóm tại "
+
+#: misc/dumpe2fs.c:234
+msgid "  Block bitmap at "
+msgstr " Mảng ảnh khối tại "
+
+#: misc/dumpe2fs.c:238
+msgid ", Inode bitmap at "
+msgstr ", Mảng ảnh nút thông tin tại "
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+"  Inode table at "
+msgstr ""
+"\n"
+"  Bảng nút thông tin tại "
+
+#: misc/dumpe2fs.c:248
+#, 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:255
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u nút không dùng\n"
+
+#: misc/dumpe2fs.c:258
+msgid "  Free blocks: "
+msgstr "  Khối rảnh: "
+
+#: misc/dumpe2fs.c:269
+msgid "  Free inodes: "
+msgstr "  Nút rảnh: "
+
+#: misc/dumpe2fs.c:300
+msgid "while printing bad block list"
+msgstr "trong khi in ra danh sách các khối sai"
+
+#: misc/dumpe2fs.c:306
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "Khối sai: %u"
+
+#: misc/dumpe2fs.c:333 misc/tune2fs.c:306
+msgid "while reading journal inode"
+msgstr "trong khi đọc nút thông tin nhật ký"
+
+#: misc/dumpe2fs.c:339
+msgid "while opening journal inode"
+msgstr "trong khi mở nút thông tin nhật ký"
+
+#: misc/dumpe2fs.c:345
+msgid "while reading journal super block"
+msgstr "trong khi đọc siêu khối nhật ký"
+
+#: misc/dumpe2fs.c:355
+#, c-format
+msgid "Journal features:        "
+msgstr "Tính năng nhật ký:       "
+
+#: misc/dumpe2fs.c:368
+msgid "Journal size:             "
+msgstr "Kích cỡ nhật ký:          "
+
+#: misc/dumpe2fs.c:379
+#, c-format
+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"
+
+#: misc/dumpe2fs.c:386
+#, c-format
+msgid "Journal errno:            %d\n"
+msgstr "Lỗi Journal:              %d\n"
+
+#: misc/dumpe2fs.c:401 misc/tune2fs.c:222
+msgid "while reading journal superblock"
+msgstr "trong khi đọc siêu khối nhật ký"
+
+#: misc/dumpe2fs.c:409
+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:413
+#, c-format
+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"
+
+#: misc/dumpe2fs.c:426
+#, c-format
+msgid "Journal users:            %s\n"
+msgstr "Người dùng nhật ký:       %s\n"
+
+#: misc/dumpe2fs.c:442 misc/mke2fs.c:666 misc/tune2fs.c:1137
+#, c-format
+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:468
+#, 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:483
+#, 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:494
+#, 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:554 misc/mke2fs.c:1555
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\tDùng %s\n"
+
+#: misc/dumpe2fs.c:590 misc/e2image.c:1326 misc/tune2fs.c:1923
+#: resize/main.c:317
+#, c-format
+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:618
+#, c-format
+msgid ""
+"\n"
+"%s: %s: error reading bitmaps: %s\n"
+msgstr ""
+"\n"
+"%s: %s: gặp lỗi khi đọc mảng ảnh: %s\n"
+
+#: misc/e2image.c:90
+#, c-format
+msgid "Usage: %s [-rsIQa] device image_file\n"
+msgstr "Cách dùng: %s [-rsIQa] thiết_bị tập_tin_ảnh\n"
+
+#: misc/e2image.c:138
+#, c-format
+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:144
+msgid "Couldn't allocate header buffer\n"
+msgstr "Không thể cấp phát bộ đệm phần đầu\n"
+
+#: misc/e2image.c:174
+msgid "while writing superblock"
+msgstr "trong khi ghi siêu khối"
+
+#: misc/e2image.c:182
+msgid "while writing inode table"
+msgstr "trong khi ghi bảng nút thông tin"
+
+#: misc/e2image.c:189
+msgid "while writing block bitmap"
+msgstr "trong khi ghi mảng ảnh khối"
+
+#: misc/e2image.c:196
+msgid "while writing inode bitmap"
+msgstr "trong khi ghi mảng ảnh nút thông tin"
+
+#: misc/e2image.c:1365
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr "khi thử chuyển đổi ảnh qcow2 (%s) thành dạng ảnh thô (%s)"
+
+#: 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:2080
+#, 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:803
+#, 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:36
+#, c-format
+msgid "Usage: %s <transaction file> <filesystem>\n"
+msgstr "Cách dùng: %s <tập tin giao dịch> <hệ thống tập tin>\n"
+
+#: misc/e2undo.c:52
+msgid "Failed to read the file system data \n"
+msgstr "Lỗi đọc dữ liệu hệ thống tập tin \n"
+
+#: misc/e2undo.c:62 misc/e2undo.c:83 misc/e2undo.c:108 misc/e2undo.c:206
+#, c-format
+msgid "Failed tdb_fetch %s\n"
+msgstr "Lỗi tdb_fetch %s\n"
+
+#: misc/e2undo.c:70
+#, c-format
+msgid "The file system Mount time didn't match %u\n"
+msgstr "Giờ gắn kết hệ thống tập tin không tương ứng với %u\n"
+
+#: misc/e2undo.c:89
+msgid "The file system UUID didn't match \n"
+msgstr "UUID hệ thống tập tin không tương ứng \n"
+
+#: misc/e2undo.c:163
+#, c-format
+msgid "Failed tdb_open %s\n"
+msgstr "Lỗi tdb_open %s\n"
+
+#: misc/e2undo.c:169
+#, c-format
+msgid "Error while determining whether %s is mounted.\n"
+msgstr "Gặp lỗi trong khi quyết định nếu %s đã gắn kết chưa.\n"
+
+#: misc/e2undo.c:175
+msgid "e2undo should only be run on unmounted file system\n"
+msgstr "e2undo chỉ nên chạy trên một hệ thống tập tin chưa gắn kết\n"
+
+#: misc/e2undo.c:184
+#, c-format
+msgid "Failed to open %s\n"
+msgstr "Lỗi mở %s\n"
+
+#: misc/e2undo.c:210
+#, c-format
+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"
+
+#: misc/e2undo.c:216
+#, c-format
+msgid "Failed write %s\n"
+msgstr "Lỗi ghi %s\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:478
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: không tìm thấy\n"
+
+#: misc/fsck.c:594
+#, 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:616
+#, 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:622
+#, 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:661
+#, 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:721
+#, 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:742
+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:761
+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:884
+#, 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:911
+#, 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:967
+msgid "Checking all file systems.\n"
+msgstr "Đang kiểm tra mọi hệ thống tập tin.\n"
+
+#: misc/fsck.c:1058
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--đang đợi-- (lần qua %d)\n"
+
+#: misc/fsck.c:1078
+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:1120
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: quá nhiều thiết bị\n"
+
+#: misc/fsck.c:1153 misc/fsck.c:1239
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: quá nhiều đối số\n"
+
+#: misc/lsattr.c:74
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr "Cách dùng: %s [-RVadlv] [tập_tin...]\n"
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading flags on %s"
+msgstr "Trong khi đọc các cờ trên %s"
+
+#: misc/lsattr.c:91
+#, c-format
+msgid "While reading version on %s"
+msgstr "Trong khi đọc phiên bản trên %s"
+
+#: misc/mke2fs.c:116
+#, 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]\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] [-jnqvDFKSV] 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]\n"
+"\t [-m phần_trăm_khối_dành_riê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] [-jnqvDFKSV] 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:221
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Đang chạy lệnh: %s\n"
+
+#: misc/mke2fs.c:225
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "trong khi thử chạy “%s”"
+
+#: misc/mke2fs.c:232
+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:259
+#, 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:261
+#, 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:264
+msgid "Aborting....\n"
+msgstr "Đang hủy bỏ...\n"
+
+#: misc/mke2fs.c:284
+#, 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:303
+msgid "while marking bad blocks as used"
+msgstr "trong khi đánh dấu các khối sai đã được dùng"
+
+#: misc/mke2fs.c:320
+msgid "Writing inode tables: "
+msgstr "Đang ghi các bảng nút thông tin: "
+
+#: misc/mke2fs.c:341
+#, 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:355 misc/mke2fs.c:2257 misc/mke2fs.c:2512
+#, c-format
+msgid "done                            \n"
+msgstr "hoàn tất                        \n"
+
+#: misc/mke2fs.c:366
+msgid "while creating root dir"
+msgstr "trong khi tạo thư mục gốc"
+
+#: misc/mke2fs.c:373
+msgid "while reading root inode"
+msgstr "trong khi đọc nút thông tin gốc"
+
+#: misc/mke2fs.c:385
+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:403
+msgid "while creating /lost+found"
+msgstr "trong khi tạo /mất+tìm"
+
+#: misc/mke2fs.c:410
+msgid "while looking up /lost+found"
+msgstr "trong khi tra tìm /mất+tìm"
+
+#: misc/mke2fs.c:423
+msgid "while expanding /lost+found"
+msgstr "trong khi mở rộng /mất+tìm"
+
+#: misc/mke2fs.c:438
+msgid "while setting bad block inode"
+msgstr "trong khi đặt nút thông tin khối sai"
+
+#: misc/mke2fs.c:465
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr "Hết bộ nhớ nên xoá các rãnh ghi trong phạm vi %d đến %d\n"
+
+#: misc/mke2fs.c:475
+#, 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:491
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Cảnh báo: không thể xoá rãnh ghi %d: %s\n"
+
+#: misc/mke2fs.c:507
+msgid "while initializing journal superblock"
+msgstr "trong khi khởi tạo siêu khối nhật ký"
+
+#: misc/mke2fs.c:515
+msgid "Zeroing journal device: "
+msgstr "Đang làm số không thiết bị nhật ký: "
+
+#: misc/mke2fs.c:527
+#, 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:545
+msgid "while writing journal superblock"
+msgstr "trong khi ghi siêu khối nhật ký"
+
+#: misc/mke2fs.c:560
+#, 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:565
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Nhãn hệ thống tập tin=%s\n"
+
+#: misc/mke2fs.c:568
+#, c-format
+msgid "OS type: %s\n"
+msgstr "Kiểu HĐH: %s\n"
+
+#: misc/mke2fs.c:570
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Cỡ khối=%u (bản ghi=%u)\n"
+
+#: misc/mke2fs.c:574
+#, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "Cỡ liên cung=%u (bản ghi=%u)\n"
+
+#: misc/mke2fs.c:578
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Cỡ đoạn=%u (bản ghi=%u)\n"
+
+#: misc/mke2fs.c:580
+#, 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:582
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr "%u nút thông tin, %llu khối\n"
+
+#: misc/mke2fs.c:584
+#, 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:587
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Khối dữ liệu đầu=%u\n"
+
+#: misc/mke2fs.c:589
+#, 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:591
+#, 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:595
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u nhóm khối\n"
+
+#: misc/mke2fs.c:597
+#, c-format
+msgid "%u block group\n"
+msgstr "%u nhóm khối\n"
+
+#: misc/mke2fs.c:600
+#, 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:603
+#, 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:605
+#, 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:612
+#, c-format
+msgid "Superblock backups stored on blocks: "
+msgstr "Siêu khối dự trữ được cất giữ trên khối: "
+
+#: misc/mke2fs.c:691 misc/tune2fs.c:1165
+#, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "mmp_update_interval không hợp lệ: %s\n"
+
+#: misc/mke2fs.c:705
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr "Tham số stride không hợp lệ: %s\n"
+
+#: misc/mke2fs.c:720
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr "Tham số stride không hợp lệ: %s\n"
+
+#: misc/mke2fs.c:743
+#, 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:750
+#, c-format
+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:774
+#, c-format
+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:801 misc/mke2fs.c:810
+#, c-format
+msgid "Invalid root_owner: '%s'\n"
+msgstr "root_owner không hợp lệ: %s\n"
+
+#: misc/mke2fs.c:835
+#, c-format
+msgid "Invalid quotatype parameter: %s\n"
+msgstr "Tham số kiểu hạn ngạch không hợp lệ: %s\n"
+
+#: misc/mke2fs.c:846
+#, 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"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\troot_uid=<uid of root directory>\n"
+"\troot_gid=<gid of root directory>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr OR grp>\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"
+"\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"
+"\tresize=<kích cỡ thay đổi kích cỡ tối đa theo khối>\n"
+"\tlazy_itable_init=<0 để tắt, 1 để bật>\n"
+"\tlazy_journal_init=<0 để tắt, 1 để bật>\n"
+"\troot_uid=<uid của thư-mục gốc>\n"
+"\troot_gid=<gid của thư-mục >\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"gốc\tnodiscard\n"
+"\tquotatype=<usr HAY grp>\n"
+"\n"
+
+#: misc/mke2fs.c:868
+#, 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:907
+#, 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:920 misc/tune2fs.c:398
+#, 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:932 misc/tune2fs.c:349
+#, 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:1072
+#, 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:1076
+#, c-format
+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:1080
+#, c-format
+msgid "Aborting...\n"
+msgstr "Đang hủy bỏ...\n"
+
+#: misc/mke2fs.c:1120
+#, 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:1276
+#, c-format
+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:1317
+#, 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:1357
+#, c-format
+msgid "invalid block size - %s"
+msgstr "cỡ khối không hợp lệ — %s"
+
+#: misc/mke2fs.c:1361
+#, 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:1377
+#, c-format
+msgid "invalid cluster size - %s"
+msgstr "cỡ liên cung không hợp lệ — %s"
+
+#: misc/mke2fs.c:1387
+msgid "'-R' is deprecated, use '-E' instead"
+msgstr "“-R” không dùng nữa, hãy thay bằng “-E”"
+
+#: misc/mke2fs.c:1399
+msgid "Illegal number for blocks per group"
+msgstr "Số cấm cho số khối trên mỗi nhóm"
+
+#: misc/mke2fs.c:1404
+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:1412
+msgid "Illegal number for flex_bg size"
+msgstr "Kích cỡ flex_bg có số không được phép"
+
+#: misc/mke2fs.c:1418
+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:1428
+#, 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:1438
+#, 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:1450
+#, c-format
+msgid "Warning: -K option is deprecated and should not be used anymore. Use '-E nodiscard' extended option instead!\n"
+msgstr "Cảnh báo: tuỳ chọn -K không được tán thành và có lẽ không còn bao giờ được sử dụng nữa. Sử dụng tuỳ chọn mở rộng “-E nodiscard” để thay thế!\n"
+
+#: misc/mke2fs.c:1460
+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:1473
+#, 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:1488
+#, c-format
+msgid "bad num inodes - %s"
+msgstr "số (num) nút thông tin sai — %s"
+
+#: misc/mke2fs.c:1505
+#, c-format
+msgid "bad revision level - %s"
+msgstr "cấp bản sửa đổi sai — %s"
+
+#: misc/mke2fs.c:1519
+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:1527
+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:1580 misc/mke2fs.c:2591
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "trong khi thử mở thiết bị nhật ký %s\n"
+
+#: misc/mke2fs.c:1586
+#, 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:1592
+#, 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:1603
+#, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "khối “%s” sai trên thiết bị “%s”"
+
+#: misc/mke2fs.c:1613
+msgid "filesystem"
+msgstr "hệ thống tập tin"
+
+#: misc/mke2fs.c:1626 resize/main.c:367
+msgid "while trying to determine filesystem size"
+msgstr "trong khi thử quyết định kích cỡ của hệ thống tập tin"
+
+#: misc/mke2fs.c:1632
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+"Không thể phân giải 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:1639
+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:1656
+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:1676
+#, c-format
+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:1730
+#, 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:1746
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr "fs_types để giải quyết mke2fs.conf: "
+
+#: misc/mke2fs.c:1753
+#, c-format
+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:1760
+#, c-format
+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:1772
+#, c-format
+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:1786
+#, 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:1802
+#, c-format
+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:1819
+msgid "while trying to determine hardware sector size"
+msgstr "trong khi thử quyết định kích cỡ của rãnh ghi phần cứng"
+
+#: misc/mke2fs.c:1825
+msgid "while trying to determine physical sector size"
+msgstr "trong khi thử quyết định kích cỡ của rãnh ghi vật lý"
+
+#: misc/mke2fs.c:1858
+msgid "while setting blocksize; too small for device\n"
+msgstr "trong khi lập kích cỡ khối ; quá nhỏ đối với thiết bị\n"
+
+#: misc/mke2fs.c:1863
+#, 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:1881
+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:1887
+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:1906
+#, 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:1909
+#, 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:1911
+#, 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:1930
+#, 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:1934
+#, 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:1968
+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:1975
+#, c-format
+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:1982 misc/tune2fs.c:740
+#, c-format
+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"
+
+#: misc/mke2fs.c:1993
+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:2002
+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:2026
+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:2038
+#, 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:2056
+#, 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:2063
+#, 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:2077
+#, 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:2196
+#, 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"
+
+#: misc/mke2fs.c:2210
+msgid "while trying to setup undo file\n"
+msgstr "trong khi thử cài đặt tập tin undo\n"
+
+#: misc/mke2fs.c:2236
+msgid "Discarding device blocks: "
+msgstr "Bỏ qua khối thiết bị: "
+
+#: misc/mke2fs.c:2252
+msgid "failed - "
+msgstr "gặp lỗi - "
+
+# Item in the main menu to select this package
+#: misc/mke2fs.c:2360
+msgid "while setting up superblock"
+msgstr "trong khi thiết lập siêu khối"
+
+#: misc/mke2fs.c:2369
+#, c-format
+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 xoá bảng nút\n"
+
+#: misc/mke2fs.c:2452
+#, c-format
+msgid "unknown os - %s"
+msgstr "hệ điều hành lạ — %s"
+
+#: misc/mke2fs.c:2504
+#, c-format
+msgid "Allocating group tables: "
+msgstr "Phân bổ bảng nhóm: "
+
+#: misc/mke2fs.c:2508
+msgid "while trying to allocate filesystem tables"
+msgstr "trong khi thử cấp phát các bảng hệ thống tập tin"
+
+#: misc/mke2fs.c:2517
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+"\n"
+"\ttrong khi chuyển đổi mảng ảnh liên cung con"
+
+#: misc/mke2fs.c:2560
+#, 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:2573
+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:2584 misc/tune2fs.c:645
+msgid "journal"
+msgstr "nhật ký"
+
+#: misc/mke2fs.c:2596
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "Đang thêm nhật ký vào thiết bị %s: "
+
+#: misc/mke2fs.c:2603
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"trong khi thử thêm nhật ký vào thiết bị %s"
+
+#: misc/mke2fs.c:2608 misc/mke2fs.c:2640 misc/tune2fs.c:674 misc/tune2fs.c:688
+#, c-format
+msgid "done\n"
+msgstr "hoàn tất\n"
+
+#: misc/mke2fs.c:2617
+#, c-format
+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:2628
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr "Đang tạo nhật ký (%u khối): "
+
+#: misc/mke2fs.c:2636
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"trong khi thử tạo nhật ký"
+
+#: misc/mke2fs.c:2647 misc/tune2fs.c:451
+#, c-format
+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:2652
+#, 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:2665
+#, c-format
+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:2672
+#, c-format
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+"\n"
+"Cảnh báo: gặp khó khăn trong việc ghi ra các siêu khối."
+
+#: misc/mke2fs.c:2674
+#, c-format
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"hoàn tất\n"
+"\n"
+
+#: misc/mklost+found.c:50
+#, c-format
+msgid "Usage: mklost+found\n"
+msgstr "Cách dùng: mklost+found\n"
+
+#: misc/partinfo.c:41
+#, 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:51
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "Không thể mở %s: %s"
+
+#: misc/partinfo.c:57
+#, 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:65
+#, 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:71
+#, 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:107
+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"
+
+#: misc/tune2fs.c:116
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-p mmp_update_interval]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]\n"
+"\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[ -I new_inode_size ] device\n"
+msgstr ""
+"Cách dùng: %s [-c số_đếm_lắp_tối_đa] [-e ứng_xử_lỗi] [-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_riêng] [-o [^]tùy_chọn_lắp[,...]] [-p nhịp_cập_nhật_mmp]\n"
+"\t[-r số_đếm_khối_dành_riêng] [-u người_dùng] [-C số_đếm_lắp] [-L nhãn_phân_vùng]\n"
+"\t[-M thư_mục_lắp_cuối] [-O [^]tính_năng[,...]]\n"
+"\t[-E tùy_chọn_mở_rộng[,...] [-T giờ_kiểm_tra_cuối] [-U UUID]\n"
+"\t[-l cỡ_nút_mới] thiết_bị\n"
+
+#: misc/tune2fs.c:209
+msgid "while trying to open external journal"
+msgstr "trong khi thử mở nhật ký bên ngoài"
+
+#: misc/tune2fs.c:214
+#, 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:229
+msgid "Journal superblock not found!\n"
+msgstr "Không tìm thấy siêu khối nhật ký !\n"
+
+#: misc/tune2fs.c:240
+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:261
+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 tuỳ chọn -f để gỡ bỏ thiết bị journal bị thiếu.\n"
+
+#: misc/tune2fs.c:269
+msgid "Journal removed\n"
+msgstr "Nhật ký đã gỡ bỏ\n"
+
+#: misc/tune2fs.c:313
+msgid "while reading bitmaps"
+msgstr "trong khi đọc các mảng ảnh"
+
+#: misc/tune2fs.c:321
+msgid "while clearing journal inode"
+msgstr "trong khi xoá sạch nút thông tin nhật ký"
+
+#: misc/tune2fs.c:332
+msgid "while writing journal inode"
+msgstr "trong khi ghi nút thông tin nhật ký"
+
+#: misc/tune2fs.c:367
+#, c-format
+msgid "(and reboot afterwards!)\n"
+msgstr "(và khởi động lại sau!)\n"
+
+#: misc/tune2fs.c:401
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr "Tính năng xoá sạch hệ thống tập tin “%s” không được hỗ trợ.\n"
+
+#: misc/tune2fs.c:407
+#, 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:416
+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 xoá 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:424
+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 xoá sạch cờ có nhật ký (has_journal).\n"
+
+#: misc/tune2fs.c:443
+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:461
+#, 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:470
+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:478
+msgid "Error while reading bitmaps\n"
+msgstr "Gặp lỗi khi đọc mảng\n"
+
+#: misc/tune2fs.c:487
+#, 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:492
+msgid "while reading MMP block."
+msgstr "trong khi đọc khối MMP."
+
+#: misc/tune2fs.c:524
+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:535
+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 xoá 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:595
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+"\n"
+"Cảnh báo: tuỳ chọn “^quota” sẽ dè lên đối số “-Q”.\n"
+
+#: misc/tune2fs.c:640
+msgid "The filesystem already has a journal.\n"
+msgstr "Hệ thống tập tin đã có nhật ký.\n"
+
+#: misc/tune2fs.c:658
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"trong khi thử mở nhật ký trên %s\n"
+
+#: misc/tune2fs.c:662
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "Đang tạo nhật ký trên thiết bị %s: "
+
+#: misc/tune2fs.c:670
+#, 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:676
+msgid "Creating journal inode: "
+msgstr "Đang tạo nút thông tin nhật ký: "
+
+#: misc/tune2fs.c:685
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"trong khi thử tạo tập tin nhật ký"
+
+#: misc/tune2fs.c:763
+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"
+
+#: misc/tune2fs.c:785
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with comma):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+msgstr ""
+"\n"
+"Đã chỉ định tuỳ chọn hạn ngạch sai.\n"
+"\n"
+"Sau đây là danh sách các tuỳ 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[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+
+#: misc/tune2fs.c:846
+#, 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:870 misc/tune2fs.c:883
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "số đếm gắn sai — %s"
+
+#: misc/tune2fs.c:899
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "ứng xử lỗi sai — %s"
+
+#: misc/tune2fs.c:926
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "GID/tên nhóm sai — %s"
+
+#: misc/tune2fs.c:959
+#, c-format
+msgid "bad interval - %s"
+msgstr "sai nhịp - %s"
+
+#: misc/tune2fs.c:988
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "tỷ lệ khối dành riêng sai — %s"
+
+#: misc/tune2fs.c:1003
+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:1012
+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:1027
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "số đếm khối dành riêng sai — %s"
+
+#: misc/tune2fs.c:1056
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "UID/tên người dùng sai — %s"
+
+#: misc/tune2fs.c:1073
+#, c-format
+msgid "bad inode size - %s"
+msgstr "kích cỡ nút sai — %s"
+
+#: misc/tune2fs.c:1080
+#, 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:1174
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr "mmp_update_interval quá lớn (%lu)\n"
+
+#: misc/tune2fs.c:1179
+#, 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:1202
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr "Tham số stride RAID không hợp lệ: %s\n"
+
+#: misc/tune2fs.c:1217
+#, 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:1232
+#, 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:1238
+#, 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:1257
+#, c-format
+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"
+msgstr ""
+"\n"
+"Chỉ định tùy chọn sai.\n"
+"\n"
+"Các tùy chọn mở rộng định giới 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 tuỳ chọn gắn mặc định mở rộng>\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"
+"\ttest_fs\n"
+"\t^test_fs\n"
+
+#: misc/tune2fs.c:1723
+msgid "Failed to read inode bitmap\n"
+msgstr "Không thể đọc ánh xạ inode\n"
+
+#: misc/tune2fs.c:1728
+msgid "Failed to read block bitmap\n"
+msgstr "Lỗi khi đọc mảng khối\n"
+
+#: misc/tune2fs.c:1745 resize/resize2fs.c:870
+msgid "blocks to be moved"
+msgstr "khối cần di chuyển"
+
+#: misc/tune2fs.c:1748
+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:1754
+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:1759
+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:1791
+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:1818
+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"
+
+#: misc/tune2fs.c:1840
+#, c-format
+msgid "while trying to delete %s"
+msgstr "trong khi thử xoá %s"
+
+#: misc/tune2fs.c:1850
+#, c-format
+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"
+
+#: misc/tune2fs.c:1919
+#, 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. Thử sửa bằng cách chạy lệnh:\n"
+"“e2fsck -f %s”\n"
+
+#: misc/tune2fs.c:1937
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "Kích cỡ nút thông tin đã %lu\n"
+
+#: misc/tune2fs.c:1943
+#, c-format
+msgid "Shrinking the inode size is not supported\n"
+msgstr "Không hỗ trợ tính năng thu nhỏ kích cỡ nút thông tin\n"
+
+#: misc/tune2fs.c:1949
+#, 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:1996
+#, 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:2002
+#, 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:2007
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Đang đặt ứng xử lỗi thành %d\n"
+
+#: misc/tune2fs.c:2012
+#, 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:2017
+#, 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:2024
+#, 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:2031
+#, 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:2037
+#, 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:2044
+#, 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:2050
+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:2057
+#, 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:2062
+msgid ""
+"\n"
+"Clearing the sparse superflag not supported.\n"
+msgstr ""
+"\n"
+"Tính năng xoá sạch siêu cờ sparse không được hỗ trợ.\n"
+
+#: misc/tune2fs.c:2070
+#, 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:2076
+#, 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:2108
+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:2126
+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:2159
+msgid "Invalid UUID format\n"
+msgstr "Định dạng UUID không hợp lệ\n"
+
+#: misc/tune2fs.c:2172
+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:2180
+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:2193
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "Đang đặt kích cỡ nút %lu\n"
+
+#: misc/tune2fs.c:2196
+#, c-format
+msgid "Failed to change inode size\n"
+msgstr "Lỗi thay đổi kích thước của nút\n"
+
+#: misc/tune2fs.c:2207
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr "Đang đặt kích cỡ stride thành %d\n"
+
+#: misc/tune2fs.c:2212
+#, 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:2219
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr "Đang đặt tuỳ chọn gắn mặc định mở rộng thành “%s”\n"
+
+#: misc/util.c:74
+msgid "Proceed anyway? (y,n) "
+msgstr "Vẫn còn tiếp tục không? (c,k)"
+
+#: misc/util.c:89
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr "Không thể lấy các thông tin về %s — %s\n"
+
+#: misc/util.c:92
+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"
+
+#: misc/util.c:103
+#, 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"
+
+#: misc/util.c:132
+#, c-format
+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"
+
+#: misc/util.c:154
+msgid "mke2fs forced anyway.  Hope /etc/mtab is incorrect.\n"
+msgstr "Tiến trình mke2fs vẫn còn bị ép buộc. Mong “/etc/mtab” không đúng.\n"
+
+#: misc/util.c:159
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "sẽ không làm %s ở đây !\n"
+
+#: misc/util.c:166
+msgid "mke2fs forced anyway.\n"
+msgstr "Tiến trình mke2fs vẫn còn bị ép buộc.\n"
+
+#: misc/util.c:182
+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:207
+#, 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:228
+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"
+"\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 ngụ ý với 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 MB>\n"
+"\tdevice=<thiết bị 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:258
+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:265
+#, 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:273
+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:287
+#, 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:48
+#, 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:50
+#, c-format
+msgid "       %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr "       %s [-r|t] [-n num] [-s socketpath]\n"
+
+#: misc/uuidd.c:52
+#, c-format
+msgid "       %s -k\n"
+msgstr "       %s -k\n"
+
+#: misc/uuidd.c:154
+msgid "bad arguments"
+msgstr "đối số sai"
+
+#: misc/uuidd.c:172
+msgid "connect"
+msgstr "kết nối"
+
+#: misc/uuidd.c:191
+msgid "write"
+msgstr "ghi"
+
+#: misc/uuidd.c:199
+msgid "read count"
+msgstr "số lần đọc"
+
+#: misc/uuidd.c:205
+msgid "bad response length"
+msgstr "Độ dài trả về không hợp lệ"
+
+#: misc/uuidd.c:270
+#, 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:278
+#, 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:307
+#, 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:315
+#, 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:353
+#, 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:361
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr "thao tác %d, số gửi đến = %d\n"
+
+#: misc/uuidd.c:380
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr "UUID thời gian đã tạo ra: %s\n"
+
+#: misc/uuidd.c:390
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr "UUID ngẫu nhiên đã tạo ra: %s\n"
+
+#: misc/uuidd.c:399
+#, 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:420
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr "%d UUID đã tạo ra:\n"
+
+#: misc/uuidd.c:432
+#, c-format
+msgid "Invalid operation %d\n"
+msgstr "Thao tác không hợp lệ %d\n"
+
+#: misc/uuidd.c:476 misc/uuidd.c:498
+#, c-format
+msgid "Bad number: %s\n"
+msgstr "Số sai: %s\n"
+
+#: misc/uuidd.c:533 misc/uuidd.c:562
+#, 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:543
+#, 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:547
+#, c-format
+msgid "List of UUID's:\n"
+msgstr "Danh sách của UUID:\n"
+
+#: misc/uuidd.c:568
+#, 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:585
+#, 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:591
+#, 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 "# Đổ khoả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:43
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]\n"
+"\n"
+msgstr ""
+"Cách dùng: %s [-d cờ_gỡ_lỗi] [-f] [-F] [-M] [-P] [-p] thiết_bị [kích_cỡ_mới]\n"
+"\n"
+
+#: resize/main.c:65
+msgid "Extending the inode table"
+msgstr "Đang mở rộng bảng nút thông tin"
+
+#: resize/main.c:68
+msgid "Relocating blocks"
+msgstr "Đang định vị lại các khối"
+
+#: resize/main.c:71
+msgid "Scanning inode table"
+msgstr "Đang quét bảng nút thông tin"
+
+#: resize/main.c:74
+msgid "Updating inode references"
+msgstr "Đang cập nhật các tham chiếu nút thông tin"
+
+#: resize/main.c:77
+msgid "Moving inode table"
+msgstr "Đang di chuyển bảng nút thông tin"
+
+#: resize/main.c:80
+msgid "Unknown pass?!?"
+msgstr "Lần qua lạ?!?"
+
+#: resize/main.c:83
+#, 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:154
+#, c-format
+msgid ""
+"\n"
+"Resizing bigalloc file systems has not been fully tested.  Proceed\n"
+"at 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:271
+#, c-format
+msgid "while opening %s"
+msgstr "trong khi mở %s"
+
+#: resize/main.c:279
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "trong khi lấy các thông tin về %s"
+
+#: resize/main.c:337 resize/main.c:450
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr "Trước tiên hãy chạy chương trình “e2fsck -f %s”.\n"
+
+#: resize/main.c:341
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr "Kích cỡ hệ thống tập tin tối thiểu được ước tính: %llu\n"
+
+#: resize/main.c:377
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "Kích cỡ mới không hợp lệ: %s\n"
+
+#: resize/main.c:393
+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:401
+#, 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:407
+msgid "Invalid stride length"
+msgstr "Độ dài stride không hợp lệ"
+
+#: resize/main.c:431
+#, 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:438
+#, c-format
+msgid ""
+"The filesystem is already %llu blocks long.  Nothing to do!\n"
+"\n"
+msgstr ""
+"Hệ thống tập tin đã có độ dài %llu khối. Không có gì cần làm !\n"
+"\n"
+
+#: resize/main.c:455
+#, 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:464
+#, c-format
+msgid "while trying to resize %s"
+msgstr "trong khi thử thay đổi kích cỡ %s"
+
+#: resize/main.c:467
+#, 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:473
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu blocks long.\n"
+"\n"
+msgstr ""
+"Hệ thống tập tin nằm trên %s giờ có độ dài %llu khối.\n"
+"\n"
+
+#: resize/main.c:488
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "trong khi thử cắt ngắn %s"
+
+#: resize/online.c:79
+#, 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:83
+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:108
+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:117
+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:124
+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:132
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr "trong khi thử mở điểm lắp %s"
+
+#: resize/online.c:137
+#, 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:156 resize/online.c:173
+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:159 resize/online.c:179
+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:176
+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:209
+#, 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:219
+msgid "While trying to extend the last group"
+msgstr "Trong khi thử mở rộng nhóm cuối cùng"
+
+#: resize/online.c:273
+#, c-format
+msgid "While trying to add group #%d"
+msgstr "Trong khi thử thêm nhóm số %d"
+
+#: resize/online.c:284
+#, 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:369
+#, c-format
+msgid "inodes (%llu) must be less than %u"
+msgstr "nút thông tin (%llu) phải nhỏ hơn %u"
+
+#: resize/resize2fs.c:631
+msgid "reserved blocks"
+msgstr "khối dành riêng"
+
+#: resize/resize2fs.c:875
+msgid "meta-data blocks"
+msgstr "khối siêu dữ liệu"
+
+#: resize/resize2fs.c:1837
+#, c-format
+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.42.8"
+msgstr "Thư viện EXT2FS phiên bản 1.42.8"
+
+#: 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ó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 an block bitmap"
+msgstr "Không thể ghi mảng ảnh khối"
+
+#: lib/ext2fs/ext2_err.c:41
+msgid "Can't read an 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 tượng trưng"
+
+#: 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: Khoá đã tồn tại trên chìa khoá 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 chưa 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 thời 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: fsck being run"
+msgstr "MMP: fsck đ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 "
+
+#: 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 băm tổng kiểm "
+
+#: lib/ext2fs/ext2_err.c:165
+msgid "MMP block checksum does not match MMP block"
+msgstr "Tổng kiểm tra khối MMP không khớp với khối MMP"
+
+#: lib/ext2fs/ext2_err.c:166
+msgid "Ext2 file already exists"
+msgstr "Tập tin ext2 đã sẵn có rồi"
+
+#: e2fsck/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr "Profile phiên bản 0.0"
+
+#: e2fsck/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr "Giá trị số mầu nhiệm sai trong profile_node"
+
+#: e2fsck/prof_err.c:13
+msgid "Profile section not found"
+msgstr "Phần của profile không tìm thấy"
+
+#: e2fsck/prof_err.c:14
+msgid "Profile relation not found"
+msgstr "Mối quan hệ profile không tìm thấy"
+
+#: e2fsck/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"
+
+#: e2fsck/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"
+
+#: e2fsck/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"
+
+#: e2fsck/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"
+
+#: e2fsck/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"
+
+#: e2fsck/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr "Giá trị số mầu nhiệm sai trong profile iterator"
+
+#: e2fsck/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"
+
+#: e2fsck/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"
+
+#: e2fsck/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"
+
+#: e2fsck/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"
+
+#: e2fsck/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"
+
+#: e2fsck/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr "Sai cú pháp trong quan hệ profile"
+
+#: e2fsck/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr "Bổ xung dấu ngoặc ôm đóng trong profile"
+
+#: e2fsck/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr "Thiếu mất dấu ngoặc ôm mở trong profile"
+
+#: e2fsck/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr "Số nhiệm màu sai trong profile_t"
+
+#: e2fsck/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"
+
+#: e2fsck/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ợ"
+
+#: e2fsck/prof_err.c:32
+msgid "Invalid profile_section object"
+msgstr "Đối tượng profile_section không hợp lệ"
+
+#: e2fsck/prof_err.c:33
+msgid "No more sections"
+msgstr "Không còn thêm phần nào nữa"
+
+#: e2fsck/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"
+
+#: e2fsck/prof_err.c:35
+msgid "No profile file open"
+msgstr "Không mở tập tin profile nào"
+
+#: e2fsck/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"
+
+#: e2fsck/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr "Không thể mở tập tin profile"
+
+#: e2fsck/prof_err.c:38
+msgid "Section already exists"
+msgstr "Phần đã tồn tại rồi"
+
+#: e2fsck/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr "Giá trị lô-gíc không hợp lệ"
+
+#: e2fsck/prof_err.c:40
+msgid "Invalid integer value"
+msgstr "Giá trị nguyên không hợp lệ"
+
+#: e2fsck/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"
+
+#~ msgid "Clearing extent flag not supported on %s"
+#~ msgstr "Chức năng xoá 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 "%s is mounted.  "
+#~ msgstr "%s đã gắn kết.  "
+
+#~ 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ể quyết đị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/e2fsprogs/po/zh_CN.gmo b/e2fsprogs/po/zh_CN.gmo
new file mode 100644
index 0000000..406ce2a
--- /dev/null
+++ b/e2fsprogs/po/zh_CN.gmo
Binary files differ
diff --git a/e2fsprogs/po/zh_CN.po b/e2fsprogs/po/zh_CN.po
new file mode 100644
index 0000000..f7ddd31
--- /dev/null
+++ b/e2fsprogs/po/zh_CN.po
@@ -0,0 +1,6270 @@
+# Chinese (simplified) translation for e2fsprogs.
+# This file is distributed under the same license as the e2fsprogs package.
+# Dark Raven <drdarkraven@gmail.com>, 2009, 2010, 2011
+#
+#. 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).
+#.  
+#. 	%b	<blk>			block number
+#. 	%B	<blkcount>		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_dir_acl
+#. 	%Iu	<inode> -> i_uid
+#. 	%Ig	<inode> -> i_gid
+#. 	%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.14\n"
+"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
+"POT-Creation-Date: 2012-06-12 14:40-0400\n"
+"PO-Revision-Date: 2011-01-26 21:53+0800\n"
+"Last-Translator: Dark Raven <drdarkraven@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"
+"X-Poedit-Language: Chinese\n"
+"X-Poedit-Country: CHINA\n"
+
+#: e2fsck/badblocks.c:23 misc/mke2fs.c:176
+#, 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/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:1298 e2fsck/unix.c:1386 misc/badblocks.c:1214
+#: misc/badblocks.c:1222 misc/badblocks.c:1236 misc/badblocks.c:1248
+#: misc/dumpe2fs.c:588 misc/e2image.c:1189 misc/e2image.c:1307
+#: misc/e2image.c:1320 misc/mke2fs.c:192 misc/tune2fs.c:1907 resize/main.c:303
+#, c-format
+msgid "while trying to open %s"
+msgstr "当尝试打开 %s 时"
+
+#: e2fsck/badblocks.c:83
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "当尝试对 '%s' 进行popen时"
+
+#: e2fsck/badblocks.c:94 misc/mke2fs.c:199
+msgid "while reading in list of bad blocks from file"
+msgstr "当从文件中读取坏块表时"
+
+#: e2fsck/badblocks.c:105
+msgid "while updating bad block inode"
+msgstr "当更新坏块inode时"
+
+#: e2fsck/badblocks.c:131
+#, c-format
+msgid "Warning: illegal block %u found in bad block inode.  Cleared.\n"
+msgstr "警告:在坏块inode中发现非法的块%u.  清除.\n"
+
+#: e2fsck/ehandler.c:55
+#, fuzzy, 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:61 e2fsck/ehandler.c:110
+msgid "Ignore error"
+msgstr "忽略错误"
+
+#: e2fsck/ehandler.c:62
+msgid "Force rewrite"
+msgstr "强制覆盖"
+
+#: e2fsck/ehandler.c:104
+#, fuzzy, c-format
+msgid "Error writing block %lu (%s) while %s.  "
+msgstr "写块 %lu (%s) 出错 , %s.  "
+
+#: e2fsck/ehandler.c:107
+#, c-format
+msgid "Error writing block %lu (%s).  "
+msgstr "写块 %lu (%s) 出错.  "
+
+#: e2fsck/emptydir.c:57
+msgid "empty dirblocks"
+msgstr "空的dir块"
+
+#: e2fsck/emptydir.c:62
+msgid "empty dir map"
+msgstr "空ACL映射"
+
+#: e2fsck/emptydir.c:98
+#, 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 ""
+
+#: e2fsck/extend.c:44
+#, c-format
+msgid "Illegal number of blocks!\n"
+msgstr "非法的块数量!\n"
+
+#: e2fsck/extend.c:50
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "无法分配块缓存 (大小=%d)\n"
+
+#: e2fsck/flushb.c:35
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "用法: %s disk\n"
+
+#: e2fsck/flushb.c:64
+#, c-format
+msgid "BLKFLSBUF ioctl not supported!  Can't flush buffers.\n"
+msgstr "不支持对BLKFLSBUF进行 ioctl 调用!  无法刷新缓存.\n"
+
+#: e2fsck/iscan.c:44
+#, c-format
+msgid "Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+msgstr "用法: %s [-F] [-I inode_buffer_blocks] device\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:930
+#, fuzzy, c-format
+msgid "while opening %s for flushing"
+msgstr "当为刷新打开“%s”时"
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:936 resize/main.c:276
+#, fuzzy, c-format
+msgid "while trying to flush %s"
+msgstr "当尝试刷新 %s 时"
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:1084
+msgid "while opening inode scan"
+msgstr "在打开inode扫描时"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:1102
+msgid "while getting next inode"
+msgstr "当获取下一个inode时"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%u inodes scanned.\n"
+msgstr "%u 个 inode 被扫描.\n"
+
+#: e2fsck/journal.c:512
+msgid "reading journal superblock\n"
+msgstr "读取日志超级块\n"
+
+#: e2fsck/journal.c:569
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: 没有发现日志超级块\n"
+
+#: e2fsck/journal.c:578
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: 日志过短\n"
+
+#: e2fsck/journal.c:870
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: 正在修复日志\n"
+
+#: e2fsck/journal.c:872
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: 使用只读模式时不会进行日志修复\n"
+
+#: e2fsck/journal.c:899
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "在尝试重新打开 %s 时"
+
+#: e2fsck/message.c:113
+msgid "aextended attribute"
+msgstr "a扩展属性"
+
+#: e2fsck/message.c:114
+msgid "Aerror allocating"
+msgstr "A分配出错"
+
+#: e2fsck/message.c:115
+msgid "bblock"
+msgstr "b块"
+
+#: e2fsck/message.c:116
+msgid "Bbitmap"
+msgstr "B位图"
+
+#: e2fsck/message.c:117
+msgid "ccompress"
+msgstr "c压缩"
+
+#: e2fsck/message.c:118
+msgid "Cconflicts with some other fs @b"
+msgstr "C与其他文件系统@b冲突"
+
+#: e2fsck/message.c:119
+msgid "iinode"
+msgstr "iinode"
+
+#: e2fsck/message.c:120
+msgid "Iillegal"
+msgstr "I非法的"
+
+#: e2fsck/message.c:121
+msgid "jjournal"
+msgstr "j日志"
+
+#: e2fsck/message.c:122
+msgid "Ddeleted"
+msgstr "D删除"
+
+#: e2fsck/message.c:123
+msgid "ddirectory"
+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 ""
+
+#: 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 "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:131
+msgid "Lis a link"
+msgstr "L是一个链接"
+
+#: e2fsck/message.c:132
+msgid "mmultiply-claimed"
+msgstr ""
+
+#: e2fsck/message.c:133
+msgid "ninvalid"
+msgstr "n无效的"
+
+#: e2fsck/message.c:134
+msgid "oorphaned"
+msgstr "孤立的"
+
+#: e2fsck/message.c:135
+msgid "pproblem in"
+msgstr "问题出于"
+
+#: e2fsck/message.c:136
+msgid "qquota"
+msgstr ""
+
+#: e2fsck/message.c:137
+msgid "rroot @i"
+msgstr "r根@i"
+
+#: e2fsck/message.c:138
+msgid "sshould be"
+msgstr "s应为"
+
+#: e2fsck/message.c:139
+msgid "Ssuper@b"
+msgstr "S超级@b"
+
+#: e2fsck/message.c:140
+msgid "uunattached"
+msgstr ""
+
+#: e2fsck/message.c:141
+msgid "vdevice"
+msgstr "v设备"
+
+#: e2fsck/message.c:142
+#, fuzzy
+msgid "xextent"
+msgstr "x程度"
+
+#: e2fsck/message.c:143
+msgid "zzero-length"
+msgstr "z零长度"
+
+#: e2fsck/message.c:154
+msgid "<The NULL inode>"
+msgstr "<空的 inode>"
+
+#: e2fsck/message.c:155
+msgid "<The bad blocks inode>"
+msgstr "<坏块 inode>"
+
+#: e2fsck/message.c:157
+#, fuzzy
+msgid "<The user quota inode>"
+msgstr "<日志 inode>"
+
+#: e2fsck/message.c:158
+#, fuzzy
+msgid "<The group quota inode>"
+msgstr "<组描述符inode>"
+
+#: e2fsck/message.c:159
+msgid "<The boot loader inode>"
+msgstr "<启动器 inode>"
+
+#: e2fsck/message.c:160
+msgid "<The undelete directory inode>"
+msgstr "<未删除的目录 inode>"
+
+#: e2fsck/message.c:161
+msgid "<The group descriptor inode>"
+msgstr "<组描述符inode>"
+
+#: e2fsck/message.c:162
+msgid "<The journal inode>"
+msgstr "<日志 inode>"
+
+#: e2fsck/message.c:163
+msgid "<Reserved inode 9>"
+msgstr "<保留的 inode 9>"
+
+#: e2fsck/message.c:164
+msgid "<Reserved inode 10>"
+msgstr "<保留的 inode 10>"
+
+#: e2fsck/message.c:333
+msgid "regular file"
+msgstr "一般文件"
+
+#: e2fsck/message.c:335
+msgid "directory"
+msgstr "文件夹"
+
+#: e2fsck/message.c:337
+msgid "character device"
+msgstr "字符设备"
+
+#: e2fsck/message.c:339
+msgid "block device"
+msgstr "块设备"
+
+#: e2fsck/message.c:341
+msgid "named pipe"
+msgstr "命名管道"
+
+#: e2fsck/message.c:343
+msgid "symbolic link"
+msgstr "符号链接"
+
+#: e2fsck/message.c:345 misc/uuidd.c:161
+msgid "socket"
+msgstr "套接字"
+
+#: e2fsck/message.c:347
+#, c-format
+msgid "unknown file type with mode 0%o"
+msgstr "模式为 0%o 的未知文件类型"
+
+#: e2fsck/message.c:423
+msgid "indirect block"
+msgstr ""
+
+#: e2fsck/message.c:425
+msgid "double indirect block"
+msgstr ""
+
+#: e2fsck/message.c:427
+msgid "triple indirect block"
+msgstr ""
+
+#: e2fsck/message.c:429
+msgid "translator block"
+msgstr ""
+
+#: e2fsck/message.c:431
+msgid "block #"
+msgstr "块 #"
+
+#: e2fsck/pass1b.c:222
+msgid "multiply claimed inode map"
+msgstr ""
+
+#: e2fsck/pass1b.c:610 e2fsck/pass1b.c:729
+#, fuzzy, c-format
+msgid "internal error: can't find dup_blk for %llu\n"
+msgstr "内部错误: 无法找到 %u 的 duo_blk\n"
+
+#: e2fsck/pass1b.c:820
+msgid "returned from clone_file_block"
+msgstr "从 clone_file_block 中返回"
+
+#: e2fsck/pass1b.c:842
+#, fuzzy, c-format
+msgid "internal error: couldn't lookup EA block record for %llu"
+msgstr "内部错误: 无法找到 %u 的EA块记录"
+
+#: e2fsck/pass1b.c:854
+#, c-format
+msgid "internal error: couldn't lookup EA inode record for %u"
+msgstr "内部错误: 无法找到 %u 的EA节点记录"
+
+#: e2fsck/pass1.c:476 e2fsck/pass2.c:782
+msgid "reading directory block"
+msgstr "正在读取目录块"
+
+#: e2fsck/pass1.c:599
+msgid "in-use inode map"
+msgstr "使用中的inode映射"
+
+#: e2fsck/pass1.c:610
+msgid "directory inode map"
+msgstr "目录inode映射"
+
+#: e2fsck/pass1.c:620
+msgid "regular file inode map"
+msgstr "普通文件inode映射"
+
+#: e2fsck/pass1.c:629
+msgid "in-use block map"
+msgstr "使用中的块映射"
+
+#: e2fsck/pass1.c:696
+msgid "opening inode scan"
+msgstr "打开inode扫描中"
+
+#: e2fsck/pass1.c:730
+msgid "getting next inode from scan"
+msgstr "正在获取扫描中的下一个inode"
+
+#: e2fsck/pass1.c:1240
+msgid "Pass 1"
+msgstr "第1步"
+
+#: e2fsck/pass1.c:1297
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr ""
+
+#: e2fsck/pass1.c:1347
+msgid "bad inode map"
+msgstr "错误的inode映射"
+
+#: e2fsck/pass1.c:1370
+msgid "inode in bad block map"
+msgstr "错误块映射中的inode"
+
+#: e2fsck/pass1.c:1390
+msgid "imagic inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:1417
+msgid "multiply claimed block map"
+msgstr ""
+
+#: e2fsck/pass1.c:1518
+msgid "ext attr block map"
+msgstr "ext attr 块映射"
+
+#: e2fsck/pass1.c:2266
+#, c-format
+msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
+msgstr ""
+
+#: e2fsck/pass1.c:2627
+msgid "block bitmap"
+msgstr "块位图"
+
+#: e2fsck/pass1.c:2633
+msgid "inode bitmap"
+msgstr "inode 位图"
+
+#: e2fsck/pass1.c:2639
+msgid "inode table"
+msgstr "inode表"
+
+#: e2fsck/pass2.c:283
+msgid "Pass 2"
+msgstr "第2步"
+
+#: e2fsck/pass2.c:805
+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:136
+msgid "Pass 3"
+msgstr "第3步"
+
+#: e2fsck/pass3.c:322
+msgid "inode loop detection bitmap"
+msgstr ""
+
+#: e2fsck/pass4.c:195
+msgid "Pass 4"
+msgstr "第4步"
+
+#: e2fsck/pass5.c:74
+msgid "Pass 5"
+msgstr "第5步"
+
+#: e2fsck/problem.c:51
+#, fuzzy
+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 "连接到 /lost+found"
+
+#: 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 "清空inode"
+
+#: 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
+#, fuzzy
+msgid "Suppress messages"
+msgstr "不显示消息"
+
+#: e2fsck/problem.c:68
+msgid "Unlink"
+msgstr "解除链接"
+
+#: e2fsck/problem.c:69
+msgid "Clear HTree index"
+msgstr "清空 HTree 索引"
+
+#: 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
+#, fuzzy
+msgid "INODE CLEARED"
+msgstr "INODE 已清除"
+
+#: e2fsck/problem.c:90
+msgid "ABORTED"
+msgstr "已中断"
+
+#: e2fsck/problem.c:91
+#, fuzzy
+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 "已Unlink"
+
+#: e2fsck/problem.c:97
+msgid "HTREE INDEX CLEARED"
+msgstr "HTREE索引已清除"
+
+#: e2fsck/problem.c:98
+msgid "WILL RECREATE"
+msgstr "将会重建"
+
+#. @-expanded: block bitmap for group %g is not in group.  (block %b)\n
+#: e2fsck/problem.c:107
+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:111
+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:116
+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 correct ext2\n
+#. @-expanded: filesystem.  If the device is valid and it really contains an ext2\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 %S <device>\n
+#. @-expanded: \n
+#: e2fsck/problem.c:122
+#, c-format
+msgid ""
+"\n"
+"The @S could not be read or does not describe a correct ext2\n"
+"@f.  If the @v is valid and it really contains an ext2\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 %S <@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:131
+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 ""
+"@f的大小 (依据@S) 为 %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:138
+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:145
+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:150
+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:155
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+"@f缺少UUID;正在生成一个。\n"
+"\n"
+
+#: e2fsck/problem.c:160
+#, 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:169
+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:174
+#, 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:179
+msgid "@i count in @S is %i, @s %j.\n"
+msgstr "@S中的@i计数为 %i,@s %j.\n"
+
+#: e2fsck/problem.c:183
+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:188
+#, c-format
+msgid "@S has an @n @j (@i %i).\n"
+msgstr "@S包含@n ext3 @j(@i %i).\n"
+
+#. @-expanded: External journal has multiple filesystem users (unsupported).\n
+#: e2fsck/problem.c:193
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "外部@j同时有多个@f使用 (不支持)。\n"
+
+#. @-expanded: Can't find external journal\n
+#: e2fsck/problem.c:198
+msgid "Can't find external @j\n"
+msgstr "无法找到外部@j\n"
+
+#. @-expanded: External journal has bad superblock\n
+#: e2fsck/problem.c:203
+msgid "External @j has bad @S\n"
+msgstr "外部@j有错误的@S\n"
+
+#. @-expanded: External journal does not support this filesystem\n
+#: e2fsck/problem.c:208
+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:213
+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:221
+msgid "@j @S is corrupt.\n"
+msgstr "@j@S已损坏.\n"
+
+#. @-expanded: superblock has_journal flag is clear, but a journal %s is present.\n
+#: e2fsck/problem.c:226
+#, c-format
+msgid "@S has_@j flag is clear, but a @j %s is present.\n"
+msgstr "@S没有has_journal标志,但是存在一个@j %s。\n"
+
+#. @-expanded: superblock needs_recovery flag is set, but no journal is present.\n
+#: e2fsck/problem.c:231
+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:236
+msgid "@S needs_recovery flag is clear, but @j has data.\n"
+msgstr "@S没有needs_recovery标志,但是@j中没有数据。\n"
+
+#. @-expanded: Clear journal
+#: e2fsck/problem.c:241
+#, fuzzy
+msgid "Clear @j"
+msgstr "清除@j"
+
+#. @-expanded: filesystem has feature flag(s) set, but is a revision 0 filesystem.  
+#: e2fsck/problem.c:246 e2fsck/problem.c:695
+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:251
+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:256
+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:261
+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:266
+#, 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:271
+#, 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:276
+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:281
+msgid "@j @S has an unknown incompatible feature flag set.\n"
+msgstr ""
+
+#. @-expanded: journal version not supported by this e2fsck.\n
+#: e2fsck/problem.c:286
+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:291
+#, c-format
+msgid ""
+"Moving @j from /%s to hidden @i.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: Error moving journal: %m\n
+#. @-expanded: \n
+#: e2fsck/problem.c:296
+#, 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:301
+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:307
+#, fuzzy
+msgid "Run @j anyway"
+msgstr "强制@j"
+
+#. @-expanded: Recovery flag not set in backup superblock, so running journal anyway.\n
+#: e2fsck/problem.c:312
+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:317
+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:322
+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:328
+msgid "Resize_@i not enabled, but the resize @i is non-zero.  "
+msgstr ""
+
+#. @-expanded: Resize inode not valid.  
+#: e2fsck/problem.c:333
+msgid "Resize @i not valid.  "
+msgstr ""
+
+#. @-expanded: superblock last mount time (%t,\n
+#. @-expanded: \tnow = %T) is in the future.\n
+#: e2fsck/problem.c:338
+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:343
+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:347
+#, c-format
+msgid "@S hint for external superblock @s %X.  "
+msgstr ""
+
+#. @-expanded: Adding dirhash hint to filesystem.\n
+#. @-expanded: \n
+#: e2fsck/problem.c:352
+msgid ""
+"Adding dirhash hint to @f.\n"
+"\n"
+msgstr ""
+
+#. @-expanded: group descriptor %g checksum is %04x, should be %04y.  
+#: e2fsck/problem.c:357
+msgid "@g descriptor %g checksum is %04x, should be %04y.  "
+msgstr ""
+
+#. @-expanded: group descriptor %g marked uninitialized without feature set.\n
+#: e2fsck/problem.c:362
+#, 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:367
+msgid "@g descriptor %g has invalid unused inodes count %b.  "
+msgstr ""
+
+#. @-expanded: Last group block bitmap uninitialized.  
+#: e2fsck/problem.c:372
+msgid "Last @g @b @B uninitialized.  "
+msgstr "最后一个@g的@b@B未初始化.  "
+
+#: e2fsck/problem.c:377
+#, c-format
+msgid "Journal transaction %i was corrupt, replay was aborted.\n"
+msgstr ""
+
+#: e2fsck/problem.c:381
+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)  
+#: e2fsck/problem.c:386
+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)  "
+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).  
+#: e2fsck/problem.c:392
+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).  "
+msgstr ""
+
+#. @-expanded: One or more block group descriptor checksums are invalid.  
+#: e2fsck/problem.c:398
+msgid "One or more @b @g descriptor checksums are invalid.  "
+msgstr ""
+
+#. @-expanded: Setting free inodes count to %j (was %i)\n
+#: e2fsck/problem.c:403
+msgid "Setting free @is count to %j (was %i)\n"
+msgstr ""
+
+#. @-expanded: Setting free blocks count to %c (was %b)\n
+#: e2fsck/problem.c:408
+msgid "Setting free @bs count to %c (was %b)\n"
+msgstr ""
+
+#. @-expanded: Making quota inode %i (%Q) hidden.\n
+#: e2fsck/problem.c:413
+msgid "Making @q @i %i (%Q) hidden.\n"
+msgstr ""
+
+#. @-expanded: superblock has invalid MMP block.  
+#: e2fsck/problem.c:418
+#, fuzzy
+msgid "@S has invalid MMP block.  "
+msgstr "无效的块大小 - %s"
+
+#. @-expanded: superblock has invalid MMP magic.  
+#: e2fsck/problem.c:423
+msgid "@S has invalid MMP magic.  "
+msgstr ""
+
+#: e2fsck/problem.c:428
+#, c-format
+msgid "ext2fs_open2: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:433
+#, c-format
+msgid "ext2fs_check_desc: %m\n"
+msgstr ""
+
+#. @-expanded: Pass 1: Checking inodes, blocks, and sizes\n
+#: e2fsck/problem.c:440
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "第一步: 检查@i,@b,和大小\n"
+
+#. @-expanded: root inode is not a directory.  
+#: e2fsck/problem.c:444
+msgid "@r is not a @d.  "
+msgstr "@r不是一个@d.  "
+
+#. @-expanded: root inode has dtime set (probably due to old mke2fs).  
+#: e2fsck/problem.c:449
+msgid "@r has dtime set (probably due to old mke2fs).  "
+msgstr ""
+
+#. @-expanded: Reserved inode %i (%Q) has invalid mode.  
+#: e2fsck/problem.c:454
+msgid "Reserved @i %i (%Q) has @n mode.  "
+msgstr "保留的@i %i (%Q) 的模式无效.  "
+
+#. @-expanded: deleted inode %i has zero dtime.  
+#: e2fsck/problem.c:459
+#, c-format
+msgid "@D @i %i has zero dtime.  "
+msgstr ""
+
+#. @-expanded: inode %i is in use, but has dtime set.  
+#: e2fsck/problem.c:464
+#, c-format
+msgid "@i %i is in use, but has dtime set.  "
+msgstr ""
+
+#. @-expanded: inode %i is a zero-length directory.  
+#: e2fsck/problem.c:469
+#, 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:474
+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:479
+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:484
+msgid "@g %g's @i table at %b @C.\n"
+msgstr ""
+
+#. @-expanded: group %g's block bitmap (%b) is bad.  
+#: e2fsck/problem.c:489
+msgid "@g %g's @b @B (%b) is bad.  "
+msgstr ""
+
+#. @-expanded: group %g's inode bitmap (%b) is bad.  
+#: e2fsck/problem.c:494
+msgid "@g %g's @i @B (%b) is bad.  "
+msgstr ""
+
+#. @-expanded: inode %i, i_size is %Is, should be %N.  
+#: e2fsck/problem.c:499
+msgid "@i %i, i_size is %Is, @s %N.  "
+msgstr ""
+
+#. @-expanded: inode %i, i_blocks is %Ib, should be %N.  
+#: e2fsck/problem.c:504
+msgid "@i %i, i_@bs is %Ib, @s %N.  "
+msgstr ""
+
+#. @-expanded: illegal %B (%b) in inode %i.  
+#: e2fsck/problem.c:509
+msgid "@I %B (%b) in @i %i.  "
+msgstr ""
+
+#. @-expanded: %B (%b) overlaps filesystem metadata in inode %i.  
+#: e2fsck/problem.c:514
+msgid "%B (%b) overlaps @f metadata in @i %i.  "
+msgstr ""
+
+#. @-expanded: inode %i has illegal block(s).  
+#: e2fsck/problem.c:519
+#, 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:524
+#, 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:529
+msgid "@I %B (%b) in bad @b @i.  "
+msgstr ""
+
+#. @-expanded: Bad block inode has illegal block(s).  
+#: e2fsck/problem.c:534
+msgid "Bad @b @i has illegal @b(s).  "
+msgstr ""
+
+#. @-expanded: Duplicate or bad block in use!\n
+#: e2fsck/problem.c:539
+msgid "Duplicate or bad @b in use!\n"
+msgstr ""
+
+#. @-expanded: Bad block %b used as bad block inode indirect block.  
+#: e2fsck/problem.c:544
+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:549
+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:556
+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:561
+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:567
+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:572
+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:578
+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:583
+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:589
+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:595
+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:600
+#, 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:605
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr ""
+
+#. @-expanded: Relocating group %g's %s to %c...\n
+#: e2fsck/problem.c:610
+#, 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:615
+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:620
+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:625 e2fsck/problem.c:1460
+msgid "@A @i @B (%N): %m\n"
+msgstr ""
+
+#. @-expanded: error allocating block bitmap (%N): %m\n
+#: e2fsck/problem.c:630
+msgid "@A @b @B (%N): %m\n"
+msgstr ""
+
+#. @-expanded: error allocating icount link information: %m\n
+#: e2fsck/problem.c:635
+#, c-format
+msgid "@A icount link information: %m\n"
+msgstr ""
+
+#. @-expanded: error allocating directory block array: %m\n
+#: e2fsck/problem.c:640
+#, 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:645
+#, 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:650
+#, 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:655
+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:660
+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:666
+#, c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "读取@i %i出错: %m\n"
+
+#. @-expanded: inode %i has imagic flag set.  
+#: e2fsck/problem.c:674
+#, 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:679
+#, c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set.  "
+msgstr ""
+
+#. @-expanded: inode %i has compression flag set on filesystem without compression support.  
+#: e2fsck/problem.c:685
+#, c-format
+msgid "@i %i has @cion flag set on @f without @cion support.  "
+msgstr ""
+
+#. @-expanded: Special (device/socket/fifo) inode %i has non-zero size.  
+#: e2fsck/problem.c:690
+#, 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:700
+msgid "@j @i is not in use, but contains data.  "
+msgstr ""
+
+#. @-expanded: journal is not regular file.  
+#: e2fsck/problem.c:705
+msgid "@j is not regular file.  "
+msgstr "@j不是普通文件.  "
+
+#. @-expanded: inode %i was part of the orphaned inode list.  
+#: e2fsck/problem.c:710
+#, 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:716
+msgid "@is that were part of a corrupted orphan linked list found.  "
+msgstr ""
+
+#. @-expanded: error allocating refcount structure (%N): %m\n
+#: e2fsck/problem.c:721
+msgid "@A refcount structure (%N): %m\n"
+msgstr ""
+
+#. @-expanded: Error reading extended attribute block %b for inode %i.  
+#: e2fsck/problem.c:726
+msgid "Error reading @a @b %b for @i %i.  "
+msgstr ""
+
+#. @-expanded: inode %i has a bad extended attribute block %b.  
+#: e2fsck/problem.c:731
+msgid "@i %i has a bad @a @b %b.  "
+msgstr ""
+
+#. @-expanded: Error reading extended attribute block %b (%m).  
+#: e2fsck/problem.c:736
+msgid "Error reading @a @b %b (%m).  "
+msgstr ""
+
+#. @-expanded: extended attribute block %b has reference count %r, should be %N.  
+#: e2fsck/problem.c:741
+msgid "@a @b %b has reference count %r, @s %N.  "
+msgstr ""
+
+#. @-expanded: Error writing extended attribute block %b (%m).  
+#: e2fsck/problem.c:746
+msgid "Error writing @a @b %b (%m).  "
+msgstr ""
+
+#. @-expanded: extended attribute block %b has h_blocks > 1.  
+#: e2fsck/problem.c:751
+msgid "@a @b %b has h_@bs > 1.  "
+msgstr ""
+
+#. @-expanded: error allocating extended attribute block %b.  
+#: e2fsck/problem.c:756
+msgid "@A @a @b %b.  "
+msgstr ""
+
+#. @-expanded: extended attribute block %b is corrupt (allocation collision).  
+#: e2fsck/problem.c:761
+msgid "@a @b %b is corrupt (allocation collision).  "
+msgstr ""
+
+#. @-expanded: extended attribute block %b is corrupt (invalid name).  
+#: e2fsck/problem.c:766
+msgid "@a @b %b is corrupt (@n name).  "
+msgstr ""
+
+#. @-expanded: extended attribute block %b is corrupt (invalid value).  
+#: e2fsck/problem.c:771
+msgid "@a @b %b is corrupt (@n value).  "
+msgstr ""
+
+#. @-expanded: inode %i is too big.  
+#: e2fsck/problem.c:776
+#, c-format
+msgid "@i %i is too big.  "
+msgstr "@i %i 过大.  "
+
+#. @-expanded: %B (%b) causes directory to be too big.  
+#: e2fsck/problem.c:780
+msgid "%B (%b) causes @d to be too big.  "
+msgstr ""
+
+#: e2fsck/problem.c:785
+msgid "%B (%b) causes file to be too big.  "
+msgstr ""
+
+#: e2fsck/problem.c:790
+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:795
+#, 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:800
+#, 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:805
+#, 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:810
+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:815
+#, 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:820
+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:825
+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:831
+#, 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:836
+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:841
+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:846
+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:851
+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:856
+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:861
+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:866
+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:871
+#, 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:876
+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:882
+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:887
+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:892
+#, 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:897
+#, 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:902
+#, c-format
+msgid "@i %i missing EXTENT_FL, but is in extents format\n"
+msgstr ""
+
+#: e2fsck/problem.c:907
+#, 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:912
+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:916
+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:921
+#, fuzzy, c-format
+msgid "Error converting subcluster @b @B: %m\n"
+msgstr "创建根@d (%s) 时出错: %m\n"
+
+#. @-expanded: quota inode is not regular file.  
+#: e2fsck/problem.c:926
+#, fuzzy
+msgid "@q @i is not regular file.  "
+msgstr "@j不是普通文件.  "
+
+#. @-expanded: quota inode is not in use, but contains data.  
+#: e2fsck/problem.c:931
+msgid "@q @i is not in use, but contains data.  "
+msgstr ""
+
+#. @-expanded: quota inode is visible to the user.  
+#: e2fsck/problem.c:936
+msgid "@q @i is visible to the user.  "
+msgstr ""
+
+#. @-expanded: The bad block inode looks invalid.  
+#: e2fsck/problem.c:941
+#, fuzzy
+msgid "The bad @b @i looks @n.  "
+msgstr "<坏块 inode>"
+
+#. @-expanded: inode %i has zero length extent\n
+#. @-expanded: \t(invalid logical block %c, physical block %b)\n
+#: e2fsck/problem.c:946
+msgid ""
+"@i %i has zero length extent\n"
+"\t(@n logical @b %c, physical @b %b)\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:953
+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:959
+#, c-format
+msgid "@m @b(s) in @i %i:"
+msgstr ""
+
+#: e2fsck/problem.c:974
+#, c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr ""
+
+#. @-expanded: error allocating inode bitmap (inode_dup_map): %m\n
+#: e2fsck/problem.c:979
+#, 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:984
+#, 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:989 e2fsck/problem.c:1304
+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:994
+msgid "Pass 1C: Scanning directories for @is with @m @bs\n"
+msgstr ""
+
+#. @-expanded: Pass 1D: Reconciling multiply-claimed blocks\n
+#: e2fsck/problem.c:1000
+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:1005
+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:1011
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr ""
+
+#. @-expanded: \t<filesystem metadata>\n
+#: e2fsck/problem.c:1016
+msgid "\t<@f metadata>\n"
+msgstr "\t<@f元数据>\n"
+
+#. @-expanded: (There are %N inodes containing multiply-claimed blocks.)\n
+#. @-expanded: \n
+#: e2fsck/problem.c:1021
+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:1026
+msgid ""
+"@m @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1039
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr ""
+
+#. @-expanded: Pass 2: Checking directory structure\n
+#: e2fsck/problem.c:1045
+msgid "Pass 2: Checking @d structure\n"
+msgstr "第二步: 检查目录结构\n"
+
+#. @-expanded: invalid inode number for '.' in directory inode %i.\n
+#: e2fsck/problem.c:1050
+#, 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:1055
+msgid "@E has @n @i #: %Di.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has deleted/unused inode %Di.  
+#: e2fsck/problem.c:1060
+msgid "@E has @D/unused @i %Di.  "
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) is a link to '.'  
+#: e2fsck/problem.c:1065
+msgid "@E @L to '.'  "
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
+#: e2fsck/problem.c:1070
+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:1075
+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:1080
+msgid "@E @L to the @r.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has illegal characters in its name.\n
+#: e2fsck/problem.c:1085
+msgid "@E has illegal characters in its name.\n"
+msgstr ""
+
+#. @-expanded: Missing '.' in directory inode %i.\n
+#: e2fsck/problem.c:1090
+#, c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "@d@i %i 中缺少 '.'.\n"
+
+#. @-expanded: Missing '..' in directory inode %i.\n
+#: e2fsck/problem.c:1095
+#, 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:1100
+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:1105
+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:1110
+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:1115
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr ""
+
+#. @-expanded: i_dir_acl for inode %i (%Q) is %Id, should be zero.\n
+#: e2fsck/problem.c:1120
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr ""
+
+#. @-expanded: i_frag for inode %i (%Q) is %N, should be zero.\n
+#: e2fsck/problem.c:1125
+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:1130
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: inode %i (%Q) has invalid mode (%Im).\n
+#: e2fsck/problem.c:1135
+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:1140
+msgid "@d @i %i, %B, offset %N: @d corrupted\n"
+msgstr "@d@i %i, 第 %B @b, 偏移量 %N: @d损坏\n"
+
+#. @-expanded: directory inode %i, %B, offset %N: filename too long\n
+#: e2fsck/problem.c:1145
+msgid "@d @i %i, %B, offset %N: filename too long\n"
+msgstr "@d@i %i, 第 %B @b, 偏移量 %N: 文件名过长\n"
+
+#. @-expanded: directory inode %i has an unallocated %B.  
+#: e2fsck/problem.c:1150
+msgid "@d @i %i has an unallocated %B.  "
+msgstr "@d@i %i 中含有未分配的@b #%B.  "
+
+#. @-expanded: '.' directory entry in directory inode %i is not NULL terminated\n
+#: e2fsck/problem.c:1155
+#, 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:1160
+#, 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:1165
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr ""
+
+#. @-expanded: inode %i (%Q) is an illegal block device.\n
+#: e2fsck/problem.c:1170
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '.' entry.\n
+#: e2fsck/problem.c:1175
+msgid "@E is duplicate '.' @e.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) is duplicate '..' entry.\n
+#: e2fsck/problem.c:1180
+msgid "@E is duplicate '..' @e.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1185 e2fsck/problem.c:1485
+#, 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:1190
+msgid "@E has rec_len of %Dr, @s %N.\n"
+msgstr ""
+
+#. @-expanded: error allocating icount structure: %m\n
+#: e2fsck/problem.c:1195
+#, c-format
+msgid "@A icount structure: %m\n"
+msgstr ""
+
+#. @-expanded: Error iterating over directory blocks: %m\n
+#: e2fsck/problem.c:1200
+#, c-format
+msgid "Error iterating over @d @bs: %m\n"
+msgstr ""
+
+#. @-expanded: Error reading directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1205
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr ""
+
+#. @-expanded: Error writing directory block %b (inode %i): %m\n
+#: e2fsck/problem.c:1210
+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:1215
+#, c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr ""
+
+#. @-expanded: Error deallocating inode %i: %m\n
+#: e2fsck/problem.c:1220
+#, c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr ""
+
+#. @-expanded: directory entry for '.' in %p (%i) is big.\n
+#: e2fsck/problem.c:1225
+#, 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:1230
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr ""
+
+#. @-expanded: inode %i (%Q) is an illegal socket.\n
+#: e2fsck/problem.c:1235
+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:1240
+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:1245
+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:1250
+msgid "@E has filetype set.\n"
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has a zero-length name.\n
+#: e2fsck/problem.c:1255
+msgid "@E has a @z name.\n"
+msgstr ""
+
+#. @-expanded: Symlink %Q (inode #%i) is invalid.\n
+#: e2fsck/problem.c:1260
+msgid "Symlink %Q (@i #%i) is @n.\n"
+msgstr ""
+
+#. @-expanded: extended attribute block for inode %i (%Q) is invalid (%If).\n
+#: e2fsck/problem.c:1265
+msgid "@a @b @F @n (%If).\n"
+msgstr ""
+
+#. @-expanded: filesystem contains large files, but lacks LARGE_FILE flag in superblock.\n
+#: e2fsck/problem.c:1270
+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:1275
+msgid "@p @h %d: %B not referenced\n"
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d: %B referenced twice\n
+#: e2fsck/problem.c:1280
+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:1285
+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:1290
+msgid "@p @h %d: %B has bad max hash\n"
+msgstr ""
+
+#. @-expanded: invalid HTREE directory inode %d (%q).  
+#: e2fsck/problem.c:1295
+msgid "@n @h %d (%q).  "
+msgstr ""
+
+#. @-expanded: problem in HTREE directory inode %d (%q): bad block number %b.\n
+#: e2fsck/problem.c:1299
+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:1309
+#, c-format
+msgid "@p @h %d: root node is @n\n"
+msgstr "@p@h %d:根结点@n\n"
+
+#. @-expanded: problem in HTREE directory inode %d: %B has invalid limit (%N)\n
+#: e2fsck/problem.c:1314
+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:1319
+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:1324
+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:1329
+msgid "@p @h %d: %B has @n depth (%N)\n"
+msgstr ""
+
+#. @-expanded: Duplicate entry '%Dn' in %p (%i) found.  
+#: e2fsck/problem.c:1334
+msgid "Duplicate @E found.  "
+msgstr ""
+
+#. @-expanded: entry '%Dn' in %p (%i) has a non-unique filename.\n
+#. @-expanded: Rename to %s
+#: e2fsck/problem.c:1339
+#, 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:1344
+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:1349
+msgid "i_blocks_hi @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: Unexpected block in HTREE directory inode %d (%q).\n
+#: e2fsck/problem.c:1354
+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:1358
+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:1363
+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:1368
+msgid "i_file_acl_hi @F %N, @s zero.\n"
+msgstr ""
+
+#. @-expanded: Pass 3: Checking directory connectivity\n
+#: e2fsck/problem.c:1375
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "第3步: 检查目录连接性\n"
+
+#. @-expanded: root inode not allocated.  
+#: e2fsck/problem.c:1380
+msgid "@r not allocated.  "
+msgstr ""
+
+#. @-expanded: No room in lost+found directory.  
+#: e2fsck/problem.c:1385
+msgid "No room in @l @d.  "
+msgstr "@l@d中没有空间.  "
+
+#. @-expanded: Unconnected directory inode %i (%p)\n
+#: e2fsck/problem.c:1390
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr ""
+
+#. @-expanded: /lost+found not found.  
+#: e2fsck/problem.c:1395
+msgid "/@l not found.  "
+msgstr "/@l未找到."
+
+#. @-expanded: '..' in %Q (%i) is %P (%j), should be %q (%d).\n
+#: e2fsck/problem.c:1400
+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:1405
+msgid "Bad or non-existent /@l.  Cannot reconnect.\n"
+msgstr ""
+
+#. @-expanded: Could not expand /lost+found: %m\n
+#: e2fsck/problem.c:1410
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1415
+#, c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr ""
+
+#. @-expanded: Error while trying to find /lost+found: %m\n
+#: e2fsck/problem.c:1420
+#, 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:1425
+#, 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:1430
+#, 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:1435
+#, 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:1440
+#, 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:1445
+#, 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:1450
+#, 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:1455
+#, 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:1465
+#, 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:1470
+#, c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr ""
+
+#. @-expanded: root inode is not a directory; aborting.\n
+#: e2fsck/problem.c:1475
+msgid "@r is not a @d; aborting.\n"
+msgstr "@r不是一个@d; 中止.\n"
+
+#. @-expanded: Cannot proceed without a root inode.\n
+#: e2fsck/problem.c:1480
+msgid "Cannot proceed without a @r.\n"
+msgstr ""
+
+#. @-expanded: /lost+found is not a directory (ino=%i)\n
+#: e2fsck/problem.c:1490
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1497
+msgid "Pass 3A: Optimizing directories\n"
+msgstr ""
+
+#: e2fsck/problem.c:1502
+#, c-format
+msgid "Failed to create dirs_to_hash iterator: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1507
+msgid "Failed to optimize directory %q (%d): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1512
+msgid "Optimizing directories: "
+msgstr "正在优化目录: "
+
+#: e2fsck/problem.c:1529
+msgid "Pass 4: Checking reference counts\n"
+msgstr ""
+
+#. @-expanded: unattached zero-length inode %i.  
+#: e2fsck/problem.c:1534
+#, c-format
+msgid "@u @z @i %i.  "
+msgstr ""
+
+#. @-expanded: unattached inode %i\n
+#: e2fsck/problem.c:1539
+#, c-format
+msgid "@u @i %i\n"
+msgstr ""
+
+#. @-expanded: inode %i ref count is %Il, should be %N.  
+#: e2fsck/problem.c:1544
+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:1548
+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: Pass 5: Checking group summary information\n
+#: e2fsck/problem.c:1558
+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:1563
+msgid "Padding at end of @i @B is not set. "
+msgstr ""
+
+#. @-expanded: Padding at end of block bitmap is not set. 
+#: e2fsck/problem.c:1568
+msgid "Padding at end of @b @B is not set. "
+msgstr ""
+
+#. @-expanded: block bitmap differences: 
+#: e2fsck/problem.c:1573
+msgid "@b @B differences: "
+msgstr "@b@B差异: "
+
+#. @-expanded: inode bitmap differences: 
+#: e2fsck/problem.c:1593
+msgid "@i @B differences: "
+msgstr "@i@B差异: "
+
+#. @-expanded: Free inodes count wrong for group #%g (%i, counted=%j).\n
+#: e2fsck/problem.c:1613
+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:1618
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#. @-expanded: Free inodes count wrong (%i, counted=%j).\n
+#: e2fsck/problem.c:1623
+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:1628
+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:1633
+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:1638
+msgid ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
+"endpoints (%i, %j)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1644
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr ""
+
+#. @-expanded: Error copying in replacement inode bitmap: %m\n
+#: e2fsck/problem.c:1649
+#, c-format
+msgid "Error copying in replacement @i @B: %m\n"
+msgstr ""
+
+#. @-expanded: Error copying in replacement block bitmap: %m\n
+#: e2fsck/problem.c:1654
+#, 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:1679
+#, 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:1684
+#, c-format
+msgid "@g %g @i(s) in use but @g is marked INODE_UNINIT\n"
+msgstr ""
+
+#. @-expanded: Recreate journal
+#: e2fsck/problem.c:1691
+msgid "Recreate @j"
+msgstr "重建@j"
+
+#: e2fsck/problem.c:1696
+msgid "Update quota info for quota type %N"
+msgstr ""
+
+#: e2fsck/problem.c:1815
+#, c-format
+msgid "Unhandled error code (0x%x)!\n"
+msgstr ""
+
+#: e2fsck/problem.c:1940 e2fsck/problem.c:1944
+msgid "IGNORED"
+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 "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:188
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr ""
+
+#: e2fsck/super.c:211
+#, c-format
+msgid "while calling ext2fs_adjust_ea_refcount2 for inode %d"
+msgstr ""
+
+#: e2fsck/super.c:272
+msgid "Truncating"
+msgstr "正在截断"
+
+#: e2fsck/super.c:273
+msgid "Clearing"
+msgstr "正在清除"
+
+#: e2fsck/unix.c:74
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfvtDFV] [-b superblock] [-B blocksize]\n"
+"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
+"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
+"\t\t[-E extended-options] device\n"
+msgstr ""
+
+#: e2fsck/unix.c:80
+#, c-format
+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:86
+#, c-format
+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"
+msgstr ""
+
+#: e2fsck/unix.c:130
+#, c-format
+msgid "%s: %u/%u files (%0d.%d%% non-contiguous), %llu/%llu blocks\n"
+msgstr ""
+
+#: e2fsck/unix.c:137
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%8u inode used (%2.2f%%)\n"
+msgid_plural ""
+"\n"
+"%8u inodes used (%2.2f%%)\n"
+msgstr[0] "%u 个 inode 被扫描.\n"
+msgstr[1] "%u 个 inode 被扫描.\n"
+
+#: e2fsck/unix.c:141
+#, c-format
+msgid "%8u non-contiguous file (%0d.%d%%)\n"
+msgid_plural "%8u non-contiguous files (%0d.%d%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:146
+#, c-format
+msgid "%8u non-contiguous directory (%0d.%d%%)\n"
+msgid_plural "%8u non-contiguous directories (%0d.%d%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:151
+#, c-format
+msgid "         # of inodes with ind/dind/tind blocks: %u/%u/%u\n"
+msgstr ""
+
+#: e2fsck/unix.c:159
+msgid "         Extent depth histogram: "
+msgstr ""
+
+#: e2fsck/unix.c:168
+#, c-format
+msgid "%8llu block used (%2.2f%%)\n"
+msgid_plural "%8llu blocks used (%2.2f%%)\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:171
+#, fuzzy, c-format
+msgid "%8u bad block\n"
+msgid_plural "%8u bad blocks\n"
+msgstr[0] "b块"
+msgstr[1] "b块"
+
+#: e2fsck/unix.c:173
+#, fuzzy, c-format
+msgid "%8u large file\n"
+msgid_plural "%8u large files\n"
+msgstr[0] "一般文件"
+msgstr[1] "一般文件"
+
+#: e2fsck/unix.c:175
+#, fuzzy, c-format
+msgid ""
+"\n"
+"%8u regular file\n"
+msgid_plural ""
+"\n"
+"%8u regular files\n"
+msgstr[0] "一般文件"
+msgstr[1] "一般文件"
+
+#: e2fsck/unix.c:177
+#, fuzzy, c-format
+msgid "%8u directory\n"
+msgid_plural "%8u directories\n"
+msgstr[0] "文件夹"
+msgstr[1] "文件夹"
+
+#: e2fsck/unix.c:179
+#, fuzzy, c-format
+msgid "%8u character device file\n"
+msgid_plural "%8u character device files\n"
+msgstr[0] "字符设备"
+msgstr[1] "字符设备"
+
+#: e2fsck/unix.c:182
+#, fuzzy, c-format
+msgid "%8u block device file\n"
+msgid_plural "%8u block device files\n"
+msgstr[0] "块设备"
+msgstr[1] "块设备"
+
+#: e2fsck/unix.c:184
+#, c-format
+msgid "%8u fifo\n"
+msgid_plural "%8u fifos\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:186
+#, c-format
+msgid "%8u link\n"
+msgid_plural "%8u links\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:189
+#, fuzzy, c-format
+msgid "%8u symbolic link"
+msgid_plural "%8u symbolic links"
+msgstr[0] "符号链接"
+msgstr[1] "符号链接"
+
+#: e2fsck/unix.c:191
+#, fuzzy, c-format
+msgid " (%u fast symbolic link)\n"
+msgid_plural " (%u fast symbolic links)\n"
+msgstr[0] "符号链接"
+msgstr[1] "符号链接"
+
+#: e2fsck/unix.c:195
+#, fuzzy, c-format
+msgid "%8u socket\n"
+msgid_plural "%8u sockets\n"
+msgstr[0] "套接字"
+msgstr[1] "套接字"
+
+#: e2fsck/unix.c:198
+#, c-format
+msgid "%8u file\n"
+msgid_plural "%8u files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: e2fsck/unix.c:212 misc/badblocks.c:983 misc/tune2fs.c:1979 misc/util.c:147
+#: resize/main.c:247
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr ""
+
+#: e2fsck/unix.c:230
+#, fuzzy, c-format
+msgid "Warning!  %s is %s.\n"
+msgstr "警告! %s已挂载.\n"
+
+#: e2fsck/unix.c:237
+#, c-format
+msgid "%s is %s.\n"
+msgstr ""
+
+#: e2fsck/unix.c:240
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr "无法继续, 中止.\n"
+
+#: e2fsck/unix.c:242
+msgid ""
+"\n"
+"\n"
+"WARNING!!!  The filesystem is mounted.   If you continue you ***WILL***\n"
+"cause ***SEVERE*** filesystem damage.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:247
+msgid "Do you really want to continue"
+msgstr "你真的想要要继续"
+
+#: e2fsck/unix.c:249
+#, c-format
+msgid "check aborted.\n"
+msgstr "检查被中止\n"
+
+#: e2fsck/unix.c:339
+msgid " contains a file system with errors"
+msgstr ""
+
+#: e2fsck/unix.c:341
+msgid " was not cleanly unmounted"
+msgstr ""
+
+#: e2fsck/unix.c:343
+msgid " primary superblock features different from backup"
+msgstr ""
+
+#: e2fsck/unix.c:347
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:354
+msgid " has filesystem last checked time in the future"
+msgstr ""
+
+#: e2fsck/unix.c:360
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:369
+msgid ", check forced.\n"
+msgstr ", 强制检查.\n"
+
+#: e2fsck/unix.c:402
+#, c-format
+msgid "%s: clean, %u/%u files, %llu/%llu blocks"
+msgstr ""
+
+#: e2fsck/unix.c:421
+msgid " (check deferred; on battery)"
+msgstr ""
+
+#: e2fsck/unix.c:424
+msgid " (check after next mount)"
+msgstr "(将于下次挂载时进行检查)"
+
+#: e2fsck/unix.c:426
+#, c-format
+msgid " (check in %ld mounts)"
+msgstr ""
+
+#: e2fsck/unix.c:576
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr ""
+
+#: e2fsck/unix.c:645
+#, c-format
+msgid "Invalid EA version.\n"
+msgstr "无效的EA版本号.\n"
+
+#: e2fsck/unix.c:672
+#, c-format
+msgid "Unknown extended option: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:697
+#, 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:766
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:770
+msgid "Invalid completion information file descriptor"
+msgstr ""
+
+#: e2fsck/unix.c:785
+msgid "Only one of the options -p/-a, -n or -y may be specified."
+msgstr ""
+
+#: e2fsck/unix.c:806
+#, c-format
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr ""
+
+#: e2fsck/unix.c:837 e2fsck/unix.c:909 misc/tune2fs.c:811 misc/tune2fs.c:1100
+#: misc/tune2fs.c:1118
+#, c-format
+msgid "Unable to resolve '%s'"
+msgstr ""
+
+#: e2fsck/unix.c:888
+msgid "The -n and -D options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:893
+msgid "The -n and -c options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:898
+msgid "The -n and -l/-L options are incompatible."
+msgstr ""
+
+#: e2fsck/unix.c:943
+#, c-format
+msgid "The -c and the -l/-L options may not be both used at the same time.\n"
+msgstr ""
+
+#: e2fsck/unix.c:991
+#, c-format
+msgid ""
+"E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1000
+#, c-format
+msgid ""
+"\n"
+"Invalid non-numeric argument to -%c (\"%s\")\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:1089
+#, c-format
+msgid ""
+"MMP interval is %u seconds and total wait time is %u seconds. Please "
+"wait...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1106 e2fsck/unix.c:1111
+#, fuzzy
+msgid "while checking MMP block"
+msgstr "在对坏块inode进行一致性检验是"
+
+#: e2fsck/unix.c:1113 misc/tune2fs.c:1912
+msgid ""
+"If you are sure the filesystem is not in use on any node, run:\n"
+"'tune2fs -f -E clear_mmp {device}'\n"
+msgstr ""
+
+#: e2fsck/unix.c:1163
+#, c-format
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "错误: ext2fs库版本过旧!\n"
+
+#: e2fsck/unix.c:1171
+msgid "while trying to initialize program"
+msgstr ""
+
+#: e2fsck/unix.c:1194
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1206
+msgid "need terminal for interactive repairs"
+msgstr ""
+
+#: e2fsck/unix.c:1256
+#, c-format
+msgid "%s: %s trying backup blocks...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1258
+msgid "Superblock invalid,"
+msgstr "超级块无效,"
+
+#: e2fsck/unix.c:1259
+msgid "Group descriptors look bad..."
+msgstr ""
+
+#: e2fsck/unix.c:1269
+#, fuzzy, c-format
+msgid "%s: %s while using the backup blocks"
+msgstr "当读取坏块inode时"
+
+#: e2fsck/unix.c:1273
+#, c-format
+msgid "%s: going back to original superblock\n"
+msgstr ""
+
+#: e2fsck/unix.c:1301
+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:1307
+msgid "Could this be a zero-length partition?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1310
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr ""
+
+#: e2fsck/unix.c:1315
+msgid "Possibly non-existent or swap device?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1318
+msgid "Filesystem mounted or opened exclusively by another program?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1321
+msgid "Possibly non-existent device?\n"
+msgstr ""
+
+#: e2fsck/unix.c:1324
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1389
+msgid "Get a newer version of e2fsck!"
+msgstr ""
+
+#: e2fsck/unix.c:1437
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr ""
+
+#: e2fsck/unix.c:1448
+msgid ""
+"Warning: skipping journal recovery because doing a read-only filesystem "
+"check.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1461
+#, c-format
+msgid "unable to set superblock flags on %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:1467
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr ""
+
+#: e2fsck/unix.c:1492
+#, c-format
+msgid "%s has unsupported feature(s):"
+msgstr ""
+
+#: e2fsck/unix.c:1507
+#, c-format
+msgid "%s: warning: compression support is experimental.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1513
+#, c-format
+msgid ""
+"%s: e2fsck not compiled with HTREE support,\n"
+"\tbut filesystem %s has HTREE directories.\n"
+msgstr ""
+
+#: e2fsck/unix.c:1565
+#, fuzzy, c-format
+msgid "%s: %s while reading bad blocks inode\n"
+msgstr "当读取坏块inode时"
+
+#: e2fsck/unix.c:1568
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr ""
+
+#: e2fsck/unix.c:1609
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr ""
+
+#: e2fsck/unix.c:1619
+msgid " Done.\n"
+msgstr "完成.\n"
+
+#: e2fsck/unix.c:1620
+msgid ""
+"\n"
+"*** journal has been re-created - filesystem is now ext3 again ***\n"
+msgstr ""
+
+#: e2fsck/unix.c:1643
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "正在从头开始e2fsck...\n"
+
+#: e2fsck/unix.c:1647
+msgid "while resetting context"
+msgstr ""
+
+#: e2fsck/unix.c:1654
+#, c-format
+msgid "%s: e2fsck canceled.\n"
+msgstr "%s: e2fsck被取消.\n"
+
+#: e2fsck/unix.c:1659
+msgid "aborted"
+msgstr "已中止"
+
+#: e2fsck/unix.c:1671 e2fsck/util.c:67
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** 文件系统已修改 *****\n"
+
+#: e2fsck/unix.c:1675
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr "%s: ***** 重新启动 LINUX *****\n"
+
+#: e2fsck/unix.c:1683 e2fsck/util.c:73
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** 警告: 文件系统上仍有错误 **********\n"
+"\n"
+
+#: e2fsck/unix.c:1723
+msgid "while setting block group checksum info"
+msgstr ""
+
+#: e2fsck/util.c:189 misc/util.c:70
+msgid "yY"
+msgstr "yY"
+
+#: e2fsck/util.c:190
+msgid "nN"
+msgstr "nN"
+
+#: e2fsck/util.c:204
+msgid "<y>"
+msgstr "<y>"
+
+#: e2fsck/util.c:206
+msgid "<n>"
+msgstr "<n>"
+
+#: e2fsck/util.c:208
+msgid " (y/n)"
+msgstr " (y/n)"
+
+#: e2fsck/util.c:222
+msgid "cancelled!\n"
+msgstr "已取消!\n"
+
+#: e2fsck/util.c:237
+msgid "yes\n"
+msgstr "是\n"
+
+#: e2fsck/util.c:239
+msgid "no\n"
+msgstr "否\n"
+
+#: e2fsck/util.c:249
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? 否\n"
+"\n"
+
+#: e2fsck/util.c:253
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? 是\n"
+"\n"
+
+#: e2fsck/util.c:257
+msgid "yes"
+msgstr "yes"
+
+#: e2fsck/util.c:257
+msgid "no"
+msgstr "no"
+
+#: e2fsck/util.c:272
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr ""
+
+#: e2fsck/util.c:277
+msgid "reading inode and block bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:285
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:297
+msgid "writing block and inode bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:302
+#, c-format
+msgid "while rewriting block and inode bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:314
+#, 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:395
+#, c-format
+msgid "Memory used: %luk/%luk (%luk/%luk), "
+msgstr "内存使用量:  %luk/%luk (%luk/%luk), "
+
+#: e2fsck/util.c:399
+#, c-format
+msgid "Memory used: %lu, "
+msgstr "内存用量: %lu, "
+
+#: e2fsck/util.c:406
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "时间: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:411
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr ""
+
+#: e2fsck/util.c:446 e2fsck/util.c:460
+#, c-format
+msgid "while reading inode %lu in %s"
+msgstr ""
+
+#: e2fsck/util.c:474 e2fsck/util.c:487
+#, c-format
+msgid "while writing inode %lu in %s"
+msgstr ""
+
+#: e2fsck/util.c:636
+msgid "while allocating zeroizing buffer"
+msgstr ""
+
+#: e2fsck/util.c:788
+msgid ""
+"UNEXPECTED INCONSISTENCY: the filesystem is being modified while fsck is "
+"running.\n"
+msgstr ""
+
+#: misc/badblocks.c:69
+#, fuzzy
+msgid "done                                                 \n"
+msgstr "完成                                \n"
+
+#: misc/badblocks.c:93
+#, 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"
+msgstr ""
+
+#: misc/badblocks.c:104
+#, c-format
+msgid ""
+"%s: The -n and -w options are mutually exclusive.\n"
+"\n"
+msgstr ""
+
+#: misc/badblocks.c:219
+#, c-format
+msgid "%6.2f%% done, %s elapsed. (%d/%d/%d errors)"
+msgstr ""
+
+#: misc/badblocks.c:322
+msgid "Testing with random pattern: "
+msgstr ""
+
+#: misc/badblocks.c:340
+msgid "Testing with pattern 0x"
+msgstr ""
+
+#: misc/badblocks.c:372 misc/badblocks.c:445
+msgid "during seek"
+msgstr ""
+
+#: misc/badblocks.c:383
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr ""
+
+#: misc/badblocks.c:469
+msgid "during ext2fs_sync_device"
+msgstr ""
+
+#: misc/badblocks.c:489 misc/badblocks.c:749
+msgid "while beginning bad block list iteration"
+msgstr ""
+
+#: misc/badblocks.c:503 misc/badblocks.c:602 misc/badblocks.c:759
+msgid "while allocating buffers"
+msgstr ""
+
+#: misc/badblocks.c:507
+#, c-format
+msgid "Checking blocks %lu to %lu\n"
+msgstr "正在检查从 %lu 到 %lu的块\n"
+
+#: misc/badblocks.c:512
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr ""
+
+#: misc/badblocks.c:521
+msgid "Checking for bad blocks (read-only test): "
+msgstr ""
+
+#: misc/badblocks.c:528 misc/badblocks.c:634 misc/badblocks.c:676
+#: misc/badblocks.c:822
+msgid "Too many bad blocks, aborting test\n"
+msgstr ""
+
+#: misc/badblocks.c:609
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:611 misc/badblocks.c:772
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr ""
+
+#: misc/badblocks.c:666
+msgid "Reading and comparing: "
+msgstr "正在读取并比较: "
+
+#: misc/badblocks.c:771
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:777
+msgid "Checking for bad blocks (non-destructive read-write test)\n"
+msgstr ""
+
+#: misc/badblocks.c:784
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+
+#: misc/badblocks.c:867
+#, c-format
+msgid "during test data write, block %lu"
+msgstr ""
+
+#: misc/badblocks.c:988 misc/util.c:152
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s 已经挂载;"
+
+#: misc/badblocks.c:990
+msgid "badblocks forced anyway.  Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/badblocks.c:995
+msgid "it's not safe to run badblocks!\n"
+msgstr ""
+
+#: misc/badblocks.c:1000 misc/util.c:163
+#, c-format
+msgid "%s is apparently in use by the system; "
+msgstr ""
+
+#: misc/badblocks.c:1003
+msgid "badblocks forced anyway.\n"
+msgstr ""
+
+#: misc/badblocks.c:1023
+#, c-format
+msgid "invalid %s - %s"
+msgstr "无效的%s - %s"
+
+#: misc/badblocks.c:1133
+#, c-format
+msgid "can't allocate memory for test_pattern - %s"
+msgstr ""
+
+#: misc/badblocks.c:1163
+msgid "Maximum of one test_pattern may be specified in read-only mode"
+msgstr ""
+
+#: misc/badblocks.c:1169
+msgid "Random test_pattern is not allowed in read-only mode"
+msgstr ""
+
+#: misc/badblocks.c:1183
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+
+#: misc/badblocks.c:1189
+msgid "while trying to determine device size"
+msgstr ""
+
+#: misc/badblocks.c:1194
+msgid "last block"
+msgstr "最后一个块"
+
+#: misc/badblocks.c:1200
+msgid "first block"
+msgstr "第一个块"
+
+#: misc/badblocks.c:1203
+#, c-format
+msgid "invalid starting block (%lu): must be less than %lu"
+msgstr ""
+
+#: misc/badblocks.c:1259
+msgid "while creating in-memory bad blocks list"
+msgstr ""
+
+#: misc/badblocks.c:1274
+msgid "while adding to in-memory bad block list"
+msgstr ""
+
+#: misc/badblocks.c:1298
+#, c-format
+msgid "Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"
+msgstr ""
+
+#: misc/chattr.c:86
+#, c-format
+msgid "Usage: %s [-RVf] [-+=AacDdeijsSu] [-v version] files...\n"
+msgstr ""
+
+#: misc/chattr.c:154
+#, c-format
+msgid "bad version - %s\n"
+msgstr "错误的版本 - %s\n"
+
+#: misc/chattr.c:201 misc/lsattr.c:116
+#, c-format
+msgid "while trying to stat %s"
+msgstr "当尝试对%s进行stat调用时"
+
+#: misc/chattr.c:208
+#, c-format
+msgid "while reading flags on %s"
+msgstr ""
+
+#: misc/chattr.c:217 misc/chattr.c:236
+#, c-format
+msgid "Clearing extent flag not supported on %s"
+msgstr ""
+
+#: misc/chattr.c:222 misc/chattr.c:241
+#, c-format
+msgid "Flags of %s set as "
+msgstr "%s的标志被设为 "
+
+#: misc/chattr.c:250
+#, c-format
+msgid "while setting flags on %s"
+msgstr ""
+
+#: misc/chattr.c:258
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr ""
+
+#: misc/chattr.c:262
+#, c-format
+msgid "while setting version on %s"
+msgstr ""
+
+#: misc/chattr.c:282
+#, c-format
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr ""
+
+#: misc/chattr.c:322
+msgid "= is incompatible with - and +\n"
+msgstr ""
+
+#: misc/chattr.c:330
+msgid "Must use '-v', =, - or +\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:55
+#, c-format
+msgid "Usage: %s [-bfhixV] [-o superblock=<num>] [-o blocksize=<num>] device\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:159
+#, fuzzy
+msgid "blocks"
+msgstr "b块"
+
+#: misc/dumpe2fs.c:168
+msgid "clusters"
+msgstr ""
+
+#: misc/dumpe2fs.c:196
+#, c-format
+msgid "Group %lu: (Blocks "
+msgstr ""
+
+#: misc/dumpe2fs.c:204
+#, fuzzy, c-format
+msgid "  Checksum 0x%04x"
+msgstr "  校验和 0x%04x,%d个未使用的inode\n"
+
+#: misc/dumpe2fs.c:206
+#, c-format
+msgid " (EXPECTED 0x%04x)"
+msgstr ""
+
+#: misc/dumpe2fs.c:207
+#, fuzzy, c-format
+msgid ", unused inodes %u\n"
+msgstr ", %u个未使用的inodes\n"
+
+#: misc/dumpe2fs.c:212
+#, c-format
+msgid "  %s superblock at "
+msgstr ""
+
+#: misc/dumpe2fs.c:213
+msgid "Primary"
+msgstr "主"
+
+#: misc/dumpe2fs.c:213
+msgid "Backup"
+msgstr "备份"
+
+#: misc/dumpe2fs.c:217
+#, fuzzy, c-format
+msgid ", Group descriptors at "
+msgstr ", 组描述符位于 "
+
+#: misc/dumpe2fs.c:221
+#, c-format
+msgid ""
+"\n"
+"  Reserved GDT blocks at "
+msgstr ""
+"\n"
+"  保留的GDT块位于 "
+
+#: misc/dumpe2fs.c:228
+#, c-format
+msgid " Group descriptor at "
+msgstr ""
+
+#: misc/dumpe2fs.c:234
+msgid "  Block bitmap at "
+msgstr ""
+
+#: misc/dumpe2fs.c:238
+msgid ", Inode bitmap at "
+msgstr ""
+
+#: misc/dumpe2fs.c:242
+msgid ""
+"\n"
+"  Inode table at "
+msgstr ""
+"\n"
+"  Inode表位于 "
+
+#: misc/dumpe2fs.c:248
+#, c-format
+msgid ""
+"\n"
+"  %u free %s, %u free inodes, %u directories%s"
+msgstr ""
+
+#: misc/dumpe2fs.c:255
+#, c-format
+msgid ", %u unused inodes\n"
+msgstr ", %u个未使用的inodes\n"
+
+#: misc/dumpe2fs.c:258
+msgid "  Free blocks: "
+msgstr "  可用块数: "
+
+#: misc/dumpe2fs.c:269
+msgid "  Free inodes: "
+msgstr "  可用inode数: "
+
+#: misc/dumpe2fs.c:300
+msgid "while printing bad block list"
+msgstr ""
+
+#: misc/dumpe2fs.c:306
+#, c-format
+msgid "Bad blocks: %u"
+msgstr "坏块数: %u"
+
+#: misc/dumpe2fs.c:333 misc/tune2fs.c:302
+msgid "while reading journal inode"
+msgstr ""
+
+#: misc/dumpe2fs.c:339
+msgid "while opening journal inode"
+msgstr ""
+
+#: misc/dumpe2fs.c:345
+msgid "while reading journal super block"
+msgstr ""
+
+#: misc/dumpe2fs.c:355
+#, fuzzy, c-format
+msgid "Journal features:        "
+msgstr "日志使用者:            %s\n"
+
+#: misc/dumpe2fs.c:368
+msgid "Journal size:             "
+msgstr "日志大小:             "
+
+#: misc/dumpe2fs.c:379
+#, c-format
+msgid ""
+"Journal length:           %u\n"
+"Journal sequence:         0x%08x\n"
+"Journal start:            %u\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:386
+#, fuzzy, c-format
+msgid "Journal errno:            %d\n"
+msgstr "日志使用者:            %s\n"
+
+#: misc/dumpe2fs.c:401 misc/tune2fs.c:218
+msgid "while reading journal superblock"
+msgstr ""
+
+#: misc/dumpe2fs.c:409
+msgid "Couldn't find journal superblock magic numbers"
+msgstr ""
+
+#: misc/dumpe2fs.c:413
+#, c-format
+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 ""
+
+#: misc/dumpe2fs.c:426
+#, c-format
+msgid "Journal users:            %s\n"
+msgstr "日志使用者:            %s\n"
+
+#: misc/dumpe2fs.c:442 misc/mke2fs.c:662 misc/tune2fs.c:1137
+#, c-format
+msgid "Couldn't allocate memory to parse options!\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:468
+#, c-format
+msgid "Invalid superblock parameter: %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:483
+#, c-format
+msgid "Invalid blocksize parameter: %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:494
+#, 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:554 misc/mke2fs.c:1525
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\t使用 %s\n"
+
+#: misc/dumpe2fs.c:590 misc/e2image.c:1309 misc/tune2fs.c:1923
+#: resize/main.c:305
+#, c-format
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "找不到有效的文件系统超级块.\n"
+
+#: misc/dumpe2fs.c:618
+#, c-format
+msgid ""
+"\n"
+"%s: %s: error reading bitmaps: %s\n"
+msgstr ""
+
+#: misc/e2image.c:87
+#, c-format
+msgid "Usage: %s [-rsIQ] device image_file\n"
+msgstr ""
+
+#: misc/e2image.c:135
+#, c-format
+msgid "Error: header size is bigger than wrt_size\n"
+msgstr ""
+
+#: misc/e2image.c:141
+msgid "Couldn't allocate header buffer\n"
+msgstr ""
+
+#: misc/e2image.c:171
+msgid "while writing superblock"
+msgstr ""
+
+#: misc/e2image.c:179
+msgid "while writing inode table"
+msgstr ""
+
+#: misc/e2image.c:186
+msgid "while writing block bitmap"
+msgstr ""
+
+#: misc/e2image.c:193
+msgid "while writing inode bitmap"
+msgstr ""
+
+#: misc/e2image.c:1341
+#, c-format
+msgid "while trying to convert qcow2 image (%s) into raw image (%s)"
+msgstr ""
+
+#: 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 ""
+
+#: misc/e2label.c:68
+#, c-format
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: 读取superblock出错\n"
+
+#: misc/e2label.c:72
+#, c-format
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: 不是一个ex2文件系统\n"
+
+#: misc/e2label.c:97 misc/tune2fs.c:2074
+#, 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:803
+#, c-format
+msgid "Usage: e2label device [newlabel]\n"
+msgstr "用法: e2label device [新卷标]\n"
+
+#: misc/e2undo.c:36
+#, c-format
+msgid "Usage: %s <transaction file> <filesystem>\n"
+msgstr ""
+
+#: misc/e2undo.c:52
+msgid "Failed to read the file system data \n"
+msgstr ""
+
+#: misc/e2undo.c:62 misc/e2undo.c:83 misc/e2undo.c:108 misc/e2undo.c:206
+#, c-format
+msgid "Failed tdb_fetch %s\n"
+msgstr "tdb_fetch %s 失败\n"
+
+#: misc/e2undo.c:70
+#, c-format
+msgid "The file system Mount time didn't match %u\n"
+msgstr ""
+
+#: misc/e2undo.c:89
+msgid "The file system UUID didn't match \n"
+msgstr ""
+
+#: misc/e2undo.c:163
+#, c-format
+msgid "Failed tdb_open %s\n"
+msgstr "tdb_open %s 失败\n"
+
+#: misc/e2undo.c:169
+#, c-format
+msgid "Error while determining whether %s is mounted.\n"
+msgstr ""
+
+#: misc/e2undo.c:175
+msgid "e2undo should only be run on unmounted file system\n"
+msgstr ""
+
+#: misc/e2undo.c:184
+#, c-format
+msgid "Failed to open %s\n"
+msgstr "打开%s失败\n"
+
+#: misc/e2undo.c:210
+#, c-format
+msgid "Replayed transaction of size %zd at location %llu\n"
+msgstr ""
+
+#: misc/e2undo.c:216
+#, c-format
+msgid "Failed write %s\n"
+msgstr "写入%s失败\n"
+
+#: 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:478
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr ""
+
+#: misc/fsck.c:594
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr ""
+
+#: misc/fsck.c:616
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr ""
+
+#: misc/fsck.c:622
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr ""
+
+#: misc/fsck.c:661
+#, c-format
+msgid "Finished with %s (exit status %d)\n"
+msgstr ""
+
+#: misc/fsck.c:721
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr ""
+
+#: misc/fsck.c:742
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+
+#: misc/fsck.c:761
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr ""
+
+#: misc/fsck.c:884
+#, c-format
+msgid ""
+"%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass "
+"number\n"
+msgstr ""
+
+#: misc/fsck.c:911
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr ""
+
+#: misc/fsck.c:967
+msgid "Checking all file systems.\n"
+msgstr "正在检查所有文件系统.\n"
+
+#: misc/fsck.c:1058
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--请稍候-- (完成 %d)\n"
+
+#: misc/fsck.c:1078
+msgid ""
+"Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgstr ""
+"用法: Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] "
+"[filesys ...]\n"
+
+#: misc/fsck.c:1120
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: 设备过多\n"
+
+#: misc/fsck.c:1153 misc/fsck.c:1239
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: 参数过多\n"
+
+#: misc/lsattr.c:74
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr "用法: %s [-RVadlv] [files...]\n"
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading flags on %s"
+msgstr ""
+
+#: misc/lsattr.c:91
+#, c-format
+msgid "While reading version on %s"
+msgstr ""
+
+#: misc/mke2fs.c:114
+#, 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]\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] [-jnqvDFKSV] device [blocks-"
+"count]\n"
+msgstr ""
+
+#: misc/mke2fs.c:217
+#, c-format
+msgid "Running command: %s\n"
+msgstr "正在执行命令: %s\n"
+
+#: misc/mke2fs.c:221
+#, c-format
+msgid "while trying to run '%s'"
+msgstr "当尝试运行 '%s' 时"
+
+#: misc/mke2fs.c:228
+msgid "while processing list of bad blocks from program"
+msgstr ""
+
+#: misc/mke2fs.c:255
+#, c-format
+msgid "Block %d in primary superblock/group descriptor area bad.\n"
+msgstr ""
+
+#: misc/mke2fs.c:257
+#, c-format
+msgid "Blocks %u through %u must be good in order to build a filesystem.\n"
+msgstr ""
+
+#: misc/mke2fs.c:260
+msgid "Aborting....\n"
+msgstr "正在终止...\n"
+
+#: misc/mke2fs.c:280
+#, c-format
+msgid ""
+"Warning: the backup superblock/group descriptors at block %u contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:299
+msgid "while marking bad blocks as used"
+msgstr ""
+
+#: misc/mke2fs.c:316
+msgid "Writing inode tables: "
+msgstr "正在写入inode表: "
+
+#: misc/mke2fs.c:337
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %llu: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:351 misc/mke2fs.c:2175 misc/mke2fs.c:2429
+#, c-format
+msgid "done                            \n"
+msgstr "完成                            \n"
+
+#: misc/mke2fs.c:362
+msgid "while creating root dir"
+msgstr ""
+
+#: misc/mke2fs.c:369
+msgid "while reading root inode"
+msgstr "当读取坏块inode时"
+
+#: misc/mke2fs.c:383
+msgid "while setting root inode ownership"
+msgstr ""
+
+#: misc/mke2fs.c:401
+msgid "while creating /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:408
+msgid "while looking up /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:421
+msgid "while expanding /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:436
+msgid "while setting bad block inode"
+msgstr ""
+
+#: misc/mke2fs.c:463
+#, c-format
+msgid "Out of memory erasing sectors %d-%d\n"
+msgstr ""
+
+#: misc/mke2fs.c:473
+#, c-format
+msgid "Warning: could not read block 0: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:489
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:505
+msgid "while initializing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:513
+msgid "Zeroing journal device: "
+msgstr "正在将日志设备清零: "
+
+#: misc/mke2fs.c:525
+#, c-format
+msgid "while zeroing journal device (block %llu, count %d)"
+msgstr ""
+
+#: misc/mke2fs.c:543
+msgid "while writing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:558
+#, fuzzy, c-format
+msgid ""
+"warning: %llu blocks unused.\n"
+"\n"
+msgstr ""
+"警告: %u 块未使用.\n"
+"\n"
+
+#: misc/mke2fs.c:563
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "文件系统标签=%s\n"
+
+#: misc/mke2fs.c:566
+#, fuzzy, c-format
+msgid "OS type: %s\n"
+msgstr "操作系统:"
+
+#: misc/mke2fs.c:568
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "块大小=%u (log=%u)\n"
+
+#: misc/mke2fs.c:572
+#, fuzzy, c-format
+msgid "Cluster size=%u (log=%u)\n"
+msgstr "块大小=%u (log=%u)\n"
+
+#: misc/mke2fs.c:576
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "分块大小=%u (log=%u)\n"
+
+#: misc/mke2fs.c:578
+#, c-format
+msgid "Stride=%u blocks, Stripe width=%u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:580
+#, c-format
+msgid "%u inodes, %llu blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:582
+#, c-format
+msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
+msgstr ""
+
+#: misc/mke2fs.c:585
+#, c-format
+msgid "First data block=%u\n"
+msgstr "第一个数据块=%u\n"
+
+#: misc/mke2fs.c:587
+#, c-format
+msgid "Maximum filesystem blocks=%lu\n"
+msgstr ""
+
+#: misc/mke2fs.c:591
+#, c-format
+msgid "%u block groups\n"
+msgstr ""
+
+#: misc/mke2fs.c:593
+#, c-format
+msgid "%u block group\n"
+msgstr ""
+
+#: misc/mke2fs.c:596
+#, c-format
+msgid "%u blocks per group, %u clusters per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:599
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:601
+#, c-format
+msgid "%u inodes per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:608
+#, c-format
+msgid "Superblock backups stored on blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:687 misc/tune2fs.c:1165
+#, fuzzy, c-format
+msgid "Invalid mmp_update_interval: %s\n"
+msgstr "设置了无效的挂载选项: %s\n"
+
+#: misc/mke2fs.c:701
+#, c-format
+msgid "Invalid stride parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:716
+#, c-format
+msgid "Invalid stripe-width parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:739
+#, c-format
+msgid "Invalid resize parameter: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:746
+#, c-format
+msgid "The resize maximum must be greater than the filesystem size.\n"
+msgstr ""
+
+#: misc/mke2fs.c:770
+#, c-format
+msgid "On-line resizing not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:808
+#, fuzzy, c-format
+msgid "Invalid quotatype parameter: %s\n"
+msgstr "设置了无效的挂载选项: %s\n"
+
+#: misc/mke2fs.c:819
+#, 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"
+"\tstride=<RAID per-disk data chunk in blocks>\n"
+"\tstripe-width=<RAID stride * data disks in blocks>\n"
+"\tresize=<resize maximum size in blocks>\n"
+"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
+"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
+"\ttest_fs\n"
+"\tdiscard\n"
+"\tnodiscard\n"
+"\tquotatype=<usr OR grp>\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:839
+#, c-format
+msgid ""
+"\n"
+"Warning: RAID stripe-width %u not an even multiple of stride %u.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:878
+#, c-format
+msgid ""
+"Syntax error in mke2fs config file (%s, line #%d)\n"
+"\t%s\n"
+msgstr ""
+
+#: misc/mke2fs.c:891 misc/tune2fs.c:393
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "设置了无效的文件系统选项: %s\n"
+
+#: misc/mke2fs.c:903 misc/tune2fs.c:345
+#, c-format
+msgid "Invalid mount option set: %s\n"
+msgstr "设置了无效的挂载选项: %s\n"
+
+#: misc/mke2fs.c:1043
+#, c-format
+msgid ""
+"\n"
+"Your mke2fs.conf file does not define the %s filesystem type.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1047
+#, c-format
+msgid ""
+"You probably need to install an updated mke2fs.conf file.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1051
+#, fuzzy, c-format
+msgid "Aborting...\n"
+msgstr "正在终止...\n"
+
+#: misc/mke2fs.c:1091
+#, c-format
+msgid ""
+"\n"
+"Warning: the fs_type %s is not defined in mke2fs.conf\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:1249
+#, fuzzy, c-format
+msgid "Couldn't allocate memory for new PATH.\n"
+msgstr "无法为tdb文件名分配内存\n"
+
+#: misc/mke2fs.c:1290
+#, c-format
+msgid "Couldn't init profile successfully (error: %ld).\n"
+msgstr ""
+
+#: misc/mke2fs.c:1330
+#, c-format
+msgid "invalid block size - %s"
+msgstr "无效的块大小 - %s"
+
+#: misc/mke2fs.c:1334
+#, c-format
+msgid "Warning: blocksize %d not usable on most systems.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1350
+#, fuzzy, c-format
+msgid "invalid cluster size - %s"
+msgstr "无效的块大小 - %s"
+
+#: misc/mke2fs.c:1362
+msgid "Illegal number for blocks per group"
+msgstr ""
+
+#: misc/mke2fs.c:1367
+msgid "blocks per group must be multiple of 8"
+msgstr ""
+
+#: misc/mke2fs.c:1375
+msgid "Illegal number for flex_bg size"
+msgstr ""
+
+#: misc/mke2fs.c:1381
+msgid "flex_bg size must be a power of 2"
+msgstr "flex_bg 大小必须是2的次方"
+
+#: misc/mke2fs.c:1391
+#, c-format
+msgid "invalid inode ratio %s (min %d/max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:1401
+#, c-format
+msgid ""
+"Warning: -K option is deprecated and should not be used anymore. Use '-E "
+"nodiscard' extended option instead!\n"
+msgstr ""
+
+#: misc/mke2fs.c:1415
+msgid "in malloc for bad_blocks_filename"
+msgstr ""
+
+#: misc/mke2fs.c:1425
+#, c-format
+msgid "invalid reserved blocks percent - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1443
+#, c-format
+msgid "bad revision level - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1455
+#, c-format
+msgid "invalid inode size - %s"
+msgstr "无效的inode大小 - %s"
+
+#: misc/mke2fs.c:1475
+#, c-format
+msgid "bad num inodes - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1492
+#, fuzzy
+msgid "The -t option may only be used once"
+msgstr "-o只能被指定一次"
+
+#: misc/mke2fs.c:1500
+#, fuzzy
+msgid "The -T option may only be used once"
+msgstr "-o只能被指定一次"
+
+#: misc/mke2fs.c:1550 misc/mke2fs.c:2508
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1556
+#, c-format
+msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1562
+#, c-format
+msgid "Using journal device's blocksize: %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1573
+#, fuzzy, c-format
+msgid "invalid blocks '%s' on device '%s'"
+msgstr "无效的块大小 - %s"
+
+#: misc/mke2fs.c:1583
+msgid "filesystem"
+msgstr "文件系统"
+
+#: misc/mke2fs.c:1596 resize/main.c:374
+msgid "while trying to determine filesystem size"
+msgstr ""
+
+#: misc/mke2fs.c:1602
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+
+#: misc/mke2fs.c:1609
+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:1626
+msgid "Filesystem larger than apparent device size."
+msgstr ""
+
+#: misc/mke2fs.c:1646
+#, c-format
+msgid "Failed to parse fs types list\n"
+msgstr ""
+
+#: misc/mke2fs.c:1700
+#, 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:1716
+msgid "fs_types for mke2fs.conf resolution: "
+msgstr ""
+
+#: misc/mke2fs.c:1723
+#, c-format
+msgid "Filesystem features not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1730
+#, c-format
+msgid "Sparse superblocks not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1742
+#, c-format
+msgid "Journals not supported with revision 0 filesystems\n"
+msgstr ""
+
+#: misc/mke2fs.c:1756
+#, fuzzy, c-format
+msgid "invalid reserved blocks percent - %lf"
+msgstr "无效的块大小 - %s"
+
+#: misc/mke2fs.c:1772
+#, c-format
+msgid ""
+"The resize_inode and meta_bg features are not compatible.\n"
+"They can not be both enabled simultaneously.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1789
+msgid "while trying to determine hardware sector size"
+msgstr ""
+
+#: misc/mke2fs.c:1795
+#, fuzzy
+msgid "while trying to determine physical sector size"
+msgstr "当尝试对%s进行stat调用时"
+
+#: misc/mke2fs.c:1828
+msgid "while setting blocksize; too small for device\n"
+msgstr ""
+
+#: misc/mke2fs.c:1833
+#, c-format
+msgid ""
+"Warning: specified blocksize %d is less than device physical sectorsize %d\n"
+msgstr ""
+
+#: misc/mke2fs.c:1864
+#, c-format
+msgid "warning: Unable to get device geometry for %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1867
+#, c-format
+msgid "%s alignment is offset by %lu bytes.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1869
+#, c-format
+msgid ""
+"This may result in very poor performance, (re)-partitioning suggested.\n"
+msgstr ""
+
+#: misc/mke2fs.c:1880
+#, c-format
+msgid "%d-byte blocks too big for system (max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:1884
+#, c-format
+msgid ""
+"Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgstr ""
+
+#: misc/mke2fs.c:1920
+msgid "reserved online resize blocks not supported on non-sparse filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:1929
+msgid "blocks per group count out of range"
+msgstr ""
+
+#: misc/mke2fs.c:1944
+msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
+msgstr ""
+
+#: misc/mke2fs.c:1956
+#, c-format
+msgid "invalid inode size %d (min %d/max %d)"
+msgstr ""
+
+#: misc/mke2fs.c:1974
+#, c-format
+msgid "too many inodes (%llu), raise inode ratio?"
+msgstr ""
+
+#: misc/mke2fs.c:1981
+#, c-format
+msgid "too many inodes (%llu), specify < 2^32 inodes"
+msgstr ""
+
+#: misc/mke2fs.c:1995
+#, 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:2114
+#, c-format
+msgid ""
+"Overwriting existing filesystem; this can be undone using the command:\n"
+"    e2undo %s %s\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:2128
+#, fuzzy
+msgid "while trying to setup undo file\n"
+msgstr "当尝试对%s进行stat调用时"
+
+#: misc/mke2fs.c:2154
+#, fuzzy
+msgid "Discarding device blocks: "
+msgstr "正在读取目录块"
+
+#: misc/mke2fs.c:2170
+msgid "failed - "
+msgstr ""
+
+#: misc/mke2fs.c:2277
+msgid "while setting up superblock"
+msgstr ""
+
+#: misc/mke2fs.c:2286
+#, c-format
+msgid "Discard succeeded and will return 0s  - skipping inode table wipe\n"
+msgstr ""
+
+#: misc/mke2fs.c:2369
+#, c-format
+msgid "unknown os - %s"
+msgstr "未知操作系统 - %s"
+
+#: misc/mke2fs.c:2421
+#, fuzzy, c-format
+msgid "Allocating group tables: "
+msgstr "正在写入inode表: "
+
+#: misc/mke2fs.c:2425
+msgid "while trying to allocate filesystem tables"
+msgstr ""
+
+#: misc/mke2fs.c:2434
+msgid ""
+"\n"
+"\twhile converting subcluster bitmap"
+msgstr ""
+
+#: misc/mke2fs.c:2477
+#, c-format
+msgid "while zeroing block %llu at end of filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:2490
+msgid "while reserving blocks for online resize"
+msgstr ""
+
+#: misc/mke2fs.c:2501 misc/tune2fs.c:640
+msgid "journal"
+msgstr "日志"
+
+#: misc/mke2fs.c:2513
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr ""
+
+#: misc/mke2fs.c:2520
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+
+#: misc/mke2fs.c:2525 misc/mke2fs.c:2557 misc/tune2fs.c:669 misc/tune2fs.c:683
+#, c-format
+msgid "done\n"
+msgstr "完成\n"
+
+#: misc/mke2fs.c:2534
+#, c-format
+msgid "Skipping journal creation in super-only mode\n"
+msgstr ""
+
+#: misc/mke2fs.c:2545
+#, c-format
+msgid "Creating journal (%u blocks): "
+msgstr ""
+
+#: misc/mke2fs.c:2553
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+
+#: misc/mke2fs.c:2564 misc/tune2fs.c:446
+#, c-format
+msgid ""
+"\n"
+"Error while enabling multiple mount protection feature."
+msgstr ""
+
+#: misc/mke2fs.c:2569
+#, c-format
+msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2582
+#, c-format
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+
+#: misc/mke2fs.c:2589
+#, c-format
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+
+#: misc/mke2fs.c:2591
+#, c-format
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"完成\n"
+"\n"
+
+#: misc/mklost+found.c:50
+#, c-format
+msgid "Usage: mklost+found\n"
+msgstr "用法: mklost+found\n"
+
+#: misc/partinfo.c:41
+#, 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 device...\n"
+"\n"
+"输出每个给定设备的分区信息.\n"
+"例如: %s /dev/hda\n"
+"\n"
+
+#: misc/partinfo.c:51
+#, c-format
+msgid "Cannot open %s: %s"
+msgstr "无法打开 %s: %s"
+
+#: misc/partinfo.c:57
+#, c-format
+msgid "Cannot get geometry of %s: %s"
+msgstr ""
+
+#: misc/partinfo.c:65
+#, c-format
+msgid "Cannot get size of %s: %s"
+msgstr "无法获得 %s 的大小: %s"
+
+#: misc/partinfo.c:71
+#, c-format
+msgid "%s: h=%3d s=%3d c=%4d   start=%8d size=%8lu end=%8d\n"
+msgstr ""
+
+#: misc/tune2fs.c:107
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr "请在这个文件系统上运行 e2fsck.\n"
+
+#: misc/tune2fs.c:116
+#, c-format
+msgid ""
+"Usage: %s [-c max_mounts_count] [-e errors_behavior] [-g group]\n"
+"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
+"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-p "
+"mmp_update_interval]\n"
+"\t[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]\n"
+"\t[-M last_mounted_dir] [-O [^]feature[,...]]\n"
+"\t[-E extended-option[,...]] [-T last_check_time] [-U UUID]\n"
+"\t[ -I new_inode_size ] device\n"
+msgstr ""
+
+#: misc/tune2fs.c:205
+msgid "while trying to open external journal"
+msgstr ""
+
+#: misc/tune2fs.c:210
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s 不是一个日志设备.\n"
+
+#: misc/tune2fs.c:225
+msgid "Journal superblock not found!\n"
+msgstr "日志超级块未找到!\n"
+
+#: misc/tune2fs.c:236
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:257
+msgid ""
+"Cannot locate journal device. It was NOT removed\n"
+"Use -f option to remove missing journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:265
+msgid "Journal removed\n"
+msgstr "日志已删除\n"
+
+#: misc/tune2fs.c:309
+msgid "while reading bitmaps"
+msgstr "当读取位图时"
+
+#: misc/tune2fs.c:317
+msgid "while clearing journal inode"
+msgstr "当读取坏块inode时"
+
+#: misc/tune2fs.c:328
+msgid "while writing journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:363
+#, c-format
+msgid "(and reboot afterwards!)\n"
+msgstr "(并且过后重启!)\n"
+
+#: misc/tune2fs.c:396
+#, c-format
+msgid "Clearing filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:402
+#, c-format
+msgid "Setting filesystem feature '%s' not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:411
+msgid ""
+"The has_journal feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:419
+msgid ""
+"The needs_recovery flag is set.  Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+
+#: misc/tune2fs.c:438
+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:456
+#, c-format
+msgid "Multiple mount protection has been enabled with update interval %ds.\n"
+msgstr ""
+
+#: misc/tune2fs.c:465
+msgid ""
+"The multiple mount protection feature cannot\n"
+"be disabled if the filesystem is readonly.\n"
+msgstr ""
+
+#: misc/tune2fs.c:473
+#, fuzzy
+msgid "Error while reading bitmaps\n"
+msgstr "当读取位图时"
+
+#: misc/tune2fs.c:482
+#, c-format
+msgid "Magic number in MMP block does not match. expected: %x, actual: %x\n"
+msgstr ""
+
+#: misc/tune2fs.c:487
+#, fuzzy
+msgid "while reading MMP block."
+msgstr "当读取坏块inode时"
+
+#: misc/tune2fs.c:519
+msgid ""
+"Clearing the flex_bg flag would cause the the filesystem to be\n"
+"inconsistent.\n"
+msgstr ""
+
+#: misc/tune2fs.c:530
+msgid ""
+"The huge_file feature may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:590
+msgid ""
+"\n"
+"Warning: '^quota' option overrides '-Q'arguments.\n"
+msgstr ""
+
+#: misc/tune2fs.c:635
+msgid "The filesystem already has a journal.\n"
+msgstr ""
+
+#: misc/tune2fs.c:653
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:657
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr ""
+
+#: misc/tune2fs.c:665
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr ""
+
+#: misc/tune2fs.c:671
+msgid "Creating journal inode: "
+msgstr ""
+
+#: misc/tune2fs.c:680
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+
+#: misc/tune2fs.c:763
+#, fuzzy
+msgid "Couldn't allocate memory to parse quota options!\n"
+msgstr "无法为tdb文件名分配内存\n"
+
+#: misc/tune2fs.c:785
+msgid ""
+"\n"
+"Bad quota options specified.\n"
+"\n"
+"Following valid quota options are available (pass by separating with "
+"comma):\n"
+"\t[^]usrquota\n"
+"\t[^]grpquota\n"
+"\n"
+"\n"
+msgstr ""
+
+#: misc/tune2fs.c:846
+#, c-format
+msgid "Couldn't parse date/time specifier: %s"
+msgstr ""
+
+#: misc/tune2fs.c:870 misc/tune2fs.c:883
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "错误挂载计数 - %s"
+
+#: misc/tune2fs.c:899
+#, c-format
+msgid "bad error behavior - %s"
+msgstr ""
+
+#: misc/tune2fs.c:926
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:959
+#, c-format
+msgid "bad interval - %s"
+msgstr ""
+
+#: misc/tune2fs.c:988
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1003
+msgid "-o may only be specified once"
+msgstr "-o只能被指定一次"
+
+#: misc/tune2fs.c:1012
+msgid "-O may only be specified once"
+msgstr "-O只能被指定一次"
+
+#: misc/tune2fs.c:1027
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1056
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:1073
+#, c-format
+msgid "bad inode size - %s"
+msgstr "无效的inode大小 - %s"
+
+#: misc/tune2fs.c:1080
+#, c-format
+msgid "Inode size must be a power of two- %s"
+msgstr "Inode 大小必须是2的次方- %s"
+
+#: misc/tune2fs.c:1174
+#, c-format
+msgid "mmp_update_interval too big: %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:1179
+#, 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:1202
+#, c-format
+msgid "Invalid RAID stride: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:1217
+#, c-format
+msgid "Invalid RAID stripe-width: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:1232
+#, c-format
+msgid "Invalid hash algorithm: %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:1238
+#, c-format
+msgid "Setting default hash algorithm to %s (%d)\n"
+msgstr ""
+
+#: misc/tune2fs.c:1257
+#, c-format
+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"
+msgstr ""
+
+#: misc/tune2fs.c:1723
+#, fuzzy
+msgid "Failed to read inode bitmap\n"
+msgstr "当读取位图时"
+
+#: misc/tune2fs.c:1728
+#, fuzzy
+msgid "Failed to read block bitmap\n"
+msgstr "错误块映射中的inode"
+
+#: misc/tune2fs.c:1745 resize/resize2fs.c:784
+msgid "blocks to be moved"
+msgstr ""
+
+#: misc/tune2fs.c:1748
+msgid "Failed to allocate block bitmap when increasing inode size\n"
+msgstr ""
+
+#: misc/tune2fs.c:1754
+msgid "Not enough space to increase inode size \n"
+msgstr ""
+
+#: misc/tune2fs.c:1759
+msgid "Failed to relocate blocks during inode resize \n"
+msgstr ""
+
+#: misc/tune2fs.c:1791
+msgid ""
+"Error in resizing the inode size.\n"
+"Run e2undo to undo the file system changes. \n"
+msgstr ""
+
+#: misc/tune2fs.c:1818
+msgid "Couldn't allocate memory for tdb filename\n"
+msgstr "无法为tdb文件名分配内存\n"
+
+#: misc/tune2fs.c:1840
+#, c-format
+msgid "while trying to delete %s"
+msgstr "当尝试删除 %s 时"
+
+#: misc/tune2fs.c:1850
+#, c-format
+msgid ""
+"To undo the tune2fs operation please run the command\n"
+"    e2undo %s %s\n"
+"\n"
+msgstr ""
+"要撤销这次 tune2fs 操作请运行命令:\n"
+"    e2undo %s %s\n"
+"\n"
+
+#: misc/tune2fs.c:1919
+#, c-format
+msgid ""
+"MMP block magic is bad. Try to fix it by running:\n"
+"'e2fsck -f %s'\n"
+msgstr ""
+
+#: misc/tune2fs.c:1937
+#, c-format
+msgid "The inode size is already %lu\n"
+msgstr "inode大小已经是 %lu\n"
+
+#: misc/tune2fs.c:1943
+#, c-format
+msgid "Shrinking the inode size is not supported\n"
+msgstr ""
+
+#: misc/tune2fs.c:1990
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:1996
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:2001
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:2006
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2011
+#, fuzzy, c-format
+msgid "interval between checks is too big (%lu)"
+msgstr "保留块的数量太大 (%lu)"
+
+#: misc/tune2fs.c:2018
+#, c-format
+msgid "Setting interval between checks to %lu seconds\n"
+msgstr ""
+
+#: misc/tune2fs.c:2025
+#, fuzzy, c-format
+msgid "Setting reserved blocks percentage to %g%% (%llu blocks)\n"
+msgstr "保留块的数量太大 (%lu)"
+
+#: misc/tune2fs.c:2031
+#, fuzzy, c-format
+msgid "reserved blocks count is too big (%llu)"
+msgstr "保留块的数量太大 (%lu)"
+
+#: misc/tune2fs.c:2038
+#, fuzzy, c-format
+msgid "Setting reserved blocks count to %llu\n"
+msgstr "保留块的数量太大 (%lu)"
+
+#: misc/tune2fs.c:2044
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2051
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set.  %s"
+msgstr ""
+
+#: misc/tune2fs.c:2056
+msgid ""
+"\n"
+"Clearing the sparse superflag not supported.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2064
+#, c-format
+msgid "Setting time filesystem last checked to %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:2070
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:2102
+msgid "Error in using clear_mmp. It must be used with -f\n"
+msgstr ""
+
+#: misc/tune2fs.c:2120
+msgid ""
+"The quota feature may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2153
+msgid "Invalid UUID format\n"
+msgstr "无效的 UUID 格式\n"
+
+#: misc/tune2fs.c:2166
+msgid "The inode size may only be changed when the filesystem is unmounted.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2174
+msgid ""
+"Changing the inode size not supported for filesystems with the flex_bg\n"
+"feature enabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:2187
+#, c-format
+msgid "Setting inode size %lu\n"
+msgstr "正在将inode大小设置为 %lu\n"
+
+#: misc/tune2fs.c:2190
+#, fuzzy, c-format
+msgid "Failed to change inode size\n"
+msgstr "打开%s失败\n"
+
+#: misc/tune2fs.c:2201
+#, c-format
+msgid "Setting stride size to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:2206
+#, c-format
+msgid "Setting stripe width to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:2213
+#, c-format
+msgid "Setting extended default mount options to '%s'\n"
+msgstr ""
+
+#: misc/util.c:74
+msgid "Proceed anyway? (y,n) "
+msgstr "无论如何也要继续? (y,n) "
+
+#: misc/util.c:89
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr "无法对 %s 进行 stat 调用 --- %s\n"
+
+#: misc/util.c:92
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+
+#: misc/util.c:103
+#, fuzzy, c-format
+msgid "%s is not a block special device.\n"
+msgstr "错误:%s 不是块设备\n"
+
+#: misc/util.c:132
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr ""
+
+#: misc/util.c:154
+msgid "mke2fs forced anyway.  Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/util.c:159
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr ""
+
+#: misc/util.c:166
+msgid "mke2fs forced anyway.\n"
+msgstr "mke2fs 强制执行.\n"
+
+#: misc/util.c:182
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr ""
+
+#: misc/util.c:207
+#, c-format
+msgid ""
+"\n"
+"Could not find journal device matching %s\n"
+msgstr ""
+
+#: misc/util.c:228
+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"
+"\n"
+"The journal size must be between 1024 and 10240000 filesystem blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/util.c:258
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"文件系统小得无法记录日志\n"
+
+#: misc/util.c:265
+#, 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:273
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+
+#: misc/util.c:287
+#, 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:48
+#, c-format
+msgid "Usage: %s [-d] [-p pidfile] [-s socketpath] [-T timeout]\n"
+msgstr ""
+
+#: misc/uuidd.c:50
+#, c-format
+msgid "       %s [-r|t] [-n num] [-s socketpath]\n"
+msgstr ""
+
+#: misc/uuidd.c:52
+#, c-format
+msgid "       %s -k\n"
+msgstr ""
+
+#: misc/uuidd.c:154
+#, fuzzy
+msgid "bad arguments"
+msgstr "%s: 参数过多\n"
+
+#: misc/uuidd.c:172
+msgid "connect"
+msgstr ""
+
+#: misc/uuidd.c:191
+msgid "write"
+msgstr ""
+
+#: misc/uuidd.c:199
+msgid "read count"
+msgstr ""
+
+#: misc/uuidd.c:205
+#, fuzzy
+msgid "bad response length"
+msgstr "无效的后缀长度"
+
+#: misc/uuidd.c:270
+#, c-format
+msgid "uuidd daemon already running at pid %s\n"
+msgstr ""
+
+#: misc/uuidd.c:278
+#, c-format
+msgid "Couldn't create unix stream socket: %s"
+msgstr ""
+
+#: misc/uuidd.c:307
+#, c-format
+msgid "Couldn't bind unix socket %s: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:315
+#, c-format
+msgid "Couldn't listen on unix socket %s: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:353
+#, fuzzy, c-format
+msgid "Error reading from client, len = %d\n"
+msgstr "读取@i %i出错: %m\n"
+
+#: misc/uuidd.c:361
+#, c-format
+msgid "operation %d, incoming num = %d\n"
+msgstr ""
+
+#: misc/uuidd.c:380
+#, c-format
+msgid "Generated time UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:390
+#, c-format
+msgid "Generated random UUID: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:399
+#, 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:420
+#, c-format
+msgid "Generated %d UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:432
+#, fuzzy, c-format
+msgid "Invalid operation %d\n"
+msgstr "无效的EA版本号.\n"
+
+#: misc/uuidd.c:476 misc/uuidd.c:498
+#, c-format
+msgid "Bad number: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:533 misc/uuidd.c:562
+#, fuzzy, c-format
+msgid "Error calling uuidd daemon (%s): %s\n"
+msgstr "创建根@d (%s) 时出错: %m\n"
+
+#: misc/uuidd.c:543
+#, c-format
+msgid "%s and subsequent UUID\n"
+msgid_plural "%s and subsequent %d UUIDs\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: misc/uuidd.c:547
+#, c-format
+msgid "List of UUID's:\n"
+msgstr ""
+
+#: misc/uuidd.c:568
+#, c-format
+msgid "Unexpected reply length from server %d\n"
+msgstr ""
+
+#: misc/uuidd.c:585
+#, c-format
+msgid "Couldn't kill uuidd running at pid %d: %s\n"
+msgstr ""
+
+#: misc/uuidd.c:591
+#, c-format
+msgid "Killed uuidd running at pid %d\n"
+msgstr ""
+
+#: misc/uuidgen.c:32
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr "用法: %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:43
+#, c-format
+msgid ""
+"Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:65
+msgid "Extending the inode table"
+msgstr "正在扩充inode表"
+
+#: resize/main.c:68
+msgid "Relocating blocks"
+msgstr "正在重定位块"
+
+#: resize/main.c:71
+msgid "Scanning inode table"
+msgstr "正在扫描inode表"
+
+#: resize/main.c:74
+msgid "Updating inode references"
+msgstr "正在更新inode引用"
+
+#: resize/main.c:77
+msgid "Moving inode table"
+msgstr "移动inode表"
+
+#: resize/main.c:80
+msgid "Unknown pass?!?"
+msgstr "未知步骤?!?"
+
+#: resize/main.c:83
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr ""
+
+#: resize/main.c:259
+#, c-format
+msgid "while opening %s"
+msgstr "打开%s时"
+
+#: resize/main.c:267
+#, c-format
+msgid "while getting stat information for %s"
+msgstr "获取%s的stat信息时出错。"
+
+#: resize/main.c:331
+#, c-format
+msgid ""
+"%s: The combination of flex_bg and\n"
+"\t!resize_inode features is not supported by resize2fs.\n"
+msgstr ""
+
+#: resize/main.c:344 resize/main.c:452
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+"请先运行 'e2fsck -f %s'.\n"
+"\n"
+
+#: resize/main.c:348
+#, c-format
+msgid "Estimated minimum size of the filesystem: %llu\n"
+msgstr ""
+
+#: resize/main.c:384
+#, c-format
+msgid "Invalid new size: %s\n"
+msgstr "无效的新大小:%s\n"
+
+#: resize/main.c:392
+msgid "New size too large to be expressed in 32 bits\n"
+msgstr ""
+
+#: resize/main.c:404
+#, c-format
+msgid "New size smaller than minimum (%llu)\n"
+msgstr ""
+
+#: resize/main.c:410
+#, fuzzy
+msgid "Invalid stride length"
+msgstr "无效的后缀长度"
+
+#: resize/main.c:434
+#, 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:441
+#, c-format
+msgid ""
+"The filesystem is already %llu blocks long.  Nothing to do!\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:456
+#, c-format
+msgid "Resizing the filesystem on %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/main.c:465
+#, c-format
+msgid "while trying to resize %s"
+msgstr "当尝试调整%s的大小时"
+
+#: resize/main.c:468
+#, c-format
+msgid ""
+"Please run 'e2fsck -fy %s' to fix the filesystem\n"
+"after the aborted resize operation.\n"
+msgstr ""
+
+#: resize/main.c:474
+#, c-format
+msgid ""
+"The filesystem on %s is now %llu blocks long.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:489
+#, c-format
+msgid "while trying to truncate %s"
+msgstr "当尝试对%s进行stat调用时"
+
+#: resize/online.c:40
+#, c-format
+msgid "Filesystem at %s is mounted on %s; on-line resizing required\n"
+msgstr ""
+
+#: resize/online.c:44
+msgid "On-line shrinking not supported"
+msgstr ""
+
+#: resize/online.c:63
+msgid "Filesystem does not support online resizing"
+msgstr "文件系统不支持在线(online)调整大小"
+
+#: resize/online.c:70
+#, c-format
+msgid "while trying to open mountpoint %s"
+msgstr ""
+
+#: resize/online.c:92 resize/online.c:116
+msgid "Permission denied to resize filesystem"
+msgstr "没有调整文件系统大小的权限"
+
+#: resize/online.c:95 resize/online.c:122
+msgid "While checking for on-line resizing support"
+msgstr "当检查在线文件系统大小调整支持时"
+
+#: resize/online.c:107
+#, fuzzy
+msgid "Kernel does not support resizing a file system this large"
+msgstr "内核不支持在线(online)调整大小"
+
+#: resize/online.c:119
+msgid "Kernel does not support online resizing"
+msgstr "内核不支持在线(online)调整大小"
+
+#: resize/online.c:152
+#, c-format
+msgid "Performing an on-line resize of %s to %llu (%dk) blocks.\n"
+msgstr ""
+
+#: resize/online.c:162
+msgid "While trying to extend the last group"
+msgstr ""
+
+#: resize/online.c:216
+#, c-format
+msgid "While trying to add group #%d"
+msgstr ""
+
+#: resize/online.c:227
+#, 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:348
+#, c-format
+msgid "inodes (%llu) must be less than %u"
+msgstr ""
+
+#: resize/resize2fs.c:576
+msgid "reserved blocks"
+msgstr "保留的块"
+
+#: resize/resize2fs.c:789
+msgid "meta-data blocks"
+msgstr "元数据块"
+
+#: resize/resize2fs.c:1735
+#, c-format
+msgid "Should never happen: resize inode corrupt!\n"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:11
+msgid "EXT2FS Library version 1.42.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 "读取日志超级块\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 ", 组描述符位于 "
+
+#: lib/ext2fs/ext2_err.c:34
+#, fuzzy
+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
+#, fuzzy
+msgid "Can't write an inode bitmap"
+msgstr "inode 位图"
+
+#: lib/ext2fs/ext2_err.c:39
+#, fuzzy
+msgid "Can't read an inode bitmap"
+msgstr "inode 位图"
+
+#: lib/ext2fs/ext2_err.c:40
+#, fuzzy
+msgid "Can't write a block bitmap"
+msgstr "块位图"
+
+#: lib/ext2fs/ext2_err.c:41
+#, fuzzy
+msgid "Can't read a block bitmap"
+msgstr "块位图"
+
+#: lib/ext2fs/ext2_err.c:42
+#, fuzzy
+msgid "Can't write an inode table"
+msgstr "正在扫描inode表"
+
+#: lib/ext2fs/ext2_err.c:43
+#, fuzzy
+msgid "Can't read an inode table"
+msgstr "正在扫描inode表"
+
+#: 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
+#, fuzzy
+msgid "Inode bitmap not loaded"
+msgstr "inode 位图"
+
+#: lib/ext2fs/ext2_err.c:51
+#, fuzzy
+msgid "Block bitmap not loaded"
+msgstr "块位图"
+
+#: lib/ext2fs/ext2_err.c:52
+#, fuzzy
+msgid "Illegal inode number"
+msgstr "非法的块数量!\n"
+
+#: lib/ext2fs/ext2_err.c:53
+#, fuzzy
+msgid "Illegal block number"
+msgstr "非法的块数量!\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 "正在读取目录块"
+
+#: 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
+#, fuzzy
+msgid "Filesystem has unsupported feature(s)"
+msgstr "文件系统不支持在线(online)调整大小"
+
+#: lib/ext2fs/ext2_err.c:79
+#, fuzzy
+msgid "Filesystem has unsupported read-only feature(s)"
+msgstr "文件系统不支持在线(online)调整大小"
+
+#: 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 "A分配出错"
+
+#: 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 "无法分配块缓存 (大小=%d)\n"
+
+#: lib/ext2fs/ext2_err.c:84
+#, fuzzy
+msgid "Could not allocate inode in ext2 filesystem"
+msgstr "e2label: 不是一个ex2文件系统\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 "空目录块 %u (#%d),于 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
+msgid "Supplied journal device not a block device"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:95
+#, fuzzy
+msgid "Journal superblock not found"
+msgstr "日志超级块未找到!\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
+msgid "Error loading external journal"
+msgstr ""
+
+#: lib/ext2fs/ext2_err.c:99
+#, fuzzy
+msgid "Journal not found"
+msgstr "日志超级块未找到!\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 "a扩展属性"
+
+#: 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>"
+
+#: 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
+#, fuzzy
+msgid "No 'next' extent"
+msgstr "x程度"
+
+#: 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未找到."
+
+#: 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: fsck 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 ""
+
+#: e2fsck/prof_err.c:11
+msgid "Profile version 0.0"
+msgstr ""
+
+#: e2fsck/prof_err.c:12
+msgid "Bad magic value in profile_node"
+msgstr ""
+
+#: e2fsck/prof_err.c:13
+msgid "Profile section not found"
+msgstr ""
+
+#: e2fsck/prof_err.c:14
+#, fuzzy
+msgid "Profile relation not found"
+msgstr "当读取坏块inode时"
+
+#: e2fsck/prof_err.c:15
+msgid "Attempt to add a relation to node which is not a section"
+msgstr ""
+
+#: e2fsck/prof_err.c:16
+msgid "A profile section header has a non-zero value"
+msgstr ""
+
+#: e2fsck/prof_err.c:17
+msgid "Bad linked list in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:18
+msgid "Bad group level in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:19
+msgid "Bad parent pointer in profile structures"
+msgstr ""
+
+#: e2fsck/prof_err.c:20
+msgid "Bad magic value in profile iterator"
+msgstr ""
+
+#: e2fsck/prof_err.c:21
+msgid "Can't set value on section node"
+msgstr ""
+
+#: e2fsck/prof_err.c:22
+msgid "Invalid argument passed to profile library"
+msgstr ""
+
+#: e2fsck/prof_err.c:23
+msgid "Attempt to modify read-only profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:24
+msgid "Profile section header not at top level"
+msgstr ""
+
+#: e2fsck/prof_err.c:25
+msgid "Syntax error in profile section header"
+msgstr ""
+
+#: e2fsck/prof_err.c:26
+msgid "Syntax error in profile relation"
+msgstr ""
+
+#: e2fsck/prof_err.c:27
+msgid "Extra closing brace in profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:28
+msgid "Missing open brace in profile"
+msgstr ""
+
+#: e2fsck/prof_err.c:29
+msgid "Bad magic value in profile_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:30
+msgid "Bad magic value in profile_section_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:31
+msgid "Iteration through all top level section not supported"
+msgstr ""
+
+#: e2fsck/prof_err.c:32
+#, fuzzy
+msgid "Invalid profile_section object"
+msgstr "设置了无效的文件系统选项: %s\n"
+
+#: e2fsck/prof_err.c:33
+msgid "No more sections"
+msgstr ""
+
+#: e2fsck/prof_err.c:34
+msgid "Bad nameset passed to query routine"
+msgstr ""
+
+#: e2fsck/prof_err.c:35
+msgid "No profile file open"
+msgstr ""
+
+#: e2fsck/prof_err.c:36
+msgid "Bad magic value in profile_file_t"
+msgstr ""
+
+#: e2fsck/prof_err.c:37
+msgid "Couldn't open profile file"
+msgstr ""
+
+#: e2fsck/prof_err.c:38
+msgid "Section already exists"
+msgstr ""
+
+#: e2fsck/prof_err.c:39
+msgid "Invalid boolean value"
+msgstr ""
+
+#: e2fsck/prof_err.c:40
+#, fuzzy
+msgid "Invalid integer value"
+msgstr "无效的后缀长度"
+
+#: e2fsck/prof_err.c:41
+msgid "Bad magic value in profile_file_data_t"
+msgstr ""
+
+#~ msgid "<The ACL index inode>"
+#~ msgstr "<ACL 索引 inode>"
+
+#~ msgid "<The ACL data inode>"
+#~ msgstr "<ACL 数据 inode>"
+
+#~ msgid "%s is mounted.  "
+#~ msgstr "%s 已挂载."
+
+#~ msgid "Journal NOT removed\n"
+#~ msgstr "日志_没有_被删除\n"
+
+#~ msgid "bad block size - %s"
+#~ msgstr "错误的块大小 - %s"
diff --git a/e2fsprogs/resize/Android.mk b/e2fsprogs/resize/Android.mk
new file mode 100644
index 0000000..7f2bf69
--- /dev/null
+++ b/e2fsprogs/resize/Android.mk
@@ -0,0 +1,70 @@
+LOCAL_PATH := $(call my-dir)
+
+resize2fs_src_files := \
+	extent.c \
+	resize2fs.c \
+	main.c \
+	online.c \
+	sim_progress.c \
+	resource_track.c
+
+resize2fs_c_includes := external/e2fsprogs/lib
+
+resize2fs_cflags := -O2 -g -W -Wall \
+	-DHAVE_UNISTD_H \
+	-DHAVE_ERRNO_H \
+	-DHAVE_NETINET_IN_H \
+	-DHAVE_SYS_IOCTL_H \
+	-DHAVE_SYS_MMAN_H \
+	-DHAVE_SYS_MOUNT_H \
+	-DHAVE_SYS_PRCTL_H \
+	-DHAVE_SYS_RESOURCE_H \
+	-DHAVE_SYS_SELECT_H \
+	-DHAVE_SYS_STAT_H \
+	-DHAVE_SYS_TYPES_H \
+	-DHAVE_STDLIB_H \
+	-DHAVE_STRDUP \
+	-DHAVE_MMAP \
+	-DHAVE_UTIME_H \
+	-DHAVE_GETPAGESIZE \
+	-DHAVE_LSEEK64 \
+	-DHAVE_LSEEK64_PROTOTYPE \
+	-DHAVE_EXT2_IOCTLS \
+	-DHAVE_LINUX_FD_H \
+	-DHAVE_TYPE_SSIZE_T \
+	-DHAVE_SYS_TIME_H \
+        -DHAVE_SYS_PARAM_H \
+	-DHAVE_SYSCONF \
+	-Wno-unused-parameter
+
+resize2fs_shared_libraries := \
+	libext2fs \
+	libext2_com_err \
+	libext2_e2p \
+	libext2_uuid \
+	libext2_blkid
+
+resize2fs_system_shared_libraries := libc
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(resize2fs_src_files)
+LOCAL_C_INCLUDES := $(resize2fs_c_includes)
+LOCAL_CFLAGS := $(resize2fs_cflags)
+LOCAL_SHARED_LIBRARIES := $(resize2fs_shared_libraries)
+LOCAL_SYSTEM_SHARED_LIBRARIES := $(resize2fs_system_shared_libraries)
+LOCAL_MODULE := resize2fs
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(resize2fs_src_files)
+LOCAL_C_INCLUDES := $(resize2fs_c_includes)
+LOCAL_CFLAGS := $(resize2fs_cflags)
+LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(resize2fs_shared_libraries))
+LOCAL_MODULE := resize2fs_host
+LOCAL_MODULE_STEM := resize2fs
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/e2fsprogs/resize/Makefile.in b/e2fsprogs/resize/Makefile.in
new file mode 100644
index 0000000..b8fb3ae
--- /dev/null
+++ b/e2fsprogs/resize/Makefile.in
@@ -0,0 +1,197 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = resize
+INSTALL = @INSTALL@
+LDFLAG_STATIC = @LDFLAG_STATIC@
+
+@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)
+DEPLIBS= $(LIBE2P) $(LIBEXT2FS) $(DEPLIBCOM_ERR)
+
+STATIC_LIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
+	$(LIBINTL)
+DEPSTATIC_LIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) 
+
+.c.o:
+	$(E) "	CC $<"
+	$(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
+	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+
+all:: $(PROGS) $(TEST_PROGS) $(MANPAGES) 
+
+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) $(ALL_LDFLAGS) $(LDFLAG_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) "	MKINSTALLDIRS $(root_sbindir) $(man8dir)"
+	$(Q) $(MKINSTALLDIRS) $(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
+	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./test_extent < $(srcdir)/test_extent.in \
+		> test_extent.out
+
+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
+
+#
+# Kludge to create a "special" e2fsprogs distribution file.
+#
+
+SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
+			-e 's/pre-//' -e 's/-PLUS//'`
+TAR=tar
+
+$(top_srcdir)/.exclude-file:
+	a=$(SRCROOT); \
+	(cd $(top_srcdir)/.. ; find e2fsprogs \( -name \*~ -o -name \*.orig \
+		-o -name CVS -o -name \*.rej \) -print) \
+		| sed -e "s/e2fsprogs/$$a/" > $(top_srcdir)/.exclude-file
+	echo "$(SRCROOT)/build" >> $(top_srcdir)/.exclude-file
+	echo "$(SRCROOT)/rpm.log" >> $(top_srcdir)/.exclude-file
+	echo "$(SRCROOT)/powerquest" >> $(top_srcdir)/.exclude-file
+	echo "$(SRCROOT)/.exclude-file" >> $(top_srcdir)/.exclude-file
+	echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
+		>> $(top_srcdir)/.exclude-file
+	echo $(SRCROOT)/e2fsprogs-ALL-@E2FSPROGS_VERSION@.tar.gz \
+		>> $(top_srcdir)/.exclude-file
+
+source_tar_file: $(top_srcdir)/.exclude-file
+	(cd $(top_srcdir)/..; a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \
+		$(TAR) -c -h -v -f - \
+			-X $$a/.exclude-file $$a | \
+		gzip -9 > e2fsprogs-ALL-@E2FSPROGS_VERSION@.tar.gz)
+	rm -f $(top_srcdir)/.exclude-file
+
+# +++ 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/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/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/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/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/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/bitops.h \
+ $(top_srcdir)/lib/e2p/e2p.h
diff --git a/e2fsprogs/resize/Makefile.pq b/e2fsprogs/resize/Makefile.pq
new file mode 100644
index 0000000..bc60e09
--- /dev/null
+++ b/e2fsprogs/resize/Makefile.pq
@@ -0,0 +1,11 @@
+TOPSRC=..
+LIBNAME=RESIZE.LIB
+OBJFILE=RESIZE.LST
+
+OBJS= extent.obj \
+	ext2_block_move.obj \
+	ext2_inode_move.obj \
+	resize2fs.obj
+
+!include $(TOPSRC)\powerquest\MCONFIG
+
diff --git a/e2fsprogs/resize/extent.c b/e2fsprogs/resize/extent.c
new file mode 100644
index 0000000..d062f6a
--- /dev/null
+++ b/e2fsprogs/resize/extent.c
@@ -0,0 +1,240 @@
+/*
+ * 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 Theosore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#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_array(sizeof(struct ext2_extent_entry),
+				extent->size, &extent->list);
+	if (retval) {
+		ext2fs_free_mem(&extent);
+		return retval;
+	}
+	memset(extent->list, 0,
+	       sizeof(struct ext2_extent_entry) * extent->size);
+	*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"),
+	       extent->num, extent->size, extent->cursor, extent->sorted);
+	for (i=0, ent=extent->list; i < extent->num; i++, ent++) {
+		fprintf(out, "#\t\t %llu -> %llu (%llu)\n", ent->old_loc,
+			ent->new_loc, 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/e2fsprogs/resize/main.c b/e2fsprogs/resize/main.c
new file mode 100644
index 0000000..7bafc16
--- /dev/null
+++ b/e2fsprogs/resize/main.c
@@ -0,0 +1,495 @@
+/*
+ * 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%
+ */
+
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#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 "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 [new_size]\n\n"), prog);
+
+	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;
+	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)
+			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 && EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+				EXT4_FEATURE_RO_COMPAT_BIGALLOC)) {
+		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);
+	}
+}
+
+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;
+	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;
+	long		sysval;
+	int		len, mount_flags;
+	char		*mtpt;
+
+#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;
+
+	while ((c = getopt (argc, argv, "d:fFhMPpS:")) != 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;
+		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;
+	}
+
+	fd = ext2fs_open_file(device_name, O_RDWR, 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))
+		io_flags = EXT2_FLAG_RW | EXT2_FLAG_EXCLUSIVE;
+
+	io_flags |= EXT2_FLAG_64BITS;
+
+	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);
+	}
+
+	/*
+	 * 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);
+		exit(1);
+	}
+
+	min_size = calculate_minimum_resize_size(fs, flags);
+
+	if (print_min_size) {
+		if (!force && ((fs->super->s_state & EXT2_ERROR_FS) ||
+			       ((fs->super->s_state & EXT2_VALID_FS) == 0))) {
+			fprintf(stderr,
+				_("Please run 'e2fsck -f %s' first.\n\n"),
+				device_name);
+			exit(1);
+		}
+		printf(_("Estimated minimum size of the filesystem: %llu\n"),
+		       min_size);
+		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.
+	 */
+	retval = ext2fs_get_device_size2(device_name, fs->blocksize,
+					 &max_size);
+	if (retval) {
+		com_err(program_name, retval, "%s",
+			_("while trying to determine filesystem size"));
+		exit(1);
+	}
+	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);
+			exit(1);
+		}
+	} else {
+		new_size = max_size;
+		/* Round down to an even multiple of a pagesize */
+		if (sys_page_size > fs->blocksize)
+			new_size &= ~((sys_page_size / fs->blocksize)-1);
+	}
+	if (!EXT2_HAS_INCOMPAT_FEATURE(fs->super,
+				       EXT4_FEATURE_INCOMPAT_64BIT)) {
+		/* 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"));
+			exit(1);
+		}
+	}
+
+	if (!force && new_size < min_size) {
+		com_err(program_name, 0,
+			_("New size smaller than minimum (%llu)\n"), min_size);
+		exit(1);
+	}
+	if (use_stride >= 0) {
+		if (use_stride >= (int) fs->super->s_blocks_per_group) {
+			com_err(program_name, 0, "%s",
+				_("Invalid stride length"));
+			exit(1);
+		}
+		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) * fs->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"), max_size,
+			fs->blocksize / 1024, new_size);
+		exit(1);
+	}
+	if (new_size == ext2fs_blocks_count(fs->super)) {
+		fprintf(stderr, _("The filesystem is already %llu blocks "
+			"long.  Nothing to do!\n\n"), new_size);
+		exit(0);
+	}
+	if (mount_flags & EXT2_MF_MOUNTED) {
+		bigalloc_check(fs, force);
+		retval = online_resize_fs(fs, mtpt, &new_size, flags);
+	} else {
+		if (!force && ((fs->super->s_lastcheck < fs->super->s_mtime) ||
+			       (fs->super->s_state & EXT2_ERROR_FS) ||
+			       ((fs->super->s_state & EXT2_VALID_FS) == 0))) {
+			fprintf(stderr,
+				_("Please run 'e2fsck -f %s' first.\n\n"),
+				device_name);
+			exit(1);
+		}
+		bigalloc_check(fs, force);
+		printf(_("Resizing the filesystem on "
+			 "%s to %llu (%dk) blocks.\n"),
+		       device_name, new_size, fs->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);
+		ext2fs_close(fs);
+		exit(1);
+	}
+	printf(_("The filesystem on %s is now %llu blocks long.\n\n"),
+	       device_name, new_size);
+
+	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);
+}
diff --git a/e2fsprogs/resize/online.c b/e2fsprogs/resize/online.c
new file mode 100644
index 0000000..897187e
--- /dev/null
+++ b/e2fsprogs/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 "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, overhead;
+	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;
+	}
+
+	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 (!EXT2_HAS_COMPAT_FEATURE(fs->super,
+					EXT2_FEATURE_COMPAT_RESIZE_INODE) &&
+		    (new_desc_blocks != fs->desc_blocks)) {
+			com_err(program_name, 0,
+				_("Filesystem does not support online resizing"));
+			exit(1);
+		}
+
+		if (EXT2_HAS_COMPAT_FEATURE(fs->super,
+					EXT2_FEATURE_COMPAT_RESIZE_INODE) &&
+		    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 accomodate 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.
+	 */
+	new_fs->super->s_feature_incompat &= ~EXT4_FEATURE_INCOMPAT_FLEX_BG;
+	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, *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++) {
+
+		overhead = (int) (2 + new_fs->inode_blocks_per_group);
+
+		if (ext2fs_bg_has_super(new_fs, new_fs->group_desc_count - 1))
+			overhead += 1 + new_fs->desc_blocks +
+				new_fs->super->s_reserved_gdt_blocks;
+
+		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/e2fsprogs/resize/resize2fs.8.in b/e2fsprogs/resize/resize2fs.8.in
new file mode 100644
index 0000000..a1f3099
--- /dev/null
+++ b/e2fsprogs/resize/resize2fs.8.in
@@ -0,0 +1,152 @@
+.\" -*- 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 \-fFpPM
+]
+[
+.B \-d
+.I debug-flags
+]
+[
+.B \-S
+.I RAID-stride
+]
+.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 filesystem is mounted, it can be used to expand the size of the
+mounted filesystem, assuming the kernel supports on-line resizing.  (As
+of this writing, the Linux 2.6 kernel supports on-line resize for
+filesystems mounted using ext3 and ext4.).
+.PP
+The
+.I size
+parameter specifies the requested new size of the filesystem.
+If no units are specified, the units of the
+.I size
+parameter shall be the filesystem blocksize of the filesystem.
+Optionally, the
+.I size
+parameter may be suffixed by one of the following the units
+designators: 's', 'K', 'M', or 'G',
+for 512 byte sectors, kilobytes, megabytes, or gigabytes, respectively.
+The
+.I size
+of the filesystem 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
+Note: when kilobytes is used above, I mean
+.IR real ,
+power-of-2 kilobytes, (i.e., 1024 bytes), which some politically correct
+folks insist should be the stupid-sounding ``kibibytes''.  The same
+holds true for megabytes, also sometimes known as ``mebibytes'', or
+gigabytes, as the amazingly silly ``gibibytes''.  Makes you want to
+gibber, doesn't it?
+.PP
+The
+.B resize2fs
+program does not manipulate the size of partitions.  If you wish to enlarge
+a filesystem, 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 filesystem.
+After running
+.BR fdisk (8),
+run resize2fs to resize the ext2 filesystem
+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 filesystem.  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 filesystem!
+.SH OPTIONS
+.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 filesystem size (\-M) calculation
+.TP
+.B \-f
+Forces resize2fs to proceed with the filesystem resize operation, overriding
+some safety checks which resize2fs normally enforces.
+.TP
+.B \-F
+Flush the filesystem device's buffer caches before beginning.  Only
+really useful for doing
+.B resize2fs
+time trials.
+.TP
+.B \-M
+Shrink the filesystem to the minimum size.
+.TP
+.B \-p
+Prints out a percentage completion bars for each
+.B resize2fs
+operation during an offline resize, so that the user can keep track
+of what the program is doing.
+.TP
+.B \-P
+Print the minimum size of the filesystem and exit.
+.TP
+.B \-S \fIRAID-stride
+The
+.B resize2fs
+program will heuristically determine the RAID stride that was specified
+when the filesystem was created.  This option allows the user to
+explicitly specify a RAID stride setting to be used by resize2fs instead.
+.SH KNOWN BUGS
+The minimum size of the filesystem as estimated by resize2fs may be
+incorrect, especially for filesystems 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/e2fsprogs/resize/resize2fs.c b/e2fsprogs/resize/resize2fs.c
new file mode 100644
index 0000000..865ff4c
--- /dev/null
+++ b/e2fsprogs/resize/resize2fs.c
@@ -0,0 +1,2272 @@
+/*
+ * resize2fs.c --- ext2 main routine
+ *
+ * Copyright (C) 1997, 1998 by Theodore Ts'o and
+ * 	PowerQuest, Inc.
+ *
+ * Copyright (C) 1999, 2000 by Theosore 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 "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 ext2fs_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);
+
+/*
+ * Some helper CPP macros
+ */
+#define IS_BLOCK_BM(fs, i, blk) ((blk) == ext2fs_block_bitmap_loc((fs),(i)))
+#define IS_INODE_BM(fs, i, blk) ((blk) == ext2fs_inode_bitmap_loc((fs),(i)))
+
+#define IS_INODE_TB(fs, i, blk) (((blk) >= ext2fs_inode_table_loc((fs), (i))) && \
+				 ((blk) < (ext2fs_inode_table_loc((fs), (i)) + \
+					   (fs)->inode_blocks_per_group)))
+
+/* Some bigalloc helper macros which are more succint... */
+#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, "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",
+		       ext2fs_free_blocks_count(rfs->old_fs->super),
+		       ext2fs_free_blocks_count(rfs->new_fs->super),
+		       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);
+
+	init_resource_track(&rtrack, "calculate_summary_stats", fs->io);
+	retval = ext2fs_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);
+
+	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(rfs->new_fs);
+	if (retval)
+		goto errout;
+
+	rfs->flags = flags;
+
+	ext2fs_free(rfs->old_fs);
+	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);
+	if (rfs->itable_buf)
+		ext2fs_free_mem(&rfs->itable_buf);
+	ext2fs_free_mem(&rfs);
+	return retval;
+}
+
+/*
+ * Clean up the bitmaps for unitialized bitmaps
+ */
+static void fix_uninit_block_bitmaps(ext2_filsys fs)
+{
+	blk64_t		blk, lblk;
+	dgrp_t		g;
+	int		i;
+
+	if (!(EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+					 EXT4_FEATURE_RO_COMPAT_GDT_CSUM)))
+		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 < (unsigned int) 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 void free_gdp_blocks(ext2_filsys fs,
+			    ext2fs_block_bitmap reserve_blocks,
+			    ext2_filsys old_fs,
+			    dgrp_t group)
+{
+	blk64_t	blk;
+	int	j;
+
+	blk = ext2fs_block_bitmap_loc(old_fs, group);
+	if (blk &&
+	    (blk < ext2fs_blocks_count(fs->super))) {
+		ext2fs_block_alloc_stats2(fs, blk, -1);
+		ext2fs_mark_block_bitmap2(reserve_blocks, blk);
+	}
+
+	blk = ext2fs_inode_bitmap_loc(old_fs, group);
+	if (blk &&
+	    (blk < ext2fs_blocks_count(fs->super))) {
+		ext2fs_block_alloc_stats2(fs, blk, -1);
+		ext2fs_mark_block_bitmap2(reserve_blocks, blk);
+	}
+
+	blk = ext2fs_inode_table_loc(old_fs, group);
+	if (blk == 0 ||
+	    (blk >= ext2fs_blocks_count(fs->super)))
+		return;
+
+	for (j = 0;
+	     j < fs->inode_blocks_per_group; j++, blk++) {
+		if (blk >= ext2fs_blocks_count(fs->super))
+			break;
+		ext2fs_block_alloc_stats2(fs, blk, -1);
+		ext2fs_mark_block_bitmap2(reserve_blocks, blk);
+	}
+}
+
+/*
+ * 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;
+	unsigned long long new_inodes;	/* u64 to check for overflow */
+	double		percent;
+
+	ext2fs_blocks_count_set(fs->super, new_size);
+
+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);
+
+	if (ext2fs_bg_has_super(fs, fs->group_desc_count - 1))
+		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) {
+		fprintf(stderr, _("inodes (%llu) must be less than %u"),
+				   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 = (((blk64_t) EXT2_BLOCKS_PER_GROUP(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 (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.
+	 */
+	if ((fs->super->s_feature_compat &
+	     EXT2_FEATURE_COMPAT_RESIZE_INODE) &&
+	    (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;
+	}
+
+	/*
+	 * 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
+		 */
+		for (i = fs->group_desc_count;
+		     i < old_fs->group_desc_count; i++)
+			free_gdp_blocks(fs, reserve_blocks, old_fs, i);
+		retval = 0;
+		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 = EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+					       EXT4_FEATURE_RO_COMPAT_GDT_CSUM);
+	if (access("/sys/fs/ext4/features/lazy_itable_init", F_OK) == 0)
+		lazy_itable_init = 1;
+	if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
+		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
+	 * file systems'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 (!(fs->super->s_feature_incompat &
+		      EXT2_FEATURE_INCOMPAT_META_BG) ||
+		    (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);
+}
+
+/*
+ * 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;
+	int		adj = 0;
+	errcode_t	retval;
+	blk64_t		group_block;
+	unsigned long	i;
+	unsigned long	max_group;
+
+	fs = rfs->new_fs;
+	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 &&
+	    EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+				       EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) {
+		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);
+	group_block = ext2fs_group_first_block2(fs,
+						rfs->old_fs->group_desc_count);
+	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 = io_channel_write_blk64(fs->io,
+						ext2fs_inode_table_loc(fs, i),
+						fs->inode_blocks_per_group,
+						rfs->itable_buf);
+		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;
+		}
+		group_block += fs->super->s_blocks_per_group;
+	}
+	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);
+	}
+	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 (fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_FLEX_BG) {
+		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 (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+				       EXT4_FEATURE_RO_COMPAT_GDT_CSUM) &&
+		   (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 (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)
+{
+	int		j, has_super;
+	dgrp_t		i, max_groups, g;
+	blk64_t		blk, group_blk;
+	blk64_t		old_blocks, new_blocks;
+	blk64_t		new_size;
+	unsigned int	meta_bg, meta_bg_size;
+	errcode_t	retval;
+	ext2_filsys 	fs, old_fs;
+	ext2fs_block_bitmap	meta_bmap;
+	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 (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+					       EXT4_FEATURE_RO_COMPAT_GDT_CSUM) &&
+		    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 (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) {
+		old_blocks = old_fs->super->s_first_meta_bg;
+		new_blocks = fs->super->s_first_meta_bg;
+	} else {
+		old_blocks = old_fs->desc_blocks + old_fs->super->s_reserved_gdt_blocks;
+		new_blocks = fs->desc_blocks + fs->super->s_reserved_gdt_blocks;
+	}
+
+	if (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) {
+		for (i = 0; i < max_groups; i++) {
+			if (!ext2fs_bg_has_super(fs, i)) {
+				group_blk += fs->super->s_blocks_per_group;
+				continue;
+			}
+			for (blk = group_blk+1+new_blocks;
+			     blk < group_blk+1+old_blocks; blk++) {
+				ext2fs_block_alloc_stats2(fs, blk, -1);
+				rfs->needed_blocks--;
+			}
+			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 = fs->super->s_feature_incompat &
+		EXT4_FEATURE_INCOMPAT_FLEX_BG;
+	/* 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 (!(fs->super->s_feature_incompat &
+		      EXT2_FEATURE_INCOMPAT_META_BG) ||
+		    (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 bookkeepping.
+		 */
+		if (ext2fs_block_bitmap_loc(old_fs, i) !=
+		    (blk = ext2fs_block_bitmap_loc(fs, i))) {
+			ext2fs_block_alloc_stats2(fs, blk, +1);
+			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);
+		}
+		if (ext2fs_inode_bitmap_loc(old_fs, i) !=
+		    (blk = ext2fs_inode_bitmap_loc(fs, i))) {
+			ext2fs_block_alloc_stats2(fs, blk, +1);
+			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);
+		}
+
+		/*
+		 * 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 (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 (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,
+					   blk64_t *ret)
+{
+	ext2_resize_t rfs = (ext2_resize_t) fs->priv_data;
+	blk64_t blk;
+
+	blk = get_new_block(rfs);
+	if (!blk)
+		return ENOSPC;
+
+#ifdef RESIZE2FS_DEBUG
+	if (rfs->flags & 0xF)
+		printf("get_alloc_block allocating %llu\n", blk);
+#endif
+
+	ext2fs_mark_block_bitmap2(rfs->old_fs->block_map, blk);
+	ext2fs_mark_block_bitmap2(rfs->new_fs->block_map, blk);
+	*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			size;
+	int			c;
+	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)
+			return retval;
+	}
+	retval = ext2fs_create_extent_table(&rfs->bmap, 0);
+	if (retval)
+		return retval;
+
+	/*
+	 * 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",
+			       size, old_blk, 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;
+	struct ext2_inode *	inode;
+	errcode_t		error;
+	int			is_dir;
+	int			changed;
+};
+
+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->ino, blockcnt, block, 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 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;
+	blk64_t			orig_size;
+	blk64_t			new_block;
+	int			inode_size;
+
+	if ((rfs->old_fs->group_desc_count <=
+	     rfs->new_fs->group_desc_count) &&
+	    !rfs->bmap)
+		return 0;
+
+	/*
+	 * Save the original size of the old filesystem, and
+	 * temporarily set the size to be the new size if the new size
+	 * is larger.  We need to do this to avoid catching an error
+	 * by the block iterator routines
+	 */
+	orig_size = ext2fs_blocks_count(rfs->old_fs->super);
+	if (orig_size < ext2fs_blocks_count(rfs->new_fs->super))
+		ext2fs_blocks_count_set(rfs->old_fs->super,
+				ext2fs_blocks_count(rfs->new_fs->super));
+
+	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;
+
+		if (ext2fs_file_acl_block(rfs->old_fs, inode) && rfs->bmap) {
+			new_block = extent_translate(rfs->old_fs, rfs->bmap,
+				ext2fs_file_acl_block(rfs->old_fs, inode));
+			if (new_block) {
+				ext2fs_file_acl_block_set(rfs->old_fs, inode,
+							  new_block);
+				retval = ext2fs_write_inode_full(rfs->old_fs,
+							    ino, inode, inode_size);
+				if (retval) goto errout;
+			}
+		}
+
+		if (ext2fs_inode_has_valid_blocks2(rfs->old_fs, inode) &&
+		    (rfs->bmap || pb.is_dir)) {
+			pb.ino = ino;
+			retval = ext2fs_block_iterate3(rfs->old_fs,
+						       ino, 0, block_buf,
+						       process_block, &pb);
+			if (retval)
+				goto errout;
+			if (pb.error) {
+				retval = pb.error;
+				goto errout;
+			}
+		}
+
+		if (ino <= start_to_move)
+			continue; /* Don't need to move it. */
+
+		/*
+		 * Find a new inode
+		 */
+		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);
+		if (pb.changed) {
+			/* Get the new version of the inode */
+			retval = ext2fs_read_inode_full(rfs->old_fs, ino,
+						inode, inode_size);
+			if (retval) goto errout;
+		}
+		inode->i_ctime = time(0);
+		retval = ext2fs_write_inode_full(rfs->old_fs, new_inode,
+						inode, inode_size);
+		if (retval) goto errout;
+
+#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);
+	}
+	io_channel_flush(rfs->old_fs->io);
+
+errout:
+	ext2fs_blocks_count_set(rfs->old_fs->super, orig_size);
+	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;
+
+	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 (!dirent->inode)
+		return 0;
+
+	new_inode = ext2fs_extent_translate(is->rfs->imap, dirent->inode);
+
+	if (!new_inode)
+		return 0;
+#ifdef RESIZE2FS_DEBUG
+	if (is->rfs->flags & RESIZE_DEBUG_INODEMAP)
+		printf("Inode translate (dir=%u, name=%.*s, %u->%u)\n",
+		       dir, dirent->name_len&0xFF, 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 = time(0);
+		is->err = ext2fs_write_inode(is->rfs->old_fs, dir, &inode);
+		if (is->err)
+			return DIRENT_ABORT;
+	}
+
+	return 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;
+	}
+
+	retval = ext2fs_dblist_dir_iterate(rfs->old_fs->dblist,
+					   DIRENT_FLAG_INCLUDE_EMPTY, 0,
+					   check_and_change_inodes, &is);
+	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;
+	errcode_t	retval;
+	int		j, to_move, moved;
+
+	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;
+	}
+
+	/*
+	 * 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)
+		return 0;
+
+	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, old_blk, new_blk, diff);
+#endif
+
+		if (!diff)
+			continue;
+
+		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 ; j++, blk++)
+			ext2fs_block_alloc_stats2(fs, blk, -1);
+
+		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
+	return 0;
+
+errout:
+	return retval;
+}
+
+/*
+ * Fix the resize inode
+ */
+static errcode_t fix_resize_inode(ext2_filsys fs)
+{
+	struct ext2_inode	inode;
+	errcode_t		retval;
+	char			*block_buf = NULL;
+
+	if (!(fs->super->s_feature_compat &
+	      EXT2_FEATURE_COMPAT_RESIZE_INODE))
+		return 0;
+
+	retval = ext2fs_get_mem(fs->blocksize, &block_buf);
+	if (retval) goto errout;
+
+	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);
+	}
+
+	memset(block_buf, 0, fs->blocksize);
+
+	retval = io_channel_write_blk64(fs->io, inode.i_block[EXT2_DIND_BLOCK],
+					1, block_buf);
+	if (retval) goto errout;
+
+	retval = ext2fs_create_resize_inode(fs);
+	if (retval)
+		goto errout;
+
+errout:
+	if (block_buf)
+		ext2fs_free_mem(&block_buf);
+	return retval;
+}
+
+/*
+ * Finally, recalculate the summary information
+ */
+static errcode_t ext2fs_calculate_summary_stats(ext2_filsys fs)
+{
+	blk64_t		blk;
+	ext2_ino_t	ino;
+	unsigned int	group = 0;
+	unsigned int	count = 0;
+	blk64_t		total_blocks_free = 0;
+	int		total_inodes_free = 0;
+	int		group_free = 0;
+	int		uninit = 0;
+	blk64_t		super_blk, old_desc_blk, new_desc_blk;
+	int		old_desc_blocks;
+
+	/*
+	 * First calculate the block statistics
+	 */
+	uninit = ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT);
+	ext2fs_super_and_bgd_loc2(fs, group, &super_blk, &old_desc_blk,
+				  &new_desc_blk, 0);
+	if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
+		old_desc_blocks = fs->super->s_first_meta_bg;
+	else
+		old_desc_blocks = fs->desc_blocks +
+			fs->super->s_reserved_gdt_blocks;
+	for (blk = B2C(fs->super->s_first_data_block);
+	     blk < ext2fs_blocks_count(fs->super);
+	     blk += EXT2FS_CLUSTER_RATIO(fs)) {
+		if ((uninit &&
+		     !(EQ_CLSTR(blk, super_blk) ||
+		       ((old_desc_blk && old_desc_blocks &&
+			 GE_CLSTR(blk, old_desc_blk) &&
+			 LT_CLSTR(blk, old_desc_blk + old_desc_blocks))) ||
+		       ((new_desc_blk && EQ_CLSTR(blk, new_desc_blk))) ||
+		       EQ_CLSTR(blk, ext2fs_block_bitmap_loc(fs, group)) ||
+		       EQ_CLSTR(blk, ext2fs_inode_bitmap_loc(fs, group)) ||
+		       ((GE_CLSTR(blk, ext2fs_inode_table_loc(fs, group)) &&
+			 LT_CLSTR(blk, ext2fs_inode_table_loc(fs, group)
+				  + fs->inode_blocks_per_group))))) ||
+		    (!ext2fs_fast_test_block_bitmap2(fs->block_map, blk))) {
+			group_free++;
+			total_blocks_free++;
+		}
+		count++;
+		if ((count == fs->super->s_clusters_per_group) ||
+		    EQ_CLSTR(blk, ext2fs_blocks_count(fs->super)-1)) {
+			ext2fs_bg_free_blocks_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_BLOCK_UNINIT);
+			ext2fs_super_and_bgd_loc2(fs, group, &super_blk,
+						  &old_desc_blk,
+						  &new_desc_blk, 0);
+			if (fs->super->s_feature_incompat &
+			    EXT2_FEATURE_INCOMPAT_META_BG)
+				old_desc_blocks = fs->super->s_first_meta_bg;
+			else
+				old_desc_blocks = fs->desc_blocks +
+					fs->super->s_reserved_gdt_blocks;
+		}
+	}
+	total_blocks_free = C2B(total_blocks_free);
+	ext2fs_free_blocks_count_set(fs->super, total_blocks_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 (!(fs->super->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL))
+		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;
+}
+
+
+/*
+ * calcluate 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;
+	blk64_t blks_needed, data_blocks;
+	blk64_t grp, data_needed, last_start;
+	blk64_t overhead = 0;
+	int old_desc_blocks;
+	int extra_groups = 0;
+	int flexbg_size = 1 << 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) *
+		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 (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
+		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) -
+		ext2fs_free_blocks_count(fs->super);
+
+	for (grp = 0; grp < fs->group_desc_count; grp++)
+		data_needed -= calc_group_overhead(fs, grp, old_desc_blocks);
+#ifdef RESIZE2FS_DEBUG
+	if (flags & RESIZE_DEBUG_MIN_CALC)
+		printf("fs requires %llu data blocks.\n", 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.
+	 */
+	if (fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_FLEX_BG) {
+		extra_groups = flexbg_size - (groups & (flexbg_size - 1));
+		data_needed += fs->inode_blocks_per_group * extra_groups;
+		extra_groups = groups % flexbg_size;
+	}
+
+	/*
+	 * figure out how many data blocks we have given the number of groups
+	 * we need for our inodes
+	 */
+	data_blocks = groups * EXT2_BLOCKS_PER_GROUP(fs->super);
+	last_start = 0;
+	for (grp = 0; grp < 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;
+
+		data_blocks -= overhead;
+	}
+#ifdef RESIZE2FS_DEBUG
+	if (flags & RESIZE_DEBUG_MIN_CALC)
+		printf("With %d group(s), we have %llu blocks available.\n",
+		       groups, data_blocks);
+#endif
+
+	/*
+	 * if we need more group descriptors in order to accomodate our data
+	 * then we need to add them here
+	 */
+	while (data_needed > data_blocks) {
+		blk64_t remainder = data_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 += extra_grps * EXT2_BLOCKS_PER_GROUP(fs->super);
+
+		/* 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;
+
+		for (grp = groups; grp < groups+extra_grps; 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 + extra_grps - 1))
+				last_start += EXT2_BLOCKS_PER_GROUP(fs->super)
+					- overhead;
+
+			data_blocks -= overhead;
+		}
+
+		groups += extra_grps;
+		extra_groups += extra_grps;
+		if (fs->super->s_feature_incompat
+			& EXT4_FEATURE_INCOMPAT_FLEX_BG
+		    && extra_groups > flexbg_size) {
+			/*
+			 * 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.
+			 */
+			extra_groups = flexbg_size -
+						(groups & (flexbg_size - 1));
+			data_needed += (fs->inode_blocks_per_group *
+					extra_groups);
+			extra_groups = groups % flexbg_size;
+		}
+#ifdef RESIZE2FS_DEBUG
+		if (flags & RESIZE_DEBUG_MIN_CALC)
+			printf("Added %d extra group(s), "
+			       "data_needed %llu, data_blocks %llu, "
+			       "last_start %llu\n",
+			       extra_grps, data_needed, data_blocks,
+			       last_start);
+#endif
+	}
+
+	/* now for the fun voodoo */
+	overhead = calc_group_overhead(fs, groups-1, old_desc_blocks);
+#ifdef RESIZE2FS_DEBUG
+	if (flags & RESIZE_DEBUG_MIN_CALC)
+		printf("Last group's overhead is %llu\n", 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 < data_needed) {
+		blk64_t remainder = data_needed - last_start;
+
+#ifdef RESIZE2FS_DEBUG
+		if (flags & RESIZE_DEBUG_MIN_CALC)
+			printf("Need %llu data blocks in last group\n",
+			       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 %lld\n", overhead);
+#endif
+
+	/*
+	 * 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 = (groups-1) * EXT2_BLOCKS_PER_GROUP(fs->super);
+	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", 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.
+	 */
+	if (fs->super->s_feature_incompat & EXT3_FEATURE_INCOMPAT_EXTENTS) {
+		blk64_t safe_margin = (ext2fs_blocks_count(fs->super) -
+				       blks_needed)/500;
+#ifdef RESIZE2FS_DEBUG
+		if (flags & RESIZE_DEBUG_MIN_CALC)
+			printf("Extents safety margin: %llu\n", safe_margin);
+#endif
+		blks_needed += safe_margin;
+	}
+
+	return blks_needed;
+}
diff --git a/e2fsprogs/resize/resize2fs.h b/e2fsprogs/resize/resize2fs.h
new file mode 100644
index 0000000..7aeab91
--- /dev/null
+++ b/e2fsprogs/resize/resize2fs.h
@@ -0,0 +1,186 @@
+/*
+ * resize2fs.h --- ext2 resizer header file
+ *
+ * Copyright (C) 1997, 1998 by Theodore Ts'o and
+ * 	PowerQuest, Inc.
+ *
+ * Copyright (C) 1999, 2000 by Theosore 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
+
+/*
+ * 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);
+
+
+/* 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/e2fsprogs/resize/resource_track.c b/e2fsprogs/resize/resource_track.c
new file mode 100644
index 0000000..7908c95
--- /dev/null
+++ b/e2fsprogs/resize/resource_track.c
@@ -0,0 +1,127 @@
+/*
+ * 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 "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_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);
+
+#ifdef HAVE_MALLINFO
+#define kbytes(x)	(((unsigned long)(x) + 1023) / 1024)
+
+	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/e2fsprogs/resize/sim_progress.c b/e2fsprogs/resize/sim_progress.c
new file mode 100644
index 0000000..e7dba88
--- /dev/null
+++ b/e2fsprogs/resize/sim_progress.c
@@ -0,0 +1,117 @@
+/*
+ * sim_progress.c --- simple progress meter
+ *
+ * Copyright (C) 1997, 1998 by Theodore Ts'o and
+ * 	PowerQuest, Inc.
+ *
+ * Copyright (C) 1999, 2000 by Theosore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#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/e2fsprogs/resize/test-resize b/e2fsprogs/resize/test-resize
new file mode 100755
index 0000000..3766f4f
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/resize/test_extent.c b/e2fsprogs/resize/test_extent.c
new file mode 100644
index 0000000..a8678f1
--- /dev/null
+++ b/e2fsprogs/resize/test_extent.c
@@ -0,0 +1,123 @@
+/*
+ * test_extent.c --- tester for the extent abstraction
+ *
+ * Copyright (C) 1997, 1998 by Theodore Ts'o and
+ * 	PowerQuest, Inc.
+ *
+ * Copyright (C) 1999, 2000 by Theosore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#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", 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",
+					num1, num2, size);
+			}
+		} else
+			fputs("# Syntax error\n", out);
+	}
+}
+
+#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/e2fsprogs/resize/test_extent.in b/e2fsprogs/resize/test_extent.in
new file mode 100644
index 0000000..7edcc41
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/Makefile.in b/e2fsprogs/tests/Makefile.in
new file mode 100644
index 0000000..37a043e
--- /dev/null
+++ b/e2fsprogs/tests/Makefile.in
@@ -0,0 +1,86 @@
+#
+# Makefile for the tests directory
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = tests
+INSTALL = @INSTALL@
+
+@MCONFIG@
+
+all:: @DO_TEST_SUITE@ test_one test_script
+
+test_one: $(srcdir)/test_one.in Makefile mke2fs.conf
+	@echo "Creating test_one script..."
+	@echo "#!/bin/sh" > test_one
+@HTREE_CMT@	@echo "HTREE=y" >> test_one
+@QUOTA_CMT@	@echo "QUOTA=y" >> test_one
+	@echo "SRCDIR=@srcdir@" >> test_one
+	@echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one
+	@cat $(srcdir)/test_one.in >> test_one
+	@chmod +x test_one
+
+test_script: test_one test_script.in Makefile mke2fs.conf
+	@echo "Creating test_script..."
+	@echo "#!/bin/sh" > test_script
+	@echo "SRCDIR=@srcdir@" >> test_script
+	@cat $(srcdir)/test_script.in >> test_script
+	@chmod +x test_script
+
+mke2fs.conf: $(srcdir)/mke2fs.conf.in
+	$(CP) $(srcdir)/mke2fs.conf.in mke2fs.conf
+
+.PHONY : test_pre test_post check always_run
+
+TESTS=$(wildcard $(srcdir)/[a-z]_*)
+$(TESTS):: test_one always_run
+	@./test_one $@
+
+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
+
+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 test_one test_script mke2fs.conf
+
+distclean:: clean
+	$(RM) -f Makefile
+	$(RM) -rf ${TDIR}
diff --git a/e2fsprogs/tests/README b/e2fsprogs/tests/README
new file mode 100644
index 0000000..d075db5
--- /dev/null
+++ b/e2fsprogs/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 descriptons 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/e2fsprogs/tests/d_loaddump/expect b/e2fsprogs/tests/d_loaddump/expect
new file mode 100644
index 0000000..f70df88
--- /dev/null
+++ b/e2fsprogs/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), 158/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/e2fsprogs/tests/d_loaddump/name b/e2fsprogs/tests/d_loaddump/name
new file mode 100644
index 0000000..025ec3b
--- /dev/null
+++ b/e2fsprogs/tests/d_loaddump/name
@@ -0,0 +1 @@
+debugfs load/dump test
diff --git a/e2fsprogs/tests/d_loaddump/script b/e2fsprogs/tests/d_loaddump/script
new file mode 100644
index 0000000..39727ba
--- /dev/null
+++ b/e2fsprogs/tests/d_loaddump/script
@@ -0,0 +1,66 @@
+if test -x $DEBUGFS_EXE; then
+
+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
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo "mke2fs -Fq -b 1024 test.img 512" >> $OUT
+
+$MKE2FS -Fq $TMPFILE 512 > /dev/null 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+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
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+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
+
+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
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo "cmp $TEST_DATA $VERIFY_DATA" >> $OUT
+cmp $TEST_DATA $VERIFY_DATA >>$OUT
+status=$?
+echo Exit status is $status >> $OUT
+
+#
+# Do the verification
+#
+
+rm -f $VERIFY_DATA $TEST_DATA $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
+
+else #if test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi 
diff --git a/e2fsprogs/tests/d_special_files/expect b/e2fsprogs/tests/d_special_files/expect
new file mode 100644
index 0000000..2b2dbfa
--- /dev/null
+++ b/e2fsprogs/tests/d_special_files/expect
@@ -0,0 +1,85 @@
+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
+User:     0   Group:     0   Size: 3
+File ACL: 0    Directory ACL: 0
+Links: 1   Blockcount: 0
+Fragment:  Address: 0    Number: 0    Size: 0
+ctime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
+atime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
+mtime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
+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
+User:     0   Group:     0   Size: 80
+File ACL: 0    Directory ACL: 0
+Links: 1   Blockcount: 2
+Fragment:  Address: 0    Number: 0    Size: 0
+ctime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
+atime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
+mtime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
+BLOCKS:
+(0):28
+TOTAL: 1
+
+Exit status is 0
+debugfs -R ''block_dump 28'' -w test.img
+0000  3132 3334 3536 3738 3930 3132 3334 3536  1234567890123456
+0020  3738 3930 3132 3334 3536 3738 3930 3132  7890123456789012
+0040  3334 3536 3738 3930 3132 3334 3536 3738  3456789012345678
+0060  3930 3132 3334 3536 3738 3930 3132 3334  9012345678901234
+0100  3536 3738 3930 3132 3334 3536 3738 3930  5678901234567890
+0120  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
+User:     0   Group:     0   Size: 0
+File ACL: 0    Directory ACL: 0
+Links: 1   Blockcount: 0
+Fragment:  Address: 0    Number: 0    Size: 0
+ctime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
+atime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
+mtime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
+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
+User:     0   Group:     0   Size: 0
+File ACL: 0    Directory ACL: 0
+Links: 1   Blockcount: 0
+Fragment:  Address: 0    Number: 0    Size: 0
+ctime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
+atime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
+mtime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
+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
+User:     0   Group:     0   Size: 0
+File ACL: 0    Directory ACL: 0
+Links: 1   Blockcount: 0
+Fragment:  Address: 0    Number: 0    Size: 0
+ctime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
+atime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
+mtime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
+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), 29/512 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/d_special_files/name b/e2fsprogs/tests/d_special_files/name
new file mode 100644
index 0000000..98d10d2
--- /dev/null
+++ b/e2fsprogs/tests/d_special_files/name
@@ -0,0 +1 @@
+create special files in debugfs
diff --git a/e2fsprogs/tests/d_special_files/script b/e2fsprogs/tests/d_special_files/script
new file mode 100644
index 0000000..1a1999a
--- /dev/null
+++ b/e2fsprogs/tests/d_special_files/script
@@ -0,0 +1,94 @@
+if test -x $DEBUGFS_EXE; then
+
+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
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo "mke2fs -Fq -b 1024 test.img 512" >> $OUT
+
+$MKE2FS -Fq $TMPFILE 512 > /dev/null 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
+set_current_time 201301151400
+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
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+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
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+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
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+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
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+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
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+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
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+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
+
+else #if test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi 
diff --git a/e2fsprogs/tests/defaults/e_script b/e2fsprogs/tests/defaults/e_script
new file mode 100644
index 0000000..8c9cfb6
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/defaults/f_script b/e2fsprogs/tests/defaults/f_script
new file mode 100644
index 0000000..7a3b34f
--- /dev/null
+++ b/e2fsprogs/tests/defaults/f_script
@@ -0,0 +1 @@
+. $cmd_dir/run_e2fsck
diff --git a/e2fsprogs/tests/e_brel_bma/name b/e2fsprogs/tests/e_brel_bma/name
new file mode 100644
index 0000000..d745587
--- /dev/null
+++ b/e2fsprogs/tests/e_brel_bma/name
@@ -0,0 +1 @@
+block relocation table using the memory array implementation
diff --git a/e2fsprogs/tests/e_brel_bma/script b/e2fsprogs/tests/e_brel_bma/script
new file mode 100644
index 0000000..037e2fb
--- /dev/null
+++ b/e2fsprogs/tests/e_brel_bma/script
@@ -0,0 +1 @@
+echo "$test_name: $test_description: skipped"
diff --git a/e2fsprogs/tests/e_icount_normal/name b/e2fsprogs/tests/e_icount_normal/name
new file mode 100644
index 0000000..1317876
--- /dev/null
+++ b/e2fsprogs/tests/e_icount_normal/name
@@ -0,0 +1 @@
+inode counting structure optimized for low counts
diff --git a/e2fsprogs/tests/e_icount_opt/name b/e2fsprogs/tests/e_icount_opt/name
new file mode 100644
index 0000000..5b6b1a5
--- /dev/null
+++ b/e2fsprogs/tests/e_icount_opt/name
@@ -0,0 +1 @@
+inode counting abstraction optimized for counting
diff --git a/e2fsprogs/tests/e_irel_ima/name b/e2fsprogs/tests/e_irel_ima/name
new file mode 100644
index 0000000..6efd72e
--- /dev/null
+++ b/e2fsprogs/tests/e_irel_ima/name
@@ -0,0 +1 @@
+inode relocation table using the memory array implementation
diff --git a/e2fsprogs/tests/e_irel_ima/script b/e2fsprogs/tests/e_irel_ima/script
new file mode 100644
index 0000000..037e2fb
--- /dev/null
+++ b/e2fsprogs/tests/e_irel_ima/script
@@ -0,0 +1 @@
+echo "$test_name: $test_description: skipped"
diff --git a/e2fsprogs/tests/f_16384_block/expect.1 b/e2fsprogs/tests/f_16384_block/expect.1
new file mode 100644
index 0000000..d5a5659
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_16384_block/expect.2 b/e2fsprogs/tests/f_16384_block/expect.2
new file mode 100644
index 0000000..d5a5659
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_16384_block/image.gz b/e2fsprogs/tests/f_16384_block/image.gz
new file mode 100644
index 0000000..c5f311b
--- /dev/null
+++ b/e2fsprogs/tests/f_16384_block/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_16384_block/name b/e2fsprogs/tests/f_16384_block/name
new file mode 100644
index 0000000..79b3112
--- /dev/null
+++ b/e2fsprogs/tests/f_16384_block/name
@@ -0,0 +1 @@
+16384 byte blocksize
diff --git a/e2fsprogs/tests/f_8192_block/expect.1 b/e2fsprogs/tests/f_8192_block/expect.1
new file mode 100644
index 0000000..d5a5659
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_8192_block/expect.2 b/e2fsprogs/tests/f_8192_block/expect.2
new file mode 100644
index 0000000..d5a5659
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_8192_block/image.gz b/e2fsprogs/tests/f_8192_block/image.gz
new file mode 100644
index 0000000..c5f311b
--- /dev/null
+++ b/e2fsprogs/tests/f_8192_block/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_8192_block/name b/e2fsprogs/tests/f_8192_block/name
new file mode 100644
index 0000000..50d8dca
--- /dev/null
+++ b/e2fsprogs/tests/f_8192_block/name
@@ -0,0 +1 @@
+8192 byte blocksize
diff --git a/e2fsprogs/tests/f_bad_disconnected_inode/expect.1 b/e2fsprogs/tests/f_bad_disconnected_inode/expect.1
new file mode 100644
index 0000000..11862f6
--- /dev/null
+++ b/e2fsprogs/tests/f_bad_disconnected_inode/expect.1
@@ -0,0 +1,52 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 1 has EXTENTS_FL flag set on filesystem without extents support.
+Clear? yes
+
+Inode 15 has EXTENTS_FL flag set on filesystem without extents support.
+Clear? yes
+
+Inode 16 has EXTENTS_FL flag set on filesystem without extents 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
+
+i_file_acl for inode 14 (...) is 2892851642, should be zero.
+Clear? yes
+
+Inode 14 (...) has invalid mode (0154247).
+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
+
+Free inodes count wrong for group #0 (6, counted=5).
+Fix? yes
+
+Directories count wrong for group #0 (3, counted=2).
+Fix? yes
+
+Free inodes count wrong (6, counted=5).
+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/e2fsprogs/tests/f_bad_disconnected_inode/expect.2 b/e2fsprogs/tests/f_bad_disconnected_inode/expect.2
new file mode 100644
index 0000000..8dfeb70
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_bad_disconnected_inode/image.gz b/e2fsprogs/tests/f_bad_disconnected_inode/image.gz
new file mode 100644
index 0000000..8f2b3d9
--- /dev/null
+++ b/e2fsprogs/tests/f_bad_disconnected_inode/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_bad_disconnected_inode/name b/e2fsprogs/tests/f_bad_disconnected_inode/name
new file mode 100644
index 0000000..d09edf1
--- /dev/null
+++ b/e2fsprogs/tests/f_bad_disconnected_inode/name
@@ -0,0 +1 @@
+Disconnected inode with bad fields
diff --git a/e2fsprogs/tests/f_bad_local_jnl/expect.1 b/e2fsprogs/tests/f_bad_local_jnl/expect.1
new file mode 100644
index 0000000..10140b5
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_bad_local_jnl/expect.2 b/e2fsprogs/tests/f_bad_local_jnl/expect.2
new file mode 100644
index 0000000..632dc71
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_bad_local_jnl/image.gz b/e2fsprogs/tests/f_bad_local_jnl/image.gz
new file mode 100644
index 0000000..addd58a
--- /dev/null
+++ b/e2fsprogs/tests/f_bad_local_jnl/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_bad_local_jnl/name b/e2fsprogs/tests/f_bad_local_jnl/name
new file mode 100644
index 0000000..8b77264
--- /dev/null
+++ b/e2fsprogs/tests/f_bad_local_jnl/name
@@ -0,0 +1 @@
+test for corrupt local journal (bad V1->V2 journal upgrade)
diff --git a/e2fsprogs/tests/f_badbblocks/expect.1 b/e2fsprogs/tests/f_badbblocks/expect.1
new file mode 100644
index 0000000..3107a29
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_badbblocks/expect.2 b/e2fsprogs/tests/f_badbblocks/expect.2
new file mode 100644
index 0000000..fda217d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_badbblocks/image.gz b/e2fsprogs/tests/f_badbblocks/image.gz
new file mode 100644
index 0000000..fe39b7f
--- /dev/null
+++ b/e2fsprogs/tests/f_badbblocks/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_badbblocks/name b/e2fsprogs/tests/f_badbblocks/name
new file mode 100644
index 0000000..ab20f38
--- /dev/null
+++ b/e2fsprogs/tests/f_badbblocks/name
@@ -0,0 +1 @@
+illegal blocks in bad block inode
diff --git a/e2fsprogs/tests/f_baddir/expect.1 b/e2fsprogs/tests/f_baddir/expect.1
new file mode 100644
index 0000000..cf46a60
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_baddir/expect.2 b/e2fsprogs/tests/f_baddir/expect.2
new file mode 100644
index 0000000..e848eff
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_baddir/image.gz b/e2fsprogs/tests/f_baddir/image.gz
new file mode 100644
index 0000000..9d593fe
--- /dev/null
+++ b/e2fsprogs/tests/f_baddir/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_baddir/name b/e2fsprogs/tests/f_baddir/name
new file mode 100644
index 0000000..9822221
--- /dev/null
+++ b/e2fsprogs/tests/f_baddir/name
@@ -0,0 +1 @@
+corrupted directory entries
diff --git a/e2fsprogs/tests/f_baddir2/expect.1 b/e2fsprogs/tests/f_baddir2/expect.1
new file mode 100644
index 0000000..ec6ed32
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_baddir2/expect.2 b/e2fsprogs/tests/f_baddir2/expect.2
new file mode 100644
index 0000000..b85bbab
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_baddir2/image.gz b/e2fsprogs/tests/f_baddir2/image.gz
new file mode 100644
index 0000000..0d9fcdf
--- /dev/null
+++ b/e2fsprogs/tests/f_baddir2/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_baddir2/name b/e2fsprogs/tests/f_baddir2/name
new file mode 100644
index 0000000..568a7c9
--- /dev/null
+++ b/e2fsprogs/tests/f_baddir2/name
@@ -0,0 +1 @@
+salvage last directory entry
diff --git a/e2fsprogs/tests/f_baddotdir/expect.1 b/e2fsprogs/tests/f_baddotdir/expect.1
new file mode 100644
index 0000000..e24aa94
--- /dev/null
+++ b/e2fsprogs/tests/f_baddotdir/expect.1
@@ -0,0 +1,59 @@
+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
+
+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 (70, counted=71).
+Fix? yes
+
+Free blocks count wrong (70, counted=71).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 18/32 files (0.0% non-contiguous), 29/100 blocks
+Exit status is 1
diff --git a/e2fsprogs/tests/f_baddotdir/expect.2 b/e2fsprogs/tests/f_baddotdir/expect.2
new file mode 100644
index 0000000..8b3523c
--- /dev/null
+++ b/e2fsprogs/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: 18/32 files (0.0% non-contiguous), 29/100 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/f_baddotdir/image.gz b/e2fsprogs/tests/f_baddotdir/image.gz
new file mode 100644
index 0000000..8ed90c5
--- /dev/null
+++ b/e2fsprogs/tests/f_baddotdir/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_baddotdir/name b/e2fsprogs/tests/f_baddotdir/name
new file mode 100644
index 0000000..c13ba75
--- /dev/null
+++ b/e2fsprogs/tests/f_baddotdir/name
@@ -0,0 +1 @@
+bad '.' and '..' entries
diff --git a/e2fsprogs/tests/f_badinode/expect.1 b/e2fsprogs/tests/f_badinode/expect.1
new file mode 100644
index 0000000..8caa2cc
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_badinode/expect.2 b/e2fsprogs/tests/f_badinode/expect.2
new file mode 100644
index 0000000..628a376
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_badinode/image.gz b/e2fsprogs/tests/f_badinode/image.gz
new file mode 100644
index 0000000..7b4a0d1
--- /dev/null
+++ b/e2fsprogs/tests/f_badinode/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_badinode/name b/e2fsprogs/tests/f_badinode/name
new file mode 100644
index 0000000..38ee2d9
--- /dev/null
+++ b/e2fsprogs/tests/f_badinode/name
@@ -0,0 +1 @@
+corrupted inode entries
diff --git a/e2fsprogs/tests/f_badjour_indblks/expect.1 b/e2fsprogs/tests/f_badjour_indblks/expect.1
new file mode 100644
index 0000000..7ccc59b
--- /dev/null
+++ b/e2fsprogs/tests/f_badjour_indblks/expect.1
@@ -0,0 +1,32 @@
+Superblock has an invalid journal (inode 8).
+Clear? yes
+
+*** ext3 journal has been deleted - filesystem is now ext2 only ***
+
+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 re-created - filesystem is now ext3 again ***
+
+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/e2fsprogs/tests/f_badjour_indblks/expect.2 b/e2fsprogs/tests/f_badjour_indblks/expect.2
new file mode 100644
index 0000000..3fbb8b3
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_badjour_indblks/image b/e2fsprogs/tests/f_badjour_indblks/image
new file mode 100644
index 0000000..adbd1d7
--- /dev/null
+++ b/e2fsprogs/tests/f_badjour_indblks/image
Binary files differ
diff --git a/e2fsprogs/tests/f_badjour_indblks/image.gz b/e2fsprogs/tests/f_badjour_indblks/image.gz
new file mode 100644
index 0000000..67190c8
--- /dev/null
+++ b/e2fsprogs/tests/f_badjour_indblks/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_badjour_indblks/name b/e2fsprogs/tests/f_badjour_indblks/name
new file mode 100644
index 0000000..674b99a
--- /dev/null
+++ b/e2fsprogs/tests/f_badjour_indblks/name
@@ -0,0 +1 @@
+corruption in journal inode's indirect blocks
diff --git a/e2fsprogs/tests/f_badjourblks/expect.1 b/e2fsprogs/tests/f_badjourblks/expect.1
new file mode 100644
index 0000000..34c6658
--- /dev/null
+++ b/e2fsprogs/tests/f_badjourblks/expect.1
@@ -0,0 +1,30 @@
+Superblock has an invalid journal (inode 8).
+Clear? yes
+
+*** ext3 journal has been deleted - filesystem is now ext2 only ***
+
+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 re-created - filesystem is now ext3 again ***
+
+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/e2fsprogs/tests/f_badjourblks/expect.2 b/e2fsprogs/tests/f_badjourblks/expect.2
new file mode 100644
index 0000000..7c50703
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_badjourblks/image.gz b/e2fsprogs/tests/f_badjourblks/image.gz
new file mode 100644
index 0000000..e336a4b
--- /dev/null
+++ b/e2fsprogs/tests/f_badjourblks/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_badjourblks/name b/e2fsprogs/tests/f_badjourblks/name
new file mode 100644
index 0000000..103fa7f
--- /dev/null
+++ b/e2fsprogs/tests/f_badjourblks/name
@@ -0,0 +1 @@
+Illegal blocks in journal inode (and backup in superblock)
diff --git a/e2fsprogs/tests/f_badorphan/expect.1 b/e2fsprogs/tests/f_badorphan/expect.1
new file mode 100644
index 0000000..ecf0bf7
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_badorphan/expect.2 b/e2fsprogs/tests/f_badorphan/expect.2
new file mode 100644
index 0000000..3d928eb
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_badorphan/image.gz b/e2fsprogs/tests/f_badorphan/image.gz
new file mode 100644
index 0000000..94e3a38
--- /dev/null
+++ b/e2fsprogs/tests/f_badorphan/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_badorphan/name b/e2fsprogs/tests/f_badorphan/name
new file mode 100644
index 0000000..7c1475b
--- /dev/null
+++ b/e2fsprogs/tests/f_badorphan/name
@@ -0,0 +1 @@
+corrupted orphan list
diff --git a/e2fsprogs/tests/f_badprimary/expect.1 b/e2fsprogs/tests/f_badprimary/expect.1
new file mode 100644
index 0000000..21b814b
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_badprimary/expect.2 b/e2fsprogs/tests/f_badprimary/expect.2
new file mode 100644
index 0000000..a821f87
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_badprimary/image.gz b/e2fsprogs/tests/f_badprimary/image.gz
new file mode 100644
index 0000000..7aeb611
--- /dev/null
+++ b/e2fsprogs/tests/f_badprimary/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_badprimary/name b/e2fsprogs/tests/f_badprimary/name
new file mode 100644
index 0000000..dacce31
--- /dev/null
+++ b/e2fsprogs/tests/f_badprimary/name
@@ -0,0 +1 @@
+bad blocks in the primary superblock and group descriptors
diff --git a/e2fsprogs/tests/f_badroot/expect.1 b/e2fsprogs/tests/f_badroot/expect.1
new file mode 100644
index 0000000..f9d01e5
--- /dev/null
+++ b/e2fsprogs/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 (...)
+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/e2fsprogs/tests/f_badroot/expect.2 b/e2fsprogs/tests/f_badroot/expect.2
new file mode 100644
index 0000000..cab021a
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_badroot/image.gz b/e2fsprogs/tests/f_badroot/image.gz
new file mode 100644
index 0000000..72980a3
--- /dev/null
+++ b/e2fsprogs/tests/f_badroot/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_badroot/name b/e2fsprogs/tests/f_badroot/name
new file mode 100644
index 0000000..399e4f2
--- /dev/null
+++ b/e2fsprogs/tests/f_badroot/name
@@ -0,0 +1 @@
+file in root directory inode
diff --git a/e2fsprogs/tests/f_badsymlinks/expect.1 b/e2fsprogs/tests/f_badsymlinks/expect.1
new file mode 100644
index 0000000..b28b57d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_badsymlinks/expect.2 b/e2fsprogs/tests/f_badsymlinks/expect.2
new file mode 100644
index 0000000..1499551
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_badsymlinks/image.gz b/e2fsprogs/tests/f_badsymlinks/image.gz
new file mode 100644
index 0000000..4ebacde
--- /dev/null
+++ b/e2fsprogs/tests/f_badsymlinks/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_badsymlinks/name b/e2fsprogs/tests/f_badsymlinks/name
new file mode 100644
index 0000000..630858f
--- /dev/null
+++ b/e2fsprogs/tests/f_badsymlinks/name
@@ -0,0 +1 @@
+corrupted symlinks
diff --git a/e2fsprogs/tests/f_badtable/expect.1 b/e2fsprogs/tests/f_badtable/expect.1
new file mode 100644
index 0000000..56881f1
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_badtable/expect.2 b/e2fsprogs/tests/f_badtable/expect.2
new file mode 100644
index 0000000..c1c554c
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_badtable/image.gz b/e2fsprogs/tests/f_badtable/image.gz
new file mode 100644
index 0000000..48dbac1
--- /dev/null
+++ b/e2fsprogs/tests/f_badtable/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_badtable/name b/e2fsprogs/tests/f_badtable/name
new file mode 100644
index 0000000..e4a8bae
--- /dev/null
+++ b/e2fsprogs/tests/f_badtable/name
@@ -0,0 +1 @@
+bad blocks in bitmaps and inode table
diff --git a/e2fsprogs/tests/f_bbfile/expect.1 b/e2fsprogs/tests/f_bbfile/expect.1
new file mode 100644
index 0000000..1d639f6
--- /dev/null
+++ b/e2fsprogs/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 10 11 12 13 14 15 16 17 18 19 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/e2fsprogs/tests/f_bbfile/expect.2 b/e2fsprogs/tests/f_bbfile/expect.2
new file mode 100644
index 0000000..92491da
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_bbfile/image.gz b/e2fsprogs/tests/f_bbfile/image.gz
new file mode 100644
index 0000000..3b01381
--- /dev/null
+++ b/e2fsprogs/tests/f_bbfile/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_bbfile/name b/e2fsprogs/tests/f_bbfile/name
new file mode 100644
index 0000000..8843fbb
--- /dev/null
+++ b/e2fsprogs/tests/f_bbfile/name
@@ -0,0 +1 @@
+bad blocks in files
diff --git a/e2fsprogs/tests/f_bbinode/expect.1 b/e2fsprogs/tests/f_bbinode/expect.1
new file mode 100644
index 0000000..667d666
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_bbinode/expect.2 b/e2fsprogs/tests/f_bbinode/expect.2
new file mode 100644
index 0000000..c65289d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_bbinode/image.gz b/e2fsprogs/tests/f_bbinode/image.gz
new file mode 100644
index 0000000..34dcf48
--- /dev/null
+++ b/e2fsprogs/tests/f_bbinode/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_bbinode/name b/e2fsprogs/tests/f_bbinode/name
new file mode 100644
index 0000000..c5db3e5
--- /dev/null
+++ b/e2fsprogs/tests/f_bbinode/name
@@ -0,0 +1 @@
+bad blocks in inode table
diff --git a/e2fsprogs/tests/f_big_sparse/expect.1 b/e2fsprogs/tests/f_big_sparse/expect.1
new file mode 100644
index 0000000..437ade7
--- /dev/null
+++ b/e2fsprogs/tests/f_big_sparse/expect.1
@@ -0,0 +1,16 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12, i_size is 61440, should be 4398050758656.  Fix? yes
+
+Pass 2: Checking directory structure
+Filesystem contains large files, but lacks LARGE_FILE flag in superblock.
+Fix? yes
+
+Filesystem has feature flag(s) set, but is a revision 0 filesystem.  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: 12/64 files (0.0% non-contiguous), 27/100 blocks
+Exit status is 1
diff --git a/e2fsprogs/tests/f_big_sparse/expect.2 b/e2fsprogs/tests/f_big_sparse/expect.2
new file mode 100644
index 0000000..ae45ec5
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_big_sparse/image.gz b/e2fsprogs/tests/f_big_sparse/image.gz
new file mode 100644
index 0000000..027feeb
--- /dev/null
+++ b/e2fsprogs/tests/f_big_sparse/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_big_sparse/name b/e2fsprogs/tests/f_big_sparse/name
new file mode 100644
index 0000000..b9d9723
--- /dev/null
+++ b/e2fsprogs/tests/f_big_sparse/name
@@ -0,0 +1 @@
+big sparse file
diff --git a/e2fsprogs/tests/f_bitmaps/expect.1 b/e2fsprogs/tests/f_bitmaps/expect.1
new file mode 100644
index 0000000..715984d
--- /dev/null
+++ b/e2fsprogs/tests/f_bitmaps/expect.1
@@ -0,0 +1,17 @@
+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
+
+
+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/e2fsprogs/tests/f_bitmaps/expect.2 b/e2fsprogs/tests/f_bitmaps/expect.2
new file mode 100644
index 0000000..73d1c27
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_bitmaps/image.gz b/e2fsprogs/tests/f_bitmaps/image.gz
new file mode 100644
index 0000000..1c533eb
--- /dev/null
+++ b/e2fsprogs/tests/f_bitmaps/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_bitmaps/name b/e2fsprogs/tests/f_bitmaps/name
new file mode 100644
index 0000000..a309bfa
--- /dev/null
+++ b/e2fsprogs/tests/f_bitmaps/name
@@ -0,0 +1 @@
+corrupted inode and block bitmaps
diff --git a/e2fsprogs/tests/f_clear_xattr/expect.1 b/e2fsprogs/tests/f_clear_xattr/expect.1
new file mode 100644
index 0000000..5cfbeaf
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_clear_xattr/expect.2 b/e2fsprogs/tests/f_clear_xattr/expect.2
new file mode 100644
index 0000000..306d267
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_clear_xattr/image.gz b/e2fsprogs/tests/f_clear_xattr/image.gz
new file mode 100644
index 0000000..99aca14
--- /dev/null
+++ b/e2fsprogs/tests/f_clear_xattr/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_clear_xattr/name b/e2fsprogs/tests/f_clear_xattr/name
new file mode 100644
index 0000000..2ead690
--- /dev/null
+++ b/e2fsprogs/tests/f_clear_xattr/name
@@ -0,0 +1 @@
+clearing i_file_acl when !ext_attr feature
diff --git a/e2fsprogs/tests/f_crashdisk/expect.1 b/e2fsprogs/tests/f_crashdisk/expect.1
new file mode 100644
index 0000000..70ddf2e
--- /dev/null
+++ b/e2fsprogs/tests/f_crashdisk/expect.1
@@ -0,0 +1,11 @@
+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 correct ext2
+filesystem.  If the device is valid and it really contains an ext2
+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>
+
+Exit status is 8
diff --git a/e2fsprogs/tests/f_crashdisk/image.gz b/e2fsprogs/tests/f_crashdisk/image.gz
new file mode 100644
index 0000000..060e7a0
--- /dev/null
+++ b/e2fsprogs/tests/f_crashdisk/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_crashdisk/name b/e2fsprogs/tests/f_crashdisk/name
new file mode 100644
index 0000000..5ba8a60
--- /dev/null
+++ b/e2fsprogs/tests/f_crashdisk/name
@@ -0,0 +1 @@
+Superblock with illegal values
diff --git a/e2fsprogs/tests/f_crashdisk/script b/e2fsprogs/tests/f_crashdisk/script
new file mode 100644
index 0000000..8ab2b9c
--- /dev/null
+++ b/e2fsprogs/tests/f_crashdisk/script
@@ -0,0 +1,2 @@
+ONE_PASS_ONLY="true"
+. $cmd_dir/run_e2fsck
diff --git a/e2fsprogs/tests/f_desc_size_128/expect.1 b/e2fsprogs/tests/f_desc_size_128/expect.1
new file mode 100644
index 0000000..a62f112
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_desc_size_128/expect.2 b/e2fsprogs/tests/f_desc_size_128/expect.2
new file mode 100644
index 0000000..a62f112
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_desc_size_128/image.gz b/e2fsprogs/tests/f_desc_size_128/image.gz
new file mode 100644
index 0000000..eda0cab
--- /dev/null
+++ b/e2fsprogs/tests/f_desc_size_128/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_desc_size_128/name b/e2fsprogs/tests/f_desc_size_128/name
new file mode 100644
index 0000000..f09e003
--- /dev/null
+++ b/e2fsprogs/tests/f_desc_size_128/name
@@ -0,0 +1 @@
+128-byte group descriptors
diff --git a/e2fsprogs/tests/f_desc_size_bad/expect.1 b/e2fsprogs/tests/f_desc_size_bad/expect.1
new file mode 100644
index 0000000..009ee04
--- /dev/null
+++ b/e2fsprogs/tests/f_desc_size_bad/expect.1
@@ -0,0 +1,11 @@
+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), 801/2048 blocks
+Exit status is 1
diff --git a/e2fsprogs/tests/f_desc_size_bad/expect.2 b/e2fsprogs/tests/f_desc_size_bad/expect.2
new file mode 100644
index 0000000..d1429fd
--- /dev/null
+++ b/e2fsprogs/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), 801/2048 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/f_desc_size_bad/script b/e2fsprogs/tests/f_desc_size_bad/script
new file mode 100644
index 0000000..5440328
--- /dev/null
+++ b/e2fsprogs/tests/f_desc_size_bad/script
@@ -0,0 +1,17 @@
+if ! test -x $DEBUGFS_EXE; then
+        echo "$test_name: $test_description: skipped"
+	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/e2fsprogs/tests/f_dir_bad_mode/expect.1 b/e2fsprogs/tests/f_dir_bad_mode/expect.1
new file mode 100644
index 0000000..10b4a99
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dir_bad_mode/expect.2 b/e2fsprogs/tests/f_dir_bad_mode/expect.2
new file mode 100644
index 0000000..7d2352d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dir_bad_mode/image.gz b/e2fsprogs/tests/f_dir_bad_mode/image.gz
new file mode 100644
index 0000000..2f647a1
--- /dev/null
+++ b/e2fsprogs/tests/f_dir_bad_mode/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_dir_bad_mode/name b/e2fsprogs/tests/f_dir_bad_mode/name
new file mode 100644
index 0000000..7cbacc2
--- /dev/null
+++ b/e2fsprogs/tests/f_dir_bad_mode/name
@@ -0,0 +1 @@
+directory with corrupted i_mode
diff --git a/e2fsprogs/tests/f_dirlink/expect.1 b/e2fsprogs/tests/f_dirlink/expect.1
new file mode 100644
index 0000000..f53c0e1
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dirlink/expect.2 b/e2fsprogs/tests/f_dirlink/expect.2
new file mode 100644
index 0000000..cab021a
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dirlink/image.gz b/e2fsprogs/tests/f_dirlink/image.gz
new file mode 100644
index 0000000..2e8def4
--- /dev/null
+++ b/e2fsprogs/tests/f_dirlink/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_dirlink/name b/e2fsprogs/tests/f_dirlink/name
new file mode 100644
index 0000000..30dbdce
--- /dev/null
+++ b/e2fsprogs/tests/f_dirlink/name
@@ -0,0 +1 @@
+directory hard links
diff --git a/e2fsprogs/tests/f_dup/expect.1 b/e2fsprogs/tests/f_dup/expect.1
new file mode 100644
index 0000000..e7128f3
--- /dev/null
+++ b/e2fsprogs/tests/f_dup/expect.1
@@ -0,0 +1,38 @@
+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 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/e2fsprogs/tests/f_dup/expect.2 b/e2fsprogs/tests/f_dup/expect.2
new file mode 100644
index 0000000..1aeb159
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dup/image.gz b/e2fsprogs/tests/f_dup/image.gz
new file mode 100644
index 0000000..3e04690
--- /dev/null
+++ b/e2fsprogs/tests/f_dup/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_dup/name b/e2fsprogs/tests/f_dup/name
new file mode 100644
index 0000000..6296b83
--- /dev/null
+++ b/e2fsprogs/tests/f_dup/name
@@ -0,0 +1 @@
+blocks claimed by two different files
diff --git a/e2fsprogs/tests/f_dup2/expect.1 b/e2fsprogs/tests/f_dup2/expect.1
new file mode 100644
index 0000000..0476005
--- /dev/null
+++ b/e2fsprogs/tests/f_dup2/expect.1
@@ -0,0 +1,45 @@
+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 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/e2fsprogs/tests/f_dup2/expect.2 b/e2fsprogs/tests/f_dup2/expect.2
new file mode 100644
index 0000000..0508b09
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dup2/image.gz b/e2fsprogs/tests/f_dup2/image.gz
new file mode 100644
index 0000000..e9b853d
--- /dev/null
+++ b/e2fsprogs/tests/f_dup2/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_dup2/name b/e2fsprogs/tests/f_dup2/name
new file mode 100644
index 0000000..3d636e0
--- /dev/null
+++ b/e2fsprogs/tests/f_dup2/name
@@ -0,0 +1 @@
+blocks claimed by three different files
diff --git a/e2fsprogs/tests/f_dup3/expect.1 b/e2fsprogs/tests/f_dup3/expect.1
new file mode 100644
index 0000000..eab75a8
--- /dev/null
+++ b/e2fsprogs/tests/f_dup3/expect.1
@@ -0,0 +1,45 @@
+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
+
+
+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/e2fsprogs/tests/f_dup3/expect.2 b/e2fsprogs/tests/f_dup3/expect.2
new file mode 100644
index 0000000..2a31ae6
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dup3/image.gz b/e2fsprogs/tests/f_dup3/image.gz
new file mode 100644
index 0000000..3712cbc
--- /dev/null
+++ b/e2fsprogs/tests/f_dup3/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_dup3/name b/e2fsprogs/tests/f_dup3/name
new file mode 100644
index 0000000..4f312ad
--- /dev/null
+++ b/e2fsprogs/tests/f_dup3/name
@@ -0,0 +1 @@
+blocks claimed by one file multiple times
diff --git a/e2fsprogs/tests/f_dup4/expect.1 b/e2fsprogs/tests/f_dup4/expect.1
new file mode 100644
index 0000000..7d51bb1
--- /dev/null
+++ b/e2fsprogs/tests/f_dup4/expect.1
@@ -0,0 +1,112 @@
+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 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: 30
+Multiply-claimed block(s) in inode 20: 34
+Multiply-claimed block(s) in inode 21: 34
+Multiply-claimed block(s) in inode 22: 34
+Multiply-claimed block(s) in inode 23: 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 /dir/foo (inode #16, mod time Tue Apr 10 21:00:00 2007) 
+  has 1 multiply-claimed block(s), shared with 3 file(s):
+	/dir/quux1 (inode #19, mod time Tue Apr 10 21:00:00 2007)
+	/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)
+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):
+	/dir/quux1 (inode #19, mod time Tue Apr 10 21:00:00 2007)
+	/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)
+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):
+	/dir/quux1 (inode #19, 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/quux1 (inode #19, 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)
+Multiply-claimed blocks already reassigned or cloned.
+
+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):
+	/dir4/fum (inode #23, mod time Tue Apr 10 21:00:00 2007)
+	/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)
+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):
+	/dir4/fum (inode #23, mod time Tue Apr 10 21:00:00 2007)
+	/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)
+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):
+	/dir4/fum (inode #23, 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 /dir4/fum (inode #23, 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)
+Multiply-claimed blocks already reassigned or cloned.
+
+Pass 2: Checking directory structure
+Invalid inode number for '.' in directory inode 20.
+Fix? yes
+
+Invalid inode number for '.' in directory inode 21.
+Fix? yes
+
+Invalid inode number for '.' in directory inode 22.
+Fix? yes
+
+Pass 3: Checking directory connectivity
+'..' in /dir/fee (20) is /dir4 (15), should be /dir (12).
+Fix? yes
+
+'..' in /dir2/fie (21) is /dir4 (15), should be /dir2 (13).
+Fix? yes
+
+'..' in /dir3/foe (22) is /dir4 (15), should be /dir3 (14).
+Fix? yes
+
+Pass 4: Checking reference counts
+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 15 ref count is 0, 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), 35/100 blocks
+Exit status is 1
diff --git a/e2fsprogs/tests/f_dup4/expect.2 b/e2fsprogs/tests/f_dup4/expect.2
new file mode 100644
index 0000000..eedf286
--- /dev/null
+++ b/e2fsprogs/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), 35/100 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/f_dup4/name b/e2fsprogs/tests/f_dup4/name
new file mode 100644
index 0000000..56dbc1e
--- /dev/null
+++ b/e2fsprogs/tests/f_dup4/name
@@ -0,0 +1,2 @@
+find all directory pathnames
+
diff --git a/e2fsprogs/tests/f_dup4/script b/e2fsprogs/tests/f_dup4/script
new file mode 100644
index 0000000..7c45bed
--- /dev/null
+++ b/e2fsprogs/tests/f_dup4/script
@@ -0,0 +1,56 @@
+if test -x $DEBUGFS_EXE; then
+
+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 200704102100
+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
+
+else #if test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi 
diff --git a/e2fsprogs/tests/f_dup_ba/expect.1 b/e2fsprogs/tests/f_dup_ba/expect.1
new file mode 100644
index 0000000..f0ad457
--- /dev/null
+++ b/e2fsprogs/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 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 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/e2fsprogs/tests/f_dup_ba/expect.2 b/e2fsprogs/tests/f_dup_ba/expect.2
new file mode 100644
index 0000000..ec04450
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dup_ba/image.gz b/e2fsprogs/tests/f_dup_ba/image.gz
new file mode 100644
index 0000000..4b31863
--- /dev/null
+++ b/e2fsprogs/tests/f_dup_ba/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_dup_ba/name b/e2fsprogs/tests/f_dup_ba/name
new file mode 100644
index 0000000..a1a8b80
--- /dev/null
+++ b/e2fsprogs/tests/f_dup_ba/name
@@ -0,0 +1 @@
+multiply claimed blocks with bigalloc
diff --git a/e2fsprogs/tests/f_dup_de/expect-nohtree.1 b/e2fsprogs/tests/f_dup_de/expect-nohtree.1
new file mode 100644
index 0000000..64415cc
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dup_de/expect-nohtree.2 b/e2fsprogs/tests/f_dup_de/expect-nohtree.2
new file mode 100644
index 0000000..4d680af
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dup_de/expect.1 b/e2fsprogs/tests/f_dup_de/expect.1
new file mode 100644
index 0000000..e421547
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dup_de/expect.2 b/e2fsprogs/tests/f_dup_de/expect.2
new file mode 100644
index 0000000..4d680af
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dup_de/image.gz b/e2fsprogs/tests/f_dup_de/image.gz
new file mode 100644
index 0000000..8bdb12f
--- /dev/null
+++ b/e2fsprogs/tests/f_dup_de/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_dup_de/name b/e2fsprogs/tests/f_dup_de/name
new file mode 100644
index 0000000..bd90734
--- /dev/null
+++ b/e2fsprogs/tests/f_dup_de/name
@@ -0,0 +1 @@
+duplicate directory entries
diff --git a/e2fsprogs/tests/f_dup_de/script b/e2fsprogs/tests/f_dup_de/script
new file mode 100644
index 0000000..60378cd
--- /dev/null
+++ b/e2fsprogs/tests/f_dup_de/script
@@ -0,0 +1,16 @@
+if test -x $DEBUGFS_EXE; then
+
+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
+
+else #if test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi 
diff --git a/e2fsprogs/tests/f_dup_de2/expect.1 b/e2fsprogs/tests/f_dup_de2/expect.1
new file mode 100644
index 0000000..8dd3d91
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dup_de2/expect.2 b/e2fsprogs/tests/f_dup_de2/expect.2
new file mode 100644
index 0000000..8781274
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dup_de2/image.gz b/e2fsprogs/tests/f_dup_de2/image.gz
new file mode 100644
index 0000000..a8e4db3
--- /dev/null
+++ b/e2fsprogs/tests/f_dup_de2/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_dup_de2/name b/e2fsprogs/tests/f_dup_de2/name
new file mode 100644
index 0000000..e337f10
--- /dev/null
+++ b/e2fsprogs/tests/f_dup_de2/name
@@ -0,0 +1 @@
+duplicate directory entries for non-indexed dirs
diff --git a/e2fsprogs/tests/f_dup_resize/expect.1 b/e2fsprogs/tests/f_dup_resize/expect.1
new file mode 100644
index 0000000..dd8fe05
--- /dev/null
+++ b/e2fsprogs/tests/f_dup_resize/expect.1
@@ -0,0 +1,34 @@
+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 5 6 7
+Multiply-claimed block(s) in inode 12: 4 5 6 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 1 file(s):
+	<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 (7910, counted=7911).
+Fix? yes
+
+Free blocks count wrong (9754, counted=9755).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/2560 files (8.3% non-contiguous), 485/10240 blocks
+Exit status is 1
diff --git a/e2fsprogs/tests/f_dup_resize/expect.2 b/e2fsprogs/tests/f_dup_resize/expect.2
new file mode 100644
index 0000000..198acb9
--- /dev/null
+++ b/e2fsprogs/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), 485/10240 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/f_dup_resize/name b/e2fsprogs/tests/f_dup_resize/name
new file mode 100644
index 0000000..6c5befa
--- /dev/null
+++ b/e2fsprogs/tests/f_dup_resize/name
@@ -0,0 +1 @@
+blocks claimed by the resize inode and another inode
diff --git a/e2fsprogs/tests/f_dup_resize/script b/e2fsprogs/tests/f_dup_resize/script
new file mode 100644
index 0000000..34ec4ae
--- /dev/null
+++ b/e2fsprogs/tests/f_dup_resize/script
@@ -0,0 +1,30 @@
+if test -x $DEBUGFS_EXE; then
+
+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 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 200504110000
+set_inode_field debugfs mtime 200504110000
+q
+EOF
+
+E2FSCK_TIME=1113200000
+export E2FSCK_TIME
+
+. $cmd_dir/run_e2fsck
+
+rm -f $TEST_DATA
+
+unset E2FSCK_TIME TEST_DATA
+
+else #if test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi 
diff --git a/e2fsprogs/tests/f_dupdot/expect.1 b/e2fsprogs/tests/f_dupdot/expect.1
new file mode 100644
index 0000000..afce8d6
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dupdot/expect.2 b/e2fsprogs/tests/f_dupdot/expect.2
new file mode 100644
index 0000000..c547be3
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dupdot/image.gz b/e2fsprogs/tests/f_dupdot/image.gz
new file mode 100644
index 0000000..6a2207e
--- /dev/null
+++ b/e2fsprogs/tests/f_dupdot/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_dupdot/name b/e2fsprogs/tests/f_dupdot/name
new file mode 100644
index 0000000..a7a0afc
--- /dev/null
+++ b/e2fsprogs/tests/f_dupdot/name
@@ -0,0 +1 @@
+duplicate '.' and '..' entries
diff --git a/e2fsprogs/tests/f_dupfsblks/expect.1 b/e2fsprogs/tests/f_dupfsblks/expect.1
new file mode 100644
index 0000000..3f70109
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dupfsblks/expect.2 b/e2fsprogs/tests/f_dupfsblks/expect.2
new file mode 100644
index 0000000..c1726b6
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dupfsblks/image.gz b/e2fsprogs/tests/f_dupfsblks/image.gz
new file mode 100644
index 0000000..109dad0
--- /dev/null
+++ b/e2fsprogs/tests/f_dupfsblks/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_dupfsblks/name b/e2fsprogs/tests/f_dupfsblks/name
new file mode 100644
index 0000000..84124c9
--- /dev/null
+++ b/e2fsprogs/tests/f_dupfsblks/name
@@ -0,0 +1 @@
+blocks claimed by a file and bitmaps or inode tables
diff --git a/e2fsprogs/tests/f_dupsuper/expect.1 b/e2fsprogs/tests/f_dupsuper/expect.1
new file mode 100644
index 0000000..830370a
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dupsuper/expect.2 b/e2fsprogs/tests/f_dupsuper/expect.2
new file mode 100644
index 0000000..8735c4e
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_dupsuper/image.gz b/e2fsprogs/tests/f_dupsuper/image.gz
new file mode 100644
index 0000000..d919e07
--- /dev/null
+++ b/e2fsprogs/tests/f_dupsuper/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_dupsuper/name b/e2fsprogs/tests/f_dupsuper/name
new file mode 100644
index 0000000..560a707
--- /dev/null
+++ b/e2fsprogs/tests/f_dupsuper/name
@@ -0,0 +1 @@
+blocks claimed by a file and superblock or group descriptors
diff --git a/e2fsprogs/tests/f_ea_checks/expect.1 b/e2fsprogs/tests/f_ea_checks/expect.1
new file mode 100644
index 0000000..eb215a2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_ea_checks/expect.2 b/e2fsprogs/tests/f_ea_checks/expect.2
new file mode 100644
index 0000000..2a11cd2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_ea_checks/image.gz b/e2fsprogs/tests/f_ea_checks/image.gz
new file mode 100644
index 0000000..253da06
--- /dev/null
+++ b/e2fsprogs/tests/f_ea_checks/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_ea_checks/name b/e2fsprogs/tests/f_ea_checks/name
new file mode 100644
index 0000000..160fdea
--- /dev/null
+++ b/e2fsprogs/tests/f_ea_checks/name
@@ -0,0 +1 @@
+extended attribute block checks
diff --git a/e2fsprogs/tests/f_end-bitmap/expect.1 b/e2fsprogs/tests/f_end-bitmap/expect.1
new file mode 100644
index 0000000..87e2fd6
--- /dev/null
+++ b/e2fsprogs/tests/f_end-bitmap/expect.1
@@ -0,0 +1,16 @@
+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 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/e2fsprogs/tests/f_end-bitmap/expect.2 b/e2fsprogs/tests/f_end-bitmap/expect.2
new file mode 100644
index 0000000..8109f99
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_end-bitmap/image.gz b/e2fsprogs/tests/f_end-bitmap/image.gz
new file mode 100644
index 0000000..cb20d0a
--- /dev/null
+++ b/e2fsprogs/tests/f_end-bitmap/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_end-bitmap/name b/e2fsprogs/tests/f_end-bitmap/name
new file mode 100644
index 0000000..b63b6d7
--- /dev/null
+++ b/e2fsprogs/tests/f_end-bitmap/name
@@ -0,0 +1 @@
+corruption at end of block bitmap
diff --git a/e2fsprogs/tests/f_eofblocks/expect.1 b/e2fsprogs/tests/f_eofblocks/expect.1
new file mode 100644
index 0000000..2e9133e
--- /dev/null
+++ b/e2fsprogs/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 4096.  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), 83/400 blocks
+Exit status is 1
diff --git a/e2fsprogs/tests/f_eofblocks/expect.2 b/e2fsprogs/tests/f_eofblocks/expect.2
new file mode 100644
index 0000000..2a2bca5
--- /dev/null
+++ b/e2fsprogs/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), 83/400 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/f_eofblocks/image.gz b/e2fsprogs/tests/f_eofblocks/image.gz
new file mode 100644
index 0000000..2586a6a
--- /dev/null
+++ b/e2fsprogs/tests/f_eofblocks/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_eofblocks/name b/e2fsprogs/tests/f_eofblocks/name
new file mode 100644
index 0000000..d93adc1
--- /dev/null
+++ b/e2fsprogs/tests/f_eofblocks/name
@@ -0,0 +1 @@
+blocks after i_size
diff --git a/e2fsprogs/tests/f_expand/expect.1.gz b/e2fsprogs/tests/f_expand/expect.1.gz
new file mode 100644
index 0000000..1015e15
--- /dev/null
+++ b/e2fsprogs/tests/f_expand/expect.1.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_expand/expect.2 b/e2fsprogs/tests/f_expand/expect.2
new file mode 100644
index 0000000..40c00c6
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_expand/image.gz b/e2fsprogs/tests/f_expand/image.gz
new file mode 100644
index 0000000..c4c18fb
--- /dev/null
+++ b/e2fsprogs/tests/f_expand/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_expand/name b/e2fsprogs/tests/f_expand/name
new file mode 100644
index 0000000..feebe0f
--- /dev/null
+++ b/e2fsprogs/tests/f_expand/name
@@ -0,0 +1 @@
+expanding lost+found
diff --git a/e2fsprogs/tests/f_ext_journal/expect.1 b/e2fsprogs/tests/f_ext_journal/expect.1
new file mode 100644
index 0000000..e5c8201
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_ext_journal/expect.2 b/e2fsprogs/tests/f_ext_journal/expect.2
new file mode 100644
index 0000000..e2d0dc6
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_ext_journal/image.gz b/e2fsprogs/tests/f_ext_journal/image.gz
new file mode 100644
index 0000000..5538371
--- /dev/null
+++ b/e2fsprogs/tests/f_ext_journal/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_ext_journal/journal.gz b/e2fsprogs/tests/f_ext_journal/journal.gz
new file mode 100644
index 0000000..ab2c72a
--- /dev/null
+++ b/e2fsprogs/tests/f_ext_journal/journal.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_ext_journal/name b/e2fsprogs/tests/f_ext_journal/name
new file mode 100644
index 0000000..10e950c
--- /dev/null
+++ b/e2fsprogs/tests/f_ext_journal/name
@@ -0,0 +1 @@
+test external journal device
diff --git a/e2fsprogs/tests/f_ext_journal/script b/e2fsprogs/tests/f_ext_journal/script
new file mode 100644
index 0000000..dd81ef5
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_ext_zero_len/expect.1 b/e2fsprogs/tests/f_ext_zero_len/expect.1
new file mode 100644
index 0000000..40109b3
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_ext_zero_len/expect.2 b/e2fsprogs/tests/f_ext_zero_len/expect.2
new file mode 100644
index 0000000..4ee5d96
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_ext_zero_len/image.gz b/e2fsprogs/tests/f_ext_zero_len/image.gz
new file mode 100644
index 0000000..a03e5fd
--- /dev/null
+++ b/e2fsprogs/tests/f_ext_zero_len/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_ext_zero_len/name b/e2fsprogs/tests/f_ext_zero_len/name
new file mode 100644
index 0000000..ada4a72
--- /dev/null
+++ b/e2fsprogs/tests/f_ext_zero_len/name
@@ -0,0 +1 @@
+extent with zero length
diff --git a/e2fsprogs/tests/f_extent_bad_node/expect.1 b/e2fsprogs/tests/f_extent_bad_node/expect.1
new file mode 100644
index 0000000..0c0bc28
--- /dev/null
+++ b/e2fsprogs/tests/f_extent_bad_node/expect.1
@@ -0,0 +1,23 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has an invalid extent node (blk 22, lblk 0)
+Clear? yes
+
+Inode 12, i_blocks is 16, should be 8.  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:  -(21--23) -25
+Fix? yes
+
+Free blocks count wrong for group #0 (71, counted=75).
+Fix? yes
+
+Free blocks count wrong (71, counted=75).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/16 files (0.0% non-contiguous), 25/100 blocks
+Exit status is 1
diff --git a/e2fsprogs/tests/f_extent_bad_node/expect.2 b/e2fsprogs/tests/f_extent_bad_node/expect.2
new file mode 100644
index 0000000..568c792
--- /dev/null
+++ b/e2fsprogs/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), 25/100 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/f_extent_bad_node/image.gz b/e2fsprogs/tests/f_extent_bad_node/image.gz
new file mode 100644
index 0000000..01d9b45
--- /dev/null
+++ b/e2fsprogs/tests/f_extent_bad_node/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_extent_bad_node/name b/e2fsprogs/tests/f_extent_bad_node/name
new file mode 100644
index 0000000..9c9d79f
--- /dev/null
+++ b/e2fsprogs/tests/f_extent_bad_node/name
@@ -0,0 +1 @@
+bad interior node in extent tree
diff --git a/e2fsprogs/tests/f_extent_interior_start_lblk/expect.1 b/e2fsprogs/tests/f_extent_interior_start_lblk/expect.1
new file mode 100644
index 0000000..f5b7d46
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_extent_interior_start_lblk/expect.2 b/e2fsprogs/tests/f_extent_interior_start_lblk/expect.2
new file mode 100644
index 0000000..06c6082
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_extent_interior_start_lblk/image.gz b/e2fsprogs/tests/f_extent_interior_start_lblk/image.gz
new file mode 100644
index 0000000..0ed7128
--- /dev/null
+++ b/e2fsprogs/tests/f_extent_interior_start_lblk/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_extent_interior_start_lblk/name b/e2fsprogs/tests/f_extent_interior_start_lblk/name
new file mode 100644
index 0000000..fbd5f58
--- /dev/null
+++ b/e2fsprogs/tests/f_extent_interior_start_lblk/name
@@ -0,0 +1 @@
+incorrect starting lblk in an interior node
diff --git a/e2fsprogs/tests/f_extent_oobounds/expect.1 b/e2fsprogs/tests/f_extent_oobounds/expect.1
new file mode 100644
index 0000000..3164ea0
--- /dev/null
+++ b/e2fsprogs/tests/f_extent_oobounds/expect.1
@@ -0,0 +1,24 @@
+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, i_blocks is 154, should be 94.  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:  -(200--229)
+Fix? yes
+
+Free blocks count wrong for group #0 (156, counted=186).
+Fix? yes
+
+Free blocks count wrong (156, counted=186).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/32 files (8.3% non-contiguous), 70/256 blocks
+Exit status is 1
diff --git a/e2fsprogs/tests/f_extent_oobounds/expect.2 b/e2fsprogs/tests/f_extent_oobounds/expect.2
new file mode 100644
index 0000000..22c4f2c
--- /dev/null
+++ b/e2fsprogs/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), 70/256 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/f_extent_oobounds/script b/e2fsprogs/tests/f_extent_oobounds/script
new file mode 100644
index 0000000..b00b031
--- /dev/null
+++ b/e2fsprogs/tests/f_extent_oobounds/script
@@ -0,0 +1,42 @@
+if test -x $DEBUGFS_EXE; then
+
+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 $TMPFILE > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF  > /dev/null 2>&1
+write /dev/null testfile
+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
+setb 100 15
+setb 130 30
+setb 200 30
+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
+
+else #if test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi
diff --git a/e2fsprogs/tests/f_extents/expect.1 b/e2fsprogs/tests/f_extents/expect.1
new file mode 100644
index 0000000..2abe32e
--- /dev/null
+++ b/e2fsprogs/tests/f_extents/expect.1
@@ -0,0 +1,52 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 is in extent format, but superblock is missing EXTENTS feature
+Fix? yes
+
+Inode 12 has an invalid extent
+	(logical block 0, invalid physical block 21994527527949, len 17)
+Clear? yes
+
+Inode 12, i_blocks is 34, should be 0.  Fix? yes
+
+Inode 13 missing EXTENT_FL, but is in extents format
+Fix? yes
+
+Inode 17 has an invalid extent
+	(logical block 0, invalid physical block 22011707397135, len 15)
+Clear? yes
+
+Inode 17, i_blocks is 32, should be 0.  Fix? yes
+
+Error while reading over extent tree in inode 18: Corrupt extent header
+Clear inode? yes
+
+Inode 18, i_blocks is 2, should be 0.  Fix? yes
+
+Pass 2: Checking directory structure
+Entry 'fbad-flag' in / (2) has deleted/unused inode 18.  Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences:  -1081 +4611 -(5121--5142)
+Fix? yes
+
+Free blocks count wrong for group #0 (7081, counted=7098).
+Fix? yes
+
+Free blocks count wrong (7081, counted=7098).
+Fix? yes
+
+Inode bitmap differences:  -18
+Fix? yes
+
+Free inodes count wrong for group #0 (237, counted=238).
+Fix? yes
+
+Free inodes count wrong (237, counted=238).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 18/256 files (0.0% non-contiguous), 1094/8192 blocks
+Exit status is 1
diff --git a/e2fsprogs/tests/f_extents/expect.2 b/e2fsprogs/tests/f_extents/expect.2
new file mode 100644
index 0000000..6162cdf
--- /dev/null
+++ b/e2fsprogs/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: 18/256 files (0.0% non-contiguous), 1094/8192 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/f_extents/image.gz b/e2fsprogs/tests/f_extents/image.gz
new file mode 100644
index 0000000..76fc2fb
--- /dev/null
+++ b/e2fsprogs/tests/f_extents/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_extents/name b/e2fsprogs/tests/f_extents/name
new file mode 100644
index 0000000..edede57
--- /dev/null
+++ b/e2fsprogs/tests/f_extents/name
@@ -0,0 +1 @@
+basic extents support
diff --git a/e2fsprogs/tests/f_extents2/expect.1 b/e2fsprogs/tests/f_extents2/expect.1
new file mode 100644
index 0000000..fa7f6eb
--- /dev/null
+++ b/e2fsprogs/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:  -(26--34) -(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/e2fsprogs/tests/f_extents2/expect.2 b/e2fsprogs/tests/f_extents2/expect.2
new file mode 100644
index 0000000..0082a64
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_extents2/image.gz b/e2fsprogs/tests/f_extents2/image.gz
new file mode 100644
index 0000000..52df257
--- /dev/null
+++ b/e2fsprogs/tests/f_extents2/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_extents2/name b/e2fsprogs/tests/f_extents2/name
new file mode 100644
index 0000000..4a7e4eb
--- /dev/null
+++ b/e2fsprogs/tests/f_extents2/name
@@ -0,0 +1 @@
+multiply claimed blocks in extents and other illegal extents
diff --git a/e2fsprogs/tests/f_extra_journal/expect.1 b/e2fsprogs/tests/f_extra_journal/expect.1
new file mode 100644
index 0000000..8a74adb
--- /dev/null
+++ b/e2fsprogs/tests/f_extra_journal/expect.1
@@ -0,0 +1,23 @@
+Superblock has_journal flag is clear, but a journal inode 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/e2fsprogs/tests/f_extra_journal/expect.2 b/e2fsprogs/tests/f_extra_journal/expect.2
new file mode 100644
index 0000000..834a120
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_extra_journal/image.gz b/e2fsprogs/tests/f_extra_journal/image.gz
new file mode 100644
index 0000000..1139619
--- /dev/null
+++ b/e2fsprogs/tests/f_extra_journal/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_extra_journal/name b/e2fsprogs/tests/f_extra_journal/name
new file mode 100644
index 0000000..c5540e2
--- /dev/null
+++ b/e2fsprogs/tests/f_extra_journal/name
@@ -0,0 +1 @@
+Valid journal inode, but has_journal feature not present
diff --git a/e2fsprogs/tests/f_fast_symlink_extents/expect.1 b/e2fsprogs/tests/f_fast_symlink_extents/expect.1
new file mode 100644
index 0000000..dc16c97
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_fast_symlink_extents/expect.2 b/e2fsprogs/tests/f_fast_symlink_extents/expect.2
new file mode 100644
index 0000000..416f49c
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_fast_symlink_extents/image.gz b/e2fsprogs/tests/f_fast_symlink_extents/image.gz
new file mode 100644
index 0000000..37eb0af
--- /dev/null
+++ b/e2fsprogs/tests/f_fast_symlink_extents/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_fast_symlink_extents/name b/e2fsprogs/tests/f_fast_symlink_extents/name
new file mode 100644
index 0000000..333cb52
--- /dev/null
+++ b/e2fsprogs/tests/f_fast_symlink_extents/name
@@ -0,0 +1 @@
+fast symlink with extents flag set
diff --git a/e2fsprogs/tests/f_file_acl_high/expect.1 b/e2fsprogs/tests/f_file_acl_high/expect.1
new file mode 100644
index 0000000..24d6e06
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_file_acl_high/expect.2 b/e2fsprogs/tests/f_file_acl_high/expect.2
new file mode 100644
index 0000000..4c5476c
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_file_acl_high/image.gz b/e2fsprogs/tests/f_file_acl_high/image.gz
new file mode 100644
index 0000000..6342d58
--- /dev/null
+++ b/e2fsprogs/tests/f_file_acl_high/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_file_acl_high/name b/e2fsprogs/tests/f_file_acl_high/name
new file mode 100644
index 0000000..fd54b06
--- /dev/null
+++ b/e2fsprogs/tests/f_file_acl_high/name
@@ -0,0 +1 @@
+i_file_acl_high should be zero
diff --git a/e2fsprogs/tests/f_filetype/expect.1 b/e2fsprogs/tests/f_filetype/expect.1
new file mode 100644
index 0000000..1624bfc
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_filetype/expect.2 b/e2fsprogs/tests/f_filetype/expect.2
new file mode 100644
index 0000000..a8681aa
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_filetype/image.gz b/e2fsprogs/tests/f_filetype/image.gz
new file mode 100644
index 0000000..ad0b2ec
--- /dev/null
+++ b/e2fsprogs/tests/f_filetype/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_filetype/name b/e2fsprogs/tests/f_filetype/name
new file mode 100644
index 0000000..0c021f5
--- /dev/null
+++ b/e2fsprogs/tests/f_filetype/name
@@ -0,0 +1 @@
+set filetype information and illegal special files
diff --git a/e2fsprogs/tests/f_full_bg/expect.1 b/e2fsprogs/tests/f_full_bg/expect.1
new file mode 100644
index 0000000..3d5453f
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_full_bg/expect.2 b/e2fsprogs/tests/f_full_bg/expect.2
new file mode 100644
index 0000000..3d5453f
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_full_bg/image.gz b/e2fsprogs/tests/f_full_bg/image.gz
new file mode 100644
index 0000000..9be419d
--- /dev/null
+++ b/e2fsprogs/tests/f_full_bg/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_full_bg/name b/e2fsprogs/tests/f_full_bg/name
new file mode 100644
index 0000000..b0614de
--- /dev/null
+++ b/e2fsprogs/tests/f_full_bg/name
@@ -0,0 +1 @@
+inode table in last block of first bg
diff --git a/e2fsprogs/tests/f_h_badnode/expect.1 b/e2fsprogs/tests/f_h_badnode/expect.1
new file mode 100644
index 0000000..ce2adb3
--- /dev/null
+++ b/e2fsprogs/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), 13551/31745 blocks
+Exit status is 1
diff --git a/e2fsprogs/tests/f_h_badnode/expect.2 b/e2fsprogs/tests/f_h_badnode/expect.2
new file mode 100644
index 0000000..b9dadb7
--- /dev/null
+++ b/e2fsprogs/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), 13551/31745 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/f_h_badnode/image.gz b/e2fsprogs/tests/f_h_badnode/image.gz
new file mode 100644
index 0000000..0ac41db
--- /dev/null
+++ b/e2fsprogs/tests/f_h_badnode/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_h_badnode/name b/e2fsprogs/tests/f_h_badnode/name
new file mode 100644
index 0000000..ab077fd
--- /dev/null
+++ b/e2fsprogs/tests/f_h_badnode/name
@@ -0,0 +1 @@
+hash directory with bad HTREE nodes
diff --git a/e2fsprogs/tests/f_h_badnode/script b/e2fsprogs/tests/f_h_badnode/script
new file mode 100644
index 0000000..e5fc6b2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_h_badroot/expect.1 b/e2fsprogs/tests/f_h_badroot/expect.1
new file mode 100644
index 0000000..88eba51
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_h_badroot/expect.2 b/e2fsprogs/tests/f_h_badroot/expect.2
new file mode 100644
index 0000000..d5772c1
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_h_badroot/image.gz b/e2fsprogs/tests/f_h_badroot/image.gz
new file mode 100644
index 0000000..7160cd5
--- /dev/null
+++ b/e2fsprogs/tests/f_h_badroot/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_h_badroot/name b/e2fsprogs/tests/f_h_badroot/name
new file mode 100644
index 0000000..b2ac7ff
--- /dev/null
+++ b/e2fsprogs/tests/f_h_badroot/name
@@ -0,0 +1 @@
+bad htree root nodes
diff --git a/e2fsprogs/tests/f_h_badroot/script b/e2fsprogs/tests/f_h_badroot/script
new file mode 100644
index 0000000..e5fc6b2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_h_normal/expect.1 b/e2fsprogs/tests/f_h_normal/expect.1
new file mode 100644
index 0000000..ff7579d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_h_normal/expect.2 b/e2fsprogs/tests/f_h_normal/expect.2
new file mode 100644
index 0000000..ff7579d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_h_normal/image.gz b/e2fsprogs/tests/f_h_normal/image.gz
new file mode 100644
index 0000000..8b4daee
--- /dev/null
+++ b/e2fsprogs/tests/f_h_normal/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_h_normal/name b/e2fsprogs/tests/f_h_normal/name
new file mode 100644
index 0000000..5190f35
--- /dev/null
+++ b/e2fsprogs/tests/f_h_normal/name
@@ -0,0 +1 @@
+Normal (signed) HTREE directory
diff --git a/e2fsprogs/tests/f_h_normal/script b/e2fsprogs/tests/f_h_normal/script
new file mode 100644
index 0000000..e5fc6b2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_h_reindex/expect.1 b/e2fsprogs/tests/f_h_reindex/expect.1
new file mode 100755
index 0000000..2887239
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_h_reindex/expect.2 b/e2fsprogs/tests/f_h_reindex/expect.2
new file mode 100644
index 0000000..7f785af
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_h_reindex/image.gz b/e2fsprogs/tests/f_h_reindex/image.gz
new file mode 100644
index 0000000..4aae72f
--- /dev/null
+++ b/e2fsprogs/tests/f_h_reindex/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_h_reindex/name b/e2fsprogs/tests/f_h_reindex/name
new file mode 100644
index 0000000..ed4625f
--- /dev/null
+++ b/e2fsprogs/tests/f_h_reindex/name
@@ -0,0 +1 @@
+reindex HTREE Directory with different hash seed
diff --git a/e2fsprogs/tests/f_h_reindex/script b/e2fsprogs/tests/f_h_reindex/script
new file mode 100644
index 0000000..e5fc6b2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_h_unsigned/expect.1 b/e2fsprogs/tests/f_h_unsigned/expect.1
new file mode 100644
index 0000000..ff7579d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_h_unsigned/expect.2 b/e2fsprogs/tests/f_h_unsigned/expect.2
new file mode 100644
index 0000000..ff7579d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_h_unsigned/image.gz b/e2fsprogs/tests/f_h_unsigned/image.gz
new file mode 100644
index 0000000..3af9c84
--- /dev/null
+++ b/e2fsprogs/tests/f_h_unsigned/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_h_unsigned/name b/e2fsprogs/tests/f_h_unsigned/name
new file mode 100644
index 0000000..1606958
--- /dev/null
+++ b/e2fsprogs/tests/f_h_unsigned/name
@@ -0,0 +1 @@
+Unsigned HTREE directory
diff --git a/e2fsprogs/tests/f_h_unsigned/script b/e2fsprogs/tests/f_h_unsigned/script
new file mode 100644
index 0000000..e5fc6b2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_holedir/expect.1 b/e2fsprogs/tests/f_holedir/expect.1
new file mode 100644
index 0000000..ad74fa6
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_holedir/expect.2 b/e2fsprogs/tests/f_holedir/expect.2
new file mode 100644
index 0000000..4c0b4f2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_holedir/image.gz b/e2fsprogs/tests/f_holedir/image.gz
new file mode 100644
index 0000000..ee26ab8
--- /dev/null
+++ b/e2fsprogs/tests/f_holedir/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_holedir/name b/e2fsprogs/tests/f_holedir/name
new file mode 100644
index 0000000..411f656
--- /dev/null
+++ b/e2fsprogs/tests/f_holedir/name
@@ -0,0 +1 @@
+directory with holes and illegal blocks
diff --git a/e2fsprogs/tests/f_holedir2/expect.1 b/e2fsprogs/tests/f_holedir2/expect.1
new file mode 100644
index 0000000..5124f61
--- /dev/null
+++ b/e2fsprogs/tests/f_holedir2/expect.1
@@ -0,0 +1,24 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12, i_size is 0, should be 5120.  Fix? yes
+
+Inode 13, i_size is 4096, should be 5120.  Fix? yes
+
+Pass 2: Checking directory structure
+Directory inode 12 has an unallocated block #3.  Allocate? yes
+
+Directory inode 13 has an unallocated block #1.  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 (79, counted=77).
+Fix? yes
+
+Free blocks count wrong (79, 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/e2fsprogs/tests/f_holedir2/expect.2 b/e2fsprogs/tests/f_holedir2/expect.2
new file mode 100644
index 0000000..636c6e9
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_holedir2/image.gz b/e2fsprogs/tests/f_holedir2/image.gz
new file mode 100644
index 0000000..63dda07
--- /dev/null
+++ b/e2fsprogs/tests/f_holedir2/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_holedir2/name b/e2fsprogs/tests/f_holedir2/name
new file mode 100644
index 0000000..ec153f3
--- /dev/null
+++ b/e2fsprogs/tests/f_holedir2/name
@@ -0,0 +1,2 @@
+directories with holes and zero i_size
+
diff --git a/e2fsprogs/tests/f_hurd/expect.1 b/e2fsprogs/tests/f_hurd/expect.1
new file mode 100644
index 0000000..f7bfc56
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_hurd/expect.2 b/e2fsprogs/tests/f_hurd/expect.2
new file mode 100644
index 0000000..44bff62
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_hurd/image.gz b/e2fsprogs/tests/f_hurd/image.gz
new file mode 100644
index 0000000..58ffe0c
--- /dev/null
+++ b/e2fsprogs/tests/f_hurd/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_hurd/name b/e2fsprogs/tests/f_hurd/name
new file mode 100644
index 0000000..a692986
--- /dev/null
+++ b/e2fsprogs/tests/f_hurd/name
@@ -0,0 +1 @@
+GNU/Hurd specific tests
diff --git a/e2fsprogs/tests/f_illbbitmap/expect.1 b/e2fsprogs/tests/f_illbbitmap/expect.1
new file mode 100644
index 0000000..8746d23
--- /dev/null
+++ b/e2fsprogs/tests/f_illbbitmap/expect.1
@@ -0,0 +1,28 @@
+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
+
+
+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/e2fsprogs/tests/f_illbbitmap/expect.2 b/e2fsprogs/tests/f_illbbitmap/expect.2
new file mode 100644
index 0000000..a821f87
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_illbbitmap/image.gz b/e2fsprogs/tests/f_illbbitmap/image.gz
new file mode 100644
index 0000000..fb16ebc
--- /dev/null
+++ b/e2fsprogs/tests/f_illbbitmap/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_illbbitmap/name b/e2fsprogs/tests/f_illbbitmap/name
new file mode 100644
index 0000000..5ed4f59
--- /dev/null
+++ b/e2fsprogs/tests/f_illbbitmap/name
@@ -0,0 +1 @@
+illegal block bitmap
diff --git a/e2fsprogs/tests/f_illibitmap/expect.1 b/e2fsprogs/tests/f_illibitmap/expect.1
new file mode 100644
index 0000000..5bae25d
--- /dev/null
+++ b/e2fsprogs/tests/f_illibitmap/expect.1
@@ -0,0 +1,25 @@
+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
+
+
+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/e2fsprogs/tests/f_illibitmap/expect.2 b/e2fsprogs/tests/f_illibitmap/expect.2
new file mode 100644
index 0000000..a821f87
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_illibitmap/image.gz b/e2fsprogs/tests/f_illibitmap/image.gz
new file mode 100644
index 0000000..3e0892d
--- /dev/null
+++ b/e2fsprogs/tests/f_illibitmap/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_illibitmap/name b/e2fsprogs/tests/f_illibitmap/name
new file mode 100644
index 0000000..bac4003
--- /dev/null
+++ b/e2fsprogs/tests/f_illibitmap/name
@@ -0,0 +1 @@
+illegal inode bitmap
diff --git a/e2fsprogs/tests/f_illitable/expect.1 b/e2fsprogs/tests/f_illitable/expect.1
new file mode 100644
index 0000000..552a2e7
--- /dev/null
+++ b/e2fsprogs/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 5...
+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/e2fsprogs/tests/f_illitable/expect.2 b/e2fsprogs/tests/f_illitable/expect.2
new file mode 100644
index 0000000..3ead5cf
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_illitable/image.gz b/e2fsprogs/tests/f_illitable/image.gz
new file mode 100644
index 0000000..1b02194
--- /dev/null
+++ b/e2fsprogs/tests/f_illitable/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_illitable/name b/e2fsprogs/tests/f_illitable/name
new file mode 100644
index 0000000..631e73b
--- /dev/null
+++ b/e2fsprogs/tests/f_illitable/name
@@ -0,0 +1 @@
+illegal inode table
diff --git a/e2fsprogs/tests/f_illitable_flexbg/expect.1 b/e2fsprogs/tests/f_illitable_flexbg/expect.1
new file mode 100644
index 0000000..fa42a0f
--- /dev/null
+++ b/e2fsprogs/tests/f_illitable_flexbg/expect.1
@@ -0,0 +1,24 @@
+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
+
+
+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/e2fsprogs/tests/f_illitable_flexbg/expect.2 b/e2fsprogs/tests/f_illitable_flexbg/expect.2
new file mode 100644
index 0000000..8ef43c2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_illitable_flexbg/image.gz b/e2fsprogs/tests/f_illitable_flexbg/image.gz
new file mode 100755
index 0000000..7fa1446
--- /dev/null
+++ b/e2fsprogs/tests/f_illitable_flexbg/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_illitable_flexbg/name b/e2fsprogs/tests/f_illitable_flexbg/name
new file mode 100644
index 0000000..58b0850
--- /dev/null
+++ b/e2fsprogs/tests/f_illitable_flexbg/name
@@ -0,0 +1 @@
+illegal inode table with FLEX_BG
diff --git a/e2fsprogs/tests/f_imagic/expect.1 b/e2fsprogs/tests/f_imagic/expect.1
new file mode 100644
index 0000000..ebee192
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_imagic/expect.2 b/e2fsprogs/tests/f_imagic/expect.2
new file mode 100644
index 0000000..1f411c0
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_imagic/image.gz b/e2fsprogs/tests/f_imagic/image.gz
new file mode 100644
index 0000000..6c2b3fa
--- /dev/null
+++ b/e2fsprogs/tests/f_imagic/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_imagic/name b/e2fsprogs/tests/f_imagic/name
new file mode 100644
index 0000000..db94008
--- /dev/null
+++ b/e2fsprogs/tests/f_imagic/name
@@ -0,0 +1 @@
+non-imagic filesystem with imagic inodes
diff --git a/e2fsprogs/tests/f_imagic_fs/expect.1 b/e2fsprogs/tests/f_imagic_fs/expect.1
new file mode 100644
index 0000000..b21fd35
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_imagic_fs/expect.2 b/e2fsprogs/tests/f_imagic_fs/expect.2
new file mode 100644
index 0000000..1f411c0
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_imagic_fs/name b/e2fsprogs/tests/f_imagic_fs/name
new file mode 100644
index 0000000..a036976
--- /dev/null
+++ b/e2fsprogs/tests/f_imagic_fs/name
@@ -0,0 +1 @@
+imagic filesystem with imagic inodes
diff --git a/e2fsprogs/tests/f_imagic_fs/script b/e2fsprogs/tests/f_imagic_fs/script
new file mode 100644
index 0000000..1060f04
--- /dev/null
+++ b/e2fsprogs/tests/f_imagic_fs/script
@@ -0,0 +1,9 @@
+if test -x $DEBUGFS_EXE; then
+
+IMAGE=$test_dir/../f_imagic/image.gz
+PREP_CMD='$DEBUGFS -w -R "feature imagic_inodes" $TMPFILE > /dev/null 2>&1'
+. $cmd_dir/run_e2fsck
+
+else #if test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi 
diff --git a/e2fsprogs/tests/f_invalid_bad_inode/expect.1 b/e2fsprogs/tests/f_invalid_bad_inode/expect.1
new file mode 100644
index 0000000..5a37cb0
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_invalid_bad_inode/expect.2 b/e2fsprogs/tests/f_invalid_bad_inode/expect.2
new file mode 100644
index 0000000..41ceefb
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_invalid_bad_inode/image.gz b/e2fsprogs/tests/f_invalid_bad_inode/image.gz
new file mode 100644
index 0000000..5dac147
--- /dev/null
+++ b/e2fsprogs/tests/f_invalid_bad_inode/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_invalid_bad_inode/name b/e2fsprogs/tests/f_invalid_bad_inode/name
new file mode 100644
index 0000000..f981e8d
--- /dev/null
+++ b/e2fsprogs/tests/f_invalid_bad_inode/name
@@ -0,0 +1 @@
+check for bogus bad inode
diff --git a/e2fsprogs/tests/f_invalid_extent_symlink/expect.1 b/e2fsprogs/tests/f_invalid_extent_symlink/expect.1
new file mode 100644
index 0000000..7bda0b7
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_invalid_extent_symlink/expect.2 b/e2fsprogs/tests/f_invalid_extent_symlink/expect.2
new file mode 100644
index 0000000..41ceefb
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_invalid_extent_symlink/image.gz b/e2fsprogs/tests/f_invalid_extent_symlink/image.gz
new file mode 100644
index 0000000..d4a6eef
--- /dev/null
+++ b/e2fsprogs/tests/f_invalid_extent_symlink/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_invalid_extent_symlink/name b/e2fsprogs/tests/f_invalid_extent_symlink/name
new file mode 100644
index 0000000..3792aac
--- /dev/null
+++ b/e2fsprogs/tests/f_invalid_extent_symlink/name
@@ -0,0 +1 @@
+extent-mapped symlink with two blocks
diff --git a/e2fsprogs/tests/f_jnl_32bit/expect.0 b/e2fsprogs/tests/f_jnl_32bit/expect.0
new file mode 100644
index 0000000..b7de48e
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_jnl_32bit/expect.1 b/e2fsprogs/tests/f_jnl_32bit/expect.1
new file mode 100644
index 0000000..56aab48
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_jnl_32bit/expect.2 b/e2fsprogs/tests/f_jnl_32bit/expect.2
new file mode 100644
index 0000000..be948d2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_jnl_32bit/image.gz b/e2fsprogs/tests/f_jnl_32bit/image.gz
new file mode 100644
index 0000000..b308102
--- /dev/null
+++ b/e2fsprogs/tests/f_jnl_32bit/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_jnl_32bit/name b/e2fsprogs/tests/f_jnl_32bit/name
new file mode 100644
index 0000000..60e9913
--- /dev/null
+++ b/e2fsprogs/tests/f_jnl_32bit/name
@@ -0,0 +1 @@
+on-disk 32-bit journal format
diff --git a/e2fsprogs/tests/f_jnl_32bit/script b/e2fsprogs/tests/f_jnl_32bit/script
new file mode 100644
index 0000000..9fb4366
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_jnl_64bit/expect.0 b/e2fsprogs/tests/f_jnl_64bit/expect.0
new file mode 100644
index 0000000..2007f03
--- /dev/null
+++ b/e2fsprogs/tests/f_jnl_64bit/expect.0
@@ -0,0 +1,928 @@
+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 0
+  Revoke FS block 1536
+  Revoke FS block 0
+  Revoke FS block 1472
+  Revoke FS block 0
+  Revoke FS block 1473
+  Revoke FS block 0
+  Revoke FS block 1474
+  Revoke FS block 0
+  Revoke FS block 1475
+  Revoke FS block 0
+  Revoke FS block 1476
+  Revoke FS block 0
+  Revoke FS block 1541
+  Revoke FS block 0
+  Revoke FS block 1477
+  Revoke FS block 0
+  Revoke FS block 1478
+  Revoke FS block 0
+  Revoke FS block 1479
+  Revoke FS block 0
+  Revoke FS block 1480
+  Revoke FS block 0
+  Revoke FS block 1481
+  Revoke FS block 0
+  Revoke FS block 1482
+  Revoke FS block 0
+  Revoke FS block 1483
+  Revoke FS block 0
+  Revoke FS block 1484
+  Revoke FS block 0
+  Revoke FS block 1485
+  Revoke FS block 0
+  Revoke FS block 1486
+  Revoke FS block 0
+  Revoke FS block 1487
+  Revoke FS block 0
+  Revoke FS block 1488
+  Revoke FS block 0
+  Revoke FS block 1489
+  Revoke FS block 0
+  Revoke FS block 1490
+  Revoke FS block 0
+  Revoke FS block 1491
+  Revoke FS block 0
+  Revoke FS block 1556
+  Revoke FS block 0
+  Revoke FS block 1492
+  Revoke FS block 0
+  Revoke FS block 1493
+  Revoke FS block 0
+  Revoke FS block 1429
+  Revoke FS block 0
+  Revoke FS block 1494
+  Revoke FS block 0
+  Revoke FS block 1495
+  Revoke FS block 0
+  Revoke FS block 1496
+  Revoke FS block 0
+  Revoke FS block 1432
+  Revoke FS block 0
+  Revoke FS block 1497
+  Revoke FS block 0
+  Revoke FS block 1498
+  Revoke FS block 0
+  Revoke FS block 1434
+  Revoke FS block 0
+  Revoke FS block 1499
+  Revoke FS block 0
+  Revoke FS block 1435
+  Revoke FS block 0
+  Revoke FS block 1500
+  Revoke FS block 0
+  Revoke FS block 1501
+  Revoke FS block 0
+  Revoke FS block 1502
+  Revoke FS block 0
+  Revoke FS block 1503
+  Revoke FS block 0
+  Revoke FS block 1504
+  Revoke FS block 0
+  Revoke FS block 1505
+  Revoke FS block 0
+  Revoke FS block 1506
+  Revoke FS block 0
+  Revoke FS block 1442
+  Revoke FS block 0
+  Revoke FS block 1507
+  Revoke FS block 0
+  Revoke FS block 1508
+  Revoke FS block 0
+  Revoke FS block 1444
+  Revoke FS block 0
+  Revoke FS block 1509
+  Revoke FS block 0
+  Revoke FS block 1445
+  Revoke FS block 0
+  Revoke FS block 1510
+  Revoke FS block 0
+  Revoke FS block 1511
+  Revoke FS block 0
+  Revoke FS block 1512
+  Revoke FS block 0
+  Revoke FS block 1513
+  Revoke FS block 0
+  Revoke FS block 1449
+  Revoke FS block 0
+  Revoke FS block 1514
+  Revoke FS block 0
+  Revoke FS block 1515
+  Revoke FS block 0
+  Revoke FS block 1516
+  Revoke FS block 0
+  Revoke FS block 1517
+  Revoke FS block 0
+  Revoke FS block 1453
+  Revoke FS block 0
+  Revoke FS block 1518
+  Revoke FS block 0
+  Revoke FS block 1519
+  Revoke FS block 0
+  Revoke FS block 1520
+  Revoke FS block 0
+  Revoke FS block 1456
+  Revoke FS block 0
+  Revoke FS block 1521
+  Revoke FS block 0
+  Revoke FS block 1457
+  Revoke FS block 0
+  Revoke FS block 1522
+  Revoke FS block 0
+  Revoke FS block 1458
+  Revoke FS block 0
+  Revoke FS block 1523
+  Revoke FS block 0
+  Revoke FS block 1459
+  Revoke FS block 0
+  Revoke FS block 1524
+  Revoke FS block 0
+  Revoke FS block 1460
+  Revoke FS block 0
+  Revoke FS block 1525
+  Revoke FS block 0
+  Revoke FS block 1461
+  Revoke FS block 0
+  Revoke FS block 1526
+  Revoke FS block 0
+  Revoke FS block 1462
+  Revoke FS block 0
+  Revoke FS block 1527
+  Revoke FS block 0
+  Revoke FS block 1463
+  Revoke FS block 0
+  Revoke FS block 1528
+  Revoke FS block 0
+  Revoke FS block 1464
+  Revoke FS block 0
+  Revoke FS block 1529
+  Revoke FS block 0
+  Revoke FS block 1465
+  Revoke FS block 0
+  Revoke FS block 1530
+  Revoke FS block 0
+  Revoke FS block 1466
+  Revoke FS block 0
+  Revoke FS block 1531
+  Revoke FS block 0
+  Revoke FS block 1467
+  Revoke FS block 0
+  Revoke FS block 1532
+  Revoke FS block 0
+  Revoke FS block 1468
+  Revoke FS block 0
+  Revoke FS block 1533
+  Revoke FS block 0
+  Revoke FS block 1469
+  Revoke FS block 0
+  Revoke FS block 1534
+  Revoke FS block 0
+  Revoke FS block 1470
+  Revoke FS block 0
+  Revoke FS block 1535
+  Revoke FS block 0
+  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 0
+  Revoke FS block 1600
+  Revoke FS block 0
+  Revoke FS block 1601
+  Revoke FS block 0
+  Revoke FS block 1537
+  Revoke FS block 0
+  Revoke FS block 1602
+  Revoke FS block 0
+  Revoke FS block 1538
+  Revoke FS block 0
+  Revoke FS block 1603
+  Revoke FS block 0
+  Revoke FS block 1539
+  Revoke FS block 0
+  Revoke FS block 1604
+  Revoke FS block 0
+  Revoke FS block 1540
+  Revoke FS block 0
+  Revoke FS block 1605
+  Revoke FS block 0
+  Revoke FS block 1606
+  Revoke FS block 0
+  Revoke FS block 1542
+  Revoke FS block 0
+  Revoke FS block 1607
+  Revoke FS block 0
+  Revoke FS block 1543
+  Revoke FS block 0
+  Revoke FS block 1608
+  Revoke FS block 0
+  Revoke FS block 1544
+  Revoke FS block 0
+  Revoke FS block 1609
+  Revoke FS block 0
+  Revoke FS block 1545
+  Revoke FS block 0
+  Revoke FS block 1610
+  Revoke FS block 0
+  Revoke FS block 1546
+  Revoke FS block 0
+  Revoke FS block 1611
+  Revoke FS block 0
+  Revoke FS block 1547
+  Revoke FS block 0
+  Revoke FS block 1612
+  Revoke FS block 0
+  Revoke FS block 1548
+  Revoke FS block 0
+  Revoke FS block 1613
+  Revoke FS block 0
+  Revoke FS block 1549
+  Revoke FS block 0
+  Revoke FS block 1614
+  Revoke FS block 0
+  Revoke FS block 1550
+  Revoke FS block 0
+  Revoke FS block 1615
+  Revoke FS block 0
+  Revoke FS block 1551
+  Revoke FS block 0
+  Revoke FS block 1616
+  Revoke FS block 0
+  Revoke FS block 1552
+  Revoke FS block 0
+  Revoke FS block 1617
+  Revoke FS block 0
+  Revoke FS block 1553
+  Revoke FS block 0
+  Revoke FS block 1554
+  Revoke FS block 0
+  Revoke FS block 1555
+  Revoke FS block 0
+  Revoke FS block 1557
+  Revoke FS block 0
+  Revoke FS block 1558
+  Revoke FS block 0
+  Revoke FS block 1559
+  Revoke FS block 0
+  Revoke FS block 1560
+  Revoke FS block 0
+  Revoke FS block 1561
+  Revoke FS block 0
+  Revoke FS block 1562
+  Revoke FS block 0
+  Revoke FS block 1563
+  Revoke FS block 0
+  Revoke FS block 1564
+  Revoke FS block 0
+  Revoke FS block 1565
+  Revoke FS block 0
+  Revoke FS block 1566
+  Revoke FS block 0
+  Revoke FS block 1567
+  Revoke FS block 0
+  Revoke FS block 1568
+  Revoke FS block 0
+  Revoke FS block 1569
+  Revoke FS block 0
+  Revoke FS block 1570
+  Revoke FS block 0
+  Revoke FS block 1571
+  Revoke FS block 0
+  Revoke FS block 1572
+  Revoke FS block 0
+  Revoke FS block 1573
+  Revoke FS block 0
+  Revoke FS block 1574
+  Revoke FS block 0
+  Revoke FS block 1575
+  Revoke FS block 0
+  Revoke FS block 1576
+  Revoke FS block 0
+  Revoke FS block 1577
+  Revoke FS block 0
+  Revoke FS block 1578
+  Revoke FS block 0
+  Revoke FS block 1579
+  Revoke FS block 0
+  Revoke FS block 1580
+  Revoke FS block 0
+  Revoke FS block 1581
+  Revoke FS block 0
+  Revoke FS block 1582
+  Revoke FS block 0
+  Revoke FS block 1583
+  Revoke FS block 0
+  Revoke FS block 1584
+  Revoke FS block 0
+  Revoke FS block 1585
+  Revoke FS block 0
+  Revoke FS block 1586
+  Revoke FS block 0
+  Revoke FS block 1587
+  Revoke FS block 0
+  Revoke FS block 1588
+  Revoke FS block 0
+  Revoke FS block 1589
+  Revoke FS block 0
+  Revoke FS block 1590
+  Revoke FS block 0
+  Revoke FS block 1591
+  Revoke FS block 0
+  Revoke FS block 1592
+  Revoke FS block 0
+  Revoke FS block 1593
+  Revoke FS block 0
+  Revoke FS block 1594
+  Revoke FS block 0
+  Revoke FS block 1595
+  Revoke FS block 0
+  Revoke FS block 1596
+  Revoke FS block 0
+  Revoke FS block 1597
+  Revoke FS block 0
+  Revoke FS block 1598
+  Revoke FS block 0
+  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/e2fsprogs/tests/f_jnl_64bit/expect.1 b/e2fsprogs/tests/f_jnl_64bit/expect.1
new file mode 100644
index 0000000..e360e2f
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_jnl_64bit/expect.2 b/e2fsprogs/tests/f_jnl_64bit/expect.2
new file mode 100644
index 0000000..93cb730
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_jnl_64bit/image.gz b/e2fsprogs/tests/f_jnl_64bit/image.gz
new file mode 100644
index 0000000..9758f90
--- /dev/null
+++ b/e2fsprogs/tests/f_jnl_64bit/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_jnl_64bit/name b/e2fsprogs/tests/f_jnl_64bit/name
new file mode 100644
index 0000000..2c8dd15
--- /dev/null
+++ b/e2fsprogs/tests/f_jnl_64bit/name
@@ -0,0 +1 @@
+on-disk 64-bit journal format
diff --git a/e2fsprogs/tests/f_jnl_64bit/script b/e2fsprogs/tests/f_jnl_64bit/script
new file mode 100644
index 0000000..9fb4366
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_jnl_errno/expect.0 b/e2fsprogs/tests/f_jnl_errno/expect.0
new file mode 100644
index 0000000..6dad72a
--- /dev/null
+++ b/e2fsprogs/tests/f_jnl_errno/expect.0
@@ -0,0 +1,47 @@
+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)
+Journal size:             1024k
+Journal length:           1024
+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/e2fsprogs/tests/f_jnl_errno/expect.1 b/e2fsprogs/tests/f_jnl_errno/expect.1
new file mode 100644
index 0000000..c572951
--- /dev/null
+++ b/e2fsprogs/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 1
diff --git a/e2fsprogs/tests/f_jnl_errno/expect.2 b/e2fsprogs/tests/f_jnl_errno/expect.2
new file mode 100644
index 0000000..db16a75
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_jnl_errno/image.gz b/e2fsprogs/tests/f_jnl_errno/image.gz
new file mode 100644
index 0000000..c55c775
--- /dev/null
+++ b/e2fsprogs/tests/f_jnl_errno/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_jnl_errno/name b/e2fsprogs/tests/f_jnl_errno/name
new file mode 100644
index 0000000..e5f64d6
--- /dev/null
+++ b/e2fsprogs/tests/f_jnl_errno/name
@@ -0,0 +1 @@
+journal s_errno handling
diff --git a/e2fsprogs/tests/f_jnl_errno/script b/e2fsprogs/tests/f_jnl_errno/script
new file mode 100644
index 0000000..ef5006a
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_journal/expect.1 b/e2fsprogs/tests/f_journal/expect.1
new file mode 100644
index 0000000..a202c80
--- /dev/null
+++ b/e2fsprogs/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 1
diff --git a/e2fsprogs/tests/f_journal/expect.2 b/e2fsprogs/tests/f_journal/expect.2
new file mode 100644
index 0000000..47c52f7
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_journal/image.gz b/e2fsprogs/tests/f_journal/image.gz
new file mode 100644
index 0000000..512d9ec
--- /dev/null
+++ b/e2fsprogs/tests/f_journal/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_journal/name b/e2fsprogs/tests/f_journal/name
new file mode 100644
index 0000000..ece2321
--- /dev/null
+++ b/e2fsprogs/tests/f_journal/name
@@ -0,0 +1 @@
+recover journal from corrupted inode table
diff --git a/e2fsprogs/tests/f_lotsbad/expect.1 b/e2fsprogs/tests/f_lotsbad/expect.1
new file mode 100644
index 0000000..d9e8a24
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_lotsbad/expect.2 b/e2fsprogs/tests/f_lotsbad/expect.2
new file mode 100644
index 0000000..da1208f
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_lotsbad/image.gz b/e2fsprogs/tests/f_lotsbad/image.gz
new file mode 100644
index 0000000..8fd5d1e
--- /dev/null
+++ b/e2fsprogs/tests/f_lotsbad/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_lotsbad/name b/e2fsprogs/tests/f_lotsbad/name
new file mode 100644
index 0000000..16b77c1
--- /dev/null
+++ b/e2fsprogs/tests/f_lotsbad/name
@@ -0,0 +1 @@
+too many illegal blocks in inode
diff --git a/e2fsprogs/tests/f_lpf/expect.1 b/e2fsprogs/tests/f_lpf/expect.1
new file mode 100644
index 0000000..4f2853c
--- /dev/null
+++ b/e2fsprogs/tests/f_lpf/expect.1
@@ -0,0 +1,48 @@
+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
+
+
+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/e2fsprogs/tests/f_lpf/expect.2 b/e2fsprogs/tests/f_lpf/expect.2
new file mode 100644
index 0000000..36110ee
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_lpf/image.gz b/e2fsprogs/tests/f_lpf/image.gz
new file mode 100644
index 0000000..2a71bcf
--- /dev/null
+++ b/e2fsprogs/tests/f_lpf/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_lpf/name b/e2fsprogs/tests/f_lpf/name
new file mode 100644
index 0000000..ac2dbab
--- /dev/null
+++ b/e2fsprogs/tests/f_lpf/name
@@ -0,0 +1 @@
+missing lost+found
diff --git a/e2fsprogs/tests/f_lpf2/expect.1 b/e2fsprogs/tests/f_lpf2/expect.1
new file mode 100644
index 0000000..633586c
--- /dev/null
+++ b/e2fsprogs/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 (/???)
+Connect to /lost+found? yes
+
+/lost+found not found.  Create? yes
+
+Unconnected directory inode 13 (/???)
+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/e2fsprogs/tests/f_lpf2/expect.2 b/e2fsprogs/tests/f_lpf2/expect.2
new file mode 100644
index 0000000..e551932
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_lpf2/image.gz b/e2fsprogs/tests/f_lpf2/image.gz
new file mode 100644
index 0000000..f703fb3
--- /dev/null
+++ b/e2fsprogs/tests/f_lpf2/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_lpf2/name b/e2fsprogs/tests/f_lpf2/name
new file mode 100644
index 0000000..63da315
--- /dev/null
+++ b/e2fsprogs/tests/f_lpf2/name
@@ -0,0 +1 @@
+create lost+found and reconnect lost directory
diff --git a/e2fsprogs/tests/f_lpffile/expect.1 b/e2fsprogs/tests/f_lpffile/expect.1
new file mode 100644
index 0000000..04cce4c
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_lpffile/expect.2 b/e2fsprogs/tests/f_lpffile/expect.2
new file mode 100644
index 0000000..85e832d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_lpffile/image.gz b/e2fsprogs/tests/f_lpffile/image.gz
new file mode 100644
index 0000000..75278df
--- /dev/null
+++ b/e2fsprogs/tests/f_lpffile/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_lpffile/name b/e2fsprogs/tests/f_lpffile/name
new file mode 100644
index 0000000..e4e40b9
--- /dev/null
+++ b/e2fsprogs/tests/f_lpffile/name
@@ -0,0 +1 @@
+lost+found is not a directory
diff --git a/e2fsprogs/tests/f_messy_inode/expect.1 b/e2fsprogs/tests/f_messy_inode/expect.1
new file mode 100644
index 0000000..708f1da
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_messy_inode/expect.2 b/e2fsprogs/tests/f_messy_inode/expect.2
new file mode 100644
index 0000000..1fffb02
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_messy_inode/image.gz b/e2fsprogs/tests/f_messy_inode/image.gz
new file mode 100644
index 0000000..630a689
--- /dev/null
+++ b/e2fsprogs/tests/f_messy_inode/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_messy_inode/name b/e2fsprogs/tests/f_messy_inode/name
new file mode 100644
index 0000000..f1485ea
--- /dev/null
+++ b/e2fsprogs/tests/f_messy_inode/name
@@ -0,0 +1 @@
+bad file and directory acl pointers
diff --git a/e2fsprogs/tests/f_miss_blk_bmap/expect.1 b/e2fsprogs/tests/f_miss_blk_bmap/expect.1
new file mode 100644
index 0000000..998b61a
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_miss_blk_bmap/expect.2 b/e2fsprogs/tests/f_miss_blk_bmap/expect.2
new file mode 100644
index 0000000..83f92ea
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_miss_blk_bmap/image.gz b/e2fsprogs/tests/f_miss_blk_bmap/image.gz
new file mode 100644
index 0000000..680dbe0
--- /dev/null
+++ b/e2fsprogs/tests/f_miss_blk_bmap/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_miss_blk_bmap/name b/e2fsprogs/tests/f_miss_blk_bmap/name
new file mode 100644
index 0000000..c059443
--- /dev/null
+++ b/e2fsprogs/tests/f_miss_blk_bmap/name
@@ -0,0 +1 @@
+missing block bitmap
diff --git a/e2fsprogs/tests/f_miss_journal/expect.1 b/e2fsprogs/tests/f_miss_journal/expect.1
new file mode 100644
index 0000000..6ec8b38
--- /dev/null
+++ b/e2fsprogs/tests/f_miss_journal/expect.1
@@ -0,0 +1,28 @@
+Superblock has an invalid journal (inode 8).
+Clear? yes
+
+*** ext3 journal has been deleted - filesystem is now ext2 only ***
+
+Pass 1: Checking inodes, 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 re-created - filesystem is now ext3 again ***
+
+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/e2fsprogs/tests/f_miss_journal/expect.2 b/e2fsprogs/tests/f_miss_journal/expect.2
new file mode 100644
index 0000000..ad32763
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_miss_journal/image.gz b/e2fsprogs/tests/f_miss_journal/image.gz
new file mode 100644
index 0000000..674d348
--- /dev/null
+++ b/e2fsprogs/tests/f_miss_journal/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_miss_journal/name b/e2fsprogs/tests/f_miss_journal/name
new file mode 100644
index 0000000..599be52
--- /dev/null
+++ b/e2fsprogs/tests/f_miss_journal/name
@@ -0,0 +1 @@
+Non-existent journal inode
diff --git a/e2fsprogs/tests/f_misstable/expect.1 b/e2fsprogs/tests/f_misstable/expect.1
new file mode 100644
index 0000000..a8cf264
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_misstable/expect.2 b/e2fsprogs/tests/f_misstable/expect.2
new file mode 100644
index 0000000..e8cd21a
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_misstable/image.gz b/e2fsprogs/tests/f_misstable/image.gz
new file mode 100644
index 0000000..b2aca9d
--- /dev/null
+++ b/e2fsprogs/tests/f_misstable/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_misstable/name b/e2fsprogs/tests/f_misstable/name
new file mode 100644
index 0000000..10a1adc
--- /dev/null
+++ b/e2fsprogs/tests/f_misstable/name
@@ -0,0 +1 @@
+missing inode table
diff --git a/e2fsprogs/tests/f_mke2fs2b/expect.1 b/e2fsprogs/tests/f_mke2fs2b/expect.1
new file mode 100644
index 0000000..5ffedcb
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_mke2fs2b/expect.2 b/e2fsprogs/tests/f_mke2fs2b/expect.2
new file mode 100644
index 0000000..10455d7
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_mke2fs2b/image.gz b/e2fsprogs/tests/f_mke2fs2b/image.gz
new file mode 100644
index 0000000..6b7412c
--- /dev/null
+++ b/e2fsprogs/tests/f_mke2fs2b/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_mke2fs2b/name b/e2fsprogs/tests/f_mke2fs2b/name
new file mode 100644
index 0000000..bf2202a
--- /dev/null
+++ b/e2fsprogs/tests/f_mke2fs2b/name
@@ -0,0 +1 @@
+mke2fs version 0.2b created filesystem
diff --git a/e2fsprogs/tests/f_mmp/name b/e2fsprogs/tests/f_mmp/name
new file mode 100644
index 0000000..20d66d6
--- /dev/null
+++ b/e2fsprogs/tests/f_mmp/name
@@ -0,0 +1 @@
+disable MMP with tune2fs after e2fsck killed
diff --git a/e2fsprogs/tests/f_mmp/script b/e2fsprogs/tests/f_mmp/script
new file mode 100644
index 0000000..d921672
--- /dev/null
+++ b/e2fsprogs/tests/f_mmp/script
@@ -0,0 +1,74 @@
+FSCK_OPT=-yf
+
+TMPFILE=$test_name.tmp
+> $TMPFILE
+
+stat -f $TMPFILE | grep -q "Type: tmpfs"
+if [ $? = 0 ]; then
+	rm -f $TMPFILE
+	echo "$test_name: $test_description: skipped for tmpfs (no O_DIRECT)"
+	return 0
+fi
+
+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 awk |
+		awk "/debugfs -w $TMPFILE/ { 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
+
+
+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/e2fsprogs/tests/f_mmp_garbage/expect.1 b/e2fsprogs/tests/f_mmp_garbage/expect.1
new file mode 100644
index 0000000..a8add10
--- /dev/null
+++ b/e2fsprogs/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), 13/100 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/f_mmp_garbage/expect.2 b/e2fsprogs/tests/f_mmp_garbage/expect.2
new file mode 100644
index 0000000..6630002
--- /dev/null
+++ b/e2fsprogs/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), 13/100 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/f_mmp_garbage/name b/e2fsprogs/tests/f_mmp_garbage/name
new file mode 100644
index 0000000..17e0b14
--- /dev/null
+++ b/e2fsprogs/tests/f_mmp_garbage/name
@@ -0,0 +1 @@
+repair MMP when it is corrupted
diff --git a/e2fsprogs/tests/f_mmp_garbage/script b/e2fsprogs/tests/f_mmp_garbage/script
new file mode 100644
index 0000000..02cc12a
--- /dev/null
+++ b/e2fsprogs/tests/f_mmp_garbage/script
@@ -0,0 +1,27 @@
+FSCK_OPT=-yf
+
+TMPFILE=$test_name.tmp
+> $TMPFILE
+
+stat -f $TMPFILE | grep -q "Type: tmpfs"
+if [ $? = 0 ] ; then
+	rm -f $TMPFILE
+	echo "$test_name: $test_description: skipped for tmpfs (no O_DIRECT)"
+	return 0
+fi
+
+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/e2fsprogs/tests/f_noroot/expect.1 b/e2fsprogs/tests/f_noroot/expect.1
new file mode 100644
index 0000000..7bdd7cb
--- /dev/null
+++ b/e2fsprogs/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 (...)
+Connect to /lost+found? yes
+
+/lost+found not found.  Create? yes
+
+Unconnected directory inode 12 (...)
+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/e2fsprogs/tests/f_noroot/expect.2 b/e2fsprogs/tests/f_noroot/expect.2
new file mode 100644
index 0000000..5ea5bc7
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_noroot/image.gz b/e2fsprogs/tests/f_noroot/image.gz
new file mode 100644
index 0000000..0a87e99
--- /dev/null
+++ b/e2fsprogs/tests/f_noroot/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_noroot/name b/e2fsprogs/tests/f_noroot/name
new file mode 100644
index 0000000..a70ebc2
--- /dev/null
+++ b/e2fsprogs/tests/f_noroot/name
@@ -0,0 +1 @@
+missing root directory
diff --git a/e2fsprogs/tests/f_okgroup/expect.1 b/e2fsprogs/tests/f_okgroup/expect.1
new file mode 100644
index 0000000..7d29741
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_okgroup/expect.2 b/e2fsprogs/tests/f_okgroup/expect.2
new file mode 100644
index 0000000..44856c0
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_okgroup/image.gz b/e2fsprogs/tests/f_okgroup/image.gz
new file mode 100644
index 0000000..06b67c7
--- /dev/null
+++ b/e2fsprogs/tests/f_okgroup/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_okgroup/name b/e2fsprogs/tests/f_okgroup/name
new file mode 100644
index 0000000..3da66af
--- /dev/null
+++ b/e2fsprogs/tests/f_okgroup/name
@@ -0,0 +1 @@
+8193 block long filesystem
diff --git a/e2fsprogs/tests/f_orphan/expect.1 b/e2fsprogs/tests/f_orphan/expect.1
new file mode 100644
index 0000000..eddc1f8
--- /dev/null
+++ b/e2fsprogs/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 1
diff --git a/e2fsprogs/tests/f_orphan/expect.2 b/e2fsprogs/tests/f_orphan/expect.2
new file mode 100644
index 0000000..359c937
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_orphan/image.gz b/e2fsprogs/tests/f_orphan/image.gz
new file mode 100644
index 0000000..cada434
--- /dev/null
+++ b/e2fsprogs/tests/f_orphan/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_orphan/name b/e2fsprogs/tests/f_orphan/name
new file mode 100644
index 0000000..4f9f3d5
--- /dev/null
+++ b/e2fsprogs/tests/f_orphan/name
@@ -0,0 +1 @@
+clearing orphan inodes
diff --git a/e2fsprogs/tests/f_orphan_dotdot_ft/expect.1 b/e2fsprogs/tests/f_orphan_dotdot_ft/expect.1
new file mode 100644
index 0000000..6a1373f
--- /dev/null
+++ b/e2fsprogs/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 (<12>/<13>)
+Connect to /lost+found? yes
+
+Unconnected directory inode 14 (<12>/<14>)
+Connect to /lost+found? yes
+
+Unconnected directory inode 15 (<12>/<15>)
+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/e2fsprogs/tests/f_orphan_dotdot_ft/expect.2 b/e2fsprogs/tests/f_orphan_dotdot_ft/expect.2
new file mode 100644
index 0000000..fc68e79
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_orphan_dotdot_ft/image.gz b/e2fsprogs/tests/f_orphan_dotdot_ft/image.gz
new file mode 100644
index 0000000..cb91a64
--- /dev/null
+++ b/e2fsprogs/tests/f_orphan_dotdot_ft/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_orphan_dotdot_ft/name b/e2fsprogs/tests/f_orphan_dotdot_ft/name
new file mode 100644
index 0000000..8362e9e
--- /dev/null
+++ b/e2fsprogs/tests/f_orphan_dotdot_ft/name
@@ -0,0 +1 @@
+filetype of .. in orphaned directories
diff --git a/e2fsprogs/tests/f_orphan_extents_inode/expect.1 b/e2fsprogs/tests/f_orphan_extents_inode/expect.1
new file mode 100644
index 0000000..2eaab78
--- /dev/null
+++ b/e2fsprogs/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 1
diff --git a/e2fsprogs/tests/f_orphan_extents_inode/expect.2 b/e2fsprogs/tests/f_orphan_extents_inode/expect.2
new file mode 100644
index 0000000..4ee5d96
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_orphan_extents_inode/image.gz b/e2fsprogs/tests/f_orphan_extents_inode/image.gz
new file mode 100644
index 0000000..6c57fef
--- /dev/null
+++ b/e2fsprogs/tests/f_orphan_extents_inode/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_orphan_extents_inode/name b/e2fsprogs/tests/f_orphan_extents_inode/name
new file mode 100644
index 0000000..fc48ec2
--- /dev/null
+++ b/e2fsprogs/tests/f_orphan_extents_inode/name
@@ -0,0 +1 @@
+truncating an orphaned extent-mapped inode
diff --git a/e2fsprogs/tests/f_orphan_indirect_inode/expect.1 b/e2fsprogs/tests/f_orphan_indirect_inode/expect.1
new file mode 100644
index 0000000..814a688
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_orphan_indirect_inode/expect.2 b/e2fsprogs/tests/f_orphan_indirect_inode/expect.2
new file mode 100644
index 0000000..4ee5d96
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_orphan_indirect_inode/image.gz b/e2fsprogs/tests/f_orphan_indirect_inode/image.gz
new file mode 100644
index 0000000..54b3909
--- /dev/null
+++ b/e2fsprogs/tests/f_orphan_indirect_inode/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_orphan_indirect_inode/name b/e2fsprogs/tests/f_orphan_indirect_inode/name
new file mode 100644
index 0000000..04ccb31
--- /dev/null
+++ b/e2fsprogs/tests/f_orphan_indirect_inode/name
@@ -0,0 +1 @@
+truncating an orphaned inode in preen mode
diff --git a/e2fsprogs/tests/f_orphan_indirect_inode/script b/e2fsprogs/tests/f_orphan_indirect_inode/script
new file mode 100644
index 0000000..ea3b93a
--- /dev/null
+++ b/e2fsprogs/tests/f_orphan_indirect_inode/script
@@ -0,0 +1,2 @@
+FSCK_OPT=-p
+. $cmd_dir/run_e2fsck
diff --git a/e2fsprogs/tests/f_overfsblks/expect.1 b/e2fsprogs/tests/f_overfsblks/expect.1
new file mode 100644
index 0000000..e5b93f0
--- /dev/null
+++ b/e2fsprogs/tests/f_overfsblks/expect.1
@@ -0,0 +1,19 @@
+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
+
+
+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/e2fsprogs/tests/f_overfsblks/expect.2 b/e2fsprogs/tests/f_overfsblks/expect.2
new file mode 100644
index 0000000..a821f87
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_overfsblks/image.gz b/e2fsprogs/tests/f_overfsblks/image.gz
new file mode 100644
index 0000000..60b6b2e
--- /dev/null
+++ b/e2fsprogs/tests/f_overfsblks/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_overfsblks/name b/e2fsprogs/tests/f_overfsblks/name
new file mode 100644
index 0000000..8ab6040
--- /dev/null
+++ b/e2fsprogs/tests/f_overfsblks/name
@@ -0,0 +1 @@
+overlapping inode and block bitmaps
diff --git a/e2fsprogs/tests/f_preen/expect.1 b/e2fsprogs/tests/f_preen/expect.1
new file mode 100644
index 0000000..dd20572
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_preen/expect.2 b/e2fsprogs/tests/f_preen/expect.2
new file mode 100644
index 0000000..a7f6ce1
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_preen/image.gz b/e2fsprogs/tests/f_preen/image.gz
new file mode 100644
index 0000000..3aa7ca0
--- /dev/null
+++ b/e2fsprogs/tests/f_preen/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_preen/name b/e2fsprogs/tests/f_preen/name
new file mode 100644
index 0000000..75a3a4f
--- /dev/null
+++ b/e2fsprogs/tests/f_preen/name
@@ -0,0 +1 @@
+preen shouldn't destroy backup superblocks
diff --git a/e2fsprogs/tests/f_preen/script b/e2fsprogs/tests/f_preen/script
new file mode 100644
index 0000000..40ed11c
--- /dev/null
+++ b/e2fsprogs/tests/f_preen/script
@@ -0,0 +1,4 @@
+FSCK_OPT=-pf
+SECOND_FSCK_OPT=-yfb8193
+
+. $cmd_dir/run_e2fsck
diff --git a/e2fsprogs/tests/f_recnect_bad/expect.1 b/e2fsprogs/tests/f_recnect_bad/expect.1
new file mode 100644
index 0000000..8ba81e6
--- /dev/null
+++ b/e2fsprogs/tests/f_recnect_bad/expect.1
@@ -0,0 +1,38 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+i_faddr for inode 15 (/test/quux) is 23, should be zero.
+Clear? yes
+
+i_dir_acl for inode 15 (/test/quux) is 12, 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 (/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/e2fsprogs/tests/f_recnect_bad/expect.2 b/e2fsprogs/tests/f_recnect_bad/expect.2
new file mode 100644
index 0000000..fc68e79
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_recnect_bad/image.gz b/e2fsprogs/tests/f_recnect_bad/image.gz
new file mode 100644
index 0000000..37dcdf9
--- /dev/null
+++ b/e2fsprogs/tests/f_recnect_bad/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_recnect_bad/name b/e2fsprogs/tests/f_recnect_bad/name
new file mode 100644
index 0000000..dc0c8d9
--- /dev/null
+++ b/e2fsprogs/tests/f_recnect_bad/name
@@ -0,0 +1 @@
+Reconnecting bad inode
diff --git a/e2fsprogs/tests/f_reconnect/expect.1 b/e2fsprogs/tests/f_reconnect/expect.1
new file mode 100644
index 0000000..331d8b3
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_reconnect/expect.2 b/e2fsprogs/tests/f_reconnect/expect.2
new file mode 100644
index 0000000..e848eff
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_reconnect/image.gz b/e2fsprogs/tests/f_reconnect/image.gz
new file mode 100644
index 0000000..56b92c3
--- /dev/null
+++ b/e2fsprogs/tests/f_reconnect/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_reconnect/name b/e2fsprogs/tests/f_reconnect/name
new file mode 100644
index 0000000..c09c23f
--- /dev/null
+++ b/e2fsprogs/tests/f_reconnect/name
@@ -0,0 +1 @@
+simple disconnected file inode
diff --git a/e2fsprogs/tests/f_rehash_dir/expect.1 b/e2fsprogs/tests/f_rehash_dir/expect.1
new file mode 100644
index 0000000..6076765
--- /dev/null
+++ b/e2fsprogs/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 1
diff --git a/e2fsprogs/tests/f_rehash_dir/expect.2 b/e2fsprogs/tests/f_rehash_dir/expect.2
new file mode 100644
index 0000000..3c78fe5
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_rehash_dir/image.gz b/e2fsprogs/tests/f_rehash_dir/image.gz
new file mode 100644
index 0000000..4e36dce
--- /dev/null
+++ b/e2fsprogs/tests/f_rehash_dir/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_rehash_dir/name b/e2fsprogs/tests/f_rehash_dir/name
new file mode 100644
index 0000000..a7a869a
--- /dev/null
+++ b/e2fsprogs/tests/f_rehash_dir/name
@@ -0,0 +1 @@
+optimize htree directories
diff --git a/e2fsprogs/tests/f_rehash_dir/script b/e2fsprogs/tests/f_rehash_dir/script
new file mode 100644
index 0000000..f4dcb74
--- /dev/null
+++ b/e2fsprogs/tests/f_rehash_dir/script
@@ -0,0 +1,3 @@
+FSCK_OPT=-yfD
+
+. $cmd_dir/run_e2fsck
diff --git a/e2fsprogs/tests/f_resize_inode/expect b/e2fsprogs/tests/f_resize_inode/expect
new file mode 100644
index 0000000..3fffe44
--- /dev/null
+++ b/e2fsprogs/tests/f_resize_inode/expect
@@ -0,0 +1,170 @@
+mke2fs -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384
+Filesystem label=
+OS type: Linux
+Block size=1024 (log=0)
+Fragment size=1024 (log=0)
+Stride=0 blocks, Stripe width=0 blocks
+4096 inodes, 16384 blocks
+819 blocks (5.00%) reserved for the super user
+First data block=1
+Maximum filesystem blocks=8421376
+16 block groups
+1024 blocks per group, 1024 fragments per group
+256 inodes per group
+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), 2107/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 (717, counted=718).
+Fix? yes
+
+Free blocks count wrong (14276, counted=14277).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/4096 files (0.0% non-contiguous), 2107/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), 2107/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 (717, counted=718).
+Fix? yes
+
+Free blocks count wrong (14276, counted=14277).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/4096 files (0.0% non-contiguous), 2107/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), 2107/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 (717, counted=718).
+Fix? yes
+
+Free blocks count wrong (14276, counted=14277).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/4096 files (0.0% non-contiguous), 2107/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), 2107/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), 2107/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 (718, counted=942).
+Fix? yes
+
+Free blocks count wrong for group #1 (732, counted=956).
+Fix? yes
+
+Free blocks count wrong for group #3 (732, counted=956).
+Fix? yes
+
+Free blocks count wrong for group #5 (732, counted=956).
+Fix? yes
+
+Free blocks count wrong for group #7 (732, counted=956).
+Fix? yes
+
+Free blocks count wrong for group #9 (732, counted=956).
+Fix? yes
+
+Free blocks count wrong (14277, counted=15621).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/4096 files (0.0% non-contiguous), 763/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), 763/16384 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/f_resize_inode/script b/e2fsprogs/tests/f_resize_inode/script
new file mode 100644
index 0000000..190871b
--- /dev/null
+++ b/e2fsprogs/tests/f_resize_inode/script
@@ -0,0 +1,143 @@
+if test -x $DEBUGFS_EXE; then
+
+test_description="e2fsck with resize_inode"
+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
+
+cp /dev/null $OUT
+
+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
+$MKE2FS -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 16384 2>&1 |
+	sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
+
+$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 -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
+rm -f $OUT.new
+
+echo ----------------------------------------------- >> $OUT
+
+echo " " >> $OUT
+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
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+$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
+
+$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
+
+echo ----------------------------------------------- >> $OUT
+
+echo " " >> $OUT
+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
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+$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
+
+$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
+
+echo ----------------------------------------------- >> $OUT
+
+echo " " >> $OUT
+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
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+$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
+
+$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
+
+echo ----------------------------------------------- >> $OUT
+
+echo " " >> $OUT
+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
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+$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
+
+echo ----------------------------------------------- >> $OUT
+
+echo " " >> $OUT
+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
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+$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
+
+$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
+
+else #if test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi 
diff --git a/e2fsprogs/tests/f_salvage_dir/expect.1 b/e2fsprogs/tests/f_salvage_dir/expect.1
new file mode 100644
index 0000000..3286384
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_salvage_dir/expect.2 b/e2fsprogs/tests/f_salvage_dir/expect.2
new file mode 100644
index 0000000..0b77cd1
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_salvage_dir/image.gz b/e2fsprogs/tests/f_salvage_dir/image.gz
new file mode 100644
index 0000000..b0adde7
--- /dev/null
+++ b/e2fsprogs/tests/f_salvage_dir/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_salvage_dir/name b/e2fsprogs/tests/f_salvage_dir/name
new file mode 100644
index 0000000..746f43a
--- /dev/null
+++ b/e2fsprogs/tests/f_salvage_dir/name
@@ -0,0 +1 @@
+salvage corrupted directories
diff --git a/e2fsprogs/tests/f_selinux/expect.1 b/e2fsprogs/tests/f_selinux/expect.1
new file mode 100644
index 0000000..d6fcd3b
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_selinux/expect.2 b/e2fsprogs/tests/f_selinux/expect.2
new file mode 100644
index 0000000..d6fcd3b
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_selinux/image.gz b/e2fsprogs/tests/f_selinux/image.gz
new file mode 100644
index 0000000..93a67a2
--- /dev/null
+++ b/e2fsprogs/tests/f_selinux/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_selinux/name b/e2fsprogs/tests/f_selinux/name
new file mode 100644
index 0000000..42875ea
--- /dev/null
+++ b/e2fsprogs/tests/f_selinux/name
@@ -0,0 +1 @@
+SE Linux generated symlinks with EA data
diff --git a/e2fsprogs/tests/f_special_ea/expect.1 b/e2fsprogs/tests/f_special_ea/expect.1
new file mode 100644
index 0000000..54076fe
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_special_ea/image.gz b/e2fsprogs/tests/f_special_ea/image.gz
new file mode 100644
index 0000000..c447cb7
--- /dev/null
+++ b/e2fsprogs/tests/f_special_ea/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_special_ea/name b/e2fsprogs/tests/f_special_ea/name
new file mode 100644
index 0000000..8dfb2f4
--- /dev/null
+++ b/e2fsprogs/tests/f_special_ea/name
@@ -0,0 +1 @@
+Special files with extended attributes
diff --git a/e2fsprogs/tests/f_special_ea/script b/e2fsprogs/tests/f_special_ea/script
new file mode 100644
index 0000000..8ab2b9c
--- /dev/null
+++ b/e2fsprogs/tests/f_special_ea/script
@@ -0,0 +1,2 @@
+ONE_PASS_ONLY="true"
+. $cmd_dir/run_e2fsck
diff --git a/e2fsprogs/tests/f_summary_counts/expect.1 b/e2fsprogs/tests/f_summary_counts/expect.1
new file mode 100644
index 0000000..ddb14bd
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_summary_counts/expect.2 b/e2fsprogs/tests/f_summary_counts/expect.2
new file mode 100644
index 0000000..44bff62
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_summary_counts/image.gz b/e2fsprogs/tests/f_summary_counts/image.gz
new file mode 100644
index 0000000..d527e9a
--- /dev/null
+++ b/e2fsprogs/tests/f_summary_counts/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_summary_counts/name b/e2fsprogs/tests/f_summary_counts/name
new file mode 100644
index 0000000..9fd1021
--- /dev/null
+++ b/e2fsprogs/tests/f_summary_counts/name
@@ -0,0 +1 @@
+incorrect inode/block free counts
diff --git a/e2fsprogs/tests/f_summary_counts/script b/e2fsprogs/tests/f_summary_counts/script
new file mode 100644
index 0000000..fc425ef
--- /dev/null
+++ b/e2fsprogs/tests/f_summary_counts/script
@@ -0,0 +1,4 @@
+FSCK_OPT=-y
+SECOND_FSCK_OPT=-yf
+
+. $cmd_dir/run_e2fsck
diff --git a/e2fsprogs/tests/f_toobig_extent_dir/expect.1 b/e2fsprogs/tests/f_toobig_extent_dir/expect.1
new file mode 100644
index 0000000..610ca3f
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_toobig_extent_dir/expect.2 b/e2fsprogs/tests/f_toobig_extent_dir/expect.2
new file mode 100644
index 0000000..c025645
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_toobig_extent_dir/image.gz b/e2fsprogs/tests/f_toobig_extent_dir/image.gz
new file mode 100644
index 0000000..622f65a
--- /dev/null
+++ b/e2fsprogs/tests/f_toobig_extent_dir/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_toobig_extent_dir/name b/e2fsprogs/tests/f_toobig_extent_dir/name
new file mode 100644
index 0000000..d7453ad
--- /dev/null
+++ b/e2fsprogs/tests/f_toobig_extent_dir/name
@@ -0,0 +1 @@
+directory with a very large lblk in extent
diff --git a/e2fsprogs/tests/f_uninit_ext_past_eof/expect.1 b/e2fsprogs/tests/f_uninit_ext_past_eof/expect.1
new file mode 100644
index 0000000..762159c
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_uninit_ext_past_eof/expect.2 b/e2fsprogs/tests/f_uninit_ext_past_eof/expect.2
new file mode 100644
index 0000000..762159c
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_uninit_ext_past_eof/image.gz b/e2fsprogs/tests/f_uninit_ext_past_eof/image.gz
new file mode 100644
index 0000000..0b69158
--- /dev/null
+++ b/e2fsprogs/tests/f_uninit_ext_past_eof/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_uninit_ext_past_eof/name b/e2fsprogs/tests/f_uninit_ext_past_eof/name
new file mode 100644
index 0000000..9e0c6e0
--- /dev/null
+++ b/e2fsprogs/tests/f_uninit_ext_past_eof/name
@@ -0,0 +1 @@
+fallocated extents after i_size
diff --git a/e2fsprogs/tests/f_uninit_ext_past_eof2/expect.1 b/e2fsprogs/tests/f_uninit_ext_past_eof2/expect.1
new file mode 100644
index 0000000..eb8248e
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_uninit_ext_past_eof2/expect.2 b/e2fsprogs/tests/f_uninit_ext_past_eof2/expect.2
new file mode 100644
index 0000000..eb8248e
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_uninit_ext_past_eof2/image.gz b/e2fsprogs/tests/f_uninit_ext_past_eof2/image.gz
new file mode 100644
index 0000000..c739e49
--- /dev/null
+++ b/e2fsprogs/tests/f_uninit_ext_past_eof2/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_uninit_ext_past_eof2/name b/e2fsprogs/tests/f_uninit_ext_past_eof2/name
new file mode 100644
index 0000000..352a0f5
--- /dev/null
+++ b/e2fsprogs/tests/f_uninit_ext_past_eof2/name
@@ -0,0 +1 @@
+fallocated extents after nonzero i_size and total extents > 4
diff --git a/e2fsprogs/tests/f_uninit_last_uninit/expect.1 b/e2fsprogs/tests/f_uninit_last_uninit/expect.1
new file mode 100644
index 0000000..248bd29
--- /dev/null
+++ b/e2fsprogs/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), 105/10000 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/f_uninit_last_uninit/expect.2 b/e2fsprogs/tests/f_uninit_last_uninit/expect.2
new file mode 100644
index 0000000..e95e5ed
--- /dev/null
+++ b/e2fsprogs/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), 105/10000 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/f_uninit_last_uninit/name b/e2fsprogs/tests/f_uninit_last_uninit/name
new file mode 100644
index 0000000..4f93e23
--- /dev/null
+++ b/e2fsprogs/tests/f_uninit_last_uninit/name
@@ -0,0 +1,2 @@
+last group has BLOCK_UNINIT set
+
diff --git a/e2fsprogs/tests/f_uninit_last_uninit/script b/e2fsprogs/tests/f_uninit_last_uninit/script
new file mode 100644
index 0000000..2fe4f3a
--- /dev/null
+++ b/e2fsprogs/tests/f_uninit_last_uninit/script
@@ -0,0 +1,26 @@
+if test -x $DEBUGFS_EXE; then
+
+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 200704102100
+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
+
+else #if test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi 
diff --git a/e2fsprogs/tests/f_unsorted_EAs/expect.1 b/e2fsprogs/tests/f_unsorted_EAs/expect.1
new file mode 100644
index 0000000..7d588d7
--- /dev/null
+++ b/e2fsprogs/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 1
diff --git a/e2fsprogs/tests/f_unsorted_EAs/expect.2 b/e2fsprogs/tests/f_unsorted_EAs/expect.2
new file mode 100644
index 0000000..414cc29
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_unsorted_EAs/image.gz b/e2fsprogs/tests/f_unsorted_EAs/image.gz
new file mode 100644
index 0000000..42ab502
--- /dev/null
+++ b/e2fsprogs/tests/f_unsorted_EAs/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_unsorted_EAs/name b/e2fsprogs/tests/f_unsorted_EAs/name
new file mode 100644
index 0000000..da9c9c3
--- /dev/null
+++ b/e2fsprogs/tests/f_unsorted_EAs/name
@@ -0,0 +1 @@
+unsorted EAs in inode should not be deleted
diff --git a/e2fsprogs/tests/f_unused_itable/expect.1 b/e2fsprogs/tests/f_unused_itable/expect.1
new file mode 100644
index 0000000..a4da987
--- /dev/null
+++ b/e2fsprogs/tests/f_unused_itable/expect.1
@@ -0,0 +1,28 @@
+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...
+One or more block group descriptor checksums are invalid.  Fix? yes
+
+Group descriptor 0 checksum is 0x289d, should be 0x788a.  FIXED.
+Group descriptor 1 checksum is 0xfaab, should be 0x3a9a.  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
+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/e2fsprogs/tests/f_unused_itable/expect.2 b/e2fsprogs/tests/f_unused_itable/expect.2
new file mode 100644
index 0000000..b79d318
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_unused_itable/image.gz b/e2fsprogs/tests/f_unused_itable/image.gz
new file mode 100644
index 0000000..ca93e98
--- /dev/null
+++ b/e2fsprogs/tests/f_unused_itable/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_unused_itable/name b/e2fsprogs/tests/f_unused_itable/name
new file mode 100644
index 0000000..e129137
--- /dev/null
+++ b/e2fsprogs/tests/f_unused_itable/name
@@ -0,0 +1 @@
+Don't move files to lost+found for bg_unused_itable
diff --git a/e2fsprogs/tests/f_valid_ea_in_inode/expect.1 b/e2fsprogs/tests/f_valid_ea_in_inode/expect.1
new file mode 100644
index 0000000..a4d6dd2
--- /dev/null
+++ b/e2fsprogs/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: 22/2048 files (0.0% non-contiguous), 2072/8192 blocks
+Exit status is 0
diff --git a/e2fsprogs/tests/f_valid_ea_in_inode/image.gz b/e2fsprogs/tests/f_valid_ea_in_inode/image.gz
new file mode 100644
index 0000000..e40f783
--- /dev/null
+++ b/e2fsprogs/tests/f_valid_ea_in_inode/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_valid_ea_in_inode/name b/e2fsprogs/tests/f_valid_ea_in_inode/name
new file mode 100644
index 0000000..3f02877
--- /dev/null
+++ b/e2fsprogs/tests/f_valid_ea_in_inode/name
@@ -0,0 +1 @@
+valid ea-in-inode examplars
diff --git a/e2fsprogs/tests/f_valid_ea_in_inode/script b/e2fsprogs/tests/f_valid_ea_in_inode/script
new file mode 100644
index 0000000..8ab2b9c
--- /dev/null
+++ b/e2fsprogs/tests/f_valid_ea_in_inode/script
@@ -0,0 +1,2 @@
+ONE_PASS_ONLY="true"
+. $cmd_dir/run_e2fsck
diff --git a/e2fsprogs/tests/f_zero_group/expect.1 b/e2fsprogs/tests/f_zero_group/expect.1
new file mode 100644
index 0000000..2a07767
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_zero_group/expect.2 b/e2fsprogs/tests/f_zero_group/expect.2
new file mode 100644
index 0000000..a833aef
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_zero_group/image.gz b/e2fsprogs/tests/f_zero_group/image.gz
new file mode 100644
index 0000000..755493c
--- /dev/null
+++ b/e2fsprogs/tests/f_zero_group/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_zero_group/name b/e2fsprogs/tests/f_zero_group/name
new file mode 100644
index 0000000..ccb3b96
--- /dev/null
+++ b/e2fsprogs/tests/f_zero_group/name
@@ -0,0 +1 @@
+fallback for damaged group descriptors
diff --git a/e2fsprogs/tests/f_zero_inode_size/expect.1 b/e2fsprogs/tests/f_zero_inode_size/expect.1
new file mode 100644
index 0000000..b8bd7da
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_zero_inode_size/expect.2 b/e2fsprogs/tests/f_zero_inode_size/expect.2
new file mode 100644
index 0000000..da94806
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_zero_inode_size/image.gz b/e2fsprogs/tests/f_zero_inode_size/image.gz
new file mode 100644
index 0000000..f4503c8
--- /dev/null
+++ b/e2fsprogs/tests/f_zero_inode_size/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_zero_inode_size/name b/e2fsprogs/tests/f_zero_inode_size/name
new file mode 100644
index 0000000..ce88d96
--- /dev/null
+++ b/e2fsprogs/tests/f_zero_inode_size/name
@@ -0,0 +1 @@
+superblock with a zero inode size
diff --git a/e2fsprogs/tests/f_zero_super/expect.1 b/e2fsprogs/tests/f_zero_super/expect.1
new file mode 100644
index 0000000..e2b954d
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_zero_super/expect.2 b/e2fsprogs/tests/f_zero_super/expect.2
new file mode 100644
index 0000000..a833aef
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_zero_super/image.gz b/e2fsprogs/tests/f_zero_super/image.gz
new file mode 100644
index 0000000..eea9140
--- /dev/null
+++ b/e2fsprogs/tests/f_zero_super/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_zero_super/name b/e2fsprogs/tests/f_zero_super/name
new file mode 100644
index 0000000..5d99984
--- /dev/null
+++ b/e2fsprogs/tests/f_zero_super/name
@@ -0,0 +1 @@
+fallback for damaged superblock
diff --git a/e2fsprogs/tests/f_zero_xattr/expect.1 b/e2fsprogs/tests/f_zero_xattr/expect.1
new file mode 100644
index 0000000..0733af6
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/f_zero_xattr/image.gz b/e2fsprogs/tests/f_zero_xattr/image.gz
new file mode 100644
index 0000000..4005552
--- /dev/null
+++ b/e2fsprogs/tests/f_zero_xattr/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/f_zero_xattr/name b/e2fsprogs/tests/f_zero_xattr/name
new file mode 100644
index 0000000..52aab15
--- /dev/null
+++ b/e2fsprogs/tests/f_zero_xattr/name
@@ -0,0 +1 @@
+zero length extended attribute in in-inode xattr
diff --git a/e2fsprogs/tests/f_zero_xattr/script b/e2fsprogs/tests/f_zero_xattr/script
new file mode 100644
index 0000000..8ab2b9c
--- /dev/null
+++ b/e2fsprogs/tests/f_zero_xattr/script
@@ -0,0 +1,2 @@
+ONE_PASS_ONLY="true"
+. $cmd_dir/run_e2fsck
diff --git a/e2fsprogs/tests/filter.sed b/e2fsprogs/tests/filter.sed
new file mode 100644
index 0000000..91b956b
--- /dev/null
+++ b/e2fsprogs/tests/filter.sed
@@ -0,0 +1,19 @@
+/^[dbgumpe2fsckrsiz]* [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
+/Reserved blocks uid:/s/ (user .*)//
+/Reserved blocks gid:/s/ (group .*)//
+/whichever comes first/d
+/^  Checksum /d
diff --git a/e2fsprogs/tests/i_e2image/i_e2image.md5 b/e2fsprogs/tests/i_e2image/i_e2image.md5
new file mode 100644
index 0000000..f96e721
--- /dev/null
+++ b/e2fsprogs/tests/i_e2image/i_e2image.md5
@@ -0,0 +1,15 @@
+i_e2image/image1024.orig
+d34914e0da07bdae80ab02288118fae2  image1024.orig
+bbef4e50d7237546c7d9c521d3df5b68  _image.raw
+1d4eb39452bed097dcd2c5bcd57180e6  _image.qcow2
+bbef4e50d7237546c7d9c521d3df5b68  _image.qcow2.raw
+i_e2image/image2048.orig
+aa9f702de181188f2a6d2c5158686c09  image2048.orig
+e6f8410d0690ef551bee0c2c0c642d8c  _image.raw
+dbbd9aa97c6c946b9122586bbd2a325a  _image.qcow2
+e6f8410d0690ef551bee0c2c0c642d8c  _image.qcow2.raw
+i_e2image/image4096.orig
+1d3e7f15b2ce9ca07aa23c32951c5176  image4096.orig
+734119dd8f240a33704139f8cdd8127c  _image.raw
+85fdbf5a8451b24b36ab82a02196deb9  _image.qcow2
+734119dd8f240a33704139f8cdd8127c  _image.qcow2.raw
diff --git a/e2fsprogs/tests/i_e2image/image1024.orig.bz2 b/e2fsprogs/tests/i_e2image/image1024.orig.bz2
new file mode 100644
index 0000000..ac90f86
--- /dev/null
+++ b/e2fsprogs/tests/i_e2image/image1024.orig.bz2
Binary files differ
diff --git a/e2fsprogs/tests/i_e2image/image2048.orig.bz2 b/e2fsprogs/tests/i_e2image/image2048.orig.bz2
new file mode 100644
index 0000000..18d07a8
--- /dev/null
+++ b/e2fsprogs/tests/i_e2image/image2048.orig.bz2
Binary files differ
diff --git a/e2fsprogs/tests/i_e2image/image4096.orig.bz2 b/e2fsprogs/tests/i_e2image/image4096.orig.bz2
new file mode 100644
index 0000000..e17b5a3
--- /dev/null
+++ b/e2fsprogs/tests/i_e2image/image4096.orig.bz2
Binary files differ
diff --git a/e2fsprogs/tests/i_e2image/script b/e2fsprogs/tests/i_e2image/script
new file mode 100644
index 0000000..adf59a4
--- /dev/null
+++ b/e2fsprogs/tests/i_e2image/script
@@ -0,0 +1,59 @@
+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
+MD5=$SRCDIR/$test_name/$test_name.md5
+MD5_TMP=$test_name.md5.tmp
+
+rm -f $test_name/_image.* $MD5_TMP $OUT >/dev/null 2>&1
+
+(
+for i in $ORIG_IMAGES; do
+	ORIG_IMG=$test_name/$i
+	echo $ORIG_IMG >> $MD5_TMP
+
+	bunzip2 < $SRCDIR/$ORIG_IMG.bz2 > $i
+	md5sum $i >> $MD5_TMP
+
+	rm -f $RAW_IMG
+	echo "e2image -r $ORIG_IMG $RAW_IMG"
+	$E2IMAGE      -r $i $RAW_IMG
+	md5sum $RAW_IMG >> $MD5_TMP
+
+	echo "e2image -Q $ORIG_IMG $QCOW2_IMG"
+	$E2IMAGE      -Q $i $QCOW2_IMG
+	md5sum $QCOW2_IMG >> $MD5_TMP
+
+	rm -f $QCOW2_TO_RAW
+	echo "e2image -r $QCOW2_IMG $QCOW2_TO_RAW"
+	$E2IMAGE      -r $i $QCOW2_TO_RAW
+	md5sum $QCOW2_TO_RAW >> $MD5_TMP
+
+	rm -f $i
+done
+) >> $OUT 2>&1
+
+echo "md5sums:" >> $OUT
+cat $MD5_TMP >> $OUT
+echo "" >> $OUT
+
+diff $MD5 $MD5_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 _image.* $MD5_TMP >/dev/null 2>&1
+
+else #if test -x $E2IMAGE_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi
diff --git a/e2fsprogs/tests/m_bigjournal/expect.1 b/e2fsprogs/tests/m_bigjournal/expect.1
new file mode 100644
index 0000000..312c276
--- /dev/null
+++ b/e2fsprogs/tests/m_bigjournal/expect.1
@@ -0,0 +1,573 @@
+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
+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:     28
+Desired extra isize:      28
+Journal inode:            8
+Default directory hash:   half_md4
+Journal backup:           inode blocks
+Journal features:         (none)
+Journal size:             5000M
+Journal length:           1280000
+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 1185 (+1185)
+  Inode table at 1697-1697 (+1697)
+  31836 free blocks, 5 free inodes, 2 directories, 5 unused inodes
+  Free blocks: 764-1184, 1269-1696, 1781-32767
+  Free inodes: 12-16
+Group 1: (Blocks 32768-65535) [INODE_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 1186 (bg #0 + 1186)
+  Inode table at 1698-1698 (bg #0 + 1698)
+  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 1187 (bg #0 + 1187)
+  Inode table at 1699-1699 (bg #0 + 1699)
+  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]
+  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 1188 (bg #0 + 1188)
+  Inode table at 1700-1700 (bg #0 + 1700)
+  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 1189 (bg #0 + 1189)
+  Inode table at 1701-1701 (bg #0 + 1701)
+  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]
+  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 1190 (bg #0 + 1190)
+  Inode table at 1702-1702 (bg #0 + 1702)
+  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 1191 (bg #0 + 1191)
+  Inode table at 1703-1703 (bg #0 + 1703)
+  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]
+  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 1192 (bg #0 + 1192)
+  Inode table at 1704-1704 (bg #0 + 1704)
+  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 1193 (bg #0 + 1193)
+  Inode table at 1705-1705 (bg #0 + 1705)
+  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]
+  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 1194 (bg #0 + 1194)
+  Inode table at 1706-1706 (bg #0 + 1706)
+  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 1195 (bg #0 + 1195)
+  Inode table at 1707-1707 (bg #0 + 1707)
+  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 1196 (bg #0 + 1196)
+  Inode table at 1708-1708 (bg #0 + 1708)
+  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 1197 (bg #0 + 1197)
+  Inode table at 1709-1709 (bg #0 + 1709)
+  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 1198 (bg #0 + 1198)
+  Inode table at 1710-1710 (bg #0 + 1710)
+  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 1199 (bg #0 + 1199)
+  Inode table at 1711-1711 (bg #0 + 1711)
+  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 1200 (bg #0 + 1200)
+  Inode table at 1712-1712 (bg #0 + 1712)
+  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 1201 (bg #0 + 1201)
+  Inode table at 1713-1713 (bg #0 + 1713)
+  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 1202 (bg #0 + 1202)
+  Inode table at 1714-1714 (bg #0 + 1714)
+  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 1203 (bg #0 + 1203)
+  Inode table at 1715-1715 (bg #0 + 1715)
+  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 1204 (bg #0 + 1204)
+  Inode table at 1716-1716 (bg #0 + 1716)
+  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 1205 (bg #0 + 1205)
+  Inode table at 1717-1717 (bg #0 + 1717)
+  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 1206 (bg #0 + 1206)
+  Inode table at 1718-1718 (bg #0 + 1718)
+  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 1207 (bg #0 + 1207)
+  Inode table at 1719-1719 (bg #0 + 1719)
+  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 1208 (bg #0 + 1208)
+  Inode table at 1720-1720 (bg #0 + 1720)
+  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 1209 (bg #0 + 1209)
+  Inode table at 1721-1721 (bg #0 + 1721)
+  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]
+  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 1210 (bg #0 + 1210)
+  Inode table at 1722-1722 (bg #0 + 1722)
+  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 1211 (bg #0 + 1211)
+  Inode table at 1723-1723 (bg #0 + 1723)
+  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]
+  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 1212 (bg #0 + 1212)
+  Inode table at 1724-1724 (bg #0 + 1724)
+  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 1213 (bg #0 + 1213)
+  Inode table at 1725-1725 (bg #0 + 1725)
+  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 1214 (bg #0 + 1214)
+  Inode table at 1726-1726 (bg #0 + 1726)
+  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 1215 (bg #0 + 1215)
+  Inode table at 1727-1727 (bg #0 + 1727)
+  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 1216 (bg #0 + 1216)
+  Inode table at 1728-1728 (bg #0 + 1728)
+  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 1217 (bg #0 + 1217)
+  Inode table at 1729-1729 (bg #0 + 1729)
+  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 1218 (bg #0 + 1218)
+  Inode table at 1730-1730 (bg #0 + 1730)
+  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 1219 (bg #0 + 1219)
+  Inode table at 1731-1731 (bg #0 + 1731)
+  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 1220 (bg #0 + 1220)
+  Inode table at 1732-1732 (bg #0 + 1732)
+  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 1221 (bg #0 + 1221)
+  Inode table at 1733-1733 (bg #0 + 1733)
+  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 1222 (bg #0 + 1222)
+  Inode table at 1734-1734 (bg #0 + 1734)
+  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 1223 (bg #0 + 1223)
+  Inode table at 1735-1735 (bg #0 + 1735)
+  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_UNINIT]
+  Block bitmap at 712 (bg #0 + 712), Inode bitmap at 1224 (bg #0 + 1224)
+  Inode table at 1736-1736 (bg #0 + 1736)
+  32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+  Free blocks: 1277952-1310719
+  Free inodes: 625-640
+Group 40: (Blocks 1310720-1343487) [INODE_UNINIT]
+  Block bitmap at 713 (bg #0 + 713), Inode bitmap at 1225 (bg #0 + 1225)
+  Inode table at 1737-1737 (bg #0 + 1737)
+  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 1226 (bg #0 + 1226)
+  Inode table at 1738-1738 (bg #0 + 1738)
+  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 1227 (bg #0 + 1227)
+  Inode table at 1739-1739 (bg #0 + 1739)
+  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 1228 (bg #0 + 1228)
+  Inode table at 1740-1740 (bg #0 + 1740)
+  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 1229 (bg #0 + 1229)
+  Inode table at 1741-1741 (bg #0 + 1741)
+  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 1230 (bg #0 + 1230)
+  Inode table at 1742-1742 (bg #0 + 1742)
+  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 1231 (bg #0 + 1231)
+  Inode table at 1743-1743 (bg #0 + 1743)
+  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 1232 (bg #0 + 1232)
+  Inode table at 1744-1744 (bg #0 + 1744)
+  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 1233 (bg #0 + 1233)
+  Inode table at 1745-1745 (bg #0 + 1745)
+  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 1234 (bg #0 + 1234)
+  Inode table at 1746-1746 (bg #0 + 1746)
+  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 1235 (bg #0 + 1235)
+  Inode table at 1747-1747 (bg #0 + 1747)
+  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 1236 (bg #0 + 1236)
+  Inode table at 1748-1748 (bg #0 + 1748)
+  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 1237 (bg #0 + 1237)
+  Inode table at 1749-1749 (bg #0 + 1749)
+  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 1238 (bg #0 + 1238)
+  Inode table at 1750-1750 (bg #0 + 1750)
+  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 1239 (bg #0 + 1239)
+  Inode table at 1751-1751 (bg #0 + 1751)
+  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 1240 (bg #0 + 1240)
+  Inode table at 1752-1752 (bg #0 + 1752)
+  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 1241 (bg #0 + 1241)
+  Inode table at 1753-1753 (bg #0 + 1753)
+  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 1242 (bg #0 + 1242)
+  Inode table at 1754-1754 (bg #0 + 1754)
+  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 1243 (bg #0 + 1243)
+  Inode table at 1755-1755 (bg #0 + 1755)
+  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 1244 (bg #0 + 1244)
+  Inode table at 1756-1756 (bg #0 + 1756)
+  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 1245 (bg #0 + 1245)
+  Inode table at 1757-1757 (bg #0 + 1757)
+  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 1246 (bg #0 + 1246)
+  Inode table at 1758-1758 (bg #0 + 1758)
+  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 1247 (bg #0 + 1247)
+  Inode table at 1759-1759 (bg #0 + 1759)
+  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 1248 (bg #0 + 1248)
+  Inode table at 1760-1760 (bg #0 + 1760)
+  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 1249 (bg #0 + 1249)
+  Inode table at 1761-1761 (bg #0 + 1761)
+  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 1250 (bg #0 + 1250)
+  Inode table at 1762-1762 (bg #0 + 1762)
+  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 1251 (bg #0 + 1251)
+  Inode table at 1763-1763 (bg #0 + 1763)
+  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 1252 (bg #0 + 1252)
+  Inode table at 1764-1764 (bg #0 + 1764)
+  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 1253 (bg #0 + 1253)
+  Inode table at 1765-1765 (bg #0 + 1765)
+  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 1254 (bg #0 + 1254)
+  Inode table at 1766-1766 (bg #0 + 1766)
+  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 1255 (bg #0 + 1255)
+  Inode table at 1767-1767 (bg #0 + 1767)
+  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 1256 (bg #0 + 1256)
+  Inode table at 1768-1768 (bg #0 + 1768)
+  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 1257 (bg #0 + 1257)
+  Inode table at 1769-1769 (bg #0 + 1769)
+  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 1258 (bg #0 + 1258)
+  Inode table at 1770-1770 (bg #0 + 1770)
+  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 1259 (bg #0 + 1259)
+  Inode table at 1771-1771 (bg #0 + 1771)
+  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 1260 (bg #0 + 1260)
+  Inode table at 1772-1772 (bg #0 + 1772)
+  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 1261 (bg #0 + 1261)
+  Inode table at 1773-1773 (bg #0 + 1773)
+  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 1262 (bg #0 + 1262)
+  Inode table at 1774-1774 (bg #0 + 1774)
+  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 1263 (bg #0 + 1263)
+  Inode table at 1775-1775 (bg #0 + 1775)
+  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 1264 (bg #0 + 1264)
+  Inode table at 1776-1776 (bg #0 + 1776)
+  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 1265 (bg #0 + 1265)
+  Inode table at 1777-1777 (bg #0 + 1777)
+  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]
+  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 1266 (bg #0 + 1266)
+  Inode table at 1778-1778 (bg #0 + 1778)
+  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 1267 (bg #0 + 1267)
+  Inode table at 1779-1779 (bg #0 + 1779)
+  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 1268 (bg #0 + 1268)
+  Inode table at 1780-1780 (bg #0 + 1780)
+  30256 free blocks, 16 free inodes, 0 directories, 16 unused inodes
+  Free blocks: 2719744-2749999
+  Free inodes: 1329-1344
diff --git a/e2fsprogs/tests/m_bigjournal/script b/e2fsprogs/tests/m_bigjournal/script
new file mode 100644
index 0000000..1e21fdf
--- /dev/null
+++ b/e2fsprogs/tests/m_bigjournal/script
@@ -0,0 +1,4 @@
+DESCRIPTION="journal over 4GB in size"
+FS_SIZE=11000000
+MKE2FS_OPTS="-t ext4 -G 512 -N 1280 -J size=5000 -q -E lazy_journal_init,lazy_itable_init,nodiscard"
+. $cmd_dir/run_mke2fs
diff --git a/e2fsprogs/tests/m_dasd_bs/expect.1 b/e2fsprogs/tests/m_dasd_bs/expect.1
new file mode 100644
index 0000000..0cbe339
--- /dev/null
+++ b/e2fsprogs/tests/m_dasd_bs/expect.1
@@ -0,0 +1,74 @@
+Filesystem label=
+OS type: Linux
+Block size=2048 (log=1)
+Fragment size=2048 (log=1)
+Stride=0 blocks, Stripe width=0 blocks
+16384 inodes, 32768 blocks
+1638 blocks (5.00%) reserved for the super user
+First data block=0
+Maximum filesystem blocks=33554432
+2 block groups
+16384 blocks per group, 16384 fragments per group
+8192 inodes per group
+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), 1104/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
+Free blocks:              31664
+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:   512
+Mount count:              0
+Check interval:           15552000 (6 months)
+Reserved blocks uid:      0
+Reserved blocks gid:      0
+First inode:              11
+Inode size:	          128
+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-546 (+35)
+  15827 free blocks, 8181 free inodes, 2 directories
+  Free blocks: 557-16383
+  Free inodes: 12-8192
+Group 1: (Blocks 16384-32767)
+  Backup superblock at 16384, Group descriptors at 16385-16385
+  Reserved GDT blocks at 16386-16416
+  Block bitmap at 16417 (+33), Inode bitmap at 16418 (+34)
+  Inode table at 16419-16930 (+35)
+  15837 free blocks, 8192 free inodes, 0 directories
+  Free blocks: 16931-32767
+  Free inodes: 8193-16384
diff --git a/e2fsprogs/tests/m_dasd_bs/script b/e2fsprogs/tests/m_dasd_bs/script
new file mode 100644
index 0000000..e7b9085
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/m_desc_size_128/expect.1 b/e2fsprogs/tests/m_desc_size_128/expect.1
new file mode 100644
index 0000000..8f01591
--- /dev/null
+++ b/e2fsprogs/tests/m_desc_size_128/expect.1
@@ -0,0 +1,849 @@
+Filesystem label=
+OS type: Linux
+Block size=1024 (log=0)
+Fragment size=1024 (log=0)
+Stride=0 blocks, Stripe width=0 blocks
+8192 inodes, 131072 blocks
+6553 blocks (5.00%) reserved for the super user
+First data block=1
+Maximum filesystem blocks=2228224
+128 block groups
+1024 blocks per group, 1024 fragments per group
+64 inodes per group
+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), 4298/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
+Free blocks:              126774
+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:   8
+Mount count:              0
+Check interval:           15552000 (6 months)
+Reserved blocks uid:      0
+Reserved blocks gid:      0
+First inode:              11
+Inode size:	          128
+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-283 (+275)
+  727 free blocks, 53 free inodes, 2 directories
+  Free blocks: 298-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-1307 (+275)
+  741 free blocks, 64 free inodes, 0 directories
+  Free blocks: 1308-2048
+  Free inodes: 65-128
+Group 2: (Blocks 2049-3072)
+  Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+  Inode table at 2051-2058 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 2059-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-3355 (+275)
+  741 free blocks, 64 free inodes, 0 directories
+  Free blocks: 3356-4096
+  Free inodes: 193-256
+Group 4: (Blocks 4097-5120)
+  Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+  Inode table at 4099-4106 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 4107-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-5403 (+275)
+  741 free blocks, 64 free inodes, 0 directories
+  Free blocks: 5404-6144
+  Free inodes: 321-384
+Group 6: (Blocks 6145-7168)
+  Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+  Inode table at 6147-6154 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 6155-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-7451 (+275)
+  741 free blocks, 64 free inodes, 0 directories
+  Free blocks: 7452-8192
+  Free inodes: 449-512
+Group 8: (Blocks 8193-9216)
+  Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+  Inode table at 8195-8202 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 8203-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-9499 (+275)
+  741 free blocks, 64 free inodes, 0 directories
+  Free blocks: 9500-10240
+  Free inodes: 577-640
+Group 10: (Blocks 10241-11264)
+  Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+  Inode table at 10243-10250 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 10251-11264
+  Free inodes: 641-704
+Group 11: (Blocks 11265-12288)
+  Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+  Inode table at 11267-11274 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 11275-12288
+  Free inodes: 705-768
+Group 12: (Blocks 12289-13312)
+  Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+  Inode table at 12291-12298 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 12299-13312
+  Free inodes: 769-832
+Group 13: (Blocks 13313-14336)
+  Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+  Inode table at 13315-13322 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 13323-14336
+  Free inodes: 833-896
+Group 14: (Blocks 14337-15360)
+  Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+  Inode table at 14339-14346 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 14347-15360
+  Free inodes: 897-960
+Group 15: (Blocks 15361-16384)
+  Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+  Inode table at 15363-15370 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 15371-16384
+  Free inodes: 961-1024
+Group 16: (Blocks 16385-17408)
+  Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+  Inode table at 16387-16394 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 16395-17408
+  Free inodes: 1025-1088
+Group 17: (Blocks 17409-18432)
+  Block bitmap at 17409 (+0), Inode bitmap at 17410 (+1)
+  Inode table at 17411-17418 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 17419-18432
+  Free inodes: 1089-1152
+Group 18: (Blocks 18433-19456)
+  Block bitmap at 18433 (+0), Inode bitmap at 18434 (+1)
+  Inode table at 18435-18442 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 18443-19456
+  Free inodes: 1153-1216
+Group 19: (Blocks 19457-20480)
+  Block bitmap at 19457 (+0), Inode bitmap at 19458 (+1)
+  Inode table at 19459-19466 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 19467-20480
+  Free inodes: 1217-1280
+Group 20: (Blocks 20481-21504)
+  Block bitmap at 20481 (+0), Inode bitmap at 20482 (+1)
+  Inode table at 20483-20490 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 20491-21504
+  Free inodes: 1281-1344
+Group 21: (Blocks 21505-22528)
+  Block bitmap at 21505 (+0), Inode bitmap at 21506 (+1)
+  Inode table at 21507-21514 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 21515-22528
+  Free inodes: 1345-1408
+Group 22: (Blocks 22529-23552)
+  Block bitmap at 22529 (+0), Inode bitmap at 22530 (+1)
+  Inode table at 22531-22538 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 22539-23552
+  Free inodes: 1409-1472
+Group 23: (Blocks 23553-24576)
+  Block bitmap at 23553 (+0), Inode bitmap at 23554 (+1)
+  Inode table at 23555-23562 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 23563-24576
+  Free inodes: 1473-1536
+Group 24: (Blocks 24577-25600)
+  Block bitmap at 24577 (+0), Inode bitmap at 24578 (+1)
+  Inode table at 24579-24586 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 24587-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-25883 (+275)
+  741 free blocks, 64 free inodes, 0 directories
+  Free blocks: 25884-26624
+  Free inodes: 1601-1664
+Group 26: (Blocks 26625-27648)
+  Block bitmap at 26625 (+0), Inode bitmap at 26626 (+1)
+  Inode table at 26627-26634 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 26635-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-27931 (+275)
+  741 free blocks, 64 free inodes, 0 directories
+  Free blocks: 27932-28672
+  Free inodes: 1729-1792
+Group 28: (Blocks 28673-29696)
+  Block bitmap at 28673 (+0), Inode bitmap at 28674 (+1)
+  Inode table at 28675-28682 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 28683-29696
+  Free inodes: 1793-1856
+Group 29: (Blocks 29697-30720)
+  Block bitmap at 29697 (+0), Inode bitmap at 29698 (+1)
+  Inode table at 29699-29706 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 29707-30720
+  Free inodes: 1857-1920
+Group 30: (Blocks 30721-31744)
+  Block bitmap at 30721 (+0), Inode bitmap at 30722 (+1)
+  Inode table at 30723-30730 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 30731-31744
+  Free inodes: 1921-1984
+Group 31: (Blocks 31745-32768)
+  Block bitmap at 31745 (+0), Inode bitmap at 31746 (+1)
+  Inode table at 31747-31754 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 31755-32768
+  Free inodes: 1985-2048
+Group 32: (Blocks 32769-33792)
+  Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+  Inode table at 32771-32778 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 32779-33792
+  Free inodes: 2049-2112
+Group 33: (Blocks 33793-34816)
+  Block bitmap at 33793 (+0), Inode bitmap at 33794 (+1)
+  Inode table at 33795-33802 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 33803-34816
+  Free inodes: 2113-2176
+Group 34: (Blocks 34817-35840)
+  Block bitmap at 34817 (+0), Inode bitmap at 34818 (+1)
+  Inode table at 34819-34826 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 34827-35840
+  Free inodes: 2177-2240
+Group 35: (Blocks 35841-36864)
+  Block bitmap at 35841 (+0), Inode bitmap at 35842 (+1)
+  Inode table at 35843-35850 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 35851-36864
+  Free inodes: 2241-2304
+Group 36: (Blocks 36865-37888)
+  Block bitmap at 36865 (+0), Inode bitmap at 36866 (+1)
+  Inode table at 36867-36874 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 36875-37888
+  Free inodes: 2305-2368
+Group 37: (Blocks 37889-38912)
+  Block bitmap at 37889 (+0), Inode bitmap at 37890 (+1)
+  Inode table at 37891-37898 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 37899-38912
+  Free inodes: 2369-2432
+Group 38: (Blocks 38913-39936)
+  Block bitmap at 38913 (+0), Inode bitmap at 38914 (+1)
+  Inode table at 38915-38922 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 38923-39936
+  Free inodes: 2433-2496
+Group 39: (Blocks 39937-40960)
+  Block bitmap at 39937 (+0), Inode bitmap at 39938 (+1)
+  Inode table at 39939-39946 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 39947-40960
+  Free inodes: 2497-2560
+Group 40: (Blocks 40961-41984)
+  Block bitmap at 40961 (+0), Inode bitmap at 40962 (+1)
+  Inode table at 40963-40970 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 40971-41984
+  Free inodes: 2561-2624
+Group 41: (Blocks 41985-43008)
+  Block bitmap at 41985 (+0), Inode bitmap at 41986 (+1)
+  Inode table at 41987-41994 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 41995-43008
+  Free inodes: 2625-2688
+Group 42: (Blocks 43009-44032)
+  Block bitmap at 43009 (+0), Inode bitmap at 43010 (+1)
+  Inode table at 43011-43018 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 43019-44032
+  Free inodes: 2689-2752
+Group 43: (Blocks 44033-45056)
+  Block bitmap at 44033 (+0), Inode bitmap at 44034 (+1)
+  Inode table at 44035-44042 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 44043-45056
+  Free inodes: 2753-2816
+Group 44: (Blocks 45057-46080)
+  Block bitmap at 45057 (+0), Inode bitmap at 45058 (+1)
+  Inode table at 45059-45066 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 45067-46080
+  Free inodes: 2817-2880
+Group 45: (Blocks 46081-47104)
+  Block bitmap at 46081 (+0), Inode bitmap at 46082 (+1)
+  Inode table at 46083-46090 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 46091-47104
+  Free inodes: 2881-2944
+Group 46: (Blocks 47105-48128)
+  Block bitmap at 47105 (+0), Inode bitmap at 47106 (+1)
+  Inode table at 47107-47114 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 47115-48128
+  Free inodes: 2945-3008
+Group 47: (Blocks 48129-49152)
+  Block bitmap at 48129 (+0), Inode bitmap at 48130 (+1)
+  Inode table at 48131-48138 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 48139-49152
+  Free inodes: 3009-3072
+Group 48: (Blocks 49153-50176)
+  Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+  Inode table at 49155-49162 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 49163-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-50459 (+275)
+  741 free blocks, 64 free inodes, 0 directories
+  Free blocks: 50460-51200
+  Free inodes: 3137-3200
+Group 50: (Blocks 51201-52224)
+  Block bitmap at 51201 (+0), Inode bitmap at 51202 (+1)
+  Inode table at 51203-51210 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 51211-52224
+  Free inodes: 3201-3264
+Group 51: (Blocks 52225-53248)
+  Block bitmap at 52225 (+0), Inode bitmap at 52226 (+1)
+  Inode table at 52227-52234 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 52235-53248
+  Free inodes: 3265-3328
+Group 52: (Blocks 53249-54272)
+  Block bitmap at 53249 (+0), Inode bitmap at 53250 (+1)
+  Inode table at 53251-53258 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 53259-54272
+  Free inodes: 3329-3392
+Group 53: (Blocks 54273-55296)
+  Block bitmap at 54273 (+0), Inode bitmap at 54274 (+1)
+  Inode table at 54275-54282 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 54283-55296
+  Free inodes: 3393-3456
+Group 54: (Blocks 55297-56320)
+  Block bitmap at 55297 (+0), Inode bitmap at 55298 (+1)
+  Inode table at 55299-55306 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 55307-56320
+  Free inodes: 3457-3520
+Group 55: (Blocks 56321-57344)
+  Block bitmap at 56321 (+0), Inode bitmap at 56322 (+1)
+  Inode table at 56323-56330 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 56331-57344
+  Free inodes: 3521-3584
+Group 56: (Blocks 57345-58368)
+  Block bitmap at 57345 (+0), Inode bitmap at 57346 (+1)
+  Inode table at 57347-57354 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 57355-58368
+  Free inodes: 3585-3648
+Group 57: (Blocks 58369-59392)
+  Block bitmap at 58369 (+0), Inode bitmap at 58370 (+1)
+  Inode table at 58371-58378 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 58379-59392
+  Free inodes: 3649-3712
+Group 58: (Blocks 59393-60416)
+  Block bitmap at 59393 (+0), Inode bitmap at 59394 (+1)
+  Inode table at 59395-59402 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 59403-60416
+  Free inodes: 3713-3776
+Group 59: (Blocks 60417-61440)
+  Block bitmap at 60417 (+0), Inode bitmap at 60418 (+1)
+  Inode table at 60419-60426 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 60427-61440
+  Free inodes: 3777-3840
+Group 60: (Blocks 61441-62464)
+  Block bitmap at 61441 (+0), Inode bitmap at 61442 (+1)
+  Inode table at 61443-61450 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 61451-62464
+  Free inodes: 3841-3904
+Group 61: (Blocks 62465-63488)
+  Block bitmap at 62465 (+0), Inode bitmap at 62466 (+1)
+  Inode table at 62467-62474 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 62475-63488
+  Free inodes: 3905-3968
+Group 62: (Blocks 63489-64512)
+  Block bitmap at 63489 (+0), Inode bitmap at 63490 (+1)
+  Inode table at 63491-63498 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 63499-64512
+  Free inodes: 3969-4032
+Group 63: (Blocks 64513-65536)
+  Block bitmap at 64513 (+0), Inode bitmap at 64514 (+1)
+  Inode table at 64515-64522 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 64523-65536
+  Free inodes: 4033-4096
+Group 64: (Blocks 65537-66560)
+  Block bitmap at 65537 (+0), Inode bitmap at 65538 (+1)
+  Inode table at 65539-65546 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 65547-66560
+  Free inodes: 4097-4160
+Group 65: (Blocks 66561-67584)
+  Block bitmap at 66561 (+0), Inode bitmap at 66562 (+1)
+  Inode table at 66563-66570 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 66571-67584
+  Free inodes: 4161-4224
+Group 66: (Blocks 67585-68608)
+  Block bitmap at 67585 (+0), Inode bitmap at 67586 (+1)
+  Inode table at 67587-67594 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 67595-68608
+  Free inodes: 4225-4288
+Group 67: (Blocks 68609-69632)
+  Block bitmap at 68609 (+0), Inode bitmap at 68610 (+1)
+  Inode table at 68611-68618 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 68619-69632
+  Free inodes: 4289-4352
+Group 68: (Blocks 69633-70656)
+  Block bitmap at 69633 (+0), Inode bitmap at 69634 (+1)
+  Inode table at 69635-69642 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 69643-70656
+  Free inodes: 4353-4416
+Group 69: (Blocks 70657-71680)
+  Block bitmap at 70657 (+0), Inode bitmap at 70658 (+1)
+  Inode table at 70659-70666 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 70667-71680
+  Free inodes: 4417-4480
+Group 70: (Blocks 71681-72704)
+  Block bitmap at 71681 (+0), Inode bitmap at 71682 (+1)
+  Inode table at 71683-71690 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 71691-72704
+  Free inodes: 4481-4544
+Group 71: (Blocks 72705-73728)
+  Block bitmap at 72705 (+0), Inode bitmap at 72706 (+1)
+  Inode table at 72707-72714 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 72715-73728
+  Free inodes: 4545-4608
+Group 72: (Blocks 73729-74752)
+  Block bitmap at 73729 (+0), Inode bitmap at 73730 (+1)
+  Inode table at 73731-73738 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 73739-74752
+  Free inodes: 4609-4672
+Group 73: (Blocks 74753-75776)
+  Block bitmap at 74753 (+0), Inode bitmap at 74754 (+1)
+  Inode table at 74755-74762 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 74763-75776
+  Free inodes: 4673-4736
+Group 74: (Blocks 75777-76800)
+  Block bitmap at 75777 (+0), Inode bitmap at 75778 (+1)
+  Inode table at 75779-75786 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 75787-76800
+  Free inodes: 4737-4800
+Group 75: (Blocks 76801-77824)
+  Block bitmap at 76801 (+0), Inode bitmap at 76802 (+1)
+  Inode table at 76803-76810 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 76811-77824
+  Free inodes: 4801-4864
+Group 76: (Blocks 77825-78848)
+  Block bitmap at 77825 (+0), Inode bitmap at 77826 (+1)
+  Inode table at 77827-77834 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 77835-78848
+  Free inodes: 4865-4928
+Group 77: (Blocks 78849-79872)
+  Block bitmap at 78849 (+0), Inode bitmap at 78850 (+1)
+  Inode table at 78851-78858 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 78859-79872
+  Free inodes: 4929-4992
+Group 78: (Blocks 79873-80896)
+  Block bitmap at 79873 (+0), Inode bitmap at 79874 (+1)
+  Inode table at 79875-79882 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 79883-80896
+  Free inodes: 4993-5056
+Group 79: (Blocks 80897-81920)
+  Block bitmap at 80897 (+0), Inode bitmap at 80898 (+1)
+  Inode table at 80899-80906 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 80907-81920
+  Free inodes: 5057-5120
+Group 80: (Blocks 81921-82944)
+  Block bitmap at 81921 (+0), Inode bitmap at 81922 (+1)
+  Inode table at 81923-81930 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 81931-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-83227 (+275)
+  741 free blocks, 64 free inodes, 0 directories
+  Free blocks: 83228-83968
+  Free inodes: 5185-5248
+Group 82: (Blocks 83969-84992)
+  Block bitmap at 83969 (+0), Inode bitmap at 83970 (+1)
+  Inode table at 83971-83978 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 83979-84992
+  Free inodes: 5249-5312
+Group 83: (Blocks 84993-86016)
+  Block bitmap at 84993 (+0), Inode bitmap at 84994 (+1)
+  Inode table at 84995-85002 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 85003-86016
+  Free inodes: 5313-5376
+Group 84: (Blocks 86017-87040)
+  Block bitmap at 86017 (+0), Inode bitmap at 86018 (+1)
+  Inode table at 86019-86026 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 86027-87040
+  Free inodes: 5377-5440
+Group 85: (Blocks 87041-88064)
+  Block bitmap at 87041 (+0), Inode bitmap at 87042 (+1)
+  Inode table at 87043-87050 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 87051-88064
+  Free inodes: 5441-5504
+Group 86: (Blocks 88065-89088)
+  Block bitmap at 88065 (+0), Inode bitmap at 88066 (+1)
+  Inode table at 88067-88074 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 88075-89088
+  Free inodes: 5505-5568
+Group 87: (Blocks 89089-90112)
+  Block bitmap at 89089 (+0), Inode bitmap at 89090 (+1)
+  Inode table at 89091-89098 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 89099-90112
+  Free inodes: 5569-5632
+Group 88: (Blocks 90113-91136)
+  Block bitmap at 90113 (+0), Inode bitmap at 90114 (+1)
+  Inode table at 90115-90122 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 90123-91136
+  Free inodes: 5633-5696
+Group 89: (Blocks 91137-92160)
+  Block bitmap at 91137 (+0), Inode bitmap at 91138 (+1)
+  Inode table at 91139-91146 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 91147-92160
+  Free inodes: 5697-5760
+Group 90: (Blocks 92161-93184)
+  Block bitmap at 92161 (+0), Inode bitmap at 92162 (+1)
+  Inode table at 92163-92170 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 92171-93184
+  Free inodes: 5761-5824
+Group 91: (Blocks 93185-94208)
+  Block bitmap at 93185 (+0), Inode bitmap at 93186 (+1)
+  Inode table at 93187-93194 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 93195-94208
+  Free inodes: 5825-5888
+Group 92: (Blocks 94209-95232)
+  Block bitmap at 94209 (+0), Inode bitmap at 94210 (+1)
+  Inode table at 94211-94218 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 94219-95232
+  Free inodes: 5889-5952
+Group 93: (Blocks 95233-96256)
+  Block bitmap at 95233 (+0), Inode bitmap at 95234 (+1)
+  Inode table at 95235-95242 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 95243-96256
+  Free inodes: 5953-6016
+Group 94: (Blocks 96257-97280)
+  Block bitmap at 96257 (+0), Inode bitmap at 96258 (+1)
+  Inode table at 96259-96266 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 96267-97280
+  Free inodes: 6017-6080
+Group 95: (Blocks 97281-98304)
+  Block bitmap at 97281 (+0), Inode bitmap at 97282 (+1)
+  Inode table at 97283-97290 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 97291-98304
+  Free inodes: 6081-6144
+Group 96: (Blocks 98305-99328)
+  Block bitmap at 98305 (+0), Inode bitmap at 98306 (+1)
+  Inode table at 98307-98314 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 98315-99328
+  Free inodes: 6145-6208
+Group 97: (Blocks 99329-100352)
+  Block bitmap at 99329 (+0), Inode bitmap at 99330 (+1)
+  Inode table at 99331-99338 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 99339-100352
+  Free inodes: 6209-6272
+Group 98: (Blocks 100353-101376)
+  Block bitmap at 100353 (+0), Inode bitmap at 100354 (+1)
+  Inode table at 100355-100362 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 100363-101376
+  Free inodes: 6273-6336
+Group 99: (Blocks 101377-102400)
+  Block bitmap at 101377 (+0), Inode bitmap at 101378 (+1)
+  Inode table at 101379-101386 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 101387-102400
+  Free inodes: 6337-6400
+Group 100: (Blocks 102401-103424)
+  Block bitmap at 102401 (+0), Inode bitmap at 102402 (+1)
+  Inode table at 102403-102410 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 102411-103424
+  Free inodes: 6401-6464
+Group 101: (Blocks 103425-104448)
+  Block bitmap at 103425 (+0), Inode bitmap at 103426 (+1)
+  Inode table at 103427-103434 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 103435-104448
+  Free inodes: 6465-6528
+Group 102: (Blocks 104449-105472)
+  Block bitmap at 104449 (+0), Inode bitmap at 104450 (+1)
+  Inode table at 104451-104458 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 104459-105472
+  Free inodes: 6529-6592
+Group 103: (Blocks 105473-106496)
+  Block bitmap at 105473 (+0), Inode bitmap at 105474 (+1)
+  Inode table at 105475-105482 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 105483-106496
+  Free inodes: 6593-6656
+Group 104: (Blocks 106497-107520)
+  Block bitmap at 106497 (+0), Inode bitmap at 106498 (+1)
+  Inode table at 106499-106506 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 106507-107520
+  Free inodes: 6657-6720
+Group 105: (Blocks 107521-108544)
+  Block bitmap at 107521 (+0), Inode bitmap at 107522 (+1)
+  Inode table at 107523-107530 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 107531-108544
+  Free inodes: 6721-6784
+Group 106: (Blocks 108545-109568)
+  Block bitmap at 108545 (+0), Inode bitmap at 108546 (+1)
+  Inode table at 108547-108554 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 108555-109568
+  Free inodes: 6785-6848
+Group 107: (Blocks 109569-110592)
+  Block bitmap at 109569 (+0), Inode bitmap at 109570 (+1)
+  Inode table at 109571-109578 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 109579-110592
+  Free inodes: 6849-6912
+Group 108: (Blocks 110593-111616)
+  Block bitmap at 110593 (+0), Inode bitmap at 110594 (+1)
+  Inode table at 110595-110602 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 110603-111616
+  Free inodes: 6913-6976
+Group 109: (Blocks 111617-112640)
+  Block bitmap at 111617 (+0), Inode bitmap at 111618 (+1)
+  Inode table at 111619-111626 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 111627-112640
+  Free inodes: 6977-7040
+Group 110: (Blocks 112641-113664)
+  Block bitmap at 112641 (+0), Inode bitmap at 112642 (+1)
+  Inode table at 112643-112650 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 112651-113664
+  Free inodes: 7041-7104
+Group 111: (Blocks 113665-114688)
+  Block bitmap at 113665 (+0), Inode bitmap at 113666 (+1)
+  Inode table at 113667-113674 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 113675-114688
+  Free inodes: 7105-7168
+Group 112: (Blocks 114689-115712)
+  Block bitmap at 114689 (+0), Inode bitmap at 114690 (+1)
+  Inode table at 114691-114698 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 114699-115712
+  Free inodes: 7169-7232
+Group 113: (Blocks 115713-116736)
+  Block bitmap at 115713 (+0), Inode bitmap at 115714 (+1)
+  Inode table at 115715-115722 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 115723-116736
+  Free inodes: 7233-7296
+Group 114: (Blocks 116737-117760)
+  Block bitmap at 116737 (+0), Inode bitmap at 116738 (+1)
+  Inode table at 116739-116746 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 116747-117760
+  Free inodes: 7297-7360
+Group 115: (Blocks 117761-118784)
+  Block bitmap at 117761 (+0), Inode bitmap at 117762 (+1)
+  Inode table at 117763-117770 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 117771-118784
+  Free inodes: 7361-7424
+Group 116: (Blocks 118785-119808)
+  Block bitmap at 118785 (+0), Inode bitmap at 118786 (+1)
+  Inode table at 118787-118794 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 118795-119808
+  Free inodes: 7425-7488
+Group 117: (Blocks 119809-120832)
+  Block bitmap at 119809 (+0), Inode bitmap at 119810 (+1)
+  Inode table at 119811-119818 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 119819-120832
+  Free inodes: 7489-7552
+Group 118: (Blocks 120833-121856)
+  Block bitmap at 120833 (+0), Inode bitmap at 120834 (+1)
+  Inode table at 120835-120842 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 120843-121856
+  Free inodes: 7553-7616
+Group 119: (Blocks 121857-122880)
+  Block bitmap at 121857 (+0), Inode bitmap at 121858 (+1)
+  Inode table at 121859-121866 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 121867-122880
+  Free inodes: 7617-7680
+Group 120: (Blocks 122881-123904)
+  Block bitmap at 122881 (+0), Inode bitmap at 122882 (+1)
+  Inode table at 122883-122890 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 122891-123904
+  Free inodes: 7681-7744
+Group 121: (Blocks 123905-124928)
+  Block bitmap at 123905 (+0), Inode bitmap at 123906 (+1)
+  Inode table at 123907-123914 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 123915-124928
+  Free inodes: 7745-7808
+Group 122: (Blocks 124929-125952)
+  Block bitmap at 124929 (+0), Inode bitmap at 124930 (+1)
+  Inode table at 124931-124938 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 124939-125952
+  Free inodes: 7809-7872
+Group 123: (Blocks 125953-126976)
+  Block bitmap at 125953 (+0), Inode bitmap at 125954 (+1)
+  Inode table at 125955-125962 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 125963-126976
+  Free inodes: 7873-7936
+Group 124: (Blocks 126977-128000)
+  Block bitmap at 126977 (+0), Inode bitmap at 126978 (+1)
+  Inode table at 126979-126986 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 126987-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-128283 (+275)
+  741 free blocks, 64 free inodes, 0 directories
+  Free blocks: 128284-129024
+  Free inodes: 8001-8064
+Group 126: (Blocks 129025-130048)
+  Block bitmap at 129025 (+0), Inode bitmap at 129026 (+1)
+  Inode table at 129027-129034 (+2)
+  1014 free blocks, 64 free inodes, 0 directories
+  Free blocks: 129035-130048
+  Free inodes: 8065-8128
+Group 127: (Blocks 130049-131071)
+  Block bitmap at 130049 (+0), Inode bitmap at 130050 (+1)
+  Inode table at 130051-130058 (+2)
+  1013 free blocks, 64 free inodes, 0 directories
+  Free blocks: 130059-131071
+  Free inodes: 8129-8192
diff --git a/e2fsprogs/tests/m_desc_size_128/script b/e2fsprogs/tests/m_desc_size_128/script
new file mode 100644
index 0000000..de3def9
--- /dev/null
+++ b/e2fsprogs/tests/m_desc_size_128/script
@@ -0,0 +1,4 @@
+DESCRIPTION="enable 128-byte group descriptor on mkfs"
+FS_SIZE=131072
+MKE2FS_OPTS="-b 1024 -O 64bit,extents -g 1024 -N 8192 -E desc_size=128"
+. $cmd_dir/run_mke2fs
diff --git a/e2fsprogs/tests/m_extent_journal/expect.1 b/e2fsprogs/tests/m_extent_journal/expect.1
new file mode 100644
index 0000000..d5d7a24
--- /dev/null
+++ b/e2fsprogs/tests/m_extent_journal/expect.1
@@ -0,0 +1,124 @@
+Filesystem label=
+OS type: Linux
+Block size=1024 (log=0)
+Fragment size=1024 (log=0)
+Stride=0 blocks, Stripe width=0 blocks
+16384 inodes, 65536 blocks
+3276 blocks (5.00%) reserved for the super user
+First data block=1
+Maximum filesystem blocks=67108864
+8 block groups
+8192 blocks per group, 8192 fragments per group
+2048 inodes per group
+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), 7460/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
+Free blocks:              58076
+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:   256
+Mount count:              0
+Check interval:           15552000 (6 months)
+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)
+Journal size:             4096k
+Journal length:           4096
+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-515 (+259)
+  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
+  Reserved GDT blocks at 8195-8449
+  Block bitmap at 8450 (+257), Inode bitmap at 8451 (+258)
+  Inode table at 8452-8707 (+259)
+  7677 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 8708-16384
+  Free inodes: 2049-4096
+Group 2: (Blocks 16385-24576)
+  Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+  Inode table at 16387-16642 (+2)
+  3838 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 20739-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-25091 (+259)
+  7677 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 25092-32768
+  Free inodes: 6145-8192
+Group 4: (Blocks 32769-40960)
+  Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+  Inode table at 32771-33026 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 33027-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-41475 (+259)
+  7677 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 41476-49152
+  Free inodes: 10241-12288
+Group 6: (Blocks 49153-57344)
+  Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+  Inode table at 49155-49410 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 49411-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-57859 (+259)
+  7676 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 57860-65535
+  Free inodes: 14337-16384
diff --git a/e2fsprogs/tests/m_extent_journal/script b/e2fsprogs/tests/m_extent_journal/script
new file mode 100644
index 0000000..5e0cac2
--- /dev/null
+++ b/e2fsprogs/tests/m_extent_journal/script
@@ -0,0 +1,4 @@
+DESCRIPTION="extent-mapped journal"
+FS_SIZE=65536
+MKE2FS_OPTS="-O extents -j"
+. $cmd_dir/run_mke2fs
diff --git a/e2fsprogs/tests/m_large_file/expect.1 b/e2fsprogs/tests/m_large_file/expect.1
new file mode 100644
index 0000000..ced9431
--- /dev/null
+++ b/e2fsprogs/tests/m_large_file/expect.1
@@ -0,0 +1,66 @@
+Filesystem label=
+OS type: Linux
+Block size=4096 (log=2)
+Fragment size=4096 (log=2)
+Stride=0 blocks, Stripe width=0 blocks
+64 inodes, 16384 blocks
+819 blocks (5.00%) reserved for the super user
+First data block=0
+Maximum filesystem blocks=16777216
+1 block group
+32768 blocks per group, 32768 fragments per group
+64 inodes per group
+
+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
+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:     28
+Desired extra isize:      28
+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/e2fsprogs/tests/m_large_file/script b/e2fsprogs/tests/m_large_file/script
new file mode 100644
index 0000000..bd5b2ba
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/m_meta_bg/expect.1 b/e2fsprogs/tests/m_meta_bg/expect.1
new file mode 100644
index 0000000..ec10d6e
--- /dev/null
+++ b/e2fsprogs/tests/m_meta_bg/expect.1
@@ -0,0 +1,845 @@
+Filesystem label=
+OS type: Linux
+Block size=1024 (log=0)
+Fragment size=1024 (log=0)
+Stride=0 blocks, Stripe width=0 blocks
+32768 inodes, 131072 blocks
+6553 blocks (5.00%) reserved for the super user
+First data block=1
+128 block groups
+1024 blocks per group, 1024 fragments per group
+256 inodes per group
+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), 4389/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
+Free blocks:              126683
+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:   32
+Mount count:              0
+Check interval:           15552000 (6 months)
+Reserved blocks uid:      0
+Reserved blocks gid:      0
+First inode:              11
+Inode size:	          128
+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-36 (+4)
+  975 free blocks, 245 free inodes, 2 directories
+  Free blocks: 50-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-1060 (+4)
+  988 free blocks, 256 free inodes, 0 directories
+  Free blocks: 1061-2048
+  Free inodes: 257-512
+Group 2: (Blocks 2049-3072)
+  Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+  Inode table at 2051-2082 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 2083-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-3107 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 3108-4096
+  Free inodes: 769-1024
+Group 4: (Blocks 4097-5120)
+  Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+  Inode table at 4099-4130 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 4131-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-5155 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 5156-6144
+  Free inodes: 1281-1536
+Group 6: (Blocks 6145-7168)
+  Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+  Inode table at 6147-6178 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 6179-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-7203 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 7204-8192
+  Free inodes: 1793-2048
+Group 8: (Blocks 8193-9216)
+  Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+  Inode table at 8195-8226 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 8227-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-9251 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 9252-10240
+  Free inodes: 2305-2560
+Group 10: (Blocks 10241-11264)
+  Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+  Inode table at 10243-10274 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 10275-11264
+  Free inodes: 2561-2816
+Group 11: (Blocks 11265-12288)
+  Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+  Inode table at 11267-11298 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 11299-12288
+  Free inodes: 2817-3072
+Group 12: (Blocks 12289-13312)
+  Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+  Inode table at 12291-12322 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 12323-13312
+  Free inodes: 3073-3328
+Group 13: (Blocks 13313-14336)
+  Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+  Inode table at 13315-13346 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 13347-14336
+  Free inodes: 3329-3584
+Group 14: (Blocks 14337-15360)
+  Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+  Inode table at 14339-14370 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 14371-15360
+  Free inodes: 3585-3840
+Group 15: (Blocks 15361-16384)
+  Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+  Inode table at 15363-15394 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 15395-16384
+  Free inodes: 3841-4096
+Group 16: (Blocks 16385-17408)
+  Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+  Inode table at 16387-16418 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 16419-17408
+  Free inodes: 4097-4352
+Group 17: (Blocks 17409-18432)
+  Block bitmap at 17409 (+0), Inode bitmap at 17410 (+1)
+  Inode table at 17411-17442 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 17443-18432
+  Free inodes: 4353-4608
+Group 18: (Blocks 18433-19456)
+  Block bitmap at 18433 (+0), Inode bitmap at 18434 (+1)
+  Inode table at 18435-18466 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 18467-19456
+  Free inodes: 4609-4864
+Group 19: (Blocks 19457-20480)
+  Block bitmap at 19457 (+0), Inode bitmap at 19458 (+1)
+  Inode table at 19459-19490 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 19491-20480
+  Free inodes: 4865-5120
+Group 20: (Blocks 20481-21504)
+  Block bitmap at 20481 (+0), Inode bitmap at 20482 (+1)
+  Inode table at 20483-20514 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 20515-21504
+  Free inodes: 5121-5376
+Group 21: (Blocks 21505-22528)
+  Block bitmap at 21505 (+0), Inode bitmap at 21506 (+1)
+  Inode table at 21507-21538 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 21539-22528
+  Free inodes: 5377-5632
+Group 22: (Blocks 22529-23552)
+  Block bitmap at 22529 (+0), Inode bitmap at 22530 (+1)
+  Inode table at 22531-22562 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 22563-23552
+  Free inodes: 5633-5888
+Group 23: (Blocks 23553-24576)
+  Block bitmap at 23553 (+0), Inode bitmap at 23554 (+1)
+  Inode table at 23555-23586 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 23587-24576
+  Free inodes: 5889-6144
+Group 24: (Blocks 24577-25600)
+  Block bitmap at 24577 (+0), Inode bitmap at 24578 (+1)
+  Inode table at 24579-24610 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 24611-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-25635 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 25636-26624
+  Free inodes: 6401-6656
+Group 26: (Blocks 26625-27648)
+  Block bitmap at 26625 (+0), Inode bitmap at 26626 (+1)
+  Inode table at 26627-26658 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 26659-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-27683 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 27684-28672
+  Free inodes: 6913-7168
+Group 28: (Blocks 28673-29696)
+  Block bitmap at 28673 (+0), Inode bitmap at 28674 (+1)
+  Inode table at 28675-28706 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 28707-29696
+  Free inodes: 7169-7424
+Group 29: (Blocks 29697-30720)
+  Block bitmap at 29697 (+0), Inode bitmap at 29698 (+1)
+  Inode table at 29699-29730 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 29731-30720
+  Free inodes: 7425-7680
+Group 30: (Blocks 30721-31744)
+  Block bitmap at 30721 (+0), Inode bitmap at 30722 (+1)
+  Inode table at 30723-30754 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 30755-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-31779 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 31780-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-32803 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 32804-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-33827 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 33828-34816
+  Free inodes: 8449-8704
+Group 34: (Blocks 34817-35840)
+  Block bitmap at 34817 (+0), Inode bitmap at 34818 (+1)
+  Inode table at 34819-34850 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 34851-35840
+  Free inodes: 8705-8960
+Group 35: (Blocks 35841-36864)
+  Block bitmap at 35841 (+0), Inode bitmap at 35842 (+1)
+  Inode table at 35843-35874 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 35875-36864
+  Free inodes: 8961-9216
+Group 36: (Blocks 36865-37888)
+  Block bitmap at 36865 (+0), Inode bitmap at 36866 (+1)
+  Inode table at 36867-36898 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 36899-37888
+  Free inodes: 9217-9472
+Group 37: (Blocks 37889-38912)
+  Block bitmap at 37889 (+0), Inode bitmap at 37890 (+1)
+  Inode table at 37891-37922 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 37923-38912
+  Free inodes: 9473-9728
+Group 38: (Blocks 38913-39936)
+  Block bitmap at 38913 (+0), Inode bitmap at 38914 (+1)
+  Inode table at 38915-38946 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 38947-39936
+  Free inodes: 9729-9984
+Group 39: (Blocks 39937-40960)
+  Block bitmap at 39937 (+0), Inode bitmap at 39938 (+1)
+  Inode table at 39939-39970 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 39971-40960
+  Free inodes: 9985-10240
+Group 40: (Blocks 40961-41984)
+  Block bitmap at 40961 (+0), Inode bitmap at 40962 (+1)
+  Inode table at 40963-40994 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 40995-41984
+  Free inodes: 10241-10496
+Group 41: (Blocks 41985-43008)
+  Block bitmap at 41985 (+0), Inode bitmap at 41986 (+1)
+  Inode table at 41987-42018 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 42019-43008
+  Free inodes: 10497-10752
+Group 42: (Blocks 43009-44032)
+  Block bitmap at 43009 (+0), Inode bitmap at 43010 (+1)
+  Inode table at 43011-43042 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 43043-44032
+  Free inodes: 10753-11008
+Group 43: (Blocks 44033-45056)
+  Block bitmap at 44033 (+0), Inode bitmap at 44034 (+1)
+  Inode table at 44035-44066 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 44067-45056
+  Free inodes: 11009-11264
+Group 44: (Blocks 45057-46080)
+  Block bitmap at 45057 (+0), Inode bitmap at 45058 (+1)
+  Inode table at 45059-45090 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 45091-46080
+  Free inodes: 11265-11520
+Group 45: (Blocks 46081-47104)
+  Block bitmap at 46081 (+0), Inode bitmap at 46082 (+1)
+  Inode table at 46083-46114 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 46115-47104
+  Free inodes: 11521-11776
+Group 46: (Blocks 47105-48128)
+  Block bitmap at 47105 (+0), Inode bitmap at 47106 (+1)
+  Inode table at 47107-47138 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 47139-48128
+  Free inodes: 11777-12032
+Group 47: (Blocks 48129-49152)
+  Block bitmap at 48129 (+0), Inode bitmap at 48130 (+1)
+  Inode table at 48131-48162 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 48163-49152
+  Free inodes: 12033-12288
+Group 48: (Blocks 49153-50176)
+  Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+  Inode table at 49155-49186 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 49187-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-50211 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 50212-51200
+  Free inodes: 12545-12800
+Group 50: (Blocks 51201-52224)
+  Block bitmap at 51201 (+0), Inode bitmap at 51202 (+1)
+  Inode table at 51203-51234 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 51235-52224
+  Free inodes: 12801-13056
+Group 51: (Blocks 52225-53248)
+  Block bitmap at 52225 (+0), Inode bitmap at 52226 (+1)
+  Inode table at 52227-52258 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 52259-53248
+  Free inodes: 13057-13312
+Group 52: (Blocks 53249-54272)
+  Block bitmap at 53249 (+0), Inode bitmap at 53250 (+1)
+  Inode table at 53251-53282 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 53283-54272
+  Free inodes: 13313-13568
+Group 53: (Blocks 54273-55296)
+  Block bitmap at 54273 (+0), Inode bitmap at 54274 (+1)
+  Inode table at 54275-54306 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 54307-55296
+  Free inodes: 13569-13824
+Group 54: (Blocks 55297-56320)
+  Block bitmap at 55297 (+0), Inode bitmap at 55298 (+1)
+  Inode table at 55299-55330 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 55331-56320
+  Free inodes: 13825-14080
+Group 55: (Blocks 56321-57344)
+  Block bitmap at 56321 (+0), Inode bitmap at 56322 (+1)
+  Inode table at 56323-56354 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 56355-57344
+  Free inodes: 14081-14336
+Group 56: (Blocks 57345-58368)
+  Block bitmap at 57345 (+0), Inode bitmap at 57346 (+1)
+  Inode table at 57347-57378 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 57379-58368
+  Free inodes: 14337-14592
+Group 57: (Blocks 58369-59392)
+  Block bitmap at 58369 (+0), Inode bitmap at 58370 (+1)
+  Inode table at 58371-58402 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 58403-59392
+  Free inodes: 14593-14848
+Group 58: (Blocks 59393-60416)
+  Block bitmap at 59393 (+0), Inode bitmap at 59394 (+1)
+  Inode table at 59395-59426 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 59427-60416
+  Free inodes: 14849-15104
+Group 59: (Blocks 60417-61440)
+  Block bitmap at 60417 (+0), Inode bitmap at 60418 (+1)
+  Inode table at 60419-60450 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 60451-61440
+  Free inodes: 15105-15360
+Group 60: (Blocks 61441-62464)
+  Block bitmap at 61441 (+0), Inode bitmap at 61442 (+1)
+  Inode table at 61443-61474 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 61475-62464
+  Free inodes: 15361-15616
+Group 61: (Blocks 62465-63488)
+  Block bitmap at 62465 (+0), Inode bitmap at 62466 (+1)
+  Inode table at 62467-62498 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 62499-63488
+  Free inodes: 15617-15872
+Group 62: (Blocks 63489-64512)
+  Block bitmap at 63489 (+0), Inode bitmap at 63490 (+1)
+  Inode table at 63491-63522 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 63523-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-64547 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 64548-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-65571 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 65572-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-66595 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 66596-67584
+  Free inodes: 16641-16896
+Group 66: (Blocks 67585-68608)
+  Block bitmap at 67585 (+0), Inode bitmap at 67586 (+1)
+  Inode table at 67587-67618 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 67619-68608
+  Free inodes: 16897-17152
+Group 67: (Blocks 68609-69632)
+  Block bitmap at 68609 (+0), Inode bitmap at 68610 (+1)
+  Inode table at 68611-68642 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 68643-69632
+  Free inodes: 17153-17408
+Group 68: (Blocks 69633-70656)
+  Block bitmap at 69633 (+0), Inode bitmap at 69634 (+1)
+  Inode table at 69635-69666 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 69667-70656
+  Free inodes: 17409-17664
+Group 69: (Blocks 70657-71680)
+  Block bitmap at 70657 (+0), Inode bitmap at 70658 (+1)
+  Inode table at 70659-70690 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 70691-71680
+  Free inodes: 17665-17920
+Group 70: (Blocks 71681-72704)
+  Block bitmap at 71681 (+0), Inode bitmap at 71682 (+1)
+  Inode table at 71683-71714 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 71715-72704
+  Free inodes: 17921-18176
+Group 71: (Blocks 72705-73728)
+  Block bitmap at 72705 (+0), Inode bitmap at 72706 (+1)
+  Inode table at 72707-72738 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 72739-73728
+  Free inodes: 18177-18432
+Group 72: (Blocks 73729-74752)
+  Block bitmap at 73729 (+0), Inode bitmap at 73730 (+1)
+  Inode table at 73731-73762 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 73763-74752
+  Free inodes: 18433-18688
+Group 73: (Blocks 74753-75776)
+  Block bitmap at 74753 (+0), Inode bitmap at 74754 (+1)
+  Inode table at 74755-74786 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 74787-75776
+  Free inodes: 18689-18944
+Group 74: (Blocks 75777-76800)
+  Block bitmap at 75777 (+0), Inode bitmap at 75778 (+1)
+  Inode table at 75779-75810 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 75811-76800
+  Free inodes: 18945-19200
+Group 75: (Blocks 76801-77824)
+  Block bitmap at 76801 (+0), Inode bitmap at 76802 (+1)
+  Inode table at 76803-76834 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 76835-77824
+  Free inodes: 19201-19456
+Group 76: (Blocks 77825-78848)
+  Block bitmap at 77825 (+0), Inode bitmap at 77826 (+1)
+  Inode table at 77827-77858 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 77859-78848
+  Free inodes: 19457-19712
+Group 77: (Blocks 78849-79872)
+  Block bitmap at 78849 (+0), Inode bitmap at 78850 (+1)
+  Inode table at 78851-78882 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 78883-79872
+  Free inodes: 19713-19968
+Group 78: (Blocks 79873-80896)
+  Block bitmap at 79873 (+0), Inode bitmap at 79874 (+1)
+  Inode table at 79875-79906 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 79907-80896
+  Free inodes: 19969-20224
+Group 79: (Blocks 80897-81920)
+  Block bitmap at 80897 (+0), Inode bitmap at 80898 (+1)
+  Inode table at 80899-80930 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 80931-81920
+  Free inodes: 20225-20480
+Group 80: (Blocks 81921-82944)
+  Block bitmap at 81921 (+0), Inode bitmap at 81922 (+1)
+  Inode table at 81923-81954 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 81955-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-82979 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 82980-83968
+  Free inodes: 20737-20992
+Group 82: (Blocks 83969-84992)
+  Block bitmap at 83969 (+0), Inode bitmap at 83970 (+1)
+  Inode table at 83971-84002 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 84003-84992
+  Free inodes: 20993-21248
+Group 83: (Blocks 84993-86016)
+  Block bitmap at 84993 (+0), Inode bitmap at 84994 (+1)
+  Inode table at 84995-85026 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 85027-86016
+  Free inodes: 21249-21504
+Group 84: (Blocks 86017-87040)
+  Block bitmap at 86017 (+0), Inode bitmap at 86018 (+1)
+  Inode table at 86019-86050 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 86051-87040
+  Free inodes: 21505-21760
+Group 85: (Blocks 87041-88064)
+  Block bitmap at 87041 (+0), Inode bitmap at 87042 (+1)
+  Inode table at 87043-87074 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 87075-88064
+  Free inodes: 21761-22016
+Group 86: (Blocks 88065-89088)
+  Block bitmap at 88065 (+0), Inode bitmap at 88066 (+1)
+  Inode table at 88067-88098 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 88099-89088
+  Free inodes: 22017-22272
+Group 87: (Blocks 89089-90112)
+  Block bitmap at 89089 (+0), Inode bitmap at 89090 (+1)
+  Inode table at 89091-89122 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 89123-90112
+  Free inodes: 22273-22528
+Group 88: (Blocks 90113-91136)
+  Block bitmap at 90113 (+0), Inode bitmap at 90114 (+1)
+  Inode table at 90115-90146 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 90147-91136
+  Free inodes: 22529-22784
+Group 89: (Blocks 91137-92160)
+  Block bitmap at 91137 (+0), Inode bitmap at 91138 (+1)
+  Inode table at 91139-91170 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 91171-92160
+  Free inodes: 22785-23040
+Group 90: (Blocks 92161-93184)
+  Block bitmap at 92161 (+0), Inode bitmap at 92162 (+1)
+  Inode table at 92163-92194 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 92195-93184
+  Free inodes: 23041-23296
+Group 91: (Blocks 93185-94208)
+  Block bitmap at 93185 (+0), Inode bitmap at 93186 (+1)
+  Inode table at 93187-93218 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 93219-94208
+  Free inodes: 23297-23552
+Group 92: (Blocks 94209-95232)
+  Block bitmap at 94209 (+0), Inode bitmap at 94210 (+1)
+  Inode table at 94211-94242 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 94243-95232
+  Free inodes: 23553-23808
+Group 93: (Blocks 95233-96256)
+  Block bitmap at 95233 (+0), Inode bitmap at 95234 (+1)
+  Inode table at 95235-95266 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 95267-96256
+  Free inodes: 23809-24064
+Group 94: (Blocks 96257-97280)
+  Block bitmap at 96257 (+0), Inode bitmap at 96258 (+1)
+  Inode table at 96259-96290 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 96291-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-97315 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 97316-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-98339 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 98340-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-99363 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 99364-100352
+  Free inodes: 24833-25088
+Group 98: (Blocks 100353-101376)
+  Block bitmap at 100353 (+0), Inode bitmap at 100354 (+1)
+  Inode table at 100355-100386 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 100387-101376
+  Free inodes: 25089-25344
+Group 99: (Blocks 101377-102400)
+  Block bitmap at 101377 (+0), Inode bitmap at 101378 (+1)
+  Inode table at 101379-101410 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 101411-102400
+  Free inodes: 25345-25600
+Group 100: (Blocks 102401-103424)
+  Block bitmap at 102401 (+0), Inode bitmap at 102402 (+1)
+  Inode table at 102403-102434 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 102435-103424
+  Free inodes: 25601-25856
+Group 101: (Blocks 103425-104448)
+  Block bitmap at 103425 (+0), Inode bitmap at 103426 (+1)
+  Inode table at 103427-103458 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 103459-104448
+  Free inodes: 25857-26112
+Group 102: (Blocks 104449-105472)
+  Block bitmap at 104449 (+0), Inode bitmap at 104450 (+1)
+  Inode table at 104451-104482 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 104483-105472
+  Free inodes: 26113-26368
+Group 103: (Blocks 105473-106496)
+  Block bitmap at 105473 (+0), Inode bitmap at 105474 (+1)
+  Inode table at 105475-105506 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 105507-106496
+  Free inodes: 26369-26624
+Group 104: (Blocks 106497-107520)
+  Block bitmap at 106497 (+0), Inode bitmap at 106498 (+1)
+  Inode table at 106499-106530 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 106531-107520
+  Free inodes: 26625-26880
+Group 105: (Blocks 107521-108544)
+  Block bitmap at 107521 (+0), Inode bitmap at 107522 (+1)
+  Inode table at 107523-107554 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 107555-108544
+  Free inodes: 26881-27136
+Group 106: (Blocks 108545-109568)
+  Block bitmap at 108545 (+0), Inode bitmap at 108546 (+1)
+  Inode table at 108547-108578 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 108579-109568
+  Free inodes: 27137-27392
+Group 107: (Blocks 109569-110592)
+  Block bitmap at 109569 (+0), Inode bitmap at 109570 (+1)
+  Inode table at 109571-109602 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 109603-110592
+  Free inodes: 27393-27648
+Group 108: (Blocks 110593-111616)
+  Block bitmap at 110593 (+0), Inode bitmap at 110594 (+1)
+  Inode table at 110595-110626 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 110627-111616
+  Free inodes: 27649-27904
+Group 109: (Blocks 111617-112640)
+  Block bitmap at 111617 (+0), Inode bitmap at 111618 (+1)
+  Inode table at 111619-111650 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 111651-112640
+  Free inodes: 27905-28160
+Group 110: (Blocks 112641-113664)
+  Block bitmap at 112641 (+0), Inode bitmap at 112642 (+1)
+  Inode table at 112643-112674 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 112675-113664
+  Free inodes: 28161-28416
+Group 111: (Blocks 113665-114688)
+  Block bitmap at 113665 (+0), Inode bitmap at 113666 (+1)
+  Inode table at 113667-113698 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 113699-114688
+  Free inodes: 28417-28672
+Group 112: (Blocks 114689-115712)
+  Block bitmap at 114689 (+0), Inode bitmap at 114690 (+1)
+  Inode table at 114691-114722 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 114723-115712
+  Free inodes: 28673-28928
+Group 113: (Blocks 115713-116736)
+  Block bitmap at 115713 (+0), Inode bitmap at 115714 (+1)
+  Inode table at 115715-115746 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 115747-116736
+  Free inodes: 28929-29184
+Group 114: (Blocks 116737-117760)
+  Block bitmap at 116737 (+0), Inode bitmap at 116738 (+1)
+  Inode table at 116739-116770 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 116771-117760
+  Free inodes: 29185-29440
+Group 115: (Blocks 117761-118784)
+  Block bitmap at 117761 (+0), Inode bitmap at 117762 (+1)
+  Inode table at 117763-117794 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 117795-118784
+  Free inodes: 29441-29696
+Group 116: (Blocks 118785-119808)
+  Block bitmap at 118785 (+0), Inode bitmap at 118786 (+1)
+  Inode table at 118787-118818 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 118819-119808
+  Free inodes: 29697-29952
+Group 117: (Blocks 119809-120832)
+  Block bitmap at 119809 (+0), Inode bitmap at 119810 (+1)
+  Inode table at 119811-119842 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 119843-120832
+  Free inodes: 29953-30208
+Group 118: (Blocks 120833-121856)
+  Block bitmap at 120833 (+0), Inode bitmap at 120834 (+1)
+  Inode table at 120835-120866 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 120867-121856
+  Free inodes: 30209-30464
+Group 119: (Blocks 121857-122880)
+  Block bitmap at 121857 (+0), Inode bitmap at 121858 (+1)
+  Inode table at 121859-121890 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 121891-122880
+  Free inodes: 30465-30720
+Group 120: (Blocks 122881-123904)
+  Block bitmap at 122881 (+0), Inode bitmap at 122882 (+1)
+  Inode table at 122883-122914 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 122915-123904
+  Free inodes: 30721-30976
+Group 121: (Blocks 123905-124928)
+  Block bitmap at 123905 (+0), Inode bitmap at 123906 (+1)
+  Inode table at 123907-123938 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 123939-124928
+  Free inodes: 30977-31232
+Group 122: (Blocks 124929-125952)
+  Block bitmap at 124929 (+0), Inode bitmap at 124930 (+1)
+  Inode table at 124931-124962 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 124963-125952
+  Free inodes: 31233-31488
+Group 123: (Blocks 125953-126976)
+  Block bitmap at 125953 (+0), Inode bitmap at 125954 (+1)
+  Inode table at 125955-125986 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 125987-126976
+  Free inodes: 31489-31744
+Group 124: (Blocks 126977-128000)
+  Block bitmap at 126977 (+0), Inode bitmap at 126978 (+1)
+  Inode table at 126979-127010 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 127011-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-128035 (+3)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 128036-129024
+  Free inodes: 32001-32256
+Group 126: (Blocks 129025-130048)
+  Block bitmap at 129025 (+0), Inode bitmap at 129026 (+1)
+  Inode table at 129027-129058 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 129059-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-130083 (+3)
+  988 free blocks, 256 free inodes, 0 directories
+  Free blocks: 130084-131071
+  Free inodes: 32513-32768
diff --git a/e2fsprogs/tests/m_meta_bg/script b/e2fsprogs/tests/m_meta_bg/script
new file mode 100644
index 0000000..7ca2bea
--- /dev/null
+++ b/e2fsprogs/tests/m_meta_bg/script
@@ -0,0 +1,4 @@
+DESCRIPTION="meta blockgroup feature"
+FS_SIZE=131072
+MKE2FS_OPTS="-O meta_bg,sparse_super,^resize_inode -g 1024"
+. $cmd_dir/run_mke2fs
diff --git a/e2fsprogs/tests/m_mkfs_overhead/expect b/e2fsprogs/tests/m_mkfs_overhead/expect
new file mode 100644
index 0000000..adb8fd2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/m_mkfs_overhead/script b/e2fsprogs/tests/m_mkfs_overhead/script
new file mode 100644
index 0000000..c21da0c
--- /dev/null
+++ b/e2fsprogs/tests/m_mkfs_overhead/script
@@ -0,0 +1,31 @@
+test_description="test bg overhead calculation"
+
+OUT=$test_name.log
+EXP=$test_dir/expect
+FS_SIZE=1024
+MKE2FS_OPTS="-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
+
+cp /dev/null $OUT
+
+$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/e2fsprogs/tests/m_mmp/expect.1 b/e2fsprogs/tests/m_mmp/expect.1
new file mode 100644
index 0000000..e18aa77
--- /dev/null
+++ b/e2fsprogs/tests/m_mmp/expect.1
@@ -0,0 +1,77 @@
+Filesystem label=
+OS type: Linux
+Block size=4096 (log=2)
+Fragment size=4096 (log=2)
+Stride=0 blocks, Stripe width=0 blocks
+65536 inodes, 65536 blocks
+3276 blocks (5.00%) reserved for the super user
+First data block=0
+Maximum filesystem blocks=67108864
+2 block groups
+32768 blocks per group, 32768 fragments per group
+32768 inodes per group
+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), 2093/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
+Free blocks:              63443
+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:   1024
+Mount count:              0
+Check interval:           15552000 (6 months)
+Reserved blocks uid:      0
+Reserved blocks gid:      0
+First inode:              11
+Inode size:	          128
+Default directory hash:   half_md4
+MMP block number:         1049
+MMP update interval:      5
+
+
+Group 0: (Blocks 0-32767)
+  Primary superblock at 0, Group descriptors at 1-1
+  Reserved GDT blocks at 2-16
+  Block bitmap at 17 (+17), Inode bitmap at 18 (+18)
+  Inode table at 19-1042 (+19)
+  31718 free blocks, 32757 free inodes, 2 directories
+  Free blocks: 1050-32767
+  Free inodes: 12-32768
+Group 1: (Blocks 32768-65535)
+  Backup superblock at 32768, Group descriptors at 32769-32769
+  Reserved GDT blocks at 32770-32784
+  Block bitmap at 32785 (+17), Inode bitmap at 32786 (+18)
+  Inode table at 32787-33810 (+19)
+  31725 free blocks, 32768 free inodes, 0 directories
+  Free blocks: 33811-65535
+  Free inodes: 32769-65536
diff --git a/e2fsprogs/tests/m_mmp/script b/e2fsprogs/tests/m_mmp/script
new file mode 100644
index 0000000..02b0b4b
--- /dev/null
+++ b/e2fsprogs/tests/m_mmp/script
@@ -0,0 +1,15 @@
+DESCRIPTION="enable MMP during mke2fs"
+FS_SIZE=65536
+MKE2FS_DEVICE_SECTSIZE=2048
+export MKE2FS_DEVICE_SECTSIZE
+TMPFILE=$test_name.tmp
+> $TMPFILE
+stat -f $TMPFILE | grep -q "Type: tmpfs"
+if [ $? = 0 ]; then
+	rm -f $TMPFILE
+	echo "$test_name: $test_description: skipped for tmpfs (no O_DIRECT)"
+	return 0
+fi
+MKE2FS_OPTS="-b 4096 -O mmp"
+. $cmd_dir/run_mke2fs
+unset MKE2FS_DEVICE_SECTSIZE
diff --git a/e2fsprogs/tests/m_no_opt/expect.1 b/e2fsprogs/tests/m_no_opt/expect.1
new file mode 100644
index 0000000..e7bf2db
--- /dev/null
+++ b/e2fsprogs/tests/m_no_opt/expect.1
@@ -0,0 +1,112 @@
+Filesystem label=
+OS type: Linux
+Block size=1024 (log=0)
+Fragment size=1024 (log=0)
+Stride=0 blocks, Stripe width=0 blocks
+16384 inodes, 65536 blocks
+3276 blocks (5.00%) reserved for the super user
+First data block=1
+8 block groups
+8192 blocks per group, 8192 fragments per group
+2048 inodes per group
+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), 2094/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
+Free blocks:              63442
+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:   256
+Mount count:              0
+Check interval:           15552000 (6 months)
+Reserved blocks uid:      0
+Reserved blocks gid:      0
+First inode:              11
+Inode size:	          128
+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-260 (+4)
+  7919 free blocks, 2037 free inodes, 2 directories
+  Free blocks: 274-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-8452 (+4)
+  7932 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 8453-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-16644 (+4)
+  7932 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 16645-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-24836 (+4)
+  7932 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 24837-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-33028 (+4)
+  7932 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 33029-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-41220 (+4)
+  7932 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 41221-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-49412 (+4)
+  7932 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 49413-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-57604 (+4)
+  7931 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 57605-65535
+  Free inodes: 14337-16384
diff --git a/e2fsprogs/tests/m_no_opt/script b/e2fsprogs/tests/m_no_opt/script
new file mode 100644
index 0000000..6d1d0eb
--- /dev/null
+++ b/e2fsprogs/tests/m_no_opt/script
@@ -0,0 +1,4 @@
+DESCRIPTION="no filesystem extensions"
+FS_SIZE=65536
+MKE2FS_OPTS="-O ^sparse_super,^filetype,^resize_inode,^dir_index,^ext_attr"
+. $cmd_dir/run_mke2fs
diff --git a/e2fsprogs/tests/m_quota/expect.1 b/e2fsprogs/tests/m_quota/expect.1
new file mode 100644
index 0000000..830046e
--- /dev/null
+++ b/e2fsprogs/tests/m_quota/expect.1
@@ -0,0 +1,172 @@
+
+Warning: the quota feature is still under development
+See https://ext4.wiki.kernel.org/index.php/Quota for more information
+
+Filesystem label=
+OS type: Linux
+Block size=1024 (log=0)
+Fragment size=1024 (log=0)
+Stride=0 blocks, Stripe width=0 blocks
+32768 inodes, 131072 blocks
+6553 blocks (5.00%) reserved for the super user
+First data block=1
+Maximum filesystem blocks=67371008
+16 block groups
+8192 blocks per group, 8192 fragments per group
+2048 inodes per group
+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
+Pass 1: Checking inodes, blocks, and 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 (18.2% non-contiguous), 5703/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
+Default mount options:    (none)
+Filesystem state:         clean
+Errors behavior:          Continue
+Filesystem OS type:       Linux
+Inode count:              32768
+Block count:              131072
+Reserved block count:     6553
+Free blocks:              125369
+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:   256
+Mount count:              0
+Check interval:           15552000 (6 months)
+Reserved blocks uid:      0
+Reserved blocks gid:      0
+First inode:              11
+Inode size:	          128
+Default directory hash:   half_md4
+User quota inode:         3
+Group quota inode:        4
+
+
+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-516 (+260)
+  7650 free blocks, 2037 free inodes, 2 directories
+  Free blocks: 543-8192
+  Free inodes: 12-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-8708 (+260)
+  7676 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 8709-16384
+  Free inodes: 2049-4096
+Group 2: (Blocks 16385-24576)
+  Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+  Inode table at 16387-16642 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 16643-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-25092 (+260)
+  7676 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 25093-32768
+  Free inodes: 6145-8192
+Group 4: (Blocks 32769-40960)
+  Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+  Inode table at 32771-33026 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 33027-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-41476 (+260)
+  7676 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 41477-49152
+  Free inodes: 10241-12288
+Group 6: (Blocks 49153-57344)
+  Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+  Inode table at 49155-49410 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 49411-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-57860 (+260)
+  7676 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 57861-65536
+  Free inodes: 14337-16384
+Group 8: (Blocks 65537-73728)
+  Block bitmap at 65537 (+0), Inode bitmap at 65538 (+1)
+  Inode table at 65539-65794 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 65795-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-74244 (+260)
+  7676 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 74245-81920
+  Free inodes: 18433-20480
+Group 10: (Blocks 81921-90112)
+  Block bitmap at 81921 (+0), Inode bitmap at 81922 (+1)
+  Inode table at 81923-82178 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 82179-90112
+  Free inodes: 20481-22528
+Group 11: (Blocks 90113-98304)
+  Block bitmap at 90113 (+0), Inode bitmap at 90114 (+1)
+  Inode table at 90115-90370 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 90371-98304
+  Free inodes: 22529-24576
+Group 12: (Blocks 98305-106496)
+  Block bitmap at 98305 (+0), Inode bitmap at 98306 (+1)
+  Inode table at 98307-98562 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 98563-106496
+  Free inodes: 24577-26624
+Group 13: (Blocks 106497-114688)
+  Block bitmap at 106497 (+0), Inode bitmap at 106498 (+1)
+  Inode table at 106499-106754 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 106755-114688
+  Free inodes: 26625-28672
+Group 14: (Blocks 114689-122880)
+  Block bitmap at 114689 (+0), Inode bitmap at 114690 (+1)
+  Inode table at 114691-114946 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 114947-122880
+  Free inodes: 28673-30720
+Group 15: (Blocks 122881-131071)
+  Block bitmap at 122881 (+0), Inode bitmap at 122882 (+1)
+  Inode table at 122883-123138 (+2)
+  7933 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 123139-131071
+  Free inodes: 30721-32768
diff --git a/e2fsprogs/tests/m_quota/script b/e2fsprogs/tests/m_quota/script
new file mode 100644
index 0000000..36ab630
--- /dev/null
+++ b/e2fsprogs/tests/m_quota/script
@@ -0,0 +1,8 @@
+DESCRIPTION="enable quota feature on mkfs"
+FS_SIZE=131072
+MKE2FS_OPTS="-O quota"
+if [ "$QUOTA" != "y" ]; then
+	echo "$test_name: $DESCRIPTION: skipped"
+	return 0
+fi
+. $cmd_dir/run_mke2fs
diff --git a/e2fsprogs/tests/m_raid_opt/expect.1 b/e2fsprogs/tests/m_raid_opt/expect.1
new file mode 100644
index 0000000..9548665
--- /dev/null
+++ b/e2fsprogs/tests/m_raid_opt/expect.1
@@ -0,0 +1,849 @@
+Filesystem label=
+OS type: Linux
+Block size=1024 (log=0)
+Fragment size=1024 (log=0)
+Stride=13 blocks, Stripe width=0 blocks
+32768 inodes, 131072 blocks
+6553 blocks (5.00%) reserved for the super user
+First data block=1
+Maximum filesystem blocks=8519680
+128 block groups
+1024 blocks per group, 1024 fragments per group
+256 inodes per group
+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), 7238/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
+Free blocks:              123834
+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:   32
+RAID stride:              13
+Mount count:              0
+Check interval:           15552000 (6 months)
+Reserved blocks uid:      0
+Reserved blocks gid:      0
+First inode:              11
+Inode size:	          128
+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 294 (+293), Inode bitmap at 295 (+294)
+  Inode table at 262-293 (+261)
+  715 free blocks, 245 free inodes, 2 directories
+  Free blocks: 310-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 1331 (+306), Inode bitmap at 1332 (+307)
+  Inode table at 1286-1317 (+261)
+  729 free blocks, 256 free inodes, 0 directories
+  Free blocks: 1318-1330, 1333-2048
+  Free inodes: 257-512
+Group 2: (Blocks 2049-3072)
+  Block bitmap at 2107 (+58), Inode bitmap at 2108 (+59)
+  Inode table at 2049-2080
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 2081-2106, 2109-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 3405 (+332), Inode bitmap at 3406 (+333)
+  Inode table at 3334-3365 (+261)
+  729 free blocks, 256 free inodes, 0 directories
+  Free blocks: 3366-3404, 3407-4096
+  Free inodes: 769-1024
+Group 4: (Blocks 4097-5120)
+  Block bitmap at 4181 (+84), Inode bitmap at 4182 (+85)
+  Inode table at 4097-4128
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 4129-4180, 4183-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 5479 (+358), Inode bitmap at 5480 (+359)
+  Inode table at 5382-5413 (+261)
+  729 free blocks, 256 free inodes, 0 directories
+  Free blocks: 5414-5478, 5481-6144
+  Free inodes: 1281-1536
+Group 6: (Blocks 6145-7168)
+  Block bitmap at 6255 (+110), Inode bitmap at 6256 (+111)
+  Inode table at 6145-6176
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 6177-6254, 6257-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 7553 (+384), Inode bitmap at 7554 (+385)
+  Inode table at 7430-7461 (+261)
+  729 free blocks, 256 free inodes, 0 directories
+  Free blocks: 7462-7552, 7555-8192
+  Free inodes: 1793-2048
+Group 8: (Blocks 8193-9216)
+  Block bitmap at 8329 (+136), Inode bitmap at 8330 (+137)
+  Inode table at 8193-8224
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 8225-8328, 8331-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 9627 (+410), Inode bitmap at 9628 (+411)
+  Inode table at 9478-9509 (+261)
+  729 free blocks, 256 free inodes, 0 directories
+  Free blocks: 9510-9626, 9629-10240
+  Free inodes: 2305-2560
+Group 10: (Blocks 10241-11264)
+  Block bitmap at 10403 (+162), Inode bitmap at 10404 (+163)
+  Inode table at 10241-10272
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 10273-10402, 10405-11264
+  Free inodes: 2561-2816
+Group 11: (Blocks 11265-12288)
+  Block bitmap at 11440 (+175), Inode bitmap at 11441 (+176)
+  Inode table at 11265-11296
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 11297-11439, 11442-12288
+  Free inodes: 2817-3072
+Group 12: (Blocks 12289-13312)
+  Block bitmap at 12477 (+188), Inode bitmap at 12478 (+189)
+  Inode table at 12289-12320
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 12321-12476, 12479-13312
+  Free inodes: 3073-3328
+Group 13: (Blocks 13313-14336)
+  Block bitmap at 13514 (+201), Inode bitmap at 13515 (+202)
+  Inode table at 13313-13344
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 13345-13513, 13516-14336
+  Free inodes: 3329-3584
+Group 14: (Blocks 14337-15360)
+  Block bitmap at 14551 (+214), Inode bitmap at 14552 (+215)
+  Inode table at 14337-14368
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 14369-14550, 14553-15360
+  Free inodes: 3585-3840
+Group 15: (Blocks 15361-16384)
+  Block bitmap at 15588 (+227), Inode bitmap at 15589 (+228)
+  Inode table at 15361-15392
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 15393-15587, 15590-16384
+  Free inodes: 3841-4096
+Group 16: (Blocks 16385-17408)
+  Block bitmap at 16625 (+240), Inode bitmap at 16626 (+241)
+  Inode table at 16385-16416
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 16417-16624, 16627-17408
+  Free inodes: 4097-4352
+Group 17: (Blocks 17409-18432)
+  Block bitmap at 17662 (+253), Inode bitmap at 17663 (+254)
+  Inode table at 17409-17440
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 17441-17661, 17664-18432
+  Free inodes: 4353-4608
+Group 18: (Blocks 18433-19456)
+  Block bitmap at 18699 (+266), Inode bitmap at 18700 (+267)
+  Inode table at 18433-18464
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 18465-18698, 18701-19456
+  Free inodes: 4609-4864
+Group 19: (Blocks 19457-20480)
+  Block bitmap at 19736 (+279), Inode bitmap at 19737 (+280)
+  Inode table at 19457-19488
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 19489-19735, 19738-20480
+  Free inodes: 4865-5120
+Group 20: (Blocks 20481-21504)
+  Block bitmap at 20773 (+292), Inode bitmap at 20774 (+293)
+  Inode table at 20481-20512
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 20513-20772, 20775-21504
+  Free inodes: 5121-5376
+Group 21: (Blocks 21505-22528)
+  Block bitmap at 21810 (+305), Inode bitmap at 21811 (+306)
+  Inode table at 21505-21536
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 21537-21809, 21812-22528
+  Free inodes: 5377-5632
+Group 22: (Blocks 22529-23552)
+  Block bitmap at 22847 (+318), Inode bitmap at 22848 (+319)
+  Inode table at 22529-22560
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 22561-22846, 22849-23552
+  Free inodes: 5633-5888
+Group 23: (Blocks 23553-24576)
+  Block bitmap at 23884 (+331), Inode bitmap at 23885 (+332)
+  Inode table at 23553-23584
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 23585-23883, 23886-24576
+  Free inodes: 5889-6144
+Group 24: (Blocks 24577-25600)
+  Block bitmap at 24921 (+344), Inode bitmap at 24922 (+345)
+  Inode table at 24577-24608
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 24609-24920, 24923-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 26219 (+618), Inode bitmap at 26220 (+619)
+  Inode table at 25862-25893 (+261)
+  729 free blocks, 256 free inodes, 0 directories
+  Free blocks: 25894-26218, 26221-26624
+  Free inodes: 6401-6656
+Group 26: (Blocks 26625-27648)
+  Block bitmap at 26995 (+370), Inode bitmap at 26996 (+371)
+  Inode table at 26625-26656
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 26657-26994, 26997-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 28293 (+644), Inode bitmap at 28294 (+645)
+  Inode table at 27910-27941 (+261)
+  729 free blocks, 256 free inodes, 0 directories
+  Free blocks: 27942-28292, 28295-28672
+  Free inodes: 6913-7168
+Group 28: (Blocks 28673-29696)
+  Block bitmap at 29069 (+396), Inode bitmap at 29070 (+397)
+  Inode table at 28673-28704
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 28705-29068, 29071-29696
+  Free inodes: 7169-7424
+Group 29: (Blocks 29697-30720)
+  Block bitmap at 30106 (+409), Inode bitmap at 30107 (+410)
+  Inode table at 29697-29728
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 29729-30105, 30108-30720
+  Free inodes: 7425-7680
+Group 30: (Blocks 30721-31744)
+  Block bitmap at 31143 (+422), Inode bitmap at 31144 (+423)
+  Inode table at 30721-30752
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 30753-31142, 31145-31744
+  Free inodes: 7681-7936
+Group 31: (Blocks 31745-32768)
+  Block bitmap at 32180 (+435), Inode bitmap at 32181 (+436)
+  Inode table at 31745-31776
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 31777-32179, 32182-32768
+  Free inodes: 7937-8192
+Group 32: (Blocks 32769-33792)
+  Block bitmap at 33217 (+448), Inode bitmap at 33218 (+449)
+  Inode table at 32769-32800
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 32801-33216, 33219-33792
+  Free inodes: 8193-8448
+Group 33: (Blocks 33793-34816)
+  Block bitmap at 34254 (+461), Inode bitmap at 34255 (+462)
+  Inode table at 33793-33824
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 33825-34253, 34256-34816
+  Free inodes: 8449-8704
+Group 34: (Blocks 34817-35840)
+  Block bitmap at 35291 (+474), Inode bitmap at 35292 (+475)
+  Inode table at 34817-34848
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 34849-35290, 35293-35840
+  Free inodes: 8705-8960
+Group 35: (Blocks 35841-36864)
+  Block bitmap at 36328 (+487), Inode bitmap at 36329 (+488)
+  Inode table at 35841-35872
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 35873-36327, 36330-36864
+  Free inodes: 8961-9216
+Group 36: (Blocks 36865-37888)
+  Block bitmap at 37365 (+500), Inode bitmap at 37366 (+501)
+  Inode table at 36865-36896
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 36897-37364, 37367-37888
+  Free inodes: 9217-9472
+Group 37: (Blocks 37889-38912)
+  Block bitmap at 38402 (+513), Inode bitmap at 38403 (+514)
+  Inode table at 37889-37920
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 37921-38401, 38404-38912
+  Free inodes: 9473-9728
+Group 38: (Blocks 38913-39936)
+  Block bitmap at 39439 (+526), Inode bitmap at 39440 (+527)
+  Inode table at 38913-38944
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 38945-39438, 39441-39936
+  Free inodes: 9729-9984
+Group 39: (Blocks 39937-40960)
+  Block bitmap at 40476 (+539), Inode bitmap at 40477 (+540)
+  Inode table at 39937-39968
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 39969-40475, 40478-40960
+  Free inodes: 9985-10240
+Group 40: (Blocks 40961-41984)
+  Block bitmap at 41513 (+552), Inode bitmap at 41514 (+553)
+  Inode table at 40961-40992
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 40993-41512, 41515-41984
+  Free inodes: 10241-10496
+Group 41: (Blocks 41985-43008)
+  Block bitmap at 42550 (+565), Inode bitmap at 42551 (+566)
+  Inode table at 41985-42016
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 42017-42549, 42552-43008
+  Free inodes: 10497-10752
+Group 42: (Blocks 43009-44032)
+  Block bitmap at 43587 (+578), Inode bitmap at 43588 (+579)
+  Inode table at 43009-43040
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 43041-43586, 43589-44032
+  Free inodes: 10753-11008
+Group 43: (Blocks 44033-45056)
+  Block bitmap at 44624 (+591), Inode bitmap at 44625 (+592)
+  Inode table at 44033-44064
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 44065-44623, 44626-45056
+  Free inodes: 11009-11264
+Group 44: (Blocks 45057-46080)
+  Block bitmap at 45661 (+604), Inode bitmap at 45662 (+605)
+  Inode table at 45057-45088
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 45089-45660, 45663-46080
+  Free inodes: 11265-11520
+Group 45: (Blocks 46081-47104)
+  Block bitmap at 46698 (+617), Inode bitmap at 46699 (+618)
+  Inode table at 46081-46112
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 46113-46697, 46700-47104
+  Free inodes: 11521-11776
+Group 46: (Blocks 47105-48128)
+  Block bitmap at 47735 (+630), Inode bitmap at 47736 (+631)
+  Inode table at 47105-47136
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 47137-47734, 47737-48128
+  Free inodes: 11777-12032
+Group 47: (Blocks 48129-49152)
+  Block bitmap at 48772 (+643), Inode bitmap at 48773 (+644)
+  Inode table at 48129-48160
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 48161-48771, 48774-49152
+  Free inodes: 12033-12288
+Group 48: (Blocks 49153-50176)
+  Block bitmap at 49809 (+656), Inode bitmap at 49810 (+657)
+  Inode table at 49153-49184
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 49185-49808, 49811-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 51107 (+930), Inode bitmap at 51108 (+931)
+  Inode table at 50438-50469 (+261)
+  729 free blocks, 256 free inodes, 0 directories
+  Free blocks: 50470-51106, 51109-51200
+  Free inodes: 12545-12800
+Group 50: (Blocks 51201-52224)
+  Block bitmap at 51883 (+682), Inode bitmap at 51884 (+683)
+  Inode table at 51201-51232
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 51233-51882, 51885-52224
+  Free inodes: 12801-13056
+Group 51: (Blocks 52225-53248)
+  Block bitmap at 52920 (+695), Inode bitmap at 52921 (+696)
+  Inode table at 52225-52256
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 52257-52919, 52922-53248
+  Free inodes: 13057-13312
+Group 52: (Blocks 53249-54272)
+  Block bitmap at 53957 (+708), Inode bitmap at 53958 (+709)
+  Inode table at 53249-53280
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 53281-53956, 53959-54272
+  Free inodes: 13313-13568
+Group 53: (Blocks 54273-55296)
+  Block bitmap at 54994 (+721), Inode bitmap at 54995 (+722)
+  Inode table at 54273-54304
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 54305-54993, 54996-55296
+  Free inodes: 13569-13824
+Group 54: (Blocks 55297-56320)
+  Block bitmap at 56031 (+734), Inode bitmap at 56032 (+735)
+  Inode table at 55297-55328
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 55329-56030, 56033-56320
+  Free inodes: 13825-14080
+Group 55: (Blocks 56321-57344)
+  Block bitmap at 57068 (+747), Inode bitmap at 57069 (+748)
+  Inode table at 56321-56352
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 56353-57067, 57070-57344
+  Free inodes: 14081-14336
+Group 56: (Blocks 57345-58368)
+  Block bitmap at 58105 (+760), Inode bitmap at 58106 (+761)
+  Inode table at 57345-57376
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 57377-58104, 58107-58368
+  Free inodes: 14337-14592
+Group 57: (Blocks 58369-59392)
+  Block bitmap at 59142 (+773), Inode bitmap at 59143 (+774)
+  Inode table at 58369-58400
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 58401-59141, 59144-59392
+  Free inodes: 14593-14848
+Group 58: (Blocks 59393-60416)
+  Block bitmap at 60179 (+786), Inode bitmap at 60180 (+787)
+  Inode table at 59393-59424
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 59425-60178, 60181-60416
+  Free inodes: 14849-15104
+Group 59: (Blocks 60417-61440)
+  Block bitmap at 61216 (+799), Inode bitmap at 61217 (+800)
+  Inode table at 60417-60448
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 60449-61215, 61218-61440
+  Free inodes: 15105-15360
+Group 60: (Blocks 61441-62464)
+  Block bitmap at 62253 (+812), Inode bitmap at 62254 (+813)
+  Inode table at 61441-61472
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 61473-62252, 62255-62464
+  Free inodes: 15361-15616
+Group 61: (Blocks 62465-63488)
+  Block bitmap at 63290 (+825), Inode bitmap at 63291 (+826)
+  Inode table at 62465-62496
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 62497-63289, 63292-63488
+  Free inodes: 15617-15872
+Group 62: (Blocks 63489-64512)
+  Block bitmap at 64327 (+838), Inode bitmap at 64328 (+839)
+  Inode table at 63489-63520
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 63521-64326, 64329-64512
+  Free inodes: 15873-16128
+Group 63: (Blocks 64513-65536)
+  Block bitmap at 65364 (+851), Inode bitmap at 65365 (+852)
+  Inode table at 64513-64544
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 64545-65363, 65366-65536
+  Free inodes: 16129-16384
+Group 64: (Blocks 65537-66560)
+  Block bitmap at 66401 (+864), Inode bitmap at 66402 (+865)
+  Inode table at 65537-65568
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 65569-66400, 66403-66560
+  Free inodes: 16385-16640
+Group 65: (Blocks 66561-67584)
+  Block bitmap at 67438 (+877), Inode bitmap at 67439 (+878)
+  Inode table at 66561-66592
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 66593-67437, 67440-67584
+  Free inodes: 16641-16896
+Group 66: (Blocks 67585-68608)
+  Block bitmap at 68475 (+890), Inode bitmap at 68476 (+891)
+  Inode table at 67585-67616
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 67617-68474, 68477-68608
+  Free inodes: 16897-17152
+Group 67: (Blocks 68609-69632)
+  Block bitmap at 69512 (+903), Inode bitmap at 69513 (+904)
+  Inode table at 68609-68640
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 68641-69511, 69514-69632
+  Free inodes: 17153-17408
+Group 68: (Blocks 69633-70656)
+  Block bitmap at 70549 (+916), Inode bitmap at 70550 (+917)
+  Inode table at 69633-69664
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 69665-70548, 70551-70656
+  Free inodes: 17409-17664
+Group 69: (Blocks 70657-71680)
+  Block bitmap at 71586 (+929), Inode bitmap at 71587 (+930)
+  Inode table at 70657-70688
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 70689-71585, 71588-71680
+  Free inodes: 17665-17920
+Group 70: (Blocks 71681-72704)
+  Block bitmap at 72623 (+942), Inode bitmap at 72624 (+943)
+  Inode table at 71681-71712
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 71713-72622, 72625-72704
+  Free inodes: 17921-18176
+Group 71: (Blocks 72705-73728)
+  Block bitmap at 73660 (+955), Inode bitmap at 73661 (+956)
+  Inode table at 72705-72736
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 72737-73659, 73662-73728
+  Free inodes: 18177-18432
+Group 72: (Blocks 73729-74752)
+  Block bitmap at 74697 (+968), Inode bitmap at 74698 (+969)
+  Inode table at 73729-73760
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 73761-74696, 74699-74752
+  Free inodes: 18433-18688
+Group 73: (Blocks 74753-75776)
+  Block bitmap at 75734 (+981), Inode bitmap at 75735 (+982)
+  Inode table at 74753-74784
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 74785-75733, 75736-75776
+  Free inodes: 18689-18944
+Group 74: (Blocks 75777-76800)
+  Block bitmap at 76771 (+994), Inode bitmap at 76772 (+995)
+  Inode table at 75777-75808
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 75809-76770, 76773-76800
+  Free inodes: 18945-19200
+Group 75: (Blocks 76801-77824)
+  Block bitmap at 77808 (+1007), Inode bitmap at 77809 (+1008)
+  Inode table at 76801-76832
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 76833-77807, 77810-77824
+  Free inodes: 19201-19456
+Group 76: (Blocks 77825-78848)
+  Block bitmap at 78845 (+1020), Inode bitmap at 78846 (+1021)
+  Inode table at 77825-77856
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 77857-78844, 78847-78848
+  Free inodes: 19457-19712
+Group 77: (Blocks 78849-79872)
+  Block bitmap at 78890 (+41), Inode bitmap at 78891 (+42)
+  Inode table at 78849-78880
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 78881-78889, 78892-79872
+  Free inodes: 19713-19968
+Group 78: (Blocks 79873-80896)
+  Block bitmap at 79927 (+54), Inode bitmap at 79928 (+55)
+  Inode table at 79873-79904
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 79905-79926, 79929-80896
+  Free inodes: 19969-20224
+Group 79: (Blocks 80897-81920)
+  Block bitmap at 80964 (+67), Inode bitmap at 80965 (+68)
+  Inode table at 80897-80928
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 80929-80963, 80966-81920
+  Free inodes: 20225-20480
+Group 80: (Blocks 81921-82944)
+  Block bitmap at 82001 (+80), Inode bitmap at 82002 (+81)
+  Inode table at 81921-81952
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 81953-82000, 82003-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 83560 (+615), Inode bitmap at 83561 (+616)
+  Inode table at 83206-83237 (+261)
+  729 free blocks, 256 free inodes, 0 directories
+  Free blocks: 83238-83559, 83562-83968
+  Free inodes: 20737-20992
+Group 82: (Blocks 83969-84992)
+  Block bitmap at 84075 (+106), Inode bitmap at 84076 (+107)
+  Inode table at 83969-84000
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 84001-84074, 84077-84992
+  Free inodes: 20993-21248
+Group 83: (Blocks 84993-86016)
+  Block bitmap at 85112 (+119), Inode bitmap at 85113 (+120)
+  Inode table at 84993-85024
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 85025-85111, 85114-86016
+  Free inodes: 21249-21504
+Group 84: (Blocks 86017-87040)
+  Block bitmap at 86149 (+132), Inode bitmap at 86150 (+133)
+  Inode table at 86017-86048
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 86049-86148, 86151-87040
+  Free inodes: 21505-21760
+Group 85: (Blocks 87041-88064)
+  Block bitmap at 87186 (+145), Inode bitmap at 87187 (+146)
+  Inode table at 87041-87072
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 87073-87185, 87188-88064
+  Free inodes: 21761-22016
+Group 86: (Blocks 88065-89088)
+  Block bitmap at 88223 (+158), Inode bitmap at 88224 (+159)
+  Inode table at 88065-88096
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 88097-88222, 88225-89088
+  Free inodes: 22017-22272
+Group 87: (Blocks 89089-90112)
+  Block bitmap at 89260 (+171), Inode bitmap at 89261 (+172)
+  Inode table at 89089-89120
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 89121-89259, 89262-90112
+  Free inodes: 22273-22528
+Group 88: (Blocks 90113-91136)
+  Block bitmap at 90297 (+184), Inode bitmap at 90298 (+185)
+  Inode table at 90113-90144
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 90145-90296, 90299-91136
+  Free inodes: 22529-22784
+Group 89: (Blocks 91137-92160)
+  Block bitmap at 91334 (+197), Inode bitmap at 91335 (+198)
+  Inode table at 91137-91168
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 91169-91333, 91336-92160
+  Free inodes: 22785-23040
+Group 90: (Blocks 92161-93184)
+  Block bitmap at 92371 (+210), Inode bitmap at 92372 (+211)
+  Inode table at 92161-92192
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 92193-92370, 92373-93184
+  Free inodes: 23041-23296
+Group 91: (Blocks 93185-94208)
+  Block bitmap at 93408 (+223), Inode bitmap at 93409 (+224)
+  Inode table at 93185-93216
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 93217-93407, 93410-94208
+  Free inodes: 23297-23552
+Group 92: (Blocks 94209-95232)
+  Block bitmap at 94445 (+236), Inode bitmap at 94446 (+237)
+  Inode table at 94209-94240
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 94241-94444, 94447-95232
+  Free inodes: 23553-23808
+Group 93: (Blocks 95233-96256)
+  Block bitmap at 95482 (+249), Inode bitmap at 95483 (+250)
+  Inode table at 95233-95264
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 95265-95481, 95484-96256
+  Free inodes: 23809-24064
+Group 94: (Blocks 96257-97280)
+  Block bitmap at 96519 (+262), Inode bitmap at 96520 (+263)
+  Inode table at 96257-96288
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 96289-96518, 96521-97280
+  Free inodes: 24065-24320
+Group 95: (Blocks 97281-98304)
+  Block bitmap at 97556 (+275), Inode bitmap at 97557 (+276)
+  Inode table at 97281-97312
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 97313-97555, 97558-98304
+  Free inodes: 24321-24576
+Group 96: (Blocks 98305-99328)
+  Block bitmap at 98593 (+288), Inode bitmap at 98594 (+289)
+  Inode table at 98305-98336
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 98337-98592, 98595-99328
+  Free inodes: 24577-24832
+Group 97: (Blocks 99329-100352)
+  Block bitmap at 99630 (+301), Inode bitmap at 99631 (+302)
+  Inode table at 99329-99360
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 99361-99629, 99632-100352
+  Free inodes: 24833-25088
+Group 98: (Blocks 100353-101376)
+  Block bitmap at 100667 (+314), Inode bitmap at 100668 (+315)
+  Inode table at 100353-100384
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 100385-100666, 100669-101376
+  Free inodes: 25089-25344
+Group 99: (Blocks 101377-102400)
+  Block bitmap at 101704 (+327), Inode bitmap at 101705 (+328)
+  Inode table at 101377-101408
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 101409-101703, 101706-102400
+  Free inodes: 25345-25600
+Group 100: (Blocks 102401-103424)
+  Block bitmap at 102741 (+340), Inode bitmap at 102742 (+341)
+  Inode table at 102401-102432
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 102433-102740, 102743-103424
+  Free inodes: 25601-25856
+Group 101: (Blocks 103425-104448)
+  Block bitmap at 103778 (+353), Inode bitmap at 103779 (+354)
+  Inode table at 103425-103456
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 103457-103777, 103780-104448
+  Free inodes: 25857-26112
+Group 102: (Blocks 104449-105472)
+  Block bitmap at 104815 (+366), Inode bitmap at 104816 (+367)
+  Inode table at 104449-104480
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 104481-104814, 104817-105472
+  Free inodes: 26113-26368
+Group 103: (Blocks 105473-106496)
+  Block bitmap at 105852 (+379), Inode bitmap at 105853 (+380)
+  Inode table at 105473-105504
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 105505-105851, 105854-106496
+  Free inodes: 26369-26624
+Group 104: (Blocks 106497-107520)
+  Block bitmap at 106889 (+392), Inode bitmap at 106890 (+393)
+  Inode table at 106497-106528
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 106529-106888, 106891-107520
+  Free inodes: 26625-26880
+Group 105: (Blocks 107521-108544)
+  Block bitmap at 107926 (+405), Inode bitmap at 107927 (+406)
+  Inode table at 107521-107552
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 107553-107925, 107928-108544
+  Free inodes: 26881-27136
+Group 106: (Blocks 108545-109568)
+  Block bitmap at 108963 (+418), Inode bitmap at 108964 (+419)
+  Inode table at 108545-108576
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 108577-108962, 108965-109568
+  Free inodes: 27137-27392
+Group 107: (Blocks 109569-110592)
+  Block bitmap at 110000 (+431), Inode bitmap at 110001 (+432)
+  Inode table at 109569-109600
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 109601-109999, 110002-110592
+  Free inodes: 27393-27648
+Group 108: (Blocks 110593-111616)
+  Block bitmap at 111037 (+444), Inode bitmap at 111038 (+445)
+  Inode table at 110593-110624
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 110625-111036, 111039-111616
+  Free inodes: 27649-27904
+Group 109: (Blocks 111617-112640)
+  Block bitmap at 112074 (+457), Inode bitmap at 112075 (+458)
+  Inode table at 111617-111648
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 111649-112073, 112076-112640
+  Free inodes: 27905-28160
+Group 110: (Blocks 112641-113664)
+  Block bitmap at 113111 (+470), Inode bitmap at 113112 (+471)
+  Inode table at 112641-112672
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 112673-113110, 113113-113664
+  Free inodes: 28161-28416
+Group 111: (Blocks 113665-114688)
+  Block bitmap at 114148 (+483), Inode bitmap at 114149 (+484)
+  Inode table at 113665-113696
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 113697-114147, 114150-114688
+  Free inodes: 28417-28672
+Group 112: (Blocks 114689-115712)
+  Block bitmap at 115185 (+496), Inode bitmap at 115186 (+497)
+  Inode table at 114689-114720
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 114721-115184, 115187-115712
+  Free inodes: 28673-28928
+Group 113: (Blocks 115713-116736)
+  Block bitmap at 116222 (+509), Inode bitmap at 116223 (+510)
+  Inode table at 115713-115744
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 115745-116221, 116224-116736
+  Free inodes: 28929-29184
+Group 114: (Blocks 116737-117760)
+  Block bitmap at 117259 (+522), Inode bitmap at 117260 (+523)
+  Inode table at 116737-116768
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 116769-117258, 117261-117760
+  Free inodes: 29185-29440
+Group 115: (Blocks 117761-118784)
+  Block bitmap at 118296 (+535), Inode bitmap at 118297 (+536)
+  Inode table at 117761-117792
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 117793-118295, 118298-118784
+  Free inodes: 29441-29696
+Group 116: (Blocks 118785-119808)
+  Block bitmap at 119333 (+548), Inode bitmap at 119334 (+549)
+  Inode table at 118785-118816
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 118817-119332, 119335-119808
+  Free inodes: 29697-29952
+Group 117: (Blocks 119809-120832)
+  Block bitmap at 120370 (+561), Inode bitmap at 120371 (+562)
+  Inode table at 119809-119840
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 119841-120369, 120372-120832
+  Free inodes: 29953-30208
+Group 118: (Blocks 120833-121856)
+  Block bitmap at 121407 (+574), Inode bitmap at 121408 (+575)
+  Inode table at 120833-120864
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 120865-121406, 121409-121856
+  Free inodes: 30209-30464
+Group 119: (Blocks 121857-122880)
+  Block bitmap at 122444 (+587), Inode bitmap at 122445 (+588)
+  Inode table at 121857-121888
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 121889-122443, 122446-122880
+  Free inodes: 30465-30720
+Group 120: (Blocks 122881-123904)
+  Block bitmap at 123481 (+600), Inode bitmap at 123482 (+601)
+  Inode table at 122881-122912
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 122913-123480, 123483-123904
+  Free inodes: 30721-30976
+Group 121: (Blocks 123905-124928)
+  Block bitmap at 124518 (+613), Inode bitmap at 124519 (+614)
+  Inode table at 123905-123936
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 123937-124517, 124520-124928
+  Free inodes: 30977-31232
+Group 122: (Blocks 124929-125952)
+  Block bitmap at 125555 (+626), Inode bitmap at 125556 (+627)
+  Inode table at 124929-124960
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 124961-125554, 125557-125952
+  Free inodes: 31233-31488
+Group 123: (Blocks 125953-126976)
+  Block bitmap at 126592 (+639), Inode bitmap at 126593 (+640)
+  Inode table at 125953-125984
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 125985-126591, 126594-126976
+  Free inodes: 31489-31744
+Group 124: (Blocks 126977-128000)
+  Block bitmap at 127629 (+652), Inode bitmap at 127630 (+653)
+  Inode table at 126977-127008
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 127009-127628, 127631-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 128457 (+456), Inode bitmap at 128458 (+457)
+  Inode table at 128262-128293 (+261)
+  729 free blocks, 256 free inodes, 0 directories
+  Free blocks: 128294-128456, 128459-129024
+  Free inodes: 32001-32256
+Group 126: (Blocks 129025-130048)
+  Block bitmap at 129703 (+678), Inode bitmap at 129704 (+679)
+  Inode table at 129025-129056
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 129057-129702, 129705-130048
+  Free inodes: 32257-32512
+Group 127: (Blocks 130049-131071)
+  Block bitmap at 130741 (+692), Inode bitmap at 130742 (+693)
+  Inode table at 130049-130080
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 130081-130740, 130743-131071
+  Free inodes: 32513-32768
diff --git a/e2fsprogs/tests/m_raid_opt/script b/e2fsprogs/tests/m_raid_opt/script
new file mode 100644
index 0000000..296fe94
--- /dev/null
+++ b/e2fsprogs/tests/m_raid_opt/script
@@ -0,0 +1,4 @@
+DESCRIPTION="raid options"
+FS_SIZE=131072
+MKE2FS_OPTS="-E stride=13 -O sparse_super -g 1024"
+. $cmd_dir/run_mke2fs
diff --git a/e2fsprogs/tests/m_root_owner/expect.1 b/e2fsprogs/tests/m_root_owner/expect.1
new file mode 100644
index 0000000..72b0e08
--- /dev/null
+++ b/e2fsprogs/tests/m_root_owner/expect.1
@@ -0,0 +1,65 @@
+Filesystem label=
+OS type: Linux
+Block size=1024 (log=0)
+Fragment size=1024 (log=0)
+Stride=0 blocks, Stripe width=0 blocks
+128 inodes, 1024 blocks
+51 blocks (4.98%) reserved for the super user
+First data block=1
+Root directory owner=1234:1234
+Maximum filesystem blocks=1048576
+1 block group
+8192 blocks per group, 8192 fragments per group
+128 inodes per group
+
+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), 38/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
+Free blocks:              986
+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:   16
+Mount count:              0
+Check interval:           15552000 (6 months)
+Reserved blocks uid:      0
+Reserved blocks gid:      0
+First inode:              11
+Inode size:	          128
+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-23 (+7)
+  986 free blocks, 117 free inodes, 2 directories
+  Free blocks: 38-1023
+  Free inodes: 12-128
diff --git a/e2fsprogs/tests/m_root_owner/script b/e2fsprogs/tests/m_root_owner/script
new file mode 100644
index 0000000..02c5ef6
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/m_std/expect.1 b/e2fsprogs/tests/m_std/expect.1
new file mode 100644
index 0000000..f356531
--- /dev/null
+++ b/e2fsprogs/tests/m_std/expect.1
@@ -0,0 +1,116 @@
+Filesystem label=
+OS type: Linux
+Block size=1024 (log=0)
+Fragment size=1024 (log=0)
+Stride=0 blocks, Stripe width=0 blocks
+16384 inodes, 65536 blocks
+3276 blocks (5.00%) reserved for the super user
+First data block=1
+Maximum filesystem blocks=67108864
+8 block groups
+8192 blocks per group, 8192 fragments per group
+2048 inodes per group
+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), 3364/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
+Free blocks:              62172
+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:   256
+Mount count:              0
+Check interval:           15552000 (6 months)
+Reserved blocks uid:      0
+Reserved blocks gid:      0
+First inode:              11
+Inode size:	          128
+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-515 (+259)
+  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
+  Reserved GDT blocks at 8195-8449
+  Block bitmap at 8450 (+257), Inode bitmap at 8451 (+258)
+  Inode table at 8452-8707 (+259)
+  7677 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 8708-16384
+  Free inodes: 2049-4096
+Group 2: (Blocks 16385-24576)
+  Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+  Inode table at 16387-16642 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 16643-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-25091 (+259)
+  7677 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 25092-32768
+  Free inodes: 6145-8192
+Group 4: (Blocks 32769-40960)
+  Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+  Inode table at 32771-33026 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 33027-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-41475 (+259)
+  7677 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 41476-49152
+  Free inodes: 10241-12288
+Group 6: (Blocks 49153-57344)
+  Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+  Inode table at 49155-49410 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 49411-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-57859 (+259)
+  7676 free blocks, 2048 free inodes, 0 directories
+  Free blocks: 57860-65535
+  Free inodes: 14337-16384
diff --git a/e2fsprogs/tests/m_std/script b/e2fsprogs/tests/m_std/script
new file mode 100644
index 0000000..a2f2cda
--- /dev/null
+++ b/e2fsprogs/tests/m_std/script
@@ -0,0 +1,3 @@
+DESCRIPTION="standard filesystem options"
+FS_SIZE=65536
+. $cmd_dir/run_mke2fs
diff --git a/e2fsprogs/tests/m_uninit/expect.1 b/e2fsprogs/tests/m_uninit/expect.1
new file mode 100644
index 0000000..3212e10
--- /dev/null
+++ b/e2fsprogs/tests/m_uninit/expect.1
@@ -0,0 +1,166 @@
+Filesystem label=
+OS type: Linux
+Block size=1024 (log=0)
+Fragment size=1024 (log=0)
+Stride=0 blocks, Stripe width=0 blocks
+32768 inodes, 131072 blocks
+6553 blocks (5.00%) reserved for the super user
+First data block=1
+Maximum filesystem blocks=67371008
+16 block groups
+8192 blocks per group, 8192 fragments per group
+2048 inodes per group
+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), 5691/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
+Free blocks:              125381
+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:   256
+Mount count:              0
+Check interval:           15552000 (6 months)
+Reserved blocks uid:      0
+Reserved blocks gid:      0
+First inode:              11
+Inode size:	          128
+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-516 (+260)
+  7662 free blocks, 2037 free inodes, 2 directories, 2037 unused inodes
+  Free blocks: 531-8192
+  Free inodes: 12-2048
+Group 1: (Blocks 8193-16384) [INODE_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-8708 (+260)
+  7676 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+  Free blocks: 8709-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-16642 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+  Free blocks: 16385-24576
+  Free inodes: 4097-6144
+Group 3: (Blocks 24577-32768) [INODE_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-25092 (+260)
+  7676 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+  Free blocks: 25093-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-33026 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+  Free blocks: 32769-40960
+  Free inodes: 8193-10240
+Group 5: (Blocks 40961-49152) [INODE_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-41476 (+260)
+  7676 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+  Free blocks: 41477-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-49410 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+  Free blocks: 49153-57344
+  Free inodes: 12289-14336
+Group 7: (Blocks 57345-65536) [INODE_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-57860 (+260)
+  7676 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+  Free blocks: 57861-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-65794 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+  Free blocks: 65537-73728
+  Free inodes: 16385-18432
+Group 9: (Blocks 73729-81920) [INODE_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-74244 (+260)
+  7676 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+  Free blocks: 74245-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-82178 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+  Free blocks: 81921-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-90370 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+  Free blocks: 90113-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-98562 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+  Free blocks: 98305-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-106754 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+  Free blocks: 106497-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-114946 (+2)
+  7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+  Free blocks: 114689-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-123138 (+2)
+  7933 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+  Free blocks: 123139-131071
+  Free inodes: 30721-32768
diff --git a/e2fsprogs/tests/m_uninit/script b/e2fsprogs/tests/m_uninit/script
new file mode 100644
index 0000000..0b565ac
--- /dev/null
+++ b/e2fsprogs/tests/m_uninit/script
@@ -0,0 +1,4 @@
+DESCRIPTION="uninitialized group feature"
+FS_SIZE=131072
+MKE2FS_OPTS="-O uninit_bg"
+. $cmd_dir/run_mke2fs
diff --git a/e2fsprogs/tests/mke2fs.conf.in b/e2fsprogs/tests/mke2fs.conf.in
new file mode 100644
index 0000000..c06050d
--- /dev/null
+++ b/e2fsprogs/tests/mke2fs.conf.in
@@ -0,0 +1,49 @@
+[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
+
+[fs_types]
+	ext3 = {
+		features = has_journal
+	}
+	ext4 = {
+		features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
+		inode_size = 256
+	}
+	ext4dev = {
+		features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
+		inode_size = 256
+		options = test_fs=1
+	}
+	small = {
+		blocksize = 1024
+		inode_size = 128
+		inode_ratio = 4096
+	}
+	floppy = {
+		blocksize = 1024
+		inode_size = 128
+		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
+	}
diff --git a/e2fsprogs/tests/progs/Makefile.in b/e2fsprogs/tests/progs/Makefile.in
new file mode 100644
index 0000000..37abf23
--- /dev/null
+++ b/e2fsprogs/tests/progs/Makefile.in
@@ -0,0 +1,79 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = tests/progs
+INSTALL = @INSTALL@
+
+@MCONFIG@
+
+MK_CMDS=	_SS_DIR_OVERRIDE=../../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)
+DEPLIBS= $(LIBEXT2FS) $(DEPLIBSS) $(DEPLIBCOM_ERR)
+
+.c.o:
+	$(E) "	CC $<"
+	$(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
+	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+
+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_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/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.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/e2fsprogs/tests/progs/crcsum.c b/e2fsprogs/tests/progs/crcsum.c
new file mode 100644
index 0000000..fd74da0
--- /dev/null
+++ b/e2fsprogs/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 <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 c = fread(buf, 1, sizeof(buf), f);
+
+		if (c)
+			crc = csum_func(crc, buf, c);
+	}
+	printf("%u\n", crc);
+	return 0;
+}
diff --git a/e2fsprogs/tests/progs/hold_inode.c b/e2fsprogs/tests/progs/hold_inode.c
new file mode 100644
index 0000000..debf4a4
--- /dev/null
+++ b/e2fsprogs/tests/progs/hold_inode.c
@@ -0,0 +1,47 @@
+/*
+ * 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 <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/e2fsprogs/tests/progs/random_exercise.c b/e2fsprogs/tests/progs/random_exercise.c
new file mode 100644
index 0000000..0be389f
--- /dev/null
+++ b/e2fsprogs/tests/progs/random_exercise.c
@@ -0,0 +1,170 @@
+/*
+ * 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 <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/e2fsprogs/tests/progs/test_data/bma.setup b/e2fsprogs/tests/progs/test_data/bma.setup
new file mode 100644
index 0000000..f47e511
--- /dev/null
+++ b/e2fsprogs/tests/progs/test_data/bma.setup
@@ -0,0 +1 @@
+-bma_create test 23
diff --git a/e2fsprogs/tests/progs/test_data/expect.brel b/e2fsprogs/tests/progs/test_data/expect.brel
new file mode 100644
index 0000000..0858659
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/progs/test_data/expect.icount b/e2fsprogs/tests/progs/test_data/expect.icount
new file mode 100644
index 0000000..b58a373
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/progs/test_data/expect.irel b/e2fsprogs/tests/progs/test_data/expect.irel
new file mode 100644
index 0000000..8e47938
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/progs/test_data/ima.setup b/e2fsprogs/tests/progs/test_data/ima.setup
new file mode 100644
index 0000000..f411606
--- /dev/null
+++ b/e2fsprogs/tests/progs/test_data/ima.setup
@@ -0,0 +1 @@
+-ima_create test 23
diff --git a/e2fsprogs/tests/progs/test_data/normal.setup b/e2fsprogs/tests/progs/test_data/normal.setup
new file mode 100644
index 0000000..dfc6c41
--- /dev/null
+++ b/e2fsprogs/tests/progs/test_data/normal.setup
@@ -0,0 +1 @@
+-create
diff --git a/e2fsprogs/tests/progs/test_data/opt.setup b/e2fsprogs/tests/progs/test_data/opt.setup
new file mode 100644
index 0000000..79458b0
--- /dev/null
+++ b/e2fsprogs/tests/progs/test_data/opt.setup
@@ -0,0 +1 @@
+-create -i
diff --git a/e2fsprogs/tests/progs/test_data/test.brel b/e2fsprogs/tests/progs/test_data/test.brel
new file mode 100644
index 0000000..6605452
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/progs/test_data/test.icount b/e2fsprogs/tests/progs/test_data/test.icount
new file mode 100644
index 0000000..8cb1955
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/progs/test_data/test.irel b/e2fsprogs/tests/progs/test_data/test.irel
new file mode 100644
index 0000000..6c338bc
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/progs/test_icount.c b/e2fsprogs/tests/progs/test_icount.c
new file mode 100644
index 0000000..017cc4d
--- /dev/null
+++ b/e2fsprogs/tests/progs/test_icount.c
@@ -0,0 +1,362 @@
+/*
+ * 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 <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)
+{
+	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)
+{
+	if (check_icount(argv[0]))
+		return;
+
+	ext2fs_free_icount(test_icount);
+	test_icount = 0;
+}
+
+void do_fetch(int argc, char **argv)
+{
+	const char	*usage = "usage: %s inode\n";
+	errcode_t	retval;
+	ext2_ino_t	ino;
+	__u16		count;
+
+	if (argc < 2) {
+		printf(usage, 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)
+{
+	const char	*usage = "usage: %s inode\n";
+	errcode_t	retval;
+	ext2_ino_t	ino;
+	__u16		count;
+
+	if (argc < 2) {
+		printf(usage, 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)
+{
+	const char	*usage = "usage: %s inode\n";
+	errcode_t	retval;
+	ext2_ino_t	ino;
+	__u16		count;
+
+	if (argc < 2) {
+		printf(usage, 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)
+{
+	const char	*usage = "usage: %s inode count\n";
+	errcode_t	retval;
+	ext2_ino_t	ino;
+	ext2_ino_t	count;
+
+	if (argc < 3) {
+		printf(usage, 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)
+{
+	errcode_t	retval;
+	ext2_ino_t	i;
+	__u16		count;
+
+	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)
+{
+	errcode_t	retval;
+
+	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)
+{
+	ext2_ino_t	size;
+
+	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/e2fsprogs/tests/progs/test_icount.h b/e2fsprogs/tests/progs/test_icount.h
new file mode 100644
index 0000000..59ea1a4
--- /dev/null
+++ b/e2fsprogs/tests/progs/test_icount.h
@@ -0,0 +1,10 @@
+void do_create_icount(int argc, char **argv);
+void do_free_icount(int argc, char **argv);
+void do_fetch(int argc, char **argv);
+void do_increment(int argc, char **argv);
+void do_decrement(int argc, char **argv);
+void do_store(int argc, char **argv);
+void do_get_size(int argc, char **argv);
+void do_dump(int argc, char **argv);
+void do_validate(int argc, char **argv);
+
diff --git a/e2fsprogs/tests/progs/test_icount_cmds.ct b/e2fsprogs/tests/progs/test_icount_cmds.ct
new file mode 100644
index 0000000..c3cc6f4
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/progs/test_rel.c b/e2fsprogs/tests/progs/test_rel.c
new file mode 100644
index 0000000..954a722
--- /dev/null
+++ b/e2fsprogs/tests/progs/test_rel.c
@@ -0,0 +1,763 @@
+/*
+ * 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 <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/e2fsprogs/tests/progs/test_rel.h b/e2fsprogs/tests/progs/test_rel.h
new file mode 100644
index 0000000..47c4d09
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/progs/test_rel_cmds.ct b/e2fsprogs/tests/progs/test_rel_cmds.ct
new file mode 100644
index 0000000..5ed6ae2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/r_1024_small_bg/script b/e2fsprogs/tests/r_1024_small_bg/script
new file mode 100644
index 0000000..fafcf91
--- /dev/null
+++ b/e2fsprogs/tests/r_1024_small_bg/script
@@ -0,0 +1,27 @@
+if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+
+test_description="ext2 1024 blocksize with small block groups"
+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
+
+if resize_test
+then
+	echo "$test_name: $test_description: ok"
+	touch $test_name.ok
+else
+	echo "$test_name: $test_description: failed"
+	touch $test_name.failed
+fi
+
+unset FEATURES SIZE_1 SIZE_2 LOG E2FSCK
+
+else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi 
+
diff --git a/e2fsprogs/tests/r_64bit_big_expand/script b/e2fsprogs/tests/r_64bit_big_expand/script
new file mode 100644
index 0000000..51f36e9
--- /dev/null
+++ b/e2fsprogs/tests/r_64bit_big_expand/script
@@ -0,0 +1,31 @@
+if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+
+test_description="very large fs growth using ext4 w/64bit"
+FEATURES="-t ext4 -O 64bit"
+SIZE_1=512M
+SIZE_2=2T
+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"
+	touch $test_name.ok
+else
+	echo "$test_name: $test_description: failed"
+	touch $test_name.failed
+fi
+
+unset FEATURES SIZE_1 SIZE_2 LOG E2FSCK
+
+else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi 
+
diff --git a/e2fsprogs/tests/r_bigalloc_big_expand/script b/e2fsprogs/tests/r_bigalloc_big_expand/script
new file mode 100644
index 0000000..56c8c15
--- /dev/null
+++ b/e2fsprogs/tests/r_bigalloc_big_expand/script
@@ -0,0 +1,31 @@
+if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+
+test_description="ext4 with bigalloc"
+FEATURES="-t ext4 -O bigalloc"
+SIZE_1=512M
+SIZE_2=2T
+LOG=$test_name.log
+E2FSCK=../e2fsck/e2fsck
+RESIZE2FS_OPTS=-f
+
+. $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"
+	touch $test_name.ok
+else
+	echo "$test_name: $test_description: failed"
+	touch $test_name.failed
+fi
+
+unset FEATURES SIZE_1 SIZE_2 LOG E2FSCK
+
+else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi 
+
diff --git a/e2fsprogs/tests/r_ext4_big_expand/script b/e2fsprogs/tests/r_ext4_big_expand/script
new file mode 100644
index 0000000..a4f8fe6
--- /dev/null
+++ b/e2fsprogs/tests/r_ext4_big_expand/script
@@ -0,0 +1,31 @@
+if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+
+test_description="very large fs growth using ext4"
+FEATURES="-t ext4"
+SIZE_1=512M
+SIZE_2=2T
+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"
+	touch $test_name.ok
+else
+	echo "$test_name: $test_description: failed"
+	touch $test_name.failed
+fi
+
+unset FEATURES SIZE_1 SIZE_2 LOG E2FSCK
+
+else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi 
+
diff --git a/e2fsprogs/tests/r_ext4_small_bg/script b/e2fsprogs/tests/r_ext4_small_bg/script
new file mode 100644
index 0000000..553cbd8
--- /dev/null
+++ b/e2fsprogs/tests/r_ext4_small_bg/script
@@ -0,0 +1,27 @@
+if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+
+test_description="ext4 1024 blocksize with small block groups"
+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
+
+if resize_test
+then
+	echo "$test_name: $test_description: ok"
+	touch $test_name.ok
+else
+	echo "$test_name: $test_description: failed"
+	touch $test_name.failed
+fi
+
+unset FEATURES SIZE_1 SIZE_2 LOG E2FSCK
+
+else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi 
+
diff --git a/e2fsprogs/tests/r_inline_xattr/expect b/e2fsprogs/tests/r_inline_xattr/expect
new file mode 100644
index 0000000..9e71264
--- /dev/null
+++ b/e2fsprogs/tests/r_inline_xattr/expect
@@ -0,0 +1,16 @@
+resize2fs test
+debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''
+Inode: 1550   Type: regular    Mode:  0644   Flags: 0x0
+Extended attributes stored in inode body: 
+  name = "propervalue" (11)
+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 blocks long.
+
+Exit status is 0
+debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''
+Inode: 12   Type: regular    Mode:  0644   Flags: 0x0
+Extended attributes stored in inode body: 
+  name = "propervalue" (11)
+Exit status is 0
diff --git a/e2fsprogs/tests/r_inline_xattr/image.gz b/e2fsprogs/tests/r_inline_xattr/image.gz
new file mode 100644
index 0000000..ead2869
--- /dev/null
+++ b/e2fsprogs/tests/r_inline_xattr/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/r_inline_xattr/name b/e2fsprogs/tests/r_inline_xattr/name
new file mode 100644
index 0000000..97654fb
--- /dev/null
+++ b/e2fsprogs/tests/r_inline_xattr/name
@@ -0,0 +1 @@
+shrinking filesystem with in-inode extended attributes
diff --git a/e2fsprogs/tests/r_inline_xattr/script b/e2fsprogs/tests/r_inline_xattr/script
new file mode 100644
index 0000000..d882587
--- /dev/null
+++ b/e2fsprogs/tests/r_inline_xattr/script
@@ -0,0 +1,53 @@
+if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT=-yf
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+gunzip < $IMAGE > $TMPFILE
+
+echo "resize2fs test" > $OUT
+
+# Look at existing inline extended attribute
+echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''" >> $OUT
+$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|name = " >> $OUT
+status=$?
+echo Exit status is $status >> $OUT
+
+# resize it
+echo "resize2fs test.img 5M" >> $OUT
+$RESIZE2FS $TMPFILE 5M 2>&1 >> $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
+
+# Look at inline extended attribute in resized fs
+echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''" >> $OUT
+$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|name = " >> $OUT
+status=$?
+echo Exit status is $status >> $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
+
+else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi
+
diff --git a/e2fsprogs/tests/r_min_itable/expect b/e2fsprogs/tests/r_min_itable/expect
new file mode 100644
index 0000000..2d8ecb4
--- /dev/null
+++ b/e2fsprogs/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 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/e2fsprogs/tests/r_min_itable/image.gz b/e2fsprogs/tests/r_min_itable/image.gz
new file mode 100644
index 0000000..7c40c56
--- /dev/null
+++ b/e2fsprogs/tests/r_min_itable/image.gz
Binary files differ
diff --git a/e2fsprogs/tests/r_min_itable/name b/e2fsprogs/tests/r_min_itable/name
new file mode 100644
index 0000000..841b043
--- /dev/null
+++ b/e2fsprogs/tests/r_min_itable/name
@@ -0,0 +1 @@
+resize2fs -M with inode table in middle of last block group
diff --git a/e2fsprogs/tests/r_min_itable/script b/e2fsprogs/tests/r_min_itable/script
new file mode 100644
index 0000000..beb6cf9
--- /dev/null
+++ b/e2fsprogs/tests/r_min_itable/script
@@ -0,0 +1,45 @@
+if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT=-yf
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+gunzip < $IMAGE > $TMPFILE
+
+echo "resize2fs test" > $OUT
+
+echo "resize2fs -M test.img" >> $OUT
+$RESIZE2FS -M $TMPFILE 2>&1 >> $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 -e "s;$TMPFILE;test.img;" $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
+
+else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi
+
diff --git a/e2fsprogs/tests/r_move_itable/expect b/e2fsprogs/tests/r_move_itable/expect
new file mode 100644
index 0000000..b4b089b
--- /dev/null
+++ b/e2fsprogs/tests/r_move_itable/expect
@@ -0,0 +1,2612 @@
+mke2fs -q -F -o Linux -b 1024 -g 256 test.img 1024
+resize2fs -p test.img 10000
+Resizing the filesystem on test.img to 10000 (1k) blocks.
+Begin pass 1 (max = 35)
+Extending the inode table     ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+The filesystem on test.img is now 9985 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), 1281/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 resize_inode 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:              8704
+Free inodes:              1237
+First block:              1
+Block size:               1024
+Fragment size:            1024
+Reserved GDT blocks:      126
+Blocks per group:         256
+Fragments per group:      256
+Inodes per group:         32
+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:	          128
+Default directory hash:   half_md4
+
+
+Group 0: (Blocks 1-256)
+  Primary superblock at 1, Group descriptors at 2-3
+  Reserved GDT blocks at 4-129
+  Block bitmap at 130 (+129), Inode bitmap at 131 (+130)
+  Inode table at 132-135 (+131)
+  107 free blocks, 21 free inodes, 2 directories
+  Free blocks: 150-256
+  Free inodes: 12-32
+Group 1: (Blocks 257-512)
+  Backup superblock at 257, Group descriptors at 258-259
+  Reserved GDT blocks at 260-385
+  Block bitmap at 386 (+129), Inode bitmap at 387 (+130)
+  Inode table at 388-391 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 392-512
+  Free inodes: 33-64
+Group 2: (Blocks 513-768)
+  Block bitmap at 513 (+0), Inode bitmap at 514 (+1)
+  Inode table at 515-518 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 519-768
+  Free inodes: 65-96
+Group 3: (Blocks 769-1024)
+  Backup superblock at 769, Group descriptors at 770-771
+  Reserved GDT blocks at 772-897
+  Block bitmap at 898 (+129), Inode bitmap at 899 (+130)
+  Inode table at 900-903 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 904-1024
+  Free inodes: 97-128
+Group 4: (Blocks 1025-1280)
+  Block bitmap at 1025 (+0), Inode bitmap at 1026 (+1)
+  Inode table at 1027-1030 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1031-1280
+  Free inodes: 129-160
+Group 5: (Blocks 1281-1536)
+  Backup superblock at 1281, Group descriptors at 1282-1283
+  Reserved GDT blocks at 1284-1409
+  Block bitmap at 1410 (+129), Inode bitmap at 1411 (+130)
+  Inode table at 1412-1415 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1416-1536
+  Free inodes: 161-192
+Group 6: (Blocks 1537-1792)
+  Block bitmap at 1537 (+0), Inode bitmap at 1538 (+1)
+  Inode table at 1539-1542 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1543-1792
+  Free inodes: 193-224
+Group 7: (Blocks 1793-2048)
+  Backup superblock at 1793, Group descriptors at 1794-1795
+  Reserved GDT blocks at 1796-1921
+  Block bitmap at 1922 (+129), Inode bitmap at 1923 (+130)
+  Inode table at 1924-1927 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1928-2048
+  Free inodes: 225-256
+Group 8: (Blocks 2049-2304)
+  Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+  Inode table at 2051-2054 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2055-2304
+  Free inodes: 257-288
+Group 9: (Blocks 2305-2560)
+  Backup superblock at 2305, Group descriptors at 2306-2307
+  Reserved GDT blocks at 2308-2433
+  Block bitmap at 2434 (+129), Inode bitmap at 2435 (+130)
+  Inode table at 2436-2439 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2440-2560
+  Free inodes: 289-320
+Group 10: (Blocks 2561-2816)
+  Block bitmap at 2561 (+0), Inode bitmap at 2562 (+1)
+  Inode table at 2563-2566 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2567-2816
+  Free inodes: 321-352
+Group 11: (Blocks 2817-3072)
+  Block bitmap at 2817 (+0), Inode bitmap at 2818 (+1)
+  Inode table at 2819-2822 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2823-3072
+  Free inodes: 353-384
+Group 12: (Blocks 3073-3328)
+  Block bitmap at 3073 (+0), Inode bitmap at 3074 (+1)
+  Inode table at 3075-3078 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3079-3328
+  Free inodes: 385-416
+Group 13: (Blocks 3329-3584)
+  Block bitmap at 3329 (+0), Inode bitmap at 3330 (+1)
+  Inode table at 3331-3334 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3335-3584
+  Free inodes: 417-448
+Group 14: (Blocks 3585-3840)
+  Block bitmap at 3585 (+0), Inode bitmap at 3586 (+1)
+  Inode table at 3587-3590 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3591-3840
+  Free inodes: 449-480
+Group 15: (Blocks 3841-4096)
+  Block bitmap at 3841 (+0), Inode bitmap at 3842 (+1)
+  Inode table at 3843-3846 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3847-4096
+  Free inodes: 481-512
+Group 16: (Blocks 4097-4352)
+  Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+  Inode table at 4099-4102 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4103-4352
+  Free inodes: 513-544
+Group 17: (Blocks 4353-4608)
+  Block bitmap at 4353 (+0), Inode bitmap at 4354 (+1)
+  Inode table at 4355-4358 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4359-4608
+  Free inodes: 545-576
+Group 18: (Blocks 4609-4864)
+  Block bitmap at 4609 (+0), Inode bitmap at 4610 (+1)
+  Inode table at 4611-4614 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4615-4864
+  Free inodes: 577-608
+Group 19: (Blocks 4865-5120)
+  Block bitmap at 4865 (+0), Inode bitmap at 4866 (+1)
+  Inode table at 4867-4870 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4871-5120
+  Free inodes: 609-640
+Group 20: (Blocks 5121-5376)
+  Block bitmap at 5121 (+0), Inode bitmap at 5122 (+1)
+  Inode table at 5123-5126 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5127-5376
+  Free inodes: 641-672
+Group 21: (Blocks 5377-5632)
+  Block bitmap at 5377 (+0), Inode bitmap at 5378 (+1)
+  Inode table at 5379-5382 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5383-5632
+  Free inodes: 673-704
+Group 22: (Blocks 5633-5888)
+  Block bitmap at 5633 (+0), Inode bitmap at 5634 (+1)
+  Inode table at 5635-5638 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5639-5888
+  Free inodes: 705-736
+Group 23: (Blocks 5889-6144)
+  Block bitmap at 5889 (+0), Inode bitmap at 5890 (+1)
+  Inode table at 5891-5894 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5895-6144
+  Free inodes: 737-768
+Group 24: (Blocks 6145-6400)
+  Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+  Inode table at 6147-6150 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 6151-6400
+  Free inodes: 769-800
+Group 25: (Blocks 6401-6656)
+  Backup superblock at 6401, Group descriptors at 6402-6403
+  Reserved GDT blocks at 6404-6529
+  Block bitmap at 6530 (+129), Inode bitmap at 6531 (+130)
+  Inode table at 6532-6535 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 6536-6656
+  Free inodes: 801-832
+Group 26: (Blocks 6657-6912)
+  Block bitmap at 6657 (+0), Inode bitmap at 6658 (+1)
+  Inode table at 6659-6662 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 6663-6912
+  Free inodes: 833-864
+Group 27: (Blocks 6913-7168)
+  Backup superblock at 6913, Group descriptors at 6914-6915
+  Reserved GDT blocks at 6916-7041
+  Block bitmap at 7042 (+129), Inode bitmap at 7043 (+130)
+  Inode table at 7044-7047 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7048-7168
+  Free inodes: 865-896
+Group 28: (Blocks 7169-7424)
+  Block bitmap at 7169 (+0), Inode bitmap at 7170 (+1)
+  Inode table at 7171-7174 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7175-7424
+  Free inodes: 897-928
+Group 29: (Blocks 7425-7680)
+  Block bitmap at 7425 (+0), Inode bitmap at 7426 (+1)
+  Inode table at 7427-7430 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7431-7680
+  Free inodes: 929-960
+Group 30: (Blocks 7681-7936)
+  Block bitmap at 7681 (+0), Inode bitmap at 7682 (+1)
+  Inode table at 7683-7686 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7687-7936
+  Free inodes: 961-992
+Group 31: (Blocks 7937-8192)
+  Block bitmap at 7937 (+0), Inode bitmap at 7938 (+1)
+  Inode table at 7939-7942 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7943-8192
+  Free inodes: 993-1024
+Group 32: (Blocks 8193-8448)
+  Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+  Inode table at 8195-8198 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8199-8448
+  Free inodes: 1025-1056
+Group 33: (Blocks 8449-8704)
+  Block bitmap at 8449 (+0), Inode bitmap at 8450 (+1)
+  Inode table at 8451-8454 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8455-8704
+  Free inodes: 1057-1088
+Group 34: (Blocks 8705-8960)
+  Block bitmap at 8705 (+0), Inode bitmap at 8706 (+1)
+  Inode table at 8707-8710 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8711-8960
+  Free inodes: 1089-1120
+Group 35: (Blocks 8961-9216)
+  Block bitmap at 8961 (+0), Inode bitmap at 8962 (+1)
+  Inode table at 8963-8966 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8967-9216
+  Free inodes: 1121-1152
+Group 36: (Blocks 9217-9472)
+  Block bitmap at 9217 (+0), Inode bitmap at 9218 (+1)
+  Inode table at 9219-9222 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 9223-9472
+  Free inodes: 1153-1184
+Group 37: (Blocks 9473-9728)
+  Block bitmap at 9473 (+0), Inode bitmap at 9474 (+1)
+  Inode table at 9475-9478 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 9479-9728
+  Free inodes: 1185-1216
+Group 38: (Blocks 9729-9984)
+  Block bitmap at 9729 (+0), Inode bitmap at 9730 (+1)
+  Inode table at 9731-9734 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 9735-9984
+  Free inodes: 1217-1248
+--------------------------------
+resize2fs -p test.img 20000
+Resizing the filesystem on test.img to 20000 (1k) blocks.
+Begin pass 1 (max = 39)
+Extending the inode table     ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+The filesystem on test.img is now 19969 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 (0.0% non-contiguous), 1644/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 resize_inode 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:              18325
+Free inodes:              2485
+First block:              1
+Block size:               1024
+Fragment size:            1024
+Reserved GDT blocks:      125
+Blocks per group:         256
+Fragments per group:      256
+Inodes per group:         32
+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:	          128
+Default directory hash:   half_md4
+
+
+Group 0: (Blocks 1-256)
+  Primary superblock at 1, Group descriptors at 2-4
+  Reserved GDT blocks at 5-129
+  Block bitmap at 130 (+129), Inode bitmap at 131 (+130)
+  Inode table at 132-135 (+131)
+  107 free blocks, 21 free inodes, 2 directories
+  Free blocks: 150-256
+  Free inodes: 12-32
+Group 1: (Blocks 257-512)
+  Backup superblock at 257, Group descriptors at 258-260
+  Reserved GDT blocks at 261-385
+  Block bitmap at 386 (+129), Inode bitmap at 387 (+130)
+  Inode table at 388-391 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 392-512
+  Free inodes: 33-64
+Group 2: (Blocks 513-768)
+  Block bitmap at 513 (+0), Inode bitmap at 514 (+1)
+  Inode table at 515-518 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 519-768
+  Free inodes: 65-96
+Group 3: (Blocks 769-1024)
+  Backup superblock at 769, Group descriptors at 770-772
+  Reserved GDT blocks at 773-897
+  Block bitmap at 898 (+129), Inode bitmap at 899 (+130)
+  Inode table at 900-903 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 904-1024
+  Free inodes: 97-128
+Group 4: (Blocks 1025-1280)
+  Block bitmap at 1025 (+0), Inode bitmap at 1026 (+1)
+  Inode table at 1027-1030 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1031-1280
+  Free inodes: 129-160
+Group 5: (Blocks 1281-1536)
+  Backup superblock at 1281, Group descriptors at 1282-1284
+  Reserved GDT blocks at 1285-1409
+  Block bitmap at 1410 (+129), Inode bitmap at 1411 (+130)
+  Inode table at 1412-1415 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1416-1536
+  Free inodes: 161-192
+Group 6: (Blocks 1537-1792)
+  Block bitmap at 1537 (+0), Inode bitmap at 1538 (+1)
+  Inode table at 1539-1542 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1543-1792
+  Free inodes: 193-224
+Group 7: (Blocks 1793-2048)
+  Backup superblock at 1793, Group descriptors at 1794-1796
+  Reserved GDT blocks at 1797-1921
+  Block bitmap at 1922 (+129), Inode bitmap at 1923 (+130)
+  Inode table at 1924-1927 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1928-2048
+  Free inodes: 225-256
+Group 8: (Blocks 2049-2304)
+  Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+  Inode table at 2051-2054 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2055-2304
+  Free inodes: 257-288
+Group 9: (Blocks 2305-2560)
+  Backup superblock at 2305, Group descriptors at 2306-2308
+  Reserved GDT blocks at 2309-2433
+  Block bitmap at 2434 (+129), Inode bitmap at 2435 (+130)
+  Inode table at 2436-2439 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2440-2560
+  Free inodes: 289-320
+Group 10: (Blocks 2561-2816)
+  Block bitmap at 2561 (+0), Inode bitmap at 2562 (+1)
+  Inode table at 2563-2566 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2567-2816
+  Free inodes: 321-352
+Group 11: (Blocks 2817-3072)
+  Block bitmap at 2817 (+0), Inode bitmap at 2818 (+1)
+  Inode table at 2819-2822 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2823-3072
+  Free inodes: 353-384
+Group 12: (Blocks 3073-3328)
+  Block bitmap at 3073 (+0), Inode bitmap at 3074 (+1)
+  Inode table at 3075-3078 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3079-3328
+  Free inodes: 385-416
+Group 13: (Blocks 3329-3584)
+  Block bitmap at 3329 (+0), Inode bitmap at 3330 (+1)
+  Inode table at 3331-3334 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3335-3584
+  Free inodes: 417-448
+Group 14: (Blocks 3585-3840)
+  Block bitmap at 3585 (+0), Inode bitmap at 3586 (+1)
+  Inode table at 3587-3590 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3591-3840
+  Free inodes: 449-480
+Group 15: (Blocks 3841-4096)
+  Block bitmap at 3841 (+0), Inode bitmap at 3842 (+1)
+  Inode table at 3843-3846 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3847-4096
+  Free inodes: 481-512
+Group 16: (Blocks 4097-4352)
+  Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+  Inode table at 4099-4102 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4103-4352
+  Free inodes: 513-544
+Group 17: (Blocks 4353-4608)
+  Block bitmap at 4353 (+0), Inode bitmap at 4354 (+1)
+  Inode table at 4355-4358 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4359-4608
+  Free inodes: 545-576
+Group 18: (Blocks 4609-4864)
+  Block bitmap at 4609 (+0), Inode bitmap at 4610 (+1)
+  Inode table at 4611-4614 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4615-4864
+  Free inodes: 577-608
+Group 19: (Blocks 4865-5120)
+  Block bitmap at 4865 (+0), Inode bitmap at 4866 (+1)
+  Inode table at 4867-4870 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4871-5120
+  Free inodes: 609-640
+Group 20: (Blocks 5121-5376)
+  Block bitmap at 5121 (+0), Inode bitmap at 5122 (+1)
+  Inode table at 5123-5126 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5127-5376
+  Free inodes: 641-672
+Group 21: (Blocks 5377-5632)
+  Block bitmap at 5377 (+0), Inode bitmap at 5378 (+1)
+  Inode table at 5379-5382 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5383-5632
+  Free inodes: 673-704
+Group 22: (Blocks 5633-5888)
+  Block bitmap at 5633 (+0), Inode bitmap at 5634 (+1)
+  Inode table at 5635-5638 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5639-5888
+  Free inodes: 705-736
+Group 23: (Blocks 5889-6144)
+  Block bitmap at 5889 (+0), Inode bitmap at 5890 (+1)
+  Inode table at 5891-5894 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5895-6144
+  Free inodes: 737-768
+Group 24: (Blocks 6145-6400)
+  Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+  Inode table at 6147-6150 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 6151-6400
+  Free inodes: 769-800
+Group 25: (Blocks 6401-6656)
+  Backup superblock at 6401, Group descriptors at 6402-6404
+  Reserved GDT blocks at 6405-6529
+  Block bitmap at 6530 (+129), Inode bitmap at 6531 (+130)
+  Inode table at 6532-6535 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 6536-6656
+  Free inodes: 801-832
+Group 26: (Blocks 6657-6912)
+  Block bitmap at 6657 (+0), Inode bitmap at 6658 (+1)
+  Inode table at 6659-6662 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 6663-6912
+  Free inodes: 833-864
+Group 27: (Blocks 6913-7168)
+  Backup superblock at 6913, Group descriptors at 6914-6916
+  Reserved GDT blocks at 6917-7041
+  Block bitmap at 7042 (+129), Inode bitmap at 7043 (+130)
+  Inode table at 7044-7047 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7048-7168
+  Free inodes: 865-896
+Group 28: (Blocks 7169-7424)
+  Block bitmap at 7169 (+0), Inode bitmap at 7170 (+1)
+  Inode table at 7171-7174 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7175-7424
+  Free inodes: 897-928
+Group 29: (Blocks 7425-7680)
+  Block bitmap at 7425 (+0), Inode bitmap at 7426 (+1)
+  Inode table at 7427-7430 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7431-7680
+  Free inodes: 929-960
+Group 30: (Blocks 7681-7936)
+  Block bitmap at 7681 (+0), Inode bitmap at 7682 (+1)
+  Inode table at 7683-7686 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7687-7936
+  Free inodes: 961-992
+Group 31: (Blocks 7937-8192)
+  Block bitmap at 7937 (+0), Inode bitmap at 7938 (+1)
+  Inode table at 7939-7942 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7943-8192
+  Free inodes: 993-1024
+Group 32: (Blocks 8193-8448)
+  Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+  Inode table at 8195-8198 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8199-8448
+  Free inodes: 1025-1056
+Group 33: (Blocks 8449-8704)
+  Block bitmap at 8449 (+0), Inode bitmap at 8450 (+1)
+  Inode table at 8451-8454 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8455-8704
+  Free inodes: 1057-1088
+Group 34: (Blocks 8705-8960)
+  Block bitmap at 8705 (+0), Inode bitmap at 8706 (+1)
+  Inode table at 8707-8710 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8711-8960
+  Free inodes: 1089-1120
+Group 35: (Blocks 8961-9216)
+  Block bitmap at 8961 (+0), Inode bitmap at 8962 (+1)
+  Inode table at 8963-8966 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8967-9216
+  Free inodes: 1121-1152
+Group 36: (Blocks 9217-9472)
+  Block bitmap at 9217 (+0), Inode bitmap at 9218 (+1)
+  Inode table at 9219-9222 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 9223-9472
+  Free inodes: 1153-1184
+Group 37: (Blocks 9473-9728)
+  Block bitmap at 9473 (+0), Inode bitmap at 9474 (+1)
+  Inode table at 9475-9478 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 9479-9728
+  Free inodes: 1185-1216
+Group 38: (Blocks 9729-9984)
+  Block bitmap at 9729 (+0), Inode bitmap at 9730 (+1)
+  Inode table at 9731-9734 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 9735-9984
+  Free inodes: 1217-1248
+Group 39: (Blocks 9985-10240)
+  Block bitmap at 9985 (+0), Inode bitmap at 9986 (+1)
+  Inode table at 9987-9990 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 9991-10240
+  Free inodes: 1249-1280
+Group 40: (Blocks 10241-10496)
+  Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+  Inode table at 10243-10246 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 10247-10496
+  Free inodes: 1281-1312
+Group 41: (Blocks 10497-10752)
+  Block bitmap at 10497 (+0), Inode bitmap at 10498 (+1)
+  Inode table at 10499-10502 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 10503-10752
+  Free inodes: 1313-1344
+Group 42: (Blocks 10753-11008)
+  Block bitmap at 10753 (+0), Inode bitmap at 10754 (+1)
+  Inode table at 10755-10758 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 10759-11008
+  Free inodes: 1345-1376
+Group 43: (Blocks 11009-11264)
+  Block bitmap at 11009 (+0), Inode bitmap at 11010 (+1)
+  Inode table at 11011-11014 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 11015-11264
+  Free inodes: 1377-1408
+Group 44: (Blocks 11265-11520)
+  Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+  Inode table at 11267-11270 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 11271-11520
+  Free inodes: 1409-1440
+Group 45: (Blocks 11521-11776)
+  Block bitmap at 11521 (+0), Inode bitmap at 11522 (+1)
+  Inode table at 11523-11526 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 11527-11776
+  Free inodes: 1441-1472
+Group 46: (Blocks 11777-12032)
+  Block bitmap at 11777 (+0), Inode bitmap at 11778 (+1)
+  Inode table at 11779-11782 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 11783-12032
+  Free inodes: 1473-1504
+Group 47: (Blocks 12033-12288)
+  Block bitmap at 12033 (+0), Inode bitmap at 12034 (+1)
+  Inode table at 12035-12038 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 12039-12288
+  Free inodes: 1505-1536
+Group 48: (Blocks 12289-12544)
+  Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+  Inode table at 12291-12294 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 12295-12544
+  Free inodes: 1537-1568
+Group 49: (Blocks 12545-12800)
+  Backup superblock at 12545, Group descriptors at 12546-12548
+  Reserved GDT blocks at 12549-12673
+  Block bitmap at 12674 (+129), Inode bitmap at 12675 (+130)
+  Inode table at 12676-12679 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 12680-12800
+  Free inodes: 1569-1600
+Group 50: (Blocks 12801-13056)
+  Block bitmap at 12801 (+0), Inode bitmap at 12802 (+1)
+  Inode table at 12803-12806 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 12807-13056
+  Free inodes: 1601-1632
+Group 51: (Blocks 13057-13312)
+  Block bitmap at 13057 (+0), Inode bitmap at 13058 (+1)
+  Inode table at 13059-13062 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 13063-13312
+  Free inodes: 1633-1664
+Group 52: (Blocks 13313-13568)
+  Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+  Inode table at 13315-13318 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 13319-13568
+  Free inodes: 1665-1696
+Group 53: (Blocks 13569-13824)
+  Block bitmap at 13569 (+0), Inode bitmap at 13570 (+1)
+  Inode table at 13571-13574 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 13575-13824
+  Free inodes: 1697-1728
+Group 54: (Blocks 13825-14080)
+  Block bitmap at 13825 (+0), Inode bitmap at 13826 (+1)
+  Inode table at 13827-13830 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 13831-14080
+  Free inodes: 1729-1760
+Group 55: (Blocks 14081-14336)
+  Block bitmap at 14081 (+0), Inode bitmap at 14082 (+1)
+  Inode table at 14083-14086 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 14087-14336
+  Free inodes: 1761-1792
+Group 56: (Blocks 14337-14592)
+  Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+  Inode table at 14339-14342 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 14343-14592
+  Free inodes: 1793-1824
+Group 57: (Blocks 14593-14848)
+  Block bitmap at 14593 (+0), Inode bitmap at 14594 (+1)
+  Inode table at 14595-14598 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 14599-14848
+  Free inodes: 1825-1856
+Group 58: (Blocks 14849-15104)
+  Block bitmap at 14849 (+0), Inode bitmap at 14850 (+1)
+  Inode table at 14851-14854 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 14855-15104
+  Free inodes: 1857-1888
+Group 59: (Blocks 15105-15360)
+  Block bitmap at 15105 (+0), Inode bitmap at 15106 (+1)
+  Inode table at 15107-15110 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 15111-15360
+  Free inodes: 1889-1920
+Group 60: (Blocks 15361-15616)
+  Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+  Inode table at 15363-15366 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 15367-15616
+  Free inodes: 1921-1952
+Group 61: (Blocks 15617-15872)
+  Block bitmap at 15617 (+0), Inode bitmap at 15618 (+1)
+  Inode table at 15619-15622 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 15623-15872
+  Free inodes: 1953-1984
+Group 62: (Blocks 15873-16128)
+  Block bitmap at 15873 (+0), Inode bitmap at 15874 (+1)
+  Inode table at 15875-15878 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 15879-16128
+  Free inodes: 1985-2016
+Group 63: (Blocks 16129-16384)
+  Block bitmap at 16129 (+0), Inode bitmap at 16130 (+1)
+  Inode table at 16131-16134 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 16135-16384
+  Free inodes: 2017-2048
+Group 64: (Blocks 16385-16640)
+  Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+  Inode table at 16387-16390 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 16391-16640
+  Free inodes: 2049-2080
+Group 65: (Blocks 16641-16896)
+  Block bitmap at 16641 (+0), Inode bitmap at 16642 (+1)
+  Inode table at 16643-16646 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 16647-16896
+  Free inodes: 2081-2112
+Group 66: (Blocks 16897-17152)
+  Block bitmap at 16897 (+0), Inode bitmap at 16898 (+1)
+  Inode table at 16899-16902 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 16903-17152
+  Free inodes: 2113-2144
+Group 67: (Blocks 17153-17408)
+  Block bitmap at 17153 (+0), Inode bitmap at 17154 (+1)
+  Inode table at 17155-17158 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 17159-17408
+  Free inodes: 2145-2176
+Group 68: (Blocks 17409-17664)
+  Block bitmap at 17409 (+0), Inode bitmap at 17410 (+1)
+  Inode table at 17411-17414 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 17415-17664
+  Free inodes: 2177-2208
+Group 69: (Blocks 17665-17920)
+  Block bitmap at 17665 (+0), Inode bitmap at 17666 (+1)
+  Inode table at 17667-17670 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 17671-17920
+  Free inodes: 2209-2240
+Group 70: (Blocks 17921-18176)
+  Block bitmap at 17921 (+0), Inode bitmap at 17922 (+1)
+  Inode table at 17923-17926 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 17927-18176
+  Free inodes: 2241-2272
+Group 71: (Blocks 18177-18432)
+  Block bitmap at 18177 (+0), Inode bitmap at 18178 (+1)
+  Inode table at 18179-18182 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 18183-18432
+  Free inodes: 2273-2304
+Group 72: (Blocks 18433-18688)
+  Block bitmap at 18433 (+0), Inode bitmap at 18434 (+1)
+  Inode table at 18435-18438 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 18439-18688
+  Free inodes: 2305-2336
+Group 73: (Blocks 18689-18944)
+  Block bitmap at 18689 (+0), Inode bitmap at 18690 (+1)
+  Inode table at 18691-18694 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 18695-18944
+  Free inodes: 2337-2368
+Group 74: (Blocks 18945-19200)
+  Block bitmap at 18945 (+0), Inode bitmap at 18946 (+1)
+  Inode table at 18947-18950 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 18951-19200
+  Free inodes: 2369-2400
+Group 75: (Blocks 19201-19456)
+  Block bitmap at 19201 (+0), Inode bitmap at 19202 (+1)
+  Inode table at 19203-19206 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 19207-19456
+  Free inodes: 2401-2432
+Group 76: (Blocks 19457-19712)
+  Block bitmap at 19457 (+0), Inode bitmap at 19458 (+1)
+  Inode table at 19459-19462 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 19463-19712
+  Free inodes: 2433-2464
+Group 77: (Blocks 19713-19968)
+  Block bitmap at 19713 (+0), Inode bitmap at 19714 (+1)
+  Inode table at 19715-19718 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 19719-19968
+  Free inodes: 2465-2496
+--------------------------------
+resize2fs -p test.img 30000
+Resizing the filesystem on test.img to 30000 (1k) blocks.
+Begin pass 1 (max = 39)
+Extending the inode table     ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+The filesystem on test.img is now 29953 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 (0.0% non-contiguous), 2007/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 resize_inode 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:              27946
+Free inodes:              3733
+First block:              1
+Block size:               1024
+Fragment size:            1024
+Reserved GDT blocks:      124
+Blocks per group:         256
+Fragments per group:      256
+Inodes per group:         32
+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:	          128
+Default directory hash:   half_md4
+
+
+Group 0: (Blocks 1-256)
+  Primary superblock at 1, Group descriptors at 2-5
+  Reserved GDT blocks at 6-129
+  Block bitmap at 130 (+129), Inode bitmap at 131 (+130)
+  Inode table at 132-135 (+131)
+  107 free blocks, 21 free inodes, 2 directories
+  Free blocks: 150-256
+  Free inodes: 12-32
+Group 1: (Blocks 257-512)
+  Backup superblock at 257, Group descriptors at 258-261
+  Reserved GDT blocks at 262-385
+  Block bitmap at 386 (+129), Inode bitmap at 387 (+130)
+  Inode table at 388-391 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 392-512
+  Free inodes: 33-64
+Group 2: (Blocks 513-768)
+  Block bitmap at 513 (+0), Inode bitmap at 514 (+1)
+  Inode table at 515-518 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 519-768
+  Free inodes: 65-96
+Group 3: (Blocks 769-1024)
+  Backup superblock at 769, Group descriptors at 770-773
+  Reserved GDT blocks at 774-897
+  Block bitmap at 898 (+129), Inode bitmap at 899 (+130)
+  Inode table at 900-903 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 904-1024
+  Free inodes: 97-128
+Group 4: (Blocks 1025-1280)
+  Block bitmap at 1025 (+0), Inode bitmap at 1026 (+1)
+  Inode table at 1027-1030 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1031-1280
+  Free inodes: 129-160
+Group 5: (Blocks 1281-1536)
+  Backup superblock at 1281, Group descriptors at 1282-1285
+  Reserved GDT blocks at 1286-1409
+  Block bitmap at 1410 (+129), Inode bitmap at 1411 (+130)
+  Inode table at 1412-1415 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1416-1536
+  Free inodes: 161-192
+Group 6: (Blocks 1537-1792)
+  Block bitmap at 1537 (+0), Inode bitmap at 1538 (+1)
+  Inode table at 1539-1542 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1543-1792
+  Free inodes: 193-224
+Group 7: (Blocks 1793-2048)
+  Backup superblock at 1793, Group descriptors at 1794-1797
+  Reserved GDT blocks at 1798-1921
+  Block bitmap at 1922 (+129), Inode bitmap at 1923 (+130)
+  Inode table at 1924-1927 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1928-2048
+  Free inodes: 225-256
+Group 8: (Blocks 2049-2304)
+  Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+  Inode table at 2051-2054 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2055-2304
+  Free inodes: 257-288
+Group 9: (Blocks 2305-2560)
+  Backup superblock at 2305, Group descriptors at 2306-2309
+  Reserved GDT blocks at 2310-2433
+  Block bitmap at 2434 (+129), Inode bitmap at 2435 (+130)
+  Inode table at 2436-2439 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2440-2560
+  Free inodes: 289-320
+Group 10: (Blocks 2561-2816)
+  Block bitmap at 2561 (+0), Inode bitmap at 2562 (+1)
+  Inode table at 2563-2566 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2567-2816
+  Free inodes: 321-352
+Group 11: (Blocks 2817-3072)
+  Block bitmap at 2817 (+0), Inode bitmap at 2818 (+1)
+  Inode table at 2819-2822 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2823-3072
+  Free inodes: 353-384
+Group 12: (Blocks 3073-3328)
+  Block bitmap at 3073 (+0), Inode bitmap at 3074 (+1)
+  Inode table at 3075-3078 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3079-3328
+  Free inodes: 385-416
+Group 13: (Blocks 3329-3584)
+  Block bitmap at 3329 (+0), Inode bitmap at 3330 (+1)
+  Inode table at 3331-3334 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3335-3584
+  Free inodes: 417-448
+Group 14: (Blocks 3585-3840)
+  Block bitmap at 3585 (+0), Inode bitmap at 3586 (+1)
+  Inode table at 3587-3590 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3591-3840
+  Free inodes: 449-480
+Group 15: (Blocks 3841-4096)
+  Block bitmap at 3841 (+0), Inode bitmap at 3842 (+1)
+  Inode table at 3843-3846 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3847-4096
+  Free inodes: 481-512
+Group 16: (Blocks 4097-4352)
+  Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+  Inode table at 4099-4102 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4103-4352
+  Free inodes: 513-544
+Group 17: (Blocks 4353-4608)
+  Block bitmap at 4353 (+0), Inode bitmap at 4354 (+1)
+  Inode table at 4355-4358 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4359-4608
+  Free inodes: 545-576
+Group 18: (Blocks 4609-4864)
+  Block bitmap at 4609 (+0), Inode bitmap at 4610 (+1)
+  Inode table at 4611-4614 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4615-4864
+  Free inodes: 577-608
+Group 19: (Blocks 4865-5120)
+  Block bitmap at 4865 (+0), Inode bitmap at 4866 (+1)
+  Inode table at 4867-4870 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4871-5120
+  Free inodes: 609-640
+Group 20: (Blocks 5121-5376)
+  Block bitmap at 5121 (+0), Inode bitmap at 5122 (+1)
+  Inode table at 5123-5126 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5127-5376
+  Free inodes: 641-672
+Group 21: (Blocks 5377-5632)
+  Block bitmap at 5377 (+0), Inode bitmap at 5378 (+1)
+  Inode table at 5379-5382 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5383-5632
+  Free inodes: 673-704
+Group 22: (Blocks 5633-5888)
+  Block bitmap at 5633 (+0), Inode bitmap at 5634 (+1)
+  Inode table at 5635-5638 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5639-5888
+  Free inodes: 705-736
+Group 23: (Blocks 5889-6144)
+  Block bitmap at 5889 (+0), Inode bitmap at 5890 (+1)
+  Inode table at 5891-5894 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5895-6144
+  Free inodes: 737-768
+Group 24: (Blocks 6145-6400)
+  Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+  Inode table at 6147-6150 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 6151-6400
+  Free inodes: 769-800
+Group 25: (Blocks 6401-6656)
+  Backup superblock at 6401, Group descriptors at 6402-6405
+  Reserved GDT blocks at 6406-6529
+  Block bitmap at 6530 (+129), Inode bitmap at 6531 (+130)
+  Inode table at 6532-6535 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 6536-6656
+  Free inodes: 801-832
+Group 26: (Blocks 6657-6912)
+  Block bitmap at 6657 (+0), Inode bitmap at 6658 (+1)
+  Inode table at 6659-6662 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 6663-6912
+  Free inodes: 833-864
+Group 27: (Blocks 6913-7168)
+  Backup superblock at 6913, Group descriptors at 6914-6917
+  Reserved GDT blocks at 6918-7041
+  Block bitmap at 7042 (+129), Inode bitmap at 7043 (+130)
+  Inode table at 7044-7047 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7048-7168
+  Free inodes: 865-896
+Group 28: (Blocks 7169-7424)
+  Block bitmap at 7169 (+0), Inode bitmap at 7170 (+1)
+  Inode table at 7171-7174 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7175-7424
+  Free inodes: 897-928
+Group 29: (Blocks 7425-7680)
+  Block bitmap at 7425 (+0), Inode bitmap at 7426 (+1)
+  Inode table at 7427-7430 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7431-7680
+  Free inodes: 929-960
+Group 30: (Blocks 7681-7936)
+  Block bitmap at 7681 (+0), Inode bitmap at 7682 (+1)
+  Inode table at 7683-7686 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7687-7936
+  Free inodes: 961-992
+Group 31: (Blocks 7937-8192)
+  Block bitmap at 7937 (+0), Inode bitmap at 7938 (+1)
+  Inode table at 7939-7942 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7943-8192
+  Free inodes: 993-1024
+Group 32: (Blocks 8193-8448)
+  Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+  Inode table at 8195-8198 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8199-8448
+  Free inodes: 1025-1056
+Group 33: (Blocks 8449-8704)
+  Block bitmap at 8449 (+0), Inode bitmap at 8450 (+1)
+  Inode table at 8451-8454 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8455-8704
+  Free inodes: 1057-1088
+Group 34: (Blocks 8705-8960)
+  Block bitmap at 8705 (+0), Inode bitmap at 8706 (+1)
+  Inode table at 8707-8710 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8711-8960
+  Free inodes: 1089-1120
+Group 35: (Blocks 8961-9216)
+  Block bitmap at 8961 (+0), Inode bitmap at 8962 (+1)
+  Inode table at 8963-8966 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8967-9216
+  Free inodes: 1121-1152
+Group 36: (Blocks 9217-9472)
+  Block bitmap at 9217 (+0), Inode bitmap at 9218 (+1)
+  Inode table at 9219-9222 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 9223-9472
+  Free inodes: 1153-1184
+Group 37: (Blocks 9473-9728)
+  Block bitmap at 9473 (+0), Inode bitmap at 9474 (+1)
+  Inode table at 9475-9478 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 9479-9728
+  Free inodes: 1185-1216
+Group 38: (Blocks 9729-9984)
+  Block bitmap at 9729 (+0), Inode bitmap at 9730 (+1)
+  Inode table at 9731-9734 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 9735-9984
+  Free inodes: 1217-1248
+Group 39: (Blocks 9985-10240)
+  Block bitmap at 9985 (+0), Inode bitmap at 9986 (+1)
+  Inode table at 9987-9990 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 9991-10240
+  Free inodes: 1249-1280
+Group 40: (Blocks 10241-10496)
+  Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+  Inode table at 10243-10246 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 10247-10496
+  Free inodes: 1281-1312
+Group 41: (Blocks 10497-10752)
+  Block bitmap at 10497 (+0), Inode bitmap at 10498 (+1)
+  Inode table at 10499-10502 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 10503-10752
+  Free inodes: 1313-1344
+Group 42: (Blocks 10753-11008)
+  Block bitmap at 10753 (+0), Inode bitmap at 10754 (+1)
+  Inode table at 10755-10758 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 10759-11008
+  Free inodes: 1345-1376
+Group 43: (Blocks 11009-11264)
+  Block bitmap at 11009 (+0), Inode bitmap at 11010 (+1)
+  Inode table at 11011-11014 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 11015-11264
+  Free inodes: 1377-1408
+Group 44: (Blocks 11265-11520)
+  Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+  Inode table at 11267-11270 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 11271-11520
+  Free inodes: 1409-1440
+Group 45: (Blocks 11521-11776)
+  Block bitmap at 11521 (+0), Inode bitmap at 11522 (+1)
+  Inode table at 11523-11526 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 11527-11776
+  Free inodes: 1441-1472
+Group 46: (Blocks 11777-12032)
+  Block bitmap at 11777 (+0), Inode bitmap at 11778 (+1)
+  Inode table at 11779-11782 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 11783-12032
+  Free inodes: 1473-1504
+Group 47: (Blocks 12033-12288)
+  Block bitmap at 12033 (+0), Inode bitmap at 12034 (+1)
+  Inode table at 12035-12038 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 12039-12288
+  Free inodes: 1505-1536
+Group 48: (Blocks 12289-12544)
+  Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+  Inode table at 12291-12294 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 12295-12544
+  Free inodes: 1537-1568
+Group 49: (Blocks 12545-12800)
+  Backup superblock at 12545, Group descriptors at 12546-12549
+  Reserved GDT blocks at 12550-12673
+  Block bitmap at 12674 (+129), Inode bitmap at 12675 (+130)
+  Inode table at 12676-12679 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 12680-12800
+  Free inodes: 1569-1600
+Group 50: (Blocks 12801-13056)
+  Block bitmap at 12801 (+0), Inode bitmap at 12802 (+1)
+  Inode table at 12803-12806 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 12807-13056
+  Free inodes: 1601-1632
+Group 51: (Blocks 13057-13312)
+  Block bitmap at 13057 (+0), Inode bitmap at 13058 (+1)
+  Inode table at 13059-13062 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 13063-13312
+  Free inodes: 1633-1664
+Group 52: (Blocks 13313-13568)
+  Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+  Inode table at 13315-13318 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 13319-13568
+  Free inodes: 1665-1696
+Group 53: (Blocks 13569-13824)
+  Block bitmap at 13569 (+0), Inode bitmap at 13570 (+1)
+  Inode table at 13571-13574 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 13575-13824
+  Free inodes: 1697-1728
+Group 54: (Blocks 13825-14080)
+  Block bitmap at 13825 (+0), Inode bitmap at 13826 (+1)
+  Inode table at 13827-13830 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 13831-14080
+  Free inodes: 1729-1760
+Group 55: (Blocks 14081-14336)
+  Block bitmap at 14081 (+0), Inode bitmap at 14082 (+1)
+  Inode table at 14083-14086 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 14087-14336
+  Free inodes: 1761-1792
+Group 56: (Blocks 14337-14592)
+  Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+  Inode table at 14339-14342 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 14343-14592
+  Free inodes: 1793-1824
+Group 57: (Blocks 14593-14848)
+  Block bitmap at 14593 (+0), Inode bitmap at 14594 (+1)
+  Inode table at 14595-14598 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 14599-14848
+  Free inodes: 1825-1856
+Group 58: (Blocks 14849-15104)
+  Block bitmap at 14849 (+0), Inode bitmap at 14850 (+1)
+  Inode table at 14851-14854 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 14855-15104
+  Free inodes: 1857-1888
+Group 59: (Blocks 15105-15360)
+  Block bitmap at 15105 (+0), Inode bitmap at 15106 (+1)
+  Inode table at 15107-15110 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 15111-15360
+  Free inodes: 1889-1920
+Group 60: (Blocks 15361-15616)
+  Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+  Inode table at 15363-15366 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 15367-15616
+  Free inodes: 1921-1952
+Group 61: (Blocks 15617-15872)
+  Block bitmap at 15617 (+0), Inode bitmap at 15618 (+1)
+  Inode table at 15619-15622 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 15623-15872
+  Free inodes: 1953-1984
+Group 62: (Blocks 15873-16128)
+  Block bitmap at 15873 (+0), Inode bitmap at 15874 (+1)
+  Inode table at 15875-15878 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 15879-16128
+  Free inodes: 1985-2016
+Group 63: (Blocks 16129-16384)
+  Block bitmap at 16129 (+0), Inode bitmap at 16130 (+1)
+  Inode table at 16131-16134 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 16135-16384
+  Free inodes: 2017-2048
+Group 64: (Blocks 16385-16640)
+  Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+  Inode table at 16387-16390 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 16391-16640
+  Free inodes: 2049-2080
+Group 65: (Blocks 16641-16896)
+  Block bitmap at 16641 (+0), Inode bitmap at 16642 (+1)
+  Inode table at 16643-16646 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 16647-16896
+  Free inodes: 2081-2112
+Group 66: (Blocks 16897-17152)
+  Block bitmap at 16897 (+0), Inode bitmap at 16898 (+1)
+  Inode table at 16899-16902 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 16903-17152
+  Free inodes: 2113-2144
+Group 67: (Blocks 17153-17408)
+  Block bitmap at 17153 (+0), Inode bitmap at 17154 (+1)
+  Inode table at 17155-17158 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 17159-17408
+  Free inodes: 2145-2176
+Group 68: (Blocks 17409-17664)
+  Block bitmap at 17409 (+0), Inode bitmap at 17410 (+1)
+  Inode table at 17411-17414 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 17415-17664
+  Free inodes: 2177-2208
+Group 69: (Blocks 17665-17920)
+  Block bitmap at 17665 (+0), Inode bitmap at 17666 (+1)
+  Inode table at 17667-17670 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 17671-17920
+  Free inodes: 2209-2240
+Group 70: (Blocks 17921-18176)
+  Block bitmap at 17921 (+0), Inode bitmap at 17922 (+1)
+  Inode table at 17923-17926 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 17927-18176
+  Free inodes: 2241-2272
+Group 71: (Blocks 18177-18432)
+  Block bitmap at 18177 (+0), Inode bitmap at 18178 (+1)
+  Inode table at 18179-18182 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 18183-18432
+  Free inodes: 2273-2304
+Group 72: (Blocks 18433-18688)
+  Block bitmap at 18433 (+0), Inode bitmap at 18434 (+1)
+  Inode table at 18435-18438 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 18439-18688
+  Free inodes: 2305-2336
+Group 73: (Blocks 18689-18944)
+  Block bitmap at 18689 (+0), Inode bitmap at 18690 (+1)
+  Inode table at 18691-18694 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 18695-18944
+  Free inodes: 2337-2368
+Group 74: (Blocks 18945-19200)
+  Block bitmap at 18945 (+0), Inode bitmap at 18946 (+1)
+  Inode table at 18947-18950 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 18951-19200
+  Free inodes: 2369-2400
+Group 75: (Blocks 19201-19456)
+  Block bitmap at 19201 (+0), Inode bitmap at 19202 (+1)
+  Inode table at 19203-19206 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 19207-19456
+  Free inodes: 2401-2432
+Group 76: (Blocks 19457-19712)
+  Block bitmap at 19457 (+0), Inode bitmap at 19458 (+1)
+  Inode table at 19459-19462 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 19463-19712
+  Free inodes: 2433-2464
+Group 77: (Blocks 19713-19968)
+  Block bitmap at 19713 (+0), Inode bitmap at 19714 (+1)
+  Inode table at 19715-19718 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 19719-19968
+  Free inodes: 2465-2496
+Group 78: (Blocks 19969-20224)
+  Block bitmap at 19969 (+0), Inode bitmap at 19970 (+1)
+  Inode table at 19971-19974 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 19975-20224
+  Free inodes: 2497-2528
+Group 79: (Blocks 20225-20480)
+  Block bitmap at 20225 (+0), Inode bitmap at 20226 (+1)
+  Inode table at 20227-20230 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 20231-20480
+  Free inodes: 2529-2560
+Group 80: (Blocks 20481-20736)
+  Block bitmap at 20481 (+0), Inode bitmap at 20482 (+1)
+  Inode table at 20483-20486 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 20487-20736
+  Free inodes: 2561-2592
+Group 81: (Blocks 20737-20992)
+  Backup superblock at 20737, Group descriptors at 20738-20741
+  Reserved GDT blocks at 20742-20865
+  Block bitmap at 20866 (+129), Inode bitmap at 20867 (+130)
+  Inode table at 20868-20871 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 20872-20992
+  Free inodes: 2593-2624
+Group 82: (Blocks 20993-21248)
+  Block bitmap at 20993 (+0), Inode bitmap at 20994 (+1)
+  Inode table at 20995-20998 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 20999-21248
+  Free inodes: 2625-2656
+Group 83: (Blocks 21249-21504)
+  Block bitmap at 21249 (+0), Inode bitmap at 21250 (+1)
+  Inode table at 21251-21254 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 21255-21504
+  Free inodes: 2657-2688
+Group 84: (Blocks 21505-21760)
+  Block bitmap at 21505 (+0), Inode bitmap at 21506 (+1)
+  Inode table at 21507-21510 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 21511-21760
+  Free inodes: 2689-2720
+Group 85: (Blocks 21761-22016)
+  Block bitmap at 21761 (+0), Inode bitmap at 21762 (+1)
+  Inode table at 21763-21766 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 21767-22016
+  Free inodes: 2721-2752
+Group 86: (Blocks 22017-22272)
+  Block bitmap at 22017 (+0), Inode bitmap at 22018 (+1)
+  Inode table at 22019-22022 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 22023-22272
+  Free inodes: 2753-2784
+Group 87: (Blocks 22273-22528)
+  Block bitmap at 22273 (+0), Inode bitmap at 22274 (+1)
+  Inode table at 22275-22278 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 22279-22528
+  Free inodes: 2785-2816
+Group 88: (Blocks 22529-22784)
+  Block bitmap at 22529 (+0), Inode bitmap at 22530 (+1)
+  Inode table at 22531-22534 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 22535-22784
+  Free inodes: 2817-2848
+Group 89: (Blocks 22785-23040)
+  Block bitmap at 22785 (+0), Inode bitmap at 22786 (+1)
+  Inode table at 22787-22790 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 22791-23040
+  Free inodes: 2849-2880
+Group 90: (Blocks 23041-23296)
+  Block bitmap at 23041 (+0), Inode bitmap at 23042 (+1)
+  Inode table at 23043-23046 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 23047-23296
+  Free inodes: 2881-2912
+Group 91: (Blocks 23297-23552)
+  Block bitmap at 23297 (+0), Inode bitmap at 23298 (+1)
+  Inode table at 23299-23302 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 23303-23552
+  Free inodes: 2913-2944
+Group 92: (Blocks 23553-23808)
+  Block bitmap at 23553 (+0), Inode bitmap at 23554 (+1)
+  Inode table at 23555-23558 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 23559-23808
+  Free inodes: 2945-2976
+Group 93: (Blocks 23809-24064)
+  Block bitmap at 23809 (+0), Inode bitmap at 23810 (+1)
+  Inode table at 23811-23814 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 23815-24064
+  Free inodes: 2977-3008
+Group 94: (Blocks 24065-24320)
+  Block bitmap at 24065 (+0), Inode bitmap at 24066 (+1)
+  Inode table at 24067-24070 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 24071-24320
+  Free inodes: 3009-3040
+Group 95: (Blocks 24321-24576)
+  Block bitmap at 24321 (+0), Inode bitmap at 24322 (+1)
+  Inode table at 24323-24326 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 24327-24576
+  Free inodes: 3041-3072
+Group 96: (Blocks 24577-24832)
+  Block bitmap at 24577 (+0), Inode bitmap at 24578 (+1)
+  Inode table at 24579-24582 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 24583-24832
+  Free inodes: 3073-3104
+Group 97: (Blocks 24833-25088)
+  Block bitmap at 24833 (+0), Inode bitmap at 24834 (+1)
+  Inode table at 24835-24838 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 24839-25088
+  Free inodes: 3105-3136
+Group 98: (Blocks 25089-25344)
+  Block bitmap at 25089 (+0), Inode bitmap at 25090 (+1)
+  Inode table at 25091-25094 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 25095-25344
+  Free inodes: 3137-3168
+Group 99: (Blocks 25345-25600)
+  Block bitmap at 25345 (+0), Inode bitmap at 25346 (+1)
+  Inode table at 25347-25350 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 25351-25600
+  Free inodes: 3169-3200
+Group 100: (Blocks 25601-25856)
+  Block bitmap at 25601 (+0), Inode bitmap at 25602 (+1)
+  Inode table at 25603-25606 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 25607-25856
+  Free inodes: 3201-3232
+Group 101: (Blocks 25857-26112)
+  Block bitmap at 25857 (+0), Inode bitmap at 25858 (+1)
+  Inode table at 25859-25862 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 25863-26112
+  Free inodes: 3233-3264
+Group 102: (Blocks 26113-26368)
+  Block bitmap at 26113 (+0), Inode bitmap at 26114 (+1)
+  Inode table at 26115-26118 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 26119-26368
+  Free inodes: 3265-3296
+Group 103: (Blocks 26369-26624)
+  Block bitmap at 26369 (+0), Inode bitmap at 26370 (+1)
+  Inode table at 26371-26374 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 26375-26624
+  Free inodes: 3297-3328
+Group 104: (Blocks 26625-26880)
+  Block bitmap at 26625 (+0), Inode bitmap at 26626 (+1)
+  Inode table at 26627-26630 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 26631-26880
+  Free inodes: 3329-3360
+Group 105: (Blocks 26881-27136)
+  Block bitmap at 26881 (+0), Inode bitmap at 26882 (+1)
+  Inode table at 26883-26886 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 26887-27136
+  Free inodes: 3361-3392
+Group 106: (Blocks 27137-27392)
+  Block bitmap at 27137 (+0), Inode bitmap at 27138 (+1)
+  Inode table at 27139-27142 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 27143-27392
+  Free inodes: 3393-3424
+Group 107: (Blocks 27393-27648)
+  Block bitmap at 27393 (+0), Inode bitmap at 27394 (+1)
+  Inode table at 27395-27398 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 27399-27648
+  Free inodes: 3425-3456
+Group 108: (Blocks 27649-27904)
+  Block bitmap at 27649 (+0), Inode bitmap at 27650 (+1)
+  Inode table at 27651-27654 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 27655-27904
+  Free inodes: 3457-3488
+Group 109: (Blocks 27905-28160)
+  Block bitmap at 27905 (+0), Inode bitmap at 27906 (+1)
+  Inode table at 27907-27910 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 27911-28160
+  Free inodes: 3489-3520
+Group 110: (Blocks 28161-28416)
+  Block bitmap at 28161 (+0), Inode bitmap at 28162 (+1)
+  Inode table at 28163-28166 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 28167-28416
+  Free inodes: 3521-3552
+Group 111: (Blocks 28417-28672)
+  Block bitmap at 28417 (+0), Inode bitmap at 28418 (+1)
+  Inode table at 28419-28422 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 28423-28672
+  Free inodes: 3553-3584
+Group 112: (Blocks 28673-28928)
+  Block bitmap at 28673 (+0), Inode bitmap at 28674 (+1)
+  Inode table at 28675-28678 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 28679-28928
+  Free inodes: 3585-3616
+Group 113: (Blocks 28929-29184)
+  Block bitmap at 28929 (+0), Inode bitmap at 28930 (+1)
+  Inode table at 28931-28934 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 28935-29184
+  Free inodes: 3617-3648
+Group 114: (Blocks 29185-29440)
+  Block bitmap at 29185 (+0), Inode bitmap at 29186 (+1)
+  Inode table at 29187-29190 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 29191-29440
+  Free inodes: 3649-3680
+Group 115: (Blocks 29441-29696)
+  Block bitmap at 29441 (+0), Inode bitmap at 29442 (+1)
+  Inode table at 29443-29446 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 29447-29696
+  Free inodes: 3681-3712
+Group 116: (Blocks 29697-29952)
+  Block bitmap at 29697 (+0), Inode bitmap at 29698 (+1)
+  Inode table at 29699-29702 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 29703-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
+The filesystem on test.img is now 40000 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 (0.0% non-contiguous), 2376/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 resize_inode 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:              37624
+Free inodes:              5013
+First block:              1
+Block size:               1024
+Fragment size:            1024
+Reserved GDT blocks:      123
+Blocks per group:         256
+Fragments per group:      256
+Inodes per group:         32
+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:	          128
+Default directory hash:   half_md4
+
+
+Group 0: (Blocks 1-256)
+  Primary superblock at 1, Group descriptors at 2-6
+  Reserved GDT blocks at 7-129
+  Block bitmap at 130 (+129), Inode bitmap at 131 (+130)
+  Inode table at 132-135 (+131)
+  107 free blocks, 21 free inodes, 2 directories
+  Free blocks: 150-256
+  Free inodes: 12-32
+Group 1: (Blocks 257-512)
+  Backup superblock at 257, Group descriptors at 258-262
+  Reserved GDT blocks at 263-385
+  Block bitmap at 386 (+129), Inode bitmap at 387 (+130)
+  Inode table at 388-391 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 392-512
+  Free inodes: 33-64
+Group 2: (Blocks 513-768)
+  Block bitmap at 513 (+0), Inode bitmap at 514 (+1)
+  Inode table at 515-518 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 519-768
+  Free inodes: 65-96
+Group 3: (Blocks 769-1024)
+  Backup superblock at 769, Group descriptors at 770-774
+  Reserved GDT blocks at 775-897
+  Block bitmap at 898 (+129), Inode bitmap at 899 (+130)
+  Inode table at 900-903 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 904-1024
+  Free inodes: 97-128
+Group 4: (Blocks 1025-1280)
+  Block bitmap at 1025 (+0), Inode bitmap at 1026 (+1)
+  Inode table at 1027-1030 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1031-1280
+  Free inodes: 129-160
+Group 5: (Blocks 1281-1536)
+  Backup superblock at 1281, Group descriptors at 1282-1286
+  Reserved GDT blocks at 1287-1409
+  Block bitmap at 1410 (+129), Inode bitmap at 1411 (+130)
+  Inode table at 1412-1415 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1416-1536
+  Free inodes: 161-192
+Group 6: (Blocks 1537-1792)
+  Block bitmap at 1537 (+0), Inode bitmap at 1538 (+1)
+  Inode table at 1539-1542 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1543-1792
+  Free inodes: 193-224
+Group 7: (Blocks 1793-2048)
+  Backup superblock at 1793, Group descriptors at 1794-1798
+  Reserved GDT blocks at 1799-1921
+  Block bitmap at 1922 (+129), Inode bitmap at 1923 (+130)
+  Inode table at 1924-1927 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 1928-2048
+  Free inodes: 225-256
+Group 8: (Blocks 2049-2304)
+  Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+  Inode table at 2051-2054 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2055-2304
+  Free inodes: 257-288
+Group 9: (Blocks 2305-2560)
+  Backup superblock at 2305, Group descriptors at 2306-2310
+  Reserved GDT blocks at 2311-2433
+  Block bitmap at 2434 (+129), Inode bitmap at 2435 (+130)
+  Inode table at 2436-2439 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2440-2560
+  Free inodes: 289-320
+Group 10: (Blocks 2561-2816)
+  Block bitmap at 2561 (+0), Inode bitmap at 2562 (+1)
+  Inode table at 2563-2566 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2567-2816
+  Free inodes: 321-352
+Group 11: (Blocks 2817-3072)
+  Block bitmap at 2817 (+0), Inode bitmap at 2818 (+1)
+  Inode table at 2819-2822 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 2823-3072
+  Free inodes: 353-384
+Group 12: (Blocks 3073-3328)
+  Block bitmap at 3073 (+0), Inode bitmap at 3074 (+1)
+  Inode table at 3075-3078 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3079-3328
+  Free inodes: 385-416
+Group 13: (Blocks 3329-3584)
+  Block bitmap at 3329 (+0), Inode bitmap at 3330 (+1)
+  Inode table at 3331-3334 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3335-3584
+  Free inodes: 417-448
+Group 14: (Blocks 3585-3840)
+  Block bitmap at 3585 (+0), Inode bitmap at 3586 (+1)
+  Inode table at 3587-3590 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3591-3840
+  Free inodes: 449-480
+Group 15: (Blocks 3841-4096)
+  Block bitmap at 3841 (+0), Inode bitmap at 3842 (+1)
+  Inode table at 3843-3846 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 3847-4096
+  Free inodes: 481-512
+Group 16: (Blocks 4097-4352)
+  Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+  Inode table at 4099-4102 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4103-4352
+  Free inodes: 513-544
+Group 17: (Blocks 4353-4608)
+  Block bitmap at 4353 (+0), Inode bitmap at 4354 (+1)
+  Inode table at 4355-4358 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4359-4608
+  Free inodes: 545-576
+Group 18: (Blocks 4609-4864)
+  Block bitmap at 4609 (+0), Inode bitmap at 4610 (+1)
+  Inode table at 4611-4614 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4615-4864
+  Free inodes: 577-608
+Group 19: (Blocks 4865-5120)
+  Block bitmap at 4865 (+0), Inode bitmap at 4866 (+1)
+  Inode table at 4867-4870 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 4871-5120
+  Free inodes: 609-640
+Group 20: (Blocks 5121-5376)
+  Block bitmap at 5121 (+0), Inode bitmap at 5122 (+1)
+  Inode table at 5123-5126 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5127-5376
+  Free inodes: 641-672
+Group 21: (Blocks 5377-5632)
+  Block bitmap at 5377 (+0), Inode bitmap at 5378 (+1)
+  Inode table at 5379-5382 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5383-5632
+  Free inodes: 673-704
+Group 22: (Blocks 5633-5888)
+  Block bitmap at 5633 (+0), Inode bitmap at 5634 (+1)
+  Inode table at 5635-5638 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5639-5888
+  Free inodes: 705-736
+Group 23: (Blocks 5889-6144)
+  Block bitmap at 5889 (+0), Inode bitmap at 5890 (+1)
+  Inode table at 5891-5894 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 5895-6144
+  Free inodes: 737-768
+Group 24: (Blocks 6145-6400)
+  Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+  Inode table at 6147-6150 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 6151-6400
+  Free inodes: 769-800
+Group 25: (Blocks 6401-6656)
+  Backup superblock at 6401, Group descriptors at 6402-6406
+  Reserved GDT blocks at 6407-6529
+  Block bitmap at 6530 (+129), Inode bitmap at 6531 (+130)
+  Inode table at 6532-6535 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 6536-6656
+  Free inodes: 801-832
+Group 26: (Blocks 6657-6912)
+  Block bitmap at 6657 (+0), Inode bitmap at 6658 (+1)
+  Inode table at 6659-6662 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 6663-6912
+  Free inodes: 833-864
+Group 27: (Blocks 6913-7168)
+  Backup superblock at 6913, Group descriptors at 6914-6918
+  Reserved GDT blocks at 6919-7041
+  Block bitmap at 7042 (+129), Inode bitmap at 7043 (+130)
+  Inode table at 7044-7047 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7048-7168
+  Free inodes: 865-896
+Group 28: (Blocks 7169-7424)
+  Block bitmap at 7169 (+0), Inode bitmap at 7170 (+1)
+  Inode table at 7171-7174 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7175-7424
+  Free inodes: 897-928
+Group 29: (Blocks 7425-7680)
+  Block bitmap at 7425 (+0), Inode bitmap at 7426 (+1)
+  Inode table at 7427-7430 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7431-7680
+  Free inodes: 929-960
+Group 30: (Blocks 7681-7936)
+  Block bitmap at 7681 (+0), Inode bitmap at 7682 (+1)
+  Inode table at 7683-7686 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7687-7936
+  Free inodes: 961-992
+Group 31: (Blocks 7937-8192)
+  Block bitmap at 7937 (+0), Inode bitmap at 7938 (+1)
+  Inode table at 7939-7942 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 7943-8192
+  Free inodes: 993-1024
+Group 32: (Blocks 8193-8448)
+  Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+  Inode table at 8195-8198 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8199-8448
+  Free inodes: 1025-1056
+Group 33: (Blocks 8449-8704)
+  Block bitmap at 8449 (+0), Inode bitmap at 8450 (+1)
+  Inode table at 8451-8454 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8455-8704
+  Free inodes: 1057-1088
+Group 34: (Blocks 8705-8960)
+  Block bitmap at 8705 (+0), Inode bitmap at 8706 (+1)
+  Inode table at 8707-8710 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8711-8960
+  Free inodes: 1089-1120
+Group 35: (Blocks 8961-9216)
+  Block bitmap at 8961 (+0), Inode bitmap at 8962 (+1)
+  Inode table at 8963-8966 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 8967-9216
+  Free inodes: 1121-1152
+Group 36: (Blocks 9217-9472)
+  Block bitmap at 9217 (+0), Inode bitmap at 9218 (+1)
+  Inode table at 9219-9222 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 9223-9472
+  Free inodes: 1153-1184
+Group 37: (Blocks 9473-9728)
+  Block bitmap at 9473 (+0), Inode bitmap at 9474 (+1)
+  Inode table at 9475-9478 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 9479-9728
+  Free inodes: 1185-1216
+Group 38: (Blocks 9729-9984)
+  Block bitmap at 9729 (+0), Inode bitmap at 9730 (+1)
+  Inode table at 9731-9734 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 9735-9984
+  Free inodes: 1217-1248
+Group 39: (Blocks 9985-10240)
+  Block bitmap at 9985 (+0), Inode bitmap at 9986 (+1)
+  Inode table at 9987-9990 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 9991-10240
+  Free inodes: 1249-1280
+Group 40: (Blocks 10241-10496)
+  Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+  Inode table at 10243-10246 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 10247-10496
+  Free inodes: 1281-1312
+Group 41: (Blocks 10497-10752)
+  Block bitmap at 10497 (+0), Inode bitmap at 10498 (+1)
+  Inode table at 10499-10502 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 10503-10752
+  Free inodes: 1313-1344
+Group 42: (Blocks 10753-11008)
+  Block bitmap at 10753 (+0), Inode bitmap at 10754 (+1)
+  Inode table at 10755-10758 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 10759-11008
+  Free inodes: 1345-1376
+Group 43: (Blocks 11009-11264)
+  Block bitmap at 11009 (+0), Inode bitmap at 11010 (+1)
+  Inode table at 11011-11014 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 11015-11264
+  Free inodes: 1377-1408
+Group 44: (Blocks 11265-11520)
+  Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+  Inode table at 11267-11270 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 11271-11520
+  Free inodes: 1409-1440
+Group 45: (Blocks 11521-11776)
+  Block bitmap at 11521 (+0), Inode bitmap at 11522 (+1)
+  Inode table at 11523-11526 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 11527-11776
+  Free inodes: 1441-1472
+Group 46: (Blocks 11777-12032)
+  Block bitmap at 11777 (+0), Inode bitmap at 11778 (+1)
+  Inode table at 11779-11782 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 11783-12032
+  Free inodes: 1473-1504
+Group 47: (Blocks 12033-12288)
+  Block bitmap at 12033 (+0), Inode bitmap at 12034 (+1)
+  Inode table at 12035-12038 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 12039-12288
+  Free inodes: 1505-1536
+Group 48: (Blocks 12289-12544)
+  Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+  Inode table at 12291-12294 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 12295-12544
+  Free inodes: 1537-1568
+Group 49: (Blocks 12545-12800)
+  Backup superblock at 12545, Group descriptors at 12546-12550
+  Reserved GDT blocks at 12551-12673
+  Block bitmap at 12674 (+129), Inode bitmap at 12675 (+130)
+  Inode table at 12676-12679 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 12680-12800
+  Free inodes: 1569-1600
+Group 50: (Blocks 12801-13056)
+  Block bitmap at 12801 (+0), Inode bitmap at 12802 (+1)
+  Inode table at 12803-12806 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 12807-13056
+  Free inodes: 1601-1632
+Group 51: (Blocks 13057-13312)
+  Block bitmap at 13057 (+0), Inode bitmap at 13058 (+1)
+  Inode table at 13059-13062 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 13063-13312
+  Free inodes: 1633-1664
+Group 52: (Blocks 13313-13568)
+  Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+  Inode table at 13315-13318 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 13319-13568
+  Free inodes: 1665-1696
+Group 53: (Blocks 13569-13824)
+  Block bitmap at 13569 (+0), Inode bitmap at 13570 (+1)
+  Inode table at 13571-13574 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 13575-13824
+  Free inodes: 1697-1728
+Group 54: (Blocks 13825-14080)
+  Block bitmap at 13825 (+0), Inode bitmap at 13826 (+1)
+  Inode table at 13827-13830 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 13831-14080
+  Free inodes: 1729-1760
+Group 55: (Blocks 14081-14336)
+  Block bitmap at 14081 (+0), Inode bitmap at 14082 (+1)
+  Inode table at 14083-14086 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 14087-14336
+  Free inodes: 1761-1792
+Group 56: (Blocks 14337-14592)
+  Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+  Inode table at 14339-14342 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 14343-14592
+  Free inodes: 1793-1824
+Group 57: (Blocks 14593-14848)
+  Block bitmap at 14593 (+0), Inode bitmap at 14594 (+1)
+  Inode table at 14595-14598 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 14599-14848
+  Free inodes: 1825-1856
+Group 58: (Blocks 14849-15104)
+  Block bitmap at 14849 (+0), Inode bitmap at 14850 (+1)
+  Inode table at 14851-14854 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 14855-15104
+  Free inodes: 1857-1888
+Group 59: (Blocks 15105-15360)
+  Block bitmap at 15105 (+0), Inode bitmap at 15106 (+1)
+  Inode table at 15107-15110 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 15111-15360
+  Free inodes: 1889-1920
+Group 60: (Blocks 15361-15616)
+  Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+  Inode table at 15363-15366 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 15367-15616
+  Free inodes: 1921-1952
+Group 61: (Blocks 15617-15872)
+  Block bitmap at 15617 (+0), Inode bitmap at 15618 (+1)
+  Inode table at 15619-15622 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 15623-15872
+  Free inodes: 1953-1984
+Group 62: (Blocks 15873-16128)
+  Block bitmap at 15873 (+0), Inode bitmap at 15874 (+1)
+  Inode table at 15875-15878 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 15879-16128
+  Free inodes: 1985-2016
+Group 63: (Blocks 16129-16384)
+  Block bitmap at 16129 (+0), Inode bitmap at 16130 (+1)
+  Inode table at 16131-16134 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 16135-16384
+  Free inodes: 2017-2048
+Group 64: (Blocks 16385-16640)
+  Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+  Inode table at 16387-16390 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 16391-16640
+  Free inodes: 2049-2080
+Group 65: (Blocks 16641-16896)
+  Block bitmap at 16641 (+0), Inode bitmap at 16642 (+1)
+  Inode table at 16643-16646 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 16647-16896
+  Free inodes: 2081-2112
+Group 66: (Blocks 16897-17152)
+  Block bitmap at 16897 (+0), Inode bitmap at 16898 (+1)
+  Inode table at 16899-16902 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 16903-17152
+  Free inodes: 2113-2144
+Group 67: (Blocks 17153-17408)
+  Block bitmap at 17153 (+0), Inode bitmap at 17154 (+1)
+  Inode table at 17155-17158 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 17159-17408
+  Free inodes: 2145-2176
+Group 68: (Blocks 17409-17664)
+  Block bitmap at 17409 (+0), Inode bitmap at 17410 (+1)
+  Inode table at 17411-17414 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 17415-17664
+  Free inodes: 2177-2208
+Group 69: (Blocks 17665-17920)
+  Block bitmap at 17665 (+0), Inode bitmap at 17666 (+1)
+  Inode table at 17667-17670 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 17671-17920
+  Free inodes: 2209-2240
+Group 70: (Blocks 17921-18176)
+  Block bitmap at 17921 (+0), Inode bitmap at 17922 (+1)
+  Inode table at 17923-17926 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 17927-18176
+  Free inodes: 2241-2272
+Group 71: (Blocks 18177-18432)
+  Block bitmap at 18177 (+0), Inode bitmap at 18178 (+1)
+  Inode table at 18179-18182 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 18183-18432
+  Free inodes: 2273-2304
+Group 72: (Blocks 18433-18688)
+  Block bitmap at 18433 (+0), Inode bitmap at 18434 (+1)
+  Inode table at 18435-18438 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 18439-18688
+  Free inodes: 2305-2336
+Group 73: (Blocks 18689-18944)
+  Block bitmap at 18689 (+0), Inode bitmap at 18690 (+1)
+  Inode table at 18691-18694 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 18695-18944
+  Free inodes: 2337-2368
+Group 74: (Blocks 18945-19200)
+  Block bitmap at 18945 (+0), Inode bitmap at 18946 (+1)
+  Inode table at 18947-18950 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 18951-19200
+  Free inodes: 2369-2400
+Group 75: (Blocks 19201-19456)
+  Block bitmap at 19201 (+0), Inode bitmap at 19202 (+1)
+  Inode table at 19203-19206 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 19207-19456
+  Free inodes: 2401-2432
+Group 76: (Blocks 19457-19712)
+  Block bitmap at 19457 (+0), Inode bitmap at 19458 (+1)
+  Inode table at 19459-19462 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 19463-19712
+  Free inodes: 2433-2464
+Group 77: (Blocks 19713-19968)
+  Block bitmap at 19713 (+0), Inode bitmap at 19714 (+1)
+  Inode table at 19715-19718 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 19719-19968
+  Free inodes: 2465-2496
+Group 78: (Blocks 19969-20224)
+  Block bitmap at 19969 (+0), Inode bitmap at 19970 (+1)
+  Inode table at 19971-19974 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 19975-20224
+  Free inodes: 2497-2528
+Group 79: (Blocks 20225-20480)
+  Block bitmap at 20225 (+0), Inode bitmap at 20226 (+1)
+  Inode table at 20227-20230 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 20231-20480
+  Free inodes: 2529-2560
+Group 80: (Blocks 20481-20736)
+  Block bitmap at 20481 (+0), Inode bitmap at 20482 (+1)
+  Inode table at 20483-20486 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 20487-20736
+  Free inodes: 2561-2592
+Group 81: (Blocks 20737-20992)
+  Backup superblock at 20737, Group descriptors at 20738-20742
+  Reserved GDT blocks at 20743-20865
+  Block bitmap at 20866 (+129), Inode bitmap at 20867 (+130)
+  Inode table at 20868-20871 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 20872-20992
+  Free inodes: 2593-2624
+Group 82: (Blocks 20993-21248)
+  Block bitmap at 20993 (+0), Inode bitmap at 20994 (+1)
+  Inode table at 20995-20998 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 20999-21248
+  Free inodes: 2625-2656
+Group 83: (Blocks 21249-21504)
+  Block bitmap at 21249 (+0), Inode bitmap at 21250 (+1)
+  Inode table at 21251-21254 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 21255-21504
+  Free inodes: 2657-2688
+Group 84: (Blocks 21505-21760)
+  Block bitmap at 21505 (+0), Inode bitmap at 21506 (+1)
+  Inode table at 21507-21510 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 21511-21760
+  Free inodes: 2689-2720
+Group 85: (Blocks 21761-22016)
+  Block bitmap at 21761 (+0), Inode bitmap at 21762 (+1)
+  Inode table at 21763-21766 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 21767-22016
+  Free inodes: 2721-2752
+Group 86: (Blocks 22017-22272)
+  Block bitmap at 22017 (+0), Inode bitmap at 22018 (+1)
+  Inode table at 22019-22022 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 22023-22272
+  Free inodes: 2753-2784
+Group 87: (Blocks 22273-22528)
+  Block bitmap at 22273 (+0), Inode bitmap at 22274 (+1)
+  Inode table at 22275-22278 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 22279-22528
+  Free inodes: 2785-2816
+Group 88: (Blocks 22529-22784)
+  Block bitmap at 22529 (+0), Inode bitmap at 22530 (+1)
+  Inode table at 22531-22534 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 22535-22784
+  Free inodes: 2817-2848
+Group 89: (Blocks 22785-23040)
+  Block bitmap at 22785 (+0), Inode bitmap at 22786 (+1)
+  Inode table at 22787-22790 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 22791-23040
+  Free inodes: 2849-2880
+Group 90: (Blocks 23041-23296)
+  Block bitmap at 23041 (+0), Inode bitmap at 23042 (+1)
+  Inode table at 23043-23046 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 23047-23296
+  Free inodes: 2881-2912
+Group 91: (Blocks 23297-23552)
+  Block bitmap at 23297 (+0), Inode bitmap at 23298 (+1)
+  Inode table at 23299-23302 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 23303-23552
+  Free inodes: 2913-2944
+Group 92: (Blocks 23553-23808)
+  Block bitmap at 23553 (+0), Inode bitmap at 23554 (+1)
+  Inode table at 23555-23558 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 23559-23808
+  Free inodes: 2945-2976
+Group 93: (Blocks 23809-24064)
+  Block bitmap at 23809 (+0), Inode bitmap at 23810 (+1)
+  Inode table at 23811-23814 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 23815-24064
+  Free inodes: 2977-3008
+Group 94: (Blocks 24065-24320)
+  Block bitmap at 24065 (+0), Inode bitmap at 24066 (+1)
+  Inode table at 24067-24070 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 24071-24320
+  Free inodes: 3009-3040
+Group 95: (Blocks 24321-24576)
+  Block bitmap at 24321 (+0), Inode bitmap at 24322 (+1)
+  Inode table at 24323-24326 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 24327-24576
+  Free inodes: 3041-3072
+Group 96: (Blocks 24577-24832)
+  Block bitmap at 24577 (+0), Inode bitmap at 24578 (+1)
+  Inode table at 24579-24582 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 24583-24832
+  Free inodes: 3073-3104
+Group 97: (Blocks 24833-25088)
+  Block bitmap at 24833 (+0), Inode bitmap at 24834 (+1)
+  Inode table at 24835-24838 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 24839-25088
+  Free inodes: 3105-3136
+Group 98: (Blocks 25089-25344)
+  Block bitmap at 25089 (+0), Inode bitmap at 25090 (+1)
+  Inode table at 25091-25094 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 25095-25344
+  Free inodes: 3137-3168
+Group 99: (Blocks 25345-25600)
+  Block bitmap at 25345 (+0), Inode bitmap at 25346 (+1)
+  Inode table at 25347-25350 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 25351-25600
+  Free inodes: 3169-3200
+Group 100: (Blocks 25601-25856)
+  Block bitmap at 25601 (+0), Inode bitmap at 25602 (+1)
+  Inode table at 25603-25606 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 25607-25856
+  Free inodes: 3201-3232
+Group 101: (Blocks 25857-26112)
+  Block bitmap at 25857 (+0), Inode bitmap at 25858 (+1)
+  Inode table at 25859-25862 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 25863-26112
+  Free inodes: 3233-3264
+Group 102: (Blocks 26113-26368)
+  Block bitmap at 26113 (+0), Inode bitmap at 26114 (+1)
+  Inode table at 26115-26118 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 26119-26368
+  Free inodes: 3265-3296
+Group 103: (Blocks 26369-26624)
+  Block bitmap at 26369 (+0), Inode bitmap at 26370 (+1)
+  Inode table at 26371-26374 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 26375-26624
+  Free inodes: 3297-3328
+Group 104: (Blocks 26625-26880)
+  Block bitmap at 26625 (+0), Inode bitmap at 26626 (+1)
+  Inode table at 26627-26630 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 26631-26880
+  Free inodes: 3329-3360
+Group 105: (Blocks 26881-27136)
+  Block bitmap at 26881 (+0), Inode bitmap at 26882 (+1)
+  Inode table at 26883-26886 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 26887-27136
+  Free inodes: 3361-3392
+Group 106: (Blocks 27137-27392)
+  Block bitmap at 27137 (+0), Inode bitmap at 27138 (+1)
+  Inode table at 27139-27142 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 27143-27392
+  Free inodes: 3393-3424
+Group 107: (Blocks 27393-27648)
+  Block bitmap at 27393 (+0), Inode bitmap at 27394 (+1)
+  Inode table at 27395-27398 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 27399-27648
+  Free inodes: 3425-3456
+Group 108: (Blocks 27649-27904)
+  Block bitmap at 27649 (+0), Inode bitmap at 27650 (+1)
+  Inode table at 27651-27654 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 27655-27904
+  Free inodes: 3457-3488
+Group 109: (Blocks 27905-28160)
+  Block bitmap at 27905 (+0), Inode bitmap at 27906 (+1)
+  Inode table at 27907-27910 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 27911-28160
+  Free inodes: 3489-3520
+Group 110: (Blocks 28161-28416)
+  Block bitmap at 28161 (+0), Inode bitmap at 28162 (+1)
+  Inode table at 28163-28166 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 28167-28416
+  Free inodes: 3521-3552
+Group 111: (Blocks 28417-28672)
+  Block bitmap at 28417 (+0), Inode bitmap at 28418 (+1)
+  Inode table at 28419-28422 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 28423-28672
+  Free inodes: 3553-3584
+Group 112: (Blocks 28673-28928)
+  Block bitmap at 28673 (+0), Inode bitmap at 28674 (+1)
+  Inode table at 28675-28678 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 28679-28928
+  Free inodes: 3585-3616
+Group 113: (Blocks 28929-29184)
+  Block bitmap at 28929 (+0), Inode bitmap at 28930 (+1)
+  Inode table at 28931-28934 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 28935-29184
+  Free inodes: 3617-3648
+Group 114: (Blocks 29185-29440)
+  Block bitmap at 29185 (+0), Inode bitmap at 29186 (+1)
+  Inode table at 29187-29190 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 29191-29440
+  Free inodes: 3649-3680
+Group 115: (Blocks 29441-29696)
+  Block bitmap at 29441 (+0), Inode bitmap at 29442 (+1)
+  Inode table at 29443-29446 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 29447-29696
+  Free inodes: 3681-3712
+Group 116: (Blocks 29697-29952)
+  Block bitmap at 29697 (+0), Inode bitmap at 29698 (+1)
+  Inode table at 29699-29702 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 29703-29952
+  Free inodes: 3713-3744
+Group 117: (Blocks 29953-30208)
+  Block bitmap at 29953 (+0), Inode bitmap at 29954 (+1)
+  Inode table at 29955-29958 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 29959-30208
+  Free inodes: 3745-3776
+Group 118: (Blocks 30209-30464)
+  Block bitmap at 30209 (+0), Inode bitmap at 30210 (+1)
+  Inode table at 30211-30214 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 30215-30464
+  Free inodes: 3777-3808
+Group 119: (Blocks 30465-30720)
+  Block bitmap at 30465 (+0), Inode bitmap at 30466 (+1)
+  Inode table at 30467-30470 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 30471-30720
+  Free inodes: 3809-3840
+Group 120: (Blocks 30721-30976)
+  Block bitmap at 30721 (+0), Inode bitmap at 30722 (+1)
+  Inode table at 30723-30726 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 30727-30976
+  Free inodes: 3841-3872
+Group 121: (Blocks 30977-31232)
+  Block bitmap at 30977 (+0), Inode bitmap at 30978 (+1)
+  Inode table at 30979-30982 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 30983-31232
+  Free inodes: 3873-3904
+Group 122: (Blocks 31233-31488)
+  Block bitmap at 31233 (+0), Inode bitmap at 31234 (+1)
+  Inode table at 31235-31238 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 31239-31488
+  Free inodes: 3905-3936
+Group 123: (Blocks 31489-31744)
+  Block bitmap at 31489 (+0), Inode bitmap at 31490 (+1)
+  Inode table at 31491-31494 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 31495-31744
+  Free inodes: 3937-3968
+Group 124: (Blocks 31745-32000)
+  Block bitmap at 31745 (+0), Inode bitmap at 31746 (+1)
+  Inode table at 31747-31750 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 31751-32000
+  Free inodes: 3969-4000
+Group 125: (Blocks 32001-32256)
+  Backup superblock at 32001, Group descriptors at 32002-32006
+  Reserved GDT blocks at 32007-32129
+  Block bitmap at 32130 (+129), Inode bitmap at 32131 (+130)
+  Inode table at 32132-32135 (+131)
+  121 free blocks, 32 free inodes, 0 directories
+  Free blocks: 32136-32256
+  Free inodes: 4001-4032
+Group 126: (Blocks 32257-32512)
+  Block bitmap at 32257 (+0), Inode bitmap at 32258 (+1)
+  Inode table at 32259-32262 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 32263-32512
+  Free inodes: 4033-4064
+Group 127: (Blocks 32513-32768)
+  Block bitmap at 32513 (+0), Inode bitmap at 32514 (+1)
+  Inode table at 32515-32518 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 32519-32768
+  Free inodes: 4065-4096
+Group 128: (Blocks 32769-33024)
+  Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+  Inode table at 32771-32774 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 32775-33024
+  Free inodes: 4097-4128
+Group 129: (Blocks 33025-33280)
+  Block bitmap at 33025 (+0), Inode bitmap at 33026 (+1)
+  Inode table at 33027-33030 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 33031-33280
+  Free inodes: 4129-4160
+Group 130: (Blocks 33281-33536)
+  Block bitmap at 33281 (+0), Inode bitmap at 33282 (+1)
+  Inode table at 33283-33286 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 33287-33536
+  Free inodes: 4161-4192
+Group 131: (Blocks 33537-33792)
+  Block bitmap at 33537 (+0), Inode bitmap at 33538 (+1)
+  Inode table at 33539-33542 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 33543-33792
+  Free inodes: 4193-4224
+Group 132: (Blocks 33793-34048)
+  Block bitmap at 33793 (+0), Inode bitmap at 33794 (+1)
+  Inode table at 33795-33798 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 33799-34048
+  Free inodes: 4225-4256
+Group 133: (Blocks 34049-34304)
+  Block bitmap at 34049 (+0), Inode bitmap at 34050 (+1)
+  Inode table at 34051-34054 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 34055-34304
+  Free inodes: 4257-4288
+Group 134: (Blocks 34305-34560)
+  Block bitmap at 34305 (+0), Inode bitmap at 34306 (+1)
+  Inode table at 34307-34310 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 34311-34560
+  Free inodes: 4289-4320
+Group 135: (Blocks 34561-34816)
+  Block bitmap at 34561 (+0), Inode bitmap at 34562 (+1)
+  Inode table at 34563-34566 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 34567-34816
+  Free inodes: 4321-4352
+Group 136: (Blocks 34817-35072)
+  Block bitmap at 34817 (+0), Inode bitmap at 34818 (+1)
+  Inode table at 34819-34822 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 34823-35072
+  Free inodes: 4353-4384
+Group 137: (Blocks 35073-35328)
+  Block bitmap at 35073 (+0), Inode bitmap at 35074 (+1)
+  Inode table at 35075-35078 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 35079-35328
+  Free inodes: 4385-4416
+Group 138: (Blocks 35329-35584)
+  Block bitmap at 35329 (+0), Inode bitmap at 35330 (+1)
+  Inode table at 35331-35334 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 35335-35584
+  Free inodes: 4417-4448
+Group 139: (Blocks 35585-35840)
+  Block bitmap at 35585 (+0), Inode bitmap at 35586 (+1)
+  Inode table at 35587-35590 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 35591-35840
+  Free inodes: 4449-4480
+Group 140: (Blocks 35841-36096)
+  Block bitmap at 35841 (+0), Inode bitmap at 35842 (+1)
+  Inode table at 35843-35846 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 35847-36096
+  Free inodes: 4481-4512
+Group 141: (Blocks 36097-36352)
+  Block bitmap at 36097 (+0), Inode bitmap at 36098 (+1)
+  Inode table at 36099-36102 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 36103-36352
+  Free inodes: 4513-4544
+Group 142: (Blocks 36353-36608)
+  Block bitmap at 36353 (+0), Inode bitmap at 36354 (+1)
+  Inode table at 36355-36358 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 36359-36608
+  Free inodes: 4545-4576
+Group 143: (Blocks 36609-36864)
+  Block bitmap at 36609 (+0), Inode bitmap at 36610 (+1)
+  Inode table at 36611-36614 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 36615-36864
+  Free inodes: 4577-4608
+Group 144: (Blocks 36865-37120)
+  Block bitmap at 36865 (+0), Inode bitmap at 36866 (+1)
+  Inode table at 36867-36870 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 36871-37120
+  Free inodes: 4609-4640
+Group 145: (Blocks 37121-37376)
+  Block bitmap at 37121 (+0), Inode bitmap at 37122 (+1)
+  Inode table at 37123-37126 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 37127-37376
+  Free inodes: 4641-4672
+Group 146: (Blocks 37377-37632)
+  Block bitmap at 37377 (+0), Inode bitmap at 37378 (+1)
+  Inode table at 37379-37382 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 37383-37632
+  Free inodes: 4673-4704
+Group 147: (Blocks 37633-37888)
+  Block bitmap at 37633 (+0), Inode bitmap at 37634 (+1)
+  Inode table at 37635-37638 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 37639-37888
+  Free inodes: 4705-4736
+Group 148: (Blocks 37889-38144)
+  Block bitmap at 37889 (+0), Inode bitmap at 37890 (+1)
+  Inode table at 37891-37894 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 37895-38144
+  Free inodes: 4737-4768
+Group 149: (Blocks 38145-38400)
+  Block bitmap at 38145 (+0), Inode bitmap at 38146 (+1)
+  Inode table at 38147-38150 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 38151-38400
+  Free inodes: 4769-4800
+Group 150: (Blocks 38401-38656)
+  Block bitmap at 38401 (+0), Inode bitmap at 38402 (+1)
+  Inode table at 38403-38406 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 38407-38656
+  Free inodes: 4801-4832
+Group 151: (Blocks 38657-38912)
+  Block bitmap at 38657 (+0), Inode bitmap at 38658 (+1)
+  Inode table at 38659-38662 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 38663-38912
+  Free inodes: 4833-4864
+Group 152: (Blocks 38913-39168)
+  Block bitmap at 38913 (+0), Inode bitmap at 38914 (+1)
+  Inode table at 38915-38918 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 38919-39168
+  Free inodes: 4865-4896
+Group 153: (Blocks 39169-39424)
+  Block bitmap at 39169 (+0), Inode bitmap at 39170 (+1)
+  Inode table at 39171-39174 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 39175-39424
+  Free inodes: 4897-4928
+Group 154: (Blocks 39425-39680)
+  Block bitmap at 39425 (+0), Inode bitmap at 39426 (+1)
+  Inode table at 39427-39430 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 39431-39680
+  Free inodes: 4929-4960
+Group 155: (Blocks 39681-39936)
+  Block bitmap at 39681 (+0), Inode bitmap at 39682 (+1)
+  Inode table at 39683-39686 (+2)
+  250 free blocks, 32 free inodes, 0 directories
+  Free blocks: 39687-39936
+  Free inodes: 4961-4992
+Group 156: (Blocks 39937-39999)
+  Block bitmap at 39937 (+0), Inode bitmap at 39938 (+1)
+  Inode table at 39939-39942 (+2)
+  57 free blocks, 32 free inodes, 0 directories
+  Free blocks: 39943-39999
+  Free inodes: 4993-5024
diff --git a/e2fsprogs/tests/r_move_itable/name b/e2fsprogs/tests/r_move_itable/name
new file mode 100644
index 0000000..58c2d6d
--- /dev/null
+++ b/e2fsprogs/tests/r_move_itable/name
@@ -0,0 +1 @@
+filesystem resize which requires moving the inode table
diff --git a/e2fsprogs/tests/r_move_itable/script b/e2fsprogs/tests/r_move_itable/script
new file mode 100644
index 0000000..e567888
--- /dev/null
+++ b/e2fsprogs/tests/r_move_itable/script
@@ -0,0 +1,116 @@
+if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_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
+
+cp /dev/null $OUT
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 -g 256 test.img 1024 > $OUT
+$MKE2FS -q -F -o Linux -b 1024 -g 256 $TMPFILE 1024 2>&1 |
+	sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
+
+echo resize2fs -p test.img 10000 >> $OUT
+$RESIZE2FS -p $TMPFILE 10000 2>&1 |
+	sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
+
+$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 -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
+rm -f $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
+$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+
+echo "--------------------------------" >> $OUT
+
+echo resize2fs -p test.img 20000 >> $OUT
+$RESIZE2FS -p $TMPFILE 20000 2>&1 |
+	sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
+
+$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 -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
+rm -f $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
+$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+
+echo "--------------------------------" >> $OUT
+
+echo resize2fs -p test.img 30000 >> $OUT
+$RESIZE2FS -p $TMPFILE 30000 2>&1 |
+	sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
+
+$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 -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
+rm -f $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
+$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+
+echo "--------------------------------" >> $OUT
+
+echo resize2fs -p test.img 40000 >> $OUT
+$RESIZE2FS -p $TMPFILE 40000 2>&1 |
+	sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
+
+$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 -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
+rm -f $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
+$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $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
+
+else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi 
diff --git a/e2fsprogs/tests/r_resize_inode/expect b/e2fsprogs/tests/r_resize_inode/expect
new file mode 100644
index 0000000..786fe13
--- /dev/null
+++ b/e2fsprogs/tests/r_resize_inode/expect
@@ -0,0 +1,1639 @@
+mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384
+resize2fs test.img 65536
+Resizing the filesystem on test.img to 65536 (1k) blocks.
+The filesystem on test.img is now 65536 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), 4513/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:              61023
+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:   32
+Mount count:              0
+Check interval:           15552000 (6 months)
+Reserved blocks uid:      0
+Reserved blocks gid:      0
+First inode:              11
+Inode size:	          128
+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-292 (+260)
+  718 free blocks, 245 free inodes, 2 directories
+  Free blocks: 307-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-1316 (+260)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 1317-2048
+  Free inodes: 257-512
+Group 2: (Blocks 2049-3072)
+  Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+  Inode table at 2051-2082 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 2083-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-3364 (+260)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 3365-4096
+  Free inodes: 769-1024
+Group 4: (Blocks 4097-5120)
+  Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+  Inode table at 4099-4130 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 4131-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-5412 (+260)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 5413-6144
+  Free inodes: 1281-1536
+Group 6: (Blocks 6145-7168)
+  Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+  Inode table at 6147-6178 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 6179-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-7460 (+260)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 7461-8192
+  Free inodes: 1793-2048
+Group 8: (Blocks 8193-9216)
+  Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+  Inode table at 8195-8226 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 8227-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-9508 (+260)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 9509-10240
+  Free inodes: 2305-2560
+Group 10: (Blocks 10241-11264)
+  Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+  Inode table at 10243-10274 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 10275-11264
+  Free inodes: 2561-2816
+Group 11: (Blocks 11265-12288)
+  Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+  Inode table at 11267-11298 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 11299-12288
+  Free inodes: 2817-3072
+Group 12: (Blocks 12289-13312)
+  Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+  Inode table at 12291-12322 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 12323-13312
+  Free inodes: 3073-3328
+Group 13: (Blocks 13313-14336)
+  Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+  Inode table at 13315-13346 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 13347-14336
+  Free inodes: 3329-3584
+Group 14: (Blocks 14337-15360)
+  Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+  Inode table at 14339-14370 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 14371-15360
+  Free inodes: 3585-3840
+Group 15: (Blocks 15361-16384)
+  Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+  Inode table at 15363-15394 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 15395-16384
+  Free inodes: 3841-4096
+Group 16: (Blocks 16385-17408)
+  Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+  Inode table at 16387-16418 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 16419-17408
+  Free inodes: 4097-4352
+Group 17: (Blocks 17409-18432)
+  Block bitmap at 17409 (+0), Inode bitmap at 17410 (+1)
+  Inode table at 17411-17442 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 17443-18432
+  Free inodes: 4353-4608
+Group 18: (Blocks 18433-19456)
+  Block bitmap at 18433 (+0), Inode bitmap at 18434 (+1)
+  Inode table at 18435-18466 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 18467-19456
+  Free inodes: 4609-4864
+Group 19: (Blocks 19457-20480)
+  Block bitmap at 19457 (+0), Inode bitmap at 19458 (+1)
+  Inode table at 19459-19490 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 19491-20480
+  Free inodes: 4865-5120
+Group 20: (Blocks 20481-21504)
+  Block bitmap at 20481 (+0), Inode bitmap at 20482 (+1)
+  Inode table at 20483-20514 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 20515-21504
+  Free inodes: 5121-5376
+Group 21: (Blocks 21505-22528)
+  Block bitmap at 21505 (+0), Inode bitmap at 21506 (+1)
+  Inode table at 21507-21538 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 21539-22528
+  Free inodes: 5377-5632
+Group 22: (Blocks 22529-23552)
+  Block bitmap at 22529 (+0), Inode bitmap at 22530 (+1)
+  Inode table at 22531-22562 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 22563-23552
+  Free inodes: 5633-5888
+Group 23: (Blocks 23553-24576)
+  Block bitmap at 23553 (+0), Inode bitmap at 23554 (+1)
+  Inode table at 23555-23586 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 23587-24576
+  Free inodes: 5889-6144
+Group 24: (Blocks 24577-25600)
+  Block bitmap at 24577 (+0), Inode bitmap at 24578 (+1)
+  Inode table at 24579-24610 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 24611-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-25892 (+260)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 25893-26624
+  Free inodes: 6401-6656
+Group 26: (Blocks 26625-27648)
+  Block bitmap at 26625 (+0), Inode bitmap at 26626 (+1)
+  Inode table at 26627-26658 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 26659-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-27940 (+260)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 27941-28672
+  Free inodes: 6913-7168
+Group 28: (Blocks 28673-29696)
+  Block bitmap at 28673 (+0), Inode bitmap at 28674 (+1)
+  Inode table at 28675-28706 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 28707-29696
+  Free inodes: 7169-7424
+Group 29: (Blocks 29697-30720)
+  Block bitmap at 29697 (+0), Inode bitmap at 29698 (+1)
+  Inode table at 29699-29730 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 29731-30720
+  Free inodes: 7425-7680
+Group 30: (Blocks 30721-31744)
+  Block bitmap at 30721 (+0), Inode bitmap at 30722 (+1)
+  Inode table at 30723-30754 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 30755-31744
+  Free inodes: 7681-7936
+Group 31: (Blocks 31745-32768)
+  Block bitmap at 31745 (+0), Inode bitmap at 31746 (+1)
+  Inode table at 31747-31778 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 31779-32768
+  Free inodes: 7937-8192
+Group 32: (Blocks 32769-33792)
+  Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+  Inode table at 32771-32802 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 32803-33792
+  Free inodes: 8193-8448
+Group 33: (Blocks 33793-34816)
+  Block bitmap at 33793 (+0), Inode bitmap at 33794 (+1)
+  Inode table at 33795-33826 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 33827-34816
+  Free inodes: 8449-8704
+Group 34: (Blocks 34817-35840)
+  Block bitmap at 34817 (+0), Inode bitmap at 34818 (+1)
+  Inode table at 34819-34850 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 34851-35840
+  Free inodes: 8705-8960
+Group 35: (Blocks 35841-36864)
+  Block bitmap at 35841 (+0), Inode bitmap at 35842 (+1)
+  Inode table at 35843-35874 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 35875-36864
+  Free inodes: 8961-9216
+Group 36: (Blocks 36865-37888)
+  Block bitmap at 36865 (+0), Inode bitmap at 36866 (+1)
+  Inode table at 36867-36898 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 36899-37888
+  Free inodes: 9217-9472
+Group 37: (Blocks 37889-38912)
+  Block bitmap at 37889 (+0), Inode bitmap at 37890 (+1)
+  Inode table at 37891-37922 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 37923-38912
+  Free inodes: 9473-9728
+Group 38: (Blocks 38913-39936)
+  Block bitmap at 38913 (+0), Inode bitmap at 38914 (+1)
+  Inode table at 38915-38946 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 38947-39936
+  Free inodes: 9729-9984
+Group 39: (Blocks 39937-40960)
+  Block bitmap at 39937 (+0), Inode bitmap at 39938 (+1)
+  Inode table at 39939-39970 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 39971-40960
+  Free inodes: 9985-10240
+Group 40: (Blocks 40961-41984)
+  Block bitmap at 40961 (+0), Inode bitmap at 40962 (+1)
+  Inode table at 40963-40994 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 40995-41984
+  Free inodes: 10241-10496
+Group 41: (Blocks 41985-43008)
+  Block bitmap at 41985 (+0), Inode bitmap at 41986 (+1)
+  Inode table at 41987-42018 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 42019-43008
+  Free inodes: 10497-10752
+Group 42: (Blocks 43009-44032)
+  Block bitmap at 43009 (+0), Inode bitmap at 43010 (+1)
+  Inode table at 43011-43042 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 43043-44032
+  Free inodes: 10753-11008
+Group 43: (Blocks 44033-45056)
+  Block bitmap at 44033 (+0), Inode bitmap at 44034 (+1)
+  Inode table at 44035-44066 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 44067-45056
+  Free inodes: 11009-11264
+Group 44: (Blocks 45057-46080)
+  Block bitmap at 45057 (+0), Inode bitmap at 45058 (+1)
+  Inode table at 45059-45090 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 45091-46080
+  Free inodes: 11265-11520
+Group 45: (Blocks 46081-47104)
+  Block bitmap at 46081 (+0), Inode bitmap at 46082 (+1)
+  Inode table at 46083-46114 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 46115-47104
+  Free inodes: 11521-11776
+Group 46: (Blocks 47105-48128)
+  Block bitmap at 47105 (+0), Inode bitmap at 47106 (+1)
+  Inode table at 47107-47138 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 47139-48128
+  Free inodes: 11777-12032
+Group 47: (Blocks 48129-49152)
+  Block bitmap at 48129 (+0), Inode bitmap at 48130 (+1)
+  Inode table at 48131-48162 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 48163-49152
+  Free inodes: 12033-12288
+Group 48: (Blocks 49153-50176)
+  Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+  Inode table at 49155-49186 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 49187-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-50468 (+260)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 50469-51200
+  Free inodes: 12545-12800
+Group 50: (Blocks 51201-52224)
+  Block bitmap at 51201 (+0), Inode bitmap at 51202 (+1)
+  Inode table at 51203-51234 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 51235-52224
+  Free inodes: 12801-13056
+Group 51: (Blocks 52225-53248)
+  Block bitmap at 52225 (+0), Inode bitmap at 52226 (+1)
+  Inode table at 52227-52258 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 52259-53248
+  Free inodes: 13057-13312
+Group 52: (Blocks 53249-54272)
+  Block bitmap at 53249 (+0), Inode bitmap at 53250 (+1)
+  Inode table at 53251-53282 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 53283-54272
+  Free inodes: 13313-13568
+Group 53: (Blocks 54273-55296)
+  Block bitmap at 54273 (+0), Inode bitmap at 54274 (+1)
+  Inode table at 54275-54306 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 54307-55296
+  Free inodes: 13569-13824
+Group 54: (Blocks 55297-56320)
+  Block bitmap at 55297 (+0), Inode bitmap at 55298 (+1)
+  Inode table at 55299-55330 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 55331-56320
+  Free inodes: 13825-14080
+Group 55: (Blocks 56321-57344)
+  Block bitmap at 56321 (+0), Inode bitmap at 56322 (+1)
+  Inode table at 56323-56354 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 56355-57344
+  Free inodes: 14081-14336
+Group 56: (Blocks 57345-58368)
+  Block bitmap at 57345 (+0), Inode bitmap at 57346 (+1)
+  Inode table at 57347-57378 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 57379-58368
+  Free inodes: 14337-14592
+Group 57: (Blocks 58369-59392)
+  Block bitmap at 58369 (+0), Inode bitmap at 58370 (+1)
+  Inode table at 58371-58402 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 58403-59392
+  Free inodes: 14593-14848
+Group 58: (Blocks 59393-60416)
+  Block bitmap at 59393 (+0), Inode bitmap at 59394 (+1)
+  Inode table at 59395-59426 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 59427-60416
+  Free inodes: 14849-15104
+Group 59: (Blocks 60417-61440)
+  Block bitmap at 60417 (+0), Inode bitmap at 60418 (+1)
+  Inode table at 60419-60450 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 60451-61440
+  Free inodes: 15105-15360
+Group 60: (Blocks 61441-62464)
+  Block bitmap at 61441 (+0), Inode bitmap at 61442 (+1)
+  Inode table at 61443-61474 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 61475-62464
+  Free inodes: 15361-15616
+Group 61: (Blocks 62465-63488)
+  Block bitmap at 62465 (+0), Inode bitmap at 62466 (+1)
+  Inode table at 62467-62498 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 62499-63488
+  Free inodes: 15617-15872
+Group 62: (Blocks 63489-64512)
+  Block bitmap at 63489 (+0), Inode bitmap at 63490 (+1)
+  Inode table at 63491-63522 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 63523-64512
+  Free inodes: 15873-16128
+Group 63: (Blocks 64513-65535)
+  Block bitmap at 64513 (+0), Inode bitmap at 64514 (+1)
+  Inode table at 64515-64546 (+2)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 64547-65535
+  Free inodes: 16129-16384
+--------------------------------
+mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 65536
+resize2fs test.img 16384
+Resizing the filesystem on test.img to 16384 (1k) blocks.
+The filesystem on test.img is now 16384 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), 2107/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:              14277
+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:   32
+Mount count:              0
+Check interval:           15552000 (6 months)
+Reserved blocks uid:      0
+Reserved blocks gid:      0
+First inode:              11
+Inode size:	          128
+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-293 (+261)
+  718 free blocks, 245 free inodes, 2 directories
+  Free blocks: 259, 308-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-1317 (+261)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 1283, 1318-2048
+  Free inodes: 257-512
+Group 2: (Blocks 2049-3072)
+  Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+  Inode table at 2051-2082 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 2083-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-3365 (+261)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 3331, 3366-4096
+  Free inodes: 769-1024
+Group 4: (Blocks 4097-5120)
+  Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+  Inode table at 4099-4130 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 4131-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-5413 (+261)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 5379, 5414-6144
+  Free inodes: 1281-1536
+Group 6: (Blocks 6145-7168)
+  Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+  Inode table at 6147-6178 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 6179-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-7461 (+261)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 7427, 7462-8192
+  Free inodes: 1793-2048
+Group 8: (Blocks 8193-9216)
+  Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+  Inode table at 8195-8226 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 8227-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-9509 (+261)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 9475, 9510-10240
+  Free inodes: 2305-2560
+Group 10: (Blocks 10241-11264)
+  Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+  Inode table at 10243-10274 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 10275-11264
+  Free inodes: 2561-2816
+Group 11: (Blocks 11265-12288)
+  Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+  Inode table at 11267-11298 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 11299-12288
+  Free inodes: 2817-3072
+Group 12: (Blocks 12289-13312)
+  Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+  Inode table at 12291-12322 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 12323-13312
+  Free inodes: 3073-3328
+Group 13: (Blocks 13313-14336)
+  Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+  Inode table at 13315-13346 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 13347-14336
+  Free inodes: 3329-3584
+Group 14: (Blocks 14337-15360)
+  Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+  Inode table at 14339-14370 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 14371-15360
+  Free inodes: 3585-3840
+Group 15: (Blocks 15361-16383)
+  Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+  Inode table at 15363-15394 (+2)
+  989 free blocks, 256 free inodes, 0 directories
+  Free blocks: 15395-16383
+  Free inodes: 3841-4096
+--------------------------------
+resize2fs test.img 165536
+Resizing the filesystem on test.img to 165536 (1k) blocks.
+The filesystem on test.img is now 165536 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), 8361/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:              157175
+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:   32
+Mount count:              0
+Check interval:           15552000 (6 months)
+Reserved blocks uid:      0
+Reserved blocks gid:      0
+First inode:              11
+Inode size:	          128
+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-293 (+261)
+  718 free blocks, 245 free inodes, 2 directories
+  Free blocks: 259, 308-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-1317 (+261)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 1283, 1318-2048
+  Free inodes: 257-512
+Group 2: (Blocks 2049-3072)
+  Block bitmap at 2049 (+0), Inode bitmap at 2050 (+1)
+  Inode table at 2051-2082 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 2083-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-3365 (+261)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 3331, 3366-4096
+  Free inodes: 769-1024
+Group 4: (Blocks 4097-5120)
+  Block bitmap at 4097 (+0), Inode bitmap at 4098 (+1)
+  Inode table at 4099-4130 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 4131-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-5413 (+261)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 5379, 5414-6144
+  Free inodes: 1281-1536
+Group 6: (Blocks 6145-7168)
+  Block bitmap at 6145 (+0), Inode bitmap at 6146 (+1)
+  Inode table at 6147-6178 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 6179-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-7461 (+261)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 7427, 7462-8192
+  Free inodes: 1793-2048
+Group 8: (Blocks 8193-9216)
+  Block bitmap at 8193 (+0), Inode bitmap at 8194 (+1)
+  Inode table at 8195-8226 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 8227-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-9509 (+261)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 9475, 9510-10240
+  Free inodes: 2305-2560
+Group 10: (Blocks 10241-11264)
+  Block bitmap at 10241 (+0), Inode bitmap at 10242 (+1)
+  Inode table at 10243-10274 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 10275-11264
+  Free inodes: 2561-2816
+Group 11: (Blocks 11265-12288)
+  Block bitmap at 11265 (+0), Inode bitmap at 11266 (+1)
+  Inode table at 11267-11298 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 11299-12288
+  Free inodes: 2817-3072
+Group 12: (Blocks 12289-13312)
+  Block bitmap at 12289 (+0), Inode bitmap at 12290 (+1)
+  Inode table at 12291-12322 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 12323-13312
+  Free inodes: 3073-3328
+Group 13: (Blocks 13313-14336)
+  Block bitmap at 13313 (+0), Inode bitmap at 13314 (+1)
+  Inode table at 13315-13346 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 13347-14336
+  Free inodes: 3329-3584
+Group 14: (Blocks 14337-15360)
+  Block bitmap at 14337 (+0), Inode bitmap at 14338 (+1)
+  Inode table at 14339-14370 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 14371-15360
+  Free inodes: 3585-3840
+Group 15: (Blocks 15361-16384)
+  Block bitmap at 15361 (+0), Inode bitmap at 15362 (+1)
+  Inode table at 15363-15394 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 15395-16384
+  Free inodes: 3841-4096
+Group 16: (Blocks 16385-17408)
+  Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1)
+  Inode table at 16387-16418 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 16419-17408
+  Free inodes: 4097-4352
+Group 17: (Blocks 17409-18432)
+  Block bitmap at 17409 (+0), Inode bitmap at 17410 (+1)
+  Inode table at 17411-17442 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 17443-18432
+  Free inodes: 4353-4608
+Group 18: (Blocks 18433-19456)
+  Block bitmap at 18433 (+0), Inode bitmap at 18434 (+1)
+  Inode table at 18435-18466 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 18467-19456
+  Free inodes: 4609-4864
+Group 19: (Blocks 19457-20480)
+  Block bitmap at 19457 (+0), Inode bitmap at 19458 (+1)
+  Inode table at 19459-19490 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 19491-20480
+  Free inodes: 4865-5120
+Group 20: (Blocks 20481-21504)
+  Block bitmap at 20481 (+0), Inode bitmap at 20482 (+1)
+  Inode table at 20483-20514 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 20515-21504
+  Free inodes: 5121-5376
+Group 21: (Blocks 21505-22528)
+  Block bitmap at 21505 (+0), Inode bitmap at 21506 (+1)
+  Inode table at 21507-21538 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 21539-22528
+  Free inodes: 5377-5632
+Group 22: (Blocks 22529-23552)
+  Block bitmap at 22529 (+0), Inode bitmap at 22530 (+1)
+  Inode table at 22531-22562 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 22563-23552
+  Free inodes: 5633-5888
+Group 23: (Blocks 23553-24576)
+  Block bitmap at 23553 (+0), Inode bitmap at 23554 (+1)
+  Inode table at 23555-23586 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 23587-24576
+  Free inodes: 5889-6144
+Group 24: (Blocks 24577-25600)
+  Block bitmap at 24577 (+0), Inode bitmap at 24578 (+1)
+  Inode table at 24579-24610 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 24611-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-25892 (+260)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 25893-26624
+  Free inodes: 6401-6656
+Group 26: (Blocks 26625-27648)
+  Block bitmap at 26625 (+0), Inode bitmap at 26626 (+1)
+  Inode table at 26627-26658 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 26659-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-27940 (+260)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 27941-28672
+  Free inodes: 6913-7168
+Group 28: (Blocks 28673-29696)
+  Block bitmap at 28673 (+0), Inode bitmap at 28674 (+1)
+  Inode table at 28675-28706 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 28707-29696
+  Free inodes: 7169-7424
+Group 29: (Blocks 29697-30720)
+  Block bitmap at 29697 (+0), Inode bitmap at 29698 (+1)
+  Inode table at 29699-29730 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 29731-30720
+  Free inodes: 7425-7680
+Group 30: (Blocks 30721-31744)
+  Block bitmap at 30721 (+0), Inode bitmap at 30722 (+1)
+  Inode table at 30723-30754 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 30755-31744
+  Free inodes: 7681-7936
+Group 31: (Blocks 31745-32768)
+  Block bitmap at 31745 (+0), Inode bitmap at 31746 (+1)
+  Inode table at 31747-31778 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 31779-32768
+  Free inodes: 7937-8192
+Group 32: (Blocks 32769-33792)
+  Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1)
+  Inode table at 32771-32802 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 32803-33792
+  Free inodes: 8193-8448
+Group 33: (Blocks 33793-34816)
+  Block bitmap at 33793 (+0), Inode bitmap at 33794 (+1)
+  Inode table at 33795-33826 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 33827-34816
+  Free inodes: 8449-8704
+Group 34: (Blocks 34817-35840)
+  Block bitmap at 34817 (+0), Inode bitmap at 34818 (+1)
+  Inode table at 34819-34850 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 34851-35840
+  Free inodes: 8705-8960
+Group 35: (Blocks 35841-36864)
+  Block bitmap at 35841 (+0), Inode bitmap at 35842 (+1)
+  Inode table at 35843-35874 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 35875-36864
+  Free inodes: 8961-9216
+Group 36: (Blocks 36865-37888)
+  Block bitmap at 36865 (+0), Inode bitmap at 36866 (+1)
+  Inode table at 36867-36898 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 36899-37888
+  Free inodes: 9217-9472
+Group 37: (Blocks 37889-38912)
+  Block bitmap at 37889 (+0), Inode bitmap at 37890 (+1)
+  Inode table at 37891-37922 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 37923-38912
+  Free inodes: 9473-9728
+Group 38: (Blocks 38913-39936)
+  Block bitmap at 38913 (+0), Inode bitmap at 38914 (+1)
+  Inode table at 38915-38946 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 38947-39936
+  Free inodes: 9729-9984
+Group 39: (Blocks 39937-40960)
+  Block bitmap at 39937 (+0), Inode bitmap at 39938 (+1)
+  Inode table at 39939-39970 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 39971-40960
+  Free inodes: 9985-10240
+Group 40: (Blocks 40961-41984)
+  Block bitmap at 40961 (+0), Inode bitmap at 40962 (+1)
+  Inode table at 40963-40994 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 40995-41984
+  Free inodes: 10241-10496
+Group 41: (Blocks 41985-43008)
+  Block bitmap at 41985 (+0), Inode bitmap at 41986 (+1)
+  Inode table at 41987-42018 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 42019-43008
+  Free inodes: 10497-10752
+Group 42: (Blocks 43009-44032)
+  Block bitmap at 43009 (+0), Inode bitmap at 43010 (+1)
+  Inode table at 43011-43042 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 43043-44032
+  Free inodes: 10753-11008
+Group 43: (Blocks 44033-45056)
+  Block bitmap at 44033 (+0), Inode bitmap at 44034 (+1)
+  Inode table at 44035-44066 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 44067-45056
+  Free inodes: 11009-11264
+Group 44: (Blocks 45057-46080)
+  Block bitmap at 45057 (+0), Inode bitmap at 45058 (+1)
+  Inode table at 45059-45090 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 45091-46080
+  Free inodes: 11265-11520
+Group 45: (Blocks 46081-47104)
+  Block bitmap at 46081 (+0), Inode bitmap at 46082 (+1)
+  Inode table at 46083-46114 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 46115-47104
+  Free inodes: 11521-11776
+Group 46: (Blocks 47105-48128)
+  Block bitmap at 47105 (+0), Inode bitmap at 47106 (+1)
+  Inode table at 47107-47138 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 47139-48128
+  Free inodes: 11777-12032
+Group 47: (Blocks 48129-49152)
+  Block bitmap at 48129 (+0), Inode bitmap at 48130 (+1)
+  Inode table at 48131-48162 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 48163-49152
+  Free inodes: 12033-12288
+Group 48: (Blocks 49153-50176)
+  Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1)
+  Inode table at 49155-49186 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 49187-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-50468 (+260)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 50469-51200
+  Free inodes: 12545-12800
+Group 50: (Blocks 51201-52224)
+  Block bitmap at 51201 (+0), Inode bitmap at 51202 (+1)
+  Inode table at 51203-51234 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 51235-52224
+  Free inodes: 12801-13056
+Group 51: (Blocks 52225-53248)
+  Block bitmap at 52225 (+0), Inode bitmap at 52226 (+1)
+  Inode table at 52227-52258 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 52259-53248
+  Free inodes: 13057-13312
+Group 52: (Blocks 53249-54272)
+  Block bitmap at 53249 (+0), Inode bitmap at 53250 (+1)
+  Inode table at 53251-53282 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 53283-54272
+  Free inodes: 13313-13568
+Group 53: (Blocks 54273-55296)
+  Block bitmap at 54273 (+0), Inode bitmap at 54274 (+1)
+  Inode table at 54275-54306 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 54307-55296
+  Free inodes: 13569-13824
+Group 54: (Blocks 55297-56320)
+  Block bitmap at 55297 (+0), Inode bitmap at 55298 (+1)
+  Inode table at 55299-55330 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 55331-56320
+  Free inodes: 13825-14080
+Group 55: (Blocks 56321-57344)
+  Block bitmap at 56321 (+0), Inode bitmap at 56322 (+1)
+  Inode table at 56323-56354 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 56355-57344
+  Free inodes: 14081-14336
+Group 56: (Blocks 57345-58368)
+  Block bitmap at 57345 (+0), Inode bitmap at 57346 (+1)
+  Inode table at 57347-57378 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 57379-58368
+  Free inodes: 14337-14592
+Group 57: (Blocks 58369-59392)
+  Block bitmap at 58369 (+0), Inode bitmap at 58370 (+1)
+  Inode table at 58371-58402 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 58403-59392
+  Free inodes: 14593-14848
+Group 58: (Blocks 59393-60416)
+  Block bitmap at 59393 (+0), Inode bitmap at 59394 (+1)
+  Inode table at 59395-59426 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 59427-60416
+  Free inodes: 14849-15104
+Group 59: (Blocks 60417-61440)
+  Block bitmap at 60417 (+0), Inode bitmap at 60418 (+1)
+  Inode table at 60419-60450 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 60451-61440
+  Free inodes: 15105-15360
+Group 60: (Blocks 61441-62464)
+  Block bitmap at 61441 (+0), Inode bitmap at 61442 (+1)
+  Inode table at 61443-61474 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 61475-62464
+  Free inodes: 15361-15616
+Group 61: (Blocks 62465-63488)
+  Block bitmap at 62465 (+0), Inode bitmap at 62466 (+1)
+  Inode table at 62467-62498 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 62499-63488
+  Free inodes: 15617-15872
+Group 62: (Blocks 63489-64512)
+  Block bitmap at 63489 (+0), Inode bitmap at 63490 (+1)
+  Inode table at 63491-63522 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 63523-64512
+  Free inodes: 15873-16128
+Group 63: (Blocks 64513-65536)
+  Block bitmap at 64513 (+0), Inode bitmap at 64514 (+1)
+  Inode table at 64515-64546 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 64547-65536
+  Free inodes: 16129-16384
+Group 64: (Blocks 65537-66560)
+  Block bitmap at 65537 (+0), Inode bitmap at 65538 (+1)
+  Inode table at 65539-65570 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 65571-66560
+  Free inodes: 16385-16640
+Group 65: (Blocks 66561-67584)
+  Block bitmap at 66561 (+0), Inode bitmap at 66562 (+1)
+  Inode table at 66563-66594 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 66595-67584
+  Free inodes: 16641-16896
+Group 66: (Blocks 67585-68608)
+  Block bitmap at 67585 (+0), Inode bitmap at 67586 (+1)
+  Inode table at 67587-67618 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 67619-68608
+  Free inodes: 16897-17152
+Group 67: (Blocks 68609-69632)
+  Block bitmap at 68609 (+0), Inode bitmap at 68610 (+1)
+  Inode table at 68611-68642 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 68643-69632
+  Free inodes: 17153-17408
+Group 68: (Blocks 69633-70656)
+  Block bitmap at 69633 (+0), Inode bitmap at 69634 (+1)
+  Inode table at 69635-69666 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 69667-70656
+  Free inodes: 17409-17664
+Group 69: (Blocks 70657-71680)
+  Block bitmap at 70657 (+0), Inode bitmap at 70658 (+1)
+  Inode table at 70659-70690 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 70691-71680
+  Free inodes: 17665-17920
+Group 70: (Blocks 71681-72704)
+  Block bitmap at 71681 (+0), Inode bitmap at 71682 (+1)
+  Inode table at 71683-71714 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 71715-72704
+  Free inodes: 17921-18176
+Group 71: (Blocks 72705-73728)
+  Block bitmap at 72705 (+0), Inode bitmap at 72706 (+1)
+  Inode table at 72707-72738 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 72739-73728
+  Free inodes: 18177-18432
+Group 72: (Blocks 73729-74752)
+  Block bitmap at 73729 (+0), Inode bitmap at 73730 (+1)
+  Inode table at 73731-73762 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 73763-74752
+  Free inodes: 18433-18688
+Group 73: (Blocks 74753-75776)
+  Block bitmap at 74753 (+0), Inode bitmap at 74754 (+1)
+  Inode table at 74755-74786 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 74787-75776
+  Free inodes: 18689-18944
+Group 74: (Blocks 75777-76800)
+  Block bitmap at 75777 (+0), Inode bitmap at 75778 (+1)
+  Inode table at 75779-75810 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 75811-76800
+  Free inodes: 18945-19200
+Group 75: (Blocks 76801-77824)
+  Block bitmap at 76801 (+0), Inode bitmap at 76802 (+1)
+  Inode table at 76803-76834 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 76835-77824
+  Free inodes: 19201-19456
+Group 76: (Blocks 77825-78848)
+  Block bitmap at 77825 (+0), Inode bitmap at 77826 (+1)
+  Inode table at 77827-77858 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 77859-78848
+  Free inodes: 19457-19712
+Group 77: (Blocks 78849-79872)
+  Block bitmap at 78849 (+0), Inode bitmap at 78850 (+1)
+  Inode table at 78851-78882 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 78883-79872
+  Free inodes: 19713-19968
+Group 78: (Blocks 79873-80896)
+  Block bitmap at 79873 (+0), Inode bitmap at 79874 (+1)
+  Inode table at 79875-79906 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 79907-80896
+  Free inodes: 19969-20224
+Group 79: (Blocks 80897-81920)
+  Block bitmap at 80897 (+0), Inode bitmap at 80898 (+1)
+  Inode table at 80899-80930 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 80931-81920
+  Free inodes: 20225-20480
+Group 80: (Blocks 81921-82944)
+  Block bitmap at 81921 (+0), Inode bitmap at 81922 (+1)
+  Inode table at 81923-81954 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 81955-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-83236 (+260)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 83237-83968
+  Free inodes: 20737-20992
+Group 82: (Blocks 83969-84992)
+  Block bitmap at 83969 (+0), Inode bitmap at 83970 (+1)
+  Inode table at 83971-84002 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 84003-84992
+  Free inodes: 20993-21248
+Group 83: (Blocks 84993-86016)
+  Block bitmap at 84993 (+0), Inode bitmap at 84994 (+1)
+  Inode table at 84995-85026 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 85027-86016
+  Free inodes: 21249-21504
+Group 84: (Blocks 86017-87040)
+  Block bitmap at 86017 (+0), Inode bitmap at 86018 (+1)
+  Inode table at 86019-86050 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 86051-87040
+  Free inodes: 21505-21760
+Group 85: (Blocks 87041-88064)
+  Block bitmap at 87041 (+0), Inode bitmap at 87042 (+1)
+  Inode table at 87043-87074 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 87075-88064
+  Free inodes: 21761-22016
+Group 86: (Blocks 88065-89088)
+  Block bitmap at 88065 (+0), Inode bitmap at 88066 (+1)
+  Inode table at 88067-88098 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 88099-89088
+  Free inodes: 22017-22272
+Group 87: (Blocks 89089-90112)
+  Block bitmap at 89089 (+0), Inode bitmap at 89090 (+1)
+  Inode table at 89091-89122 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 89123-90112
+  Free inodes: 22273-22528
+Group 88: (Blocks 90113-91136)
+  Block bitmap at 90113 (+0), Inode bitmap at 90114 (+1)
+  Inode table at 90115-90146 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 90147-91136
+  Free inodes: 22529-22784
+Group 89: (Blocks 91137-92160)
+  Block bitmap at 91137 (+0), Inode bitmap at 91138 (+1)
+  Inode table at 91139-91170 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 91171-92160
+  Free inodes: 22785-23040
+Group 90: (Blocks 92161-93184)
+  Block bitmap at 92161 (+0), Inode bitmap at 92162 (+1)
+  Inode table at 92163-92194 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 92195-93184
+  Free inodes: 23041-23296
+Group 91: (Blocks 93185-94208)
+  Block bitmap at 93185 (+0), Inode bitmap at 93186 (+1)
+  Inode table at 93187-93218 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 93219-94208
+  Free inodes: 23297-23552
+Group 92: (Blocks 94209-95232)
+  Block bitmap at 94209 (+0), Inode bitmap at 94210 (+1)
+  Inode table at 94211-94242 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 94243-95232
+  Free inodes: 23553-23808
+Group 93: (Blocks 95233-96256)
+  Block bitmap at 95233 (+0), Inode bitmap at 95234 (+1)
+  Inode table at 95235-95266 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 95267-96256
+  Free inodes: 23809-24064
+Group 94: (Blocks 96257-97280)
+  Block bitmap at 96257 (+0), Inode bitmap at 96258 (+1)
+  Inode table at 96259-96290 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 96291-97280
+  Free inodes: 24065-24320
+Group 95: (Blocks 97281-98304)
+  Block bitmap at 97281 (+0), Inode bitmap at 97282 (+1)
+  Inode table at 97283-97314 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 97315-98304
+  Free inodes: 24321-24576
+Group 96: (Blocks 98305-99328)
+  Block bitmap at 98305 (+0), Inode bitmap at 98306 (+1)
+  Inode table at 98307-98338 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 98339-99328
+  Free inodes: 24577-24832
+Group 97: (Blocks 99329-100352)
+  Block bitmap at 99329 (+0), Inode bitmap at 99330 (+1)
+  Inode table at 99331-99362 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 99363-100352
+  Free inodes: 24833-25088
+Group 98: (Blocks 100353-101376)
+  Block bitmap at 100353 (+0), Inode bitmap at 100354 (+1)
+  Inode table at 100355-100386 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 100387-101376
+  Free inodes: 25089-25344
+Group 99: (Blocks 101377-102400)
+  Block bitmap at 101377 (+0), Inode bitmap at 101378 (+1)
+  Inode table at 101379-101410 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 101411-102400
+  Free inodes: 25345-25600
+Group 100: (Blocks 102401-103424)
+  Block bitmap at 102401 (+0), Inode bitmap at 102402 (+1)
+  Inode table at 102403-102434 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 102435-103424
+  Free inodes: 25601-25856
+Group 101: (Blocks 103425-104448)
+  Block bitmap at 103425 (+0), Inode bitmap at 103426 (+1)
+  Inode table at 103427-103458 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 103459-104448
+  Free inodes: 25857-26112
+Group 102: (Blocks 104449-105472)
+  Block bitmap at 104449 (+0), Inode bitmap at 104450 (+1)
+  Inode table at 104451-104482 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 104483-105472
+  Free inodes: 26113-26368
+Group 103: (Blocks 105473-106496)
+  Block bitmap at 105473 (+0), Inode bitmap at 105474 (+1)
+  Inode table at 105475-105506 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 105507-106496
+  Free inodes: 26369-26624
+Group 104: (Blocks 106497-107520)
+  Block bitmap at 106497 (+0), Inode bitmap at 106498 (+1)
+  Inode table at 106499-106530 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 106531-107520
+  Free inodes: 26625-26880
+Group 105: (Blocks 107521-108544)
+  Block bitmap at 107521 (+0), Inode bitmap at 107522 (+1)
+  Inode table at 107523-107554 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 107555-108544
+  Free inodes: 26881-27136
+Group 106: (Blocks 108545-109568)
+  Block bitmap at 108545 (+0), Inode bitmap at 108546 (+1)
+  Inode table at 108547-108578 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 108579-109568
+  Free inodes: 27137-27392
+Group 107: (Blocks 109569-110592)
+  Block bitmap at 109569 (+0), Inode bitmap at 109570 (+1)
+  Inode table at 109571-109602 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 109603-110592
+  Free inodes: 27393-27648
+Group 108: (Blocks 110593-111616)
+  Block bitmap at 110593 (+0), Inode bitmap at 110594 (+1)
+  Inode table at 110595-110626 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 110627-111616
+  Free inodes: 27649-27904
+Group 109: (Blocks 111617-112640)
+  Block bitmap at 111617 (+0), Inode bitmap at 111618 (+1)
+  Inode table at 111619-111650 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 111651-112640
+  Free inodes: 27905-28160
+Group 110: (Blocks 112641-113664)
+  Block bitmap at 112641 (+0), Inode bitmap at 112642 (+1)
+  Inode table at 112643-112674 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 112675-113664
+  Free inodes: 28161-28416
+Group 111: (Blocks 113665-114688)
+  Block bitmap at 113665 (+0), Inode bitmap at 113666 (+1)
+  Inode table at 113667-113698 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 113699-114688
+  Free inodes: 28417-28672
+Group 112: (Blocks 114689-115712)
+  Block bitmap at 114689 (+0), Inode bitmap at 114690 (+1)
+  Inode table at 114691-114722 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 114723-115712
+  Free inodes: 28673-28928
+Group 113: (Blocks 115713-116736)
+  Block bitmap at 115713 (+0), Inode bitmap at 115714 (+1)
+  Inode table at 115715-115746 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 115747-116736
+  Free inodes: 28929-29184
+Group 114: (Blocks 116737-117760)
+  Block bitmap at 116737 (+0), Inode bitmap at 116738 (+1)
+  Inode table at 116739-116770 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 116771-117760
+  Free inodes: 29185-29440
+Group 115: (Blocks 117761-118784)
+  Block bitmap at 117761 (+0), Inode bitmap at 117762 (+1)
+  Inode table at 117763-117794 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 117795-118784
+  Free inodes: 29441-29696
+Group 116: (Blocks 118785-119808)
+  Block bitmap at 118785 (+0), Inode bitmap at 118786 (+1)
+  Inode table at 118787-118818 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 118819-119808
+  Free inodes: 29697-29952
+Group 117: (Blocks 119809-120832)
+  Block bitmap at 119809 (+0), Inode bitmap at 119810 (+1)
+  Inode table at 119811-119842 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 119843-120832
+  Free inodes: 29953-30208
+Group 118: (Blocks 120833-121856)
+  Block bitmap at 120833 (+0), Inode bitmap at 120834 (+1)
+  Inode table at 120835-120866 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 120867-121856
+  Free inodes: 30209-30464
+Group 119: (Blocks 121857-122880)
+  Block bitmap at 121857 (+0), Inode bitmap at 121858 (+1)
+  Inode table at 121859-121890 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 121891-122880
+  Free inodes: 30465-30720
+Group 120: (Blocks 122881-123904)
+  Block bitmap at 122881 (+0), Inode bitmap at 122882 (+1)
+  Inode table at 122883-122914 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 122915-123904
+  Free inodes: 30721-30976
+Group 121: (Blocks 123905-124928)
+  Block bitmap at 123905 (+0), Inode bitmap at 123906 (+1)
+  Inode table at 123907-123938 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 123939-124928
+  Free inodes: 30977-31232
+Group 122: (Blocks 124929-125952)
+  Block bitmap at 124929 (+0), Inode bitmap at 124930 (+1)
+  Inode table at 124931-124962 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 124963-125952
+  Free inodes: 31233-31488
+Group 123: (Blocks 125953-126976)
+  Block bitmap at 125953 (+0), Inode bitmap at 125954 (+1)
+  Inode table at 125955-125986 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 125987-126976
+  Free inodes: 31489-31744
+Group 124: (Blocks 126977-128000)
+  Block bitmap at 126977 (+0), Inode bitmap at 126978 (+1)
+  Inode table at 126979-127010 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 127011-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-128292 (+260)
+  732 free blocks, 256 free inodes, 0 directories
+  Free blocks: 128293-129024
+  Free inodes: 32001-32256
+Group 126: (Blocks 129025-130048)
+  Block bitmap at 129025 (+0), Inode bitmap at 129026 (+1)
+  Inode table at 129027-129058 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 129059-130048
+  Free inodes: 32257-32512
+Group 127: (Blocks 130049-131072)
+  Block bitmap at 130049 (+0), Inode bitmap at 130050 (+1)
+  Inode table at 130051-130082 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 130083-131072
+  Free inodes: 32513-32768
+Group 128: (Blocks 131073-132096)
+  Block bitmap at 131073 (+0), Inode bitmap at 131074 (+1)
+  Inode table at 131075-131106 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 131107-132096
+  Free inodes: 32769-33024
+Group 129: (Blocks 132097-133120)
+  Block bitmap at 132097 (+0), Inode bitmap at 132098 (+1)
+  Inode table at 132099-132130 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 132131-133120
+  Free inodes: 33025-33280
+Group 130: (Blocks 133121-134144)
+  Block bitmap at 133121 (+0), Inode bitmap at 133122 (+1)
+  Inode table at 133123-133154 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 133155-134144
+  Free inodes: 33281-33536
+Group 131: (Blocks 134145-135168)
+  Block bitmap at 134145 (+0), Inode bitmap at 134146 (+1)
+  Inode table at 134147-134178 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 134179-135168
+  Free inodes: 33537-33792
+Group 132: (Blocks 135169-136192)
+  Block bitmap at 135169 (+0), Inode bitmap at 135170 (+1)
+  Inode table at 135171-135202 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 135203-136192
+  Free inodes: 33793-34048
+Group 133: (Blocks 136193-137216)
+  Block bitmap at 136193 (+0), Inode bitmap at 136194 (+1)
+  Inode table at 136195-136226 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 136227-137216
+  Free inodes: 34049-34304
+Group 134: (Blocks 137217-138240)
+  Block bitmap at 137217 (+0), Inode bitmap at 137218 (+1)
+  Inode table at 137219-137250 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 137251-138240
+  Free inodes: 34305-34560
+Group 135: (Blocks 138241-139264)
+  Block bitmap at 138241 (+0), Inode bitmap at 138242 (+1)
+  Inode table at 138243-138274 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 138275-139264
+  Free inodes: 34561-34816
+Group 136: (Blocks 139265-140288)
+  Block bitmap at 139265 (+0), Inode bitmap at 139266 (+1)
+  Inode table at 139267-139298 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 139299-140288
+  Free inodes: 34817-35072
+Group 137: (Blocks 140289-141312)
+  Block bitmap at 140289 (+0), Inode bitmap at 140290 (+1)
+  Inode table at 140291-140322 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 140323-141312
+  Free inodes: 35073-35328
+Group 138: (Blocks 141313-142336)
+  Block bitmap at 141313 (+0), Inode bitmap at 141314 (+1)
+  Inode table at 141315-141346 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 141347-142336
+  Free inodes: 35329-35584
+Group 139: (Blocks 142337-143360)
+  Block bitmap at 142337 (+0), Inode bitmap at 142338 (+1)
+  Inode table at 142339-142370 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 142371-143360
+  Free inodes: 35585-35840
+Group 140: (Blocks 143361-144384)
+  Block bitmap at 143361 (+0), Inode bitmap at 143362 (+1)
+  Inode table at 143363-143394 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 143395-144384
+  Free inodes: 35841-36096
+Group 141: (Blocks 144385-145408)
+  Block bitmap at 144385 (+0), Inode bitmap at 144386 (+1)
+  Inode table at 144387-144418 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 144419-145408
+  Free inodes: 36097-36352
+Group 142: (Blocks 145409-146432)
+  Block bitmap at 145409 (+0), Inode bitmap at 145410 (+1)
+  Inode table at 145411-145442 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 145443-146432
+  Free inodes: 36353-36608
+Group 143: (Blocks 146433-147456)
+  Block bitmap at 146433 (+0), Inode bitmap at 146434 (+1)
+  Inode table at 146435-146466 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 146467-147456
+  Free inodes: 36609-36864
+Group 144: (Blocks 147457-148480)
+  Block bitmap at 147457 (+0), Inode bitmap at 147458 (+1)
+  Inode table at 147459-147490 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 147491-148480
+  Free inodes: 36865-37120
+Group 145: (Blocks 148481-149504)
+  Block bitmap at 148481 (+0), Inode bitmap at 148482 (+1)
+  Inode table at 148483-148514 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 148515-149504
+  Free inodes: 37121-37376
+Group 146: (Blocks 149505-150528)
+  Block bitmap at 149505 (+0), Inode bitmap at 149506 (+1)
+  Inode table at 149507-149538 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 149539-150528
+  Free inodes: 37377-37632
+Group 147: (Blocks 150529-151552)
+  Block bitmap at 150529 (+0), Inode bitmap at 150530 (+1)
+  Inode table at 150531-150562 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 150563-151552
+  Free inodes: 37633-37888
+Group 148: (Blocks 151553-152576)
+  Block bitmap at 151553 (+0), Inode bitmap at 151554 (+1)
+  Inode table at 151555-151586 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 151587-152576
+  Free inodes: 37889-38144
+Group 149: (Blocks 152577-153600)
+  Block bitmap at 152577 (+0), Inode bitmap at 152578 (+1)
+  Inode table at 152579-152610 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 152611-153600
+  Free inodes: 38145-38400
+Group 150: (Blocks 153601-154624)
+  Block bitmap at 153601 (+0), Inode bitmap at 153602 (+1)
+  Inode table at 153603-153634 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 153635-154624
+  Free inodes: 38401-38656
+Group 151: (Blocks 154625-155648)
+  Block bitmap at 154625 (+0), Inode bitmap at 154626 (+1)
+  Inode table at 154627-154658 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 154659-155648
+  Free inodes: 38657-38912
+Group 152: (Blocks 155649-156672)
+  Block bitmap at 155649 (+0), Inode bitmap at 155650 (+1)
+  Inode table at 155651-155682 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 155683-156672
+  Free inodes: 38913-39168
+Group 153: (Blocks 156673-157696)
+  Block bitmap at 156673 (+0), Inode bitmap at 156674 (+1)
+  Inode table at 156675-156706 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 156707-157696
+  Free inodes: 39169-39424
+Group 154: (Blocks 157697-158720)
+  Block bitmap at 157697 (+0), Inode bitmap at 157698 (+1)
+  Inode table at 157699-157730 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 157731-158720
+  Free inodes: 39425-39680
+Group 155: (Blocks 158721-159744)
+  Block bitmap at 158721 (+0), Inode bitmap at 158722 (+1)
+  Inode table at 158723-158754 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 158755-159744
+  Free inodes: 39681-39936
+Group 156: (Blocks 159745-160768)
+  Block bitmap at 159745 (+0), Inode bitmap at 159746 (+1)
+  Inode table at 159747-159778 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 159779-160768
+  Free inodes: 39937-40192
+Group 157: (Blocks 160769-161792)
+  Block bitmap at 160769 (+0), Inode bitmap at 160770 (+1)
+  Inode table at 160771-160802 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 160803-161792
+  Free inodes: 40193-40448
+Group 158: (Blocks 161793-162816)
+  Block bitmap at 161793 (+0), Inode bitmap at 161794 (+1)
+  Inode table at 161795-161826 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 161827-162816
+  Free inodes: 40449-40704
+Group 159: (Blocks 162817-163840)
+  Block bitmap at 162817 (+0), Inode bitmap at 162818 (+1)
+  Inode table at 162819-162850 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 162851-163840
+  Free inodes: 40705-40960
+Group 160: (Blocks 163841-164864)
+  Block bitmap at 163841 (+0), Inode bitmap at 163842 (+1)
+  Inode table at 163843-163874 (+2)
+  990 free blocks, 256 free inodes, 0 directories
+  Free blocks: 163875-164864
+  Free inodes: 40961-41216
+Group 161: (Blocks 164865-165535)
+  Block bitmap at 164865 (+0), Inode bitmap at 164866 (+1)
+  Inode table at 164867-164898 (+2)
+  637 free blocks, 256 free inodes, 0 directories
+  Free blocks: 164899-165535
+  Free inodes: 41217-41472
diff --git a/e2fsprogs/tests/r_resize_inode/name b/e2fsprogs/tests/r_resize_inode/name
new file mode 100644
index 0000000..2783baf
--- /dev/null
+++ b/e2fsprogs/tests/r_resize_inode/name
@@ -0,0 +1,2 @@
+filesystem resize with a resize_inode present
+
diff --git a/e2fsprogs/tests/r_resize_inode/script b/e2fsprogs/tests/r_resize_inode/script
new file mode 100644
index 0000000..0f12138
--- /dev/null
+++ b/e2fsprogs/tests/r_resize_inode/script
@@ -0,0 +1,101 @@
+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
+
+cp /dev/null $OUT
+
+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
+$MKE2FS -q -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 16384 2>&1 |
+	sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
+
+echo resize2fs test.img 65536 >> $OUT
+$RESIZE2FS $TMPFILE 65536 2>&1 |
+	sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
+
+$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 -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
+rm -f $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
+$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+
+echo "--------------------------------" >> $OUT
+
+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
+$MKE2FS -q -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 65536 2>&1 |
+	sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
+
+echo resize2fs test.img 16384 >> $OUT
+$RESIZE2FS $TMPFILE 16384 2>&1 |
+	sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
+
+$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 -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
+rm -f $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
+$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+
+echo "--------------------------------" >> $OUT
+
+echo resize2fs test.img 165536 >> $OUT
+$RESIZE2FS $TMPFILE 165536 2>&1 |
+	sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
+
+$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 -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
+rm -f $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
+$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $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
+
+else #if test -x $RESIZE2FS; then
+	echo "$test_name: $test_description: skipped"
+fi 
diff --git a/e2fsprogs/tests/run_e2fsck b/e2fsprogs/tests/run_e2fsck
new file mode 100644
index 0000000..5f28d92
--- /dev/null
+++ b/e2fsprogs/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 -e "s;$TMPFILE;test.img;" $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 -e "s;$TMPFILE;test.img;" $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/e2fsprogs/tests/run_mke2fs b/e2fsprogs/tests/run_mke2fs
new file mode 100644
index 0000000..82eca41
--- /dev/null
+++ b/e2fsprogs/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 -e "s;$TMPFILE;test.img;" > $OUT1;
+	$DEBUGFS -R features $TMPFILE 2>&1 |
+	sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $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"
+fi 
+
+unset DESCRIPTION FS_SIZE MKE2FS_OPTS MKE2FS_SKIP_PROGRESS \
+	MKE2FS_DEVICE_SECTSIZE
diff --git a/e2fsprogs/tests/scripts/mkdup b/e2fsprogs/tests/scripts/mkdup
new file mode 100755
index 0000000..c48a9f0
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/scripts/resize_test b/e2fsprogs/tests/scripts/resize_test
new file mode 100755
index 0000000..6a8b0e9
--- /dev/null
+++ b/e2fsprogs/tests/scripts/resize_test
@@ -0,0 +1,155 @@
+#!/bin/sh
+
+resize_test () {
+
+rm -f $TMPFILE
+touch $TMPFILE
+
+# Verify that the $TMP filesystem handles $SIZE_2 sparse files.
+# If that fails, try the local filesystem instead.
+if truncate -s $SIZE_2 $TMPFILE 2> /dev/null; then
+        > $TMPFILE
+else
+	rm $TMPFILE
+	export TMPFILE=$(TMPDIR=. mktemp -t $test_name.XXXXXX.tmp)
+	touch $TMPFILE
+	if ! truncate -s $SIZE_2 $TMPFILE 2> /dev/null; then
+		rm $TMPFILE
+		return 111
+	fi
+fi
+
+echo $MKE2FS $FEATURES -qF $TMPFILE $SIZE_1 > $LOG
+$MKE2FS $FEATURES -qF $TMPFILE $SIZE_1 >> $LOG
+
+OUT_TMP=$(mktemp -t 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 
+
+echo $RESIZE2FS $RESIZE2FS_OPTS -d 31 $TMPFILE $SIZE_2 >> $LOG 2>&1
+if ! $RESIZE2FS $RESIZE2FS_OPTS -d 31 $TMPFILE $SIZE_2 >> $LOG 2>&1
+then
+	return 1
+fi
+
+echo $FSCK -fp $TMPFILE >> $LOG 2>&1 
+if ! $FSCK -fp $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 31 -M $TMPFILE $SIZE_2 >> $LOG 2>&1
+if ! $RESIZE2FS $RESIZE2FS_OPTS -d 31 -M $TMPFILE $SIZE_2 >> $LOG 2>&1
+then
+	return 1
+fi
+
+echo $FSCK -fp $TMPFILE >> $LOG 2>&1 
+if ! $FSCK -fp $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 31 -M $TMPFILE $SIZE_2 >> $LOG 2>&1
+if ! $RESIZE2FS $RESIZE2FS_OPTS -d 31 -M $TMPFILE $SIZE_2 >> $LOG 2>&1
+then
+	return 1
+fi
+
+echo $FSCK -fp $TMPFILE >> $LOG 2>&1 
+if ! $FSCK -fp $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 31 -M $TMPFILE $SIZE_2 >> $LOG 2>&1
+if ! $RESIZE2FS $RESIZE2FS_OPTS -d 31 -M $TMPFILE $SIZE_2 >> $LOG 2>&1
+then
+	return 1
+fi
+
+echo $FSCK -fp $TMPFILE >> $LOG 2>&1 
+if ! $FSCK -fp $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
+
+if test "$CSUM_1" != "$CSUM_2"
+then
+	return 1
+fi
+
+rm $TMPFILE
+return 0
+
+}
diff --git a/e2fsprogs/tests/t_ext_jnl_rm/script b/e2fsprogs/tests/t_ext_jnl_rm/script
new file mode 100644
index 0000000..b2af80c
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/t_mmp_1on/name b/e2fsprogs/tests/t_mmp_1on/name
new file mode 100644
index 0000000..62e16b2
--- /dev/null
+++ b/e2fsprogs/tests/t_mmp_1on/name
@@ -0,0 +1 @@
+enable MMP using tune2fs
diff --git a/e2fsprogs/tests/t_mmp_1on/script b/e2fsprogs/tests/t_mmp_1on/script
new file mode 100644
index 0000000..8fc8158
--- /dev/null
+++ b/e2fsprogs/tests/t_mmp_1on/script
@@ -0,0 +1,39 @@
+FSCK_OPT=-yf
+
+TMPFILE=$test_name.tmp
+> $TMPFILE
+
+stat -f $TMPFILE | grep -q "Type: tmpfs"
+if [ $? = 0 ] ; then
+	rm -f $TMPFILE
+	echo "$test_name: $test_description: skipped for tmpfs (no O_DIRECT)"
+	return 0
+fi
+
+$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/e2fsprogs/tests/t_mmp_2off/name b/e2fsprogs/tests/t_mmp_2off/name
new file mode 100644
index 0000000..d7cac51
--- /dev/null
+++ b/e2fsprogs/tests/t_mmp_2off/name
@@ -0,0 +1 @@
+disable MMP using tune2fs
diff --git a/e2fsprogs/tests/t_mmp_2off/script b/e2fsprogs/tests/t_mmp_2off/script
new file mode 100644
index 0000000..1dee14e
--- /dev/null
+++ b/e2fsprogs/tests/t_mmp_2off/script
@@ -0,0 +1,39 @@
+FSCK_OPT=-yf
+
+TMPFILE=$test_name.tmp
+> $TMPFILE
+
+stat -f $TMPFILE | grep -q "Type: tmpfs"
+if [ $? = 0 ]; then
+	rm -f $TMPFILE
+	echo "$test_name: $test_description: skipped for tmpfs (no O_DIRECT)"
+	return 0
+fi
+
+$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/e2fsprogs/tests/t_quota_1on/name b/e2fsprogs/tests/t_quota_1on/name
new file mode 100644
index 0000000..f92e2d5
--- /dev/null
+++ b/e2fsprogs/tests/t_quota_1on/name
@@ -0,0 +1 @@
+enable quota using tune2fs
diff --git a/e2fsprogs/tests/t_quota_1on/script b/e2fsprogs/tests/t_quota_1on/script
new file mode 100644
index 0000000..ed17f33
--- /dev/null
+++ b/e2fsprogs/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 -f /dev/stdin $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/e2fsprogs/tests/t_quota_2off/name b/e2fsprogs/tests/t_quota_2off/name
new file mode 100644
index 0000000..bb0ec98
--- /dev/null
+++ b/e2fsprogs/tests/t_quota_2off/name
@@ -0,0 +1 @@
+disable quota using tune2fs
diff --git a/e2fsprogs/tests/t_quota_2off/script b/e2fsprogs/tests/t_quota_2off/script
new file mode 100644
index 0000000..b170c59
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/test_config b/e2fsprogs/tests/test_config
new file mode 100644
index 0000000..6789656
--- /dev/null
+++ b/e2fsprogs/tests/test_config
@@ -0,0 +1,38 @@
+#
+# 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="../debugfs/debugfs"
+RESIZE2FS_EXE="../resize/resize2fs"
+RESIZE2FS="$USE_VALGRIND $RESIZE2FS_EXE"
+E2UNDO_EXE="../misc/e2undo"
+TEST_REL=../tests/progs/test_rel
+TEST_ICOUNT=../tests/progs/test_icount
+CRCSUM=../tests/progs/crcsum
+LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss
+DYLD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss
+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
+E2FSPROGS_SKIP_PROGRESS=yes
+export E2FSPROGS_SKIP_PROGRESS
+EXT2FS_NO_MTAB_OK=yes
+export EXT2FS_NO_MTAB_OK
diff --git a/e2fsprogs/tests/test_one.in b/e2fsprogs/tests/test_one.in
new file mode 100644
index 0000000..d053fd7
--- /dev/null
+++ b/e2fsprogs/tests/test_one.in
@@ -0,0 +1,69 @@
+#!/bin/sh
+# run a single regression test
+
+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;
+	;;
+esac
+
+case "$1" in
+    *.failed|*.new|*.ok|*.log|*.tmp)	exit 0 ;;
+esac
+
+test_dir=$1
+cmd_dir=$SRCDIR
+
+if test "$TEST_CONFIG"x = x; then
+	TEST_CONFIG=$SRCDIR/test_config
+fi
+
+. $TEST_CONFIG
+
+TMPFILE=$(mktemp -t e2fsprogs-tmp.XXXXXX)
+
+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
+
+rm -f $test_name.ok $test_name.failed
+#echo -e -n "$test_name: $test_description:\r"
+
+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
+	[ -f $test_name.failed ] && cat $test_name.failed
+fi
+
+if [ "$SKIP_UNLINK" != "true" ] ; then
+	rm -f $TMPFILE
+fi
+
diff --git a/e2fsprogs/tests/test_post b/e2fsprogs/tests/test_post
new file mode 100755
index 0000000..1251266
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/tests/test_script.in b/e2fsprogs/tests/test_script.in
new file mode 100644
index 0000000..41ad104
--- /dev/null
+++ b/e2fsprogs/tests/test_script.in
@@ -0,0 +1,32 @@
+#!/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;
+	;;
+esac
+
+if test "$1"x = x ; then
+  TESTS=`ls -d $SRCDIR/[a-zA-Z]_*`
+else
+  TESTS=
+  for i; do
+    case $i in
+	[a-zA-Z])	TESTS="$TESTS $SRCDIR/${i}_*" ;;
+	*)		TESTS="$TESTS $SRCDIR/$i" ;;
+    esac
+  done
+fi
+
+for test_dir in $TESTS; do
+	./test_one $test_dir
+done
+
+$SRCDIR/test_post
diff --git a/e2fsprogs/tests/u_mke2fs/script b/e2fsprogs/tests/u_mke2fs/script
new file mode 100644
index 0000000..fcf5eae
--- /dev/null
+++ b/e2fsprogs/tests/u_mke2fs/script
@@ -0,0 +1,34 @@
+test_description="e2undo with mke2fs"
+if test -x $E2UNDO_EXE; then
+
+E2FSPROGS_UNDO_DIR=/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
+md5=`md5sum $TMPFILE | cut -d " " -f 1`
+echo md5sum before mke2fs $md5 >> $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_md5=`md5sum $TMPFILE | cut -d " " -f 1`
+echo md5sum after mke2fs $new_md5 >> $OUT
+
+$E2UNDO_EXE  $TDB_FILE $TMPFILE  >> $OUT 2>&1
+new_md5=`md5sum $TMPFILE | cut -d " " -f 1`
+echo md5sum after e2undo $new_md5 >> $OUT
+
+if [ $md5 = $new_md5 ]; 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/e2fsprogs/tests/u_tune2fs/script b/e2fsprogs/tests/u_tune2fs/script
new file mode 100644
index 0000000..4cc1e0c
--- /dev/null
+++ b/e2fsprogs/tests/u_tune2fs/script
@@ -0,0 +1,34 @@
+test_description="e2undo with tune2fs"
+if test -x $E2UNDO_EXE; then
+
+E2FSPROGS_UNDO_DIR=/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
+md5=`md5sum $TMPFILE | cut -d " " -f 1`
+echo md5sum before tune2fs $md5 >> $OUT
+
+echo using tune2fs to test e2undo >> $OUT
+$TUNE2FS -I 256 $TMPFILE  >> $OUT 2>&1
+new_md5=`md5sum $TMPFILE | cut -d " " -f 1`
+echo md5sum after tune2fs $new_md5 >> $OUT
+
+$E2UNDO_EXE  $TDB_FILE $TMPFILE  >> $OUT 2>&1
+new_md5=`md5sum $TMPFILE | cut -d " " -f 1`
+echo md5sum after e2undo $new_md5 >> $OUT
+
+if [ $md5 = $new_md5 ]; 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/e2fsprogs/util/Makefile.in b/e2fsprogs/util/Makefile.in
new file mode 100644
index 0000000..76c3f88
--- /dev/null
+++ b/e2fsprogs/util/Makefile.in
@@ -0,0 +1,61 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = util
+INSTALL = @INSTALL@
+
+SRCS = $(srcdir)/subst.c
+
+@MCONFIG@
+
+.c.o:
+	$(E) "	CC $<"
+	$(Q) $(BUILD_CC) -c $(BUILD_CFLAGS) $< -o $@
+	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+
+PROGS=		subst symlinks
+
+all:: $(PROGS) gen-tarball
+
+subst: subst.o
+	$(E) "	LD $@"
+	$(Q) $(BUILD_CC) $(BUILD_LDFLAGS) -o subst subst.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
+
+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
diff --git a/e2fsprogs/util/Makefile.pq b/e2fsprogs/util/Makefile.pq
new file mode 100644
index 0000000..ccde118
--- /dev/null
+++ b/e2fsprogs/util/Makefile.pq
@@ -0,0 +1,10 @@
+TOPSRC=..
+
+!include $(TOPSRC)\powerquest\MCONFIG
+
+ALL:: libecho.exe
+
+libecho.exe: libecho.c
+
+clean:: 
+	$(RM) libecho.exe
diff --git a/e2fsprogs/util/all.exclude b/e2fsprogs/util/all.exclude
new file mode 100644
index 0000000..d7d03b2
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/util/copy_sparse.c b/e2fsprogs/util/copy_sparse.c
new file mode 100644
index 0000000..cbab273
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/util/gcc-wall-cleanup b/e2fsprogs/util/gcc-wall-cleanup
new file mode 100644
index 0000000..6148e46
--- /dev/null
+++ b/e2fsprogs/util/gcc-wall-cleanup
@@ -0,0 +1,22 @@
+#!/bin/sed -f
+#
+# This script filters out gcc-wall crud that we're not interested in seeing.
+#
+/^cc /d
+/^kcc /d
+/^gcc /d
+/does not support `long long'/d
+/forbids long long integer constants/d
+/does not support the `ll' length modifier/d
+/does not support the `ll' printf length modifier/d
+/ANSI C forbids long long integer constants/d
+/traditional C rejects string concatenation/d
+/integer constant is unsigned in ANSI C, signed with -traditional/d
+/At top level:/d
+/In file included from/d
+/In function `.*':/d
+/zero-length format string/d
+/warning: missing initializer/d
+/warning: (near initialization for/d
+/^[ 	]*from/d
+
diff --git a/e2fsprogs/util/gen-tarball.in b/e2fsprogs/util/gen-tarball.in
new file mode 100644
index 0000000..b82f12c
--- /dev/null
+++ b/e2fsprogs/util/gen-tarball.in
@@ -0,0 +1,56 @@
+#!/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 '~' chracters 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"
+	rename_tarball="e2fsprogs_@E2FSPROGS_PKGVER@.orig.tar.gz"
+	list=all
+	;;
+    subset)
+	SRCROOT="e2fsprogs-libs-$base_ver"
+	list=subset
+	;;
+   all|*)
+	SRCROOT="e2fsprogs-$base_ver"
+	list=all
+	;;
+esac
+
+mv ../e2fsprogs.spec $top_srcdir/e2fsprogs.spec
+(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) | sed -e "s/^$base_e2fsprogs/$SRCROOT/" > $exclude
+sed -e "s;^;$SRCROOT/;" < $srcdir/$list.exclude >> $exclude
+
+(cd $top_srcdir/.. ; rm -f $SRCROOT ; ln -sf $base_e2fsprogs $SRCROOT)
+
+(cd $top_srcdir/.. ; tar -c -h -v -f - -X $exclude $SRCROOT) \
+	 | $GZIP -9 -c > $SRCROOT.tar.gz
+$GZIP -l $SRCROOT.tar.gz
+
+(cd $top_srcdir/.. ; rm -f $SRCROOT)
+mv $top_srcdir/e2fsprogs.spec ../e2fsprogs.spec 
+if test -n "$rename_tarball"; then
+    mv $SRCROOT.tar.gz $rename_tarball
+fi
diff --git a/e2fsprogs/util/install-symlink.in b/e2fsprogs/util/install-symlink.in
new file mode 100644
index 0000000..24341b8
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/util/libecho.c b/e2fsprogs/util/libecho.c
new file mode 100644
index 0000000..352ce1e
--- /dev/null
+++ b/e2fsprogs/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/e2fsprogs/util/subset.exclude b/e2fsprogs/util/subset.exclude
new file mode 100644
index 0000000..b988fa8
--- /dev/null
+++ b/e2fsprogs/util/subset.exclude
@@ -0,0 +1,35 @@
+.git
+.hg
+.hgignore
+.pc
+patches
+build
+build[^/]*
+rpm.log
+TODO
+powerquest
+.exclude-subset
+po/stamp-cat-id
+po/cat-id-tbl.c
+Meta
+e2fsck
+ext2ed
+debugfs
+misc
+tests
+resize
+contrib
+po
+include
+debian
+lib/e2p
+lib/evms
+lib/ext2fs
+ABOUT-NLS
+README
+INSTALL
+INSTALL.dllbin
+INSTALL.elfbin
+RELEASE-NOTES
+e2fsprogs.lsm
+e2fsprogs.spec
diff --git a/e2fsprogs/util/subst.c b/e2fsprogs/util/subst.c
new file mode 100644
index 0000000..20dd6f2
--- /dev/null
+++ b/e2fsprogs/util/subst.c
@@ -0,0 +1,400 @@
+/*
+ * subst.c --- substitution program
+ *
+ * Subst is used as a quicky program to do @ substitutions
+ *
+ */
+
+#include <stdio.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <time.h>
+#include <utime.h>
+
+#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(const char *outfn, const char *newfn)
+{
+	FILE	*old_f, *new_f;
+	char	oldbuf[2048], newbuf[2048], *oldcp, *newcp;
+	int	retval;
+
+	old_f = fopen(outfn, "r");
+	if (!old_f)
+		return 0;
+	new_f = fopen(newfn, "r");
+	if (!new_f) {
+		fclose(old_f);
+		return 0;
+	}
+
+	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;
+		}
+	}
+	fclose(old_f);
+	fclose(new_f);
+	return retval;
+}
+
+
+
+int main(int argc, char **argv)
+{
+	char	line[2048];
+	int	c;
+	FILE	*in, *out;
+	char	*outfn = NULL, *newfn = NULL;
+	int	verbose = 0;
+	int	adjust_timestamp = 0;
+	struct stat stbuf;
+	struct utimbuf ut;
+
+	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");
+		out = fopen(newfn, "w");
+		if (!out) {
+			perror(newfn);
+			exit(1);
+		}
+	} else {
+		out = stdout;
+		outfn = 0;
+	}
+
+	while (!feof(in)) {
+		if (fgets(line, sizeof(line), in) == NULL)
+			break;
+		substitute_line(line);
+		fputs(line, out);
+	}
+	fclose(in);
+	fclose(out);
+	if (outfn) {
+		struct stat st;
+		if (compare_file(outfn, newfn)) {
+			if (verbose)
+				printf("No change, keeping %s.\n", outfn);
+			if (adjust_timestamp) {
+				if (stat(outfn, &stbuf) == 0) {
+					if (verbose)
+						printf("Updating modtime for %s\n", outfn);
+					ut.actime = stbuf.st_atime;
+					ut.modtime = time(0);
+					if (utime(outfn, &ut) < 0)
+						perror("utime");
+				}
+			}
+			unlink(newfn);
+		} else {
+			if (verbose)
+				printf("Creating or replacing %s.\n", outfn);
+			rename(newfn, outfn);
+		}
+		/* set read-only to alert user it is a generated file */
+		if (stat(outfn, &st) == 0)
+			chmod(outfn, st.st_mode & ~0222);
+	}
+	return (0);
+}
+
+
diff --git a/e2fsprogs/util/subst.conf.in b/e2fsprogs/util/subst.conf.in
new file mode 100644
index 0000000..64fde7a
--- /dev/null
+++ b/e2fsprogs/util/subst.conf.in
@@ -0,0 +1,22 @@
+AWK			@AWK@
+SED			@SED@
+ET_DIR			@ET_DIR@
+SS_DIR			@SS_DIR@
+E2FSPROGS_MONTH		@E2FSPROGS_MONTH@
+E2FSPROGS_YEAR		@E2FSPROGS_YEAR@
+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 documentation for quota feature in mke2fs
+QUOTA_MAN_COMMENT	@QUOTA_MAN_COMMENT@
diff --git a/e2fsprogs/util/symlinks.c b/e2fsprogs/util/symlinks.c
new file mode 100644
index 0000000..abb33f8
--- /dev/null
+++ b/e2fsprogs/util/symlinks.c
@@ -0,0 +1,387 @@
+#define _FILE_OFFSET_BITS 64
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
+#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 occurance 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) {
+		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/e2fsprogs/version.h b/e2fsprogs/version.h
new file mode 100644
index 0000000..2d19201
--- /dev/null
+++ b/e2fsprogs/version.h
@@ -0,0 +1,11 @@
+/*
+ * 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 by Theodore Ts'o.  This
+ * file may be redistributed under the GNU Public License v2.
+ */
+
+#define E2FSPROGS_VERSION "1.42.9"
+#define E2FSPROGS_DATE "28-Dec-2013"
diff --git a/e2fsprogs/wordwrap.pl b/e2fsprogs/wordwrap.pl
new file mode 100644
index 0000000..807c628
--- /dev/null
+++ b/e2fsprogs/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");
+}