[Debootloaders-devel] r35 - in trunk/yaboot: . doc doc/examples
doc/yaboot-howto.html etc first include include/asm
include/et include/ext2fs include/linux include/reiserfs
include/xfs lib lib/e2fsprogs-1.27 lib/e2fsprogs-1.27/contrib
lib/e2fsprogs-1.27/debian lib/e2fsprogs-1.27/debian/attic
lib/e2fsprogs-1.27/debian/attic/libs
lib/e2fsprogs-1.27/debugfs lib/e2fsprogs-1.27/doc
lib/e2fsprogs-1.27/e2fsck lib/e2fsprogs-1.27/include
lib/e2fsprogs-1.27/include/nonunix
lib/e2fsprogs-1.27/include/nonunix/asm
lib/e2fsprogs-1.27/include/nonunix/linux
lib/e2fsprogs-1.27/include/nonunix/sys
lib/e2fsprogs-1.27/install-utils lib/e2fsprogs-1.27/intl
lib/e2fsprogs-1.27/lib lib/e2fsprogs-1.27/lib/e2p
lib/e2fsprogs-1.27/lib/e2p/dll lib/e2fsprogs-1.27/lib/et
lib/e2fsprogs-1.27/lib/et/dll lib/e2fsprogs-1.27/lib/ext2fs
lib/e2fsprogs-1.27/lib/ext2fs/dll lib/e2fsprogs-1.27/lib/ss
lib/e2fsprogs-1.27/lib/ss/dll lib/e2fsprogs-1.27/lib/uuid
lib/e2fsprogs-1.27/lib/uuid/dll lib/e2fsprogs-1.27/misc
lib/e2fsprogs-1.27/po lib/e2fsprogs-1.27/resize
lib/e2fsprogs-1.27/tests lib/e2fsprogs-1.27/tests/d_loaddump
lib/e2fsprogs-1.27/tests/defaults
lib/e2fsprogs-1.27/tests/e_brel_bma
lib/e2fsprogs-1.27/tests/e_icount_normal
lib/e2fsprogs-1.27/tests/e_icount_opt
lib/e2fsprogs-1.27/tests/e_irel_ima
lib/e2fsprogs-1.27/tests/f_bad_local_jnl
lib/e2fsprogs-1.27/tests/f_badbblocks
lib/e2fsprogs-1.27/tests/f_baddir
lib/e2fsprogs-1.27/tests/f_baddotdir
lib/e2fsprogs-1.27/tests/f_badinode
lib/e2fsprogs-1.27/tests/f_badorphan
lib/e2fsprogs-1.27/tests/f_badprimary
lib/e2fsprogs-1.27/tests/f_badroot
lib/e2fsprogs-1.27/tests/f_badsymlinks
lib/e2fsprogs-1.27/tests/f_badtable
lib/e2fsprogs-1.27/tests/f_bbfile lib/e2fsprogs-1.27/tests/f_bbinode
lib/e2fsprogs-1.27/tests/f_bitmaps
lib/e2fsprogs-1.27/tests/f_crashdisk
lib/e2fsprogs-1.27/tests/f_dirlink lib/e2fsprogs-1.27/tests/f_dup
lib/e2fsprogs-1.27/tests/f_dup2 lib/e2fsprogs-1.27/tests/f_dup3
lib/e2fsprogs-1.27/tests/f_dupdot
lib/e2fsprogs-1.27/tests/f_dupfsblks
lib/e2fsprogs-1.27/tests/f_dupsuper
lib/e2fsprogs-1.27/tests/f_end-bitmap
lib/e2fsprogs-1.27/tests/f_expand
lib/e2fsprogs-1.27/tests/f_ext_journal
lib/e2fsprogs-1.27/tests/f_extra_journal
lib/e2fsprogs-1.27/tests/f_filetype
lib/e2fsprogs-1.27/tests/f_holedir lib/e2fsprogs-1.27/tests/f_hurd
lib/e2fsprogs-1.27/tests/f_illbbitmap
lib/e2fsprogs-1.27/tests/f_illibitmap
lib/e2fsprogs-1.27/tests/f_illitable
lib/e2fsprogs-1.27/tests/f_imagic
lib/e2fsprogs-1.27/tests/f_imagic_fs
lib/e2fsprogs-1.27/tests/f_journal
lib/e2fsprogs-1.27/tests/f_lotsbad lib/e2fsprogs-1.27/tests/f_lpf
lib/e2fsprogs-1.27/tests/f_lpffile
lib/e2fsprogs-1.27/tests/f_messy_inode
lib/e2fsprogs-1.27/tests/f_miss_blk_bmap
lib/e2fsprogs-1.27/tests/f_miss_journal
lib/e2fsprogs-1.27/tests/f_misstable
lib/e2fsprogs-1.27/tests/f_mke2fs2b
lib/e2fsprogs-1.27/tests/f_noroot lib/e2fsprogs-1.27/tests/f_okgroup
lib/e2fsprogs-1.27/tests/f_orphan
lib/e2fsprogs-1.27/tests/f_overfsblks
lib/e2fsprogs-1.27/tests/f_preen
lib/e2fsprogs-1.27/tests/f_recnect_bad
lib/e2fsprogs-1.27/tests/f_reconnect
lib/e2fsprogs-1.27/tests/f_swapfs
lib/e2fsprogs-1.27/tests/f_zero_group
lib/e2fsprogs-1.27/tests/f_zero_super lib/e2fsprogs-1.27/tests/progs
lib/e2fsprogs-1.27/tests/progs/test_data
lib/e2fsprogs-1.27/util man second util ybin
Aurélien GÉRÔME
ag-guest at costa.debian.org
Mon Jul 10 20:53:27 UTC 2006
Author: ag-guest
Date: 2006-07-10 20:52:46 +0000 (Mon, 10 Jul 2006)
New Revision: 35
Added:
trunk/yaboot/BUGS
trunk/yaboot/COPYING
trunk/yaboot/ChangeLog
trunk/yaboot/Config
trunk/yaboot/INSTALL
trunk/yaboot/Makefile
trunk/yaboot/README
trunk/yaboot/README.man.patch
trunk/yaboot/THANKS
trunk/yaboot/TODO
trunk/yaboot/changelog
trunk/yaboot/doc/
trunk/yaboot/doc/Makefile
trunk/yaboot/doc/README.ofboot
trunk/yaboot/doc/README.ofpath
trunk/yaboot/doc/README.rs6000
trunk/yaboot/doc/examples/
trunk/yaboot/doc/examples/README.dualboot.chrp
trunk/yaboot/doc/examples/README.mbicons
trunk/yaboot/doc/examples/README.simpleboot.chrp
trunk/yaboot/doc/examples/dualboot.chrp
trunk/yaboot/doc/examples/large-penguin.mbicon
trunk/yaboot/doc/examples/simpleboot.chrp
trunk/yaboot/doc/examples/yaboot.conf.multi-boot
trunk/yaboot/doc/examples/yaboot.conf.rs6000
trunk/yaboot/doc/yaboot-howto.de.sgml
trunk/yaboot/doc/yaboot-howto.html/
trunk/yaboot/doc/yaboot-howto.html/ch1.de.html
trunk/yaboot/doc/yaboot-howto.html/ch1.en.html
trunk/yaboot/doc/yaboot-howto.html/ch10.de.html
trunk/yaboot/doc/yaboot-howto.html/ch10.en.html
trunk/yaboot/doc/yaboot-howto.html/ch11.de.html
trunk/yaboot/doc/yaboot-howto.html/ch11.en.html
trunk/yaboot/doc/yaboot-howto.html/ch2.de.html
trunk/yaboot/doc/yaboot-howto.html/ch2.en.html
trunk/yaboot/doc/yaboot-howto.html/ch3.de.html
trunk/yaboot/doc/yaboot-howto.html/ch3.en.html
trunk/yaboot/doc/yaboot-howto.html/ch4.de.html
trunk/yaboot/doc/yaboot-howto.html/ch4.en.html
trunk/yaboot/doc/yaboot-howto.html/ch5.de.html
trunk/yaboot/doc/yaboot-howto.html/ch5.en.html
trunk/yaboot/doc/yaboot-howto.html/ch6.de.html
trunk/yaboot/doc/yaboot-howto.html/ch6.en.html
trunk/yaboot/doc/yaboot-howto.html/ch7.de.html
trunk/yaboot/doc/yaboot-howto.html/ch7.en.html
trunk/yaboot/doc/yaboot-howto.html/ch8.de.html
trunk/yaboot/doc/yaboot-howto.html/ch8.en.html
trunk/yaboot/doc/yaboot-howto.html/ch9.de.html
trunk/yaboot/doc/yaboot-howto.html/ch9.en.html
trunk/yaboot/doc/yaboot-howto.html/index.de.html
trunk/yaboot/doc/yaboot-howto.html/index.en.html
trunk/yaboot/doc/yaboot-howto.html/index.html
trunk/yaboot/doc/yaboot-howto.sgml
trunk/yaboot/etc/
trunk/yaboot/etc/yaboot.conf
trunk/yaboot/first/
trunk/yaboot/first/ofboot
trunk/yaboot/include/
trunk/yaboot/include/asm/
trunk/yaboot/include/asm/elf.h
trunk/yaboot/include/asm/ppc_asm.tmpl
trunk/yaboot/include/asm/processor.h
trunk/yaboot/include/bootinfo.h
trunk/yaboot/include/byteorder.h
trunk/yaboot/include/cfg.h
trunk/yaboot/include/cmdline.h
trunk/yaboot/include/ctype.h
trunk/yaboot/include/debug.h
trunk/yaboot/include/errors.h
trunk/yaboot/include/et/
trunk/yaboot/include/et/com_err.h
trunk/yaboot/include/ext2fs/
trunk/yaboot/include/ext2fs/bitops.h
trunk/yaboot/include/ext2fs/ext2_err.h
trunk/yaboot/include/ext2fs/ext2_io.h
trunk/yaboot/include/ext2fs/ext2fs.h
trunk/yaboot/include/fdisk-part.h
trunk/yaboot/include/file.h
trunk/yaboot/include/fs.h
trunk/yaboot/include/linux/
trunk/yaboot/include/linux/elf.h
trunk/yaboot/include/linux/ext2_fs.h
trunk/yaboot/include/linux/iso_fs.h
trunk/yaboot/include/linux/stat.h
trunk/yaboot/include/linux/types.h
trunk/yaboot/include/mac-part.h
trunk/yaboot/include/md5.h
trunk/yaboot/include/partition.h
trunk/yaboot/include/prom.h
trunk/yaboot/include/reiserfs/
trunk/yaboot/include/reiserfs/reiserfs.h
trunk/yaboot/include/setjm2.h
trunk/yaboot/include/setjmp.h
trunk/yaboot/include/stdlib.h
trunk/yaboot/include/string.h
trunk/yaboot/include/swab.h
trunk/yaboot/include/types.h
trunk/yaboot/include/xfs/
trunk/yaboot/include/xfs/xfs.h
trunk/yaboot/include/yaboot.h
trunk/yaboot/lib/
trunk/yaboot/lib/ctype.c
trunk/yaboot/lib/e2fsprogs-1.27/
trunk/yaboot/lib/e2fsprogs-1.27/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/.fix-Changelog
trunk/yaboot/lib/e2fsprogs-1.27/.head-Changelog
trunk/yaboot/lib/e2fsprogs-1.27/.missing-copyright
trunk/yaboot/lib/e2fsprogs-1.27/.release-checklist
trunk/yaboot/lib/e2fsprogs-1.27/ABOUT-NLS
trunk/yaboot/lib/e2fsprogs-1.27/COPYING
trunk/yaboot/lib/e2fsprogs-1.27/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/ChangeSet
trunk/yaboot/lib/e2fsprogs-1.27/INSTALL
trunk/yaboot/lib/e2fsprogs-1.27/INSTALL.dllbin
trunk/yaboot/lib/e2fsprogs-1.27/INSTALL.elfbin
trunk/yaboot/lib/e2fsprogs-1.27/MCONFIG.in
trunk/yaboot/lib/e2fsprogs-1.27/Makefile.in
trunk/yaboot/lib/e2fsprogs-1.27/README
trunk/yaboot/lib/e2fsprogs-1.27/RELEASE-NOTES
trunk/yaboot/lib/e2fsprogs-1.27/SHLIBS
trunk/yaboot/lib/e2fsprogs-1.27/aclocal.m4
trunk/yaboot/lib/e2fsprogs-1.27/config.guess
trunk/yaboot/lib/e2fsprogs-1.27/config.sub
trunk/yaboot/lib/e2fsprogs-1.27/configure
trunk/yaboot/lib/e2fsprogs-1.27/configure.in
trunk/yaboot/lib/e2fsprogs-1.27/contrib/
trunk/yaboot/lib/e2fsprogs-1.27/contrib/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/contrib/build-rpm
trunk/yaboot/lib/e2fsprogs-1.27/contrib/dconf
trunk/yaboot/lib/e2fsprogs-1.27/debian/
trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/
trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/comerrg-dev.info
trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/comerrg-dev.menu
trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/e2fslibsg-dev.info
trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/e2fslibsg-dev.menu
trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/
trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/comerr2g.files
trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/control
trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/e2fslibsg.files
trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/rules
trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/ss2g.files
trunk/yaboot/lib/e2fsprogs-1.27/debian/changelog
trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.doc-base
trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.examples
trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.files
trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.postinst
trunk/yaboot/lib/e2fsprogs-1.27/debian/control
trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsck-static.files
trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsck-static.lintian-overrides
trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fslibs-dev.doc-base
trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fslibs-dev.files
trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fslibs-dev.postinst
trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs-bf.lintian-overrides
trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.README.Debian
trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.TODO
trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.copyright
trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.docs
trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.files
trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.postinst
trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.preinst
trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.shlibs
trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.shlibs.in
trunk/yaboot/lib/e2fsprogs-1.27/debian/libcomerr2.copyright
trunk/yaboot/lib/e2fsprogs-1.27/debian/libss2.copyright
trunk/yaboot/lib/e2fsprogs-1.27/debian/rules
trunk/yaboot/lib/e2fsprogs-1.27/debian/shlibs.local
trunk/yaboot/lib/e2fsprogs-1.27/debian/ss-dev.examples
trunk/yaboot/lib/e2fsprogs-1.27/debian/ss-dev.files
trunk/yaboot/lib/e2fsprogs-1.27/debian/ss-dev.undocumented
trunk/yaboot/lib/e2fsprogs-1.27/debian/uuid-dev.files
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/Makefile.in
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debug_cmds.ct
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debugfs.8.in
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debugfs.c
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debugfs.h
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/dump.c
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/htree.c
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/icheck.c
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/jfs_user.h
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/logdump.c
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/ls.c
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/lsdel.c
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/ncheck.c
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/setsuper.c
trunk/yaboot/lib/e2fsprogs-1.27/debugfs/util.c
trunk/yaboot/lib/e2fsprogs-1.27/depfix.sed
trunk/yaboot/lib/e2fsprogs-1.27/doc/
trunk/yaboot/lib/e2fsprogs-1.27/doc/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/doc/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/doc/Makefile.in
trunk/yaboot/lib/e2fsprogs-1.27/doc/libext2fs.texinfo
trunk/yaboot/lib/e2fsprogs-1.27/doc/texinfo.tex
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/CHANGES
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/Makefile.in
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/badblocks.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/dirinfo.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/e2fsck.8.in
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/e2fsck.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/e2fsck.h
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/ea_refcount.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/ehandler.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/emptydir.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/extend.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/flushb.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/iscan.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/jfs_user.h
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/journal.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/malloc.h
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/message.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/mtrace.awk
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/mtrace.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/mtrace.h
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass1.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass1b.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass2.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass3.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass4.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass5.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/problem.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/problem.h
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/problemP.h
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/recovery.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/region.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/revoke.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/scantest.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/super.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/swapfs.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/unix.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/util.c
trunk/yaboot/lib/e2fsprogs-1.27/e2fsprogs.lsm
trunk/yaboot/lib/e2fsprogs-1.27/e2fsprogs.spec
trunk/yaboot/lib/e2fsprogs-1.27/include/
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/asm/
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/asm/types.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/config.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/dirent.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/getopt.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/grp.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/linux/
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/linux/types.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/pwd.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/file.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/ioctl.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/param.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/resource.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/socket.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/time.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/wait.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/termios.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/unistd.h
trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/utime.h
trunk/yaboot/lib/e2fsprogs-1.27/install-sh
trunk/yaboot/lib/e2fsprogs-1.27/install-utils/
trunk/yaboot/lib/e2fsprogs-1.27/install-utils/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/install-utils/compile_manpages
trunk/yaboot/lib/e2fsprogs-1.27/install-utils/convfstab
trunk/yaboot/lib/e2fsprogs-1.27/install-utils/remove_preformat_manpages
trunk/yaboot/lib/e2fsprogs-1.27/intl/
trunk/yaboot/lib/e2fsprogs-1.27/intl/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/intl/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/intl/Makefile.in
trunk/yaboot/lib/e2fsprogs-1.27/intl/VERSION
trunk/yaboot/lib/e2fsprogs-1.27/intl/bindtextdom.c
trunk/yaboot/lib/e2fsprogs-1.27/intl/cat-compat.c
trunk/yaboot/lib/e2fsprogs-1.27/intl/dcgettext.c
trunk/yaboot/lib/e2fsprogs-1.27/intl/dgettext.c
trunk/yaboot/lib/e2fsprogs-1.27/intl/explodename.c
trunk/yaboot/lib/e2fsprogs-1.27/intl/finddomain.c
trunk/yaboot/lib/e2fsprogs-1.27/intl/gettext.c
trunk/yaboot/lib/e2fsprogs-1.27/intl/gettext.h
trunk/yaboot/lib/e2fsprogs-1.27/intl/gettextP.h
trunk/yaboot/lib/e2fsprogs-1.27/intl/hash-string.h
trunk/yaboot/lib/e2fsprogs-1.27/intl/intl-compat.c
trunk/yaboot/lib/e2fsprogs-1.27/intl/l10nflist.c
trunk/yaboot/lib/e2fsprogs-1.27/intl/libgettext.h
trunk/yaboot/lib/e2fsprogs-1.27/intl/linux-msg.sed
trunk/yaboot/lib/e2fsprogs-1.27/intl/loadinfo.h
trunk/yaboot/lib/e2fsprogs-1.27/intl/loadmsgcat.c
trunk/yaboot/lib/e2fsprogs-1.27/intl/localealias.c
trunk/yaboot/lib/e2fsprogs-1.27/intl/po2tbl.sed.in
trunk/yaboot/lib/e2fsprogs-1.27/intl/textdomain.c
trunk/yaboot/lib/e2fsprogs-1.27/intl/xopen-msg.sed
trunk/yaboot/lib/e2fsprogs-1.27/lib/
trunk/yaboot/lib/e2fsprogs-1.27/lib/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.bsd-lib
trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.checker
trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.dll-lib
trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.elf-lib
trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.library
trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.profile
trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.solaris-lib
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/Makefile.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.funcs
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.ignore
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.import
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.params
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.undefs
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.vars
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/e2p.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/feature.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fgetflags.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fgetversion.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fsetflags.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fsetversion.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/getflags.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/getversion.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/iod.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/ls.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/pe.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/pf.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/ps.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/setflags.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/setversion.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/uuid.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/Makefile.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.3
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.texinfo
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/compile_et.1
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/compile_et.sh.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.funcs
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.ignore
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.import
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.params
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.undefs
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.vars
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/error_message.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/error_table.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/et_c.awk
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/et_h.awk
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/et_name.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/init_et.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/internal.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/texinfo.tex
trunk/yaboot/lib/e2fsprogs-1.27/lib/et/vfprintf.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/Makefile.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/alloc.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/alloc_stats.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/alloc_tables.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/badblocks.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bb_compat.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bb_inode.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bitmaps.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bitops.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bitops.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/block.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bmap.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bmove.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/brel.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/brel_ma.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/check_desc.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/closefs.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/cmp_bitmaps.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dblist.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dblist_dir.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dir_iterate.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dirblock.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.funcs
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.ignore
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.import
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.params
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.undefs
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.vars
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dosio.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dosio.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dupfs.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/e2image.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/expanddir.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_err.et.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_ext_attr.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_fs.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_io.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_types.h.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2fs.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2fsP.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext_attr.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/fileio.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/finddev.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/flushb.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/freefs.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/gen_bitmap.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/get_pathname.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/getsize.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/icount.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/imager.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/initialize.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/inline.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/inode.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/inode_io.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/irel.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/irel_ma.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ismounted.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/jfs_compat.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/jfs_dat.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/jfs_user.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/kernel-jbd.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/kernel-list.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/link.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/llseek.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/lookup.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/mkdir.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/mkjournal.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/namei.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/native.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/newdir.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/nt_io.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/openfs.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/read_bb.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/read_bb_file.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/rs_bitmap.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/rw_bitmaps.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/swapfs.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/test_io.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_badblocks.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_bitops.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_byteswap.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_getsize.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_iscan.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/unix_io.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/unlink.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/valid_blk.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/version.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/write_bb_file.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/fpopen.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/Makefile.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ct_c.awk
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ct_c.sed
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/data.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.funcs
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.ignore
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.import
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.params
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.undefs
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.vars
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/error.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/execute_cmd.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/help.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/invocation.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/list_rqs.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/listen.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/mit-sipb-copyright.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/mk_cmds.sh.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/pager.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/parse.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/prompt.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/request_tbl.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/requests.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ss.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ss_err.et
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ss_internal.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/std_rqs.ct
trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/test_ss.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/Makefile.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/clear.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/compare.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/configure.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/copy.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.funcs
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.ignore
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.import
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.params
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.undefs
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.vars
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/gen_uuid.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/gen_uuid_nt.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/isnull.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/libuuid.3.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/pack.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/parse.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/tst_uuid.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/unpack.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/unparse.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuidP.h
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_clear.3.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_compare.3.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_copy.3.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_generate.3.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_is_null.3.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_parse.3.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_time.3.in
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_time.c
trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_unparse.3.in
trunk/yaboot/lib/e2fsprogs-1.27/misc/
trunk/yaboot/lib/e2fsprogs-1.27/misc/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/misc/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/misc/Makefile.in
trunk/yaboot/lib/e2fsprogs-1.27/misc/badblocks.8.in
trunk/yaboot/lib/e2fsprogs-1.27/misc/badblocks.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/base_device.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/base_device.tst
trunk/yaboot/lib/e2fsprogs-1.27/misc/chattr.1.in
trunk/yaboot/lib/e2fsprogs-1.27/misc/chattr.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/dumpe2fs.8.in
trunk/yaboot/lib/e2fsprogs-1.27/misc/dumpe2fs.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/e2image.8.in
trunk/yaboot/lib/e2fsprogs-1.27/misc/e2image.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/e2label.8.in
trunk/yaboot/lib/e2fsprogs-1.27/misc/e2label.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/findsuper.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/fsck.8.in
trunk/yaboot/lib/e2fsprogs-1.27/misc/fsck.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/fsck.h
trunk/yaboot/lib/e2fsprogs-1.27/misc/fstype.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/get_device_by_label.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/get_device_by_label.h
trunk/yaboot/lib/e2fsprogs-1.27/misc/jfs_user.h
trunk/yaboot/lib/e2fsprogs-1.27/misc/lsattr.1.in
trunk/yaboot/lib/e2fsprogs-1.27/misc/lsattr.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/mke2fs.8.in
trunk/yaboot/lib/e2fsprogs-1.27/misc/mke2fs.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/mklost+found.8.in
trunk/yaboot/lib/e2fsprogs-1.27/misc/mklost+found.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/nls-enable.h
trunk/yaboot/lib/e2fsprogs-1.27/misc/partinfo.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/tune2fs.8.in
trunk/yaboot/lib/e2fsprogs-1.27/misc/tune2fs.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/util.c
trunk/yaboot/lib/e2fsprogs-1.27/misc/util.h
trunk/yaboot/lib/e2fsprogs-1.27/misc/uuidgen.1.in
trunk/yaboot/lib/e2fsprogs-1.27/misc/uuidgen.c
trunk/yaboot/lib/e2fsprogs-1.27/mkinstalldirs
trunk/yaboot/lib/e2fsprogs-1.27/po/
trunk/yaboot/lib/e2fsprogs-1.27/po/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/po/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/po/Makefile.in.in
trunk/yaboot/lib/e2fsprogs-1.27/po/POTFILES.in
trunk/yaboot/lib/e2fsprogs-1.27/po/e2fsprogs.pot
trunk/yaboot/lib/e2fsprogs-1.27/po/it.po
trunk/yaboot/lib/e2fsprogs-1.27/po/nyc.po
trunk/yaboot/lib/e2fsprogs-1.27/po/tr.po
trunk/yaboot/lib/e2fsprogs-1.27/resize/
trunk/yaboot/lib/e2fsprogs-1.27/resize/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/resize/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/resize/Makefile.in
trunk/yaboot/lib/e2fsprogs-1.27/resize/extent.c
trunk/yaboot/lib/e2fsprogs-1.27/resize/main.c
trunk/yaboot/lib/e2fsprogs-1.27/resize/resize2fs.8.in
trunk/yaboot/lib/e2fsprogs-1.27/resize/resize2fs.c
trunk/yaboot/lib/e2fsprogs-1.27/resize/resize2fs.h
trunk/yaboot/lib/e2fsprogs-1.27/resize/sim_progress.c
trunk/yaboot/lib/e2fsprogs-1.27/resize/test_extent.c
trunk/yaboot/lib/e2fsprogs-1.27/resize/test_extent.in
trunk/yaboot/lib/e2fsprogs-1.27/tests/
trunk/yaboot/lib/e2fsprogs-1.27/tests/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/tests/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/tests/Makefile.in
trunk/yaboot/lib/e2fsprogs-1.27/tests/README
trunk/yaboot/lib/e2fsprogs-1.27/tests/d_loaddump/
trunk/yaboot/lib/e2fsprogs-1.27/tests/d_loaddump/expect
trunk/yaboot/lib/e2fsprogs-1.27/tests/d_loaddump/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/d_loaddump/script
trunk/yaboot/lib/e2fsprogs-1.27/tests/defaults/
trunk/yaboot/lib/e2fsprogs-1.27/tests/defaults/e_script
trunk/yaboot/lib/e2fsprogs-1.27/tests/defaults/f_script
trunk/yaboot/lib/e2fsprogs-1.27/tests/e_brel_bma/
trunk/yaboot/lib/e2fsprogs-1.27/tests/e_brel_bma/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/e_brel_bma/script
trunk/yaboot/lib/e2fsprogs-1.27/tests/e_icount_normal/
trunk/yaboot/lib/e2fsprogs-1.27/tests/e_icount_normal/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/e_icount_opt/
trunk/yaboot/lib/e2fsprogs-1.27/tests/e_icount_opt/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/e_irel_ima/
trunk/yaboot/lib/e2fsprogs-1.27/tests/e_irel_ima/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/e_irel_ima/script
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/script
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/journal.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/script
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/script
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/script
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/debugfs.cmd
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/expect
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/image
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/script
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/expect.1
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/expect.2
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/image.gz
trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/name
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/Makefile.in
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/hold_inode.c
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/random_exercise.c
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/bma.setup
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/expect.brel
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/expect.icount
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/expect.irel
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/ima.setup
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/normal.setup
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/opt.setup
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/test.brel
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/test.icount
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/test.irel
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_icount.c
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_icount.h
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_icount_cmds.ct
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_rel.c
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_rel.h
trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_rel_cmds.ct
trunk/yaboot/lib/e2fsprogs-1.27/tests/run_e2fsck
trunk/yaboot/lib/e2fsprogs-1.27/tests/test_config
trunk/yaboot/lib/e2fsprogs-1.27/tests/test_script.in
trunk/yaboot/lib/e2fsprogs-1.27/util/
trunk/yaboot/lib/e2fsprogs-1.27/util/.cvsignore
trunk/yaboot/lib/e2fsprogs-1.27/util/ChangeLog
trunk/yaboot/lib/e2fsprogs-1.27/util/Makefile.in
trunk/yaboot/lib/e2fsprogs-1.27/util/gcc-wall-cleanup
trunk/yaboot/lib/e2fsprogs-1.27/util/libecho.c
trunk/yaboot/lib/e2fsprogs-1.27/util/subst.c
trunk/yaboot/lib/e2fsprogs-1.27/util/subst.conf.in
trunk/yaboot/lib/e2fsprogs-1.27/version.h
trunk/yaboot/lib/e2fsprogs-1.27/wordwrap.pl
trunk/yaboot/lib/libext2fs.a
trunk/yaboot/lib/malloc.c
trunk/yaboot/lib/nosys.c
trunk/yaboot/lib/string.S
trunk/yaboot/lib/strstr.c
trunk/yaboot/lib/strtol.c
trunk/yaboot/lib/vsprintf.c
trunk/yaboot/man.patch
trunk/yaboot/man/
trunk/yaboot/man/bootstrap.8
trunk/yaboot/man/mkofboot.8
trunk/yaboot/man/ofpath.8
trunk/yaboot/man/yaboot.8
trunk/yaboot/man/yaboot.conf.5
trunk/yaboot/man/yabootconfig.8
trunk/yaboot/man/ybin.8
trunk/yaboot/second/
trunk/yaboot/second/cache.S
trunk/yaboot/second/cfg.c
trunk/yaboot/second/cmdline.c
trunk/yaboot/second/crt0.S
trunk/yaboot/second/file.c
trunk/yaboot/second/fs.c
trunk/yaboot/second/fs_ext2.c
trunk/yaboot/second/fs_iso.c
trunk/yaboot/second/fs_of.c
trunk/yaboot/second/fs_reiserfs.c
trunk/yaboot/second/fs_xfs.c
trunk/yaboot/second/iso_util.c
trunk/yaboot/second/md5.c
trunk/yaboot/second/partition.c
trunk/yaboot/second/prom.c
trunk/yaboot/second/setjmp.S
trunk/yaboot/second/yaboot.c
trunk/yaboot/util/
trunk/yaboot/util/addnote.c
trunk/yaboot/util/elfextract.c
trunk/yaboot/ybin/
trunk/yaboot/ybin/mkofboot
trunk/yaboot/ybin/ofpath
trunk/yaboot/ybin/yabootconfig
trunk/yaboot/ybin/ybin
Log:
Initial import of yaboot upstream source code.
Added: trunk/yaboot/BUGS
===================================================================
--- trunk/yaboot/BUGS 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/BUGS 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+Bugs? what bugs? if you find one let me know. send to: erbenson at alaska.net
Added: trunk/yaboot/COPYING
===================================================================
--- trunk/yaboot/COPYING 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/COPYING 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,340 @@
+ 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.
Added: trunk/yaboot/ChangeLog
===================================================================
--- trunk/yaboot/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1325 @@
+# do not edit -- automatically generated by arch changelog
+# arch-tag: automatic-ChangeLog--erbenson at alaska.net--public/yaboot--devel--1.3
+#
+
+2004-07-11 20:14:40 GMT Ethan Benson <erbenson at alaska.net> patch-75
+
+ Summary:
+ Prep 1.3.13 release
+ Revision:
+ yaboot--devel--1.3--patch-75
+
+ * Bump version numbers for 1.3.13 release.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog Makefile ybin/ofpath
+ ybin/yabootconfig ybin/ybin
+
+
+2004-07-11 20:02:24 GMT Ethan Benson <erbenson at alaska.net> patch-74
+
+ Summary:
+ Update changelog for 1.3.13
+ Revision:
+ yaboot--devel--1.3--patch-74
+
+ * changelog: Update for 1.3.13
+
+ modified files:
+ 0arch-timestamps0 ChangeLog changelog
+
+
+2004-07-11 19:55:54 GMT Ethan Benson <erbenson at alaska.net> patch-73
+
+ Summary:
+ Increase tftp buffer to ~6MB
+ Revision:
+ yaboot--devel--1.3--patch-73
+
+ * second/fs_of.c: increase tftp buffer to 6MB. This is as far as it
+ can go.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog second/fs_of.c
+
+
+2004-07-11 19:52:17 GMT Ethan Benson <erbenson at alaska.net> patch-72
+
+ Summary:
+ Add LABEL/UUID support to yabootconfig
+ Revision:
+ yaboot--devel--1.3--patch-72
+
+ * ybin/yabootconfig: Add support for LABEL= and UUID= in
+ /etc/fstab. (Colin Watson)
+
+ modified files:
+ 0arch-timestamps0 ChangeLog ybin/yabootconfig
+
+
+2004-05-08 22:04:51 GMT Ethan Benson <erbenson at alaska.net> patch-71
+
+ Summary:
+ Add additional check on /dev/nvram to avoid misleading error message
+ Revision:
+ yaboot--devel--1.3--patch-71
+
+ * ybin/ybin: Add additional check on /dev/nvram, if we cannot read a
+ couple bytes report it as broken. This avoids misleading
+ `Incompatible nvsetenv' message on kernels without /dev/nvram support.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog ybin/ybin
+
+
+2004-05-08 06:38:44 GMT Ethan Benson <erbenson at alaska.net> patch-70
+
+ Summary:
+ Fix several ofpath error messages going to stdout rather then stderr
+ Revision:
+ yaboot--devel--1.3--patch-70
+
+ * ybin/ofpath: Fix several error messages mistakenly written to stdout
+ rather then stderr. (Thanks to Colin Watson for noticing)
+
+ modified files:
+ 0arch-timestamps0 ChangeLog ybin/ofpath
+
+
+2004-04-26 00:27:48 GMT Ethan Benson <erbenson at alaska.net> patch-69
+
+ Summary:
+ Add support for initrd detection to yabootconfig
+ Revision:
+ yaboot--devel--1.3--patch-69
+
+ * ybin/yabootconfig: If detected kernel appears to have a corresponding
+ initrd image then include an initrd= line in generated yaboot.conf.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog ybin/yabootconfig
+
+
+2004-04-18 00:27:59 GMT Ethan Benson <erbenson at alaska.net> patch-68
+
+ Summary:
+ Prep 1.3.12 release
+ Revision:
+ yaboot--devel--1.3--patch-68
+
+ * Update changelog.
+ * Bump version numbers to 1.3.12.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog Makefile changelog ybin/ofpath
+ ybin/ybin
+
+
+2004-03-28 05:02:03 GMT Ethan Benson <erbenson at alaska.net> patch-67
+
+ Summary:
+ Fix ofpath SATA support and sysfs detection
+ Revision:
+ yaboot--devel--1.3--patch-67
+
+ * ybin/ofpath: Support newwer kernels which call the driver sata_svw,
+ instead of ata-k2.
+ * ybin/ofpath: Detect sysfs mount correctly.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog ybin/ofpath
+
+
+2004-03-22 02:05:07 GMT Ethan Benson <erbenson at alaska.net> patch-66
+
+ Summary:
+ Add 2.6 kernel support to ofpath
+ Revision:
+ yaboot--devel--1.3--patch-66
+
+ * ybin/ofpath: Add support for 2.6.4+ kernels with sysfs mounted.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog Makefile ybin/ofpath ybin/ybin
+
+
+2004-02-22 13:15:30 GMT Ethan Benson <erbenson at alaska.net> patch-65
+
+ Summary:
+ Add caveat regarding UFS to yaboot howto
+ Revision:
+ yaboot--devel--1.3--patch-65
+
+ * Add caveat regarding UFS to temporary bootloader setup chapter of
+ the yaboot-howto (Thanks to Brian Sammon, and to Stefan Pfetzing for
+ the German translation).
+
+ modified files:
+ 0arch-timestamps0 ChangeLog doc/yaboot-howto.de.sgml
+ doc/yaboot-howto.sgml
+
+
+2004-01-04 12:37:38 GMT Ethan Benson <erbenson at alaska.net> patch-64
+
+ Summary:
+ Update =tagging-method for tla 1.1
+ Revision:
+ yaboot--devel--1.3--patch-64
+
+ * Update =tagging-method for tla 1.1
+
+
+ modified files:
+ 0arch-timestamps0 ChangeLog {arch}/=tagging-method
+
+
+2003-11-20 10:03:32 GMT Ethan Benson <erbenson at alaska.net> patch-63
+
+ Summary:
+ Bump versions to final 1.3.11 release
+ Revision:
+ yaboot--devel--1.3--patch-63
+
+ * Bump versions to final 1.3.11 release.
+
+ modified files:
+ ./0arch-timestamps0 ./ChangeLog ./Makefile ./changelog
+ ./ybin/ofpath ./ybin/ybin
+
+
+2003-11-19 10:40:13 GMT Ethan Benson <erbenson at alaska.net> patch-62
+
+ Summary:
+ Prepare changelog for imminent 1.3.11 release
+ Revision:
+ yaboot--devel--1.3--patch-62
+
+ * Prepare changelog for imminent 1.3.11 release.
+
+ modified files:
+ ./0arch-timestamps0 ./ChangeLog ./changelog
+
+
+2003-11-18 10:12:32 GMT Ethan Benson <erbenson at alaska.net> patch-61
+
+ Summary:
+ Fix ofpath arch detect fix
+ Revision:
+ yaboot--devel--1.3--patch-61
+
+ ybin/ofpath: Fix botched powerpc-64 support fix.
+
+ modified files:
+ ./0arch-timestamps0 ./ChangeLog ./ybin/ofpath
+
+
+2003-11-18 10:09:41 GMT Ethan Benson <erbenson at alaska.net> patch-60
+
+ Summary:
+ Make ofpath work on powerpc-64
+ Revision:
+ yaboot--devel--1.3--patch-60
+
+ ybin/ofpath: No longer refuse to function on ppc64 systems.
+
+ modified files:
+ ./0arch-timestamps0 ./ChangeLog ./ybin/ofpath
+
+
+2003-11-17 04:35:21 GMT Ethan Benson <erbenson at alaska.net> patch-59
+
+ Summary:
+ Fix ofpath for `scsi' ide controllers
+ Revision:
+ yaboot--devel--1.3--patch-59
+
+ * ybin/ofpath:
+ - Generate correct paths for IDE controllers which
+ pretend to be scsi.
+ - Correct error message regarding CONFIG_SCSI_PROC_FS
+ (=y not =n).
+
+ modified files:
+ ./0arch-timestamps0 ./ChangeLog ./ybin/ofpath
+
+
+2003-11-10 10:23:36 GMT Ethan Benson <erbenson at alaska.net> patch-58
+
+ Summary:
+ Fix ofpath 2.6 /proc/scsi check
+ Revision:
+ yaboot--devel--1.3--patch-58
+
+ * ybin/ofpath: Move return to proper place so ofpath doesn't exit
+ silently when scsi appears to not be installed and the system is
+ running a 2.6 kernel.
+
+ modified files:
+ ./0arch-timestamps0 ./ChangeLog ./ybin/ofpath
+
+
+2003-11-10 08:52:02 GMT Ethan Benson <erbenson at alaska.net> patch-57
+
+ Summary:
+ Detect lack of CONFIG_SCSI_PROC_FS in ofpath on 2.6 systems
+ Revision:
+ yaboot--devel--1.3--patch-57
+
+ * ybin/ofpath: Under 2.6 systems detect lack of CONFIG_SCSI_PROC_FS in
+ kernel configuration and print error message indicating its required.
+
+ modified files:
+ ./0arch-timestamps0 ./ChangeLog ./ybin/ofpath
+
+
+2003-11-06 07:28:26 GMT Ethan Benson <erbenson at alaska.net> patch-56
+
+ Summary:
+ Add PowerMac G5 SATA support to ofpath
+ Revision:
+ yaboot--devel--1.3--patch-56
+
+ * ybin/ofpath: Add support for SATA drives found in the PowerMac G5.
+ (Olof Johansson <offe at localnet.sh>)
+
+ modified files:
+ ./0arch-timestamps0 ./ChangeLog ./ybin/ofpath
+
+
+2003-11-05 07:49:57 GMT Ethan Benson <erbenson at alaska.net> patch-55
+
+ Summary:
+ Bump version to unsupported non-release status
+ Revision:
+ yaboot--devel--1.3--patch-55
+
+ * Bump version to unsupported non-release status.
+
+ modified files:
+ ./0arch-timestamps0 ./ChangeLog ./Makefile ./ybin/ybin
+
+
+2003-11-05 07:38:12 GMT Ethan Benson <erbenson at alaska.net> patch-54
+
+ Summary:
+ Update compatibility declaration for CHRPBOOT examples
+ Revision:
+ yaboot--devel--1.3--patch-54
+
+ * doc/examples/simpleboot.chrp: MacRISC4 compatible.
+ * doc/examples/dualboot.chrp: MacRISC4 compatible.
+
+ modified files:
+ ./0arch-timestamps0 ./ChangeLog ./doc/examples/dualboot.chrp
+ ./doc/examples/simpleboot.chrp
+
+
+2003-11-04 09:19:11 GMT Ethan Benson <erbenson at alaska.net> patch-53
+
+ Summary:
+ Use OpenFirmware RELEASE method
+ Revision:
+ yaboot--devel--1.3--patch-53
+
+ * second/prom.c: Use OpenFirmware's RELEASE method instead of the
+ broken crap hack which broke on more recent Apple OpenFirmware.
+
+ modified files:
+ ./0arch-timestamps0 ./ChangeLog ./second/prom.c
+
+
+2003-10-04 23:58:34 GMT Ethan Benson <erbenson at alaska.net> patch-52
+
+ Summary:
+ Add boot compatibility with PowerMac G5
+ Revision:
+ yaboot--devel--1.3--patch-52
+
+ * ofboot: Declare compatiblity with PowerMac G5 in.
+
+ modified files:
+ ./0arch-timestamps0 ./ChangeLog ./first/ofboot
+
+
+2003-06-22 08:06:01 GMT Ethan Benson <erbenson at alaska.net> patch-51
+
+ Summary:
+ Update ChangeLog tag for compatiblity with arch 1.0pre25
+ Revision:
+ yaboot--devel--1.3--patch-51
+
+ * Update ChangeLog tag for compatiblity with arch 1.0pre25.
+
+ new files:
+ .arch-ids/ChangeLog.id ChangeLog
+
+ removed files:
+ .arch-ids/ChangeLog.id ChangeLog
+
+ modified files:
+ 0arch-timestamps0
+
+
+2003-02-26 11:27:33 GMT Ethan Benson <erbenson at alaska.net> patch-50
+
+ Summary:
+ Fix ofpath on early iMacs
+ Revision:
+ yaboot--devel--1.3--patch-50
+
+ * ofpath: Apple apparently can't decide whether its called `ata'
+ or `ide'; fix support for early iMac models.
+
+ * Prep 1.3.10.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog Makefile changelog ybin/ofpath
+ ybin/ybin
+
+
+2003-02-12 08:55:45 GMT Ethan Benson <erbenson at alaska.net> patch-49
+
+ Summary:
+ Prep 1.3.9 release
+ Revision:
+ yaboot--devel--1.3--patch-49
+
+ * Prep 1.3.9 release:
+ - Set version numbers to 1.3.9.
+ - Finalize changelog.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog Makefile changelog ybin/ybin
+
+
+2003-02-10 09:55:05 GMT Ethan Benson <erbenson at alaska.net> patch-48
+
+ Summary:
+ Fix botched IBM patch (multiple partition handling on rs6k)
+ Revision:
+ yaboot--devel--1.3--patch-48
+
+ * IBM file.c patch is broken, fix file.c so yaboot finds its config on
+ systems with more then one primary GNU/Linux filesystem partition.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog second/file.c
+
+
+2003-02-09 05:28:41 GMT Ethan Benson <erbenson at alaska.net> patch-47
+
+ Summary:
+ Update first stage to be compatible with new Macs
+ Revision:
+ yaboot--devel--1.3--patch-47
+
+ * Mark first stage loader compatible with new MacOS9-free PowerMacs so
+ it will be accepted by OpenFirmware.
+ * Update copyrights to include 2003.
+ * Version 1.3.9-UNRELEASED.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog Makefile README TODO changelog
+ doc/examples/dualboot.chrp doc/examples/simpleboot.chrp
+ first/ofboot ybin/ofpath ybin/yabootconfig ybin/ybin
+
+
+2002-12-10 08:14:21 GMT Ethan Benson <erbenson at alaska.net> patch-46
+
+ Summary:
+ Release yaboot 1.3.8
+ Revision:
+ yaboot--devel--1.3--patch-46
+
+ * yaboot 1.3.8 release.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog Makefile changelog ybin/ofpath
+ ybin/yabootconfig ybin/ybin
+
+
+2002-11-27 09:42:23 GMT Ethan Benson <erbenson at alaska.net> patch-45
+
+ Summary:
+ Prepare 1.3.8-rc4
+ Revision:
+ yaboot--devel--1.3--patch-45
+
+ * Bump versions to 1.3.8-rc4.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog Makefile changelog
+ ybin/yabootconfig ybin/ybin
+
+
+2002-11-27 09:35:34 GMT Ethan Benson <erbenson at alaska.net> patch-44
+
+ Summary:
+ Add 'kernel too old' warning to ofpath
+ Revision:
+ yaboot--devel--1.3--patch-44
+
+ * ofpath: On Windtunnel warn when the kernel is too old for proper
+ support. The warning message is sent to stderr so it will not
+ interfere with scripts or other automated invocation of ofpath.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog ybin/ofpath
+
+
+2002-11-26 09:35:47 GMT Ethan Benson <erbenson at alaska.net> patch-43
+
+ Summary:
+ Fix ofpath on pci-ide
+ Revision:
+ yaboot--devel--1.3--patch-43
+
+ * ofpath: check for pci-ide, not pci-ata.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog ybin/ofpath
+
+
+2002-11-19 11:32:49 GMT Ethan Benson <erbenson at alaska.net> patch-42
+
+ Summary:
+ Fix readlink fallback
+ Revision:
+ yaboot--devel--1.3--patch-42
+
+ * ofpath: fallback shell function for readlink was broken. Fixes
+ IDEBUS==NULL on broken systems that lack /bin/readlink.
+ * Prepare 1.3.8-rc3.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog Makefile changelog ybin/ofpath
+ ybin/ybin
+
+
+2002-11-18 10:38:53 GMT Ethan Benson <erbenson at alaska.net> patch-41
+
+ Summary:
+ handle ide device nodes up to hdp
+ Revision:
+ yaboot--devel--1.3--patch-41
+
+ * ofpath: handle ide device nodes up to /dev/hdp (16 disks, current
+ max in the kernel).
+
+ modified files:
+ 0arch-timestamps0 ChangeLog ybin/ofpath
+
+
+2002-11-17 23:33:17 GMT Ethan Benson <erbenson at alaska.net> patch-40
+
+ Summary:
+ Add support for IDE controllers with identity crisis
+ Revision:
+ yaboot--devel--1.3--patch-40
+
+ * ofpath: Add support for IDE controllers that pretend they are scsi.
+ * Prepare 1.3.8-rc2.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog Makefile changelog ybin/ofpath
+ ybin/yabootconfig ybin/ybin
+
+
+2002-11-17 03:13:10 GMT Ethan Benson <erbenson at alaska.net> patch-39
+
+ Summary:
+ Prepare 1.3.8-rc1
+ Revision:
+ yaboot--devel--1.3--patch-39
+
+ * Prefer $PATH_PREFIX/usr/sbin/ofpath if it exists.
+ * yabootconfig: Add append="video=ofonly" if the running kernel
+ was booted with it. This solves user confusion when they boot an installer with an
+ install-safe label, install, then reboot the new system to find the
+ console display doesn't work. This only occurs if user does not
+ specify --kernel-args so it will not interfere with distro installers
+ which handle this themselves.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog Makefile changelog ybin/ofpath
+ ybin/yabootconfig ybin/ybin
+
+
+2002-11-17 02:02:17 GMT Ethan Benson <erbenson at alaska.net> patch-38
+
+ Summary:
+ Add support for pci-ide to ofpath
+ Revision:
+ yaboot--devel--1.3--patch-38
+
+ * ofpath: Support multi-channel pci-ide devices, found in the Xserve.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog ybin/ofpath
+
+
+2002-11-03 02:00:27 GMT Ethan Benson <erbenson at alaska.net> patch-37
+
+ Summary:
+ Add extra sanity checks to new ofpath ide resolution code
+ Revision:
+ yaboot--devel--1.3--patch-37
+
+ * ofpath: Add a few sanity checks to new ide resolution code.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog ybin/ofpath
+
+
+2002-10-30 10:32:14 GMT Ethan Benson <erbenson at alaska.net> patch-36
+
+ Summary:
+ Update ofpath for new devspec export in /proc
+ Revision:
+ yaboot--devel--1.3--patch-36
+
+ * ofpath: /proc/ide/pmac is dead, the OpenFirmware devspec is now
+ exported to /proc/ide/ideX/devspec, ofpath now uses that.
+ - this change is not tested, some additional sanity checks are still
+ needed.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog ybin/ofpath
+
+
+2002-10-27 00:57:19 GMT Ethan Benson <erbenson at alaska.net> patch-35
+
+ Summary:
+ Change ofpath to use /proc/ide/of1275 instead of /proc/ide/pmac
+ Revision:
+ yaboot--devel--1.3--patch-35
+
+ * ofpath: the current incarnation of /proc/ide/pmac is not supported
+ by ofpath, and I believe this file should be renamed since it should
+ not be inherently pmac specific. When the format of this file is
+ updated it can be renamed at the same time.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog ybin/ofpath
+
+
+2002-10-27 00:40:09 GMT Ethan Benson <erbenson at alaska.net> patch-34
+
+ Summary:
+ Add preliminary support for Windtunnel PowerMacs to ofpath
+ Revision:
+ yaboot--devel--1.3--patch-34
+
+ * CHANGES IN THIS COMMIT ARE PRELIMINARY **DO NOT DISTRIBUTE**
+
+ * ofpath: Add preliminary support for Windtunnel PowerMacs
+ - If /proc/ide/pmac (perhaps to be renamed) does not exist and
+ machine is a Windtunnel return ultra2: instead of hd: (this assumes
+ machines without /proc/ide/pmac are also without support for ATA-100,
+ ultra2: is the ATA-66 bus).
+ - Parse a modified version of /proc/ide/pmac to determine the
+ appropriate OpenFirmware device specifier, no kernel yet has the
+ correct version of this file.
+
+ modified files:
+ ChangeLog Makefile ybin/ofpath ybin/ybin
+
+
+2002-09-29 05:04:59 GMT Ethan Benson <erbenson at alaska.net> patch-33
+
+ Summary:
+ Fix spelling errors in changelog
+ Revision:
+ yaboot--devel--1.3--patch-33
+
+ * Oops, fix some spelling errors and reburn 1.3.7.
+
+
+
+ modified files:
+ 0arch-timestamps0 ChangeLog changelog
+
+
+2002-09-28 22:51:44 GMT Ethan Benson <erbenson at alaska.net> patch-32
+
+ Summary:
+ Prepare 1.3.7 release
+ Revision:
+ yaboot--devel--1.3--patch-32
+
+ * Bump versions to 1.3.7
+ * Update changelog.
+ * Mention new yaboot mailing lists in README.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog Makefile README changelog
+ ybin/yabootconfig ybin/ybin
+
+
+2002-09-15 03:56:45 GMT Ethan Benson <erbenson at alaska.net> patch-31
+
+ Summary:
+ Remove 0arch-timestamps0 in archclean target
+ Revision:
+ yaboot--devel--1.3--patch-31
+
+ * Remove 0arch-timestamps0 in archclean target.
+
+
+
+ modified files:
+ 0arch-timestamps0 ChangeLog Makefile
+
+
+2002-09-15 03:28:32 GMT Ethan Benson <erbenson at alaska.net> patch-30
+
+ Summary:
+ Prepare 1.3.7-pre1
+ Revision:
+ yaboot--devel--1.3--patch-30
+
+ * Update copyright notices for 2002.
+ * Change Boot: to Stage 1 Boot: in ofboot.b
+ * Update changelog.
+ * Bump version to 1.3.7-pre1.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog Makefile README changelog
+ doc/yaboot-howto.de.sgml doc/yaboot-howto.sgml first/ofboot
+ second/cmdline.c second/file.c second/fs.c second/fs_ext2.c
+ second/fs_of.c second/fs_xfs.c second/md5.c second/partition.c
+ second/prom.c second/yaboot.c ybin/ofpath ybin/yabootconfig
+ ybin/ybin
+
+
+2002-09-08 00:17:53 GMT Ethan Benson <erbenson at alaska.net> patch-29
+
+ Summary:
+ update timestamp save file.
+ Revision:
+ yaboot--devel--1.3--patch-29
+
+ * update timestamp save file.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog
+
+
+2002-09-08 00:13:58 GMT Ethan Benson <erbenson at alaska.net> patch-28
+
+ Summary:
+ Fix partition file search
+ Revision:
+ yaboot--devel--1.3--patch-28
+
+ * Change file_block_open() to check for FILE_OK rather then NULL
+ return from fs_open(). When no partition is specified in a file open
+ call yaboot will loop through all known partitions until the file is
+ found, or no more partitions are left. In older versions fs_open()
+ would check for FILE_OK, so checking for NULL return from fs_open()
+ worked, in current versions fs_open() checks for BADFS so proper
+ errors can be reported. This only really affects IBM CHRP.
+
+
+ modified files:
+ ChangeLog second/file.c
+
+
+2002-08-18 22:33:31 GMT Ethan Benson <erbenson at alaska.net> patch-27
+
+ Summary:
+ make version numbers loudly unsupported due to dumb dist maintainers
+ Revision:
+ yaboot--devel--1.3--patch-27
+
+ * make version numbers loudly unsupported due to dumb dist
+ maintainers, real versions not in place till release time. UNRELEASED
+ SOFTWARE SHOULD NOT BE PACKAGED.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog Makefile ybin/yabootconfig
+ ybin/ybin
+
+
+2002-08-15 07:26:38 GMT Ethan Benson <erbenson at alaska.net> patch-26
+
+ Summary:
+ Bump yabootconfig version
+ Revision:
+ yaboot--devel--1.3--patch-26
+
+ * Bump yabootconfig version number.
+
+
+
+ modified files:
+ 0arch-timestamps0 ChangeLog ybin/yabootconfig
+
+
+2002-08-15 07:24:35 GMT Ethan Benson <erbenson at alaska.net> patch-25
+
+ Summary:
+ Fix rare fstab parsing bug in yabootconfig
+ Revision:
+ yaboot--devel--1.3--patch-25
+
+ * Fix a rare parsing bug in yabootconfig's /etc/fstab parsing. If the
+ user had commented entries for the / filesystem yabootconfig would end
+ up detecting one of those.
+
+ modified files:
+ 0arch-timestamps0 ChangeLog ybin/yabootconfig
+
+
+2002-07-29 08:01:44 GMT Ethan Benson <erbenson at alaska.net> patch-24
+
+ Summary:
+ Don't recommend reporting bugs to benh in yabootconfig(8)
+ Revision:
+ yaboot--devel--1.3--patch-24
+
+ * Don't recommend reporting bugs to benh in yabootconfig(8).
+
+
+
+
+ modified files:
+ 0arch-timestamps0 ChangeLog man/yabootconfig.8
+
+
+2002-07-03 08:17:12 GMT Ethan Benson <erbenson at alaska.net> patch-23
+
+ Summary:
+ Fix reiserfs symlink resolution
+ Revision:
+ yaboot--devel--1.3--patch-23
+
+ * Fix reiserfs symlink resolution which could fail in certain circumstances.
+
+
+
+ modified files:
+ 0arch-timestamps0 ChangeLog include/reiserfs/reiserfs.h
+
+
+2002-05-29 08:50:39 GMT Ethan Benson <erbenson at alaska.net> patch-22
+
+ Summary:
+ Update timestamp file to exclude {arch}/*
+ Revision:
+ yaboot--devel--1.3--patch-22
+
+ Update timestamp file to exclude {arch}/*.
+
+
+
+
+ modified files:
+ 0arch-timestamps0 ChangeLog
+
+
+2002-05-04 13:00:23 GMT Ethan Benson <erbenson at alaska.net> patch-21
+
+ Summary:
+ Add 0arch-timestamps0 setftime timestamp database
+ Revision:
+ yaboot--devel--1.3--patch-21
+
+ Add 0arch-timestamps0 setftime timestamp database. This allows us to
+ work around arch's lack of preserving timestamps.
+
+
+ new files:
+ .arch-ids/0arch-timestamps0.id 0arch-timestamps0
+
+ modified files:
+ ChangeLog
+
+
+2002-04-20 13:52:09 GMT Ethan Benson <erbenson at alaska.net> patch-20
+
+ Summary:
+ Update upstream notice in yaboot-howto, translate it to de.
+ Revision:
+ yaboot--devel--1.3--patch-20
+
+ * Update upstream notice in yaboot-howto, translate it to de.
+
+ modified files:
+ ChangeLog doc/yaboot-howto.de.sgml doc/yaboot-howto.sgml
+
+
+2002-03-31 05:21:42 GMT Ethan Benson <erbenson at alaska.net> patch-19
+
+ Summary:
+ Remove more arch crap in clean target
+ Revision:
+ yaboot--devel--1.3--patch-19
+
+ * Remove ,,* in clean target, this is more crap arch leaves laying around.
+
+ modified files:
+ ChangeLog Makefile
+
+
+2002-03-31 05:11:46 GMT Ethan Benson <erbenson at alaska.net> patch-18
+
+ Summary:
+ Fix make clean from previous patch
+ Revision:
+ yaboot--devel--1.3--patch-18
+
+ find man page is on crack. Fix find calls my way which appears to work correctly.
+
+ modified files:
+ ChangeLog Makefile
+
+
+2002-03-31 05:00:26 GMT Ethan Benson <erbenson at alaska.net> patch-17
+
+ Summary:
+ Update clean targets
+ Revision:
+ yaboot--devel--1.3--patch-17
+
+ * Remove chmod calls from make clean, arch is supposed to keep track
+ of permissions correctly so they shouldn't be needed now.
+
+ * Add '-path './{arch}' -prune -o ' to all the find calls so cleaning
+ doesn't recurse into arch's revision control directories and possibly
+ corrupt them.
+
+ * Add archclean target which removes all of arch's cruft so release
+ tarballs won't be ridiculously bloated (arch keeps a complete
+ duplicate copy of the source making the tarball twice the size it
+ should be, no good for release tarballs). If people want a `archable'
+ tree they should just use arch to check one out.
+
+ modified files:
+ ChangeLog Makefile
+
+
+2002-03-27 14:10:34 GMT Ethan Benson <erbenson at alaska.net> patch-16
+
+ Summary:
+ sync with latest yaboot CVS
+ Revision:
+ yaboot--devel--1.3--patch-16
+
+ Add german howto for yaboot-howto.
+
+ Typo fixes/minor updates to yaboot-howto.
+
+ small fixes to elfextract.
+
+
+
+ new files:
+ doc/.arch-ids/yaboot-howto.de.sgml.id doc/yaboot-howto.de.sgml
+
+ modified files:
+ ChangeLog Makefile doc/Makefile doc/yaboot-howto.sgml
+ util/elfextract.c
+
+
+2002-03-27 13:55:42 GMT Ethan Benson <erbenson at alaska.net> patch-15
+
+ Summary:
+ Commit yaboot 1.3.6
+ Revision:
+ yaboot--devel--1.3--patch-15
+
+ Commit yaboot 1.3.6.
+
+ modified files:
+ ChangeLog Makefile changelog doc/README.rs6000
+ doc/yaboot-howto.sgml include/bootinfo.h include/cfg.h
+ include/cmdline.h include/debug.h include/errors.h
+ include/fdisk-part.h include/file.h include/fs.h
+ include/mac-part.h include/partition.h include/prom.h
+ include/yaboot.h lib/malloc.c lib/string.S second/cache.S
+ second/cfg.c second/cmdline.c second/file.c second/fs.c
+ second/fs_ext2.c second/fs_iso.c second/fs_of.c
+ second/fs_reiserfs.c second/fs_xfs.c second/md5.c
+ second/partition.c second/prom.c second/yaboot.c
+ util/addnote.c util/elfextract.c ybin/ybin
+
+
+2002-03-27 13:45:22 GMT Ethan Benson <erbenson at alaska.net> patch-14
+
+ Summary:
+ Commit yaboot 1.3.6-pre2
+ Revision:
+ yaboot--devel--1.3--patch-14
+
+ Commit yaboot 1.3.6-pre2.
+
+ modified files:
+ ChangeLog Makefile TODO changelog man/yabootconfig.8
+ second/file.c second/yaboot.c ybin/ybin
+
+
+2002-03-27 13:37:21 GMT Ethan Benson <erbenson at alaska.net> patch-13
+
+ Summary:
+ Commit yaboot 1.3.6-pre1
+ Revision:
+ yaboot--devel--1.3--patch-13
+
+ Commit yaboot 1.3.6-pre1.
+
+ modified files:
+ ChangeLog Makefile README THANKS TODO changelog
+ doc/README.rs6000 doc/examples/simpleboot.chrp
+ doc/examples/yaboot.conf.multi-boot
+ doc/examples/yaboot.conf.rs6000 etc/yaboot.conf man.patch
+ man/mkofboot.8 man/yaboot.8 man/ybin.8 second/file.c
+ second/yaboot.c ybin/yabootconfig ybin/ybin
+
+ renamed files:
+ doc/examples/.arch-ids/yaboot.conf.rs6k.id
+ ==> doc/examples/.arch-ids/yaboot.conf.rs6000.id
+ doc/examples/yaboot.conf.rs6k
+ ==> doc/examples/yaboot.conf.rs6000
+
+
+2002-03-27 13:30:47 GMT Ethan Benson <erbenson at alaska.net> patch-12
+
+ Summary:
+ Commit yaboot 1.3.5
+ Revision:
+ yaboot--devel--1.3--patch-12
+
+ Commit yaboot 1.3.5.
+
+ new files:
+ doc/.arch-ids/Makefile.id doc/.arch-ids/yaboot-howto.sgml.id
+ doc/Makefile doc/yaboot-howto.sgml
+
+ modified files:
+ ChangeLog Makefile THANKS changelog man.patch
+ man/yaboot.conf.5 ybin/ybin
+
+
+2002-03-27 13:25:55 GMT Ethan Benson <erbenson at alaska.net> patch-11
+
+ Summary:
+ Commit yaboot 1.3.5-pre3
+ Revision:
+ yaboot--devel--1.3--patch-11
+
+ Commit yaboot 1.3.5-pre3.
+
+ modified files:
+ ChangeLog Makefile man.patch man/yaboot.conf.5 second/yaboot.c
+ ybin/ybin
+
+
+2002-03-27 13:22:23 GMT Ethan Benson <erbenson at alaska.net> patch-10
+
+ Summary:
+ Commit yaboot 1.3.5-pre2
+ Revision:
+ yaboot--devel--1.3--patch-10
+
+ Commit yaboot 1.3.5-pre2.
+
+ modified files:
+ ChangeLog Makefile changelog man.patch man/yaboot.conf.5
+ second/fs_ext2.c second/prom.c second/yaboot.c ybin/ybin
+
+
+2002-03-26 15:11:26 GMT Ethan Benson <erbenson at alaska.net> patch-9
+
+ Summary:
+ Commit yaboot 1.3.5-pre1
+ Revision:
+ yaboot--devel--1.3--patch-9
+
+ Commit yaboot 1.3.5-pre1.
+
+ removed files:
+ include/et/.arch-ids/com_err.c.id include/et/com_err.c
+
+ modified files:
+ ChangeLog Makefile TODO changelog include/bootinfo.h
+ include/ctype.h include/debug.h include/ext2fs/bitops.h
+ include/ext2fs/ext2_err.h include/ext2fs/ext2_io.h
+ include/ext2fs/ext2fs.h lib/libext2fs.a second/cfg.c
+ second/file.c second/fs.c second/fs_ext2.c second/fs_iso.c
+ second/fs_of.c second/fs_reiserfs.c second/fs_xfs.c
+ second/iso_util.c second/partition.c second/prom.c
+ second/yaboot.c util/addnote.c ybin/ybin
+
+
+2002-03-26 15:05:27 GMT Ethan Benson <erbenson at alaska.net> patch-8
+
+ Summary:
+ Commit yaboot 1.3.4
+ Revision:
+ yaboot--devel--1.3--patch-8
+
+ Commit yaboot 1.3.4.
+
+ modified files:
+ ChangeLog Makefile changelog include/bootinfo.h
+ include/ctype.h include/debug.h include/file.h second/cfg.c
+ second/file.c second/fs.c second/fs_ext2.c second/fs_iso.c
+ second/iso_util.c second/partition.c second/prom.c
+ second/yaboot.c util/addnote.c ybin/ybin
+
+
+2002-03-26 15:00:49 GMT Ethan Benson <erbenson at alaska.net> patch-7
+
+ Summary:
+ Commit yaboot 1.3.4-pre3
+ Revision:
+ yaboot--devel--1.3--patch-7
+
+ Commit yaboot 1.3.4-pre3.
+
+ new files:
+ include/.arch-ids/debug.h.id include/debug.h
+
+ modified files:
+ ChangeLog Makefile changelog include/errors.h include/file.h
+ include/fs.h include/partition.h include/prom.h second/cfg.c
+ second/file.c second/fs_ext2.c second/fs_of.c
+ second/fs_reiserfs.c second/fs_xfs.c second/partition.c
+ second/prom.c second/yaboot.c ybin/ybin
+
+
+2002-03-26 14:42:58 GMT Ethan Benson <erbenson at alaska.net> patch-6
+
+ Summary:
+ Commit yaboot 1.3.4-pre2
+ Revision:
+ yaboot--devel--1.3--patch-6
+
+ Commit yaboot 1.3.4-pre2.
+
+ modified files:
+ ChangeLog Makefile changelog second/file.c second/yaboot.c
+ ybin/ybin
+
+
+2002-03-25 15:13:19 GMT Ethan Benson <erbenson at alaska.net> patch-5
+
+ Summary:
+ Commit yaboot 1.3.4-pre1
+ Revision:
+ yaboot--devel--1.3--patch-5
+
+ Commit yaboot 1.3.4-pre1.
+
+ new files:
+ include/xfs/.arch-ids/=id include/xfs/.arch-ids/xfs.h.id
+ include/.arch-ids/errors.h.id second/.arch-ids/fs_xfs.c.id
+ .arch-ids/Config.id include/xfs/xfs.h include/errors.h
+ second/fs_xfs.c Config
+
+ removed files:
+ include/.arch-ids/gui.h.id include/.arch-ids/video.h.id
+ second/gui/.arch-ids/=id second/gui/.arch-ids/colormap.c.id
+ second/gui/.arch-ids/effects.c.id
+ second/gui/.arch-ids/pcx.c.id second/gui/.arch-ids/video.c.id
+ include/gui.h include/video.h second/gui/colormap.c
+ second/gui/effects.c second/gui/pcx.c second/gui/video.c
+
+ modified files:
+ ChangeLog Makefile THANKS changelog include/file.h
+ include/fs.h include/prom.h include/string.h include/yaboot.h
+ lib/malloc.c second/cfg.c second/file.c second/fs.c
+ second/fs_ext2.c second/fs_iso.c second/fs_of.c
+ second/fs_reiserfs.c second/partition.c second/prom.c
+ second/yaboot.c util/addnote.c ybin/ybin
+
+ new directories:
+ include/xfs/.arch-ids include/xfs
+
+ removed directories:
+ second/gui/.arch-ids second/gui
+
+
+2002-03-25 14:50:10 GMT Ethan Benson <erbenson at alaska.net> patch-4
+
+ Summary:
+ Commit yaboot 1.3.3
+ Revision:
+ yaboot--devel--1.3--patch-4
+
+ Commit yaboot 1.3.3.
+
+ modified files:
+ ChangeLog Makefile changelog first/ofboot man.patch
+ man/yaboot.conf.5 man/yabootconfig.8 ybin/yabootconfig
+ ybin/ybin
+
+
+2002-03-25 14:28:05 GMT Ethan Benson <erbenson at alaska.net> patch-3
+
+ Summary:
+ Commit yaboot 1.3.2
+ Revision:
+ yaboot--devel--1.3--patch-3
+
+ Commit yaboot 1.3.2.
+
+ modified files:
+ ChangeLog Makefile changelog ybin/ybin
+
+
+2002-03-25 14:05:52 GMT Ethan Benson <erbenson at alaska.net> patch-2
+
+ Summary:
+ Commit yaboot 1.3.1
+ Revision:
+ yaboot--devel--1.3--patch-2
+
+ Commit yaboot 1.3.1.
+
+ modified files:
+ ChangeLog Makefile changelog doc/README.rs6000 ybin/ybin
+
+
+2002-03-25 07:43:37 GMT Ethan Benson <erbenson at alaska.net> patch-1
+
+ Summary:
+ Commit yaboot 1.3.0
+ Revision:
+ yaboot--devel--1.3--patch-1
+
+ Commit yaboot 1.3.0.
+
+ new files:
+ .arch-ids/BUGS.id .arch-ids/COPYING.id .arch-ids/INSTALL.id
+ .arch-ids/Makefile.id .arch-ids/README.id
+ .arch-ids/README.man.patch.id .arch-ids/THANKS.id
+ .arch-ids/TODO.id .arch-ids/changelog.id doc/.arch-ids/=id
+ doc/.arch-ids/README.ofboot.id doc/.arch-ids/README.ofpath.id
+ doc/.arch-ids/README.rs6000.id doc/examples/.arch-ids/=id
+ doc/examples/.arch-ids/README.dualboot.chrp.id
+ doc/examples/.arch-ids/README.mbicons.id
+ doc/examples/.arch-ids/README.simpleboot.chrp.id
+ doc/examples/.arch-ids/dualboot.chrp.id
+ doc/examples/.arch-ids/large-penguin.mbicon.id
+ doc/examples/.arch-ids/simpleboot.chrp.id
+ doc/examples/.arch-ids/yaboot.conf.multi-boot.id
+ doc/examples/.arch-ids/yaboot.conf.rs6k.id etc/.arch-ids/=id
+ etc/.arch-ids/yaboot.conf.id first/.arch-ids/=id
+ first/.arch-ids/ofboot.id include/.arch-ids/=id
+ include/asm/.arch-ids/=id include/asm/.arch-ids/elf.h.id
+ include/asm/.arch-ids/ppc_asm.tmpl.id
+ include/asm/.arch-ids/processor.h.id
+ include/.arch-ids/bootinfo.h.id
+ include/.arch-ids/byteorder.h.id include/.arch-ids/cfg.h.id
+ include/.arch-ids/cmdline.h.id include/.arch-ids/ctype.h.id
+ include/et/.arch-ids/=id include/et/.arch-ids/com_err.c.id
+ include/et/.arch-ids/com_err.h.id include/ext2fs/.arch-ids/=id
+ include/ext2fs/.arch-ids/bitops.h.id
+ include/ext2fs/.arch-ids/ext2_err.h.id
+ include/ext2fs/.arch-ids/ext2_io.h.id
+ include/ext2fs/.arch-ids/ext2fs.h.id
+ include/.arch-ids/fdisk-part.h.id include/.arch-ids/file.h.id
+ include/.arch-ids/fs.h.id include/.arch-ids/gui.h.id
+ include/linux/.arch-ids/=id include/linux/.arch-ids/elf.h.id
+ include/linux/.arch-ids/ext2_fs.h.id
+ include/linux/.arch-ids/iso_fs.h.id
+ include/linux/.arch-ids/stat.h.id
+ include/linux/.arch-ids/types.h.id
+ include/.arch-ids/mac-part.h.id include/.arch-ids/md5.h.id
+ include/.arch-ids/partition.h.id include/.arch-ids/prom.h.id
+ include/reiserfs/.arch-ids/=id
+ include/reiserfs/.arch-ids/reiserfs.h.id
+ include/.arch-ids/setjm2.h.id include/.arch-ids/setjmp.h.id
+ include/.arch-ids/stdlib.h.id include/.arch-ids/string.h.id
+ include/.arch-ids/swab.h.id include/.arch-ids/types.h.id
+ include/.arch-ids/video.h.id include/.arch-ids/yaboot.h.id
+ lib/.arch-ids/=id lib/.arch-ids/ctype.c.id
+ lib/.arch-ids/libext2fs.a.id lib/.arch-ids/malloc.c.id
+ lib/.arch-ids/nosys.c.id lib/.arch-ids/string.S.id
+ lib/.arch-ids/strstr.c.id lib/.arch-ids/strtol.c.id
+ lib/.arch-ids/vsprintf.c.id man/.arch-ids/=id
+ man/.arch-ids/bootstrap.8.id man/.arch-ids/mkofboot.8.id
+ man/.arch-ids/ofpath.8.id man/.arch-ids/yaboot.8.id
+ man/.arch-ids/yaboot.conf.5.id man/.arch-ids/yabootconfig.8.id
+ man/.arch-ids/ybin.8.id .arch-ids/man.patch.id
+ second/.arch-ids/=id second/.arch-ids/cache.S.id
+ second/.arch-ids/cfg.c.id second/.arch-ids/cmdline.c.id
+ second/.arch-ids/crt0.S.id second/.arch-ids/file.c.id
+ second/.arch-ids/fs.c.id second/.arch-ids/fs_ext2.c.id
+ second/.arch-ids/fs_iso.c.id second/.arch-ids/fs_of.c.id
+ second/.arch-ids/fs_reiserfs.c.id second/gui/.arch-ids/=id
+ second/gui/.arch-ids/colormap.c.id
+ second/gui/.arch-ids/effects.c.id
+ second/gui/.arch-ids/pcx.c.id second/gui/.arch-ids/video.c.id
+ second/.arch-ids/iso_util.c.id second/.arch-ids/md5.c.id
+ second/.arch-ids/partition.c.id second/.arch-ids/prom.c.id
+ second/.arch-ids/setjmp.S.id second/.arch-ids/yaboot.c.id
+ util/.arch-ids/=id util/.arch-ids/addnote.c.id
+ util/.arch-ids/elfextract.c.id ybin/.arch-ids/=id
+ ybin/.arch-ids/mkofboot.id ybin/.arch-ids/ofpath.id
+ ybin/.arch-ids/yabootconfig.id ybin/.arch-ids/ybin.id BUGS
+ COPYING INSTALL Makefile README README.man.patch THANKS TODO
+ changelog doc/README.ofboot doc/README.ofpath
+ doc/README.rs6000 doc/examples/README.dualboot.chrp
+ doc/examples/README.mbicons
+ doc/examples/README.simpleboot.chrp doc/examples/dualboot.chrp
+ doc/examples/large-penguin.mbicon doc/examples/simpleboot.chrp
+ doc/examples/yaboot.conf.multi-boot
+ doc/examples/yaboot.conf.rs6k etc/yaboot.conf first/ofboot
+ include/asm/elf.h include/asm/ppc_asm.tmpl
+ include/asm/processor.h include/bootinfo.h include/byteorder.h
+ include/cfg.h include/cmdline.h include/ctype.h
+ include/et/com_err.c include/et/com_err.h
+ include/ext2fs/bitops.h include/ext2fs/ext2_err.h
+ include/ext2fs/ext2_io.h include/ext2fs/ext2fs.h
+ include/fdisk-part.h include/file.h include/fs.h include/gui.h
+ include/linux/elf.h include/linux/ext2_fs.h
+ include/linux/iso_fs.h include/linux/stat.h
+ include/linux/types.h include/mac-part.h include/md5.h
+ include/partition.h include/prom.h include/reiserfs/reiserfs.h
+ include/setjm2.h include/setjmp.h include/stdlib.h
+ include/string.h include/swab.h include/types.h
+ include/video.h include/yaboot.h lib/ctype.c lib/libext2fs.a
+ lib/malloc.c lib/nosys.c lib/string.S lib/strstr.c
+ lib/strtol.c lib/vsprintf.c man/bootstrap.8 man/mkofboot.8
+ man/ofpath.8 man/yaboot.8 man/yaboot.conf.5 man/yabootconfig.8
+ man/ybin.8 man.patch second/cache.S second/cfg.c
+ second/cmdline.c second/crt0.S second/file.c second/fs.c
+ second/fs_ext2.c second/fs_iso.c second/fs_of.c
+ second/fs_reiserfs.c second/gui/colormap.c
+ second/gui/effects.c second/gui/pcx.c second/gui/video.c
+ second/iso_util.c second/md5.c second/partition.c
+ second/prom.c second/setjmp.S second/yaboot.c util/addnote.c
+ util/elfextract.c ybin/mkofboot ybin/ofpath ybin/yabootconfig
+ ybin/ybin
+
+ modified files:
+ ChangeLog
+
+ new directories:
+ doc/.arch-ids doc/examples/.arch-ids etc/.arch-ids
+ first/.arch-ids include/.arch-ids include/asm/.arch-ids
+ include/et/.arch-ids include/ext2fs/.arch-ids
+ include/linux/.arch-ids include/reiserfs/.arch-ids
+ lib/.arch-ids man/.arch-ids second/.arch-ids
+ second/gui/.arch-ids util/.arch-ids ybin/.arch-ids doc
+ doc/examples etc first include include/asm include/et
+ include/ext2fs include/linux include/reiserfs lib man second
+ second/gui util ybin
+
+
+2002-03-25 03:28:42 GMT Ethan Benson <erbenson at alaska.net> base-0
+
+ Summary:
+ Create yaboot arch repo
+ Revision:
+ yaboot--devel--1.3--base-0
+
+ Create yaboot arch repo.
+
+ new files:
+ ./.arch-ids/ChangeLog.id ./ChangeLog
+
+
Added: trunk/yaboot/Config
===================================================================
--- trunk/yaboot/Config 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/Config 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,30 @@
+# Configuration variables, y == enabled n == disabled
+
+# Enable text color configurability: the fgcolor= and bgcolor= config
+# options (see yaboot.conf(5))
+#
+CONFIG_COLOR_TEXT := y
+
+# Enable colormap setup. Required on PowerMacs for text coloring to
+# work right.
+#
+CONFIG_SET_COLORMAP := y
+
+# Enable md5 passwords, allows value of password= to be an MD5 hash as
+# well as cleartext. When set to n only cleartext passwords are accepted.
+#
+USE_MD5_PASSWORDS := y
+
+# Filesystem support
+#
+# Enable SGI XFS
+#
+CONFIG_FS_XFS := y
+
+# Enable ReiserFS
+#
+CONFIG_FS_REISERFS := y
+
+# Local Variables:
+# mode: makefile
+# End:
Added: trunk/yaboot/INSTALL
===================================================================
--- trunk/yaboot/INSTALL 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/INSTALL 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,23 @@
+
+The fastest way to install ybin and yaboot is to run `make install'.
+
+This will install the man pages in /usr/local/man by default and
+ybin/mkofboot in /usr/local/sbin. yaboot and ofboot will be
+installed in /usr/local/lib/yaboot/.
+
+you may change the install paths by setting variables ROOT, PREFIX and
+MANDIR to make. ie make ROOT=/ PREFIX=/usr MANDIR=/share/man (this is only
+intended for package maintainers.)
+
+yaboot can be installed where you like but
+/usr/local/lib/yaboot/yaboot is the first default location ybin will
+look, followed by /usr/lib/yaboot/yaboot.
+
+ybin needs hfsutils version 3.2.6 or later.
+
+The man pages should be installed in /usr/local/man/man?/. The *.8.gz
+pages should be in /usr/local/man/man8/ and the *.5.gz page should be
+in /usr/local/man/man5/.
+
+If you need to remove ybin (say if your installing a debian package or
+.rpm) you can do so by issuing the command `make deinstall'.
Added: trunk/yaboot/Makefile
===================================================================
--- trunk/yaboot/Makefile 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/Makefile 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,240 @@
+## Setup
+
+include Config
+
+VERSION = 1.3.13
+# Debug mode (spam/verbose)
+DEBUG = 0
+# make install vars
+ROOT =
+PREFIX = usr/local
+MANDIR = man
+# command used to get root (needed for tarball creation)
+GETROOT = fakeroot
+
+# We use fixed addresses to avoid overlap when relocating
+# and other trouble with initrd
+
+# Load the bootstrap at 2Mb
+TEXTADDR = 0x200000
+# Malloc block at 3Mb -> 4Mb
+MALLOCADDR = 0x300000
+MALLOCSIZE = 0x100000
+# Load kernel at 20Mb and ramdisk just after
+KERNELADDR = 0x01400000
+
+# Set this to the prefix of your cross-compiler, if you have one.
+# Else leave it empty.
+#
+CROSS =
+
+# The flags for the yaboot binary.
+#
+YBCFLAGS = -Os $(CFLAGS) -nostdinc -Wall -isystem `gcc -print-file-name=include` -fsigned-char
+YBCFLAGS += -DVERSION=\"${VERSION}\" #"
+YBCFLAGS += -DTEXTADDR=$(TEXTADDR) -DDEBUG=$(DEBUG)
+YBCFLAGS += -DMALLOCADDR=$(MALLOCADDR) -DMALLOCSIZE=$(MALLOCSIZE)
+YBCFLAGS += -DKERNELADDR=$(KERNELADDR)
+YBCFLAGS += -I ./include
+
+ifeq ($(CONFIG_COLOR_TEXT),y)
+YBCFLAGS += -DCONFIG_COLOR_TEXT
+endif
+
+ifeq ($(CONFIG_SET_COLORMAP),y)
+YBCFLAGS += -DCONFIG_SET_COLORMAP
+endif
+
+ifeq ($(USE_MD5_PASSWORDS),y)
+YBCFLAGS += -DUSE_MD5_PASSWORDS
+endif
+
+ifeq ($(CONFIG_FS_XFS),y)
+YBCFLAGS += -DCONFIG_FS_XFS
+endif
+
+ifeq ($(CONFIG_FS_REISERFS),y)
+YBCFLAGS += -DCONFIG_FS_REISERFS
+endif
+
+# Link flags
+#
+LFLAGS = -Ttext $(TEXTADDR) -Bstatic
+
+# Libraries
+#
+LLIBS = lib/libext2fs.a
+
+# For compiling userland utils
+#
+UCFLAGS = -Os $(CFLAGS) -Wall -I/usr/include
+
+# For compiling build-tools that run on the host.
+#
+HOSTCC = gcc
+HOSTCFLAGS = -O2 $(CFLAGS) -Wall -I/usr/include
+
+## End of configuration section
+
+OBJS = second/crt0.o second/yaboot.o second/cache.o second/prom.o second/file.o \
+ second/partition.o second/fs.o second/cfg.o second/setjmp.o second/cmdline.o \
+ second/fs_of.o second/fs_ext2.o second/fs_iso.o second/iso_util.o \
+ lib/nosys.o lib/string.o lib/strtol.o lib/vsprintf.o lib/ctype.o lib/malloc.o lib/strstr.o
+
+ifeq ($(USE_MD5_PASSWORDS),y)
+OBJS += second/md5.o
+endif
+
+ifeq ($(CONFIG_FS_XFS),y)
+OBJS += second/fs_xfs.o
+endif
+
+ifeq ($(CONFIG_FS_REISERFS),y)
+OBJS += second/fs_reiserfs.o
+endif
+
+# compilation
+CC := $(CROSS)gcc
+LD := $(CROSS)ld
+AS := $(CROSS)as
+OBJCOPY := $(CROSS)objcopy
+
+lgcc = `$(CC) -print-libgcc-file-name`
+
+all: yaboot addnote mkofboot
+
+yaboot: $(OBJS)
+ $(LD) $(LFLAGS) $(OBJS) $(LLIBS) $(lgcc) -o second/$@
+ chmod -x second/yaboot
+
+addnote:
+ $(CC) $(UCFLAGS) -o util/addnote util/addnote.c
+
+elfextract:
+ $(CC) $(UCFLAGS) -o util/elfextract util/elfextract.c
+
+mkofboot:
+ ln -sf ybin ybin/mkofboot
+ @if [ $$(grep '^VERSION=' ybin/ybin | cut -f2 -d=) != ${VERSION} ] ; then \
+ echo "ybin/ybin: warning: VERSION mismatch"; \
+ false; \
+ fi
+
+%.o: %.c
+ $(CC) $(YBCFLAGS) -c -o $@ $<
+
+%.o: %.S
+ $(CC) $(YBCFLAGS) -D__ASSEMBLY__ -c -o $@ $<
+
+dep:
+ makedepend -Iinclude *.c lib/*.c util/*.c gui/*.c
+
+docs:
+ make -C doc all
+
+bindist: all
+ mkdir ../yaboot-binary-${VERSION}
+ $(GETROOT) make ROOT=../yaboot-binary-${VERSION} install
+ mkdir -p -m 755 ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot
+ cp -a COPYING ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot/COPYING
+ cp -a README ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot/README
+ cp -a doc/README.rs6000 ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot/README.rs6000
+ cp -a doc/yaboot-howto.html ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot/yaboot-howto.html
+ cp -a doc/yaboot-howto.sgml ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot/yaboot-howto.sgml
+ mv ../yaboot-binary-${VERSION}/etc/yaboot.conf ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot/
+ rmdir ../yaboot-binary-${VERSION}/etc
+ $(GETROOT) tar -C ../yaboot-binary-${VERSION} -zcvpf ../yaboot-binary-${VERSION}.tar.gz .
+ rm -rf ../yaboot-binary-${VERSION}
+
+clean:
+ rm -f second/yaboot util/addnote util/elfextract $(OBJS)
+ find . -not -path './\{arch\}*' -name '#*' | xargs rm -f
+ find . -not -path './\{arch\}*' -name '.#*' | xargs rm -f
+ find . -not -path './\{arch\}*' -name '*~' | xargs rm -f
+ find . -not -path './\{arch\}*' -name '*.swp' | xargs rm -f
+ find . -not -path './\{arch\}*' -name ',,*' | xargs rm -rf
+ -gunzip man/*.gz
+ rm -rf man.deb
+
+cleandocs:
+ make -C doc clean
+
+## removes arch revision control crap, only to be called for making
+## release tarballs. arch should have a export command like cvs...
+
+archclean:
+ rm -rf '{arch}'
+ find . -type d -name .arch-ids | xargs rm -rf
+ rm -f 0arch-timestamps0
+
+maintclean: clean cleandocs
+
+release: docs bindist clean
+
+strip: all
+ strip second/yaboot
+ strip --remove-section=.comment second/yaboot
+ strip util/addnote
+ strip --remove-section=.comment --remove-section=.note util/addnote
+
+install: all strip
+ install -d -o root -g root -m 0755 ${ROOT}/etc/
+ install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/sbin/
+ install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/lib
+ install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/lib/yaboot
+ install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/${MANDIR}/man5/
+ install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/${MANDIR}/man8/
+ install -o root -g root -m 0644 second/yaboot ${ROOT}/$(PREFIX)/lib/yaboot
+ install -o root -g root -m 0755 util/addnote ${ROOT}/${PREFIX}/lib/yaboot/addnote
+ install -o root -g root -m 0644 first/ofboot ${ROOT}/${PREFIX}/lib/yaboot/ofboot
+ install -o root -g root -m 0755 ybin/ofpath ${ROOT}/${PREFIX}/sbin/ofpath
+ install -o root -g root -m 0755 ybin/ybin ${ROOT}/${PREFIX}/sbin/ybin
+ install -o root -g root -m 0755 ybin/yabootconfig ${ROOT}/${PREFIX}/sbin/yabootconfig
+ rm -f ${ROOT}/${PREFIX}/sbin/mkofboot
+ ln -s ybin ${ROOT}/${PREFIX}/sbin/mkofboot
+ @gzip -9 man/*.[58]
+ install -o root -g root -m 0644 man/bootstrap.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/bootstrap.8.gz
+ install -o root -g root -m 0644 man/mkofboot.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/mkofboot.8.gz
+ install -o root -g root -m 0644 man/ofpath.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/ofpath.8.gz
+ install -o root -g root -m 0644 man/yaboot.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/yaboot.8.gz
+ install -o root -g root -m 0644 man/yabootconfig.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/yabootconfig.8.gz
+ install -o root -g root -m 0644 man/ybin.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/ybin.8.gz
+ install -o root -g root -m 0644 man/yaboot.conf.5.gz ${ROOT}/${PREFIX}/${MANDIR}/man5/yaboot.conf.5.gz
+ @gunzip man/*.gz
+ @if [ ! -e ${ROOT}/etc/yaboot.conf ] ; then \
+ echo "install -o root -g root -m 0644 etc/yaboot.conf ${ROOT}/etc/yaboot.conf"; \
+ install -o root -g root -m 0644 etc/yaboot.conf ${ROOT}/etc/yaboot.conf; \
+ else \
+ echo "/etc/yaboot.conf already exists, leaving it alone"; \
+ fi
+ @echo
+ @echo "Installation successful."
+ @echo
+ @echo "An example /etc/yaboot.conf has been installed (unless /etc/yaboot.conf already existed)"
+ @echo "You may either alter that file to match your system, or alternatively run yabootconfig"
+ @echo "yabootconfig will generate a simple and valid /etc/yaboot.conf for your system"
+ @echo
+
+deinstall:
+ rm -f ${ROOT}/${PREFIX}/sbin/ofpath
+ rm -f ${ROOT}/${PREFIX}/sbin/ybin
+ rm -f ${ROOT}/${PREFIX}/sbin/yabootconfig
+ rm -f ${ROOT}/${PREFIX}/sbin/mkofboot
+ rm -f ${ROOT}/${PREFIX}/lib/yaboot/yaboot
+ rm -f ${ROOT}/${PREFIX}/lib/yaboot/ofboot
+ rm -f ${ROOT}/${PREFIX}/lib/yaboot/addnote
+ @rmdir ${ROOT}/${PREFIX}/lib/yaboot || true
+ rm -f ${ROOT}/${PREFIX}/${MANDIR}/man8/bootstrap.8.gz
+ rm -f ${ROOT}/${PREFIX}/${MANDIR}/man8/mkofboot.8.gz
+ rm -f ${ROOT}/${PREFIX}/${MANDIR}/man8/ofpath.8.gz
+ rm -f ${ROOT}/${PREFIX}/${MANDIR}/man8/yaboot.8.gz
+ rm -f ${ROOT}/${PREFIX}/${MANDIR}/man8/yabootconfig.8.gz
+ rm -f ${ROOT}/${PREFIX}/${MANDIR}/man8/ybin.8.gz
+ rm -f ${ROOT}/${PREFIX}/${MANDIR}/man5/yaboot.conf.5.gz
+ @if [ -L ${ROOT}/boot/yaboot -a ! -e ${ROOT}/boot/yaboot ] ; then rm -f ${ROOT}/boot/yaboot ; fi
+ @if [ -L ${ROOT}/boot/ofboot.b -a ! -e ${ROOT}/boot/ofboot.b ] ; then rm -f ${ROOT}/boot/ofboot.b ; fi
+ @echo
+ @echo "Deinstall successful."
+ @echo "${ROOT}/etc/yaboot.conf has not been removed, you may remove it yourself if you wish."
+
+uninstall: deinstall
Added: trunk/yaboot/README
===================================================================
--- trunk/yaboot/README 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/README 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,270 @@
+Yaboot -- PowerPC GNU/Linux OpenFirmware bootloader
+-------------------------------------------------------------------
+
+Please read the "COPYING" file for licence informations.
+
+-------------------------------------------------------------------
+
+Yaboot is an OpenFirmware bootloader for Open Firmware based
+machines. It is known to work on "NewWorld" class powermacs (iMac and
+all machines released after it), RS/6000, and possibly other OF based
+CHRP machines. "OldWorld" PowerMacs (with the built-in MacOS ROM)
+are not supported.
+
+This README serves as a quick-start introduction to yaboot and its
+installation utilities. For a more complete usage and installation
+guide, see yaboot-howto.html/index.en.html in the same folder where
+this README is located, or else inside the doc folder in this
+directory. For documentation about all the options available, see the
+man pages (bootstrap, yaboot, yaboot.conf, ybin, mkofboot, ofpath,
+yabootconfig).
+
+Mailing lists
+-------------------------------------------------------------------
+The following mailing lists exist for yaboot:
+
+yaboot-announce Announcements regarding yaboot (read-only)
+yaboot-users User related questions/discussion regarding yaboot
+yaboot-devel Technical and development discussion regarding yaboot
+
+Please see http://lists.penguinppc.org/LISTNAME where LISTNAME is one
+of the above named lists.
+
+-------------------------------------------------------------------
+Bootloader Installation Utilities
+ybin, mkofboot, ofpath, yabootconfig
+Written by Ethan Benson <erbenson at alaska.net>
+-------------------------------------------------------------------
+
+ybin (YaBoot INstaller) and mkofboot
+-------------------------------------------------------------------
+
+ybin is a lilo/quik style bootloader installer for PowerPC based
+machines which require a bootstrap partition rather than a traditional
+bootblock (i.e. all `NewWorld' Macintoshes). When ybin is configured
+correctly you can simply type ybin at the command line as root, and
+the bootloader and its configuration file will be installed or updated
+on the bootstrap partition without any further user intervention.
+
+ybin also supports IBM PowerPC hardware which requires a slightly different
+bootstrap partition setup. For these machines, ybin uses dd to write yaboot
+directly to the partition instead of copying it to a filesystem on the
+partition. ybin will add the requisite .note section to yaboot prior to
+installation (IBM CHRP only).
+
+mkofboot is a companion script (actually a symlink to ybin) which
+initializes the bootstrap partition prior to running ybin to install
+the bootloader on it. mkofboot will confirm you want to continue
+before proceeding unless called with the -f or --force switch. This
+is in contrast to ybin, which is non destructive except that it
+overwrites any existing yaboot files (yaboot and yaboot.conf) at the
+root level of the bootstrap filesystem.
+
+mkofboot and ybin both refer to the same configuration file (normally
+yaboot.conf) to determine where the bootstrap files will be placed.
+
+IMPORTANT: The bootstrap partition should never be mounted anywhere on
+your filesystem, ybin and mkofboot will check if it is and refuse to
+operate on it if it is mounted. It is not necessary to keep anything
+but the boot loader on the bootstrap partition, yaboot will load the
+kernel from your root partition (which can be an ext2/3, XFS, or
+ReiserFS filesystem). Do not mount the bootstrap partition on top of
+/boot.
+
+ybin can update a bootstrap filesystem either on a block device or in
+an ordinary file (as in an image of a filesystem.)
+
+NOTE: You must have a secure mktemp program otherwise ybin will be
+vulnerable to race conditions. Debian's mktemp qualifies I don't know
+about the other distributions, you have been warned. The temp file is
+created in /tmp by default but ybin will respect the $TMPDIR
+environment variable.
+
+
+ofpath
+-------------------------------------------------------------------
+
+The included ofpath utility can usually determine the OpenFirmware
+device path that corresponds with a unix device node in /dev/. Ybin
+uses this utility to find the path to the bootstrap partition and to
+any defined macos/macosx partitions. ofpath is based on the utility
+`show_of_path.sh' written by Olaf Hering.
+
+
+NOTE: ofpath may not work with all SCSI cards/drivers.
+
+IMPORTANT: ofpath will NOT work on NewWorld Powermacs if the machine
+was booted with BootX.
+
+
+yabootconfig
+-------------------------------------------------------------------
+
+Yabootconfig creates a default configuration file and then runs mkofboot to
+complete the bootloader installation. yabootconfig reads the running
+system's /etc/fstab to determine the kernel location, and detects the
+location of the 800k Apple_Bootstrap partition. It will also find IBM
+CHRP bootstrap partitions (type 0x41 PReP Boot).
+
+
+
+Yaboot.conf Configuration File
+-------------------------------------------------------------------
+
+yaboot.conf configuration file settings are covered in detail in `man
+yaboot.conf'. Avoid the use of spaces in the config file, except in
+comment lines or inside quotes. Here are the essential settings.
+
+
+boot=
+Example: boot=/dev/hda2
+
+This required setting defines the bootstrap partition device. It can
+also be a regular file if you are creating a filesystem image for some
+reason. The default config file has this set to ``unconfigured'' which
+will cause ybin to complain about you not reading the docs, it is the
+only option you should need to change for ybin to work. Be sure you
+include the partition number at the end, it should never be something
+like /dev/hda.
+
+
+install=
+Example: install=/usr/lib/yaboot/yaboot or /usr/local/lib/yaboot/yaboot
+
+The full pathname to the yaboot OpenFirmware executable file. The
+default is shown above. This file will be copied to the root level of
+the bootstrap partition. Note: If you are installing an alternative
+bootloader, its filename will be changed to yaboot when it is copied
+(to match what the first stage bootloader expects to be loading).
+
+
+partition=
+Example: partition=3
+
+The partition number on which the kernel image is located. By default,
+this partition is assumed to be on the same device from which yaboot
+was loaded. If needed, device= can be used to explicitly specify the
+device.
+
+
+image=
+Examples: image=/vmlinux or image=/boot/vmlinux-2.2.19-pmac
+
+The path to the image from the root level of the partition (remember
+that yaboot is unaware of mountpoints). Don't forget to include the
+leading slash when specifying the image path (image=vmlinux will
+probably fail).
+
+
+root=
+Example: root=/dev/hda3
+
+The Linux device name for the root partition. This parameter is
+passed to the kernel when it starts up to let it know where its root
+filesystem is located. Refer to the yaboot.conf man page for details
+on kernel image options such as append=, initrd=, and initrd-size=.
+
+
+magicboot= (same as -m or --magicboot)
+Example: /usr/local/lib/yaboot/ofboot
+
+Identifies the first stage loader. The example shown is the default. The
+ofboot script it refers to is included with and configured automatically by
+ybin from options in /etc/yaboot.conf. The magicboot= can be the full
+pathname to any OF CHRP script file. Since some newer OpenFirmware
+implementations appear to require a CHRP script, the magicboot= setting is
+highly recommended. If you don't include magicboot=, then yaboot itself will
+be the active bootfile. magicboot= cannot be used on IBM CHRP.
+
+
+Boot Menu Options
+-------------------------------------------------------------------
+
+The following options work only if you have specified the magicboot= option.
+Each option specifies an OpenFirmware or unix device path to another
+operating system's boot partition. When you define one of these options you
+will be presented with a simple menu at bootup allowing you to hit `l' to
+boot GNU/Linux or another letter to boot the other OS (see below). These
+letters are typed without a shift key (the boot menu is case sensitive).
+When set to a unix device node such as /dev/hda11 then ybin will use the
+ofpath utility to determine the OpenFirmware device path.
+
+ Option Letter Operating System Type
+ --------- ------ ---------------------------------------------
+ bsd= b NetBSD or OpenBSD root partition (you must
+ have the BSD ofwboot bootloader
+ installed at /usr/local/lib/yaboot/ofwboot)
+
+ macos= m MacOS 8.* or 9.* bootable partition
+
+ macosx= x MacOS X boot partition (also see brokenosx)
+
+ darwin= d Darwin boot partition
+
+ enablecdboot c Boot from the CDROM drive
+
+ enablenetboot n Boot from the network
+
+ enableofboot o Display an OpenFirmware prompt
+
+ defaultos= The default OS to load (linux, bsd, macos,
+ darwin or macosx.
+
+brokenosx
+
+This option causes the menu entry for MacOSX to execute
+\System\Library\CoreServices\BootX from the macosx=device instead of
+the usual \\:tbxi. This is necessary if OSX is installed onto an HFS+
+filesystem instead of UFS. When OSX is installed on an HFS+ filesystem
+MacOS will mount and debless the OSX partition. Add this option if
+the OSX menu entry breaks after booting MacOS. You should not use
+this option if OSX is installed on a UFS filesystem, for UFS installs
+you specify the OSX bootstrap partition which is protected against
+MacOS.
+
+delay=
+Example: delay=5
+
+The time in seconds that the first stage ofboot loader will wait for
+you to choose a letter before booting the default OS defined in
+defaultos=. If not set, the value of timeout= (converted to seconds)
+will be used.
+
+
+Colors
+-------------------------------------------------------------------
+
+fgcolor=string
+
+Specifies the foreground (text) color used by yaboot and the
+multiboot menu. Available colors are: black, blue, light-blue, green,
+light-green, cyan, light-cyan, red, light-red, purple, light- purple,
+brown, light-gray, dark-gray, yellow, and white. The default is
+white.
+
+bgcolor=string
+
+Specifies the background color used by yaboot and the multiboot
+menu. Available colors are the same as fgcolor. The default is
+black.
+
+
+===========================================================================
+
+Copyright (C) 2000, 2001, 2002, 2003 Ethan Benson
+
+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.
+
+===========================================================================
Added: trunk/yaboot/README.man.patch
===================================================================
--- trunk/yaboot/README.man.patch 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/README.man.patch 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,4 @@
+This patch is only meant to be used by package maintainers (debian or
+redhat), it changes references to /usr/local/lib/yaboot to
+/usr/lib/yaboot in the man pages. This way the man pages will better
+reflect the real locations for packaged version of yaboot/ybin.
Added: trunk/yaboot/THANKS
===================================================================
--- trunk/yaboot/THANKS 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/THANKS 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,19 @@
+In no particular order:
+
+ * Daniel Jacobowitz <dan at debian.org> for Debian packaging, advice and busybox help.
+ * Benjamin Herrenschmidt <benh at kernel.crashing.org> for yaboot and great work on the kernel.
+ * Colin Walters <walters at verbum.org> for advice, help with XFS and general code auditing.
+ * Charles Stevenson <csteven at newhope.terraplex.com> for adding color config support to yaboot.
+ * Chris Emerson <cemerson at chiark.greenend.org.uk> for the Forth code in ofboot.
+ * iNOUE Koich! <inoue at ma.ns.musashi-tech.ac.jp> for advice and help [re]writing ofboot's Forth code.
+ * Segher Boessenkool <segher at chello.nl> for help with ofboot's Forth code, and the new penguin icon.
+ * Tom Rini <trini at kernel.crashing.org> for adding devfs support to ofpath.
+ * Chris Tillman <tillman at azstarnet.com> for writing the yaboot-howto, documentation improvement.
+ * Eric Peden <ericpeden at homemail.com> for writing the yaboot FAQ.
+ * Nicholas Humfrey <njh399 at ecs.soton.ac.uk> for the badge icons in ofboot.
+ * Hollis Blanchard <hollis+ at andrew.cmu.edu> YellowDog/RPM packaging.
+ * Brad Midgley <brad at turbolinux.com> for Turbolinux/RPM packaging.
+ * Olaf Hering <olh at suse.de> for figuring out how to map SCSI /dev nodes to OF paths.
+ * Josh Huber <huber at mclinux.com> for PowerBook1998 ofpath support.
+ * Ian the T <ian at iantheterrible.com> for donating shell access to add 8600 support to ofpath.
+ * anyone i left out!
Added: trunk/yaboot/TODO
===================================================================
--- trunk/yaboot/TODO 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/TODO 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,4 @@
+* Yaboot 1.x is in strict maintenance mode, only critical bugfixes
+ will be done. Please consult the yaboot 1.99 devel tree for the TODO
+ on the 2.0 rewrite. See http://penguinppc.org/projects/yaboot/arch.shtml
+ for how to access the development tree.
Added: trunk/yaboot/changelog
===================================================================
--- trunk/yaboot/changelog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/changelog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,809 @@
+2004-07-11 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.3.13
+
+ * ofpath: Fix several errors going to stdout rather then stderr.
+
+ * ybin: Detect broken /dev/nvram better.
+
+ * yabootconfig:
+ - Support initrd.
+ - Support LABEL= and UUID= in /etc/fstab (Colin Watson).
+
+ * yaboot: Support ~6MB kernels for tftp (this is maxed out for yaboot1).
+
+2004-04-17 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.3.12
+
+ * ofpath: Support for 2.6 kernels (2.6.3 or later required).
+
+ * yaboot-howto: Add caveat regarding OSX UFS filesystems
+ (Thanks to Brian Sammon, and to Stefan Pfetzing for the German
+ translation).
+
+2003-11-20 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.3.11
+
+ * Support new Apple G5 PowerMacs.
+
+ * ofpath: Bugfix to properly support IDE add-on cards.
+
+2003-02-26 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.3.10
+
+ * ofpath: Apple apparently can't decide whether its called `ata'
+ or `ide'; fix support for early iMac models.
+
+2003-02-12 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.3.9
+
+ * Mark first stage bootloader as compatible with new MacOS9
+ incompatible PowerMacs.
+
+ * Really fix file search so IBM CHRP will work if there is more than
+ one type 0x83 partition.
+
+2002-12-09 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.3.8
+
+ * ofpath: Support new Xserve and Windtunnel PowerMacs.
+ - NOTE: For this to fully work it requires a sufficiently recent
+ kernel.
+
+ * Prefer $PATH_PREFIX/usr/sbin/ofpath if it exists.
+
+ * yabootconfig: Add append="video=ofonly" if the running kernel
+ was booted with it, only if user does not specify --kernel-args.
+
+2002-9-28 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.3.7
+
+ * Documentation:
+ - Add German translation of yaboot-howto.
+ - Small updates to yaboot-howto.
+ - No longer tell people to send bugs to benh in yabootconfig(8).
+
+ * yaboot:
+ - Fix file search so IBM CHRP will work if there is more than
+ one type 0x83 partition.
+ - Fix possible reiserfs symlink resolution failure.
+
+ * yabootconfig:
+ - Fix corner case /etc/fstab parsing failure. (Debian bug#156742).
+
+ * Small build system modifications (mostly to accommodate the use of
+ the arch revision control system.
+
+ * yaboot now includes two changelogs: "ChangeLog" which is a
+ detailed automatically generated list of changes, and "changelog"
+ (this file) which is a hand written understandable summary of
+ changes between releases.
+
+2001-12-01 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.3.6
+
+ * The "IBM needs to test prereleases" release.
+
+ * Documentation:
+ - New IGNORE^H^H^H^H^H^HREADME, thanks to Chris Tillman for
+ cleaning up the pile of cruft that this thing was.
+ - yabootconfig man page was missing --kernel-args from SYNOPSIS.
+ - Include README.rs6000 in the binary dist.
+
+ * ybin:
+ - Automatically use fstype=raw on IBM CHRP, it no longer needs
+ to be explicitly set in /etc/yaboot.conf.
+ - Deprecate ybin's yaboot.conf auto-generation, use yabootconfig
+ instead.
+
+ * yaboot:
+ - Fix IBM CHRP support.
+ - Fix device path parsing to support devices containing a comma,
+ but not including a filename.
+ - Add support for zImage.initrd (Peter Bergner).
+ - help output no longer claims device=NULL if yaboot.conf does not define it.
+ - Make password prompting a bit nicer looking.
+ - Short penalty delay on incorrect passwords.
+
+2001-10-28 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.3.5
+
+ * Add yaboot-howto, Thanks to Chris Tillman.
+
+ * yaboot:
+ - XFS fixes for large partitions (Brendan O'Dea).
+ - Upgrade libext2fs to 1.25, this adds full ext3 support to yaboot.
+ - Reiserfs fixes (Jeff Mahoney).
+ - Implement the message= configuration option (see yaboot.conf man page).
+
+2001-10-13 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.3.4
+
+ * ybin: Correct a verbosity message.
+
+ * yaboot:
+ - Add SGI XFS filesystem support.
+ - Rewrite OpenFirmware device path parsing code. This fixes
+ many bugs and inconsistencies in yaboot's file loading.
+ - Fix OpenFirmware filesystem support to automatically convert
+ path separator from / to \. CDROM authors no longer need to use
+ kludges like image=\\install\\powermac\\vmlinux.
+ - Fix kernel loading on some systems.
+ - Allow for getting files from tftp server that does not run a
+ bootpd/dhcpd.
+ - Fix netboot when using the `n' key.
+ - Fix a great deal of incorrect format strings which could cause
+ yaboot crashes.
+ - Fix all filesystems to properly return error conditions, and
+ report those error conditions (instead of just saying `image not
+ found').
+ - Make configuration file open error consistent with other file
+ open errors.
+ - Add `help' command to yaboot which prints out basic usage information.
+ - Add non-fatal warning when bootstrap partition has wrong type (pmac only).
+ - Minor code rearrangement.
+ - General cruft removal and code cleanup.
+
+ * Makefile cleanup, make filesystems configurable.
+
+2001-09-25 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.3.3
+
+ * Add --debug option to yabootconfig
+
+ * Fix BSD booting support somewhat. The bsd= option's semantics
+ have changed, it must now be set to the BSD root partition. ybin
+ will now install /usr/local/lib/yaboot/ofwboot onto the bootstrap
+ partition when bsd= is present in /etc/yaboot.conf. The dual boot
+ menu will then execute "ofwboot <bsd_root_part>,/bsd" this means
+ the bsd kernel must be at /bsd on the BSD root partition.
+
+2001-09-24 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.3.2
+
+ * Fix Makefile thinko where make install failed if
+ /etc/yaboot.conf already existed.
+
+2001-09-20 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.3.1
+
+ * Don't include /etc/yaboot.conf in binary dist, instead put the
+ example in /usr/local/share/doc. This way extracting the tarball
+ from / won't blow away existing configs.
+
+ * Move strip commands from install target to strip target, install
+ now depends on strip.
+
+2001-09-20 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.3
+
+ * Merging of ybin and yaboot source trees, this is now the
+ official upstream yaboot/ybin source tree.
+
+ * yaboot:
+ - Various ppc64 & chrp fixes by Peter Bergner, fix fdisk partition
+ handling.
+ - Fix netboot (was broken by reiserfs patch)
+
+2001-08-26 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.2.6
+
+ * ofpath became broken on non-scsi systems due to quoting fix.
+
+2001-08-20 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.2.5
+
+ * Fix broken quoting uncovered by debian's current /bin/ash.
+
+2001-08-06 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.2.4
+
+ * ofboot: remove <OS-VOLUME-NAME> tag as it was causing the
+ OpenFirmware multibooter to crash.
+
+ * mkofboot: zero first 800K of bootstrap partition before creating
+ filesystem.
+
+ * yaboot:
+ - Version 1.2.3
+ - Supports using an md5 hash as well as plaintext password. (me)
+ - Fix again system.map loading. That also fix an old pending bug
+ we had where yaboot could pass random values for system.map,
+ causing the kernel to mark random pages reserved. (BenH)
+ - IBM CHRP fixes. (Peter Bergner)
+ - Add reiserfs support (Jeff Mahoney)
+
+2001-06-30 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.2.3
+
+ * ofpath:
+ - Version 1.0
+ - Add support for IBM CHRP, thanks to Marco d'Itri for testing.
+ - Use real wc if available, this speeds up ofpath slightly for scsi.
+ - Make variables local to their function unless they need to be global.
+
+ * ybin:
+ - If installing on IBM CHRP run addnote on yaboot binary before installing.
+ - Reword some error/verbose messages
+ - Make variables local to their function unless they need to be global.
+
+2001-06-24 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.2.2
+
+ * yabootconfig:
+ - Now works with braindamaged versions of pdisk.
+ - Add --kernel-args switch which allows boot-floppies to easily
+ add an append= line if needed.
+
+2001-06-01 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.2.1
+
+ * Fix test for strict posix/SUS echo behavior.
+
+ * Check for printf built into the shell.
+
+ * yabootconfig: check for and attempt to deal with cross device symlinks.
+
+2001-05-28 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.2
+
+ * Added yabootconfig, a script to build a valid /etc/yaboot.conf
+
+ * ybin:
+ - Detect IBM CHRP hardware and disable nvram update automatically
+ - Automatically run yabootconfig if /etc/yaboot.conf is missing
+ - Check for PATH_PREFIX environment variable and add all bin and
+ sbin directories from under it to PATH. This is for boot-floppies.
+ - Add bsd= to list of multiboot options.
+
+ * ofboot: bump maximum number of OSes to 8.
+
+ * ofpath:
+ - No longer report bogus paths for non-existent scsi devices.
+ - Fix bug where garbage characters were mixed with the
+ OpenFirmware device path.
+ - Fix broken Wallstreet PowerBook support.
+ - Add support for silly devfs naming convention, Thanks to Tom Rini.
+
+2001-05-06 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.1.1
+
+ * ofboot:
+ - Hopefully fix random and rare booting problem when chainloading
+ other OSes. Thanks to Segher Boessenkool for the fix.
+ - Add volume name which shows up in the OpenFirmware multiboot
+ screen.
+ - It is now possible to replace the badge icon for the multiboot
+ screen, see examples/README.mbicon.
+
+ * yaboot:
+ - Version 1.2.1
+ - Includes my previous 1.1.1-eb3 patches for password protection and single-key.
+
+ * Various spelling errors and clarifications to man pages. Thanks to sword.
+
+2001-04-26 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.1
+
+ * ofpath:
+ - Version 0.8
+ - Add support for Performa 6400_200, PowerMac 4400, and the clones.
+ - Removed `No such file or directory' errors when system has no
+ scsi at all.
+
+ * ybin:
+ - If delay= is not set use value of timeout= (converted to
+ seconds) instead.
+ - Removed command line options --type, --creator, and long
+ obsolete and deprecated --conffile. The config file options
+ hfstype and hfscreator are still there.
+ - Removed long obsolete and deprecated bootconf= config option.
+ - Removed some old now unneeded debug cruft.
+
+ * yaboot:
+ - Include version 1.1.1-eb3, this includes the following changes
+ - Adds password protection capabilities.
+ - Add `single-key' option from silo.
+
+ * Documentation:
+ - Rewrote the yaboot.conf man page, now derived from silo.conf(5)
+
+2001-03-22 Ethan Benson <erbenson at alaska.net>
+
+ * Version 1.0
+
+ * ybin:
+ - Fix a few bugs that occured when magicboot= was not used.
+ - Add basic support for IBM style bootstrap partitions. These
+ partitions have yaboot dded directly to them. See the yaboot.conf
+ man page regarding fstype for more info, also
+ examples/yaboot.conf.rs6k.
+ - Don't require that ofpath be installed if its not needed.
+
+ * Documentation:
+ - Added examples/yaboot.conf.rs6k
+ - Man page updates for IBM support.
+
+2001-02-19 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.31
+
+ * ofpath:
+ - Quiet shell error when run on non-PowerMac (but still
+ PowerPC) hardware.
+ - Properly recognize more OldWorld PowerMac G3s.
+ - Fix OldWorld detection for kernels < 2.2.17
+ - Require that /proc be mounted.
+
+ * ybin:
+ - Fix OldWorld detection for kernels < 2.2.17
+ - Make the `not bootable on OldWorld' warning very loud and
+ obnoxious.
+ - Change PATH to make /usr/local the last component instead of
+ the first.
+ - Make the text/background color in the boot menu configurable,
+ see the yaboot.conf(5) man page for details.
+ - Change default foreground color to white per yaboot 1.0.
+ - Remove support for obsolete /etc/ybin.conf.
+
+ * Documentation:
+ - Clarified the `partition=' variable in the yaboot.conf man page
+ and correct an error in the example in that man page.
+ - Added more comments to included yaboot.conf examples.
+
+ * yaboot:
+ - Include version 1.1.1
+ - Includes color support
+
+2000-11-18 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.30
+
+ * ybin: add `brokenosx' option, when used with macosx= ybin makes
+ the MacOSX menu entry execute \System\Library\CoreServices\BootX
+ directly instead of using \\:tbxi. This is necessary for
+ people who insist on installing OSX on HFS+ instead of UFS, since
+ MacOS deblesses HFS+ OSX partitions.
+
+2000-10-28 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.29 (the brown paper bag release)
+
+ * The yaboot.conf man page was broken.
+
+ * While were at it, include yaboot 0.9 binary (compiled -Os,
+ stripped)
+
+2000-10-24 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.28
+
+ * ybin: Add mntpoint= option, this allows ybin to install the
+ bootstrap into an already mounted filesystem. This is NOT
+ recommended unless you know what your doing.
+
+ * ybin: fixed generation of ofboot.b so it will work with nobless
+ and usemount.
+
+2000-10-20 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.27
+
+ * ofboot: fixed problem where text was not visible on some newer iMacs.
+
+ * ybin: Now warn the user when they are using ybin on an OldWorld
+ PowerMac. (it will still work since its possible to make newworld
+ bootable disks on an OldWorld mac)
+
+ * ofpath: Now works on oldworld macs under 2.4 kernels.
+
+ * Added check for packaged versions of ybin to the Makefile and
+ warn user about them.
+
+2000-09-23 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.26
+
+ * ofboot: completely rewrote the generator script, it is now more
+ extendable and supports more menu options. More thanks to iNOUE
+ Koich! for the continuing help on OpenFirmware issues!!
+
+ * ybin: added options for mulitboot menu: now can create a menu
+ with options for GNU/Linux, MacOS, MacOSX, Darwin, and booting off
+ a CDROM, from the network, and even directly into an OpenFirmware
+ prompt.
+
+ * ybin: some errors were sent to stdout instead of stderr, fixed.
+
+ * ofpath: refuse to run on anything but GNU/Linux. (for now anyway)
+
+2000-09-18 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.25
+
+ * ofboot: now changes the background color to black and the text
+ color to cyan like yaboot. Thanks to again to iNOUE Koich!
+
+2000-09-16 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.24
+
+ * ofboot: many bugs in the Forth code fixed. code should now be
+ compliant to the OpenFirmware spec. Also add CD boot menu option.
+ (add enablecdboot to /etc/yaboot.conf) Thanks to iNOUE Koich! for
+ the Forth code.
+
+2000-09-13 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.23
+
+ * ybin: now hard code the target filename for ofboot, its always
+ installed as ofboot.b on the bootstrap partition. This eliminates
+ ambiguity when someone tries a different script with different name.
+
+ * ybin: all debugging output goes to stderr now.
+
+2000-09-09 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.22
+
+ * ofboot.b renamed to ofboot. (.b means boot block which this is not)
+
+ * yaboot and ofboot are now installed in /usr/local/lib/yaboot/
+ instead of /boot, since these files are never directly accessed by
+ the firmware it is not really appropriate to keep them in /boot.
+ make install will create backwords compatibility symlinks when
+ installing over an older version of ybin so nothing should break.
+ IMPORTANT: you should run mkofboot on a dedicated bootstrap
+ partition to purge old filenames.
+
+ * Man pages updated to reflect new file locations. Also include a
+ patch to change the paths to /usr/lib/yaboot for Debian and redhat
+ package maintainers.
+
+ * ybin: now checks two places for a default value for install=
+ /usr/local/lib/yaboot/yaboot, /usr/lib/yaboot/yaboot.
+
+2000-09-02 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.21
+
+ * ybin: fixed nvram update so it uses a real filename instead of
+ \\:tbxi when nobless is set in /etc/yaboot.conf. (\\: means find
+ file in blessed directory).
+
+ * ofpath: more oldworld machines supported. Now supports 7200,
+ 7300, 8600, 9500, Gossamer G3, PowerBook 1998, PowerBook 3400 (and
+ possibly 2400).
+
+2000-08-31 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.20
+
+ * ybin: check for Newworld compatible nvsetenv and if found will
+ automatically update the OpenFirmware boot-device variable in
+ nvram.
+
+ * ofpath: support some oldworld machines. (this does not mean
+ ybin/yaboot supports oldworld). Also silence a harmless error on
+ machines lacking a CDROM.
+
+ * ofboot.b: added more machines to <COMPATIBLE>
+
+2000-08-25 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.19
+
+ * Added PowerMac3,2 and PowerMac3,3 to ofboot.b scripts. Fixes
+ Debian bug #69870
+
+2000-08-22 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.18
+
+ * ofboot.b: changed the yaboot boot commands to boot yaboot by
+ filename rather then file type. Booting by file type did not work
+ reliably on all machines.
+
+ * ybin: hard code the target filename for yaboot, regardless of
+ the source filename (from install=) the target filename on the
+ bootstrap partition will always be "yaboot.b".
+
+ * Added ofpath utility, this is a rewrite of the show_of_path.sh
+ utility written by Olaf Hering. Ofpath works with /bin/ash and on
+ stripped down systems such as the Debian boot floppies. Also
+ wrote a small man page for this utility.
+
+ * ybin: automatically use ofpath to find the OpenFirmware device
+ path when ofpath= is not defined in /etc/yaboot.conf. Ybin will
+ also use ofpath when macos= or macosx= are set to unix device
+ nodes (ie /dev/hda11), these options can still be set to
+ OpenFirmware paths as well.
+
+ * Makefile: minor cleanup, added installation of ofpath
+ utility/man page as well as a deinstall rule.
+
+2000-08-13 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.17
+
+ * Yaboot 0.7 binary included.
+
+ * ybin: fix bug where ybin would fail if the bootstrap files
+ included an "_" in the filename. (actually its a workaround for
+ hfsutils brain-damage)
+
+ * ofboot.b: completely rewritten. Now includes shell script code
+ to allow ybin to configure it based on config options in
+ /etc/yaboot.conf instead of requiring the user to edit it
+ themselves. Additionally this new script will display a REAL boot
+ menu when dual booting is configured. It is capable of dual or
+ tri booting GNU/Linux (yaboot), MacOS 8.*/9.* and MacOSX. This
+ new ofboot.b script should *NOT* be edited by the user, and thus
+ should NOT be marked as a conffile in Debian and redhat packages.
+ These packages should now install ofboot.b in /boot instead of
+ /etc since it is no longer a config file. WARNING: The Forth code
+ in this script has not been tested on all machines and may not be
+ universally compatible. Thanks to Chris Emerson for writing the
+ Forth code.
+
+ * yaboot.conf: new options: ofboot= macos= macosx= delay=
+ defaultos=. See the yaboot.conf man page for details.
+
+ * Now include a Makefile to handle installation, only make install
+ is defined. Removed install-sh.
+
+ * mkofboot is now distributed and installed as a symlink instead
+ of a hardlink.
+
+ * Man page updates.
+
+2000-04-25 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.16
+
+ * menu_ofboot.b: fixed bug where the yaboot line was missing the
+ boot command, this prevented it from booting yaboot.
+
+2000-04-25 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.15
+
+ * Merge quik's bootstrap(8) man page with ybin's ofboot(8) man
+ page and rename it back to bootstrap(8). This also solves the
+ conflict with quik. In a more useful way IMO.
+
+2000-04-24 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.14
+
+ * Ship man pages uncompressed, gzip them in install-sh instead,
+ this allows for easier patching by debian maintainers if need be.
+
+ * Rename bootstrap(8) man page to ofboot(8) so ybin does not
+ conflict with quik.
+
+2000-04-23 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.13
+
+ * Rewrote the config file parsing yet again to remove dependencies
+ on tr, and awk. This allows ybin to function on minimal systems
+ such as boot/rescue floppies. This also pretty much solves the
+ slowness problem. Thanks to Daniel Jacobwitz for the help.
+
+ * Made changes to remove dependencies on basename and wc. Again
+ this is to allow ybin to work on boot floppies.
+
+ * Changed all calls to grep to stop using GNU extensions, this is
+ so ybin will work properly with the minimal version of grep
+ included in busybox.
+
+ * Added signal handling so ybin/mkofboot will cleanup after
+ themselves if killed with signals 1 2 3 or 15.
+
+ * Added OS Badge icons to the ofboot.b scripts. On G4 machines
+ you can hold down the option key and get a graphical boot selector
+ with one button for each bootable partition, the button with the
+ penguin icon is the bootstrap partition. Thanks to Nicholas
+ Humfrey for creating the Badge icon.
+
+ * Minor updates to the man pages.
+
+2000-04-19 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.12
+
+ * Now include yaboot binary in ybin distribution.
+
+ * Include a install-sh script to install everything.
+
+ * Use of the separate ybin.conf file is deprecated. Use
+ /etc/yaboot.conf instead.
+
+ * Removed the so called kludge options, without being able to
+ bless the root directory they were just useless bloat.
+
+ * Removed useless --readonly option, it was already default (as it
+ should be)
+
+ * Deprecated bootconf options since the yaboot.conf is the same
+ config ybin uses. (it is still there and works but that may change)
+
+ * Changed configuration file format to be more like quik/lilo:
+ bootfile= is now install= (--bootfile is now --install), wrapper=
+ is now magicboot=, usemount, protect, and hide are now just a
+ keyword options, if they are present in the configuration file
+ they are turned on, if they are not present they are turned off.
+ bless= is now the nobless keyword option, since bless is default
+ this one changed names.
+
+ * ybin: no longer need to specify -C /dev/null if you don't have a
+ configuration file in /etc/. If this is the case ybin will generate
+ a generic yaboot.conf to install on the bootstrap partition.
+
+ * More changes to the configuration parsing to improve speed, the
+ format change also helped the speed problem.
+
+ * Added man pages for ybin, mkofboot, yaboot, yaboot.conf and
+ bootstrap.
+
+ * More general fixes/cleanup/tweaks.
+
+2000-03-13 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.11
+
+ * Added command line options to both scripts, try --help. This
+ makes the ybin.conf file optional if you wish (-C /dev/null)
+
+ * Changed the way the config file is parsed, no longer source it
+ with the shell, this allows ybin.conf to be merged with
+ yaboot.conf at which point yaboot can live with unknown options in
+ its config file.
+
+ * Use /etc/ybin.conf if it exists, if not use /etc/yaboot.conf for
+ ybin configuration.
+
+ * Merged ybin and mkofboot into one script, mkofboot shared 90% of
+ of its code with ybin anyway and this will make them much easier
+ to maintain. mkofboot is now a hard link to ybin (or a symlink if
+ you prefer, both will work)
+
+ * Added an experimental feature to generate a yaboot.conf on the
+ fly based on command line options. The defaults should be
+ workable on a Debian system with an internal ATA disk, with the
+ root partition being the 3rd on the disk. Depends on mktemp for
+ creating the temporary file, Debian's mktemp is secure against
+ race conditions, use with caution if your distribution lacks a
+ secure mktemp utility. This option is activated with -c auto.
+
+ * No longer depends on bash. Works with Debian's
+ /bin/ash. Interpreter is now set to /bin/sh.
+
+ * Assorted cleanup, minor bug fixes.
+
+ * Added example yaboot.conf.
+
+2000-02-04 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.10
+
+ * Added a simple multi-boot menu written by Benjamin Herrenschmidt.
+
+2000-01-17 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.9
+
+ * mkofboot was still broken. :-(
+
+
+2000-01-14 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.8
+
+ * Added a basic CHRP script ofboot.b to work around the problem of
+ OF refusing to load `tbxi' files unless they contain a CHRP boot
+ header. See README.ofboot.b for details.
+
+ * Updated default ybin.conf to install ofboot.b by default.
+
+2000-01-13 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.7
+
+ * mkofboot: Check for hformat was broken.
+
+2000-01-12 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.6
+
+ * mkofboot: Fixed problem where it was insisting that mkdosfs be
+ present even when using hfs filesystems if usemount=yes.
+
+ * mkofboot: Added proper checks for hformat or mkdosfs.
+
+2000-01-09 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.5
+
+ * First public release.
+
+ * Add TODO and BUGS files.
+
+ * mkofboot: Check to see if usemount=yes, and if so make sure we
+ are root before proceeding to erase the partition.
+
+ * ybin: Removed useless echo line.
+
+2000-01-05 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.4
+
+ * ybin (util_install): Fully support OF `wrappers' now: if a
+ wrapper is defined in the configuration file then the wrapper is
+ given the HFS file type specified instead of the bootfile, the
+ bootfile's type is set to "boot".
+
+ * ybin: New configuration option `bless' when yes and are using
+ hfsutils we will `bless' the root directory of the bootstrap
+ filesystem so OF should be able to find and boot the system
+ without reconfiguration.
+
+ * mkofboot/ybin (checkconf): Add validation for the new `bless'
+ option. Also add check that the wrapper, if defined, exists and we
+ have permission to it.
+
+2000-01-04 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.3.
+
+ * ybin (util_install): Quote the filetype/creator arguments to
+ hattrib to prevent the shell from interpreting any meta-characters
+ in some cases. Also no longer try and set metadata on wrapper if
+ there is no wrapper.
+
+ * mkofboot: When creating hfs or dos filesystems give them volume
+ label of "bootstrap".
+
+2000-01-03 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.2.
+
+ * mkofboot: added -w switch to grep when checking if a filesystem
+ is already mounted to prevent erroneous positive matches.
+
+ * ybin (util_install): Add check to make sure that the target
+ device is not mounted as a filesystem before mucking with it.
+
+ * Added changelog.
+
+2000-01-01 Ethan Benson <erbenson at alaska.net>
+
+ * Version 0.1.
+
+ * first version.
+
+End:
Added: trunk/yaboot/doc/Makefile
===================================================================
--- trunk/yaboot/doc/Makefile 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/Makefile 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,15 @@
+# programs for documentation
+DDOC := /usr/share/sgml/debiandoc/dtd/sgml/1.0/debiandoc.dcl
+DEBIANDOC2HTML := debiandoc2html -d $(DDOC) -c
+# detailed sgml validation
+NSGMLS := nsgmls -ges -wall $(DDOC)
+
+all: clean
+ $(NSGMLS) yaboot-howto.sgml
+ $(NSGMLS) yaboot-howto.de.sgml
+ $(DEBIANDOC2HTML) -l en yaboot-howto.sgml
+ $(DEBIANDOC2HTML) -l de -byaboot-howto yaboot-howto.de.sgml
+ ln -s index.en.html yaboot-howto.html/index.html
+
+clean:
+ -rm -rf yaboot-howto.html
Added: trunk/yaboot/doc/README.ofboot
===================================================================
--- trunk/yaboot/doc/README.ofboot 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/README.ofboot 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,47 @@
+This is a new OpenFirmware CHRP script designed to be automatically
+configured by ybin. It is more robust then previous CHRP scripts, it
+includes the following capabilities:
+
+* Multibooting GNU/Linux, MacOS 8.* or 9.* MacOSX, Darwin, direct from
+* CDROM, Network and into an OpenFirmware prompt.
+
+* Presenting a real menu of OS choices.
+
+* Automatic configuration by ybin. This script should NOT be edited
+ by the user. It should also not be used without ybin, its not
+ directly useable by OpenFirmware.
+
+* Configurable colors. (see the yaboot.conf(5) man page).
+
+The multiboot menu is only presented when an extra OS is defined in
+/etc/yaboot.conf, otherwise this script loads yaboot without any user
+interaction.
+
+To enable a multi boot menu add bsd=ofpath and/or macos=ofpath and/or
+macosx=ofpath, and/or darwin=ofpath where ofpath is the OpenFirmware
+device path to the MacOS or MacOSX boot partition. Example:
+macos=hd:10 you can also specify a unix device node, ie: /dev/hda5,
+and ybin will translate it automatically using ofpath.
+
+This script when presenting a dual boot menu will wait for a defined
+number of seconds before automatically booting the default OS. Both
+this delay and the default OS can be configured in /etc/yaboot.conf.
+
+The delay is configured by adding delay=seconds. Unlike timeout this
+is in seconds rather then 10ths of seconds. This option has no effect
+on the yaboot boot: prompt timeout. If delay= is not set, ybin will
+translate the value of timeout= to seconds and use that.
+
+The default OS is configured by adding defaultos=macos. There is only
+four values that are acceptable: linux, bsd, macos, macosx and darwin. The
+default is linux. This should not be confused with yaboot's
+`default=' variable.
+
+The name and letter used to load MacOS or MacOSX (M and X
+respectively) cannot be be configured. (others are D for Darwin, C
+for CDROM, N for network, and O for OpenFirmware)
+
+The Forth code in this script was written by Chris Emerson and iNOUE Koich!.
+
+This script has only been formally tested on a Rev 1 Blue G3, a G4,
+and an ibook, please report any incompatibilities.
Added: trunk/yaboot/doc/README.ofpath
===================================================================
--- trunk/yaboot/doc/README.ofpath 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/README.ofpath 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,25 @@
+This utility is used to find the OpenFirmware device path to a unix
+device node (ie /dev/hda2).
+
+Ofpath will work on Newworld PowerMacs only if yaboot is used as the
+bootloader, it will not work on newworld macs booted with BootX.
+
+Ofpath will also work on most Oldworld PowerMacs, unlike Newworld, it
+will work on BootX booted Oldworld machines. Note that oldworld
+support is not well tested and may not give accurate results.
+
+ofpath supports the following command line switches:
+
+ --debug print boring junk only useful for debugging
+ -h, --help display this help and exit
+ -V, --version output version information and exit
+
+Ybin will use this utility automatically to find the OpenFirmware
+device path when macos=, macosx= are set to unix device nodes in
+/etc/yaboot.conf, and/or if ofboot= is not defined.
+
+ofpath is based on show_of_path.sh written by Olaf Hering, this
+version unlike show_of_path.sh works with /bin/ash and is fully
+functional on stripped down systems such as boot or rescue floppies.
+It has been tested on the Debian GNU/Linux 2.2 (potato) boot
+floppies.
Added: trunk/yaboot/doc/README.rs6000
===================================================================
--- trunk/yaboot/doc/README.rs6000 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/README.rs6000 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,79 @@
+RS/6000 yaboot Notes
+---------------------
+
+A. System Partitioning:
+ 1. Only FDISK partitioning has been tested on the RS/6000.
+ 2. Extended FDISK partitions have not been tested and are not expected to
+ work at this time.
+ 3. yaboot must be installed by itself in a bootable partition of type 0x41.
+ This partition must be less than 10MB.
+
+ Recommended partition configuration:
+ /dev/sda1 : PREP Boot. Type 0x41. Size = 800K
+ /dev/sda2 : Linux swap. Type 0x82. Size = 128 MB
+ /dev/sda3 : Linux native. Type 0x83.
+
+B. Building & Installation:
+ 1. See the partitioning section for notes & examples on how to configure
+ your system partitions when installing Linux.
+ 2. Build yaboot by doing:
+ make clean; make
+ 3. Make a yaboot.conf file in /etc/yaboot.conf
+ 4. Install yaboot by doing (as root):
+ mkofboot
+
+C. Configuration File (/etc/yaboot.conf):
+ 1. See the yaboot.conf(5) man page for the full range of options.
+ 2. Options tested on an RS/6000 include:
+ timeout = <time in tenths of a second>
+ default = <default label>
+ root= <device containing the root filesystem>
+ image = <path to vmlinux kernel file>
+ label = <short name for this image>
+
+ 3. Examples:
+
+ ## example /etc/yaboot.conf for RS/6000
+ ## Timeout value is in tenths of a second
+ boot=/dev/sda1
+ install=/usr/local/lib/yaboot/yaboot
+ nonvram
+ partition=3
+ timeout=200
+ default=linux
+
+ image=/boot/vmlinux
+ label=linux
+ root=/dev/sda3
+
+ image=/boot/vmlinux.old
+ label=old
+ root=/dev/sda3
+
+
+D. Tested Configurations:
+ 1. RS/6000 Model 150 (PPC 604e; CHRP IBM,7043-150)
+
+ fdisk -l /dev/sda
+
+ Disk /dev/sda: 64 heads, 32 sectors, 8678 cylinders
+ Units = cylinders of 2048 * 512 bytes
+
+ Device Boot Start End Blocks Id System
+ /dev/sda1 * 1 9 9200 41 PPC PReP Boot
+ /dev/sda2 10 2010 2049024 83 Linux
+ /dev/sda3 2011 2139 132096 82 Linux swap
+
+ 2. RS/6000 Model 260 (PPC 630; CHRP IBM,7043-260)
+
+ 3. RS/6000 Model F50 (PPC 630; CHRP IBM,7025-F50)
+
+
+E. Other Documentation:
+ 1. man pages under man/
+ 2. other README files in doc/
+
+F. Questions & comments can be directed to:
+ engebret at us.ibm.com or
+ bergner at us.ibm.com
+
Added: trunk/yaboot/doc/examples/README.dualboot.chrp
===================================================================
--- trunk/yaboot/doc/examples/README.dualboot.chrp 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/examples/README.dualboot.chrp 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,26 @@
+This script is deprecated in favor of a much nicer and more robust
+script ofboot, see README.ofboot for more information.
+
+This script was written by Benjamin Herrenschmidt, I added a X to the
+OpenFirmware pathnames, you should replace that X with the proper
+partition number. for the MacOS line add the partition number of your
+MacOS partition, for the yaboot line add the partition number of your
+bootstrap partition, which should be the same partition you configure
+ybin to install on.
+
+Remember that the Mac partition table is considered a partition in and
+of itself, so partition number 1 is always the partition table. If the
+disk is shared with MacOS it needs to have a MacOS disk driver
+partition in which case the first `real' partition will probably be
+number 4.
+
+Edit this script before running ybin or mkofboot.
+
+If you have G4 hardware then your OpenFirmware may already have a
+graphical boot selector built in, this selector can be accessed by
+holding down the option key when booting the machine. You should see
+a screen with buttons for each bootable partition. This version of
+ofboot.b includes a badge icon, the button with a penguin icon is your
+bootstrap partition. If you decide to use this built in selector you
+really do not need to use dualboot.chrp. Thanks to Nicholas Humfrey
+for creating the Badge icon.
Added: trunk/yaboot/doc/examples/README.mbicons
===================================================================
--- trunk/yaboot/doc/examples/README.mbicons 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/examples/README.mbicons 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,9 @@
+The file `large-penguin.mbicon' (mbicon == MultiBoot Icon) is an icon
+that will replace the disk-icon-with-small-penguin-badge in the
+OpenFirmware multi-boot screen (hold down option on AGP G4s and
+iBooks). In order to use this copy an uncompressed copy somewhere,
+and add `icon=/path/to/large-penguin.mbicon' or whatever to
+/etc/yaboot.conf and run ybin. You can add other types of icons so
+long as you put the proper bootinfo tags around them.
+
+This is unsupported and you are on your own.
Added: trunk/yaboot/doc/examples/README.simpleboot.chrp
===================================================================
--- trunk/yaboot/doc/examples/README.simpleboot.chrp 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/examples/README.simpleboot.chrp 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,37 @@
+This is the old basic ofboot.b wrapper, it has been replaced by a more
+robust CHRP script that is able to dual or tri-boot GNU/Linux, MacOS,
+and MacOS X. See README.ofboot.b for more information.
+
+OpenFirmware on newworld macs by default searches for HFS partitions
+with a `blessed' directory, and then checks for a file with an HFS
+filetype of `tbxi' if found it loads this file. Unfortunately OF is
+being far to picky about the format of this file, while it will load a
+ELF executable just fine when directed to, if the tbxi file it finds
+is just a plain ELF executable, as yaboot is, then it refuses to load
+it.
+
+The best longterm solution is to embed a small CHRP boot script to the
+head of of the yaboot executable, but until we can find the right way
+to do that we can use a small wrapper instead. The file included
+called simple_ofboot.b does nothing more then run the OF command "boot
+hd:,\\yaboot" which should load the yaboot executable on most machines
+if you use the stock internal hard disk. You might have to change
+that device path (hd:) to match the device path to your bootstrap
+partition, such as hd:2,\\yaboot. Or you can dispense with the
+wrapper altogether and reset the boot-device variable in OF to point
+directly at the yaboot executable and that will work too. This
+wrapper just allows for most (hopefully) machines to boot
+transparently without any OF reconfiguration.
+
+If you have G4 hardware then your OpenFirmware may already have a
+graphical boot selector built in, this selector can be accessed by
+holding down the option key when booting the machine. You should see
+a screen with buttons for each bootable partition. This version of
+ofboot.b includes a badge icon, the button with a penguin icon is your
+bootstrap partition. If you decide to use this built in selector you
+really do not need to use the menu_ofboot.b script provided in this
+package. Thanks to Nicholas Humfrey for creating the Badge icon.
+
+Hopefully soon these problems will have better solutions at some
+point. If you happen to know OF well and have any suggestions they are
+most welcome!
Added: trunk/yaboot/doc/examples/dualboot.chrp
===================================================================
--- trunk/yaboot/doc/examples/dualboot.chrp 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/examples/dualboot.chrp 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,68 @@
+<CHRP-BOOT>
+<COMPATIBLE>
+MacRISC MacRISC3 MacRISC4
+</COMPATIBLE>
+<DESCRIPTION>
+GNU/Linux PowerPC Boot chooser
+</DESCRIPTION>
+<BOOT-SCRIPT>
+" get-key-map" " keyboard" open-dev $call-method
+dup 20 dump
+5 + c@ 08 = if
+" Booting MacOS ..." cr " boot hd:X,\\:tbxi" eval
+else
+" Booting Yaboot ..." cr " boot hd:X,yaboot" eval
+then
+</BOOT-SCRIPT>
+<OS-BADGE-ICONS>
+1010
+000000000000F8FEACF6000000000000
+0000000000F5FFFFFEFEF50000000000
+00000000002BFAFEFAFCF70000000000
+0000000000F65D5857812B0000000000
+0000000000F5350B2F88560000000000
+0000000000F6335708F8FE0000000000
+00000000005600F600F5FD8100000000
+00000000F9F8000000F5FAFFF8000000
+000000008100F5F50000F6FEFE000000
+000000F8F700F500F50000FCFFF70000
+00000088F70000F50000F5FCFF2B0000
+0000002F582A00F5000008ADE02C0000
+00090B0A35A62B0000002D3B350A0000
+000A0A0B0B3BF60000505E0B0A0B0A00
+002E350B0B2F87FAFCF45F0B2E090000
+00000007335FF82BF72B575907000000
+000000000000ACFFFF81000000000000
+000000000081FFFFFFFF810000000000
+0000000000FBFFFFFFFFAC0000000000
+000000000081DFDFDFFFFB0000000000
+000000000081DD5F83FFFD0000000000
+000000000081DDDF5EACFF0000000000
+0000000000FDF981F981FFFF00000000
+00000000FFACF9F9F981FFFFAC000000
+00000000FFF98181F9F981FFFF000000
+000000ACACF981F981F9F9FFFFAC0000
+000000FFACF9F981F9F981FFFFFB0000
+00000083DFFBF981F9F95EFFFFFC0000
+005F5F5FDDFFFBF9F9F983DDDD5F0000
+005F5F5F5FDD81F9F9E7DF5F5F5F5F00
+0083DD5F5F83FFFFFFFFDF5F835F0000
+000000FBDDDFACFBACFBDFDFFB000000
+000000000000FFFFFFFF000000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFFFF00000000
+00000000FFFFFFFFFFFFFFFFFF000000
+00000000FFFFFFFFFFFFFFFFFF000000
+000000FFFFFFFFFFFFFFFFFFFFFF0000
+000000FFFFFFFFFFFFFFFFFFFFFF0000
+000000FFFFFFFFFFFFFFFFFFFFFF0000
+00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
+00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00
+00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
+000000FFFFFFFFFFFFFFFFFFFF000000
+</OS-BADGE-ICONS>
+</CHRP-BOOT>
Added: trunk/yaboot/doc/examples/large-penguin.mbicon
===================================================================
--- trunk/yaboot/doc/examples/large-penguin.mbicon 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/examples/large-penguin.mbicon 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,259 @@
+<OS-VOLUME-ICONS>
+00400040
+818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181FB
+812B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2BF8AC
+812B00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002BFAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F8FBFEFFFFFDFB56F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6FBFFFFFFFFFFFFFFFFFC2BF6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6FBFFFFFFFFFFFFFFACFBFEFD2BF6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F7FFFFFFFFFFFFFFFFFCFBFDFFFBF6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F681FFFFFFFFFFFFFFFFFEFFFFFFFFF7F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6FBFFFFFFFFFFFFFFFFFFFFFFFFFF81F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6FCFFFEFEFEFFFFFFFDACACFFFFFFACF6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6FCFEF956FDFFFFFBF8F7FAFEFFFFFDF6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6FCFCF82BF9FFFEF6F8F82BFDFFFFFFF6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F68181FEFBF7FEACF6FFACF881FFFFFFF6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F681FCACFE335F8357FFFF56FAFFFFFFF6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F681FE565F0B0B2F2E595E2BFDFFFFFFF7F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F9FE5F110B0B0A0A2F2F2FADFFFFFF56F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F989350B0B0B0A2F2F353589FFFFFFF9F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F9FE5F0B0B0A2F59353535FDFEFCFEACF6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F8AC565F353535353533F7FAFF8181FF56F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6FAACF7565F3B5F34F82BF5F6FEFEFDFFACF6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F7FEFCF5F7F7F8F7F7F6F50000FAFFFFFFFFF9F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6ACFEF700F6F7F72BF500000000F6FEFFFFFFFE2BF6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6FBFFFA000000F5F5F500000000000081FFFFFFFFFCF6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FFFEF6000000000000000000000000F8FFFFFFFFFF81F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F7FEFFFCF6000000F5F5000000F5F5F5F6F5FEFFFFFFFFFF56F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6ACFFFFFAF7F50000F5F5000000F5F62BF72BF9FFFEFFFFFFFE2BF6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F7FFFEFE2BF5000000F5000000000000F5F52BF6FEFFFDFFFFFF81F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6FAFEFEFAF500000000000000000000000000F5F6F9FFFEFEFFFFFE2BF6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6FDFDFEF600000000000000000000000000000000F6FEACFDFEFFFF56F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F8FFFEFA0000000000F5F50000000000000000000000FCFEFFFDFFFFFCF6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6FBFEFFF60000000000F500000000000000000000000081FFFFFEFFFFFE2BF6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F62BE0FEAC000000000000F5000000000000000000000000FAFFFFFEFFFFFF56F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6FBFFFE81000000000000F500000000000000000000000056FFFFFEFFFFFF81F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F656FFFFFD81000000000000F500000000000000000000000056FFFFFEFFFFFFFCF6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6FAFFFEACF9000000000000F5000000000000000000000000F8FFFEFFFFFFFFFBF6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6FAE089FDF8000000000000F5000000000000000000000000F9FEFEFEFEFEFF81F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F62C350B59FCF60000000000F50000000000000000000001085EFFFFFFFFFDFEF9F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6340B0B0B59AC2B00000000F5000000000000000000000A0B34FFFFFFFFFE592DF6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F633350B0B0B0B83FEF8000000F5000000000000000000F52E0B35E0FFFFFF830B0AF6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F62C3334350B0B0B0B0B2FFEFF560000000000000000000000F52B340B355FADAD83350B0AF6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F634110B0B0B0B0B0B0B0B0B5FFFFF81F5000000000000000000F52B341135353535350B0B0B09F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6340B0B0B0B0B0B0B0B0B0B0BADFFFF56000000000000000000002B5835113535350B0B0B0B0B08F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6330B0B0B0B0B0B0B0B0B0B0B35E0FF5600000000000000000000F85F350B0B0B0B0B0B0B0B0B0B09F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F633110B0B0B0B0B0B0B0B0B0B0B582B00000000000000000000F8FE5F350B0B0B0B0B0B0B0B0B0B0B0AF6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F633110B0B0B0B0B0B0B0B0B0B0B2F2C0000000000000000F581FFE05F350B0B0B0B0B0B0B0B0B0B0B08F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F634110B0B0B0B0B0B0B0B0B0B0B355FF8F5000000F52BF9FDFFFFFE5F350B0B0B0B0B0B0B0B0B0A2CF6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6353535110B0B0B0B0B0B0B0B0B353BADFEACFCFDFFFFFFFFFFFFAD3B350B0B0B0B0B0B0B342CF6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F63335353535353535110B0B0B0B355FADFFFFFFFFFFFFFFFFFFFFAD5F35110B0B11353533F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F733585F5F3B35353535355F5FADFDFCFB818181818181FCAC5F3B353535355F32F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F62BF8575E5F5F5F5F8382F8F6F6F6F6F6F6F6F6F6F6F8895F5F3B5F5FF7F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F75D83895D2BF6F6F6F6F6F6F6F6F6F6F6F6568889895DF7F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B00F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F656FAAC
+812B2B5656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656FAAC
+81F8FAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAAC
+FBACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACAC
+FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFD
+FEFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFAFC
+FEFC8181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181F9F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F981ACFEFFFFFEAC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9ACFFFFFFFFFFFFFFFFACFAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9ACFFFFFFFFFFFFFFACFBFEFEFAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FAFFFFFFFFFFFFFFFFFCFBFDFFACF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FCFFFFFFFFFFFFFFFFFEFFFFFFFFFAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9ACFFFFFFFFFFFFFFFFFFFFFFFFFFFCF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FDFFFEFEFEFFFFFFFDACACFFFFFFFDF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FDFEF956FDFFFFFBF8F7FAFEFFFFFEF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FDFCF82BF9FFFEF6F8F82BFDFFFFFFF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FC81FEFBF7FEACF6FFACF881FFFFFFF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FCFCACFE335F8357FFFF56FAFFFFFFF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FCFE565F0B0B2F2E595E2BFDFFFFFFFAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FBFE5F110B0B0A0A2F2F2FADFFFFFF81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FB89350B0B0B0A2F2F353589FFFFFFFBF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FBFE5F0B0B0A2F59353535FDFEFCFEFDF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F981AC565F353535353533F7FAFF8181FFFBF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FCACF7565F3B5F34F82BF5F6FEFEFDFFFDF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FAFFFCF5F7F7F8F7F7F6F50000FAFFFFFFFFFBF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FDFEF700F6F7F72BF500000000F6FEFFFFFFFEFAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9ACFFFA000000F5F5F500000000000081FFFFFFFFFDF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F981FFFEF6000000000000000000000000F8FFFFFFFFFFFCF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FAFEFFFCF6000000F5F5000000F5F5F5F6F5FEFFFFFFFFFFFBF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FDFFFFFAF7F50000F5F5000000F5F62BF72BF9FFFEFFFFFFFEFAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FAFFFEFE2BF5000000F5000000000000F5F52BF6FEFFFDFFFFFFFCF9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FCFEFEFAF500000000000000000000000000F5F6F9FFFEFEFFFFFFF9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FEFDFEF600000000000000000000000000000000F6FEACFDFEFFFF81F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F981FFFEFA0000000000F5F50000000000000000000000FCFEFFFDFFFFFDF9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9ACFEFFF60000000000F500000000000000000000000081FFFFFEFFFFFFF9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9FAFFFEAC000000000000F5000000000000000000000000FAFFFFFEFFFFFFFBF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9ACFFFE81000000000000F500000000000000000000000056FFFFFEFFFFFFFCF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F981FFFFFD81000000000000F500000000000000000000000056FFFFFEFFFFFFFDF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9FCFFFEACF9000000000000F5000000000000000000000000F8FFFEFFFFFFFFACF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9FCE089FDF8000000000000F5000000000000000000000000F9FEFEFEFEFEFFFCF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F957350B59FCF60000000000F50000000000000000000001085EFFFFFFFFFDFEFBF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9340B0B0B59AC2B00000000F5000000000000000000000A0B34FFFFFFFFFE592EF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F958350B0B0B0B83FEF8000000F5000000000000000000F52E0B35E0FFFFFF830B2EF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9573434350B0B0B0B0B2FFEFF560000000000000000000000F52B340B355FADAD83350B0BF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F934110B0B0B0B0B0B0B0B0B5FFFFF81F5000000000000000000F52B341135353535350B0B0B34F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9340B0B0B0B0B0B0B0B0B0B0BADFFFF56000000000000000000002B5835113535350B0B0B0B0B33F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9340B0B0B0B0B0B0B0B0B0B0B35E0FF5600000000000000000000F85F350B0B0B0B0B0B0B0B0B0B34F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F934110B0B0B0B0B0B0B0B0B0B0B582B00000000000000000000F8FE5F350B0B0B0B0B0B0B0B0B0B0B2EF9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F934110B0B0B0B0B0B0B0B0B0B0B2F2C0000000000000000F581FFE05F350B0B0B0B0B0B0B0B0B0B0B33F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F934110B0B0B0B0B0B0B0B0B0B0B355FF8F5000000F52BF9FDFFFFFE5F350B0B0B0B0B0B0B0B0B3457F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9353535110B0B0B0B0B0B0B0B0B353BADFEACFCFDFFFFFFFFFFFFAD3B350B0B0B0B0B0B0B3457F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9585F353535353535110B0B0B0B355FADFFFFFFFFFFFFFFFFFFFFAD5F35110B0B1135355EF9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9FA5D5E5F5F3B35353535355F5FADFEFDACFCFCFCFCFCFCACAD5F3B353535355F5DF9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9FA82825F5F5F5F838981F9F9F9F9F9F9F9F9F9F981895F5F3B5F5FFAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FA82898982FAF9F9F9F9F9F9F9F9F9F9F9F98189898982FAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFCF95656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656F7FC
+FEFAF7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7FC
+FDFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
+FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFD
+FEFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFAFC
+FEFC8181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181F9F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F981ACFEFFFFFEAC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9ACFFFFFFFFFFFFFFFFACFAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9ACFFFFFFFFFFFFFFFDACFEFEFAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FAFFFFFFFFFFFFFFFFFDACFEFFACF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FCFFFFFFFFFFFFFFFFFEFFFFFFFFFAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9ACFFFFFFFFFFFFFFFFFFFFFFFFFFFCF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FDFFFFFEFEFFFFFFFEFDFDFFFFFFFDF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FDFEFBFBFEFFFFAC81FAFCFFFFFFFEF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FDAC81FAFBFFFEF98181FAFEFFFFFFF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FCFCFEACFAFEFDF9FFFD81FCFFFFFFF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FCFDFDFE8289AD82FFFFFBFCFFFFFFF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FCFF81895F5F5F5F8388FAFEFFFFFFFAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FBE0895F5F5F5E5E5F5F5FADFFFFFF81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FBAD835F5F5F5E5F5F8383ADFFFFFFFBF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FBE0895F5F5F8383835F83FEF4ACFEFDF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F981FDFB89838383838382FAFCFFACACFFFBF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FCFDFAFB8989898281FAF9F9FEFFFEFFFDF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FAFFFDF9FA818181FAF9565656FCFFFFFFFFFBF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FDFEFA56F9FAFAFAF956565656F9FEFFFFFFFFFAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9ACFFFC565656F9F956565656565656ACFFFFFFFFFDF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F981FFFEF956565656565656565656565681FFFFFFFFFFFCF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FAFEFFFDF9565656F9F956565656F9F9F9F9FEFFFFFFFFFFFBF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FDFFFFFCFAF95656F956565656F9F9FAFAFAFBFFFEFFFFFFFEFAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FAFFFEFEFA565656565656565656565656F9FAF9FEFFFEFFFFFFFCF9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FCFFFEFC565656565656565656565656565656F9FBFFFEFEFFFFFFF9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FEFEFEF956565656565656565656565656565656F9FEFDFEFFFFFF81F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F981FFFEFC565656565656565656565656565656565656FDFFFFFEFFFFFDF9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9ACFEFFF95656565656F9565656565656565656565656ACFFFFFEFFFFFFF9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9FAFFFEFD565656565656F9565656565656565656565656FCFFFFFEFFFFFFFBF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9ACFFFEFC565656565656F9565656565656565656565656FBFFFFFEFFFFFFFCF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F981FFFFFEFC565656565656F9565656565656565656565656FBFFFFFEFFFFFFFDF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9FCFFFFFDFB565656565656F956565656565656565656565681FFFEFFFFFFFFACF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9FCE0ADFE81565656565656F9565656565656565656565656FBFFFEFFFEFEFFFCF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9815F5F83ACF95656565656F956565656565656565656F95788FFFFFFFFFEFEFBF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F95F5F5F5F83FDFA56565656F9565656565656565656565E5F83FFFFFFFFE0835EF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9825F5F5F5F5FADFE8156565656565656565656565656565E5F83FFFFFFFFAD5F5FF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F95D5E835F5F5F5F5F5F5FE0FFFB565656565656565656565656FA5E5F8389DFDFAD5F5F5FF9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9825F5F5F5F5F5F5F5F5F5F89FFFFACF956565656565656565656FA825F5F8383835F5F5F5F5EF9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9825F5F5F5F5F5F5F5F5F5F5FADFFFFFB56565656565656565656FA825F5F5F5F5F5F5F5F5F5F5DF9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F95E5F5F5F5F5F5F5F5F5F5F5F83E0FFFB5656565656565656565681895F5F5F5F5F5F5F5F5F5F5F5EF9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9825F5F5F5F5F5F5F5F5F5F5F5F83FA5656565656565656565681E0895F5F5F5F5F5F5F5F5F5F5F5F5EF9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F95E5F5F5F5F5F5F5F5F5F5F5F5F5F815656565656565656F9FCFFE0895F5F5F5F5F5F5F5F5F5F5F5F5DF9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F95E5F5F5F5F5F5F5F5F5F5F5F5F5F89815656565656FAFBFEFFFFE0895F5F5F5F5F5F5F5F5F5F5FFAF9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F95F5F5F5F5F5F5F5F5F5F5F5F5F5F89E0FEFDFDFEFFFFFFFFFFFFDF895F5F5F5F5F5F5F5F5F5DF9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F98283838383835F5F5F5F5F5F5F8389DFFFFFFFFFFFFFFFFFFFFFDF89835F5F5F5F5F8382F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9FA828289898983835F5F838989E0FEFDACFCFCFCFCFCFCACFD8989838383838981F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F981828889898989ADAD81F9F9F9F9F9F9F9F9F9F981AD8989898989FAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9FAFCADADFCFAF9F9F9F9F9F9F9F9F9F9F9F9FBADADADFCFAF9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFC81F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F956F7FC
+FEFCF95656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656F7FC
+FEFAF7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7FC
+FDFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+</OS-VOLUME-ICONS>
Added: trunk/yaboot/doc/examples/simpleboot.chrp
===================================================================
--- trunk/yaboot/doc/examples/simpleboot.chrp 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/examples/simpleboot.chrp 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,63 @@
+<CHRP-BOOT>
+<COMPATIBLE>
+MacRISC MacRISC3 MacRISC4
+</COMPATIBLE>
+<DESCRIPTION>
+GNU/Linux PPC bootloader
+</DESCRIPTION>
+<BOOT-SCRIPT>
+load-base release-load-area
+boot hd:2,\\yaboot
+</BOOT-SCRIPT>
+<OS-BADGE-ICONS>
+1010
+000000000000F8FEACF6000000000000
+0000000000F5FFFFFEFEF50000000000
+00000000002BFAFEFAFCF70000000000
+0000000000F65D5857812B0000000000
+0000000000F5350B2F88560000000000
+0000000000F6335708F8FE0000000000
+00000000005600F600F5FD8100000000
+00000000F9F8000000F5FAFFF8000000
+000000008100F5F50000F6FEFE000000
+000000F8F700F500F50000FCFFF70000
+00000088F70000F50000F5FCFF2B0000
+0000002F582A00F5000008ADE02C0000
+00090B0A35A62B0000002D3B350A0000
+000A0A0B0B3BF60000505E0B0A0B0A00
+002E350B0B2F87FAFCF45F0B2E090000
+00000007335FF82BF72B575907000000
+000000000000ACFFFF81000000000000
+000000000081FFFFFFFF810000000000
+0000000000FBFFFFFFFFAC0000000000
+000000000081DFDFDFFFFB0000000000
+000000000081DD5F83FFFD0000000000
+000000000081DDDF5EACFF0000000000
+0000000000FDF981F981FFFF00000000
+00000000FFACF9F9F981FFFFAC000000
+00000000FFF98181F9F981FFFF000000
+000000ACACF981F981F9F9FFFFAC0000
+000000FFACF9F981F9F981FFFFFB0000
+00000083DFFBF981F9F95EFFFFFC0000
+005F5F5FDDFFFBF9F9F983DDDD5F0000
+005F5F5F5FDD81F9F9E7DF5F5F5F5F00
+0083DD5F5F83FFFFFFFFDF5F835F0000
+000000FBDDDFACFBACFBDFDFFB000000
+000000000000FFFFFFFF000000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFFFF00000000
+00000000FFFFFFFFFFFFFFFFFF000000
+00000000FFFFFFFFFFFFFFFFFF000000
+000000FFFFFFFFFFFFFFFFFFFFFF0000
+000000FFFFFFFFFFFFFFFFFFFFFF0000
+000000FFFFFFFFFFFFFFFFFFFFFF0000
+00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
+00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00
+00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
+000000FFFFFFFFFFFFFFFFFFFF000000
+</OS-BADGE-ICONS>
+</CHRP-BOOT>
Added: trunk/yaboot/doc/examples/yaboot.conf.multi-boot
===================================================================
--- trunk/yaboot/doc/examples/yaboot.conf.multi-boot 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/examples/yaboot.conf.multi-boot 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,112 @@
+## Example yaboot.conf for ybin and yaboot >= 0.6
+## see man yaboot.conf for more details.
+
+## This example shows how to multi boot GNU/Linux, MacOS, MacOSX, and
+## Darwin with SCSI disks. This example also creates menu items for
+## booting from the CDROM, the Network and into an OpenFirmware
+## prompt.
+
+## Change to your bootstrap partition ie: /dev/sda2
+boot=unconfigured
+
+## device is the OpenFirmware device path to the disk containing
+## kernel images. if your disk is /dev/hda you can find the
+## OpenFirmware path by running the command: ofpath /dev/hda
+
+device=/pci at 80000000/pci-bridge at d/ADPT,2930CU at 2/@1:
+
+## partition is the partition number where the kernel images are
+## located. The kernel images should be on your root filesystem, so
+## this is usually the same partition number as your root filesystem.
+## so if root = /dev/hda3 (the 3rd partition) then you should have
+## partition=3 This *MUST* be set correct or yaboot won't boot! This
+## option can be either set globally as shown here, or per image in
+## the image= sections.
+
+partition=3
+
+## delay is the amount of time in seconds the dual boot menu (if one
+## is configured, by the presense of macos, macosx, etc options here)
+## will wait before choosing the default OS (GNU/Linux or the value of
+## defaultos=). If you omit this then the value of timeout=
+## (converted to seconds) will be used.
+
+delay=10
+
+## timeout is the amount of time in tenths of a second that yaboot
+## will wait before booting the default kernel image (the first image=
+## section in this config file or the value of default=).
+
+timeout=20
+install=/usr/local/lib/yaboot/yaboot
+magicboot=/usr/local/lib/yaboot/ofboot
+
+## Change the default colors, fgcolor is the text color, bgcolor is
+## the screen background color. (default: fgcolor=white, bgcolor=black)
+fgcolor=black
+bgcolor=green
+
+## Password supplied in plaintext, required for yaboot to boot, unless
+## restricted is also present (see below). Be sure to
+## chmod 600 /etc/yaboot.conf if you set this!
+
+#password=secret
+
+## Password supplied as an md5 hash, see above
+
+#password=$1$saltstrg$HnJ/gcM3oKhNbnzUPgXTD/
+
+## A password is only required to boot an image specified here if
+## parameters are specified on the command line or if the user enters
+## an image is not specified in the configuration file at all (ie.
+## arbitrary file load). restricted can also be placed in an image
+## section in that case any image not including the restricted keyword
+## will be fully password protected.
+
+#restricted
+
+## image is the kernel itself, commonly kept in / but also commonly
+## found in /boot. Note that /boot should generally not be its own
+## partition on powerpcs, its not necessary and complicates things.
+## Make sure /boot is on the partition specified by partition= see
+## above. /boot should never be an HFS filesystem. You may point
+## image= to a symbolic link so long as the symlink does not cross
+## partition boundries.
+
+image=/vmlinux
+ label=Linux
+ root=/dev/sda3
+ read-only
+
+image=/vmlinux.old
+ label=Linux.old
+ root=/dev/sda3
+ read-only
+
+## The {macos,macosx,darwin} variables can be either a unix /dev node or an
+## OpenFirmware path, as shown here:
+
+## BSD root partition with bsd kernel at /bsd. you must have the BSD
+## bootloader ofwboot installed at /usr/local/lib/yaboot/ofwboot
+bsd=/dev/sda5
+
+## unix node
+macos=/dev/sda8
+
+## OpenFirmware path, this would likely be /dev/sda9 if you used a
+## unix node instead.
+macosx=/pci at 80000000/pci-bridge at d/ADPT,2930CU at 2/@1:9
+
+darwin=/pci at 80000000/pci-bridge at d/ADPT,2930CU at 2/@1:10
+
+## Add a menu entry to boot from the CDROM:
+
+enablecdboot
+
+## Add a menu entry to boot from the Network:
+
+enablenetboot
+
+## Add a menu entry to boot into an OpenFirmware prompt:
+
+enableofboot
Added: trunk/yaboot/doc/examples/yaboot.conf.rs6000
===================================================================
--- trunk/yaboot/doc/examples/yaboot.conf.rs6000 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/examples/yaboot.conf.rs6000 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,67 @@
+## Example yaboot.conf for ybin and yaboot >= 0.6
+## see man yaboot.conf for more details.
+
+## Change `unconfigured' to your bootstrap partition ie: /dev/hda2
+boot=unconfigured
+
+## device is the OpenFirmware device path to the disk containing
+## kernel images. if your disk is /dev/hda you can find the
+## OpenFirmware path by running the command: ofpath /dev/hda DO NOT
+## specify a partition number for this! This is generally not
+## necessary for IBM hardware
+
+#device=hd:
+
+## partition is the partition number where the kernel images are
+## located. The kernel images should be on your root filesystem, so
+## this is usually the same partition number as your root filesystem.
+## so if root = /dev/hda3 (the 3rd partition) then you should have
+## partition=3 This *MUST* be set correct or yaboot won't boot! This
+## option can be either set globally as shown here, or per image in
+## the image= sections
+
+partition=3
+
+## timeout is the amount of time in tenths of a second that yaboot
+## will wait before booting the default kernel image (the first image=
+## section in this config file or the value of default=).
+
+timeout=20
+install=/usr/local/lib/yaboot/yaboot
+
+## nonvram is required for IBM hardware currently since ofpath does
+## not support them, it is also probably not necessary.
+
+nonvram
+
+## Password supplied in plaintext, required for yaboot to boot, unless
+## restricted is also present (see below). Be sure to
+## chmod 600 /etc/yaboot.conf if you set this!
+
+#password=secret
+
+## Password supplied as an md5 hash, see above
+
+#password=$1$saltstrg$HnJ/gcM3oKhNbnzUPgXTD/
+
+## A password is only required to boot an image specified here if
+## parameters are specified on the command line or if the user enters
+## an image is not specified in the configuration file at all (ie.
+## arbitrary file load). restricted can also be placed in an image
+## section in that case any image not including the restricted keyword
+## will be fully password protected.
+
+#restricted
+
+## image is the kernel itself, commonly kept in / but also commonly
+## found in /boot. Note that /boot should generally not be its own
+## partition on powerpcs, its not necessary and complicates things.
+## Make sure /boot is on the partition specified by partition= see
+## above. /boot should never be an HFS filesystem. You may point
+## image= to a symbolic link so long as the symlink does not cross
+## partition boundries.
+
+image=/vmlinux
+ label=Linux
+ root=/dev/sda3
+ read-only
Added: trunk/yaboot/doc/yaboot-howto.de.sgml
===================================================================
--- trunk/yaboot/doc/yaboot-howto.de.sgml 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.de.sgml 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,794 @@
+<!DOCTYPE debiandoc PUBLIC "-//DebianDoc//DTD DebianDoc//EN" [
+<!--
+ document conventions:
+ file, directory, device == file
+ program, command == prgn
+ variable == var
+ package == package
+ program output == tt
+ key input == em, example for longer ones
+ command input == tt
+
+ translation-check: 1.3
+ -->
+]>
+
+<debiandoc>
+<book>
+ <titlepag>
+ <title>
+ Wie man mit Yaboot auf PowerPC bootet
+ </title>
+ <author>
+<name>Chris Tillman</name>
+ </author>
+ <version>Version 1.04, 22. February 2004</version>
+ <abstract>
+Dieses Dokument umfasst Installations- und Benutzungs-Anleitungen für
+<prgn>yaboot</prgn>, den GNU/Linux PowerPC Bootloader.
+ </abstract>
+ <copyright>
+<copyrightsummary>
+Dieses Dokument darf zu den Bedingungen der GNU General Public Licence
+verbreitet und verändert werden.
+© 1998–2002 Chris Tillman
+ </copyrightsummary>
+<p>
+Dieses Dokument wird im upstream yaboot Quellcode gepflegt. Änderungen
+und Übersetzungen bitte an erbenson (at) alaska.net senden.
+Die aktuellste Version dieses Dokumentes ist im yaboot rsync Verzeichnis
+unter: rsync://penguinppc.org/yaboot zu finden.
+ <p>
+Die Bezugsquelle dieses
+Dokumentes ist <url
+id="http://penguinppc.org/projects/yaboot/doc/yaboot-howto.shtml"
+name="http://penguinppc.org/projects/yaboot/doc/yaboot-howto.shtml">.
+<p>
+Dieses Dokument ist freie Software; Sie dürfen es weiterverbreiten und/oder
+modifizieren, zu den Bedingungen der GNU General Public Licence, wie sie von
+der Free Software Foundation publiziert wurde; entweder Version 2, oder (nach
+Ihrer Wahl) jede spätere Version.
+<p>
+Dieses Dokument wird verbreitet in der Hoffnung, dass es nützlich sein wird,
+aber <em>ohne jegliche Garantie</em>; sogar ohne der implizierten Garantie der
+Marktfähigkeit oder der Tauglichkeit für einen bestimmten Zweck. Lesen Sie die
+GNU General Public Licence für weitere Details.
+<p>
+Eine Kopie der GNU General Public Licence ist als
+<file>/usr/share/common-licenses/GPL</file> in der Debian GNU/Linux
+Distribution oder im World-Wide-Web auf der
+<url id="http://www.gnu.org/copyleft/gpl.html" name="GNU Website">
+verfügbar. Sie können Sie ebenfalls erhalten, indem Sie an die Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+schreiben.
+
+ <toc detail="sect">
+
+
+<chapt>Yaboot's Zweck
+<p>
+
+Yaboot ist ein Bootloader für PowerPC-Computer (NewWorld PowerMacs und IBM
+CHRP). Es ladet einen Linux Betriebssystem Kernel von einem aus OpenFirmware
+zugreifbaren Datei-System und initiiertden Betrieb des Kernels. Auf PowerMacs
+kann ein inkludiertes CHRP-Skript ein Multi-OS Boot-Menü anzeigen, das
+<prgn>yaboot</prgn> oder andere Betriebssysteme starten kann. Werkzeugen sind
+vorhanden, um <prgn>yaboot</prgn> und die zugehörigen Skripte auf eine
+nicht-mountbaren BootStrap Partition zu bekommen.
+
+
+<chapt>System-Anforderungen
+<p>
+Motorola PowerPC Prozessoren wurden in zumindest drei verschiedenen Systemen
+verwendet: NuBus, OldWorld PCI und NewWorld PCI. NuBus System umfassen die
+6100/7100/8100-Reihen der Power Macintoshes. OldWorld Systeme sind die meisten
+Power Macintoshes mit einem Disketten-Laufwerk und einem PCI-Bus. Die meisten
+603, 603e, 604 und 604e basierenden Power Macintoshes, inklusive der 7200,
+7300, 7500, 7600, 8500, 8600, 9500 und 9600 sind OldWorld Rechner. Die
+beige-farbenen G3-Systeme sind auch OldWorld.
+<p>
+
+<em><prgn>yaboot</prgn> wird nicht auf NuBus oder OldWorld Rechnern
+funktionieren</em>, diese benötigen <prgn>quik</prgn> oder (nur für MacOS
+Pre-9.0.4) <prgn>BootX/miboot</prgn>.
+
+<p>
+Die NewWorld PowerMacs, für die <prgn>yaboot</prgn> entworfen ist, sind alle
+PowerMacs in transparenten, gefärbten Plastikgehäusen. Das umfasst alle iMacs,
+iBoos, G4-Systeme, blau-farbene G3-System, und die meisten PowerBooks, die seit
+1999 hergestellt werden.
+
+
+<chapt>Yaboot beziehen
+<p>
+
+Yaboot ist bei einer Debian GNU/Linux Installation für PowerPC-Rechner
+inkludiert. Yaboot für Debian kann über die üblichen Methoden heruntergeladen
+werden, wie zum Beispiel <prgn>apt-get</prgn>, <prgn>dselect</prgn> oder
+<prgn>dpkg</prgn>. Die Installation einer aktualisierten Version von
+<prgn>yaboot</prgn> auf Ihrem System ändert nicht Ihre Boot-Konfiguration; Sie
+müssen dafür das inkludierte <prgn>ybin</prgn> Werkzeug verwenden.
+
+<p>
+
+Sie können <prgn>yaboot</prgn> auch direkt von der Home-Page von
+<prgn>yaboot</prgn> unter <url id="http://penguinppc.org/projects/yaboot/">
+herunterladen. Wenn Sie es mit MacOS herunterladen, vergewissern Sie sich, dass
+sie das <em>binary</em> (nicht text) Format verwenden, und lassen Sie weder
+Stuffit Expander noch ein anderes Werkzeut das Archiv in MacOS expandieren.
+
+<p>
+
+Sie können das vorkompilierte <file>yaboot-binary-X.Y.tar.gz</file>
+herunterladen, oder die Source-Datei <file>yaboot-X.Y.tar.gz</file>. Um das
+Binär-Paket auszupacken verwenden Sie den Befehl <tt>tar -zxvpf
+yaboot-X.Y.tar.gz</tt>. Die Komponenten werden in ein <file>usr/local/</file>
+Verzeichnis innerhalb des Verzeichnisses entpackt, in dem Sie den Befehl
+ausgeführt haben.
+
+<p>
+
+Um es aus de Source zu bauen und zu installieren, vergewissern Sie sich, dass
+Sie einen funktionstüchtigen Compiler (<prgn>gcc</prgn>) und das
+<prgn>make</prgn> Programm installiert haben. (Falls nicht, laden Sie die
+binären yaboot tar-Datei statt den Sourcen.) Dann rufen Sie die folgenden
+Befehle auf (ersetzen Sie mit den tatsächlichen Revisions-Nummern bei X und Y):
+
+<p>
+<example>
+ tar -zxvpf yaboot-X.Y.tar.gz
+ cd yaboot-X.Y
+ make
+ su
+ make install
+</example>
+
+
+<chapt>Die Bootstrap-Partition erstellen
+<p>
+
+Überprüfen Sie bitte die <prgn>mac-fdisk</prgn> Grundlagen-Seite auf
+<url id="http://penguinppc.org/projects/yaboot/doc/mac-fdisk-basics.shtml">.
+Wenn Sie eine neue Linux-Installation erstellen, sollte die ersten Partition,
+die mit <prgn>mac-fdisk</prgn> Sie erstellen, die bootstrap-Partition sein.
+Verwenden Sie lediglich den <prgn>mac-fdisk</prgn> <tt>b</tt> Befehl, um
+automatisch eine bootstrap-Partition in der richtigen Grösse und dem richtigen
+Typ zu erstellen. Wenn Ihre Version von <prgn>mac-fdisk</prgn> nicht den
+<tt>b</tt> Befehl unterstützt, verwenden Sie:
+
+<p>
+<example>
+ Command (? for help): C xxxx 800k bootstrap Apple_Bootstrap
+</example>
+<p>
+
+(Ersetzten Sie xxxx mit der Nummer des Start-Blocks.) Eine funkionierende
+tar-Datei einer bootstrap-fähigen Version von mac-fdisk (Debian-Benutzer haben
+bereits diese Version) ist ebenfalls unter
+<url id="http://penguinppc.org/~eb/files/"> verfügbar. Um diese zu installieren,
+verwenden Sie
+
+<example>
+ su -
+ cd /
+ gzip -dc mac-fdisk.tar.gz | tar -xvp
+</example>
+
+<p>
+Die bootstrap-Partition benötigt nur 800k Platz. Wenn Sie eine boot-Partition
+zu Ihrem existierenden Setup hinzufügen, dürften Sie genügend freien Platz auf
+Ihrer vorhandenen Platte haben, ohne andere Partitionen zu ändern. Falls nicht,
+können Sie es vermeiden, Ihre komplette Platte neu zu partitionieren, indem Sie
+der swap-Partition etwas Platz stehlen. Oder <prgn>parted</prgn> erlaubt es
+Ihnen, die Partitionsgrössen zu ändern.
+
+<p>
+
+Die bootstrap-Partition sollte Partition #2 sein, nach der Partitions-Map
+selbst aber vor allen anderen Partitionen auf der Festplatte. Sie können die
+Reihenfolge der Partitionen ganz einfach ändern, indem Sie den <tt>r</tt>
+Befehl verwenden (vergleichen Sie auch die <prgn>mac-fdisk</prgn> Übung). In
+anderen Worten ist es nicht der physikalische Platz der bootstrap-Partition der
+zählt, es ist die logische Reihenfolge in der Partitions-Map. Beachten Sie
+jedoch, wenn Sie ein existierendes System haben und sie die Partitionsnummern
+herumschieben, müssen Sie entsprechende Änderungen in <file>/etc/fstab</file>
+vornehmen.
+
+<p>
+
+Der Grund, warum Sie die bootstrap-Partition als Partition #2 benötigen ist,
+damit sie allen anderen Partitionen in der Boot-Sequenz vorausgeht. Das hilft
+ungeheuerlich, das ganze System stabiler zu machen, da einige Betriebssystee
+sehr aufdringlich in ihrer Verwendung der Partitionen sind.
+
+<p>
+
+Wenn Sie mit dem partitionieren fertig sind, benutzen Sie den <tt>p</tt> Befehl
+und machen sich Notizen über die endgültigen Partitionsnummern. Sie benötigen
+die Partitionsnummer der bootstrap-Partition, die Position Ihres Kernels, und
+wenn Sie <prgn>yaboot</prgn> dazu verwenden wollen, mehrere Betriebssysteme zu
+booten, auch die Partitionsnummern für Ihre anderen Betriebssysteme.
+
+<p>
+
+Obwohl es möglich ist, <prgn>yaboot</prgn> auf einer mountbaren HFS
+<file>/boot</file> Partition zu installieren, wird diese Konfiguration
+abgelehnt, entmutigt und absolut nicht unterstützt.
+
+
+<chapt>Yabootconfig: Einfach gehts auch
+<p>
+
+Für die erste Installation auf einem Rechner können Sie
+<prgn>yabootconfig</prgn> verwenden, um zuerst eine <file>yaboot.conf</file>
+Datei zu erstellen und dann alles auf Ihrer bootstrap-Partition zu
+installieren. Yabootconfig liest die <file>/etc/fstab</file> Datei des
+laufenden Systems aus, um die Position des Kernels zu bestimmen, und findet die
+Position der 800k Apple_Bootstrap Partition. Der Debian-Installer verwendet
+<prgn>yabootconfig</prgn> unbemerkt im Make Hard Disk Bootable Schritt.
+
+<p>
+
+Üblicherweise wird die anfängliche Boot-Konfiguration erstellt, während man
+sich in der RamDisk der Installer-Umgebung befindet, mit dem System, das
+installiert wird, unter <file>/target</file> oder <file>/mnt</file> eingehängt.
+Um <prgn>yabootconfig</prgn> unter diesen Bedingungen aufzurufen, geben Sie den
+Pfad zum Ziel-System mit der -t oder --chroot Option an. Zum Beispiel:
+<tt>yabootconfig --chroot /target</tt>
+
+<p>
+
+Die von <prgn>yabootconfig</prgn> automatisch generierte
+<file>yaboot.conf</file> wird nur das booten des Linux-Systems kontrollieren,
+in dem sie erstellt wurde. Um zusätzliche Betriebssysteme zu booten oder andere
+Optionen hinzuzufügen, müssen Sie die <file>yaboot.conf</file> Datei editieren.
+
+
+<chapt>Ihre Boot-Konfiguration anpassen
+<p>
+
+Um Ihre <prgn>yaboot</prgn> Installation anzupassen, verwenden Sie einen
+Text-Editor wie zum Beispiel <prgn>vi</prgn> oder <prgn>nano</prgn> (oder
+<prgn>nano-tiny</prgn> im Debian-Installer), um die <file>yaboot.conf</file>
+Datei zu editieren. Wenn Sie <prgn>yabootconfig</prgn> verwendet haben, um die
+anfängliche <file>yaboot.conf</file> zu erstellen, wird sie bereits eine
+grundlegende Konfiguration enthalten, um das Linux-System zu booten.
+
+<p>
+
+Die <file>yaboot.conf</file> hat zahlreiche Optionen; lesen Sie die
+<file>yaboot.conf</file> Manual-Seite für Details dazu. Ich werde kurz die
+beliebtesten Einzelheiten hier behandeln. Die Datei kontrolliert sowohl
+<prgn>yaboot</prgn> während dem tatsächlichen Boot-Prozess, als auch
+<prgn>ybin</prgn> während die Konfiguration auf die Boot-Partition gespeichert
+wird.
+
+<p>
+
+Zeilen in der Datei, die mit <tt>#</tt> beginnen, werden als Kommentare
+angesehen. Jede Option oder Parameter muss in einer eigenen Zeile angegeben
+sein. Verwenden Sie keine zusätzlichen Leerzeichen in den folgenden
+Parameter-Definitionen. Ebenfalls muss die Datei Unix-Zeilenumbrüche enthalten;
+vergewissern Sie sich, dass Sie die Datei im Unix-Typ speichern, wenn Sie sie
+in MacOS erstellen oder editieren.
+
+
+<sect>Linux-Style Geräte-Pfade
+<p>
+
+Für die, die mit der Linux Geräte-Bezeichnung unvertraut sind: Partitions-Pfade
+haben die Form <tt>/dev/xxx#</tt>, wobei xxx der Linux Geräte-Name ist und #
+die Partitionsnummer repräsentiert. Typische Linux Geräte-Namen sind:
+
+<example>
+ Name Device Type
+ ---- --------------------------------------------------
+ hda interne IDE-Platte (primärer Controller, Master-Platte)
+ hdb interne IDE-Platte (primärer Controller, Slave-Platte)
+ hdc sekundärer Controller, Master-Platte (oft für CD-ROM verwendet)
+ hdd sekundärer Controller, Slave-Platte (oft für Zip-Laufwerke verwendet)
+ sda erste SCSI-Platte (SCSI ID Adressen-weise)
+ sdb zweite SCSI-Platte
+ scd0 erstes CD-ROM (oder sr0)
+ fd0 erstes Disketten-Laufwerk
+ fd1 zweites Disketten-Laufwerk
+</example>
+
+
+<sect>OpenFirmware Geräte-Pfade
+<p>
+Ein Werkzeug, um die OpenFirmware Geräte-Pfade zu finden, die zu gegebenen
+Linux Geräte-Pfaden gehören, ist verfügbar: <prgn>ofpath</prgn>.
+<prgn>ybin</prgn> verwendet <prgn>ofpath</prgn> intern, um Linux Gerätenamen,
+die Sie in <file>yaboot.conf</file> verwenden, auf ihren OpenFirmware
+Equivalente umzuwandeln. Ein Beispiel: <tt>ofpath /dev/hda</tt> (sollte hd:
+zurückliefern). Sie können die OpenFirmware Geräte-Pfade auch selbst
+herausfinden, lesen Sie dazu Sich von einer Fehlkonfiguration erholen weiter
+unten.
+
+
+<sect>Benötigte Einstellungen
+<p>
+
+Die bootstrap-Partition wird mit <tt>boot=boot-partition</tt> identifiziert,
+wobei boot-partition der Pfad zur bootstrap-Partition im Linux-Stil ist. Wenn
+Sie unseren Partitionierungsvorschlägen auf ihrer internen Festplatte gefolgt
+sind, sollte das <tt>boot=/dev/hda2</tt> sein.
+
+<p>
+
+Für PowerMacs wird ebenfalls eine magicboot Zeile wie zum Beispiel
+<tt>magicboot=/usr/local/lib/yaboot/ofboot</tt> benötigt. Einige Modelle können
+kein reines ELF ausführen, und benötigen ein CHRP-Skript (was diese Zeile in
+der <file>yaboot.conf</file> Datei verfügbar macht).
+
+<p>
+
+Die <tt>partition=</tt>, <tt>image=</tt> und <tt>root=</tt> Einstellungen
+(bei den Kernel-Image Einstellungen unterhalb) werden ebenfalls benötigt.
+
+
+<sect>Boot-Menü Optionen
+<p>
+
+Ein CHRP Skript (<file>ofboot</file>) wurde zur Verfügung gestellt, das
+<prgn>ybin</prgn> mit den Einstellungen in <file>yaboot.conf</file>
+modifiziert, um ein sehr handliches Multi-Betriebssystem Boot-Menü anzuzeigen.
+
+<p>
+
+Wenn Sie ein Multi-Betriebssystem Boot-Menü aufsetzen, müssen Sie die
+Partitionen angeben, in denen sich jedes Betriebssystem befindet. Sie können
+die Linux-Stil oder OpenFirmware Partitionspfade verwenden. Hier sind einige
+Beispiele, die die Möglichkeiten aufzeigen:
+
+<example>
+ macos=/dev/hda10
+ macosx=/dev/hda12
+ darwin=hd:9
+ bsd=zip:1
+</example>
+
+Wenn Sie <tt>macosx=</tt> verwenden und OSX auf einer UFS-Partition installiert
+haben, dann muss macosx auf die OSX bootstrap-Partition zeigen, nicht auf den
+UFS-Zweig. Versuchen Sie jedoch nicht, die OSX bootstrap-Partition für
+<prgn>ybin</prgn> zu verwenden — Sie benötigen trotzdem eine eigene
+Apple_Bootstrap Partition.
+
+<p>
+
+Wenn Sie jedoch <tt>bsd=</tt> verwenden, müssen Sie es auf die BSD
+root-Partition zeigen lassen, nicht auf eine bsd bootstrap-Partition. Um
+<tt>bsd=</tt> zu verwenden benötigen Sie ebenfalls den bsd-Bootloader
+(ofwboot) in <file>/usr/local/lib/yaboot/</file>, wenn Sie <prgn>ybin</prgn>
+aufrufen.
+
+<p>
+
+Wenn nichts aus de Boot-Menü ausgewählt wird, wenn es erscheint, ruft das
+System <prgn>yaboot</prgn> auf, um Linux zu starten. Um ein anderes
+Betriebssystem zu starten, wenn keine Taste gedrückt wird, fügen Sie eine
+<tt>defaultos=</tt> Zeile ein, zum Beispiel <tt>defaultos=macos</tt> oder
+<tt>defaultos=bsd</tt>.
+
+
+<sect>Kernel-Image Einstellungen
+<p>
+Die Kernel-Images, die von yaboot gestartet werden sollen, können Sie auf jeder
+Partition befinden, auf einem ext2, ext3, XFS, ReiserFS oder HFS/HFS+
+Dateisystem. Yaboot muss nur die Partitions-Nummer und den Dateisystem-Pfad für
+den Kernel wissen.
+
+<p>
+
+Die <file>yaboot.conf</file> Datei hat zwei Sektionen; die meisten Optionen
+befinden sich in der globalen Sektion am Anfang der Datei, und andere Optionen,
+die die einzelnen Kernel-Images betreffen, sind unterhalb zusammengefasst. Die
+meisten Kernel-Image Optionen können sowohl global oder lokal definiert werden;
+eine globale Option wird überschrieben, wenn sie in einer Kernel-Image Sektion
+neu definiert ist. Jede Kernel-Image Sektion beginnt mit einer <tt>image=/</tt>
+Zeile, die den Dateisystem-Pfad zu dem Kernel-Image angibt; die ersten
+<tt>image=/</tt> Zeile kennzeichnet das Ende der globalen Sektion.
+
+<p>
+
+Yaboot muss das Gerät, die Partitionsnumer und den Dateisystempfad für das
+Kernel-Image wissen, das es laden und starten soll. Jedoch ist <tt>device=</tt>
+üblicherweise nicht notwendig, da <prgn>yaboot</prgn> dann annimmt, es kann den
+Kernel auf dem selben Gerät finden, von dem es gestartet wird, was ziemlich oft
+stimmt. Sie sollten immer die Kernel Partitionsnummer angeben, zum Beispiel
+<tt>partition=3</tt>, und natürlich den Image-Pfad (zum Beispiel
+<tt>image=/boot/vmlinux</tt> ). Wenn Ihr Kernel-Image sich im root-Verzeichnis
+der Partition befindet, vergessen Sie nicht, den führenden Schrägstrich im
+Image-Pfad anzugeben (<tt>image=vmlinux</tt> funktioniert wahrscheinlich
+nicht).
+
+<p>
+
+Es ist zu beachten, dass <prgn>yaboot</prgn> das Kernel-Image im Dateisystem
+einer Partition findet, ohne zu wissen, an welcher Stelle diese Partition in
+das Linux root-Dateisystem eingehängt wird. Daher, falls Sie zum Beispiel ein
+Kernel-Image oder symbolischen Link auf /boot/vmlinux haben, aber /boot auf
+Ihrem System eine eigene Partition ist, ist der Image-Pfad für
+<prgn>yaboot</prgn> einfach nur <tt>image=/vmlinux</tt>.
+
+<p>
+
+Sie müssen ebenfalls den Linux Partitionspfad für die root-Partition angeben,
+zum Beispiel <tt>root=/dev/hda3</tt>. Dieser Parameter wird an den Kernel beim
+Starten übergeben, um ihn wissen zu lassen, wo sich das root-Dateisystem
+befindet. Viele weitere Optionen sind verfügbar, um zusätzliche Boot-Parameter
+an den Kernel zu übergeben (<tt>append=</tt>), die Grösse einer anfänglichen
+Ram-Disk anzugeben (<tt>ramdisk=</tt>), ein Ram-Disk Image zu laden
+(<tt>initrd=</tt>), und andere. Lesen Sie die Details zu den Kernel-Image
+Optionen in der Manual-Seite zu yaboot.conf.
+
+<p>
+
+Hier ist ein einfaches aber komplexes Beispiel einer <file>yaboot.conf</file>
+mit einer Kernel-Image Sektion:
+
+<example>
+ # Wo ist die bootstrap-Partition
+ boot=/dev/hda2
+ # CHRP-Skript Spezifizierung
+ magicboot=/usr/lib/yaboot/ofboot
+ # Dual-Boot mit MacOS
+ macos=hd:14
+ # Wartezeit im Betriebssystem Boot-Menü (Sekunden)
+ delay=5
+
+ # Wartezeit am boot: Promt (Zehntel-Sekunden)
+ timeout=50
+ # Global identifizierte Root-Partition
+ root=/dev/hda3
+ # Das Device, auf dem sich der Kernel befindet
+ device=hd:
+
+ # Die Kernel-Image Sektion beginnt hier
+ # Dateisystem-Pfad zum Kernel-Image, symbolische Links sind o.k.
+ image=/vmlinux
+ # Nummer der Partition, auf der dieser Pfad liegt
+ partition=3
+ # Ein Name für den boot: Prompt, um diesen Kernel zu laden
+ label=Linux
+ # Der Typ, mit dem das root-Dateisystem eingebunden wird,
+ # read-only erlaubt einen fsck Durchlauf
+ read-only
+
+ ## ybin muss aufgerufen werden um Änderungen zu übernehmen!!!!!!!
+</example>
+<p>
+
+Um ein Kernel-Image über tftp über das Netz zu booten, verwenden Sie
+<tt>image=/tftpboot/vmlinux</tt> (der Pfad zum tftp-Server) und
+<tt>device=enet:10.0.0.1</tt> (setzen Sie die tftp-Boot-Server IP-Adresse
+ein).
+
+<p>
+
+Im Normalfalls wird das erste Image gestartet, das in <file>yaboot.conf</file>
+angegeben ist, wenn keine Eingabe am boot: Prompt erfolgt. Um ein anderes Image
+als Vorgabe zu haben, fügen Sie eine <tt>default=label</tt> Zeile in die
+globale Sektion ein.
+
+
+<sect>Optionale und coole Einstellungen
+<p>
+
+Yaboot und Ihr Multi-Boot Menü kann Spritzer Farbe in Ihr Leben bringen!
+Verwenden Sie <tt>fgcolor=</tt> und <tt>bgcolor=</tt> Zeilen um Ihren
+Bildschirm am Morgen mit black, blue, light-blue, green, light-green, cyan,
+light-cyan, red, light-red, purple, light-purple, brown, light-gray, dark-gray,
+yellow und white aufzuwecken. Stellen Sie fgcolor und bgcolor auf das selbe
+ein, wenn Sie eine echte Herausforderung lieben.
+
+<p>
+
+Fügen Sie jedes oder alle der enableboot, enablenetboot oder enablecdboot
+hinzu, um entsprechend folgende Optionen zu Ihrem Betriebssystem Boot-Menü
+hinzuzufügen: Von OpenFirmware, dem Netzwerk oder CD-Rom booten.
+
+<p>
+
+Verwenden Sie Set delay= (in Sekunden) um festzulegen, wie lange das Multi-Boot
+Betriebssystem-Menü warten soll, bevor es das vorgegebene Betriebssystem
+bootet. <tt>timeout=</tt> (in Zehntel-Sekunden) gibt an, wielange yaboot am
+boot: Prompt auf Ihre Auswahl eines Kernel-Images warten soll, bevor es das
+erste Image in der Datei oder das <tt>default=</tt> Image bootet.
+
+<p>
+
+Boot-Passwort Sicherung ist mit einer <tt>password=</tt> Zeile verfügbar. Wenn
+Sie <tt>password=</tt> hinzufügen, wird ein Passwort notwendig, für alle
+Boot-Vorgänge. Automatisches Booten ist nicht möglich, ausser Sie fügen auch
+eine <tt>restricted</tt> Zeile hinzu.
+
+<p>
+
+Wenn <tt>restricted</tt> in der globalen Sektion hinzugefügt wird, dürfen
+Kernel-Images, die in <file>yaboot.conf</file> definiert sind, gebootet werden,
+solange keine Argumente am boot: Prompt hinzugefügt werden. Das ist nützlich
+für unbeaufsichtigtes Booten, während man augenblicklichte root-Shell Probleme
+bei Consolen-Zugriff unterbindet (jedoch werden auch OpenFirmware Passwörter
+benötigt, um das wirklich sicher zu machen, gemeinsam mit dem Verschliessen des
+Gehäuses). Um ein undefiniertes Image zu booten, oder ein Image mit
+zusätzlichen Argumenten, wird ein Passwort benötigt.
+
+<p>
+
+Die <tt>password=</tt> Zeile kann entweder ein reines Text-Passwort oder eine
+MD5-Prüfsumme sein (das selbe Format wie die Linux <file>/etc/shadow</file>
+Datei). Um eine MD5-Prüfsumme zu erstellen, verwenden die folgende Perl-Zeile:
+
+<example>
+ $ perl -e 'printf("%s\n", crypt("geheim1", "\$1\$saltstrg"))'
+</example>
+Der saltstrg sollte eine zufällige Zeichenfolge sein, zum Beispiel eine
+generiert von
+
+<example>
+ makepasswd --chars=8
+</example>
+
+
+<chapt>Boot-Konfigurations-Änderungen speichern
+<p>
+
+Es gibt im Moment drei Werkzeuge, die es anbieten, Ihre
+Boot-Konfigurations-Änderungen auf die Boot-Partition zu speichern:
+<prgn>ybin</prgn>, <prgn>mkofboot</prgn> und <prgn>yabootconfig</prgn>. Ybin
+kopiert <prgn>yaboot</prgn>, <file>yaboot.conf</file> und das CHRP-Skript auf
+die Boot-Partition, und führt dann Seine notwendige Segnung durch. Mkofboot
+initialisiert die bootstrap-Partition und ruft dann <prgn>ybin</prgn> auf. Und
+<prgn>yabootconfig</prgn> erstellt eine funktionierende
+<file>yaboot.conf</file> und ruft anschliessend <prgn>mkofboot</prgn> auf. Für
+Details und Optionen zu diesen Werkzeugen lesen Sie die entsprechenden
+Manual-Seiten oder geben Sie den Namen des Werkzeugs ein gefolgt von --help auf
+der Kommandozeile.
+
+
+<chapt>Übliche Fehler
+<p>
+
+Die häufigsten Fehler, die bei der Verwendung von <prgn>yaboot</prgn> gemacht
+werden, ist es zu versuchen, es permanent von einer einbindbaren Partition zu
+booten. Wenn ein PowerPC erst hochfährt, wird der Boot-Prozess gestartet mit
+der Suche nach einem sogenannten `blessed' (gesegneten) Verzeichnis. Das MacOS
+plaziert die Segnung so, dass mehrere System-Verzeichnisse auf einer Partition
+existieren können, aber nur einer davon gültig zum Starten ist. Wenn der
+Computer für ein Dual-Boot mit Linux und MacOS aufgesetzt wird, wird MacOS beim
+booten alle Verzeichnisse entsegnen, die nicht ein gültiges MacOS System
+beinhalten. Dann, wenn der Rechner das nächste Mal bootet, wird die Partition,
+die das vormals gesegnete Verzeichnis enthielt, nicht mehr bootbar sein.
+
+<p>
+
+Die Werkzeuge, die mit <prgn>yaboot</prgn> zur Verfügung gestellt werden,
+sollten immer verwendet werden, um es auf seiner eigenen bootstrap-Partition
+aufzusetzen, für die regulären Boot-Anforderungen. Das einzige Mal, wann Sie
+<prgn>yaboot</prgn> auf einer einbindbaren Partition plazieren sollten ist die
+anfängliche Installation von Linux und Rettungs-Operationen. In diesen Fällen
+können Sie in den normalen Bootloading-Prozess eingreifen, um eine spezifische
+Datei ausführen zu lassen, und gesegnete Verzeichnisse sind kein Thema, da
+dieser Typ des Bootens nicht automatisch passiert.
+
+<p>
+
+Nachem <prgn>yaboot</prgn> installiert wurde, ist ein weiterer häufiger Fehler
+die Boot-Konfigurationsdatei zu ändern oder die <prgn>yaboot</prgn> Software zu
+aktualisieren und dann darauf zu vergessen, <prgn>ybin</prgn> aufzurufen um die
+geänderte Konfiguration in die Boot-Partition zu transferieren.
+Booting-Funktionen werden nicht geändert, solange die Änderungen nicht in die
+bootstrap-Partition gespeichert werden. Wenn Sie Ihre <file>yaboot.conf</file>
+oft ändern, können Sie eine Kommentarzeile in die Datei einfügen, die Sie daran
+erinnert, dass Sie <prgn>ybin</prgn> nach den Änderungen aufrufen müssen.
+
+
+<chapt>Sich von einer Fehlkonfiguration erholen
+<p>
+
+Wenn Sie ein Problem beim booten haben, verfallen Sie nicht in Panik. Yaboot
+kan jeden installierten Linux-Kernel und jedes Linux-System vom boot: Prompt
+aus booten.
+
+<sect>Das NVRAM zurücksetzen
+<p>
+
+Halten Sie die Command-Option-p-r Tasten alle gemeinsam während dem Starten, um
+alle nvram Parameter auf ihre Werkseinstellungen zurückzusetzen. Halten Sie die
+Tasten, bis Sie den Startup-Ton zwei- oder dreimal hören. Wenn die
+Setup-Vorschläge befolgt wurden, wird die <prgn>yaboot</prgn> Installation die
+erste bootbare Partition sein, und OpenFirmware wird sie automatisch booten. Es
+muss beachtet werden, dass MacOS-Einstellungen wie virtueller Speicher,
+Startup-Platte und die Bildschirmauflösung auch auf ihre Werkseinstellungen
+zurückgesetzt werden.
+
+
+<sect>Yaboot laden
+<p>
+
+Wenn kein <tt>boot:</tt> Prompt angezeigt wird, dann wurde <prgn>yaboot</prgn>
+nicht geladen. Sie können es händisch von OpenFirmware aus laden. Das
+gemeinsame Halten der Command-Option-o-f Tasten, nachdem Sie den Einschaltknopf
+gedrückt haben, wird Ihnen einen OpenFirmware-Prompt liefern
+
+<example>
+ 0 >
+</example>
+(Command ist die Taste mit dem Kleeblatt und/oder Apfel darauf).
+
+<p>
+
+Am OF-Prompt müssen Sie die OpenFirmware Pfade für die meisten der
+Boot-Konfigurationseinstellungen verwenden. Sie können die meisten
+OpenFirmware-Pfade vom OF-Prompt aus feststellen, indem Sie ein paar OF-Befehle
+verwenden, und dann einen OF-Boot-Befehl konstruieren, mit dem Sie Ihren Kernel
+direkt booten können.
+
+<p>
+
+Der volle OpenFirmware-Pfad besteht aus drei Teilen im Format
+
+<example>
+ Geräte-Name:Partitions-Nummer,/Dateisystem-Pfad
+</example>
+
+<p>
+
+Der OF-Befehl devalias wird alle Geräte-Aliases auflisten, die auf Ihrem System
+wirksam sind. Sie dürften einige von diesen sehen:
+<example>
+ Name Geräte-Typ
+ ---- --------------------------------------------------
+ hd interne IDE-Platte (primärer Controller, Master-Platte)
+ ultra1 interne IDE-Platte (primärer Controller, Slave-Platte)
+ ide0 IDE-Platte (sekundärer Controller, Master-Platte)
+ ide1 IDE-Platte (sekundärer Controller, Slave-Platte)
+ cd CD-ROM
+ zip Zip-Laufwerk
+ fw FireWire-Interface
+ fd Diskettenlaufwerk
+ enet Ethernet-Interface
+</example>
+
+Hängen Sie die Partitionsnummer der Boot-Partition (in unserer Empfehlung 2)
+an und setzen Sie das nun mit <tt>,yaboot</tt> fort, um die <prgn>yaboot</prgn>
+Datei auf der Boot-Partition zu booten.
+
+<example>
+ 0 > boot hd:2,yaboot
+</example>
+<p>
+
+Wenn Sie Enter drücken, sollte <prgn>yaboot</prgn> geladen werden und seinen
+<file>boot:</file> anzeigen. Wenn Sie die Partitionsnummer nicht wissen,
+beginnen Sie einfach mit 2 und erhöhen Sie die Nummer, bis Sie die richtige
+Partition erwischen.
+
+
+<sect>Ein Kernel-Image händisch laden
+<p>
+
+Wenn Sie den boot: Prompt haben, können Sie ein Label eingeben, das Sie in
+Ihrer <file>yaboot.conf</file> definiert haben, um dieses Kernel-Image zu
+booten. Oder statt einem Label können Sie auch einen vollständigen
+OpenFirmware-Pfad angeben. Ein typischer Kernel-Pfad könnte folgendes sein:
+
+<example>
+ boot: hd:3,/vmlinux
+</example>
+
+Um dem Kernel Parameter zu übergeben, fügen Sie diese auf der <tt>boot:</tt>
+Prompt Zeile nach dem Kernel-Label oder Pfad ein. Sie müssen zumindest
+<tt>root=</tt> angeben, aber Sie können jeden gewünschten Kernel-Parameter
+hinzufügen. Hier ist ein Beispiel:
+
+<example>
+ boot: hd:3,/vmlinux root=/dev/hda3 ro
+</example>
+
+
+<chapt>Yaboot als temporärer Bootloader
+<p>
+Es ist für bestimmte Aufgaben (wie zum Beispiel das Installieren eines neuen
+Systems ohne einer CD oder das Retten eines existierenden Systems) sehr
+angenehm, ein Ramdisk-System zu booten, wie zum Beispiel einen Installer direkt
+von Dateien, die sich auf einer existierenden Partition befinden.
+
+<p>
+
+Ein Beispiel ist der Debian-Installer. Er befindet sich in einer
+Disketten-Image root.bin Datei, die <prgn>yaboot</prgn> direkt booten kann.
+Eine einfache <file>yaboot.conf</file>, die die Ramdisk initialisiert, yaboot,
+root.bin und ein Kernel-Image (linux in diesem Beispiel genannt) ist alles, was
+benötigt wird. Alle Dateien werden im root-Verzeichnis einer existierenden
+Partition abgelegt.
+
+<p>
+
+Die <file>yaboot.conf</file> Datei für diesen Zweck beinhaltet nur vier Zeilen:
+<example>
+ image=linux
+ label=install
+ initrd=root.bin
+ initrd-size=8192
+</example>
+<p>
+
+Wenn Sie <file>yaboot.conf</file> im MacOS erstellen, müssen Sie es auf
+Unix-Zeilenumbrüche (nur Zeilenvorschübe) umkonvertieren. Wenn Sie
+MacOS-Zeilenumbrücke (nur Wagenrückläufe) verwenden, kann <prgn>yaboot</prgn>
+die Datei nicht lesen.
+
+<p>
+Sie müssen eine Partition auswählen, welche entweder als HFS oder als
+HFS+ formatiert ist. Wenn Sie Mac OS X auf einer UFS Partition
+installiert haben (dies können sie mit dem OS X "Disk Utility"
+überprüfen), werden sie eine andere Partition verwenden müssen. Falls
+sie Mac OS X auf einer UFS Partition installiert haben, haben Sie
+wahrscheinlich eine oder zwei Partitionen des Typs "Apple_Boot". Diese
+Partitionen sind HFS formatiert. Wählen Sie eine, mounten Sie diese
+unter Mac OS X und speichern sie die Dateien dort.
+
+<p>
+Booten Sie OpenFirmware und geben Sie am Prompt ein:
+<example>
+ 0 > boot hd:xx,yaboot
+</example>
+
+Ersetzen Sie dabei xx mit der Partitionsnummer der Partition, auf der Sie den
+Kernel und <prgn>yaboot</prgn> abgelegt haben, gefolgt von Enter. Am boot:
+Prompt geben Sie <em>install</em> gefolgt von Enter ein.
+
+
+<chapt>Für weitere Informationen
+<p>
+
+Wo ist yaboot zu Hause?
+<list>
+<item> <url id="http://penguinppc.org/projects/yaboot/" name="Yaboot Home">
+</list>
+
+<p>
+
+Wie installiere ich Debian?
+<list>
+<item> <url id="http://www.debian.org/releases/woody/powerpc/install"
+ name="Installing Debian GNU/Linux 3.0 For PowerPC">
+</list>
+
+<p>
+
+Was ist Open Firmware?
+<list>
+<item> <url id="http://developer.apple.com/technotes/tn/tn1044.html">
+<item> <url id="http://developer.apple.com/technotes/tn/tn1061.html">
+<item> <url id="http://developer.apple.com/technotes/tn/tn1062.html">
+<item> <url id="http://developer.apple.com/technotes/tn/tn1167.html">
+</list>
+
+
+</chapt>
+ </book>
+</debiandoc>
+
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-namecase-general:t
+sgml-general-insert-case:lower
+sgml-minimize-attributes:max
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:nil
+sgml-parent-document:nil
+sgml-declaration:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
Added: trunk/yaboot/doc/yaboot-howto.html/ch1.de.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch1.de.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch1.de.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,85 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Wie man mit Yaboot auf PowerPC bootet - Yaboot's Zweck</title>
+
+</head>
+
+<body>
+
+<a name="ch1"></a>
+<hr>
+
+[ <a href="index.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ 1 ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch2.de.html">weiter</a> ]
+
+<hr>
+
+<h1>
+Wie man mit Yaboot auf PowerPC bootet
+<br>Kapitel 1 - Yaboot's Zweck
+</h1>
+
+
+<hr>
+
+
+<p>
+Yaboot ist ein Bootloader für PowerPC-Computer (NewWorld PowerMacs und IBM
+CHRP). Es ladet einen Linux Betriebssystem Kernel von einem aus OpenFirmware
+zugreifbaren Datei-System und initiiertden Betrieb des Kernels. Auf PowerMacs
+kann ein inkludiertes CHRP-Skript ein Multi-OS Boot-Menü anzeigen, das
+<code>yaboot</code> oder andere Betriebssysteme starten kann. Werkzeugen sind
+vorhanden, um <code>yaboot</code> und die zugehörigen Skripte auf eine
+nicht-mountbaren BootStrap Partition zu bekommen.
+
+<hr>
+
+[ <a href="index.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ 1 ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch2.de.html">weiter</a> ]
+
+<hr>
+
+<p>
+Wie man mit Yaboot auf PowerPC bootet
+
+<address>
+Version 1.04, 22. February 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch1.en.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch1.en.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch1.en.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,85 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>HOWTO-Booting with Yaboot on PowerPC - Yaboot's Purpose</title>
+
+</head>
+
+<body>
+
+<a name="ch1"></a>
+<hr>
+
+[ <a href="index.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ 1 ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch2.en.html">next</a> ]
+
+<hr>
+
+<h1>
+HOWTO-Booting with Yaboot on PowerPC
+<br>Chapter 1 - Yaboot's Purpose
+</h1>
+
+
+<hr>
+
+
+<p>
+Yaboot is a bootloader for PowerPC computers (NewWorld PowerMacs and IBM CHRP).
+It loads a Linux operating system kernel from an OpenFirmware-accessible
+filesystem and initiates operation of the kernel. On PowerMacs, an included
+CHRP script can display a multi-OS boot menu which can launch
+<code>yaboot</code> or other operating systems. Utilities are included to
+place <code>yaboot</code> and the associated script on a non-mountable
+bootstrap partition.
+
+<hr>
+
+[ <a href="index.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ 1 ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch2.en.html">next</a> ]
+
+<hr>
+
+<p>
+HOWTO-Booting with Yaboot on PowerPC
+
+<address>
+Version 1.04, Feb 22 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch10.de.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch10.de.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch10.de.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,128 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Wie man mit Yaboot auf PowerPC bootet - Yaboot als temporärer Bootloader</title>
+
+</head>
+
+<body>
+
+<a name="ch10"></a>
+<hr>
+
+[ <a href="ch9.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ 10 ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch11.de.html">weiter</a> ]
+
+<hr>
+
+<h1>
+Wie man mit Yaboot auf PowerPC bootet
+<br>Kapitel 10 - Yaboot als temporärer Bootloader
+</h1>
+
+
+<hr>
+
+
+<p>
+Es ist für bestimmte Aufgaben (wie zum Beispiel das Installieren eines neuen
+Systems ohne einer CD oder das Retten eines existierenden Systems) sehr
+angenehm, ein Ramdisk-System zu booten, wie zum Beispiel einen Installer direkt
+von Dateien, die sich auf einer existierenden Partition befinden.
+
+<p>
+Ein Beispiel ist der Debian-Installer. Er befindet sich in einer
+Disketten-Image root.bin Datei, die <code>yaboot</code> direkt booten kann.
+Eine einfache <code>yaboot.conf</code>, die die Ramdisk initialisiert, yaboot,
+root.bin und ein Kernel-Image (linux in diesem Beispiel genannt) ist alles, was
+benötigt wird. Alle Dateien werden im root-Verzeichnis einer existierenden
+Partition abgelegt.
+
+<p>
+Die <code>yaboot.conf</code> Datei für diesen Zweck beinhaltet nur vier Zeilen:
+
+<pre>
+ image=linux
+ label=install
+ initrd=root.bin
+ initrd-size=8192
+</pre>
+
+<p>
+Wenn Sie <code>yaboot.conf</code> im MacOS erstellen, müssen Sie es auf
+Unix-Zeilenumbrüche (nur Zeilenvorschübe) umkonvertieren. Wenn Sie
+MacOS-Zeilenumbrücke (nur Wagenrückläufe) verwenden, kann <code>yaboot</code>
+die Datei nicht lesen.
+
+<p>
+Sie müssen eine Partition auswählen, welche entweder als HFS oder als HFS+
+formatiert ist. Wenn Sie Mac OS X auf einer UFS Partition installiert haben
+(dies können sie mit dem OS X "Disk Utility" überprüfen), werden sie
+eine andere Partition verwenden müssen. Falls sie Mac OS X auf einer UFS
+Partition installiert haben, haben Sie wahrscheinlich eine oder zwei
+Partitionen des Typs "Apple_Boot". Diese Partitionen sind HFS
+formatiert. Wählen Sie eine, mounten Sie diese unter Mac OS X und speichern
+sie die Dateien dort.
+
+<p>
+Booten Sie OpenFirmware und geben Sie am Prompt ein:
+
+<pre>
+ 0 > boot hd:xx,yaboot
+</pre>
+
+<p>
+Ersetzen Sie dabei xx mit der Partitionsnummer der Partition, auf der Sie den
+Kernel und <code>yaboot</code> abgelegt haben, gefolgt von Enter. Am boot:
+Prompt geben Sie <em>install</em> gefolgt von Enter ein.
+
+<hr>
+
+[ <a href="ch9.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ 10 ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch11.de.html">weiter</a> ]
+
+<hr>
+
+<p>
+Wie man mit Yaboot auf PowerPC bootet
+
+<address>
+Version 1.04, 22. February 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch10.en.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch10.en.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch10.en.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,123 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>HOWTO-Booting with Yaboot on PowerPC - Yaboot as a Temporary Bootloader</title>
+
+</head>
+
+<body>
+
+<a name="ch10"></a>
+<hr>
+
+[ <a href="ch9.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ 10 ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch11.en.html">next</a> ]
+
+<hr>
+
+<h1>
+HOWTO-Booting with Yaboot on PowerPC
+<br>Chapter 10 - Yaboot as a Temporary Bootloader
+</h1>
+
+
+<hr>
+
+
+<p>
+It's very convenient for certain tasks like installing a new system the first
+time without a CD, or rescuing an existing system, to boot a ramdisk system
+such as an installer directly from files placed on an existing partition.
+
+<p>
+An example is the Debian installer. It is contained in a floppy-image root.bin
+file which <code>yaboot</code> can boot directly. A simple
+<code>yaboot.conf</code> to initialize the ramdisk, yaboot, root.bin, and a
+kernel image (named linux in this example) are all that is needed. All files
+are placed at the root level on an existing partition.
+
+<p>
+The <code>yaboot.conf</code> file for this purpose contains just four lines:
+
+<pre>
+ image=linux
+ label=install
+ initrd=root.bin
+ initrd-size=8192
+</pre>
+
+<p>
+If you create <code>yaboot.conf</code> in the MacOS, you must convert it to use
+Unix newlines (linefeeds only). If you use MacOS newlines (just carriage
+returns), <code>yaboot</code> will be unable to read the file.
+
+<p>
+You must pick a partition that is formatted with either HFS or HFS+. If you
+have Mac OS X installed on a UFS partition (You can use the OS X "Disk
+Utility" app to check this), you will have to find another partition to
+use. If Mac OS X is installed on UFS, you probably have one or two partitions
+of the "Apple_Boot" type. They have HFS filesystems on them. Pick
+one, mount it under MacOS X, and store the files there.
+
+<p>
+Boot into OpenFirmware, and type at the prompt:
+
+<pre>
+ 0 > boot hd:xx,yaboot
+</pre>
+
+<p>
+replacing xx with the partition number of the partition where the kernel and
+<code>yaboot</code> files were placed, followed by a return. At the boot:
+prompt, type <em>install</em> followed by a return.
+
+<hr>
+
+[ <a href="ch9.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ 10 ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch11.en.html">next</a> ]
+
+<hr>
+
+<p>
+HOWTO-Booting with Yaboot on PowerPC
+
+<address>
+Version 1.04, Feb 22 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch11.de.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch11.de.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch11.de.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,120 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Wie man mit Yaboot auf PowerPC bootet - Für weitere Informationen</title>
+
+</head>
+
+<body>
+
+<a name="ch11"></a>
+<hr>
+
+[ <a href="ch10.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ 11 ]
+[ <a href="index.de.html">weiter</a> ]
+
+<hr>
+
+<h1>
+Wie man mit Yaboot auf PowerPC bootet
+<br>Kapitel 11 - Für weitere Informationen
+</h1>
+
+
+<hr>
+
+
+<p>
+Wo ist yaboot zu Hause?
+<ul>
+<li>
+<code><a href="http://penguinppc.org/projects/yaboot/">Yaboot Home</a></code>
+</li>
+</ul>
+
+<p>
+Wie installiere ich Debian?
+<ul>
+<li>
+<code><a href="http://www.debian.org/releases/woody/powerpc/install">Installing
+Debian GNU/Linux 3.0 For PowerPC</a></code>
+</li>
+</ul>
+
+<p>
+Was ist Open Firmware?
+<ul>
+<li>
+<code><a
+href="http://developer.apple.com/technotes/tn/tn1044.html">http://developer.apple.com/technotes/tn/tn1044.html</a></code>
+</li>
+</ul>
+<ul>
+<li>
+<code><a
+href="http://developer.apple.com/technotes/tn/tn1061.html">http://developer.apple.com/technotes/tn/tn1061.html</a></code>
+</li>
+</ul>
+<ul>
+<li>
+<code><a
+href="http://developer.apple.com/technotes/tn/tn1062.html">http://developer.apple.com/technotes/tn/tn1062.html</a></code>
+</li>
+</ul>
+<ul>
+<li>
+<code><a
+href="http://developer.apple.com/technotes/tn/tn1167.html">http://developer.apple.com/technotes/tn/tn1167.html</a></code>
+</li>
+</ul>
+
+<hr>
+
+[ <a href="ch10.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ 11 ]
+[ <a href="index.de.html">weiter</a> ]
+
+<hr>
+
+<p>
+Wie man mit Yaboot auf PowerPC bootet
+
+<address>
+Version 1.04, 22. February 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch11.en.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch11.en.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch11.en.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,120 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>HOWTO-Booting with Yaboot on PowerPC - For More Information</title>
+
+</head>
+
+<body>
+
+<a name="ch11"></a>
+<hr>
+
+[ <a href="ch10.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ 11 ]
+[ <a href="index.en.html">next</a> ]
+
+<hr>
+
+<h1>
+HOWTO-Booting with Yaboot on PowerPC
+<br>Chapter 11 - For More Information
+</h1>
+
+
+<hr>
+
+
+<p>
+Where's home?
+<ul>
+<li>
+<code><a href="http://penguinppc.org/projects/yaboot/">Yaboot Home</a></code>
+</li>
+</ul>
+
+<p>
+How do I install Debian?
+<ul>
+<li>
+<code><a href="http://www.debian.org/releases/woody/powerpc/install">Installing
+Debian GNU/Linux 3.0 For PowerPC</a></code>
+</li>
+</ul>
+
+<p>
+What's Open Firmware?
+<ul>
+<li>
+<code><a
+href="http://developer.apple.com/technotes/tn/tn1044.html">http://developer.apple.com/technotes/tn/tn1044.html</a></code>
+</li>
+</ul>
+<ul>
+<li>
+<code><a
+href="http://developer.apple.com/technotes/tn/tn1061.html">http://developer.apple.com/technotes/tn/tn1061.html</a></code>
+</li>
+</ul>
+<ul>
+<li>
+<code><a
+href="http://developer.apple.com/technotes/tn/tn1062.html">http://developer.apple.com/technotes/tn/tn1062.html</a></code>
+</li>
+</ul>
+<ul>
+<li>
+<code><a
+href="http://developer.apple.com/technotes/tn/tn1167.html">http://developer.apple.com/technotes/tn/tn1167.html</a></code>
+</li>
+</ul>
+
+<hr>
+
+[ <a href="ch10.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ 11 ]
+[ <a href="index.en.html">next</a> ]
+
+<hr>
+
+<p>
+HOWTO-Booting with Yaboot on PowerPC
+
+<address>
+Version 1.04, Feb 22 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch2.de.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch2.de.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch2.de.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,96 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Wie man mit Yaboot auf PowerPC bootet - System-Anforderungen</title>
+
+</head>
+
+<body>
+
+<a name="ch2"></a>
+<hr>
+
+[ <a href="ch1.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ 2 ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch3.de.html">weiter</a> ]
+
+<hr>
+
+<h1>
+Wie man mit Yaboot auf PowerPC bootet
+<br>Kapitel 2 - System-Anforderungen
+</h1>
+
+
+<hr>
+
+
+<p>
+Motorola PowerPC Prozessoren wurden in zumindest drei verschiedenen Systemen
+verwendet: NuBus, OldWorld PCI und NewWorld PCI. NuBus System umfassen die
+6100/7100/8100-Reihen der Power Macintoshes. OldWorld Systeme sind die meisten
+Power Macintoshes mit einem Disketten-Laufwerk und einem PCI-Bus. Die meisten
+603, 603e, 604 und 604e basierenden Power Macintoshes, inklusive der 7200,
+7300, 7500, 7600, 8500, 8600, 9500 und 9600 sind OldWorld Rechner. Die
+beige-farbenen G3-Systeme sind auch OldWorld.
+
+<p>
+<em><code>yaboot</code> wird nicht auf NuBus oder OldWorld Rechnern
+funktionieren</em>, diese benötigen <code>quik</code> oder (nur für MacOS
+Pre-9.0.4) <code>BootX/miboot</code>.
+
+<p>
+Die NewWorld PowerMacs, für die <code>yaboot</code> entworfen ist, sind alle
+PowerMacs in transparenten, gefärbten Plastikgehäusen. Das umfasst alle iMacs,
+iBoos, G4-Systeme, blau-farbene G3-System, und die meisten PowerBooks, die seit
+1999 hergestellt werden.
+
+<hr>
+
+[ <a href="ch1.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ 2 ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch3.de.html">weiter</a> ]
+
+<hr>
+
+<p>
+Wie man mit Yaboot auf PowerPC bootet
+
+<address>
+Version 1.04, 22. February 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch2.en.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch2.en.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch2.en.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,96 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>HOWTO-Booting with Yaboot on PowerPC - System Requirements</title>
+
+</head>
+
+<body>
+
+<a name="ch2"></a>
+<hr>
+
+[ <a href="ch1.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ 2 ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch3.en.html">next</a> ]
+
+<hr>
+
+<h1>
+HOWTO-Booting with Yaboot on PowerPC
+<br>Chapter 2 - System Requirements
+</h1>
+
+
+<hr>
+
+
+<p>
+Motorola PowerPC processors have been used on at least three different kinds of
+systems: NuBus, OldWorld PCI, and NewWorld PCI. Nubus systems include the
+6100/7100/8100 line of Power Macintoshes. OldWorld systems are most Power
+Macintoshes with a floppy drive and a PCI bus. Most 603, 603e, 604, and 604e
+based Power Macintoshes, including the 7200, 7300, 7500, 7600, 8500, 8600,
+9500, and 9600 are OldWorld machines. The beige colored G3 systems are also
+OldWorld.
+
+<p>
+<em><code>yaboot</code> will not work on NuBus or OldWorld machines</em>, those
+will require <code>quik</code> or (for MacOS Pre-9.0.4 only)
+<code>BootX/miboot</code>.
+
+<p>
+The NewWorld PowerMacs, for which <code>yaboot</code> is designed, are any
+PowerMacs in translucent colored plastic cases. That includes all iMacs,
+iBooks, G4 systems, blue colored G3 systems, and most PowerBooks manufactured
+in and after 1999.
+
+<hr>
+
+[ <a href="ch1.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ 2 ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch3.en.html">next</a> ]
+
+<hr>
+
+<p>
+HOWTO-Booting with Yaboot on PowerPC
+
+<address>
+Version 1.04, Feb 22 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch3.de.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch3.de.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch3.de.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,116 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Wie man mit Yaboot auf PowerPC bootet - Yaboot beziehen</title>
+
+</head>
+
+<body>
+
+<a name="ch3"></a>
+<hr>
+
+[ <a href="ch2.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ 3 ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch4.de.html">weiter</a> ]
+
+<hr>
+
+<h1>
+Wie man mit Yaboot auf PowerPC bootet
+<br>Kapitel 3 - Yaboot beziehen
+</h1>
+
+
+<hr>
+
+
+<p>
+Yaboot ist bei einer Debian GNU/Linux Installation für PowerPC-Rechner
+inkludiert. Yaboot für Debian kann über die üblichen Methoden heruntergeladen
+werden, wie zum Beispiel <code>apt-get</code>, <code>dselect</code> oder
+<code>dpkg</code>. Die Installation einer aktualisierten Version von
+<code>yaboot</code> auf Ihrem System ändert nicht Ihre Boot-Konfiguration; Sie
+müssen dafür das inkludierte <code>ybin</code> Werkzeug verwenden.
+
+<p>
+Sie können <code>yaboot</code> auch direkt von der Home-Page von
+<code>yaboot</code> unter <code><a
+href="http://penguinppc.org/projects/yaboot/">http://penguinppc.org/projects/yaboot/</a></code>
+herunterladen. Wenn Sie es mit MacOS herunterladen, vergewissern Sie sich,
+dass sie das <em>binary</em> (nicht text) Format verwenden, und lassen Sie
+weder Stuffit Expander noch ein anderes Werkzeut das Archiv in MacOS
+expandieren.
+
+<p>
+Sie können das vorkompilierte <code>yaboot-binary-X.Y.tar.gz</code>
+herunterladen, oder die Source-Datei <code>yaboot-X.Y.tar.gz</code>. Um das
+Binär-Paket auszupacken verwenden Sie den Befehl <samp>tar -zxvpf
+yaboot-X.Y.tar.gz</samp>. Die Komponenten werden in ein
+<code>usr/local/</code> Verzeichnis innerhalb des Verzeichnisses entpackt, in
+dem Sie den Befehl ausgeführt haben.
+
+<p>
+Um es aus de Source zu bauen und zu installieren, vergewissern Sie sich, dass
+Sie einen funktionstüchtigen Compiler (<code>gcc</code>) und das
+<code>make</code> Programm installiert haben. (Falls nicht, laden Sie die
+binären yaboot tar-Datei statt den Sourcen.) Dann rufen Sie die folgenden
+Befehle auf (ersetzen Sie mit den tatsächlichen Revisions-Nummern bei X und Y):
+
+<pre>
+ tar -zxvpf yaboot-X.Y.tar.gz
+ cd yaboot-X.Y
+ make
+ su
+ make install
+</pre>
+
+<hr>
+
+[ <a href="ch2.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ 3 ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch4.de.html">weiter</a> ]
+
+<hr>
+
+<p>
+Wie man mit Yaboot auf PowerPC bootet
+
+<address>
+Version 1.04, 22. February 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch3.en.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch3.en.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch3.en.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,113 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>HOWTO-Booting with Yaboot on PowerPC - Obtaining Yaboot</title>
+
+</head>
+
+<body>
+
+<a name="ch3"></a>
+<hr>
+
+[ <a href="ch2.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ 3 ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch4.en.html">next</a> ]
+
+<hr>
+
+<h1>
+HOWTO-Booting with Yaboot on PowerPC
+<br>Chapter 3 - Obtaining Yaboot
+</h1>
+
+
+<hr>
+
+
+<p>
+Yaboot is included with Debian GNU/Linux installation for PowerPC computers.
+Updates for Debian may be downloaded via the normal methods, such as
+<code>apt-get</code>, <code>dselect</code>, or <code>dpkg</code>. Installation
+of an updated version of <code>yaboot</code> on your system does not change
+your boot configuration; you must use the included <code>ybin</code> utility to
+do that.
+
+<p>
+You can also download <code>yaboot</code> directly from the <code>yaboot</code>
+home page at <code><a
+href="http://penguinppc.org/projects/yaboot/">http://penguinppc.org/projects/yaboot/</a></code>.
+If you download it using MacOS, be sure to download using <em>binary</em> (not
+text) format, and don't let Stuffit Expander or another utility expand the
+archive in MacOS.
+
+<p>
+You can download the precompiled <code>yaboot-binary-X.Y.tar.gz</code>, or the
+source tarball <code>yaboot-X.Y.tar.gz</code>. To unpack the binary
+distribution, use the command <samp>tar -zxvpf yaboot-X.Y.tar.gz</samp>. The
+components are unpacked into a <code>usr/local/</code> directory inside the
+directory where the command was executed.
+
+<p>
+To make and install from source, first make sure you have a working compiler
+(<code>gcc</code>) and the <code>make</code> program installed. (If not,
+download the binary yaboot tarball instead of the source.) Then run the
+following commands (substitute the actual revision numbers for X and Y):
+
+<pre>
+ tar -zxvpf yaboot-X.Y.tar.gz
+ cd yaboot-X.Y
+ make
+ su
+ make install
+</pre>
+
+<hr>
+
+[ <a href="ch2.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ 3 ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch4.en.html">next</a> ]
+
+<hr>
+
+<p>
+HOWTO-Booting with Yaboot on PowerPC
+
+<address>
+Version 1.04, Feb 22 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch4.de.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch4.de.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch4.de.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,141 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Wie man mit Yaboot auf PowerPC bootet - Die Bootstrap-Partition erstellen</title>
+
+</head>
+
+<body>
+
+<a name="ch4"></a>
+<hr>
+
+[ <a href="ch3.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ 4 ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch5.de.html">weiter</a> ]
+
+<hr>
+
+<h1>
+Wie man mit Yaboot auf PowerPC bootet
+<br>Kapitel 4 - Die Bootstrap-Partition erstellen
+</h1>
+
+
+<hr>
+
+
+<p>
+Überprüfen Sie bitte die <code>mac-fdisk</code> Grundlagen-Seite auf <code><a
+href="http://penguinppc.org/projects/yaboot/doc/mac-fdisk-basics.shtml">http://penguinppc.org/projects/yaboot/doc/mac-fdisk-basics.shtml</a></code>.
+Wenn Sie eine neue Linux-Installation erstellen, sollte die ersten Partition,
+die mit <code>mac-fdisk</code> Sie erstellen, die bootstrap-Partition sein.
+Verwenden Sie lediglich den <code>mac-fdisk</code> <samp>b</samp> Befehl, um
+automatisch eine bootstrap-Partition in der richtigen Grösse und dem richtigen
+Typ zu erstellen. Wenn Ihre Version von <code>mac-fdisk</code> nicht den
+<samp>b</samp> Befehl unterstützt, verwenden Sie:
+
+<pre>
+ Command (? for help): C xxxx 800k bootstrap Apple_Bootstrap
+</pre>
+
+<p>
+(Ersetzten Sie xxxx mit der Nummer des Start-Blocks.) Eine funkionierende
+tar-Datei einer bootstrap-fähigen Version von mac-fdisk (Debian-Benutzer haben
+bereits diese Version) ist ebenfalls unter <code><a
+href="http://penguinppc.org/~eb/files/">http://penguinppc.org/~eb/files/</a></code>
+verfügbar. Um diese zu installieren, verwenden Sie
+
+<pre>
+ su -
+ cd /
+ gzip -dc mac-fdisk.tar.gz | tar -xvp
+</pre>
+
+<p>
+Die bootstrap-Partition benötigt nur 800k Platz. Wenn Sie eine boot-Partition
+zu Ihrem existierenden Setup hinzufügen, dürften Sie genügend freien Platz auf
+Ihrer vorhandenen Platte haben, ohne andere Partitionen zu ändern. Falls
+nicht, können Sie es vermeiden, Ihre komplette Platte neu zu partitionieren,
+indem Sie der swap-Partition etwas Platz stehlen. Oder <code>parted</code>
+erlaubt es Ihnen, die Partitionsgrössen zu ändern.
+
+<p>
+Die bootstrap-Partition sollte Partition #2 sein, nach der Partitions-Map
+selbst aber vor allen anderen Partitionen auf der Festplatte. Sie können die
+Reihenfolge der Partitionen ganz einfach ändern, indem Sie den <samp>r</samp>
+Befehl verwenden (vergleichen Sie auch die <code>mac-fdisk</code> Übung). In
+anderen Worten ist es nicht der physikalische Platz der bootstrap-Partition der
+zählt, es ist die logische Reihenfolge in der Partitions-Map. Beachten Sie
+jedoch, wenn Sie ein existierendes System haben und sie die Partitionsnummern
+herumschieben, müssen Sie entsprechende Änderungen in <code>/etc/fstab</code>
+vornehmen.
+
+<p>
+Der Grund, warum Sie die bootstrap-Partition als Partition #2 benötigen ist,
+damit sie allen anderen Partitionen in der Boot-Sequenz vorausgeht. Das hilft
+ungeheuerlich, das ganze System stabiler zu machen, da einige Betriebssystee
+sehr aufdringlich in ihrer Verwendung der Partitionen sind.
+
+<p>
+Wenn Sie mit dem partitionieren fertig sind, benutzen Sie den <samp>p</samp>
+Befehl und machen sich Notizen über die endgültigen Partitionsnummern. Sie
+benötigen die Partitionsnummer der bootstrap-Partition, die Position Ihres
+Kernels, und wenn Sie <code>yaboot</code> dazu verwenden wollen, mehrere
+Betriebssysteme zu booten, auch die Partitionsnummern für Ihre anderen
+Betriebssysteme.
+
+<p>
+Obwohl es möglich ist, <code>yaboot</code> auf einer mountbaren HFS
+<code>/boot</code> Partition zu installieren, wird diese Konfiguration
+abgelehnt, entmutigt und absolut nicht unterstützt.
+
+<hr>
+
+[ <a href="ch3.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ 4 ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch5.de.html">weiter</a> ]
+
+<hr>
+
+<p>
+Wie man mit Yaboot auf PowerPC bootet
+
+<address>
+Version 1.04, 22. February 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch4.en.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch4.en.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch4.en.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>HOWTO-Booting with Yaboot on PowerPC - Creating the Bootstrap Partition</title>
+
+</head>
+
+<body>
+
+<a name="ch4"></a>
+<hr>
+
+[ <a href="ch3.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ 4 ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch5.en.html">next</a> ]
+
+<hr>
+
+<h1>
+HOWTO-Booting with Yaboot on PowerPC
+<br>Chapter 4 - Creating the Bootstrap Partition
+</h1>
+
+
+<hr>
+
+
+<p>
+Be sure you have reviewed the <code>mac-fdisk</code> Basics page at <code><a
+href="http://penguinppc.org/projects/yaboot/doc/mac-fdisk-basics.shtml">http://penguinppc.org/projects/yaboot/doc/mac-fdisk-basics.shtml</a></code>.
+If you are creating a new Linux installation, the first partition you create
+with <code>mac-fdisk</code> should be the bootstrap partition. Just use the
+<code>mac-fdisk</code> <samp>b</samp> command to automatically create a
+bootstrap partition of the proper size and type. If your version of
+<code>mac-fdisk</code> doesn't include the <samp>b</samp> command, use:
+
+<pre>
+ Command (? for help): C xxxx 800k bootstrap Apple_Bootstrap
+</pre>
+
+<p>
+(Replace xxxx with the starting block number.) A working tarball of a
+bootstrap-capable version of mac-fdisk (Debian users already have this version)
+is also distributed at <code><a
+href="http://penguinppc.org/~eb/files/">http://penguinppc.org/~eb/files/</a></code>.
+To install this, use
+
+<pre>
+ su -
+ cd /
+ gzip -dc mac-fdisk.tar.gz | tar -xvp
+</pre>
+
+<p>
+The bootstrap partition only takes 800k of space. If you are adding a
+bootstrap partition to your existing setup, you may have enough free space on
+your existing drive without changing other partitions. If not, you could avoid
+re-partitioning the entire disk by stealing a little space from your swap
+partition. Or <code>parted</code> would allow you to resize partitions.
+
+<p>
+The bootstrap partition should end up being partition #2, after the partition
+map itself but before any other partitions on the disk. You can easily change
+the order of the partitions in the partition map using the <samp>r</samp>
+command (see the <code>mac-fdisk</code> tutorial). In other words, it's not
+the physical placement of the bootstrap partition that counts, it's the logical
+order within the partition map. Note, though, if you have an existing system
+and you shift the partition numbers around, you will need to make the
+appropriate changes in <code>/etc/fstab</code>.
+
+<p>
+The reason you want the bootstrap partition as partition #2, is so that it
+precedes all other partitions in the boot sequence. This helps tremendously to
+make the entire system more stable, since some OS's are very intrusive in their
+use of partitions.
+
+<p>
+When you're finished partitioning, use the <samp>p</samp> command and make note
+of the final partition numbers. You will need to know the partition number for
+the bootstrap partition, the location of your kernel, and if you intend to set
+up <code>yaboot</code> for multiple OS booting, partition numbers for your
+alternate OS's.
+
+<p>
+While it's possible to install <code>yaboot</code> on a mountable HFS
+<code>/boot</code> partition, that configuration is deprecated, discouraged and
+completely unsupported.
+
+<hr>
+
+[ <a href="ch3.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ 4 ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch5.en.html">next</a> ]
+
+<hr>
+
+<p>
+HOWTO-Booting with Yaboot on PowerPC
+
+<address>
+Version 1.04, Feb 22 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch5.de.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch5.de.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch5.de.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,100 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Wie man mit Yaboot auf PowerPC bootet - Yabootconfig: Einfach gehts auch</title>
+
+</head>
+
+<body>
+
+<a name="ch5"></a>
+<hr>
+
+[ <a href="ch4.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ 5 ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch6.de.html">weiter</a> ]
+
+<hr>
+
+<h1>
+Wie man mit Yaboot auf PowerPC bootet
+<br>Kapitel 5 - Yabootconfig: Einfach gehts auch
+</h1>
+
+
+<hr>
+
+
+<p>
+Für die erste Installation auf einem Rechner können Sie
+<code>yabootconfig</code> verwenden, um zuerst eine <code>yaboot.conf</code>
+Datei zu erstellen und dann alles auf Ihrer bootstrap-Partition zu
+installieren. Yabootconfig liest die <code>/etc/fstab</code> Datei des
+laufenden Systems aus, um die Position des Kernels zu bestimmen, und findet die
+Position der 800k Apple_Bootstrap Partition. Der Debian-Installer verwendet
+<code>yabootconfig</code> unbemerkt im Make Hard Disk Bootable Schritt.
+
+<p>
+Üblicherweise wird die anfängliche Boot-Konfiguration erstellt, während man
+sich in der RamDisk der Installer-Umgebung befindet, mit dem System, das
+installiert wird, unter <code>/target</code> oder <code>/mnt</code> eingehängt.
+Um <code>yabootconfig</code> unter diesen Bedingungen aufzurufen, geben Sie den
+Pfad zum Ziel-System mit der -t oder --chroot Option an. Zum Beispiel:
+<samp>yabootconfig --chroot /target</samp>
+
+<p>
+Die von <code>yabootconfig</code> automatisch generierte
+<code>yaboot.conf</code> wird nur das booten des Linux-Systems kontrollieren,
+in dem sie erstellt wurde. Um zusätzliche Betriebssysteme zu booten oder
+andere Optionen hinzuzufügen, müssen Sie die <code>yaboot.conf</code> Datei
+editieren.
+
+<hr>
+
+[ <a href="ch4.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ 5 ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch6.de.html">weiter</a> ]
+
+<hr>
+
+<p>
+Wie man mit Yaboot auf PowerPC bootet
+
+<address>
+Version 1.04, 22. February 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch5.en.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch5.en.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch5.en.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>HOWTO-Booting with Yaboot on PowerPC - Yabootconfig: Make It Easy</title>
+
+</head>
+
+<body>
+
+<a name="ch5"></a>
+<hr>
+
+[ <a href="ch4.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ 5 ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch6.en.html">next</a> ]
+
+<hr>
+
+<h1>
+HOWTO-Booting with Yaboot on PowerPC
+<br>Chapter 5 - Yabootconfig: Make It Easy
+</h1>
+
+
+<hr>
+
+
+<p>
+For initial installation on a machine, you can use <code>yabootconfig</code> to
+first create a <code>yaboot.conf</code> file and then install everything on
+your bootstrap partition. Yabootconfig reads the running system's
+<code>/etc/fstab</code> to determine the kernel location, and detects the
+location of the 800k Apple_Bootstrap partition. The Debian installer uses
+<code>yabootconfig</code> behind the scenes in the Make Hard Disk Bootable
+step.
+
+<p>
+Normally, the initial boot configuration is created while in a ramdisk
+installer environment, with the system being installed being mounted under
+<code>/target</code> or <code>/mnt</code>. To run <code>yabootconfig</code>
+under these conditions, supply the path to the target system with -t or
+--chroot option. For example: <samp>yabootconfig --chroot /target</samp>
+
+<p>
+The <code>yaboot.conf</code> automatically created by <code>yabootconfig</code>
+will just control booting of the linux system under which it was created. To
+boot additional OS's or add other options, you will need to edit the
+<code>yaboot.conf</code> file.
+
+<hr>
+
+[ <a href="ch4.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ 5 ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch6.en.html">next</a> ]
+
+<hr>
+
+<p>
+HOWTO-Booting with Yaboot on PowerPC
+
+<address>
+Version 1.04, Feb 22 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch6.de.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch6.de.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch6.de.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,363 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Wie man mit Yaboot auf PowerPC bootet - Ihre Boot-Konfiguration anpassen</title>
+
+</head>
+
+<body>
+
+<a name="ch6"></a>
+<hr>
+
+[ <a href="ch5.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ 6 ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch7.de.html">weiter</a> ]
+
+<hr>
+
+<h1>
+Wie man mit Yaboot auf PowerPC bootet
+<br>Kapitel 6 - Ihre Boot-Konfiguration anpassen
+</h1>
+
+
+<hr>
+
+
+<p>
+Um Ihre <code>yaboot</code> Installation anzupassen, verwenden Sie einen
+Text-Editor wie zum Beispiel <code>vi</code> oder <code>nano</code> (oder
+<code>nano-tiny</code> im Debian-Installer), um die <code>yaboot.conf</code>
+Datei zu editieren. Wenn Sie <code>yabootconfig</code> verwendet haben, um die
+anfängliche <code>yaboot.conf</code> zu erstellen, wird sie bereits eine
+grundlegende Konfiguration enthalten, um das Linux-System zu booten.
+
+<p>
+Die <code>yaboot.conf</code> hat zahlreiche Optionen; lesen Sie die
+<code>yaboot.conf</code> Manual-Seite für Details dazu. Ich werde kurz die
+beliebtesten Einzelheiten hier behandeln. Die Datei kontrolliert sowohl
+<code>yaboot</code> während dem tatsächlichen Boot-Prozess, als auch
+<code>ybin</code> während die Konfiguration auf die Boot-Partition gespeichert
+wird.
+
+<p>
+Zeilen in der Datei, die mit <samp>#</samp> beginnen, werden als Kommentare
+angesehen. Jede Option oder Parameter muss in einer eigenen Zeile angegeben
+sein. Verwenden Sie keine zusätzlichen Leerzeichen in den folgenden
+Parameter-Definitionen. Ebenfalls muss die Datei Unix-Zeilenumbrüche
+enthalten; vergewissern Sie sich, dass Sie die Datei im Unix-Typ speichern,
+wenn Sie sie in MacOS erstellen oder editieren.
+
+<hr>
+
+<a name="s6.1"></a>
+<h2>6.1 Linux-Style Geräte-Pfade</h2>
+
+<p>
+Für die, die mit der Linux Geräte-Bezeichnung unvertraut sind: Partitions-Pfade
+haben die Form <samp>/dev/xxx#</samp>, wobei xxx der Linux Geräte-Name ist und
+# die Partitionsnummer repräsentiert. Typische Linux Geräte-Namen sind:
+
+<pre>
+ Name Device Type
+ ---- --------------------------------------------------
+ hda interne IDE-Platte (primärer Controller, Master-Platte)
+ hdb interne IDE-Platte (primärer Controller, Slave-Platte)
+ hdc sekundärer Controller, Master-Platte (oft für CD-ROM verwendet)
+ hdd sekundärer Controller, Slave-Platte (oft für Zip-Laufwerke verwendet)
+ sda erste SCSI-Platte (SCSI ID Adressen-weise)
+ sdb zweite SCSI-Platte
+ scd0 erstes CD-ROM (oder sr0)
+ fd0 erstes Disketten-Laufwerk
+ fd1 zweites Disketten-Laufwerk
+</pre>
+
+<hr>
+
+<a name="s6.2"></a>
+<h2>6.2 OpenFirmware Geräte-Pfade</h2>
+
+<p>
+Ein Werkzeug, um die OpenFirmware Geräte-Pfade zu finden, die zu gegebenen
+Linux Geräte-Pfaden gehören, ist verfügbar: <code>ofpath</code>.
+<code>ybin</code> verwendet <code>ofpath</code> intern, um Linux Gerätenamen,
+die Sie in <code>yaboot.conf</code> verwenden, auf ihren OpenFirmware
+Equivalente umzuwandeln. Ein Beispiel: <samp>ofpath /dev/hda</samp> (sollte
+hd: zurückliefern). Sie können die OpenFirmware Geräte-Pfade auch selbst
+herausfinden, lesen Sie dazu Sich von einer Fehlkonfiguration erholen weiter
+unten.
+
+<hr>
+
+<a name="s6.3"></a>
+<h2>6.3 Benötigte Einstellungen</h2>
+
+<p>
+Die bootstrap-Partition wird mit <samp>boot=boot-partition</samp>
+identifiziert, wobei boot-partition der Pfad zur bootstrap-Partition im
+Linux-Stil ist. Wenn Sie unseren Partitionierungsvorschlägen auf ihrer
+internen Festplatte gefolgt sind, sollte das <samp>boot=/dev/hda2</samp> sein.
+
+<p>
+Für PowerMacs wird ebenfalls eine magicboot Zeile wie zum Beispiel
+<samp>magicboot=/usr/local/lib/yaboot/ofboot</samp> benötigt. Einige Modelle
+können kein reines ELF ausführen, und benötigen ein CHRP-Skript (was diese
+Zeile in der <code>yaboot.conf</code> Datei verfügbar macht).
+
+<p>
+Die <samp>partition=</samp>, <samp>image=</samp> und <samp>root=</samp>
+Einstellungen (bei den Kernel-Image Einstellungen unterhalb) werden ebenfalls
+benötigt.
+
+<hr>
+
+<a name="s6.4"></a>
+<h2>6.4 Boot-Menü Optionen</h2>
+
+<p>
+Ein CHRP Skript (<code>ofboot</code>) wurde zur Verfügung gestellt, das
+<code>ybin</code> mit den Einstellungen in <code>yaboot.conf</code>
+modifiziert, um ein sehr handliches Multi-Betriebssystem Boot-Menü anzuzeigen.
+
+<p>
+Wenn Sie ein Multi-Betriebssystem Boot-Menü aufsetzen, müssen Sie die
+Partitionen angeben, in denen sich jedes Betriebssystem befindet. Sie können
+die Linux-Stil oder OpenFirmware Partitionspfade verwenden. Hier sind einige
+Beispiele, die die Möglichkeiten aufzeigen:
+
+<pre>
+ macos=/dev/hda10
+ macosx=/dev/hda12
+ darwin=hd:9
+ bsd=zip:1
+</pre>
+
+<p>
+Wenn Sie <samp>macosx=</samp> verwenden und OSX auf einer UFS-Partition
+installiert haben, dann muss macosx auf die OSX bootstrap-Partition zeigen,
+nicht auf den UFS-Zweig. Versuchen Sie jedoch nicht, die OSX
+bootstrap-Partition für <code>ybin</code> zu verwenden — Sie benötigen
+trotzdem eine eigene Apple_Bootstrap Partition.
+
+<p>
+Wenn Sie jedoch <samp>bsd=</samp> verwenden, müssen Sie es auf die BSD
+root-Partition zeigen lassen, nicht auf eine bsd bootstrap-Partition. Um
+<samp>bsd=</samp> zu verwenden benötigen Sie ebenfalls den bsd-Bootloader
+(ofwboot) in <code>/usr/local/lib/yaboot/</code>, wenn Sie <code>ybin</code>
+aufrufen.
+
+<p>
+Wenn nichts aus de Boot-Menü ausgewählt wird, wenn es erscheint, ruft das
+System <code>yaboot</code> auf, um Linux zu starten. Um ein anderes
+Betriebssystem zu starten, wenn keine Taste gedrückt wird, fügen Sie eine
+<samp>defaultos=</samp> Zeile ein, zum Beispiel <samp>defaultos=macos</samp>
+oder <samp>defaultos=bsd</samp>.
+
+<hr>
+
+<a name="s6.5"></a>
+<h2>6.5 Kernel-Image Einstellungen</h2>
+
+<p>
+Die Kernel-Images, die von yaboot gestartet werden sollen, können Sie auf jeder
+Partition befinden, auf einem ext2, ext3, XFS, ReiserFS oder HFS/HFS+
+Dateisystem. Yaboot muss nur die Partitions-Nummer und den Dateisystem-Pfad
+für den Kernel wissen.
+
+<p>
+Die <code>yaboot.conf</code> Datei hat zwei Sektionen; die meisten Optionen
+befinden sich in der globalen Sektion am Anfang der Datei, und andere Optionen,
+die die einzelnen Kernel-Images betreffen, sind unterhalb zusammengefasst. Die
+meisten Kernel-Image Optionen können sowohl global oder lokal definiert werden;
+eine globale Option wird überschrieben, wenn sie in einer Kernel-Image Sektion
+neu definiert ist. Jede Kernel-Image Sektion beginnt mit einer
+<samp>image=/</samp> Zeile, die den Dateisystem-Pfad zu dem Kernel-Image
+angibt; die ersten <samp>image=/</samp> Zeile kennzeichnet das Ende der
+globalen Sektion.
+
+<p>
+Yaboot muss das Gerät, die Partitionsnumer und den Dateisystempfad für das
+Kernel-Image wissen, das es laden und starten soll. Jedoch ist
+<samp>device=</samp> üblicherweise nicht notwendig, da <code>yaboot</code> dann
+annimmt, es kann den Kernel auf dem selben Gerät finden, von dem es gestartet
+wird, was ziemlich oft stimmt. Sie sollten immer die Kernel Partitionsnummer
+angeben, zum Beispiel <samp>partition=3</samp>, und natürlich den Image-Pfad
+(zum Beispiel <samp>image=/boot/vmlinux</samp> ). Wenn Ihr Kernel-Image sich
+im root-Verzeichnis der Partition befindet, vergessen Sie nicht, den führenden
+Schrägstrich im Image-Pfad anzugeben (<samp>image=vmlinux</samp> funktioniert
+wahrscheinlich nicht).
+
+<p>
+Es ist zu beachten, dass <code>yaboot</code> das Kernel-Image im Dateisystem
+einer Partition findet, ohne zu wissen, an welcher Stelle diese Partition in
+das Linux root-Dateisystem eingehängt wird. Daher, falls Sie zum Beispiel ein
+Kernel-Image oder symbolischen Link auf /boot/vmlinux haben, aber /boot auf
+Ihrem System eine eigene Partition ist, ist der Image-Pfad für
+<code>yaboot</code> einfach nur <samp>image=/vmlinux</samp>.
+
+<p>
+Sie müssen ebenfalls den Linux Partitionspfad für die root-Partition angeben,
+zum Beispiel <samp>root=/dev/hda3</samp>. Dieser Parameter wird an den Kernel
+beim Starten übergeben, um ihn wissen zu lassen, wo sich das root-Dateisystem
+befindet. Viele weitere Optionen sind verfügbar, um zusätzliche Boot-Parameter
+an den Kernel zu übergeben (<samp>append=</samp>), die Grösse einer
+anfänglichen Ram-Disk anzugeben (<samp>ramdisk=</samp>), ein Ram-Disk Image zu
+laden (<samp>initrd=</samp>), und andere. Lesen Sie die Details zu den
+Kernel-Image Optionen in der Manual-Seite zu yaboot.conf.
+
+<p>
+Hier ist ein einfaches aber komplexes Beispiel einer <code>yaboot.conf</code>
+mit einer Kernel-Image Sektion:
+
+<pre>
+ # Wo ist die bootstrap-Partition
+ boot=/dev/hda2
+ # CHRP-Skript Spezifizierung
+ magicboot=/usr/lib/yaboot/ofboot
+ # Dual-Boot mit MacOS
+ macos=hd:14
+ # Wartezeit im Betriebssystem Boot-Menü (Sekunden)
+ delay=5
+
+ # Wartezeit am boot: Promt (Zehntel-Sekunden)
+ timeout=50
+ # Global identifizierte Root-Partition
+ root=/dev/hda3
+ # Das Device, auf dem sich der Kernel befindet
+ device=hd:
+
+ # Die Kernel-Image Sektion beginnt hier
+ # Dateisystem-Pfad zum Kernel-Image, symbolische Links sind o.k.
+ image=/vmlinux
+ # Nummer der Partition, auf der dieser Pfad liegt
+ partition=3
+ # Ein Name für den boot: Prompt, um diesen Kernel zu laden
+ label=Linux
+ # Der Typ, mit dem das root-Dateisystem eingebunden wird,
+ # read-only erlaubt einen fsck Durchlauf
+ read-only
+
+ ## ybin muss aufgerufen werden um Änderungen zu übernehmen!!!!!!!
+</pre>
+
+<p>
+Um ein Kernel-Image über tftp über das Netz zu booten, verwenden Sie
+<samp>image=/tftpboot/vmlinux</samp> (der Pfad zum tftp-Server) und
+<samp>device=enet:10.0.0.1</samp> (setzen Sie die tftp-Boot-Server IP-Adresse
+ein).
+
+<p>
+Im Normalfalls wird das erste Image gestartet, das in <code>yaboot.conf</code>
+angegeben ist, wenn keine Eingabe am boot: Prompt erfolgt. Um ein anderes
+Image als Vorgabe zu haben, fügen Sie eine <samp>default=label</samp> Zeile in
+die globale Sektion ein.
+
+<hr>
+
+<a name="s6.6"></a>
+<h2>6.6 Optionale und coole Einstellungen</h2>
+
+<p>
+Yaboot und Ihr Multi-Boot Menü kann Spritzer Farbe in Ihr Leben bringen!
+Verwenden Sie <samp>fgcolor=</samp> und <samp>bgcolor=</samp> Zeilen um Ihren
+Bildschirm am Morgen mit black, blue, light-blue, green, light-green, cyan,
+light-cyan, red, light-red, purple, light-purple, brown, light-gray, dark-gray,
+yellow und white aufzuwecken. Stellen Sie fgcolor und bgcolor auf das selbe
+ein, wenn Sie eine echte Herausforderung lieben.
+
+<p>
+Fügen Sie jedes oder alle der enableboot, enablenetboot oder enablecdboot
+hinzu, um entsprechend folgende Optionen zu Ihrem Betriebssystem Boot-Menü
+hinzuzufügen: Von OpenFirmware, dem Netzwerk oder CD-Rom booten.
+
+<p>
+Verwenden Sie Set delay= (in Sekunden) um festzulegen, wie lange das Multi-Boot
+Betriebssystem-Menü warten soll, bevor es das vorgegebene Betriebssystem
+bootet. <samp>timeout=</samp> (in Zehntel-Sekunden) gibt an, wielange yaboot
+am boot: Prompt auf Ihre Auswahl eines Kernel-Images warten soll, bevor es das
+erste Image in der Datei oder das <samp>default=</samp> Image bootet.
+
+<p>
+Boot-Passwort Sicherung ist mit einer <samp>password=</samp> Zeile verfügbar.
+Wenn Sie <samp>password=</samp> hinzufügen, wird ein Passwort notwendig, für
+alle Boot-Vorgänge. Automatisches Booten ist nicht möglich, ausser Sie fügen
+auch eine <samp>restricted</samp> Zeile hinzu.
+
+<p>
+Wenn <samp>restricted</samp> in der globalen Sektion hinzugefügt wird, dürfen
+Kernel-Images, die in <code>yaboot.conf</code> definiert sind, gebootet werden,
+solange keine Argumente am boot: Prompt hinzugefügt werden. Das ist nützlich
+für unbeaufsichtigtes Booten, während man augenblicklichte root-Shell Probleme
+bei Consolen-Zugriff unterbindet (jedoch werden auch OpenFirmware Passwörter
+benötigt, um das wirklich sicher zu machen, gemeinsam mit dem Verschliessen des
+Gehäuses). Um ein undefiniertes Image zu booten, oder ein Image mit
+zusätzlichen Argumenten, wird ein Passwort benötigt.
+
+<p>
+Die <samp>password=</samp> Zeile kann entweder ein reines Text-Passwort oder
+eine MD5-Prüfsumme sein (das selbe Format wie die Linux
+<code>/etc/shadow</code> Datei). Um eine MD5-Prüfsumme zu erstellen, verwenden
+die folgende Perl-Zeile:
+
+<pre>
+ $ perl -e 'printf("%s\n", crypt("geheim1", "\$1\$saltstrg"))'
+</pre>
+
+<p>
+Der saltstrg sollte eine zufällige Zeichenfolge sein, zum Beispiel eine
+generiert von
+
+<pre>
+ makepasswd --chars=8
+</pre>
+
+<hr>
+
+[ <a href="ch5.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ 6 ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch7.de.html">weiter</a> ]
+
+<hr>
+
+<p>
+Wie man mit Yaboot auf PowerPC bootet
+
+<address>
+Version 1.04, 22. February 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch6.en.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch6.en.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch6.en.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,342 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>HOWTO-Booting with Yaboot on PowerPC - Customizing Your Boot Configuration</title>
+
+</head>
+
+<body>
+
+<a name="ch6"></a>
+<hr>
+
+[ <a href="ch5.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ 6 ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch7.en.html">next</a> ]
+
+<hr>
+
+<h1>
+HOWTO-Booting with Yaboot on PowerPC
+<br>Chapter 6 - Customizing Your Boot Configuration
+</h1>
+
+
+<hr>
+
+
+<p>
+To customize your <code>yaboot</code> installation, use any text editor such as
+<code>vi</code> or <code>nano</code> (or <code>nano-tiny</code> in the Debian
+installer) to edit the <code>yaboot.conf</code> file. If you used
+<code>yabootconfig</code> to create the initial <code>yaboot.conf</code>, it
+will already contain a basic configuration to boot the linux system.
+
+<p>
+The <code>yaboot.conf</code> has numerous options; see the
+<code>yaboot.conf</code> man page for details. I will briefly cover the most
+popular items here. The file controls both <code>yaboot</code> operation
+during tha actual boot, and <code>ybin</code> operation while saving the
+configuration to the boot partition.
+
+<p>
+Lines in the file beginning with <samp>#</samp> are interpreted as comments.
+Each option or parameter must be specified on a separate line. Don't use any
+extra spaces within or following parameter definitions. Also, the file must
+have unix newlines; be sure to save as a unix type file if you create or edit
+it within MacOS.
+
+<hr>
+
+<a name="s6.1"></a>
+<h2>6.1 Linux Style Device Paths</h2>
+
+<p>
+For those unfamiliar with Linux device naming, partition paths are in the form
+of <samp>/dev/xxx#</samp> where xxx is the Linux device name and # represents
+the partition number. Typical Linux device names are:
+
+<pre>
+ Name Device Type
+ ---- --------------------------------------------------
+ hda internal ide drive (primary controller, master disk)
+ hdb internal ide drive (primary controller, slave disk)
+ hdc secondary controller, master disk (often used for CD-ROM)
+ hdd secondary controller, slave disk (often used for Zip drive)
+ sda first SCSI disk (SCSI ID address-wise)
+ sdb second SCSI disk
+ scd0 first CD-ROM (or sr0)
+ fd0 first floppy drive
+ fd1 second floppy drive
+</pre>
+
+<hr>
+
+<a name="s6.2"></a>
+<h2>6.2 OpenFirmware Device Paths</h2>
+
+<p>
+A utility for finding the OpenFirmware device path corresponding to a given
+Linux device path is provided: <code>ofpath</code>. <code>ybin</code> uses
+<code>ofpath</code> internally to convert Linux device names you use in
+<code>yaboot.conf</code> to OpenFirmware equivalents. Example: <samp>ofpath
+/dev/hda</samp> (should return hd:). You can also figure out OpenFirmware
+device paths yourself, see Recovering From Misconfiguration below.
+
+<hr>
+
+<a name="s6.3"></a>
+<h2>6.3 Required Settings</h2>
+
+<p>
+The bootstrap partition is identified with <samp>boot=boot-partition</samp>,
+where boot-partition is the Linux-style path to the bootstrap partition. If
+you followed our partitioning recommendations on your internal hard disk, that
+would be <samp>boot=/dev/hda2</samp>.
+
+<p>
+For PowerMacs, a magicboot line such as
+<samp>magicboot=/usr/local/lib/yaboot/ofboot</samp> is also required. Several
+models cannot execute a straight ELF, and need a CHRP script (which this line
+in the <code>yaboot.conf</code> makes available).
+
+<p>
+The <samp>partition=</samp>, <samp>image=</samp>, and <samp>root=</samp>
+settings (under kernel image settings below) are also required.
+
+<hr>
+
+<a name="s6.4"></a>
+<h2>6.4 Boot Menu Options</h2>
+
+<p>
+A CHRP script (<code>ofboot</code>) has been provided which <code>ybin</code>
+will modify using <code>yaboot.conf</code> settings, to display a very handy
+multi-OS boot menu.
+
+<p>
+If you are setting up a multi-OS boot menu, you'll need to identify the
+partitions where each OS lives. You can use Linux-style or OpenFirmware
+partition paths. Here are some examples illustrating the possibilities:
+
+<pre>
+ macos=/dev/hda10
+ macosx=/dev/hda12
+ darwin=hd:9
+ bsd=zip:1
+</pre>
+
+<p>
+When using <samp>macosx=</samp>, if you have OSX installed on a UFS partition,
+then point the macosx to the OSX bootstrap partition, not the UFS root. Don't
+be tempted to use the OSX bootstrap partition for <code>ybin</code>, however
+— you still need a separate Apple_Bootstrap partition.
+
+<p>
+When using <samp>bsd=</samp>, on the other hand, point to the BSD root
+partition, not a bsd bootstrap partition. To use <samp>bsd=</samp>, you also
+need to have the bsd bootloader (ofwboot) available in
+<code>/usr/local/lib/yaboot/</code> when running <code>ybin</code>.
+
+<p>
+If nothing is selected from the boot menu when it appears, the system launches
+<code>yaboot</code> to start Linux. To launch another OS when no key is
+pressed, add a <samp>defaultos=</samp> line, for example
+<samp>defaultos=macos</samp> or <samp>defaultos=bsd</samp>.
+
+<hr>
+
+<a name="s6.5"></a>
+<h2>6.5 Kernel Image Settings</h2>
+
+<p>
+Kernel images to be launched by yaboot can be kept on any partition, in an
+ext2, ext3, XFS, ReiserFS, or HFS/HFS+ filesystem. Yaboot will need to know
+the kernel partition number and filesystem path.
+
+<p>
+The <code>yaboot.conf</code> file has two sections; most options are in the
+global section at the top of the file, and options pertaining to separate
+kernel images are grouped together below. Most kernel image options may be
+specified either globally or locally; a global option is overridden if it is
+re-specified in a kernel image section. Each kernel image section begins with
+an <samp>image=/</samp> line specifying the filesystem path to that kernel
+image; the first <samp>image=/</samp> line marks the end of the global section.
+
+<p>
+Yaboot must know the device, partition number, and filesystem path for the
+kernel image that is to be loaded and started. However, <samp>device=</samp>
+is usually not necessary, because if you don't specify it <code>yaboot</code>
+assumes it will find the kernel on the same device it was booted from, which is
+quite often true. You should always supply the kernel partition number, for
+example <samp>partition=3</samp>, and of course the image path (for example
+<samp>image=/boot/vmlinux</samp> ). If your kernel image is at the root level
+of the partition, don't forget to include the leading slash when specifying the
+image path (<samp>image=vmlinux</samp> will probably fail).
+
+<p>
+It's worth noting that <code>yaboot</code> locates the kernel image within a
+partition's filesystem without regard to where that partition will eventually
+be mounted within the Linux root filesystem. So, for example, if you've placed
+a kernel image or symlink at /boot/vmlinux, but /boot is actually a separate
+partition on your system, then the image path for <code>yaboot</code> will just
+be <samp>image=/vmlinux</samp>.
+
+<p>
+You must also specify the Linux partition path for the root partition, for
+example <samp>root=/dev/hda3</samp>. This parameter is passed to the kernel
+when it starts up to let it know where its root filesystem is located. Many
+other options are available to pass additional boot parameters to the kernel
+(<samp>append=</samp>), specify initial ramdisk size (<samp>ramdisk=</samp>),
+load a ramdisk image (<samp>initrd=</samp>), and others. Refer to the
+yaboot.conf man page for details on kernel image options.
+
+<p>
+Here's a simple but complete example <code>yaboot.conf</code> with one kernel
+image section:
+
+<pre>
+ # Where's the bootstrap partition
+ boot=/dev/hda2
+ # CHRP script spec
+ magicboot=/usr/lib/yaboot/ofboot
+ # Dual boot with MacOS
+ macos=hd:14
+ # How long to wait at the OS boot menu (seconds)
+ delay=5
+
+ # How long to wait at the boot: prompt (tenths of a second)
+ timeout=50
+ # Globally identified root partition
+ root=/dev/hda3
+ # The device where the kernel lives
+ device=hd:
+
+ # Kernel image section begins here
+ # Specify the filesystem path to the kernel image, symlinks are OK
+ image=/vmlinux
+ # Specify the partition number where this path is valid
+ partition=3
+ # Add a label, you can type this at the boot: prompt to load this kernel
+ label=Linux
+ # Specify the type of root fs mounting, read-only allows fsck to run
+ read-only
+
+ ## You must run ybin for changes to take effect!!!!!!!
+</pre>
+
+<p>
+To netboot a kernel image via tftp, use <samp>image=/tftpboot/vmlinux</samp>
+(the path on the tftp server) and <samp>device=enet:10.0.0.1</samp>
+(substituting the tftp boot server IP address).
+
+<p>
+Normally the first image specified in the <code>yaboot.conf</code> will be the
+image booted if no entry is made at the boot: prompt. To have another image
+loaded by default, add a <samp>default=label</samp> line in the global section.
+
+<hr>
+
+<a name="s6.6"></a>
+<h2>6.6 Optional and Cool Settings</h2>
+
+<p>
+Yaboot and your multiboot menu can throw a splash of color into your life! Use
+<samp>fgcolor=</samp> and <samp>bgcolor=</samp> lines to set your screen to
+wake you up in the morning with black, blue, light-blue, green, light-green,
+cyan, light-cyan, red, light-red, purple, light-purple, brown, light-gray,
+dark-gray, yellow, and white. Make fgcolor and bgcolor the same if you'd
+really like a challenge.
+
+<p>
+Add any or all of enableofboot, enablenetboot, or enablecdboot to add the
+respective options to your OS boot menu: boot from OpenFirmware, the network,
+or CDROM.
+
+<p>
+Use Set delay= (in seconds) to determine how long the multiboot OS menu should
+wait before booting the default OS. <samp>timeout=</samp> (in tenths of
+seconds) to set how long yaboot should wait at the boot: prompt for you to
+choose a kernel image before booting the first image in the file or the
+<samp>default=</samp> image.
+
+<p>
+Booting password protection is available using a <samp>password=</samp> line.
+When you add <samp>password=</samp>, a password will be required for all
+booting. Automatic booting is not possible unless a <samp>restricted</samp>
+line is added.
+
+<p>
+If <samp>restricted</samp> is added in the global section, kernel images
+defined in <code>yaboot.conf</code> may be booted as long as no arguments are
+added at the boot: prompt. This is useful for unattended booting, while
+preventing the instant rootshell problems of console access (though OpenFirmare
+passwords are also needed to make this really secure, along with locking the
+case). To boot an undefined image, or any image with additional arguments, a
+password will be required.
+
+<p>
+The <samp>password=</samp> line may either be a plaintext password or an MD5
+hash (the same format as the Linux <code>/etc/shadow</code> file). To make an
+md5 hash use the following perl snippet:
+
+<pre>
+ $ perl -e 'printf("%s\n", crypt("secret", "\$1\$saltstrg"))'
+</pre>
+
+<p>
+The saltstrg should be a random string, for example one generated by
+
+<pre>
+ makepasswd --chars=8
+</pre>
+
+<hr>
+
+[ <a href="ch5.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ 6 ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch7.en.html">next</a> ]
+
+<hr>
+
+<p>
+HOWTO-Booting with Yaboot on PowerPC
+
+<address>
+Version 1.04, Feb 22 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch7.de.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch7.de.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch7.de.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,89 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Wie man mit Yaboot auf PowerPC bootet - Boot-Konfigurations-Änderungen speichern</title>
+
+</head>
+
+<body>
+
+<a name="ch7"></a>
+<hr>
+
+[ <a href="ch6.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ 7 ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch8.de.html">weiter</a> ]
+
+<hr>
+
+<h1>
+Wie man mit Yaboot auf PowerPC bootet
+<br>Kapitel 7 - Boot-Konfigurations-Änderungen speichern
+</h1>
+
+
+<hr>
+
+
+<p>
+Es gibt im Moment drei Werkzeuge, die es anbieten, Ihre
+Boot-Konfigurations-Änderungen auf die Boot-Partition zu speichern:
+<code>ybin</code>, <code>mkofboot</code> und <code>yabootconfig</code>. Ybin
+kopiert <code>yaboot</code>, <code>yaboot.conf</code> und das CHRP-Skript auf
+die Boot-Partition, und führt dann Seine notwendige Segnung durch. Mkofboot
+initialisiert die bootstrap-Partition und ruft dann <code>ybin</code> auf. Und
+<code>yabootconfig</code> erstellt eine funktionierende
+<code>yaboot.conf</code> und ruft anschliessend <code>mkofboot</code> auf. Für
+Details und Optionen zu diesen Werkzeugen lesen Sie die entsprechenden
+Manual-Seiten oder geben Sie den Namen des Werkzeugs ein gefolgt von --help auf
+der Kommandozeile.
+
+<hr>
+
+[ <a href="ch6.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ 7 ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch8.de.html">weiter</a> ]
+
+<hr>
+
+<p>
+Wie man mit Yaboot auf PowerPC bootet
+
+<address>
+Version 1.04, 22. February 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch7.en.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch7.en.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch7.en.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,87 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>HOWTO-Booting with Yaboot on PowerPC - Saving Boot Configuration Changes</title>
+
+</head>
+
+<body>
+
+<a name="ch7"></a>
+<hr>
+
+[ <a href="ch6.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ 7 ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch8.en.html">next</a> ]
+
+<hr>
+
+<h1>
+HOWTO-Booting with Yaboot on PowerPC
+<br>Chapter 7 - Saving Boot Configuration Changes
+</h1>
+
+
+<hr>
+
+
+<p>
+There are currently three utilities provided to save your boot configuration
+changes to the boot partition: <code>ybin</code>, <code>mkofboot</code>, and
+<code>yabootconfig</code>. Ybin copies <code>yaboot</code>,
+<code>yaboot.conf</code>, and the CHRP script to the boot partition, and then
+performs the necessary blessing. Mkofboot initializes the bootstrap partition,
+then runs <code>ybin</code>. And <code>yabootconfig</code> creates a working
+<code>yaboot.conf</code> and then runs <code>mkofboot</code>. For details and
+options of these utilities, see the associated man pages or type the utility
+name followed by --help on the command line.
+
+<hr>
+
+[ <a href="ch6.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ 7 ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch8.en.html">next</a> ]
+
+<hr>
+
+<p>
+HOWTO-Booting with Yaboot on PowerPC
+
+<address>
+Version 1.04, Feb 22 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch8.de.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch8.de.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch8.de.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Wie man mit Yaboot auf PowerPC bootet - Übliche Fehler</title>
+
+</head>
+
+<body>
+
+<a name="ch8"></a>
+<hr>
+
+[ <a href="ch7.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ 8 ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch9.de.html">weiter</a> ]
+
+<hr>
+
+<h1>
+Wie man mit Yaboot auf PowerPC bootet
+<br>Kapitel 8 - Übliche Fehler
+</h1>
+
+
+<hr>
+
+
+<p>
+Die häufigsten Fehler, die bei der Verwendung von <code>yaboot</code> gemacht
+werden, ist es zu versuchen, es permanent von einer einbindbaren Partition zu
+booten. Wenn ein PowerPC erst hochfährt, wird der Boot-Prozess gestartet mit
+der Suche nach einem sogenannten `blessed' (gesegneten) Verzeichnis. Das MacOS
+plaziert die Segnung so, dass mehrere System-Verzeichnisse auf einer Partition
+existieren können, aber nur einer davon gültig zum Starten ist. Wenn der
+Computer für ein Dual-Boot mit Linux und MacOS aufgesetzt wird, wird MacOS beim
+booten alle Verzeichnisse entsegnen, die nicht ein gültiges MacOS System
+beinhalten. Dann, wenn der Rechner das nächste Mal bootet, wird die Partition,
+die das vormals gesegnete Verzeichnis enthielt, nicht mehr bootbar sein.
+
+<p>
+Die Werkzeuge, die mit <code>yaboot</code> zur Verfügung gestellt werden,
+sollten immer verwendet werden, um es auf seiner eigenen bootstrap-Partition
+aufzusetzen, für die regulären Boot-Anforderungen. Das einzige Mal, wann Sie
+<code>yaboot</code> auf einer einbindbaren Partition plazieren sollten ist die
+anfängliche Installation von Linux und Rettungs-Operationen. In diesen Fällen
+können Sie in den normalen Bootloading-Prozess eingreifen, um eine spezifische
+Datei ausführen zu lassen, und gesegnete Verzeichnisse sind kein Thema, da
+dieser Typ des Bootens nicht automatisch passiert.
+
+<p>
+Nachem <code>yaboot</code> installiert wurde, ist ein weiterer häufiger Fehler
+die Boot-Konfigurationsdatei zu ändern oder die <code>yaboot</code> Software zu
+aktualisieren und dann darauf zu vergessen, <code>ybin</code> aufzurufen um die
+geänderte Konfiguration in die Boot-Partition zu transferieren.
+Booting-Funktionen werden nicht geändert, solange die Änderungen nicht in die
+bootstrap-Partition gespeichert werden. Wenn Sie Ihre <code>yaboot.conf</code>
+oft ändern, können Sie eine Kommentarzeile in die Datei einfügen, die Sie daran
+erinnert, dass Sie <code>ybin</code> nach den Änderungen aufrufen müssen.
+
+<hr>
+
+[ <a href="ch7.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ 8 ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch9.de.html">weiter</a> ]
+
+<hr>
+
+<p>
+Wie man mit Yaboot auf PowerPC bootet
+
+<address>
+Version 1.04, 22. February 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch8.en.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch8.en.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch8.en.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,106 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>HOWTO-Booting with Yaboot on PowerPC - Common Mistakes</title>
+
+</head>
+
+<body>
+
+<a name="ch8"></a>
+<hr>
+
+[ <a href="ch7.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ 8 ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch9.en.html">next</a> ]
+
+<hr>
+
+<h1>
+HOWTO-Booting with Yaboot on PowerPC
+<br>Chapter 8 - Common Mistakes
+</h1>
+
+
+<hr>
+
+
+<p>
+The most common mistake made in the usage of <code>yaboot</code> is trying to
+use it to boot from a mountable partition on a permanent basis. When a PowerPC
+first starts up, the booting process is started by locating a so-called
+`blessed' folder. The MacOS places the blessing so that multiple system
+folders may exist on a partition, but only one of them will be valid for
+starting up. If the computer is set up to dual boot Linux and MacOS, when
+MacOS is booted it will unbless any folders which do not contain a valid MacOS
+system. Then the next time the machine boots, the partition containing the
+formerly blessed folder will not be bootable.
+
+<p>
+The utilities provided with <code>yaboot</code> should always be used to set it
+up on its own bootstrap partition for regular booting needs. The only time you
+should place <code>yaboot</code> on a mountable partition is for initial
+installation of Linux and rescue operations. In those cases you can intervene
+in the normal bootloading process to request a specific file to be executed,
+and blessed folders are not an issue since this type of booting is not
+automatic.
+
+<p>
+After <code>yaboot</code> has been installed, another common mistake is
+changing the boot configuration file or updating the <code>yaboot</code>
+software and then failing to re-run the <code>ybin</code> utility to transfer
+the changed configuration to the boot partition. Booting functions will not be
+changed unless the changes are saved to the bootstrap partition. If you change
+your <code>yaboot.conf</code> often, you might want to add a comment line
+inside the <code>yaboot.conf</code> file to remind yourself to run
+<code>ybin</code> after making changes.
+
+<hr>
+
+[ <a href="ch7.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ 8 ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch9.en.html">next</a> ]
+
+<hr>
+
+<p>
+HOWTO-Booting with Yaboot on PowerPC
+
+<address>
+Version 1.04, Feb 22 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch9.de.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch9.de.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch9.de.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,186 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Wie man mit Yaboot auf PowerPC bootet - Sich von einer Fehlkonfiguration erholen</title>
+
+</head>
+
+<body>
+
+<a name="ch9"></a>
+<hr>
+
+[ <a href="ch8.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ 9 ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch10.de.html">weiter</a> ]
+
+<hr>
+
+<h1>
+Wie man mit Yaboot auf PowerPC bootet
+<br>Kapitel 9 - Sich von einer Fehlkonfiguration erholen
+</h1>
+
+
+<hr>
+
+
+<p>
+Wenn Sie ein Problem beim booten haben, verfallen Sie nicht in Panik. Yaboot
+kan jeden installierten Linux-Kernel und jedes Linux-System vom boot: Prompt
+aus booten.
+
+<hr>
+
+<a name="s9.1"></a>
+<h2>9.1 Das NVRAM zurücksetzen</h2>
+
+<p>
+Halten Sie die Command-Option-p-r Tasten alle gemeinsam während dem Starten, um
+alle nvram Parameter auf ihre Werkseinstellungen zurückzusetzen. Halten Sie
+die Tasten, bis Sie den Startup-Ton zwei- oder dreimal hören. Wenn die
+Setup-Vorschläge befolgt wurden, wird die <code>yaboot</code> Installation die
+erste bootbare Partition sein, und OpenFirmware wird sie automatisch booten.
+Es muss beachtet werden, dass MacOS-Einstellungen wie virtueller Speicher,
+Startup-Platte und die Bildschirmauflösung auch auf ihre Werkseinstellungen
+zurückgesetzt werden.
+
+<hr>
+
+<a name="s9.2"></a>
+<h2>9.2 Yaboot laden</h2>
+
+<p>
+Wenn kein <samp>boot:</samp> Prompt angezeigt wird, dann wurde
+<code>yaboot</code> nicht geladen. Sie können es händisch von OpenFirmware aus
+laden. Das gemeinsame Halten der Command-Option-o-f Tasten, nachdem Sie den
+Einschaltknopf gedrückt haben, wird Ihnen einen OpenFirmware-Prompt liefern
+
+<pre>
+ 0 >
+</pre>
+
+<p>
+(Command ist die Taste mit dem Kleeblatt und/oder Apfel darauf).
+
+<p>
+Am OF-Prompt müssen Sie die OpenFirmware Pfade für die meisten der
+Boot-Konfigurationseinstellungen verwenden. Sie können die meisten
+OpenFirmware-Pfade vom OF-Prompt aus feststellen, indem Sie ein paar OF-Befehle
+verwenden, und dann einen OF-Boot-Befehl konstruieren, mit dem Sie Ihren Kernel
+direkt booten können.
+
+<p>
+Der volle OpenFirmware-Pfad besteht aus drei Teilen im Format
+
+<pre>
+ Geräte-Name:Partitions-Nummer,/Dateisystem-Pfad
+</pre>
+
+<p>
+Der OF-Befehl devalias wird alle Geräte-Aliases auflisten, die auf Ihrem System
+wirksam sind. Sie dürften einige von diesen sehen:
+
+<pre>
+ Name Geräte-Typ
+ ---- --------------------------------------------------
+ hd interne IDE-Platte (primärer Controller, Master-Platte)
+ ultra1 interne IDE-Platte (primärer Controller, Slave-Platte)
+ ide0 IDE-Platte (sekundärer Controller, Master-Platte)
+ ide1 IDE-Platte (sekundärer Controller, Slave-Platte)
+ cd CD-ROM
+ zip Zip-Laufwerk
+ fw FireWire-Interface
+ fd Diskettenlaufwerk
+ enet Ethernet-Interface
+</pre>
+
+<p>
+Hängen Sie die Partitionsnummer der Boot-Partition (in unserer Empfehlung 2) an
+und setzen Sie das nun mit <samp>,yaboot</samp> fort, um die
+<code>yaboot</code> Datei auf der Boot-Partition zu booten.
+
+<pre>
+ 0 > boot hd:2,yaboot
+</pre>
+
+<p>
+Wenn Sie Enter drücken, sollte <code>yaboot</code> geladen werden und seinen
+<code>boot:</code> anzeigen. Wenn Sie die Partitionsnummer nicht wissen,
+beginnen Sie einfach mit 2 und erhöhen Sie die Nummer, bis Sie die richtige
+Partition erwischen.
+
+<hr>
+
+<a name="s9.3"></a>
+<h2>9.3 Ein Kernel-Image händisch laden</h2>
+
+<p>
+Wenn Sie den boot: Prompt haben, können Sie ein Label eingeben, das Sie in
+Ihrer <code>yaboot.conf</code> definiert haben, um dieses Kernel-Image zu
+booten. Oder statt einem Label können Sie auch einen vollständigen
+OpenFirmware-Pfad angeben. Ein typischer Kernel-Pfad könnte folgendes sein:
+
+<pre>
+ boot: hd:3,/vmlinux
+</pre>
+
+<p>
+Um dem Kernel Parameter zu übergeben, fügen Sie diese auf der
+<samp>boot:</samp> Prompt Zeile nach dem Kernel-Label oder Pfad ein. Sie
+müssen zumindest <samp>root=</samp> angeben, aber Sie können jeden gewünschten
+Kernel-Parameter hinzufügen. Hier ist ein Beispiel:
+
+<pre>
+ boot: hd:3,/vmlinux root=/dev/hda3 ro
+</pre>
+
+<hr>
+
+[ <a href="ch8.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ 9 ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch10.de.html">weiter</a> ]
+
+<hr>
+
+<p>
+Wie man mit Yaboot auf PowerPC bootet
+
+<address>
+Version 1.04, 22. February 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/ch9.en.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/ch9.en.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/ch9.en.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,181 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>HOWTO-Booting with Yaboot on PowerPC - Recovering From Misconfiguration</title>
+
+</head>
+
+<body>
+
+<a name="ch9"></a>
+<hr>
+
+[ <a href="ch8.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ 9 ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch10.en.html">next</a> ]
+
+<hr>
+
+<h1>
+HOWTO-Booting with Yaboot on PowerPC
+<br>Chapter 9 - Recovering From Misconfiguration
+</h1>
+
+
+<hr>
+
+
+<p>
+If you have a problem booting, don't panic. Yaboot can boot any installed
+Linux kernel and system from the boot: prompt.
+
+<hr>
+
+<a name="s9.1"></a>
+<h2>9.1 Resetting the NVRAM</h2>
+
+<p>
+Hold the Command-Option-p-r keys all together at startup to reset all nvram
+parameters to their factory defaults. Hold the keys until you hear the startup
+chime two or three times. If the setup recommendations were followed, the
+<code>yaboot</code> installation will be be the first bootable partition and
+OpenFirmware will boot it automatically. It should be noted that MacOS
+settings such as virtual memory, startup disk, and screen resolution will also
+be reset to their defaults.
+
+<hr>
+
+<a name="s9.2"></a>
+<h2>9.2 Loading Yaboot</h2>
+
+<p>
+If a <samp>boot:</samp> prompt isn't presented, then <code>yaboot</code> isn't
+being loaded. You can load it manually from OpenFirmware. Holding the
+Command-Option-o-f keys all together after pressing the power-on key will give
+you an OpenFirmware prompt
+
+<pre>
+ 0 >
+</pre>
+
+<p>
+(Command is the key with the cloverleaf and/or apple engraved on it).
+
+<p>
+At the OF prompt, you will need to use OpenFirmware paths for most of the boot
+configuration items. You can determine most OpenFirmware paths from the OF
+prompt using a few OF commands, then construct an OF boot command to directly
+boot your kernel.
+
+<p>
+The full OpenFirmware path consists of three parts in the format
+
+<pre>
+ device-name:partition-number,/filesystem-path
+</pre>
+
+<p>
+The OF command devalias will list all the device aliases effective on your
+system. You may see some of these:
+
+<pre>
+ Name Device Type
+ ---- --------------------------------------------------
+ hd internal ide drive (primary controller, master disk)
+ ultra1 internal ide drive (primary controller, slave disk)
+ ide0 ide drive (secondary controller, master disk)
+ ide1 ide drive (secondary controller, slave disk)
+ cd CD-ROM
+ zip Zip drive
+ fw FireWire interface
+ fd Floppy drive
+ enet Ethernet interface
+</pre>
+
+<p>
+Append the partition number of the boot partition (in our recommendation, 2)
+and then follow that with <samp>,yaboot</samp> to boot the <code>yaboot</code>
+file on the boot partition.
+
+<pre>
+ 0 > boot hd:2,yaboot
+</pre>
+
+<p>
+Hit return, and <code>yaboot</code> should be loaded and display its
+<code>boot:</code> prompt. If you don't know the partition number, just start
+at 2 and work your way up until you hit it.
+
+<hr>
+
+<a name="s9.3"></a>
+<h2>9.3 Manually Loading a Kernel Image</h2>
+
+<p>
+Once you have the boot: prompt, you can enter a label defined in your
+<code>yaboot.conf</code> to boot that kernel image. Or instead of a label, you
+can enter a full OpenFirmware path. A typical kernel path might be
+
+<pre>
+ boot: hd:3,/vmlinux
+</pre>
+
+<p>
+To pass parameters to the kernel, add them on to the <samp>boot:</samp> prompt
+line after the kernel label or path. You'll need to specify <samp>root=</samp>
+as a minimum, but you can add any kernel parameters desired. Here's an
+example;
+
+<pre>
+ boot: hd:3,/vmlinux root=/dev/hda3 ro
+</pre>
+
+<hr>
+
+[ <a href="ch8.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ 9 ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch10.en.html">next</a> ]
+
+<hr>
+
+<p>
+HOWTO-Booting with Yaboot on PowerPC
+
+<address>
+Version 1.04, Feb 22 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/index.de.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/index.de.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/index.de.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,151 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Wie man mit Yaboot auf PowerPC bootet</title>
+
+</head>
+
+<body>
+
+<a name="index"></a>
+<hr>
+
+[ <a href="ch11.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch1.de.html">weiter</a> ]
+
+<hr>
+
+<h1>
+Wie man mit Yaboot auf PowerPC bootet
+</h1>
+
+
+<hr>
+
+<a name="abstract"></a>
+<h2>Zusammenfassung</h2>
+
+<p>
+Dieses Dokument umfasst Installations- und Benutzungs-Anleitungen für
+<code>yaboot</code>, den GNU/Linux PowerPC Bootloader.
+
+<hr>
+
+<a name="copyright"></a>
+<h2>Copyright Hinweis</h2>
+
+<p>
+Dieses Dokument darf zu den Bedingungen der GNU General Public Licence verbreitet und verändert werden. © 1998–2002 Chris Tillman
+
+<p>
+Dieses Dokument wird im upstream yaboot Quellcode gepflegt. Änderungen und
+Übersetzungen bitte an erbenson (at) alaska.net senden. Die aktuellste Version
+dieses Dokumentes ist im yaboot rsync Verzeichnis unter:
+rsync://penguinppc.org/yaboot zu finden.
+
+<p>
+Die Bezugsquelle dieses Dokumentes ist <code><a
+href="http://penguinppc.org/projects/yaboot/doc/yaboot-howto.shtml">http://penguinppc.org/projects/yaboot/doc/yaboot-howto.shtml</a></code>.
+
+<p>
+Dieses Dokument ist freie Software; Sie dürfen es weiterverbreiten und/oder
+modifizieren, zu den Bedingungen der GNU General Public Licence, wie sie von
+der Free Software Foundation publiziert wurde; entweder Version 2, oder (nach
+Ihrer Wahl) jede spätere Version.
+
+<p>
+Dieses Dokument wird verbreitet in der Hoffnung, dass es nützlich sein wird,
+aber <em>ohne jegliche Garantie</em>; sogar ohne der implizierten Garantie der
+Marktfähigkeit oder der Tauglichkeit für einen bestimmten Zweck. Lesen Sie die
+GNU General Public Licence für weitere Details.
+
+<p>
+Eine Kopie der GNU General Public Licence ist als
+<code>/usr/share/common-licenses/GPL</code> in der Debian GNU/Linux
+Distribution oder im World-Wide-Web auf der <code><a
+href="http://www.gnu.org/copyleft/gpl.html">GNU Website</a></code> verfügbar.
+Sie können Sie ebenfalls erhalten, indem Sie an die Free Software Foundation,
+Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA schreiben.
+
+<hr>
+
+<a name="contents"></a>
+<h2>Inhalt</h2>
+
+<ul>
+<li><a href="ch1.de.html">1 Yaboot's Zweck</a></li>
+<li><a href="ch2.de.html">2 System-Anforderungen</a></li>
+<li><a href="ch3.de.html">3 Yaboot beziehen</a></li>
+<li><a href="ch4.de.html">4 Die Bootstrap-Partition erstellen</a></li>
+<li><a href="ch5.de.html">5 Yabootconfig: Einfach gehts auch</a></li>
+<li><a href="ch6.de.html">6 Ihre Boot-Konfiguration anpassen</a></li>
+<ul>
+<li><a href="ch6.de.html#s6.1">6.1 Linux-Style Geräte-Pfade</a></li>
+<li><a href="ch6.de.html#s6.2">6.2 OpenFirmware Geräte-Pfade</a></li>
+<li><a href="ch6.de.html#s6.3">6.3 Benötigte Einstellungen</a></li>
+<li><a href="ch6.de.html#s6.4">6.4 Boot-Menü Optionen</a></li>
+<li><a href="ch6.de.html#s6.5">6.5 Kernel-Image Einstellungen</a></li>
+<li><a href="ch6.de.html#s6.6">6.6 Optionale und coole Einstellungen</a></li>
+</ul>
+<li><a href="ch7.de.html">7 Boot-Konfigurations-Änderungen speichern</a></li>
+<li><a href="ch8.de.html">8 Übliche Fehler</a></li>
+<li><a href="ch9.de.html">9 Sich von einer Fehlkonfiguration erholen</a></li>
+<ul>
+<li><a href="ch9.de.html#s9.1">9.1 Das NVRAM zurücksetzen</a></li>
+<li><a href="ch9.de.html#s9.2">9.2 Yaboot laden</a></li>
+<li><a href="ch9.de.html#s9.3">9.3 Ein Kernel-Image händisch laden</a></li>
+</ul>
+<li><a href="ch10.de.html">10 Yaboot als temporärer Bootloader</a></li>
+<li><a href="ch11.de.html">11 Für weitere Informationen</a></li>
+</ul>
+
+<hr>
+
+[ <a href="ch11.de.html">zurück</a> ]
+[ <a href="index.de.html#contents">Inhalt</a> ]
+[ <a href="ch1.de.html">1</a> ]
+[ <a href="ch2.de.html">2</a> ]
+[ <a href="ch3.de.html">3</a> ]
+[ <a href="ch4.de.html">4</a> ]
+[ <a href="ch5.de.html">5</a> ]
+[ <a href="ch6.de.html">6</a> ]
+[ <a href="ch7.de.html">7</a> ]
+[ <a href="ch8.de.html">8</a> ]
+[ <a href="ch9.de.html">9</a> ]
+[ <a href="ch10.de.html">10</a> ]
+[ <a href="ch11.de.html">11</a> ]
+[ <a href="ch1.de.html">weiter</a> ]
+
+<hr>
+
+<p>
+Wie man mit Yaboot auf PowerPC bootet
+
+<address>
+Version 1.04, 22. February 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/index.en.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/index.en.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/index.en.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>HOWTO-Booting with Yaboot on PowerPC</title>
+
+</head>
+
+<body>
+
+<a name="index"></a>
+<hr>
+
+[ <a href="ch11.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch1.en.html">next</a> ]
+
+<hr>
+
+<h1>
+HOWTO-Booting with Yaboot on PowerPC
+</h1>
+
+
+<hr>
+
+<a name="abstract"></a>
+<h2>Abstract</h2>
+
+<p>
+This document contains installation and usage instructions for
+<code>yaboot</code>, the GNU/Linux PowerPC bootloader.
+
+<hr>
+
+<a name="copyright"></a>
+<h2>Copyright Notice</h2>
+
+<p>
+This document may be distributed and modified under the terms of the GNU General Public License. © 1998–2002 Chris Tillman
+
+<p>
+This document is maintained in the upstream yaboot source. Patches and
+translations should be sent to erbenson (at) alaska.net. The most recent sgml
+version of this document is available via the yaboot rsync tree:
+rsync://penguinppc.org/yaboot.
+
+<p>
+The master location of this document is <code><a
+href="http://penguinppc.org/projects/yaboot/doc/yaboot-howto.shtml">http://penguinppc.org/projects/yaboot/doc/yaboot-howto.shtml</a></code>.
+
+<p>
+This document is free software; you may 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.
+
+<p>
+This document is distributed in the hope that it will be useful, but
+<em>without any warranty</em>; without even the implied warranty of
+merchantability or fitness for a particular purpose. See the GNU General
+Public License for more details.
+
+<p>
+A copy of the GNU General Public License is available as
+<code>/usr/share/common-licenses/GPL</code> in the Debian GNU/Linux
+distribution or on the World Wide Web at the <code><a
+href="http://www.gnu.org/copyleft/gpl.html">GNU website</a></code>. You can
+also obtain it by writing to the Free Software Foundation, Inc., 59 Temple
+Place - Suite 330, Boston, MA 02111-1307, USA.
+
+<hr>
+
+<a name="contents"></a>
+<h2>Contents</h2>
+
+<ul>
+<li><a href="ch1.en.html">1 Yaboot's Purpose</a></li>
+<li><a href="ch2.en.html">2 System Requirements</a></li>
+<li><a href="ch3.en.html">3 Obtaining Yaboot</a></li>
+<li><a href="ch4.en.html">4 Creating the Bootstrap Partition</a></li>
+<li><a href="ch5.en.html">5 Yabootconfig: Make It Easy</a></li>
+<li><a href="ch6.en.html">6 Customizing Your Boot Configuration</a></li>
+<ul>
+<li><a href="ch6.en.html#s6.1">6.1 Linux Style Device Paths</a></li>
+<li><a href="ch6.en.html#s6.2">6.2 OpenFirmware Device Paths</a></li>
+<li><a href="ch6.en.html#s6.3">6.3 Required Settings</a></li>
+<li><a href="ch6.en.html#s6.4">6.4 Boot Menu Options</a></li>
+<li><a href="ch6.en.html#s6.5">6.5 Kernel Image Settings</a></li>
+<li><a href="ch6.en.html#s6.6">6.6 Optional and Cool Settings</a></li>
+</ul>
+<li><a href="ch7.en.html">7 Saving Boot Configuration Changes</a></li>
+<li><a href="ch8.en.html">8 Common Mistakes</a></li>
+<li><a href="ch9.en.html">9 Recovering From Misconfiguration</a></li>
+<ul>
+<li><a href="ch9.en.html#s9.1">9.1 Resetting the NVRAM</a></li>
+<li><a href="ch9.en.html#s9.2">9.2 Loading Yaboot</a></li>
+<li><a href="ch9.en.html#s9.3">9.3 Manually Loading a Kernel Image</a></li>
+</ul>
+<li><a href="ch10.en.html">10 Yaboot as a Temporary Bootloader</a></li>
+<li><a href="ch11.en.html">11 For More Information</a></li>
+</ul>
+
+<hr>
+
+[ <a href="ch11.en.html">previous</a> ]
+[ <a href="index.en.html#contents">Contents</a> ]
+[ <a href="ch1.en.html">1</a> ]
+[ <a href="ch2.en.html">2</a> ]
+[ <a href="ch3.en.html">3</a> ]
+[ <a href="ch4.en.html">4</a> ]
+[ <a href="ch5.en.html">5</a> ]
+[ <a href="ch6.en.html">6</a> ]
+[ <a href="ch7.en.html">7</a> ]
+[ <a href="ch8.en.html">8</a> ]
+[ <a href="ch9.en.html">9</a> ]
+[ <a href="ch10.en.html">10</a> ]
+[ <a href="ch11.en.html">11</a> ]
+[ <a href="ch1.en.html">next</a> ]
+
+<hr>
+
+<p>
+HOWTO-Booting with Yaboot on PowerPC
+
+<address>
+Version 1.04, Feb 22 2004<br>
+Chris Tillman
+</address>
+
+<hr>
+
+</body>
+
+</html>
+
Added: trunk/yaboot/doc/yaboot-howto.html/index.html
===================================================================
--- trunk/yaboot/doc/yaboot-howto.html/index.html 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.html/index.html 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+link index.en.html
\ No newline at end of file
Property changes on: trunk/yaboot/doc/yaboot-howto.html/index.html
___________________________________________________________________
Name: svn:special
+ *
Added: trunk/yaboot/doc/yaboot-howto.sgml
===================================================================
--- trunk/yaboot/doc/yaboot-howto.sgml 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/doc/yaboot-howto.sgml 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,751 @@
+<!DOCTYPE debiandoc PUBLIC "-//DebianDoc//DTD DebianDoc//EN" [
+ <!--
+ document conventions:
+ file, directory, device == file
+ program, command == prgn
+ variable == var
+ package == package
+ program output == tt
+ key input == em, example for longer ones
+ command input == tt
+ -->
+]>
+
+<debiandoc>
+ <book>
+ <titlepag>
+ <title>
+ HOWTO-Booting with Yaboot on PowerPC
+ </title>
+ <author>
+ <name>Chris Tillman</name>
+ </author>
+ <version>Version 1.04, Feb 22 2004</version>
+ <abstract>
+This document contains installation and usage instructions for
+<prgn>yaboot</prgn>, the GNU/Linux PowerPC bootloader.
+ </abstract>
+ <copyright>
+ <copyrightsummary>
+This document may be distributed and modified under the terms of the
+GNU General Public License.
+© 1998–2002 Chris Tillman
+ </copyrightsummary>
+ <p>
+This document is maintained in the upstream yaboot source. Patches
+and translations should be sent to erbenson (at) alaska.net. The most
+recent sgml version of this document is available via the yaboot rsync
+tree: rsync://penguinppc.org/yaboot.
+ <p>
+The master location of this
+document is <url
+id="http://penguinppc.org/projects/yaboot/doc/yaboot-howto.shtml"
+name="http://penguinppc.org/projects/yaboot/doc/yaboot-howto.shtml">.
+ <p>
+This document is free software; you may 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.
+ <p>
+This document is distributed in the hope that it will be useful, but
+<em>without any warranty</em>; without even the implied warranty of
+merchantability or fitness for a particular purpose. See the GNU
+General Public License for more details.
+ <p>
+
+A copy of the GNU General Public License is available as
+<file>/usr/share/common-licenses/GPL</file> in the Debian GNU/Linux
+distribution or on the World Wide Web at the <url
+id="http://www.gnu.org/copyleft/gpl.html" name="GNU website">. You can also
+obtain it by writing to the Free Software Foundation, Inc., 59 Temple Place
+- Suite 330, Boston, MA 02111-1307, USA.
+
+ <toc detail="sect">
+<chapt>Yaboot's Purpose
+<p>
+
+Yaboot is a bootloader for PowerPC computers (NewWorld PowerMacs and IBM
+CHRP). It loads a Linux operating system kernel from an
+OpenFirmware-accessible filesystem and initiates operation of the kernel. On
+PowerMacs, an included CHRP script can display a multi-OS boot menu which
+can launch <prgn>yaboot</prgn> or other operating systems. Utilities are
+included to place <prgn>yaboot</prgn> and the associated script on a
+non-mountable bootstrap partition.
+
+
+<chapt>System Requirements
+<p>
+Motorola PowerPC processors have been used on at least three different
+kinds of systems: NuBus, OldWorld PCI, and NewWorld PCI. Nubus systems
+include the 6100/7100/8100 line of Power Macintoshes. OldWorld systems
+are most Power Macintoshes with a floppy drive and a PCI bus. Most
+603, 603e, 604, and 604e based Power Macintoshes, including the 7200,
+7300, 7500, 7600, 8500, 8600, 9500, and 9600 are OldWorld
+machines. The beige colored G3 systems are also OldWorld.
+<p>
+
+<em><prgn>yaboot</prgn> will not work on NuBus or OldWorld machines</em>,
+those will require <prgn>quik</prgn> or (for MacOS Pre-9.0.4 only)
+<prgn>BootX/miboot</prgn>.
+
+<p>
+The NewWorld PowerMacs, for which <prgn>yaboot</prgn> is designed, are
+any PowerMacs in translucent colored plastic cases. That includes all
+iMacs, iBooks, G4 systems, blue colored G3 systems, and most
+PowerBooks manufactured in and after 1999.
+
+
+<chapt>Obtaining Yaboot
+<p>
+
+Yaboot is included with Debian GNU/Linux installation for PowerPC computers.
+Updates for Debian may be downloaded via the normal methods, such as
+<prgn>apt-get</prgn>, <prgn>dselect</prgn>, or <prgn>dpkg</prgn>.
+Installation of an updated version of <prgn>yaboot</prgn> on your system
+does not change your boot configuration; you must use the included
+<prgn>ybin</prgn> utility to do that.
+
+<p>
+
+You can also download <prgn>yaboot</prgn> directly from the
+<prgn>yaboot</prgn> home page at <url
+id="http://penguinppc.org/projects/yaboot/">. If you download it using MacOS,
+be sure to download using <em>binary</em> (not text) format, and don't let
+Stuffit Expander or another utility expand the archive in MacOS.
+
+<p>
+
+You can download the precompiled <file>yaboot-binary-X.Y.tar.gz</file>, or
+the source tarball <file>yaboot-X.Y.tar.gz</file>. To unpack the binary
+distribution, use the command <tt>tar -zxvpf yaboot-X.Y.tar.gz</tt>. The
+components are unpacked into a <file>usr/local/</file> directory inside the
+directory where the command was executed.
+
+<p>
+
+To make and install from source, first make sure you have a working compiler
+(<prgn>gcc</prgn>) and the <prgn>make</prgn> program installed. (If
+not, download the binary yaboot tarball instead of the source.) Then run the
+following commands (substitute the actual revision numbers for X and Y):
+
+<p>
+<example>
+ tar -zxvpf yaboot-X.Y.tar.gz
+ cd yaboot-X.Y
+ make
+ su
+ make install
+</example>
+
+<chapt>Creating the Bootstrap Partition
+<p>
+
+Be sure you have reviewed the <prgn>mac-fdisk</prgn> Basics page at <url
+id="http://penguinppc.org/projects/yaboot/doc/mac-fdisk-basics.shtml">. If
+you are creating a new Linux installation, the first partition you create
+with <prgn>mac-fdisk</prgn> should be the bootstrap partition. Just use the
+<prgn>mac-fdisk</prgn> <tt>b</tt> command to automatically create a
+bootstrap partition of the proper size and type. If your version of
+<prgn>mac-fdisk</prgn> doesn't include the <tt>b</tt> command, use:
+
+<p>
+<example>
+ Command (? for help): C xxxx 800k bootstrap Apple_Bootstrap
+</example>
+<p>
+
+(Replace xxxx with the starting block number.) A working tarball of a
+bootstrap-capable version of mac-fdisk (Debian users already have this
+version) is also distributed at <url
+id="http://penguinppc.org/~eb/files/">. To install this, use
+
+<example>
+ su -
+ cd /
+ gzip -dc mac-fdisk.tar.gz | tar -xvp
+</example>
+
+<p>
+The bootstrap partition only takes 800k of space. If you are adding a
+bootstrap partition to your existing setup, you may have enough free
+space on your existing drive without changing other partitions. If
+not, you could avoid re-partitioning the entire disk by stealing a
+little space from your swap partition. Or <prgn>parted</prgn> would allow
+you to resize partitions.
+
+<p>
+
+The bootstrap partition should end up being partition #2, after the
+partition map itself but before any other partitions on the disk. You can
+easily change the order of the partitions in the partition map using the
+<tt>r</tt> command (see the <prgn>mac-fdisk</prgn> tutorial). In other
+words, it's not the physical placement of the bootstrap partition that
+counts, it's the logical order within the partition map. Note, though, if
+you have an existing system and you shift the partition numbers around, you
+will need to make the appropriate changes in <file>/etc/fstab</file>.
+
+<p>
+
+The reason you want the bootstrap partition as partition #2, is so
+that it precedes all other partitions in the boot sequence. This helps
+tremendously to make the entire system more stable, since some OS's
+are very intrusive in their use of partitions.
+
+<p>
+
+When you're finished partitioning, use the <tt>p</tt> command and make note
+of the final partition numbers. You will need to know the partition
+number for the bootstrap partition, the location of your kernel, and
+if you intend to set up <prgn>yaboot</prgn> for multiple OS booting, partition
+numbers for your alternate OS's.
+
+<p>
+
+While it's possible to install <prgn>yaboot</prgn> on a mountable HFS
+<file>/boot</file> partition, that configuration is deprecated, discouraged
+and completely unsupported.
+
+<chapt>Yabootconfig: Make It Easy
+<p>
+
+For initial installation on a machine, you can use <prgn>yabootconfig</prgn>
+to first create a <file>yaboot.conf</file> file and then install everything
+on your bootstrap partition. Yabootconfig reads the running system's
+<file>/etc/fstab</file> to determine the kernel location, and detects the
+location of the 800k Apple_Bootstrap partition. The Debian installer uses
+<prgn>yabootconfig</prgn> behind the scenes in the Make Hard Disk Bootable
+step.
+
+<p>
+
+Normally, the initial boot configuration is created while in a ramdisk
+installer environment, with the system being installed being mounted under
+<file>/target</file> or <file>/mnt</file>. To run <prgn>yabootconfig</prgn>
+under these conditions, supply the path to the target system with -t or
+--chroot option. For example: <tt>yabootconfig --chroot /target</tt>
+
+<p>
+
+The <file>yaboot.conf</file> automatically created by
+<prgn>yabootconfig</prgn> will just control booting of the linux system
+under which it was created. To boot additional OS's or add other options,
+you will need to edit the <file>yaboot.conf</file> file.
+
+
+<chapt>Customizing Your Boot Configuration
+<p>
+
+To customize your <prgn>yaboot</prgn> installation, use any text editor such
+as <prgn>vi</prgn> or <prgn>nano</prgn> (or <prgn>nano-tiny</prgn> in the
+Debian installer) to edit the <file>yaboot.conf</file> file. If you used
+<prgn>yabootconfig</prgn> to create the initial <file>yaboot.conf</file>, it
+will already contain a basic configuration to boot the linux system.
+
+<p>
+
+The <file>yaboot.conf</file> has numerous options; see the
+<file>yaboot.conf</file> man page for details. I will briefly cover the most
+popular items here. The file controls both <prgn>yaboot</prgn> operation
+during tha actual boot, and <prgn>ybin</prgn> operation while saving the
+configuration to the boot partition.
+
+<p>
+
+Lines in the file beginning with <tt>#</tt> are interpreted as comments. Each
+option or parameter must be specified on a separate line. Don't use
+any extra spaces within or following parameter definitions. Also, the
+file must have unix newlines; be sure to save as a unix type file
+if you create or edit it within MacOS.
+
+
+<sect>Linux Style Device Paths
+<p>
+
+For those unfamiliar with Linux device naming, partition paths are in
+the form of <tt>/dev/xxx#</tt> where xxx is the Linux device name and #
+represents the partition number. Typical Linux device names are:
+
+<example>
+ Name Device Type
+ ---- --------------------------------------------------
+ hda internal ide drive (primary controller, master disk)
+ hdb internal ide drive (primary controller, slave disk)
+ hdc secondary controller, master disk (often used for CD-ROM)
+ hdd secondary controller, slave disk (often used for Zip drive)
+ sda first SCSI disk (SCSI ID address-wise)
+ sdb second SCSI disk
+ scd0 first CD-ROM (or sr0)
+ fd0 first floppy drive
+ fd1 second floppy drive
+</example>
+
+
+<sect>OpenFirmware Device Paths
+<p>
+A utility for finding the OpenFirmware device path corresponding to a
+given Linux device path is provided: <prgn>ofpath</prgn>. <prgn>ybin</prgn>
+uses <prgn>ofpath</prgn>
+internally to convert Linux device names you use in <file>yaboot.conf</file> to
+OpenFirmware equivalents. Example: <tt>ofpath /dev/hda</tt> (should return hd:).
+You can also figure out OpenFirmware device paths yourself, see
+Recovering From Misconfiguration below.
+
+<sect>Required Settings
+<p>
+
+The bootstrap partition is identified with <tt>boot=boot-partition</tt>,
+where boot-partition is the Linux-style path to the bootstrap partition. If
+you followed our partitioning recommendations on your internal hard disk,
+that would be <tt>boot=/dev/hda2</tt>.
+
+<p>
+
+For PowerMacs, a magicboot line such as
+<tt>magicboot=/usr/local/lib/yaboot/ofboot</tt> is also required. Several
+models cannot execute a straight ELF, and need a CHRP script (which this
+line in the <file>yaboot.conf</file> makes available).
+
+<p>
+
+The <tt>partition=</tt>, <tt>image=</tt>, and <tt>root=</tt> settings (under
+kernel image settings below) are also required.
+
+<sect>Boot Menu Options
+<p>
+
+A CHRP script (<file>ofboot</file>) has been provided which
+<prgn>ybin</prgn> will modify using <file>yaboot.conf</file> settings, to
+display a very handy multi-OS boot menu.
+
+<p>
+
+If you are setting up a multi-OS boot menu, you'll need to identify the
+partitions where each OS lives. You can use Linux-style or OpenFirmware
+partition paths. Here are some examples illustrating the possibilities:
+
+<example>
+ macos=/dev/hda10
+ macosx=/dev/hda12
+ darwin=hd:9
+ bsd=zip:1
+</example>
+
+When using <tt>macosx=</tt>, if you have OSX installed on a UFS partition,
+then point the macosx to the OSX bootstrap partition, not the UFS root.
+Don't be tempted to use the OSX bootstrap partition for <prgn>ybin</prgn>,
+however — you still need a separate Apple_Bootstrap partition.
+
+<p>
+
+When using <tt>bsd=</tt>, on the other hand, point to the BSD root
+partition, not a bsd bootstrap partition. To use <tt>bsd=</tt>, you also
+need to have the bsd bootloader (ofwboot) available in
+<file>/usr/local/lib/yaboot/</file> when running <prgn>ybin</prgn>.
+
+<p>
+
+If nothing is selected from the boot menu when it appears, the system
+launches <prgn>yaboot</prgn> to start Linux. To launch another OS when no
+key is pressed, add a <tt>defaultos=</tt> line, for example
+<tt>defaultos=macos</tt> or <tt>defaultos=bsd</tt>.
+
+
+<sect>Kernel Image Settings
+<p>
+Kernel images to be launched by yaboot can be kept on any partition,
+in an ext2, ext3, XFS, ReiserFS, or HFS/HFS+ filesystem. Yaboot will
+need to know the kernel partition number and filesystem path.
+
+<p>
+
+The <file>yaboot.conf</file> file has two sections; most options are in the
+global section at the top of the file, and options pertaining to separate
+kernel images are grouped together below. Most kernel image options may be
+specified either globally or locally; a global option is overridden if it is
+re-specified in a kernel image section. Each kernel image section begins
+with an <tt>image=/</tt> line specifying the filesystem path to that kernel
+image; the first <tt>image=/</tt> line marks the end of the global section.
+
+<p>
+
+Yaboot must know the device, partition number, and filesystem path for the
+kernel image that is to be loaded and started. However, <tt>device=</tt> is
+usually not necessary, because if you don't specify it <prgn>yaboot</prgn>
+assumes it will find the kernel on the same device it was booted from, which
+is quite often true. You should always supply the kernel partition number,
+for example <tt>partition=3</tt>, and of course the image path (for example
+<tt>image=/boot/vmlinux</tt> ). If your kernel image is at the root level of
+the partition, don't forget to include the leading slash when specifying the
+image path (<tt>image=vmlinux</tt> will probably fail).
+
+<p>
+
+It's worth noting that <prgn>yaboot</prgn> locates the kernel image within a
+partition's filesystem without regard to where that partition will
+eventually be mounted within the Linux root filesystem. So, for example, if
+you've placed a kernel image or symlink at /boot/vmlinux, but /boot is
+actually a separate partition on your system, then the image path for
+<prgn>yaboot</prgn> will just be <tt>image=/vmlinux</tt>.
+
+<p>
+
+You must also specify the Linux partition path for the root partition, for
+example <tt>root=/dev/hda3</tt>. This parameter is passed to the kernel when
+it starts up to let it know where its root filesystem is located. Many other
+options are available to pass additional boot parameters to the kernel
+(<tt>append=</tt>), specify initial ramdisk size (<tt>ramdisk=</tt>), load a
+ramdisk image (<tt>initrd=</tt>), and others. Refer to the yaboot.conf man
+page for details on kernel image options.
+
+<p>
+
+Here's a simple but complete example <file>yaboot.conf</file> with one
+kernel image section:
+
+<example>
+ # Where's the bootstrap partition
+ boot=/dev/hda2
+ # CHRP script spec
+ magicboot=/usr/lib/yaboot/ofboot
+ # Dual boot with MacOS
+ macos=hd:14
+ # How long to wait at the OS boot menu (seconds)
+ delay=5
+
+ # How long to wait at the boot: prompt (tenths of a second)
+ timeout=50
+ # Globally identified root partition
+ root=/dev/hda3
+ # The device where the kernel lives
+ device=hd:
+
+ # Kernel image section begins here
+ # Specify the filesystem path to the kernel image, symlinks are OK
+ image=/vmlinux
+ # Specify the partition number where this path is valid
+ partition=3
+ # Add a label, you can type this at the boot: prompt to load this kernel
+ label=Linux
+ # Specify the type of root fs mounting, read-only allows fsck to run
+ read-only
+
+ ## You must run ybin for changes to take effect!!!!!!!
+</example>
+<p>
+
+To netboot a kernel image via tftp, use <tt>image=/tftpboot/vmlinux</tt> (the
+path on the tftp server) and <tt>device=enet:10.0.0.1</tt>
+(substituting the tftp boot server IP address).
+
+<p>
+
+Normally the first image specified in the <file>yaboot.conf</file> will be the
+image booted if no entry is made at the boot: prompt. To have another
+image loaded by default, add a <tt>default=label</tt> line in the global
+section.
+
+
+<sect>Optional and Cool Settings
+<p>
+
+Yaboot and your multiboot menu can throw a splash of color into your life!
+Use <tt>fgcolor=</tt> and <tt>bgcolor=</tt> lines to set your screen to wake
+you up in the morning with black, blue, light-blue, green, light-green,
+cyan, light-cyan, red, light-red, purple, light-purple, brown, light-gray,
+dark-gray, yellow, and white. Make fgcolor and bgcolor the same if you'd
+really like a challenge.
+
+<p>
+
+Add any or all of enableofboot, enablenetboot, or enablecdboot to add
+the respective options to your OS boot menu: boot from OpenFirmware,
+the network, or CDROM.
+
+<p>
+
+Use Set delay= (in seconds) to determine how long the multiboot OS menu
+should wait before booting the default OS. <tt>timeout=</tt> (in tenths of
+seconds) to set how long yaboot should wait at the boot: prompt for
+you to choose a kernel image before booting the first image in the
+file or the <tt>default=</tt> image.
+
+<p>
+
+Booting password protection is available using a <tt>password=</tt> line.
+When you add <tt>password=</tt>, a password will be required for all booting.
+Automatic booting is not possible unless a <tt>restricted</tt> line is added.
+
+<p>
+
+If <tt>restricted</tt> is added in the global section, kernel images defined
+in <file>yaboot.conf</file> may be booted as long as no arguments are added
+at the boot: prompt. This is useful for unattended booting, while preventing
+the instant rootshell problems of console access (though OpenFirmare
+passwords are also needed to make this really secure, along with locking the
+case). To boot an undefined image, or any image with additional arguments, a
+password will be required.
+
+<p>
+
+The <tt>password=</tt> line may either be a plaintext password or an MD5
+hash (the same format as the Linux <file>/etc/shadow</file> file). To make an
+md5 hash use the following perl snippet:
+
+<example>
+ $ perl -e 'printf("%s\n", crypt("secret", "\$1\$saltstrg"))'
+</example>
+The saltstrg should be a random string, for example one generated by
+
+<example>
+ makepasswd --chars=8
+</example>
+
+
+<chapt>Saving Boot Configuration Changes
+<p>
+
+There are currently three utilities provided to save your boot configuration
+changes to the boot partition: <prgn>ybin</prgn>, <prgn>mkofboot</prgn>, and
+<prgn>yabootconfig</prgn>. Ybin copies <prgn>yaboot</prgn>,
+<file>yaboot.conf</file>, and the CHRP script to the boot partition, and
+then performs the necessary blessing. Mkofboot initializes the bootstrap
+partition, then runs <prgn>ybin</prgn>. And <prgn>yabootconfig</prgn>
+creates a working <file>yaboot.conf</file> and then runs
+<prgn>mkofboot</prgn>. For details and options of these utilities, see the
+associated man pages or type the utility name followed by --help on the
+command line.
+
+
+<chapt>Common Mistakes
+<p>
+
+The most common mistake made in the usage of <prgn>yaboot</prgn> is trying
+to use it to boot from a mountable partition on a permanent basis. When a
+PowerPC first starts up, the booting process is started by locating a
+so-called `blessed' folder. The MacOS places the blessing so that multiple
+system folders may exist on a partition, but only one of them will be valid
+for starting up. If the computer is set up to dual boot Linux and MacOS,
+when MacOS is booted it will unbless any folders which do not contain a
+valid MacOS system. Then the next time the machine boots, the partition
+containing the formerly blessed folder will not be bootable.
+
+<p>
+
+The utilities provided with <prgn>yaboot</prgn> should always be used to set
+it up on its own bootstrap partition for regular booting needs. The only
+time you should place <prgn>yaboot</prgn> on a mountable partition is for
+initial installation of Linux and rescue operations. In those cases you can
+intervene in the normal bootloading process to request a specific file to be
+executed, and blessed folders are not an issue since this type of booting is
+not automatic.
+
+<p>
+
+After <prgn>yaboot</prgn> has been installed, another common mistake is
+changing the boot configuration file or updating the <prgn>yaboot</prgn>
+software and then failing to re-run the <prgn>ybin</prgn> utility to
+transfer the changed configuration to the boot partition. Booting functions
+will not be changed unless the changes are saved to the bootstrap partition.
+If you change your <file>yaboot.conf</file> often, you might want to add a
+comment line inside the <file>yaboot.conf</file> file to remind yourself to
+run <prgn>ybin</prgn> after making changes.
+
+
+<chapt>Recovering From Misconfiguration
+<p>
+
+If you have a problem booting, don't panic. Yaboot can boot any
+installed Linux kernel and system from the boot: prompt.
+
+<sect>Resetting the NVRAM
+<p>
+
+Hold the Command-Option-p-r keys all together at startup to reset all nvram
+parameters to their factory defaults. Hold the keys until you hear the
+startup chime two or three times. If the setup recommendations were
+followed, the <prgn>yaboot</prgn> installation will be be the first bootable
+partition and OpenFirmware will boot it automatically. It should be noted
+that MacOS settings such as virtual memory, startup disk, and screen
+resolution will also be reset to their defaults.
+
+
+<sect>Loading Yaboot
+<p>
+
+If a <tt>boot:</tt> prompt isn't presented, then <prgn>yaboot</prgn> isn't
+being loaded. You can load it manually from
+OpenFirmware. Holding the Command-Option-o-f keys all together after
+pressing the power-on key will give you an OpenFirmware prompt
+
+<example>
+ 0 >
+</example>
+(Command is the key with the cloverleaf and/or apple engraved on it).
+
+<p>
+
+At the OF prompt, you will need to use OpenFirmware paths for most of
+the boot configuration items. You can determine most OpenFirmware
+paths from the OF prompt using a few OF commands, then construct an OF
+boot command to directly boot your kernel.
+
+<p>
+
+The full OpenFirmware path consists of three parts in the format
+
+<example>
+ device-name:partition-number,/filesystem-path
+</example>
+
+<p>
+
+The OF command devalias will list all the device aliases effective on
+your system. You may see some of these:
+<example>
+ Name Device Type
+ ---- --------------------------------------------------
+ hd internal ide drive (primary controller, master disk)
+ ultra1 internal ide drive (primary controller, slave disk)
+ ide0 ide drive (secondary controller, master disk)
+ ide1 ide drive (secondary controller, slave disk)
+ cd CD-ROM
+ zip Zip drive
+ fw FireWire interface
+ fd Floppy drive
+ enet Ethernet interface
+</example>
+
+Append the partition number of the boot partition (in our recommendation, 2)
+and then follow that with <tt>,yaboot</tt> to boot the <prgn>yaboot</prgn>
+file on the boot partition.
+
+<example>
+ 0 > boot hd:2,yaboot
+</example>
+<p>
+
+Hit return, and <prgn>yaboot</prgn> should be loaded and display its
+<file>boot:</file> prompt. If you don't know the partition number, just
+start at 2 and work your way up until you hit it.
+
+<sect>Manually Loading a Kernel Image
+<p>
+
+Once you have the boot: prompt, you can enter a label defined in your
+<file>yaboot.conf</file> to boot that kernel image. Or instead of a label,
+you can enter a full OpenFirmware path. A typical kernel path might be
+
+<example>
+ boot: hd:3,/vmlinux
+</example>
+
+To pass parameters to the kernel, add them on to the <tt>boot:</tt> prompt
+line after the kernel label or path. You'll need to specify <tt>root=</tt>
+as a minimum, but you can add any kernel parameters desired. Here's an
+example;
+
+<example>
+ boot: hd:3,/vmlinux root=/dev/hda3 ro
+</example>
+
+
+<chapt>Yaboot as a Temporary Bootloader
+<p>
+It's very convenient for certain tasks like installing a new system
+the first time without a CD, or rescuing an existing system, to boot a
+ramdisk system such as an installer directly from files placed on an
+existing partition.
+
+<p>
+
+An example is the Debian installer. It is contained in a floppy-image
+root.bin file which <prgn>yaboot</prgn> can boot directly. A simple
+<file>yaboot.conf</file> to initialize the ramdisk, yaboot, root.bin, and a
+kernel image (named linux in this example) are all that is needed. All files
+are placed at the root level on an existing partition.
+
+<p>
+
+The <file>yaboot.conf</file> file for this purpose contains just
+four lines:
+<example>
+ image=linux
+ label=install
+ initrd=root.bin
+ initrd-size=8192
+</example>
+<p>
+
+If you create <file>yaboot.conf</file> in the MacOS, you must convert
+it to use Unix newlines (linefeeds only). If you use MacOS newlines
+(just carriage returns), <prgn>yaboot</prgn> will be unable to read the file.
+
+<p>
+You must pick a partition that is formatted with either HFS or HFS+. If
+you have Mac OS X installed on a UFS partition (You can use the OS X "Disk
+Utility" app to check this), you will have to find another partition to use.
+If Mac OS X is installed on UFS, you probably have one or two partitions
+of the "Apple_Boot" type. They have HFS filesystems on them. Pick one,
+mount it under MacOS X, and store the files there.
+
+<p>
+Boot into OpenFirmware, and type at the prompt:
+<example>
+ 0 > boot hd:xx,yaboot
+</example>
+
+replacing xx with the partition number of the partition where the
+kernel and <prgn>yaboot</prgn> files were placed, followed by a return. At the
+boot: prompt, type <em>install</em> followed by a return.
+
+
+<chapt>For More Information
+<p>
+
+Where's home?
+<list>
+<item> <url id="http://penguinppc.org/projects/yaboot/" name="Yaboot Home">
+</list>
+
+<p>
+
+How do I install Debian?
+<list>
+<item> <url id="http://www.debian.org/releases/woody/powerpc/install"
+ name="Installing Debian GNU/Linux 3.0 For PowerPC">
+</list>
+
+<p>
+
+What's Open Firmware?
+<list>
+<item> <url id="http://developer.apple.com/technotes/tn/tn1044.html">
+<item> <url id="http://developer.apple.com/technotes/tn/tn1061.html">
+<item> <url id="http://developer.apple.com/technotes/tn/tn1062.html">
+<item> <url id="http://developer.apple.com/technotes/tn/tn1167.html">
+</list>
+
+
+</chapt>
+ </book>
+</debiandoc>
+
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-namecase-general:t
+sgml-general-insert-case:lower
+sgml-minimize-attributes:max
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:nil
+sgml-parent-document:nil
+sgml-declaration:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
Added: trunk/yaboot/etc/yaboot.conf
===================================================================
--- trunk/yaboot/etc/yaboot.conf 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/etc/yaboot.conf 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,81 @@
+## Example yaboot.conf for ybin and yaboot >= 0.6
+## see man yaboot.conf for more details.
+
+## Change `unconfigured' to your bootstrap partition eg: /dev/hda2
+boot=unconfigured
+
+## device is the OpenFirmware device path to the disk containing
+## kernel images. if your disk is /dev/hda you can find the
+## OpenFirmware path by running the command: ofpath /dev/hda DO NOT
+## specify a partition number for this! On IBM hardware you can
+## generally comment this out.
+
+device=hd:
+
+## partition is the partition number where the kernel images are
+## located. The kernel images should be on your root filesystem, so
+## this is usually the same partition number as your root filesystem.
+## so if root = /dev/hda3 (the 3rd partition) then you should have
+## partition=3 This *MUST* be set correct or yaboot won't boot! This
+## option can be either set globally as shown here, or per image in
+## the image= sections
+
+partition=3
+
+## delay is the amount of time in seconds the dual boot menu (if one
+## is configured, by the presense of macos, macosx, etc options here)
+## will wait before choosing the default OS (GNU/Linux or the value of
+## defaultos=). If you omit this then the value of timeout=
+## (converted to seconds) will be used.
+
+delay=10
+
+## timeout is the amount of time in tenths of a second that yaboot
+## will wait before booting the default kernel image (the first image=
+## section in this config file or the value of default=).
+
+timeout=40
+install=/usr/local/lib/yaboot/yaboot
+magicboot=/usr/local/lib/yaboot/ofboot
+
+## Change the default colors, fgcolor is the text color, bgcolor is
+## the screen background color. (default: fgcolor=white, bgcolor=black)
+#fgcolor=black
+#bgcolor=green
+
+## Password supplied in plaintext, required for yaboot to boot, unless
+## restricted is also present (see below). Be sure to
+## chmod 600 /etc/yaboot.conf if you set this!
+
+#password=secret
+
+## Password supplied as an md5 hash, see above
+
+#password=$1$saltstrg$HnJ/gcM3oKhNbnzUPgXTD/
+
+## A password is only required to boot an image specified here if
+## parameters are specified on the command line or if the user enters
+## an image is not specified in the configuration file at all (ie.
+## arbitrary file load). restricted can also be placed in an image
+## section in that case any image not including the restricted keyword
+## will be fully password protected.
+
+#restricted
+
+## image is the kernel itself, commonly kept in / but also commonly
+## found in /boot. Note that /boot should generally not be its own
+## partition on powerpcs, its not necessary and complicates things.
+## Make sure /boot is on the partition specified by partition= see
+## above. /boot should never be an HFS filesystem. You may point
+## image= to a symbolic link so long as the symlink does not cross
+## partition boundries.
+
+image=/vmlinux
+ label=Linux
+ root=/dev/hda3
+ read-only
+
+image=/vmlinux.old
+ label=Linux.old
+ root=/dev/hda3
+ read-only
Added: trunk/yaboot/first/ofboot
===================================================================
--- trunk/yaboot/first/ofboot 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/first/ofboot 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,359 @@
+#%ybinscript-1.1
+
+## THIS IS NOT A CONFFILE DO NOT EDIT !!!
+
+###############################################################################
+##
+## ofboot first stage autoconfiguring bootloader for yaboot and ybin
+## Copyright (C) 2000, 2001, 2002, 2003 Ethan Benson
+##
+## Forth code written by Chris Emerson
+##
+## Copyright (C) 2000, 2001 Chris Emerson
+##
+## Portions of Forth code also written by iNOUE Koich!
+##
+## Copyright (C) 2000, 2001 iNOUE Koich!
+##
+## 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.
+##
+###############################################################################
+
+## THIS IS NOT A CONFFILE DO NOT EDIT !!!
+##
+## This script is not meant to be called directly, only by ybin.
+##
+## Usage: OS-count defaultos timeout fgc bgc osname oslabel oskey osdev osfile ...
+
+DEBUG=0
+PRG=ofboot
+
+## make sure we are called at least somewhat sanely.
+if [ $# = 0 ] ; then
+ echo 1>&2 "$PRG: Need arguments"
+ exit 1
+fi
+
+if [ $# != "$(($1 * 5 + 5))" ] ; then
+ echo 1>&2 "$PRG: Invalid argument count: $# should be $(($1 * 5 + 5))"
+ exit 1
+fi
+
+if [ "$1" -gt 8 ] ; then
+ echo 1>&2 "$PRG: Maximum number of OSes is currently 8"
+ exit 1
+fi
+
+## we need printf so \n works, but echo -e -n will sometimes do.
+if [ "$(printf printf_test 2>/dev/null)" = printf_test ] ; then
+ PRINTF=printf
+else
+ PRINTF="echo -e -n"
+fi
+
+## make sure echo is not lame if we must use it.
+if [ "$PRINTF" != printf ] ; then
+ if [ "$(echo -e -n echo_test)" != echo_test ] ; then
+ echo 1>&2 "$PRG: printf unavailable and echo is broken, sorry."
+ exit 1
+ fi
+fi
+
+## get first 5 args which are global and dispose of them.
+OSNUM="$1"
+DEFAULTOS="$2"
+TIMEOUT="$3"
+FGCOLOR="$4"
+BGCOLOR="$5"
+shift 5
+
+## is a boot menu actually needed?
+if [ "$OSNUM" = 1 ] ; then
+ MENU=0
+else
+ MENU=1
+fi
+
+## create the variables.
+##
+## OSNAME="$1"
+## OSLABEL="$2"
+## OSKEY="$3"
+## OSDEV="$4"
+## OSFILE="$5"
+
+COUNT=1
+while [ "$COUNT" -le "$OSNUM" ] ; do
+ case "$COUNT" in
+ 1)
+ OSNAME1="$1"
+ [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file1: $5\n"
+ [ "$COUNT" = "$OSNUM" ] && c="."
+ BTYA=": boot$1 \" Loading second stage bootstrap...\" .printf 100 ms load-base release-load-area \" ${4}${5}\" \$boot ;"
+ MENUYA="\" Press $3 for GNU/Linux${c-,}\"(0d 0a)\" .printf"
+ GETYA=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof"
+ shift 5
+ COUNT="$(($COUNT + 1))"
+ ;;
+ 2)
+ [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file2: $5\n"
+ [ "$COUNT" = "$OSNUM" ] && c="."
+ [ "$4" = "quit" ] && BOOT=quit
+ [ "$1" = "ybsd" ] && BOOT="load-base release-load-area \" ${4}${5%/*} ${5##*/},/bsd\" \$boot"
+ [ "$1" != ybsd -a "$4" != quit ] && BOOT="load-base release-load-area \" ${4}${5}\" \$boot"
+ BT2=": boot$1 \" Booting $2...\" .printf 100 ms $BOOT ;"
+ MENU2="\" $3 for $2${c-,}\"(0d 0a)\" .printf"
+ GET2=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof"
+ shift 5
+ COUNT="$(($COUNT + 1))"
+ ;;
+ 3)
+ [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file3: $5\n"
+ [ "$COUNT" = "$OSNUM" ] && c="."
+ [ "$4" = "quit" ] && BOOT=quit
+ [ "$1" = "ybsd" ] && BOOT="load-base release-load-area \" ${4}${5%/*} ${5##*/},/bsd\" \$boot"
+ [ "$1" != ybsd -a "$4" != quit ] && BOOT="load-base release-load-area \" ${4}${5}\" \$boot"
+ BT3=": boot$1 \" Booting $2...\" .printf 100 ms $BOOT ;"
+ MENU3="\" $3 for $2${c-,}\"(0d 0a)\" .printf"
+ GET3=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof"
+ shift 5
+ COUNT="$(($COUNT + 1))"
+ ;;
+ 4)
+ [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file4: $5\n"
+ [ "$COUNT" = "$OSNUM" ] && c="."
+ [ "$4" = "quit" ] && BOOT=quit
+ [ "$1" = "ybsd" ] && BOOT="load-base release-load-area \" ${4}${5%/*} ${5##*/},/bsd\" \$boot"
+ [ "$1" != ybsd -a "$4" != quit ] && BOOT="load-base release-load-area \" ${4}${5}\" \$boot"
+ BT4=": boot$1 \" Booting $2...\" .printf 100 ms $BOOT ;"
+ MENU4="\" $3 for $2${c-,}\"(0d 0a)\" .printf"
+ GET4=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof"
+ shift 5
+ COUNT="$(($COUNT + 1))"
+ ;;
+ 5)
+ [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file5: $5\n"
+ [ "$COUNT" = "$OSNUM" ] && c="."
+ [ "$4" = "quit" ] && BOOT=quit
+ [ "$1" = "ybsd" ] && BOOT="load-base release-load-area \" ${4}${5%/*} ${5##*/},/bsd\" \$boot"
+ [ "$1" != ybsd -a "$4" != quit ] && BOOT="load-base release-load-area \" ${4}${5}\" \$boot"
+ BT5=": boot$1 \" Booting $2...\" .printf 100 ms $BOOT ;"
+ MENU5="\" $3 for $2${c-,}\"(0d 0a)\" .printf"
+ GET5=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof"
+ shift 5
+ COUNT="$(($COUNT + 1))"
+ ;;
+ 6)
+ [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file6: $5\n"
+ [ "$COUNT" = "$OSNUM" ] && c="."
+ [ "$4" = "quit" ] && BOOT=quit
+ [ "$1" = "ybsd" ] && BOOT="load-base release-load-area \" ${4}${5%/*} ${5##*/},/bsd\" \$boot"
+ [ "$1" != ybsd -a "$4" != quit ] && BOOT="load-base release-load-area \" ${4}${5}\" \$boot"
+ BT6=": boot$1 \" Booting $2...\" .printf 100 ms $BOOT ;"
+ MENU6="\" $3 for $2${c-,}\"(0d 0a)\" .printf"
+ GET6=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof"
+ shift 5
+ COUNT="$(($COUNT + 1))"
+ ;;
+ 7)
+ [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file7: $5\n"
+ [ "$COUNT" = "$OSNUM" ] && c="."
+ [ "$4" = "quit" ] && BOOT=quit
+ [ "$1" = "ybsd" ] && BOOT="load-base release-load-area \" ${4}${5%/*} ${5##*/},/bsd\" \$boot"
+ [ "$1" != ybsd -a "$4" != quit ] && BOOT="load-base release-load-area \" ${4}${5}\" \$boot"
+ BT7=": boot$1 \" Booting $2...\" .printf 100 ms $BOOT ;"
+ MENU7="\" $3 for $2${c-,}\"(0d 0a)\" .printf"
+ GET7=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof"
+ shift 5
+ COUNT="$(($COUNT + 1))"
+ ;;
+ 8)
+ [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file8: $5\n"
+ [ "$COUNT" = "$OSNUM" ] && c="."
+ [ "$4" = "quit" ] && BOOT=quit
+ [ "$1" = "ybsd" ] && BOOT="load-base release-load-area \" ${4}${5%/*} ${5##*/},/bsd\" \$boot"
+ [ "$1" != ybsd -a "$4" != quit ] && BOOT="load-base release-load-area \" ${4}${5}\" \$boot"
+ BT8=": boot$1 \" Booting $2...\" .printf 100 ms $BOOT ;"
+ MENU8="\" $3 for $2${c-,}\"(0d 0a)\" .printf"
+ GET8=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof"
+ shift 5
+ COUNT="$(($COUNT + 1))"
+ ;;
+ esac
+done
+
+## first OS is reserved.
+if [ "$OSNAME1" != yaboot ] ; then
+ echo 1>&2 "ofboot: first OS must be yaboot"
+ exit 1
+fi
+
+## concatenate the variables together.
+case "$OSNUM" in
+ 1)
+ BOOTVARS="${BTYA}"
+ MENUOPTS="${MENUYA}"
+ GETOS="${GETYA}"
+ ;;
+ 2)
+ BOOTVARS="${BTYA}\n${BT2}"
+ MENUOPTS="${MENUYA}\n${MENU2}"
+ GETOS="${GETYA}\n${GET2}"
+ ;;
+ 3)
+ BOOTVARS="${BTYA}\n${BT2}\n${BT3}"
+ MENUOPTS="${MENUYA}\n${MENU2}\n${MENU3}"
+ GETOS="${GETYA}\n${GET2}\n${GET3}"
+ ;;
+ 4)
+ BOOTVARS="${BTYA}\n${BT2}\n${BT3}\n${BT4}"
+ MENUOPTS="${MENUYA}\n${MENU2}\n${MENU3}\n${MENU4}"
+ GETOS="${GETYA}\n${GET2}\n${GET3}\n${GET4}"
+ ;;
+ 5)
+ BOOTVARS="${BTYA}\n${BT2}\n${BT3}\n${BT4}\n${BT5}"
+ MENUOPTS="${MENUYA}\n${MENU2}\n${MENU3}\n${MENU4}\n${MENU5}"
+ GETOS="${GETYA}\n${GET2}\n${GET3}\n${GET4}\n${GET5}"
+ ;;
+ 6)
+ BOOTVARS="${BTYA}\n${BT2}\n${BT3}\n${BT4}\n${BT5}\n${BT6}"
+ MENUOPTS="${MENUYA}\n${MENU2}\n${MENU3}\n${MENU4}\n${MENU5}\n${MENU6}"
+ GETOS="${GETYA}\n${GET2}\n${GET3}\n${GET4}\n${GET5}\n${GET6}"
+ ;;
+ 7)
+ BOOTVARS="${BTYA}\n${BT2}\n${BT3}\n${BT4}\n${BT5}\n${BT6}\n${BT7}"
+ MENUOPTS="${MENUYA}\n${MENU2}\n${MENU3}\n${MENU4}\n${MENU5}\n${MENU6}\n${MENU7}"
+ GETOS="${GETYA}\n${GET2}\n${GET3}\n${GET4}\n${GET5}\n${GET6}\n${GET7}"
+ ;;
+ 8)
+ BOOTVARS="${BTYA}\n${BT2}\n${BT3}\n${BT4}\n${BT5}\n${BT6}\n${BT7}\n${BT8}"
+ MENUOPTS="${MENUYA}\n${MENU2}\n${MENU3}\n${MENU4}\n${MENU5}\n${MENU6}\n${MENU7}\n${MENU8}"
+ GETOS="${GETYA}\n${GET2}\n${GET3}\n${GET4}\n${GET5}\n${GET6}\n${GET7}\n${GET8}"
+ ;;
+esac
+
+if [ -n "$YBINOFICON" -a -f "$YBINOFICON" -a -r "$YBINOFICON" ] ; then
+ OFBOOTICON="$(cat "$YBINOFICON")"
+else
+ OFBOOTICON="<OS-BADGE-ICONS>
+1010
+000000000000F8FEACF6000000000000
+0000000000F5FFFFFEFEF50000000000
+00000000002BFAFEFAFCF70000000000
+0000000000F65D5857812B0000000000
+0000000000F5350B2F88560000000000
+0000000000F6335708F8FE0000000000
+00000000005600F600F5FD8100000000
+00000000F9F8000000F5FAFFF8000000
+000000008100F5F50000F6FEFE000000
+000000F8F700F500F50000FCFFF70000
+00000088F70000F50000F5FCFF2B0000
+0000002F582A00F5000008ADE02C0000
+00090B0A35A62B0000002D3B350A0000
+000A0A0B0B3BF60000505E0B0A0B0A00
+002E350B0B2F87FAFCF45F0B2E090000
+00000007335FF82BF72B575907000000
+000000000000ACFFFF81000000000000
+000000000081FFFFFFFF810000000000
+0000000000FBFFFFFFFFAC0000000000
+000000000081DFDFDFFFFB0000000000
+000000000081DD5F83FFFD0000000000
+000000000081DDDF5EACFF0000000000
+0000000000FDF981F981FFFF00000000
+00000000FFACF9F9F981FFFFAC000000
+00000000FFF98181F9F981FFFF000000
+000000ACACF981F981F9F9FFFFAC0000
+000000FFACF9F981F9F981FFFFFB0000
+00000083DFFBF981F9F95EFFFFFC0000
+005F5F5FDDFFFBF9F9F983DDDD5F0000
+005F5F5F5FDD81F9F9E7DF5F5F5F5F00
+0083DD5F5F83FFFFFFFFDF5F835F0000
+000000FBDDDFACFBACFBDFDFFB000000
+000000000000FFFFFFFF000000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFFFF00000000
+00000000FFFFFFFFFFFFFFFFFF000000
+00000000FFFFFFFFFFFFFFFFFF000000
+000000FFFFFFFFFFFFFFFFFFFFFF0000
+000000FFFFFFFFFFFFFFFFFFFFFF0000
+000000FFFFFFFFFFFFFFFFFFFFFF0000
+00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
+00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00
+00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
+000000FFFFFFFFFFFFFFFFFFFF000000
+</OS-BADGE-ICONS>"
+fi
+
+## create tmp files safely.
+TMP="${TMPDIR:-/tmp}"
+TMPBOOT=`mktemp -q "$TMP/ofboot.XXXXXX"`
+ if [ $? != 0 ] ; then
+ echo 1>&2 "Cannot create temp file, aborting."
+ exit 1
+ fi
+
+## create the real script
+$PRINTF \
+"<CHRP-BOOT>
+<COMPATIBLE>
+MacRISC MacRISC3 MacRISC4
+</COMPATIBLE>
+<DESCRIPTION>
+PowerPC GNU/Linux First Stage Bootstrap
+</DESCRIPTION>
+<BOOT-SCRIPT>
+: .printf fb8-write drop ;
+$BOOTVARS
+\" screen\" output
+variable interactive
+$MENU interactive !
+
+0 interactive @ = if
+ bootyaboot
+then
+
+dev screen
+\" \"(0000000000aa00aa0000aaaaaa0000aa00aaaa5500aaaaaa)\" drop 0 7 set-colors
+\" \"(5555555555ff55ff5555ffffff5555ff55ffffff55ffffff)\" drop 8 15 set-colors
+device-end
+$FGCOLOR to foreground-color
+$BGCOLOR to background-color
+\" \"(0C)\" .printf
+
+\" First Stage GNU/Linux Bootstrap\"(0d 0a)\" .printf
+\" \"(0d 0a)\" .printf
+$MENUOPTS
+\" \"(0d 0a)\" .printf
+\" Stage 1 Boot: \" .printf
+get-msecs d# $TIMEOUT 3E8 * +
+begin
+ key? if
+ key case
+$GETOS
+ endcase
+ then
+ dup get-msecs <
+until
+drop
+\" \"(0d 0a)\" .printf $DEFAULTOS
+</BOOT-SCRIPT>
+$OFBOOTICON
+</CHRP-BOOT>\n" > "$TMPBOOT"
+
+echo "$TMPBOOT"
Added: trunk/yaboot/include/asm/elf.h
===================================================================
--- trunk/yaboot/include/asm/elf.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/asm/elf.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,57 @@
+#ifndef __PPC_ELF_H
+#define __PPC_ELF_H
+
+#define ELF_NGREG 48 /* includes nip, msr, lr, etc. */
+#define ELF_NFPREG 33 /* includes fpscr */
+
+/*
+ * This is used to ensure we don't load something for the wrong architecture.
+ */
+#define elf_check_arch(x) ((x) == EM_PPC)
+
+/*
+ * These are used to set parameters in the core dumps.
+ */
+#define ELF_ARCH EM_PPC
+#define ELF_CLASS ELFCLASS32
+#define ELF_DATA ELFDATA2MSB
+
+#define USE_ELF_CORE_DUMP
+#define ELF_EXEC_PAGESIZE 4096
+
+/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
+ use of this is to invoke "./ld.so someprog" to test out a new version of
+ the loader. We need to make sure that it is out of the way of the program
+ that it will "exec", and that there is sufficient room for the brk. */
+
+#define ELF_ET_DYN_BASE (0x08000000)
+
+typedef unsigned long elf_greg_t;
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+typedef double elf_fpreg_t;
+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+
+#define ELF_CORE_COPY_REGS(gregs, regs) \
+ memcpy(gregs, regs, \
+ sizeof(struct pt_regs) < sizeof(elf_gregset_t)? \
+ sizeof(struct pt_regs): sizeof(elf_gregset_t));
+
+
+/* This yields a mask that user programs can use to figure out what
+ instruction set this cpu supports. This could be done in userspace,
+ but it's not easy, and we've already done it here. */
+
+#define ELF_HWCAP (0)
+
+/* This yields a string that ld.so will use to load implementation
+ specific libraries for optimization. This is more specific in
+ intent than poking at uname or /proc/cpuinfo.
+
+ For the moment, we have only optimizations for the Intel generations,
+ but that could change... */
+
+#define ELF_PLATFORM (NULL)
+
+
+#endif
Added: trunk/yaboot/include/asm/ppc_asm.tmpl
===================================================================
--- trunk/yaboot/include/asm/ppc_asm.tmpl 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/asm/ppc_asm.tmpl 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,66 @@
+/* Register names */
+#define r0 0
+#define r1 1
+#define r2 2
+#define r3 3
+#define r4 4
+#define r5 5
+#define r6 6
+#define r7 7
+#define r8 8
+#define r9 9
+#define r10 10
+#define r11 11
+#define r12 12
+#define r13 13
+#define r14 14
+#define r15 15
+#define r16 16
+#define r17 17
+#define r18 18
+#define r19 19
+#define r20 20
+#define r21 21
+#define r22 22
+#define r23 23
+#define r24 24
+#define r25 25
+#define r26 26
+#define r27 27
+#define r28 28
+#define r29 29
+#define r30 30
+#define r31 31
+
+#define fr0 0
+#define fr1 1
+#define fr2 2
+#define fr3 3
+#define fr4 4
+#define fr5 5
+#define fr6 6
+#define fr7 7
+#define fr8 8
+#define fr9 9
+#define fr10 10
+#define fr11 11
+#define fr12 12
+#define fr13 13
+#define fr14 14
+#define fr15 15
+#define fr16 16
+#define fr17 17
+#define fr18 18
+#define fr19 19
+#define fr20 20
+#define fr21 21
+#define fr22 22
+#define fr23 23
+#define fr24 24
+#define fr25 25
+#define fr26 26
+#define fr27 27
+#define fr28 28
+#define fr29 29
+#define fr30 30
+#define fr31 31
Added: trunk/yaboot/include/asm/processor.h
===================================================================
--- trunk/yaboot/include/asm/processor.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/asm/processor.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,142 @@
+#ifndef __ASM_PPC_PROCESSOR_H
+#define __ASM_PPC_PROCESSOR_H
+
+/* Bit encodings for Machine State Register (MSR) */
+#define MSR_POW (1<<18) /* Enable Power Management */
+#define MSR_TGPR (1<<17) /* TLB Update registers in use */
+#define MSR_ILE (1<<16) /* Interrupt Little-Endian enable */
+#define MSR_EE (1<<15) /* External Interrupt enable */
+#define MSR_PR (1<<14) /* Supervisor/User privilege */
+#define MSR_FP (1<<13) /* Floating Point enable */
+#define MSR_ME (1<<12) /* Machine Check enable */
+#define MSR_FE0 (1<<11) /* Floating Exception mode 0 */
+#define MSR_SE (1<<10) /* Single Step */
+#define MSR_BE (1<<9) /* Branch Trace */
+#define MSR_FE1 (1<<8) /* Floating Exception mode 1 */
+#define MSR_IP (1<<6) /* Exception prefix 0x000/0xFFF */
+#define MSR_IR (1<<5) /* Instruction MMU enable */
+#define MSR_DR (1<<4) /* Data MMU enable */
+#define MSR_RI (1<<1) /* Recoverable Exception */
+#define MSR_LE (1<<0) /* Little-Endian enable */
+
+/* Bit encodings for Hardware Implementation Register (HID0)
+ on PowerPC 603, 604, etc. processors (not 601). */
+#define HID0_EMCP (1<<31) /* Enable Machine Check pin */
+#define HID0_EBA (1<<29) /* Enable Bus Address Parity */
+#define HID0_EBD (1<<28) /* Enable Bus Data Parity */
+#define HID0_SBCLK (1<<27)
+#define HID0_EICE (1<<26)
+#define HID0_ECLK (1<<25)
+#define HID0_PAR (1<<24)
+#define HID0_DOZE (1<<23)
+#define HID0_NAP (1<<22)
+#define HID0_SLEEP (1<<21)
+#define HID0_DPM (1<<20)
+#define HID0_ICE (1<<15) /* Instruction Cache Enable */
+#define HID0_DCE (1<<14) /* Data Cache Enable */
+#define HID0_ILOCK (1<<13) /* Instruction Cache Lock */
+#define HID0_DLOCK (1<<12) /* Data Cache Lock */
+#define HID0_ICFI (1<<11) /* Instruction Cache Flash Invalidate */
+#define HID0_DCI (1<<10) /* Data Cache Invalidate */
+#define HID0_SPD (1<<9) /* Speculative disable */
+#define HID0_SIED (1<<7) /* Serial Instruction Execution [Disable] */
+#define HID0_BHTE (1<<2) /* Branch History Table Enable */
+#define HID0_BTCD (1<<1) /* Branch target cache disable */
+
+/* fpscr settings */
+#define FPSCR_FX (1<<31)
+#define FPSCR_FEX (1<<30)
+
+#define _GLOBAL(n)\
+ .globl n;\
+n:
+
+#define TBRU 269 /* Time base Upper/Lower (Reading) */
+#define TBRL 268
+#define TBWU 284 /* Time base Upper/Lower (Writing) */
+#define TBWL 285
+#define XER 1
+#define LR 8
+#define CTR 9
+#define HID0 1008 /* Hardware Implementation */
+#define PVR 287 /* Processor Version */
+#define IBAT0U 528 /* Instruction BAT #0 Upper/Lower */
+#define IBAT0L 529
+#define IBAT1U 530 /* Instruction BAT #1 Upper/Lower */
+#define IBAT1L 531
+#define IBAT2U 532 /* Instruction BAT #2 Upper/Lower */
+#define IBAT2L 533
+#define IBAT3U 534 /* Instruction BAT #3 Upper/Lower */
+#define IBAT3L 535
+#define DBAT0U 536 /* Data BAT #0 Upper/Lower */
+#define DBAT0L 537
+#define DBAT1U 538 /* Data BAT #1 Upper/Lower */
+#define DBAT1L 539
+#define DBAT2U 540 /* Data BAT #2 Upper/Lower */
+#define DBAT2L 541
+#define DBAT3U 542 /* Data BAT #3 Upper/Lower */
+#define DBAT3L 543
+#define DMISS 976 /* TLB Lookup/Refresh registers */
+#define DCMP 977
+#define HASH1 978
+#define HASH2 979
+#define IMISS 980
+#define ICMP 981
+#define RPA 982
+#define SDR1 25 /* MMU hash base register */
+#define DAR 19 /* Data Address Register */
+#define SPR0 272 /* Supervisor Private Registers */
+#define SPRG0 272
+#define SPR1 273
+#define SPRG1 273
+#define SPR2 274
+#define SPRG2 274
+#define SPR3 275
+#define SPRG3 275
+#define DSISR 18
+#define SRR0 26 /* Saved Registers (exception) */
+#define SRR1 27
+#define IABR 1010 /* Instruction Address Breakpoint */
+#define DEC 22 /* Decrementer */
+#define EAR 282 /* External Address Register */
+#define L2CR 1017 /* PPC 750 L2 control register */
+
+#define THRM1 1020
+#define THRM2 1021
+#define THRM3 1022
+#define THRM1_TIN 0x1
+#define THRM1_TIV 0x2
+#define THRM1_THRES (0x7f<<2)
+#define THRM1_TID (1<<29)
+#define THRM1_TIE (1<<30)
+#define THRM1_V (1<<31)
+#define THRM3_E (1<<31)
+
+/* Segment Registers */
+#define SR0 0
+#define SR1 1
+#define SR2 2
+#define SR3 3
+#define SR4 4
+#define SR5 5
+#define SR6 6
+#define SR7 7
+#define SR8 8
+#define SR9 9
+#define SR10 10
+#define SR11 11
+#define SR12 12
+#define SR13 13
+#define SR14 14
+#define SR15 15
+
+#ifndef __ASSEMBLY__
+static __inline__ unsigned long mfmsr(void)
+{
+ unsigned long msr;
+ __asm__ __volatile__("mfmsr %0" : "=r" (msr));
+ return msr;
+}
+#endif
+
+#endif /* __ASM_PPC_PROCESSOR_H */
Added: trunk/yaboot/include/bootinfo.h
===================================================================
--- trunk/yaboot/include/bootinfo.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/bootinfo.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,59 @@
+/*
+ * bootinfo.h - Non-machine dependent bootinfo structure. Basic idea from m68k
+ *
+ * Copyright (C) 1999 Cort Dougan <cort at ppc.kernel.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.
+ */
+
+#ifndef _PPC_BOOTINFO_H
+#define _PPC_BOOTINFO_H
+
+#define _MACH_prep 0x00000001
+#define _MACH_Pmac 0x00000002 /* pmac or pmac clone (non-chrp) */
+#define _MACH_chrp 0x00000004 /* chrp machine */
+#define _MACH_mbx 0x00000008 /* Motorola MBX board */
+#define _MACH_apus 0x00000010 /* amiga with phase5 powerup */
+#define _MACH_fads 0x00000020 /* Motorola FADS board */
+#define _MACH_rpxlite 0x00000040 /* RPCG RPX-Lite 8xx board */
+#define _MACH_bseip 0x00000080 /* Bright Star Engineering ip-Engine */
+#define _MACH_yk 0x00000100 /* Motorola Yellowknife */
+#define _MACH_gemini 0x00000200 /* Synergy Microsystems gemini board */
+#define _MACH_classic 0x00000400 /* RPCG RPX-Classic 8xx board */
+#define _MACH_oak 0x00000800 /* IBM "Oak" 403 eval. board */
+#define _MACH_walnut 0x00001000 /* IBM "Walnut" 405GP eval. board */
+
+struct bi_record {
+ unsigned long tag; /* tag ID */
+ unsigned long size; /* size of record (in bytes) */
+ unsigned long data[0]; /* data */
+};
+
+#define BI_FIRST 0x1010 /* first record - marker */
+#define BI_LAST 0x1011 /* last record - marker */
+#define BI_CMD_LINE 0x1012
+#define BI_BOOTLOADER_ID 0x1013
+#define BI_INITRD 0x1014
+#define BI_SYSMAP 0x1015
+#define BI_MACHTYPE 0x1016
+
+#endif /* _PPC_BOOTINFO_H */
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 5
+ * End:
+ */
Added: trunk/yaboot/include/byteorder.h
===================================================================
--- trunk/yaboot/include/byteorder.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/byteorder.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,13 @@
+#ifndef _BYTEORDER_H_
+#define _BYTEORDER_H_
+
+#include "swab.h"
+
+# define le64_to_cpu(x) swab64((x))
+# define cpu_to_le64(x) swab64((x))
+# define le32_to_cpu(x) swab32((x))
+# define cpu_to_le32(x) swab32((x))
+# define le16_to_cpu(x) swab16((x))
+# define cpu_to_le16(x) swab16((x))
+
+#endif /* _BYTEORDER_H_ */
Added: trunk/yaboot/include/cfg.h
===================================================================
--- trunk/yaboot/include/cfg.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/cfg.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,32 @@
+/*
+ * cfg.h - config file parsing definitions
+ *
+ * Copyright (C) 1999 Benjamin Herrenschmidt
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CFG_H
+#define CFG_H
+
+#include "types.h"
+
+extern int cfg_parse(char *cfg_file, char *buff, int len);
+extern char* cfg_get_strg(char *image, char *item);
+extern int cfg_get_flag(char *image, char *item);
+extern void cfg_print_images(void);
+extern char* cfg_get_default(void);
+
+#endif
Added: trunk/yaboot/include/cmdline.h
===================================================================
--- trunk/yaboot/include/cmdline.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/cmdline.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,33 @@
+/*
+ * cmdline.h - Prompt handling
+ *
+ * Copyright (C) 2001 Ethan Benson
+ *
+ * Copyright (C) 1999 Benjamin Herrenschmidt
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CMDLINE_H
+#define CMDLINE_H
+
+#include "types.h"
+
+extern void cmdinit();
+extern void cmdedit(void (*tabfunc) (void), int password);
+
+extern char cbuff[];
+extern char passwdbuff[];
+#endif
Added: trunk/yaboot/include/ctype.h
===================================================================
--- trunk/yaboot/include/ctype.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/ctype.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,61 @@
+#ifndef _LINUX_CTYPE_H
+#define _LINUX_CTYPE_H
+
+/*
+ * NOTE! This ctype does not handle EOF like the standard C
+ * library is required to.
+ */
+
+#define _U 0x01 /* upper */
+#define _L 0x02 /* lower */
+#define _D 0x04 /* digit */
+#define _C 0x08 /* cntrl */
+#define _P 0x10 /* punct */
+#define _S 0x20 /* white space (space/lf/tab) */
+#define _X 0x40 /* hex digit */
+#define _SP 0x80 /* hard space (0x20) */
+
+extern unsigned char _ctype[];
+
+#define __ismask(x) (_ctype[(int)(unsigned char)(x)])
+
+#define isalnum(c) ((__ismask(c)&(_U|_L|_D)) != 0)
+#define isalpha(c) ((__ismask(c)&(_U|_L)) != 0)
+#define iscntrl(c) ((__ismask(c)&(_C)) != 0)
+#define isdigit(c) ((__ismask(c)&(_D)) != 0)
+#define isgraph(c) ((__ismask(c)&(_P|_U|_L|_D)) != 0)
+#define islower(c) ((__ismask(c)&(_L)) != 0)
+#define isprint(c) ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0)
+#define ispunct(c) ((__ismask(c)&(_P)) != 0)
+#define isspace(c) ((__ismask(c)&(_S)) != 0)
+#define isupper(c) ((__ismask(c)&(_U)) != 0)
+#define isxdigit(c) ((__ismask(c)&(_D|_X)) != 0)
+
+#define isascii(c) (((unsigned char)(c))<=0x7f)
+#define toascii(c) (((unsigned char)(c))&0x7f)
+
+static inline unsigned char __tolower(unsigned char c)
+{
+ if (isupper(c))
+ c -= 'A'-'a';
+ return c;
+}
+
+static inline unsigned char __toupper(unsigned char c)
+{
+ if (islower(c))
+ c -= 'a'-'A';
+ return c;
+}
+
+#define tolower(c) __tolower(c)
+#define toupper(c) __toupper(c)
+
+#endif
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 5
+ * End:
+ */
Added: trunk/yaboot/include/debug.h
===================================================================
--- trunk/yaboot/include/debug.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/debug.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,52 @@
+/*
+ * Debug defines
+ *
+ * Copyright (C) 2001 Ethan Benson
+ *
+ * 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.
+ */
+
+#if DEBUG
+# define DEBUG_ENTER prom_printf( "--> %s\n", __PRETTY_FUNCTION__ )
+# define DEBUG_LEAVE(str) \
+ prom_printf( "<-- %s - %s\n", __PRETTY_FUNCTION__, #str )
+# define DEBUG_LEAVE_F(args...)\
+{\
+ prom_printf( "<-- %s - %d\n", __PRETTY_FUNCTION__, ## args );\
+}
+# define DEBUG_F(fmt, args...)\
+{\
+ prom_printf( " %s - ", __PRETTY_FUNCTION__ );\
+ prom_printf( fmt, ## args );\
+}
+# define DEBUG_OPEN DEBUG_F( "dev=%s, part=0x%p (%d), file_name=%s\n",\
+ dev_name, part, part ? part->part_number : -1,\
+ file_name)
+# define DEBUG_SLEEP prom_sleep(3)
+#else
+#define DEBUG_ENTER
+#define DEBUG_LEAVE(x)
+#define DEBUG_LEAVE_F(args...)
+#define DEBUG_F(fmt, args...)
+#define DEBUG_OPEN
+#define DEBUG_SLEEP
+#endif
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 5
+ * End:
+ */
Added: trunk/yaboot/include/errors.h
===================================================================
--- trunk/yaboot/include/errors.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/errors.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,40 @@
+/*
+ * errors.h - Definitions of error numbers returned by filesystems
+ *
+ * Copyright (C) 2001 Ethan Benson
+ *
+ * Copyright (C) 1999 Benjamin Herrenschmidt
+ *
+ * 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.
+ */
+
+/* Simple error codes */
+#define FILE_ERR_OK 0
+#define FILE_ERR_EOF -1
+#define FILE_ERR_NOTFOUND -2
+#define FILE_CANT_SEEK -3
+#define FILE_IOERR -4
+#define FILE_BAD_PATH -5
+#define FILE_ERR_BAD_TYPE -6
+#define FILE_ERR_NOTDIR -7
+#define FILE_ERR_BAD_FSYS -8
+#define FILE_ERR_SYMLINK_LOOP -9
+#define FILE_ERR_LENGTH -10
+#define FILE_ERR_FSBUSY -11
+#define FILE_ERR_BADDEV -12
+
+/* Device kind */
+#define FILE_DEVICE_BLOCK 1
+#define FILE_DEVICE_NET 2
Added: trunk/yaboot/include/et/com_err.h
===================================================================
--- trunk/yaboot/include/et/com_err.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/et/com_err.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef __COM_ERR_H
+
+typedef long errcode_t;
+
+#ifdef __STDC__
+#include <stdarg.h>
+
+/* ANSI C -- use prototypes etc */
+void com_err (const char *, long, const char *, ...);
+void com_err_va (const char *whoami, errcode_t code, const char *fmt,
+ va_list args);
+char const *error_message (long);
+extern void (*com_err_hook) (const char *, long, const char *, va_list);
+void (*set_com_err_hook (void (*) (const char *, long, const char *, va_list)))
+ (const char *, long, const char *, va_list);
+void (*reset_com_err_hook (void)) (const char *, long, const char *, va_list);
+int init_error_table(const char * const *msgs, int base, int count);
+#else
+/* no prototypes */
+void com_err ();
+void com_err_va ();
+char *error_message ();
+extern void (*com_err_hook) ();
+void (*set_com_err_hook ()) ();
+void (*reset_com_err_hook ()) ();
+int init_error_table();
+#endif
+
+#define __COM_ERR_H
+#endif /* ! defined(__COM_ERR_H) */
Added: trunk/yaboot/include/ext2fs/bitops.h
===================================================================
--- trunk/yaboot/include/ext2fs/bitops.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/ext2fs/bitops.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,715 @@
+/*
+ * 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 Public
+ * License.
+ * %End-Header%
+ *
+ * i386 bitops operations taken from <asm/bitops.h>, Copyright 1992,
+ * Linus Torvalds.
+ */
+
+
+extern int ext2fs_set_bit(int nr,void * addr);
+extern int ext2fs_clear_bit(int nr, void * addr);
+extern int ext2fs_test_bit(int nr, const void * addr);
+extern __u16 ext2fs_swab16(__u16 val);
+extern __u32 ext2fs_swab32(__u32 val);
+
+/*
+ * 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);
+
+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_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 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);
+extern void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map);
+
+/*
+ * 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__) || defined(__mc68000__) || \
+ defined(__sparc__)))
+ /* 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
+#define _INLINE_ extern
+#else
+#ifdef __GNUC__
+#define _INLINE_ extern __inline__
+#else /* For Watcom C */
+#define _INLINE_ extern inline
+#endif
+#endif
+
+#if ((defined __GNUC__) && !defined(_EXT2_USE_C_VERSIONS_) && \
+ (defined(__i386__) || defined(__i486__) || defined(__i586__)))
+
+#define _EXT2_HAVE_ASM_BITOPS_
+#define _EXT2_HAVE_ASM_SWAB_
+#define _EXT2_HAVE_ASM_FINDBIT_
+
+/*
+ * 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(int nr, void * addr)
+{
+ int oldbit;
+
+ __asm__ __volatile__("btsl %2,%1\n\tsbbl %0,%0"
+ :"=r" (oldbit),"=m" (EXT2FS_ADDR)
+ :"r" (nr));
+ return oldbit;
+}
+
+_INLINE_ int ext2fs_clear_bit(int nr, void * addr)
+{
+ int oldbit;
+
+ __asm__ __volatile__("btrl %2,%1\n\tsbbl %0,%0"
+ :"=r" (oldbit),"=m" (EXT2FS_ADDR)
+ :"r" (nr));
+ return oldbit;
+}
+
+_INLINE_ int ext2fs_test_bit(int nr, const void * addr)
+{
+ int oldbit;
+
+ __asm__ __volatile__("btl %2,%1\n\tsbbl %0,%0"
+ :"=r" (oldbit)
+ :"m" (EXT2FS_CONST_ADDR),"r" (nr));
+ return oldbit;
+}
+
+#if 0
+_INLINE_ int ext2fs_find_first_bit_set(void * addr, unsigned size)
+{
+ int d0, d1, d2;
+ int res;
+
+ if (!size)
+ return 0;
+ /* This looks at memory. Mark it volatile to tell gcc not to move it around */
+ __asm__ __volatile__(
+ "cld\n\t"
+ "xorl %%eax,%%eax\n\t"
+ "xorl %%edx,%%edx\n\t"
+ "repe; scasl\n\t"
+ "je 1f\n\t"
+ "movl -4(%%edi),%%eax\n\t"
+ "subl $4,%%edi\n\t"
+ "bsfl %%eax,%%edx\n"
+ "1:\tsubl %%esi,%%edi\n\t"
+ "shll $3,%%edi\n\t"
+ "addl %%edi,%%edx"
+ :"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2)
+ :"1" ((size + 31) >> 5), "2" (addr), "S" (addr));
+ return res;
+}
+
+_INLINE_ int ext2fs_find_next_bit_set (void * addr, int size, int offset)
+{
+ unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
+ int set = 0, bit = offset & 31, res;
+
+ if (bit) {
+ /*
+ * Look for zero in first byte
+ */
+ __asm__("bsfl %1,%0\n\t"
+ "jne 1f\n\t"
+ "movl $32, %0\n"
+ "1:"
+ : "=r" (set)
+ : "r" (*p >> bit));
+ if (set < (32 - bit))
+ return set + offset;
+ set = 32 - bit;
+ p++;
+ }
+ /*
+ * No bit found yet, search remaining full bytes for a bit
+ */
+ res = ext2fs_find_first_bit_set(p, size - 32 * (p - (unsigned long *) addr));
+ return (offset + set + res);
+}
+#endif
+
+#ifdef EXT2FS_ENABLE_SWAPFS
+_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;
+}
+#endif
+
+#undef EXT2FS_ADDR
+
+#endif /* i386 */
+
+#ifdef __mc68000__
+
+#define _EXT2_HAVE_ASM_BITOPS_
+
+_INLINE_ int ext2fs_set_bit(int nr,void * addr)
+{
+ char retval;
+
+ __asm__ __volatile__ ("bfset %2@{%1:#1}; sne %0"
+ : "=d" (retval) : "d" (nr^7), "a" (addr));
+
+ return retval;
+}
+
+_INLINE_ int ext2fs_clear_bit(int nr, void * addr)
+{
+ char retval;
+
+ __asm__ __volatile__ ("bfclr %2@{%1:#1}; sne %0"
+ : "=d" (retval) : "d" (nr^7), "a" (addr));
+
+ return retval;
+}
+
+_INLINE_ int ext2fs_test_bit(int nr, const void * addr)
+{
+ char retval;
+
+ __asm__ __volatile__ ("bftst %2@{%1:#1}; sne %0"
+ : "=d" (retval) : "d" (nr^7), "a" (addr));
+
+ return retval;
+}
+
+#endif /* __mc68000__ */
+
+#ifdef __sparc__
+
+#define _EXT2_HAVE_ASM_BITOPS_
+
+#ifndef EXT2_OLD_BITOPS
+
+/*
+ * Do the bitops so that we are compatible with the standard i386
+ * convention.
+ */
+
+_INLINE_ int ext2fs_set_bit(int nr,void * addr)
+{
+#if 1
+ int mask;
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ __asm__ __volatile__("ldub [%0], %%g6\n\t"
+ "or %%g6, %2, %%g5\n\t"
+ "stb %%g5, [%0]\n\t"
+ "and %%g6, %2, %0\n"
+ : "=&r" (ADDR)
+ : "0" (ADDR), "r" (mask)
+ : "g5", "g6");
+ return (int) ADDR;
+#else
+ int mask, retval;
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ retval = (mask & *ADDR) != 0;
+ *ADDR |= mask;
+ return retval;
+#endif
+}
+
+_INLINE_ int ext2fs_clear_bit(int nr, void * addr)
+{
+#if 1
+ int mask;
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ __asm__ __volatile__("ldub [%0], %%g6\n\t"
+ "andn %%g6, %2, %%g5\n\t"
+ "stb %%g5, [%0]\n\t"
+ "and %%g6, %2, %0\n"
+ : "=&r" (ADDR)
+ : "0" (ADDR), "r" (mask)
+ : "g5", "g6");
+ return (int) ADDR;
+
+#else
+ int mask, retval;
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ retval = (mask & *ADDR) != 0;
+ *ADDR &= ~mask;
+ return retval;
+#endif
+}
+
+_INLINE_ int ext2fs_test_bit(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) != 0);
+}
+
+#else
+
+/* Do things the old, unplesant way. */
+
+_INLINE_ int ext2fs_set_bit(int nr, void *addr)
+{
+ int mask, retval;
+ unsigned long *ADDR = (unsigned long *) addr;
+
+ ADDR += nr >> 5;
+ mask = 1 << (nr & 31);
+ retval = ((mask & *ADDR) != 0);
+ *ADDR |= mask;
+ return retval;
+}
+
+_INLINE_ int ext2fs_clear_bit(int nr, void *addr)
+{
+ int mask, retval;
+ unsigned long *ADDR = (unsigned long *) addr;
+
+ ADDR += nr >> 5;
+ mask = 1 << (nr & 31);
+ retval = ((mask & *ADDR) != 0);
+ *ADDR &= ~mask;
+ return retval;
+}
+
+_INLINE_ int ext2fs_test_bit(int nr, const void *addr)
+{
+ int mask;
+ const unsigned long *ADDR = (const unsigned long *) addr;
+
+ ADDR += nr >> 5;
+ mask = 1 << (nr & 31);
+ return ((mask & *ADDR) != 0);
+}
+#endif
+
+#endif /* __sparc__ */
+
+#if !defined(_EXT2_HAVE_ASM_SWAB_) && defined(EXT2FS_ENABLE_SWAPFS)
+
+_INLINE_ __u16 ext2fs_swab16(__u16 val)
+{
+ return (val >> 8) | (val << 8);
+}
+
+_INLINE_ __u32 ext2fs_swab32(__u32 val)
+{
+ return ((val>>24) | ((val>>8)&0xFF00) |
+ ((val<<8)&0xFF0000) | (val<<24));
+}
+
+#endif /* !_EXT2_HAVE_ASM_SWAB */
+
+#if !defined(_EXT2_HAVE_ASM_FINDBIT_)
+_INLINE_ int ext2fs_find_first_bit_set(void * addr, unsigned size)
+{
+ char *cp = (unsigned char *) addr;
+ int res = 0, d0;
+
+ if (!size)
+ return 0;
+
+ while ((size > res) && (*cp == 0)) {
+ cp++;
+ res += 8;
+ }
+ d0 = ffs(*cp);
+ if (d0 == 0)
+ return size;
+
+ return res + d0 - 1;
+}
+
+_INLINE_ int ext2fs_find_next_bit_set (void * addr, int size, int offset)
+{
+ unsigned char * p;
+ int set = 0, bit = offset & 7, res = 0, d0;
+
+ res = offset >> 3;
+ p = ((unsigned char *) addr) + res;
+
+ if (bit) {
+ set = ffs(*p & ~((1 << bit) - 1));
+ if (set)
+ return (offset & ~7) + set - 1;
+ p++;
+ res += 8;
+ }
+ while ((size > res) && (*p == 0)) {
+ p++;
+ res += 8;
+ }
+ d0 = ffs(*p);
+ if (d0 == 0)
+ return size;
+
+ return (res + d0 - 1);
+}
+#endif
+
+/* These two routines moved to gen_bitmap.c */
+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);
+_INLINE_ int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap,
+ blk_t bitno);
+
+_INLINE_ int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap,
+ blk_t bitno)
+{
+ 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);
+}
+
+_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)
+{
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((block < bitmap->start) || (block > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_MARK, block,
+ bitmap->description);
+ return;
+ }
+#endif
+ ext2fs_set_bit(block - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ void ext2fs_fast_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
+ blk_t block)
+{
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((block < bitmap->start) || (block > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_UNMARK,
+ block, bitmap->description);
+ return;
+ }
+#endif
+ ext2fs_clear_bit(block - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ int ext2fs_fast_test_block_bitmap(ext2fs_block_bitmap bitmap,
+ blk_t block)
+{
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((block < bitmap->start) || (block > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_TEST,
+ block, bitmap->description);
+ return 0;
+ }
+#endif
+ return ext2fs_test_bit(block - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ void ext2fs_fast_mark_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((inode < bitmap->start) || (inode > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_INODE_MARK,
+ inode, bitmap->description);
+ return;
+ }
+#endif
+ ext2fs_set_bit(inode - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ void ext2fs_fast_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((inode < bitmap->start) || (inode > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_INODE_UNMARK,
+ inode, bitmap->description);
+ return;
+ }
+#endif
+ ext2fs_clear_bit(inode - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ int ext2fs_fast_test_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((inode < bitmap->start) || (inode > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_INODE_TEST,
+ inode, bitmap->description);
+ return 0;
+ }
+#endif
+ return ext2fs_test_bit(inode - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ blk_t ext2fs_get_block_bitmap_start(ext2fs_block_bitmap bitmap)
+{
+ return bitmap->start;
+}
+
+_INLINE_ ext2_ino_t ext2fs_get_inode_bitmap_start(ext2fs_inode_bitmap bitmap)
+{
+ return bitmap->start;
+}
+
+_INLINE_ blk_t ext2fs_get_block_bitmap_end(ext2fs_block_bitmap bitmap)
+{
+ return bitmap->end;
+}
+
+_INLINE_ ext2_ino_t ext2fs_get_inode_bitmap_end(ext2fs_inode_bitmap bitmap)
+{
+ return bitmap->end;
+}
+
+_INLINE_ int ext2fs_test_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_TEST,
+ block, bitmap->description);
+ return 0;
+ }
+ for (i=0; i < num; i++) {
+ if (ext2fs_fast_test_block_bitmap(bitmap, block+i))
+ return 0;
+ }
+ return 1;
+}
+
+_INLINE_ int ext2fs_fast_test_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num)
+{
+ int i;
+
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((block < bitmap->start) || (block+num-1 > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_TEST,
+ block, bitmap->description);
+ return 0;
+ }
+#endif
+ for (i=0; i < num; i++) {
+ if (ext2fs_fast_test_block_bitmap(bitmap, block+i))
+ return 0;
+ }
+ return 1;
+}
+
+_INLINE_ 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_set_bit(block + i - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ void ext2fs_fast_mark_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num)
+{
+ int i;
+
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((block < bitmap->start) || (block+num-1 > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_MARK, block,
+ bitmap->description);
+ return;
+ }
+#endif
+ for (i=0; i < num; i++)
+ ext2fs_set_bit(block + i - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ 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_clear_bit(block + i - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num)
+{
+ int i;
+
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((block < bitmap->start) || (block+num-1 > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_UNMARK, block,
+ bitmap->description);
+ return;
+ }
+#endif
+ for (i=0; i < num; i++)
+ ext2fs_clear_bit(block + i - bitmap->start, bitmap->bitmap);
+}
+#undef _INLINE_
+#endif
+
Added: trunk/yaboot/include/ext2fs/ext2_err.h
===================================================================
--- trunk/yaboot/include/ext2fs/ext2_err.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/ext2fs/ext2_err.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,99 @@
+/*
+ * ext2_err.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#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_RESERVED_8 (2133571345L)
+#define EXT2_ET_MAGIC_RESERVED_9 (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)
+extern void initialize_ext2_error_table(void);
+#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
Added: trunk/yaboot/include/ext2fs/ext2_io.h
===================================================================
--- trunk/yaboot/include/ext2fs/ext2_io.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/ext2fs/ext2_io.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,100 @@
+/*
+ * 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 Public
+ * License.
+ * %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;
+
+#define CHANNEL_FLAGS_WRITETHROUGH 0x01
+
+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;
+ int reserved[14];
+ void *private_data;
+ void *app_data;
+};
+
+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);
+ int reserved[15];
+};
+
+#define IO_FLAG_RW 1
+
+/*
+ * 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_write_byte(c,b,n,d) ((c)->manager->write_byte((c),b,n,d))
+#define io_channel_bumpcount(c) ((c)->refcount++)
+
+/* unix_io.c */
+extern io_manager unix_io_manager;
+
+/* 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_set_blksize)
+ (int blksize, errcode_t err);
+
+#endif /* _EXT2FS_EXT2_IO_H */
+
Added: trunk/yaboot/include/ext2fs/ext2fs.h
===================================================================
--- trunk/yaboot/include/ext2fs/ext2fs.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/ext2fs/ext2fs.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,978 @@
+/*
+ * 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 Public
+ * License.
+ * %End-Header%
+ */
+
+#ifndef _EXT2FS_EXT2FS_H
+#define _EXT2FS_EXT2FS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Non-GNU C compilers won't necessarily understand inline
+ */
+#if (!defined(__GNUC__) && !defined(__WATCOMC__))
+#define NO_INLINE_FUNCS
+#endif
+
+/*
+ * Build in support for byte-swapping filesystems if we the feature
+ * has been configured or if we're being built on a CPU architecture
+ * with a non-native byte order.
+ */
+#if defined(ENABLE_SWAPFS) || defined(WORDS_BIGENDIAN)
+#define EXT2FS_ENABLE_SWAPFS
+#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 "stdlib.h"
+
+#if EXT2_FLAT_INCLUDES
+#include "e2_types.h"
+#else
+#include "types.h" /* use yaboot's types.h */
+#endif /* EXT2_FLAT_INCLUDES */
+
+typedef __u32 ext2_ino_t;
+typedef __u32 blk_t;
+typedef __u32 dgrp_t;
+typedef __u32 ext2_off_t;
+typedef __s64 e2_blkcnt_t;
+
+#if EXT2_FLAT_INCLUDES
+#include "com_err.h"
+#include "ext2_io.h"
+#include "ext2_err.h"
+#else
+#include "et/com_err.h"
+#include "ext2fs/ext2_io.h"
+#include "ext2fs/ext2_err.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;
+
+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_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;
+
+#ifdef EXT2_DYNAMIC_REV
+#define EXT2_FIRST_INODE(s) EXT2_FIRST_INO(s)
+#else
+#define EXT2_FIRST_INODE(s) EXT2_FIRST_INO
+#define EXT2_INODE_SIZE(s) sizeof(struct ext2_inode)
+#endif
+
+/*
+ * badblocks list definitions
+ */
+
+typedef struct ext2_struct_badblocks_list *ext2_badblocks_list;
+typedef struct ext2_struct_badblocks_iterate *ext2_badblocks_iterate;
+
+/* old */
+typedef struct ext2_struct_badblocks_list *badblocks_list;
+typedef struct ext2_struct_badblocks_iterate *badblocks_iterate;
+
+#define BADBLOCKS_FLAG_DIRTY 1
+
+/*
+ * ext2_dblist structure and abstractions (see dblist.c)
+ */
+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
+
+/*
+ * 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
+ *
+ * EXT2_MKJOURNAL_V1_SUPER Make a (deprecated) V1 journal superblock
+ */
+#define EXT2_MKJOURNAL_V1_SUPER 0x0000001
+
+struct struct_ext2_filsys {
+ errcode_t magic;
+ io_channel io;
+ int flags;
+ char * device_name;
+ struct ext2_super_block * super;
+ int blocksize;
+ int fragsize;
+ dgrp_t group_desc_count;
+ unsigned long desc_blocks;
+ struct ext2_group_desc * group_desc;
+ int inode_blocks_per_group;
+ ext2fs_inode_bitmap inode_map;
+ ext2fs_block_bitmap block_map;
+ 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);
+ badblocks_list badblocks;
+ ext2_dblist dblist;
+ __u32 stride; /* for mke2fs */
+ struct ext2_super_block * orig_super;
+ struct ext2_image_hdr * image_header;
+ /*
+ * Reserved for future expansion
+ */
+ __u32 reserved[9];
+
+ /*
+ * Reserved for the use of the calling application.
+ */
+ void * priv_data;
+
+ /*
+ * Inode cache
+ */
+ struct ext2_inode_cache *icache;
+};
+
+#if EXT2_FLAT_INCLUDES
+#include "e2_bitops.h"
+#else
+#include "ext2fs/bitops.h"
+#endif
+
+/*
+ * 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_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_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_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
+
+/*
+ * 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_DOT_FILE 1
+#define DIRENT_DOT_DOT_FILE 2
+#define DIRENT_OTHER_FILE 3
+
+/*
+ * 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
+
+/*
+ * ext2fs_check_if_mounted flags
+ */
+#define EXT2_MF_MOUNTED 1
+#define EXT2_MF_ISROOT 2
+#define EXT2_MF_READONLY 4
+
+/*
+ * 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_icount_t abstraction
+ */
+#define EXT2_ICOUNT_OPT_INCREMENT 0x01
+
+typedef struct ext2_icount *ext2_icount_t;
+
+/*
+ * Flags for ext2fs_bmap
+ */
+#define BMAP_ALLOC 1
+
+/*
+ * 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) 0xffffffff)
+#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_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|\
+ EXT3_FEATURE_INCOMPAT_RECOVER)
+#else
+#define EXT2_LIB_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE|\
+ EXT3_FEATURE_INCOMPAT_JOURNAL_DEV|\
+ EXT3_FEATURE_INCOMPAT_RECOVER)
+#endif
+#define EXT2_LIB_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER|\
+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE)
+/*
+ * function prototypes
+ */
+
+/* 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_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_alloc_block(ext2_filsys fs, blk_t goal,
+ char *block_buf, blk_t *ret);
+
+/* 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_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 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);
+
+/* 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 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_generic_bitmap(__u32 start,
+ __u32 end,
+ __u32 real_end,
+ const char *descr,
+ ext2fs_generic_bitmap *ret);
+extern errcode_t ext2fs_allocate_block_bitmap(ext2_filsys fs,
+ const char *descr,
+ ext2fs_block_bitmap *ret);
+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 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);
+
+/* 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);
+
+/* 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);
+
+
+#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_flush(ext2_filsys fs);
+extern int ext2fs_bg_has_super(ext2_filsys fs, int group_block);
+extern void ext2fs_update_dynamic_rev(ext2_filsys fs);
+
+/* cmp_bitmaps.c */
+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);
+
+/* 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_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_set_dir_block(ext2_dblist dblist, ext2_ino_t ino,
+ blk_t blk, int blockcnt);
+extern errcode_t ext2fs_copy_dblist(ext2_dblist src,
+ ext2_dblist *dest);
+extern int ext2fs_dblist_count(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_write_dir_block(ext2_filsys fs, blk_t block,
+ void *buf);
+
+/* dir_iterate.c */
+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);
+
+/* 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 */
+void ext2fs_swap_ext_attr(ext2_filsys fs, char *to, char *from);
+extern errcode_t ext2fs_read_ext_attr(ext2_filsys fs, blk_t block, void *buf);
+extern errcode_t ext2fs_write_ext_attr(ext2_filsys fs, blk_t block, void *buf);
+/* fileio.c */
+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);
+extern errcode_t ext2fs_file_close(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, void *buf,
+ unsigned int nbytes, unsigned int *written);
+extern errcode_t ext2fs_file_lseek(ext2_file_t file, ext2_off_t offset,
+ int whence, ext2_off_t *ret_pos);
+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);
+
+/* finddev.c */
+#if 0 /* broken in yaboot build env */
+extern char *ext2fs_find_block_device(dev_t device);
+#endif
+
+/* 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_generic_bitmap(ext2fs_inode_bitmap bitmap);
+extern void ext2fs_free_block_bitmap(ext2fs_block_bitmap bitmap);
+extern void ext2fs_free_inode_bitmap(ext2fs_inode_bitmap bitmap);
+extern void ext2fs_free_dblist(ext2_dblist dblist);
+extern void ext2fs_badblocks_list_free(badblocks_list bb);
+
+/* getsize.c */
+extern errcode_t ext2fs_get_device_size(const char *file, int blocksize,
+ blk_t *retblocks);
+
+/* 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);
+
+/* initialize.c */
+extern errcode_t ext2fs_initialize(const char *name, int flags,
+ struct ext2_super_block *param,
+ io_manager manager, ext2_filsys *ret_fs);
+
+/* inode.c */
+extern errcode_t ext2fs_flush_icache(ext2_filsys fs);
+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 (ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode);
+extern errcode_t ext2fs_write_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);
+
+/* icount.c */
+extern void ext2fs_free_icount(ext2_icount_t icount);
+extern errcode_t ext2fs_create_icount2(ext2_filsys fs, int flags, int size,
+ ext2_icount_t hint, ext2_icount_t *ret);
+extern errcode_t ext2fs_create_icount(ext2_filsys fs, int flags, 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 *);
+
+/* 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);
+
+/* 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_create_journal_superblock(ext2_filsys fs,
+ __u32 size, 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 size,
+ int flags);
+
+/* openfs.c */
+extern errcode_t ext2fs_open(const char *name, int flags, int superblock,
+ int block_size, io_manager manager,
+ ext2_filsys *ret_fs);
+
+/* 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);
+
+/* 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 *private,
+ void (*invalid)(ext2_filsys fs,
+ blk_t blk,
+ char *badstr,
+ void *private));
+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));
+
+/* rs_bitmap.c */
+extern errcode_t ext2fs_resize_generic_bitmap(__u32 new_end,
+ __u32 new_real_end,
+ ext2fs_generic_bitmap bmap);
+extern errcode_t ext2fs_resize_inode_bitmap(__u32 new_end, __u32 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_copy_bitmap(ext2fs_generic_bitmap src,
+ ext2fs_generic_bitmap *dest);
+
+/* swapfs.c */
+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_inode(ext2_filsys fs,struct ext2_inode *t,
+ struct ext2_inode *f, int hostorder);
+
+/* valid_blk.c */
+extern int ext2fs_inode_has_valid_blocks(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 */
+extern errcode_t ext2fs_get_mem(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 int ext2fs_group_of_blk(ext2_filsys fs, blk_t blk);
+extern int ext2fs_group_of_ino(ext2_filsys fs, ext2_ino_t ino);
+
+/*
+ * 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
+#ifdef __GNUC__
+#define _INLINE_ extern __inline__
+#else /* For Watcom C */
+#define _INLINE_ extern inline
+#endif
+#endif
+
+#ifndef EXT2_CUSTOM_MEMORY_ROUTINES
+/*
+ * Allocate memory
+ */
+_INLINE_ errcode_t ext2fs_get_mem(unsigned long size, void **ptr)
+{
+ *ptr = malloc(size);
+ if (!*ptr)
+ return EXT2_ET_NO_MEMORY;
+ return 0;
+}
+
+/*
+ * Free memory
+ */
+_INLINE_ errcode_t ext2fs_free_mem(void **ptr)
+{
+ free(*ptr);
+ *ptr = 0;
+ return 0;
+}
+
+/*
+ * Resize memory
+ */
+_INLINE_ errcode_t ext2fs_resize_mem(unsigned long old_size,
+ unsigned long size, void **ptr)
+{
+ void *p;
+
+ p = realloc(*ptr, size);
+ if (!p)
+ return EXT2_ET_NO_MEMORY;
+ *ptr = 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_ int ext2fs_group_of_blk(ext2_filsys fs, blk_t blk)
+{
+ return (blk - fs->super->s_first_data_block) /
+ fs->super->s_blocks_per_group;
+}
+
+/*
+ * Return the group # of an inode number
+ */
+_INLINE_ int ext2fs_group_of_ino(ext2_filsys fs, ext2_ino_t ino)
+{
+ return (ino - 1) / fs->super->s_inodes_per_group;
+}
+#undef _INLINE_
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _EXT2FS_EXT2FS_H */
Added: trunk/yaboot/include/fdisk-part.h
===================================================================
--- trunk/yaboot/include/fdisk-part.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/fdisk-part.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,42 @@
+/*
+ * fdisk-part.h - Structure of fdisk partition table
+ *
+ * Copyright (C) 2000 Peter Bergner
+ * 2000 David Engebretsen
+ *
+ * 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.
+ */
+
+#define ACTIVE_FLAG 0x80
+
+#define EXTENDED 0x05
+#define WIN98_EXTENDED 0x0f
+#define LINUX_PARTITION 0x81
+#define LINUX_SWAP 0x82
+#define LINUX_NATIVE 0x83
+#define LINUX_EXTENDED 0x85
+
+struct fdisk_partition {
+ unsigned char boot_ind; /* 0x80 - active */
+ unsigned char head; /* starting head */
+ unsigned char sector; /* starting sector */
+ unsigned char cyl; /* starting cylinder */
+ unsigned char sys_ind; /* What partition type */
+ unsigned char end_head; /* end head */
+ unsigned char end_sector; /* end sector */
+ unsigned char end_cyl; /* end cylinder */
+ unsigned char start4[4]; /* starting sector counting from 0 */
+ unsigned char size4[4]; /* nr of sectors in partition */
+};
Added: trunk/yaboot/include/file.h
===================================================================
--- trunk/yaboot/include/file.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/file.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,74 @@
+/*
+ * file.h - Filesystem related interfaces
+ *
+ * Copyright (C) 2001 Ethan Benson
+ *
+ * parse_device_path()
+ *
+ * Copyright (C) 2001 Colin Walters
+ *
+ * Copyright (C) 1999 Benjamin Herrenschmidt
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef FILE_H
+#define FILE_H
+
+#include "types.h"
+#include "stddef.h"
+#include "prom.h"
+
+struct boot_file_t;
+#include "fs.h"
+
+#define FILE_MAX_PATH 1024
+
+struct boot_fspec_t {
+ char* dev; /* OF device path */
+ int part; /* Partition number or -1 */
+ char* file; /* File path */
+};
+
+struct boot_file_t {
+
+ /* File access methods */
+ const struct fs_t *fs;
+
+ /* Filesystem private (to be broken once we have a
+ * better malloc'ator)
+ */
+
+ int device_kind;
+ ihandle of_device;
+ ino_t inode;
+ __u64 pos;
+ unsigned char* buffer;
+ __u64 len;
+// unsigned int dev_blk_size;
+// unsigned int part_start;
+// unsigned int part_count;
+};
+
+extern int
+open_file(const struct boot_fspec_t* spec,
+ struct boot_file_t* file);
+
+extern int
+parse_device_path(char *imagepath, char *defdevice, int defpart,
+ char *deffile, struct boot_fspec_t *result);
+
+
+#endif
Added: trunk/yaboot/include/fs.h
===================================================================
--- trunk/yaboot/include/fs.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/fs.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,55 @@
+/*
+ * fs.h - Filesystem common definitions
+ *
+ * Copyright (C) 2001 Ethan Benson
+ *
+ * Copyright (C) 1999 Benjamin Herrenschmidt
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef FS_H
+#define FS_H
+
+#include "partition.h"
+#include "file.h"
+
+int fserrorno;
+
+struct fs_t {
+ const char* name;
+
+ int (*open)( struct boot_file_t* file,
+ const char* dev_name,
+ struct partition_t* part,
+ const char* file_name);
+
+ int (*read)( struct boot_file_t* file,
+ unsigned int size,
+ void* buffer);
+
+ int (*seek)( struct boot_file_t* file,
+ unsigned int newpos);
+
+ int (*close)( struct boot_file_t* file);
+};
+
+extern const struct fs_t *fs_of;
+extern const struct fs_t *fs_of_netboot;
+
+const struct fs_t *fs_open(struct boot_file_t *file, const char *dev_name,
+ struct partition_t *part, const char *file_name);
+
+#endif
Added: trunk/yaboot/include/linux/elf.h
===================================================================
--- trunk/yaboot/include/linux/elf.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/linux/elf.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,607 @@
+#ifndef _LINUX_ELF_H
+#define _LINUX_ELF_H
+
+#include <types.h>
+#include <asm/elf.h>
+
+/* 32-bit ELF base types. */
+typedef __u32 Elf32_Addr;
+typedef __u16 Elf32_Half;
+typedef __u32 Elf32_Off;
+typedef __s32 Elf32_Sword;
+typedef __u32 Elf32_Word;
+
+/* 64-bit ELF base types. */
+typedef __u64 Elf64_Addr;
+typedef __u16 Elf64_Half;
+typedef __s16 Elf64_SHalf;
+typedef __u64 Elf64_Off;
+typedef __s64 Elf64_Sword;
+typedef __u64 Elf64_Word;
+
+/* These constants are for the segment types stored in the image headers */
+#define PT_NULL 0
+#define PT_LOAD 1
+#define PT_DYNAMIC 2
+#define PT_INTERP 3
+#define PT_NOTE 4
+#define PT_SHLIB 5
+#define PT_PHDR 6
+#define PT_LOPROC 0x70000000
+#define PT_HIPROC 0x7fffffff
+#define PT_MIPS_REGINFO 0x70000000
+
+/* Flags in the e_flags field of the header */
+#define EF_MIPS_NOREORDER 0x00000001
+#define EF_MIPS_PIC 0x00000002
+#define EF_MIPS_CPIC 0x00000004
+#define EF_MIPS_ARCH 0xf0000000
+
+/* These constants define the different elf file types */
+#define ET_NONE 0
+#define ET_REL 1
+#define ET_EXEC 2
+#define ET_DYN 3
+#define ET_CORE 4
+#define ET_LOPROC 0xff00
+#define ET_HIPROC 0xffff
+
+/* These constants define the various ELF target machines */
+#define EM_NONE 0
+#define EM_M32 1
+#define EM_SPARC 2
+#define EM_386 3
+#define EM_68K 4
+#define EM_88K 5
+#define EM_486 6 /* Perhaps disused */
+#define EM_860 7
+
+#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */
+
+#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */
+
+#define EM_PARISC 15 /* HPPA */
+
+#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */
+
+#define EM_PPC 20 /* PowerPC */
+#define EM_PPC64 21 /* PowerPC 64-bit */
+
+#define EM_SPARCV9 43 /* SPARC v9 64-bit */
+
+/*
+ * This is an interim value that we will use until the committee comes
+ * up with a final number.
+ */
+#define EM_ALPHA 0x9026
+
+
+/* This is the info that is needed to parse the dynamic section of the file */
+#define DT_NULL 0
+#define DT_NEEDED 1
+#define DT_PLTRELSZ 2
+#define DT_PLTGOT 3
+#define DT_HASH 4
+#define DT_STRTAB 5
+#define DT_SYMTAB 6
+#define DT_RELA 7
+#define DT_RELASZ 8
+#define DT_RELAENT 9
+#define DT_STRSZ 10
+#define DT_SYMENT 11
+#define DT_INIT 12
+#define DT_FINI 13
+#define DT_SONAME 14
+#define DT_RPATH 15
+#define DT_SYMBOLIC 16
+#define DT_REL 17
+#define DT_RELSZ 18
+#define DT_RELENT 19
+#define DT_PLTREL 20
+#define DT_DEBUG 21
+#define DT_TEXTREL 22
+#define DT_JMPREL 23
+#define DT_LOPROC 0x70000000
+#define DT_HIPROC 0x7fffffff
+#define DT_MIPS_RLD_VERSION 0x70000001
+#define DT_MIPS_TIME_STAMP 0x70000002
+#define DT_MIPS_ICHECKSUM 0x70000003
+#define DT_MIPS_IVERSION 0x70000004
+#define DT_MIPS_FLAGS 0x70000005
+ #define RHF_NONE 0
+ #define RHF_HARDWAY 1
+ #define RHF_NOTPOT 2
+#define DT_MIPS_BASE_ADDRESS 0x70000006
+#define DT_MIPS_CONFLICT 0x70000008
+#define DT_MIPS_LIBLIST 0x70000009
+#define DT_MIPS_LOCAL_GOTNO 0x7000000a
+#define DT_MIPS_CONFLICTNO 0x7000000b
+#define DT_MIPS_LIBLISTNO 0x70000010
+#define DT_MIPS_SYMTABNO 0x70000011
+#define DT_MIPS_UNREFEXTNO 0x70000012
+#define DT_MIPS_GOTSYM 0x70000013
+#define DT_MIPS_HIPAGENO 0x70000014
+#define DT_MIPS_RLD_MAP 0x70000016
+
+/* This info is needed when parsing the symbol table */
+#define STB_LOCAL 0
+#define STB_GLOBAL 1
+#define STB_WEAK 2
+
+#define STT_NOTYPE 0
+#define STT_OBJECT 1
+#define STT_FUNC 2
+#define STT_SECTION 3
+#define STT_FILE 4
+
+#define ELF32_ST_BIND(x) ((x) >> 4)
+#define ELF32_ST_TYPE(x) (((unsigned int) x) & 0xf)
+
+/* Symbolic values for the entries in the auxiliary table
+ put on the initial stack */
+#define AT_NULL 0 /* end of vector */
+#define AT_IGNORE 1 /* entry should be ignored */
+#define AT_EXECFD 2 /* file descriptor of program */
+#define AT_PHDR 3 /* program headers for program */
+#define AT_PHENT 4 /* size of program header entry */
+#define AT_PHNUM 5 /* number of program headers */
+#define AT_PAGESZ 6 /* system page size */
+#define AT_BASE 7 /* base address of interpreter */
+#define AT_FLAGS 8 /* flags */
+#define AT_ENTRY 9 /* entry point of program */
+#define AT_NOTELF 10 /* program is not ELF */
+#define AT_UID 11 /* real uid */
+#define AT_EUID 12 /* effective uid */
+#define AT_GID 13 /* real gid */
+#define AT_EGID 14 /* effective gid */
+#define AT_PLATFORM 15 /* string identifying CPU for optimizations */
+#define AT_HWCAP 16 /* arch dependent hints at CPU capabilities */
+
+typedef struct dynamic{
+ Elf32_Sword d_tag;
+ union{
+ Elf32_Sword d_val;
+ Elf32_Addr d_ptr;
+ } d_un;
+} Elf32_Dyn;
+
+typedef struct {
+ Elf64_Word d_tag; /* entry tag value */
+ union {
+ Elf64_Word d_val;
+ Elf64_Word d_ptr;
+ } d_un;
+} Elf64_Dyn;
+
+/* The following are used with relocations */
+#define ELF32_R_SYM(x) ((x) >> 8)
+#define ELF32_R_TYPE(x) ((x) & 0xff)
+
+#define R_386_NONE 0
+#define R_386_32 1
+#define R_386_PC32 2
+#define R_386_GOT32 3
+#define R_386_PLT32 4
+#define R_386_COPY 5
+#define R_386_GLOB_DAT 6
+#define R_386_JMP_SLOT 7
+#define R_386_RELATIVE 8
+#define R_386_GOTOFF 9
+#define R_386_GOTPC 10
+#define R_386_NUM 11
+
+#define R_MIPS_NONE 0
+#define R_MIPS_16 1
+#define R_MIPS_32 2
+#define R_MIPS_REL32 3
+#define R_MIPS_26 4
+#define R_MIPS_HI16 5
+#define R_MIPS_LO16 6
+#define R_MIPS_GPREL16 7
+#define R_MIPS_LITERAL 8
+#define R_MIPS_GOT16 9
+#define R_MIPS_PC16 10
+#define R_MIPS_CALL16 11
+#define R_MIPS_GPREL32 12
+/* The remaining relocs are defined on Irix, although they are not
+ in the MIPS ELF ABI. */
+#define R_MIPS_UNUSED1 13
+#define R_MIPS_UNUSED2 14
+#define R_MIPS_UNUSED3 15
+#define R_MIPS_SHIFT5 16
+#define R_MIPS_SHIFT6 17
+#define R_MIPS_64 18
+#define R_MIPS_GOT_DISP 19
+#define R_MIPS_GOT_PAGE 20
+#define R_MIPS_GOT_OFST 21
+/*
+ * The following two relocation types are specified in the the MIPS ABI
+ * conformance guide version 1.2 but not yet in the psABI.
+ */
+#define R_MIPS_GOTHI16 22
+#define R_MIPS_GOTLO16 23
+#define R_MIPS_SUB 24
+#define R_MIPS_INSERT_A 25
+#define R_MIPS_INSERT_B 26
+#define R_MIPS_DELETE 27
+#define R_MIPS_HIGHER 28
+#define R_MIPS_HIGHEST 29
+/*
+ * The following two relocation types are specified in the the MIPS ABI
+ * conformance guide version 1.2 but not yet in the psABI.
+ */
+#define R_MIPS_CALLHI16 30
+#define R_MIPS_CALLLO16 31
+/*
+ * This range is reserved for vendor specific relocations.
+ */
+#define R_MIPS_LOVENDOR 100
+#define R_MIPS_HIVENDOR 127
+
+
+/*
+ * Sparc ELF relocation types
+ */
+#define R_SPARC_NONE 0
+#define R_SPARC_8 1
+#define R_SPARC_16 2
+#define R_SPARC_32 3
+#define R_SPARC_DISP8 4
+#define R_SPARC_DISP16 5
+#define R_SPARC_DISP32 6
+#define R_SPARC_WDISP30 7
+#define R_SPARC_WDISP22 8
+#define R_SPARC_HI22 9
+#define R_SPARC_22 10
+#define R_SPARC_13 11
+#define R_SPARC_LO10 12
+#define R_SPARC_GOT10 13
+#define R_SPARC_GOT13 14
+#define R_SPARC_GOT22 15
+#define R_SPARC_PC10 16
+#define R_SPARC_PC22 17
+#define R_SPARC_WPLT30 18
+#define R_SPARC_COPY 19
+#define R_SPARC_GLOB_DAT 20
+#define R_SPARC_JMP_SLOT 21
+#define R_SPARC_RELATIVE 22
+#define R_SPARC_UA32 23
+#define R_SPARC_PLT32 24
+#define R_SPARC_HIPLT22 25
+#define R_SPARC_LOPLT10 26
+#define R_SPARC_PCPLT32 27
+#define R_SPARC_PCPLT22 28
+#define R_SPARC_PCPLT10 29
+#define R_SPARC_10 30
+#define R_SPARC_11 31
+#define R_SPARC_WDISP16 40
+#define R_SPARC_WDISP19 41
+#define R_SPARC_7 43
+#define R_SPARC_5 44
+#define R_SPARC_6 45
+
+/* Bits present in AT_HWCAP, primarily for Sparc32. */
+
+#define HWCAP_SPARC_FLUSH 1 /* CPU supports flush instruction. */
+#define HWCAP_SPARC_STBAR 2
+#define HWCAP_SPARC_SWAP 4
+#define HWCAP_SPARC_MULDIV 8
+#define HWCAP_SPARC_V9 16
+
+
+/*
+ * 68k ELF relocation types
+ */
+#define R_68K_NONE 0
+#define R_68K_32 1
+#define R_68K_16 2
+#define R_68K_8 3
+#define R_68K_PC32 4
+#define R_68K_PC16 5
+#define R_68K_PC8 6
+#define R_68K_GOT32 7
+#define R_68K_GOT16 8
+#define R_68K_GOT8 9
+#define R_68K_GOT32O 10
+#define R_68K_GOT16O 11
+#define R_68K_GOT8O 12
+#define R_68K_PLT32 13
+#define R_68K_PLT16 14
+#define R_68K_PLT8 15
+#define R_68K_PLT32O 16
+#define R_68K_PLT16O 17
+#define R_68K_PLT8O 18
+#define R_68K_COPY 19
+#define R_68K_GLOB_DAT 20
+#define R_68K_JMP_SLOT 21
+#define R_68K_RELATIVE 22
+
+/*
+ * Alpha ELF relocation types
+ */
+#define R_ALPHA_NONE 0 /* No reloc */
+#define R_ALPHA_REFLONG 1 /* Direct 32 bit */
+#define R_ALPHA_REFQUAD 2 /* Direct 64 bit */
+#define R_ALPHA_GPREL32 3 /* GP relative 32 bit */
+#define R_ALPHA_LITERAL 4 /* GP relative 16 bit w/optimization */
+#define R_ALPHA_LITUSE 5 /* Optimization hint for LITERAL */
+#define R_ALPHA_GPDISP 6 /* Add displacement to GP */
+#define R_ALPHA_BRADDR 7 /* PC+4 relative 23 bit shifted */
+#define R_ALPHA_HINT 8 /* PC+4 relative 16 bit shifted */
+#define R_ALPHA_SREL16 9 /* PC relative 16 bit */
+#define R_ALPHA_SREL32 10 /* PC relative 32 bit */
+#define R_ALPHA_SREL64 11 /* PC relative 64 bit */
+#define R_ALPHA_OP_PUSH 12 /* OP stack push */
+#define R_ALPHA_OP_STORE 13 /* OP stack pop and store */
+#define R_ALPHA_OP_PSUB 14 /* OP stack subtract */
+#define R_ALPHA_OP_PRSHIFT 15 /* OP stack right shift */
+#define R_ALPHA_GPVALUE 16
+#define R_ALPHA_GPRELHIGH 17
+#define R_ALPHA_GPRELLOW 18
+#define R_ALPHA_IMMED_GP_16 19
+#define R_ALPHA_IMMED_GP_HI32 20
+#define R_ALPHA_IMMED_SCN_HI32 21
+#define R_ALPHA_IMMED_BR_HI32 22
+#define R_ALPHA_IMMED_LO32 23
+#define R_ALPHA_COPY 24 /* Copy symbol at runtime */
+#define R_ALPHA_GLOB_DAT 25 /* Create GOT entry */
+#define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */
+#define R_ALPHA_RELATIVE 27 /* Adjust by program base */
+
+/* Legal values for e_flags field of Elf64_Ehdr. */
+
+#define EF_ALPHA_32BIT 1 /* All addresses are below 2GB */
+
+
+typedef struct elf32_rel {
+ Elf32_Addr r_offset;
+ Elf32_Word r_info;
+} Elf32_Rel;
+
+typedef struct elf64_rel {
+ Elf64_Addr r_offset; /* Location at which to apply the action */
+ Elf64_Word r_info; /* index and type of relocation */
+} Elf64_Rel;
+
+typedef struct elf32_rela{
+ Elf32_Addr r_offset;
+ Elf32_Word r_info;
+ Elf32_Sword r_addend;
+} Elf32_Rela;
+
+typedef struct elf64_rela {
+ Elf64_Addr r_offset; /* Location at which to apply the action */
+ Elf64_Word r_info; /* index and type of relocation */
+ Elf64_Word r_addend; /* Constant addend used to compute value */
+} Elf64_Rela;
+
+typedef struct elf32_sym{
+ Elf32_Word st_name;
+ Elf32_Addr st_value;
+ Elf32_Word st_size;
+ unsigned char st_info;
+ unsigned char st_other;
+ Elf32_Half st_shndx;
+} Elf32_Sym;
+
+typedef struct elf64_sym {
+ Elf32_Word st_name; /* Symbol name, index in string tbl (yes, Elf32) */
+ unsigned char st_info; /* Type and binding attributes */
+ unsigned char st_other; /* No defined meaning, 0 */
+ Elf64_Half st_shndx; /* Associated section index */
+ Elf64_Addr st_value; /* Value of the symbol */
+ Elf64_Word st_size; /* Associated symbol size */
+} Elf64_Sym;
+
+
+#define EI_NIDENT 16
+
+/* Minimum amount of the header we need to determine whether
+ * we have an executable PPC32/PPC64 Elf file or not.
+ */
+typedef struct elf_ident_t {
+ unsigned char e_ident[EI_NIDENT];
+ __u16 e_type;
+ __u16 e_machine;
+} Elf_Ident;
+
+typedef struct elf32_hdr{
+ unsigned char e_ident[EI_NIDENT];
+ Elf32_Half e_type;
+ Elf32_Half e_machine;
+ Elf32_Word e_version;
+ Elf32_Addr e_entry; /* Entry point */
+ Elf32_Off e_phoff;
+ Elf32_Off e_shoff;
+ Elf32_Word e_flags;
+ Elf32_Half e_ehsize;
+ Elf32_Half e_phentsize;
+ Elf32_Half e_phnum;
+ Elf32_Half e_shentsize;
+ Elf32_Half e_shnum;
+ Elf32_Half e_shstrndx;
+} Elf32_Ehdr;
+
+typedef struct elf64_hdr {
+ unsigned char e_ident[16]; /* ELF "magic number" */
+ Elf64_SHalf e_type;
+ Elf64_Half e_machine;
+ __s32 e_version;
+ Elf64_Addr e_entry; /* Entry point virtual address */
+ Elf64_Off e_phoff; /* Program header table file offset */
+ Elf64_Off e_shoff; /* Section header table file offset */
+ __s32 e_flags;
+ Elf64_SHalf e_ehsize;
+ Elf64_SHalf e_phentsize;
+ Elf64_SHalf e_phnum;
+ Elf64_SHalf e_shentsize;
+ Elf64_SHalf e_shnum;
+ Elf64_SHalf e_shstrndx;
+} Elf64_Ehdr;
+
+/* These constants define the permissions on sections in the program
+ header, p_flags. */
+#define PF_R 0x4
+#define PF_W 0x2
+#define PF_X 0x1
+
+typedef struct elf32_phdr{
+ Elf32_Word p_type;
+ Elf32_Off p_offset;
+ Elf32_Addr p_vaddr;
+ Elf32_Addr p_paddr;
+ Elf32_Word p_filesz;
+ Elf32_Word p_memsz;
+ Elf32_Word p_flags;
+ Elf32_Word p_align;
+} Elf32_Phdr;
+
+typedef struct elf64_phdr {
+ __s32 p_type;
+ __s32 p_flags;
+ Elf64_Off p_offset; /* Segment file offset */
+ Elf64_Addr p_vaddr; /* Segment virtual address */
+ Elf64_Addr p_paddr; /* Segment physical address */
+ Elf64_Word p_filesz; /* Segment size in file */
+ Elf64_Word p_memsz; /* Segment size in memory */
+ Elf64_Word p_align; /* Segment alignment, file & memory */
+} Elf64_Phdr;
+
+/* sh_type */
+#define SHT_NULL 0
+#define SHT_PROGBITS 1
+#define SHT_SYMTAB 2
+#define SHT_STRTAB 3
+#define SHT_RELA 4
+#define SHT_HASH 5
+#define SHT_DYNAMIC 6
+#define SHT_NOTE 7
+#define SHT_NOBITS 8
+#define SHT_REL 9
+#define SHT_SHLIB 10
+#define SHT_DYNSYM 11
+#define SHT_NUM 12
+#define SHT_LOPROC 0x70000000
+#define SHT_HIPROC 0x7fffffff
+#define SHT_LOUSER 0x80000000
+#define SHT_HIUSER 0xffffffff
+#define SHT_MIPS_LIST 0x70000000
+#define SHT_MIPS_CONFLICT 0x70000002
+#define SHT_MIPS_GPTAB 0x70000003
+#define SHT_MIPS_UCODE 0x70000004
+
+/* sh_flags */
+#define SHF_WRITE 0x1
+#define SHF_ALLOC 0x2
+#define SHF_EXECINSTR 0x4
+#define SHF_MASKPROC 0xf0000000
+#define SHF_MIPS_GPREL 0x10000000
+
+/* special section indexes */
+#define SHN_UNDEF 0
+#define SHN_LORESERVE 0xff00
+#define SHN_LOPROC 0xff00
+#define SHN_HIPROC 0xff1f
+#define SHN_ABS 0xfff1
+#define SHN_COMMON 0xfff2
+#define SHN_HIRESERVE 0xffff
+#define SHN_MIPS_ACCOMON 0xff00
+
+typedef struct {
+ Elf32_Word sh_name;
+ Elf32_Word sh_type;
+ Elf32_Word sh_flags;
+ Elf32_Addr sh_addr;
+ Elf32_Off sh_offset;
+ Elf32_Word sh_size;
+ Elf32_Word sh_link;
+ Elf32_Word sh_info;
+ Elf32_Word sh_addralign;
+ Elf32_Word sh_entsize;
+} Elf32_Shdr;
+
+typedef struct elf64_shdr {
+ Elf32_Word sh_name; /* Section name, index in string tbl (yes Elf32) */
+ Elf32_Word sh_type; /* Type of section (yes Elf32) */
+ Elf64_Word sh_flags; /* Miscellaneous section attributes */
+ Elf64_Addr sh_addr; /* Section virtual addr at execution */
+ Elf64_Off sh_offset; /* Section file offset */
+ Elf64_Word sh_size; /* Size of section in bytes */
+ Elf32_Word sh_link; /* Index of another section (yes Elf32) */
+ Elf32_Word sh_info; /* Additional section information (yes Elf32) */
+ Elf64_Word sh_addralign; /* Section alignment */
+ Elf64_Word sh_entsize; /* Entry size if section holds table */
+} Elf64_Shdr;
+
+#define EI_MAG0 0 /* e_ident[] indexes */
+#define EI_MAG1 1
+#define EI_MAG2 2
+#define EI_MAG3 3
+#define EI_CLASS 4
+#define EI_DATA 5
+#define EI_VERSION 6
+#define EI_PAD 7
+
+#define ELFMAG0 0x7f /* EI_MAG */
+#define ELFMAG1 'E'
+#define ELFMAG2 'L'
+#define ELFMAG3 'F'
+#define ELFMAG "\177ELF"
+#define SELFMAG 4
+
+#define ELFCLASSNONE 0 /* EI_CLASS */
+#define ELFCLASS32 1
+#define ELFCLASS64 2
+#define ELFCLASSNUM 3
+
+#define ELFDATANONE 0 /* e_ident[EI_DATA] */
+#define ELFDATA2LSB 1
+#define ELFDATA2MSB 2
+
+#define EV_NONE 0 /* e_version, EI_VERSION */
+#define EV_CURRENT 1
+#define EV_NUM 2
+
+/* Notes used in ET_CORE */
+#define NT_PRSTATUS 1
+#define NT_PRFPREG 2
+#define NT_PRPSINFO 3
+#define NT_TASKSTRUCT 4
+
+/* Note header in a PT_NOTE section */
+typedef struct elf32_note {
+ Elf32_Word n_namesz; /* Name size */
+ Elf32_Word n_descsz; /* Content size */
+ Elf32_Word n_type; /* Content type */
+} Elf32_Nhdr;
+
+/* Note header in a PT_NOTE section */
+/*
+ * For now we use the 32 bit version of the structure until we figure
+ * out whether we need anything better. Note - on the Alpha, "unsigned int"
+ * is only 32 bits.
+ */
+typedef struct elf64_note {
+ Elf32_Word n_namesz; /* Name size */
+ Elf32_Word n_descsz; /* Content size */
+ Elf32_Word n_type; /* Content type */
+} Elf64_Nhdr;
+
+#if ELF_CLASS == ELFCLASS32
+
+extern Elf32_Dyn _DYNAMIC [];
+#define elfhdr elf32_hdr
+#define elf_phdr elf32_phdr
+#define elf_note elf32_note
+
+#else
+
+extern Elf64_Dyn _DYNAMIC [];
+#define elfhdr elf64_hdr
+#define elf_phdr elf64_phdr
+#define elf_note elf64_note
+
+#endif
+
+
+#endif /* _LINUX_ELF_H */
Added: trunk/yaboot/include/linux/ext2_fs.h
===================================================================
--- trunk/yaboot/include/linux/ext2_fs.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/linux/ext2_fs.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,624 @@
+/*
+ * linux/include/linux/ext2_fs.h
+ *
+ * Copyright (C) 1992, 1993, 1994, 1995
+ * Remy Card (card at 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 "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"
+
+/*
+ * Debug code
+ */
+#ifdef EXT2FS_DEBUG
+# define ext2_debug(f, a...) { \
+ printk ("EXT2-fs DEBUG (%s, %d): %s:", \
+ __FILE__, __LINE__, __FUNCTION__); \
+ printk (f, ## a); \
+ }
+#else
+# define ext2_debug(f, a...) /**/
+#endif
+
+/*
+ * Special inodes numbers
+ */
+#define EXT2_BAD_INO 1 /* Bad blocks inode */
+#define EXT2_ROOT_INO 2 /* Root inode */
+#define EXT2_ACL_IDX_INO 3 /* ACL inode */
+#define EXT2_ACL_DATA_INO 4 /* ACL inode */
+#define EXT2_BOOT_LOADER_INO 5 /* Boot loader inode */
+#define EXT2_UNDEL_DIR_INO 6 /* Undelete directory inode */
+
+/* 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
+
+/*
+ * Maximal count of links to a file
+ */
+#define EXT2_LINK_MAX 32000
+
+/*
+ * Macro-instructions used to manage several block sizes
+ */
+#define EXT2_MIN_BLOCK_SIZE 1024
+#define EXT2_MAX_BLOCK_SIZE 4096
+#define EXT2_MIN_BLOCK_LOG_SIZE 10
+#ifdef __KERNEL__
+# define EXT2_BLOCK_SIZE(s) ((s)->s_blocksize)
+#else
+# define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
+#endif
+#define EXT2_ACLE_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_acl_entry))
+#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
+#ifdef __KERNEL__
+# define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits)
+#else
+# define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
+#endif
+#ifdef __KERNEL__
+#define EXT2_ADDR_PER_BLOCK_BITS(s) ((s)->u.ext2_sb.s_addr_per_block_bits)
+#define EXT2_INODE_SIZE(s) ((s)->u.ext2_sb.s_inode_size)
+#define EXT2_FIRST_INO(s) ((s)->u.ext2_sb.s_first_ino)
+#else
+#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
+
+/*
+ * Macro-instructions used to manage fragments
+ */
+#define EXT2_MIN_FRAG_SIZE 1024
+#define EXT2_MAX_FRAG_SIZE 4096
+#define EXT2_MIN_FRAG_LOG_SIZE 10
+#ifdef __KERNEL__
+# define EXT2_FRAG_SIZE(s) ((s)->u.ext2_sb.s_frag_size)
+# define EXT2_FRAGS_PER_BLOCK(s) ((s)->u.ext2_sb.s_frags_per_block)
+#else
+# define EXT2_FRAG_SIZE(s) (EXT2_MIN_FRAG_SIZE << (s)->s_log_frag_size)
+# define EXT2_FRAGS_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_FRAG_SIZE(s))
+#endif
+
+/*
+ * 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_pad;
+ __u32 bg_reserved[3];
+};
+
+/*
+ * Macro-instructions used to manage group descriptors
+ */
+#ifdef __KERNEL__
+# define EXT2_BLOCKS_PER_GROUP(s) ((s)->u.ext2_sb.s_blocks_per_group)
+# define EXT2_DESC_PER_BLOCK(s) ((s)->u.ext2_sb.s_desc_per_block)
+# define EXT2_INODES_PER_GROUP(s) ((s)->u.ext2_sb.s_inodes_per_group)
+# define EXT2_DESC_PER_BLOCK_BITS(s) ((s)->u.ext2_sb.s_desc_per_block_bits)
+#else
+# define EXT2_BLOCKS_PER_GROUP(s) ((s)->s_blocks_per_group)
+# define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc))
+# define EXT2_INODES_PER_GROUP(s) ((s)->s_inodes_per_group)
+#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_NOCOMP_FL 0x00000400 /* Don't compress */
+#define EXT2_ECOMPR_FL 0x00000800 /* Compression error */
+/* End compression flags --- maybe not all used */
+#define EXT2_BTREE_FL 0x00001000 /* btree format dir */
+#define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
+
+#define EXT2_FL_USER_VISIBLE 0x00001FFF /* User visible flags */
+#define EXT2_FL_USER_MODIFIABLE 0x000000FF /* User modifiable flags */
+
+/*
+ * ioctl commands
+ */
+#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)
+
+/*
+ * 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 */
+ 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 */
+};
+
+#define i_size_high i_dir_acl
+
+#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_reserved2 osd2.linux2.l_i_reserved2
+#endif
+
+#ifdef __hurd__
+#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
+
+#ifdef __masix__
+#define i_reserved1 osd1.masix1.m_i_reserved1
+#define i_frag osd2.masix2.m_i_frag
+#define i_fsize osd2.masix2.m_i_fsize
+#define i_reserved2 osd2.masix2.m_i_reserved2
+#endif
+
+/*
+ * File system states
+ */
+#define EXT2_VALID_FS 0x0001 /* Unmounted cleanly */
+#define EXT2_ERROR_FS 0x0002 /* Errors detected */
+
+/*
+ * Mount flags
+ */
+#define EXT2_MOUNT_CHECK_NORMAL 0x0001 /* Do some more checks */
+#define EXT2_MOUNT_CHECK_STRICT 0x0002 /* Do again more checks */
+#define EXT2_MOUNT_CHECK (EXT2_MOUNT_CHECK_NORMAL | \
+ EXT2_MOUNT_CHECK_STRICT)
+#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 clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt
+#define set_opt(o, opt) o |= EXT2_MOUNT_##opt
+#define test_opt(sb, opt) ((sb)->u.ext2_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
+
+/*
+ * 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 */
+ /*
+ * 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_COMPAT_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;
+ __u32 s_reserved[204]; /* Padding to the end of the block */
+};
+
+#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
+
+/*
+ * Codes for operating systems
+ */
+#define EXT2_OS_LINUX 0
+#define EXT2_OS_HURD 1
+#define EXT2_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
+
+/*
+ * 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_RO_COMPAT_SPARSE_SUPER 0x0001
+#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
+#define EXT2_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
+
+#define EXT2_FEATURE_INCOMPAT_COMPRESSION 0x0001
+#define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002
+
+#define EXT2_FEATURE_COMPAT_SUPP 0
+#define EXT2_FEATURE_INCOMPAT_SUPP EXT2_FEATURE_INCOMPAT_FILETYPE
+#define EXT2_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
+ 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
+
+/*
+ * 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)
+
+#ifdef __KERNEL__
+
+/* Filesize hard limits for 64-bit file offsets */
+extern long long ext2_max_sizes[];
+
+/*
+ * Function prototypes
+ */
+
+/*
+ * Ok, these declarations are also in <linux/kernel.h> but none of the
+ * ext2 source programs needs to include it so they are duplicated here.
+ */
+# define NORET_TYPE /**/
+# define ATTRIB_NORET __attribute__((noreturn))
+# define NORET_AND noreturn,
+
+/* acl.c */
+extern int ext2_permission (struct inode *, int);
+
+/* balloc.c */
+extern int ext2_group_sparse(int group);
+extern int ext2_new_block (const struct inode *, unsigned long,
+ __u32 *, __u32 *, int *);
+extern void ext2_free_blocks (const struct inode *, unsigned long,
+ unsigned long);
+extern unsigned long ext2_count_free_blocks (struct super_block *);
+extern void ext2_check_blocks_bitmap (struct super_block *);
+extern struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb,
+ unsigned int block_group,
+ struct buffer_head ** bh);
+
+/* bitmap.c */
+extern unsigned long ext2_count_free (struct buffer_head *, unsigned);
+
+/* dir.c */
+extern int ext2_check_dir_entry (const char *, struct inode *,
+ struct ext2_dir_entry_2 *, struct buffer_head *,
+ unsigned long);
+
+/* file.c */
+extern int ext2_read (struct inode *, struct file *, char *, int);
+extern int ext2_write (struct inode *, struct file *, char *, int);
+
+/* fsync.c */
+extern int ext2_sync_file (struct file *, struct dentry *);
+
+/* ialloc.c */
+extern struct inode * ext2_new_inode (const struct inode *, int, int *);
+extern void ext2_free_inode (struct inode *);
+extern unsigned long ext2_count_free_inodes (struct super_block *);
+extern void ext2_check_inodes_bitmap (struct super_block *);
+
+/* inode.c */
+extern int ext2_bmap (struct inode *, int);
+
+extern struct buffer_head * ext2_getblk (struct inode *, long, int, int *);
+extern struct buffer_head * ext2_bread (struct inode *, int, int, int *);
+
+extern int ext2_getcluster (struct inode * inode, long block);
+extern void ext2_read_inode (struct inode *);
+extern void ext2_write_inode (struct inode *);
+extern void ext2_put_inode (struct inode *);
+extern void ext2_delete_inode (struct inode *);
+extern int ext2_sync_inode (struct inode *);
+extern int ext2_notify_change(struct dentry *, struct iattr *);
+extern void ext2_discard_prealloc (struct inode *);
+
+/* ioctl.c */
+extern int ext2_ioctl (struct inode *, struct file *, unsigned int,
+ unsigned long);
+
+/* namei.c */
+extern void ext2_release (struct inode *, struct file *);
+extern struct dentry *ext2_lookup (struct inode *, struct dentry *);
+extern int ext2_create (struct inode *,struct dentry *,int);
+extern int ext2_mkdir (struct inode *,struct dentry *,int);
+extern int ext2_rmdir (struct inode *,struct dentry *);
+extern int ext2_unlink (struct inode *,struct dentry *);
+extern int ext2_symlink (struct inode *,struct dentry *,const char *);
+extern int ext2_link (struct dentry *, struct inode *, struct dentry *);
+extern int ext2_mknod (struct inode *, struct dentry *, int, int);
+extern int ext2_rename (struct inode *, struct dentry *,
+ struct inode *, struct dentry *);
+
+/* super.c */
+extern void ext2_error (struct super_block *, const char *, const char *, ...)
+ __attribute__ ((format (printf, 3, 4)));
+extern NORET_TYPE void ext2_panic (struct super_block *, const char *,
+ const char *, ...)
+ __attribute__ ((NORET_AND format (printf, 3, 4)));
+extern void ext2_warning (struct super_block *, const char *, const char *, ...)
+ __attribute__ ((format (printf, 3, 4)));
+extern void ext2_put_super (struct super_block *);
+extern void ext2_write_super (struct super_block *);
+extern int ext2_remount (struct super_block *, int *, char *);
+extern struct super_block * ext2_read_super (struct super_block *,void *,int);
+extern int init_ext2_fs(void);
+extern int ext2_statfs (struct super_block *, struct statfs *, int);
+
+/* truncate.c */
+extern void ext2_truncate (struct inode *);
+
+/*
+ * Inodes and files operations
+ */
+
+/* dir.c */
+extern struct inode_operations ext2_dir_inode_operations;
+
+/* file.c */
+extern struct inode_operations ext2_file_inode_operations;
+
+/* symlink.c */
+extern struct inode_operations ext2_symlink_inode_operations;
+
+#endif /* __KERNEL__ */
+
+#endif /* _LINUX_EXT2_FS_H */
Added: trunk/yaboot/include/linux/iso_fs.h
===================================================================
--- trunk/yaboot/include/linux/iso_fs.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/linux/iso_fs.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,177 @@
+
+#ifndef _ISOFS_FS_H
+#define _ISOFS_FS_H
+
+#include <linux/types.h>
+/*
+ * The isofs filesystem constants/structures
+ */
+
+/* This part borrowed from the bsd386 isofs */
+#define ISODCL(from, to) (to - from + 1)
+
+struct iso_volume_descriptor {
+ char type[ISODCL(1,1)]; /* 711 */
+ char id[ISODCL(2,6)];
+ char version[ISODCL(7,7)];
+ char data[ISODCL(8,2048)];
+};
+
+/* volume descriptor types */
+#define ISO_VD_PRIMARY 1
+#define ISO_VD_SUPPLEMENTARY 2
+#define ISO_VD_END 255
+
+#define ISO_STANDARD_ID "CD001"
+
+struct iso_primary_descriptor {
+ char type [ISODCL ( 1, 1)]; /* 711 */
+ char id [ISODCL ( 2, 6)];
+ char version [ISODCL ( 7, 7)]; /* 711 */
+ char unused1 [ISODCL ( 8, 8)];
+ char system_id [ISODCL ( 9, 40)]; /* achars */
+ char volume_id [ISODCL ( 41, 72)]; /* dchars */
+ char unused2 [ISODCL ( 73, 80)];
+ char volume_space_size [ISODCL ( 81, 88)]; /* 733 */
+ char unused3 [ISODCL ( 89, 120)];
+ char volume_set_size [ISODCL (121, 124)]; /* 723 */
+ char volume_sequence_number [ISODCL (125, 128)]; /* 723 */
+ char logical_block_size [ISODCL (129, 132)]; /* 723 */
+ char path_table_size [ISODCL (133, 140)]; /* 733 */
+ char type_l_path_table [ISODCL (141, 144)]; /* 731 */
+ char opt_type_l_path_table [ISODCL (145, 148)]; /* 731 */
+ char type_m_path_table [ISODCL (149, 152)]; /* 732 */
+ char opt_type_m_path_table [ISODCL (153, 156)]; /* 732 */
+ char root_directory_record [ISODCL (157, 190)]; /* 9.1 */
+ char volume_set_id [ISODCL (191, 318)]; /* dchars */
+ char publisher_id [ISODCL (319, 446)]; /* achars */
+ char preparer_id [ISODCL (447, 574)]; /* achars */
+ char application_id [ISODCL (575, 702)]; /* achars */
+ char copyright_file_id [ISODCL (703, 739)]; /* 7.5 dchars */
+ char abstract_file_id [ISODCL (740, 776)]; /* 7.5 dchars */
+ char bibliographic_file_id [ISODCL (777, 813)]; /* 7.5 dchars */
+ char creation_date [ISODCL (814, 830)]; /* 8.4.26.1 */
+ char modification_date [ISODCL (831, 847)]; /* 8.4.26.1 */
+ char expiration_date [ISODCL (848, 864)]; /* 8.4.26.1 */
+ char effective_date [ISODCL (865, 881)]; /* 8.4.26.1 */
+ char file_structure_version [ISODCL (882, 882)]; /* 711 */
+ char unused4 [ISODCL (883, 883)];
+ char application_data [ISODCL (884, 1395)];
+ char unused5 [ISODCL (1396, 2048)];
+};
+
+/* Almost the same as the primary descriptor but two fields are specified */
+struct iso_supplementary_descriptor {
+ char type [ISODCL ( 1, 1)]; /* 711 */
+ char id [ISODCL ( 2, 6)];
+ char version [ISODCL ( 7, 7)]; /* 711 */
+ char flags [ISODCL ( 8, 8)]; /* 853 */
+ char system_id [ISODCL ( 9, 40)]; /* achars */
+ char volume_id [ISODCL ( 41, 72)]; /* dchars */
+ char unused2 [ISODCL ( 73, 80)];
+ char volume_space_size [ISODCL ( 81, 88)]; /* 733 */
+ char escape [ISODCL ( 89, 120)]; /* 856 */
+ char volume_set_size [ISODCL (121, 124)]; /* 723 */
+ char volume_sequence_number [ISODCL (125, 128)]; /* 723 */
+ char logical_block_size [ISODCL (129, 132)]; /* 723 */
+ char path_table_size [ISODCL (133, 140)]; /* 733 */
+ char type_l_path_table [ISODCL (141, 144)]; /* 731 */
+ char opt_type_l_path_table [ISODCL (145, 148)]; /* 731 */
+ char type_m_path_table [ISODCL (149, 152)]; /* 732 */
+ char opt_type_m_path_table [ISODCL (153, 156)]; /* 732 */
+ char root_directory_record [ISODCL (157, 190)]; /* 9.1 */
+ char volume_set_id [ISODCL (191, 318)]; /* dchars */
+ char publisher_id [ISODCL (319, 446)]; /* achars */
+ char preparer_id [ISODCL (447, 574)]; /* achars */
+ char application_id [ISODCL (575, 702)]; /* achars */
+ char copyright_file_id [ISODCL (703, 739)]; /* 7.5 dchars */
+ char abstract_file_id [ISODCL (740, 776)]; /* 7.5 dchars */
+ char bibliographic_file_id [ISODCL (777, 813)]; /* 7.5 dchars */
+ char creation_date [ISODCL (814, 830)]; /* 8.4.26.1 */
+ char modification_date [ISODCL (831, 847)]; /* 8.4.26.1 */
+ char expiration_date [ISODCL (848, 864)]; /* 8.4.26.1 */
+ char effective_date [ISODCL (865, 881)]; /* 8.4.26.1 */
+ char file_structure_version [ISODCL (882, 882)]; /* 711 */
+ char unused4 [ISODCL (883, 883)];
+ char application_data [ISODCL (884, 1395)];
+ char unused5 [ISODCL (1396, 2048)];
+};
+
+
+#define HS_STANDARD_ID "CDROM"
+
+struct hs_volume_descriptor {
+ char foo [ISODCL ( 1, 8)]; /* 733 */
+ char type [ISODCL ( 9, 9)]; /* 711 */
+ char id [ISODCL ( 10, 14)];
+ char version [ISODCL ( 15, 15)]; /* 711 */
+ char data[ISODCL(16,2048)];
+};
+
+
+struct hs_primary_descriptor {
+ char foo [ISODCL ( 1, 8)]; /* 733 */
+ char type [ISODCL ( 9, 9)]; /* 711 */
+ char id [ISODCL ( 10, 14)];
+ char version [ISODCL ( 15, 15)]; /* 711 */
+ char unused1 [ISODCL ( 16, 16)]; /* 711 */
+ char system_id [ISODCL ( 17, 48)]; /* achars */
+ char volume_id [ISODCL ( 49, 80)]; /* dchars */
+ char unused2 [ISODCL ( 81, 88)]; /* 733 */
+ char volume_space_size [ISODCL ( 89, 96)]; /* 733 */
+ char unused3 [ISODCL ( 97, 128)]; /* 733 */
+ char volume_set_size [ISODCL (129, 132)]; /* 723 */
+ char volume_sequence_number [ISODCL (133, 136)]; /* 723 */
+ char logical_block_size [ISODCL (137, 140)]; /* 723 */
+ char path_table_size [ISODCL (141, 148)]; /* 733 */
+ char type_l_path_table [ISODCL (149, 152)]; /* 731 */
+ char unused4 [ISODCL (153, 180)]; /* 733 */
+ char root_directory_record [ISODCL (181, 214)]; /* 9.1 */
+};
+
+/* We use this to help us look up the parent inode numbers. */
+
+struct iso_path_table{
+ unsigned char name_len[2]; /* 721 */
+ char extent[4]; /* 731 */
+ char parent[2]; /* 721 */
+ char name[0];
+};
+
+/* high sierra is identical to iso, except that the date is only 6 bytes, and
+ there is an extra reserved byte after the flags */
+
+struct iso_directory_record {
+ char length [ISODCL (1, 1)]; /* 711 */
+ char ext_attr_length [ISODCL (2, 2)]; /* 711 */
+ char extent [ISODCL (3, 10)]; /* 733 */
+ char size [ISODCL (11, 18)]; /* 733 */
+ char date [ISODCL (19, 25)]; /* 7 by 711 */
+ char flags [ISODCL (26, 26)];
+ char file_unit_size [ISODCL (27, 27)]; /* 711 */
+ char interleave [ISODCL (28, 28)]; /* 711 */
+ char volume_sequence_number [ISODCL (29, 32)]; /* 723 */
+ unsigned char name_len [ISODCL (33, 33)]; /* 711 */
+ char name [0];
+};
+
+#define ISOFS_BLOCK_BITS 11
+#define ISOFS_BLOCK_SIZE 2048
+
+#define ISOFS_BUFFER_SIZE(INODE) ((INODE)->i_sb->s_blocksize)
+#define ISOFS_BUFFER_BITS(INODE) ((INODE)->i_sb->s_blocksize_bits)
+#define ISOFS_ZONE_BITS(INODE) ((INODE)->i_sb->u.isofs_sb.s_log_zone_size)
+
+#define ISOFS_SUPER_MAGIC 0x9660
+
+extern int isonum_711(char *);
+extern int isonum_712(char *);
+extern int isonum_721(char *);
+extern int isonum_722(char *);
+extern int isonum_723(char *);
+extern int isonum_731(char *);
+extern int isonum_732(char *);
+extern int isonum_733(char *);
+
+
+#endif
Added: trunk/yaboot/include/linux/stat.h
===================================================================
--- trunk/yaboot/include/linux/stat.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/linux/stat.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,45 @@
+#ifndef _LINUX_STAT_H
+#define _LINUX_STAT_H
+
+#define S_IFMT 00170000
+#define S_IFSOCK 0140000
+#define S_IFLNK 0120000
+#define S_IFREG 0100000
+#define S_IFBLK 0060000
+#define S_IFDIR 0040000
+#define S_IFCHR 0020000
+#define S_IFIFO 0010000
+#define S_ISUID 0004000
+#define S_ISGID 0002000
+#define S_ISVTX 0001000
+
+#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+
+#define S_IRWXU 00700
+#define S_IRUSR 00400
+#define S_IWUSR 00200
+#define S_IXUSR 00100
+
+#define S_IRWXG 00070
+#define S_IRGRP 00040
+#define S_IWGRP 00020
+#define S_IXGRP 00010
+
+#define S_IRWXO 00007
+#define S_IROTH 00004
+#define S_IWOTH 00002
+#define S_IXOTH 00001
+
+#define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO)
+#define S_IALLUGO (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO)
+#define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH)
+#define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH)
+#define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH)
+
+#endif
Added: trunk/yaboot/include/linux/types.h
===================================================================
--- trunk/yaboot/include/linux/types.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/linux/types.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+#include "../types.h"
\ No newline at end of file
Added: trunk/yaboot/include/mac-part.h
===================================================================
--- trunk/yaboot/include/mac-part.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/mac-part.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,58 @@
+/*
+ * mac-part.h - Structure of Apple partition tables
+ *
+ * Copyright (C) 1996 Paul Mackerras
+ *
+ * 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.
+ */
+
+#define MAC_PARTITION_MAGIC 0x504d
+
+/* type field value for A/UX or other Unix partitions */
+#define APPLE_AUX_TYPE "Apple_UNIX_SVR2"
+
+struct mac_partition {
+ __u16 signature; /* expected to be MAC_PARTITION_MAGIC */
+ __u16 res1;
+ __u32 map_count; /* # blocks in partition map */
+ __u32 start_block; /* absolute starting block # of partition */
+ __u32 block_count; /* number of blocks in partition */
+ char name[32]; /* partition name */
+ char type[32]; /* string type description */
+ __u32 data_start; /* rel block # of first data block */
+ __u32 data_count; /* number of data blocks */
+ __u32 status; /* partition status */
+ __u32 boot_start; /* logical start block no. of bootstrap */
+ __u32 boot_size; /* no. of bytes in bootstrap */
+ __u32 boot_load; /* bootstrap load address in memory */
+ __u32 boot_load2; /* reserved for extension of boot_load */
+ __u32 boot_entry; /* entry point address for bootstrap */
+ __u32 boot_entry2; /* reserved for extension of boot_entry */
+ __u32 boot_cksum;
+ char processor[16]; /* name of processor that boot is for */
+};
+
+/* Bit in status field */
+#define STATUS_BOOTABLE 8 /* partition is bootable */
+
+#define MAC_DRIVER_MAGIC 0x4552
+
+/* Driver descriptor structure, in block 0 */
+struct mac_driver_desc {
+ __u16 signature; /* expected to be MAC_DRIVER_MAGIC */
+ __u16 block_size;
+ __u32 block_count;
+ /* ... more stuff */
+};
Added: trunk/yaboot/include/md5.h
===================================================================
--- trunk/yaboot/include/md5.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/md5.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,30 @@
+/* md5.h - an implementation of the MD5 algorithm and MD5 crypt */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * 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 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.
+ */
+
+/* If CHECK is true, check a password for correctness. Returns 0
+ if password was correct, and a value != 0 for error, similarly
+ to strcmp.
+ If CHECK is false, crypt KEY and save the result in CRYPTED.
+ CRYPTED must have a salt. */
+extern int md5_password (const char *key, char *crypted, int check);
+
+/* For convenience. */
+#define check_md5_password(key,crypted) md5_password((key), (crypted), 1)
+#define make_md5_password(key,crypted) md5_password((key), (crypted), 0)
Added: trunk/yaboot/include/partition.h
===================================================================
--- trunk/yaboot/include/partition.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/partition.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,49 @@
+/*
+ * partition.h - partition table support
+ *
+ * Copyright (C) 2001 Ethan Benson
+ *
+ * Copyright (C) 1999 Benjamin Herrenschmidt
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef PARTITION_H
+#define PARTITION_H
+
+struct partition_t;
+
+#include "types.h"
+#include "stddef.h"
+#include "prom.h"
+
+#define MAX_PARTITIONS 32
+#define MAX_PART_NAME 32
+
+struct partition_t {
+ struct partition_t* next;
+ int part_number;
+ char part_type[MAX_PART_NAME];
+ char part_name[MAX_PART_NAME];
+ unsigned long part_start; /* In blocks */
+ unsigned long part_size; /* In blocks */
+ unsigned short blocksize;
+};
+
+extern struct partition_t* partitions_lookup(const char *device);
+extern char *get_part_type(char *device, int partition);
+extern void partitions_free(struct partition_t* list);
+
+#endif
Added: trunk/yaboot/include/prom.h
===================================================================
--- trunk/yaboot/include/prom.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/prom.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,116 @@
+/*
+ * prom.h - Routines for talking to the Open Firmware PROM
+ *
+ * Copyright (C) 2001 Ethan Benson
+ *
+ * Copyright (C) 1999 Benjamin Herrenschmidt
+ *
+ * Copyright (C) 1999 Marius Vollmer
+ *
+ * Copyright (C) 1996 Paul Mackerras.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef PROM_H
+#define PROM_H
+
+#include "stdarg.h"
+
+typedef void *prom_handle;
+typedef void *ihandle;
+typedef void *phandle;
+
+#define PROM_INVALID_HANDLE ((prom_handle)-1UL)
+
+struct prom_args;
+typedef int (*prom_entry)(struct prom_args *);
+
+extern void prom_init (prom_entry pe);
+
+extern prom_entry prom;
+
+/* I/O */
+
+extern prom_handle prom_stdin;
+extern prom_handle prom_stdout;
+
+prom_handle prom_open (char *spec);
+int prom_read (prom_handle file, void *buf, int len);
+int prom_write (prom_handle file, void *buf, int len);
+int prom_seek (prom_handle file, int pos);
+int prom_lseek (prom_handle file, unsigned long long pos);
+int prom_readblocks (prom_handle file, int blockNum, int blockCount, void *buffer);
+void prom_close (prom_handle file);
+int prom_getblksize (prom_handle file);
+int prom_loadmethod (prom_handle device, void* addr);
+
+#define K_UP 0x141
+#define K_DOWN 0x142
+#define K_LEFT 0x144
+#define K_RIGHT 0x143
+
+int prom_getchar ();
+void prom_putchar (char);
+int prom_nbgetchar();
+
+#ifdef __GNUC__
+void prom_vprintf (char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0)));
+void prom_fprintf (prom_handle dev, char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
+void prom_printf (char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
+#else
+void prom_vprintf (char *fmt, va_list ap);
+void prom_fprintf (prom_handle dev, char *fmt, ...);
+void prom_printf (char *fmt, ...);
+#endif
+
+void prom_perror (int error, char *filename);
+void prom_readline (char *prompt, char *line, int len);
+int prom_set_color(prom_handle device, int color, int r, int g, int b);
+
+/* memory */
+
+void *prom_claim (void *virt, unsigned int size, unsigned int align);
+void prom_release(void *virt, unsigned int size);
+void prom_map (void *phys, void *virt, int size);
+
+/* packages and device nodes */
+
+prom_handle prom_finddevice (char *name);
+prom_handle prom_findpackage (char *path);
+int prom_getprop (prom_handle dev, char *name, void *buf, int len);
+int prom_get_devtype (char *device);
+
+/* misc */
+
+char *prom_getargs ();
+void prom_setargs (char *args);
+
+void prom_exit ();
+void prom_abort (char *fmt, ...);
+void prom_sleep (int seconds);
+
+int prom_interpret (char *forth);
+
+int prom_get_chosen (char *name, void *mem, int len);
+int prom_get_options (char *name, void *mem, int len);
+
+extern int prom_getms(void);
+extern void prom_pause(void);
+
+extern void *call_prom (const char *service, int nargs, int nret, ...);
+extern void *call_prom_return (const char *service, int nargs, int nret, ...);
+
+#endif
Added: trunk/yaboot/include/reiserfs/reiserfs.h
===================================================================
--- trunk/yaboot/include/reiserfs/reiserfs.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/reiserfs/reiserfs.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,405 @@
+#ifndef _REISERFS_H_
+#define _REISERFS_H_
+#include "byteorder.h"
+#include "types.h"
+
+/* ReiserFS Super Block */
+/* include/linux/reiserfs_fs_sb.h */
+#define REISERFS_MAX_SUPPORTED_VERSION 2
+#define REISERFS_SUPER_MAGIC_STRING "ReIsErFs"
+#define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs"
+#define REISERFS_MAX_TREE_HEIGHT 7
+
+struct reiserfs_super_block
+{
+ __u32 s_block_count;
+ __u32 s_free_blocks; /* free blocks count */
+ __u32 s_root_block; /* root block number */
+ __u32 s_journal_block; /* journal block number */
+ __u32 s_journal_dev; /* journal device number */
+ __u32 s_orig_journal_size; /* size of the journal */
+ __u32 s_journal_trans_max; /* max number of blocks in
+ a transaction. */
+ __u32 s_journal_block_count; /* total size of the journal.
+ can change over time */
+ __u32 s_journal_max_batch; /* max number of blocks to
+ batch into a trans */
+ __u32 s_journal_max_commit_age; /* in seconds, how old can an
+ async commit be */
+ __u32 s_journal_max_trans_age; /* in seconds, how old can a
+ transaction be */
+ __u16 s_blocksize; /* block size */
+ __u16 s_oid_maxsize; /* max size of object id array, */
+ __u16 s_oid_cursize; /* current size of obj id array */
+ __u16 s_state; /* valid or error */
+ char s_magic[12]; /* reiserfs magic string indicates
+ that file system is reiserfs */
+ __u32 s_hash_function_code; /* indicate, what hash function is
+ being use to sort names in a
+ directory */
+ __u16 s_tree_height; /* height of disk tree */
+ __u16 s_bmap_nr; /* amount of bitmap blocks needed
+ to address each block of file
+ system */
+ __u16 s_version;
+ __u16 s_marked_in_use;
+ __u16 s_inode_generation;
+ char s_unused[124]; /* zero filled by mkreiserfs */
+ char padding_to_quad[ 2 ]; /* aligned to __u32 */
+} __attribute__ ((__packed__));
+#define SB_SIZE (sizeof (struct reiserfs_super_block) )
+
+/* ReiserFS Journal */
+/* include/linux/reiserfs_fs.h */
+/* must be correct to keep the desc and commit structs at 4k */
+#define JOURNAL_TRANS_HALF 1018
+
+/* first block written in a commit */
+struct reiserfs_journal_desc {
+ __u32 j_trans_id; /* id of commit */
+ __u32 j_len; /* length of commit. len +1 is the
+ commit block */
+ __u32 j_mount_id; /* mount id of this trans*/
+ __u32 j_realblock[JOURNAL_TRANS_HALF]; /* real locations for each block */
+ char j_magic[12];
+};
+
+/* last block written in a commit */
+struct reiserfs_journal_commit {
+ __u32 j_trans_id; /* must match j_trans_id from the
+ desc block */
+ __u32 j_len; /* ditto */
+ __u32 j_realblock[JOURNAL_TRANS_HALF]; /* real locations for each block */
+ char j_digest[16]; /* md5 sum of all the blocks
+ involved, including desc and
+ commit. not used, kill it */
+};
+
+/*
+** This header block gets written whenever a transaction is considered
+** fully flushed, and is more recent than the last fully flushed
+** transaction. fully flushed means all the log blocks and all the real
+** blocks are on disk, and this transaction does not need to be replayed.
+*/
+struct reiserfs_journal_header {
+ __u32 j_last_flush_trans_id; /* id of last fully flushed transaction */
+ __u32 j_first_unflushed_offset; /* offset in the log of where to start
+ replay after a crash */
+ __u32 j_mount_id;
+};
+
+/* Magic to find journal descriptors */
+#define JOURNAL_DESC_MAGIC "ReIsErLB"
+
+/* ReiserFS Tree structures/accessors */
+/* Item version determines which offset_v# struct to use */
+#define ITEM_VERSION_1 0
+#define ITEM_VERSION_2 1
+#define IH_KEY_OFFSET(ih) ((INFO->version < 2 \
+ || ih_version(ih) == ITEM_VERSION_1) \
+ ? le32_to_cpu ((ih)->ih_key.u.k_offset_v1.k_offset) \
+ : offset_v2_k_offset(&(ih)->ih_key.u.k_offset_v2))
+
+#define IH_KEY_ISTYPE(ih, type) ((INFO->version < 2 \
+ || ih_version(ih) == ITEM_VERSION_1) \
+ ? le32_to_cpu((ih)->ih_key.u.k_offset_v1.k_uniqueness) == V1_##type \
+ : offset_v2_k_type(&(ih)->ih_key.u.k_offset_v2) == V2_##type)
+
+//
+// directories use this key as well as old files
+//
+struct offset_v1 {
+ __u32 k_offset;
+ __u32 k_uniqueness;
+} __attribute__ ((__packed__));
+
+struct offset_v2 {
+#ifdef __LITTLE_ENDIAN
+ /* little endian version */
+ __u64 k_offset:60;
+ __u64 k_type: 4;
+#else
+ /* big endian version */
+ __u64 k_type: 4;
+ __u64 k_offset:60;
+#endif
+} __attribute__ ((__packed__));
+
+#ifndef __LITTLE_ENDIAN
+inline __u16 offset_v2_k_type( struct offset_v2 *v2 );
+inline loff_t offset_v2_k_offset( struct offset_v2 *v2 );
+#else
+# define offset_v2_k_type(v2) ((v2)->k_type)
+# define offset_v2_k_offset(v2) ((v2)->k_offset)
+#endif
+
+/* Key of an item determines its location in the S+tree, and
+ is composed of 4 components */
+struct key {
+ __u32 k_dir_id; /* packing locality: by default parent
+ directory object id */
+ __u32 k_objectid; /* object identifier */
+ union {
+ struct offset_v1 k_offset_v1;
+ struct offset_v2 k_offset_v2;
+ } __attribute__ ((__packed__)) u;
+} __attribute__ ((__packed__));
+#define KEY_SIZE (sizeof (struct key))
+
+//
+// there are 5 item types currently
+//
+#define TYPE_STAT_DATA 0
+#define TYPE_INDIRECT 1
+#define TYPE_DIRECT 2
+#define TYPE_DIRENTRY 3
+#define TYPE_ANY 15 // FIXME: comment is required
+
+//
+// in old version uniqueness field shows key type
+//
+#define V1_SD_UNIQUENESS 0
+#define V1_INDIRECT_UNIQUENESS 0xfffffffe
+#define V1_DIRECT_UNIQUENESS 0xffffffff
+#define V1_DIRENTRY_UNIQUENESS 500
+#define V1_ANY_UNIQUENESS 555 // FIXME: comment is required
+inline int uniqueness2type (__u32 uniqueness);
+
+struct item_head
+{
+ struct key ih_key; /* Everything in the tree is found by
+ searching for its key.*/
+
+ union {
+ __u16 ih_free_space_reserved; /* The free space in the last unformatted
+ node of an indirect item if this is an
+ indirect item. This equals 0xFFFF
+ iff this is a direct item or stat
+ data item. Note that the key, not
+ this field, is used to determine
+ the item type, and thus which field
+ this union contains. */
+ __u16 ih_entry_count; /* Iff this is a directory item, this
+ field equals the number of directory
+ entries in the directory item. */
+ } __attribute__ ((__packed__)) u;
+ __u16 ih_item_len; /* total size of the item body */
+ __u16 ih_item_location; /* Offset to the item within the block */
+ __u16 ih_version; /* ITEM_VERSION_[01] of key type */
+} __attribute__ ((__packed__));
+#define IH_SIZE (sizeof(struct item_head))
+
+#define ih_version(ih) le16_to_cpu((ih)->ih_version)
+#define ih_entry_count(ih) le16_to_cpu((ih)->u.ih_entry_count)
+#define ih_location(ih) le16_to_cpu((ih)->ih_item_location)
+#define ih_item_len(ih) le16_to_cpu((ih)->ih_item_len)
+
+/* Header of a disk block. More precisely, header of a formatted leaf
+ or internal node, and not the header of an unformatted node. */
+struct block_head {
+ __u16 blk_level; /* Level of a block in the tree */
+ __u16 blk_nr_item; /* Number of keys/items in a block */
+ __u16 blk_free_space; /* Block free space in bytes */
+ __u16 blk_reserved;
+ struct key blk_right_delim_key; /* kept only for compatibility */
+};
+#define BLKH_SIZE (sizeof(struct block_head))
+
+#define blkh_level(p_blkh) (le16_to_cpu((p_blkh)->blk_level))
+#define blkh_nr_item(p_blkh) (le16_to_cpu((p_blkh)->blk_nr_item))
+
+#define BLKH_LEVEL_FREE 0 /* Freed from the tree */
+#define BLKH_LEVEL_LEAF 1 /* Leaf node level*/
+
+struct disk_child {
+ __u32 dc_block_number; /* Disk child's block number */
+ __u16 dc_size; /* Disk child's used space */
+ __u16 dc_reserved;
+};
+
+#define DC_SIZE (sizeof(struct disk_child))
+#define dc_block_number(dc_p) (le32_to_cpu((dc_p)->dc_block_number))
+#define dc_size(dc_p) (le16_to_cpu((dc_p)->dc_size))
+
+/* Stat data */
+struct stat_data_v1
+{
+ __u16 sd_mode; /* file type, permissions */
+ __u16 sd_nlink; /* number of hard links */
+ __u16 sd_uid; /* owner */
+ __u16 sd_gid; /* group */
+ __u32 sd_size; /* file size */
+ __u32 sd_atime; /* time of last access */
+ __u32 sd_mtime; /* time file was last modified */
+ __u32 sd_ctime; /* time inode (stat data) was last changed
+ (except changes to sd_atime and sd_mtime) */
+ union {
+ __u32 sd_rdev;
+ __u32 sd_blocks; /* number of blocks file uses */
+ } __attribute__ ((__packed__)) u;
+ __u32 sd_first_direct_byte; /* 0 = no direct item, 1 = symlink */
+} __attribute__ ((__packed__));
+#define SD_V1_SIZE (sizeof(struct stat_data_v1))
+
+#define stat_data_v1(ih) (ih_version (ih) == ITEM_VERSION_1)
+#define sd_v1_size(sdp) (le32_to_cpu((sdp)->sd_size))
+
+/* Stat Data on disk (reiserfs version of UFS disk inode minus the
+ address blocks) */
+struct stat_data {
+ __u16 sd_mode; /* file type, permissions */
+ __u16 sd_reserved;
+ __u32 sd_nlink; /* number of hard links */
+ __u64 sd_size; /* file size */
+ __u32 sd_uid; /* owner */
+ __u32 sd_gid; /* group */
+ __u32 sd_atime; /* time of last access */
+ __u32 sd_mtime; /* time file was last modified */
+ __u32 sd_ctime; /* time inode (stat data) was last changed
+ (except changes to sd_atime and sd_mtime) */
+ __u32 sd_blocks;
+ __u32 sd_rdev;
+} __attribute__ ((__packed__));
+#define SD_V2_SIZE (sizeof(struct stat_data))
+#define stat_data_v2(ih) (ih_version (ih) == ITEM_VERSION_2)
+#define sd_v2_size(sdp) (le64_to_cpu((sdp)->sd_size))
+
+/* valid for any stat data */
+#define sd_size(ih,sdp) ((ih_version(ih) == ITEM_VERSION_2) ? \
+ sd_v2_size((struct stat_data *)sdp) : \
+ sd_v1_size((struct stat_data_v1 *)sdp))
+#define sd_mode(sdp) (le16_to_cpu((sdp)->sd_mode))
+
+struct reiserfs_de_head
+{
+ __u32 deh_offset; /* third component of the directory entry key */
+ __u32 deh_dir_id; /* objectid of the parent directory of the object,
+ that is referenced by directory entry */
+ __u32 deh_objectid; /* objectid of the object, that is referenced by
+ directory entry */
+ __u16 deh_location; /* offset of name in the whole item */
+ __u16 deh_state; /* whether 1) entry contains stat data (for future), and 2) whether entry is hidden (unlinked) */
+} __attribute__ ((__packed__));
+#define DEH_SIZE sizeof(struct reiserfs_de_head)
+
+#define deh_offset(p_deh) (le32_to_cpu((p_deh)->deh_offset))
+#define deh_dir_id(p_deh) (le32_to_cpu((p_deh)->deh_dir_id))
+#define deh_objectid(p_deh) (le32_to_cpu((p_deh)->deh_objectid))
+#define deh_location(p_deh) (le16_to_cpu((p_deh)->deh_location))
+#define deh_state(p_deh) (le16_to_cpu((p_deh)->deh_state))
+
+/* empty directory contains two entries "." and ".." and their headers */
+#define EMPTY_DIR_SIZE \
+(DEH_SIZE * 2 + ROUND_UP (strlen (".")) + ROUND_UP (strlen ("..")))
+
+/* old format directories have this size when empty */
+#define EMPTY_DIR_SIZE_V1 (DEH_SIZE * 2 + 3)
+
+#define DEH_Statdata 0 /* not used now */
+#define DEH_Visible 2
+
+/* 64 bit systems need to aligned explicitly -jdm */
+#if BITS_PER_LONG == 64
+# define ADDR_UNALIGNED_BITS (5)
+#endif
+
+#define test_bit(x,y) ext2fs_test_bit(x,y)
+
+#ifdef ADDR_UNALIGNED_BITS
+# define aligned_address(addr) ((void *)((long)(addr) & ~((1UL << ADDR_UNALIGNED_BITS) - 1)))
+# define unaligned_offset(addr) (((int)((long)(addr) & ((1 << ADDR_UNALIGNED_BITS) - 1))) << 3)
+# define set_bit_unaligned(nr, addr) set_bit((nr) + unaligned_offset(addr), aligned_address(addr))
+# define clear_bit_unaligned(nr, addr) clear_bit((nr) + unaligned_offset(addr), aligned_address(addr))
+# define test_bit_unaligned(nr, addr) test_bit((nr) + unaligned_offset(addr), aligned_address(addr))
+#else
+# define set_bit_unaligned(nr, addr) set_bit(nr, addr)
+# define clear_bit_unaligned(nr, addr) clear_bit(nr, addr)
+# define test_bit_unaligned(nr, addr) test_bit(nr, addr)
+#endif
+
+#define SD_OFFSET 0
+#define SD_UNIQUENESS 0
+#define DOT_OFFSET 1
+#define DOT_DOT_OFFSET 2
+#define DIRENTRY_UNIQUENESS 500
+
+#define V1_TYPE_STAT_DATA 0x0
+#define V1_TYPE_DIRECT 0xffffffff
+#define V1_TYPE_INDIRECT 0xfffffffe
+#define V1_TYPE_DIRECTORY_MAX 0xfffffffd
+#define V2_TYPE_STAT_DATA 0
+#define V2_TYPE_INDIRECT 1
+#define V2_TYPE_DIRECT 2
+#define V2_TYPE_DIRENTRY 3
+
+
+#define REISERFS_ROOT_OBJECTID 2
+#define REISERFS_ROOT_PARENT_OBJECTID 1
+#define REISERFS_SUPERBLOCK_BLOCK 16
+/* the spot for the super in versions 3.5 - 3.5.11 (inclusive) */
+#define REISERFS_OLD_SUPERBLOCK_BLOCK 2
+#define REISERFS_OLD_BLOCKSIZE 4096
+
+#define S_ISREG(mode) (((mode) & 0170000) == 0100000)
+#define S_ISDIR(mode) (((mode) & 0170000) == 0040000)
+#define S_ISLNK(mode) (((mode) & 0170000) == 0120000)
+#define PATH_MAX 1024 /* include/linux/limits.h */
+#define MAX_LINK_COUNT 5 /* number of symbolic links to follow */
+
+/* Cache stuff, adapted from GRUB source */
+#define FSYSREISER_CACHE_SIZE (REISERFS_MAX_TREE_HEIGHT*REISERFS_OLD_BLOCKSIZE)
+#define SECTOR_SIZE 512
+#define FSYSREISER_MIN_BLOCKSIZE SECTOR_SIZE
+#define FSYSREISER_MAX_BLOCKSIZE FSYSREISER_CACHE_SIZE / 3
+
+
+struct reiserfs_state
+{
+ /* Context */
+ struct key fileinfo;
+ struct boot_file_t *file;
+ struct item_head *current_ih;
+ char *current_item;
+ __u64 partition_offset;
+
+ /* Commonly used values, cpu order */
+ __u32 journal_block; /* Start of journal */
+ __u32 journal_block_count; /* The size of the journal */
+ __u32 journal_first_desc; /* The first valid descriptor block in journal
+ (relative to journal_block) */
+
+ __u16 version; /* The ReiserFS version. */
+ __u16 tree_depth; /* The current depth of the reiser tree. */
+ __u8 blocksize_shift; /* 1 << blocksize_shift == blocksize. */
+ __u16 blocksize; /* The reiserfs block size (power of 2) */
+
+ /* Cache */
+ __u16 cached_slots;
+ __u16 journal_transactions;
+ __u32 blocks[REISERFS_MAX_TREE_HEIGHT];
+ __u32 next_key_nr[REISERFS_MAX_TREE_HEIGHT];
+};
+
+#define ROOT ((char *)FSYS_BUF)
+#define CACHE(i) (ROOT + ((i) * INFO->blocksize))
+#define LEAF CACHE (BLKH_LEVEL_LEAF)
+
+#define BLOCKHEAD(cache) ((struct block_head *) cache)
+#define ITEMHEAD ((struct item_head *) ((int) LEAF + BLKH_SIZE))
+#define KEY(cache) ((struct key *) ((int) cache + BLKH_SIZE))
+#define DC(cache) ((struct disk_child *) \
+ ((int) cache + BLKH_SIZE + KEY_SIZE * nr_item))
+
+/*
+ * The journal cache. For each transaction it contains the number of
+ * blocks followed by the real block numbers of this transaction.
+ *
+ * If the block numbers of some transaction won't fit in this space,
+ * this list is stopped with a 0xffffffff marker and the remaining
+ * uncommitted transactions aren't cached.
+ */
+#define JOURNAL_START ((__u32 *) (FSYS_BUF + FSYSREISER_CACHE_SIZE))
+#define JOURNAL_END ((__u32 *) (FSYS_BUF + sizeof(FSYS_BUF)))
+
+
+#endif /* _REISERFS_H_ */
Added: trunk/yaboot/include/setjm2.h
===================================================================
--- trunk/yaboot/include/setjm2.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/setjm2.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,101 @@
+/* Copyright (C) 1991,92,93,94,95,96,97,98 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. */
+
+/*
+ * ISO C Standard: 4.6 NON-LOCAL JUMPS <setjmp.h>
+ */
+
+#ifndef _SETJMP_H
+#define _SETJMP_H 1
+
+#include <features.h>
+
+__BEGIN_DECLS
+
+#include <bits/setjmp.h> /* Get `__jmp_buf'. */
+#include <bits/sigset.h> /* Get `__sigset_t'. */
+
+/* Calling environment, plus possibly a saved signal mask. */
+typedef struct __jmp_buf_tag /* C++ doesn't like tagless structs. */
+ {
+ /* NOTE: The machine-dependent definitions of `__sigsetjmp'
+ assume that a `jmp_buf' begins with a `__jmp_buf'.
+ Do not move this member or add others before it. */
+ __jmp_buf __jmpbuf; /* Calling environment. */
+ int __mask_was_saved; /* Saved the signal mask? */
+ __sigset_t __saved_mask; /* Saved signal mask. */
+ } jmp_buf[1];
+
+
+/* Store the calling environment in ENV, also saving the
+ signal mask if SAVEMASK is nonzero. Return 0.
+ This is the internal name for `sigsetjmp'. */
+extern int __sigsetjmp __P ((jmp_buf __env, int __savemask));
+
+#ifndef __FAVOR_BSD
+/* Set ENV to the current position and return 0, not saving the signal mask.
+ This is just like `sigsetjmp (ENV, 0)'.
+ The ISO C standard says `setjmp' is a macro. */
+# define setjmp(env) __sigsetjmp ((env), 0)
+#else
+/* We are in 4.3 BSD-compatibility mode in which `setjmp'
+ saves the signal mask like `sigsetjmp (ENV, 1)'. */
+# define setjmp(env) __sigsetjmp ((env), 1)
+#endif /* Favor BSD. */
+
+#if defined __USE_BSD || defined __USE_XOPEN
+/* Set ENV to the current position and return 0, not saving the signal mask.
+ This is the 4.3 BSD name for ISO `setjmp'. */
+# define _setjmp(env) __sigsetjmp ((env), 0)
+#endif
+
+
+/* Jump to the environment saved in ENV, making the
+ `setjmp' call there return VAL, or 1 if VAL is 0. */
+extern void longjmp __P ((jmp_buf __env, int __val))
+ __attribute__ ((__noreturn__));
+#if defined __USE_BSD || defined __USE_XOPEN
+/* Same. Usually `_longjmp' is used with `_setjmp', which does not save
+ the signal mask. But it is how ENV was saved that determines whether
+ `longjmp' restores the mask; `_longjmp' is just an alias. */
+extern void _longjmp __P ((jmp_buf __env, int __val))
+ __attribute__ ((__noreturn__));
+#endif
+
+
+#ifdef __USE_POSIX
+/* Use the same type for `jmp_buf' and `sigjmp_buf'.
+ The `__mask_was_saved' flag determines whether
+ or not `longjmp' will restore the signal mask. */
+typedef jmp_buf sigjmp_buf;
+
+/* Store the calling environment in ENV, also saving the
+ signal mask if SAVEMASK is nonzero. Return 0. */
+# define sigsetjmp(env, savemask) __sigsetjmp ((env), (savemask))
+
+/* Jump to the environment saved in ENV, making the
+ sigsetjmp call there return VAL, or 1 if VAL is 0.
+ Restore the signal mask if that sigsetjmp call saved it.
+ This is just an alias `longjmp'. */
+extern void siglongjmp __P ((sigjmp_buf __env, int __val))
+ __attribute__ ((__noreturn__));
+#endif /* Use POSIX. */
+
+__END_DECLS
+
+#endif /* setjmp.h */
Added: trunk/yaboot/include/setjmp.h
===================================================================
--- trunk/yaboot/include/setjmp.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/setjmp.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,39 @@
+/* Copyright (C) 1997, 1998 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. */
+
+/* Define the machine-dependent type `jmp_buf'. PowerPC version. */
+
+#ifndef _SETJMP_H
+#define _SETJMP_H 1
+
+typedef long int __jmp_buf[58];
+
+typedef struct __jmp_buf_tag
+{
+ __jmp_buf __jmpbuf;
+ int __mask_was_saved;
+ int __saved_mask;
+} jmp_buf[1];
+
+
+extern int __sigsetjmp (jmp_buf __env, int __savemask);
+#define setjmp(env) __sigsetjmp ((env), 0)
+
+extern void longjmp (jmp_buf __env, int __val);
+
+#endif
\ No newline at end of file
Added: trunk/yaboot/include/stdlib.h
===================================================================
--- trunk/yaboot/include/stdlib.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/stdlib.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,24 @@
+/*
+ * include/stdlib.h
+ *
+ */
+#ifndef __STDLIB_H
+#define __STDLIB_H
+
+#include "stdarg.h"
+
+extern void malloc_init(void *bottom, unsigned long size);
+extern void malloc_dispose(void);
+
+extern void *malloc(unsigned int size);
+extern void *realloc(void *ptr, unsigned int size);
+extern void free (void *m);
+extern void mark (void **ptr);
+extern void release (void *ptr);
+
+extern int sprintf(char * buf, const char *fmt, ...);
+extern int vsprintf(char *buf, const char *fmt, va_list args);
+extern long simple_strtol(const char *cp,char **endp,unsigned int base);
+#define strtol(x,y,z) simple_strtol(x,y,z)
+
+#endif
Added: trunk/yaboot/include/string.h
===================================================================
--- trunk/yaboot/include/string.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/string.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,35 @@
+#ifndef _LINUX_STRING_H_
+#define _LINUX_STRING_H_
+
+#include "types.h"
+#include "stddef.h"
+
+extern char * ___strtok;
+extern char * strcpy(char *,const char *);
+extern char * strncpy(char *,const char *, size_t);
+extern char * strcat(char *, const char *);
+extern char * strncat(char *, const char *, size_t);
+extern char * strchr(const char *,int);
+extern char * strrchr(const char *,int);
+extern char * strpbrk(const char *,const char *);
+extern char * strtok(char *,const char *);
+extern char * strstr(const char *,const char *);
+extern size_t strlen(const char *);
+extern size_t strspn(const char *,const char *);
+extern int strcmp(const char *,const char *);
+extern int strncmp(const char *,const char *,size_t);
+extern int strnicmp(const char *, const char *, size_t);
+extern char *strdup(char const *str);
+
+extern void * memset(void *,int,size_t);
+extern void * memcpy(void *,const void *,size_t);
+extern void * memmove(void *,const void *,size_t);
+extern void * memscan(void *,int,size_t);
+extern int memcmp(const void *,const void *,size_t);
+
+static inline size_t strnlen(const char *s,size_t max)
+{
+ size_t sz = strlen(s);
+ return sz > max ? max : sz;
+}
+#endif /* _LINUX_STRING_H_ */
Added: trunk/yaboot/include/swab.h
===================================================================
--- trunk/yaboot/include/swab.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/swab.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,25 @@
+#ifndef _REISERFS_SWAB_H_
+#define _REISERFS_SWAB_H_
+/* Stolen from linux/include/linux/byteorder/swab.h */
+#define swab16(x) \
+ ((__u16)( \
+ (((__u16)(x) & (__u16)0x00ffU) << 8) | \
+ (((__u16)(x) & (__u16)0xff00U) >> 8) ))
+#define swab32(x) \
+ ((__u32)( \
+ (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
+ (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
+ (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
+ (((__u32)(x) & (__u32)0xff000000UL) >> 24) ))
+#define swab64(x) \
+ ((__u64)( \
+ (__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
+ (__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
+ (__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
+ (__u64)(((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \
+ (__u64)(((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \
+ (__u64)(((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \
+ (__u64)(((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \
+ (__u64)(((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56) ))
+
+#endif /* _REISERFS_SWAB_H_ */
Added: trunk/yaboot/include/types.h
===================================================================
--- trunk/yaboot/include/types.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/types.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,60 @@
+#ifndef __TYPES_H
+#define __TYPES_H
+
+typedef __signed__ char __s8;
+typedef unsigned char __u8;
+
+typedef __signed__ short __s16;
+typedef unsigned short __u16;
+
+typedef __signed__ int __s32;
+typedef unsigned int __u32;
+
+typedef __signed__ long long __s64;
+typedef unsigned long long __u64;
+
+typedef signed char s8;
+typedef unsigned char u8;
+
+typedef signed short s16;
+typedef unsigned short u16;
+
+typedef signed int s32;
+typedef unsigned int u32;
+
+typedef signed long long s64;
+typedef unsigned long long u64;
+
+#define BITS_PER_LONG 32
+
+/* bsd */
+typedef unsigned char u_char;
+typedef unsigned short u_short;
+typedef unsigned int u_int;
+typedef unsigned long u_long;
+
+/* sysv */
+typedef unsigned char unchar;
+typedef unsigned short ushort;
+typedef unsigned int uint;
+typedef unsigned long ulong;
+
+typedef __u8 u_int8_t;
+typedef __s8 int8_t;
+typedef __u16 u_int16_t;
+typedef __s16 int16_t;
+typedef __u32 u_int32_t;
+typedef __s32 int32_t;
+
+typedef __u8 uint8_t;
+typedef __u16 uint16_t;
+typedef __u32 uint32_t;
+
+typedef __u64 uint64_t;
+typedef __u64 u_int64_t;
+typedef __s64 int64_t;
+
+typedef unsigned int ino_t;
+typedef __u64 loff_t;
+
+#endif
Added: trunk/yaboot/include/xfs/xfs.h
===================================================================
--- trunk/yaboot/include/xfs/xfs.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/xfs/xfs.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,545 @@
+/*
+ * xfs.h - an extraction from xfsprogs-1.3.5/include/xfs* into one file
+ *
+ * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Further, this software is distributed without any warranty that it is
+ * free of the rightful claim of any third person regarding infringement
+ * or the like. Any license provided herein, whether implied or
+ * otherwise, applies only to this software file. Patent licenses, if
+ * any, provided herein do not apply to combinations of this program with
+ * other software, or any other product whatsoever.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write the Free Software Foundation, Inc., 59
+ * Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
+ * Mountain View, CA 94043, or:
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
+ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
+ */
+
+#ifndef _BITS_TYPES_H
+typedef signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef short __int16_t;
+typedef unsigned short __uint16_t;
+typedef int __int32_t;
+typedef unsigned int __uint32_t;
+typedef long long __int64_t;
+typedef unsigned long long __uint64_t;
+#endif
+
+typedef __uint64_t xfs_ino_t;
+typedef __uint32_t xfs_agino_t;
+typedef __int64_t xfs_daddr_t;
+typedef __int64_t xfs_off_t;
+typedef __uint8_t uuid_t[16];
+
+
+/* those are from xfs_types.h */
+
+typedef __uint32_t xfs_agblock_t; /* blockno in alloc. group */
+typedef __uint32_t xfs_extlen_t; /* extent length in blocks */
+typedef __uint32_t xfs_agnumber_t; /* allocation group number */
+typedef __int32_t xfs_extnum_t; /* # of extents in a file */
+typedef __int16_t xfs_aextnum_t; /* # extents in an attribute fork */
+typedef __int64_t xfs_fsize_t; /* bytes in a file */
+
+typedef __uint32_t xfs_dablk_t; /* dir/attr block number (in file) */
+typedef __uint32_t xfs_dahash_t; /* dir/attr hash value */
+
+/*
+ * Disk based types:
+ */
+typedef __uint64_t xfs_dfsbno_t; /* blockno in filesystem (agno|agbno) */
+typedef __uint64_t xfs_drfsbno_t; /* blockno in filesystem (raw) */
+typedef __uint64_t xfs_drtbno_t; /* extent (block) in realtime area */
+typedef __uint64_t xfs_dfiloff_t; /* block number in a file */
+
+typedef __uint64_t xfs_fsblock_t; /* blockno in filesystem (agno|agbno) */
+typedef __uint64_t xfs_fileoff_t; /* block number in a file */
+typedef __uint64_t xfs_filblks_t; /* number of blocks in a file */
+
+
+/* those are from xfs_sb.h */
+
+#define XFS_SB_MAGIC 0x58465342 /* 'XFSB'*/
+#define XFS_SB_VERSION_4 4 /* 6.2+ - bitmask version */
+#define XFS_SB_VERSION_NUMBITS 0x000f
+
+typedef struct xfs_sb
+{
+ __uint32_t sb_magicnum; /* magic number == XFS_SB_MAGIC */
+ __uint32_t sb_blocksize; /* logical block size, bytes */
+ xfs_drfsbno_t sb_dblocks; /* number of data blocks */
+ xfs_drfsbno_t sb_rblocks; /* number of realtime blocks */
+ xfs_drtbno_t sb_rextents; /* number of realtime extents */
+ uuid_t sb_uuid; /* file system unique id */
+ xfs_dfsbno_t sb_logstart; /* starting block of log if internal */
+ xfs_ino_t sb_rootino; /* root inode number */
+ xfs_ino_t sb_rbmino; /* bitmap inode for realtime extents */
+ xfs_ino_t sb_rsumino; /* summary inode for rt bitmap */
+ xfs_agblock_t sb_rextsize; /* realtime extent size, blocks */
+ xfs_agblock_t sb_agblocks; /* size of an allocation group */
+ xfs_agnumber_t sb_agcount; /* number of allocation groups */
+ xfs_extlen_t sb_rbmblocks; /* number of rt bitmap blocks */
+ xfs_extlen_t sb_logblocks; /* number of log blocks */
+ __uint16_t sb_versionnum; /* header version == XFS_SB_VERSION */
+ __uint16_t sb_sectsize; /* volume sector size, bytes */
+ __uint16_t sb_inodesize; /* inode size, bytes */
+ __uint16_t sb_inopblock; /* inodes per block */
+ char sb_fname[12]; /* file system name */
+ __uint8_t sb_blocklog; /* log2 of sb_blocksize */
+ __uint8_t sb_sectlog; /* log2 of sb_sectsize */
+ __uint8_t sb_inodelog; /* log2 of sb_inodesize */
+ __uint8_t sb_inopblog; /* log2 of sb_inopblock */
+ __uint8_t sb_agblklog; /* log2 of sb_agblocks (rounded up) */
+ __uint8_t sb_rextslog; /* log2 of sb_rextents */
+ __uint8_t sb_inprogress; /* mkfs is in progress, don't mount */
+ __uint8_t sb_imax_pct; /* max % of fs for inode space */
+ /* statistics */
+ /*
+ * These fields must remain contiguous. If you really
+ * want to change their layout, make sure you fix the
+ * code in xfs_trans_apply_sb_deltas().
+ */
+ __uint64_t sb_icount; /* allocated inodes */
+ __uint64_t sb_ifree; /* free inodes */
+ __uint64_t sb_fdblocks; /* free data blocks */
+ __uint64_t sb_frextents; /* free realtime extents */
+ /*
+ * End contiguous fields.
+ */
+ xfs_ino_t sb_uquotino; /* user quota inode */
+ xfs_ino_t sb_gquotino; /* group quota inode */
+ __uint16_t sb_qflags; /* quota flags */
+ __uint8_t sb_flags; /* misc. flags */
+ __uint8_t sb_shared_vn; /* shared version number */
+ xfs_extlen_t sb_inoalignmt; /* inode chunk alignment, fsblocks */
+ __uint32_t sb_unit; /* stripe or raid unit */
+ __uint32_t sb_width; /* stripe or raid width */
+ __uint8_t sb_dirblklog; /* log2 of dir block size (fsbs) */
+ __uint8_t sb_dummy[7]; /* padding */
+} xfs_sb_t;
+
+
+/* those are from xfs_btree.h */
+
+/*
+ * Long form header: bmap btrees.
+ */
+typedef struct xfs_btree_lblock
+{
+ __uint32_t bb_magic; /* magic number for block type */
+ __uint16_t bb_level; /* 0 is a leaf */
+ __uint16_t bb_numrecs; /* current # of data records */
+ xfs_dfsbno_t bb_leftsib; /* left sibling block or NULLDFSBNO */
+ xfs_dfsbno_t bb_rightsib; /* right sibling block or NULLDFSBNO */
+} xfs_btree_lblock_t;
+
+/*
+ * Combined header and structure, used by common code.
+ */
+typedef struct xfs_btree_hdr
+{
+ __uint32_t bb_magic; /* magic number for block type */
+ __uint16_t bb_level; /* 0 is a leaf */
+ __uint16_t bb_numrecs; /* current # of data records */
+} xfs_btree_hdr_t;
+
+typedef struct xfs_btree_block
+{
+ xfs_btree_hdr_t bb_h; /* header */
+ union {
+ struct {
+ xfs_agblock_t bb_leftsib;
+ xfs_agblock_t bb_rightsib;
+ } s; /* short form pointers */
+ struct {
+ xfs_dfsbno_t bb_leftsib;
+ xfs_dfsbno_t bb_rightsib;
+ } l; /* long form pointers */
+ } bb_u; /* rest */
+} xfs_btree_block_t;
+
+/* those are from xfs_bmap_btree.h */
+
+/*
+ * Bmap root header, on-disk form only.
+ */
+typedef struct xfs_bmdr_block
+{
+ __uint16_t bb_level; /* 0 is a leaf */
+ __uint16_t bb_numrecs; /* current # of data records */
+} xfs_bmdr_block_t;
+
+/*
+ * Bmap btree record and extent descriptor.
+ * For 32-bit kernels,
+ * l0:31 is an extent flag (value 1 indicates non-normal).
+ * l0:0-30 and l1:9-31 are startoff.
+ * l1:0-8, l2:0-31, and l3:21-31 are startblock.
+ * l3:0-20 are blockcount.
+ * For 64-bit kernels,
+ * l0:63 is an extent flag (value 1 indicates non-normal).
+ * l0:9-62 are startoff.
+ * l0:0-8 and l1:21-63 are startblock.
+ * l1:0-20 are blockcount.
+ */
+
+#define BMBT_USE_64 1
+
+typedef struct xfs_bmbt_rec_32
+{
+ __uint32_t l0, l1, l2, l3;
+} xfs_bmbt_rec_32_t;
+typedef struct xfs_bmbt_rec_64
+{
+ __uint64_t l0, l1;
+} xfs_bmbt_rec_64_t;
+
+#if BMBT_USE_64
+typedef __uint64_t xfs_bmbt_rec_base_t; /* use this for casts */
+typedef xfs_bmbt_rec_64_t xfs_bmbt_rec_t, xfs_bmdr_rec_t;
+#else /* !BMBT_USE_64 */
+typedef __uint32_t xfs_bmbt_rec_base_t; /* use this for casts */
+typedef xfs_bmbt_rec_32_t xfs_bmbt_rec_t, xfs_bmdr_rec_t;
+#endif /* BMBT_USE_64 */
+
+/*
+ * Key structure for non-leaf levels of the tree.
+ */
+typedef struct xfs_bmbt_key
+{
+ xfs_dfiloff_t br_startoff; /* starting file offset */
+} xfs_bmbt_key_t, xfs_bmdr_key_t;
+
+typedef xfs_dfsbno_t xfs_bmbt_ptr_t, xfs_bmdr_ptr_t; /* btree pointer type */
+ /* btree block header type */
+typedef struct xfs_btree_lblock xfs_bmbt_block_t;
+
+
+/* those are from xfs_dir2.h */
+/*
+ * Directory version 2.
+ * There are 4 possible formats:
+ * shortform
+ * single block - data with embedded leaf at the end
+ * multiple data blocks, single leaf+freeindex block
+ * data blocks, node&leaf blocks (btree), freeindex blocks
+ *
+ * The shortform format is in xfs_dir2_sf.h.
+ * The single block format is in xfs_dir2_block.h.
+ * The data block format is in xfs_dir2_data.h.
+ * The leaf and freeindex block formats are in xfs_dir2_leaf.h.
+ * Node blocks are the same as the other version, in xfs_da_btree.h.
+ */
+
+/*
+ * Byte offset in data block and shortform entry.
+ */
+typedef __uint16_t xfs_dir2_data_off_t;
+
+/*
+ * Byte offset in a directory.
+ */
+typedef xfs_off_t xfs_dir2_off_t;
+
+/* those are from xfs_da_btree.h */
+/*========================================================================
+ * Directory Structure when greater than XFS_LBSIZE(mp) bytes.
+ *========================================================================*/
+
+/*
+ * This structure is common to both leaf nodes and non-leaf nodes in the Btree.
+ *
+ * Is is used to manage a doubly linked list of all blocks at the same
+ * level in the Btree, and to identify which type of block this is.
+ */
+#define XFS_DIR2_LEAF1_MAGIC 0xd2f1 /* magic number: v2 dirlf single blks */
+#define XFS_DIR2_LEAFN_MAGIC 0xd2ff /* magic number: v2 dirlf multi blks */
+
+typedef struct xfs_da_blkinfo {
+ xfs_dablk_t forw; /* previous block in list */
+ xfs_dablk_t back; /* following block in list */
+ __uint16_t magic; /* validity check on block */
+ __uint16_t pad; /* unused */
+} xfs_da_blkinfo_t;
+
+/*
+ * This is the structure of the root and intermediate nodes in the Btree.
+ * The leaf nodes are defined above.
+ *
+ * Entries are not packed.
+ *
+ * Since we have duplicate keys, use a binary search but always follow
+ * all match in the block, not just the first match found.
+ */
+
+typedef struct xfs_da_intnode {
+ struct xfs_da_node_hdr { /* constant-structure header block */
+ xfs_da_blkinfo_t info; /* block type, links, etc. */
+ __uint16_t count; /* count of active entries */
+ __uint16_t level; /* level above leaves (leaf == 0) */
+ } hdr;
+ struct xfs_da_node_entry {
+ xfs_dahash_t hashval; /* hash value for this descendant */
+ xfs_dablk_t before; /* Btree block before this key */
+ } btree[1]; /* variable sized array of keys */
+} xfs_da_intnode_t;
+
+
+/* those are from xfs_dir2_data.h */
+/*
+ * Directory format 2, data block structures.
+ */
+
+/*
+ * Constants.
+ */
+#define XFS_DIR2_DATA_FREE_TAG 0xffff
+#define XFS_DIR2_DATA_FD_COUNT 3
+
+/*
+ * Structures.
+ */
+
+/*
+ * Describe a free area in the data block.
+ * The freespace will be formatted as a xfs_dir2_data_unused_t.
+ */
+typedef struct xfs_dir2_data_free {
+ xfs_dir2_data_off_t offset; /* start of freespace */
+ xfs_dir2_data_off_t length; /* length of freespace */
+} xfs_dir2_data_free_t;
+
+/*
+ * Header for the data blocks.
+ * Always at the beginning of a directory-sized block.
+ * The code knows that XFS_DIR2_DATA_FD_COUNT is 3.
+ */
+typedef struct xfs_dir2_data_hdr {
+ __uint32_t magic; /* XFS_DIR2_DATA_MAGIC */
+ /* or XFS_DIR2_BLOCK_MAGIC */
+ xfs_dir2_data_free_t bestfree[XFS_DIR2_DATA_FD_COUNT];
+} xfs_dir2_data_hdr_t;
+
+/*
+ * Active entry in a data block. Aligned to 8 bytes.
+ * Tag appears as the last 2 bytes.
+ */
+typedef struct xfs_dir2_data_entry {
+ xfs_ino_t inumber; /* inode number */
+ __uint8_t namelen; /* name length */
+ __uint8_t name[1]; /* name bytes, no null */
+ /* variable offset */
+ xfs_dir2_data_off_t tag; /* starting offset of us */
+} xfs_dir2_data_entry_t;
+
+/*
+ * Unused entry in a data block. Aligned to 8 bytes.
+ * Tag appears as the last 2 bytes.
+ */
+typedef struct xfs_dir2_data_unused {
+ __uint16_t freetag; /* XFS_DIR2_DATA_FREE_TAG */
+ xfs_dir2_data_off_t length; /* total free length */
+ /* variable offset */
+ xfs_dir2_data_off_t tag; /* starting offset of us */
+} xfs_dir2_data_unused_t;
+
+typedef union {
+ xfs_dir2_data_entry_t entry;
+ xfs_dir2_data_unused_t unused;
+} xfs_dir2_data_union_t;
+
+
+/* those are from xfs_dir2_leaf.h */
+/*
+ * Directory version 2, leaf block structures.
+ */
+
+/*
+ * Leaf block header.
+ */
+typedef struct xfs_dir2_leaf_hdr {
+ xfs_da_blkinfo_t info; /* header for da routines */
+ __uint16_t count; /* count of entries */
+ __uint16_t stale; /* count of stale entries */
+} xfs_dir2_leaf_hdr_t;
+
+
+/* those are from xfs_dir2_block.h */
+/*
+ * xfs_dir2_block.h
+ * Directory version 2, single block format structures
+ */
+
+/*
+ * The single block format is as follows:
+ * xfs_dir2_data_hdr_t structure
+ * xfs_dir2_data_entry_t and xfs_dir2_data_unused_t structures
+ * xfs_dir2_leaf_entry_t structures
+ * xfs_dir2_block_tail_t structure
+ */
+
+#define XFS_DIR2_BLOCK_MAGIC 0x58443242 /* XD2B: for one block dirs */
+
+typedef struct xfs_dir2_block_tail {
+ __uint32_t count; /* count of leaf entries */
+ __uint32_t stale; /* count of stale lf entries */
+} xfs_dir2_block_tail_t;
+
+
+/* those are from xfs_dir2_sf.h */
+
+/*
+ * Directory layout when stored internal to an inode.
+ *
+ * Small directories are packed as tightly as possible so as to
+ * fit into the literal area of the inode.
+ */
+
+/*
+ * Inode number stored as 8 8-bit values.
+ */
+typedef struct { __uint8_t i[8]; } xfs_dir2_ino8_t;
+
+/*
+ * Inode number stored as 4 8-bit values.
+ * Works a lot of the time, when all the inode numbers in a directory
+ * fit in 32 bits.
+ */
+typedef struct { __uint8_t i[4]; } xfs_dir2_ino4_t;
+
+typedef union {
+ xfs_dir2_ino8_t i8;
+ xfs_dir2_ino4_t i4;
+} xfs_dir2_inou_t;
+
+/*
+ * Normalized offset (in a data block) of the entry, really xfs_dir2_data_off_t.
+ * Only need 16 bits, this is the byte offset into the single block form.
+ */
+typedef struct { __uint8_t i[2]; } xfs_dir2_sf_off_t;
+
+/*
+ * The parent directory has a dedicated field, and the self-pointer must
+ * be calculated on the fly.
+ *
+ * Entries are packed toward the top as tightly as possible. The header
+ * and the elements must be bcopy()'d out into a work area to get correct
+ * alignment for the inode number fields.
+ */
+typedef struct xfs_dir2_sf_hdr {
+ __uint8_t count; /* count of entries */
+ __uint8_t i8count; /* count of 8-byte inode #s */
+ xfs_dir2_inou_t parent; /* parent dir inode number */
+} xfs_dir2_sf_hdr_t;
+
+typedef struct xfs_dir2_sf_entry {
+ __uint8_t namelen; /* actual name length */
+ xfs_dir2_sf_off_t offset; /* saved offset */
+ __uint8_t name[1]; /* name, variable size */
+ xfs_dir2_inou_t inumber; /* inode number, var. offset */
+} xfs_dir2_sf_entry_t;
+
+typedef struct xfs_dir2_sf {
+ xfs_dir2_sf_hdr_t hdr; /* shortform header */
+ xfs_dir2_sf_entry_t list[1]; /* shortform entries */
+} xfs_dir2_sf_t;
+
+/* those are from xfs_dinode.h */
+
+#define XFS_DINODE_VERSION_1 1
+#define XFS_DINODE_VERSION_2 2
+#define XFS_DINODE_MAGIC 0x494e /* 'IN' */
+
+/*
+ * Disk inode structure.
+ * This is just the header; the inode is expanded to fill a variable size
+ * with the last field expanding. It is split into the core and "other"
+ * because we only need the core part in the in-core inode.
+ */
+typedef struct xfs_timestamp {
+ __int32_t t_sec; /* timestamp seconds */
+ __int32_t t_nsec; /* timestamp nanoseconds */
+} xfs_timestamp_t;
+
+/*
+ * Note: Coordinate changes to this structure with the XFS_DI_* #defines
+ * below and the offsets table in xfs_ialloc_log_di().
+ */
+typedef struct xfs_dinode_core
+{
+ __uint16_t di_magic; /* inode magic # = XFS_DINODE_MAGIC */
+ __uint16_t di_mode; /* mode and type of file */
+ __int8_t di_version; /* inode version */
+ __int8_t di_format; /* format of di_c data */
+ __uint16_t di_onlink; /* old number of links to file */
+ __uint32_t di_uid; /* owner's user id */
+ __uint32_t di_gid; /* owner's group id */
+ __uint32_t di_nlink; /* number of links to file */
+ __uint16_t di_projid; /* owner's project id */
+ __uint8_t di_pad[10]; /* unused, zeroed space */
+ xfs_timestamp_t di_atime; /* time last accessed */
+ xfs_timestamp_t di_mtime; /* time last modified */
+ xfs_timestamp_t di_ctime; /* time created/inode modified */
+ xfs_fsize_t di_size; /* number of bytes in file */
+ xfs_drfsbno_t di_nblocks; /* # of direct & btree blocks used */
+ xfs_extlen_t di_extsize; /* basic/minimum extent size for file */
+ xfs_extnum_t di_nextents; /* number of extents in data fork */
+ xfs_aextnum_t di_anextents; /* number of extents in attribute fork*/
+ __uint8_t di_forkoff; /* attr fork offs, <<3 for 64b align */
+ __int8_t di_aformat; /* format of attr fork's data */
+ __uint32_t di_dmevmask; /* DMIG event mask */
+ __uint16_t di_dmstate; /* DMIG state info */
+ __uint16_t di_flags; /* random flags, XFS_DIFLAG_... */
+ __uint32_t di_gen; /* generation number */
+} xfs_dinode_core_t;
+
+typedef struct xfs_dinode
+{
+ xfs_dinode_core_t di_core;
+ xfs_agino_t di_next_unlinked;/* agi unlinked list ptr */
+ union {
+ xfs_bmdr_block_t di_bmbt; /* btree root block */
+ xfs_bmbt_rec_32_t di_bmx[1]; /* extent list */
+ xfs_dir2_sf_t di_dir2sf; /* shortform directory v2 */
+ char di_c[1]; /* local contents */
+ } di_u;
+} xfs_dinode_t;
+
+/*
+ * Values for di_format
+ */
+typedef enum xfs_dinode_fmt
+{
+ XFS_DINODE_FMT_DEV, /* CHR, BLK: di_dev */
+ XFS_DINODE_FMT_LOCAL, /* DIR, REG: di_c */
+ /* LNK: di_symlink */
+ XFS_DINODE_FMT_EXTENTS, /* DIR, REG, LNK: di_bmx */
+ XFS_DINODE_FMT_BTREE, /* DIR, REG, LNK: di_bmbt */
+ XFS_DINODE_FMT_UUID /* MNT: di_uuid */
+} xfs_dinode_fmt_t;
+
+/*
+ * File types (mode field)
+ */
+#define IFMT 0170000 /* type of file */
+#define IFDIR 0040000 /* directory */
+#define IFREG 0100000 /* regular */
+#define IFLNK 0120000 /* symbolic link */
Added: trunk/yaboot/include/yaboot.h
===================================================================
--- trunk/yaboot/include/yaboot.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/include/yaboot.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,62 @@
+/*
+ * Yaboot - secondary boot loader for Linux on PowerPC.
+ *
+ * Copyright (C) 2001 Ethan Benson
+ *
+ * Copyright (C) 1999, 2000, 2001 Benjamin Herrenschmidt
+ *
+ * IBM CHRP support
+ *
+ * Copyright (C) 2001 Peter Bergner
+ *
+ * portions based on poof
+ *
+ * Copyright (C) 1999 Marius Vollmer
+ *
+ * portions based on quik
+ *
+ * Copyright (C) 1996 Paul Mackerras.
+ *
+ * Because this program is derived from the corresponding file in the
+ * silo-0.64 distribution, it is also
+ *
+ * Copyright (C) 1996 Pete A. Zaitcev
+ * 1996 Maurizio Plaza
+ * 1996 David S. Miller
+ * 1996 Miguel de Icaza
+ * 1996 Jakub Jelinek
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __YABOOT_H__
+#define __YABOOT_H__
+
+#include "file.h"
+
+struct boot_param_t {
+ struct boot_fspec_t kernel;
+ struct boot_fspec_t rd;
+ struct boot_fspec_t sysmap;
+
+ char* args;
+};
+
+extern int useconf;
+extern char bootdevice[];
+extern char *bootpath;
+extern int bootpartition;
+
+#endif
Added: trunk/yaboot/lib/ctype.c
===================================================================
--- trunk/yaboot/lib/ctype.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/ctype.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,46 @@
+#include "string.h"
+#include "ctype.h"
+
+unsigned char _ctype[] = {
+_C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */
+_C,_C|_S,_C|_S,_C|_S,_C|_S,_C|_S,_C,_C, /* 8-15 */
+_C,_C,_C,_C,_C,_C,_C,_C, /* 16-23 */
+_C,_C,_C,_C,_C,_C,_C,_C, /* 24-31 */
+_S|_SP,_P,_P,_P,_P,_P,_P,_P, /* 32-39 */
+_P,_P,_P,_P,_P,_P,_P,_P, /* 40-47 */
+_D,_D,_D,_D,_D,_D,_D,_D, /* 48-55 */
+_D,_D,_P,_P,_P,_P,_P,_P, /* 56-63 */
+_P,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U, /* 64-71 */
+_U,_U,_U,_U,_U,_U,_U,_U, /* 72-79 */
+_U,_U,_U,_U,_U,_U,_U,_U, /* 80-87 */
+_U,_U,_U,_P,_P,_P,_P,_P, /* 88-95 */
+_P,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L, /* 96-103 */
+_L,_L,_L,_L,_L,_L,_L,_L, /* 104-111 */
+_L,_L,_L,_L,_L,_L,_L,_L, /* 112-119 */
+_L,_L,_L,_P,_P,_P,_P,_C, /* 120-127 */
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 128-143 */
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 144-159 */
+_S|_SP,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P, /* 160-175 */
+_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P, /* 176-191 */
+_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U, /* 192-207 */
+_U,_U,_U,_U,_U,_U,_U,_P,_U,_U,_U,_U,_U,_U,_U,_L, /* 208-223 */
+_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L, /* 224-239 */
+_L,_L,_L,_L,_L,_L,_L,_P,_L,_L,_L,_L,_L,_L,_L,_L}; /* 240-255 */
+
+
+int strcasecmp(const char *s1, const char *s2)
+{
+ int c1, c2;
+
+ for (;;) {
+ c1 = *s1++;
+ if ('A' <= c1 && c1 <= 'Z')
+ c1 += 'a' - 'A';
+ c2 = *s2++;
+ if ('A' <= c2 && c2 <= 'Z')
+ c2 += 'a' - 'A';
+ if (c1 != c2 || c1 == 0)
+ return c1 - c2;
+ }
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,9 @@
+build
+MCONFIG
+config.log
+config.status
+config.cache
+Makefile
+MAKELOG
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/.fix-Changelog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/.fix-Changelog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/.fix-Changelog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+FILES=`find . -name ChangeLog -print`
+
+header=/tmp/revheader
+
+for i in $FILES
+do
+ echo $i
+ cat $header $i > $i.new
+ mv $i.new $i
+done
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/.fix-Changelog
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/.head-Changelog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/.head-Changelog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/.head-Changelog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+for i in `find . -name ChangeLog -print`
+do
+ echo "=========================================="
+ echo $i
+ sed -n '1,/Release/p' $i
+done
+
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/.head-Changelog
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/.missing-copyright
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/.missing-copyright 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/.missing-copyright 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+find . -type f \! -name \*~ \! -exec grep -q Begin-Header \{\} \; -print \
+ | grep -v ^./build
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/.missing-copyright
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/.release-checklist
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/.release-checklist 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/.release-checklist 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,24 @@
+1) Do "make depend" if necessary
+
+2) "make check"!!!
+
+3) Use ./.head-Changelog to assemble release notes.
+
+4) Update files which contain version information
+ version.h
+ README
+ RELEASE-NOTES
+ e2fsprogs.lsm
+ e2fsprogs.spec
+ doc/libext2fs.texinfo (three places)
+
+5) Update ChangeLog files using ./.fix-ChangeLogs
+
+6) Make source distribution
+
+7) Build RPM files
+
+8) Build ELF and DLL binary distributions
+
+9) Adjust sizes in e2fsprogs-VER.lsm; rebuild source files; rebuild RPM files
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/ABOUT-NLS
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/ABOUT-NLS 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/ABOUT-NLS 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,298 @@
+E2fsprogs-specific notes
+************************
+
+1) NLS support is not enabled by default. In order to get NLS
+ support, use the --enable-nls option when running configure.
+
+2) The intl and po directories aren't linked into the main makefile
+ subdirectories.
+
+3) The documentation for gettext is abysmal. I hope everything is
+right, but I make no guarantees; the NLS integration is still in
+testing. (This is why it's disabled by default.)
+
+4) This ABOUT-NLS file was obtained from ftp.gnu.org in February,
+2000. Apparently this is the most recent version as of this writing,
+even though it was apparently last modified in August, 1998.
+
+
+
+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.
+
+One piece of advise in advance
+==============================
+
+ 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 or message inheritance) 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 provides
+usable `catgets' (if using this is selected by the installer) or
+`gettext' functions. If neither is available, 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 --with-catgets
+ ./configure --disable-nls
+
+will respectively bypass any pre-existing `catgets' or `gettext' to use
+the internationalizing routines provided within this package, enable
+the use of the `catgets' functions (if found on the locale system), 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.
+
+ By default the configuration process will not test for the `catgets'
+function and therefore they will not be used. The reasons are already
+given above: the emulation on top of `catgets' cannot provide all the
+extensions provided by the GNU `gettext' library. If you nevertheless
+want to use the `catgets' functions use
+
+ ./configure --with-catgets
+
+to enable the test for `catgets' (this causes no harm if `catgets' is
+not available on your system). If you really select this option we
+would like to hear about the reasons because we cannot think of any
+good one ourself.
+
+ 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
+ISO 639 `LL' two-letter code prior to using the programs in the
+package. For example, let's suppose that you speak German. At the
+shell prompt, merely execute `setenv LANG de' (in `csh'),
+`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
+can be done from your `.login' or `.profile' file, once and for all.
+
+ An operating system might already offer message localization for
+many of its programs, while other programs have been installed locally
+with the full capabilities of GNU `gettext'. Just using `gettext'
+extended syntax for `LANG' would break proper localization of already
+available operating system programs. In this case, users should set
+both `LANGUAGE' and `LANG' variables in their environment, as programs
+using GNU `gettext' give preference to `LANGUAGE'. For example, some
+Swedish users would rather read translations in German than English for
+when Swedish is not available. This is easily accomplished by setting
+`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
+
+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, courtesy of Linux
+International. You may reach your translation team at the address
+`LL at li.org', replacing LL by the two-letter ISO 639 code for your
+language. Language codes are *not* the same as the country codes given
+in ISO 3166. The following translation teams exist, as of August 1998:
+
+ Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
+ Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
+ `hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
+ Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
+ `pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
+ Swedish `sv', and Turkish `tr'.
+
+For example, you may reach the Chinese translation team by writing to
+`zh at li.org'.
+
+ 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 at 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 at 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
+1998. The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination.
+
+ Ready PO files cs da de el en es fi fr it
+ .----------------------------.
+ bash | [] [] |
+ bison | [] [] |
+ clisp | [] [] [] [] |
+ cpio | [] [] [] |
+ diffutils | [] [] [] |
+ enscript | [] [] [] [] |
+ fileutils | [] [] [] [] |
+ findutils | [] [] [] [] |
+ flex | [] [] |
+ gcal | [] [] |
+ gettext | [] [] [] [] [] |
+ grep | [] [] [] [] |
+ hello | [] [] [] [] [] |
+ id-utils | [] [] |
+ indent | [] [] |
+ libc | [] [] [] |
+ m4 | [] [] |
+ make | [] [] [] |
+ music | [] |
+ ptx | [] [] [] |
+ recode | [] [] [] [] |
+ sed | |
+ sh-utils | [] [] [] |
+ sharutils | [] [] [] [] [] |
+ tar | [] [] [] [] |
+ texinfo | [] [] [] |
+ textutils | [] [] [] [] |
+ wdiff | [] [] [] [] |
+ wget | [] [] [] [] |
+ `----------------------------'
+ cs da de el en es fi fr it
+ 7 4 26 4 1 18 1 26 4
+
+ ja ko nl no pl pt ru sl sv
+ .----------------------------.
+ bash | [] | 3
+ bison | [] | 3
+ clisp | | 4
+ cpio | [] [] [] | 6
+ diffutils | [] [] | 5
+ enscript | [] [] | 6
+ fileutils | [] [] [] [] [] [] [] | 11
+ findutils | [] [] [] [] [] | 9
+ flex | [] [] | 4
+ gcal | [] [] [] | 5
+ gettext | [] [] [] [] [] [] [] | 13
+ grep | [] [] [] [] [] [] [] | 11
+ hello | [] [] [] [] [] [] [] | 12
+ id-utils | [] | 3
+ indent | [] [] [] | 5
+ libc | [] [] [] [] [] | 8
+ m4 | [] [] [] [] | 6
+ make | [] [] [] | 6
+ music | [] | 2
+ ptx | [] [] [] [] [] | 8
+ recode | [] [] [] [] [] | 9
+ sed | | 0
+ sh-utils | [] [] [] [] [] | 8
+ sharutils | [] [] | 7
+ tar | [] [] [] [] [] [] [] | 11
+ texinfo | [] | 4
+ textutils | [] [] [] [] [] | 9
+ wdiff | [] [] [] [] | 8
+ wget | [] | 5
+ `----------------------------'
+ 18 teams ja ko nl no pl pt ru sl sv
+ 29 domains 1 12 21 11 19 7 5 7 17 191
+
+ 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 1998 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites.
+
+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 the GNU Public License applies to your sources from
+then if you include `gettext' directly in your distribution on but
+since you are writing free software anyway this is no restriction.
+
+ Once the sources are change 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 at iro.umontreal.ca' to make the `.pot' files available to
+the translation teams.
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/COPYING
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/COPYING 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/COPYING 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,851 @@
+This package, the EXT2 filesystem utilities, are protected by the GNU
+Public License, with the following exception ---
+
+ If the version string in the file version.h contains the
+ string "pre-", or "WIP" then this package must be distributed
+ in source form only. You can give a copy of the binary for
+ e2fsck to help a friend recover his or her filesystem, as the
+ need arises. However, "pre" or "WIP" indicates that this
+ release is under development, and available for ALPHA testing.
+ So for your protection as much as mine, I'd rather not have it
+ appear in a some distribution --- especially not a CD-ROM
+ distribution!
+
+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 for your
+distribution, please contact me (tytso at mit.edu), and we can see if we
+can't come to an arrangement. The release schedules for this package
+are flexible, if you give me enough lead time.
+
+
+ Theodore Ts'o
+ 26-Jul-2000
+
+----------------------------------------------------------------------
+
+ 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!
Added: trunk/yaboot/lib/e2fsprogs-1.27/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,702 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-12-24 Theodore Tso <tytso at valinux.com>
+
+ * MCONFIG.in (ALL_CFLAGS): No longer put $(top_srcdir)/include in
+ the -I search path, since we don't have any header files
+ there any more.
+
+2001-12-16 Theodore Tso <tytso at valinux.com>
+
+ * configure.in: If journal debugging is enabled, define
+ CONFIG_JBD_DEBUG instead of JFS_DEBUG.
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-27 Theodore Tso <tytso at valinux.com>
+
+ * configure.in: Check for the presence of strnlen. Stop checking
+ for strdup, since we don't actually care about that symbol
+ any more.
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-08-04 Andreas Dilger <root at lynx.adilger.int>
+
+ * Makefile.in: Add "*.orig" to "make clean" target, change
+ explicit listing of ext2_types.h in "make distclean" to
+ $(SUBS). Add $(SUBS) as a dependency to "make check"
+ target. Add $(SUBS) as a dependency to "make check"
+ target. Add -f flag to doc/Makefile $(RM) of files which
+ may not exist.
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-22 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in: Avoid including BitKeeper files into the source
+ tarball.
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-06-13 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in: Make the install target depend on $(SUBS) to
+ accomodate the fools who want to compile and install
+ e2fsprogs as root using just one command.
+
+ * Makefile.in: Don't recurse into debugfs and resize subdirectory
+ if --disable-debugfs or --disable-resizer is given as a
+ configuration option.
+
+ * configure.in: Add --disable-resizer, --disable-imager, and
+ --disable-debugfs switches, which allow people who are
+ building boot floppies to build a very restricted
+ e2fsprogs distribution. Note: these functions limit the
+ functions in the shared library, so beware!
+
+2001-06-11 Theodore Tso <tytso at valinux.com>
+
+ * configure.in: Add new switch, --disable-swapfs which disables
+ support of byte-swapping old filesystems. Add new test,
+ AC_C_BIGENDIAN, which sets WORDS_BIGENDIAN on big-endian
+ machines. Change handling of --with-ccopts so that if
+ set, the default CFLAGS is suppressed.
+
+2001-06-01 Theodore Tso <tytso at valinux.com>
+
+ * wordwrap.pl: Add some rules which help fix up the dependencies.
+
+ * Makefile.in: Move include/asm/types.h.in to
+ lib/ext2fs/ext2_types.h.in.
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in: Only exclude the top-level TODO file, not over the
+ entire tree.
+
+2001-05-19 Theodore Tso <tytso at valinux.com>
+
+ * configure.in, MCONFIG.in (LDCONFIG): Use AC_PATH_PROG to find
+ the pathname for ldconfig.
+
+2001-05-05 Theodore Tso <tytso at valinux.com>
+
+ * config.guess, config.sub: Update to use latest version from FSF
+ (2001-04-20)
+
+2001-01-11 Theodore Ts'o <tytso at valinux.com>
+
+ * Makefile.in (PROG_SUBDIRS): Build lib/e2p before lib/ext2fs
+ since libext2fs depends on libe2p.
+
+2001-01-11 <tytso at snap.thunk.org>
+
+ * MCONFIG.in: Change --enable-gcc-wall handling so that it's no
+ longer a configure option, but something which is done
+ when the developer uses the command "make gcc-wall".
+ (gcc-wall-new): Added new target which forgoes the make
+ clean so we only check the newly modified .c files.
+
+ * configure.in: Remove test for ino_t, since we don't use it any
+ more (we always use our own ext2_ino_t). Remove
+ --enable-gcc-wall support. Add test for sys/ioctl.h
+
+2001-01-05 <tytso at snap.thunk.org>
+
+ * configure.in: Add checks for the header files sys/mkdev.h and
+ sys/sysmacros.h.
+
+2000-12-08 <tytso at snap.thunk.org>
+
+ * MCONFIG.in, Makefile.in: Fix so that top-level "make check"
+ works correctly.
+
+2000-10-24 <tytso at snap.thunk.org>
+
+ * e2fsprogs.spec: Update spec file for Red Hat 7.0 compatibility
+
+ * configure.in: When compiling shared libraries for Solaris, use a
+ special-case Makefile fragment to deal with it.
+
+2000-08-18 <tytso at valinux.com>
+
+ * configure.in (JFS_DEBUG): Add support for --enable-jfs-debug
+
+2000-08-14 <tytso at valinux.com>
+
+ * e2fsprogs.spec (Summary): Add description of resize2fs to the
+ package summary.
+
+ * configure.in: Add test for sys/mount.h (required for e2fsck's
+ ext3 recovery code)
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+2000-07-13 <tytso at snap.thunk.org>
+
+ * e2fsprogs.spec: Merge in a few changes from the Red Hat 6.2 spec
+ file, now that we're using a modern rpm to build
+ e2fsprogs. Also updated version number to 1.19.
+
+2000-07-07 Theodore Ts'o <tytso at valinux.com>
+
+ * e2fsprogs.spec (%post): Remove resize2fs from its old location
+ in /usr/sbin in the postinstall script.
+
+2000-07-05 <tytso at snap.thunk.org>
+
+ * config.guess, config.sub: Update to use latest version from FSF
+ (2000-06-13)
+
+2000-05-25 <tytso at snap.thunk.org>
+
+ * Makefile.in: Fix makefile so that it's safe to build in parallel.
+
+ * configure.in: Add test for lseek64 and open64.
+
+2000-05-25 Theodore Ts'o <tytso at valinux.com>
+
+ * configure.in (DO_SUBSTITUTE_SCRIPT): Remove unneeded
+ substitution. (Left over from before we moved to use a C
+ program to do substitutions.)
+
+2000-05-18 Theodore Ts'o <tytso at valinux.com>
+
+ * e2fsprogs.spec (fsck.ext3): Add /sbin/fsck.ext3 to the spec file.
+
+2000-04-06 Theodore Ts'o <tytso at valinux.com>
+
+ * Makefile.in (source_tar_file): Remove the resize directory from
+ the list of excluded files.
+
+ * version.h: Update version header for an WIP release.
+
+ * e2fsprogs.spec: Updated for 1.19 release; added resize2fs.
+
+Thu Apr 6 17:43:11 2000 Theodore Y. Ts'o <tytso at signal.thunk.org>
+
+ * configure.in (fdatasync): Add test for fdatasync(), since not
+ all OS's have this function.
+
+2000-04-03 Theodore Ts'o <tytso at valinux.com>
+
+ * Makefile.in: Remove uneeded parenthesis around shell pipelines
+ containing a "cd" command. Use && instead of ; so that if
+ the "cd" fails, the makefile stops.
+
+ * MCONFIG.in (CPPFLAGS): Add define of CPPFLAGS from @CPPFLAGS at .
+ Remove uneeded parenthesis around shell pipelines
+ containing a "cd" command.
+
+2000-02-11 <tytso at snap.thunk.org>
+
+ * Makefile.in: Exclude the internationalization files from being
+ distributed.
+
+ * configure.in: Add support for --enable-compression. This is
+ experimental code only for now, which is why it's under
+ --enable test. Once it's stable, it will always be
+ compiled in.
+
+2000-02-11 Theodore Ts'o <tytso at valinux.com>
+
+ * configure.in: Define HAVE_EXT2_IOCTLS based solely on the OS
+ type, instead of basising on whether a test program
+ compiles. This was screwing up on some Linux kernel
+ header files, and we know the Hurd doesn't support the
+ ext2 ioctls anyway.
+
+2000-02-08 Theodore Ts'o <tytso at valinux.com>
+
+ * configure.in, aclocal.m4: Add support for GNU gettext
+ internationalization support.
+
+2000-02-02 Theodore Ts'o <tytso at valinux.com>
+
+ * MCONFIG.in: Always include src/include in the include path now.
+ This forces us to use our internally provided ext2_fs.h
+ file, for sanity's sake.
+
+ * configure.in: If linux/fs.h isn't found, then add
+ build/include into the include path only, since
+ src/include is now always included. Removed define of
+ HAVE_LINUX_FS_H, since we're not using it any more.
+ Removed i_version vs. i_generation check, since with the
+ included header file it is a permanently known quantity.
+ Removed AC_C_CROSS since it has been merged into
+ AC_PROG_CC in autoconf 2.13.
+
+2000-01-18 Theodore Ts'o <tytso at valinux.com>
+
+ * MCONFIG.in (DEPLIBUUID): Since LIBUUID can sometimes include
+ "-lsocket" we need a separate DEPLIBUUID that can be used
+ in Makefile's dependency rules.
+
+1999-11-19 <tytso at valinux.com>
+
+ * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
+ the source directory. Also, when making the .exclude file
+ for the source_tar_file, exclude those two files as well.
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-26 <tytso at valinux.com>
+
+ * configure.in: Move the code that checks for the presence of
+ Linux header files, to earlier in the config file, since
+ it adds a directory to the include path, and that needs to
+ happen before any compile tests are run. Add termios.h to
+ the headers which are checked.
+
+1999-10-25 <tytso at valinux.com>
+
+ * configure.in: Capitalized Hurd to make the GNU folks happy.
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-09-24 <tytso at valinux.com>
+
+ * configure.in (HAVE_STATE_FLAGS): Check to see if st_flags is
+ actually useful (since glibc 2.1 declares it on Alpha
+ without it being usable). Add check for signal.h
+ header file, which doesn't exist on non-unix platforms.
+
+1999-07-18 Theodore Ts'o <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.15
+
+1999-07-03 <tytso at valinux.com>
+
+ * depfix.sed: Remove all line continuations from the dependencies;
+ the word wrapping is now done by wordwrap.pl.
+
+ * MCONFIG.in (BUILD_CC):
+ * configure.in (BUILD_CC): If cross compiling, find the native C
+ compiler and set it to BUILD_CC so that we can
+ successfully build util/subst. Change default long long
+ size when cross compiling to be 8 (instead of 0). Also
+ change the Hurd's defaults so that root files are placed
+ in / instead of /usr/local.
+
+ * Makefile.in (depend): Make "make depend" at the top-level
+ automatically recurse through all subdirectories.
+
+ * configure.in: Test for perl since it's needed by wordwrap.pl
+
+ * MCONFIG.in (depend): Fix make-depend so that it the dependencies
+ are automatically word-wrapped. Added the makefile macro
+ $(PERL).
+
+ * wordwrap.pl: New file which does the word wrapping.
+
+ * MCONFIG.in (subst): Add rule to build the util/subst program if
+ necessary (by cd'ing to $(top_builddir)/util and making it.)
+
+1999-06-23 <tytso at valinux.com>
+
+ * configure.in: Check for the presence of i_generation field
+ versus i_version in the ext2_inode to support compiling
+ e2fsprogs in Linux 2.3.
+
+1999-04-17 <tytso at rsts-11.mit.edu>
+
+ * MCONFIG.in: Define man1dir, man3dir, and man8dir in terms of
+ mandir.
+
+1999-03-31 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * config.sub: Update config.sub from autoconf 2.13 so that it will
+ recognize new machine types from the Alpha.
+
+1999-03-16 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in: Add check for malloc.h and mallinfo().
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in (YEAR): Allow a 4-digit year for the version date,
+ so we can be Y2K politically correct. (The date isn't
+ used for anything except display purposes, but it should
+ make people more comfortable to not use a 2-digit date,
+ even though it doesn't matter.)
+
+Mon Jan 4 02:36:23 1999 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * Makefile.in: Move the generated types.h file from the linux/
+ directory to the asm/ directory.
+
+ * configure.in: Force Solaris to never use -static, due to its
+ dynamic loader not being available to statically linked
+ programs. Create the asm/ directory if needed.
+
+1999-01-01 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * INSTALL.elfbin (NOTE): Add a warning that the ELF binaries
+ assume glibc.
+
+ * config.guess: Update with a newer version from the FSF (although
+ I've removed rms's pathetic LINUX/GNU name kludgery)
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-11-27 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in: Add paths.h to header files for which we search.
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+Wed Apr 8 02:03:48 1998 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * Fix missing "test" invokation in configure.in test. (Only
+ affected default non-Linux builds).
+
+1998-03-30 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in: Change how the installation directions are
+ selected. Previously, we had prefix and usr_prefix, where
+ prefix was '' and usr_prefix was /usr, and we then defined
+ bindir, ubindir, libdir, ulibdir, etc. in terms of that.
+ In autoconf 2.12, it's possible to override bindir,
+ libdir, etc., and so in order to make our installation
+ directory makefile variables more in line with autoconf
+ 2.12, I've changed all of the various makefiles to use
+ prefix and root_prefix, where the default Linux
+ definitions are /usr and '', respectively. What used to
+ be bindir is now root_bindir, and what used to be ubindir,
+ is now bindir.
+
+ * MCONFIG.in: Change directories to match with new installation
+ directory convention (see above). Add Makefile
+ dependencies for makefile fragments, and define
+ DEP_LIB_MAKEFILES which library makefiles can use to
+ define DEP_MAKEFILES, so that the library makefiles will
+ get regenerated when the makefile fragments change.
+ Remove the cat?dir variables, since we aren't creating
+ those directories any more.
+
+ * Makefile.in: Add top-level uninstall targets.
+
+ * e2fsprogs-1.12.spec: Add to the RPM package the e2label man
+ page, and to reflect that fact that we now compile_et and
+ mk_cmds for the development package.
+
+1998-03-28 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Use && after a cd command so that the right thing
+ happens if the directory is missing. Don't compile man
+ pages upon installation any more, since modern Linux
+ systems don't have /usr/man/cat? anymore (they
+ typically cache man pages in /var/catman and delete them
+ if they haven't been used in a while, to save on disk
+ space, and because CPU's are fast enough these days that
+ you can get away with this).
+
+ * MCONFIG.in: Add a new makefile variable for the share
+ directory (i.e., /usr/share). Make an autoconf magic
+ make rule so that $(top_builddir)/util/subst.conf gets
+ rebuilt automatically when necessary.
+
+Mon Jan 19 10:01:39 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsprogs-1.12.spec: Update spec file in preparation for 1.12
+ release.
+
+Tue Nov 25 15:56:29 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in: Remove @EXTRA_PROGS@, since we aren't using it in
+ e2fsck/Makefile.in.
+
+Tue Nov 4 10:46:18 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in: Add check for setjmp.h
+
+Mon Oct 20 19:30:45 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in (HAVE_LLSEEK_PROTOTYPE): Added check to see if
+ llseek is declared in unistd.h
+
+Sun Oct 19 19:09:30 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in: Add tests for sys/stat.h, sys/time.h, and sys/types.h
+
+Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.11
+
+Sat Jun 14 03:26:45 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (SRCROOT): Allow people to set the version.h to
+ something like 1.10-PLUS.
+
+Sat Jun 7 16:38:40 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in (rmakefile): Added (optional) private directory for
+ resize2fs.
+
+ * Makefile.in: Change recursive descent rules to check to see if a
+ directory exists before trying to make it.
+
+Thu May 8 22:23:49 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (source_tar_file): Fix up makefile to work in new
+ CVS development environment.
+
+Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * Release of E2fsprogs version 1.10
+
+Tue Apr 22 10:48:03 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in: Add explicit check to see if linker accepts
+ -static (since even Linux systems might not work if
+ libc.a isn't installed).
+
+Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.09
+
+Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.08
+
+Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * Release of E2fsprogs version 1.07
+
+Wed Jan 15 11:37:36 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * config.sub (basic_machine): Added i686-* as another name for the
+ Pentium Pro.
+
+Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.06
+
+Mon Oct 7 08:22:31 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (all): Don't run "make check" by default. User
+ should manually run "make check" if they wish to test
+ things out.
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
+Sat Aug 31 10:55:45 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in (AC_CHECK_FUNCS): Add fchown to list of functions
+ that we check.
+
+Wed Aug 28 14:42:12 1996 Miles Bader <miles at gnu.ai.mit.edu>
+
+ * configure.in (usr_prefix): To be slightly more conformant with
+ the coding standards, always default to ${prefix}
+ unless on a linux system with prefix = ''. Allow
+ --with-usr-prefix option.
+
+Tue Aug 27 16:53:29 1996 Miles Bader <miles at gnu.ai.mit.edu>
+
+ * configure.in (AC_CHECK_HEADERS): Add net/if.h & netinet/in.h.
+ Add `--enable-fsck' switch, to allow configuration of
+ fsck wrapper building (default yes except on the hurd).
+ Make '' prefix default and LDFLAG_STATIC hacks work on
+ the hurd as well as linux.
+
+Tue Aug 27 16:23:56 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in: Check to see if sys/types.h defines ino_t. Add
+ support for checking/sizing "long long".
+
+Wed Aug 21 00:44:22 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in: Added configure flag --enable-old-bitops, which
+ forces the bitops to use the standard bitmask operations.
+
+Fri Aug 9 08:29:00 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in: Check for existence of sys/utsname.h and
+ strcasecmp(). Remove check for EXT2 fragment in system
+ header file. E2fsprogs now deals with the fragment fields
+ by dispatching off of the OS field.
+
+Tue Aug 6 14:34:19 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in (AC_OUPUT): Create substitutions for the uuid
+ library.
+
+ * MCONFIG.in (all): Add new variables for the uuid library.
+
+Thu May 23 12:39:07 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in: Make the default prefix be '' for Linux.
+
+Thu May 16 11:12:30 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.04
+
+Thu May 16 09:38:40 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in:
+ MCONFIG.in: Man pages, shell scripts and include files are now
+ generated using the lib/substitute_sh script. This is
+ faster than the configure substitution, and it doesn't
+ change the mod time of the file if it hasn't changed,
+ which prevents needless compilation of files.
+
+ Define new sets of Makefile variables: LIBSS, LIBCOM_ERR,
+ LIBEXT2FS, LIBE2P, and their static and profiled variants,
+ STATIC_* and PROFILED_*, which point to the actual file of
+ the shared or static library. This way makefiles can link
+ directly with exactly the library they want. Many ld's
+ (include GNU ld) have a really broken idea of how -L
+ works, and will link against an older library in /usr/lib
+ even though there is a newer on in a specified -L directory.
+
+Wed May 15 21:40:22 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * configure.in: Add support for --enable-dynamic-e2fsck, for
+ people who don't want to link e2fsck statically. This
+ saves space, at the cost of increasing the reliance of
+ e2fsck other files (3-4 shared libraries).
+
+Wed Mar 27 00:33:40 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.03
+
+Wed Jan 31 11:06:08 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.02
+
+Thu Oct 26 11:59:44 1995 <tytso at rsts-11.mit.edu>
+
+ * configure.in (LDFALG_STATIC): Add temporary kludge for
+ determining how to link executables statically. For now,
+ we assume that Linux systems only can link statically.
+
+Fri Sep 22 18:23:55 1995 <tytso at rsts-11.mit.edu>
+
+ * depfix.sed: Remove /usr/include lines which occur at the end of
+ the dependency listing.
+
+Mon Sep 4 21:40:22 1995 Remy Card <card at bbj>
+
+ * configure.in: Added support for the --enable-bsd-shlibs option.
+
+Wed Aug 9 21:33:31 1995 Theodore Y. Ts'o <tytso at dcl>
+
+ * MCONFIG.in (LD): Add $(PURE) to the definition to make it easier
+ to link executables using programs like purify.
+
+Sat Aug 5 11:41:03 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * configure.in: Check to see if strdup() is present
+
+ * INSTALL: Updated building and installation instructions to
+ reflect the new configure system.
+
+ * Makefile.in (install): When doing a general install, install the
+ shared libraries as well by using the new target
+ install-shlibs-libs-recursive.
+
+ * configure.in: If we are building on a Linux system, set $prefix
+ to be '/' by default.
+
+Sun Jul 9 13:38:20 1995 Miles Bader <miles at churchy.gnu.ai.mit.edu>
+
+ * configure.in (checking type sizes): provide some default for
+ type-sizes when cross-compiling, as we can't check them then.
+ (SS_DIR, ET_DIR): Make these correct even when ${srcdir} is absolute.
+
+Thu Jun 15 23:33:37 1995 Remy Card <card at bbj>
+
+ * Makefile.in (distclean-local): Added config.cache and
+ include/linux/types.h.
+
+ * configure.in: Added support for the --enable-elf option.
+ Added a test to check for llseek() in the C library.
+
+ * lib/Makefile.dll-lib: Fixed incorrect RM and LN calls.
+
+ * lib/Makefile.elf-lib: New file, to create ELF shared libraries.
+
+Sat Jun 10 19:52:51 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * configure.in: Create ET_DIR and SS_DIR, which gives the absolute
+ pathname to the source directories of the lib/et and
+ lib/ss. (Can't just use $srcdir since that may be a
+ relative path.)
+
+Thu Jun 8 12:25:57 1995 Miles Bader <miles at churchy.gnu.ai.mit.edu>
+
+ * lib/Makefile.library ($(LIBRARY).a): Changed to work with the
+ new makefiles.
+ * lib/Makefile.dll-lib: Ditto.
+ * lib/Makefile.profiled: Ditto.
+ * lib/Makefile.checker: Ditto.
+
+ * Add the include subdirectory to hold substitute include files
+ for systems that need them.
+
+ * Makefile.in: Rewritten to conform to GNU coding standards.
+ * MCONFIG: Moved to MCONFIG.in, and totally changed to support
+ GNU-style makefiles.
+ * mkinstalldirs: New file, copied from /gd/gnu/lib.
+ * config.guess: Ditto.
+ * config.sub: Ditto.
+ * install-sh: Ditto.
+
+ * configure.in: Many new tests added. --with-cc and --with-ccopts
+ options removed as configure already supports a method to do this,
+ and they were interfering with normal usage.
+
+Sat Mar 11 18:23:45 1995 Theodore Y. Ts'o <tytso at localhost>
+
+ * Makefile.in (bin-tree): Add Makefile target which automatically
+ generates the binary distribution for e2fsprogs.
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/ChangeSet
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/ChangeSet 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/ChangeSet 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,860 @@
+tytso at mit.edu|version.h|19970426131953|02082|72680822 tytso at think.thunk.org|version.h|20020308082751|22149
+tytso at mit.edu|e2fsprogs.lsm|19980704175519|13254|1cbe33c6 tytso at think.thunk.org|e2fsprogs.lsm|20020308082751|48984
+tytso at mit.edu|contrib/ChangeLog|20010102234359|04037|5fb10fc5 tytso at think.thunk.org|contrib/ChangeLog|20020308081214|58957
+tytso at mit.edu|include/nonunix/ChangeLog|19991026025035|05011|18291393 tytso at think.thunk.org|include/nonunix/ChangeLog|20020308081214|08433
+tytso at mit.edu|lib/ss/ChangeLog|19970426133355|02180|7b440884 tytso at think.thunk.org|lib/ss/ChangeLog|20020308081214|32501
+tytso at mit.edu|tests/progs/ChangeLog|19970429174749|02168|82820878 tytso at think.thunk.org|tests/progs/ChangeLog|20020308081214|00429
+tytso at mit.edu|lib/et/ChangeLog|19970426133307|02180|7b440884 tytso at think.thunk.org|lib/et/ChangeLog|20020308081214|44971
+tytso at mit.edu|RELEASE-NOTES|19970426143504|02174|837c087e tytso at think.thunk.org|RELEASE-NOTES|20020308081214|06385
+tytso at mit.edu|ChangeLog|19970426133213|02180|7b440884 tytso at think.thunk.org|ChangeLog|20020308081214|05381
+tytso at mit.edu|resize/ChangeLog|19970617053834|03189|f57b0c75 tytso at think.thunk.org|resize/ChangeLog|20020308081214|05341
+tytso at mit.edu|lib/ext2fs/ChangeLog|19970426133323|02180|7b440884 tytso at think.thunk.org|lib/ext2fs/ChangeLog|20020308081214|65228
+tytso at mit.edu|tests/ChangeLog|19970426135853|02169|7a460879 tytso at think.thunk.org|tests/ChangeLog|20020308081214|62826
+tytso at mit.edu|misc/ChangeLog|19970426133413|02180|7b440884 tytso at think.thunk.org|misc/ChangeLog|20020308081214|26522
+tytso at mit.edu|lib/uuid/ChangeLog|19970429145231|02119|79e00847 tytso at think.thunk.org|lib/uuid/ChangeLog|20020308081214|41958
+tytso at mit.edu|lib/e2p/ChangeLog|19970426133259|02180|7b440884 tytso at think.thunk.org|lib/e2p/ChangeLog|20020308081214|20036
+tytso at mit.edu|e2fsprogs.spec|19980704175519|13254|1cbe33c6 tytso at think.thunk.org|e2fsprogs.spec|20020308081214|53473
+tytso at mit.edu|install-utils/ChangeLog|19970426133253|02180|7b440884 tytso at think.thunk.org|install-utils/ChangeLog|20020308081214|02452
+tytso at mit.edu|util/ChangeLog|19980119144022|12893|ddc5325d tytso at think.thunk.org|util/ChangeLog|20020308081214|11667
+tytso at mit.edu|doc/ChangeLog|19980401021457|07889|70221ed1 tytso at think.thunk.org|doc/ChangeLog|20020308081214|05710
+tytso at mit.edu|e2fsck/ChangeLog|19970426133229|02180|7b440884 tytso at think.thunk.org|e2fsck/ChangeLog|20020308081214|33725
+tytso at mit.edu|po/ChangeLog|20001209023700|04695|e6481257 tytso at think.thunk.org|po/ChangeLog|20020308081214|61019
+tytso at mit.edu|intl/ChangeLog|20000208201945|03216|15120c90 tytso at think.thunk.org|intl/ChangeLog|20020308081214|01801
+tytso at mit.edu|lib/ChangeLog|19970426135638|02169|7a460879 tytso at think.thunk.org|lib/ChangeLog|20020308081214|08704
+tytso at mit.edu|debugfs/ChangeLog|19970426133222|02180|7b440884 tytso at think.thunk.org|debugfs/ChangeLog|20020308081214|30069
+tytso at mit.edu|misc/mke2fs.c|19970426132153|02082|72680822 tytso at think.thunk.org|misc/mke2fs.c|20020308080153|60550
+tytso at think.thunk.org|lib/ext2fs/inode_io.c|20020220060625|00590|1f97eb4ec59da75c tytso at think.thunk.org|lib/ext2fs/inode_io.c|20020308045255|62754
+tytso at mit.edu|e2fsck/journal.c|20000707041320|56264|e5acdbc8 tytso at think.thunk.org|e2fsck/journal.c|20020308045255|10518
+tytso at mit.edu|e2fsck/pass5.c|19970426132019|02082|72680822 tytso at think.thunk.org|e2fsck/pass5.c|20020308045255|18606
+tytso at mit.edu|e2fsck/revoke.c|20001209063810|32982|c0cc80d6 tytso at think.thunk.org|e2fsck/revoke.c|20020308045255|38668
+tytso at mit.edu|lib/ext2fs/bmap.c|19971025223738|51453|5d04c8fd tytso at think.thunk.org|lib/ext2fs/bmap.c|20020308045255|38329
+tytso at mit.edu|lib/ss/listen.c|19970426132130|02082|72680822 tytso at think.thunk.org|lib/ss/listen.c|20020308045255|23583
+tytso at mit.edu|lib/ext2fs/ext2fs.h|19970426132110|02082|72680822 tytso at think.thunk.org|lib/ext2fs/ext2fs.h|20020308045255|30252
+tytso at mit.edu|lib/ext2fs/tst_byteswap.c|20010220162839|15386|22083c1a tytso at think.thunk.org|lib/ext2fs/tst_byteswap.c|20020308045255|06085
+tytso at mit.edu|misc/base_device.c|20001203063355|26231|a2186677 tytso at think.thunk.org|misc/base_device.c|20020308045255|58634
+tytso at mit.edu|resize/resize2fs.c|19970607204256|03414|0f810d56 tytso at think.thunk.org|resize/resize2fs.c|20020308045255|23764
+tytso at mit.edu|lib/ss/ss.h|19970426132136|02082|72680822 tytso at think.thunk.org|lib/ss/ss.h|20020308045255|03708
+tytso at mit.edu|lib/ext2fs/tst_badblocks.c|19970429161528|02134|7a320856 tytso at think.thunk.org|lib/ext2fs/tst_badblocks.c|20020308045255|36164
+tytso at mit.edu|lib/ss/execute_cmd.c|19970426132128|02082|72680822 tytso at think.thunk.org|lib/ss/execute_cmd.c|20020308045255|23886
+tytso at mit.edu|lib/ext2fs/fileio.c|19971025223741|51453|5d04c8fd tytso at think.thunk.org|lib/ext2fs/fileio.c|20020308045255|26208
+tytso at mit.edu|lib/ss/ss_internal.h|19970426132138|02082|72680822 tytso at think.thunk.org|lib/ss/ss_internal.h|20020308045255|42802
+tytso at mit.edu|lib/ss/pager.c|19970426132132|02082|72680822 tytso at think.thunk.org|lib/ss/pager.c|20020308045255|59140
+tytso at mit.edu|lib/ss/list_rqs.c|19970426132130|02082|72680822 tytso at think.thunk.org|lib/ss/list_rqs.c|20020308045255|32506
+tytso at mit.edu|resize/Makefile.in|19970607204253|03414|0f810d56 tytso at think.thunk.org|resize/Makefile.in|20020308015501|53193
+tytso at mit.edu|lib/ext2fs/Makefile.in|19970426135731|02169|7a460879 tytso at think.thunk.org|lib/ext2fs/Makefile.in|20020308015501|54860
+tytso at mit.edu|e2fsck/unix.c|19971003174643|29524|49de7354 tytso at snap.thunk.org|e2fsck/unix.c|20020307081306|48855
+tytso at snap.thunk.org|tests/f_extra_journal/expect.1|20020307081306|15297|4ebf5411a04551da tytso at snap.thunk.org|tests/f_extra_journal/expect.1|20020307081307|54596
+tytso at snap.thunk.org|tests/f_miss_journal/expect.1|20020307081306|29834|6ce1c2d5fbc1135 tytso at snap.thunk.org|tests/f_miss_journal/expect.1|20020307081307|52469
+tytso at snap.thunk.org|tests/f_swapfs/image|20020307081306|58506|fb3b06588d20e012 tytso at snap.thunk.org|tests/f_swapfs/image|20020307081307|48444
+tytso at snap.thunk.org|tests/f_miss_journal/name|20020307081306|54946|47f578b616ad325c tytso at snap.thunk.org|tests/f_miss_journal/name|20020307081307|02592
+tytso at snap.thunk.org|tests/f_extra_journal/expect.2|20020307081306|19034|f53e40079c7e2e32 tytso at snap.thunk.org|tests/f_extra_journal/expect.2|20020307081307|24640
+tytso at snap.thunk.org|tests/f_extra_journal/name|20020307081306|26307|2ffbed5b8695ff07 tytso at snap.thunk.org|tests/f_extra_journal/name|20020307081307|05423
+tytso at snap.thunk.org|tests/f_miss_journal/expect.2|20020307081306|47367|2de4314865428b8 tytso at snap.thunk.org|tests/f_miss_journal/expect.2|20020307081307|24640
+tytso at snap.thunk.org|tests/f_miss_journal/image.gz|20020307081306|51354|b2c453904c1cc0fd tytso at snap.thunk.org|tests/f_miss_journal/image.gz|20020307081307|38188
+tytso at snap.thunk.org|tests/f_extra_journal/image.gz|20020307081306|22735|99f889043a19d736 tytso at snap.thunk.org|tests/f_extra_journal/image.gz|20020307081307|42345
+tytso at mit.edu|debugfs/ls.c|19970429174649|02168|82820878 tytso at snap.thunk.org|debugfs/ls.c|20020307075653|11238
+tytso at mit.edu|tests/f_lpf/expect.1|19970426140005|02169|7a460879 tytso at snap.thunk.org|tests/f_lpf/expect.1|20020307074707|30131
+tytso at mit.edu|tests/f_illitable/expect.1|19970429161643|02134|7a320856 tytso at snap.thunk.org|tests/f_illitable/expect.1|20020307074707|46421
+tytso at mit.edu|e2fsck/problem.h|19970429161426|02134|7a320856 tytso at snap.thunk.org|e2fsck/problem.h|20020307074706|58676
+tytso at mit.edu|tests/f_illibitmap/expect.1|19970426135959|02169|7a460879 tytso at snap.thunk.org|tests/f_illibitmap/expect.1|20020307074707|08610
+tytso at mit.edu|tests/f_badtable/expect.1|19970426135921|02169|7a460879 tytso at snap.thunk.org|tests/f_badtable/expect.1|20020307074706|23943
+tytso at mit.edu|tests/f_illbbitmap/expect.1|19970426135956|02169|7a460879 tytso at snap.thunk.org|tests/f_illbbitmap/expect.1|20020307074707|12253
+tytso at mit.edu|tests/f_overfsblks/expect.1|19970426140022|02169|7a460879 tytso at snap.thunk.org|tests/f_overfsblks/expect.1|20020307074707|47095
+tytso at mit.edu|tests/f_lotsbad/expect.1|19970426140002|02169|7a460879 tytso at snap.thunk.org|tests/f_lotsbad/expect.1|20020307074707|54490
+tytso at mit.edu|tests/f_imagic_fs/expect.1|19991110131723|47870|bc0ebafe tytso at snap.thunk.org|tests/f_imagic_fs/expect.1|20020307074707|48218
+tytso at mit.edu|tests/f_imagic/expect.1|19991110131722|47870|bc0ebafe tytso at snap.thunk.org|tests/f_imagic/expect.1|20020307074707|09238
+tytso at think.thunk.org|tests/f_miss_blk_bmap/expect.1|20011127010007|04495|a7abd4086929ffa1 tytso at snap.thunk.org|tests/f_miss_blk_bmap/expect.1|20020307074707|44832
+tytso at mit.edu|tests/f_bbinode/expect.1|19970429161632|02134|7a320856 tytso at snap.thunk.org|tests/f_bbinode/expect.1|20020307074706|37732
+tytso at mit.edu|tests/f_misstable/expect.1|19970429161649|02134|7a320856 tytso at snap.thunk.org|tests/f_misstable/expect.1|20020307074707|43742
+tytso at mit.edu|tests/f_messy_inode/expect.1|19970426140008|02169|7a460879 tytso at snap.thunk.org|tests/f_messy_inode/expect.1|20020307074707|30704
+tytso at mit.edu|tests/f_badorphan/expect.1|20010514124740|06561|8b4619a1 tytso at snap.thunk.org|tests/f_badorphan/expect.1|20020307074706|22568
+tytso at mit.edu|tests/f_expand/expect.1|19970426135950|02169|7a460879 tytso at snap.thunk.org|tests/f_expand/expect.1|20020307074707|48425
+tytso at mit.edu|tests/f_dupsuper/expect.1|19970426135944|02169|7a460879 tytso at snap.thunk.org|tests/f_dupsuper/expect.1|20020307074706|09623
+tytso at mit.edu|e2fsck/problem.c|19970429161426|02134|7a320856 tytso at snap.thunk.org|e2fsck/problem.c|20020307074706|31904
+tytso at mit.edu|README|19970426131953|02082|72680822 tytso at think.thunk.org|README|20020305083106|03170
+tytso at mit.edu|doc/libext2fs.texinfo|19970429161411|02134|7a320856 tytso at think.thunk.org|doc/libext2fs.texinfo|20020305083106|17568
+tytso at mit.edu|misc/badblocks.c|19970426132144|02082|72680822 tytso at think.thunk.org|misc/badblocks.c|20020305082651|60561
+tytso at mit.edu|misc/chattr.c|19970426132146|02082|72680822 tytso at think.thunk.org|misc/chattr.c|20020305082651|14041
+tytso at mit.edu|misc/dumpe2fs.c|19970426132147|02082|72680822 tytso at think.thunk.org|misc/dumpe2fs.c|20020305082651|41428
+tytso at mit.edu|misc/partinfo.c|19971128144508|04644|cd1f1224 tytso at think.thunk.org|misc/partinfo.c|20020305082651|57729
+tytso at mit.edu|misc/tune2fs.c|19970426132156|02082|72680822 tytso at think.thunk.org|misc/tune2fs.c|20020305082652|21204
+tytso at mit.edu|misc/fsck.c|19970426132149|02082|72680822 tytso at think.thunk.org|misc/fsck.c|20020305082651|34029
+tytso at mit.edu|misc/findsuper.c|19970426144840|02175|837f087f tytso at think.thunk.org|misc/findsuper.c|20020305082651|14270
+tytso at mit.edu|misc/mklost+found.c|19970426132155|02082|72680822 tytso at think.thunk.org|misc/mklost+found.c|20020305082651|57252
+tytso at mit.edu|misc/e2image.c|20001112193219|10718|dcf029de tytso at think.thunk.org|misc/e2image.c|20020305082651|61517
+tytso at mit.edu|misc/lsattr.c|19970426132151|02082|72680822 tytso at think.thunk.org|misc/lsattr.c|20020305082651|41333
+tytso at mit.edu|debugfs/lsdel.c|19970426133227|02180|7b440884 tytso at think.thunk.org|debugfs/lsdel.c|20020305065753|59717
+tytso at mit.edu|debugfs/debugfs.c|19970426132001|02082|72680822 tytso at think.thunk.org|debugfs/debugfs.c|20020305065752|55879
+tytso at mit.edu|debugfs/Makefile.in|19970426135548|02169|7a460879 tytso at think.thunk.org|debugfs/Makefile.in|20020305065752|57917
+tytso at mit.edu|misc/util.c|20010103170212|47522|0b33b9a2 adilger at lynx.adilger.int|misc/util.c|20020226061125|07345
+tytso at mit.edu|misc/mke2fs.8.in|19970426143608|02174|837c087e adilger at lynx.adilger.int|misc/mke2fs.8.in|20020226061125|26876
+tytso at mit.edu|misc/util.h|20010103170212|47522|0b33b9a2 adilger at lynx.adilger.int|misc/util.h|20020226061125|03542
+tytso at think.thunk.org|debugfs/htree.c|20020225092845|27776|ed2004af91a77b23 tytso at think.thunk.org|debugfs/htree.c|20020225092846|11404
+tytso at mit.edu|debugfs/debug_cmds.ct|19970426132000|02082|72680822 tytso at think.thunk.org|debugfs/debug_cmds.ct|20020225092845|20629
+tytso at mit.edu|lib/ext2fs/ext2_fs.h|20010514113551|03419|d1ea0d5b tytso at think.thunk.org|lib/ext2fs/ext2_fs.h|20020225092845|29142
+tytso at mit.edu|debugfs/util.c|19970426132004|02082|72680822 tytso at think.thunk.org|debugfs/util.c|20020225092845|43731
+tytso at mit.edu|e2fsck/Makefile.in|19970426135559|02169|7a460879 tytso at think.thunk.org|e2fsck/Makefile.in|20020224084845|37134
+tytso at mit.edu|debian/rules|20010509045101|03853|705e0f0d tytso at think.thunk.org|debian/rules|20020224080856|53069
+tytso at mit.edu|misc/Makefile.in|19970426135835|02169|7a460879 tytso at think.thunk.org|misc/Makefile.in|20020224080856|37567
+tytso at mit.edu|lib/uuid/Makefile.in|19970429145232|02119|79e00847 tytso at think.thunk.org|lib/uuid/Makefile.in|20020224080856|01941
+tytso at mit.edu|debian/e2fsprogs.preinst|20010509045101|03853|705e0f0d tytso at think.thunk.org|debian/e2fsprogs.preinst|20020224022325|30533
+tytso at mit.edu|lib/et/com_err.texinfo|19970426132049|02082|72680822 tytso at think.thunk.org|lib/et/com_err.texinfo|20020224022325|26656
+tytso at think.thunk.org|debian/e2fsck-static.lintian-overrides|20020224022326|07151|6eb5d7e41df64753 tytso at think.thunk.org|debian/e2fsck-static.lintian-overrides|20020224022327|05683
+tytso at mit.edu|debian/control|20010509045101|03853|705e0f0d tytso at think.thunk.org|debian/control|20020224022325|25229
+tytso at mit.edu|misc/badblocks.8.in|19970426143558|02174|837c087e tytso at think.thunk.org|misc/badblocks.8.in|20020224022326|46661
+tytso at mit.edu|debian/changelog|20010509045101|03853|705e0f0d tytso at think.thunk.org|debian/changelog|20020224022325|18114
+tytso at think.thunk.org|debian/e2fsprogs.shlibs.in|20020224022326|15215|92c8a43bde565647 tytso at think.thunk.org|debian/e2fsprogs.shlibs.in|20020224022327|08238
+tytso at think.thunk.org|debian/e2fsprogs-bf.lintian-overrides|20020224022326|09826|3c137e5e5d1bd36b tytso at think.thunk.org|debian/e2fsprogs-bf.lintian-overrides|20020224022327|10984
+tytso at mit.edu|lib/ext2fs/unix_io.c|19970426132120|02082|72680822 tytso at think.thunk.org|lib/ext2fs/unix_io.c|20020223235032|61120
+tytso at mit.edu|e2fsck/super.c|19971003174642|29524|49de7354 tytso at think.thunk.org|e2fsck/super.c|20020222051758|45153
+tytso at mit.edu|lib/ext2fs/ismounted.c|19970426135748|02169|7a460879 tytso at think.thunk.org|lib/ext2fs/ismounted.c|20020222014824|21496
+tytso at mit.edu|lib/ext2fs/ext2_err.et.in|19970426143548|02174|837c087e tytso at think.thunk.org|lib/ext2fs/ext2_err.et.in|20020220060624|13846
+tytso at mit.edu|lib/ext2fs/test_io.c|19970429161527|02134|7a320856 tytso at think.thunk.org|lib/ext2fs/test_io.c|20020220060624|09783
+tytso at mit.edu|lib/ss/requests.c|19970426132135|02082|72680822 tytso at think.thunk.org|lib/ss/requests.c|20020212073443|01844
+tytso at mit.edu|include/linux/list.h|20001209054744|05476|a7d21564 tytso at think.thunk.org|lib/ext2fs/kernel-list.h|20020212073443|14996
+tytso at mit.edu|tests/test_script.in|19970429145257|02119|79e00847 tytso at think.thunk.org|tests/test_script.in|20020212073443|29137
+tytso at mit.edu|tests/run_e2fsck|19970426135856|02169|7a460879 tytso at think.thunk.org|tests/run_e2fsck|20020212073443|38626
+tytso at mit.edu|include/linux/jfs.h|20001209054744|05476|a7d21564 tytso at think.thunk.org|lib/ext2fs/kernel-jbd.h|20020212073443|21739
+tytso at mit.edu|misc/get_device_by_label.c|19990703015940|38020|97879484 tytso at think.thunk.org|misc/get_device_by_label.c|20020212073443|55602
+tytso at mit.edu|BitKeeper/etc/ignore|20010622175938|01463|cf95e9f858004af1 tiniou at crusoe.alcove-fr|BitKeeper/etc/ignore|20020206145716|13655
+tytso at think.thunk.org|BitKeeper/etc/logging_ok|20010622234337|56645|7ecd8c68d337ac70 tiniou at crusoe.alcove-fr|BitKeeper/etc/logging_ok|20020206145835|17986
+tytso at mit.edu|lib/ext2fs/mkdir.c|19970426132116|02082|72680822 tytso at think.thunk.org|lib/ext2fs/mkdir.c|20020203062852|28836
+tytso at think.thunk.org|lib/ext2fs/alloc_stats.c|20020103082919|59411|5fb5876ed66ac145 tytso at think.thunk.org|lib/ext2fs/alloc_stats.c|20020203062851|46103
+tytso at mit.edu|tests/f_swapfs/expect|19970429145334|02119|79e00847 tytso at think.thunk.org|tests/f_swapfs/expect|20020203062437|24033
+tytso at mit.edu|misc/fsck.h|19970426132149|02082|72680822 tytso at think.thunk.org|misc/fsck.h|20020203050852|17422
+tytso at think.thunk.org|misc/fstype.c|20010720003853|03151|470b4df9f23a8bed tytso at think.thunk.org|misc/fstype.c|20020203050852|57777
+tytso at mit.edu|misc/fsck.8.in|19970426143604|02174|837c087e tytso at think.thunk.org|misc/fsck.8.in|20020129174914|00767
+tytso at mit.edu|misc/tune2fs.8.in|19970426143613|02174|837c087e tytso at think.thunk.org|misc/tune2fs.8.in|20020127232349|00186
+tytso at mit.edu|contrib/build-rpm|20010102234359|04037|5fb10fc5 sct at sisko.scot.redhat.com|contrib/build-rpm|20020110175607|06473
+tytso at mit.edu|tests/Makefile.in|19970426135854|02169|7a460879 adilger at lynx.adilger.int|tests/Makefile.in|20020107045852|01816
+tytso at mit.edu|debugfs/debugfs.h|19970426132002|02082|72680822 tytso at think.thunk.org|debugfs/debugfs.h|20020103101004|55400
+tytso at mit.edu|debugfs/dump.c|19970426133226|02180|7b440884 tytso at think.thunk.org|debugfs/dump.c|20020103101004|51440
+tytso at mit.edu|debugfs/logdump.c|20010329204957|17775|9ca4456f tytso at think.thunk.org|debugfs/logdump.c|20020103095524|10840
+tytso at mit.edu|debugfs/debugfs.8.in|19970426143516|02174|837c087e tytso at think.thunk.org|debugfs/debugfs.8.in|20020103095524|03791
+tytso at mit.edu|debugfs/setsuper.c|20000814203550|11768|56712df8 tytso at think.thunk.org|debugfs/setsuper.c|20020103095524|26865
+tytso at mit.edu|debugfs/icheck.c|19970426132003|02082|72680822 tytso at think.thunk.org|debugfs/icheck.c|20020103095524|04908
+tytso at mit.edu|lib/ext2fs/expanddir.c|19970426132108|02082|72680822 tytso at think.thunk.org|lib/ext2fs/expanddir.c|20020103082919|06741
+tytso at mit.edu|lib/ext2fs/dblist_dir.c|19970429161501|02134|7a320856 tytso at think.thunk.org|lib/ext2fs/dblist_dir.c|20020103082919|59877
+tytso at mit.edu|lib/ext2fs/bb_inode.c|19970426132103|02082|72680822 tytso at think.thunk.org|lib/ext2fs/bb_inode.c|20020103082919|38698
+tytso at mit.edu|lib/ext2fs/alloc.c|19970426132101|02082|72680822 tytso at think.thunk.org|lib/ext2fs/alloc.c|20020103082919|27710
+tytso at mit.edu|lib/ext2fs/ext2fsP.h|19970429161506|02134|7a320856 tytso at think.thunk.org|lib/ext2fs/ext2fsP.h|20020103082919|50248
+tytso at mit.edu|lib/ext2fs/mkjournal.c|20001024183152|14637|8f10392d tytso at think.thunk.org|lib/ext2fs/mkjournal.c|20020103082919|44370
+tytso at mit.edu|lib/ext2fs/dir_iterate.c|19970429161502|02134|7a320856 tytso at think.thunk.org|lib/ext2fs/dir_iterate.c|20020103082919|06809
+tytso at mit.edu|MCONFIG.in|19970426135529|02169|7a460879 tytso at think.thunk.org|MCONFIG.in|20011224203348|16250
+tytso at mit.edu|include/asm/.cvsignore|20000525234221|03859|3fb10f13 tytso at think.thunk.org|BitKeeper/deleted/.del-.cvsignore~3fb10f13|20011224202616|54761
+tytso at mit.edu|include/linux/ChangeLog|19970426135636|02169|7a460879 tytso at think.thunk.org|BitKeeper/deleted/.del-ChangeLog~7a460879|20011224202407|20104
+tytso at mit.edu|TODO|19990112234000|02959|c8460b8f tytso at think.thunk.org|TODO|20011224202022|38211
+tytso at mit.edu|e2fsck/e2fsck.h|19970426132011|02082|72680822 tytso at think.thunk.org|e2fsck/e2fsck.h|20011224200158|28126
+tytso at mit.edu|e2fsck/badblocks.c|19970426132008|02082|72680822 tytso at think.thunk.org|e2fsck/badblocks.c|20011224200158|57592
+tytso at mit.edu|e2fsck/e2fsck.8.in|19970426143521|02174|837c087e tytso at think.thunk.org|e2fsck/e2fsck.8.in|20011224200158|00585
+tytso at mit.edu|lib/ext2fs/initialize.c|19970426132113|02082|72680822 tytso at think.thunk.org|lib/ext2fs/initialize.c|20011224144000|63047
+tytso at mit.edu|lib/ext2fs/openfs.c|19970426132118|02082|72680822 tytso at think.thunk.org|lib/ext2fs/openfs.c|20011224144000|38551
+tytso at mit.edu|e2fsck/util.c|19970426132019|02082|72680822 tytso at think.thunk.org|e2fsck/util.c|20011224035611|51346
+tytso at mit.edu|e2fsck/message.c|19970429161419|02134|7a320856 tytso at think.thunk.org|e2fsck/message.c|20011224032752|49696
+tytso at mit.edu|include/linux/jfs_compat.h|20001209054744|05476|a7d21564 tytso at think.thunk.org|lib/ext2fs/jfs_compat.h|20011224003350|47768
+tytso at mit.edu|lib/ext2fs/jfs_user.h|20001209054646|11108|a40d2b64 tytso at think.thunk.org|lib/ext2fs/jfs_user.h|20011224003350|09970
+tytso at mit.edu|misc/jfs_user.h|20010116074729|50975|ad0cc71f tytso at think.thunk.org|misc/jfs_user.h|20011224003350|10675
+tytso at mit.edu|e2fsck/jfs_user.h|20001209063810|32982|c0cc80d6 tytso at think.thunk.org|e2fsck/jfs_user.h|20011224003350|30877
+tytso at mit.edu|debugfs/jfs_user.h|20010329204957|17775|9ca4456f tytso at think.thunk.org|debugfs/jfs_user.h|20011224003350|10675
+tytso at mit.edu|lib/ext2fs/bitops.h|19970426132106|02082|72680822 tytso at think.thunk.org|lib/ext2fs/bitops.h|20011217042336|22870
+tytso at think.thunk.org|e2fsck/ea_refcount.c|20010702144919|65239|dd8264f275e1834d tytso at think.thunk.org|e2fsck/ea_refcount.c|20011217042336|28800
+tytso at think.thunk.org|lib/ext2fs/ext_attr.c|20010623211524|07138|40e5909b8f6e50eb tytso at think.thunk.org|lib/ext2fs/ext_attr.c|20011217042336|22685
+tytso at mit.edu|lib/e2p/pf.c|19970426132043|02082|72680822 tytso at think.thunk.org|lib/e2p/pf.c|20011217042336|62013
+tytso at mit.edu|e2fsck/pass1.c|19970426132015|02082|72680822 tytso at think.thunk.org|e2fsck/pass1.c|20011217042336|56891
+tytso at mit.edu|e2fsck/jfs_compat.h|20000814142517|37864|fa6593e8 tytso at think.thunk.org|BitKeeper/deleted/.del-jfs_compat.h~fa6593e8|20011216012011|60520
+tytso at mit.edu|configure|19970426135536|02169|7a460879 tytso at think.thunk.org|configure|20011216072334|47365
+tytso at think.thunk.org|tests/f_ext_journal/image.gz|20011216072335|53117|1dced158aa671899 tytso at think.thunk.org|tests/f_ext_journal/image.gz|20011216072336|45917
+tytso at mit.edu|e2fsck/recovery.c|20000814142518|37864|fa6593e8 tytso at think.thunk.org|e2fsck/recovery.c|20011216072335|39943
+tytso at think.thunk.org|tests/f_ext_journal/expect.1|20011216072335|46517|3ec4bdd5be5416b8 tytso at think.thunk.org|tests/f_ext_journal/expect.1|20011216072336|28034
+tytso at think.thunk.org|tests/f_ext_journal/expect.2|20011216072335|49869|d73464244c2a28b0 tytso at think.thunk.org|tests/f_ext_journal/expect.2|20011216072336|24753
+tytso at think.thunk.org|tests/f_ext_journal/journal.gz|20011216072335|56968|e1f95ec180456624 tytso at think.thunk.org|tests/f_ext_journal/journal.gz|20011216072336|49144
+tytso at think.thunk.org|tests/f_ext_journal/script|20011216072335|60736|7da86b7ef53dbab1 tytso at think.thunk.org|tests/f_ext_journal/script|20011216072336|12838
+tytso at mit.edu|configure.in|19970426135537|02169|7a460879 tytso at think.thunk.org|configure.in|20011216072334|58927
+tytso at mit.edu|lib/et/com_err.c|19970426132048|02082|72680822 tytso at think.thunk.org|lib/et/com_err.c|20011202162326|22797
+tytso at mit.edu|tests/f_journal/expect.1|20000820214839|30058|7aed756a tytso at think.thunk.org|tests/f_journal/expect.1|20011130105246|18449
+tytso at mit.edu|tests/f_journal/expect.2|20000820214839|30058|7aed756a tytso at think.thunk.org|tests/f_journal/expect.2|20011130105246|24816
+tytso at think.thunk.org|tests/f_miss_blk_bmap/name|20011127010007|15153|c9a09dfdcb968b30 tytso at think.thunk.org|tests/f_miss_blk_bmap/name|20011127010008|01996
+tytso at think.thunk.org|tests/f_miss_blk_bmap/expect.2|20011127010007|08046|87f8e679665c59aa tytso at think.thunk.org|tests/f_miss_blk_bmap/expect.2|20011127010008|24525
+tytso at think.thunk.org|tests/f_miss_blk_bmap/image.gz|20011127010007|11613|22c8b439ffcb8a4 tytso at think.thunk.org|tests/f_miss_blk_bmap/image.gz|20011127010008|44492
+tytso at mit.edu|misc/e2image.8.in|20010503144342|15239|56143b87 tytso at think.thunk.org|misc/e2image.8.in|20011124211349|13646
+tytso at mit.edu|misc/chattr.1.in|19970426143559|02174|837c087e tytso at think.thunk.org|misc/chattr.1.in|20011106002202|48449
+tytso at mit.edu|po/it.po|20000208202045|04691|c2711253 tytso at snap.thunk.org|po/it.po|20011008165059|36259
+tytso at snap.thunk.org|po/tr.po|20011008165059|30356|670170c26c6cc011 tytso at snap.thunk.org|po/tr.po|20011008165100|61830
+tytso at mit.edu|po/nyc.po|20000208213508|01683|46980693 tytso at snap.thunk.org|po/nyc.po|20011008165059|63851
+tytso at mit.edu|po/POTFILES.in|20000208202045|04691|c2711253 tytso at snap.thunk.org|po/POTFILES.in|20011008165059|55042
+tytso at mit.edu|po/e2fsprogs.pot|20000713231537|09057|ef5f2361 tytso at snap.thunk.org|po/e2fsprogs.pot|20011008165059|36210
+tytso at think.thunk.org|tests/f_bad_local_jnl/image.gz|20011007061330|38634|e15b2c821b6aabd tytso at think.thunk.org|tests/f_bad_local_jnl/image.gz|20011007061331|52492
+tytso at think.thunk.org|tests/f_bad_local_jnl/expect.1|20011007061330|31581|984198a1a17eb5 tytso at think.thunk.org|tests/f_bad_local_jnl/expect.1|20011007061331|35064
+tytso at think.thunk.org|tests/f_bad_local_jnl/expect.2|20011007061330|35082|859abc5df77f5779 tytso at think.thunk.org|tests/f_bad_local_jnl/expect.2|20011007061331|24746
+tytso at think.thunk.org|tests/f_bad_local_jnl/name|20011007061330|42350|11734abd41f593c8 tytso at think.thunk.org|tests/f_bad_local_jnl/name|20011007061331|05371
+tytso at mit.edu|lib/uuid/libuuid.3.in|19990316203154|03818|3b4d0eea adilger at lynx.adilger.int|lib/uuid/libuuid.3.in|20011001220220|49550
+tytso at think.thunk.org|lib/ext2fs/ext2_ext_attr.h|20010623213802|42479|49f4d60fc7eabba3 tytso at think.thunk.org|lib/ext2fs/ext2_ext_attr.h|20010917040221|36956
+tytso at mit.edu|lib/et/compile_et.sh.in|19970426135713|02169|7a460879 tytso at think.thunk.org|lib/et/compile_et.sh.in|20010917032915|48799
+tytso at mit.edu|lib/ss/mk_cmds.sh.in|19970426135815|02169|7a460879 tytso at think.thunk.org|lib/ss/mk_cmds.sh.in|20010917032915|62646
+tytso at mit.edu|lib/uuid/parse.c|19970429145236|02119|79e00847 tytso at think.thunk.org|lib/uuid/parse.c|20010911003008|09030
+tytso at mit.edu|lib/uuid/uuid.h|19970429145239|02119|79e00847 tytso at think.thunk.org|lib/uuid/uuid.h|20010911003008|38031
+tytso at mit.edu|lib/uuid/unparse.c|19970429145239|02119|79e00847 tytso at think.thunk.org|lib/uuid/unparse.c|20010911003008|50049
+tytso at mit.edu|lib/uuid/compare.c|19970429145233|02119|79e00847 tytso at think.thunk.org|lib/uuid/compare.c|20010911003008|65070
+tytso at mit.edu|lib/uuid/isnull.c|19970429145235|02119|79e00847 tytso at think.thunk.org|lib/uuid/isnull.c|20010911003008|34631
+tytso at mit.edu|lib/uuid/unpack.c|19970429145238|02119|79e00847 tytso at think.thunk.org|lib/uuid/unpack.c|20010911003008|54246
+tytso at mit.edu|lib/uuid/copy.c|19970429145234|02119|79e00847 tytso at think.thunk.org|lib/uuid/copy.c|20010911003008|30663
+tytso at mit.edu|lib/uuid/uuidP.h|19970429145240|02119|79e00847 tytso at think.thunk.org|lib/uuid/uuidP.h|20010911003008|53095
+tytso at mit.edu|lib/uuid/uuid_time.c|19981204081152|18256|8bdb4750 tytso at think.thunk.org|lib/uuid/uuid_time.c|20010911003008|26153
+tytso at mit.edu|lib/uuid/pack.c|19970429145236|02119|79e00847 tytso at think.thunk.org|lib/uuid/pack.c|20010911003008|03709
+tytso at mit.edu|lib/ext2fs/getsize.c|19970426135746|02169|7a460879 tytso at think.thunk.org|lib/ext2fs/getsize.c|20010830212401|37595
+tytso at mit.edu|misc/get_device_by_label.h|19990703015941|38020|97879484 tytso at think.thunk.org|misc/get_device_by_label.h|20010818182223|39762
+tytso at mit.edu|e2fsck/pass2.c|19970426132016|02082|72680822 tytso at think.thunk.org|e2fsck/pass2.c|20010809081404|19337
+tytso at mit.edu|e2fsck/iscan.c|19970426135607|02169|7a460879 tytso at think.thunk.org|e2fsck/iscan.c|20010808201023|11890
+tytso at mit.edu|tests/f_swapfs/image.gz|19970429145335|02119|79e00847 tytso at think.thunk.org|tests/f_swapfs/image.gz|20010805005101|59070
+tytso at mit.edu|tests/f_badinode/expect.1|19970426135909|02169|7a460879 tytso at think.thunk.org|tests/f_badinode/expect.1|20010805005101|21240
+root at lynx.adilger.int|tests/f_badsymlinks/expect.1|20010728203554|16200|2ac8a6de6b63a0f2 tytso at think.thunk.org|tests/f_badsymlinks/expect.1|20010805005101|50362
+tytso at mit.edu|Makefile.in|19970426135533|02169|7a460879 root at lynx.adilger.int|Makefile.in|20010804070233|36199
+tytso at mit.edu|doc/Makefile.in|19970429161410|02134|7a320856 root at lynx.adilger.int|doc/Makefile.in|20010804065854|30740
+tytso at mit.edu|tests/README|19970426135855|02169|7a460879 root at lynx.adilger.int|tests/README|20010804065105|17301
+root at lynx.adilger.int|tests/f_badsymlinks/name|20010728203554|42638|3a2517b6ae7ec7cb root at lynx.adilger.int|tests/f_badsymlinks/name|20010728203555|02378
+root at lynx.adilger.int|tests/f_badsymlinks/image.gz|20010728203554|40324|b7e3da3f778681 root at lynx.adilger.int|tests/f_badsymlinks/image.gz|20010728203555|39498
+root at lynx.adilger.int|tests/f_badsymlinks/expect.2|20010728203554|39746|c2cd06fe4d47d065 root at lynx.adilger.int|tests/f_badsymlinks/expect.2|20010728203555|24580
+tytso at mit.edu|lib/ext2fs/finddev.c|20000819170046|17721|983e4539 tytso at think.thunk.org|lib/ext2fs/finddev.c|20010729160049|05540
+tytso at mit.edu|e2fsck/e2fsck.c|19970426132010|02082|72680822 tytso at think.thunk.org|e2fsck/e2fsck.c|20010729154658|40172
+tytso at mit.edu|tests/f_filetype/expect.1|19991110131722|47870|bc0ebafe tytso at think.thunk.org|tests/f_filetype/expect.1|20010728024008|02303
+tytso at mit.edu|util/subst.conf.in|19971015024719|09889|b63e26a1 tytso at think.thunk.org|util/subst.conf.in|20010728020247|30816
+tytso at think.thunk.org|e2fsck/region.c|20010719203124|31006|b27559ad27d2c71e tytso at think.thunk.org|e2fsck/region.c|20010719203125|57103
+tytso at mit.edu|lib/ext2fs/closefs.c|19970426132107|02082|72680822 tytso at think.thunk.org|lib/ext2fs/closefs.c|20010710182757|24935
+tytso at mit.edu|po/Makefile.in.in|20000208202045|04691|c2711253 tytso at think.thunk.org|po/Makefile.in.in|20010710044558|47664
+tytso at mit.edu|e2fsck/pass1b.c|19970426132016|02082|72680822 tytso at think.thunk.org|e2fsck/pass1b.c|20010708030131|59452
+tytso at think.thunk.org|lib/ext2fs/tst_bitops.c|20010704180457|29741|b2f2ac3cc6e3c008 tytso at think.thunk.org|lib/ext2fs/tst_bitops.c|20010704180458|01949
+tytso at mit.edu|lib/e2p/feature.c|19990914201736|21658|ed66549a tytso at think.thunk.org|lib/e2p/feature.c|20010623222310|35803
+tytso at mit.edu|BitKeeper/etc/config|20010622175938|00805|90d7c5b67fd424b tytso at think.thunk.org|BitKeeper/etc/config|20010623220201|03590
+tytso at mit.edu|debian/comerr-dev.examples|20010509045101|03853|705e0f0d tytso at think.thunk.org|debian/comerr-dev.examples|20010623030522|05008
+tytso at mit.edu|lib/ext2fs/flushb.c|20010111154843|26607|ff6367ef tytso at think.thunk.org|lib/ext2fs/flushb.c|20010623010117|19959
+tytso at mit.edu|e2fsck/flushb.c|19970426132012|02082|72680822 tytso at think.thunk.org|e2fsck/flushb.c|20010623010117|43562
+tytso at mit.edu|lib/ext2fs/dirblock.c|19970426135739|02169|7a460879 tytso at think.thunk.org|lib/ext2fs/dirblock.c|20010623004051|54691
+tytso at mit.edu|tests/defaults/e_script|19970429174737|02168|82820878 tytso at think.thunk.org|tests/defaults/e_script|20010623002954|14663
+tytso at mit.edu|debian/README.Debian|20010509045101|03853|705e0f0d tytso at mit.edu|BitKeeper/deleted/.del-README.Debian~705e0f0d|20010615225215|29555
+tytso at mit.edu|debian/TODO|20010509045101|03853|705e0f0d tytso at mit.edu|BitKeeper/deleted/.del-TODO~705e0f0d|20010615225215|33395
+tytso at mit.edu|debian/e2fslibs-dev.files|20010509045101|03853|705e0f0d tytso at mit.edu|debian/e2fslibs-dev.files|20010615225215|08155
+tytso at mit.edu|debian/e2fsprogs.README.Debian|20010615225214|04513|568d11a1 tytso at mit.edu|debian/e2fsprogs.README.Debian|20010615225215|04396
+tytso at mit.edu|debian/e2fsprogs.TODO|20010615225214|04513|568d11a1 tytso at mit.edu|debian/e2fsprogs.TODO|20010615225215|37805
+tytso at mit.edu|debian/e2fsprogs.files|20010615225214|04513|568d11a1 tytso at mit.edu|debian/e2fsprogs.files|20010615225215|03603
+tytso at mit.edu|debian/libss2.copyright|20010509045101|03853|705e0f0d tytso at mit.edu|debian/libss2.copyright|20010615225215|41801
+tytso at mit.edu|lib/ext2fs/ext2_types.h.in|20010601234945|05036|459713ac tytso at mit.edu|lib/ext2fs/ext2_types.h.in|20010614002247|22506
+tytso at mit.edu|lib/ext2fs/inode.c|19970426132114|02082|72680822 tytso at mit.edu|lib/ext2fs/inode.c|20010613001103|23195
+tytso at mit.edu|lib/ext2fs/tst_iscan.c|19970429161529|02134|7a320856 tytso at mit.edu|lib/ext2fs/tst_iscan.c|20010613001103|52586
+tytso at mit.edu|lib/ext2fs/gen_bitmap.c|20010611151715|22230|8a4b56d6 tytso at mit.edu|lib/ext2fs/gen_bitmap.c|20010611151716|22419
+tytso at mit.edu|e2fsck/swapfs.c|19970429145143|02119|79e00847 tytso at mit.edu|e2fsck/swapfs.c|20010611065906|61047
+tytso at mit.edu|lib/ext2fs/block.c|19970426132106|02082|72680822 tytso at mit.edu|lib/ext2fs/block.c|20010611070004|46889
+tytso at mit.edu|lib/ext2fs/native.c|19970429145220|02119|79e00847 tytso at mit.edu|lib/ext2fs/native.c|20010611070004|31934
+tytso at mit.edu|lib/ext2fs/rw_bitmaps.c|19970426133348|02180|7b440884 tytso at mit.edu|lib/ext2fs/rw_bitmaps.c|20010611070004|22664
+tytso at mit.edu|lib/ext2fs/swapfs.c|19970426135757|02169|7a460879 tytso at mit.edu|lib/ext2fs/swapfs.c|20010611070004|14763
+tytso at mit.edu|lib/e2p/configure|19970426135649|02169|7a460879 tytso at mit.edu|BitKeeper/deleted/.del-configure~7a460879|20010611020757|08542
+tytso at mit.edu|lib/ext2fs/icount.c|19970429161510|02134|7a320856 tytso at mit.edu|lib/ext2fs/icount.c|20010608094258|21667
+tytso at mit.edu|tests/f_badinode/image.gz|19970426135910|02169|7a460879 tytso at mit.edu|tests/f_badinode/image.gz|20010602045506|32338
+tytso at mit.edu|lib/ext2fs/valid_blk.c|19970429161537|02134|7a320856 tytso at mit.edu|lib/ext2fs/valid_blk.c|20010602041316|10646
+tytso at mit.edu|wordwrap.pl|19990703202557|31923|e8797cb3 tytso at mit.edu|wordwrap.pl|20010601234922|50005
+tytso at mit.edu|include/asm/types.h.in|19990104073913|04426|ca55114a tytso at mit.edu|BitKeeper/deleted/.del-types.h.in~ca55114a|20010601234946|11900
+tytso at mit.edu|lib/e2p/Makefile.in|19970426135649|02169|7a460879 tytso at mit.edu|lib/e2p/Makefile.in|20010601234946|32086
+tytso at mit.edu|lib/e2p/uuid.c|19970429145202|02119|79e00847 tytso at mit.edu|lib/e2p/uuid.c|20010601234946|30359
+tytso at mit.edu|lib/ext2fs/dosio.c|19970811202905|18416|01c147f0 tytso at mit.edu|lib/ext2fs/dosio.c|20010601234946|48282
+tytso at mit.edu|tests/progs/Makefile.in|19970429161706|02134|7a320856 tytso at mit.edu|tests/progs/Makefile.in|20010601234946|03639
+tytso at mit.edu|tests/f_dup3/expect.1|20010601194642|12481|9f8430c1 tytso at mit.edu|tests/f_dup3/expect.1|20010601194643|52626
+tytso at mit.edu|tests/f_dup3/expect.2|20010601194642|12481|9f8430c1 tytso at mit.edu|tests/f_dup3/expect.2|20010601194643|24589
+tytso at mit.edu|tests/f_dup3/image.gz|20010601194642|12481|9f8430c1 tytso at mit.edu|tests/f_dup3/image.gz|20010601194643|29423
+tytso at mit.edu|tests/f_dup3/name|20010601194642|12481|9f8430c1 tytso at mit.edu|tests/f_dup3/name|20010601194643|03938
+tytso at mit.edu|tests/d_loaddump/expect|20010505162116|06529|97951981 tytso at mit.edu|tests/d_loaddump/expect|20010601151438|50807
+tytso at mit.edu|tests/d_loaddump/script|20010505162116|06529|97951981 tytso at mit.edu|tests/d_loaddump/script|20010601151438|52237
+tytso at mit.edu|lib/e2p/e2p.h|19970426132036|02082|72680822 tytso at mit.edu|lib/e2p/e2p.h|20010521025421|60085
+tytso at mit.edu|debian/e2fsck-static.files|20010521024840|05788|75dc169c tytso at mit.edu|debian/e2fsck-static.files|20010521024841|04920
+tytso at mit.edu|debian/e2fsprogs.copyright|20010509045101|03853|705e0f0d tytso at mit.edu|debian/e2fsprogs.copyright|20010521024841|04511
+tytso at mit.edu|lib/Makefile.bsd-lib|19970426135638|02169|7a460879 tytso at mit.edu|lib/Makefile.bsd-lib|20010519220736|57306
+tytso at mit.edu|lib/Makefile.dll-lib|19970426133256|02180|7b440884 tytso at mit.edu|lib/Makefile.dll-lib|20010519220736|13097
+tytso at mit.edu|lib/Makefile.elf-lib|19970426135641|02169|7a460879 tytso at mit.edu|lib/Makefile.elf-lib|20010519220736|47057
+tytso at mit.edu|lib/Makefile.solaris-lib|20001025023838|04053|669e0fd5 tytso at mit.edu|lib/Makefile.solaris-lib|20010519220736|45467
+tytso at mit.edu|e2fsck/problemP.h|19971114052210|06615|856219d7 tytso at mit.edu|e2fsck/problemP.h|20010514124646|27984
+tytso at mit.edu|tests/f_badorphan/expect.2|20010514124740|06561|8b4619a1 tytso at mit.edu|tests/f_badorphan/expect.2|20010514124741|24870
+tytso at mit.edu|tests/f_badorphan/image.gz|20010514124740|06561|8b4619a1 tytso at mit.edu|tests/f_badorphan/image.gz|20010514124741|36667
+tytso at mit.edu|tests/f_badorphan/name|20010514124740|06561|8b4619a1 tytso at mit.edu|tests/f_badorphan/name|20010514124741|02150
+tytso at mit.edu|resize/resize2fs.h|19970607204257|03414|0f810d56 tytso at mit.edu|resize/resize2fs.h|20010514114020|06778
+tytso at mit.edu|e2fsck/scantest.c|19970426133242|02180|7b440884 tytso at mit.edu|e2fsck/scantest.c|20010514114241|49270
+tytso at mit.edu|lib/uuid/tst_uuid.c|19970429145237|02119|79e00847 tytso at mit.edu|lib/uuid/tst_uuid.c|20010514114338|16009
+tytso at mit.edu|tests/progs/test_icount.c|19970429174750|02168|82820878 tytso at mit.edu|tests/progs/test_icount.c|20010514114538|43475
+tytso at mit.edu|tests/progs/test_rel.c|19970429161707|02134|7a320856 tytso at mit.edu|tests/progs/test_rel.c|20010514114538|02571
+tytso at mit.edu|lib/ext2fs/alloc_tables.c|19970429161448|02134|7a320856 tytso at mit.edu|lib/ext2fs/alloc_tables.c|20010514113552|40063
+tytso at mit.edu|lib/ext2fs/badblocks.c|19970426132102|02082|72680822 tytso at mit.edu|lib/ext2fs/badblocks.c|20010514113552|46734
+tytso at mit.edu|lib/ext2fs/bb_compat.c|19970429161450|02134|7a320856 tytso at mit.edu|lib/ext2fs/bb_compat.c|20010514113552|45759
+tytso at mit.edu|lib/ext2fs/bitmaps.c|19970426132103|02082|72680822 tytso at mit.edu|lib/ext2fs/bitmaps.c|20010514113552|11836
+tytso at mit.edu|lib/ext2fs/bitops.c|19970426132104|02082|72680822 tytso at mit.edu|lib/ext2fs/bitops.c|20010514113552|28100
+tytso at mit.edu|lib/ext2fs/bmove.c|19970609145057|05219|d64d1463 tytso at mit.edu|lib/ext2fs/bmove.c|20010514113552|27786
+tytso at mit.edu|lib/ext2fs/brel_ma.c|19970429161456|02134|7a320856 tytso at mit.edu|lib/ext2fs/brel_ma.c|20010514113552|29056
+tytso at mit.edu|lib/ext2fs/check_desc.c|19970426133331|02180|7b440884 tytso at mit.edu|lib/ext2fs/check_desc.c|20010514113552|63138
+tytso at mit.edu|lib/ext2fs/cmp_bitmaps.c|19970426135738|02169|7a460879 tytso at mit.edu|lib/ext2fs/cmp_bitmaps.c|20010514113552|02077
+tytso at mit.edu|lib/ext2fs/dblist.c|19970429161500|02134|7a320856 tytso at mit.edu|lib/ext2fs/dblist.c|20010514113552|53808
+tytso at mit.edu|lib/ext2fs/dupfs.c|19970429212623|02127|7ad9084f tytso at mit.edu|lib/ext2fs/dupfs.c|20010514113552|24425
+tytso at mit.edu|lib/ext2fs/freefs.c|19970426132111|02082|72680822 tytso at mit.edu|lib/ext2fs/freefs.c|20010514113552|49131
+tytso at mit.edu|lib/ext2fs/get_pathname.c|19970426132112|02082|72680822 tytso at mit.edu|lib/ext2fs/get_pathname.c|20010514113552|09674
+tytso at mit.edu|lib/ext2fs/imager.c|20001112193114|33144|3a588178 tytso at mit.edu|lib/ext2fs/imager.c|20010514113552|32050
+tytso at mit.edu|lib/ext2fs/inline.c|19970426132113|02082|72680822 tytso at mit.edu|lib/ext2fs/inline.c|20010514113552|52624
+tytso at mit.edu|lib/ext2fs/irel_ma.c|19970429161515|02134|7a320856 tytso at mit.edu|lib/ext2fs/irel_ma.c|20010514113552|46460
+tytso at mit.edu|lib/ext2fs/link.c|19970426132115|02082|72680822 tytso at mit.edu|lib/ext2fs/link.c|20010514113552|32865
+tytso at mit.edu|lib/ext2fs/lookup.c|19970429161519|02134|7a320856 tytso at mit.edu|lib/ext2fs/lookup.c|20010514113552|42309
+tytso at mit.edu|lib/ext2fs/namei.c|19970426132117|02082|72680822 tytso at mit.edu|lib/ext2fs/namei.c|20010514113552|13029
+tytso at mit.edu|lib/ext2fs/newdir.c|19970426132117|02082|72680822 tytso at mit.edu|lib/ext2fs/newdir.c|20010514113552|47983
+tytso at mit.edu|lib/ext2fs/nt_io.c|19991021193107|04859|210812fb tytso at mit.edu|lib/ext2fs/nt_io.c|20010514113552|57758
+tytso at mit.edu|lib/ext2fs/read_bb.c|19970426132119|02082|72680822 tytso at mit.edu|lib/ext2fs/read_bb.c|20010514113552|25471
+tytso at mit.edu|lib/ext2fs/read_bb_file.c|19970426132120|02082|72680822 tytso at mit.edu|lib/ext2fs/read_bb_file.c|20010514113552|22745
+tytso at mit.edu|lib/ext2fs/rs_bitmap.c|19970429161525|02134|7a320856 tytso at mit.edu|lib/ext2fs/rs_bitmap.c|20010514113552|57604
+tytso at mit.edu|lib/ext2fs/tst_getsize.c|19971112034806|14554|154738da tytso at mit.edu|lib/ext2fs/tst_getsize.c|20010514113552|03306
+tytso at mit.edu|lib/ext2fs/unlink.c|19970429161536|02134|7a320856 tytso at mit.edu|lib/ext2fs/unlink.c|20010514113552|57253
+tytso at mit.edu|lib/ext2fs/version.c|19970429174723|02168|82820878 tytso at mit.edu|lib/ext2fs/version.c|20010514113552|13216
+tytso at mit.edu|lib/ext2fs/write_bb_file.c|20000704192019|60235|ce7deb4b tytso at mit.edu|lib/ext2fs/write_bb_file.c|20010514113552|57738
+tytso at mit.edu|include/linux/ext2_fs.h|19970426135636|02169|7a460879 tytso at mit.edu|BitKeeper/deleted/.del-ext2_fs.h~7a460879|20010514050147|59517
+tytso at mit.edu|lib/e2p/ls.c|19970426132042|02082|72680822 tytso at mit.edu|lib/e2p/ls.c|20010513221453|47975
+tytso at mit.edu|misc/dumpe2fs.8.in|19970426143601|02174|837c087e tytso at mit.edu|misc/dumpe2fs.8.in|20010512154917|47079
+tytso at mit.edu|misc/e2label.8.in|19980330012048|61798|a0e8f166 tytso at mit.edu|misc/e2label.8.in|20010512154917|35540
+tytso at mit.edu|misc/mklost+found.8.in|19970426143611|02174|837c087e tytso at mit.edu|misc/mklost+found.8.in|20010512154917|42771
+tytso at mit.edu|misc/lsattr.1.in|19970426143607|02174|837c087e tytso at mit.edu|misc/lsattr.1.in|20010512154621|16673
+tytso at mit.edu|misc/uuidgen.1.in|19990316193517|16548|aaeb40a4 tytso at mit.edu|misc/uuidgen.1.in|20010512154621|30730
+tytso at mit.edu|lib/uuid/uuid_clear.3.in|19990316203154|03818|3b4d0eea tytso at mit.edu|lib/uuid/uuid_clear.3.in|20010512153246|13918
+tytso at mit.edu|lib/uuid/uuid_compare.3.in|19990316203154|03818|3b4d0eea tytso at mit.edu|lib/uuid/uuid_compare.3.in|20010512153246|31375
+tytso at mit.edu|lib/uuid/uuid_copy.3.in|19990316203154|03818|3b4d0eea tytso at mit.edu|lib/uuid/uuid_copy.3.in|20010512153246|16711
+tytso at mit.edu|lib/uuid/uuid_generate.3.in|19990316203155|03818|3b4d0eea tytso at mit.edu|lib/uuid/uuid_generate.3.in|20010512153246|50529
+tytso at mit.edu|lib/uuid/uuid_is_null.3.in|19990316203155|03818|3b4d0eea tytso at mit.edu|lib/uuid/uuid_is_null.3.in|20010512153246|23594
+tytso at mit.edu|lib/uuid/uuid_parse.3.in|19990316203155|03818|3b4d0eea tytso at mit.edu|lib/uuid/uuid_parse.3.in|20010512153246|51311
+tytso at mit.edu|lib/uuid/uuid_time.3.in|19990316203155|03818|3b4d0eea tytso at mit.edu|lib/uuid/uuid_time.3.in|20010512153246|04000
+tytso at mit.edu|lib/uuid/uuid_unparse.3.in|19990316203155|03818|3b4d0eea tytso at mit.edu|lib/uuid/uuid_unparse.3.in|20010512153246|30396
+tytso at mit.edu|COPYING|19970426133212|02180|7b440884 tytso at mit.edu|COPYING|20010511054107|40886
+tytso at mit.edu|tests/progs/random_exercise.c|20000820214652|32003|d71f7d03 tytso at mit.edu|tests/progs/random_exercise.c|20010510210338|50013
+tytso at mit.edu|debian/comerr-dev.doc-base|20010509045101|03853|705e0f0d tytso at mit.edu|debian/comerr-dev.doc-base|20010509045102|40826
+tytso at mit.edu|debian/comerr-dev.files|20010509045101|03853|705e0f0d tytso at mit.edu|debian/comerr-dev.files|20010509045102|14143
+tytso at mit.edu|debian/comerr-dev.postinst|20010509045101|03853|705e0f0d tytso at mit.edu|debian/comerr-dev.postinst|20010509045102|13923
+tytso at mit.edu|debian/e2fslibs-dev.doc-base|20010509045101|03853|705e0f0d tytso at mit.edu|debian/e2fslibs-dev.doc-base|20010509045102|29194
+tytso at mit.edu|debian/e2fslibs-dev.postinst|20010509045101|03853|705e0f0d tytso at mit.edu|debian/e2fslibs-dev.postinst|20010509045102|12340
+tytso at mit.edu|debian/e2fsprogs.docs|20010509045101|03853|705e0f0d tytso at mit.edu|debian/e2fsprogs.docs|20010509045102|01401
+tytso at mit.edu|debian/e2fsprogs.postinst|20010509045101|03853|705e0f0d tytso at mit.edu|debian/e2fsprogs.postinst|20010509045102|02865
+tytso at mit.edu|debian/e2fsprogs.shlibs|20010509045101|03853|705e0f0d tytso at mit.edu|debian/e2fsprogs.shlibs|20010509045102|08238
+tytso at mit.edu|debian/libcomerr2.copyright|20010509045101|03853|705e0f0d tytso at mit.edu|debian/libcomerr2.copyright|20010509045102|40162
+tytso at mit.edu|debian/shlibs.local|20010509045101|03853|705e0f0d tytso at mit.edu|debian/shlibs.local|20010509045102|04205
+tytso at mit.edu|debian/ss-dev.examples|20010509045101|03853|705e0f0d tytso at mit.edu|debian/ss-dev.examples|20010509045102|02091
+tytso at mit.edu|debian/ss-dev.files|20010509045101|03853|705e0f0d tytso at mit.edu|debian/ss-dev.files|20010509045102|07325
+tytso at mit.edu|debian/ss-dev.undocumented|20010509045101|03853|705e0f0d tytso at mit.edu|debian/ss-dev.undocumented|20010509045102|00839
+tytso at mit.edu|debian/uuid-dev.files|20010509045101|03853|705e0f0d tytso at mit.edu|debian/uuid-dev.files|20010509045102|10039
+tytso at mit.edu|debian/attic/comerrg-dev.info|20010509045106|03853|705e0f0d tytso at mit.edu|debian/attic/comerrg-dev.info|20010509045107|10097
+tytso at mit.edu|debian/attic/comerrg-dev.menu|20010509045106|03853|705e0f0d tytso at mit.edu|debian/attic/comerrg-dev.menu|20010509045107|40035
+tytso at mit.edu|debian/attic/e2fslibsg-dev.info|20010509045106|03853|705e0f0d tytso at mit.edu|debian/attic/e2fslibsg-dev.info|20010509045107|11837
+tytso at mit.edu|debian/attic/e2fslibsg-dev.menu|20010509045106|03853|705e0f0d tytso at mit.edu|debian/attic/e2fslibsg-dev.menu|20010509045107|21545
+tytso at mit.edu|debian/attic/libs/comerr2g.files|20010509045106|03853|705e0f0d tytso at mit.edu|debian/attic/libs/comerr2g.files|20010509045107|03694
+tytso at mit.edu|debian/attic/libs/control|20010509045106|03853|705e0f0d tytso at mit.edu|debian/attic/libs/control|20010509045107|03964
+tytso at mit.edu|debian/attic/libs/e2fslibsg.files|20010509045106|03853|705e0f0d tytso at mit.edu|debian/attic/libs/e2fslibsg.files|20010509045107|03416
+tytso at mit.edu|debian/attic/libs/rules|20010509045106|03853|705e0f0d tytso at mit.edu|debian/attic/libs/rules|20010509045107|34037
+tytso at mit.edu|debian/attic/libs/ss2g.files|20010509045106|03853|705e0f0d tytso at mit.edu|debian/attic/libs/ss2g.files|20010509045107|02668
+tytso at mit.edu|tests/d_loaddump/name|20010505162116|06529|97951981 tytso at mit.edu|tests/d_loaddump/name|20010505162117|02159
+tytso at mit.edu|config.guess|19970426135534|02169|7a460879 tytso at mit.edu|config.guess|20010505064927|53333
+tytso at mit.edu|config.sub|19970426135535|02169|7a460879 tytso at mit.edu|config.sub|20010505064927|52405
+tytso at mit.edu|lib/ext2fs/e2image.h|20001112193113|33144|3a588178 tytso at mit.edu|lib/ext2fs/e2image.h|20010503040229|42700
+tytso at mit.edu|lib/uuid/gen_uuid.c|19970429145234|02119|79e00847 tytso at mit.edu|lib/uuid/gen_uuid.c|20010501153244|20672
+tytso at mit.edu|util/subst.c|19971015024719|09889|b63e26a1 tytso at mit.edu|util/subst.c|20010417050537|05973
+tytso at mit.edu|e2fsck/jfs_e2fsck.h|20001209063810|32982|c0cc80d6 tytso at mit.edu|BitKeeper/deleted/.del-jfs_e2fsck.h~c0cc80d6|20010329185543|31525
+tytso at mit.edu|misc/uuidgen.c|19990316193518|16548|aaeb40a4 tytso at mit.edu|misc/uuidgen.c|20010208023807|22878
+tytso at mit.edu|util/gcc-wall-cleanup|20010111154359|11084|6f1c2b4c tytso at mit.edu|util/gcc-wall-cleanup|20010114160942|37683
+tytso at mit.edu|e2fsck/mtrace.h|20001231015202|08817|af0a2271 tytso at mit.edu|e2fsck/mtrace.h|20010112210503|42336
+tytso at mit.edu|resize/main.c|19970607204255|03414|0f810d56 tytso at mit.edu|resize/main.c|20010111161111|51755
+tytso at mit.edu|lib/ext2fs/dll/jump.funcs|19970426135759|02169|7a460879 tytso at mit.edu|lib/ext2fs/dll/jump.funcs|20010111154850|16548
+tytso at mit.edu|resize/extent.c|19970617035206|05773|df1d168d tytso at mit.edu|resize/extent.c|20010111153610|10555
+tytso at mit.edu|debugfs/ncheck.c|19970426132004|02082|72680822 tytso at mit.edu|debugfs/ncheck.c|20010111152639|36140
+tytso at mit.edu|e2fsck/dirinfo.c|19970426132008|02082|72680822 tytso at mit.edu|e2fsck/dirinfo.c|20010111151214|16359
+tytso at mit.edu|e2fsck/emptydir.c|19980801041716|02585|9a4e0a19 tytso at mit.edu|e2fsck/emptydir.c|20010111151214|45793
+tytso at mit.edu|e2fsck/pass3.c|19970426132017|02082|72680822 tytso at mit.edu|e2fsck/pass3.c|20010111151214|06601
+tytso at mit.edu|e2fsck/pass4.c|19970426132018|02082|72680822 tytso at mit.edu|e2fsck/pass4.c|20010111151214|27403
+tytso at mit.edu|lib/ext2fs/brel.h|19970429161456|02134|7a320856 tytso at mit.edu|lib/ext2fs/brel.h|20010111045439|40055
+tytso at mit.edu|lib/ext2fs/irel.h|19970429161514|02134|7a320856 tytso at mit.edu|lib/ext2fs/irel.h|20010111045439|18048
+tytso at mit.edu|e2fsck/mtrace.c|19970426132014|02082|72680822 tytso at mit.edu|e2fsck/mtrace.c|20001231015203|21725
+tytso at mit.edu|e2fsck/jfs.h|20000814142517|37864|fa6593e8 tytso at mit.edu|BitKeeper/deleted/.del-jfs.h~fa6593e8|20001218024532|21010
+tytso at mit.edu|lib/ss/Makefile.in|19970426135810|02169|7a460879 tytso at mit.edu|lib/ss/Makefile.in|20001209063948|42918
+tytso at mit.edu|lib/et/compile_et.1|19970426132050|02082|72680822 tytso at mit.edu|lib/et/compile_et.1|20001204234907|64735
+tytso at mit.edu|misc/base_device.tst|20001203063355|26231|a2186677 tytso at mit.edu|misc/base_device.tst|20001203063356|47007
+tytso at mit.edu|lib/e2p/fgetflags.c|19970426132037|02082|72680822 tytso at mit.edu|lib/e2p/fgetflags.c|20001202061144|47854
+tytso at mit.edu|lib/e2p/fgetversion.c|19970426132037|02082|72680822 tytso at mit.edu|lib/e2p/fgetversion.c|20001202061144|17690
+tytso at mit.edu|lib/e2p/fsetflags.c|19970426132038|02082|72680822 tytso at mit.edu|lib/e2p/fsetflags.c|20001202061144|48266
+tytso at mit.edu|lib/e2p/fsetversion.c|19970426132039|02082|72680822 tytso at mit.edu|lib/e2p/fsetversion.c|20001202061144|18034
+tytso at mit.edu|lib/ext2fs/ext2_io.h|19971020004221|05114|3ce613fa tytso at mit.edu|lib/ext2fs/ext2_io.h|20001026202442|33349
+tytso at mit.edu|lib/ext2fs/llseek.c|19970426133342|02180|7b440884 tytso at mit.edu|lib/ext2fs/llseek.c|20001025020534|20486
+tytso at mit.edu|lib/ext2fs/jfs_dat.h|20001024183152|14637|8f10392d tytso at mit.edu|lib/ext2fs/jfs_dat.h|20001024183153|60861
+tytso at mit.edu|tests/f_journal/image.gz|20000820214839|30058|7aed756a tytso at mit.edu|tests/f_journal/image.gz|20001018190339|58086
+tytso at mit.edu|e2fsck/extend.c|19970426135605|02169|7a460879 tytso at mit.edu|e2fsck/extend.c|20000912212436|48782
+tytso at mit.edu|tests/progs/hold_inode.c|20000820214652|32003|d71f7d03 tytso at mit.edu|tests/progs/hold_inode.c|20000820214653|62830
+tytso at mit.edu|tests/f_journal/name|20000820214839|30058|7aed756a tytso at mit.edu|tests/f_journal/name|20000820214840|01563
+tytso at mit.edu|tests/f_orphan/expect.1|20000820214844|30058|7aed756a tytso at mit.edu|tests/f_orphan/expect.1|20000820214845|53585
+tytso at mit.edu|tests/f_orphan/expect.2|20000820214844|30058|7aed756a tytso at mit.edu|tests/f_orphan/expect.2|20000820214845|24794
+tytso at mit.edu|tests/f_orphan/image.gz|20000820214844|30058|7aed756a tytso at mit.edu|tests/f_orphan/image.gz|20000820214845|06057
+tytso at mit.edu|tests/f_orphan/name|20000820214844|30058|7aed756a tytso at mit.edu|tests/f_orphan/name|20000820214845|02201
+tytso at mit.edu|lib/uuid/configure.in|20000713232049|11422|cf3a2c9e tytso at mit.edu|lib/uuid/configure.in|20000713232050|20785
+tytso at mit.edu|po/.cvsignore|20000208213508|01683|46980693 tytso at mit.edu|po/.cvsignore|20000713231701|05172
+tytso at mit.edu|lib/et/Makefile.in|19970426135709|02169|7a460879 tytso at mit.edu|lib/et/Makefile.in|20000704184935|04459
+tytso at mit.edu|lib/ss/.cvsignore|20000525231632|04004|57000fa4 tytso at mit.edu|lib/ss/.cvsignore|20000704123755|04098
+tytso at mit.edu|lib/ss/ct_c.awk|19970426132125|02082|72680822 tytso at mit.edu|lib/ss/ct_c.awk|20000704123333|63006
+tytso at mit.edu|lib/ss/std_rqs.c|19970426132139|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-std_rqs.c~72680822|20000525234507|08293
+tytso at mit.edu|debugfs/.depend|19970426131959|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-.depend~72680822|20000525234634|25848
+tytso at mit.edu|e2fsck/.depend|19970426132005|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-.depend~72680822~1|20000525234638|23739
+tytso at mit.edu|lib/e2p/.depend|19970426132035|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-.depend~72680822~2|20000525234639|15244
+tytso at mit.edu|lib/et/.depend|19970426132046|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-.depend~72680822~3|20000525234639|17372
+tytso at mit.edu|lib/ext2fs/.depend|19970426132100|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-.depend~72680822~4|20000525234639|22539
+tytso at mit.edu|lib/ss/.depend|19970426132121|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-.depend~72680822~5|20000525234639|29234
+tytso at mit.edu|misc/.depend|19970426132142|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-.depend~72680822~6|20000525234639|44968
+tytso at mit.edu|e2fsck/.cvsignore|20000525234213|03859|3fb10f13 tytso at mit.edu|e2fsck/.cvsignore|20000525234214|05480
+tytso at mit.edu|resize/.cvsignore|20000525231528|04004|57000fa4 tytso at mit.edu|resize/.cvsignore|20000525231529|03997
+tytso at mit.edu|tests/.cvsignore|20000525231530|04004|57000fa4 tytso at mit.edu|tests/.cvsignore|20000525231531|04500
+tytso at mit.edu|tests/progs/.cvsignore|20000525231533|04004|57000fa4 tytso at mit.edu|tests/progs/.cvsignore|20000525231534|03893
+tytso at mit.edu|util/.cvsignore|20000525231533|04004|57000fa4 tytso at mit.edu|util/.cvsignore|20000525231534|02418
+tytso at mit.edu|misc/.cvsignore|20000525231629|04004|57000fa4 tytso at mit.edu|misc/.cvsignore|20000525231630|16875
+tytso at mit.edu|lib/ext2fs/.cvsignore|20000525231632|04004|57000fa4 tytso at mit.edu|lib/ext2fs/.cvsignore|20000525231633|03829
+tytso at mit.edu|lib/uuid/.cvsignore|20000525231632|04004|57000fa4 tytso at mit.edu|lib/uuid/.cvsignore|20000525231633|13701
+tytso at mit.edu|lib/et/.cvsignore|20000525231713|04004|57000fa4 tytso at mit.edu|lib/et/.cvsignore|20000525231714|01875
+tytso at mit.edu|intl/.cvsignore|20000525231715|04004|57000fa4 tytso at mit.edu|intl/.cvsignore|20000525231716|01775
+tytso at mit.edu|lib/e2p/.cvsignore|20000525231715|04004|57000fa4 tytso at mit.edu|lib/e2p/.cvsignore|20000525231716|00808
+tytso at mit.edu|debugfs/.cvsignore|20000525231904|04004|57000fa4 tytso at mit.edu|debugfs/.cvsignore|20000525231905|03594
+tytso at mit.edu|.cvsignore|19980704175553|04684|db24124c tytso at mit.edu|.cvsignore|20000525231908|05969
+tytso at mit.edu|doc/.cvsignore|20000525231907|04004|57000fa4 tytso at mit.edu|doc/.cvsignore|20000525231908|02207
+tytso at mit.edu|tests/f_hurd/expect.1|20000508133220|10469|50b528e5 tytso at mit.edu|tests/f_hurd/expect.1|20000508133221|33515
+tytso at mit.edu|tests/f_hurd/expect.2|20000508133220|10469|50b528e5 tytso at mit.edu|tests/f_hurd/expect.2|20000508133221|24522
+tytso at mit.edu|tests/f_hurd/image.gz|20000508133220|10469|50b528e5 tytso at mit.edu|tests/f_hurd/image.gz|20000508133221|31953
+tytso at mit.edu|tests/f_hurd/name|20000508133220|10469|50b528e5 tytso at mit.edu|tests/f_hurd/name|20000508133221|02159
+tytso at mit.edu|lib/uuid/clear.c|19970429145232|02119|79e00847 tytso at mit.edu|lib/uuid/clear.c|20000407200603|23642
+tytso at mit.edu|lib/uuid/dll/jump.funcs|19970429161559|02134|7a320856 tytso at mit.edu|lib/uuid/dll/jump.funcs|20000406214854|54101
+tytso at mit.edu|lib/uuid/dll/jump.import|19970429161601|02134|7a320856 tytso at mit.edu|lib/uuid/dll/jump.import|20000406214854|08743
+tytso at mit.edu|lib/uuid/dll/jump.params|19970429161601|02134|7a320856 tytso at mit.edu|lib/uuid/dll/jump.params|20000406214854|06217
+tytso at mit.edu|lib/e2p/dll/jump.funcs|19970426135659|02169|7a460879 tytso at mit.edu|lib/e2p/dll/jump.funcs|20000406215000|00784
+tytso at mit.edu|resize/e2fsprogs-1.12.spec|19980307233643|04093|70080ffd tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.12.spec~70080ffd|20000406213833|51012
+tytso at mit.edu|resize/pq.gif|19980307233644|04093|70080ffd tytso at mit.edu|BitKeeper/deleted/.del-pq.gif~70080ffd|20000406213833|20520
+tytso at mit.edu|resize/resize2fs.8.in|19970607204255|03414|0f810d56 tytso at mit.edu|resize/resize2fs.8.in|20000406213833|34257
+tytso at mit.edu|resize/resize2fs.spec|19980321071245|05195|524d144b tytso at mit.edu|BitKeeper/deleted/.del-resize2fs.spec~524d144b|20000406213834|46996
+tytso at mit.edu|resize/version.h|19980321071245|05195|524d144b tytso at mit.edu|BitKeeper/deleted/.del-version.h~524d144b|20000406213834|04091
+tytso at mit.edu|resize/sim_progress.c|19970617035210|05773|df1d168d tytso at mit.edu|resize/sim_progress.c|20000406213834|64280
+tytso at mit.edu|resize/test_extent.c|19970617035210|05773|df1d168d tytso at mit.edu|resize/test_extent.c|20000406213834|39407
+tytso at mit.edu|misc/e2label.c|19970714192854|11428|c4262ca4 tytso at mit.edu|misc/e2label.c|20000403162017|03903
+tytso at mit.edu|ABOUT-NLS|20000208215414|04454|ed6a1166 tytso at mit.edu|ABOUT-NLS|20000403133102|21092
+tytso at mit.edu|install-utils/remove_preformat_manpages|19970426133256|02180|7b440884 tytso at mit.edu|install-utils/remove_preformat_manpages|20000403024351|35262
+tytso at mit.edu|include/nonunix/asm/types.h|19991021193317|03183|da980c6f tytso at mit.edu|include/nonunix/asm/types.h|20000211050444|02346
+tytso at mit.edu|intl/Makefile.in|20000208201946|03216|15120c90 tytso at mit.edu|intl/Makefile.in|20000208201947|58423
+tytso at mit.edu|intl/VERSION|20000208201946|03216|15120c90 tytso at mit.edu|intl/VERSION|20000208201947|03497
+tytso at mit.edu|intl/bindtextdom.c|20000208201946|03216|15120c90 tytso at mit.edu|intl/bindtextdom.c|20000208201947|35087
+tytso at mit.edu|intl/cat-compat.c|20000208201946|03216|15120c90 tytso at mit.edu|intl/cat-compat.c|20000208201947|60739
+tytso at mit.edu|intl/dcgettext.c|20000208201946|03216|15120c90 tytso at mit.edu|intl/dcgettext.c|20000208201947|48846
+tytso at mit.edu|intl/dgettext.c|20000208201947|03216|15120c90 tytso at mit.edu|intl/dgettext.c|20000208201948|15805
+tytso at mit.edu|intl/explodename.c|20000208201947|03216|15120c90 tytso at mit.edu|intl/explodename.c|20000208201948|09812
+tytso at mit.edu|intl/finddomain.c|20000208201947|03216|15120c90 tytso at mit.edu|intl/finddomain.c|20000208201948|14541
+tytso at mit.edu|intl/gettext.c|20000208201948|03216|15120c90 tytso at mit.edu|intl/gettext.c|20000208201949|27026
+tytso at mit.edu|intl/gettext.h|20000208201948|03216|15120c90 tytso at mit.edu|intl/gettext.h|20000208201949|03091
+tytso at mit.edu|intl/gettextP.h|20000208201948|03216|15120c90 tytso at mit.edu|intl/gettextP.h|20000208201949|46906
+tytso at mit.edu|intl/hash-string.h|20000208201948|03216|15120c90 tytso at mit.edu|intl/hash-string.h|20000208201949|11244
+tytso at mit.edu|intl/intl-compat.c|20000208201948|03216|15120c90 tytso at mit.edu|intl/intl-compat.c|20000208201949|08628
+tytso at mit.edu|intl/l10nflist.c|20000208201949|03216|15120c90 tytso at mit.edu|intl/l10nflist.c|20000208201950|64504
+tytso at mit.edu|intl/libgettext.h|20000208201949|03216|15120c90 tytso at mit.edu|intl/libgettext.h|20000208201950|00619
+tytso at mit.edu|intl/linux-msg.sed|20000208201949|03216|15120c90 tytso at mit.edu|intl/linux-msg.sed|20000208201950|19204
+tytso at mit.edu|intl/loadinfo.h|20000208201949|03216|15120c90 tytso at mit.edu|intl/loadinfo.h|20000208201950|62484
+tytso at mit.edu|intl/loadmsgcat.c|20000208201950|03216|15120c90 tytso at mit.edu|intl/loadmsgcat.c|20000208201951|25712
+tytso at mit.edu|intl/localealias.c|20000208201950|03216|15120c90 tytso at mit.edu|intl/localealias.c|20000208201951|52549
+tytso at mit.edu|intl/po2tbl.sed.in|20000208201950|03216|15120c90 tytso at mit.edu|intl/po2tbl.sed.in|20000208201951|59796
+tytso at mit.edu|intl/textdomain.c|20000208201950|03216|15120c90 tytso at mit.edu|intl/textdomain.c|20000208201951|08126
+tytso at mit.edu|intl/xopen-msg.sed|20000208201951|03216|15120c90 tytso at mit.edu|intl/xopen-msg.sed|20000208201952|27839
+tytso at mit.edu|aclocal.m4|20000208201720|07909|204d1ee5 tytso at mit.edu|aclocal.m4|20000208201721|46544
+tytso at mit.edu|misc/nls-enable.h|20000208004754|22450|80f857b2 tytso at mit.edu|misc/nls-enable.h|20000208004755|24139
+tytso at mit.edu|e2fsck/ehandler.c|19970426132011|02082|72680822 tytso at mit.edu|e2fsck/ehandler.c|20000207031102|20027
+tytso at mit.edu|util/Makefile.in|19971015024718|09889|b63e26a1 tytso at mit.edu|util/Makefile.in|19991119184230|49086
+tytso at mit.edu|tests/f_filetype/expect.2|19991110131722|47870|bc0ebafe tytso at mit.edu|tests/f_filetype/expect.2|19991110131723|24538
+tytso at mit.edu|tests/f_filetype/image.gz|19991110131722|47870|bc0ebafe tytso at mit.edu|tests/f_filetype/image.gz|19991110131723|55208
+tytso at mit.edu|tests/f_filetype/name|19991110131722|47870|bc0ebafe tytso at mit.edu|tests/f_filetype/name|19991110131723|04895
+tytso at mit.edu|tests/f_imagic/expect.2|19991110131722|47870|bc0ebafe tytso at mit.edu|tests/f_imagic/expect.2|19991110131723|24527
+tytso at mit.edu|tests/f_imagic/image.gz|19991110131722|47870|bc0ebafe tytso at mit.edu|tests/f_imagic/image.gz|19991110131723|30973
+tytso at mit.edu|tests/f_imagic/name|19991110131723|47870|bc0ebafe tytso at mit.edu|tests/f_imagic/name|19991110131724|03929
+tytso at mit.edu|tests/f_imagic_fs/expect.2|19991110131723|47870|bc0ebafe tytso at mit.edu|tests/f_imagic_fs/expect.2|19991110131724|24527
+tytso at mit.edu|tests/f_imagic_fs/name|19991110131723|47870|bc0ebafe tytso at mit.edu|tests/f_imagic_fs/name|19991110131724|03553
+tytso at mit.edu|tests/f_imagic_fs/script|19991110131723|47870|bc0ebafe tytso at mit.edu|tests/f_imagic_fs/script|19991110131724|10776
+tytso at mit.edu|lib/uuid/gen_uuid_nt.c|19991021193156|05563|d28515bb tytso at mit.edu|lib/uuid/gen_uuid_nt.c|19991026024903|61259
+tytso at mit.edu|include/nonunix/config.h|19991021193311|03183|da980c6f tytso at mit.edu|include/nonunix/config.h|19991026025010|28159
+tytso at mit.edu|lib/et/com_err.3|19970426132047|02082|72680822 tytso at mit.edu|lib/et/com_err.3|19991023025133|13838
+tytso at mit.edu|lib/et/error_message.c|19970426132052|02082|72680822 tytso at mit.edu|lib/et/error_message.c|19991023011605|29644
+tytso at mit.edu|lib/et/error_table.h|19970426132053|02082|72680822 tytso at mit.edu|lib/et/error_table.h|19991023011605|35098
+tytso at mit.edu|lib/et/et_name.c|19970426132055|02082|72680822 tytso at mit.edu|lib/et/et_name.c|19991023011606|34433
+tytso at mit.edu|lib/et/init_et.c|19970426132056|02082|72680822 tytso at mit.edu|lib/et/init_et.c|19991023011606|60880
+tytso at mit.edu|lib/et/internal.h|19970426132056|02082|72680822 tytso at mit.edu|lib/et/internal.h|19991023011606|10970
+tytso at mit.edu|lib/ss/data.c|19970426132126|02082|72680822 tytso at mit.edu|lib/ss/data.c|19991023011621|07855
+tytso at mit.edu|lib/ss/error.c|19970426132127|02082|72680822 tytso at mit.edu|lib/ss/error.c|19991023011621|22306
+tytso at mit.edu|lib/ss/help.c|19970426132128|02082|72680822 tytso at mit.edu|lib/ss/help.c|19991023011622|31590
+tytso at mit.edu|lib/ss/invocation.c|19970426132129|02082|72680822 tytso at mit.edu|lib/ss/invocation.c|19991023011622|29849
+tytso at mit.edu|lib/ss/parse.c|19970426132133|02082|72680822 tytso at mit.edu|lib/ss/parse.c|19991023011622|60248
+tytso at mit.edu|lib/ss/prompt.c|19970426132134|02082|72680822 tytso at mit.edu|lib/ss/prompt.c|19991023011622|26870
+tytso at mit.edu|lib/ss/request_tbl.c|19970426132134|02082|72680822 tytso at mit.edu|lib/ss/request_tbl.c|19991023011622|29509
+tytso at mit.edu|include/nonunix/dirent.h|19991021193311|03183|da980c6f tytso at mit.edu|include/nonunix/dirent.h|19991021193312|04526
+tytso at mit.edu|include/nonunix/getopt.h|19991021193311|03183|da980c6f tytso at mit.edu|include/nonunix/getopt.h|19991021193312|04417
+tytso at mit.edu|include/nonunix/grp.h|19991021193311|03183|da980c6f tytso at mit.edu|include/nonunix/grp.h|19991021193312|22686
+tytso at mit.edu|include/nonunix/pwd.h|19991021193311|03183|da980c6f tytso at mit.edu|include/nonunix/pwd.h|19991021193312|30767
+tytso at mit.edu|include/nonunix/termios.h|19991021193311|03183|da980c6f tytso at mit.edu|include/nonunix/termios.h|19991021193312|06887
+tytso at mit.edu|include/nonunix/unistd.h|19991021193311|03183|da980c6f tytso at mit.edu|include/nonunix/unistd.h|19991021193312|00093
+tytso at mit.edu|include/nonunix/utime.h|19991021193311|03183|da980c6f tytso at mit.edu|include/nonunix/utime.h|19991021193312|02035
+tytso at mit.edu|include/nonunix/linux/types.h|19991021193317|03183|da980c6f tytso at mit.edu|include/nonunix/linux/types.h|19991021193318|38706
+tytso at mit.edu|include/nonunix/sys/file.h|19991021193317|03183|da980c6f tytso at mit.edu|include/nonunix/sys/file.h|19991021193318|24973
+tytso at mit.edu|include/nonunix/sys/ioctl.h|19991021193317|03183|da980c6f tytso at mit.edu|include/nonunix/sys/ioctl.h|19991021193318|26626
+tytso at mit.edu|include/nonunix/sys/param.h|19991021193317|03183|da980c6f tytso at mit.edu|include/nonunix/sys/param.h|19991021193318|28286
+tytso at mit.edu|include/nonunix/sys/resource.h|19991021193317|03183|da980c6f tytso at mit.edu|include/nonunix/sys/resource.h|19991021193318|00183
+tytso at mit.edu|include/nonunix/sys/socket.h|19991021193317|03183|da980c6f tytso at mit.edu|include/nonunix/sys/socket.h|19991021193318|01834
+tytso at mit.edu|include/nonunix/sys/time.h|19991021193317|03183|da980c6f tytso at mit.edu|include/nonunix/sys/time.h|19991021193318|01520
+tytso at mit.edu|include/nonunix/sys/wait.h|19991021193317|03183|da980c6f tytso at mit.edu|include/nonunix/sys/wait.h|19991021193318|05243
+tytso at mit.edu|tests/f_dupdot/expect.1|19990916142005|04914|56b61332 tytso at mit.edu|tests/f_dupdot/expect.1|19990916142006|57858
+tytso at mit.edu|tests/f_dupdot/expect.2|19990916142005|04914|56b61332 tytso at mit.edu|tests/f_dupdot/expect.2|19990916142006|24526
+tytso at mit.edu|tests/f_dupdot/image.gz|19990916142006|04914|56b61332 tytso at mit.edu|tests/f_dupdot/image.gz|19990916142007|46775
+tytso at mit.edu|tests/f_dupdot/name|19990916142006|04914|56b61332 tytso at mit.edu|tests/f_dupdot/name|19990916142007|02456
+tytso at mit.edu|lib/ss/copyright.h|19970426132124|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-copyright.h~72680822|19990914201009|63761
+tytso at mit.edu|lib/et/mit-sipb-copyright.h|19970426132057|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-mit-sipb-copyright.h~72680822|19990914201119|29369
+tytso at mit.edu|tests/f_dupfsblks/expect.1|19970426135941|02169|7a460879 tytso at mit.edu|tests/f_dupfsblks/expect.1|19990914195433|34933
+tytso at mit.edu|tests/f_dupfsblks/expect.2|19970426135942|02169|7a460879 tytso at mit.edu|tests/f_dupfsblks/expect.2|19990914195433|24532
+tytso at mit.edu|tests/f_dupfsblks/image.gz|19970426135943|02169|7a460879 tytso at mit.edu|tests/f_dupfsblks/image.gz|19990914195434|38056
+tytso at mit.edu|tests/f_expand/expect.2|19970426135951|02169|7a460879 tytso at mit.edu|tests/f_expand/expect.2|19990914195438|24799
+tytso at mit.edu|tests/f_expand/image.gz|19970426135952|02169|7a460879 tytso at mit.edu|tests/f_expand/image.gz|19990914195439|60595
+tytso at mit.edu|depfix.sed|19970426135538|02169|7a460879 tytso at mit.edu|depfix.sed|19990719154617|28929
+tytso at mit.edu|tests/f_recnect_bad/expect.1|19990625154015|16457|a6c94049 tytso at mit.edu|tests/f_recnect_bad/expect.1|19990625154016|64550
+tytso at mit.edu|tests/f_recnect_bad/expect.2|19990625154016|16457|a6c94049 tytso at mit.edu|tests/f_recnect_bad/expect.2|19990625154017|24530
+tytso at mit.edu|tests/f_recnect_bad/image.gz|19990625154016|16457|a6c94049 tytso at mit.edu|tests/f_recnect_bad/image.gz|19990625154017|46126
+tytso at mit.edu|tests/f_recnect_bad/name|19990625154017|16457|a6c94049 tytso at mit.edu|tests/f_recnect_bad/name|19990625154018|02143
+tytso at mit.edu|lib/fpopen.c|19970426133257|02180|7b440884 tytso at mit.edu|lib/fpopen.c|19990618011201|44094
+tytso at mit.edu|tests/f_lpffile/expect.1|19990315170046|10396|4ed5289c tytso at mit.edu|tests/f_lpffile/expect.1|19990315170047|23150
+tytso at mit.edu|tests/f_lpffile/expect.2|19990315170047|10396|4ed5289c tytso at mit.edu|tests/f_lpffile/expect.2|19990315170048|24528
+tytso at mit.edu|tests/f_lpffile/image.gz|19990315170047|10396|4ed5289c tytso at mit.edu|tests/f_lpffile/image.gz|19990315170048|41853
+tytso at mit.edu|tests/f_lpffile/name|19990315170047|10396|4ed5289c tytso at mit.edu|tests/f_lpffile/name|19990315170048|02806
+tytso at mit.edu|include/linux/types.h.in|19970426135637|02169|7a460879 tytso at mit.edu|BitKeeper/deleted/.del-types.h.in~7a460879|19990104073919|38154
+tytso at mit.edu|INSTALL.elfbin|19970426142446|02161|826d0871 tytso at mit.edu|INSTALL.elfbin|19990102041529|64281
+tytso at mit.edu|tests/f_badtable/expect.2|19970426135922|02169|7a460879 tytso at mit.edu|tests/f_badtable/expect.2|19981204061836|24527
+tytso at mit.edu|tests/f_illitable/expect.2|19970429161644|02134|7a320856 tytso at mit.edu|tests/f_illitable/expect.2|19981204061838|24520
+tytso at mit.edu|tests/f_badinode/ChangeLog|19980221014102|30361|905e7699 tytso at mit.edu|BitKeeper/deleted/.del-ChangeLog~905e7699|19980709054212|28952
+tytso at mit.edu|.release-checklist|19970429175559|02123|79e8084b tytso at mit.edu|.release-checklist|19980709053752|40963
+tytso at mit.edu|tests/f_preen/name|19970429152948|02120|79e20848 tytso at mit.edu|tests/f_preen/name|19980706144909|04201
+tytso at mit.edu|tests/f_swapfs/script|19970429145336|02119|79e00847 tytso at mit.edu|tests/f_swapfs/script|19980705193633|10914
+tytso at mit.edu|e2fsprogs-1.12.spec|19971124114632|03510|2cb50db6 tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.12.spec~2cb50db6|19980704175521|01349
+tytso at mit.edu|e2fsprogs-1.12.lsm|19971124114632|03510|2cb50db6 tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.12.lsm~2cb50db6|19980704175522|26195
+tytso at mit.edu|lib/et/et_c.awk|19970426132054|02082|72680822 tytso at mit.edu|lib/et/et_c.awk|19980627052354|01118
+tytso at mit.edu|lib/et/et_h.awk|19970426132054|02082|72680822 tytso at mit.edu|lib/et/et_h.awk|19980627052355|15754
+tytso at mit.edu|lib/Makefile.profile|19970426135643|02169|7a460879 tytso at mit.edu|lib/Makefile.profile|19980401025121|43099
+tytso at mit.edu|lib/e2p/getversion.c|19970426132040|02082|72680822 tytso at mit.edu|lib/e2p/getversion.c|19980330011626|57836
+tytso at mit.edu|tests/progs/test_icount.h|19970429174751|02168|82820878 tytso at mit.edu|tests/progs/test_icount.h|19980330010714|32319
+tytso at mit.edu|resize/resize2fs-1.12.spec|19980307233644|04093|70080ffd tytso at mit.edu|BitKeeper/deleted/.del-resize2fs-1.12.spec~70080ffd|19980321071245|24502
+tytso at mit.edu|lib/e2p/getflags.c|19970426132040|02082|72680822 tytso at mit.edu|lib/e2p/getflags.c|19980309130706|22453
+tytso at mit.edu|lib/e2p/setflags.c|19970426132044|02082|72680822 tytso at mit.edu|lib/e2p/setflags.c|19980309130708|24274
+tytso at mit.edu|lib/e2p/setversion.c|19970426132045|02082|72680822 tytso at mit.edu|lib/e2p/setversion.c|19980309130709|57671
+tytso at mit.edu|resize/e2fsprogs-1.11.spec|19970617053603|01694|42cd069e tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.11.spec~42cd069e|19980307233643|47377
+tytso at mit.edu|resize/NOTES|19970609145125|02056|62d00808 tytso at mit.edu|BitKeeper/deleted/.del-NOTES~62d00808|19980216221614|25683
+tytso at mit.edu|resize/banalysis.c|19970607204254|03414|0f810d56 tytso at mit.edu|BitKeeper/deleted/.del-banalysis.c~0f810d56|19980216221615|31456
+tytso at mit.edu|resize/banalysis.h|19970607204254|03414|0f810d56 tytso at mit.edu|BitKeeper/deleted/.del-banalysis.h~0f810d56|19980216221615|42783
+tytso at mit.edu|resize/ext2_block_move.c|19970617035204|05773|df1d168d tytso at mit.edu|BitKeeper/deleted/.del-ext2_block_move.c~df1d168d|19980216221616|56976
+tytso at mit.edu|resize/ext2_inode_move.c|19970617035205|05773|df1d168d tytso at mit.edu|BitKeeper/deleted/.del-ext2_inode_move.c~df1d168d|19980216221617|05965
+tytso at mit.edu|e2fsprogs-1.11.lsm|19970617054132|02569|a9b40a09 tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.11.lsm~a9b40a09|19971124114631|17033
+tytso at mit.edu|e2fsprogs-1.11.spec|19970617054133|02569|a9b40a09 tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.11.spec~a9b40a09|19971124114632|21800
+tytso at mit.edu|e2fsck/Makefile.pq|19971020012305|04570|b2d911da tytso at mit.edu|e2fsck/Makefile.pq|19971114052110|14382
+tytso at mit.edu|lib/ext2fs/Makefile.pq|19971020012227|04570|b2d911da tytso at mit.edu|lib/ext2fs/Makefile.pq|19971114052302|60790
+tytso at mit.edu|resize/Makefile.pq|19971020012306|04570|b2d911da tytso at mit.edu|resize/Makefile.pq|19971114052303|13477
+tytso at mit.edu|util/Makefile.pq|19971031062522|02465|84c209a1 tytso at mit.edu|util/Makefile.pq|19971114052304|09531
+tytso at mit.edu|util/libecho.c|19971031062523|02465|84c209a1 tytso at mit.edu|util/libecho.c|19971031062524|31851
+tytso at mit.edu|tests/e_brel_bma/script|19971025224357|10326|fa1c2856 tytso at mit.edu|tests/e_brel_bma/script|19971025224358|04668
+tytso at mit.edu|tests/e_irel_ima/script|19971025224357|10326|fa1c2856 tytso at mit.edu|tests/e_irel_ima/script|19971025224358|04668
+tytso at mit.edu|tests/progs/test_data/expect.icount|19970429174802|02168|82820878 tytso at mit.edu|tests/progs/test_data/expect.icount|19971025041653|09209
+tytso at mit.edu|lib/ext2fs/io.h|19970426132114|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-io.h~72680822|19971020004226|13177
+tytso at mit.edu|lib/do_substitute|19970429143423|02164|82760874 tytso at mit.edu|BitKeeper/deleted/.del-do_substitute~82760874|19971015024712|01080
+tytso at mit.edu|lib/substitute_sh.in|19970429143424|02164|82760874 tytso at mit.edu|BitKeeper/deleted/.del-substitute_sh.in~82760874|19971015024712|13801
+tytso at mit.edu|tests/f_badbblocks/expect.1|19970426135859|02169|7a460879 tytso at mit.edu|tests/f_badbblocks/expect.1|19971003174742|11462
+tytso at mit.edu|tests/f_baddir/expect.1|19970426135903|02169|7a460879 tytso at mit.edu|tests/f_baddir/expect.1|19971003174743|39580
+tytso at mit.edu|tests/f_baddotdir/expect.1|19970426135906|02169|7a460879 tytso at mit.edu|tests/f_baddotdir/expect.1|19971003174744|42974
+tytso at mit.edu|tests/f_badprimary/expect.1|19970426135915|02169|7a460879 tytso at mit.edu|tests/f_badprimary/expect.1|19971003174746|15145
+tytso at mit.edu|tests/f_badroot/expect.1|19970426135918|02169|7a460879 tytso at mit.edu|tests/f_badroot/expect.1|19971003174746|24322
+tytso at mit.edu|tests/f_bbfile/expect.1|19970426135925|02169|7a460879 tytso at mit.edu|tests/f_bbfile/expect.1|19971003174748|05164
+tytso at mit.edu|tests/f_bitmaps/expect.1|19970426135928|02169|7a460879 tytso at mit.edu|tests/f_bitmaps/expect.1|19971003174750|39817
+tytso at mit.edu|tests/f_dup/expect.1|19970426135934|02169|7a460879 tytso at mit.edu|tests/f_dup/expect.1|19971003174751|41768
+tytso at mit.edu|tests/f_dup2/expect.1|19970426135938|02169|7a460879 tytso at mit.edu|tests/f_dup2/expect.1|19971003174752|64265
+tytso at mit.edu|tests/f_end-bitmap/expect.1|19970426135947|02169|7a460879 tytso at mit.edu|tests/f_end-bitmap/expect.1|19971003174758|42250
+tytso at mit.edu|tests/f_noroot/expect.1|19970426140016|02169|7a460879 tytso at mit.edu|tests/f_noroot/expect.1|19971003174806|35878
+tytso at mit.edu|tests/f_preen/expect.2|19970429152945|02120|79e20848 tytso at mit.edu|tests/f_preen/expect.2|19971003174808|64472
+tytso at mit.edu|tests/f_zero_group/expect.1|19970429161700|02134|7a320856 tytso at mit.edu|tests/f_zero_group/expect.1|19971003174809|53329
+tytso at mit.edu|tests/f_zero_super/expect.1|19970429161703|02134|7a320856 tytso at mit.edu|tests/f_zero_super/expect.1|19971003174810|53430
+tytso at mit.edu|lib/ext2fs/dosio.h|19970811202906|18416|01c147f0 tytso at mit.edu|lib/ext2fs/dosio.h|19970811202907|34258
+tytso at mit.edu|e2fsprogs-1.10.lsm|19970429181322|02115|79d90843 tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.10.lsm~79d90843|19970617054132|06200
+tytso at mit.edu|e2fsprogs-1.10.spec|19970429181323|02115|79d90843 tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.10.spec~79d90843|19970617054133|09597
+tytso at mit.edu|resize/inodemap.c|19970612071428|03684|24510e64 tytso at mit.edu|BitKeeper/deleted/.del-inodemap.c~24510e64|19970617035207|04915
+tytso at mit.edu|resize/test_extent.in|19970617035211|05773|df1d168d tytso at mit.edu|resize/test_extent.in|19970617035212|58817
+tytso at mit.edu|doc/texinfo.tex|19970429161412|02134|7a320856 tytso at mit.edu|doc/texinfo.tex|19970429212557|00377
+tytso at mit.edu|lib/e2p/dll/jump.params|19970426135702|02169|7a460879 tytso at mit.edu|lib/e2p/dll/jump.params|19970429212609|06051
+tytso at mit.edu|lib/ext2fs/dll/jump.params|19970426135801|02169|7a460879 tytso at mit.edu|lib/ext2fs/dll/jump.params|19970429212633|06147
+tytso at mit.edu|lib/ss/test_ss.c|19970426132141|02082|72680822 tytso at mit.edu|lib/ss/test_ss.c|19970429212637|15170
+tytso at mit.edu|contrib/dconf|19970426135545|02169|7a460879 tytso at mit.edu|contrib/dconf|19970429212431|16157
+tytso at mit.edu|e2fsprogs-1.09.lsm|19970429175608|02123|79e8084b tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.09.lsm~79e8084b|19970429181322|57268
+tytso at mit.edu|e2fsprogs-1.09.spec|19970429175609|02123|79e8084b tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.09.spec~79e8084b|19970429181322|61958
+tytso at mit.edu|e2fsprogs-1.08.lsm|19970429173925|02168|82820878 tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.08.lsm~82820878|19970429175608|50141
+tytso at mit.edu|e2fsprogs-1.08.spec|19970429173925|02168|82820878 tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.08.spec~82820878|19970429175608|53556
+tytso at mit.edu|tests/test_config|19970426135856|02169|7a460879 tytso at mit.edu|tests/test_config|19970429174736|34071
+tytso at mit.edu|tests/defaults/r_script|19970429161618|02134|7a320856 tytso at mit.edu|BitKeeper/deleted/.del-r_script~7a320856|19970429174739|32812
+tytso at mit.edu|tests/e_brel_bma/name|19970429174739|02168|82820878 tytso at mit.edu|tests/e_brel_bma/name|19970429174740|05938
+tytso at mit.edu|tests/e_icount_normal/name|19970429174740|02168|82820878 tytso at mit.edu|tests/e_icount_normal/name|19970429174741|06087
+tytso at mit.edu|tests/e_icount_opt/name|19970429174740|02168|82820878 tytso at mit.edu|tests/e_icount_opt/name|19970429174741|04925
+tytso at mit.edu|tests/e_irel_ima/name|19970429174741|02168|82820878 tytso at mit.edu|tests/e_irel_ima/name|19970429174742|05942
+tytso at mit.edu|tests/f_dupsuper/expect.2|19970426135945|02169|7a460879 tytso at mit.edu|tests/f_dupsuper/expect.2|19970429174745|24542
+tytso at mit.edu|tests/f_preen/expect.1|19970429152945|02120|79e20848 tytso at mit.edu|tests/f_preen/expect.1|19970429174749|38426
+tytso at mit.edu|tests/progs/test_icount_cmds.ct|19970429174752|02168|82820878 tytso at mit.edu|tests/progs/test_icount_cmds.ct|19970429174753|02363
+tytso at mit.edu|tests/progs/rel_test/bma.setup|19970429161709|02134|7a320856 tytso at mit.edu|BitKeeper/deleted/.del-bma.setup~7a320856|19970429174757|13697
+tytso at mit.edu|tests/progs/rel_test/expect.brel|19970429161710|02134|7a320856 tytso at mit.edu|BitKeeper/deleted/.del-expect.brel~7a320856|19970429174758|17227
+tytso at mit.edu|tests/progs/rel_test/expect.irel|19970429161711|02134|7a320856 tytso at mit.edu|BitKeeper/deleted/.del-expect.irel~7a320856|19970429174759|23778
+tytso at mit.edu|tests/progs/rel_test/ima.setup|19970429161711|02134|7a320856 tytso at mit.edu|BitKeeper/deleted/.del-ima.setup~7a320856|19970429174759|01070
+tytso at mit.edu|tests/progs/rel_test/test.brel|19970429161712|02134|7a320856 tytso at mit.edu|BitKeeper/deleted/.del-test.brel~7a320856|19970429174800|04507
+tytso at mit.edu|tests/progs/rel_test/test.irel|19970429161713|02134|7a320856 tytso at mit.edu|BitKeeper/deleted/.del-test.irel~7a320856|19970429174801|08012
+tytso at mit.edu|tests/progs/test_data/bma.setup|19970429174800|02168|82820878 tytso at mit.edu|tests/progs/test_data/bma.setup|19970429174801|01695
+tytso at mit.edu|tests/progs/test_data/expect.brel|19970429174801|02168|82820878 tytso at mit.edu|tests/progs/test_data/expect.brel|19970429174802|50793
+tytso at mit.edu|tests/progs/test_data/expect.irel|19970429174803|02168|82820878 tytso at mit.edu|tests/progs/test_data/expect.irel|19970429174804|50149
+tytso at mit.edu|tests/progs/test_data/ima.setup|19970429174804|02168|82820878 tytso at mit.edu|tests/progs/test_data/ima.setup|19970429174805|01702
+tytso at mit.edu|tests/progs/test_data/normal.setup|19970429174804|02168|82820878 tytso at mit.edu|tests/progs/test_data/normal.setup|19970429174805|00683
+tytso at mit.edu|tests/progs/test_data/opt.setup|19970429174805|02168|82820878 tytso at mit.edu|tests/progs/test_data/opt.setup|19970429174806|00865
+tytso at mit.edu|tests/progs/test_data/test.brel|19970429174806|02168|82820878 tytso at mit.edu|tests/progs/test_data/test.brel|19970429174807|58229
+tytso at mit.edu|tests/progs/test_data/test.icount|19970429174807|02168|82820878 tytso at mit.edu|tests/progs/test_data/test.icount|19970429174808|07923
+tytso at mit.edu|tests/progs/test_data/test.irel|19970429174807|02168|82820878 tytso at mit.edu|tests/progs/test_data/test.irel|19970429174808|23148
+tytso at mit.edu|tests/r_brel_bma/name|19970429161714|02134|7a320856 tytso at mit.edu|BitKeeper/deleted/.del-name~7a320856|19970429174809|17469
+tytso at mit.edu|tests/r_irel_ima/name|19970429161715|02134|7a320856 tytso at mit.edu|BitKeeper/deleted/.del-name~7a320856~1|19970429174810|20834
+tytso at mit.edu|e2fsprogs-1.07.lsm|19970429161332|02134|7a320856 tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.07.lsm~7a320856|19970429173924|43423
+tytso at mit.edu|e2fsprogs-1.07.spec|19970429161333|02134|7a320856 tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.07.spec~7a320856|19970429173925|46806
+tytso at mit.edu|relocate/Makefile.in|19970429145249|02119|79e00847 tytso at mit.edu|BitKeeper/deleted/.del-Makefile.in~79e00847|19970429173239|22993
+tytso at mit.edu|relocate/README|19970429145249|02119|79e00847 tytso at mit.edu|BitKeeper/deleted/.del-README~79e00847|19970429173240|26340
+tytso at mit.edu|relocate/relocate.c|19970429145250|02119|79e00847 tytso at mit.edu|BitKeeper/deleted/.del-relocate.c~79e00847|19970429173241|29796
+tytso at mit.edu|relocate/relocate.h|19970429145251|02119|79e00847 tytso at mit.edu|BitKeeper/deleted/.del-relocate.h~79e00847|19970429173241|33279
+tytso at mit.edu|relocate/resize2fs.c|19970429145251|02119|79e00847 tytso at mit.edu|BitKeeper/deleted/.del-resize2fs.c~79e00847|19970429173242|02322
+tytso at mit.edu|lib/ext2fs/dll/jump.vars|19970426135802|02169|7a460879 tytso at mit.edu|lib/ext2fs/dll/jump.vars|19970429161540|27311
+tytso at mit.edu|lib/uuid/dll/jump.ignore|19970429161600|02134|7a320856 tytso at mit.edu|lib/uuid/dll/jump.ignore|19970429161601|38349
+tytso at mit.edu|lib/uuid/dll/jump.undefs|19970429161602|02134|7a320856 tytso at mit.edu|lib/uuid/dll/jump.undefs|19970429161603|02312
+tytso at mit.edu|lib/uuid/dll/jump.vars|19970429161603|02134|7a320856 tytso at mit.edu|lib/uuid/dll/jump.vars|19970429161604|48831
+tytso at mit.edu|tests/f_baddir/expect.2|19970426135904|02169|7a460879 tytso at mit.edu|tests/f_baddir/expect.2|19970429161623|24528
+tytso at mit.edu|tests/f_baddir/image.gz|19970426135904|02169|7a460879 tytso at mit.edu|tests/f_baddir/image.gz|19970429161623|56770
+tytso at mit.edu|tests/f_baddir/name|19970426135905|02169|7a460879 tytso at mit.edu|tests/f_baddir/name|19970429161625|02801
+tytso at mit.edu|tests/f_baddotdir/expect.2|19970426135907|02169|7a460879 tytso at mit.edu|tests/f_baddotdir/expect.2|19970429161626|24536
+tytso at mit.edu|tests/f_baddotdir/image.gz|19970426135907|02169|7a460879 tytso at mit.edu|tests/f_baddotdir/image.gz|19970429161627|48054
+tytso at mit.edu|tests/f_bbinode/expect.2|19970429161632|02134|7a320856 tytso at mit.edu|tests/f_bbinode/expect.2|19970429161633|24647
+tytso at mit.edu|tests/f_bbinode/image.gz|19970429161633|02134|7a320856 tytso at mit.edu|tests/f_bbinode/image.gz|19970429161634|17201
+tytso at mit.edu|tests/f_bbinode/name|19970429161634|02134|7a320856 tytso at mit.edu|tests/f_bbinode/name|19970429161635|02333
+tytso at mit.edu|tests/f_end-bitmap/name|19970426135949|02169|7a460879 tytso at mit.edu|tests/f_end-bitmap/name|19970429161640|03176
+tytso at mit.edu|tests/f_holedir/expect.1|19970426135953|02169|7a460879 tytso at mit.edu|tests/f_holedir/expect.1|19970429161642|03374
+tytso at mit.edu|tests/f_illitable/image.gz|19970429161644|02134|7a320856 tytso at mit.edu|tests/f_illitable/image.gz|19970429161645|31229
+tytso at mit.edu|tests/f_illitable/name|19970429161645|02134|7a320856 tytso at mit.edu|tests/f_illitable/name|19970429161646|01851
+tytso at mit.edu|tests/f_misstable/expect.2|19970429161650|02134|7a320856 tytso at mit.edu|tests/f_misstable/expect.2|19970429161651|24775
+tytso at mit.edu|tests/f_misstable/image.gz|19970429161650|02134|7a320856 tytso at mit.edu|tests/f_misstable/image.gz|19970429161651|37477
+tytso at mit.edu|tests/f_misstable/name|19970429161651|02134|7a320856 tytso at mit.edu|tests/f_misstable/name|19970429161652|01883
+tytso at mit.edu|tests/f_mke2fs2b/expect.1|19970426140013|02169|7a460879 tytso at mit.edu|tests/f_mke2fs2b/expect.1|19970429161653|50030
+tytso at mit.edu|tests/f_reconnect/expect.1|19970429161657|02134|7a320856 tytso at mit.edu|tests/f_reconnect/expect.1|19970429161658|52288
+tytso at mit.edu|tests/f_reconnect/expect.2|19970429161658|02134|7a320856 tytso at mit.edu|tests/f_reconnect/expect.2|19970429161659|24528
+tytso at mit.edu|tests/f_reconnect/image.gz|19970429161658|02134|7a320856 tytso at mit.edu|tests/f_reconnect/image.gz|19970429161659|45018
+tytso at mit.edu|tests/f_reconnect/name|19970429161659|02134|7a320856 tytso at mit.edu|tests/f_reconnect/name|19970429161700|02966
+tytso at mit.edu|tests/f_zero_group/expect.2|19970429161701|02134|7a320856 tytso at mit.edu|tests/f_zero_group/expect.2|19970429161702|24778
+tytso at mit.edu|tests/f_zero_group/image.gz|19970429161701|02134|7a320856 tytso at mit.edu|tests/f_zero_group/image.gz|19970429161702|05907
+tytso at mit.edu|tests/f_zero_group/name|19970429161702|02134|7a320856 tytso at mit.edu|tests/f_zero_group/name|19970429161703|03747
+tytso at mit.edu|tests/f_zero_super/expect.2|19970429161704|02134|7a320856 tytso at mit.edu|tests/f_zero_super/expect.2|19970429161705|24778
+tytso at mit.edu|tests/f_zero_super/image.gz|19970429161704|02134|7a320856 tytso at mit.edu|tests/f_zero_super/image.gz|19970429161705|00232
+tytso at mit.edu|tests/f_zero_super/name|19970429161705|02134|7a320856 tytso at mit.edu|tests/f_zero_super/name|19970429161706|03038
+tytso at mit.edu|tests/progs/test_rel.h|19970429161708|02134|7a320856 tytso at mit.edu|tests/progs/test_rel.h|19970429161709|34096
+tytso at mit.edu|tests/progs/test_rel_cmds.ct|19970429161708|02134|7a320856 tytso at mit.edu|tests/progs/test_rel_cmds.ct|19970429161709|02930
+tytso at mit.edu|.fix-Changelog|19970429142748|02164|82760874 tytso at mit.edu|.fix-Changelog|19970429161318|11216
+tytso at mit.edu|.missing-copyright|19970429161318|02134|7a320856 tytso at mit.edu|.missing-copyright|19970429161319|08229
+tytso at mit.edu|INSTALL.dllbin|19970426142445|02161|826d0871 tytso at mit.edu|INSTALL.dllbin|19970429161321|52815
+tytso at mit.edu|SHLIBS|19970426133216|02180|7b440884 tytso at mit.edu|SHLIBS|19970429161328|65238
+tytso at mit.edu|e2fsprogs-1.06.spec|19970429152849|02120|79e20848 tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.06.spec~79e20848|19970429161332|40064
+tytso at mit.edu|INSTALL|19970426131951|02082|72680822 tytso at mit.edu|INSTALL|19970429152846|62598
+tytso at mit.edu|e2fsprogs-1.05.spec|19970429145101|02119|79e00847 tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.05.spec~79e00847|19970429152849|36646
+tytso at mit.edu|tests/f_mke2fs2b/expect.2|19970426140013|02169|7a460879 tytso at mit.edu|tests/f_mke2fs2b/expect.2|19970429152943|24529
+tytso at mit.edu|tests/f_noroot/expect.2|19970426140017|02169|7a460879 tytso at mit.edu|tests/f_noroot/expect.2|19970429152945|24531
+tytso at mit.edu|tests/f_preen/image.gz|19970429152946|02120|79e20848 tytso at mit.edu|tests/f_preen/image.gz|19970429152947|23622
+tytso at mit.edu|tests/f_preen/script|19970429152948|02120|79e20848 tytso at mit.edu|tests/f_preen/script|19970429152949|04698
+tytso at mit.edu|lib/e2p/MAKELOG|19970426135647|02169|7a460879 tytso at mit.edu|BitKeeper/deleted/.del-MAKELOG~7a460879|19970429145151|47549
+tytso at mit.edu|lib/e2p/pe.c|19970426132042|02082|72680822 tytso at mit.edu|lib/e2p/pe.c|19970429145159|59018
+tytso at mit.edu|lib/e2p/ps.c|19970426132044|02082|72680822 tytso at mit.edu|lib/e2p/ps.c|19970429145201|46509
+tytso at mit.edu|tests/test_script|19970426135857|02169|7a460879 tytso at mit.edu|BitKeeper/deleted/.del-test_script~7a460879|19970429145257|13205
+tytso at mit.edu|tests/f_badlkcnt/expect.1|19970426135912|02169|7a460879 tytso at mit.edu|BitKeeper/deleted/.del-expect.1~7a460879|19970429145303|01404
+tytso at mit.edu|tests/f_badlkcnt/expect.2|19970426135913|02169|7a460879 tytso at mit.edu|BitKeeper/deleted/.del-expect.2~7a460879|19970429145303|13296
+tytso at mit.edu|tests/f_badlkcnt/image.gz|19970426135913|02169|7a460879 tytso at mit.edu|BitKeeper/deleted/.del-image.gz~7a460879|19970429145304|17991
+tytso at mit.edu|tests/f_badlkcnt/name|19970426135914|02169|7a460879 tytso at mit.edu|BitKeeper/deleted/.del-name~7a460879|19970429145305|24653
+tytso at mit.edu|tests/f_crashdisk/expect.1|19970429145309|02119|79e00847 tytso at mit.edu|tests/f_crashdisk/expect.1|19970429145310|36726
+tytso at mit.edu|tests/f_crashdisk/image.gz|19970429145310|02119|79e00847 tytso at mit.edu|tests/f_crashdisk/image.gz|19970429145311|25503
+tytso at mit.edu|tests/f_crashdisk/name|19970429145311|02119|79e00847 tytso at mit.edu|tests/f_crashdisk/name|19970429145312|02986
+tytso at mit.edu|tests/f_crashdisk/script|19970429145311|02119|79e00847 tytso at mit.edu|tests/f_crashdisk/script|19970429145312|03539
+tytso at mit.edu|tests/f_dirlink/expect.1|19970426135931|02169|7a460879 tytso at mit.edu|tests/f_dirlink/expect.1|19970429145313|38054
+tytso at mit.edu|tests/f_lpf/expect.2|19970426140006|02169|7a460879 tytso at mit.edu|tests/f_lpf/expect.2|19970429145324|24594
+tytso at mit.edu|tests/f_lpf/image.gz|19970426140007|02169|7a460879 tytso at mit.edu|tests/f_lpf/image.gz|19970429145325|28036
+tytso at mit.edu|tests/f_okgroup/expect.1|19970426140019|02169|7a460879 tytso at mit.edu|tests/f_okgroup/expect.1|19970429145332|32600
+tytso at mit.edu|tests/f_swapfs/debugfs.cmd|19970429145333|02119|79e00847 tytso at mit.edu|tests/f_swapfs/debugfs.cmd|19970429145334|04919
+tytso at mit.edu|tests/f_swapfs/name|19970429145335|02119|79e00847 tytso at mit.edu|tests/f_swapfs/name|19970429145336|03938
+tytso at mit.edu|.head-Changelog|19970429145053|02119|79e00847 tytso at mit.edu|.head-Changelog|19970429145054|10393
+tytso at mit.edu|e2fsprogs-1.04.spec|19970429142758|02164|82760874 tytso at mit.edu|BitKeeper/deleted/.del-e2fsprogs-1.04.spec~82760874|19970429145102|33175
+tytso at mit.edu|debugfs/debugfs.8|19970426132001|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-debugfs.8~72680822|19970426143516|49186
+tytso at mit.edu|e2fsck/e2fsck.8|19970426132009|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-e2fsck.8~72680822|19970426143521|41426
+tytso at mit.edu|lib/ext2fs/ext2_err.et|19970426132109|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-ext2_err.et~72680822|19970426143548|52070
+tytso at mit.edu|misc/badblocks.8|19970426132143|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-badblocks.8~72680822|19970426143558|64711
+tytso at mit.edu|misc/chattr.1|19970426132145|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-chattr.1~72680822|19970426143600|16624
+tytso at mit.edu|misc/dumpe2fs.8|19970426132146|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-dumpe2fs.8~72680822|19970426143601|07405
+tytso at mit.edu|misc/fsck.8|19970426132148|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-fsck.8~72680822|19970426143604|15573
+tytso at mit.edu|misc/lsattr.1|19970426132150|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-lsattr.1~72680822|19970426143607|23221
+tytso at mit.edu|misc/mke2fs.8|19970426132152|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-mke2fs.8~72680822|19970426143609|21245
+tytso at mit.edu|misc/mklost+found.8|19970426132154|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-mklost+found.8~72680822|19970426143611|10164
+tytso at mit.edu|misc/tune2fs.8|19970426132156|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-tune2fs.8~72680822|19970426143613|00822
+tytso at mit.edu|tests/f_badbblocks/expect.2|19970426135900|02169|7a460879 tytso at mit.edu|tests/f_badbblocks/expect.2|19970426143617|24523
+tytso at mit.edu|tests/f_badinode/expect.2|19970426135910|02169|7a460879 tytso at mit.edu|tests/f_badinode/expect.2|19970426143623|24524
+tytso at mit.edu|tests/f_badprimary/expect.2|19970426135916|02169|7a460879 tytso at mit.edu|tests/f_badprimary/expect.2|19970426143627|24522
+tytso at mit.edu|tests/f_badroot/expect.2|19970426135919|02169|7a460879 tytso at mit.edu|tests/f_badroot/expect.2|19970426143629|24526
+tytso at mit.edu|tests/f_bbfile/expect.2|19970426135926|02169|7a460879 tytso at mit.edu|tests/f_bbfile/expect.2|19970426143632|24544
+tytso at mit.edu|tests/f_bitmaps/expect.2|19970426135929|02169|7a460879 tytso at mit.edu|tests/f_bitmaps/expect.2|19970426143634|24532
+tytso at mit.edu|tests/f_dirlink/expect.2|19970426135932|02169|7a460879 tytso at mit.edu|tests/f_dirlink/expect.2|19970426143636|24526
+tytso at mit.edu|tests/f_dup/expect.2|19970426135936|02169|7a460879 tytso at mit.edu|tests/f_dup/expect.2|19970426143638|24540
+tytso at mit.edu|tests/f_dup2/expect.2|19970426135939|02169|7a460879 tytso at mit.edu|tests/f_dup2/expect.2|19970426143639|24596
+tytso at mit.edu|tests/f_end-bitmap/expect.2|19970426135948|02169|7a460879 tytso at mit.edu|tests/f_end-bitmap/expect.2|19970426143645|24531
+tytso at mit.edu|tests/f_holedir/expect.2|19970426135954|02169|7a460879 tytso at mit.edu|tests/f_holedir/expect.2|19970426143648|24522
+tytso at mit.edu|tests/f_illbbitmap/expect.2|19970426135957|02169|7a460879 tytso at mit.edu|tests/f_illbbitmap/expect.2|19970426143650|24522
+tytso at mit.edu|tests/f_illibitmap/expect.2|19970426140000|02169|7a460879 tytso at mit.edu|tests/f_illibitmap/expect.2|19970426143652|24522
+tytso at mit.edu|tests/f_lotsbad/expect.2|19970426140003|02169|7a460879 tytso at mit.edu|tests/f_lotsbad/expect.2|19970426143654|24524
+tytso at mit.edu|tests/f_messy_inode/expect.2|19970426140009|02169|7a460879 tytso at mit.edu|tests/f_messy_inode/expect.2|19970426143658|24534
+tytso at mit.edu|tests/f_okgroup/expect.2|19970426140020|02169|7a460879 tytso at mit.edu|tests/f_okgroup/expect.2|19970426143704|24752
+tytso at mit.edu|tests/f_overfsblks/expect.2|19970426140023|02169|7a460879 tytso at mit.edu|tests/f_overfsblks/expect.2|19970426143706|24522
+tytso at mit.edu|INSTALL.binary|19970426135528|02169|7a460879 tytso at mit.edu|BitKeeper/deleted/.del-INSTALL.binary~7a460879|19970426142445|59801
+tytso at mit.edu|lib/ss/ss_err.h|19970426132138|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-ss_err.h~72680822|19970426135822|53883
+tytso at mit.edu|lib/ss/dll/jump.funcs|19970426135824|02169|7a460879 tytso at mit.edu|lib/ss/dll/jump.funcs|19970426135825|49629
+tytso at mit.edu|lib/ss/dll/jump.ignore|19970426135824|02169|7a460879 tytso at mit.edu|lib/ss/dll/jump.ignore|19970426135825|20201
+tytso at mit.edu|lib/ss/dll/jump.import|19970426135826|02169|7a460879 tytso at mit.edu|lib/ss/dll/jump.import|19970426135827|22178
+tytso at mit.edu|lib/ss/dll/jump.params|19970426135827|02169|7a460879 tytso at mit.edu|lib/ss/dll/jump.params|19970426135828|06014
+tytso at mit.edu|lib/ss/dll/jump.undefs|19970426135827|02169|7a460879 tytso at mit.edu|lib/ss/dll/jump.undefs|19970426135828|04756
+tytso at mit.edu|lib/ss/dll/jump.vars|19970426135828|02169|7a460879 tytso at mit.edu|lib/ss/dll/jump.vars|19970426135829|12270
+tytso at mit.edu|lib/ss/jump/jump.funcs|19970426133408|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.funcs~7b440884~3|19970426135830|50253
+tytso at mit.edu|lib/ss/jump/jump.import|19970426133409|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.import~7b440884~3|19970426135831|59307
+tytso at mit.edu|lib/ss/jump/jump.params|19970426133410|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.params~7b440884~3|19970426135832|62993
+tytso at mit.edu|lib/ss/jump/jump.undefs|19970426133411|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.undefs~7b440884~3|19970426135832|00817
+tytso at mit.edu|lib/ss/jump/jump.vars|19970426133411|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.vars~7b440884~2|19970426135833|04170
+tytso at mit.edu|misc/Makefile|19970426132143|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-Makefile~72680822~7|19970426135836|52018
+tytso at mit.edu|tests/defaults/f_script|19970426135858|02169|7a460879 tytso at mit.edu|tests/defaults/f_script|19970426135859|01903
+tytso at mit.edu|tests/f_badbblocks/image.gz|19970426135901|02169|7a460879 tytso at mit.edu|tests/f_badbblocks/image.gz|19970426135902|29309
+tytso at mit.edu|tests/f_badbblocks/name|19970426135902|02169|7a460879 tytso at mit.edu|tests/f_badbblocks/name|19970426135903|03098
+tytso at mit.edu|tests/f_baddotdir/name|19970426135908|02169|7a460879 tytso at mit.edu|tests/f_baddotdir/name|19970426135909|01796
+tytso at mit.edu|tests/f_badinode/name|19970426135911|02169|7a460879 tytso at mit.edu|tests/f_badinode/name|19970426135912|02347
+tytso at mit.edu|tests/f_badprimary/image.gz|19970426135916|02169|7a460879 tytso at mit.edu|tests/f_badprimary/image.gz|19970426135917|29484
+tytso at mit.edu|tests/f_badprimary/name|19970426135917|02169|7a460879 tytso at mit.edu|tests/f_badprimary/name|19970426135918|05655
+tytso at mit.edu|tests/f_badroot/image.gz|19970426135919|02169|7a460879 tytso at mit.edu|tests/f_badroot/image.gz|19970426135920|39505
+tytso at mit.edu|tests/f_badroot/name|19970426135920|02169|7a460879 tytso at mit.edu|tests/f_badroot/name|19970426135921|02729
+tytso at mit.edu|tests/f_badtable/image.gz|19970426135924|02169|7a460879 tytso at mit.edu|tests/f_badtable/image.gz|19970426135925|22055
+tytso at mit.edu|tests/f_badtable/name|19970426135924|02169|7a460879 tytso at mit.edu|tests/f_badtable/name|19970426135925|03456
+tytso at mit.edu|tests/f_bbfile/image.gz|19970426135927|02169|7a460879 tytso at mit.edu|tests/f_bbfile/image.gz|19970426135928|54052
+tytso at mit.edu|tests/f_bbfile/name|19970426135927|02169|7a460879 tytso at mit.edu|tests/f_bbfile/name|19970426135928|01785
+tytso at mit.edu|tests/f_bitmaps/image.gz|19970426135930|02169|7a460879 tytso at mit.edu|tests/f_bitmaps/image.gz|19970426135931|60341
+tytso at mit.edu|tests/f_bitmaps/name|19970426135931|02169|7a460879 tytso at mit.edu|tests/f_bitmaps/name|19970426135932|03231
+tytso at mit.edu|tests/f_dirlink/image.gz|19970426135933|02169|7a460879 tytso at mit.edu|tests/f_dirlink/image.gz|19970426135934|41610
+tytso at mit.edu|tests/f_dirlink/name|19970426135933|02169|7a460879 tytso at mit.edu|tests/f_dirlink/name|19970426135934|02015
+tytso at mit.edu|tests/f_dup/image.gz|19970426135937|02169|7a460879 tytso at mit.edu|tests/f_dup/image.gz|19970426135938|00788
+tytso at mit.edu|tests/f_dup/name|19970426135937|02169|7a460879 tytso at mit.edu|tests/f_dup/name|19970426135938|03574
+tytso at mit.edu|tests/f_dup2/image.gz|19970426135940|02169|7a460879 tytso at mit.edu|tests/f_dup2/image.gz|19970426135941|25163
+tytso at mit.edu|tests/f_dup2/name|19970426135940|02169|7a460879 tytso at mit.edu|tests/f_dup2/name|19970426135941|03764
+tytso at mit.edu|tests/f_dupfsblks/name|19970426135943|02169|7a460879 tytso at mit.edu|tests/f_dupfsblks/name|19970426135944|04833
+tytso at mit.edu|tests/f_dupsuper/image.gz|19970426135945|02169|7a460879 tytso at mit.edu|tests/f_dupsuper/image.gz|19970426135946|50943
+tytso at mit.edu|tests/f_dupsuper/name|19970426135946|02169|7a460879 tytso at mit.edu|tests/f_dupsuper/name|19970426135947|05760
+tytso at mit.edu|tests/f_end-bitmap/image.gz|19970426135948|02169|7a460879 tytso at mit.edu|tests/f_end-bitmap/image.gz|19970426135949|02881
+tytso at mit.edu|tests/f_expand/name|19970426135952|02169|7a460879 tytso at mit.edu|tests/f_expand/name|19970426135953|02033
+tytso at mit.edu|tests/f_holedir/image.gz|19970426135954|02169|7a460879 tytso at mit.edu|tests/f_holedir/image.gz|19970426135955|26682
+tytso at mit.edu|tests/f_holedir/name|19970426135955|02169|7a460879 tytso at mit.edu|tests/f_holedir/name|19970426135956|03809
+tytso at mit.edu|tests/f_illbbitmap/image.gz|19970426135958|02169|7a460879 tytso at mit.edu|tests/f_illbbitmap/image.gz|19970426135959|27519
+tytso at mit.edu|tests/f_illbbitmap/name|19970426135958|02169|7a460879 tytso at mit.edu|tests/f_illbbitmap/name|19970426135959|01964
+tytso at mit.edu|tests/f_illibitmap/image.gz|19970426140001|02169|7a460879 tytso at mit.edu|tests/f_illibitmap/image.gz|19970426140002|28048
+tytso at mit.edu|tests/f_illibitmap/name|19970426140001|02169|7a460879 tytso at mit.edu|tests/f_illibitmap/name|19970426140002|01968
+tytso at mit.edu|tests/f_lotsbad/image.gz|19970426140004|02169|7a460879 tytso at mit.edu|tests/f_lotsbad/image.gz|19970426140005|47236
+tytso at mit.edu|tests/f_lotsbad/name|19970426140004|02169|7a460879 tytso at mit.edu|tests/f_lotsbad/name|19970426140005|03055
+tytso at mit.edu|tests/f_lpf/name|19970426140007|02169|7a460879 tytso at mit.edu|tests/f_lpf/name|19970426140008|01837
+tytso at mit.edu|tests/f_messy_inode/image.gz|19970426140011|02169|7a460879 tytso at mit.edu|tests/f_messy_inode/image.gz|19970426140012|08003
+tytso at mit.edu|tests/f_messy_inode/name|19970426140012|02169|7a460879 tytso at mit.edu|tests/f_messy_inode/name|19970426140013|03357
+tytso at mit.edu|tests/f_mke2fs2b/image.gz|19970426140014|02169|7a460879 tytso at mit.edu|tests/f_mke2fs2b/image.gz|19970426140015|47291
+tytso at mit.edu|tests/f_mke2fs2b/name|19970426140015|02169|7a460879 tytso at mit.edu|tests/f_mke2fs2b/name|19970426140016|03559
+tytso at mit.edu|tests/f_noroot/image.gz|19970426140017|02169|7a460879 tytso at mit.edu|tests/f_noroot/image.gz|19970426140018|46719
+tytso at mit.edu|tests/f_noroot/name|19970426140018|02169|7a460879 tytso at mit.edu|tests/f_noroot/name|19970426140019|02269
+tytso at mit.edu|tests/f_okgroup/image.gz|19970426140021|02169|7a460879 tytso at mit.edu|tests/f_okgroup/image.gz|19970426140022|58647
+tytso at mit.edu|tests/f_okgroup/name|19970426140021|02169|7a460879 tytso at mit.edu|tests/f_okgroup/name|19970426140022|02367
+tytso at mit.edu|tests/f_overfsblks/image.gz|19970426140024|02169|7a460879 tytso at mit.edu|tests/f_overfsblks/image.gz|19970426140025|27607
+tytso at mit.edu|tests/f_overfsblks/name|19970426140025|02169|7a460879 tytso at mit.edu|tests/f_overfsblks/name|19970426140026|03438
+tytso at mit.edu|MCONFIG|19970426131951|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-MCONFIG~72680822|19970426135530|13338
+tytso at mit.edu|Makefile|19970426131952|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-Makefile~72680822|19970426135533|21076
+tytso at mit.edu|install-sh|19970426135538|02169|7a460879 tytso at mit.edu|install-sh|19970426135539|54805
+tytso at mit.edu|mkinstalldirs|19970426135539|02169|7a460879 tytso at mit.edu|mkinstalldirs|19970426135540|48931
+tytso at mit.edu|debugfs/Makefile|19970426131959|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-Makefile~72680822~1|19970426135549|17868
+tytso at mit.edu|e2fsck/Makefile|19970426132007|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-Makefile~72680822~2|19970426135559|16004
+tytso at mit.edu|e2fsck/images/README|19970426132021|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-README~72680822|19970426135617|02893
+tytso at mit.edu|e2fsck/images/badbblocks.img.gz|19970426133244|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-badbblocks.img.gz~7b440884|19970426135617|07428
+tytso at mit.edu|e2fsck/images/baddir.img.gz|19970426132021|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-baddir.img.gz~72680822|19970426135618|11440
+tytso at mit.edu|e2fsck/images/badinode.img.gz|19970426132022|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-badinode.img.gz~72680822|19970426135619|15356
+tytso at mit.edu|e2fsck/images/badlkcnt.img.gz|19970426132023|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-badlkcnt.img.gz~72680822|19970426135620|18884
+tytso at mit.edu|e2fsck/images/badroot.img.gz|19970426132023|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-badroot.img.gz~72680822|19970426135621|22345
+tytso at mit.edu|e2fsck/images/badtable.img.gz|19970426132024|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-badtable.img.gz~72680822|19970426135622|25706
+tytso at mit.edu|e2fsck/images/bbfile.img.gz|19970426132025|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-bbfile.img.gz~72680822|19970426135622|30125
+tytso at mit.edu|e2fsck/images/bitmapblks.img.gz|19970426133247|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-bitmapblks.img.gz~7b440884|19970426135623|02221
+tytso at mit.edu|e2fsck/images/bitmaps.img.gz|19970426132026|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-bitmaps.img.gz~72680822|19970426135624|05562
+tytso at mit.edu|e2fsck/images/dirlink.img.gz|19970426132026|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-dirlink.img.gz~72680822|19970426135625|08903
+tytso at mit.edu|e2fsck/images/dup.img.gz|19970426132027|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-dup.img.gz~72680822|19970426135625|12403
+tytso at mit.edu|e2fsck/images/dup2.img.gz|19970426132028|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-dup2.img.gz~72680822|19970426135626|16545
+tytso at mit.edu|e2fsck/images/dupfsblks.img.gz|19970426133247|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-dupfsblks.img.gz~7b440884|19970426135627|20399
+tytso at mit.edu|e2fsck/images/dupsuper.img.gz|19970426133248|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-dupsuper.img.gz~7b440884|19970426135628|23994
+tytso at mit.edu|e2fsck/images/end-bitmap.img.gz|19970426132029|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-end-bitmap.img.gz~72680822|19970426135628|27681
+tytso at mit.edu|e2fsck/images/expand.img.gz|19970426132029|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-expand.img.gz~72680822|19970426135629|31770
+tytso at mit.edu|e2fsck/images/illfsblks.img.gz|19970426133249|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-illfsblks.img.gz~7b440884|19970426135630|35595
+tytso at mit.edu|e2fsck/images/lotsbad.img.gz|19970426133250|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-lotsbad.img.gz~7b440884|19970426135631|39101
+tytso at mit.edu|e2fsck/images/lpf.img.gz|19970426132031|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-lpf.img.gz~72680822|19970426135631|43290
+tytso at mit.edu|e2fsck/images/messy_inode.img.gz|19970426133250|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-messy_inode.img.gz~7b440884|19970426135632|47357
+tytso at mit.edu|e2fsck/images/mke2fs2b.img.gz|19970426132031|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-mke2fs2b.img.gz~72680822|19970426135633|50833
+tytso at mit.edu|e2fsck/images/noroot.img.gz|19970426132032|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-noroot.img.gz~72680822|19970426135634|54190
+tytso at mit.edu|e2fsck/images/okgroup.img.gz|19970426133251|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-okgroup.img.gz~7b440884|19970426135634|57528
+tytso at mit.edu|e2fsck/images/overfsblks.img.gz|19970426133252|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-overfsblks.img.gz~7b440884|19970426135635|60870
+tytso at mit.edu|e2fsck/images/test_script|19970426132033|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-test_script~72680822|19970426135636|64201
+tytso at mit.edu|lib/Makefile.checker|19970426135639|02169|7a460879 tytso at mit.edu|lib/Makefile.checker|19970426135640|17380
+tytso at mit.edu|lib/Makefile.library|19970426135642|02169|7a460879 tytso at mit.edu|lib/Makefile.library|19970426135643|13096
+tytso at mit.edu|lib/e2p/Makefile|19970426132035|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-Makefile~72680822~3|19970426135649|52111
+tytso at mit.edu|lib/e2p/iod.c|19970426132041|02082|72680822 tytso at mit.edu|lib/e2p/iod.c|19970426135657|43165
+tytso at mit.edu|lib/e2p/dll/jump.ignore|19970426135700|02169|7a460879 tytso at mit.edu|lib/e2p/dll/jump.ignore|19970426135701|22264
+tytso at mit.edu|lib/e2p/dll/jump.import|19970426135701|02169|7a460879 tytso at mit.edu|lib/e2p/dll/jump.import|19970426135702|12495
+tytso at mit.edu|lib/e2p/dll/jump.undefs|19970426135702|02169|7a460879 tytso at mit.edu|lib/e2p/dll/jump.undefs|19970426135703|02317
+tytso at mit.edu|lib/e2p/dll/jump.vars|19970426135703|02169|7a460879 tytso at mit.edu|lib/e2p/dll/jump.vars|19970426135704|31312
+tytso at mit.edu|lib/e2p/jump/jump.funcs|19970426133303|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.funcs~7b440884|19970426135705|60893
+tytso at mit.edu|lib/e2p/jump/jump.import|19970426133304|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.import~7b440884|19970426135706|64560
+tytso at mit.edu|lib/e2p/jump/jump.params|19970426133304|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.params~7b440884|19970426135707|02651
+tytso at mit.edu|lib/e2p/jump/jump.undefs|19970426133305|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.undefs~7b440884|19970426135707|05963
+tytso at mit.edu|lib/et/Makefile|19970426132047|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-Makefile~72680822~4|19970426135710|01881
+tytso at mit.edu|lib/et/compile_et.sh|19970426132051|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-compile_et.sh~72680822|19970426135714|29038
+tytso at mit.edu|lib/et/config_script|19970426132052|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-config_script~72680822|19970426135715|35803
+tytso at mit.edu|lib/et/vfprintf.c|19970426132059|02082|72680822 tytso at mit.edu|lib/et/vfprintf.c|19970426135719|52677
+tytso at mit.edu|lib/et/dll/jump.funcs|19970426135719|02169|7a460879 tytso at mit.edu|lib/et/dll/jump.funcs|19970426135720|29323
+tytso at mit.edu|lib/et/dll/jump.ignore|19970426135719|02169|7a460879 tytso at mit.edu|lib/et/dll/jump.ignore|19970426135720|04807
+tytso at mit.edu|lib/et/dll/jump.import|19970426135720|02169|7a460879 tytso at mit.edu|lib/et/dll/jump.import|19970426135721|12495
+tytso at mit.edu|lib/et/dll/jump.params|19970426135721|02169|7a460879 tytso at mit.edu|lib/et/dll/jump.params|19970426135722|05993
+tytso at mit.edu|lib/et/dll/jump.undefs|19970426135721|02169|7a460879 tytso at mit.edu|lib/et/dll/jump.undefs|19970426135722|02305
+tytso at mit.edu|lib/et/dll/jump.vars|19970426135722|02169|7a460879 tytso at mit.edu|lib/et/dll/jump.vars|19970426135723|09683
+tytso at mit.edu|lib/et/jump/jump.funcs|19970426133317|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.funcs~7b440884~1|19970426135724|02435
+tytso at mit.edu|lib/et/jump/jump.ignore|19970426133317|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.ignore~7b440884|19970426135725|06198
+tytso at mit.edu|lib/et/jump/jump.import|19970426133318|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.import~7b440884~1|19970426135726|09822
+tytso at mit.edu|lib/et/jump/jump.params|19970426133319|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.params~7b440884~1|19970426135726|19380
+tytso at mit.edu|lib/et/jump/jump.undefs|19970426133319|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.undefs~7b440884~1|19970426135727|22691
+tytso at mit.edu|lib/et/jump/jump.vars|19970426133321|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.vars~7b440884|19970426135728|26007
+tytso at mit.edu|lib/ext2fs/MAKELOG|19970426133324|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-MAKELOG~7b440884|19970426135730|12438
+tytso at mit.edu|lib/ext2fs/Makefile|19970426132101|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-Makefile~72680822~5|19970426135731|16690
+tytso at mit.edu|lib/ext2fs/ext2_err.c|19970426132108|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-ext2_err.c~72680822|19970426135742|45912
+tytso at mit.edu|lib/ext2fs/ext2_err.h|19970426132110|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-ext2_err.h~72680822|19970426135743|09027
+tytso at mit.edu|lib/ext2fs/rw_bitmaps.size|19970426133349|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-rw_bitmaps.size~7b440884|19970426135757|19663
+tytso at mit.edu|lib/ext2fs/dll/jump.ignore|19970426135759|02169|7a460879 tytso at mit.edu|lib/ext2fs/dll/jump.ignore|19970426135800|44442
+tytso at mit.edu|lib/ext2fs/dll/jump.import|19970426135800|02169|7a460879 tytso at mit.edu|lib/ext2fs/dll/jump.import|19970426135801|22178
+tytso at mit.edu|lib/ext2fs/dll/jump.undefs|19970426135802|02169|7a460879 tytso at mit.edu|lib/ext2fs/dll/jump.undefs|19970426135803|04846
+tytso at mit.edu|lib/ext2fs/jump/jump.funcs|19970426133350|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.funcs~7b440884~2|19970426135804|25732
+tytso at mit.edu|lib/ext2fs/jump/jump.import|19970426133351|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.import~7b440884~2|19970426135805|29670
+tytso at mit.edu|lib/ext2fs/jump/jump.params|19970426133352|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.params~7b440884~2|19970426135806|02219
+tytso at mit.edu|lib/ext2fs/jump/jump.undefs|19970426133352|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.undefs~7b440884~2|19970426135806|05821
+tytso at mit.edu|lib/ext2fs/jump/jump.vars|19970426133353|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-jump.vars~7b440884~1|19970426135807|09169
+tytso at mit.edu|lib/ss/MAKELOG|19970426133356|02180|7b440884 tytso at mit.edu|BitKeeper/deleted/.del-MAKELOG~7b440884~1|19970426135809|29544
+tytso at mit.edu|lib/ss/Makefile|19970426132122|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-Makefile~72680822~6|19970426135810|04901
+tytso at mit.edu|lib/ss/config_script|19970426132124|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-config_script~72680822~1|19970426135812|60289
+tytso at mit.edu|lib/ss/mk_cmds.sh|19970426132132|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-mk_cmds.sh~72680822|19970426135815|23805
+tytso at mit.edu|lib/ss/ss_err.c|19970426132136|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-ss_err.c~72680822|19970426135821|43214
+tytso at mit.edu|e2fsck/images/test_script.log|19970426132034|02082|72680822 tytso at mit.edu|BitKeeper/deleted/.del-test_script.log~72680822|19970426133254|03612
+tytso at mit.edu|install-utils/compile_manpages|19970426133254|02180|7b440884 tytso at mit.edu|install-utils/compile_manpages|19970426133255|16702
+tytso at mit.edu|install-utils/convfstab|19970426133255|02180|7b440884 tytso at mit.edu|install-utils/convfstab|19970426133256|46850
+tytso at mit.edu|lib/et/com_err.h|19970426132049|02082|72680822 tytso at mit.edu|lib/et/com_err.h|19970426133311|34404
+tytso at mit.edu|e2fsck/CHANGES|19970426132006|02082|72680822 tytso at mit.edu|e2fsck/CHANGES|19970426132007|32778
+tytso at mit.edu|e2fsck/malloc.h|19970426132013|02082|72680822 tytso at mit.edu|e2fsck/malloc.h|19970426132014|42324
+tytso at mit.edu|e2fsck/mtrace.awk|19970426132013|02082|72680822 tytso at mit.edu|e2fsck/mtrace.awk|19970426132014|58890
+tytso at mit.edu|lib/et/texinfo.tex|19970426132058|02082|72680822 tytso at mit.edu|lib/et/texinfo.tex|19970426132059|02090
+tytso at mit.edu|lib/ss/ct_c.sed|19970426132126|02082|72680822 tytso at mit.edu|lib/ss/ct_c.sed|19970426132127|47710
+tytso at mit.edu|lib/ss/mit-sipb-copyright.h|19970426132131|02082|72680822 tytso at mit.edu|lib/ss/mit-sipb-copyright.h|19970426132132|04035
+tytso at mit.edu|lib/ss/ss_err.et|19970426132137|02082|72680822 tytso at mit.edu|lib/ss/ss_err.et|19970426132138|48787
+tytso at mit.edu|lib/ss/std_rqs.ct|19970426132140|02082|72680822 tytso at mit.edu|lib/ss/std_rqs.ct|19970426132141|13602
Added: trunk/yaboot/lib/e2fsprogs-1.27/INSTALL
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/INSTALL 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/INSTALL 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,65 @@
+ 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 DLL shared libraries, add the option
+flag --enable-dll-shlibs. 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.
+
+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.
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/INSTALL.dllbin
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/INSTALL.dllbin 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/INSTALL.dllbin 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,51 @@
+NOTE: This is the DLL version of the binary distribution. If you have
+an ELF system, please either compile e2fsprogs from sources yourself,
+or get the ELF version of the binary distribution. The ELF version
+will have a filename of e2fsprogs-1.04-elfbin.tar.gz
+
+
+ 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.04-dllbin.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
Added: trunk/yaboot/lib/e2fsprogs-1.27/INSTALL.elfbin
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/INSTALL.elfbin 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/INSTALL.elfbin 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/MCONFIG.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/MCONFIG.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/MCONFIG.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,198 @@
+# Beginning of file MCONFIG
+
+all::
+
+check::
+
+SHELL = /bin/sh
+
+prefix = @prefix@
+root_prefix = @root_prefix@
+exec_prefix = @exec_prefix@
+root_bindir = $(root_prefix)/bin
+root_sbindir = $(root_prefix)/sbin
+root_libdir = $(root_prefix)/lib
+bindir = @bindir@
+sbindir = @sbindir@
+libdir = @libdir@
+includedir = @includedir@
+mandir = @mandir@
+man1dir = $(mandir)/man1
+man3dir = $(mandir)/man3
+man8dir = $(mandir)/man8
+infodir = @infodir@
+datadir = @datadir@
+
+ at SET_MAKE@
+
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+CC = @CC@
+BUILD_CC = @BUILD_CC@
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+ALL_CFLAGS = $(CPPFLAGS) $(DEFS) $(USE_WFLAGS) $(CFLAGS) $(XTRA_CFLAGS) \
+ -I$(top_builddir)/lib -I$(top_srcdir)/lib $(LINUX_INCLUDE)
+LDFLAGS = @LDFLAGS@
+ALL_LDFLAGS = $(LDFLAGS)
+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
+LDCONFIG = @LDCONFIG@
+
+#
+# Library definitions
+#
+LIB = $(top_builddir)/lib
+LIBSS = $(LIB)/libss at LIB_EXT@
+LIBCOM_ERR = $(LIB)/libcom_err at LIB_EXT@
+LIBE2P = $(LIB)/libe2p at LIB_EXT@
+LIBEXT2FS = $(LIB)/libext2fs at LIB_EXT@
+LIBUUID = $(LIB)/libuuid at LIB_EXT@ @SOCKET_LIB@
+DEPLIBUUID = $(LIB)/libuuid at LIB_EXT@
+
+STATIC_LIBSS = $(LIB)/libss at STATIC_LIB_EXT@
+STATIC_LIBCOM_ERR = $(LIB)/libcom_err at STATIC_LIB_EXT@
+STATIC_LIBE2P = $(LIB)/libe2p at STATIC_LIB_EXT@
+STATIC_LIBEXT2FS = $(LIB)/libext2fs at STATIC_LIB_EXT@
+STATIC_LIBUUID = $(LIB)/libuuid at STATIC_LIB_EXT@ @SOCKET_LIB@
+DEPSTATIC_LIBUUID = $(LIB)/libuuid at STATIC_LIB_EXT@
+
+PROFILED_LIBSS = $(LIB)/libss at PROFILED_LIB_EXT@
+PROFILED_LIBCOM_ERR = $(LIB)/libcom_err at PROFILED_LIB_EXT@
+PROFILED_LIBE2P = $(LIB)/libe2p at PROFILED_LIB_EXT@
+PROFILED_LIBEXT2FS = $(LIB)/libext2fs at PROFILED_LIB_EXT@
+PROFILED_LIBUUID = $(LIB)/libuuid at PROFILED_LIB_EXT@ @SOCKET_LIB@
+DEPPROFILED_LIBUUID = $(LIB)/libuuid at PROFILED_LIB_EXT@
+
+#
+# Use these definitions is you use tools 2.x, x < 16
+#
+#DLL_BIN=/usr/dll/bin
+#JUMP_PREFIX=/usr/dll/jump/
+
+#
+# Use these definitions if you use tools 2.16 or above
+#
+DLL_BIN=/usr/bin
+JUMP_PREFIX=/usr/bin/jump
+
+# An include directive pointing to a directory holding enough linux-like
+# include files to satisfy some programs here
+LINUX_INCLUDE=@LINUX_INCLUDE@
+
+#
+# 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)
+DEP_SUBSTITUTE= $(top_builddir)/util/subst $(SUBST_CONF)
+
+$(top_builddir)/util/subst:
+ cd $(top_builddir)/util ; $(MAKE) subst
+
+#
+# Warning flags
+#
+# Run make gcc-wall to do a build with warning messages.
+#
+#
+WFLAGS= -ansi -D_POSIX_SOURCE -pedantic \
+ -Wall -Wwrite-strings -Wpointer-arith \
+ -Wcast-qual -Wcast-align -Wtraditional \
+ -Wstrict-prototypes -Wmissing-prototypes \
+ -Wnested-externs -Winline -DNO_INLINE_FUNCS -Wshadow
+
+gcc-wall-new:
+ (make USE_WFLAGS="$(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.elf-lib \
+ $(top_srcdir)/lib/Makefile.dll-lib $(top_srcdir)/lib/Makefile.bsd-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/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
+
+$(top_srcdir)/configure: $(top_srcdir)/configure.in
+ cd $(top_srcdir) && 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' | \
+ $(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
Added: trunk/yaboot/lib/e2fsprogs-1.27/Makefile.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/Makefile.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/Makefile.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,147 @@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = .
+my_dir = .
+INSTALL = @INSTALL@
+
+ at MCONFIG@
+
+ at RESIZER_CMT@RESIZE_DIR= resize
+ at DEBUGFS_CMT@DEBUGFS_DIR= debugfs
+
+LIB_SUBDIRS=lib/et lib/ss lib/e2p lib/ext2fs lib/uuid # lib/finddev
+PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs
+SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
+
+SUBS= lib/ext2fs/ext2_types.h
+
+TAR=tar
+
+all:: $(SUBS)
+ $(MAKE) libs
+ $(MAKE) progs
+ $(MAKE) docs
+
+progs: $(SUBS) all-progs-recursive
+libs: $(SUBS) all-libs-recursive
+
+docs:
+ cd doc && $(MAKE) libext2fs.info
+
+install-doc-libs:
+ cd doc && $(MAKE) install-doc-libs
+
+uninstall-doc-libs:
+ cd doc && $(MAKE) uninstall-doc-libs
+
+clean-doc:
+ cd doc && $(MAKE) clean
+
+distclean-doc:
+ cd doc && $(MAKE) distclean
+
+install: $(SUBS) all-libs-recursive install-progs-recursive \
+ install-shlibs-libs-recursive install-doc-libs
+# export MANPATH=$(DESTDIR)$(mandir); $(srcdir)/install-utils/compile_manpages
+
+uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
+
+install-libs: install-libs-recursive
+
+uninstall-libs: uninstall-libs-recursive
+
+TAGS clean-recursive distclean-recursive depend-recursive check-recursive \
+ mostlyclean-recursive realclean-recursive install-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 uninstall-progs-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 uninstall-libs-recursive install-shlibs-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 distclean-local
+
+realclean: realclean-recursive realclean-local
+
+depend:: depend-recursive
+
+lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) $(srcdir)/lib/ext2fs/ext2_types.h.in
+ $(SUBSTITUTE) $(srcdir)/lib/ext2fs/ext2_types.h.in \
+ > lib/ext2fs/ext2_types.h
+
+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:: $(SUBS) check-recursive
+
+distribution_tar_file:
+ $(RM) -rf /tmp/dest
+ $(MAKE) DESTDIR=/tmp/dest install
+ cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest
+ $(RM) -rf /tmp/dest/install-utils/CVS /tmp/dest/install-utils/ChangeLog
+ cp $(srcdir)/INSTALL. at BINARY_TYPE@ /tmp/dest/INSTALL
+ (cd /tmp/dest && $(TAR) cf - . ) | gzip -9 \
+ > e2fsprogs- at E2FSPROGS_VERSION@- at BINARY_TYPE@.tar.gz
+
+SRCROOT = `echo e2fsprogs- at E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
+ -e 's/pre-//' -e 's/-PLUS//'`
+
+$(srcdir)/.exclude-file:
+ a=$(SRCROOT); \
+ (cd $(srcdir)/.. && find e2fsprogs \( -name \*~ -o -name \*.orig \
+ -o -name CVS -o -name \*.rej -o -name Makefile.pq \
+ -o -name TAGS -o -name \*.old -o -name \*.gmo -o -name SCCS \
+ -o -name changed-files -o -name .#\* \) \
+ -print) | sed -e "s/e2fsprogs/$$a/" > $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/BitKeeper" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/TODO" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/powerquest" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/po/stamp-cat-id" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/po/cat-id-tbl.c" >> $(srcdir)/.exclude-file
+ echo $(SRCROOT)/e2fsprogs- at E2FSPROGS_VERSION@.tar.gz \
+ >> $(srcdir)/.exclude-file
+
+source_tar_file: $(srcdir)/.exclude-file
+ cd $(srcdir)/.. && a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \
+ $(TAR) -c -h -v -f - \
+ -X $$a/.exclude-file $$a | \
+ gzip -9 > e2fsprogs- at E2FSPROGS_VERSION@.tar.gz
+ rm -f $(srcdir)/.exclude-file
Added: trunk/yaboot/lib/e2fsprogs-1.27/README
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/README 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/README 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,19 @@
+ This is the new version (1.27) 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
+
+ Note: If you are NOT using the RedHat RPM distributions of
+e2fsprogs, and are building e2fsprogs from source, please see the file
+INSTALL for instructions on building and installing e2fsprogs.
+
+ In case of bugs in these programs, please contact Ted Ts'o at
+tytso at thunk.org or tytso at alum.mit.edu. See the e2fsck man page for
+suggestions of what sort of information to include when submitting bug
+reports for these programs.
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/RELEASE-NOTES
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/RELEASE-NOTES 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/RELEASE-NOTES 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2053 @@
+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 at 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.
Added: trunk/yaboot/lib/e2fsprogs-1.27/SHLIBS
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/SHLIBS 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/SHLIBS 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,35 @@
+Library:libcom_err.o
+Description: Common error code library
+Maintainer: Theodore Ts'o
+Email: tytso at mit.edu
+Start: 0x66800000
+End: 0x6687ffff
+
+Library:libss.o
+Description: Generic Subsystem library (Simple tty UI)
+Maintainer: Theodore Ts'o
+Email: tytso at mit.edu
+Start: 0x66880000
+End: 0x668fffff
+
+Library:libext2fs.so
+Description: The ext2fs (raw interface) library
+Maintainer: Theodore Ts'o
+Email: tytso at mit.edu
+Start: 0x66900000
+End: 0x6697ffff
+
+Library:libe2p.so
+Description: The e2p (ext2fs's programmers) library
+Maintainer: Theodore Ts'o
+Email: tytso at mit.edu
+Start: 0x66980000
+End: 0x669fffff
+
+Library:libuuid.so
+Description: DCE Universally Unique ID (UUID) library
+Maintainer: Theodore Ts'o
+Email: tytso at mit.edu
+Start: 0x67900000
+End: 0x679fffff
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/aclocal.m4
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/aclocal.m4 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/aclocal.m4 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,383 @@
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper at cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 5
+
+AC_DEFUN(AM_WITH_NLS,
+ [AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --enable-nls Turn on Native Language Support],
+ USE_NLS=$enableval, USE_NLS=no)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+
+ USE_INCLUDED_LIBINTL=no
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ AC_DEFINE(ENABLE_NLS)
+ 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 gettext or catgets are available (in this order) we
+ dnl use this. Else we have to fall back to GNU NLS library.
+ dnl catgets is only used if permitted by option --with-catgets.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ AC_CHECK_HEADER(libintl.h,
+ [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
+ [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
+ gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
+
+ if test "$gt_cv_func_gettext_libc" != "yes"; then
+ AC_CHECK_LIB(intl, bindtextdomain,
+ [AC_CACHE_CHECK([for gettext in libintl],
+ gt_cv_func_gettext_libintl,
+ [AC_CHECK_LIB(intl, gettext,
+ gt_cv_func_gettext_libintl=yes,
+ gt_cv_func_gettext_libintl=no)],
+ gt_cv_func_gettext_libintl=no)])
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ AC_DEFINE(HAVE_GETTEXT)
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+ if test "$MSGFMT" != "no"; then
+ AC_CHECK_FUNCS(dcgettext)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr],
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [CATOBJEXT=.mo
+ DATADIRNAME=lib])
+ INSTOBJEXT=.mo
+ fi
+ fi
+ ])
+
+ if test "$CATOBJEXT" = "NONE"; then
+ AC_MSG_CHECKING([whether catgets can be used])
+ AC_ARG_WITH(catgets,
+ [ --with-catgets use catgets functions if available],
+ nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
+ AC_MSG_RESULT($nls_cv_use_catgets)
+
+ if test "$nls_cv_use_catgets" = "yes"; then
+ dnl No gettext in C library. Try catgets next.
+ AC_CHECK_LIB(i, main)
+ AC_CHECK_FUNC(catgets,
+ [AC_DEFINE(HAVE_CATGETS)
+ INTLOBJS="\$(CATOBJS)"
+ AC_PATH_PROG(GENCAT, gencat, no)dnl
+ if test "$GENCAT" != "no"; then
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
+ if test "$GMSGFMT" = "no"; then
+ AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
+ fi
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.cat
+ INSTOBJEXT=.cat
+ DATADIRNAME=lib
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi])
+ fi
+ fi
+
+ if test "$CATOBJEXT" = "NONE"; then
+ dnl Neither gettext nor catgets in included in the C library.
+ dnl Fall back on 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.
+ INTLOBJS="\$(GETTOBJS)"
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_SUBST(MSGFMT)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.gmo
+ INSTOBJEXT=.mo
+ DATADIRNAME=share
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+
+ 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 /dev/null 2> /dev/null; then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+ else
+ DATADIRNAME=share
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+ AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
+ AC_OUTPUT_COMMANDS(
+ [case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac])
+
+
+ # If this is used in GNU gettext we have to set USE_NLS to `yes'
+ # because some of the sources are only built for this goal.
+ if test "$PACKAGE" = gettext; then
+ USE_NLS=yes
+ USE_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl These rules are solely for the distribution goal. While doing this
+ dnl we only have to keep exactly one list of the available catalogs
+ dnl in configure.in.
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATALOGS)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(DATADIRNAME)
+ AC_SUBST(GMOFILES)
+ AC_SUBST(INSTOBJEXT)
+ AC_SUBST(INTLDEPS)
+ AC_SUBST(INTLLIBS)
+ AC_SUBST(INTLOBJS)
+ AC_SUBST(POFILES)
+ AC_SUBST(POSUB)
+ ])
+
+AC_DEFUN(AM_GNU_GETTEXT,
+ [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_CC])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([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+
+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h sys/param.h])
+ AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
+strdup __argz_count __argz_stringify __argz_next])
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ AC_CHECK_FUNCS(stpcpy)
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ AC_DEFINE(HAVE_STPCPY)
+ fi
+
+ AM_LC_MESSAGES
+ AM_WITH_NLS
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ AC_MSG_RESULT($LINGUAS)
+ fi
+
+ dnl Construct list of names of catalog files to be constructed.
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ dnl The reference to <locale.h> in the installed <libintl.h> file
+ dnl must be resolved because we cannot expect the users of this
+ dnl to define HAVE_LOCALE_H.
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+ AC_SUBST(INCLUDE_LOCALE_H)
+
+ dnl Determine which catalog format we have (if any is needed)
+ dnl For now we know about two different formats:
+ dnl Linux libc-5 and the normal X/Open format
+ test -d intl || mkdir intl
+ if test "$CATOBJEXT" = ".cat"; then
+ AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
+
+ dnl Transform the SED scripts while copying because some dumb SEDs
+ dnl cannot handle comments.
+ sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
+ fi
+ dnl po2tbl.sed is always needed.
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
+
+ dnl In the intl/Makefile.in we have a special dependency which makes
+ dnl only sense for gettext. We comment this out for non-gettext
+ dnl packages.
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+ AC_SUBST(GT_NO)
+ AC_SUBST(GT_YES)
+
+ 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 is.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+
+ dnl *** For now the libtool support in intl/Makefile is not for real.
+ l=
+ AC_SUBST(l)
+
+ dnl Generate list of files to be processed by xgettext which will
+ dnl be included in po/Makefile.
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+ ])
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper at cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+AC_DEFUN(AM_LC_MESSAGES,
+ [if test $ac_cv_header_locale_h = yes; then
+ 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)
+ fi
+ fi])
+
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper at cygnus.com>, 1996.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+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,
+[# 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.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ 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 -n "[$]$1"; then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
Added: trunk/yaboot/lib/e2fsprogs-1.27/config.guess
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/config.guess 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/config.guess 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1371 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+
+timestamp='2001-04-20'
+
+# 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 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.
+
+# Written by Per Bothner <bothner at cygnus.com>.
+# Please send patches to <config-patches at gnu.org>.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+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 at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+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 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # 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
+
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script.
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int dummy(){}" > $dummy.c
+ for c in cc gcc c89 ; do
+ ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
+ if test $? = 0 ; then
+ CC_FOR_BUILD="$c"; break
+ fi
+ done
+ rm -f $dummy.c $dummy.o $dummy.rel
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 8/24/94.)
+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
+
+# 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 tupples: *-*-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.
+ # Determine the machine/vendor (is the vendor relevant).
+ case "${UNAME_MACHINE}" in
+ amiga) machine=m68k-unknown ;;
+ arm32) machine=arm-unknown ;;
+ atari*) machine=m68k-atari ;;
+ sun3*) machine=m68k-sun ;;
+ mac68k) machine=m68k-apple ;;
+ macppc) machine=powerpc-apple ;;
+ hp3[0-9][05]) machine=m68k-hp ;;
+ ibmrt|romp-ibm) machine=romp-ibm ;;
+ *) machine=${UNAME_MACHINE}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE}" in
+ i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ 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
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ # 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 0 ;;
+ alpha:OSF1:*:*)
+ if test $UNAME_RELEASE = "V4.0"; then
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ fi
+ # 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.
+ cat <<EOF >$dummy.s
+ .data
+\$Lformat:
+ .byte 37,100,45,37,120,10,0 # "%d-%x\n"
+
+ .text
+ .globl main
+ .align 4
+ .ent main
+main:
+ .frame \$30,16,\$26,0
+ ldgp \$29,0(\$27)
+ .prologue 1
+ .long 0x47e03d80 # implver \$0
+ lda \$2,-1
+ .long 0x47e20c21 # amask \$2,\$1
+ lda \$16,\$Lformat
+ mov \$0,\$17
+ not \$1,\$18
+ jsr \$26,printf
+ ldgp \$29,0(\$26)
+ mov 0,\$16
+ jsr \$26,exit
+ .end main
+EOF
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ case `./$dummy` in
+ 0-0)
+ UNAME_MACHINE="alpha"
+ ;;
+ 1-0)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 1-1)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 1-101)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 2-303)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ 2-307)
+ UNAME_MACHINE="alphaev67"
+ ;;
+ esac
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ 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 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit 0;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ arc64:OpenBSD:*:*)
+ echo mips64el-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hkmips:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee at 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 0 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ 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 0 ;;
+ 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 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(head -1 /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 0 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ # 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 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ 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 $dummy.c -o $dummy \
+ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ 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 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????: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 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ 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 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo rs6000-ibm-aix3.2.5
+ 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 0 ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | 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 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 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])
+ case "${HPUX_REV}" in
+ 11.[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" ;;
+ esac ;;
+ esac
+ fi ;;
+ esac
+ if [ "${HP_ARCH}" = "" ]; then
+ 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 $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+ if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+ rm -f $dummy.c $dummy
+ fi ;;
+ esac
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ 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 $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ *9??*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ hppa*:OpenBSD:*:*)
+ echo hppa-unknown-openbsd
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*X-MP:*:*:*)
+ echo xmp-cray-unicos
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+ exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3D:*:*:*)
+ echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY-2:*:*:*)
+ echo cray2-cray-unicos
+ exit 0 ;;
+ 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 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit 0 ;;
+ 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 i386-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit 0 ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ *:GNU:*:*)
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit 0 ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux
+ exit 0 ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ mips:Linux:*:*)
+ cat >$dummy.c <<EOF
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+int main (int argc, char *argv[]) {
+#else
+int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __MIPSEB__
+ printf ("%s-unknown-linux-gnu\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+ printf ("%sel-unknown-linux-gnu\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ ;;
+ ppc:Linux:*:*)
+ # Determine Lib Version
+ cat >$dummy.c <<EOF
+#include <features.h>
+#if defined(__GLIBC__)
+extern char __libc_version[];
+extern char __libc_release[];
+#endif
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+#if defined(__GLIBC__)
+ printf("%s %s\n", __libc_version, __libc_release);
+#else
+ printf("unknown\n");
+#endif
+ return 0;
+}
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy | grep 1\.99 > /dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; fi
+ fi
+ rm -f $dummy.c $dummy
+ echo powerpc-unknown-linux-gnu${LIBC}
+ exit 0 ;;
+ alpha:Linux:*:*)
+ cat <<EOF >$dummy.s
+ .data
+ \$Lformat:
+ .byte 37,100,45,37,120,10,0 # "%d-%x\n"
+ .text
+ .globl main
+ .align 4
+ .ent main
+ main:
+ .frame \$30,16,\$26,0
+ ldgp \$29,0(\$27)
+ .prologue 1
+ .long 0x47e03d80 # implver \$0
+ lda \$2,-1
+ .long 0x47e20c21 # amask \$2,\$1
+ lda \$16,\$Lformat
+ mov \$0,\$17
+ not \$1,\$18
+ jsr \$26,printf
+ ldgp \$29,0(\$26)
+ mov 0,\$16
+ jsr \$26,exit
+ .end main
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ case `./$dummy` in
+ 0-0) UNAME_MACHINE="alpha" ;;
+ 1-0) UNAME_MACHINE="alphaev5" ;;
+ 1-1) UNAME_MACHINE="alphaev56" ;;
+ 1-101) UNAME_MACHINE="alphapca56" ;;
+ 2-303) UNAME_MACHINE="alphaev6" ;;
+ 2-307) UNAME_MACHINE="alphaev67" ;;
+ esac
+ objdump --private-headers $dummy | \
+ grep ld.so.1 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit 0 ;;
+ 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-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit 0 ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit 0 ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit 0 ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit 0 ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ ld_supported_emulations=`cd /; ld --help 2>&1 \
+ | sed -ne '/supported emulations:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported emulations: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_emulations" in
+ i*86linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit 0
+ ;;
+ elf_i*86)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ i*86coff)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit 0
+ ;;
+ esac
+ # Either a pre-BFD a.out linker (linux-gnuoldld)
+ # or one that does not give us useful --help.
+ # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+ # If ld does not provide *any* "supported emulations:"
+ # that means it is gnuoldld.
+ test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+ case "${UNAME_MACHINE}" in
+ i*86)
+ VENDOR=pc;
+ ;;
+ *)
+ VENDOR=unknown;
+ ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ cat >$dummy.c <<EOF
+#include <features.h>
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __ELF__
+# ifdef __GLIBC__
+# if __GLIBC__ >= 2
+ printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+#else
+ printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+ ;;
+# 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.
+ i*86:DYNIX/ptx:4*:*)
+ echo i386-sequent-sysv4
+ exit 0 ;;
+ 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 0 ;;
+ 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 0 ;;
+ i*86:*:5:7*)
+ # Fixed at (any) Pentium or better
+ UNAME_MACHINE=i586
+ if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
+ echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ 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|egrep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
+ 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 i386.
+ echo i386-pc-msdosdjgpp
+ exit 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ 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 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*: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 0
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *: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 0 ;;
+ PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel at ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit 0 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes at openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit 0 ;;
+ *:*:*:FTX*)
+ # From seanf at swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ 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 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Darwin:*:*)
+ echo `uname -p`-apple-darwin${UNAME_RELEASE}
+ exit 0 ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ if test "${UNAME_MACHINE}" = "x86pc"; then
+ UNAME_MACHINE=pc
+ fi
+ echo `uname -p`-${UNAME_MACHINE}-nto-qnx
+ exit 0 ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit 0 ;;
+ NSR-[KW]:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit 0 ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit 0 ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit 0 ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit 0 ;;
+ *: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 0 ;;
+ 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 0 ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit 0 ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit 0 ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit 0 ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit 0 ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit 0 ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+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"); 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 $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# 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 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ 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
+
+ ftp://ftp.gnu.org/pub/gnu/config/
+
+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 at 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:
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/config.guess
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/config.sub
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/config.sub 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/config.sub 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1362 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+
+timestamp='2001-04-20'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# 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 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.
+
+# Please send patches to <config-patches at 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.
+
+# 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 at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+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 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # 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 0;;
+
+ * )
+ 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* | storm-chaos* | os2-emx*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ 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)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -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/'`
+ ;;
+ -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*)
+ 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.
+ tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
+ | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
+ | pyramid | mn10200 | mn10300 | tron | a29k \
+ | 580 | i960 | h8300 \
+ | x86 | ppcbe | mipsbe | mipsle | shbe | shle \
+ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
+ | hppa64 \
+ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
+ | alphaev6[78] \
+ | we32k | ns16k | clipper | i370 | sh | sh[34] \
+ | powerpc | powerpcle \
+ | 1750a | dsp16xx | pdp10 | pdp11 \
+ | mips16 | mips64 | mipsel | mips64el \
+ | mips64orion | mips64orionel | mipstx39 | mipstx39el \
+ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
+ | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
+ | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \
+ | v850 | c4x \
+ | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
+ | pj | pjl | h8500)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65)
+ ;;
+
+ # 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.
+ # FIXME: clean up the formatting here.
+ vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
+ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
+ | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
+ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
+ | xmp-* | ymp-* \
+ | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
+ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
+ | hppa2.0n-* | hppa64-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
+ | alphaev6[78]-* \
+ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
+ | clipper-* | orion-* \
+ | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+ | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \
+ | mips16-* | mips64-* | mipsel-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
+ | mipstx39-* | mipstx39el-* | mcore-* \
+ | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
+ | [cjt]90-* \
+ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
+ | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
+ | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
+ ;;
+ # 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
+ ;;
+ 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
+ ;;
+ 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
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ 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 | ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ cray2)
+ basic_machine=cray2-cray
+ os=-unicos
+ ;;
+ [cjt]90)
+ basic_machine=${basic_machine}-cray
+ os=-unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ 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'm not sure what "Sysv32" means. Should this be sysv3.2?
+ 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
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mipsel*-linux*)
+ basic_machine=mipsel-unknown
+ os=-linux-gnu
+ ;;
+ mips*-linux*)
+ basic_machine=mips-unknown
+ os=-linux-gnu
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ mmix*)
+ basic_machine=mmix-knuth
+ os=-mmixware
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ 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
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ 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
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5 | k5 | k6 | nexgen)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2)
+ basic_machine=i686-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) 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/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sparclite-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
+ ;;
+ 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=t3e-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ 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
+ ;;
+ xmp)
+ basic_machine=xmp-cray
+ os=-unicos
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-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
+ ;;
+ mips)
+ if [ x$os = x-linux-gnu ]; then
+ basic_machine=mips-unknown
+ else
+ basic_machine=mips-mips
+ fi
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ 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
+ ;;
+ sh3 | sh4)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv9 | sparcv9b)
+ 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
+ ;;
+ c4x*)
+ basic_machine=c4x-none
+ os=-coff
+ ;;
+ *-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.
+ -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* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto*)
+ os=-nto-qnx
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -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
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -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
+ ;;
+ -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
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ 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
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-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
+ ;;
+ -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
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -vxsim* | -vxworks*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/config.sub
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/configure
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/configure 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/configure 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,5246 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --with-cc=COMPILER select compiler to use"
+ac_help="$ac_help
+ --with-linker=LINKER select linker to use"
+ac_help="$ac_help
+ --with-ccopts=CCOPTS select compiler command line options"
+ac_help="$ac_help
+ --with-ldopts=LDOPTS select linker command line options"
+ac_help="$ac_help
+ --with-root-prefix=PREFIX override prefix variable for files to be placed in the root"
+ac_help="$ac_help
+ --enable-compression enable EXPERIMENTAL compression support"
+ac_help="$ac_help
+ --enable-dll-shlibs select DLL libraries"
+ac_help="$ac_help
+ --enable-elf-shlibs select ELF shared libraries"
+ac_help="$ac_help
+ --enable-bsd-shlibs select BSD shared libraries"
+ac_help="$ac_help
+ --enable-profile build profiling libraries"
+ac_help="$ac_help
+ --enable-checker build checker libraries"
+ac_help="$ac_help
+ --enable-jfs-debug enable journal debugging"
+ac_help="$ac_help
+ --disable-swapfs disable support of legacy byte-swapped filesystems"
+ac_help="$ac_help
+ --disable-debugfs disable support of debugfs program"
+ac_help="$ac_help
+ --disable-imager disable support of e2image program"
+ac_help="$ac_help
+ --disable-resizer disable support of e2resize program"
+ac_help="$ac_help
+ --enable-dynamic-e2fsck build e2fsck dynamically"
+ac_help="$ac_help
+ --enable-fsck build fsck wrapper program"
+ac_help="$ac_help
+ --enable-old-bitops Use old (non-standard but native) bitmask operations"
+ac_help="$ac_help
+ --enable-nls Turn on Native Language Support"
+ac_help="$ac_help
+ --with-included-gettext use the GNU gettext library included here"
+ac_help="$ac_help
+ --with-catgets use catgets functions if available"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+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=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -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 ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$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" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$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)
+ # 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 << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$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" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ 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)
+ 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" ;;
+
+ -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 ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=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" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=version.h
+
+# 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 its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ 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
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+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 \" " "`
+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) E2FSPROGS_MONTH="January" ;;
+Feb) E2FSPROGS_MONTH="February" ;;
+Mar) E2FSPROGS_MONTH="March" ;;
+Apr) E2FSPROGS_MONTH="April" ;;
+May) E2FSPROGS_MONTH="May" ;;
+Jun) E2FSPROGS_MONTH="June" ;;
+Jul) E2FSPROGS_MONTH="July" ;;
+Aug) E2FSPROGS_MONTH="August" ;;
+Sep) E2FSPROGS_MONTH="September" ;;
+Oct) E2FSPROGS_MONTH="October" ;;
+Nov) E2FSPROGS_MONTH="November" ;;
+Dec) E2FSPROGS_MONTH="December" ;;
+*) echo "Unknown month $MONTH??" ;;
+esac
+
+unset DATE MONTH YEAR
+echo "Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION"
+echo "Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}"
+
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; 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
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:636: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+# Check whether --with-cc or --without-cc was given.
+if test "${with_cc+set}" = set; then
+ withval="$with_cc"
+ echo "$ac_t""CC=$withval" 1>&6
+CC=$withval
+else
+ if test -z "$CC" ; then CC=cc; fi
+echo "$ac_t""CC defaults to $CC" 1>&6
+fi
+export CC
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:670: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:700: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_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 $# -gt 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
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:751: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:783: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 794 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:825: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:830: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:858: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&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
+
+# Check whether --with-linker or --without-linker was given.
+if test "${with_linker+set}" = set; then
+ withval="$with_linker"
+ echo "$ac_t""LD=$withval" 1>&6
+LD=$withval
+else
+ if test -z "$LD" ; then LD=$CC; fi
+echo "$ac_t""LD defaults to $LD" 1>&6
+fi
+export LD
+
+# Check whether --with-ccopts or --without-ccopts was given.
+if test "${with_ccopts+set}" = set; then
+ withval="$with_ccopts"
+ echo "$ac_t""CCOPTS is $withval" 1>&6
+CFLAGS=$withval
+fi
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:907: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 922 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 939 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 956 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+ac_safe=`echo "linux/fs.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for linux/fs.h""... $ac_c" 1>&6
+echo "configure:988: checking for linux/fs.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 993 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ linux_headers=yes
+else
+ echo "$ac_t""no" 1>&6
+linux_headers=no
+fi
+
+if test "$linux_headers" != yes; then
+ LINUX_INCLUDE='-I$(top_builddir)/include'
+fi
+
+LIB_EXT=.a
+STATIC_LIB_EXT=.a
+PROFILE_LIB_EXT=.a
+# Check whether --with-ldopts or --without-ldopts was given.
+if test "${with_ldopts+set}" = set; then
+ withval="$with_ldopts"
+ echo "$ac_t""LDFLAGS is $withval" 1>&6
+LDFLAGS=$withval
+else
+ LDFLAGS=
+fi
+
+# Check whether --with-root-prefix or --without-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-compression or --disable-compression was given.
+if test "${enable_compression+set}" = set; then
+ enableval="$enable_compression"
+ if test "$enableval" = "no"
+then
+ echo "Disabling compression support"
+else
+ cat >> confdefs.h <<\EOF
+#define ENABLE_COMPRESSION 1
+EOF
+
+ echo "Enabling compression support"
+ echo "WARNING: Compression support is experimental"
+fi
+
+else
+ echo "Disabling compression support by default"
+
+fi
+
+# Check whether --enable-dll-shlibs or --disable-dll-shlibs was given.
+if test "${enable_dll_shlibs+set}" = set; then
+ enableval="$enable_dll_shlibs"
+ if test "$enableval" = "no"
+then
+ DLL_CMT=#
+ MAKEFILE_DLL=/dev/null
+ echo "Disabling DLL shared libraries"
+else
+ DLL_CMT=
+ MAKEFILE_DLL=$srcdir/lib/Makefile.dll-lib
+ BINARY_TYPE=dllbin
+ LIB_EXT=.sa
+ echo "Enabling DLL shared libraries"
+fi
+
+else
+ MAKEFILE_DLL=/dev/null
+DLL_CMT=#
+echo "Disabling DLL shared libraries by default"
+
+fi
+
+
+
+# Check whether --enable-elf-shlibs or --disable-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
+ echo "Disabling ELF shared libraries"
+else
+ 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
+ echo "Enabling ELF shared libraries"
+fi
+
+else
+ MAKEFILE_ELF=/dev/null
+ELF_CMT=#
+echo "Disabling ELF shared libraries by default"
+
+fi
+
+
+
+# Check whether --enable-bsd-shlibs or --disable-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
+ echo "Disabling BSD shared libraries"
+else
+ BSDLIB_CMT=
+ MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
+ LIB_EXT=.so
+ echo "Enabling BSD shared libraries"
+fi
+
+else
+ MAKEFILE_BSDLIB=/dev/null
+BSDLIB_CMT=#
+echo "Disabling BSD shared libraries by default"
+
+fi
+
+
+
+# Check whether --enable-profile or --disable-profile was given.
+if test "${enable_profile+set}" = set; then
+ enableval="$enable_profile"
+ if test "$enableval" = "no"
+then
+ PROFILE_CMT=#
+ MAKEFILE_PROFILE=/dev/null
+ echo "Disabling profiling libraries"
+else
+ PROFILE_CMT=
+ MAKEFILE_PROFILE=$srcdir/lib/Makefile.profile
+ PROFILED_LIB_EXT=_p.a
+ echo "Building profiling libraries"
+fi
+
+else
+ PROFILE_CMT=#
+MAKEFILE_PROFILE=/dev/null
+echo "Disabling profiling libraries by default"
+
+fi
+
+
+
+# Check whether --enable-checker or --disable-checker was given.
+if test "${enable_checker+set}" = set; then
+ enableval="$enable_checker"
+ if test "$enableval" = "no"
+then
+ CHECKER_CMT=#
+ MAKEFILE_CHECKER=/dev/null
+ echo "Disabling checker libraries"
+else
+ CHECKER_CMT=
+ MAKEFILE_CHECKER=$srcdir/lib/Makefile.checker
+ echo "Building checker libraries"
+fi
+
+else
+ CHECKER_CMT=#
+MAKEFILE_CHECKER=/dev/null
+echo "Disabling checker libraries by default"
+
+fi
+
+
+
+
+
+
+# Check whether --enable-jfs-debug or --disable-jfs-debug was given.
+if test "${enable_jfs_debug+set}" = set; then
+ enableval="$enable_jfs_debug"
+ if test "$enableval" = "no"
+then
+ echo "Disabling journal debugging"
+else
+ cat >> confdefs.h <<\EOF
+#define CONFIG_JBD_DEBUG 1
+EOF
+
+ echo "Enabling journal debugging"
+fi
+
+else
+ echo "Disabling journal debugging by default"
+
+fi
+
+# Check whether --enable-swapfs or --disable-swapfs was given.
+if test "${enable_swapfs+set}" = set; then
+ enableval="$enable_swapfs"
+ if test "$enableval" = "no"
+then
+ echo "Disabling swapfs support"
+else
+ cat >> confdefs.h <<\EOF
+#define ENABLE_SWAPFS 1
+EOF
+
+ echo "Enabling swapfs support"
+fi
+
+else
+ echo "Enabling swapfs support by default"
+cat >> confdefs.h <<\EOF
+#define ENABLE_SWAPFS 1
+EOF
+
+
+fi
+
+# Check whether --enable-debugfs or --disable-debugfs was given.
+if test "${enable_debugfs+set}" = set; then
+ enableval="$enable_debugfs"
+ if test "$enableval" = "no"
+then
+ echo "Disabling debugfs support"
+ DEBUGFS_CMT="#"
+else
+ DEBUGFS_CMT=
+ echo "Enabling debugfs support"
+fi
+
+else
+ echo "Enabling debugfs support by default"
+DEBUGFS_CMT=
+
+fi
+
+
+# Check whether --enable-imager or --disable-imager was given.
+if test "${enable_imager+set}" = set; then
+ enableval="$enable_imager"
+ if test "$enableval" = "no"
+then
+ echo "Disabling e2image support"
+ IMAGER_CMT="#"
+else
+ IMAGER_CMT=
+ echo "Enabling e2image support"
+fi
+
+else
+ echo "Enabling e2image support by default"
+IMAGER_CMT=
+
+fi
+
+
+# Check whether --enable-resizer or --disable-resizer was given.
+if test "${enable_resizer+set}" = set; then
+ enableval="$enable_resizer"
+ if test "$enableval" = "no"
+then
+ echo "Disabling e2resize support"
+ RESIZER_CMT="#"
+else
+ RESIZER_CMT=
+ echo "Enabling e2resize support"
+fi
+
+else
+ echo "Enabling e2resize support by default"
+RESIZER_CMT=
+
+fi
+
+
+# Check whether --enable-dynamic-e2fsck or --disable-dynamic-e2fsck was given.
+if test "${enable_dynamic_e2fsck+set}" = set; then
+ enableval="$enable_dynamic_e2fsck"
+ if test "$enableval" = "no"
+then
+ E2FSCK_TYPE=static
+ echo "Building e2fsck statically"
+else
+ E2FSCK_TYPE=shared
+ echo "Building e2fsck dynamically"
+fi
+
+else
+ E2FSCK_TYPE=static
+echo "Building e2fsck statically by default"
+
+fi
+
+
+# Check whether --enable-fsck or --disable-fsck was given.
+if test "${enable_fsck+set}" = set; then
+ enableval="$enable_fsck"
+ if test "$enableval" = "no"
+then
+ FSCK_PROG='' FSCK_MAN=''
+ echo "Not building fsck wrapper"
+else
+ FSCK_PROG=fsck FSCK_MAN=fsck.8
+ echo "Building fsck wrapper"
+fi
+
+else
+ case "$host_os" in
+ gnu*)
+ FSCK_PROG='' FSCK_MAN=''
+ echo "Not building fsck wrapper by default"
+ ;;
+ *)
+ FSCK_PROG=fsck FSCK_MAN=fsck.8
+ echo "Building fsck wrapper by default"
+esac
+
+fi
+
+
+
+MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
+
+# Check whether --enable-old-bitops or --disable-old-bitops was given.
+if test "${enable_old_bitops+set}" = set; then
+ enableval="$enable_old_bitops"
+ if test "$enableval" = "no"
+then
+ echo "Using new (standard) bitmask operations"
+else
+ cat >> confdefs.h <<\EOF
+#define EXT2_OLD_BITOPS 1
+EOF
+
+ echo "Using old (native) bitmask operations"
+
+fi
+
+else
+ echo "Using standard bitmask operations by default"
+
+fi
+
+PACKAGE=e2fsprogs
+VERSION="$E2FSPROGS_VERSION"
+cat >> confdefs.h <<EOF
+#define PACKAGE "$PACKAGE"
+EOF
+
+cat >> confdefs.h <<EOF
+#define VERSION "$VERSION"
+EOF
+
+
+
+
+ALL_LINGUAS="it nyc tr"
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:1374: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1403: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:1431: checking for POSIXized ISC" >&5
+if test -d /etc/conf/kconfig.d &&
+ grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+then
+ echo "$ac_t""yes" 1>&6
+ ISC=yes # If later tests want to check for ISC.
+ cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ if test "$GCC" = yes; then
+ CC="$CC -posix"
+ else
+ CC="$CC -Xp"
+ fi
+else
+ echo "$ac_t""no" 1>&6
+ ISC=
+fi
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:1452: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1457 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1482 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ 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 > conftest.$ac_ext <<EOF
+#line 1500 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ 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 > conftest.$ac_ext <<EOF
+#line 1521 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#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)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:1532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:1556: checking for working const" >&5
+if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1561 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this. */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this. */
+char const *const *ccp;
+char **p;
+/* 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";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 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 saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:1610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_const=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+ cat >> confdefs.h <<\EOF
+#define const
+EOF
+
+fi
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:1631: checking for inline" >&5
+if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat > conftest.$ac_ext <<EOF
+#line 1638 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:1645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+ inline | yes) ;;
+ no) cat >> confdefs.h <<\EOF
+#define inline
+EOF
+ ;;
+ *) cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:1671: checking for off_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1676 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_off_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+ cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:1704: checking for size_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1709 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_size_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+ cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+fi
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
+echo "configure:1739: checking for working alloca.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1744 "configure"
+#include "confdefs.h"
+#include <alloca.h>
+int main() {
+char *p = alloca(2 * sizeof(int));
+; return 0; }
+EOF
+if { (eval echo configure:1751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_header_alloca_h=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_alloca_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
+EOF
+
+fi
+
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:1772: checking for alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1777 "configure"
+#include "confdefs.h"
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:1805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_func_alloca_works=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_func_alloca_works=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+
+fi
+
+if test $ac_cv_func_alloca_works = no; then
+ # 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=alloca.${ac_objext}
+ cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:1837: checking whether alloca needs Cray hooks" >&5
+if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1842 "configure"
+#include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "webecray" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_os_cray=yes
+else
+ rm -rf conftest*
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_os_cray" 1>&6
+if test $ac_cv_os_cray = yes; then
+for ac_func in _getb67 GETB67 getb67; do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1867: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1872 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* 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_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
+
+ break
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:1922: checking stack direction for C alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1930 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+ exit (find_stack_direction() < 0);
+}
+EOF
+if { (eval echo configure:1949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_c_stack_direction=1
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
+
+fi
+
+for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1974: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1979 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2013: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2018 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* 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_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:2066: checking for working mmap" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2074 "configure"
+#include "confdefs.h"
+
+/* 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 filesystem buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propogated 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 <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# 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 */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize();
+
+ /*
+ * First, make a file with some known garbage in it.
+ */
+ data = malloc(pagesize);
+ if (!data)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand();
+ umask(0);
+ fd = creat("conftestmmap", 0600);
+ if (fd < 0)
+ exit(1);
+ if (write(fd, data, pagesize) != pagesize)
+ exit(1);
+ close(fd);
+
+ /*
+ * 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("conftestmmap", O_RDWR);
+ if (fd < 0)
+ exit(1);
+ data2 = malloc(2 * pagesize);
+ if (!data2)
+ exit(1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit(1);
+
+ /*
+ * 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 = malloc(pagesize);
+ if (!data3)
+ exit(1);
+ if (read(fd, data3, pagesize) != pagesize)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit(1);
+ close(fd);
+ unlink("conftestmmap");
+ exit(0);
+}
+
+EOF
+if { (eval echo configure:2214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_func_mmap_fixed_mapped=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+
+ for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h sys/param.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2242: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2247 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
+strdup __argz_count __argz_stringify __argz_next
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2282: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2287 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* 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_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ for ac_func in stpcpy
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2339: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2344 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* 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_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STPCPY 1
+EOF
+
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+echo "configure:2401: checking for LC_MESSAGES" >&5
+if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2406 "configure"
+#include "confdefs.h"
+#include <locale.h>
+int main() {
+return LC_MESSAGES
+; return 0; }
+EOF
+if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LC_MESSAGES 1
+EOF
+
+ fi
+ fi
+ echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
+echo "configure:2434: checking whether NLS is requested" >&5
+ # Check whether --enable-nls or --disable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval="$enable_nls"
+ USE_NLS=$enableval
+else
+ USE_NLS=no
+fi
+
+ echo "$ac_t""$USE_NLS" 1>&6
+
+
+ USE_INCLUDED_LIBINTL=no
+
+ if test "$USE_NLS" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define ENABLE_NLS 1
+EOF
+
+ echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
+echo "configure:2454: checking whether included gettext is requested" >&5
+ # Check whether --with-included-gettext or --without-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
+
+ echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
+echo "configure:2473: checking for libintl.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2478 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
+echo "configure:2500: checking for gettext in libc" >&5
+if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2505 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
+
+ if test "$gt_cv_func_gettext_libc" != "yes"; then
+ echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
+echo "configure:2528: checking for bindtextdomain in -lintl" >&5
+ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lintl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2536 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char bindtextdomain();
+
+int main() {
+bindtextdomain()
+; return 0; }
+EOF
+if { (eval echo configure:2547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
+echo "configure:2563: checking for gettext in libintl" >&5
+if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
+echo "configure:2568: checking for gettext in -lintl" >&5
+ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lintl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2576 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gettext();
+
+int main() {
+gettext()
+; return 0; }
+EOF
+if { (eval echo configure:2587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ gt_cv_func_gettext_libintl=yes
+else
+ echo "$ac_t""no" 1>&6
+gt_cv_func_gettext_libintl=no
+fi
+
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
+EOF
+
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2626: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ if test "$MSGFMT" != "no"; then
+ for ac_func in dcgettext
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2660: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2665 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* 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_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2715: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_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
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2751: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ cat > conftest.$ac_ext <<EOF
+#line 2783 "configure"
+#include "confdefs.h"
+
+int main() {
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+; return 0; }
+EOF
+if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+fi
+rm -f conftest*
+ INSTOBJEXT=.mo
+ fi
+ fi
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ if test "$CATOBJEXT" = "NONE"; then
+ echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
+echo "configure:2814: checking whether catgets can be used" >&5
+ # Check whether --with-catgets or --without-catgets was given.
+if test "${with_catgets+set}" = set; then
+ withval="$with_catgets"
+ nls_cv_use_catgets=$withval
+else
+ nls_cv_use_catgets=no
+fi
+
+ echo "$ac_t""$nls_cv_use_catgets" 1>&6
+
+ if test "$nls_cv_use_catgets" = "yes"; then
+ echo $ac_n "checking for main in -li""... $ac_c" 1>&6
+echo "configure:2827: checking for main in -li" >&5
+ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-li $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2835 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:2842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-li $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ echo $ac_n "checking for catgets""... $ac_c" 1>&6
+echo "configure:2870: checking for catgets" >&5
+if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2875 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char catgets(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char catgets();
+
+int main() {
+
+/* 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_catgets) || defined (__stub___catgets)
+choke me
+#else
+catgets();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_catgets=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_catgets=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_CATGETS 1
+EOF
+
+ INTLOBJS="\$(CATOBJS)"
+ # Extract the first word of "gencat", so it can be a program name with args.
+set dummy gencat; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2920: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GENCAT" in
+ /*)
+ ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GENCAT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
+ ;;
+esac
+fi
+GENCAT="$ac_cv_path_GENCAT"
+if test -n "$GENCAT"; then
+ echo "$ac_t""$GENCAT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ if test "$GENCAT" != "no"; then
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2956: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test "$GMSGFMT" = "no"; then
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2993: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+ # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3028: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.cat
+ INSTOBJEXT=.cat
+ DATADIRNAME=lib
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+ fi
+
+ if test "$CATOBJEXT" = "NONE"; then
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ INTLOBJS="\$(GETTOBJS)"
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3086: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3120: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_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
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3156: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.gmo
+ INSTOBJEXT=.mo
+ DATADIRNAME=share
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+ else
+ DATADIRNAME=share
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+
+
+
+
+ # If this is used in GNU gettext we have to set USE_NLS to `yes'
+ # because some of the sources are only built for this goal.
+ if test "$PACKAGE" = gettext; then
+ USE_NLS=yes
+ USE_INCLUDED_LIBINTL=yes
+ fi
+
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
+echo "configure:3249: checking for catalogs to be installed" >&5
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ echo "$ac_t""$LINGUAS" 1>&6
+ fi
+
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+
+
+ test -d intl || mkdir intl
+ if test "$CATOBJEXT" = ".cat"; then
+ ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
+echo "configure:3277: checking for linux/version.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3282 "configure"
+#include "confdefs.h"
+#include <linux/version.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ msgformat=linux
+else
+ echo "$ac_t""no" 1>&6
+msgformat=xopen
+fi
+
+
+ sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
+ fi
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
+
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+
+
+
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+
+
+ l=
+
+
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:3353: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Extract the first word of "ln", so it can be a program name with args.
+set dummy ln; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3382: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_LN'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$LN" in
+ /*)
+ ac_cv_path_LN="$LN" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_LN="$LN" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_LN="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_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
+ echo "$ac_t""$LN" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:3416: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+ rm -f conftestdata
+ ac_cv_prog_LN_S="ln -s"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "mv", so it can be a program name with args.
+set dummy mv; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3439: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MV" in
+ /*)
+ ac_cv_path_MV="$MV" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_MV="$MV" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_MV="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_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
+ echo "$ac_t""$MV" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "cp", so it can be a program name with args.
+set dummy cp; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3475: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$CP" in
+ /*)
+ ac_cv_path_CP="$CP" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_CP="$CP" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_CP="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_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
+ echo "$ac_t""$CP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "rm", so it can be a program name with args.
+set dummy rm; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3511: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$RM" in
+ /*)
+ ac_cv_path_RM="$RM" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_RM="$RM" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_RM="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_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
+ echo "$ac_t""$RM" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "chmod", so it can be a program name with args.
+set dummy chmod; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3547: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_CHMOD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$CHMOD" in
+ /*)
+ ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_CHMOD="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_CHMOD" && ac_cv_path_CHMOD=":"
+ ;;
+esac
+fi
+CHMOD="$ac_cv_path_CHMOD"
+if test -n "$CHMOD"; then
+ echo "$ac_t""$CHMOD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "awk", so it can be a program name with args.
+set dummy awk; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3583: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$AWK" in
+ /*)
+ ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_AWK="$AWK" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_AWK="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_AWK" && ac_cv_path_AWK="awk"
+ ;;
+esac
+fi
+AWK="$ac_cv_path_AWK"
+if test -n "$AWK"; then
+ echo "$ac_t""$AWK" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "sed", so it can be a program name with args.
+set dummy sed; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3619: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$SED" in
+ /*)
+ ac_cv_path_SED="$SED" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_SED="$SED" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_SED="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_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
+ echo "$ac_t""$SED" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3655: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$PERL" in
+ /*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_PERL="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_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
+ echo "$ac_t""$PERL" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "ldconfig", so it can be a program name with args.
+set dummy ldconfig; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3691: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_LDCONFIG'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$LDCONFIG" in
+ /*)
+ ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_LDCONFIG" && ac_cv_path_LDCONFIG=":"
+ ;;
+esac
+fi
+LDCONFIG="$ac_cv_path_LDCONFIG"
+if test -n "$LDCONFIG"; then
+ echo "$ac_t""$LDCONFIG" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:3725: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+if test $host != $build; then
+ ac_tool_prefix=${host_alias}-
+else
+ ac_tool_prefix=
+fi
+
+# 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
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3751: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+AR="$ac_cv_prog_AR"
+if test -n "$AR"; then
+ echo "$ac_t""$AR" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_AR"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3783: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_AR="ar"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
+fi
+fi
+AR="$ac_cv_prog_AR"
+if test -n "$AR"; then
+ echo "$ac_t""$AR" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ AR="ar"
+fi
+fi
+
+# 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
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3818: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_RANLIB"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3850: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ RANLIB=":"
+fi
+fi
+
+# 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
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3885: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_STRIP"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3917: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_STRIP="strip"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ STRIP=":"
+fi
+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
+# 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"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:3961: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/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
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+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. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&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_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+# 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
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4023: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$BUILD_CC"; then
+ ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_BUILD_CC="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+BUILD_CC="$ac_cv_prog_BUILD_CC"
+if test -n "$BUILD_CC"; then
+ echo "$ac_t""$BUILD_CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$BUILD_CC" && break
+done
+
+fi
+for ac_hdr in stdlib.h unistd.h stdarg.h errno.h malloc.h mntent.h paths.h dirent.h getopt.h setjmp.h signal.h termios.h linux/fd.h linux/major.h sys/disklabel.h sys/ioctl.h sys/mkdev.h sys/mount.h sys/sockio.h sys/sysmacros.h sys/time.h sys/stat.h sys/types.h net/if.h netinet/in.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4057: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4062 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for vprintf""... $ac_c" 1>&6
+echo "configure:4094: checking for vprintf" >&5
+if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4099 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char vprintf(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char vprintf();
+
+int main() {
+
+/* 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_vprintf) || defined (__stub___vprintf)
+choke me
+#else
+vprintf();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_vprintf=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_vprintf=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_VPRINTF 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test "$ac_cv_func_vprintf" != yes; then
+echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
+echo "configure:4146: checking for _doprnt" >&5
+if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4151 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char _doprnt(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char _doprnt();
+
+int main() {
+
+/* 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__doprnt) || defined (__stub____doprnt)
+choke me
+#else
+_doprnt();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func__doprnt=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func__doprnt=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_DOPRNT 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+echo $ac_n "checking whether struct dirent has a d_namlen field""... $ac_c" 1>&6
+echo "configure:4199: checking whether struct dirent has a d_namlen field" >&5
+if eval "test \"`echo '$''{'e2fsprogs_cv_struct_d_namlen'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4204 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <dirent.h>
+int main() {
+struct dirent de; de.d_namlen = 0;
+; return 0; }
+EOF
+if { (eval echo configure:4212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ e2fsprogs_cv_struct_d_namlen=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ e2fsprogs_cv_struct_d_namlen=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$e2fsprogs_cv_struct_d_namlen" 1>&6
+if test "$e2fsprogs_cv_struct_d_namlen" = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_DIRENT_NAMLEN 1
+EOF
+
+fi
+echo $ac_n "checking whether llseek declared in unistd.h""... $ac_c" 1>&6
+echo "configure:4232: checking whether llseek declared in unistd.h" >&5
+if eval "test \"`echo '$''{'e2fsprogs_cv_have_llseek_prototype'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4237 "configure"
+#include "confdefs.h"
+#include <unistd.h>
+int main() {
+extern int llseek(int);
+; return 0; }
+EOF
+if { (eval echo configure:4244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ e2fsprogs_cv_have_llseek_prototype=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ e2fsprogs_cv_have_llseek_prototype=yes
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$e2fsprogs_cv_have_llseek_prototype" 1>&6
+if test "$e2fsprogs_cv_have_llseek_prototype" = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LLSEEK_PROTOTYPE 1
+EOF
+
+fi
+echo $ac_n "checking whether lseek64 declared in unistd.h""... $ac_c" 1>&6
+echo "configure:4264: checking whether lseek64 declared in unistd.h" >&5
+if eval "test \"`echo '$''{'e2fsprogs_cv_have_lseek64_prototype'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4269 "configure"
+#include "confdefs.h"
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#include <unistd.h>
+int main() {
+extern int lseek64(int);
+; return 0; }
+EOF
+if { (eval echo configure:4278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ e2fsprogs_cv_have_lseek64_prototype=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ e2fsprogs_cv_have_lseek64_prototype=yes
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$e2fsprogs_cv_have_lseek64_prototype" 1>&6
+if test "$e2fsprogs_cv_have_lseek64_prototype" = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LSEEK64_PROTOTYPE 1
+EOF
+
+fi
+if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then
+ # if cross-compiling, with no cached values, just assume something common.
+ ac_cv_sizeof_short=2
+ ac_cv_sizeof_int=4
+ ac_cv_sizeof_long=4
+ ac_cv_sizeof_long_long=8
+ echo "configure: warning: Cross-compiling, so cannot check type sizes; assuming short=2, int=4, long=4, long long=8" 1>&2
+fi
+echo $ac_n "checking size of short""... $ac_c" 1>&6
+echo "configure:4306: checking size of short" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4314 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <sys/types.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(short));
+ exit(0);
+}
+EOF
+if { (eval echo configure:4326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_sizeof_short=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_short=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_short" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+EOF
+
+
+echo $ac_n "checking size of int""... $ac_c" 1>&6
+echo "configure:4346: checking size of int" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4354 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <sys/types.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(int));
+ exit(0);
+}
+EOF
+if { (eval echo configure:4366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_sizeof_int=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_int=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_int" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+EOF
+
+
+echo $ac_n "checking size of long""... $ac_c" 1>&6
+echo "configure:4386: checking size of long" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4394 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <sys/types.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(long));
+ exit(0);
+}
+EOF
+if { (eval echo configure:4406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_sizeof_long=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_long=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_long" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+EOF
+
+
+echo $ac_n "checking size of long long""... $ac_c" 1>&6
+echo "configure:4426: checking size of long long" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4434 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <sys/types.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(long long));
+ exit(0);
+}
+EOF
+if { (eval echo configure:4446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_sizeof_long_long=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_long_long=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+EOF
+
+
+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
+
+
+
+
+echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
+echo "configure:4474: checking whether byte ordering is bigendian" >&5
+if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_c_bigendian=unknown
+# See if sys/param.h defines the BYTE_ORDER macro.
+cat > conftest.$ac_ext <<EOF
+#line 4481 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+int main() {
+
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:4492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat > conftest.$ac_ext <<EOF
+#line 4496 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+int main() {
+
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:4507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_bigendian=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_bigendian=no
+fi
+rm -f conftest*
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+if test $ac_cv_c_bigendian = unknown; then
+if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4527 "configure"
+#include "confdefs.h"
+main () {
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long l;
+ char c[sizeof (long)];
+ } u;
+ u.l = 1;
+ exit (u.c[sizeof (long) - 1] == 1);
+}
+EOF
+if { (eval echo configure:4540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_c_bigendian=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_bigendian=yes
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_c_bigendian" 1>&6
+if test $ac_cv_c_bigendian = yes; then
+ cat >> confdefs.h <<\EOF
+#define WORDS_BIGENDIAN 1
+EOF
+
+fi
+
+echo $ac_n "checking whether struct stat has a st_flags field""... $ac_c" 1>&6
+echo "configure:4564: checking whether struct stat has a st_flags field" >&5
+if eval "test \"`echo '$''{'e2fsprogs_cv_struct_st_flags'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4569 "configure"
+#include "confdefs.h"
+#include <sys/stat.h>
+int main() {
+struct stat stat; stat.st_flags = 0;
+; return 0; }
+EOF
+if { (eval echo configure:4576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ e2fsprogs_cv_struct_st_flags=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ e2fsprogs_cv_struct_st_flags=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$e2fsprogs_cv_struct_st_flags" 1>&6
+if test "$e2fsprogs_cv_struct_st_flags" = yes; then
+ echo $ac_n "checking whether st_flags field is useful""... $ac_c" 1>&6
+echo "configure:4591: checking whether st_flags field is useful" >&5
+ if eval "test \"`echo '$''{'e2fsprogs_cv_struct_st_flags_immut'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4596 "configure"
+#include "confdefs.h"
+#include <sys/stat.h>
+int main() {
+struct stat stat; stat.st_flags |= UF_IMMUTABLE;
+; return 0; }
+EOF
+if { (eval echo configure:4603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ e2fsprogs_cv_struct_st_flags_immut=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ e2fsprogs_cv_struct_st_flags_immut=no
+fi
+rm -f conftest*
+fi
+
+ echo "$ac_t""$e2fsprogs_cv_struct_st_flags_immut" 1>&6
+ if test "$e2fsprogs_cv_struct_st_flags_immut" = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STAT_FLAGS 1
+EOF
+
+ fi
+fi
+for ac_func in chflags getrusage llseek lseek64 open64 getmntinfo strcasecmp srandom fchown mallinfo fdatasync strnlen
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4626: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4631 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* 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_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+SOCKET_LIB=''
+echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
+echo "configure:4680: checking for socket in -lsocket" >&5
+ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lsocket $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4688 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char socket();
+
+int main() {
+socket()
+; return 0; }
+EOF
+if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SOCKET_LIB=-lsocket
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+echo $ac_n "checking for optreset""... $ac_c" 1>&6
+echo "configure:4721: checking for optreset" >&5
+if eval "test \"`echo '$''{'ac_cv_have_optreset'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4726 "configure"
+#include "confdefs.h"
+#include <unistd.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "optreset" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_have_optreset=yes
+else
+ rm -rf conftest*
+ ac_cv_have_optreset=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_have_optreset" 1>&6
+if test $ac_cv_have_optreset = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_OPTRESET 1
+EOF
+
+fi
+case "$host_os" in
+linux*)
+ cat >> confdefs.h <<\EOF
+#define HAVE_EXT2_IOCTLS 1
+EOF
+
+ ;;
+esac
+case "$host_os" in
+linux* | gnu*)
+ if test "$prefix" = NONE -a "$root_prefix" = NONE ; then
+ root_prefix="";
+ echo "On $host_os systems, root_prefix defaults to ''"
+ fi
+ ;;
+esac
+case "$host_os" in
+linux* | gnu*)
+ if test "$prefix" = NONE ; then
+ prefix="/usr";
+ echo "On $host_os systems, prefix defaults to /usr"
+ fi
+;;
+esac
+if test "$root_prefix" = NONE ; then
+ if test "$prefix" = NONE ; then
+ root_prefix="$ac_default_prefix"
+ else
+ root_prefix="$prefix"
+ fi
+fi
+
+echo $ac_n "checking whether linker accepts -static""... $ac_c" 1>&6
+echo "configure:4781: checking whether linker accepts -static" >&5
+if eval "test \"`echo '$''{'ac_cv_e2fsprogs_use_static'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -static"
+cat > conftest.$ac_ext <<EOF
+#line 4787 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int main() {
+fflush(stdout);
+; return 0; }
+EOF
+if { (eval echo configure:4794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_e2fsprogs_use_static=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_e2fsprogs_use_static=no
+fi
+rm -f conftest*
+LDFLAGS=$SAVE_LDFLAGS
+fi
+
+case "$host_os" in
+solaris2.*)
+ ac_cv_e2fsprogs_use_static=no
+;;
+esac
+echo "$ac_t""$ac_cv_e2fsprogs_use_static" 1>&6
+LDFLAG_STATIC=
+if test $ac_cv_e2fsprogs_use_static = yes; then
+ LDFLAG_STATIC=-static
+fi
+
+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
+
+test -d lib || mkdir lib
+test -d include || mkdir include
+test -d include/linux || mkdir include/linux
+test -d include/asm || mkdir include/asm
+rmakefile=
+if test -d ${srcdir}/resize ; then
+ rmakefile=resize/Makefile
+fi
+trap '' 1 2 15
+cat > confcache <<\EOF
+# 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. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# 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.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "MCONFIG Makefile util/Makefile util/subst.conf lib/et/Makefile
+ lib/ss/Makefile lib/ext2fs/Makefile lib/e2p/Makefile lib/uuid/Makefile
+ misc/Makefile e2fsck/Makefile debugfs/Makefile tests/Makefile
+ tests/progs/Makefile $rmakefile doc/Makefile
+ intl/Makefile po/Makefile.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+/@MCONFIG@/r $MCONFIG
+s%@MCONFIG@%%g
+s%@E2FSPROGS_YEAR@%$E2FSPROGS_YEAR%g
+s%@E2FSPROGS_MONTH@%$E2FSPROGS_MONTH%g
+s%@E2FSPROGS_VERSION@%$E2FSPROGS_VERSION%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@CC@%$CC%g
+s%@LD@%$LD%g
+s%@CPP@%$CPP%g
+s%@LINUX_INCLUDE@%$LINUX_INCLUDE%g
+s%@DLL_CMT@%$DLL_CMT%g
+/@MAKEFILE_DLL@/r $MAKEFILE_DLL
+s%@MAKEFILE_DLL@%%g
+s%@ELF_CMT@%$ELF_CMT%g
+/@MAKEFILE_ELF@/r $MAKEFILE_ELF
+s%@MAKEFILE_ELF@%%g
+s%@BSDLIB_CMT@%$BSDLIB_CMT%g
+/@MAKEFILE_BSDLIB@/r $MAKEFILE_BSDLIB
+s%@MAKEFILE_BSDLIB@%%g
+s%@PROFILE_CMT@%$PROFILE_CMT%g
+/@MAKEFILE_PROFILE@/r $MAKEFILE_PROFILE
+s%@MAKEFILE_PROFILE@%%g
+s%@CHECKER_CMT@%$CHECKER_CMT%g
+/@MAKEFILE_CHECKER@/r $MAKEFILE_CHECKER
+s%@MAKEFILE_CHECKER@%%g
+s%@LIB_EXT@%$LIB_EXT%g
+s%@STATIC_LIB_EXT@%$STATIC_LIB_EXT%g
+s%@PROFILED_LIB_EXT@%$PROFILED_LIB_EXT%g
+s%@DEBUGFS_CMT@%$DEBUGFS_CMT%g
+s%@IMAGER_CMT@%$IMAGER_CMT%g
+s%@RESIZER_CMT@%$RESIZER_CMT%g
+s%@E2FSCK_TYPE@%$E2FSCK_TYPE%g
+s%@FSCK_PROG@%$FSCK_PROG%g
+s%@FSCK_MAN@%$FSCK_MAN%g
+/@MAKEFILE_LIBRARY@/r $MAKEFILE_LIBRARY
+s%@MAKEFILE_LIBRARY@%%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@RANLIB@%$RANLIB%g
+s%@ALLOCA@%$ALLOCA%g
+s%@USE_NLS@%$USE_NLS%g
+s%@MSGFMT@%$MSGFMT%g
+s%@GMSGFMT@%$GMSGFMT%g
+s%@XGETTEXT@%$XGETTEXT%g
+s%@GENCAT@%$GENCAT%g
+s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
+s%@CATALOGS@%$CATALOGS%g
+s%@CATOBJEXT@%$CATOBJEXT%g
+s%@DATADIRNAME@%$DATADIRNAME%g
+s%@GMOFILES@%$GMOFILES%g
+s%@INSTOBJEXT@%$INSTOBJEXT%g
+s%@INTLDEPS@%$INTLDEPS%g
+s%@INTLLIBS@%$INTLLIBS%g
+s%@INTLOBJS@%$INTLOBJS%g
+s%@POFILES@%$POFILES%g
+s%@POSUB@%$POSUB%g
+s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
+s%@GT_NO@%$GT_NO%g
+s%@GT_YES@%$GT_YES%g
+s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
+s%@l@%$l%g
+s%@BINARY_TYPE@%$BINARY_TYPE%g
+s%@LN@%$LN%g
+s%@LN_S@%$LN_S%g
+s%@MV@%$MV%g
+s%@CP@%$CP%g
+s%@RM@%$RM%g
+s%@CHMOD@%$CHMOD%g
+s%@AWK@%$AWK%g
+s%@SED@%$SED%g
+s%@PERL@%$PERL%g
+s%@LDCONFIG@%$LDCONFIG%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+s%@AR@%$AR%g
+s%@STRIP@%$STRIP%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@BUILD_CC@%$BUILD_CC%g
+s%@SIZEOF_SHORT@%$SIZEOF_SHORT%g
+s%@SIZEOF_INT@%$SIZEOF_INT%g
+s%@SIZEOF_LONG@%$SIZEOF_LONG%g
+s%@SIZEOF_LONG_LONG@%$SIZEOF_LONG_LONG%g
+s%@SOCKET_LIB@%$SOCKET_LIB%g
+s%@root_prefix@%$root_prefix%g
+s%@LDFLAG_STATIC@%$LDFLAG_STATIC%g
+s%@SS_DIR@%$SS_DIR%g
+s%@ET_DIR@%$ET_DIR%g
+s%@DO_TEST_SUITE@%$DO_TEST_SUITE%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"MCONFIG Makefile util/Makefile util/subst.conf lib/et/Makefile
+ lib/ss/Makefile lib/ext2fs/Makefile lib/e2p/Makefile lib/uuid/Makefile
+ misc/Makefile e2fsck/Makefile debugfs/Makefile tests/Makefile
+ tests/progs/Makefile $rmakefile doc/Makefile
+ intl/Makefile po/Makefile.in"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+ac_sources="$nls_cv_header_libgt"
+ac_dests="$nls_cv_header_intl"
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+srcdir=$ac_given_srcdir
+while test -n "$ac_sources"; do
+ set $ac_dests; ac_dest=$1; shift; ac_dests=$*
+ set $ac_sources; ac_source=$1; shift; ac_sources=$*
+
+ echo "linking $srcdir/$ac_source to $ac_dest"
+
+ if test ! -r $srcdir/$ac_source; then
+ { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
+ fi
+ rm -f $ac_dest
+
+ # Make relative symlinks.
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
+ # The dest file is in a subdirectory.
+ test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
+ ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dest_dir_suffix.
+ ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dest_dir_suffix= ac_dots=
+ fi
+
+ case "$srcdir" in
+ [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
+ *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
+ esac
+
+ # Make a symlink if possible; otherwise try a hard link.
+ if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
+ ln $srcdir/$ac_source $ac_dest; then :
+ else
+ { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
+ fi
+done
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/configure
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/configure.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/configure.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/configure.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,660 @@
+AC_INIT(version.h)
+AC_PREREQ(2.12)
+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 \" " "`
+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) E2FSPROGS_MONTH="January" ;;
+Feb) E2FSPROGS_MONTH="February" ;;
+Mar) E2FSPROGS_MONTH="March" ;;
+Apr) E2FSPROGS_MONTH="April" ;;
+May) E2FSPROGS_MONTH="May" ;;
+Jun) E2FSPROGS_MONTH="June" ;;
+Jul) E2FSPROGS_MONTH="July" ;;
+Aug) E2FSPROGS_MONTH="August" ;;
+Sep) E2FSPROGS_MONTH="September" ;;
+Oct) E2FSPROGS_MONTH="October" ;;
+Nov) E2FSPROGS_MONTH="November" ;;
+Dec) E2FSPROGS_MONTH="December" ;;
+*) echo "Unknown month $MONTH??" ;;
+esac
+
+unset DATE MONTH YEAR
+echo "Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION"
+echo "Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}"
+AC_SUBST(E2FSPROGS_YEAR)
+AC_SUBST(E2FSPROGS_MONTH)
+AC_SUBST(E2FSPROGS_VERSION)
+AC_CANONICAL_HOST
+dnl
+dnl set $(CC) from --with-cc=value
+dnl
+AC_ARG_WITH([cc],
+[ --with-cc=COMPILER select compiler to use],
+AC_MSG_RESULT(CC=$withval)
+CC=$withval,
+if test -z "$CC" ; then CC=cc; fi
+[AC_MSG_RESULT(CC defaults to $CC)])dnl
+export CC
+AC_SUBST([CC])
+AC_PROG_CC
+dnl
+dnl set $(LD) from --with-linker=value
+dnl
+AC_ARG_WITH([linker],
+[ --with-linker=LINKER select linker to use],
+AC_MSG_RESULT(LD=$withval)
+LD=$withval,
+if test -z "$LD" ; then LD=$CC; fi
+[AC_MSG_RESULT(LD defaults to $LD)])dnl
+export LD
+AC_SUBST([LD])
+dnl
+dnl set $(CCOPTS) from --with-ccopts=value
+dnl
+AC_ARG_WITH([ccopts],
+[ --with-ccopts=CCOPTS select compiler command line options],
+AC_MSG_RESULT(CCOPTS is $withval)
+CFLAGS=$withval,
+)dnl
+dnl
+dnl On systems without linux header files, we add an extra include directory
+dnl that holds enough to fake it (hopefully). Note that the $(top_srcdir) here
+dnl is quoted so that it gets expanded by make, not by configure.
+dnl
+AC_CHECK_HEADER(linux/fs.h, [linux_headers=yes], [linux_headers=no])
+if test "$linux_headers" != yes; then
+ LINUX_INCLUDE='-I$(top_builddir)/include'
+fi
+AC_SUBST(LINUX_INCLUDE)
+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
+PROFILE_LIB_EXT=.a
+dnl
+dnl set $(LDFLAGS) from --with-ldopts=value
+dnl
+AC_ARG_WITH([ldopts],
+[ --with-ldopts=LDOPTS select linker command line options],
+AC_MSG_RESULT(LDFLAGS is $withval)
+LDFLAGS=$withval,
+LDFLAGS=)dnl
+AC_SUBST(LDFLAGS)
+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-compression
+dnl
+AC_ARG_ENABLE([compression],
+[ --enable-compression enable EXPERIMENTAL compression support],
+if test "$enableval" = "no"
+then
+ echo "Disabling compression support"
+else
+ AC_DEFINE(ENABLE_COMPRESSION)
+ echo "Enabling compression support"
+ echo "WARNING: Compression support is experimental"
+fi
+,
+echo "Disabling compression support by default"
+)
+dnl
+dnl handle --enable-dll-shlibs
+dnl
+AC_ARG_ENABLE([dll-shlibs],
+[ --enable-dll-shlibs select DLL libraries],
+if test "$enableval" = "no"
+then
+ DLL_CMT=#
+ MAKEFILE_DLL=/dev/null
+ echo "Disabling DLL shared libraries"
+else
+ DLL_CMT=
+ MAKEFILE_DLL=$srcdir/lib/Makefile.dll-lib
+ BINARY_TYPE=dllbin
+ LIB_EXT=.sa
+ echo "Enabling DLL shared libraries"
+fi
+,
+MAKEFILE_DLL=/dev/null
+DLL_CMT=#
+echo "Disabling DLL shared libraries by default"
+)
+AC_SUBST(DLL_CMT)
+AC_SUBST_FILE(MAKEFILE_DLL)
+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
+ echo "Disabling ELF shared libraries"
+else
+ 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
+ echo "Enabling ELF shared libraries"
+fi
+,
+MAKEFILE_ELF=/dev/null
+ELF_CMT=#
+echo "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
+ echo "Disabling BSD shared libraries"
+else
+ BSDLIB_CMT=
+ MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
+ LIB_EXT=.so
+ echo "Enabling BSD shared libraries"
+fi
+,
+MAKEFILE_BSDLIB=/dev/null
+BSDLIB_CMT=#
+echo "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
+ echo "Disabling profiling libraries"
+else
+ PROFILE_CMT=
+ MAKEFILE_PROFILE=$srcdir/lib/Makefile.profile
+ PROFILED_LIB_EXT=_p.a
+ echo "Building profiling libraries"
+fi
+,
+PROFILE_CMT=#
+MAKEFILE_PROFILE=/dev/null
+echo "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
+ echo "Disabling checker libraries"
+else
+ CHECKER_CMT=
+ MAKEFILE_CHECKER=$srcdir/lib/Makefile.checker
+ echo "Building checker libraries"
+fi
+,
+CHECKER_CMT=#
+MAKEFILE_CHECKER=/dev/null
+echo "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)
+dnl
+dnl handle --enable-jfs-debug
+dnl
+AC_ARG_ENABLE([jfs-debug],
+[ --enable-jfs-debug enable journal debugging],
+if test "$enableval" = "no"
+then
+ echo "Disabling journal debugging"
+else
+ AC_DEFINE(CONFIG_JBD_DEBUG)
+ echo "Enabling journal debugging"
+fi
+,
+echo "Disabling journal debugging by default"
+)
+dnl
+dnl handle --enable-swapfs
+dnl
+AC_ARG_ENABLE([swapfs],
+[ --disable-swapfs disable support of legacy byte-swapped filesystems],
+if test "$enableval" = "no"
+then
+ echo "Disabling swapfs support"
+else
+ AC_DEFINE(ENABLE_SWAPFS)
+ echo "Enabling swapfs support"
+fi
+,
+echo "Enabling swapfs support by default"
+AC_DEFINE(ENABLE_SWAPFS)
+)
+dnl
+dnl handle --enable-debugfs
+dnl
+AC_ARG_ENABLE([debugfs],
+[ --disable-debugfs disable support of debugfs program],
+if test "$enableval" = "no"
+then
+ echo "Disabling debugfs support"
+ DEBUGFS_CMT="#"
+else
+ DEBUGFS_CMT=
+ echo "Enabling debugfs support"
+fi
+,
+echo "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
+ echo "Disabling e2image support"
+ IMAGER_CMT="#"
+else
+ IMAGER_CMT=
+ echo "Enabling e2image support"
+fi
+,
+echo "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
+ echo "Disabling e2resize support"
+ RESIZER_CMT="#"
+else
+ RESIZER_CMT=
+ echo "Enabling e2resize support"
+fi
+,
+echo "Enabling e2resize support by default"
+RESIZER_CMT=
+)
+AC_SUBST(RESIZER_CMT)
+dnl
+dnl handle --enable-dynamic-e2fsck
+dnl
+AC_ARG_ENABLE([dynamic-e2fsck],
+[ --enable-dynamic-e2fsck build e2fsck dynamically],
+if test "$enableval" = "no"
+then
+ E2FSCK_TYPE=static
+ echo "Building e2fsck statically"
+else
+ E2FSCK_TYPE=shared
+ echo "Building e2fsck dynamically"
+fi
+,
+E2FSCK_TYPE=static
+echo "Building e2fsck statically by default"
+)
+AC_SUBST(E2FSCK_TYPE)
+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=''
+ echo "Not building fsck wrapper"
+else
+ FSCK_PROG=fsck FSCK_MAN=fsck.8
+ echo "Building fsck wrapper"
+fi]
+,
+[case "$host_os" in
+ gnu*)
+ FSCK_PROG='' FSCK_MAN=''
+ echo "Not building fsck wrapper by default"
+ ;;
+ *)
+ FSCK_PROG=fsck FSCK_MAN=fsck.8
+ echo "Building fsck wrapper by default"
+esac]
+)
+AC_SUBST(FSCK_PROG)
+AC_SUBST(FSCK_MAN)
+dnl
+dnl
+MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
+AC_SUBST_FILE(MAKEFILE_LIBRARY)
+dnl
+dnl
+AC_ARG_ENABLE([old-bitops],
+[ --enable-old-bitops Use old (non-standard but native) bitmask operations],
+if test "$enableval" = "no"
+then
+ echo "Using new (standard) bitmask operations"
+else
+ AC_DEFINE(EXT2_OLD_BITOPS)
+ echo "Using old (native) bitmask operations"
+
+fi
+,
+echo "Using standard bitmask operations by default"
+)
+dnl
+dnl Add internationalization support, using gettext.
+dnl
+PACKAGE=e2fsprogs
+VERSION="$E2FSPROGS_VERSION"
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
+AC_SUBST(PACKAGE)
+AC_SUBST(VERSION)
+
+ALL_LINGUAS="it nyc tr"
+AM_GNU_GETTEXT
+dnl
+dnl End of configuration options
+dnl
+AC_SUBST(BINARY_TYPE)
+AC_PROG_MAKE_SET
+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_PATH_PROG(AWK, awk, awk)
+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_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(stdlib.h unistd.h stdarg.h errno.h malloc.h mntent.h paths.h dirent.h getopt.h setjmp.h signal.h termios.h linux/fd.h linux/major.h sys/disklabel.h sys/ioctl.h sys/mkdev.h sys/mount.h sys/sockio.h sys/sysmacros.h sys/time.h sys/stat.h sys/types.h net/if.h netinet/in.h)
+AC_FUNC_VPRINTF
+dnl
+dnl See if struct dirent has a d_namlen field (like bsd systems), implying
+dnl that the actual length of the structure may be grater than the declared
+dnl length.
+dnl
+AC_MSG_CHECKING(whether struct dirent has a d_namlen field)
+AC_CACHE_VAL(e2fsprogs_cv_struct_d_namlen,
+ AC_TRY_COMPILE(
+[#include <sys/types.h>
+#include <dirent.h>],
+ [struct dirent de; de.d_namlen = 0;],
+ [e2fsprogs_cv_struct_d_namlen=yes],
+ [e2fsprogs_cv_struct_d_namlen=no]))
+AC_MSG_RESULT($e2fsprogs_cv_struct_d_namlen)
+if test "$e2fsprogs_cv_struct_d_namlen" = yes; then
+ AC_DEFINE(HAVE_DIRENT_NAMLEN)
+fi
+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
+dnl Warning! Use of --enable-gcc-wall may throw off this test.
+dnl
+dnl
+AC_MSG_CHECKING(whether llseek declared in unistd.h)
+AC_CACHE_VAL(e2fsprogs_cv_have_llseek_prototype,
+ AC_TRY_COMPILE(
+[#include <unistd.h>], [extern int llseek(int);],
+ [e2fsprogs_cv_have_llseek_prototype=no],
+ [e2fsprogs_cv_have_llseek_prototype=yes]))
+AC_MSG_RESULT($e2fsprogs_cv_have_llseek_prototype)
+if test "$e2fsprogs_cv_have_llseek_prototype" = yes; then
+ AC_DEFINE(HAVE_LLSEEK_PROTOTYPE)
+fi
+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_MSG_CHECKING(whether lseek64 declared in unistd.h)
+AC_CACHE_VAL(e2fsprogs_cv_have_lseek64_prototype,
+ AC_TRY_COMPILE(
+[#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#include <unistd.h>], [extern int lseek64(int);],
+ [e2fsprogs_cv_have_lseek64_prototype=no],
+ [e2fsprogs_cv_have_lseek64_prototype=yes]))
+AC_MSG_RESULT($e2fsprogs_cv_have_lseek64_prototype)
+if test "$e2fsprogs_cv_have_lseek64_prototype" = yes; then
+ AC_DEFINE(HAVE_LSEEK64_PROTOTYPE)
+fi
+dnl
+dnl Word sizes...
+dnl
+if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then
+ # if cross-compiling, with no cached values, just assume something common.
+ ac_cv_sizeof_short=2
+ ac_cv_sizeof_int=4
+ ac_cv_sizeof_long=4
+ ac_cv_sizeof_long_long=8
+ AC_MSG_WARN([Cross-compiling, so cannot check type sizes; assuming short=2, int=4, long=4, long long=8])
+fi
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(long long)
+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
+AC_SUBST(SIZEOF_SHORT)
+AC_SUBST(SIZEOF_INT)
+AC_SUBST(SIZEOF_LONG)
+AC_SUBST(SIZEOF_LONG_LONG)
+AC_C_BIGENDIAN
+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)
+ fi
+fi
+AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 getmntinfo strcasecmp srandom fchown mallinfo fdatasync strnlen)
+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)
+fi
+dnl
+dnl We use the EXT2 ioctls only under Linux
+dnl
+case "$host_os" in
+linux*)
+ AC_DEFINE(HAVE_EXT2_IOCTLS)
+ ;;
+esac
+dnl
+dnl Linux and Hurd places root files in the / by default
+dnl
+case "$host_os" in
+linux* | gnu*)
+ if test "$prefix" = NONE -a "$root_prefix" = NONE ; then
+ root_prefix="";
+ echo "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*)
+ if test "$prefix" = NONE ; then
+ prefix="/usr";
+ echo "On $host_os systems, prefix defaults to /usr"
+ fi
+;;
+esac
+if test "$root_prefix" = NONE ; then
+ if test "$prefix" = NONE ; then
+ root_prefix="$ac_default_prefix"
+ else
+ root_prefix="$prefix"
+ fi
+fi
+AC_SUBST(root_prefix)
+dnl
+dnl See if -static works.
+dnl
+AC_MSG_CHECKING([whether linker accepts -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 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 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
+rmakefile=
+if test -d ${srcdir}/resize ; then
+ rmakefile=resize/Makefile
+fi
+AC_OUTPUT(MCONFIG Makefile util/Makefile util/subst.conf lib/et/Makefile
+ lib/ss/Makefile lib/ext2fs/Makefile lib/e2p/Makefile lib/uuid/Makefile
+ misc/Makefile e2fsck/Makefile debugfs/Makefile tests/Makefile
+ tests/progs/Makefile $rmakefile doc/Makefile
+ intl/Makefile po/Makefile.in)
Added: trunk/yaboot/lib/e2fsprogs-1.27/contrib/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/contrib/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/contrib/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,40 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2001-01-02 <tytso at snap.thunk.org>
+
+ * build-rpm: Shell script contributed by sct
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/contrib/build-rpm
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/contrib/build-rpm 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/contrib/build-rpm 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# 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}
+
+cd ..
+tmpdir=`mktemp -d 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
+
+(cd $tmpdir && tar czfh ${builddir}.tar.gz $builddir)
+
+rpm --define "_sourcedir `pwd`/$tmpdir" -ba $currdir/e2fsprogs.spec || exit $?
+rm -rf $tmpdir
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/contrib/dconf
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/contrib/dconf 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/contrib/dconf 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,118 @@
+#!/bin/sh
+#$Id: s.dconf 1.11 97/04/29 21:24:31-00:00 tytso at mit.edu $
+# 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 at 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
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/contrib/dconf
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/comerrg-dev.info
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/comerrg-dev.info 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/comerrg-dev.info 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,4 @@
+DESCR="The Common Error Description library."
+SECTION_MATCH="Development"
+SECTION_NAME="Development"
+FILE=com_err.info
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/comerrg-dev.menu
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/comerrg-dev.menu 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/comerrg-dev.menu 2006-07-10 20:52:46 UTC (rev 35)
@@ -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"
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/e2fslibsg-dev.info
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/e2fslibsg-dev.info 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/e2fslibsg-dev.info 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,4 @@
+DESCR="Library of routines to manipulate an ext2 filesystem."
+SECTION_MATCH="Development"
+SECTION_NAME="Development"
+FILE=libext2fs.info
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/e2fslibsg-dev.menu
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/e2fslibsg-dev.menu 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/e2fslibsg-dev.menu 2006-07-10 20:52:46 UTC (rev 35)
@@ -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"
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/comerr2g.files
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/comerr2g.files 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/comerr2g.files 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2 @@
+lib/libcom_err.so.?.*
+lib/libcom_err.so.?
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/control
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/control 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/control 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,114 @@
+Source: e2fsprogs
+Section: base
+Priority: required
+Maintainer: Yann Dirson <dirson at 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.
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/e2fslibsg.files
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/e2fslibsg.files 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/e2fslibsg.files 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,3 @@
+lib/*.so.?.*
+lib/*.so.?
+usr/doc/e2fslibsg/*
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/rules
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/rules 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/rules 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/ss2g.files
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/ss2g.files 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/attic/libs/ss2g.files 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2 @@
+lib/libss.so.?.*
+lib/libss.so.?
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/changelog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/changelog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/changelog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,770 @@
+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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at debian.org> Fri, 12 Nov 1999 21:40:27 +0100
+
+e2fsprogs (1.18-1) unstable; urgency=low
+
+ * New upstream (bugfix) release.
+
+ -- Yann Dirson <dirson at 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 at debian.org> Tue, 9 Nov 1999 22:14:53 +0100
+
+e2fsprogs (1.17-1) unstable; urgency=low
+
+ * New upstream (bugfix) release.
+
+ -- Yann Dirson <dirson at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at debian.org> Thu, 24 Apr 1997 14:54:12 -0400
+
+e2fsprogs (1.09-1) frozen; urgency=medium
+
+ * Upstream bug-fix release.
+
+ -- Klee Dienes <klee at 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 at 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 at 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 at cam.ac.uk> Tue, 5 Nov 1996 21:14:54 +0000
+
+ * Oct 18 1996 Michael Meskes <meskes at debian.org>
+ upgraded to latest upstream version, to 1.06 from 1.05
+ * Oct 18 1996 Michael Meskes <meskes at debian.org>
+ upgraded to latest upstream version, to 1.05 from 1.04
+ gzip manpages
+ minor changes to debian.rules
+ * Jun 23 1996 Michael R. Nonweiler <mrn20 at cam.ac.uk>
+ 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.
+
+ * Mar 5 1996 Michael R. Nonweiler <mrn20 at cam.ac.uk>
+ 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
+
+ * Nov 20 1995 Andrew D. Fernandes <adfernan at cnd.mcgill.ca>
+ removed debugging symbols from libs and enabled more
+ optimization as suggested by Rolf Rossius
+ also removed the /var/catman pages
+
+ * Nov 19 1995 Andrew D. Fernandes <adfernan at cnd.mcgill.ca>
+ changed to elf compilation
+
+ * Oct 7 1995 Andrew D. Fernandes <adfernan at cnd.mcgill.ca>
+ 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
+
+ * Aug 3 1995 Bruce Perens <Bruce at Pixar.com>
+ 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.doc-base
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.doc-base 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.doc-base 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,12 @@
+Document: com_err
+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: Apps/Programming
+
+Format: HTML
+Index: /usr/share/doc/comerr-dev/html-info/com_err_toc.html
+Files: /usr/share/doc/comerr-dev/html-info/*.html
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.examples
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.examples 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.examples 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2 @@
+lib/ss/ss_err.et
+debian/BUILD-STD/lib/ext2fs/ext2_err.et
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.files
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.files 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.files 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+usr/lib/libcom_err.a
+usr/lib/libcom_err.so
+usr/include/et/*
+usr/share/man/man1/compile_et*
+usr/share/man/man3/com_err.3*
+usr/bin/compile_et
+usr/share/et/*
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.postinst
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.postinst 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/comerr-dev.postinst 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,6 @@
+#!/bin/sh -e
+
+# install-info --description='The Common Error Description library.' \
+# --section "Devel.*" "Development" --quiet /usr/info/com_err.info
+
+#DEBHELPER#
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/control
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/control 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/control 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,120 @@
+Source: e2fsprogs
+Section: base
+Priority: required
+Maintainer: Yann Dirson <dirson at debian.org>
+Build-Depends: texi2html, texinfo, debhelper (>= 3)
+Standards-Version: 3.5.4
+
+Package: e2fsck-static
+Section: admin
+Priority: optional
+Depends: e2fsprogs (= ${Source-Version})
+Recommends: sash | zsh-static | busybox-static | zsh30-static
+Architecture: any
+Description: A statically-linked version of the ext2 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.
+
+Package: comerr-dev
+Section: devel
+Priority: extra
+Depends: ${libcdev:Depends}, libcomerr2
+Suggests: doc-base
+Conflicts: e2fsprogs (<< 1.10-6)
+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: ss-dev
+Section: devel
+Priority: extra
+Depends: ${libcdev:Depends}, libss2
+Conflicts: e2fsprogs (<< 1.10-6)
+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.
+
+Package: uuid-dev
+Section: devel
+Priority: extra
+Depends: ${libcdev:Depends}, e2fsprogs (= ${Source-Version})
+Conflicts: e2fsprogs (<< 1.10-6)
+Replaces: e2fslibs-dev (<< 1.15)
+Architecture: any
+Description: Universally unique id library - headers and static libraries.
+ 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.
+
+Package: e2fsprogs-bf
+Section: devel
+Priority: extra
+Depends: ${shlibs:Depends}
+Conflicts: e2fsprogs
+Architecture: any
+Description: A stripped-down versions of e2fsprogs, for boot-floppies
+ This package is an e2fsprogs package built for a reduced size, so that
+ it can help to save space on installation boot-floppies.
+ .
+ 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: e2fsprogs
+Essential: yes
+Pre-Depends: ${shlibs:Depends}
+Suggests: gpart, parted, e2fsck-static
+Conflicts: e2fslibsg, dump (<< 0.4b4-4), quota (<< 1.55-8.1)
+Provides: libcomerr2, libss2, libext2fs2, libe2p2, libuuid1
+Architecture: any
+Description: The EXT2 file system utilities and libraries.
+ 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.
+
+Package: e2fslibs-dev
+Section: devel
+Priority: extra
+Depends: ${libcdev:Depends}, comerr-dev, e2fsprogs (= ${Source-Version})
+Suggests: doc-base
+Provides: ext2fs-dev, e2p-dev
+Conflicts: e2fsprogs (<< 1.10-6)
+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 the e2p lib used by
+ the e2fsprogs, but which is not yet packaged all by itself
+ because it lacks documentation. It may also lack some support
+ files, by I can't really know until someone uses it...
+ .
+ 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.
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsck-static.files
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsck-static.files 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsck-static.files 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2 @@
+/sbin/e2fsck.static
+/usr/share/man/man8/e2fsck.static*
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsck-static.lintian-overrides
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsck-static.lintian-overrides 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsck-static.lintian-overrides 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+e2fsck-static: statically-linked-binary ./sbin/e2fsck.static
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fslibs-dev.doc-base
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fslibs-dev.doc-base 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fslibs-dev.doc-base 2006-07-10 20:52:46 UTC (rev 35)
@@ -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: Apps/Programming
+
+Format: HTML
+Index: /usr/share/doc/e2fsprogs/html-info/libext2fs_toc.html
+Files: /usr/share/doc/e2fsprogs/html-info/*.html
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fslibs-dev.files
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fslibs-dev.files 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fslibs-dev.files 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,5 @@
+usr/lib/*.so
+usr/lib/*.a
+usr/include/ext2fs
+usr/include/e2p
+usr/share/info/libext2fs.info*
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fslibs-dev.postinst
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fslibs-dev.postinst 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fslibs-dev.postinst 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,6 @@
+#!/bin/sh -e
+
+# install-info --description='The ext2fs library.' \
+# --section "Devel.*" "Development" --quiet /usr/info/libext2fs.info
+
+#DEBHELPER#
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs-bf.lintian-overrides
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs-bf.lintian-overrides 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs-bf.lintian-overrides 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,3 @@
+e2fsprogs-bf: binary-without-manpage
+e2fsprogs-bf: no-shlibs-control-file
+e2fsprogs-bf: postinst-must-call-ldconfig
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.README.Debian
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.README.Debian 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.README.Debian 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,88 @@
+e2fsprogs for Debian
+====================
+
+e2fsprogs includes the uuidgen(1) program, although it is not directly
+to e2fsprogs - it would belong to the libuuid package, but the uuid
+shared lib is currently part of the e2fsprogs package. See below for
+more details.
+
+
+Here's the documentation for the Conflicts/Provides fields:
+
+* old dump and quota packages used to depend on old (libc5) e2fsprogs
+itself, as it contained the shared libs. We must conflict with these
+incompatible versions.
+
+
+* All -g package names were a transient experiment during hamm
+development.
+
+
+* Here's the reasonning for not moving the libs outside of the
+e2fsprogs package (this may be partly obsolete):
+
+If we have:
+
+e2fsprogs_1.10-2 is essential
+
+e2fsprogs_1.10-11 is essential
+ predepends on comerr2g
+
+comerr2g_2.0-1.10-11:
+ is not essential
+ conflicts with e2fsprogs_1.10-2
+
+...then e2fsprogs_1.10-11 can't be installed before comerr2g because
+of the predependency, and comerr2g cannot be installed before
+e2fsprogs_1.10-11 because of the conflict.
+
+This totally comes from the fact that e2fsprogs was initially built as
+an *essential package with shared libs*.
+
+My initial solution, namely changing the predependency into a simple
+dependency, turns out to be a system-integrity problem:
+
+$ dpkg -i e2fsprogs_1.10-11*deb comerr2g_2.0-1.10-11*deb
+
+...will, if comerr2g fails to unpack or configure, let e2fsprogs in an
+unusable state.
+
+
+* This raises the problem that most of these libs are general-purpose
+libs, and will be used by more and more packages. The lib-dependency
+mechanism requires for proper fonctionning that we keep track of these
+libs changing version, as well as infos such as libc5/6 issues.
+
+The standard way to do it is using standalone packages for those libs,
+which is not possible here (see above).
+
+My solution in this case is the use of the following virtual packages:
+
+ libss2, libcomerr2, libe2p2, libuuid1, libext2fs2
+
+These are automatically referenced thanks to the shlibs file. They
+are currently provided by e2fsprogs.
+
+
+* Additionally, we must add to the shlibs file a dep on "e2fsprogs (>=
+<current-version>)", so that programs using new functions from those
+libs will not break (see #139274). Note that this will be superceeded
+by versionned Provides: when they will come in dpkg.
+
+We can see the reality of the problem:
+
+$ diff <(nm -D 1.18/lib/libuuid.so.1 | cut -c10- | grep -v ^U) \
+ <(nm -D 1.27/lib/libuuid.so.1 | cut -c10- | grep -v ^U)
+3a4
+> w __cxa_finalize
+6a8,9
+> T __udivdi3
+> T __umoddi3
+
+
+* e2fsprogs still Provides/Conflicts with e2fslibsg to allow upgrading
+from pre 1.10-13 releases (from unstable hamm). This does not seem to
+be possible for ss2g and comerr2g for some still-to-be-investigated
+reason.
+
+Yann Dirson <dirson at debian.org>
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.TODO
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.TODO 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.TODO 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,13 @@
+e2fsprogs Debian TODO file as of 1.10-13.
+This file may or may not be up to date.
+
+* Report to Ted: inconsistent "et/com_err.h", <et/com_err.h>, <com_err.h>
+ under lib/
+* What about making com_err more self-consistant ("et" / "com_err")
+
+* Suppress as many references as possible to the libcom_err version number in
+ source control files and debian/ subdir.
+
+* Maybe make -dbg packages. Look at how others do it.
+
+* Fix com_err.texinfo.
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.copyright
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.copyright 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.copyright 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,55 @@
+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 at mit.edu> and Remy Card <card at masi.ibp.fr>.
+
+Sources were obtained from http://sourceforge.net/projects/e2fsprogs
+
+Packaging is copyright (c) 1997-2001 Yann Dirson <dirson at debian.org>
+ copyright (c) 2001 Alcove <http://www.alcove.com/>
+ copyright (c) 1997 Klee Dienes
+ copyright (c) 1995-1996 Michael Nonweiler <mrn20 at cam.ac.uk>
+
+Copyright notice:
+
+This package, the EXT2 filesystem utilities, are protected by the GNU
+Public License, with the following exception ---
+
+ If the version string in the file version.h contains the
+ string "pre-", then this package must be distributed in source
+ form only. You can give a copy of the binary for e2fsck to
+ help a friend recover his or her filesystem, as the need
+ arises. However, "pre" indicates that this release is under
+ development, and available for ALPHA testing. So for your
+ protection as much as mine, I'd rather not have it appear in a
+ some distribution --- especially not a CD-ROM distribution!
+
+The most recent officially distributed version can be found on
+tsx-11.mit.edu, in /pub/linux/packages/ext2fs. 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
+for your distribution, please contact me (tytso at mit.edu), and we can
+see if we can't come to an arrangement. The release schedules for
+this package are flexible, if you give me enough lead time.
+
+
+ Theodore Ts'o
+ 26-Mar-97
+
+On Debian GNU systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
+
+The 1.19 RELEASE-NOTES mentions that the UUID library (libuuid) is
+covered by the LGPL. After clarification from upstream author, it
+appears to refer to the so-called "Library General Public License"
+(aka LGPL v2), and not the "Lesser General Public License" (aka LGPL
+v2.1).
+
+On Debian GNU systems, the complete text of the GNU LGPL v2 can be
+found in `/usr/share/common-licenses/LGPL-2'.
+
+
+The ss and com_err libraries, available in separate packages, fall
+under another licence. Please refer to the relevant copyright files
+for these libs.
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.docs
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.docs 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.docs 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2 @@
+README
+RELEASE-NOTES
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.files
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.files 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.files 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,5 @@
+lib
+sbin
+usr/bin
+usr/sbin
+usr/share/man
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.postinst
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.postinst 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.postinst 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+set -e
+
+ldconfig
+
+#DEBHELPER#
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.preinst
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.preinst 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.preinst 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+dpkg --assert-support-predepends 2> /dev/null
+
+case $? in
+ 0) ;; # fine, supported
+ 1) exit 1 ;; # dpkg writes an error message to stdio
+ 2) cat <<EOT
+This package requires features of dpkg unavailable in this version.
+Please upgrade to a more recent version (>=1.1.0) of dpkg.
+EOT
+ exit 1 ;; # dpkg didn't recognise the option
+ *) exit 2 ;;
+esac
+
+#DEBHELPER#
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.shlibs
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.shlibs 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.shlibs 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,5 @@
+libext2fs 2 libext2fs2
+libe2p 2 libe2p2
+libuuid 1 libuuid1
+libcom_err 2 libcomerr2
+libss 2 libss2
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.shlibs.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.shlibs.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/e2fsprogs.shlibs.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,5 @@
+libext2fs 2 libext2fs2, e2fsprogs (>= ${Source-Version})
+libe2p 2 libe2p2
+libuuid 1 libuuid1
+libcom_err 2 libcomerr2
+libss 2 libss2
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/libcomerr2.copyright
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/libcomerr2.copyright 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/libcomerr2.copyright 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 at 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.
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/libss2.copyright
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/libss2.copyright 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/libss2.copyright 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 at 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.
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/rules
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/rules 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/rules 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,316 @@
+#! /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.
+
+# be paranoid
+export LC_ALL=C
+
+export DH_COMPAT=3
+
+DEB_BUILD_ARCH := $(shell dpkg --print-architecture)
+DEB_BUILD_GNU_TYPE := $(shell ./config.guess)
+ifndef DEB_HOST_ARCH
+ DEB_HOST_ARCH := ${DEB_BUILD_ARCH}
+endif
+DEB_HOST_GNU_CPU := $(patsubst hurd-%,%,$(DEB_HOST_ARCH))
+ifeq ($(filter-out hurd-%,${DEB_HOST_ARCH}),)
+ DEB_HOST_GNU_SYSTEM := gnu
+else
+# FIXME: we won't always have only Hurd and Linux
+ DEB_HOST_GNU_SYSTEM := linux
+endif
+DEB_HOST_GNU_TYPE := ${DEB_HOST_GNU_CPU}-${DEB_HOST_GNU_SYSTEM}
+
+
+# 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,
+# 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)
+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)
+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
+bfdir=${debdir}/e2fsprogs-bf
+maindir=${debdir}/e2fsprogs
+stdbuilddir=${debdir}/BUILD-STD
+bfbuilddir=${debdir}/BUILD-BF
+# docdir=${maindir}/usr/share/doc/${package}
+MANDIR=/usr/share/man
+mandir=${tmpdir}${MANDIR}
+
+SUBPACKAGES_DIRS = tmp e2fslibs-dev comerr-dev ss-dev
+
+STAMPSDIR=debian/stampdir
+CFGSTDSTAMP=${STAMPSDIR}/configure-std-stamp
+CFGBFSTAMP=${STAMPSDIR}/configure-bf-stamp
+BUILDSTDSTAMP=${STAMPSDIR}/build-std-stamp
+BUILDBFSTAMP=${STAMPSDIR}/build-bf-stamp
+
+CCOPTS = -O2 -fsigned-char
+LIBC-DEV = libc6-dev
+
+INSTALL = install
+INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+CCOPTS += -g -O1
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+INSTALL_PROGRAM += -s
+endif
+
+ifeq (${DEB_HOST_ARCH},alpha)
+CCOPTS += -DHAVE_NETINET_IN_H
+LIBC-DEV = libc6.1-dev
+else
+CCOPTS += -D__NO_STRING_INLINES
+endif
+
+# Try -Os
+BF_CCOPTS = -Os -fomit-frame-pointer
+
+COMMON_CONF_FLAGS = \
+ --enable-elf-shlibs --enable-dynamic-e2fsck \
+ --enable-nls \
+ --mandir=${MANDIR} --infodir=/usr/share/info
+
+STD_CONF_FLAGS = --with-ccopts="${CCOPTS}" --enable-compression
+
+BF_CONF_FLAGS = --with-ccopts="${CCOPTS} ${BF_CCOPTS}" \
+ --disable-swapfs --disable-imager \
+ --disable-resizer --disable-debugfs
+
+${CFGSTDSTAMP}:
+ dh_testdir
+
+ mkdir -p ${stdbuilddir}
+ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+ cd ${stdbuilddir} && CFLAGS="${CFLAGS}" \
+ ${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS}
+else
+ cd ${stdbuilddir} && CFLAGS="${CFLAGS}" CC="${DEB_HOST_GNU_TYPE}-gcc" \
+ ${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS} \
+ --build=$(DEB_BUILD_GNU_TYPE) $(DEB_HOST_GNU_TYPE)
+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} && CFLAGS="${CFLAGS}" \
+ ${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS}
+else
+ cd ${bfbuilddir} && CFLAGS="${CFLAGS}" CC="${DEB_HOST_GNU_TYPE}-gcc" \
+ ${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS} \
+ --build=$(DEB_BUILD_GNU_TYPE) $(DEB_HOST_GNU_TYPE)
+endif
+ mkdir -p ${STAMPSDIR}
+ touch ${CFGBFSTAMP}
+
+build: build-std build-bf
+
+build-std: ${BUILDSTDSTAMP}
+${BUILDSTDSTAMP}: ${CFGSTDSTAMP}
+ dh_testdir
+ make -C ${stdbuilddir} all
+ ( cd ${stdbuilddir}/doc && \
+ texi2html -split_chapter ${topdir}/doc/libext2fs.texinfo )
+ ( cd ${stdbuilddir}/lib/et && make com_err.info && \
+ texi2html -split_chapter -expandinfo ${topdir}/lib/et/com_err.texinfo )
+ touch ${BUILDSTDSTAMP}
+
+build-bf: ${BUILDBFSTAMP}
+${BUILDBFSTAMP}: ${CFGBFSTAMP}
+ dh_testdir
+ make -C ${bfbuilddir} all
+ touch ${BUILDBFSTAMP}
+
+clean:
+ dh_testdir
+ rm -rf ${STAMPSDIR}
+ -make -C ${stdbuilddir} -i distclean
+ -make -C ${bfbuilddir} -i distclean
+ rm -rf ${stdbuilddir} ${bfbuilddir}
+ rm -f doc/libext2fs_*.html lib/et/com_err_*.html debian/*.substvars
+ dh_clean
+
+install: cleanup install-std install-bf
+
+# 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_clean -k
+
+install-std: DH_OPTIONS=
+install-std: build
+ dh_testdir
+ dh_testroot
+ dh_installdirs
+
+ mkdir -p ${tmpdir}/sbin
+ make -C ${stdbuilddir} install DESTDIR=${tmpdir} \
+ INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
+ # static libs and .h files
+ make -C ${stdbuilddir} install-libs DESTDIR=${tmpdir} LDCONFIG=true
+
+ # statically-linked fsck
+ ${INSTALL_PROGRAM} ${stdbuilddir}/e2fsck/e2fsck.static ${tmpdir}/sbin
+ ln -s e2fsck.8.gz ${mandir}/man8/e2fsck.static.8.gz
+
+ dh_movefiles
+ test -z `find ${tmpdir} -type f`
+
+install-bf: DH_OPTIONS=
+install-bf: build
+ dh_testdir
+ dh_testroot
+ dh_installdirs
+
+ mkdir -p ${bfdir}/sbin
+ make -C ${bfbuilddir} install DESTDIR=${bfdir} \
+ INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
+ rm -rf ${bfdir}/usr/share ${bfdir}/usr/lib
+ cd ${bfdir}/sbin && rm -f e2label
+ cd ${bfdir}/usr/bin && rm -f uuidgen
+
+
+binary-indep:
+ # no arch-independant debs.
+
+binary-arch: DH_OPTIONS= -a
+binary-arch: install
+ dh_testdir
+ dh_testroot
+
+ # remove obsolete maint-scripts provided by 1.26 upstream
+ cd debian && rm -f comerr-dev.postinst e2fslibs-dev.postinst \
+ e2fsprogs.postinst e2fsprogs.shlibs e2fsprogs.shlibs.in
+
+ # lintian overrides
+ for i in $$(cd debian && echo *.lintian-overrides); do \
+ pkg=$${i%.lintian-overrides} ;\
+ install -m644 -D -p debian/$$i ${debdir}/$${pkg}/usr/share/lintian/overrides/$${pkg} ;\
+ done
+
+ # symlinks to prepare dh_installdocs run
+ mkdir -p ${debdir}/e2fsck-static/usr/share/doc/
+ ln -sf e2fsprogs ${debdir}/e2fsck-static/usr/share/doc/e2fsck-static
+
+ mkdir -p ${debdir}/e2fslibs-dev/usr/share/doc/e2fsprogs
+ ln -sf e2fsprogs ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev
+
+ mkdir -p ${debdir}/uuid-dev/usr/share/doc/e2fsprogs
+ ln -sf e2fsprogs ${debdir}/uuid-dev/usr/share/doc/uuid-dev
+
+ # comerr and ss have their own copyright notices
+ mkdir -p ${maindir}/usr/share/doc/libcomerr${COMERR_SOVERSION}
+ mkdir -p ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}
+ ln -sf libcomerr${COMERR_SOVERSION} ${debdir}/comerr-dev/usr/share/doc/comerr-dev
+
+ mkdir -p ${maindir}/usr/share/doc/libss${SS_SOVERSION}
+ mkdir -p ${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}
+ ln -sf libss${SS_SOVERSION} ${debdir}/ss-dev/usr/share/doc/ss-dev
+
+ for i in libcomerr${COMERR_SOVERSION} libss${SS_SOVERSION}; do \
+ install -m 644 debian/$$i.copyright \
+ ${maindir}/usr/share/doc/$$i/copyright ; \
+ done
+
+ dh_installdocs
+
+ install -m 644 debian/e2fsprogs.copyright \
+ ${bfdir}/usr/share/doc/e2fsprogs-bf/copyright
+
+ # HTML docs
+ install -d ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev/html-info/
+ install -p ${stdbuilddir}/doc/libext2fs_*.html \
+ ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev/html-info/
+ install -d ${debdir}/comerr-dev/usr/share/doc/comerr-dev/html-info/
+ install -p ${stdbuilddir}/lib/et/com_err_*.html \
+ ${debdir}/comerr-dev/usr/share/doc/comerr-dev/html-info/
+
+ # texinfo docs
+ install -p ${topdir}/doc/libext2fs.texinfo \
+ ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev/libext2fs.texi
+ install -p ${topdir}/lib/et/com_err.texinfo \
+ ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/com_err.texi
+
+ dh_installexamples
+
+ dh_installinfo -pcomerr-dev ${stdbuilddir}/lib/et/com_err.info
+ dh_installinfo -pe2fslibs-dev ${stdbuilddir}/doc/libext2fs.info
+
+ dh_undocumented
+
+ DH_OPTIONS= dh_installchangelogs -pe2fsprogs -pe2fsprogs-bf ChangeLog
+
+ for i in libcomerr${COMERR_SOVERSION} libss${SS_SOVERSION} ; do \
+ mkdir -p ${maindir}/usr/share/doc/$$i ; \
+ ln -s ../e2fsprogs/changelog.Debian.gz ${maindir}/usr/share/doc/$$i/ ; \
+ ln -s ../e2fsprogs/changelog.gz ${maindir}/usr/share/doc/$$i/ ; \
+ done
+
+ dh_strip
+
+ dh_compress
+ dh_fixperms
+
+ echo "libcdev:Depends=${LIBC-DEV}" > debian/comerr-dev.substvars
+ echo "libcdev:Depends=${LIBC-DEV}" > debian/ss-dev.substvars
+ echo "libcdev:Depends=${LIBC-DEV}" > debian/uuid-dev.substvars
+ echo "libcdev:Depends=${LIBC-DEV}" > debian/e2fslibs-dev.substvars
+
+# Call this mostly to get the maintainer-script snippets
+ dh_makeshlibs -pe2fsprogs
+# We overwrite the shlibs by hand because of virtual packages used
+ : > debian/e2fsprogs/DEBIAN/shlibs
+ echo "libext2fs ${EXT2FS_SOVERSION} libext2fs${EXT2FS_SOVERSION}, e2fsprogs (>= ${MAIN_VERSION})" \
+ >> debian/e2fsprogs/DEBIAN/shlibs
+ echo "libe2p ${E2P_SOVERSION} libe2p${E2P_SOVERSION}, e2fsprogs (>= ${MAIN_VERSION})" \
+ >> debian/e2fsprogs/DEBIAN/shlibs
+ echo "libuuid ${UUID_SOVERSION} libuuid${UUID_SOVERSION}, e2fsprogs (>= ${MAIN_VERSION})" \
+ >> debian/e2fsprogs/DEBIAN/shlibs
+ echo "libcom_err ${COMERR_SOVERSION} libcomerr${COMERR_SOVERSION}, e2fsprogs (>= ${MAIN_VERSION})" \
+ >> debian/e2fsprogs/DEBIAN/shlibs
+ echo "libss ${SS_SOVERSION} libss${SS_SOVERSION}, e2fsprogs (>= ${MAIN_VERSION})" \
+ >> debian/e2fsprogs/DEBIAN/shlibs
+
+ dh_installdeb
+ dh_shlibdeps -l${stdbuilddir}/lib
+
+ dh_gencontrol -Ncomerr-dev -Nss-dev -Nuuid-dev
+ DH_OPTIONS= dh_gencontrol -pcomerr-dev \
+ -u '-v${COMERR_VERSION}-${MAIN_VERSION}'
+ DH_OPTIONS= dh_gencontrol -pss-dev \
+ -u '-v${SS_VERSION}-${MAIN_VERSION}'
+ DH_OPTIONS= dh_gencontrol -puuid-dev \
+ -u '-v${UUID_VERSION}-${MAIN_VERSION}'
+
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+
+.PHONY: binary binary-arch binary-indep clean checkroot
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/debian/rules
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/shlibs.local
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/shlibs.local 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/shlibs.local 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,5 @@
+libext2fs 2
+libe2p 2
+libuuid 1
+libcom_err 2
+libss 2
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/ss-dev.examples
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/ss-dev.examples 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/ss-dev.examples 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+debugfs/debug_cmds.ct
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/ss-dev.files
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/ss-dev.files 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/ss-dev.files 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,5 @@
+usr/lib/libss.so
+usr/lib/libss.a
+usr/include/ss/*
+usr/bin/mk_cmds
+usr/share/ss/*
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/ss-dev.undocumented
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/ss-dev.undocumented 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/ss-dev.undocumented 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+mk_cmds.1
Added: trunk/yaboot/lib/e2fsprogs-1.27/debian/uuid-dev.files
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debian/uuid-dev.files 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debian/uuid-dev.files 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,5 @@
+usr/lib/libuuid.so
+usr/lib/libuuid.a
+usr/include/uuid/*
+usr/share/man/man3/libuuid*
+usr/share/man/man3/uuid_*
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,4 @@
+Makefile
+debugfs.8
+debug_cmds.c
+debugfs
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,647 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-03-07 <tytso at snap.thunk.org>
+
+ * ls.c (list_dir_proc): Fix typo in debugfs which was causing a
+ compiler warning.
+
+2002-03-05 Theodore Tso <tytso at mit.edu>
+
+ * lsdel.c (do_lsdel): lsdel uses the pager to print out the list
+ of potentially deleted inode. Thanks to Jaroslav Drzik
+ <jdrzik at host.sk> for suggesting this enhancement.
+
+ * debugfs.c (do_modify_inode): Fix bug which caused modify_inode
+ to core dump if a fliesystem isn't open. Thanks to
+ Jaroslav Drzik <jdrzik at host.sk> for finding and reporting
+ the bug and his proposed fix.
+
+2002-02-26 Theodore Tso <tytso at mit.edu>
+
+ * ls.c (list_dir_proc): When listing the directory entry in long
+ format, include the file type of the directory entry in
+ parenthesis.
+
+2002-02-25 Theodore Tso <tytso at mit.edu>
+
+ * util.c (open_pager): If the PAGER environment is set to __none__
+ then don't use a pager at all, and ship it all to stdout.
+
+ * Makefile.in, debug_cmds.ct, htree.c: Add new file htree.c, which
+ implements the three new commands, htree_dump, dx_hash,
+ and dirsearch.
+
+2002-02-24 Theodore Tso <tytso at mit.edu>
+
+ * Makefile.in (install): Remove any compressed man pages before
+ installing the man pages.
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2002-01-03 Theodore Tso <tytso at mit.edu>
+
+ * lsdel.c (do_lsdel): New optional argument which allows the user
+ to only see the most recently deleted files.
+
+ * debugfs.c (do_undel, do_testb, do_freeb, do_setb, do_ffb): Add
+ new command, undelete, which automates undeleting a
+ deleted inode and linking it back to a directory. Add a
+ count argument to the testb, freeb, setb, and ffb commands.
+
+ * ls.c (list_dir_proc, do_list_dir): Add support for -d option
+ which lists deleted directory entries.
+
+ * debug_cmds.ct: Add new command, undelete.
+
+ * dump.c, icheck.c, logdump.c, ls.c, lsdel.c, setsuper.c,
+ debugfs.c: Use new utility functions which factor out
+ commonly used code.
+
+ * util.c (debugfs_read_inode, debugfs_write_inode,
+ common_block_args_process, common_inode_args_process,
+ common_args_process, strtoblk, parse_ulong): New
+ functions which factor out commonly used code into
+ subroutines for ease of maintenance and to make the
+ executable size smaller.
+
+2001-12-23 Theodore Tso <tytso at mit.edu>
+
+ * Makefile.in, jfs_user.h: Move linux/jbd.h to
+ ext2fs/kernel-jbd.h, to avoid using the system header
+ file version of hbd.h when using diet glibc (since it
+ forcibly adds /usr/include to the beginning of the
+ include search path.)
+
+2001-12-22 Theodore Tso <tytso at mit.edu>
+
+ * debugfs.c (kill_file_by_inode, release_blocks_proc): Update the
+ group descriptor free block and inode counts when deleting
+ or killing a file.
+
+2001-12-16 Theodore Tso <tytso at mit.edu>
+
+ * setsuper.c (print_possible_fields),
+ logdump.c (dump_journal): Fix gcc -Wall nits
+
+ * Makefile.in, jfs_user.h: linux/jfs.h has been renamed to
+ linux/jbd.h
+
+2001-12-02 Theodore Tso <tytso at mit.edu>
+
+ * util.c (close_pager): Use pclose() instead of fclose() when
+ closing the pager stream.
+
+2001-11-30 Theodore Tso <tytso at mit.edu>
+
+ * debugfs.c (finish_range, dump_blocks): Fixed bug in Andreas's >
+ 2GB support changes: you need to use %lld when printf'ing
+ an long long variable.
+
+2001-11-24 Theodore Tso <tytso at mit.edu>
+
+ * debugfs.8.in: Update manual page to document the set_super_value
+ and logdump commands, and move the "specifying files"
+ section closer to the beginning of the man page so people
+ won't miss it.
+
+ * setsuper.c (print_possible_fields): "set_super_value -l" now
+ prints out the list of valid superblock fields which the
+ ssv command can set.
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-27 Theodore Tso <tytso at valinux.com>
+
+ * debugfs.c (main): Remove EXT2FS_VERSION from the version
+ display, since it only confuses people.
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-08-12 Theodore Tso <tytso at valinux.com>
+
+ * logdump.c (do_logdump, dump_journal): Add support for dumping
+ external journals.
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-06-13 Theodore Tso <tytso at valinux.com>
+
+ * setsuper.c: Add s_lastcheck field to the fields which can be
+ modified using set_super_value. (Suggested by Andreas
+ Dilger)
+
+2001-06-03 Theodore Tso <tytso at valinux.com>
+
+ * debugfs.c (copy_file): Fixed signed vs unsigned bug which causes
+ read errors to not be noticed.
+
+2001-06-01 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in: Move include/asm/types.h.in to
+ lib/ext2fs/ext2_types.h.in.
+
+ * debugfs.c, debugfs.h, logdump.c: Fix various gcc -Wall nitpicks.
+
+ * logdump.c (read_journal_block): Replace pread with lseek/read
+ combination.
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2001-05-14 Theodore Tso <tytso at valinux.com>
+
+ * debugfs.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
+
+2001-05-12 Theodore Tso <tytso at valinux.com>
+
+ * debugfs.c (print_features): Use fputs instead of printf to
+ output using the passed-in FILE *.
+
+2001-05-09 Theodore Tso <tytso at valinux.com>
+
+ * debugfs.c (do_write, do_mknod): Set the file type information
+ when creating the inode.
+
+2001-05-03 Theodore Tso <tytso at valinux.com>
+
+ * debugfs.c (do_open_filesys, main): Add -i option which will
+ allow debugfs to examine ext2 image files.
+
+2001-03-29 Theodore Tso <tytso at valinux.com>
+
+ * debugfs.c (dump_blocks, dump_inode, internal_dump_inode): Add
+ internal_dump_inode() interface for the logdump command.
+
+ * logdump.c: Imported code from Stephen Tweedie to dump the ext3
+ journal.
+
+2001-03-18 Theodore Tso <tytso at valinux.com>
+
+ * debugfs.c (do_write, do_mknod): Remove extra (useless) call to
+ ext2fs_write_inode.
+
+2001-01-12 Theodore Ts'o <tytso at valinux.com>
+
+ * setsuper.c: Cleaned up some random whitespace problems.
+
+ * debugfs.h, debugfs.c (do_show_super_stats): Use full words
+ instead of pluralism hack to make I18N conversion easier.
+ Clean up gcc -Wall complaints.
+
+2001-01-11 <tytso at snap.thunk.org>
+
+ * debugfs.c, debugfs.h, dump.c, icheck.c, ls.c, lsdel.c, ncheck.c,
+ setsuper.c, util.c: Change ino_t to ext2_ino_t. Fix a few
+ minor gcc-wall complaints while we're at it.
+
+2001-01-01 <tytso at snap.thunk.org>
+
+ * debugfs.c Replace use of struct ext2fs_sb with struct
+ ext2_super_block.
+
+2000-12-30 <tytso at snap.thunk.org>
+
+ * dump.c (fix_perms): Fix bug for systems which don't have fchown;
+ was incorrectly using chmod instead of chown.
+
+ * setsuper.c (find_field): Strip the s_prefix if given for ssv
+ fields. Remove hard-coded s_ from inode_size
+ field. (Suggested by Andreas Dilger)
+
+ * debugfs.c (do_modify_inode): Add the ability to set the inode
+ generation number. (Suggested by Andreas Dilger)
+
+2000-08-23 <tytso at valinux.com>
+
+ * util.c (string_to_inode): Use strtoul instead of atoi, so that
+ hex inode numbers will be accepted.
+
+2000-08-19 <tytso at valinux.com>
+
+ * util.c (open_pager): Set SIGPIPE to be ignored, so that quitting
+ out of the pager doesn't blow away debugfs.
+
+2000-08-14 <tytso at valinux.com>
+
+ * debugfs.c (do_show_super_stats): Use list_super2() instead of
+ using explicit printf statements. (We get a more complete
+ printout this way.)
+
+ * util.c (open_pager): If the PAGER environment variable is not
+ set, default to using "more".
+
+ * setsuper.c: New function which implements the set_super_value
+ command. Allows the user to set arbitrary superblock
+ fields.
+
+ * debugfs.c (dump_inode): Cap the length when printing a fast
+ symbolic link to inode.i_size.
+ (list_blocks_proc): Print block ranges (4510-4533) to make
+ the stat output easier to read.
+
+2000-06-27 Andreas Dilger <adilger at turbolabs.com>
+
+ * debugfs.c (list_blocks_proc): show relative inode block numbers
+ and/or indirect block status
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+2000-07-05 Theodore Ts'o <tytso at valinux.com>
+
+ * debugfs.c (dump_inode): Make the generation field be printed as
+ an unsigned integer.
+
+2000-07-04 <tytso at snap.thunk.org>
+
+ * Makefile.in: Use _SS_DIR_OVERRIDE to make sure we get the
+ mk_cmds support files from the source tree.
+
+2000-06-09 <tytso at snap.thunk.org>
+
+ * lsdel.c (do_lsdel): Handle bad bad blocks in inode table.
+
+2000-05-27 Theodore Ts'o <tytso at valinux.com>
+
+ * debugfs.c (do_testb, do_testi): Call check_fs_bitmaps to avoid
+ coredumping if the bitmaps aren't loaded.
+
+ * util.c (check_fs_bitmaps): New function which checks whether or
+ not the bitmaps are loaded.
+
+2000-05-23 Aaron Crane <aaronc at pobox.com>
+
+ * debugfs.8.in: Documented new behaviour.
+
+ * ls.c (ls_l_file): Fix Y2K bug -- was printing 22-May-100 for
+ recent files. Switched to 4-digit years.
+
+ * dump.c, debug_cmds.ct (do_rdump): Add new debugfs command
+ "rdump", which recursively dumps a directory and its
+ contents.
+ (fix_perms): New function. Break permission-fixing
+ code out of dump_file() so it can be called by rdump
+ code as well.
+ (dump_file): Call fix_perms().
+
+ * debugfs.c, debug_cmds.ct (do_lcd): Add new debugfs command
+ "lcd", which changes the cwd on the native filesystem.
+
+ * debugfs.c (open_filesystem): Extra args for superblock,
+ blocksize, and catastrophic mode. Changed callers.
+ (do_open_filesys, main): Accept new -b, -s, -c options
+ for open_filesystem.
+
+2000-02-02 Theodore Ts'o <tytso at valinux.com>
+
+ * debugfs.c (dump_inode): Remove #ifdef for i_version
+ vs. i_generation since we know it will always be
+ i_generation now.
+
+2000-01-18 Theodore Ts'o <tytso at valinux.com>
+
+ * debugfs.c (main): Use return instead of exit at the end of main
+ to avoid some compiler warnings.
+
+ * Makefile.in: Since LIBUUID can sometimes include
+ "-lsocket" we need a separate DEPLIBUUID that can be used
+ in Makefile's dependency rules.
+
+1999-11-19 <tytso at valinux.com>
+
+ * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
+ the source directory.
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-11-08 <tytso at valinux.com>
+
+ * icheck.c (do_icheck):
+ * ncheck.c (do_ncheck): If ext2fs_open_inode_scan() returns
+ EXT2_ET_BAD_BLOCK_IN_INODE_TABLE loop to skip over the bad
+ blocks in the inode table.
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-26 <tytso at valinux.com>
+
+ * debugfs.h: Add declaration for do_features()
+
+ * debugfs.c: Add #incldue of e2p.h to fix gcc warnings.
+
+1999-10-25 <tytso at valinux.com>
+
+ * debugfs.c (do_dirty_filesys): Make the "dirty" command clear the
+ valid bit on the superblock. (And with a -clean option to
+ set the valid bit.) Originally it was used just to set
+ the "needs to be written" bit in the in-core version of
+ the fs structure.
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-09-07 <tytso at rsts-11.mit.edu>
+
+ * debugfs.c, debug_cmds.ct: Add new debugfs command "feature"
+ which allows the user to set or clear filesystme features.
+ Add the -f (force) option to the open command. Add the
+ -h (superblock header only) option to the stats command.
+
+1999-07-30 <tytso at rsts-11.mit.edu>
+
+ * debugfs.c (dump_inode): Fix debugfs message so it is the same
+ for when compiled under either Linux 2.2 or 2.3. This
+ allows for the f_swapfs regression test suite to work
+ regardless of which OS e2fsprogs was compiled on.
+
+1999-07-18 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.15
+
+1999-06-23 <tytso at valinux.com>
+
+ * debugfs.c (dump_inode): Add compatibility for Linux 2.3 kernels
+ that use i_generation instead of i_version. Patch
+ supplied by Jon Bright <sircus at sircus.demon.co.uk>.
+
+1999-02-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * icheck.c (do_icheck): Check to make sure the inode has valid
+ blocks before iterating over that inode's blocks.
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-12-03 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Updated dependencies.
+
+1998-07-31 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * debugfs.c (do_stat, do_clri): Fix bug where debugfs wasn't
+ displaying the error message if ext2fs_read_inode() failed.
+ (do_rm): Fix similar problem for call to ext2fs_namei().
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+1998-06-27 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * debugfs.c: Add a -V option which displays the current version.
+
+1998-03-31 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Change to use new installation directory variables
+ convention. Fix installdirs and uninstall rules to reflect
+ the fact that debugfs has been installed in the root
+ filesystem. Fix uninstall rules to take $(DESTDIR) into
+ account.
+
+1998-03-29 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * debugfs.h: Add declaration for do_dirty_filsys() to prevent
+ -Wall warnings.
+
+ * debugfs.c (copy_file):
+ * dump.c (dump_file): Fix -Wall warning caused by
+ signed/unsigned mismatch.
+
+1998-03-23 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * debugfs.c, ls.c, lsdel.c: Add support for large files. (The
+ high 32 bits share space with the i_dir_acl field.)
+
+Sun Mar 8 22:53:04 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ls.c (list_dir_proc): Mask off high 8 bits from
+ dirent->name_len.
+
+Mon Dec 1 13:21:09 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Install debugfs in /sbin, instead of /usr/sbin.
+
+Sat Oct 25 18:35:30 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * debugfs.c (copy_file), dump.c (dump_file): Change to use the new
+ fileio primitives in libext2.
+
+Fri Oct 24 23:47:43 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * debugfs.c (main, do_open_filesys):
+ * dump.c (do_dump): Make the variable which getopt returns into be
+ an int, so that it won't lose on platforms where char is
+ unsigned.
+
+Tue Oct 14 21:50:24 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * debugfs.c (main): When printing a usage message, have main
+ return 1 (instead of not specifying a return value, bad!)
+
+Mon Sep 15 22:03:36 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * debugfs.c (main): Fix declaration of main so that it returns an int.
+
+Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.11
+
+Thu May 8 23:05:40 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * debugfs.8.in: Fix minor typos and grammer oops found by Bill
+ Hawes (whawes at star.net).
+
+Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * Release of E2fsprogs version 1.10
+
+Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.09
+
+Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.08
+
+Thu Apr 10 14:36:05 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ls.c: New file which implements the ls command. Added the -l
+ option.
+
+Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * Release of E2fsprogs version 1.07
+
+Wed Jan 1 23:53:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * lsdel.c (do_lsdel): Use time_to_string() instead of ctime().
+
+Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.06
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
+Mon Sep 9 23:05:11 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * debugfs.c (unlink_file_by_name): If unlinking a file with a
+ directory path, correctly replace the slash with a NULL.
+ (do_show_debugfs_params): Don't try to print the open mode
+ if there's no filesystem opened (since that will cause a
+ core dump).
+ (main): Fix usage string; the -w and device elements are
+ independently optional.
+
+Tu Sep 3 15:09:39 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * debugfs.c (main): Added -f option to debugfs, which takes a
+ command file of debugfs commands and executes them.
+
+Sat Aug 31 01:18:43 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * debugfs.8.in: Heavily edited and improved manual page.
+
+ * dump.c (dump_file): Improve the write function for writing out
+ the file, so that it is limited to the actual size of the
+ file, instead of outputing the nulls following the EOF.
+ Make sure dump_file does the right thing for files with holes.
+ (do_dump): Add support for the -p option to the dump
+ command, which attempts to preserve the owner and
+ permissions field.
+
+Fri Aug 30 14:56:59 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * debugfs.c (main): Add -R option to debugfs, which allows it to
+ take a single debugfs command on the command line.
+
+Fri Aug 9 09:03:31 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * debugfs.c (do_open_filesys): Set optind to 0 to reset getopt(),
+ to be complete correct.
+ (do_show_super_stats): Print OS type, volume label, last
+ mounted directory, and UUID.
+ (dump_inode): Print the fragment information in a
+ filesystem independent way.
+ (do_modify_inode): Modify the fragement information in a
+ filesystem independent way.
+
+Thu May 16 11:12:30 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.04
+
+Wed May 3 20:41:26 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * debugfs.c (dump_inode): Correctly print the translator on the hurd.
+ (do_modify_inode): Modify the translator block on the hurd.
+
+Wed Mar 27 00:33:40 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.03
+
+Wed Jan 31 11:06:08 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.02
+
+Fri Dec 1 22:42:31 1995 <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (LIBS): Rearrange the order of the libraries to be
+ linked, so that -lext2fs is before -lcom_err.
+
+Thu Oct 26 12:05:06 1995 <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (install): Strip programs when they are installed.
+
+Fri Aug 18 15:09:08 1995 Theodore Y. Ts'o <tytso at dcl>
+
+ * debugfs.c (do_find_free_block): Fix typo in code which checked
+ to see if the usage message should be printed.
+
+Thu Aug 17 22:55:58 1995 <tytso at rsts-11.mit.edu>
+
+ * debugfs.c (do_open_filesys): Change to always set optreset to 1,
+ to make BSD getopt()'s happy. Also set optind to 1, which
+ should make more getopt()'s happy.
+
+Fri Aug 11 08:45:01 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * debugfs.c (do_find_free_block, do_find_free_inode): Fix bug in
+ the usage handling where "ffi ?" or "ffb ?" would
+ dereference a NULL pointer.
+
+Fri Aug 11 14:21:07 1995 Remy Card <card at bbj>
+
+ * debugfs.8: Updated date and version number.
+
+Thu Aug 10 14:28:50 1995 Remy Card <card at bbj>
+
+ * debugfs.8: Fixed a spelling error in Ted's name :-)
+
+Mon Jun 12 19:08:25 1995 Theodore Y. Ts'o (tytso at dcl)
+
+ * debugfs.c, ncheck.c, icheck.c, lsdel.c, dump.c: Include
+ <errno.h> (if it exists)
+
+ * debugfs.c, dump.c, icheck.c, lsdel.c, ncheck.c: Don't include
+ <getopt.h> if it doesn't exist.
+
+Sun Jun 11 15:21:07 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * ncheck.c (do_ncheck): Use LINUX_S_ISDIR instead of S_ISDIR
+
+ * debugfs.c: Implement the mknod and write commands (from Linus).
+
+ Change names of modify_char, modify_short, and modify_long
+ to be modify_u8, modify_u16, and modify_u32, respectively.
+
+Thu Jun 8 12:29:15 1995 Miles Bader <miles at churchy.gnu.ai.mit.edu>
+
+ * debugfs.c (dump_inode): Only print out inode frag fields if
+ HAVE_EXT2_FRAGS is defined (by configure). Don't print out the
+ reserved field at all for now.
+
+ * Makefile.in: Rewritten to conform to GNU coding standards and
+ support separate compilation directories.
+
+Thu Nov 24 17:46:23 1994 Theodore Y. Ts'o (tytso at rt-11)
+
+ * dump.c: Added two new commands, "dump" and "cat", which allow
+ the user to dump the contents of an inode to a file or to
+ stdout, respectively.
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/Makefile.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/Makefile.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/Makefile.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,133 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = debugfs
+INSTALL = @INSTALL@
+
+ at 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 setsuper.o logdump.o htree.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)/setsuper.c ${srcdir}/logdump.c \
+ $(srcdir)/htree.c
+
+LIBS= $(LIBEXT2FS) $(LIBE2P) $(LIBSS) $(LIBCOM_ERR) $(LIBUUID)
+DEPLIBS= $(LIBEXT2FS) $(LIBE2P) $(LIBSS) $(LIBCOM_ERR) $(DEPLIBUUID)
+
+.c.o:
+ $(CC) -c $(ALL_CFLAGS) $< -o $@
+
+all:: $(PROGS) $(MANPAGES)
+
+debugfs: $(DEBUG_OBJS) $(DEPLIBS)
+ $(CC) $(ALL_LDFLAGS) -o debugfs $(DEBUG_OBJS) $(LIBS)
+
+debug_cmds.c debug_cmds.h: debug_cmds.ct
+ $(MK_CMDS) $(srcdir)/debug_cmds.ct
+
+debugfs.8: $(DEP_SUBSTITUTE) $(srcdir)/debugfs.8.in
+ $(SUBSTITUTE) $(srcdir)/debugfs.8.in debugfs.8
+
+installdirs:
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(root_sbindir) \
+ $(DESTDIR)$(man8dir)
+
+install: $(PROGS) $(MANPAGES) installdirs
+ for i in $(PROGS); do \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
+ $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ for i in $(MANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man8dir)/$$i.gz; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$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 debugfs debugfs.8 \#* *.s *.o *.a *~ debug_cmds.c core
+
+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
+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/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/uuid/uuid.h \
+ $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/version.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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.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/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+setsuper.o: $(srcdir)/setsuper.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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.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 $(top_srcdir)/lib/uuid/uuid.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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debug_cmds.ct
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debug_cmds.ct 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debug_cmds.ct 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,140 @@
+#
+# 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_features, "Set/print superblock features",
+ feature, features;
+
+request do_dirty_filesys, "Mark the filesystem as dirty",
+ dirty_filesys, dirty;
+
+request do_init_filesys, "Initalize 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_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_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;
+
+end;
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debugfs.8.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debugfs.8.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debugfs.8.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,405 @@
+.\" -*- 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 file system debugger
+.SH SYNOPSIS
+.B debugfs
+[
+.B \-b
+blocksize
+]
+[
+.B \-s
+superblock
+]
+[
+.B \-f
+cmd_file
+]
+[
+.B \-R
+request
+]
+[
+.B \-V
+]
+[
+[
+.B \-w
+]
+[
+.B \-c
+]
+[
+.B \-i
+]
+[
+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 file system.
+.br
+.I device
+is the special file corresponding to the device containing the ext2
+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.
+.B debugfs
+is a debugging tool. It has rough edges!
+.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,
+rather than the default (1). If you give a
+.I -s
+option, you must also give a
+.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 -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
+.I cat filespec
+Dump the contents of the inode
+.I filespec
+to stdout.
+.TP
+.I cd filespec
+Change the current working directory to
+.IR filespec .
+.TP
+.I chroot filespec
+Change the root directory to be the directory
+.IR filespec .
+.TP
+.I close
+Close the currently open file system.
+.TP
+.I clri file
+Clear the contents of the inode
+.IR file .
+.TP
+.I dump [-p] filspec 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
+.I expand_dir filespec
+Expand the directory
+.IR filespec .
+.TP
+.I 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
+.I find_free_block [count [goal]]
+Find the first
+.I count
+free blocks, starting from
+.I goal
+and allocate it.
+.TP
+.I 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.)
+.TP
+.I 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
+.I freei filespec
+Free the inode specified by
+.IR filespec .
+.TP
+.I help
+Print a list of commands understood by
+.BR debugfs (8).
+.TP
+.I icheck block ...
+Print a listing of the inodes which use the one or more blocks specified
+on the command line.
+.TP
+.I initialize 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
+.I 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
+.I lcd directory
+Change the current working directory of the
+.B debugfs
+process to
+.I directory
+on the native filesystem.
+.TP
+.I ln filespec dest_file
+Create a link named
+.I dest_file
+which is a link to
+.IR filespec .
+Note this does not adjust the inode reference counts.
+.TP
+.I logdump [-ac] [-b<block>] [-i<inode>] [-f<journal_file>] [output_file]
+Dump the contents of the ext3 journal.
+.TP
+.I ls [-l] [-d] filespec
+Print a listing of the files in the directory
+.IR filespec .
+The
+.I \-l
+flag will list files using a more verbose format.
+The
+.I \-d
+flag will list deleted entries in the directory.
+.TP
+.I modify_inode filespec
+Modify the contents of the inode structure in the inode
+.IR filespec .
+.TP
+.I mkdir filespec
+Make a directory.
+.TP
+.I 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
+.I ncheck inode_num ...
+Take the requested list of inode numbers, and print a listing of pathnames
+to those inodes.
+.TP
+.I open [-w] [-f] [-i] [-c] [-b blocksize] [-s superblock] device
+Open a filesystem for editing. The
+.I -w
+flag causes the filesystem to be opened for writing. 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
+.IR -c ", " -b ", " -i ", " and " -s
+options behave the same as those to
+.B debugfs
+itself.
+.TP
+.I pwd
+Print the current working directory.
+.TP
+.I quit
+Quit
+.B debugfs
+.TP
+.I 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
+.I 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
+.I rmdir filespec
+Remove the directory
+.IR filespec .
+This function is currently not implemented.
+.TP
+.I 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
+.I seti filespec
+Mark inode
+.I filespec
+as in use in the inode bitmap.
+.TP
+.I 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
+.TP
+.I 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.
+.TP
+.I stat filespec
+Display the contents of the inode structure of the inode
+.IR filespec .
+.TP
+.I 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
+.I testi filespec
+Test if the inode
+.I filespec
+is marked as allocated in the inode bitmap.
+.TP
+.I unlink pathname
+Remove the link specified by
+.I pathname
+to an inode. Note this does not adjust the inode reference counts.
+.TP
+.I write source_file out_file
+Create a file in the filesystem named
+.IR out_file ,
+and copy the contents of
+.I source_file
+into the destination file.
+.SH AUTHOR
+.B debugfs
+was written by Theodore Ts'o <tytso at mit.edu>.
+.SH SEE ALSO
+.BR dumpe2fs (8),
+.BR e2fsck (8),
+.BR mke2fs (8)
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debugfs.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debugfs.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debugfs.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1489 @@
+/*
+ * 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 at 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_OPTRESET
+extern int optreset; /* defined by BSD, but not others */
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "et/com_err.h"
+#include "ss/ss.h"
+#include "debugfs.h"
+#include "uuid/uuid.h"
+#include "e2p/e2p.h"
+
+#include "../version.h"
+
+extern ss_request_table debug_cmds;
+
+ext2_filsys current_fs = NULL;
+ext2_ino_t root, cwd;
+
+static void open_filesystem(char *device, int open_flags, blk_t superblock,
+ blk_t blocksize, int catastrophic)
+{
+ int retval;
+
+ 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 (catastrophic && (open_flags & EXT2_FLAG_RW)) {
+ com_err(device, 0,
+ "opening read-only because of catastrophic mode");
+ open_flags &= ~EXT2_FLAG_RW;
+ }
+
+ retval = ext2fs_open(device, open_flags, superblock, blocksize,
+ unix_io_manager, ¤t_fs);
+ if (retval) {
+ com_err(device, retval, "while opening filesystem");
+ current_fs = NULL;
+ return;
+ }
+
+ 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;
+ }
+ }
+ 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)
+{
+ const char *usage = "Usage: open [-s superblock] [-b blocksize] [-c] [-w] <device>";
+ int c, err;
+ int catastrophic = 0;
+ blk_t superblock = 0;
+ blk_t blocksize = 0;
+ int open_flags = 0;
+
+ optind = 0;
+#ifdef HAVE_OPTRESET
+ optreset = 1; /* Makes BSD getopt happy */
+#endif
+ while ((c = getopt (argc, argv, "iwfcb:s:")) != EOF) {
+ switch (c) {
+ case 'i':
+ open_flags |= EXT2_FLAG_IMAGE_FILE;
+ break;
+ case 'w':
+ open_flags |= EXT2_FLAG_RW;
+ break;
+ case 'f':
+ open_flags |= EXT2_FLAG_FORCE;
+ break;
+ case 'c':
+ catastrophic = 1;
+ break;
+ case 'b':
+ blocksize = parse_ulong(optarg, argv[0],
+ "block size", &err);
+ if (err)
+ return;
+ break;
+ case 's':
+ superblock = parse_ulong(optarg, argv[0],
+ "superblock number", &err);
+ if (err)
+ return;
+ break;
+ default:
+ com_err(argv[0], 0, usage);
+ return;
+ }
+ }
+ if (optind != argc-1) {
+ com_err(argv[0], 0, usage);
+ return;
+ }
+ if (check_fs_not_open(argv[0]))
+ return;
+ open_filesystem(argv[optind], open_flags,
+ superblock, blocksize, catastrophic);
+}
+
+void do_lcd(int argc, char **argv)
+{
+ if (common_args_process(argc, argv, 2, 2, "lcd",
+ "<native dir>", 0))
+ 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, "");
+ }
+ if (current_fs->flags & EXT2_FLAG_BB_DIRTY) {
+ retval = ext2fs_write_block_bitmap(current_fs);
+ if (retval)
+ com_err("ext2fs_write_block_bitmap", retval, "");
+ }
+ retval = ext2fs_close(current_fs);
+ if (retval)
+ com_err("ext2fs_close", retval, "");
+ current_fs = NULL;
+ return;
+}
+
+void do_close_filesys(int argc, char **argv)
+{
+ if (common_args_process(argc, argv, 1, 1, "close_filesys", "", 0))
+ return;
+ close_filesystem();
+}
+
+void do_init_filesys(int argc, char **argv)
+{
+ struct ext2_super_block param;
+ errcode_t retval;
+ int err;
+
+ if (common_args_process(argc, argv, 3, 3, "initialize",
+ "<device> <blocksize>", CHECK_FS_NOTOPEN))
+ return;
+
+ memset(¶m, 0, sizeof(struct ext2_super_block));
+ param.s_blocks_count = parse_ulong(argv[0], argv[2],
+ "blocks count", &err);
+ if (err)
+ return;
+ retval = ext2fs_initialize(argv[1], 0, ¶m,
+ unix_io_manager, ¤t_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);
+}
+
+void do_show_super_stats(int argc, char *argv[])
+{
+ int i;
+ FILE *out;
+ struct ext2_group_desc *gdp;
+ int c, header_only = 0;
+ const char *usage = "Usage: show_super [-h]";
+
+ optind = 0;
+#ifdef HAVE_OPTRESET
+ optreset = 1; /* Makes BSD getopt happy */
+#endif
+ while ((c = getopt (argc, argv, "h")) != EOF) {
+ switch (c) {
+ case 'h':
+ header_only++;
+ break;
+ default:
+ com_err(argv[0], 0, usage);
+ return;
+ }
+ }
+ if (optind != argc) {
+ com_err(argv[0], 0, usage);
+ return;
+ }
+ if (check_fs_open(argv[0]))
+ return;
+ out = open_pager();
+
+ list_super2(current_fs->super, out);
+
+ if (header_only) {
+ close_pager(out);
+ return;
+ }
+
+ gdp = ¤t_fs->group_desc[0];
+ for (i = 0; i < current_fs->group_desc_count; i++, gdp++)
+ fprintf(out, " Group %2d: block bitmap at %d, "
+ "inode bitmap at %d, "
+ "inode table at %d\n"
+ " %d free %s, "
+ "%d free %s, "
+ "%d used %s\n",
+ i, gdp->bg_block_bitmap,
+ gdp->bg_inode_bitmap, gdp->bg_inode_table,
+ gdp->bg_free_blocks_count,
+ gdp->bg_free_blocks_count != 1 ? "blocks" : "block",
+ gdp->bg_free_inodes_count,
+ gdp->bg_free_inodes_count != 1 ? "inodes" : "inode",
+ gdp->bg_used_dirs_count,
+ gdp->bg_used_dirs_count != 1 ? "directories"
+ : "directory");
+ close_pager(out);
+}
+
+void do_dirty_filesys(int argc, char **argv)
+{
+ 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);
+}
+
+struct list_blocks_struct {
+ FILE *f;
+ e2_blkcnt_t total;
+ blk_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):%d", lb->first_bcnt, lb->first_block);
+ else
+ fprintf(lb->f, "(%lld-%lld):%d-%d", lb->first_bcnt,
+ lb->last_bcnt, lb->first_block, lb->last_block);
+ lb->first_block = 0;
+}
+
+static int list_blocks_proc(ext2_filsys fs, blk_t *blocknr,
+ e2_blkcnt_t blockcnt, blk_t ref_block,
+ int ref_offset, 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):%d", *blocknr);
+ else if (blockcnt == -2)
+ fprintf(lb->f, "(DIND):%d", *blocknr);
+ else if (blockcnt == -3)
+ fprintf(lb->f, "(TIND):%d", *blocknr);
+ return 0;
+}
+
+
+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_iterate2(current_fs, inode, 0, NULL,
+ list_blocks_proc, (void *)&lb);
+ finish_range(&lb);
+ if (lb.total)
+ fprintf(f, "\n%sTOTAL: %lld\n", prefix, lb.total);
+ 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;
+
+ 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 Generation: %u\n",
+ prefix,
+ inode->i_mode & 0777, inode->i_flags, inode->i_generation);
+ fprintf(out, "%sUser: %5d Group: %5d Size: ",
+ prefix, inode->i_uid, inode->i_gid);
+ if (LINUX_S_ISREG(inode->i_mode)) {
+ __u64 i_size = (inode->i_size |
+ ((unsigned long long)inode->i_size_high << 32));
+
+ fprintf(out, "%lld\n", i_size);
+ } else
+ fprintf(out, "%d\n", inode->i_size);
+ if (current_fs->super->s_creator_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: %d Directory ACL: %d\n",
+ prefix,
+ inode->i_file_acl, LINUX_S_ISDIR(inode->i_mode) ? inode->i_dir_acl : 0);
+ fprintf(out, "%sLinks: %d Blockcount: %d\n",
+ prefix, inode->i_links_count, inode->i_blocks);
+ switch (os) {
+ case EXT2_OS_LINUX:
+ frag = inode->osd2.linux2.l_i_frag;
+ fsize = inode->osd2.linux2.l_i_fsize;
+ break;
+ case EXT2_OS_HURD:
+ frag = inode->osd2.hurd2.h_i_frag;
+ fsize = inode->osd2.hurd2.h_i_fsize;
+ break;
+ case EXT2_OS_MASIX:
+ frag = inode->osd2.masix2.m_i_frag;
+ fsize = inode->osd2.masix2.m_i_fsize;
+ break;
+ default:
+ frag = fsize = 0;
+ }
+ fprintf(out, "%sFragment: Address: %d Number: %d Size: %d\n",
+ prefix, inode->i_faddr, frag, fsize);
+ 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 (LINUX_S_ISLNK(inode->i_mode) && inode->i_blocks == 0)
+ fprintf(out, "%sFast_link_dest: %.*s\n", prefix,
+ (int) inode->i_size, (char *)inode->i_block);
+ else if (do_dump_blocks)
+ 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 (common_inode_args_process(argc, argv, &inode, 0))
+ return;
+
+ if (debugfs_read_inode(inode, &inode_buf, argv[0]))
+ return;
+
+ dump_inode(inode,inode_buf);
+ 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, "");
+ return;
+ }
+ root = inode;
+}
+
+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[])
+{
+ ext2_ino_t inode;
+
+ if (common_inode_args_process(argc, argv, &inode,
+ CHECK_FS_RW | CHECK_FS_BITMAPS))
+ return;
+
+ if (!ext2fs_test_inode_bitmap(current_fs->inode_map,inode))
+ com_err(argv[0], 0, "Warning: inode already clear");
+ ext2fs_unmark_inode_bitmap(current_fs->inode_map,inode);
+ ext2fs_mark_ib_dirty(current_fs);
+}
+
+void do_seti(int argc, char *argv[])
+{
+ ext2_ino_t inode;
+
+ if (common_inode_args_process(argc, argv, &inode,
+ CHECK_FS_RW | CHECK_FS_BITMAPS))
+ return;
+
+ if (ext2fs_test_inode_bitmap(current_fs->inode_map,inode))
+ com_err(argv[0], 0, "Warning: inode already set");
+ ext2fs_mark_inode_bitmap(current_fs->inode_map,inode);
+ ext2fs_mark_ib_dirty(current_fs);
+}
+
+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_bitmap(current_fs->inode_map,inode))
+ printf("Inode %u is marked in use\n", inode);
+ else
+ printf("Inode %u is not in use\n", inode);
+}
+
+void do_freeb(int argc, char *argv[])
+{
+ blk_t block;
+ int 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_bitmap(current_fs->block_map,block))
+ com_err(argv[0], 0, "Warning: block %d already clear",
+ block);
+ ext2fs_unmark_block_bitmap(current_fs->block_map,block);
+ block++;
+ }
+ ext2fs_mark_bb_dirty(current_fs);
+}
+
+void do_setb(int argc, char *argv[])
+{
+ blk_t block;
+ int 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_bitmap(current_fs->block_map,block))
+ com_err(argv[0], 0, "Warning: block %d already set",
+ block);
+ ext2fs_mark_block_bitmap(current_fs->block_map,block);
+ block++;
+ }
+ ext2fs_mark_bb_dirty(current_fs);
+}
+
+void do_testb(int argc, char *argv[])
+{
+ blk_t block;
+ int count = 1;
+
+ if (common_block_args_process(argc, argv, &block, &count))
+ return;
+ while (count-- > 0) {
+ if (ext2fs_test_block_bitmap(current_fs->block_map,block))
+ printf("Block %d marked in use\n", block);
+ else
+ printf("Block %d not in use\n", block);
+ block++;
+ }
+}
+
+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);
+ fgets(buf, sizeof(buf), stdin);
+ 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);
+ fgets(buf, sizeof(buf), stdin);
+ 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);
+ fgets(buf, sizeof(buf), stdin);
+ 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";
+
+ 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", decimal_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);
+ modify_u32(argv[0], "Block count", decimal_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 (current_fs->super->s_creator_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_LINUX:
+ frag = &inode.osd2.linux2.l_i_frag;
+ fsize = &inode.osd2.linux2.l_i_fsize;
+ break;
+ case EXT2_OS_HURD:
+ frag = &inode.osd2.hurd2.h_i_frag;
+ fsize = &inode.osd2.hurd2.h_i_fsize;
+ break;
+ case EXT2_OS_MASIX:
+ frag = &inode.osd2.masix2.m_i_frag;
+ fsize = &inode.osd2.masix2.m_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;
+}
+
+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, "");
+ 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);
+ free(pathname);
+ 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);
+ free(pathname);
+ return;
+}
+
+static void make_link(char *sourcename, char *destname)
+{
+ ext2_ino_t inode;
+ int retval;
+ ext2_ino_t dir;
+ char *dest, *cp, *basename;
+
+ /*
+ * Get the source inode
+ */
+ inode = string_to_inode(sourcename);
+ if (!inode)
+ return;
+ basename = strrchr(sourcename, '/');
+ if (basename)
+ basename++;
+ else
+ basename = 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 = basename;
+ 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;
+ }
+ }
+
+ retval = ext2fs_link(current_fs, dir, dest, inode, 0);
+ if (retval)
+ com_err("make_link", retval, "");
+ 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, blk_t *blocknr,
+ int blockcnt, void *private)
+{
+ blk_t block;
+
+ block = *blocknr;
+ ext2fs_block_alloc_stats(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, 3, 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_bitmap(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_iterate(current_fs, ino, 0, NULL,
+ mark_blocks_proc, NULL);
+
+ ext2fs_inode_alloc_stats(current_fs, ino, +1);
+
+ make_link(argv[1], argv[2]);
+}
+
+static void unlink_file_by_name(char *filename)
+{
+ int retval;
+ ext2_ino_t dir;
+ char *basename;
+
+ basename = strrchr(filename, '/');
+ if (basename) {
+ *basename++ = '\0';
+ dir = string_to_inode(filename);
+ if (!dir)
+ return;
+ } else {
+ dir = cwd;
+ basename = filename;
+ }
+ retval = ext2fs_unlink(current_fs, dir, basename, 0, 0);
+ if (retval)
+ com_err("unlink_file_by_name", retval, "");
+ 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]);
+}
+
+void do_find_free_block(int argc, char *argv[])
+{
+ blk_t free_blk, goal;
+ 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_block(current_fs, free_blk + 1, 0,
+ &free_blk);
+ if (retval) {
+ com_err("ext2fs_new_block", retval, "");
+ return;
+ } else
+ printf("%d ", 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, "");
+ else
+ printf("Free inode found: %u\n", free_inode);
+}
+
+static errcode_t copy_file(int fd, ext2_ino_t newfile)
+{
+ ext2_file_t e2_file;
+ errcode_t retval;
+ int got;
+ unsigned int written;
+ char buf[8192];
+ char *ptr;
+
+ retval = ext2fs_file_open(current_fs, newfile,
+ EXT2_FILE_WRITE, &e2_file);
+ if (retval)
+ return retval;
+
+ while (1) {
+ got = read(fd, buf, sizeof(buf));
+ if (got == 0)
+ break;
+ if (got < 0) {
+ retval = errno;
+ goto fail;
+ }
+ ptr = buf;
+ while (got > 0) {
+ retval = ext2fs_file_write(e2_file, ptr,
+ got, &written);
+ if (retval)
+ goto fail;
+
+ got -= written;
+ ptr += written;
+ }
+ }
+ retval = ext2fs_file_close(e2_file);
+ return retval;
+
+fail:
+ (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;
+
+ 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, "");
+ return;
+ }
+ if (fstat(fd, &statbuf) < 0) {
+ com_err(argv[1], errno, "");
+ close(fd);
+ return;
+ }
+
+ retval = ext2fs_new_inode(current_fs, cwd, 010755, 0, &newfile);
+ if (retval) {
+ com_err(argv[0], retval, "");
+ close(fd);
+ return;
+ }
+ printf("Allocated inode: %u\n", newfile);
+ retval = ext2fs_link(current_fs, cwd, argv[2], newfile,
+ EXT2_FT_REG_FILE);
+ if (retval) {
+ com_err(argv[2], retval, "");
+ close(fd);
+ return;
+ }
+ if (ext2fs_test_inode_bitmap(current_fs->inode_map,newfile))
+ com_err(argv[0], 0, "Warning: inode already set");
+ ext2fs_inode_alloc_stats(current_fs, newfile, +1);
+ memset(&inode, 0, sizeof(inode));
+ inode.i_mode = statbuf.st_mode;
+ inode.i_atime = inode.i_ctime = inode.i_mtime = time(NULL);
+ inode.i_links_count = 1;
+ inode.i_size = statbuf.st_size;
+ if (debugfs_write_inode(newfile, &inode, argv[0])) {
+ close(fd);
+ return;
+ }
+ if (LINUX_S_ISREG(inode.i_mode)) {
+ retval = copy_file(fd, newfile);
+ if (retval)
+ com_err("copy_file", retval, "");
+ }
+ close(fd);
+}
+
+void do_mknod(int argc, char *argv[])
+{
+ unsigned long mode, major, minor, nr;
+ ext2_ino_t newfile;
+ errcode_t retval;
+ struct ext2_inode inode;
+ int filetype;
+
+ 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 > 255 || minor > 255 || 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, "");
+ return;
+ }
+ printf("Allocated inode: %u\n", newfile);
+ retval = ext2fs_link(current_fs, cwd, argv[1], newfile, filetype);
+ if (retval) {
+ if (retval == EXT2_ET_DIR_NO_SPACE) {
+ retval = ext2fs_expand_dir(current_fs, cwd);
+ if (!retval)
+ retval = ext2fs_link(current_fs, cwd,
+ argv[1], newfile,
+ filetype);
+ }
+ if (retval) {
+ com_err(argv[1], retval, "");
+ return;
+ }
+ }
+ if (ext2fs_test_inode_bitmap(current_fs->inode_map,newfile))
+ com_err(argv[0], 0, "Warning: inode already set");
+ ext2fs_mark_inode_bitmap(current_fs->inode_map, newfile);
+ ext2fs_mark_ib_dirty(current_fs);
+ memset(&inode, 0, sizeof(inode));
+ inode.i_mode = mode;
+ inode.i_atime = inode.i_ctime = inode.i_mtime = time(NULL);
+ inode.i_block[0] = major*256+minor;
+ inode.i_links_count = 1;
+ if (debugfs_write_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, "");
+ return;
+ }
+ name = cp+1;
+ } else {
+ parent = cwd;
+ name = argv[1];
+ }
+
+
+ retval = ext2fs_mkdir(current_fs, parent, 0, name);
+ if (retval) {
+ com_err("ext2fs_mkdir", retval, "");
+ return;
+ }
+
+}
+
+void do_rmdir(int argc, char *argv[])
+{
+ printf("Unimplemented\n");
+}
+
+
+static int release_blocks_proc(ext2_filsys fs, blk_t *blocknr,
+ int blockcnt, void *private)
+{
+ blk_t block;
+
+ block = *blocknr;
+ ext2fs_block_alloc_stats(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 = time(NULL);
+ if (debugfs_write_inode(inode, &inode_buf, 0))
+ return;
+
+ printf("Kill file by inode %u\n", inode);
+ ext2fs_block_iterate(current_fs, inode, 0, NULL,
+ release_blocks_proc, NULL);
+ printf("\n");
+ ext2fs_inode_alloc_stats(current_fs, inode, -1);
+}
+
+
+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);
+}
+
+void do_show_debugfs_params(int argc, char *argv[])
+{
+ FILE *out = stdout;
+
+ if (current_fs)
+ fprintf(out, "Open mode: read-%s\n",
+ current_fs->flags & EXT2_FLAG_RW ? "write" : "only");
+ fprintf(out, "Filesystem in use: %s\n",
+ current_fs ? current_fs->device_name : "--none--");
+}
+
+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, "");
+ 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],
+ ¤t_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);
+}
+
+static int source_file(const char *cmd_file, int sci_idx)
+{
+ FILE *f;
+ char buf[256];
+ 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);
+ }
+ }
+ 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(sci_idx, buf);
+ if (retval) {
+ ss_perror(sci_idx, retval, buf);
+ exit_status++;
+ }
+ }
+ return exit_status;
+}
+
+int main(int argc, char **argv)
+{
+ int retval;
+ int sci_idx;
+ const char *usage = "Usage: debugfs [-b blocksize] [-s superblock] [-f cmd_file] [-R request] [-V] [[-w] [-c] device]";
+ int c;
+ int open_flags = 0;
+ char *request = 0;
+ int exit_status = 0;
+ char *cmd_file = 0;
+ blk_t superblock = 0;
+ blk_t blocksize = 0;
+ int catastrophic = 0;
+
+ initialize_ext2_error_table();
+ fprintf (stderr, "debugfs %s (%s)\n", E2FSPROGS_VERSION,
+ E2FSPROGS_DATE);
+
+ while ((c = getopt (argc, argv, "iwcR:f:b:s:V")) != EOF) {
+ switch (c) {
+ case 'R':
+ request = optarg;
+ break;
+ case 'f':
+ cmd_file = optarg;
+ break;
+ case 'i':
+ open_flags |= EXT2_FLAG_IMAGE_FILE;
+ break;
+ case 'w':
+ open_flags |= EXT2_FLAG_RW;
+ break;
+ case 'b':
+ blocksize = parse_ulong(argv[0], optarg,
+ "block size", 0);
+ break;
+ case 's':
+ superblock = parse_ulong(argv[0], optarg,
+ "superblock number", 0);
+ 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);
+ return 1;
+ }
+ }
+ if (optind < argc)
+ open_filesystem(argv[optind], open_flags,
+ superblock, blocksize, catastrophic);
+
+ sci_idx = ss_create_invocation("debugfs", "0.0", (char *) NULL,
+ &debug_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);
+ }
+
+ if (current_fs)
+ close_filesystem();
+
+ return exit_status;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debugfs.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debugfs.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/debugfs.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,108 @@
+/*
+ * debugfs.h --- header file for the debugfs program
+ */
+
+#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 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 unsigned long parse_ulong(const char *str, const char *cmd,
+ const char *descr, int *err);
+extern int strtoblk(const char *cmd, const char *str, blk_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[],
+ blk_t *block, int *count);
+extern int debugfs_read_inode(ext2_ino_t ino, struct ext2_inode * inode,
+ const char *cmd);
+extern int debugfs_write_inode(ext2_ino_t ino, struct ext2_inode * inode,
+ const char *cmd);
+
+/* 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);
+
+/* 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_super.c */
+extern void do_set_super(int argc, char **);
+
+/* 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_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[]);
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/dump.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/dump.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/dump.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,365 @@
+/*
+ * 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.
+ */
+
+#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
+#ifdef HAVE_OPTRESET
+extern int optreset; /* defined by BSD, but not others */
+#endif
+
+#include "debugfs.h"
+
+/*
+ * 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[8192];
+ ext2_file_t e2_file;
+ int nbytes;
+ unsigned int got;
+
+ 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;
+ }
+ while (1) {
+ retval = ext2fs_file_read(e2_file, buf, sizeof(buf), &got);
+ if (retval)
+ com_err(cmdname, retval, "while reading ext2 file");
+ if (got == 0)
+ break;
+ nbytes = write(fd, buf, got);
+ if (nbytes != got)
+ com_err(cmdname, errno, "while writing file");
+ }
+ 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);
+ else if (fd != 1)
+ close(fd);
+
+ return;
+}
+
+void do_dump(int argc, char **argv)
+{
+ ext2_ino_t inode;
+ int fd;
+ int c;
+ int preserve = 0;
+ const char *dump_usage = "Usage: dump_inode [-p] <file> <output_file>";
+ char *in_fn, *out_fn;
+
+ optind = 0;
+#ifdef HAVE_OPTRESET
+ optreset = 1; /* Makes BSD getopt happy */
+#endif
+ while ((c = getopt (argc, argv, "p")) != EOF) {
+ switch (c) {
+ case 'p':
+ preserve++;
+ break;
+ default:
+ com_err(argv[0], 0, dump_usage);
+ return;
+ }
+ }
+ if (optind != argc-2) {
+ com_err(argv[0], 0, dump_usage);
+ return;
+ }
+
+ 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, 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);
+
+ 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, S_IRWXU);
+ if (fd == -1) {
+ com_err("rdump", errno, "while dumping %s", fullname);
+ goto errout;
+ }
+ dump_file("rdump", ino, fd, 1, fullname);
+ }
+ 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,
+ int blocksize, char *buf, void *private)
+{
+ char name[EXT2_NAME_LEN];
+ int thislen;
+ const char *dumproot = private;
+ struct ext2_inode inode;
+
+ thislen = ((dirent->name_len & 0xFF) < EXT2_NAME_LEN
+ ? (dirent->name_len & 0xFF) : EXT2_NAME_LEN);
+ 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;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/htree.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/htree.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/htree.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,364 @@
+/*
+ * 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
+#ifdef HAVE_OPTRESET
+extern int optreset; /* defined by BSD, but not others */
+#endif
+
+#include "debugfs.h"
+
+static FILE *pager;
+
+static unsigned dx_hack_hash (const char *name, int len)
+{
+ __u32 hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9;
+ while (len--) {
+ __u32 hash = hash1 + (hash0 ^ (*name++ * 7152373));
+
+ if (hash & 0x80000000) hash -= 0x7fffffff;
+ hash1 = hash0;
+ hash0 = hash;
+ }
+ return hash0;
+}
+
+#define dx_hash(s,n) (dx_hack_hash(s,n) << 1)
+
+static void htree_dump_leaf_node(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ blk_t blk, char *buf)
+{
+ errcode_t errcode;
+ struct ext2_dir_entry *dirent;
+ int thislen, col = 0, offset = 0;
+ char name[EXT2_NAME_LEN];
+ char tmp[EXT2_NAME_LEN + 16];
+ blk_t pblk;
+
+ errcode = ext2fs_bmap(fs, ino, inode, buf, 0, blk, &pblk);
+ if (errcode) {
+ com_err("htree_dump_leaf_node", errcode,
+ "while mapping logical block %d\n", blk);
+ return;
+ }
+
+ errcode = io_channel_read_blk(current_fs->io, pblk, 1, buf);
+ if (errcode) {
+ com_err("htree_dump_leaf_node", errcode,
+ "while reading block %d\n", blk);
+ return;
+ }
+
+ while (offset < fs->blocksize) {
+ dirent = (struct ext2_dir_entry *) (buf + offset);
+ if (((offset + dirent->rec_len) > fs->blocksize) ||
+ (dirent->rec_len < 8) ||
+ ((dirent->rec_len % 4) != 0) ||
+ (((dirent->name_len & 0xFF)+8) > dirent->rec_len)) {
+ fprintf(pager, "Corrupted directory block (%d)!\n", blk);
+ break;
+ }
+ thislen = ((dirent->name_len & 0xFF) < EXT2_NAME_LEN) ?
+ (dirent->name_len & 0xFF) : EXT2_NAME_LEN;
+ strncpy(name, dirent->name, thislen);
+ name[thislen] = '\0';
+ sprintf(tmp, "%u 0x%08x (%d) %s ", dirent->inode,
+ dx_hash(name, thislen), dirent->rec_len, name);
+ thislen = strlen(tmp);
+ if (col + thislen > 80) {
+ fprintf(pager, "\n");
+ col = 0;
+ }
+ fprintf(pager, "%s", tmp);
+ col += thislen;
+ offset += dirent->rec_len;
+ }
+ fprintf(pager, "\n");
+}
+
+
+static void htree_dump_int_block(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ blk_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_entry *ent,
+ char *buf, int level)
+{
+ struct ext2_dx_countlimit *limit;
+ int i;
+
+ limit = (struct ext2_dx_countlimit *) ent;
+
+ 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++)
+ fprintf(pager, "Entry #%d: Hash 0x%08x, block %d\n", i,
+ i ? ent[i].hash : 0, ent[i].block);
+
+ fprintf(pager, "\n");
+
+ for (i=0; i < limit->count; i++) {
+ fprintf(pager, "Entry #%d: Hash 0x%08x, block %d\n", i,
+ i ? ent[i].hash : 0, ent[i].block);
+ if (level)
+ htree_dump_int_block(fs, ino, inode,
+ ent[i].block, buf, level-1);
+ else
+ htree_dump_leaf_node(fs, ino, inode,
+ ent[i].block, buf);
+ }
+
+ fprintf(pager, "---------------------\n");
+}
+
+static void htree_dump_int_block(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ blk_t blk, char *buf, int level)
+{
+ char *cbuf;
+ errcode_t errcode;
+ blk_t pblk;
+
+ cbuf = malloc(fs->blocksize);
+ if (!cbuf) {
+ fprintf(pager, "Couldn't allocate child block.\n");
+ return;
+ }
+
+ errcode = ext2fs_bmap(fs, ino, inode, buf, 0, blk, &pblk);
+ if (errcode) {
+ com_err("htree_dump_int_block", errcode,
+ "while mapping logical block %d\n", blk);
+ return;
+ }
+
+ errcode = io_channel_read_blk(current_fs->io, pblk, 1, buf);
+ if (errcode) {
+ com_err("htree_dump_int_block", errcode,
+ "while reading block %d\n", blk);
+ return;
+ }
+
+ htree_dump_int_node(fs, ino, inode, (struct ext2_dx_entry *) (buf+8),
+ cbuf, level);
+ free(cbuf);
+}
+
+
+
+void do_htree_dump(int argc, char *argv[])
+{
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+ int retval;
+ int i, c;
+ int flags;
+ int long_opt;
+ void *buf = NULL;
+ struct ext2_dx_root_info *root;
+ struct ext2_dx_entry *ent;
+ struct ext2_dx_countlimit *limit;
+ errcode_t errcode;
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ pager = open_pager();
+
+ optind = 0;
+#ifdef HAVE_OPTRESET
+ optreset = 1; /* Makes BSD getopt happy */
+#endif
+ while ((c = getopt (argc, argv, "l")) != EOF) {
+ switch (c) {
+ case 'l':
+ long_opt++;
+ break;
+ }
+ }
+
+ if (argc > optind+1) {
+ com_err(0, 0, "Usage: htree_dump [-l] file");
+ return;
+ }
+
+ if (argc == optind)
+ ino = cwd;
+ else
+ ino = string_to_inode(argv[optind]);
+ if (!ino)
+ return;
+
+ if (debugfs_read_inode(ino, &inode, argv[1]))
+ return;
+
+ if (!LINUX_S_ISDIR(inode.i_mode)) {
+ com_err(argv[0], 0, "Not a directory");
+ return;
+ }
+
+ if ((inode.i_flags & EXT2_BTREE_FL) == 0) {
+ com_err(argv[0], 0, "Not a hash-indexed directory");
+ return;
+ }
+
+ buf = malloc(2*current_fs->blocksize);
+ if (!buf) {
+ com_err(argv[0], 0, "Couldn't allocate htree buffer");
+ return;
+ }
+
+ errcode = io_channel_read_blk(current_fs->io, inode.i_block[0],
+ 1, buf);
+ if (errcode) {
+ com_err(argv[0], errcode, "Error reading root node");
+ goto errout;
+ }
+
+ root = (struct ext2_dx_root_info *) (buf + 24);
+
+ fprintf(pager, "Root node dump:\n");
+ fprintf(pager, "\t Reserved zero: %d\n", root->reserved_zero);
+ fprintf(pager, "\t Hash Version: %d\n", root->hash_version);
+ fprintf(pager, "\t Info length: %d\n", root->info_length);
+ fprintf(pager, "\t Indirect levels: %d\n", root->indirect_levels);
+ fprintf(pager, "\t Flags: %d\n", root->unused_flags);
+
+ ent = (struct ext2_dx_entry *) (buf + 24 + root->info_length);
+ limit = (struct ext2_dx_countlimit *) ent;
+
+ htree_dump_int_node(current_fs, ino, &inode, ent,
+ buf + current_fs->blocksize,
+ root->indirect_levels);
+
+errout:
+ if (buf)
+ free(buf);
+ close_pager(pager);
+}
+
+/*
+ * This function prints the hash of a given file.
+ */
+void do_dx_hash(int argc, char *argv[])
+{
+ if (argc != 2) {
+ com_err(argv[0], 0, "usage: dx_hash filename");
+ return;
+ }
+ printf("Hash of %s is 0x%0x\n", argv[1],
+ dx_hash(argv[1], strlen(argv[1])));
+}
+
+/*
+ * 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, blk_t *blocknr,
+ e2_blkcnt_t blockcnt, blk_t ref_blk,
+ int ref_offset, void *priv_data);
+
+void do_dirsearch(int argc, char *argv[])
+{
+ ext2_ino_t inode;
+ int retval;
+ int c;
+ int flags;
+ 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_iterate2(current_fs, inode, 0, 0, search_dir_block, &pb);
+
+ free(pb.buf);
+}
+
+
+static int search_dir_block(ext2_filsys fs, blk_t *blocknr,
+ e2_blkcnt_t blockcnt, blk_t ref_blk,
+ int ref_offset, void *priv_data)
+{
+ struct process_block_struct *p;
+ struct ext2_dir_entry *dirent;
+ errcode_t errcode;
+ int offset = 0;
+
+ if (blockcnt < 0)
+ return 0;
+
+ p = (struct process_block_struct *) priv_data;
+
+ errcode = io_channel_read_blk(current_fs->io, *blocknr, 1, p->buf);
+ if (errcode) {
+ com_err("search_dir_block", errcode,
+ "while reading block %lu", *blocknr);
+ return BLOCK_ABORT;
+ }
+
+ while (offset < fs->blocksize) {
+ dirent = (struct ext2_dir_entry *) (p->buf + offset);
+
+ 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 %d, offset %d\n", blockcnt,
+ *blocknr, offset);
+ printf("offset %d\n", offset);
+ return BLOCK_ABORT;
+ }
+ offset += dirent->rec_len;
+ }
+ return 0;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/icheck.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/icheck.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/icheck.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,159 @@
+/*
+ * 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 {
+ blk_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,
+ blk_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block,
+ int ref_offset,
+ 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].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))
+ return;
+ }
+
+ 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) {
+ if (!inode.i_links_count)
+ goto next;
+ if (!ext2fs_inode_has_valid_blocks(&inode))
+ goto next;
+ /*
+ * To handle filesystems touched by 0.3c extfs; can be
+ * removed later.
+ */
+ if (inode.i_dtime)
+ goto next;
+
+ bw.inode = ino;
+
+ retval = ext2fs_block_iterate2(current_fs, ino, 0, 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("%u\t<block not found>\n", binfo->blk);
+ continue;
+ }
+ printf("%u\t%u\n", binfo->blk, binfo->ino);
+ }
+
+error_out:
+ free(bw.barray);
+ free(block_buf);
+ if (scan)
+ ext2fs_close_inode_scan(scan);
+ return;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/jfs_user.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/jfs_user.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/jfs_user.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 */
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/logdump.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/logdump.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/logdump.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,667 @@
+/*
+ * logdump.c --- dump the contents of the journal out to a file
+ *
+ * Authro: Stephen C. Tweedie, 2001 <sct at 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
+#ifdef HAVE_OPTRESET
+extern int optreset; /* defined by BSD, but not others */
+#endif
+
+#include "debugfs.h"
+#include "jfs_user.h"
+#include <uuid/uuid.h>
+
+enum journal_location {JOURNAL_IS_INTERNAL, JOURNAL_IS_EXTERNAL};
+
+int dump_all, dump_contents, dump_descriptors;
+unsigned int block_to_dump, group_to_dump, bitmap_to_dump;
+unsigned int inode_block_to_dump, inode_offset_to_dump, bitmap_to_dump;
+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, 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;
+ ext2_ino_t journal_inum;
+ struct ext2_inode journal_inode;
+ ext2_file_t journal_file;
+
+ char *tmp;
+
+ const char *logdump_usage = ("Usage: logdump "
+ "[-ac] [-b<block>] [-i<inode>] "
+ "[-f<journal_file>] [output_file]");
+
+ struct journal_source journal_source;
+
+ optind = 0;
+#ifdef HAVE_OPTRESET
+ optreset = 1; /* Makes BSD getopt happy */
+#endif
+ journal_source.where = 0;
+ journal_source.fd = 0;
+ journal_source.file = 0;
+ dump_all = 0;
+ dump_contents = 0;
+ dump_descriptors = 1;
+ block_to_dump = -1;
+ bitmap_to_dump = -1;
+ inode_block_to_dump = -1;
+ inode_to_dump = -1;
+
+ while ((c = getopt (argc, argv, "ab:ci:f:")) != 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;
+ default:
+ com_err(argv[0], 0, logdump_usage);
+ return;
+ }
+ }
+ if (optind != argc && optind != argc-1) {
+ com_err(argv[0], 0, logdump_usage);
+ return;
+ }
+
+ 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)
+ / current_fs->super->s_inodes_per_group);
+ group_offset = ((inode_to_dump - 1)
+ % current_fs->super->s_inodes_per_group);
+ inodes_per_block = (current_fs->blocksize
+ / sizeof(struct ext2_inode));
+
+ inode_block_to_dump =
+ current_fs->group_desc[inode_group].bg_inode_table +
+ (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 %u, 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 < 0) {
+ com_err(argv[0], errno, "while opening %s for logdump",
+ out_fn);
+ return;
+ }
+ }
+
+ if (block_to_dump != -1 && current_fs != NULL) {
+ group_to_dump = ((block_to_dump -
+ current_fs->super->s_first_data_block)
+ / current_fs->super->s_blocks_per_group);
+ bitmap_to_dump = current_fs->group_desc[group_to_dump].bg_block_bitmap;
+ }
+
+ if (!journal_fn && check_fs_open(argv[0]))
+ return;
+
+ 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);
+ return;
+ }
+
+ journal_source.where = JOURNAL_IS_EXTERNAL;
+ journal_source.fd = journal_fd;
+ } else if ((journal_inum = current_fs->super->s_journal_inum)) {
+ if (debugfs_read_inode(journal_inum, &journal_inode, argv[0]))
+ return;
+
+ retval = ext2fs_file_open(current_fs, journal_inum,
+ 0, &journal_file);
+ if (retval) {
+ com_err(argv[0], retval, "while opening ext2 file");
+ return;
+ }
+ journal_source.where = JOURNAL_IS_INTERNAL;
+ journal_source.file = journal_file;
+ } else if ((journal_fn =
+ ext2fs_find_block_device(current_fs->super->s_journal_dev))) {
+ 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);
+ return;
+ }
+ 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;
+ } else {
+ com_err(argv[0], 0, "filesystem has no journal");
+ return;
+ }
+
+ dump_journal(argv[0], out_file, &journal_source);
+
+ if (journal_source.where == JOURNAL_IS_INTERNAL)
+ ext2fs_file_close(journal_file);
+ else
+ close(journal_fd);
+
+ if (out_file != stdout)
+ fclose(out_file);
+
+ return;
+}
+
+
+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 while reading journal");
+ else if (*got != size) {
+ com_err(cmd, 0, "short read (read %d, expected %d) while 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;
+ 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 ENABLE_SWAPFS
+ 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 %ld\n",
+ (long) sb->s_blocks_count);
+ }
+ }
+
+ /* 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;
+ char *tagp;
+ journal_block_tag_t *tag;
+ unsigned int blocknr;
+ __u32 tag_block;
+ __u32 tag_flags;
+
+
+ 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 += sizeof(journal_block_tag_t);
+
+ /* ... 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, 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,
+ unsigned int blocknr, int blocksize,
+ 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,
+ unsigned int log_blocknr,
+ unsigned int fs_blocknr,
+ 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\n", log_blocknr);
+
+ /* 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 = ((fs_blocknr - super->s_first_data_block) %
+ super->s_blocks_per_group);
+
+ fprintf(out_file, " (block bitmap for block %u: "
+ "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");
+ }
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/ls.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/ls.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/ls.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,172 @@
+/*
+ * 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
+#ifdef HAVE_OPTRESET
+extern int optreset; /* defined by BSD, but not others */
+#endif
+
+#include "debugfs.h"
+
+/*
+ * list directory
+ */
+
+#define LONG_OPT 0x0001
+#define DELETED_OPT 0x0002
+
+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,
+ int entry,
+ struct ext2_dir_entry *dirent,
+ int offset,
+ int blocksize,
+ char *buf,
+ void *private)
+{
+ struct ext2_dir_entry_2 *d2;
+ struct ext2_inode inode;
+ ext2_ino_t ino;
+ struct tm *tm_p;
+ time_t modtime;
+ char name[EXT2_NAME_LEN];
+ 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) < EXT2_NAME_LEN) ?
+ (dirent->name_len & 0xFF) : EXT2_NAME_LEN;
+ 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 & 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));
+ }
+ d2 = (struct ext2_dir_entry_2 *) dirent;
+ fprintf(ls->f, "%c%6u%c %6o (%d) %5d %5d ", lbr, ino, rbr,
+ inode.i_mode, d2->file_type, inode.i_uid, inode.i_gid);
+ if (LINUX_S_ISDIR(inode.i_mode))
+ fprintf(ls->f, "%5d", inode.i_size);
+ else
+ fprintf(ls->f, "%5lld", inode.i_size |
+ ((__u64)inode.i_size_high << 32));
+ 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;
+
+ optind = 0;
+#ifdef HAVE_OPTRESET
+ optreset = 1; /* Makes BSD getopt happy */
+#endif
+ while ((c = getopt (argc, argv, "dl")) != EOF) {
+ switch (c) {
+ case 'l':
+ ls.options |= LONG_OPT;
+ break;
+ case 'd':
+ ls.options |= DELETED_OPT;
+ break;
+ }
+ }
+
+ if (argc > optind+1) {
+ com_err(0, 0, "Usage: ls [-l] [-d] 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, "");
+
+ return;
+}
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/lsdel.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/lsdel.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/lsdel.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,208 @@
+/*
+ * 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;
+ unsigned short uid;
+ __u64 size;
+ time_t dtime;
+ int num_blocks;
+ int free_blocks;
+};
+
+struct lsdel_struct {
+ ext2_ino_t inode;
+ int num_blocks;
+ int free_blocks;
+ int 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,
+ blk_t *block_nr,
+ int blockcnt,
+ void *private)
+{
+ struct lsdel_struct *lsd = (struct lsdel_struct *) private;
+
+ lsd->num_blocks++;
+
+ if (*block_nr < fs->super->s_first_data_block ||
+ *block_nr >= fs->super->s_blocks_count) {
+ lsd->bad_blocks++;
+ return BLOCK_ABORT;
+ }
+
+ if (!ext2fs_test_block_bitmap(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 = time(0);
+ FILE *out;
+
+ if (common_args_process(argc, argv, 1, 2, "ls_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;
+ }
+ }
+
+ 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 && ((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_iterate(current_fs, ino, 0, block_buf,
+ lsdel_proc, &lsd);
+ if (retval) {
+ com_err("ls_deleted_inodes", retval,
+ "while calling ext2fs_block_iterate");
+ 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.i_uid;
+ delarray[num_delarray].size = inode.i_size;
+ if (!LINUX_S_ISDIR(inode.i_mode))
+ delarray[num_delarray].size |=
+ ((__u64) inode.i_size_high << 32);
+ 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 %4d/%4d %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;
+}
+
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/ncheck.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/ncheck.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/ncheck.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,179 @@
+/*
+ * 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>
+
+#include "debugfs.h"
+
+struct inode_info {
+ ext2_ino_t ino;
+ ext2_ino_t parent;
+ char *pathname;
+};
+
+struct inode_walk_struct {
+ struct inode_info *iarray;
+ int inodes_left;
+ int num_inodes;
+ int position;
+ ext2_ino_t parent;
+};
+
+static int ncheck_proc(struct ext2_dir_entry *dirent,
+ int offset,
+ int blocksize,
+ char *buf,
+ void *private)
+{
+ struct inode_walk_struct *iw = (struct inode_walk_struct *) private;
+ int i;
+
+ iw->position++;
+ if (iw->position <= 2)
+ return 0;
+ for (i=0; i < iw->num_inodes; i++) {
+ if (iw->iarray[i].ino == dirent->inode) {
+ iw->iarray[i].parent = iw->parent;
+ iw->inodes_left--;
+ }
+ }
+ if (!iw->inodes_left)
+ return DIRENT_ABORT;
+
+ return 0;
+}
+
+void do_ncheck(int argc, char **argv)
+{
+ struct inode_walk_struct iw;
+ struct inode_info *iinfo;
+ int i;
+ ext2_inode_scan scan = 0;
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+ errcode_t retval;
+ char *tmp;
+
+ if (argc < 2) {
+ com_err(argv[0], 0, "Usage: ncheck <inode number> ...");
+ return;
+ }
+ if (check_fs_open(argv[0]))
+ return;
+
+ iw.iarray = malloc(sizeof(struct inode_info) * argc);
+ if (!iw.iarray) {
+ com_err("do_ncheck", ENOMEM,
+ "while allocating inode info array");
+ return;
+ }
+ memset(iw.iarray, 0, sizeof(struct inode_info) * argc);
+
+ for (i=1; i < argc; i++) {
+ iw.iarray[i-1].ino = strtol(argv[i], &tmp, 0);
+ if (*tmp) {
+ com_err(argv[0], 0, "Bad inode - %s", argv[i]);
+ return;
+ }
+ }
+
+ iw.num_inodes = iw.inodes_left = argc-1;
+
+ 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;
+ }
+
+ 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 = ino;
+
+ retval = ext2fs_dir_iterate(current_fs, ino, 0, 0,
+ ncheck_proc, &iw);
+ 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;
+ }
+ }
+
+ for (i=0, iinfo = iw.iarray; i < iw.num_inodes; i++, iinfo++) {
+ if (iinfo->parent == 0)
+ continue;
+ retval = ext2fs_get_pathname(current_fs, iinfo->parent,
+ iinfo->ino, &iinfo->pathname);
+ if (retval)
+ com_err("ncheck", retval,
+ "while resolving pathname for inode %d (%d)",
+ iinfo->parent, iinfo->ino);
+ }
+
+ printf("Inode\tPathname\n");
+ for (i=0, iinfo = iw.iarray; i < iw.num_inodes; i++, iinfo++) {
+ if (iinfo->parent == 0) {
+ printf("%u\t<inode not found>\n", iinfo->ino);
+ continue;
+ }
+ printf("%u\t%s\n", iinfo->ino, iinfo->pathname ?
+ iinfo->pathname : "<unknown pathname>");
+ if (iinfo->pathname)
+ free(iinfo->pathname);
+ }
+
+error_out:
+ free(iw.iarray);
+ if (scan)
+ ext2fs_close_inode_scan(scan);
+ return;
+}
+
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/setsuper.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/setsuper.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/setsuper.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,216 @@
+/*
+ * setsuper.c --- set a superblock value
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <fcntl.h>
+#include <utime.h>
+
+#include "debugfs.h"
+
+static struct ext2_super_block set_sb;
+
+struct super_set_info {
+ const char *name;
+ void *ptr;
+ int size;
+ errcode_t (*func)(struct super_set_info *info, char *arg);
+};
+
+static errcode_t parse_uint(struct super_set_info *info, char *arg);
+static errcode_t parse_int(struct super_set_info *info, char *arg);
+static errcode_t parse_string(struct super_set_info *info, char *arg);
+
+static struct super_set_info super_fields[] = {
+ { "inodes_count", &set_sb.s_inodes_count, 4, parse_uint },
+ { "blocks_count", &set_sb.s_blocks_count, 4, parse_uint },
+ { "r_blocks_count", &set_sb.s_r_blocks_count, 4, parse_uint },
+ { "free_blocks_count", &set_sb.s_free_blocks_count, 4, parse_uint },
+ { "free_inodes_count", &set_sb.s_free_inodes_count, 4, parse_uint },
+ { "first_data_block", &set_sb.s_first_data_block, 4, parse_uint },
+ { "log_block_size", &set_sb.s_log_block_size, 4, parse_uint },
+ { "log_frag_size", &set_sb.s_log_frag_size, 4, parse_int },
+ { "blocks_per_group", &set_sb.s_blocks_per_group, 4, parse_uint },
+ { "frags_per_group", &set_sb.s_frags_per_group, 4, parse_uint },
+ { "inodes_per_group", &set_sb.s_inodes_per_group, 4, parse_uint },
+ /* s_mtime (time_t) */
+ /* s_wtime (time_t) */
+ { "mnt_count", &set_sb.s_mnt_count, 2, parse_uint },
+ { "max_mnt_count", &set_sb.s_max_mnt_count, 2, parse_int },
+ /* s_magic */
+ { "state", &set_sb.s_state, 2, parse_uint },
+ { "errors", &set_sb.s_errors, 2, parse_uint },
+ { "minor_rev_level", &set_sb.s_minor_rev_level, 2, parse_uint },
+ /* s_lastcheck (time_t) */
+ { "checkinterval", &set_sb.s_checkinterval, 4, parse_uint },
+ { "creator_os", &set_sb.s_creator_os, 4, parse_uint },
+ { "rev_level", &set_sb.s_rev_level, 4, parse_uint },
+ { "def_resuid", &set_sb.s_def_resuid, 2, parse_uint },
+ { "def_resgid", &set_sb.s_def_resgid, 2, parse_uint },
+ { "first_ino", &set_sb.s_first_ino, 4, parse_uint },
+ { "inode_size", &set_sb.s_inode_size, 2, parse_uint },
+ { "block_group_nr", &set_sb.s_block_group_nr, 2, parse_uint },
+ { "feature_compat", &set_sb.s_feature_compat, 4, parse_uint },
+ { "feature_incompat", &set_sb.s_feature_incompat, 4, parse_uint },
+ { "feature_ro_compat", &set_sb.s_feature_ro_compat, 4, parse_uint },
+ /* __u8 s_uuid[16]; */
+ { "volume_name", &set_sb.s_volume_name, 16, parse_string },
+ { "last_mounted", &set_sb.s_last_mounted, 64, parse_string },
+ { "lastcheck", &set_sb.s_lastcheck, 4, parse_uint },
+ { "algorithm_usage_bitmap", &set_sb.s_algorithm_usage_bitmap,
+ 4, parse_uint },
+ { "prealloc_blocks", &set_sb.s_prealloc_blocks, 1, parse_uint },
+ { "prealloc_dir_blocks", &set_sb.s_prealloc_dir_blocks, 1,
+ parse_uint },
+ /* s_padding1 */
+ /* s_journal_uuid */
+ { "journal_inum", &set_sb.s_journal_inum, 4, parse_uint },
+ { "journal_dev", &set_sb.s_journal_dev, 4, parse_uint },
+ { "last_orphan", &set_sb.s_last_orphan, 4, parse_uint },
+
+ { 0, 0, 0, 0 }
+};
+
+static struct super_set_info *find_field(char *field)
+{
+ struct super_set_info *ss;
+
+ if (strncmp(field, "s_", 2) == 0)
+ field += 2;
+ for (ss = super_fields ; ss->name ; ss++) {
+ if (strcmp(ss->name, field) == 0)
+ return ss;
+ }
+ return NULL;
+}
+
+static errcode_t parse_uint(struct super_set_info *info, char *arg)
+{
+ unsigned long num;
+ char *tmp;
+ __u32 *ptr32;
+ __u16 *ptr16;
+ __u8 *ptr8;
+
+ num = strtoul(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 = (__u32 *) info->ptr;
+ *ptr32 = num;
+ break;
+ case 2:
+ ptr16 = (__u16 *) info->ptr;
+ *ptr16 = num;
+ break;
+ case 1:
+ ptr8 = (__u8 *) info->ptr;
+ *ptr8 = num;
+ break;
+ }
+ return 0;
+}
+
+static errcode_t parse_int(struct super_set_info *info, 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 super_set_info *info, 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 void print_possible_fields(void)
+{
+ struct super_set_info *ss;
+ const char *type;
+
+ printf("Superblock fields supported by the set_super_value command:\n");
+ for (ss = super_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";
+ printf("\t%-20s\t%s\n", ss->name, type);
+ }
+}
+
+
+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 super_set_info *ss;
+
+ if ((argc == 2) && !strcmp(argv[1], "-l")) {
+ print_possible_fields();
+ return;
+ }
+
+ if (common_args_process(argc, argv, 3, 3, "set_super_value",
+ usage, CHECK_FS_RW))
+ return;
+
+ if ((ss = find_field(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[2]) == 0) {
+ *current_fs->super = set_sb;
+ ext2fs_mark_super_dirty(current_fs);
+ }
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/debugfs/util.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/debugfs/util.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/debugfs/util.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,268 @@
+/*
+ * 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.
+ *
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+#include <signal.h>
+
+#include "debugfs.h"
+
+FILE *open_pager(void)
+{
+ FILE *outfile;
+ const char *pager = getenv("PAGER");
+
+ signal(SIGPIPE, SIG_IGN);
+ if (pager) {
+ if (strcmp(pager, "__none__") == 0) {
+ return stdout;
+ }
+ } else
+ pager = "more";
+
+ outfile = popen(pager, "w");
+
+ return (outfile ? outfile : stdout);
+}
+
+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, "");
+ 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)
+{
+ time_t t = (time_t) cl;
+
+ return ctime(&t);
+}
+
+/*
+ * 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 a block number. It returns
+ * 0 on success, 1 on failure.
+ */
+int strtoblk(const char *cmd, const char *str, blk_t *ret)
+{
+ blk_t blk;
+ int err;
+
+ blk = parse_ulong(str, cmd, "block number", &err);
+ *ret = blk;
+ if (err == 0 && blk == 0) {
+ com_err(cmd, 0, "Invalid block number 0");
+ err = 1;
+ }
+ 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[],
+ blk_t *block, int *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 (argc > 2) {
+ *count = parse_ulong(argv[0], argv[2], "count", &err);
+ if (err)
+ 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(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;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/depfix.sed
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/depfix.sed 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/depfix.sed 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,33 @@
+#
+# 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
+
+#
+# Now insert a trailing newline...
+#
+$a\
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/doc/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/doc/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/doc/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2 @@
+Makefile
+libext2fs.info
Added: trunk/yaboot/lib/e2fsprogs-1.27/doc/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/doc/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/doc/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,104 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-12-11 Theodore Tso <tytso at valinux.com>
+
+ * Add new descriptions for the following functions:
+ ext2fs_block_iterate, ext2fs_block_iterate2,
+ ext2fs_read_dir_block, ext2fs_write_dir_block,
+ ext2fs_new_dir_block, ext2fs_dir_iterate, ext2fs_mkdir,
+ ext2fs_expand_dir, ext2fs_link, ext2fs_unlink,
+ ext2fs_clear_block_bitmap, ext2fs_set_block_bitmap,
+ ext2fs_group_of_blk, ext2fs_group_of_ino.
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-30 Theodore Tso <tytso at valinux.com>
+
+ * libext2fs.texinfo: Remove texinfo warnings by adding white space
+ after the function name and before the open parenthesis.
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-06-27 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in: Don't predefine RM; it's defined by MCONFIG
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2001-05-20 Theodore Tso <tytso at valinux.com>
+
+ * libext2fs.texinfo: Added @dircategory line so that Debian
+ programs know which section to list the .info file.
+
+2001-01-11 <tytso at snap.thunk.org>
+
+ * libext2fs.texinfo: Change ino_t to ext2_ino_t
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-07-18 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.15
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+1998-07-04 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * libext2fs.texinfo: Update definition of ext2fs_block_iterate2.
+
+1998-03-30 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (install-doc-libs): Remove libext2fs.info*, not just
+ libext2fs.info*.gz. Add an uninstall-doc-libs target.
Added: trunk/yaboot/lib/e2fsprogs-1.27/doc/Makefile.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/doc/Makefile.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/doc/Makefile.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,62 @@
+#
+# Makefile for the doc directory
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = doc
+INSTALL = @INSTALL@
+
+ at MCONFIG@
+
+DVI=texi2dvi
+DVIPS=dvips -o "$@"
+INFO=makeinfo
+HTML=texi2html
+
+all:: libext2fs.info libext2fs.dvi
+
+install-doc-libs:
+ $(RM) -rf $(DESTDIR)$(infodir)/libext2fs.info*
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir)
+ for i in libext2fs.info* ; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i ; \
+ done
+ gzip -9 $(DESTDIR)$(infodir)/libext2fs.info*
+
+uninstall-doc-libs:
+ $(RM) -rf $(DESTDIR)$(infodir)/libext2fs.info*
+
+libext2fs.info: $(srcdir)/libext2fs.texinfo
+ $(INFO) $(srcdir)/libext2fs.texinfo
+
+libext2fs.dvi: $(srcdir)/libext2fs.texinfo
+ $(DVI) $(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
+
+.PHONY: clean-final
+clean-final::
+ $(RM) -f *.ps *.info *.info-? *.html
+
+.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
Added: trunk/yaboot/lib/e2fsprogs-1.27/doc/libext2fs.texinfo
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/doc/libext2fs.texinfo 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/doc/libext2fs.texinfo 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1261 @@
+\input texinfo @c -*-texinfo-*-
+ at c %**start of header
+ at setfilename libext2fs.info
+ at settitle The EXT2FS Library (version 1.27)
+ at synindex tp fn
+ at comment %**end of header
+
+ at ifinfo
+ at dircategory Development
+ at format
+START-INFO-DIR-ENTRY
+* libext2fs: (libext2fs.info). The EXT2FS library.
+END-INFO-DIR-ENTRY
+ at end format
+ at end ifinfo
+
+ at c smallbook
+
+ at iftex
+ at finalout
+ at end iftex
+
+ at c Note: the edition number is listed in *three* places; please update
+ at c all three. Also, update the month and year where appropriate.
+
+ at c ==> Update edition number for settitle and subtitle, and in the
+ at c ==> following paragraph; update date, too.
+
+
+ at ifinfo
+This file documents the ext2fs library, a library for manipulating the
+ext2 filesystem.
+
+Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 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.
+
+ at 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).
+
+ at 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.
+ at end ifinfo
+
+ at setchapternewpage on
+ at titlepage
+ at c use the new format for titles
+
+ at title The EXT2FS Library
+ at subtitle The EXT2FS Library
+ at subtitle Version 1.27
+ at subtitle "March 2002
+
+ at author by Theodore Ts'o
+
+ at c Include the Distribution inside the titlepage so
+ at c that headings are turned off.
+
+ at tex
+\global\parindent=0pt
+\global\parskip=8pt
+\global\baselineskip=13pt
+ at end tex
+
+ at page
+ at vskip 0pt plus 1filll
+Copyright @copyright{} 1997, 1998, 1999, 2000, 2001, 2002 Theodore Ts'o
+
+ at 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.
+ at end titlepage
+ at headings double
+
+ at ifinfo
+ at node Top, Introduction to the EXT2FS Library, (dir), (dir)
+
+ at top The EXT2FS Library
+
+This manual documents the EXT2FS Library, version 1.27.
+
+ at end ifinfo
+
+ at menu
+* Introduction to the EXT2FS Library::
+* EXT2FS Library Functions::
+* Concept Index::
+* Function Index::
+ at end menu
+
+ at c ----------------------------------------------------------------------
+
+ at node Introduction to the EXT2FS Library, EXT2FS Library Functions, Top, Top
+ at comment node-name, next, previous, up
+ at chapter Introduction to the EXT2FS Library
+
+The EXT2FS library is designed to allow user-level programs to
+manipulate an ext2 filesystem.
+
+ at node EXT2FS Library Functions, Concept Index, Introduction to the EXT2FS Library, Top
+ at comment node-name, next, previous, up
+ at chapter EXT2FS Library Functions
+
+ at menu
+* Filesystem-level functions::
+* Inode Functions::
+* Directory functions::
+* Bitmap Functions::
+* EXT2 data abstractions::
+* Byte-swapping functions::
+* Other functions::
+ at end menu
+
+ at c ----------------------------------------------------------------------
+
+ at node Filesystem-level functions, Inode Functions, EXT2FS Library Functions, EXT2FS Library Functions
+ at comment node-name, next, previous, up
+ at 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,
+ at 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}.
+
+ at menu
+* Opening an ext2 filesystem::
+* Closing and flushing out changes::
+* Initializing a filesystem::
+* Filesystem flag functions::
+ at end menu
+
+ at c ----------------------------------------------------------------------
+
+ at node Opening an ext2 filesystem, Closing and flushing out changes, Filesystem-level functions, Filesystem-level functions
+ at comment node-name, next, previous, up
+ at subsection Opening an ext2 filesystem
+
+Most libext2fs functions take a filesystem handle of type
+ at 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}.
+
+ at 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
+ at 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,
+ at 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
+ at code{EXT2_ET_UNEXPECTED_BLOCK_SIZE} will be returned. The
+ at var{block_size} parameter is also used to help fund the superblock when
+ at var{superblock} is non-zero.
+
+The @var{flags} argument contains a bitmask of flags which control how
+the filesystem open should be handled.
+
+ at table @code
+ at item EXT2_FLAG_RW
+Open the filesystem for reading and writing. Without this flag, the
+filesystem is opened for reading only.
+
+ at item EXT2_FLAG_FORCE
+Open the filesystem regardless of the feature sets listed in the
+superblock.
+
+ at end table
+ at end deftypefun
+
+ at c ----------------------------------------------------------------------
+
+ at node Closing and flushing out changes, Initializing a filesystem, Opening an ext2 filesystem, Filesystem-level functions
+ at comment node-name, next, previous, up
+ at subsection Closing and flushing out changes
+
+ at deftypefun errcode_t ext2fs_flush (ext2_filsys @var{fs})
+
+Write any changes to the high-level filesystem data structures in the
+ at var{fs} filesystem. The following data structures will be written out:
+
+ at itemize @bullet
+ at item The filesystem superblock
+ at item The filesystem group descriptors
+ at item The filesystem bitmaps, if read in via @code{ext2fs_read_bitmaps}.
+ at end itemize
+
+ at end deftypefun
+
+ at 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.
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_close (ext2_filsys @var{fs})
+
+Flush out any changes to the high-level filesystem data structures using
+ at code{ext2fs_flush} if the filesystem is marked dirty; then close and
+free the filesystem using @code{ext2fs_free}.
+
+ at end deftypefun
+
+ at c ----------------------------------------------------------------------
+
+ at node Initializing a filesystem, Filesystem flag functions, Closing and flushing out changes, Filesystem-level functions
+ at comment node-name, next, previous, up
+ at subsection Initializing a filesystem
+
+An ext2 filesystem is initializing by the @code{mke2fs} program. The
+two functions described here, @code{ext2fs_initialize} and
+ at 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.
+
+ at 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
+ at 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
+ at 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.
+
+ at table @code
+
+ at item s_blocks_count
+The number of blocks in the filesystem. This parameter is mandatory and
+must be set by the calling application.
+
+ at 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.
+
+ at item s_r_blocks_count
+The number of blocks which should be reserved for the superuser. The
+default value is zero blocks.
+
+ at 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.
+
+ at 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}.
+
+ at 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.
+
+ at 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
+ at 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.
+
+ at 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
+ at code{e2fsck}. The default value of this field is 180 days (six
+months).
+
+ at 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:
+
+ at table @samp
+ at item EXT2_ERRORS_CONTINUE
+Continue execution when errors are detected.
+
+ at item EXT2_ERRORS_RO
+Remount the filesystem read-only.
+
+ at item EXT2_ERRORS_PANIC
+Panic.
+
+ at end table
+
+The default behavior is @samp{EXT2_ERRORS_CONTINUE}.
+
+ at end table
+
+ at end deftypefun
+
+ at 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.
+ at end deftypefun
+
+ at c ----------------------------------------------------------------------
+
+ at node Filesystem flag functions, , Initializing a filesystem, Filesystem-level functions
+ at comment node-name, next, previous, up
+ at 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.
+
+ at deftypefun void ext2fs_mark_changed (ext2_filsys @var{fs})
+ at 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.
+ at end deftypefun
+
+ at 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
+ at code{ext2fs_flush} when the superblock is written to disk.
+ at end deftypefun
+
+ at deftypefun void ext2fs_mark_valid (ext2_filsys @var{fs})
+ at deftypefunx void ext2fs_unmark_valid (ext2_filsys @var{fs})
+ at 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.
+ at end deftypefun
+
+ at deftypefun void ext2fs_mark_ib_dirty (ext2_filsys @var{fs})
+ at deftypefunx void ext2fs_mark_bb_dirty (ext2_filsys @var{fs})
+ at deftypefunx int ext2fs_test_ib_dirty (ext2_filsys @var{fs})
+ at 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.
+ at end deftypefun
+
+
+
+ at c ----------------------------------------------------------------------
+
+ at node Inode Functions, Directory functions, Filesystem-level functions, EXT2FS Library Functions
+ at comment node-name, next, previous, up
+ at section Inode Functions
+
+ at menu
+* Reading and writing inodes::
+* Iterating over inodes in a filesystem::
+* Iterating over blocks in an inode::
+* Inode Convenience Functions::
+ at end menu
+
+ at c ----------------------------------------------------------------------
+
+ at node Reading and writing inodes, Iterating over inodes in a filesystem, Inode Functions, Inode Functions
+ at comment node-name, next, previous, up
+ at subsection Reading and writing inodes
+
+ at 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}.
+ at end deftypefun
+
+ at 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}.
+ at end deftypefun
+
+
+ at c ----------------------------------------------------------------------
+
+ at node Iterating over inodes in a filesystem, Iterating over blocks in an inode, Reading and writing inodes, Inode Functions
+ at comment node-name, next, previous, up
+ at subsection Iterating over inodes in a filesystem
+
+The inode_scan abstraction is useful for iterating over all the inodes
+in a filesystem.
+
+ at 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
+ at 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.
+ at end deftypefun
+
+ at deftypefun void ext2fs_close_inode_scan (ext2_inode_scan @var{scan})
+Release the memory associated with @var{scan} and invalidate it.
+ at end deftypefun
+
+ at 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
+ at var{inode}.
+
+If the inode is located in a block that has been marked as bad,
+ at code{ext2fs_get_next_inode} will return the error
+ at code{EXT2_ET_BAD_BLOCK_IN_INODE_TABLE}.
+ at end deftypefun
+
+ at 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.
+ at end deftypefun
+
+ at 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
+ at code{ext2_get_next_inode} when all of the inodes in a block group have
+been processed.
+ at end deftypefun
+
+ at 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:
+
+ at table @samp
+
+ at 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.
+
+ at end table
+
+ at end deftypefun
+
+ at c ----------------------------------------------------------------------
+
+ at node Iterating over blocks in an inode, Inode Convenience Functions, Iterating over inodes in a filesystem, Inode Functions
+ at comment node-name, next, previous, up
+ at subsection Iterating over blocks in an inode
+
+ at 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
+ at 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
+ at 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:
+
+ at table @samp
+
+ at 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.
+
+ at item BLOCK_FLAG_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.
+
+ at item BLOCK_FLAG_DATA_ONLY
+This flag indicates that the iterator function should be
+called for data blocks only.
+
+ at 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
+ at 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
+ at 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:
+
+ at table @samp
+
+ at item BLOCK_CHANGED
+
+This flag indicates that callback function has modified the physical
+block number pointed to by @var{blocknr}.
+
+ at item BLOCK_ABORT
+
+This flag requests that @code{ext2fs_block_iterate} to stop immediately
+and return to the caller.
+
+ at end table
+
+ at end deftypefun
+
+ at 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_iterate2}, except that the
+ at 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
+ at 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
+ at var{ref_offset} contains the offset into the indirect block.
+
+ at end deftypefun
+
+ at c ----------------------------------------------------------------------
+
+ at node Inode Convenience Functions, , Iterating over blocks in an inode, Inode Functions
+ at comment node-name, next, previous, up
+ at subsection Convenience functions for Inodes
+
+ at 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.
+ at end deftypefun
+
+ at 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.
+ at end deftypefun
+
+ at deftypefun int ext2_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.
+ at end deftypefun
+
+ at c ----------------------------------------------------------------------
+
+ at node Directory functions, Bitmap Functions, Inode Functions, EXT2FS Library Functions
+ at comment node-name, next, previous, up
+ at section Directory functions
+
+ at 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::
+ at end menu
+
+ at c ----------------------------------------------------------------------
+
+ at node Directory block functions, Iterating over a directory, Directory functions, Directory functions
+ at comment node-name, next, previous, up
+ at subsection Directory block functions
+
+ at 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.
+ at end deftypefun
+
+ at 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.
+ at end deftypefun
+
+ at 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
+ at 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.
+ at end deftypefun
+
+ at c ----------------------------------------------------------------------
+
+ at node Iterating over a directory, Creating and expanding directories, Directory block functions, Directory functions
+ at comment node-name, next, previous, up
+ at subsection Iterating over a directory
+
+ at 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 interates 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:
+
+ at table @samp
+
+ at item DIRENT_FLAG_INCLUDE_EMPTY
+
+This flag indicates that the callback function should be called even
+for deleted or empty directory entries.
+
+ at end table
+
+ at end deftypefun
+
+ at c ----------------------------------------------------------------------
+
+ at node Creating and expanding directories, Creating and removing directory entries, Iterating over a directory, Directory functions
+ at comment node-name, next, previous, up
+ at subsection Creating and expanding directories
+
+ at 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}.
+ at end deftypefun
+
+ at 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
+ at code{ext2fs_link} to add new directory entries to a directory which is full.
+
+ at end deftypefun
+
+ at c ----------------------------------------------------------------------
+
+ at node Creating and removing directory entries, Looking up filenames, Creating and expanding directories, Directory functions
+ at comment node-name, next, previous, up
+ at subsection Creating and removing directory entries
+
+ at 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.)
+
+ at table @samp
+
+ at item EXT2_FT_UNKNOWN
+
+The file type is unknown.
+
+ at item EXT2_FT_REG_FILE
+
+The file type is a normal file.
+
+ at item EXT2_FT_DIR
+
+The file type is a directory.
+
+ at item EXT2_FT_CHRDEV
+
+The file type is a character device.
+
+ at item EXT2_FT_BLKDEV
+
+The file type is a block device.
+
+ at item EXT2_FT_FIFO
+
+The file type is a named pipe.
+
+ at item EXT2_FT_SOCK
+
+The file type is a unix domain socket.
+
+ at item EXT2_FT_SYMLINK
+
+The file type is a symbolic link.
+ at end table
+
+ at end deftypefun
+
+ at 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.
+
+ at end deftypefun
+
+ at c ----------------------------------------------------------------------
+
+ at node Looking up filenames, Translating inode numbers to filenames, Creating and removing directory entries, Directory functions
+ at comment node-name, next, previous, up
+ at subsection Looking up filenames
+
+ at 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})
+ at end deftypefun
+
+ at 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})
+ at end deftypefun
+
+ at 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})
+ at end deftypefun
+
+ at 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)
+ at end deftypefun
+
+ at c ----------------------------------------------------------------------
+
+ at node Translating inode numbers to filenames, , Looking up filenames, Directory functions
+ at comment node-name, next, previous, up
+ at subsection Translating inode numbers to filenames
+
+ at deftypefun errcode_t ext2fs_get_pathname (ext2_filsys @var{fs}, ext2_ino_t @var{dir}, ext2_ino_t @var{ino}, char **@var{name})
+ at end deftypefun
+
+
+ at c ----------------------------------------------------------------------
+
+ at node Bitmap Functions, EXT2 data abstractions, Directory functions, EXT2FS Library Functions
+ at comment node-name, next, previous, up
+ at section Bitmap Functions
+
+ at menu
+* Reading and Writing Bitmaps::
+* Allocating Bitmaps::
+* Free bitmaps::
+* Bitmap Operations::
+* Comparing bitmaps::
+* Modifying Bitmaps::
+* Resizing Bitmaps::
+* Clearing Bitmaps::
+ at end menu
+
+ at c ----------------------------------------------------------------------
+
+ at node Reading and Writing Bitmaps, Allocating Bitmaps, Bitmap Functions, Bitmap Functions
+ at comment node-name, next, previous, up
+ at subsection Reading and Writing Bitmaps
+
+ at deftypefun errcode_t ext2fs_write_inode_bitmap (ext2_filsys @var{fs})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_write_block_bitmap (ext2_filsys @var{fs})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_read_inode_bitmap (ext2_filsys @var{fs})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_read_block_bitmap (ext2_filsys @var{fs})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_read_bitmaps (ext2_filsys @var{fs})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_write_bitmaps (ext2_filsys @var{fs})
+ at end deftypefun
+
+ at c ----------------------------------------------------------------------
+
+ at node Allocating Bitmaps, Free bitmaps, Reading and Writing Bitmaps, Bitmap Functions
+ at comment node-name, next, previous, up
+ at subsection Allocating Bitmaps
+
+ at 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})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_allocate_block_bitmap (ext2_filsys @var{fs}, const char *@var{descr}, ext2fs_block_bitmap *@var{ret})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_allocate_inode_bitmap (ext2_filsys @var{fs}, const char *@var{descr}, ext2fs_inode_bitmap *@var{ret})
+ at end deftypefun
+
+ at c ----------------------------------------------------------------------
+
+ at node Free bitmaps, Bitmap Operations, Allocating Bitmaps, Bitmap Functions
+ at comment node-name, next, previous, up
+ at subsection Freeing bitmaps
+
+
+ at deftypefun void ext2fs_free_generic_bitmap (ext2fs_inode_bitmap @var{bitmap})
+ at end deftypefun
+
+ at deftypefun void ext2fs_free_block_bitmap (ext2fs_block_bitmap @var{bitmap})
+ at end deftypefun
+
+ at deftypefun void ext2fs_free_inode_bitmap (ext2fs_inode_bitmap @var{bitmap})
+ at end deftypefun
+
+
+ at c ----------------------------------------------------------------------
+
+ at node Bitmap Operations, Comparing bitmaps, Free bitmaps, Bitmap Functions
+ at comment node-name, next, previous, up
+ at subsection Bitmap Operations
+
+ at deftypefun void ext2fs_mark_block_bitmap (ext2fs_block_bitmap @var{bitmap}, blk_t @var{block})
+
+ at deftypefunx void ext2fs_unmark_block_bitmap (ext2fs_block_bitmap @var{bitmap}, blk_t @var{block})
+
+ at 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}.
+ at end deftypefun
+
+
+ at deftypefun void ext2fs_mark_inode_bitmap (ext2fs_inode_bitmap @var{bitmap}, ext2_ino_t @var{inode})
+
+ at deftypefunx void ext2fs_unmark_inode_bitmap (ext2fs_inode_bitmap @var{bitmap}, ext2_ino_t @var{inode})
+
+ at 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}.
+ at end deftypefun
+
+ at deftypefun void ext2fs_fast_mark_block_bitmap (ext2fs_block_bitmap @var{bitmap}, blk_t @var{block})
+
+ at deftypefunx void ext2fs_fast_unmark_block_bitmap (ext2fs_block_bitmap @var{bitmap}, blk_t @var{block})
+
+ at deftypefunx int ext2fs_fast_test_block_bitmap (ext2fs_block_bitmap @var{bitmap}, blk_t @var{block})
+
+ at deftypefunx void ext2fs_fast_mark_inode_bitmap (ext2fs_inode_bitmap @var{bitmap}, ext2_ino_t @var{inode})
+
+ at deftypefunx void ext2fs_fast_unmark_inode_bitmap (ext2fs_inode_bitmap @var{bitmap}, ext2_ino_t @var{inode})
+
+ at 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.
+ at end deftypefun
+
+ at deftypefun blk_t ext2fs_get_block_bitmap_start (ext2fs_block_bitmap @var{bitmap})
+ at 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.
+ at end deftypefun
+
+ at deftypefun blk_t ext2fs_get_block_bitmap_end (ext2fs_block_bitmap @var{bitmap})
+ at 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.
+ at end deftypefun
+
+
+ at c ----------------------------------------------------------------------
+
+ at node Comparing bitmaps, Modifying Bitmaps, Bitmap Operations, Bitmap Functions
+ at comment node-name, next, previous, up
+ at subsection Comparing bitmaps
+
+ at deftypefun errcode_t ext2fs_compare_block_bitmap (ext2fs_block_bitmap @var{bm1}, ext2fs_block_bitmap @var{bm2})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_compare_inode_bitmap (ext2fs_inode_bitmap @var{bm1}, ext2fs_inode_bitmap @var{bm2})
+ at end deftypefun
+
+
+ at c ----------------------------------------------------------------------
+
+ at node Modifying Bitmaps, Resizing Bitmaps, Comparing bitmaps, Bitmap Functions
+ at comment node-name, next, previous, up
+ at subsection Modifying Bitmaps
+
+ at deftypefun errcode_t ext2fs_fudge_inode_bitmap_end (ext2fs_inode_bitmap @var{bitmap}, ext2_ino_t @var{end}, ext2_ino_t *@var{oend})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_fudge_block_bitmap_end (ext2fs_block_bitmap @var{bitmap}, blk_t @var{end}, blk_t *@var{oend})
+ at end deftypefun
+
+ at c ----------------------------------------------------------------------
+
+ at node Resizing Bitmaps, Clearing Bitmaps, Modifying Bitmaps, Bitmap Functions
+ at comment node-name, next, previous, up
+ at subsection Resizing Bitmaps
+
+ at deftypefun errcode_t ext2fs_resize_generic_bitmap (__u32 @var{new_end}, __u32 @var{new_real_end}, ext2fs_generic_bitmap @var{bmap})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_resize_inode_bitmap (__u32 @var{new_end}, __u32 @var{new_real_end}, ext2fs_inode_bitmap @var{bmap})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_resize_block_bitmap (__u32 @var{new_end}, __u32 @var{new_real_end}, ext2fs_block_bitmap @var{bmap})
+ at end deftypefun
+
+
+ at c ----------------------------------------------------------------------
+
+ at node Clearing Bitmaps, , Resizing Bitmaps, Bitmap Functions
+ at comment node-name, next, previous, up
+ at subsection Clearing Bitmaps
+
+ at 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.
+
+ at end deftypefun
+
+ at 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.
+ at end deftypefun
+
+
+ at c ----------------------------------------------------------------------
+
+ at node EXT2 data abstractions, Byte-swapping functions, Bitmap Functions, EXT2FS Library Functions
+ at comment node-name, next, previous, up
+ at section EXT2 data abstractions
+
+The ext2 library has a number of abstractions which are useful for ext2
+utility programs.
+
+ at menu
+* Badblocks list management::
+* Directory-block list management::
+* Inode count functions::
+ at end menu
+
+ at c ----------------------------------------------------------------------
+
+ at node Badblocks list management, Directory-block list management, EXT2 data abstractions, EXT2 data abstractions
+ at comment node-name, next, previous, up
+ at subsection Badblocks list management
+
+
+ at deftypefun errcode_t ext2fs_badblocks_list_create (ext2_badblocks_list *@var{ret}, int @var{size})
+ at end deftypefun
+
+ at deftypefun void ext2fs_badblocks_list_free (ext2_badblocks_list @var{bb})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_badblocks_list_add (ext2_badblocks_list @var{bb}, blk_t @var{blk})
+ at end deftypefun
+
+ at deftypefun int ext2fs_badblocks_list_test (ext2_badblocks_list @var{bb}, blk_t @var{blk})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_badblocks_list_iterate_begin (ext2_badblocks_list @var{bb}, ext2_badblocks_iterate *@var{ret})
+ at end deftypefun
+
+ at deftypefun int ext2fs_badblocks_list_iterate (ext2_badblocks_iterate iter, blk_t *@var{blk})
+ at end deftypefun
+
+ at deftypefun void ext2fs_badblocks_list_iterate_end (ext2_badblocks_iterate @var{iter})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_update_bb_inode (ext2_filsys @var{fs}, ext2_badblocks_list @var{bb_list})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_read_bb_inode (ext2_filsys @var{fs}, ext2_badblocks_list *@var{bb_list})
+ at end deftypefun
+
+ at 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}))
+ at end deftypefun
+
+
+ at c ----------------------------------------------------------------------
+
+ at node Directory-block list management, Inode count functions, Badblocks list management, EXT2 data abstractions
+ at comment node-name, next, previous, up
+ at 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.
+
+ at 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}.
+ at end deftypefun
+
+ at deftypefun void ext2fs_free_dblist (ext2_dblist @var{dblist})
+
+Free a dblist data structure.
+ at end deftypefun
+
+ at 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}.
+ at end deftypefun
+
+ at 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
+ at var{blk}.
+ at end deftypefun
+
+ at 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.
+ at end deftypefun
+
+ at 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.
+ at end deftypefun
+
+ at c ----------------------------------------------------------------------
+
+ at node Inode count functions, , Directory-block list management, EXT2 data abstractions
+ at comment node-name, next, previous, up
+ at 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).
+
+ at 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.
+ at end deftypefun
+
+ at deftypefun void ext2fs_free_icount (ext2_icount_t @var{icount})
+
+Frees an icount structure.
+ at end deftypefun
+
+ at 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}.
+ at end deftypefun
+
+ at 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}.
+ at end deftypefun
+
+ at 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}.
+ at end deftypefun
+
+ at 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}.
+ at end deftypefun
+
+ at 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.
+ at end deftypefun
+
+ at 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.
+ at end deftypefun
+
+
+ at c ----------------------------------------------------------------------
+
+ at node Byte-swapping functions, Other functions, EXT2 data abstractions, EXT2FS Library Functions
+ at comment node-name, next, previous, up
+ at section Byte-swapping functions
+
+ at deftypefun void ext2fs_swap_super (struct ext2_super_block * @var{super})
+ at end deftypefun
+
+ at deftypefun void ext2fs_swap_group_desc (struct ext2_group_desc *@var{gdp})
+ at end deftypefun
+
+ at deftypefun void ext2fs_swap_inode (ext2_filsys @var{fs}, struct ext2_inode *@var{to}, struct ext2_inode *@var{from}, int @var{hostorder})
+ at end deftypefun
+
+ at deftypefun int ext2fs_native_flag (void)
+ at end deftypefun
+
+
+ at c ----------------------------------------------------------------------
+
+ at node Other functions, , Byte-swapping functions, EXT2FS Library Functions
+ at comment node-name, next, previous, up
+ at section Other functions
+
+/* alloc.c */
+ at 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})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2fs_new_block (ext2_filsys @var{fs}, blk_t @var{goal}, ext2fs_block_bitmap @var{map}, blk_t *@var{ret})
+ at end deftypefun
+
+ at 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})
+ at end deftypefun
+
+/* check_desc.c */
+ at deftypefun errcode_t ext2fs_check_desc (ext2_filsys @var{fs})
+ at end deftypefun
+
+ at deftypefun errcode_t ext2_get_num_dirs (ext2_filsys @var{fs}, ext2_ino_t *@var{ret_num_dirs})
+ at end deftypefun
+
+
+/* getsize.c */
+ at deftypefun errcode_t ext2fs_get_device_size (const char *@var{file}, int @var{blocksize}, blk_t *@var{retblocks})
+ at end deftypefun
+
+
+/* ismounted.c */
+ at deftypefun errcode_t ext2fs_check_if_mounted (const char *@var{file}, int *@var{mount_flags})
+ at end deftypefun
+
+/* version.c */
+
+ at 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.
+ at end deftypefun
+
+ at 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
+ at 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.
+ at end deftypefun
+
+/* inline functions */
+ at 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}.
+
+ at end deftypefun
+
+ at 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}.
+ at end deftypefun
+
+
+ at c ----------------------------------------------------------------------
+
+ at node Concept Index, Function Index, EXT2FS Library Functions, Top
+ at comment node-name, next, previous, up
+ at unnumbered Concept Index
+ at printindex cp
+
+ at c ----------------------------------------------------------------------
+
+ at node Function Index, , Concept Index, Top
+ at comment node-name, next, previous, up
+ at unnumbered Function and Type Index
+ at printindex fn
+
+
+ at contents
+ at bye
Added: trunk/yaboot/lib/e2fsprogs-1.27/doc/texinfo.tex
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/doc/texinfo.tex 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/doc/texinfo.tex 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,4761 @@
+%% TeX macros to handle Texinfo files.
+%% $Id: s.texinfo.tex 1.4 97/04/29 21:25:57-00:00 tytso at mit.edu $
+
+% Copyright (C) 1985, 86, 88, 90, 91, 92, 93,
+% 94, 95, 1996 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., 59 Temple Place - Suite 330,
+%Boston, MA 02111-1307, USA.
+
+
+%In other words, you are welcome to use, share and improve this program.
+%You are forbidden to forbid anyone else to use, share and improve
+%what you give them. Help stamp out software-hoarding!
+
+
+% Send bug reports to bug-texinfo at prep.ai.mit.edu.
+% Please include a *precise* test case in each bug report.
+
+
+% Make it possible to create a .fmt file just by loading this file:
+% if the underlying format is not loaded, start by loading it now.
+% Added by gildea November 1993.
+\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
+
+% This automatically updates the version number based on RCS.
+\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
+\deftexinfoversion$Revision: 1.4 $
+\message{Loading texinfo package [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]}\message{}
+ \catcode`+=\active \catcode`\_=\active}
+
+% Save some parts of plain tex 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\ptexi=\i
+\let\ptexlbrace=\{
+\let\ptexrbrace=\}
+\let\ptexstar=\*
+\let\ptext=\t
+\let\ptextilde=\~
+
+% 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\ }
+}
+\let\~ = \tie % And make it available as @~.
+
+
+\message{Basics,}
+\chardef\other=12
+
+% If this character appears in an error message or help string, it
+% starts a new line in the output.
+\newlinechar = `^^J
+
+% Set up fixed words for English.
+\ifx\putwordChapter\undefined{\gdef\putwordChapter{Chapter}}\fi%
+\def\putwordInfo{Info}%
+\ifx\putwordSee\undefined{\gdef\putwordSee{See}}\fi%
+\ifx\putwordsee\undefined{\gdef\putwordsee{see}}\fi%
+\ifx\putwordfile\undefined{\gdef\putwordfile{file}}\fi%
+\ifx\putwordpage\undefined{\gdef\putwordpage{page}}\fi%
+\ifx\putwordsection\undefined{\gdef\putwordsection{section}}\fi%
+\ifx\putwordSection\undefined{\gdef\putwordSection{Section}}\fi%
+\ifx\putwordTableofContents\undefined{\gdef\putwordTableofContents{Table of Contents}}\fi%
+\ifx\putwordShortContents\undefined{\gdef\putwordShortContents{Short Contents}}\fi%
+\ifx\putwordAppendix\undefined{\gdef\putwordAppendix{Appendix}}\fi%
+
+% Ignore a token.
+%
+\def\gobble#1{}
+
+\hyphenation{ap-pen-dix}
+\hyphenation{mini-buf-fer mini-buf-fers}
+\hyphenation{eshell}
+
+% Margin to add to right of even pages, to left of odd pages.
+\newdimen \bindingoffset
+\newdimen \normaloffset
+\newdimen\pagewidth \newdimen\pageheight
+
+% 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.
+%
+\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
+\def\loggingall{\tracingcommands2 \tracingstats2
+ \tracingpages1 \tracingoutput1 \tracinglostchars1
+ \tracingmacros2 \tracingparagraphs1 \tracingrestores1
+ \showboxbreadth\maxdimen\showboxdepth\maxdimen
+}%
+
+%---------------------Begin change-----------------------
+%
+%%%% For @cropmarks command.
+% Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986
+%
+\newdimen\cornerlong \newdimen\cornerthick
+\newdimen \topandbottommargin
+\newdimen \outerhsize \newdimen \outervsize
+\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
+\outerhsize=7in
+%\outervsize=9.5in
+% Alternative @smallbook page size is 9.25in
+\outervsize=9.25in
+\topandbottommargin=.75in
+%
+%---------------------End change-----------------------
+
+% 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{%
+ \hoffset=\normaloffset
+ \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.
+ %
+ \escapechar = `\\ % use backslash in output files.
+ \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.
+ \shipout\vbox{%
+ \unvbox\headlinebox
+ \pagebody{#1}%
+ \unvbox\footlinebox
+ }%
+ }%
+ \advancepageno
+ \ifnum\outputpenalty>-20000 \else\dosupereject\fi
+}
+
+%%%% For @cropmarks command %%%%
+
+% Here is a modification of the main output routine for Near East Publications
+% This provides right-angle cropmarks at all four corners.
+% The contents of the page are centerlined into the cropmarks,
+% and any desired binding offset is added as an \hskip on either
+% site of the centerlined box. (P. A. MacKay, 12 November, 1986)
+%
+\def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up
+{\escapechar=`\\\relax % makes sure backslash is used in output files.
+ \shipout
+ \vbox to \outervsize{\hsize=\outerhsize
+ \vbox{\line{\ewtop\hfill\ewtop}}
+ \nointerlineskip
+ \line{\vbox{\moveleft\cornerthick\nstop}
+ \hfill
+ \vbox{\moveright\cornerthick\nstop}}
+ \vskip \topandbottommargin
+ \centerline{\ifodd\pageno\hskip\bindingoffset\fi
+ \vbox{
+ {\let\hsize=\pagewidth \makeheadline}
+ \pagebody{#1}
+ {\let\hsize=\pagewidth \makefootline}}
+ \ifodd\pageno\else\hskip\bindingoffset\fi}
+ \vskip \topandbottommargin plus1fill minus1fill
+ \boxmaxdepth\cornerthick
+ \line{\vbox{\moveleft\cornerthick\nsbot}
+ \hfill
+ \vbox{\moveright\cornerthick\nsbot}}
+ \nointerlineskip
+ \vbox{\line{\ewbot\hfill\ewbot}}
+ }}
+ \advancepageno
+ \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
+%
+% Do @cropmarks to get crop marks
+\def\cropmarks{\let\onepageout=\croppageout }
+
+\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 at 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 at 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#1{%
+ \let\next = #1%
+ \begingroup
+ \obeylines
+ \futurelet\temp\parseargx
+}
+
+% If the next token is an obeyed space (from an @example environment or
+% the like), remove it and recurse. Otherwise, we're done.
+\def\parseargx{%
+ % \obeyedspace is defined far below, after the definition of \sepspaces.
+ \ifx\obeyedspace\temp
+ \expandafter\parseargdiscardspace
+ \else
+ \expandafter\parseargline
+ \fi
+}
+
+% Remove a single space (as the delimiter token to the macro call).
+{\obeyspaces %
+ \gdef\parseargdiscardspace {\futurelet\temp\parseargx}}
+
+{\obeylines %
+ \gdef\parseargline#1^^M{%
+ \endgroup % End of the group started in \parsearg.
+ %
+ % First remove any @c comment, then any @comment.
+ % Result of each macro is put in \toks0.
+ \argremovec #1\c\relax %
+ \expandafter\argremovecomment \the\toks0 \comment\relax %
+ %
+ % Call the caller's macro, saved as \next in \parsearg.
+ \expandafter\next\expandafter{\the\toks0}%
+ }%
+}
+
+% Since all \c{,omment} does is throw away the argument, we can let TeX
+% do that for us. The \relax here is matched by the \relax in the call
+% in \parseargline; it could be more or less anything, its purpose is
+% just to delimit the argument to the \c.
+\def\argremovec#1\c#2\relax{\toks0 = {#1}}
+\def\argremovecomment#1\comment#2\relax{\toks0 = {#1}}
+
+% \argremovec{,omment} might leave us with trailing spaces, though; e.g.,
+% @end itemize @c foo
+% will have two active spaces as part of the argument with the
+% `itemize'. Here we remove all active spaces from #1, and assign the
+% result to \toks0.
+%
+% This loses if there are any *other* active characters besides spaces
+% in the argument -- _ ^ +, for example -- since they get expanded.
+% Fortunately, Texinfo does not define any such commands. (If it ever
+% does, the catcode of the characters in questionwill have to be changed
+% here.) But this means we cannot call \removeactivespaces as part of
+% \argremovec{,omment}, since @c uses \parsearg, and thus the argument
+% that \parsearg gets might well have any character at all in it.
+%
+\def\removeactivespaces#1{%
+ \begingroup
+ \ignoreactivespaces
+ \edef\temp{#1}%
+ \global\toks0 = \expandafter{\temp}%
+ \endgroup
+}
+
+% Change the active space to expand to nothing.
+%
+\begingroup
+ \obeyspaces
+ \gdef\ignoreactivespaces{\obeyspaces\let =\empty}
+\endgroup
+
+
+\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
+
+%% These are used to keep @begin/@end levels from running away
+%% Call \inENV within environments (after a \begingroup)
+\newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
+\def\ENVcheck{%
+\ifENV\errmessage{Still within an environment. Type Return to continue.}
+\endgroup\fi} % This is not perfect, but it should reduce lossage
+
+% @begin foo is the same as @foo, for now.
+\newhelp\EMsimple{Type <Return> to continue.}
+
+\outer\def\begin{\parsearg\beginxxx}
+
+\def\beginxxx #1{%
+\expandafter\ifx\csname #1\endcsname\relax
+{\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else
+\csname #1\endcsname\fi}
+
+% @end foo executes the definition of \Efoo.
+%
+\def\end{\parsearg\endxxx}
+\def\endxxx #1{%
+ \removeactivespaces{#1}%
+ \edef\endthing{\the\toks0}%
+ %
+ \expandafter\ifx\csname E\endthing\endcsname\relax
+ \expandafter\ifx\csname \endthing\endcsname\relax
+ % There's no \foo, i.e., no ``environment'' foo.
+ \errhelp = \EMsimple
+ \errmessage{Undefined command `@end \endthing'}%
+ \else
+ \unmatchedenderror\endthing
+ \fi
+ \else
+ % Everything's ok; the right environment has been started.
+ \csname E\endthing\endcsname
+ \fi
+}
+
+% There is an environment #1, but it hasn't been started. Give an error.
+%
+\def\unmatchedenderror#1{%
+ \errhelp = \EMsimple
+ \errmessage{This `@end #1' doesn't have a matching `@#1'}%
+}
+
+% Define the control sequence \E#1 to give an unmatched @end error.
+%
+\def\defineunmatchedend#1{%
+ \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}%
+}
+
+
+% Single-spacing is done by various environments (specifically, in
+% \nonfillstart and \quotations).
+\newskip\singlespaceskip \singlespaceskip = 12.5pt
+\def\singlespace{%
+ % Why was this kern here? It messes up equalizing space above and below
+ % environments. --karl, 6may93
+ %{\advance \baselineskip by -\singlespaceskip
+ %\kern \baselineskip}%
+ \setleading \singlespaceskip
+}
+
+%% Simple single-character @ commands
+
+% @@ prints an @
+% Kludge this until the fonts are right (grr).
+\def\@{{\tt \char '100}}
+
+% 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 \char '173}}
+\def\myrbrace {{\tt \char '175}}
+\let\{=\mylbrace
+\let\}=\myrbrace
+\begingroup
+ % Definitions to produce actual \{ & \} command in an index.
+ \catcode`\{ = 12 \catcode`\} = 12
+ \catcode`\[ = 1 \catcode`\] = 2
+ \catcode`\@ = 0 \catcode`\\ = 12
+ @gdef at lbracecmd[\{]%
+ @gdef at rbracecmd[\}]%
+ at endgroup
+
+% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @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
+% Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss.
+\def\questiondown{?`}
+\def\exclamdown{!`}
+
+% 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
+}
+
+% @: forces normal size whitespace following.
+\def\:{\spacefactor=1000 }
+
+% @* forces a line break.
+\def\*{\hfil\break\hbox{}\ignorespaces}
+
+% @. is an end-of-sentence period.
+\def\.{.\spacefactor=3000 }
+
+% @enddots{} is an end-of-sentence ellipsis.
+\gdef\enddots{$\mathinner{\ldotp\ldotp\ldotp\ldotp}$\spacefactor=3000}
+
+% @! is an end-of-sentence bang.
+\gdef\!{!\spacefactor=3000 }
+
+% @? is an end-of-sentence query.
+\gdef\?{?\spacefactor=3000 }
+
+% @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.
+%
+\def\group{\begingroup
+ \ifnum\catcode13=\active \else
+ \errhelp = \groupinvalidhelp
+ \errmessage{@group invalid in context where filling is enabled}%
+ \fi
+ %
+ % The \vtop we start below 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. (See p.82 of
+ % the TeXbook.) Thus, space below is not quite equal to space
+ % above. But it's pretty close.
+ \def\Egroup{%
+ \egroup % End the \vtop.
+ \endgroup % End the \group.
+ }%
+ %
+ \vtop\bgroup
+ % We have to put a strut on the last line in case the @group is in
+ % the midst of an example, rather than completely enclosing it.
+ % Otherwise, the interline space between the last line of the group
+ % and the first line afterwards is too small. But we can't put the
+ % strut in \Egroup, since there it would be on a line by itself.
+ % Hence this just inserts a strut at the beginning of each line.
+ \everypar = {\strut}%
+ %
+ % Since we have a strut on every line, we don't need any of TeX's
+ % normal interline spacing.
+ \offinterlineskip
+ %
+ % OK, but now we have to do something about blank
+ % lines in the input in @example-like environments, which normally
+ % just turn into \lisppar, which will insert no space now that we've
+ % turned off the interline space. Simplest is to make them be an
+ % empty paragraph.
+ \ifx\par\lisppar
+ \edef\par{\leavevmode \par}%
+ %
+ % Reset ^^M's definition to new definition of \par.
+ \obeylines
+ \fi
+ %
+ % 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
+}
+%
+% 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
+
+\def\need{\parsearg\needx}
+
+% Old definition--didn't work.
+%\def\needx #1{\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\penalty 10000
+%\prevdepth=-1000pt
+%}}
+
+\def\needx#1{%
+ % Go into vertical mode, so we don't make a big box in the middle of a
+ % paragraph.
+ \par
+ %
+ % Don't add any leading before our big empty box, but allow a page
+ % break, since the best break might be right here.
+ \allowbreak
+ \nointerlineskip
+ \vtop to #1\mil{\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
+}
+
+% @br forces paragraph break
+
+\let\br = \par
+
+% @dots{} output some dots
+
+\def\dots{$\ldots$}
+
+% @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.
+\def\exdent{\parsearg\exdentyyy}
+\def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}}
+
+% This defn is used inside nofill environments such as @example.
+\def\nofillexdent{\parsearg\nofillexdentyyy}
+\def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount
+\leftline{\hskip\leftskip{\rm#1}}}}
+
+% @inmargin{TEXT} puts TEXT in the margin next to the current paragraph.
+
+\def\inmargin#1{%
+\strut\vadjust{\nobreak\kern-\strutdepth
+ \vtop to \strutdepth{\baselineskip\strutdepth\vss
+ \llap{\rightskip=\inmarginspacing \vbox{\noindent #1}}\null}}}
+\newskip\inmarginspacing \inmarginspacing=1cm
+\def\strutdepth{\dp\strutbox}
+
+%\hbox{{\rm#1}}\hfil\break}}
+
+% @include file insert text of that file as input.
+% Allow normal characters that we make active in the argument (a file name).
+\def\include{\begingroup
+ \catcode`\\=12
+ \catcode`~=12
+ \catcode`^=12
+ \catcode`_=12
+ \catcode`|=12
+ \catcode`<=12
+ \catcode`>=12
+ \catcode`+=12
+ \parsearg\includezzz}
+% Restore active chars for included file.
+\def\includezzz#1{\endgroup\begingroup
+ % Read the included file in a group so nested @include's work.
+ \def\thisfile{#1}%
+ \input\thisfile
+\endgroup}
+
+\def\thisfile{}
+
+% @center line outputs that line, centered
+
+\def\center{\parsearg\centerzzz}
+\def\centerzzz #1{{\advance\hsize by -\leftskip
+\advance\hsize by -\rightskip
+\centerline{#1}}}
+
+% @sp n outputs n lines of vertical space
+
+\def\sp{\parsearg\spxxx}
+\def\spxxx #1{\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{\catcode 64=\other \catcode 123=\other \catcode 125=\other%
+\parsearg \commentxxx}
+
+\def\commentxxx #1{\catcode 64=0 \catcode 123=1 \catcode 125=2 }
+
+\let\c=\comment
+
+% @paragraphindent is defined for the Info formatting commands only.
+\let\paragraphindent=\comment
+
+% Prevent errors for section commands.
+% Used in @ignore and in failing conditionals.
+\def\ignoresections{%
+\let\chapter=\relax
+\let\unnumbered=\relax
+\let\top=\relax
+\let\unnumberedsec=\relax
+\let\unnumberedsection=\relax
+\let\unnumberedsubsec=\relax
+\let\unnumberedsubsection=\relax
+\let\unnumberedsubsubsec=\relax
+\let\unnumberedsubsubsection=\relax
+\let\section=\relax
+\let\subsec=\relax
+\let\subsubsec=\relax
+\let\subsection=\relax
+\let\subsubsection=\relax
+\let\appendix=\relax
+\let\appendixsec=\relax
+\let\appendixsection=\relax
+\let\appendixsubsec=\relax
+\let\appendixsubsection=\relax
+\let\appendixsubsubsec=\relax
+\let\appendixsubsubsection=\relax
+\let\contents=\relax
+\let\smallbook=\relax
+\let\titlepage=\relax
+}
+
+% Used in nested conditionals, where we have to parse the Texinfo source
+% and so want to turn off most commands, in case they are used
+% incorrectly.
+%
+\def\ignoremorecommands{%
+ \let\defcodeindex = \relax
+ \let\defcv = \relax
+ \let\deffn = \relax
+ \let\deffnx = \relax
+ \let\defindex = \relax
+ \let\defivar = \relax
+ \let\defmac = \relax
+ \let\defmethod = \relax
+ \let\defop = \relax
+ \let\defopt = \relax
+ \let\defspec = \relax
+ \let\deftp = \relax
+ \let\deftypefn = \relax
+ \let\deftypefun = \relax
+ \let\deftypevar = \relax
+ \let\deftypevr = \relax
+ \let\defun = \relax
+ \let\defvar = \relax
+ \let\defvr = \relax
+ \let\ref = \relax
+ \let\xref = \relax
+ \let\printindex = \relax
+ \let\pxref = \relax
+ \let\settitle = \relax
+ \let\setchapternewpage = \relax
+ \let\setchapterstyle = \relax
+ \let\everyheading = \relax
+ \let\evenheading = \relax
+ \let\oddheading = \relax
+ \let\everyfooting = \relax
+ \let\evenfooting = \relax
+ \let\oddfooting = \relax
+ \let\headings = \relax
+ \let\include = \relax
+ \let\lowersections = \relax
+ \let\down = \relax
+ \let\raisesections = \relax
+ \let\up = \relax
+ \let\set = \relax
+ \let\clear = \relax
+ \let\item = \relax
+}
+
+% Ignore @ignore ... @end ignore.
+%
+\def\ignore{\doignore{ignore}}
+
+% Also ignore @ifinfo, @ifhtml, @html, @menu, and @direntry text.
+%
+\def\ifinfo{\doignore{ifinfo}}
+\def\ifhtml{\doignore{ifhtml}}
+\def\html{\doignore{html}}
+\def\menu{\doignore{menu}}
+\def\direntry{\doignore{direntry}}
+
+% Also ignore @macro ... @end macro. The user must run texi2dvi,
+% which runs makeinfo to do macro expansion. Ignore @unmacro, too.
+\def\macro{\doignore{macro}}
+\let\unmacro = \comment
+
+
+% @dircategory CATEGORY -- specify a category of the dir file
+% which this file should belong to. Ignore this in TeX.
+\let\dircategory = \comment
+
+% Ignore text until a line `@end #1'.
+%
+\def\doignore#1{\begingroup
+ % Don't complain about control sequences we have declared \outer.
+ \ignoresections
+ %
+ % Define a command to swallow text until we reach `@end #1'.
+ \long\def\doignoretext##1\end #1{\enddoignore}%
+ %
+ % Make sure that spaces turn into tokens that match what \doignoretext wants.
+ \catcode32 = 10
+ %
+ % And now expand that command.
+ \doignoretext
+}
+
+% What we do to finish off ignored text.
+%
+\def\enddoignore{\endgroup\ignorespaces}%
+
+\newif\ifwarnedobs\warnedobsfalse
+\def\obstexwarn{%
+ \ifwarnedobs\relax\else
+ % We need to warn folks that they may have trouble with TeX 3.0.
+ % This uses \immediate\write16 rather than \message to get newlines.
+ \immediate\write16{}
+ \immediate\write16{***WARNING*** for users of Unix TeX 3.0!}
+ \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).}
+ \immediate\write16{If you are running another version of TeX, relax.}
+ \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
+ \immediate\write16{ Then upgrade your TeX installation if you can.}
+ \immediate\write16{ (See ftp://ftp.gnu.ai.mit.edu/pub/gnu/TeX.README.)}
+ \immediate\write16{If you are stuck with version 3.0, run the}
+ \immediate\write16{ script ``tex3patch'' from the Texinfo distribution}
+ \immediate\write16{ to use a workaround.}
+ \immediate\write16{}
+ \global\warnedobstrue
+ \fi
+}
+
+% **In TeX 3.0, setting text in \nullfont hangs tex. For a
+% workaround (which requires the file ``dummy.tfm'' to be installed),
+% uncomment the following line:
+%%%%%\font\nullfont=dummy\let\obstexwarn=\relax
+
+% Ignore text, except that we keep track of conditional commands for
+% purposes of nesting, up to an `@end #1' command.
+%
+\def\nestedignore#1{%
+ \obstexwarn
+ % We must actually expand the ignored text to look for the @end
+ % command, so that nested ignore constructs work. Thus, we put the
+ % text into a \vbox and then do nothing with the result. To minimize
+ % the change of memory overflow, we follow the approach outlined on
+ % page 401 of the TeXbook: make the current font be a dummy font.
+ %
+ \setbox0 = \vbox\bgroup
+ % Don't complain about control sequences we have declared \outer.
+ \ignoresections
+ %
+ % Define `@end #1' to end the box, which will in turn undefine the
+ % @end command again.
+ \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}%
+ %
+ % We are going to be parsing Texinfo commands. Most cause no
+ % trouble when they are used incorrectly, but some commands do
+ % complicated argument parsing or otherwise get confused, so we
+ % undefine them.
+ %
+ % We can't do anything about stray @-signs, unfortunately;
+ % they'll produce `undefined control sequence' errors.
+ \ignoremorecommands
+ %
+ % Set the current font to be \nullfont, a TeX primitive, and define
+ % all the font commands to also use \nullfont. We don't use
+ % dummy.tfm, as suggested in the TeXbook, because not all sites
+ % might have that installed. Therefore, math mode will still
+ % produce output, but that should be an extremely small amount of
+ % stuff compared to the main input.
+ %
+ \nullfont
+ \let\tenrm = \nullfont \let\tenit = \nullfont \let\tensl = \nullfont
+ \let\tenbf = \nullfont \let\tentt = \nullfont \let\smallcaps = \nullfont
+ \let\tensf = \nullfont
+ % Similarly for index fonts (mostly for their use in
+ % smallexample)
+ \let\indrm = \nullfont \let\indit = \nullfont \let\indsl = \nullfont
+ \let\indbf = \nullfont \let\indtt = \nullfont \let\indsc = \nullfont
+ \let\indsf = \nullfont
+ %
+ % Don't complain when characters are missing from the fonts.
+ \tracinglostchars = 0
+ %
+ % Don't bother to do space factor calculations.
+ \frenchspacing
+ %
+ % Don't report underfull hboxes.
+ \hbadness = 10000
+ %
+ % Do minimal line-breaking.
+ \pretolerance = 10000
+ %
+ % Do not execute instructions in @tex
+ \def\tex{\doignore{tex}}
+}
+
+% @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. Make sure the catcode of space is correct to avoid
+% losing inside @example, for instance.
+%
+\def\set{\begingroup\catcode` =10
+ \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
+ \parsearg\setxxx}
+\def\setxxx#1{\setyyy#1 \endsetyyy}
+\def\setyyy#1 #2\endsetyyy{%
+ \def\temp{#2}%
+ \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty
+ \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted.
+ \fi
+ \endgroup
+}
+% Can't use \xdef to pre-expand #2 and save some time, since \temp or
+% \next or other control sequences that we've defined might get us into
+% an infinite loop. Consider `@set foo @cite{bar}'.
+\def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}}
+
+% @clear VAR clears (i.e., unsets) the variable VAR.
+%
+\def\clear{\parsearg\clearxxx}
+\def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax}
+
+% @value{foo} gets the text saved in variable foo.
+%
+\def\value{\begingroup
+ \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
+ \valuexxx}
+\def\valuexxx#1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ {\{No value for ``#1''\}}%
+ \else
+ \csname SET#1\endcsname
+ \fi
+\endgroup}
+
+% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
+% with @set.
+%
+\def\ifset{\parsearg\ifsetxxx}
+\def\ifsetxxx #1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ \expandafter\ifsetfail
+ \else
+ \expandafter\ifsetsucceed
+ \fi
+}
+\def\ifsetsucceed{\conditionalsucceed{ifset}}
+\def\ifsetfail{\nestedignore{ifset}}
+\defineunmatchedend{ifset}
+
+% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
+% defined with @set, or has been undefined with @clear.
+%
+\def\ifclear{\parsearg\ifclearxxx}
+\def\ifclearxxx #1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ \expandafter\ifclearsucceed
+ \else
+ \expandafter\ifclearfail
+ \fi
+}
+\def\ifclearsucceed{\conditionalsucceed{ifclear}}
+\def\ifclearfail{\nestedignore{ifclear}}
+\defineunmatchedend{ifclear}
+
+% @iftex always succeeds; we read the text following, through @end
+% iftex). But `@end iftex' should be valid only after an @iftex.
+%
+\def\iftex{\conditionalsucceed{iftex}}
+\defineunmatchedend{iftex}
+
+% We can't just want to start a group at @iftex (for example) and end it
+% at @end iftex, since then @set commands inside the conditional have no
+% effect (they'd get reverted at the end of the group). So we must
+% define \Eiftex to redefine itself to be its previous value. (We can't
+% just define it to fail again with an ``unmatched end'' error, since
+% the @ifset might be nested.)
+%
+\def\conditionalsucceed#1{%
+ \edef\temp{%
+ % Remember the current value of \E#1.
+ \let\nece{prevE#1} = \nece{E#1}%
+ %
+ % At the `@end #1', redefine \E#1 to be its previous value.
+ \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}%
+ }%
+ \temp
+}
+
+% We need to expand lots of \csname's, but we don't want to expand the
+% control sequences after we've constructed them.
+%
+\def\nece#1{\expandafter\noexpand\csname#1\endcsname}
+
+% @asis just yields its argument. Used with @table, for example.
+%
+\def\asis#1{#1}
+
+% @math means output in math mode.
+% We don't use $'s directly in the definition of \math because control
+% sequences like \math are expanded when the toc file is written. Then,
+% we read the toc file back, the $'s will be normal characters (as they
+% should be, according to the definition of Texinfo). So we must use a
+% control sequence to switch into and out of math mode.
+%
+% This isn't quite enough for @math to work properly in indices, but it
+% seems unlikely it will ever be needed there.
+%
+\let\implicitmath = $
+\def\math#1{\implicitmath #1\implicitmath}
+
+% @bullet and @minus need the same treatment as @math, just above.
+\def\bullet{\implicitmath\ptexbullet\implicitmath}
+\def\minus{\implicitmath-\implicitmath}
+
+\def\node{\ENVcheck\parsearg\nodezzz}
+\def\nodezzz#1{\nodexxx [#1,]}
+\def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
+\let\nwnode=\node
+\let\lastnode=\relax
+
+\def\donoderef{\ifx\lastnode\relax\else
+\expandafter\expandafter\expandafter\setref{\lastnode}\fi
+\global\let\lastnode=\relax}
+
+\def\unnumbnoderef{\ifx\lastnode\relax\else
+\expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi
+\global\let\lastnode=\relax}
+
+\def\appendixnoderef{\ifx\lastnode\relax\else
+\expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi
+\global\let\lastnode=\relax}
+
+% @refill is a no-op.
+\let\refill=\relax
+
+% @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{%
+ \readauxfile
+ \opencontents
+ \openindices
+ \fixbackslash % Turn off hack to swallow `\input texinfo'.
+ \global\let\setfilename=\comment % Ignore extra @setfilename cmds.
+ \comment % Ignore the actual filename.
+}
+
+% @bye.
+\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
+
+% \def\macro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\macroxxx}
+% \def\macroxxx#1#2 \end macro{%
+% \expandafter\gdef\macrotemp#1{#2}%
+% \endgroup}
+
+%\def\linemacro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\linemacroxxx}
+%\def\linemacroxxx#1#2 \end linemacro{%
+%\let\parsearg=\relax
+%\edef\macrotempx{\csname M\butfirst\expandafter\string\macrotemp\endcsname}%
+%\expandafter\xdef\macrotemp{\parsearg\macrotempx}%
+%\expandafter\gdef\macrotempx#1{#2}%
+%\endgroup}
+
+%\def\butfirst#1{}
+
+
+\message{fonts,}
+
+% Font-change commands.
+
+% Texinfo supports the sans serif font style, which plain TeX does not.
+% So we set up a \sf analogous to plain's \rm, etc.
+\newfam\sffam
+\def\sf{\fam=\sffam \tensf}
+\let\li = \sf % Sometimes we call it \li, not \sf.
+
+% We don't need math for this one.
+\def\ttsl{\tenttsl}
+
+%% Try out Computer Modern fonts at \magstephalf
+\let\mainmagstep=\magstephalf
+
+% 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}
+
+\ifx\bigger\relax
+\let\mainmagstep=\magstep1
+\setfont\textrm\rmshape{12}{1000}
+\setfont\texttt\ttshape{12}{1000}
+\else
+\setfont\textrm\rmshape{10}{\mainmagstep}
+\setfont\texttt\ttshape{10}{\mainmagstep}
+\fi
+% Instead of cmb10, you many want to use cmbx10.
+% cmbx10 is a prettier font on its own, but cmb10
+% looks better when embedded in a line with cmr10.
+\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, etc.
+\setfont\defbf\bxshape{10}{\magstep1} %was 1314
+\setfont\deftt\ttshape{10}{\magstep1}
+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
+
+% Fonts for indices and small examples (9pt).
+% We actually use the slanted font rather than the italic,
+% because texinfo normally uses the slanted fonts for that.
+% Do not make many font distinctions in general in the index, since they
+% aren't very useful.
+\setfont\ninett\ttshape{9}{1000}
+\setfont\indrm\rmshape{9}{1000}
+\setfont\indit\slshape{9}{1000}
+\let\indsl=\indit
+\let\indtt=\ninett
+\let\indttsl=\ninett
+\let\indsf=\indrm
+\let\indbf=\indrm
+\setfont\indsc\scshape{10}{900}
+\font\indi=cmmi9
+\font\indsy=cmsy9
+
+% Chapter (and unnumbered) fonts (17.28pt).
+\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{12}{\magstep2}
+\let\chapbf=\chaprm
+\setfont\chapsc\scbshape{10}{\magstep3}
+\font\chapi=cmmi12 scaled \magstep2
+\font\chapsy=cmsy10 scaled \magstep3
+
+% Section fonts (14.4pt).
+\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
+
+% \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad.
+% \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded.
+% \setfont\ssecsl\slshape{10}{\magstep1}
+% \setfont\ssectt\ttshape{10}{\magstep1}
+% \setfont\ssecsf\sfshape{10}{\magstep1}
+
+%\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx.
+%\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than
+%\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1.
+%\setfont\ssectt\ttshape{10}{1315}
+%\setfont\ssecsf\sfshape{10}{1315}
+
+%\let\ssecbf=\ssecrm
+
+% Subsection fonts (13.15pt).
+\setfont\ssecrm\rmbshape{12}{\magstephalf}
+\setfont\ssecit\itbshape{10}{1315}
+\setfont\ssecsl\slbshape{10}{1315}
+\setfont\ssectt\ttbshape{12}{\magstephalf}
+\setfont\ssecttsl\ttslshape{10}{\magstep1}
+\setfont\ssecsf\sfbshape{12}{\magstephalf}
+\let\ssecbf\ssecrm
+\setfont\ssecsc\scbshape{10}{\magstep1}
+\font\sseci=cmmi12 scaled \magstephalf
+\font\ssecsy=cmsy10 scaled \magstep1
+% The smallcaps and symbol fonts should actually be scaled \magstep1.5,
+% but that is not a standard magnification.
+
+% Fonts for title page:
+\setfont\titlerm\rmbshape{12}{\magstep3}
+\let\authorrm = \secrm
+
+% 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, 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 so that font changes will continue to work
+% in math mode, where it is the current \fam that is relevant in most
+% cases, not the current font. Plain TeX does \def\bf{\fam=\bffam
+% \tenbf}, for example. By redefining \tenbf, we obviate the need to
+% redefine \bf itself.
+\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
+ \resetmathfonts}
+\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
+ \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
+ \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
+ \resetmathfonts \setleading{15pt}}
+\let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf?
+\def\indexfonts{%
+ \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl
+ \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc
+ \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl
+ \resetmathfonts \setleading{12pt}}
+
+% Set up the default fonts, so we can use them for creating boxes.
+%
+\textfonts
+
+% 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\bxshape{12}{1000}
+\setfont\shortcontsl\slshape{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\/\fi\fi\fi}
+\def\smartitalic#1{{\sl #1}\futurelet\next\smartitalicx}
+
+\let\i=\smartitalic
+\let\var=\smartitalic
+\let\dfn=\smartitalic
+\let\emph=\smartitalic
+\let\cite=\smartitalic
+
+\def\b#1{{\bf #1}}
+\let\strong=\b
+
+% 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 = `- }
+
+\def\t#1{%
+ {\tt \rawbackslash \frenchspacing #1}%
+ \null
+}
+\let\ttfont=\t
+\def\samp #1{`\tclose{#1}'\null}
+\setfont\smallrm\rmshape{8}{1000}
+\font\smallsy=cmsy9
+\def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{%
+ \raise0.4pt\hbox{$\langle$}\kern-.08em\vtop{%
+ \vbox{\hrule\kern-0.4pt
+ \hbox{\raise0.4pt\hbox{\vphantom{$\langle$}}#1}}%
+ \kern-0.4pt\hrule}%
+ \kern-.06em\raise0.4pt\hbox{$\rangle$}}}}
+% The old definition, with no lozenge:
+%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+
+\let\file=\samp
+\let\url=\samp % perhaps include a hypertex \special eventually
+\def\email#1{$\langle${\tt #1}$\rangle$}
+
+% @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
+ \frenchspacing
+ #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
+\catcode`\|=\active
+\global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex}
+% The following is used by \doprintindex to insure that long function names
+% wrap around. It is necessary for - and _ to be active before the index is
+% read from the file, as \entry parses the arguments long before \code is
+% ever called. -- mycroft
+% _ is always active; and it shouldn't be \let = to an _ that is a
+% subscript character anyway. Then, @cindex @samp{_} (for example)
+% fails. --karl
+\global\def\indexbreaks{%
+ \catcode`\-=\active \let-\realdash
+}
+}
+
+\def\realdash{-}
+\def\codedash{-\discretionary{}{}{}}
+\def\codeunder{\normalunderscore\discretionary{}{}{}}
+\def\codex #1{\tclose{#1}\endgroup}
+
+%\let\exp=\tclose %Was temporary
+
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+%
+\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{\ttsl\look}}\fi
+\else{\tclose{\ttsl\look}}\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}
+
+\def\r#1{{\rm #1}} % roman font
+% Use of \lowercase was suggested.
+\def\sc#1{{\smallcaps#1}} % smallcaps font
+\def\ii#1{{\it #1}} % italic font
+
+% @pounds{} is a sterling sign.
+\def\pounds{{\it\$}}
+
+
+\message{page headings,}
+
+\newskip\titlepagetopglue \titlepagetopglue = 1.5in
+\newskip\titlepagebottomglue \titlepagebottomglue = 2pc
+
+% First the title page. Must do @settitle before @titlepage.
+\def\titlefont#1{{\titlerm #1}}
+
+\newif\ifseenauthor
+\newif\iffinishedtitlepage
+
+\def\shorttitlepage{\parsearg\shorttitlepagezzz}
+\def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+ \endgroup\page\hbox{}\page}
+
+\def\titlepage{\begingroup \parindent=0pt \textfonts
+ \let\subtitlerm=\tenrm
+% I deinstalled the following change because \cmr12 is undefined.
+% This change was not in the ChangeLog anyway. --rms.
+% \let\subtitlerm=\cmr12
+ \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%
+ %
+ \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%
+ %
+ % Leave some space at the very top of the page.
+ \vglue\titlepagetopglue
+ %
+ % Now you can print the title using @title.
+ \def\title{\parsearg\titlezzz}%
+ \def\titlezzz##1{\leftline{\titlefont{##1}}
+ % print a rule at the page bottom also.
+ \finishedtitlepagefalse
+ \vskip4pt \hrule height 4pt width \hsize \vskip4pt}%
+ % No rule at page bottom unless we print one at the top with @title.
+ \finishedtitlepagetrue
+ %
+ % Now you can put text using @subtitle.
+ \def\subtitle{\parsearg\subtitlezzz}%
+ \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}%
+ %
+ % @author should come last, but may come many times.
+ \def\author{\parsearg\authorzzz}%
+ \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi
+ {\authorfont \leftline{##1}}}%
+ %
+ % 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
+ \oldpage
+ \let\page = \oldpage
+ \hbox{}}%
+% \def\page{\oldpage \hbox{}}
+}
+
+\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
+ \HEADINGSon
+}
+
+\def\finishtitlepage{%
+ \vskip4pt \hrule height 2pt width \hsize
+ \vskip\titlepagebottomglue
+ \finishedtitlepagetrue
+}
+
+%%% Set up page headings and footings.
+
+\let\thispage=\folio
+
+\newtoks \evenheadline % Token sequence for heading line of even pages
+\newtoks \oddheadline % Token sequence for heading line of odd pages
+\newtoks \evenfootline % Token sequence for footing line of even pages
+\newtoks \oddfootline % Token sequence for footing line of 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\oddheading{\parsearg\oddheadingxxx}
+\def\everyheading{\parsearg\everyheadingxxx}
+
+\def\evenfooting{\parsearg\evenfootingxxx}
+\def\oddfooting{\parsearg\oddfootingxxx}
+\def\everyfooting{\parsearg\everyfootingxxx}
+
+{\catcode`\@=0 %
+
+\gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish}
+\gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{%
+\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish}
+\gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{%
+\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\everyheadingxxx #1{\everyheadingyyy #1@|@|@|@|\finish}
+\gdef\everyheadingyyy #1@|#2@|#3@|#4\finish{%
+\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
+\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish}
+\gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{%
+\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish}
+\gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{%
+\global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\everyfootingxxx #1{\everyfootingyyy #1@|@|@|@|\finish}
+\gdef\everyfootingyyy #1@|#2@|#3@|#4\finish{%
+\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
+\global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+%
+}% unbind the catcode of @.
+
+% @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
+% Produces Day Month Year style of output.
+\def\today{\number\day\space
+\ifcase\month\or
+January\or February\or March\or April\or May\or June\or
+July\or August\or September\or October\or November\or December\fi
+\space\number\year}
+
+% Use this if you want the Month Day, Year style of output.
+%\def\today{\ifcase\month\or
+%January\or February\or March\or April\or May\or June\or
+%July\or August\or September\or October\or November\or December\fi
+%\space\number\day, \number\year}
+
+% @settitle line... specifies the title of the document, for headings
+% It generates no output of its own
+
+\def\thistitle{No Title}
+\def\settitle{\parsearg\settitlezzz}
+\def\settitlezzz #1{\gdef\thistitle{#1}}
+
+
+\message{tables,}
+
+% @tabs -- simple alignment
+
+% These don't work. For one thing, \+ is defined as outer.
+% So these macros cannot even be defined.
+
+%\def\tabs{\parsearg\tabszzz}
+%\def\tabszzz #1{\settabs\+#1\cr}
+%\def\tabline{\parsearg\tablinezzz}
+%\def\tablinezzz #1{\+#1\cr}
+%\def\&{&}
+
+% Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(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, @vtable, 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\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz}
+\def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz}
+
+\def\internalBkitem{\smallbreak \parsearg\kitemzzz}
+\def\internalBkitemx{\itemxpar \parsearg\kitemzzz}
+
+\def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}%
+ \itemzzz {#1}}
+
+\def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}%
+ \itemzzz {#1}}
+
+\def\itemzzz #1{\begingroup %
+ \advance\hsize by -\rightskip
+ \advance\hsize by -\tableindent
+ \setbox0=\hbox{\itemfont{#1}}%
+ \itemindex{#1}%
+ \nobreak % This prevents a break before @itemx.
+ %
+ % Be sure we are not still in the middle of a paragraph.
+ %{\parskip = 0in
+ %\par
+ %}%
+ %
+ % 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. Unfortunately
+ % we can't prevent a possible page break at the following
+ % \baselineskip glue.
+ \nobreak
+ \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. Since that
+ % text will be indented by \tableindent, we make the item text be in
+ % a zero-width box.
+ \noindent
+ \rlap{\hskip -\tableindent\box0}\ignorespaces%
+ \endgroup%
+ \itemxneedsnegativevskiptrue%
+ \fi
+}
+
+\def\item{\errmessage{@item while not in a table}}
+\def\itemx{\errmessage{@itemx while not in a table}}
+\def\kitem{\errmessage{@kitem while not in a table}}
+\def\kitemx{\errmessage{@kitemx while not in a table}}
+\def\xitem{\errmessage{@xitem while not in a table}}
+\def\xitemx{\errmessage{@xitemx while not in a table}}
+
+%% Contains a kludge to get @end[description] to work
+\def\description{\tablez{\dontindex}{1}{}{}{}{}}
+
+\def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}
+{\obeylines\obeyspaces%
+\gdef\tablex #1^^M{%
+\tabley\dontindex#1 \endtabley}}
+
+\def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex}
+{\obeylines\obeyspaces%
+\gdef\ftablex #1^^M{%
+\tabley\fnitemindex#1 \endtabley
+\def\Eftable{\endgraf\afterenvbreak\endgroup}%
+\let\Etable=\relax}}
+
+\def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex}
+{\obeylines\obeyspaces%
+\gdef\vtablex #1^^M{%
+\tabley\vritemindex#1 \endtabley
+\def\Evtable{\endgraf\afterenvbreak\endgroup}%
+\let\Etable=\relax}}
+
+\def\dontindex #1{}
+\def\fnitemindex #1{\doind {fn}{\code{#1}}}%
+\def\vritemindex #1{\doind {vr}{\code{#1}}}%
+
+{\obeyspaces %
+\gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup%
+\tablez{#1}{#2}{#3}{#4}{#5}{#6}}}
+
+\def\tablez #1#2#3#4#5#6{%
+\aboveenvbreak %
+\begingroup %
+\def\Edescription{\Etable}% Necessary kludge.
+\let\itemindex=#1%
+\ifnum 0#3>0 \advance \leftskip by #3\mil \fi %
+\ifnum 0#4>0 \tableindent=#4\mil \fi %
+\ifnum 0#5>0 \advance \rightskip by #5\mil \fi %
+\def\itemfont{#2}%
+\itemmax=\tableindent %
+\advance \itemmax by -\itemmargin %
+\advance \leftskip by \tableindent %
+\exdentamount=\tableindent
+\parindent = 0pt
+\parskip = \smallskipamount
+\ifdim \parskip=0pt \parskip=2pt \fi%
+\def\Etable{\endgraf\afterenvbreak\endgroup}%
+\let\item = \internalBitem %
+\let\itemx = \internalBitemx %
+\let\kitem = \internalBkitem %
+\let\kitemx = \internalBkitemx %
+\let\xitem = \internalBxitem %
+\let\xitemx = \internalBxitemx %
+}
+
+% This is the counter used by @enumerate, which is really @itemize
+
+\newcount \itemno
+
+\def\itemize{\parsearg\itemizezzz}
+
+\def\itemizezzz #1{%
+ \begingroup % ended by the @end itemsize
+ \itemizey {#1}{\Eitemize}
+}
+
+\def\itemizey #1#2{%
+\aboveenvbreak %
+\itemmax=\itemindent %
+\advance \itemmax by -\itemmargin %
+\advance \leftskip by \itemindent %
+\exdentamount=\itemindent
+\parindent = 0pt %
+\parskip = \smallskipamount %
+\ifdim \parskip=0pt \parskip=2pt \fi%
+\def#2{\endgraf\afterenvbreak\endgroup}%
+\def\itemcontents{#1}%
+\let\item=\itemizeitem}
+
+% Set sfcode to normal for the chars that usually have another value.
+% These are `.?!:;,'
+\def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000
+ \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 }
+
+% \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'.
+%
+\def\enumerate{\parsearg\enumeratezzz}
+\def\enumeratezzz #1{\enumeratey #1 \endenumeratey}
+\def\enumeratey #1 #2\endenumeratey{%
+ \begingroup % ended by the @end enumerate
+ %
+ % 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 itemizey, 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
+ \itemizey{#1.}\Eenumerate\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}
+
+% Definition of @item while inside @itemize.
+
+\def\itemizeitem{%
+\advance\itemno by 1
+{\let\par=\endgraf \smallbreak}%
+\ifhmode \errmessage{\in hmode at itemizeitem}\fi
+{\parskip=0in \hskip 0pt
+\hbox to 0pt{\hss \itemcontents\hskip \itemmargin}%
+\vadjust{\penalty 1200}}%
+\flushcr}
+
+% @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.
+%
+% For those who want to use more than one line's worth of words in
+% the preamble, break the line within one argument and it
+% will parse correctly, i.e.,
+%
+% @multitable {Column 1 template} {Column 2 template} {Column 3
+% template}
+% Not:
+% @multitable {Column 1 template} {Column 2 template}
+% {Column 3 template}
+
+% 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 at tab@tab will produce two empty columns.
+
+% @item, @tab, @multitable or @end multitable 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 at 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.
+
+%%%%
+% Dimensions
+
+\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
+
+%% 2/1/96, to allow fractions to be given with more than one digit.
+\def\pickupwholefraction#1 {\global\advance\colcount by1 %
+\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 % In this case arg of setuptable
+ % is the decimal point before the
+ % number given in percent of hsize.
+ % We don't need this so we don't use it.
+ \else
+ \global\advance\colcount by1
+ \setbox0=\hbox{#1 }% 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\else\let\go\setuptable\fi%
+\fi\go}
+
+%%%%
+% multitable syntax
+\def\tab{&\hskip1sp\relax} % 2/2/96
+ % tiny skip here makes sure this column space is
+ % maintained, even if it is never used.
+
+
+%%%%
+% @multitable ... @end multitable definitions:
+
+\def\multitable{\parsearg\dotable}
+
+\def\dotable#1{\bgroup
+\let\item\cr
+\tolerance=9500
+\hbadness=9500
+\setmultitablespacing
+\parskip=\multitableparskip
+\parindent=\multitableparindent
+\overfullrule=0pt
+\global\colcount=0\relax%
+\def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}%
+ % To parse everything between @multitable and @item :
+\setuptable#1 \endsetuptable
+ % Need to reset this to 0 after \setuptable.
+\global\colcount=0\relax%
+ %
+ % 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\relax%
+\multistrut\vtop{\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 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.
+\ifnum\colcount=1
+\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 highlighing sequences respectively marking
+ % characters.
+ \noindent\ignorespaces##\unskip\multistrut}\cr
+ % \everycr will reset column counter, \colcount, at the end of
+ % each line. Every column entry will cause \colcount to advance by one.
+ % The table preamble
+ % looks at the current \colcount to find the correct column width.
+\global\everycr{\noalign{%
+% \filbreak%% keeps underfull box messages off when table breaks over pages.
+% 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.
+\global\colcount=0\relax}}
+}
+
+\def\setmultitablespacing{% test to see if user has set \multitablelinespace.
+% If so, do nothing. If not, give it an appropriate dimension based on
+% current baselineskip.
+\ifdim\multitablelinespace=0pt
+%% strut to put in table in case some entry doesn't have descenders,
+%% to keep lines equally spaced
+\let\multistrut = \strut
+%% 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.
+\else
+\gdef\multistrut{\vrule height\multitablelinespace depth\dp0
+width0pt\relax} \fi
+\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{indexing,}
+% Index generation facilities
+
+% Define \newwrite to be identical to plain tex's \newwrite
+% except not \outer, so it can be used within \newindex.
+{\catcode`\@=11
+\gdef\newwrite{\alloc at 7\write\chardef\sixt@@n}}
+
+% \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{
+\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
+\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\noexpand\doindex {#1}}
+}
+
+% @defindex foo == \newindex{foo}
+
+\def\defindex{\parsearg\newindex}
+
+% Define @defcodeindex, like @defindex except put all entries in @code.
+
+\def\newcodeindex #1{
+\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
+\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\noexpand\docodeindex {#1}}
+}
+
+\def\defcodeindex{\parsearg\newcodeindex}
+
+% @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.
+\def\synindex #1 #2 {%
+\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
+\expandafter\let\csname#1indfile\endcsname=\synindexfoo
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\noexpand\doindex {#2}}%
+}
+
+% @syncodeindex foo bar similar, but put all entries made for index foo
+% inside @code.
+\def\syncodeindex #1 #2 {%
+\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
+\expandafter\let\csname#1indfile\endcsname=\synindexfoo
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\noexpand\docodeindex {#2}}%
+}
+
+% 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}}}
+
+\def\indexdummies{%
+% Take care of the plain tex accent commands.
+\def\"{\realbackslash "}%
+\def\`{\realbackslash `}%
+\def\'{\realbackslash '}%
+\def\^{\realbackslash ^}%
+\def\~{\realbackslash ~}%
+\def\={\realbackslash =}%
+\def\b{\realbackslash b}%
+\def\c{\realbackslash c}%
+\def\d{\realbackslash d}%
+\def\u{\realbackslash u}%
+\def\v{\realbackslash v}%
+\def\H{\realbackslash H}%
+% Take care of the plain tex special European modified letters.
+\def\oe{\realbackslash oe}%
+\def\ae{\realbackslash ae}%
+\def\aa{\realbackslash aa}%
+\def\OE{\realbackslash OE}%
+\def\AE{\realbackslash AE}%
+\def\AA{\realbackslash AA}%
+\def\o{\realbackslash o}%
+\def\O{\realbackslash O}%
+\def\l{\realbackslash l}%
+\def\L{\realbackslash L}%
+\def\ss{\realbackslash ss}%
+% Take care of texinfo commands likely to appear in an index entry.
+% (Must be a way to avoid doing expansion at all, and thus not have to
+% laboriously list every single command here.)
+\def\@{@}% will be @@ when we switch to @ as escape char.
+%\let\{ = \lbracecmd
+%\let\} = \rbracecmd
+\def\_{{\realbackslash _}}%
+\def\w{\realbackslash w }%
+\def\bf{\realbackslash bf }%
+%\def\rm{\realbackslash rm }%
+\def\sl{\realbackslash sl }%
+\def\sf{\realbackslash sf}%
+\def\tt{\realbackslash tt}%
+\def\gtr{\realbackslash gtr}%
+\def\less{\realbackslash less}%
+\def\hat{\realbackslash hat}%
+%\def\char{\realbackslash char}%
+\def\TeX{\realbackslash TeX}%
+\def\dots{\realbackslash dots }%
+\def\copyright{\realbackslash copyright }%
+\def\tclose##1{\realbackslash tclose {##1}}%
+\def\code##1{\realbackslash code {##1}}%
+\def\dotless##1{\realbackslash dotless {##1}}%
+\def\samp##1{\realbackslash samp {##1}}%
+\def\,##1{\realbackslash ,{##1}}%
+\def\t##1{\realbackslash t {##1}}%
+\def\r##1{\realbackslash r {##1}}%
+\def\i##1{\realbackslash i {##1}}%
+\def\b##1{\realbackslash b {##1}}%
+\def\cite##1{\realbackslash cite {##1}}%
+\def\key##1{\realbackslash key {##1}}%
+\def\file##1{\realbackslash file {##1}}%
+\def\var##1{\realbackslash var {##1}}%
+\def\kbd##1{\realbackslash kbd {##1}}%
+\def\dfn##1{\realbackslash dfn {##1}}%
+\def\emph##1{\realbackslash emph {##1}}%
+\unsepspaces
+}
+
+% 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 \ ).
+{\obeyspaces
+ \gdef\unsepspaces{\obeyspaces\let =\space}}
+
+% \indexnofonts no-ops all font-change commands.
+% This is used when outputting the strings to sort the index by.
+\def\indexdummyfont#1{#1}
+\def\indexdummytex{TeX}
+\def\indexdummydots{...}
+
+\def\indexnofonts{%
+% Just ignore accents.
+\let\,=\indexdummyfont
+\let\"=\indexdummyfont
+\let\`=\indexdummyfont
+\let\'=\indexdummyfont
+\let\^=\indexdummyfont
+\let\~=\indexdummyfont
+\let\==\indexdummyfont
+\let\b=\indexdummyfont
+\let\c=\indexdummyfont
+\let\d=\indexdummyfont
+\let\u=\indexdummyfont
+\let\v=\indexdummyfont
+\let\H=\indexdummyfont
+\let\dotless=\indexdummyfont
+% Take care of the plain tex special European modified letters.
+\def\oe{oe}%
+\def\ae{ae}%
+\def\aa{aa}%
+\def\OE{OE}%
+\def\AE{AE}%
+\def\AA{AA}%
+\def\o{o}%
+\def\O{O}%
+\def\l{l}%
+\def\L{L}%
+\def\ss{ss}%
+\let\w=\indexdummyfont
+\let\t=\indexdummyfont
+\let\r=\indexdummyfont
+\let\i=\indexdummyfont
+\let\b=\indexdummyfont
+\let\emph=\indexdummyfont
+\let\strong=\indexdummyfont
+\let\cite=\indexdummyfont
+\let\sc=\indexdummyfont
+%Don't no-op \tt, since it isn't a user-level command
+% and is used in the definitions of the active chars like <, >, |...
+%\let\tt=\indexdummyfont
+\let\tclose=\indexdummyfont
+\let\code=\indexdummyfont
+\let\file=\indexdummyfont
+\let\samp=\indexdummyfont
+\let\kbd=\indexdummyfont
+\let\key=\indexdummyfont
+\let\var=\indexdummyfont
+\let\TeX=\indexdummytex
+\let\dots=\indexdummydots
+\def\@{@}%
+}
+
+% To define \realbackslash, we must make \ not be an escape.
+% We must first make another character (@) an escape
+% so we do not become unable to do a definition.
+
+{\catcode`\@=0 \catcode`\\=\other
+ at gdef@realbackslash{\}}
+
+\let\indexbackslash=0 %overridden during \printindex.
+
+\let\SETmarginindex=\relax %initialize!
+% workhorse for all \fooindexes
+% #1 is name of index, #2 is stuff to put there
+\def\doind #1#2{%
+ % Put the index entry in the margin if desired.
+ \ifx\SETmarginindex\relax\else
+ \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}%
+ \fi
+ {%
+ \count255=\lastpenalty
+ {%
+ \indexdummies % Must do this here, since \bf, etc expand at this stage
+ \escapechar=`\\
+ {%
+ \let\folio=0% We will expand all macros now EXCEPT \folio.
+ \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
+ % so it will be output as is; and it will print as backslash.
+ %
+ % First process the index-string with all font commands turned off
+ % to get the string to sort by.
+ {\indexnofonts \xdef\indexsorttmp{#2}}%
+ %
+ % Now produce the complete index entry, with both the sort key and the
+ % original text, including any font commands.
+ \toks0 = {#2}%
+ \edef\temp{%
+ \write\csname#1indfile\endcsname{%
+ \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
+ }%
+ \temp
+ }%
+ }%
+ \penalty\count255
+ }%
+}
+
+\def\dosubind #1#2#3{%
+{\count10=\lastpenalty %
+{\indexdummies % Must do this here, since \bf, etc expand at this stage
+\escapechar=`\\%
+{\let\folio=0%
+\def\rawbackslashxx{\indexbackslash}%
+%
+% Now process the index-string once, with all font commands turned off,
+% to get the string to sort the index by.
+{\indexnofonts
+\xdef\temp1{#2 #3}%
+}%
+% Now produce the complete index entry. We process the index-string again,
+% this time with font commands expanded, to get what to print in the index.
+\edef\temp{%
+\write \csname#1indfile\endcsname{%
+\realbackslash entry {\temp1}{\folio}{#2}{#3}}}%
+\temp }%
+}\penalty\count10}}
+
+% 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.
+
+% This is what you call to cause a particular index to get printed.
+% Write
+% @unnumbered Function Index
+% @printindex fn
+
+\def\printindex{\parsearg\doprintindex}
+
+\def\doprintindex#1{\begingroup
+ \dobreak \chapheadingskip{10000}%
+ %
+ \indexfonts \rm
+ \tolerance = 9500
+ \indexbreaks
+ \def\indexbackslash{\rawbackslashxx}%
+ % 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.
+ \catcode`\\ = 0
+ \catcode`\@ = 11
+ \escapechar = `\\
+ \begindoublecolumns
+ %
+ % See if the index file exists and is nonempty.
+ \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.
+ (Index is nonexistent)
+ \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
+ (Index is empty)
+ \else
+ \input \jobname.#1s
+ \fi
+ \fi
+ \closein 1
+ \enddoublecolumns
+\endgroup}
+
+% These macros are used by the sorted index file itself.
+% Change them to control the appearance of the index.
+
+% Same as \bigskipamount except no shrink.
+% \balancecolumns gets confused if there is any shrink.
+\newskip\initialskipamount \initialskipamount 12pt plus4pt
+
+\def\initial #1{%
+{\let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
+\ifdim\lastskip<\initialskipamount
+\removelastskip \penalty-200 \vskip \initialskipamount\fi
+\line{\secbf#1\hfill}\kern 2pt\penalty10000}}
+
+% This typesets a paragraph consisting of #1, dot leaders, and then #2
+% flush to the right margin. It is used for index and table of contents
+% entries. The paragraph is indented by \leftskip.
+%
+\def\entry #1#2{\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
+ %
+ % Start a ``paragraph'' for the index entry so the line breaking
+ % parameters we've set above will have an effect.
+ \noindent
+ %
+ % Insert the text of the index entry. TeX will do line-breaking on it.
+ #1%
+ % 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{#2}%
+ \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.
+ \ #2% The page number ends the paragraph.
+ \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 #2\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 = {\global\setbox\partialpage
+ =\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}%
+ \eject
+ %
+ % Now switch to the double-column output routine.
+ \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 once.
+ %
+ % 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
+}
+\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@=\pageheight \advance\dimen@ by-\ht\partialpage
+ % box0 will be the left-hand column, box1 the right.
+ \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
+ \onepageout\pagesofar
+ \unvbox255 \penalty\outputpenalty
+}
+\def\pagesofar{%
+ % The contents of the output page -- any previous material,
+ % followed by the two boxes we just split.
+ \unvbox\partialpage
+ \hsize = \doublecolumnhsize
+ \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}%
+}
+\def\enddoublecolumns{%
+ \output={\balancecolumns}\eject % split what we have
+ \endgroup
+ % Back to normal single-column typesetting, but take account of the
+ % fact that we just accumulated some stuff on the output page.
+ \pagegoal=\vsize
+}
+\def\balancecolumns{%
+ % Called on the last page of the double column material.
+ \setbox0=\vbox{\unvbox255}%
+ \dimen@ = \ht0
+ \advance\dimen@ by \topskip
+ \advance\dimen@ by-\baselineskip
+ \divide\dimen@ by 2
+ \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@ by1pt \repeat}%
+ \setbox0=\vbox to\dimen@{\unvbox1}%
+ \setbox2=\vbox to\dimen@{\unvbox3}%
+ \pagesofar
+}
+\catcode `\@=\other
+
+
+\message{sectioning,}
+% Define chapters, sections, etc.
+
+\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}
+
+\newwrite \contentsfile
+% This is called from \setfilename.
+\def\opencontents{\openout \contentsfile = \jobname.toc}
+
+% Each @chapter defines this as the name of the chapter.
+% page headings and footings can use it. @section does likewise
+
+\def\thischapter{} \def\thissection{}
+\def\seccheck#1{\if \pageno<0 %
+\errmessage{@#1 not allowed after generating table of contents}\fi
+%
+}
+
+\def\chapternofonts{%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\def\result{\realbackslash result}
+\def\equiv{\realbackslash equiv}
+\def\expansion{\realbackslash expansion}
+\def\print{\realbackslash print}
+\def\TeX{\realbackslash TeX}
+\def\dots{\realbackslash dots}
+\def\copyright{\realbackslash copyright}
+\def\tt{\realbackslash tt}
+\def\bf{\realbackslash bf }
+\def\w{\realbackslash w}
+\def\less{\realbackslash less}
+\def\gtr{\realbackslash gtr}
+\def\hat{\realbackslash hat}
+\def\char{\realbackslash char}
+\def\tclose##1{\realbackslash tclose {##1}}
+\def\code##1{\realbackslash code {##1}}
+\def\samp##1{\realbackslash samp {##1}}
+\def\r##1{\realbackslash r {##1}}
+\def\b##1{\realbackslash b {##1}}
+\def\key##1{\realbackslash key {##1}}
+\def\file##1{\realbackslash file {##1}}
+\def\kbd##1{\realbackslash kbd {##1}}
+% These are redefined because @smartitalic wouldn't work inside xdef.
+\def\i##1{\realbackslash i {##1}}
+\def\cite##1{\realbackslash cite {##1}}
+\def\var##1{\realbackslash var {##1}}
+\def\emph##1{\realbackslash emph {##1}}
+\def\dfn##1{\realbackslash dfn {##1}}
+}
+
+\newcount\absseclevel % used to calculate proper heading level
+\newcount\secbase\secbase=0 % @raise/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
+
+% Choose a numbered-heading macro
+% #1 is heading level if unmodified by @raisesections or @lowersections
+% #2 is text for heading
+\def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
+\ifcase\absseclevel
+ \chapterzzz{#2}
+\or
+ \seczzz{#2}
+\or
+ \numberedsubseczzz{#2}
+\or
+ \numberedsubsubseczzz{#2}
+\else
+ \ifnum \absseclevel<0
+ \chapterzzz{#2}
+ \else
+ \numberedsubsubseczzz{#2}
+ \fi
+\fi
+}
+
+% like \numhead, but chooses appendix heading levels
+\def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
+\ifcase\absseclevel
+ \appendixzzz{#2}
+\or
+ \appendixsectionzzz{#2}
+\or
+ \appendixsubseczzz{#2}
+\or
+ \appendixsubsubseczzz{#2}
+\else
+ \ifnum \absseclevel<0
+ \appendixzzz{#2}
+ \else
+ \appendixsubsubseczzz{#2}
+ \fi
+\fi
+}
+
+% like \numhead, but chooses numberless heading levels
+\def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
+\ifcase\absseclevel
+ \unnumberedzzz{#2}
+\or
+ \unnumberedseczzz{#2}
+\or
+ \unnumberedsubseczzz{#2}
+\or
+ \unnumberedsubsubseczzz{#2}
+\else
+ \ifnum \absseclevel<0
+ \unnumberedzzz{#2}
+ \else
+ \unnumberedsubsubseczzz{#2}
+ \fi
+\fi
+}
+
+
+\def\thischaptername{No Chapter Title}
+\outer\def\chapter{\parsearg\chapteryyy}
+\def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz
+\def\chapterzzz #1{\seccheck{chapter}%
+\secno=0 \subsecno=0 \subsubsecno=0
+\global\advance \chapno by 1 \message{\putwordChapter \the\chapno}%
+\chapmacro {#1}{\the\chapno}%
+\gdef\thissection{#1}%
+\gdef\thischaptername{#1}%
+% We don't substitute the actual chapter name into \thischapter
+% because we don't want its macros evaluated now.
+\xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%
+{\chapternofonts%
+\edef\temp{{\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\donoderef %
+\global\let\section = \numberedsec
+\global\let\subsection = \numberedsubsec
+\global\let\subsubsection = \numberedsubsubsec
+}}
+
+\outer\def\appendix{\parsearg\appendixyyy}
+\def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz
+\def\appendixzzz #1{\seccheck{appendix}%
+\secno=0 \subsecno=0 \subsubsecno=0
+\global\advance \appendixno by 1 \message{Appendix \appendixletter}%
+\chapmacro {#1}{\putwordAppendix{} \appendixletter}%
+\gdef\thissection{#1}%
+\gdef\thischaptername{#1}%
+\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
+{\chapternofonts%
+\edef\temp{{\realbackslash chapentry
+ {#1}{\putwordAppendix{} \appendixletter}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\appendixnoderef %
+\global\let\section = \appendixsec
+\global\let\subsection = \appendixsubsec
+\global\let\subsubsection = \appendixsubsubsec
+}}
+
+% @centerchap is like @unnumbered, but the heading is centered.
+\outer\def\centerchap{\parsearg\centerchapyyy}
+\def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}}
+
+\outer\def\top{\parsearg\unnumberedyyy}
+\outer\def\unnumbered{\parsearg\unnumberedyyy}
+\def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
+\def\unnumberedzzz #1{\seccheck{unnumbered}%
+\secno=0 \subsecno=0 \subsubsecno=0
+%
+% 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 the <toks register>.
+\toks0 = {#1}\message{(\the\toks0)}%
+%
+\unnumbchapmacro {#1}%
+\gdef\thischapter{#1}\gdef\thissection{#1}%
+{\chapternofonts%
+\edef\temp{{\realbackslash unnumbchapentry {#1}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\global\let\section = \unnumberedsec
+\global\let\subsection = \unnumberedsubsec
+\global\let\subsubsection = \unnumberedsubsubsec
+}}
+
+\outer\def\numberedsec{\parsearg\secyyy}
+\def\secyyy #1{\numhead1{#1}} % normally calls seczzz
+\def\seczzz #1{\seccheck{section}%
+\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
+\gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
+{\chapternofonts%
+\edef\temp{{\realbackslash secentry %
+{#1}{\the\chapno}{\the\secno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\donoderef %
+\penalty 10000 %
+}}
+
+\outer\def\appendixsection{\parsearg\appendixsecyyy}
+\outer\def\appendixsec{\parsearg\appendixsecyyy}
+\def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz
+\def\appendixsectionzzz #1{\seccheck{appendixsection}%
+\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
+\gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
+{\chapternofonts%
+\edef\temp{{\realbackslash secentry %
+{#1}{\appendixletter}{\the\secno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\appendixnoderef %
+\penalty 10000 %
+}}
+
+\outer\def\unnumberedsec{\parsearg\unnumberedsecyyy}
+\def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz
+\def\unnumberedseczzz #1{\seccheck{unnumberedsec}%
+\plainsecheading {#1}\gdef\thissection{#1}%
+{\chapternofonts%
+\edef\temp{{\realbackslash unnumbsecentry{#1}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\penalty 10000 %
+}}
+
+\outer\def\numberedsubsec{\parsearg\numberedsubsecyyy}
+\def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz
+\def\numberedsubseczzz #1{\seccheck{subsection}%
+\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
+\subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
+{\chapternofonts%
+\edef\temp{{\realbackslash subsecentry %
+{#1}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\donoderef %
+\penalty 10000 %
+}}
+
+\outer\def\appendixsubsec{\parsearg\appendixsubsecyyy}
+\def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz
+\def\appendixsubseczzz #1{\seccheck{appendixsubsec}%
+\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
+\subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
+{\chapternofonts%
+\edef\temp{{\realbackslash subsecentry %
+{#1}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\appendixnoderef %
+\penalty 10000 %
+}}
+
+\outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy}
+\def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
+\def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%
+\plainsubsecheading {#1}\gdef\thissection{#1}%
+{\chapternofonts%
+\edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\penalty 10000 %
+}}
+
+\outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy}
+\def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz
+\def\numberedsubsubseczzz #1{\seccheck{subsubsection}%
+\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
+\subsubsecheading {#1}
+ {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
+{\chapternofonts%
+\edef\temp{{\realbackslash subsubsecentry %
+ {#1}
+ {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}
+ {\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\donoderef %
+\penalty 10000 %
+}}
+
+\outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy}
+\def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz
+\def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}%
+\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
+\subsubsecheading {#1}
+ {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
+{\chapternofonts%
+\edef\temp{{\realbackslash subsubsecentry{#1}%
+ {\appendixletter}
+ {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\appendixnoderef %
+\penalty 10000 %
+}}
+
+\outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy}
+\def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
+\def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%
+\plainsubsubsecheading {#1}\gdef\thissection{#1}%
+{\chapternofonts%
+\edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\penalty 10000 %
+}}
+
+% These are variants which are not "outer", so they can appear in @ifinfo.
+% Actually, they should now be obsolete; ordinary section commands should work.
+\def\infotop{\parsearg\unnumberedzzz}
+\def\infounnumbered{\parsearg\unnumberedzzz}
+\def\infounnumberedsec{\parsearg\unnumberedseczzz}
+\def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz}
+\def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz}
+
+\def\infoappendix{\parsearg\appendixzzz}
+\def\infoappendixsec{\parsearg\appendixseczzz}
+\def\infoappendixsubsec{\parsearg\appendixsubseczzz}
+\def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz}
+
+\def\infochapter{\parsearg\chapterzzz}
+\def\infosection{\parsearg\sectionzzz}
+\def\infosubsection{\parsearg\subsectionzzz}
+\def\infosubsubsection{\parsearg\subsubsectionzzz}
+
+% 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.
+\global\let\section = \numberedsec
+\global\let\subsection = \numberedsubsec
+\global\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{\parsearg\majorheadingzzz}
+\def\majorheadingzzz #1{%
+{\advance\chapheadingskip by 10pt \chapbreak }%
+{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt\raggedright
+ \rm #1\hfill}}\bigskip \par\penalty 200}
+
+\def\chapheading{\parsearg\chapheadingzzz}
+\def\chapheadingzzz #1{\chapbreak %
+{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt\raggedright
+ \rm #1\hfill}}\bigskip \par\penalty 200}
+
+% @heading, @subheading, @subsubheading.
+\def\heading{\parsearg\plainsecheading}
+\def\subheading{\parsearg\plainsubsecheading}
+\def\subsubheading{\parsearg\plainsubsubsecheading}
+
+% 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}
+
+\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
+
+%%% 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
+
+\def\CHAPFplain{
+\global\let\chapmacro=\chfplain
+\global\let\unnumbchapmacro=\unnchfplain
+\global\let\centerchapmacro=\centerchfplain}
+
+% Plain chapter opening.
+% #1 is the text, #2 the chapter number or empty if unnumbered.
+\def\chfplain#1#2{%
+ \pchapsepmacro
+ {%
+ \chapfonts \rm
+ \def\chapnum{#2}%
+ \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}%
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \hangindent = \wd0 \centerparametersmaybe
+ \unhbox0 #1\par}%
+ }%
+ \nobreak\bigskip % no page break after a chapter title
+ \nobreak
+}
+
+% Plain opening for unnumbered.
+\def\unnchfplain#1{\chfplain{#1}{}}
+
+% @centerchap -- centered and unnumbered.
+\let\centerparametersmaybe = \relax
+\def\centerchfplain#1{{%
+ \def\centerparametersmaybe{%
+ \advance\rightskip by 3\rightskip
+ \leftskip = \rightskip
+ \parfillskip = 0pt
+ }%
+ \chfplain{#1}{}%
+}}
+
+\CHAPFplain % The default
+
+\def\unnchfopen #1{%
+\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt\raggedright
+ \rm #1\hfill}}\bigskip \par\penalty 10000 %
+}
+
+\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\penalty 10000 %
+}
+
+\def\CHAPFopen{
+\global\let\chapmacro=\chfopen
+\global\let\unnumbchapmacro=\unnchfopen
+\global\let\centerchapmacro=\centerchfopen}
+
+
+% Section titles.
+\newskip\secheadingskip
+\def\secheadingbreak{\dobreak \secheadingskip {-1000}}
+\def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}}
+\def\plainsecheading#1{\sectionheading{sec}{}{#1}}
+
+% Subsection titles.
+\newskip \subsecheadingskip
+\def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}}
+\def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}}
+\def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}}
+
+% Subsubsection titles.
+\let\subsubsecheadingskip = \subsecheadingskip
+\let\subsubsecheadingbreak = \subsecheadingbreak
+\def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}}
+\def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}}
+
+
+% Print any size section title.
+%
+% #1 is the section type (sec/subsec/subsubsec), #2 is the section
+% number (maybe empty), #3 the text.
+\def\sectionheading#1#2#3{%
+ {%
+ \expandafter\advance\csname #1headingskip\endcsname by \parskip
+ \csname #1headingbreak\endcsname
+ }%
+ {%
+ % Switch to the right set of fonts.
+ \csname #1fonts\endcsname \rm
+ %
+ % Only insert the separating space if we have a section number.
+ \def\secnum{#2}%
+ \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}%
+ %
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \hangindent = \wd0 % zero if no section number
+ \unhbox0 #3}%
+ }%
+ \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak
+}
+
+
+\message{toc printing,}
+% Finish up the main text and prepare to read what we've written
+% to \contentsfile.
+
+\newskip\contentsrightmargin \contentsrightmargin=1in
+\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 at matematik.su.se>
+ \contentsalignmacro
+ \immediate\closeout \contentsfile
+ \ifnum \pageno>0
+ \pageno = -1 % Request roman numbered pages.
+ \fi
+ % Don't need to put `Contents' or `Short Contents' in the headline.
+ % It is abundantly clear what they are.
+ \unnumbchapmacro{#1}\def\thischapter{}%
+ \begingroup % Set up to handle contents files properly.
+ \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
+ \catcode`\^=7 % to see ^^e4 as \"a etc. juha at piuha.ydi.vtt.fi
+ \raggedbottom % Worry more about breakpoints than the bottom.
+ \advance\hsize by -\contentsrightmargin % Don't use the full line length.
+}
+
+
+% Normal (long) toc.
+\outer\def\contents{%
+ \startcontents{\putwordTableofContents}%
+ \input \jobname.toc
+ \endgroup
+ \vfill \eject
+}
+
+% And just the chapters.
+\outer\def\summarycontents{%
+ \startcontents{\putwordShortContents}%
+ %
+ \let\chapentry = \shortchapentry
+ \let\unnumbchapentry = \shortunnumberedentry
+ % We want a true roman here for the page numbers.
+ \secfonts
+ \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl
+ \rm
+ \hyphenpenalty = 10000
+ \advance\baselineskip by 1pt % Open it up a little.
+ \def\secentry ##1##2##3##4{}
+ \def\unnumbsecentry ##1##2{}
+ \def\subsecentry ##1##2##3##4##5{}
+ \def\unnumbsubsecentry ##1##2{}
+ \def\subsubsecentry ##1##2##3##4##5##6{}
+ \def\unnumbsubsubsecentry ##1##2{}
+ \input \jobname.toc
+ \endgroup
+ \vfill \eject
+}
+\let\shortcontents = \summarycontents
+
+% 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, ...
+
+% Chapter-level things, for both the long and short contents.
+\def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}}
+
+% See comments in \dochapentry re vbox and related settings
+\def\shortchapentry#1#2#3{%
+ \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno{#3}}%
+}
+
+% Typeset the label for a chapter or appendix for the short contents.
+% The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter.
+% We could simplify the code here by writing out an \appendixentry
+% command in the toc file for appendices, instead of using \chapentry
+% for both, but it doesn't seem worth it.
+\setbox0 = \hbox{\shortcontrm \putwordAppendix }
+\newdimen\shortappendixwidth \shortappendixwidth = \wd0
+
+\def\shortchaplabel#1{%
+ % We typeset #1 in a box of constant width, regardless of the text of
+ % #1, so the chapter titles will come out aligned.
+ \setbox0 = \hbox{#1}%
+ \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi
+ %
+ % This space should be plenty, since a single number is .5em, and the
+ % widest letter (M) is 1em, at least in the Computer Modern fonts.
+ % (This space doesn't include the extra space that gets added after
+ % the label; that gets put in by \shortchapentry above.)
+ \advance\dimen0 by 1.1em
+ \hbox to \dimen0{#1\hfil}%
+}
+
+\def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
+\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno{#2}}}
+
+% Sections.
+\def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}}
+\def\unnumbsecentry#1#2{\dosecentry{#1}{#2}}
+
+% Subsections.
+\def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}}
+\def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}}
+
+% And subsubsections.
+\def\subsubsecentry#1#2#3#4#5#6{%
+ \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}
+\def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}}
+
+% This parameter controls the indentation of the various levels.
+\newdimen\tocindent \tocindent = 3pc
+
+% 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{#2}}%
+ \endgroup
+ \nobreak\vskip .25\baselineskip plus.1\baselineskip
+}
+
+\def\dosecentry#1#2{\begingroup
+ \secentryfonts \leftskip=\tocindent
+ \tocentry{#1}{\dopageno{#2}}%
+\endgroup}
+
+\def\dosubsecentry#1#2{\begingroup
+ \subsecentryfonts \leftskip=2\tocindent
+ \tocentry{#1}{\dopageno{#2}}%
+\endgroup}
+
+\def\dosubsubsecentry#1#2{\begingroup
+ \subsubsecentryfonts \leftskip=3\tocindent
+ \tocentry{#1}{\dopageno{#2}}%
+\endgroup}
+
+% Final typesetting of a toc entry; we use the same \entry macro as for
+% the index entries, but we want to suppress hyphenation here. (We
+% can't do that in the \entry macro, since index entries might consist
+% of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.)
+%
+% \turnoffactive is for the sake of @" used for umlauts.
+\def\tocentry#1#2{\begingroup
+ \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
+ \entry{\turnoffactive #1}{\turnoffactive #2}%
+\endgroup}
+
+% 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}
+\let\subsecentryfonts = \textfonts
+\let\subsubsecentryfonts = \textfonts
+
+
+\message{environments,}
+
+% 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.
+% Furthermore, these definitions must come after we define our fonts.
+\newbox\dblarrowbox \newbox\longdblarrowbox
+\newbox\pushcharbox \newbox\bullbox
+\newbox\equivbox \newbox\errorbox
+
+%{\tentt
+%\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil}
+%\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil}
+%\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil}
+%\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil}
+% Adapted from the manmac format (p.420 of TeXbook)
+%\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex
+% depth .1ex\hfil}
+%}
+
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+\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}}
+
+% Adapted from the TeXbook's \boxit.
+{\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}
+
+\global\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}
+
+% The @error{} command.
+\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.
+
+\def\tex{\begingroup
+\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
+\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
+\catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
+\catcode `\%=14
+\catcode 43=12 % plus
+\catcode`\"=12
+\catcode`\==12
+\catcode`\|=12
+\catcode`\<=12
+\catcode`\>=12
+\escapechar=`\\
+%
+\let\,=\ptexcomma
+\let\~=\ptextilde
+\let\{=\ptexlbrace
+\let\}=\ptexrbrace
+\let\.=\ptexdot
+\let\*=\ptexstar
+\let\dots=\ptexdots
+\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}
+\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}
+\def\@{@}%
+\let\bullet=\ptexbullet
+\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext
+%
+\let\Etex=\endgroup}
+
+% Define @lisp ... @endlisp.
+% @lisp does a \begingroup so it can rebind things,
+% including the definition of @endlisp (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}
+
+% 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.
+%
+{\obeyspaces %
+\gdef\sepspaces{\obeyspaces\let =\tie}}
+
+% Define \obeyedspace to be our active space, whatever it is. This is
+% for use in \parsearg.
+{\sepspaces%
+\global\let\obeyedspace= }
+
+% 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{{\advance\envskipamount by \parskip
+\endgraf \ifdim\lastskip<\envskipamount
+\removelastskip \penalty-50 \vskip\envskipamount \fi}}
+
+\let\afterenvbreak = \aboveenvbreak
+
+% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins.
+\let\nonarrowing=\relax
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \cartouche: draw rectangle w/rounded corners around argument
+\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
+
+\long\def\cartouche{%
+\begingroup
+ \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 18pt % allow for 3pt kerns on either
+% side, and for 6pt waste from
+% each corner char
+ \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
+ % Flag to tell @lisp, etc., not to narrow margin.
+ \let\nonarrowing=\comment
+ \vbox\bgroup
+ \baselineskip=0pt\parskip=0pt\lineskip=0pt
+ \carttop
+ \hbox\bgroup
+ \hskip\lskip
+ \vrule\kern3pt
+ \vbox\bgroup
+ \hsize=\cartinner
+ \kern3pt
+ \begingroup
+ \baselineskip=\normbskip
+ \lineskip=\normlskip
+ \parskip=\normpskip
+ \vskip -\parskip
+\def\Ecartouche{%
+ \endgroup
+ \kern3pt
+ \egroup
+ \kern3pt\vrule
+ \hskip\rskip
+ \egroup
+ \cartbot
+ \egroup
+\endgroup
+}}
+
+
+% This macro is called at the beginning of all the @example variants,
+% inside a group.
+\def\nonfillstart{%
+ \aboveenvbreak
+ \inENV % This group ends at the end of the body
+ \hfuzz = 12pt % Don't be fussy
+ \sepspaces % Make spaces be word-separators rather than space tokens.
+ \singlespace
+ \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
+ % @cartouche defines \nonarrowing to inhibit narrowing
+ % at next level down.
+ \ifx\nonarrowing\relax
+ \advance \leftskip by \lispnarrowing
+ \exdentamount=\lispnarrowing
+ \let\exdent=\nofillexdent
+ \let\nonarrowing=\relax
+ \fi
+}
+
+% To ending an @example-like environment, we first end the paragraph
+% (via \afterenvbreak's vertical glue), and then the group. That way we
+% keep the zero \parskip that the environments set -- \parskip glue
+% will be inserted at the beginning of the next paragraph in the
+% document, after the environment.
+%
+\def\nonfillfinish{\afterenvbreak\endgroup}%
+
+% This macro is
+\def\lisp{\begingroup
+ \nonfillstart
+ \let\Elisp = \nonfillfinish
+ \tt
+ \rawbackslash % have \ input char produce \ char from current font
+ \gobble
+}
+
+% Define the \E... control sequence only if we are inside the
+% environment, so the error checking in \end will work.
+%
+% We must call \lisp last in the definition, since it reads the
+% return following the @example (or whatever) command.
+%
+\def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp}
+\def\smallexample{\begingroup \def\Esmallexample{\nonfillfinish\endgroup}\lisp}
+\def\smalllisp{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}\lisp}
+
+% @smallexample and @smalllisp. This is not used unless the @smallbook
+% command is given. Originally contributed by Pavel at xerox.
+%
+\def\smalllispx{\begingroup
+ \nonfillstart
+ \let\Esmalllisp = \nonfillfinish
+ \let\Esmallexample = \nonfillfinish
+ %
+ % Smaller fonts for small examples.
+ \indexfonts \tt
+ \rawbackslash % make \ output the \ character from the current font (tt)
+ \gobble
+}
+
+% This is @display; same as @lisp except use roman font.
+%
+\def\display{\begingroup
+ \nonfillstart
+ \let\Edisplay = \nonfillfinish
+ \gobble
+}
+
+% This is @format; same as @display except don't narrow margins.
+%
+\def\format{\begingroup
+ \let\nonarrowing = t
+ \nonfillstart
+ \let\Eformat = \nonfillfinish
+ \gobble
+}
+
+% @flushleft (same as @format) and @flushright.
+%
+\def\flushleft{\begingroup
+ \let\nonarrowing = t
+ \nonfillstart
+ \let\Eflushleft = \nonfillfinish
+ \gobble
+}
+\def\flushright{\begingroup
+ \let\nonarrowing = t
+ \nonfillstart
+ \let\Eflushright = \nonfillfinish
+ \advance\leftskip by 0pt plus 1fill
+ \gobble}
+
+% @quotation does normal linebreaking (hence we can't use \nonfillstart)
+% and narrows the margins.
+%
+\def\quotation{%
+ \begingroup\inENV %This group ends at the end of the @quotation body
+ {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
+ \singlespace
+ \parindent=0pt
+ % We have retained a nonzero parskip for the environment, since we're
+ % doing normal filling. So to avoid extra space below the environment...
+ \def\Equotation{\parskip = 0pt \nonfillfinish}%
+ %
+ % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+ \ifx\nonarrowing\relax
+ \advance\leftskip by \lispnarrowing
+ \advance\rightskip by \lispnarrowing
+ \exdentamount = \lispnarrowing
+ \let\nonarrowing = \relax
+ \fi
+}
+
+\message{defuns,}
+% Define formatter for defuns
+% First, allow user to change definition object font (\df) internally
+\def\setdeffont #1 {\csname DEF#1\endcsname}
+
+\newskip\defbodyindent \defbodyindent=.4in
+\newskip\defargsindent \defargsindent=50pt
+\newskip\deftypemargin \deftypemargin=12pt
+\newskip\deflastargmargin \deflastargmargin=18pt
+
+\newcount\parencount
+% define \functionparens, which makes ( and ) and & do special things.
+% \functionparens affects the group it is contained in.
+\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 = )
+
+{\activeparens % Now, smart parens don't turn on until &foo (see \amprm)
+
+% 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.
+\global\let(=\lparen \global\let)=\rparen
+\global\let[=\lbrack \global\let]=\rbrack
+
+\gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 }
+\gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
+% This is used to turn on special parens
+% but make & act ordinary (given that it's active).
+\gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr}
+
+% Definitions of (, ) and & used in args for functions.
+% This is the definition of ( outside of all parentheses.
+\gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested %
+\global\advance\parencount by 1 }
+%
+% This is the definition of ( when already inside a level of parens.
+\gdef\opnested{\char`\(\global\advance\parencount by 1 }
+%
+\gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0.
+% also in that case restore the outer-level definition of (.
+\ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi
+\global\advance \parencount by -1 }
+% If we encounter &foo, then turn on ()-hacking afterwards
+\gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ }
+%
+\gdef\normalparens{\boldbrax\let&=\ampnr}
+} % End of definition inside \activeparens
+%% These parens (in \boldbrax) actually are a little bolder than the
+%% contained text. This is especially needed for [ and ]
+\def\opnr{{\sf\char`\(}} \def\clnr{{\sf\char`\)}} \def\ampnr{\&}
+\def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}}
+
+% First, defname, which formats the header line itself.
+% #1 should be the function name.
+% #2 should be the type of definition, such as "Function".
+
+\def\defname #1#2{%
+% Get the values of \leftskip and \rightskip as they were
+% outside the @def...
+\dimen2=\leftskip
+\advance\dimen2 by -\defbodyindent
+\dimen3=\rightskip
+\advance\dimen3 by -\defbodyindent
+\noindent %
+\setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%
+\dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line
+\dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations
+\parshape 2 0in \dimen0 \defargsindent \dimen1 %
+% Now output arg 2 ("Function" or some such)
+% ending at \deftypemargin from the right margin,
+% but stuck inside a box of width 0 so it does not interfere with linebreaking
+{% Adjust \hsize to exclude the ambient margins,
+% so that \rightline will obey them.
+\advance \hsize by -\dimen2 \advance \hsize by -\dimen3
+\rlap{\rightline{{\rm #2}\hskip \deftypemargin}}}%
+% Make all lines underfull and no complaints:
+\tolerance=10000 \hbadness=10000
+\advance\leftskip by -\defbodyindent
+\exdentamount=\defbodyindent
+{\df #1}\enskip % Generate function name
+}
+
+% Actually process the body of a definition
+% #1 should be the terminating control sequence, such as \Edefun.
+% #2 should be the "another name" control sequence, such as \defunx.
+% #3 should be the control sequence that actually processes the header,
+% such as \defunheader.
+
+\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
+\medbreak %
+% Define the end token that this defining construct specifies
+% so that it will exit this group.
+\def#1{\endgraf\endgroup\medbreak}%
+\def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
+\parindent=0in
+\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
+\exdentamount=\defbodyindent
+\begingroup %
+\catcode 61=\active % 61 is `='
+\obeylines\activeparens\spacesplit#3}
+
+\def\defmethparsebody #1#2#3#4 {\begingroup\inENV %
+\medbreak %
+% Define the end token that this defining construct specifies
+% so that it will exit this group.
+\def#1{\endgraf\endgroup\medbreak}%
+\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
+\parindent=0in
+\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
+\exdentamount=\defbodyindent
+\begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
+
+\def\defopparsebody #1#2#3#4#5 {\begingroup\inENV %
+\medbreak %
+% Define the end token that this defining construct specifies
+% so that it will exit this group.
+\def#1{\endgraf\endgroup\medbreak}%
+\def#2##1 ##2 {\def#4{##1}%
+\begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%
+\parindent=0in
+\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
+\exdentamount=\defbodyindent
+\begingroup\obeylines\activeparens\spacesplit{#3{#5}}}
+
+% These parsing functions are similar to the preceding ones
+% except that they do not make parens into active characters.
+% These are used for "variables" since they have no arguments.
+
+\def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
+\medbreak %
+% Define the end token that this defining construct specifies
+% so that it will exit this group.
+\def#1{\endgraf\endgroup\medbreak}%
+\def#2{\begingroup\obeylines\spacesplit#3}%
+\parindent=0in
+\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
+\exdentamount=\defbodyindent
+\begingroup %
+\catcode 61=\active %
+\obeylines\spacesplit#3}
+
+% This is used for \def{tp,vr}parsebody. It could probably be used for
+% some of the others, too, with some judicious conditionals.
+%
+\def\parsebodycommon#1#2#3{%
+ \begingroup\inENV %
+ \medbreak %
+ % Define the end token that this defining construct specifies
+ % so that it will exit this group.
+ \def#1{\endgraf\endgroup\medbreak}%
+ \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
+ \parindent=0in
+ \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
+ \exdentamount=\defbodyindent
+ \begingroup\obeylines
+}
+
+\def\defvrparsebody#1#2#3#4 {%
+ \parsebodycommon{#1}{#2}{#3}%
+ \spacesplit{#3{#4}}%
+}
+
+% This loses on `@deftp {Data Type} {struct termios}' -- it thinks the
+% type is just `struct', because we lose the braces in `{struct
+% termios}' when \spacesplit reads its undelimited argument. Sigh.
+% \let\deftpparsebody=\defvrparsebody
+%
+% So, to get around this, we put \empty in with the type name. That
+% way, TeX won't find exactly `{...}' as an undelimited argument, and
+% won't strip off the braces.
+%
+\def\deftpparsebody #1#2#3#4 {%
+ \parsebodycommon{#1}{#2}{#3}%
+ \spacesplit{\parsetpheaderline{#3{#4}}}\empty
+}
+
+% Fine, but then we have to eventually remove the \empty *and* the
+% braces (if any). That's what this does.
+%
+\def\removeemptybraces\empty#1\relax{#1}
+
+% After \spacesplit has done its work, this is called -- #1 is the final
+% thing to call, #2 the type name (which starts with \empty), and #3
+% (which might be empty) the arguments.
+%
+\def\parsetpheaderline#1#2#3{%
+ #1{\removeemptybraces#2\relax}{#3}%
+}%
+
+\def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %
+\medbreak %
+% Define the end token that this defining construct specifies
+% so that it will exit this group.
+\def#1{\endgraf\endgroup\medbreak}%
+\def#2##1 ##2 {\def#4{##1}%
+\begingroup\obeylines\spacesplit{#3{##2}}}%
+\parindent=0in
+\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
+\exdentamount=\defbodyindent
+\begingroup\obeylines\spacesplit{#3{#5}}}
+
+% Split up #2 at the first space token.
+% call #1 with two arguments:
+% the first is all of #2 before the space token,
+% the second is all of #2 after that space token.
+% If #2 contains no space token, all of it is passed as the first arg
+% and the second is passed as empty.
+
+{\obeylines
+\gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}%
+\long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{%
+\ifx\relax #3%
+#1{#2}{}\else #1{#2}{#3#4}\fi}}
+
+% So much for the things common to all kinds of definitions.
+
+% Define @defun.
+
+% First, define the processing that is wanted for arguments of \defun
+% Use this to expand the args and terminate the paragraph they make up
+
+\def\defunargs #1{\functionparens \sl
+% Expand, preventing hyphenation at `-' chars.
+% Note that groups don't affect changes in \hyphenchar.
+\hyphenchar\tensl=0
+#1%
+\hyphenchar\tensl=45
+\ifnum\parencount=0 \else \errmessage{unbalanced parens in @def arguments}\fi%
+\interlinepenalty=10000
+\advance\rightskip by 0pt plus 1fil
+\endgraf\penalty 10000\vskip -\parskip\penalty 10000%
+}
+
+\def\deftypefunargs #1{%
+% Expand, preventing hyphenation at `-' chars.
+% Note that groups don't affect changes in \hyphenchar.
+% Use \boldbraxnoamp, not \functionparens, so that & is not special.
+\boldbraxnoamp
+\tclose{#1}% avoid \code because of side effects on active chars
+\interlinepenalty=10000
+\advance\rightskip by 0pt plus 1fil
+\endgraf\penalty 10000\vskip -\parskip\penalty 10000%
+}
+
+% Do complete processing of one @defun or @defunx line already parsed.
+
+% @deffn Command forward-char nchars
+
+\def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader}
+
+\def\deffnheader #1#2#3{\doind {fn}{\code{#2}}%
+\begingroup\defname {#2}{#1}\defunargs{#3}\endgroup %
+\catcode 61=\other % Turn off change made in \defparsebody
+}
+
+% @defun == @deffn Function
+
+\def\defun{\defparsebody\Edefun\defunx\defunheader}
+
+\def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
+\begingroup\defname {#1}{Function}%
+\defunargs {#2}\endgroup %
+\catcode 61=\other % Turn off change made in \defparsebody
+}
+
+% @deftypefun int foobar (int @var{foo}, float @var{bar})
+
+\def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader}
+
+% #1 is the data type. #2 is the name and args.
+\def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax}
+% #1 is the data type, #2 the name, #3 the args.
+\def\deftypefunheaderx #1#2 #3\relax{%
+\doind {fn}{\code{#2}}% Make entry in function index
+\begingroup\defname {\defheaderxcond#1\relax$$$#2}{Function}%
+\deftypefunargs {#3}\endgroup %
+\catcode 61=\other % Turn off change made in \defparsebody
+}
+
+% @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar})
+
+\def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader}
+
+% \defheaderxcond#1\relax$$$
+% puts #1 in @code, followed by a space, but does nothing if #1 is null.
+\def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi}
+
+% #1 is the classification. #2 is the data type. #3 is the name and args.
+\def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax}
+% #1 is the classification, #2 the data type, #3 the name, #4 the args.
+\def\deftypefnheaderx #1#2#3 #4\relax{%
+\doind {fn}{\code{#3}}% Make entry in function index
+\begingroup
+\normalparens % notably, turn off `&' magic, which prevents
+% at least some C++ text from working
+\defname {\defheaderxcond#2\relax$$$#3}{#1}%
+\deftypefunargs {#4}\endgroup %
+\catcode 61=\other % Turn off change made in \defparsebody
+}
+
+% @defmac == @deffn Macro
+
+\def\defmac{\defparsebody\Edefmac\defmacx\defmacheader}
+
+\def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
+\begingroup\defname {#1}{Macro}%
+\defunargs {#2}\endgroup %
+\catcode 61=\other % Turn off change made in \defparsebody
+}
+
+% @defspec == @deffn Special Form
+
+\def\defspec{\defparsebody\Edefspec\defspecx\defspecheader}
+
+\def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
+\begingroup\defname {#1}{Special Form}%
+\defunargs {#2}\endgroup %
+\catcode 61=\other % Turn off change made in \defparsebody
+}
+
+% This definition is run if you use @defunx
+% anywhere other than immediately after a @defun or @defunx.
+
+\def\deffnx #1 {\errmessage{@deffnx in invalid context}}
+\def\defunx #1 {\errmessage{@defunx in invalid context}}
+\def\defmacx #1 {\errmessage{@defmacx in invalid context}}
+\def\defspecx #1 {\errmessage{@defspecx in invalid context}}
+\def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}}
+\def\deftypeunx #1 {\errmessage{@deftypeunx in invalid context}}
+
+% @defmethod, and so on
+
+% @defop {Funny Method} foo-class frobnicate argument
+
+\def\defop #1 {\def\defoptype{#1}%
+\defopparsebody\Edefop\defopx\defopheader\defoptype}
+
+\def\defopheader #1#2#3{%
+\dosubind {fn}{\code{#2}}{on #1}% Make entry in function index
+\begingroup\defname {#2}{\defoptype{} on #1}%
+\defunargs {#3}\endgroup %
+}
+
+% @defmethod == @defop Method
+
+\def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}
+
+\def\defmethodheader #1#2#3{%
+\dosubind {fn}{\code{#2}}{on #1}% entry in function index
+\begingroup\defname {#2}{Method on #1}%
+\defunargs {#3}\endgroup %
+}
+
+% @defcv {Class Option} foo-class foo-flag
+
+\def\defcv #1 {\def\defcvtype{#1}%
+\defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype}
+
+\def\defcvarheader #1#2#3{%
+\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
+\begingroup\defname {#2}{\defcvtype{} of #1}%
+\defvarargs {#3}\endgroup %
+}
+
+% @defivar == @defcv {Instance Variable}
+
+\def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader}
+
+\def\defivarheader #1#2#3{%
+\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
+\begingroup\defname {#2}{Instance Variable of #1}%
+\defvarargs {#3}\endgroup %
+}
+
+% These definitions are run if you use @defmethodx, etc.,
+% anywhere other than immediately after a @defmethod, etc.
+
+\def\defopx #1 {\errmessage{@defopx in invalid context}}
+\def\defmethodx #1 {\errmessage{@defmethodx in invalid context}}
+\def\defcvx #1 {\errmessage{@defcvx in invalid context}}
+\def\defivarx #1 {\errmessage{@defivarx in invalid context}}
+
+% Now @defvar
+
+% First, define the processing that is wanted for arguments of @defvar.
+% This is actually simple: just print them in roman.
+% This must expand the args and terminate the paragraph they make up
+\def\defvarargs #1{\normalparens #1%
+\interlinepenalty=10000
+\endgraf\penalty 10000\vskip -\parskip\penalty 10000}
+
+% @defvr Counter foo-count
+
+\def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader}
+
+\def\defvrheader #1#2#3{\doind {vr}{\code{#2}}%
+\begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup}
+
+% @defvar == @defvr Variable
+
+\def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader}
+
+\def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
+\begingroup\defname {#1}{Variable}%
+\defvarargs {#2}\endgroup %
+}
+
+% @defopt == @defvr {User Option}
+
+\def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader}
+
+\def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
+\begingroup\defname {#1}{User Option}%
+\defvarargs {#2}\endgroup %
+}
+
+% @deftypevar int foobar
+
+\def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader}
+
+% #1 is the data type. #2 is the name, perhaps followed by text that
+% is actually part of the data type, which should not be put into the index.
+\def\deftypevarheader #1#2{%
+\dovarind#2 \relax% Make entry in variables index
+\begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}%
+\interlinepenalty=10000
+\endgraf\penalty 10000\vskip -\parskip\penalty 10000
+\endgroup}
+\def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}}
+
+% @deftypevr {Global Flag} int enable
+
+\def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
+
+\def\deftypevrheader #1#2#3{\dovarind#3 \relax%
+\begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1}
+\interlinepenalty=10000
+\endgraf\penalty 10000\vskip -\parskip\penalty 10000
+\endgroup}
+
+% This definition is run if you use @defvarx
+% anywhere other than immediately after a @defvar or @defvarx.
+
+\def\defvrx #1 {\errmessage{@defvrx in invalid context}}
+\def\defvarx #1 {\errmessage{@defvarx in invalid context}}
+\def\defoptx #1 {\errmessage{@defoptx in invalid context}}
+\def\deftypevarx #1 {\errmessage{@deftypevarx in invalid context}}
+\def\deftypevrx #1 {\errmessage{@deftypevrx in invalid context}}
+
+% Now define @deftp
+% Args are printed in bold, a slight difference from @defvar.
+
+\def\deftpargs #1{\bf \defvarargs{#1}}
+
+% @deftp Class window height width ...
+
+\def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader}
+
+\def\deftpheader #1#2#3{\doind {tp}{\code{#2}}%
+\begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup}
+
+% This definition is run if you use @deftpx, etc
+% anywhere other than immediately after a @deftp, etc.
+
+\def\deftpx #1 {\errmessage{@deftpx in invalid context}}
+
+
+\message{cross reference,}
+% Define cross-reference macros
+\newwrite \auxfile
+
+\newif\ifhavexrefs % True if xref values are known.
+\newif\ifwarnedxrefs % True if we warned once that they aren't known.
+
+% @inforef is simple.
+\def\inforef #1{\inforefzzz #1,,,,**}
+\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
+ node \samp{\ignorespaces#1{}}}
+
+% \setref{foo} defines a cross-reference point named foo.
+
+\def\setref#1{%
+\dosetq{#1-title}{Ytitle}%
+\dosetq{#1-pg}{Ypagenumber}%
+\dosetq{#1-snt}{Ysectionnumberandtype}}
+
+\def\unnumbsetref#1{%
+\dosetq{#1-title}{Ytitle}%
+\dosetq{#1-pg}{Ypagenumber}%
+\dosetq{#1-snt}{Ynothing}}
+
+\def\appendixsetref#1{%
+\dosetq{#1-title}{Ytitle}%
+\dosetq{#1-pg}{Ypagenumber}%
+\dosetq{#1-snt}{Yappendixletterandtype}}
+
+% \xref, \pxref, and \ref generate cross-references to specified points.
+% 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
+ \def\printedmanual{\ignorespaces #5}%
+ \def\printednodename{\ignorespaces #3}%
+ \setbox1=\hbox{\printedmanual}%
+ \setbox0=\hbox{\printednodename}%
+ \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\printednodename{\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\printednodename{\ignorespaces #1}%
+ \else
+ \ifhavexrefs
+ % We know the real title if we have the xref values.
+ \def\printednodename{\refx{#1-title}{}}%
+ \else
+ % Otherwise just copy the Info node name.
+ \def\printednodename{\ignorespaces #1}%
+ \fi%
+ \fi
+ \fi
+ \fi
+ %
+ % 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{} ``\printednodename'' in \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 \refx{#1-snt}{}}%
+ \space [\printednodename],\space
+ \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
+ \fi
+\endgroup}
+
+% \dosetq is the interface for calls from other macros
+
+% Use \turnoffactive so that punctuation chars such as underscore
+% work in node names.
+\def\dosetq #1#2{{\let\folio=0 \turnoffactive
+\edef\next{\write\auxfile{\internalsetq {#1}{#2}}}%
+\next}}
+
+% \internalsetq {foo}{page} expands into
+% CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
+% When the aux file is read, ' is the escape character
+
+\def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}}
+
+% Things to be expanded by \internalsetq
+
+\def\Ypagenumber{\folio}
+
+\def\Ytitle{\thissection}
+
+\def\Ynothing{}
+
+\def\Ysectionnumberandtype{%
+\ifnum\secno=0 \putwordChapter\xreftie\the\chapno %
+\else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno %
+\else \ifnum \subsubsecno=0 %
+\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno %
+\else %
+\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno %
+\fi \fi \fi }
+
+\def\Yappendixletterandtype{%
+\ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}%
+\else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno %
+\else \ifnum \subsubsecno=0 %
+\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno %
+\else %
+\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno %
+\fi \fi \fi }
+
+\gdef\xreftie{'tie}
+
+% 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 % Non-3.0.
+\else
+ \def\linenumber{\the\inputlineno:\space}
+\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{%
+ \expandafter\ifx\csname X#1\endcsname\relax
+ % If not defined, say something at least.
+ $\langle$un\-de\-fined$\rangle$%
+ \ifhavexrefs
+ \message{\linenumber Undefined cross reference `#1'.}%
+ \else
+ \ifwarnedxrefs\else
+ \global\warnedxrefstrue
+ \message{Cross reference values unknown; you must run TeX again.}%
+ \fi
+ \fi
+ \else
+ % It's defined, so just use it.
+ \csname X#1\endcsname
+ \fi
+ #2% Output the suffix in any case.
+}
+
+% This is the macro invoked by entries in the aux file.
+\def\xrdef #1#2{{%
+ \catcode`\'=\other
+ \expandafter\gdef\csname X#1\endcsname{#2}%
+}}
+
+% Read the last existing aux file, if any. No error if none exists.
+\def\readauxfile{\begingroup
+ \catcode`\^^@=\other
+ \catcode`\=\other
+ \catcode`\=\other
+ \catcode`\^^C=\other
+ \catcode`\^^D=\other
+ \catcode`\^^E=\other
+ \catcode`\^^F=\other
+ \catcode`\^^G=\other
+ \catcode`\^^H=\other
+ \catcode`\=\other
+ \catcode`\^^L=\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
+ \catcode26=\other
+ \catcode`\^^[=\other
+ \catcode`\^^\=\other
+ \catcode`\^^]=\other
+ \catcode`\^^^=\other
+ \catcode`\^^_=\other
+ \catcode`\@=\other
+ \catcode`\^=\other
+ % It was suggested to define this as 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
+ \catcode`\[=\other
+ \catcode`\]=\other
+ \catcode`\"=\other
+ \catcode`\_=\other
+ \catcode`\|=\other
+ \catcode`\<=\other
+ \catcode`\>=\other
+ \catcode`\$=\other
+ \catcode`\#=\other
+ \catcode`\&=\other
+ % `\+ does not work, so use 43.
+ \catcode43=\other
+ % Make the characters 128-255 be printing characters
+ {%
+ \count 1=128
+ \def\loop{%
+ \catcode\count 1=\other
+ \advance\count 1 by 1
+ \ifnum \count 1<256 \loop \fi
+ }%
+ }%
+ % The aux file uses ' as the escape (for now).
+ % Turn off \ as an escape so we do not lose on
+ % entries which were dumped with control sequences in their names.
+ % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
+ % Reference to such entries still does not work the way one would wish,
+ % but at least they do not bomb out when the aux file is read in.
+ \catcode`\{=1
+ \catcode`\}=2
+ \catcode`\%=\other
+ \catcode`\'=0
+ \catcode`\\=\other
+ %
+ \openin 1 \jobname.aux
+ \ifeof 1 \else
+ \closein 1
+ \input \jobname.aux
+ \global\havexrefstrue
+ \global\warnedobstrue
+ \fi
+ % Open the new aux file. TeX will close it automatically at exit.
+ \openout\auxfile=\jobname.aux
+\endgroup}
+
+
+% 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
+
+\let\ptexfootnote=\footnote
+
+{\catcode `\@=11
+%
+% Auto-number footnotes. Otherwise like plain.
+\gdef\footnote{%
+ \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}\/\fi
+ %
+ % Remove inadvertent blank space before typesetting the footnote number.
+ \unskip
+ \thisfootno\@sf
+ \footnotezzz
+}%
+
+% 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 fail inside footnotes because the tokens are fixed when
+% the footnote is read. --karl, 16nov96.
+%
+\long\gdef\footnotezzz{\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.
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\ht\strutbox % top baseline for broken footnotes
+ \splitmaxdepth\dp\strutbox
+ \floatingpenalty\@MM
+ \leftskip\z at skip
+ \rightskip\z at skip
+ \spaceskip\z at skip
+ \xspaceskip\z at skip
+ \parindent\defaultparindent
+ %
+ % Hang the footnote text off the number.
+ \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 at t
+}
+\def\fo at t{\ifcat\bgroup\noexpand\next \let\next\f@@t
+ \else\let\next\f at t\fi \next}
+\def\f@@t{\bgroup\aftergroup\@foot\let\next}
+\def\f at t#1{#1\@foot}
+\def\@foot{\strut\egroup}
+
+}%end \catcode `\@=11
+
+% 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
+ }%
+}
+
+% @| 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
+ }%
+ }%
+}
+
+% 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}
+
+
+% End of control word definitions.
+
+\message{and turning on texinfo input format.}
+
+\def\openindices{%
+ \newindex{cp}%
+ \newcodeindex{fn}%
+ \newcodeindex{vr}%
+ \newcodeindex{tp}%
+ \newcodeindex{ky}%
+ \newcodeindex{pg}%
+}
+
+% Set some numeric style parameters, for 8.5 x 11 format.
+
+\hsize = 6in
+\hoffset = .25in
+\newdimen\defaultparindent \defaultparindent = 15pt
+\parindent = \defaultparindent
+\parskip 3pt plus 2pt minus 1pt
+\setleading{13.2pt}
+\advance\topskip by 1.2cm
+
+\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
+
+% 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. This makes it come to about 9pt for the 8.5x11 format.
+%
+\ifx\emergencystretch\thisisundefined
+ % Allow us to assign to \emergencystretch anyway.
+ \def\emergencystretch{\dimen0}%
+\else
+ \emergencystretch = \hsize
+ \divide\emergencystretch by 45
+\fi
+
+% Use @smallbook to reset parameters for 7x9.5 format (or else 7x9.25)
+\def\smallbook{
+ \global\chapheadingskip = 15pt plus 4pt minus 2pt
+ \global\secheadingskip = 12pt plus 3pt minus 2pt
+ \global\subsecheadingskip = 9pt plus 2pt minus 2pt
+ %
+ \global\lispnarrowing = 0.3in
+ \setleading{12pt}
+ \advance\topskip by -1cm
+ \global\parskip 2pt plus 1pt
+ \global\hsize = 5in
+ \global\vsize=7.5in
+ \global\tolerance=700
+ \global\hfuzz=1pt
+ \global\contentsrightmargin=0pt
+ \global\deftypemargin=0pt
+ \global\defbodyindent=.5cm
+ %
+ \global\pagewidth=\hsize
+ \global\pageheight=\vsize
+ %
+ \global\let\smalllisp=\smalllispx
+ \global\let\smallexample=\smalllispx
+ \global\def\Esmallexample{\Esmalllisp}
+}
+
+% Use @afourpaper to print on European A4 paper.
+\def\afourpaper{
+\global\tolerance=700
+\global\hfuzz=1pt
+\setleading{12pt}
+\global\parskip 15pt plus 1pt
+
+\global\vsize= 53\baselineskip
+\advance\vsize by \topskip
+%\global\hsize= 5.85in % A4 wide 10pt
+\global\hsize= 6.5in
+\global\outerhsize=\hsize
+\global\advance\outerhsize by 0.5in
+\global\outervsize=\vsize
+\global\advance\outervsize by 0.6in
+
+\global\pagewidth=\hsize
+\global\pageheight=\vsize
+}
+
+\bindingoffset=0pt
+\normaloffset=\hoffset
+\pagewidth=\hsize
+\pageheight=\vsize
+
+% Allow control of the text dimensions. Parameters in order: textheight;
+% textwidth; voffset; hoffset; binding offset; topskip.
+% All require a dimension;
+% header is additional; added length extends the bottom of the page.
+
+\def\changepagesizes#1#2#3#4#5#6{
+ \global\vsize= #1
+ \global\topskip= #6
+ \advance\vsize by \topskip
+ \global\voffset= #3
+ \global\hsize= #2
+ \global\outerhsize=\hsize
+ \global\advance\outerhsize by 0.5in
+ \global\outervsize=\vsize
+ \global\advance\outervsize by 0.6in
+ \global\pagewidth=\hsize
+ \global\pageheight=\vsize
+ \global\normaloffset= #4
+ \global\bindingoffset= #5}
+
+% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin
+% 29mm, hence bottom margin 28mm, nominal side margin 3cm.
+\def\afourlatex
+ {\global\tolerance=700
+ \global\hfuzz=1pt
+ \setleading{12pt}
+ \global\parskip 15pt plus 1pt
+ \advance\baselineskip by 1.6pt
+ \changepagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}
+ }
+
+% Use @afourwide to print on European A4 paper in wide format.
+\def\afourwide{\afourpaper
+\changepagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}}
+
+% 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
+\def\normaldoublequote{"}
+\def\normaltilde{~}
+\def\normalcaret{^}
+\def\normalunderscore{_}
+\def\normalverticalbar{|}
+\def\normalless{<}
+\def\normalgreater{>}
+\def\normalplus{+}
+
+% This macro is used to make a character print one way in ttfont
+% where it can probably just be output, 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\the\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 \char '042}}
+\let"=\activedoublequote
+\catcode`\~=\active
+\def~{{\tt \char '176}}
+\chardef\hat=`\^
+\catcode`\^=\active
+\def^{{\tt \hat}}
+
+\catcode`\_=\active
+\def_{\ifusingtt\normalunderscore\_}
+% Subroutine for the previous macro.
+\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}}
+
+\catcode`\|=\active
+\def|{{\tt \char '174}}
+\chardef \less=`\<
+\catcode`\<=\active
+\def<{{\tt \less}}
+\chardef \gtr=`\>
+\catcode`\>=\active
+\def>{{\tt \gtr}}
+\catcode`\+=\active
+\def+{{\tt \char 43}}
+%\catcode 27=\active
+%\def^^[{$\diamondsuit$}
+
+% Set up an active definition for =, but don't enable it most of the time.
+{\catcode`\==\active
+\global\def={{\tt \char 61}}}
+
+\catcode`+=\active
+\catcode`\_=\active
+
+% 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}
+
+\catcode`\@=0
+
+% \rawbackslashxx output one backslash character in current font
+\global\chardef\rawbackslashxx=`\\
+%{\catcode`\\=\other
+%@gdef at rawbackslashxx{\}}
+
+% \rawbackslash redefines \ as input to do \rawbackslashxx.
+{\catcode`\\=\active
+ at gdef@rawbackslash{@let\=@rawbackslashxx }}
+
+% \normalbackslash outputs one backslash in fixed width font.
+\def\normalbackslash{{\tt\rawbackslashxx}}
+
+% Say @foo, not \foo, in error messages.
+\escapechar=`\@
+
+% \catcode 17=0 % Define control-q
+\catcode`\\=\active
+
+% Used sometimes to turn off (effectively) the active characters
+% even after parsing them.
+ at def@turnoffactive{@let"=@normaldoublequote
+ at let\=@realbackslash
+ at let~=@normaltilde
+ at let^=@normalcaret
+ at let_=@normalunderscore
+ at let|=@normalverticalbar
+ at let<=@normalless
+ at let>=@normalgreater
+ at let+=@normalplus}
+
+ at def@normalturnoffactive{@let"=@normaldoublequote
+ at let\=@normalbackslash
+ at let~=@normaltilde
+ at let^=@normalcaret
+ at let_=@normalunderscore
+ at let|=@normalverticalbar
+ at let<=@normalless
+ at let>=@normalgreater
+ at let+=@normalplus}
+
+% Make _ and + \other characters, temporarily.
+% This is canceled by @fixbackslash.
+ at 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.
+%
+ at gdef@eatinput input texinfo{@fixbackslash}
+ at 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 back turn on active characters that might appear in the input
+% file name, in case not using a pre-dumped format.
+%
+ at gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi
+ @catcode`+=@active @catcode`@_=@active}
+
+%% These look ok in all fonts, so just make them not special. The @rm below
+%% makes sure that the current font starts out as the newly loaded cmr10
+ at catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other
+
+ at textfonts
+ at rm
+
+ at c Local variables:
+ at c page-delimiter: "^\\\\message"
+ at c End:
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,6 @@
+Makefile
+e2fsck
+e2fsck.8
+e2fsck.shared
+e2fsck.static
+profiled
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/CHANGES
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/CHANGES 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/CHANGES 2006-07-10 20:52:46 UTC (rev 35)
@@ -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.
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2645 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-03-07 Theodore Tso <tytso at mit.edu>
+
+ * journal.c, pass5.c, revoke.c: Fix gcc -Wall complaints
+
+2002-03-07 Theodore Tso <tytso at mit.edu>
+
+ * unix.c (main): Don't close the filesystem before calling
+ fatal_error(); this just causes a needless warning about a
+ bad I/O manager magic number.
+
+ * journal.c (e2fsck_check_ext3_journal): Offer to clear the inode
+ in case the journal is too small, or the inode number in
+ the superblock doesn't appear to be random.
+
+2002-03-06 Theodore Tso <tytso at mit.edu>
+
+ * problem.h, problem.c: PR_5_BLOCK_RANGE_UNUSED,
+ PR_5_BLOCK_RANGE_USED, PR_5_INODE_RANGE_UNUSED,
+ PR_5_INODE_RANGE_USED: Add new problem codes.
+
+ * pass5.c (check_block_bitmaps, check_inode_bitmaps): Collapse
+ reporting of adjacent blocks and inodes into a range.
+
+2002-03-04 Philipp Thomas <pthomas at suse.de>
+
+ * unix.c (main): Newer libintl needs LC_CTYPE to be set in
+ addition to LC_MESSAGES.
+
+2002-02-24 Theodore Tso <tytso at mit.edu>
+
+ * Makefile.in (install): Install hard links for man pages for
+ fsck.ext2 and fsck.ext3. Remove any compressed man
+ pages before installing the man pages.
+
+2002-02-22 Theodore Tso <tytso at mit.edu>
+
+ * journal.c: Improve code maintainability and reduce code size by
+ moving common code paths in e2fsck_journal_init_dev() and
+ e2fsck_journal_init_inode() into e2fsck_get_journal().
+ Also fixed a memory leak in recover_ext3_journal().
+
+ * super.c (release_orphan_inodes): Fix memory leak.
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-12-24 Theodore Tso <tytso at mit.edu>
+
+ * unix.c (PRS): Don't allow the -c and -l/-L options to be
+ specified at the same time.
+
+ * e2fsck.h (E2F_OPT_WRITECHECK), unix.c (PRS),
+ badblocks.c (read_bad_blocks_file): If two -c options are
+ specified, then perform a non-destructive read/write scan
+ of the disk.
+
+ * e2fsck.8.in: Document the double -c option; also encourage users
+ to use -c instead of the -l/-L options since it's too hard
+ for users to get things like the blocksize parameter correct.
+
+2001-12-23 Theodore Tso <tytso at mit.edu>
+
+ * util.c (get_backup_sb): This function now searches for the
+ backup superblock by iterating over possible blocksizes
+ instead of defaulting a guess of 8193 if the superblock
+ isn't available.
+
+ * message.c (expand_percent_expression), unix.c (main): Pass in
+ new parameters to get_backup_sb. Also, in unix.c, use the
+ blocksize paramter in the e2fsck context structure instead
+ of using a static variable, since get_backup_sb wants to
+ be able to set the blocksize paramter.
+
+ * e2fsck.h: Update function prototype for get_backup_sb; also add
+ the blocksize parameter to the e2fsck context structure.
+
+ * Makefile.in, jfs_user.h: Move linux/jbd.h to
+ ext2fs/kernel-jbd.h, to avoid using the system header
+ file version of hbd.h when using diet glibc (since it
+ forcibly adds /usr/include to the beginning of the
+ include search path.)
+
+2001-12-21 Theodore Tso <tytso at mit.edu>
+
+ * problem.c (fix_problem): Use ctx->filesystem_name if the
+ ctx->device_name is NULL.
+
+ * journal.c (e2fsck_check_ext3_journal): Give the opportunity to
+ run the journal even if recovery flag is cleared. If
+ we're using a backup superblock, run the journal by
+ default.
+
+ * e2fsck.h (E2F_OPT_FORCE), unix.c (PRS, check_if_skip): Use a
+ bitfield in the e2fsck context flags word to indicate
+ whether or not a check should be forced. This allows the
+ journal code to set the option if necessary to force a
+ filesystem check.
+
+ * problem.h, problem.c: Remove PR_0_JOURNAL_RESET_JOURNAL, and add
+ PR_0_JOURNAL_RUN and PR_0_JOURNAL_RUN_DEFAULT. Update
+ problem decription texts.
+
+2001-12-16 Theodore Tso <tytso at mit.edu>
+
+ * e2fsck.h (ext2fs_get_refcount_size), unix.c (check_mount, PRS),
+ pass1.c (adjust_extattr_refcount),
+ ea_refcount.c (ea_refcount_create): Fix gcc -Wall nits.
+
+ * recovery.c, revoke.c: Update to versions from 2.4.17-pre8.
+
+ * journal.c, jfs_user.h: Update support code for new version of
+ recover.c and revoke.c. Fix support for filesystems with
+ external journals.
+
+2001-11-30 Gabriel Paubert <paubert at iram.es>
+
+ * journal.c (e2fsck_journal_load): Fix an endianness bug.
+
+2001-11-26 Theodore Tso <tytso at mit.edu>
+
+ * super.c (check_super_block): Make sure that if the inode table
+ or allocation bitmap is zero, that it is marked as
+ invalid, so that in pass #1, a new bitmap/inode table gets
+ properly allocated. (Addresses Debian Bug #116975)
+
+2001-11-24 Theodore Tso <tytso at mit.edu>
+
+ * e2fsck.8.in: Fix minor typo in man page and clarify device
+ specification.
+
+2001-10-07 Theodore Tso <tytso at mit.edu>
+
+ * journal.c (clear_v2_journal_fields, e2fsck_journal_load): If the
+ V2 fields are set on a V1 journal superblock, or an
+ internal V2 journal has s_nr_users is non-zero, clear the
+ entire journal superblock beyond the V1 superblock. This
+ fixes botched V1->V2 updates.
+
+ * problem.c, problem.h (PR_0_CLEAR_V2_JOURNAL): Add new problem code.
+
+2001-09-20 Theodore Tso <tytso at mit.edu>
+
+ * e2fsck.h, journal.c (e2fsck_move_ext3_journal): Add new function
+ which will automatically relocate the ext3 journal from a
+ visible file to an invisible journal file if the
+ filesystem has been opened read/write.
+
+ * super.c (check_super_block): Add call to e2fsck_move_ext3_journal
+
+ * problem.c, problem.h (PR_0_MOVE_JOURNAL, PR_0_ERR_MOVE_JOURNAL):
+ Add new problem codes.
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-19 Theodore Tso <tytso at mit.edu>
+
+ * unix.c (main): If a superblock is specified explicitly by the
+ user, don't try to automatically fall back to an
+ alternate superblock.
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-30 Theodore Tso <tytso at valinux.com>
+
+ * pass1.c (e2fsck_pass1): For EXT2_RESIZE_INO, allow its i_mode to
+ either be zero or a regular file (for compatibility with
+ Andreas's on-line resizing programs).
+
+2001-08-27 Theodore Tso <tytso at valinux.com>
+
+ * unix.c (main): Remove EXT2FS_VERSION from the version display,
+ since it only confuses people.
+
+ * pass1.c (strnlen): Provide strnlen if libc doesn't.
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-08-13 Theodore Tso <tytso at valinux.com>
+
+ * super.c (release_orphan_inodes): If the filesystem contains
+ errors, don't run the orphan * list, since the orphan list
+ can't be trusted.
+
+ * pass1.c (check_size): Fix logic in check_size; the previous code
+ only offered to clear the inode size fields if both size
+ and i_size_high were zero.
+ (e2fsck_pass1_check_device_inode): If i_blocks is
+ non-zero, then assume that the device/socket/fifo inode
+ is bogus.
+
+2001-08-09 Theodore Tso <tytso at valinux.com>
+
+ * pass1.c, pass2.c, problem.c, problem.h: Fix bug introduced by
+ Andreas's symlink code; check_blocks() was unconditionally
+ testing inode_bad_map without checking to see if it
+ existed first. Fixed problem a different way; we now no
+ longer check inode_bad_map at all, since the file might
+ not get deleted in pass 2 anyway. We move the large file
+ feature reconciliation code to to e2fsck_pass2(), and in
+ deallocate_inode() in pass2.c, we decrement the large
+ files counter if we're about to delete a large file.
+
+ * unix.c (show_stats): Print the number of large files in verbose
+ mode.
+
+2001-08-07 Theodore Tso <tytso at valinux.com>
+
+ * journal.c (recover_ext3_journal): If s_errno is set in the
+ journal superblock, set the EXT2_ERROR_FS flag in the
+ filesystem superblock after the journal is run.
+
+2001-08-04 Andreas Dilger <root at lynx.adilger.int>
+
+ * message.c: Change comments for %D and %d expansion in e2fsck
+ problem codes. It was not consistent which was for dirent
+ expansion, and which was for directory number expansion.
+
+ * problem.c (PR_2_FINAL_RECLEN, PR_2_BAD_FILETYPE): Fix problem
+ codes which got caught by the confusion between %D and %d.
+
+2001-08-04 Theodore Tso <tytso at valinux.com>
+
+ * problem.c (PR_2_SYMLINK_SIZE): Change description to make it
+ more clear (and remove %s expansion). Also add missing
+ periods to the end of a number of problem descriptions.
+
+ * pass2.c (e2fsck_process_bad_inode): Remove unneeded problem
+ context string set now that the problem description for
+ PR_2_SYMLINK_SIZE has been changed.
+
+ * pass1.c (e2fsck_pass1_check_symlink): Consolidate some checks,
+ and check the validity of the symlink block here (so that
+ we detect this case here instead of later). Also use
+ sizeof(inode->i_block) instead EXT2_LINK_DIR.
+
+2001-07-30 Theodore Tso <tytso at valinux.com>
+
+ * unix.c (check_mount): Remove the code which tested for the root
+ filesystem being mounted read-only, and depend on the
+ results flags from ext2fs_check_if_mounted.
+
+2001-07-29 Theodore Tso <tytso at valinux.com>
+
+ * unix.c (check_if_skip): Free the e2fsck context structure on a
+ normal clean filesystem exit, to make it easier to find
+ real memory leaks.
+ (PRS): Only update the path to include /sbin at the
+ beginning if the -c option is given, again to make it
+ easier to find memory leaks.
+ (main): Move the final print_resource_track call after the
+ filesystem and the context are freed.
+
+ * journal.c (e2fsck_journal_init_dev): Avoid memory leak if we
+ need to search for the journal device.
+ (e2fsck_journal_release): Free the journal IO channel when
+ we release the journal handle, to avoid a memory leak.
+
+ * e2fsck.c (e2fsck_reset_context): Fix bug; only close the io
+ channel if it is *different* from the filesystem io
+ channel.
+
+2001-07-27 Theodore Tso <tytso at valinux.com>
+
+ * problem.c (PR_1_SET_IMMUTABLE): Clarify problem message.
+
+ * pass1.c (e2fsck_pass1): Check for symlinks that have the
+ immutable flag set (and offer to clear them).
+
+2001-07-26 Theodore Tso <tytso at valinux.com>
+
+ * pass1.c (e2fsck_pass1): Free ctx->block_ea_map at the end of
+ pass 1.
+
+2001-07-25 Theodore Tso <tytso at valinux.com>
+
+ * pass1.c (check_ext_attr): Skip zero-length EA entries.
+
+ * problem.c: PR_1_EA_ALLOC_COLLISION shouldn't abort, but should
+ prompt to clear the EA block.
+
+2001-07-22 Theodore Tso <tytso at valinux.com>
+
+ * journal.c (ll_rw_block): Use ctx->journal_io instead of the
+ filesystem's io_channel.
+ (e2fsck_journal_init_dev): New function which supports
+ initialization of the external journal.
+ (e2fsck_get_journal): Remove code which flagged an error
+ if the superblock reported the use of an external journal.
+ (ext3_journal_via_mount): Remove unsued, #ifdefed out function.
+
+ * problem.c, problem.h: Removed error codes no longer used
+ (PR_0_JOURNAL_UNSUPP_DEV, PR_0_JOURNAL_BAD_DEV,
+ PR_0_JOURNAL_UNSUPP_UUID) and replace them with new error
+ codes related with failures in loading the external
+ journal (PR_0_JOURNAL_UNSUPP_MULTIFS,
+ PR_0_CANT_FIND_JOURNAL, PR_0_EXT_JOURNAL_BAD_SUPER).
+ Also changed the text assocated with PR_0_JOURNAL_BAD_UUID
+ to reflect the case where the external journal isn't
+ correct for this filesystem.
+
+ * unix.c (PRS), e2fsck.8.in: Add new option -j which allows
+ the user to specify the pathname to find the external journal.
+
+ * e2fsck.c (e2fsck_reset_context): Close journal_io if it isn't
+ the same as the filesystem io_channel.
+
+ * e2fsck.h: Add new fields (journal_io and journal_name) in the
+ context structure to support external journals.
+
+2001-07-20 Theodore Tso <tytso at valinux.com>
+
+ * unix.c (main): Add an explicit warning when the filesystem is
+ left not completely fixed when e2fsck exits. (Addresses
+ Debian bug #104502.)
+
+2001-07-19 Theodore Tso <tytso at valinux.com>
+
+ * pass1.c (check_ext_attr): The entire EA block is now checked to
+ make sure that parts of the EA block aren't being used for
+ multiple purposes.
+
+ * Makefile.in e2fsck.h, region.c: New file which is used to detect
+ collisions in extended attribute block.
+
+ * problem.h, problem.c (PR_1_EA_MULTI_BLOCK, PR_1_EA_ALLOC_REGION,
+ PR_1_EA_ALLOC_COLLISION, PR_1_EA_BAD_NAME,
+ PR_1_EA_BAD_VALUE): Add new problem codes.
+
+2001-07-10 Theodore Tso <tytso at valinux.com>
+
+ * journal.c (e2fsck_run_ext3_journal): Only call ext3_flush() if
+ the superblock is dirty.
+
+2001-07-07 Theodore Tso <tytso at valinux.com>
+
+ * pass1b.c (pass1b, process_pass1b_block): Change the num_bad
+ field calculation so that it only counts EA block entries
+ as a single multiply claimed block (since once we clone
+ the EA blocks for one inode, we fix the problem for all of
+ the other inodes). Also, I moved the num_bad calculation
+ from process_pass1b_block to the end of pass1b. This
+ fixes a *significant* performance bug in pass1b which hit
+ people who had to had a lot of multiply claimed blocks.
+ (Can you say O(n**3) boys and girls? I knew you could...
+ Fortunately, this case didn't happen that much in actual
+ practice.)
+
+ * pass1.c (e2fsck_pass1): Defer inodes which have an extended
+ attribute block for later processing to avoid extra seeks
+ across the disk.
+ (process_inode_cmp): If there is no indirect block, sort
+ by the extended attribute (i_file_acl) block.
+
+ * pass1b.c (clone_file_block): Fix bugs when cloning extended
+ attribute blocks. Moved free of block_buf to after the
+ code which clones the extattr block, and fixed logic for
+ changing pointers to the extended attribute field in the
+ inodes which were affected.
+ (decrement_badcount): New function which is used whenever
+ we need to decrement the number of files which claim a
+ particular bad block. Fixed bug where delete_file wasn't
+ checking check_if_fs_block() before clearing the entry in
+ block_dup_map. This could cause a block which was claimed
+ by multiple files as well as the filesystem metadata to
+ not be completely fixed.
+
+ * pass1.c (adjust_extattr_refcount): Add new function which
+ adjusts the reference counts of extended attribute blocks
+ if needed, both up and down.
+ (e2fsck_pass1): If the refcount or refcount_extra
+ structure are present, call adjust_extattr_refcount(),
+ and free it afterwards.
+
+ * problem.h, problem.c (PR_1_EXTATTR_READ_ABORT,
+ PR_1_EXTATTR_REFCOUNT, PR_1_EXTATTR_WRITE): Add new
+ problem codes.
+
+2001-07-02 Theodore Tso <tytso at valinux.com>
+
+ * pass1.c (e2fsck_pass1, check_ext_attr, check_blocks): Add
+ initial support for scanning extended attribute blocks.
+
+ * e2fsck.c (e2fsck_reset_context): free extended attribute
+ refcount structure.
+
+ * e2fsck.h: Add new fields for accounting for the extended
+ attribute blocks.
+
+ * Makefile.in, ea_refcount.c, e2fsck.h: Add new file which
+ implements a reference count abstraction.
+
+ * problem.c, problem.h: Add new problem codes PR_1_ALLOCATE_REFCOUNT,
+ PR_1_READ_EA_BLOCK, PR_1_BAD_EA_BLOCK, PR_2_FILE_ACL_BAD
+
+ * message.c: Add "@a" as an abbreviation for "extended attribute"
+
+ * pass1b.c (clone_file): Add code which handles cloning an
+ extended attribute block.
+
+ * pass1b.c (delete_file):
+ * pass2.c (deallocate_inode): If the inode contains an extended
+ attribute block in the file_acl field, clear it and
+ deallocate the block.
+
+2001-06-28 Theodore Tso <tytso at valinux.com>
+
+ * pass2.c (e2fsck_process_bad_inode): Deal with inodes which are
+ marked bad because of an invalid file_acl (either because
+ EXT2_FEATURE_COMPAT_EXT_ATTR is not set, or because the
+ block number in file_acl is bad.
+
+2001-06-29 Theodore Tso <tytso at valinux.com>
+
+ * unix.c (show_stats): Use long long to calculate the percentage
+ of the number of blocks in use in the filesystem.
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-22 Theodore Tso <tytso at valinux.com>
+
+ * flushb.c: Use platform independent method of defining the
+ BLKFLSBUF ioctl. Also include sys/mount.h since on newer
+ platforms BLKFLSBUF is defined there.
+
+2001-06-19 Theodore Tso <tytso at valinux.com>
+
+ * super.c (release_inode_blocks): Don't try to release the blocks
+ if the orphaned inode is a device file, symlink, or some
+ other kind of special file that doesn't have a block list.
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-06-13 Theodore Tso <tytso at valinux.com>
+
+ * unix.c (check_if_skip): Adapted patch from Andreas Dilger which
+ prints the number of mounts or days elapsed since the last
+ check when e2fsck is forced to check an otherwise clean
+ filesystem.
+
+2001-06-12 Theodore Tso <tytso at valinux.com>
+
+ * badblocks.c: Stop using the compatibility badblocks function,
+ and use the ext2fs_badblocks_* functions instead.
+
+2001-06-11 Theodore Tso <tytso at valinux.com>
+
+ * unix.c (PRS): Fix bug introduced in 1.20 which broke the -F
+ flag.
+
+ * Makefile.in: Add message.c and swapfs.c to the list of source
+ files to build the make depend.
+
+ * swapfs.c, unix.c: Only support the -s and -S options to e2fsck
+ if ENABLE_SWAPFS is defined.
+
+2001-06-08 Theodore Tso <tytso at valinux.com>
+
+ * recover.c, revoke.c: Synchronize with ext3 0.7a
+
+2001-06-02 Theodore Tso <tytso at valinux.com>
+
+ * recovery.c (scan_revoke_records): Fix bug in recovery code;
+ missing byte order conversion.
+
+ * pass1.c (mark_inode_bad): Replace alloc_bad_map with a function
+ which sets the bit in the bad inode bitmap.
+ (e2fsck_pass1): Check for fast symlinks with an invalid
+ size, and set the bad inode map in that case.
+ (check_size): Check i_size_high for special files and
+ prompt to clear it along with i_size if non-zero.
+
+ * pass2.c (e2fsck_process_bad_inode): Check for fast symlinks with
+ an invalid size and prompt the user if the inode should be
+ cleared.
+
+ * problem.h, problem.c (PR_2_SYMLINK_SIZE): Added new problem code.
+
+2001-06-01 Theodore Tso <tytso at valinux.com>
+
+ * problem.c, problem.h: Change PR_0_JOURNAL_UNSUPP_INCOMPAT and
+ PR_0_JOURNAL_UNSUPP_ROCOMPAT so they aren't fatal errors,
+ but prompt to see if the user should abort. Removed the
+ PR_0_JOURNAL_RESET_COMPAT problem code.
+
+ * journal.c (e2fsck_journal_load): If there are incompatible
+ journal flags, just return an error code.
+ (e2fsck_check_ext3_journal): If e2fsck_journal_load
+ returns an error code indicating that there are
+ incompatible journal flag, check to see if we should
+ abort, and then offer to clear the journal.
+ (Addresses Debian bug #98527.)
+
+ * Makefile.in: Move include/asm/types.h.in to
+ lib/ext2fs/ext2_types.h.in.
+
+2001-06-01 Theodore Tso <tytso at valinux.com>
+
+ * pass1.c (pass1_get_blocks, pass1_read_inode, pass1_write_inode,
+ pass1_check_directory): Add a safety check to make sure
+ ctx->stashed_inode is non-zero.
+
+ * pass1b.c (pass1b): Use e2fsck_use_inode_shortcuts() to disable
+ the inode shortcut processing, instead of manually
+ clearing only half of the function pointers that needed to
+ be NULL'ed out. This caused nasty bugs if the last inode
+ in the filesystem needed dup block processing.
+
+ * pass1b.c (clone_file_block): When cloning a directory's metadata
+ block, don't try to update the directory block list
+ database, since indirect blocks aren't stored in the
+ database and the resulting error will abort the file clone
+ operation.
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * journal.c (e2fsck_journal_reset_super): Remove extraneous line
+
+2001-05-23 Theodore Tso <tytso at valinux.com>
+
+ * journal.c (e2fsck_journal_reset_super): Fix bug; the reset
+ journal wasn't getting written out to disk since the dirty
+ bit wasn't being set on the buffer.
+ (e2fsck_journal_load): Don't print an error message if the
+ journal version number is wrong; just return a error code
+ reflecting this fact. If the block type in the journal
+ superblcok is obviously not a version number, report the
+ journal is corrupted.
+ (e2fsck_check_ext3_journal): On an unsupported journal
+ version, prompt to abort by default, but then offer a
+ chance to clear the journal as corrupt.
+
+ * problem.c, problem.h (PR_0_JOURNAL_UNSUPP_VERSION): Added new
+ problem code.
+
+2001-05-14 Theodore Tso <tytso at valinux.com>
+
+ * pass1.c: Treat inodes with a low dtime (that were from a
+ corrupted orphan list) specially.
+
+ * problem.c, problem.h: Add new problem codes PR_1_LOW_DTIME and
+ PR_1_ORPHAN_LIST_REFUGEES, and a new latch group,
+ PR_LATCH_LOW_DTIME.
+
+ * problemP.h: Expand the size of the problem flag to be an int
+ instead of a short. Expand space in the flag word which
+ is reserved for problem latch flags from 3 bits to 8 bits.
+
+ * e2fsck.h, scantest.c: Change location of ext2_fs.h to be
+ ext2fs/ext2_fs.h
+
+ * super.c (check_super_block): Be more strict on checking
+ s_r_blocks_count superblock field.
+
+2001-05-13 Theodore Tso <tytso at valinux.com>
+
+ * problem.c, problem.h (PR_0_JOURNAL_UNSUPP_ROCOMPAT,
+ PR_0_JOURNAL_UNSUPP_INCOMPAT, PR_0_JOURNAL_RESET_COMPAT):
+ New problem codes.
+
+ * journal.c (e2fsck_journal_load): Use a problem code to
+ report unsupported feature flags. There is code to
+ clear unsupported flags, but since this is dangerous,
+ it's not allowed in the problem code table.
+
+2001-05-11 Andreas Dilger <adilger at turbolinux.com>
+
+ * journal.c (e2fsck_journal_reset_super): initialize the journal
+ sequence number to a random value to avoid recovering
+ bad transactions from a corrupt journal.
+
+2001-05-13 Theodore Tso <tytso at valinux.com>
+
+ * journal.c: Code cleanup; initialize journal_enable_debug using
+ an initializer.
+
+2001-05-12 Theodore Tso <tytso at valinux.com>
+
+ * unix.c (PRS): Skip validation of -C's file descriptor if it is
+ zero, since that is special case.
+
+2001-05-09 Theodore Tso <tytso at valinux.com>
+
+ * super.c (release_orphan_inodes): Add gettext quoting around
+ "Truncating" and "Clearing" for i18n.
+
+2001-05-05 Theodore Tso <tytso at valinux.com>
+
+ * util.c (fatal_error): Use the correct magic number when checking
+ the magic number for the io_channel data structure. Also
+ remove extraneous call to io_channel_flush() that was left
+ over from an editing session.
+
+ * pass2.c (check_dir_block): Ignore EXT2_ET_DIR_CORRUPTED errors
+ from ext2fs_read_dir_block().
+
+2001-05-01 Theodore Tso <tytso at valinux.com>
+
+ * unix.c (PRS): Validate the completion information file
+ descriptor so that the completion bar won't get
+ accidentally written onto the disk.
+
+ * e2fsck.8.in: Add explanation that you can use mke2fs -n -b
+ blocksize to printout alternate superblock locations.
+
+2001-04-26 Theodore Tso <tytso at valinux.com>
+
+ * unix.c (check_if_skip): If the max_mount_count is zero, treat it
+ as having no count set.
+
+2001-04-16 Theodore Tso <tytso at valinux.com>
+
+ * super.c (check_super_block): Fix bad calculation of
+ inodes_per_block, and tighten min/max checks to be a bit
+ more paranoid. Thanks to Andreas Dilger for pointing out
+ this bug.
+
+2001-03-29 Theodore Tso <tytso at valinux.com>
+
+ * journal.c (mark_buffer_uptodate): Add emulation of kernel
+ function mark_buffer_uptodate.
+
+ * recovery.c, revoke.c: Synchronize with 0.6b ext3 files.
+
+2001-02-12 Theodore Tso <tytso at valinux.com>
+
+ * journal.c (e2fsck_run_ext3_journal): Force a flush of the
+ filesystem and io_channel before replaying the journal.
+
+2001-01-17 Theodore Ts'o <tytso at valinux.com>
+
+ * pass1.c (check_blocks): Fix large file checking code so that
+ files > 2GB are considered large files, and restrict
+ directories from being > 2GB.
+
+2001-01-12 Theodore Ts'o <tytso at valinux.com>
+
+ * journal.c (e2fsck_journal_fix_unsupported_super): Remove unused
+ function. Add FIXME notes to e2fsck_get_journal(), from
+ Andreas Dilger.
+
+ * pass1.c (e2fsck_pass1): Cap the maximum legal size of a file by
+ the limit caused by the fact that i_blocks is in 512 byte
+ units, and that the Linux buffer cache also fundamentally
+ assumes 512 byte sectors.
+ Make sure that the journal inode is a regular file, and
+ when clearing an unused journal inode, make sure the
+ icount db is updated.
+
+ * problem.c, problem.h (PR_1_JOURNAL_BAD_MODE): Add new problem code.
+
+ * problem.c: For PR_1_RESERVED_BAD_MODE, print a description of
+ the reserved inode. In PR_0_JOURNAL_HAS_JOURNAL, prompt
+ to clear the journal, rather than deleting it (which is
+ more accurate). (From Andreas Dilger.)
+
+ * journal.c: Make sure all functions which return an error code
+ use the errcode_t return type, and not "int"
+ (e2fsck_journal_release): Add new parameter, "drop",
+ which is used when we just want to deallocate the journal
+ without trying to write out any changes.
+ (mark_buffer_clean): New function
+ (e2fsck_check_ext3_journal): If we fail loading the
+ journal, make sure we free all memory associated with it.
+ (recover_ext3_journal): If we fail to load the journal or
+ initialize the revoke data structures, make sure we free all
+ memory associated with the journal.
+
+ * message.c (special_inode_name): Add more special inode names
+ (From Andreas Dilger)
+
+ * util.c (fatal_error): Check to make sure the io_manager data
+ structure is sane before trying to flush the io_channel.
+ (From Andreas Dilger)
+
+ * mtrace.h, super.c, pass2.c: Minor whitespace cleanups, from
+ Andreas Dilger.
+
+ * journal.c (e2fsck_journal_fix_bad_inode): Set pctx->ino to the
+ bad journal number.
+
+ * problem.c (PR_0_JOURNAL_BAD_INODE): Use pctx->ino instead of
+ pctx->num when printing the bad journal inode number.
+
+2001-01-11 <tytso at snap.thunk.org>
+
+ * pass1.c (process_block): Remove dead code which was never
+ getting executed.
+
+ * iscan.c, unix.c, e2fsck.h: Don't use NOARGS, and use
+ ext2fs_sync_device() instead of using BLKFLSBUF.
+
+ * flushb.c: Don't use NOARGS anymore; everything is STDC these days.
+
+ * dirinfo.c, e2fsck.h, emptydir.c, iscan.c, jfs_user.h, journal.c,
+ message.c, pass1.c, pass1b.c, pass2.c, pass3.c, pass4.c,
+ pass5.c, problem.h, scantest.c, super.c, swapfs.c: Change
+ ino_t to ext2_ino_t.
+
+2001-01-09 <tytso at snap.thunk.org>
+
+ * problem.c: Fix another broken @F vs @f problem.
+
+2001-01-06 <tytso at snap.thunk.org>
+
+ * journal.c, pass1.c, pass1b.c, pass3.c, recovery.c, revoke.c,
+ super.c, unix.c, util.c: Fix random gcc -Wall complaints.
+
+ * jfs_user.h: Use more sophisticated inline handling to allow
+ building with --enable-gcc-wall
+
+2001-01-03 <tytso at snap.thunk.org>
+
+ * pass1.c (e2fsck_pass1): Moved journal inode handling out to its
+ own block; if the journal inode is not in use, and it
+ contains data, offer to clear it.
+
+ * problem.h, problem.c (PR1_JOURNAL_INODE_NOT_CLEAR): Add new
+ problem code.
+
+ * problem.c: Modified problem table to use a new abbreviations.
+
+ * message.c: Add @j abbreviation for journal, and @v abbreviation
+ for device.
+
+ * jfs_user.h: Moved contents of jfs_e2fsck.h into jfs_user.h.
+
+ * journal.c (e2fsck_check_ext3_journal): Force a fsck if we remove
+ the journal stored on a reserved inode. Also force a fsck
+ if the journal appears to exist while !NEEDS_RECOVERY, and
+ we forcibly reset the journal.
+
+2001-01-01 <tytso at snap.thunk.org>
+
+ * journal.c, pass1.c, super.c, unix.c: Replace use of struct
+ ext2fs_sb with struct ext2_super_block.
+
+ * pass1.c (check_blocks): Remove use of EXT2_HAS_*_FEATURE macros.
+
+2000-12-31 <tytso at snap.thunk.org>
+
+ * jfs_compat.h: Remove uneeded header file.
+
+2000-12-30 <tytso at snap.thunk.org>
+
+ * malloc.h, mtrace.c: Renamed malloc.h to mtrace.h to avoid
+ conflicts with the system header file.
+
+ * problem.h: Fixed numbering of pass1 error messages; an extra 0
+ had slipped into some of the numbers. (Pointed out by
+ Andreas Dilger)
+
+ * journal.c (e2fsck_journal_fix_corrupt_super): Clean up
+ unnecessary automatic variable. Add explanatory comment
+ about the kernel emulation routines. (Suggested by
+ Andreas Dilger)
+
+2000-12-13 Theodore Ts'o <tytso at valinux.com>
+
+ * journal.c (e2fsck_check_ext3_journal): Check to make sure the
+ journal fields are consistent if any of the superblock
+ fields are set. (Backs out erroneous change made by sct,
+ pointed out by Andreas.)
+
+ * unix.c (main): Clarify coments (no code changes)
+
+ * super.c (release_orphan_inodes): Fix spelling typo in error message.
+
+ * pass1.c (e2fsck_pass1): Offer to update the filesystem revision
+ level if we need to set large files flag. Patch from
+ Andreas Dilger.
+
+ * super.c (check_super_block): 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. Patch from Andreas
+ Dilger.
+
+ * problem.c, problem.h (PR_0_FS_REV_LEVEL, PR_1_FS_REV_LEVEL): Add
+ new problem codes.
+
+2000-12-09 <tytso at snap.thunk.org>
+
+ * flushb.c: Fix flushb so that it does something other than waste
+ disk space when built on systems with modern header files
+ and add a non-subtle Copyright Licensing restriction so
+ Yann will remove it from the Debian Distribution. (Now
+ violates the Debian Free Software Guidelines, on purpose.)
+
+ * journal.c (e2fsck_check_ext3_journal): If JFS_DEBUG is defined
+ at the top level, set the JFS debuging level to 2.
+
+ * jfs_e2fsck.h, jfs_user.h: Replaces jfs_compat.h. The jfs.h file
+ has been moved to the include/linux directory.
+
+ * journal.c, revoke.c, recovery.c: Updated files from Stephen to
+ support the V2 superblock and revoke processing. The
+ journal.c and revoke.c files are copies from the ext3
+ kernel source.
+
+ * Makefile.in: Added revoke.c to the list of source/object files.
+
+2000-11-16 Theodore Ts'o <tytso at valinux.com>
+
+ * pass1b.c: Change routines to use PR_1B_BLOCK_ITERATE when
+ reporting problems rather than using com_err directly.
+
+ * problem.c, problem.h (PR_1B_BLOCK_ITERATE): Add new problem code.
+
+ * message.c (expand_percent_expression): Add safety check. If
+ ctx->str is NULL, print "NULL" instead of dereferencing
+ the null pointer.
+
+ * pass1b.c, pass2.c, pass3.c: Change calls to ext2fs_block_iterate
+ to ext2fs_block_iterate2, to support 64-bit filesizes and
+ to speed things up slightly by avoiding the use of the
+ ext2fs_block_iterate's compatibility shim layer.
+
+2000-10-30 <tytso at snap.thunk.org>
+
+ * util.c (get_backup_sb): Calculate backup superblock correctly
+ when the blocksize is > 1k.
+
+2000-10-26 <tytso at snap.thunk.org>
+
+ * jfs.h, jfs_compat.h, journal.c: Updated to include the
+ definition of the new journal superblock format; still
+ only supports V1 superblocks for now. (From sct)
+
+2000-10-24 <tytso at snap.thunk.org>
+
+ * super.c (release_inode_block, release_inode_blocks,
+ release_orphan_inodes): Add code to deal with truncating
+ inodes which are still in use (but which are on the orphan
+ list because they need truncation).
+
+ * problem.c, problem.h: Rename PR_0_CLEAR_ORPHAN_INODE to
+ PR_0_ORPHAN_CLEAR_INODE, and remove
+ PR_0_ORPHAN_INODE_INUSE.
+
+ * journal.c (e2fsck_run_ext3_journal): Add i18n support, and print
+ a message when the journal is being recovered.
+
+ * pass1.c (e2fsck_pass1): Don't check the i_mode field for the
+ journal inode, if it is in use.
+
+2000-09-12 <tytso at valinux.com>
+
+ * extend.c:
+ * flushb.c: Add include of nls-enable.h which is necessary so that
+ they can compile correctly.
+
+2000-08-22 <tytso at valinux.com>
+
+ * unix.c (main): If we're doing a read-only check, skip the
+ journal playback, but don't abort the e2fsck run.
+
+ * super.c (release_orphan_inodes): Fix typo; should do bounds
+ checking on next_ino instead of ino.
+
+ * jfs_compat.h (J_ASSERT):
+ * journal.c (e2fsck_run_ext3_journal):
+ * pass3.c (adjust_inode_count): Use fatal_error() instead of exit().
+
+ * unix.c: Use fatal_error() instead of exit() whenever possible.
+ Also fix the fsck exit codes so that we use FSCK_USAGE
+ when it is appropriate. Rename global_signal_ctx to
+ e2fsck_global_ctx and let it be exported globally.
+
+ * util.c (fatal_error): Try to flush the I/O manager before
+ forcing an exit.
+
+2000-08-20 <tytso at valinux.com>
+
+ * journal.c (e2fsck_journal_load): Fix **nasty** bug which caused
+ e2fsck_check_ext3_journal to smash the journal because
+ journal->j_transaction_sequence wasn't getting
+ initialized.
+
+ * journal.c: (recover_ext3_journal, e2fsck_run_ext3_journal): Move
+ call to e2fsck_clear_recover from recover_ext3_journal to
+ after the filesystem has been closed and reopened.
+ Otherwise, the superblock in the filesystem handle will
+ probably be stale, and will overwrite the newer version of
+ the superblock written by the log recovery.
+
+ * message.c (expand_inode_expression): Add support for %Iu and %Ig
+
+ * problem.h (PR_0_CLEAR_ORPHAN_INODE): Add new problem code.
+
+ * super.c (release_orphan_inodes, release_inode_block,
+ release_inode_blocks): Update the block group descriptor
+ counts when freeing the orphan inode. Use
+ PR_0_CLEAR_ORPHAN_INODE to report when we clear an orphan.
+
+ * journal.c (e2fsck_run_ext3_journal): Fix a bug where we
+ attempted to reopen the filesystem using the device name
+ instead of the filesystem name.
+
+2000-08-18 <tytso at valinux.com>
+
+ * Makefile.in: Update the make dependencies
+
+ * problem.c, problem.h: Add the problem codes:
+ PR_0_ORPHAN_ILLEGAL_BLOCK_NUM,
+ PR_0_ORPHAN_ALREADY_CLEARED_BLOCK,
+ PR_0_ORPHAN_ILLEGAL_HEAD_INODE,
+ PR_0_ORPHAN_ILLEGAL_INODE, PR_0_ORPHAN_INODE_INUSE
+
+ * super.c (release_inode_blocks, release_orphan_inodes,
+ check_super_block): Add support for clearing orphaned
+ inodes from the unmounted filesystem.
+
+ * journal.c (e2fsck_recover_ext3_journal): Remove the last orphan
+ check; this is now handled in check_super_block ---
+ non-journaled filesystems can use the orphan list in the
+ future. Also, move the the re-opening of the filesystem
+ to e2fsck_run_ext3_journal().
+
+2000-07-12 Andreas Dilger <adilger at turbolinux.com>
+
+ * journal.c: implement loading of ext3 journal for recovery code
+
+ * problem.c (fix_problem): return answer from PR_AFTER_CODE to caller.
+ Add journal problems.
+
+ * recovery.c (journal_recover): user-space ext3 journal recovery code
+
+ * unix.c (main) : check journal and do recovery in separate steps
+
+2000-08-07 <tytso at snap.thunk.org>
+
+ * unix.c (calc_percent): Make sure that we don't take a floating
+ exception if the max value is zero. (should normally
+ never happen, but...)
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+2000-07-06 Theodore Ts'o <tytso at valinux.com>
+
+ * unix.c (check_if_skip): Modify algorithm for checking
+ s_max_mnt_count to match with the kernel. (If
+ s_max_mnt_count is negative, ignore the mnt_count check.)
+
+ * unix.c (e2fsck_update_progress): Adjust the width of the
+ progress bar dynamically, based on the filesystem name
+ that we need to display.
+
+ * unix.c (main): If the ext3 needs_recovery flag is set, call
+ e2fsck_run_ext3_journal() and then restart the e2fsck run.
+
+ * journal.c (e2fsck_run_ext3_journal): New file which contains
+ logic to recover the ext3 journal. This version relies on
+ the kernel being able to mount the filesystem in order to
+ run the journal.
+
+2000-07-05 Theodore Ts'o <tytso at valinux.com>
+
+ * unix.c (e2fsck_update_progress): Only save and check the last
+ percentage after multiplying it by 10, nor 1000, since we
+ only need to save values to a tenth of a percent (and the
+ percentage is already from 0 .. 100%, not 0 .. 1).
+ Also, re-arrange the logic so that we do the time
+ check only after doing the percentage check, and we
+ only advance the spinner if we're about to display it.
+
+2000-07-04 Theodore Ts'o <tytso at valinux.com>
+
+ * pass1.c (e2fsck_pass1): Check to see if the ext3 s_last_orphan
+ field is set; if so, clear it, so that ext3 mounting code
+ won't get confused by the fact that we've cleared out the
+ orphaned inodes.
+
+2000-06-10 Theodore Ts'o <tytso at valinux.com>
+
+ * pass5.c (check_block_bitmaps, check_inode_bitmaps): Add error
+ checking for a "should never happen case".
+
+ * problem.c, problem.h (PR_5_COPY_IBITMAP_ERROR,
+ PR_5_COPY_BBITMAP_ERROR): Add new error codes.
+
+2000-05-27 Theodore Ts'o <tytso at valinux.com>
+
+ * pass1.c (pass1, check_size): Apply patch from Chris Wedgewood
+ (cw at foof.org) which checks to see if special devices have
+ a non-zero size, and deals with it.
+
+ * problem.c, problem.h (PR1_SET_NONZSIZE): Add new problem code.
+
+2000-05-18 Theodore Ts'o <tytso at valinux.com>
+
+ * Makefile.in (install): Create a symbolic link for fsck.ext3 as
+ well.
+
+2000-05-08 Theodore Ts'o <tytso at valinux.com>
+
+ * problem.c, problem.h (PR_0_HURD_CLEAR_FILETYPE): Add new problem
+ code.
+
+ * super.c (check_super_block): If the OS type in the superblock is
+ the Hurd, check to see if the filetype feature is set, and
+ offer to clear it if so. This needs to be done since the
+ Hurd doesn't properly support the filetype feature.
+ (And since the hurd allows the transmogrification of files
+ to special files and vice versa --- for no good reason
+ that I can understand --- it can't support the filetype
+ feature for the forseeable future, either.)
+
+2000-04-03 Theodore Ts'o <tytso at valinux.com>
+
+ * unix.c: For platforms that don't define optarg.h, manually
+ define optarg and optind.
+
+2000-03-20 Theodore Ts'o <tytso at valinux.com>
+
+ * pass1.c (check_immutable, e2fsck_pass1_check_device_inode):
+ Check for the append-only as well as the immutable flag.
+
+ * problem.c (PR_1_SET_IMMUTABLE): Adjust message to include
+ append-only flag. Fix comment for compression flag.
+
+2000-02-12 <tytso at snap.thunk.org>
+
+ * unix.c (e2fsck_update_progress): Limit the number of updates to
+ the progress bars to 8 times a second. This allows a 9600
+ baud console link to keep up.
+
+2000-02-11 <tytso at snap.thunk.org>
+
+ * unix.c (main): If compression is enabled on the filesystem,
+ print a warning message (for now).
+
+ * message.c: Add new compression shortcut: @c == compress
+
+ * problem.c, problem.h (PR_1_COMPR_SET): Add new error code.
+
+ * pass1.c (check_blocks): If the inode has EXT2_COMPRBLK_FL flag
+ set, check to see if the filesystem supports compression.
+ If it does pass this information down to process_block()
+ so it can treat the compressed block flag words
+ correctly. If not, offer to clear the flag, since it
+ shouldn't be set.
+ (process_block): If an inode has the compressed inode flag
+ set, allow EXT2FS_COMPRESSED_BLKADDR.
+
+ * pass1b.c (process_pass1b_block, delete_file_block,
+ clone_file_block):
+ * pass2.c (deallocate_inode_block): Use HOLE_BLKADDR to check to
+ see if the block can be skipped.
+
+2000-02-08 <tytso at snap.thunk.org>
+
+ * util.c: Make resource tracking message more concise.
+
+ * e2fsck.h:
+ * pass1.c (mark_table_blocks, e2fsck_pass1): Remove
+ ctx->block_illegal_map, since it's not needed by pass1,
+ and pass1b has been modified to calculate it manually if
+ needed. This reduces the memory footprint needed by e2fsck.
+
+ * pass1b.c (check_if_fs_block): New static function which returns
+ whether or not a block overlaps with filesystem metadata.
+ This replaces consulting the block_illegal_map bitmap.
+
+ * Makefile.in: Call sync after finishing building all in this
+ directory.
+
+ * unix.c (PRS): sync the filesystem before trying to use
+ BLKFLSBUF, to minimize the chance of causing dirty blocks
+ to get dropped.
+
+ * e2fsck.h: Manually define BLKFLSBUF if not defined, and we're on
+ a Linux/i386 system.
+
+ * pass3.c (check_directory): Only do the loop detection algorithm
+ if we've searched over 2048 parent directories and haven't
+ found the end yet. This means that in the common case, we
+ don't allocate or clear the inode_loop_detection bitmap,
+ which for large systems, merely clearing the bitmap for
+ each directory was turning out to be quite expensive.
+ Thanks to Jani Jaakkola (jjaakkol at cs.helsinki.fi) for
+ identifying this problem.
+
+2000-02-06 Theodore Ts'o <tytso at valinux.com>
+
+ * badblocks.c, e2fsck.h, ehandler.c, emptydir.c, extend.c,
+ flushb.c, iscan.c, message.c, pass1.c, pass1b.c, pass3.c
+ pass4.c, pass5.c, problem.c, scantest.c, swapfs.c,
+ unix.c, util.c: Add Internationalization support as
+ suggested by Marco d'Itri <md at linux.it>.
+
+2000-02-02 Theodore Ts'o <tytso at valinux.com>
+
+ * e2fsck.h, flushb.c, scantest.c: Remove uneeded include of
+ linux/fs.h
+
+2000-01-18 Theodore Ts'o <tytso at valinux.com>
+
+ * Makefile.in: Since LIBUUID can sometimes include "-lsocket"
+ we need a separate DEPLIBUUID that can be used in
+ Makefile's dependency rules.
+
+1999-11-23 <tytso at valinux.com>
+
+ * e2fsck.8.in: Update language about where to find a backup
+ superblock.
+
+1999-11-19 <tytso at valinux.com>
+
+ * pass1.c (process_inodes): Add shortcut handling; if
+ process_inodes_count is zero, return right away, to avoid
+ calling qsort with a non-positive count.
+
+ * message.c (safe_print): Fix to properly display ^A, ^B, etc. and
+ to print Delete as ^?
+
+ * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
+ the source directory.
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-11-10 <tytso at valinux.com>
+
+ * problem.c (fix_problem): Support a new flag, PR_PREEN_NO which
+ means the answer is assumed to be no in preen mode. This
+ is now used in the PR_1_SET_IMMUTABLE code, so that in
+ preen mode we ignore these inodes and just print a warning
+ message.
+
+1999-11-09 <tytso at valinux.com>
+
+ * pass1.c (e2fsck_pass1): If the filesystem does not support
+ imagic inodes, if an inode has the imagic flag set, offer
+ to clear the imagic flag. If a valid device/fifo/socket
+ has the immutable flag set, call the new helper function
+ check_immutable() to offerto clear the immutable flag.
+
+ * pass2.c (check_filetype): Use the new ext2_file_type() helper
+ function instead of calculating the file_type information
+ manually.
+
+ * pass3.c (e2fsck_reconnect_file): When adding a link to
+ lost+found, calculate the filetype information so that
+ ext2fs_link() can use the information if applicable.
+ (get_lost_and_found): Create the /lost+found directory
+ with the correct filetype information if applicable.
+
+ * util.c (ext2_file_type), e2fsck.h: New function which returns
+ the directory entry file type information given the
+ inode's mode bits.
+
+ * problem.c, problem.h: Added new problem codes PR_1_SET_IMAGIC
+ and PR_1_SET_IMMUTABLE.
+
+1999-11-07 <tytso at valinux.com>
+
+ * pass4.c (e2fsck_pass4): Clear inode_imagic_map after freeing it,
+ to prevent it from getting freed twice.
+
+1999-11-06 <tytso at valinux.com>
+
+ * unix.c (main): Close the filesystem before freeing the context,
+ so that in the event of a free()-related segmentation
+ violation, the filesystem is properly closed and written
+ out.
+
+1999-10-27 <tytso at valinux.com>
+
+ * e2fsck.c (e2fsck_reset_context): When freeing
+ ctx->inode_reg_map, we weren't zero'ing
+ ctx->inode_reg_map, which could cause a segfault later on
+ in the e2fsck run.
+
+1999-10-26 <tytso at valinux.com>
+
+ * problem.h (PR_2_SPLIT_DOT): Fix excess zero in problem code (now
+ matches the standard convention).
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-26 <tytso at valinux.com>
+
+ * message.c (safe_print): Make safe_print take an char instead of
+ an unsigned char to fix gcc warnings.
+
+1999-10-25 <tytso at valinux.com>
+
+ * util.c: For NT portability, don't redefine getchar(), since
+ stdio defines that. Instead we introduce a new
+ abstract macro read_a_char() which is #defined to the
+ right function as necessary.
+
+ * problem.c, problem.h (PR_2_NULL_NAME): Add new problem code.
+
+ * pass2.c (check_dir_block): Require that the length of the
+ directory entry be at least 12 bytes. Check to see if the
+ filename is zero-length, and flag that as an error.
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-10-22 <tytso at valinux.com>
+
+ * pass2.c (check_filetype): If the filetype filesystem feature is
+ not set, and a directory entry has a dirent feature, offer
+ to clear it (since 2.0 kernels will do complain will
+ interpret it as a very large name length field).
+
+ * problem.c (PR_2_CLEAR_FILETYPE): Add new problem code.
+
+1999-10-21 <tytso at valinux.com>
+
+ * e2fsck.8.in: Update man page to use a more standard format (bold
+ option flags and italicized variables), as suggested by
+ Andreas Dilger (adilger at enel.ucalgary.ca)
+
+ * pass4.c (e2fsck_pass4): If an inode is set in the
+ inode_imagic_map bitmap, don't check to see if it is
+ disconnected from the inode tree (because it almost
+ certainly will be). Free inode_imagic_map at the end of
+ pass 4.
+
+ * pass2.c (check_dir_block, check_filetype): If the FILETYPE
+ feature is set, check the directory entry's filetype
+ information field, and fix/set it if necessary.
+ (e2fsck_pass2): Free the inode_reg_map bitmap at the end
+ of pass 2.
+
+ * pass1.c (e2fsck_pass1, alloc_imagic_map): Allocate and fill in
+ information for inode_reg_map and inode_imagic_map, which
+ indicates which inodes are regular files and AFS inodes,
+ respectively.
+ Since only the master superblock is written during a
+ restart, force that superblock to be used after a restart;
+ otherwise changes to the block group descriptors end up
+ getting ignored.
+
+ * problem.c, problemP.h: If e2fsck is run -n, make def_yn variable
+ be 0 for "no". Add support for a new flag, PR_NO_NOMSG,
+ which supresses the problem message if e2fsck is run with
+ the -n option.
+
+ * problem.c, problem.h (PR_2_SET_FILETYPE, PR_2_BAD_FILETYPE): Add
+ new problem codes.
+
+ * message.c (expand_dirent_expression): Add support for %dt which
+ prints the dirent type information.
+
+ * e2fsck.c (e2fsck_reset_context): Free new bitmaps (inode_reg_map
+ and inode_imagic_map).
+
+ * e2fsck.h (e2fsck_t): Add new inode_reg_map and inode_magic_map
+ to the context structure.
+
+1999-09-24 <tytso at valinux.com>
+
+ * unix.c (PRS), util.c (ask_yn): Add #ifdef's to make
+ e2fsprogs easier to port to non-Unix platforms.
+
+1999-09-07 <tytso at valinux.com>
+
+ * pass3.c (adjust_inode_count): Fix bug where we didn't keep the
+ internal and external inode counts in sync when we
+ decremented an inode whose link count was already zero.
+ Now we skip incrementing or decrementing both link counts
+ if we would cause an overflow condition.
+ (expand_dir, expand_dir_proc): Change where we update the
+ inode block count and size files so that the block count
+ field is updated correctly when we create an indirect block.
+
+1999-08-05 <tytso at valinux.com>
+
+ * super.c (check_super_block): Check to see whether the
+ inodes_per_group value in the superblock is insanely too
+ high.
+
+1999-08-02 <tytso at valinux.com>
+
+ * pass1b.c (clone_file_block): Don't clear the dup_map flag if
+ the block also shares data with the fs metadata when
+ the count drops to 1, since the block should still be
+ cloned, as fs metadata isn't included in the count.
+
+1999-07-18 Theodore Ts'o <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.15
+
+1999-07-19 <tytso at valinux.com>
+
+ * unix.c (usage): Add minimalist emergency help to the usage
+ message.
+
+1999-07-18 <tytso at valinux.com>
+
+ * unix.c: Add support for calculating a progress bar if the -C0
+ option is given. The function e2fsck_clear_progbar()
+ clears the progress bar and must be called before any
+ message is issued. SIGUSR1 will enable the progress bar,
+ and SIGUSR2 will disable the progress bar. This is used
+ by fsck to handle parallel filesystem checks. Also, set
+ the device_name from the filesystem label if it is
+ available.
+
+ * e2fsck.h: Add new flags E2F_FLAG_PROG_BAR and
+ E2F_FLAG_PROG_SUPRESS. Add new field in the e2fsck
+ structure which contains the last tenth of a percent
+ printed for the user.
+
+ * message.c (print_e2fsck_message): Add call to
+ e2fsck_clear_progbar().
+
+ * pass1.c (e2fsck_pass1):
+ * pass2.c (e2fsck_pass2):
+ * pass3.c (e2fsck_pass3):
+ * pass4.c (e2fsck_pass4):
+ * pass5.c (e2fsck_pass5): Add call to e2fsck_clear_progbar when
+ printing the resource tracking information.
+
+ * pass5.c (check_block_bitmaps, check_inode_bitmaps): If there is
+ an error in the bitmaps, suppress printing the progress
+ bar using the suppression flag for the remainder of the
+ check, in order to clean up the display.
+
+1999-06-30 <tytso at valinux.com>
+
+ * unix.c (check_mount): Clean up the abort message displayed when
+ the filesystem is mounted and either stdout or stdin isn't
+ a tty.
+
+1999-06-25 <tytso at valinux.com>
+
+ * e2fsck.h:
+ * pass1.c (pass1_get_blocks, pass1_read_inode, pass1_write_inode,
+ pass1_check_directory, e2fsck_use_inode_shortcuts): Make
+ pass1_* be private static functions, and create new
+ function e2fsck_use_inode_shortcuts which sets and clears
+ the inode shortcut functions in the fs structure.
+
+ * e2fsck.h:
+ * pass2.c (e2fsck_process_bad_inode): Make process_bad_inode() an
+ exported function.
+
+ * pass4.c (e2fsck_pass4): Call e2fsck_process_bad_inode to check
+ if a disconnected inode has any problems before
+ connecting it to /lost+found. Bug and suggested fix by
+ Pavel Machek <pavel at bug.ucw.cz>
+
+1999-06-21 <tytso at valinux.com>
+
+ * unix.c (main): Add missing space in the disk write-protected
+ message.
+
+1999-05-22 <tytso at rsts-11.mit.edu>
+
+ * problem.c, problem.h (PR_0_INODE_COUNT_WRONG): Add new problem
+ code.
+
+ * super.c (check_super_block): Add check to make sure the total
+ number of inodes is sane, since this can be calculated
+ from the number of groups times the number of inodes per
+ group. Offer to correct it if it is incorrect.
+
+1999-03-19 <tytso at rsts-11.mit.edu>
+
+ * pass5.c (check_block_end): Fix fencepost condition where when
+ clearing the block padding we were missing the last position
+ in the bitmap.
+
+1999-05-17 <tytso at rsts-11.mit.edu>
+
+ * unix.c (reserve_stdio_fds): Add safety check in case
+ reserve_stdio_fds couldn't open /dev/null.
+
+1999-03-14 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * util.c (print_resource_track): Use mallinfo if present to get
+ more accurate malloc statistics.
+
+ * pass3.c (get_lost_and_found): Check to see if lost+found is a
+ plain file; if so, offer to unlink it.
+
+ * problem.c, problem.h (PR_3_LPF_NOTDIR): Add new problem code.
+
+1999-03-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * problem.c: Fix problem message for PR_1_BAD_GROUP_DESCRIPTORS so
+ that the block group number is printed. Add new prompt,
+ PROMPT_UNLINK.
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * message.c (safe_print): New function which prints strings,
+ converting non-printable characters using the '^' and
+ M-notation. This function is now used to print directory
+ name entries and pathnames.
+
+Mon Jan 4 02:28:59 1999 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * unix.c (main): Reset the context before calling ext2fs_close(),
+ to avoid referencing already freed memory.
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-12-03 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Updated dependencies.
+
+1998-11-27 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass3.c (get_lost_and_found): If the filesystem is not opened
+ read-only, then force /lost+found to be created if it is
+ not present.
+
+ * problem.c: Allow PR_3_NO_LF_DIR to be handled during a preen
+ operation.
+
+1998-10-28 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * unix.c (main): Move ext2fs_close() after e2fsck_free_context()
+ since e2fsck_free_context may reference data in ctx->fs.
+
+ * e2fsck.c (e2fsck_reset_context): Make sure ctx->fs is non-NULL
+ before checking ctx->fs->dblist.
+
+1998-10-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c (e2fsck_pass1): Use the device check subroutine on
+ FIFO's and Socket's, so that we catch bogus immutable inodes.
+
+ * pass2.c (process_bad_inode): Process bad socket and fifo's.
+
+ * problem.h, problem.c: Define new problem codes PR_2_BAD_FIFO and
+ PR_2_BAD_SOCKET.
+
+1998-09-02 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * problem.c: Add PR_3_NO_DIRINFO error code.
+
+ * super.c (check_super_value): Rename min and max to min_val and
+ max_val to avoid possible cpp macro conflicts.
+
+ * pass4.c (e2fsck_pass4): Rename max to maxgroup, to avoid
+ possible cpp macro conflicts.
+
+ * pass3.c (e2fsck_pass3): Rename max to maxdirs, to avoid possible
+ cpp macro conflicts.
+ (check_directory): Fix logic to avoid possible core dump
+ in the case of ext2fs_get_dir_info returning NULL. (By
+ the time we get here, it should never happen, but...).
+ Also simply/streamline the control flow of the function.
+
+1998-08-17 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * unix.c (check_if_skip): Move the "not cleanly mounted" check
+ ahead of the maximal mount and too long since checked tests.
+ (reserve_stdio_fds): 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.
+
+1998-08-01 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass2.c (e2fsck_pass2): Fix the progress accounting so that we
+ get to 100%.
+
+ * pass3.c (e2fsck_pass3): Change progress accounting to be
+ consistent with the other e2fsck passes.
+
+ * e2fsck.c (e2fsck_run): At the end of each pass, call the
+ progress function with the pass number set to zero.
+
+ * unix.c (e2fsck_update_progress): If the pass number is zero,
+ ignore the call, since that indicates that we just want to
+ deallocate any progress structures.
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * unix.c (main): Fix typo in checking the incompat feature set; it
+ should be checked against EXT2_LIB_FEATURE_INCOMPAT_SUPP.
+
+1998-07-07 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * badblocks.c (test_disk): Don't clear the existing bad blocks
+ list when using e2fsck -c, since it may cause blocks with
+ marginal errors to be dropped from the bad blocks list.
+
+Mon Jul 6 10:32:11 1998 Theodre Ts'o <tytso at lurch.mit.edu>
+
+ * pass1.c (e2fsck_pass1): Use ext2fs_sb structure for
+ compatibility with older kernels.
+
+1998-06-25 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * unix.c (e2fsck_update_progress): Remove unused variables.
+
+1998-06-10 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c, problem.h: Change blkcnt_t to be e2_blkcnt_t to avoid
+ collision with LFS API.
+
+ * pass1.c (e2fsck_pass1): Fix bug so that ext2_max_sizes is
+ properly initialized.
+ (e2fsck_pass1): Don't allow the the boot loader inode to
+ be a directory (clear the inode mode field if so).
+
+1998-05-07 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * unix.c (PRS): Added new option -C, which causes e2fsck to print
+ progress updates so that callers can keep track of the
+ completion progress of e2fsck. Designed for use by
+ progress, except for -C 0, which prints a spinning report
+ which may be useful for some users.
+
+ * pass5.c (e2fsck_pass5): Use a finer-grained progress reporting
+ scheme (useful for larger filesystems).
+
+ * e2fsck.h: Add progress_fd and progress_pos, for use by the Unix
+ progress reporting functions.
+
+1998-04-28 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c (process_inode_cmp): Use EXT2_QSORT_TYPE to define the
+ appropriate return type for comparison functions for qsort.
+
+ * e2fsck.h: Add #ifdef protection for unistd.h
+
+ * super.c: Remove header files already included by e2fsck.h
+
+1998-04-26 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * dirinfo.c (e2fsck_add_dir_info): Update function to pass the old
+ size of the memory to be resized to ext2fs_resize_mem().
+
+1998-03-30 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Change to use new installation directory variables
+ convention. Fix uninstall rules to take $(DESTDIR) into
+ account. Remove cat8dir from the installdirs target,
+ since modern man package don't necessarily put the cat
+ directory in /usr/man/cat?.
+
+1998-03-29 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * super.c, e2fsck.h: Always declare e2fsck_get_device_size() as an
+ extern in e2fsck.h to prevent -Wall warnings.
+
+ * pass4.c (e2fsck_pass4): Remove unused variable 'j'.
+
+1998-03-28 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * super.c (check_super_block): Fix broken superblock sanity check
+ when calculating blocks_per_group if s_log_frag_size !=
+ s_log_block_size. Since we don't support fragments, this
+ isn't a bug deal, but it's good to get it fixed.
+
+1998-03-23 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * unix.c: Fix bug in check of feature set, to make sure we can
+ really fix this filesystem.
+
+ * problem.h: Make blkcount type to be of type blkcnt_t. Make the
+ num field be a 64 bit type. Add the problem code
+ PR_1_FEATURE_LARGE_FILES
+
+ * problem.c: Add table entry for the problem code
+ PR_1_FEATURE_LARGE_FILES.
+
+ * pass1.c (e2fsck_pass1): A non-zero i_dir_acl field is only
+ a problem for directory inodes. (Since it is also
+ i_size_high now.) If there are no large_files, then
+ clear the LARGE_FLAG feature flag. If there are
+ large_files, but the LARGE_FLAG feature flag is not set,
+ complain and offer to fix it.
+ (check_blocks): Add support to deal with non-directory
+ inodes that have i_size_high set (i.e., large_files).
+ Don't give an error if a directory has preallocated
+ blocks, to support the DIR_PREALLOC feature.
+ (process_block, process_bad_block): The blockcnt variable
+ is a type of blkcnt_t, for conversion to the new
+ block_iterate2.
+
+ * pass2.c (process_bad_inode): A non-zero i_dir_acl field is only
+ a problem for directory inodes. (Since it is also
+ i_size_high now.)
+
+ * message.c (expand_inode_expression): Print a 64-bits of the
+ inode size for non-directory inodes. (Directory inodes
+ can only use a 32-bit directory acl size, since
+ i_size_high is shared with i_dir_acl.) Add sanity check
+ so that trying to print out the directory acl on a
+ non-directory inode will print zero.
+ (expand_percent_expression): %B and %N, which print
+ pctx->blkcount and pctx->num, can now be 64 bit
+ variables. Print them using the "%lld" format if
+ EXT2_NO_64_TYPE is not defined.
+
+ * e2fsck.h: Add the large_flagsfield to the e2fsck context.
+
+ * e2fsck.c (e2fsck_reset_context): Clear the large_flags
+ field.
+
+Sun Mar 8 23:08:08 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass3.c (fix_dotdot_proc):
+ * pass2.c (check_dot, check_dotdot, check_name, check_dir_block):
+ * message.c (expand_dirent_expression): Mask off the high eight
+ bits of the directory entry's name_len field, so that it
+ can be used for other purposes.
+
+Fri Feb 27 00:01:39 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (e2fsck_run): Since E2F_FLAG_SIGNAL_MASK doesn't
+ include EXT2_FLAG_RESTART anymore, we need to adjust this
+ routine so that it *does* return in the case of it seeing
+ EXT2_FLAG_RESTART.
+
+ * pass1.c (e2fsck_pass1): ext2_get_next_inode() may call the group
+ done callback function, which may set context abort
+ flags. So we need to test the context abort flags after
+ we call ext2_get_next_inode().
+ (process_inodes): If we abort due out of process_inodes,
+ do a clean exit by breaking out of the for loop instead of
+ just returning.
+
+ * e2fsck.h (E2F_FLAG_SIGNAL_MASK): EXT2_FLAG_RESTART shouldn't be
+ considered a SIGNAL mask (i.e., requiring an immediate
+ abort of processing to restart). FLAG_RESTART just means
+ that we want to restart once pass 1 is complete.
+
+Tue Feb 24 15:19:40 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Change the progress function to return an integer; if returns 1,
+ then the progress function is expected to have set the
+ e2fsck context flag signalling a user abort, and the
+ caller should also initiate a user abort.
+
+Tue Feb 17 19:03:44 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass5.c (check_block_bitmaps, check_inode_bitmaps): Don't call
+ end_problem_latch() unless there was actually a problem
+ latched. Simplifies semantics of the latch processing.
+
+Mon Feb 16 17:31:44 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsck.h: Add new field, priv_data to the e2fsck context
+ structure. It should be used by callers of the e2fsck
+ functions only, and not by anything in e2fsck itself.
+
+Mon Feb 7 17:31:04 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * super.c: Instead of call ext2fs_get_device_size(), define and call
+ e2fsck_get_device_size(). (This function may be stubbed
+ out in special versions of e2fsck.)
+
+ * pass3.c, pass4.c: Remove extra calls to the progress function
+ that weren't needed.
+
+ * mke2fs.8.in: Update man page to note that the format of the bad
+ block file is the same as the one generated by badblocks.
+
+Sun Feb 1 07:57:14 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * dirinfo.c, e2fsck.c: Don't include com_err.h; it isn't needed.
+
+ * e2fsck.h: Include <time.h> since it is needed
+
+ * super.c: If EXT2_SKIP_UUID is defined, then skip the UUID
+ processing.
+
+Tue Jan 20 15:37:01 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * unix.c (main): In the case where the filesystem revision is too
+ high, print the message about the superblock possibly
+ being corrupt.
+
+ * e2fsck.8.in: Add expanded comments about how the -b option
+ works.
+
+Sat Jan 17 13:02:16 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsck.h: If EXT2_FLAT_INCLUDES is defined, then assume all of
+ the ext2-specific header files are in a flat directory.
+
+ * dirinfo.c, ehandler.c, pass1.c, pass1b.c, pass2.c, pass5.c,
+ super.c, swapfs.c, unix.c: Explicitly cast all assignments
+ from void * to be compatible with C++.
+
+Tue Jan 6 11:30:24 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * unix.c (sync_disk): Remove sync_disk and calls to that function,
+ since ext2fs_close() now takes care of this.
+
+Mon Dec 29 14:45:42 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c, pass1b.c, pass2.c, pass3.c, swapfs, badblocks.c,
+ ehandler.c, unix.c: Change use of private to be priv_data,
+ to avoid C++ reserved name clash.
+
+Fri Nov 28 09:30:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * dirinfo.c (e2fsck_add_dir_info): Use ext2fs_get_num_dirs instead
+ of e2fsck_get_num_dirs, which has been removed.
+
+Tue Nov 25 15:54:35 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (PROGS): Remove @EXTRA_PROGS@, since we don't want
+ to compile and install flushb.
+
+Mon Nov 24 06:48:00 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c (e2fsck_pass1_check_device_inode): For now, only check
+ to make sure the extra i_blocks in a device are cleared if
+ the immutable flag is set.
+
+ * util.c (print_resource_track): Fix typo which caused the
+ time/resource tracking to print "Pass 1 :" instead of
+ "Pass 1: ".
+
+Thu Nov 20 16:02:23 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass3.c (expand_directory): Fix bug which could cause core dump
+ when expanding the directory, and the bitmaps hadn't yet
+ been read in. Also, only use ext2fs_write_dir_block when
+ writing a directory block, not when writing out a fresh
+ indirect block.
+
+Wed Nov 19 16:15:44 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c (process_bad_block): Fix bug where first_block wasn't
+ getting incremented, which caused user to get a
+ "Programming error?" warning if there was a bad block in a
+ non-primary superblock/group_descriptor. Also fixed
+ another bug so that ext2fs_bg_has_super() is consulted, to
+ avoid problems when using a filesystem with the
+ sparse_groups option set and there are bad blocks at the
+ beginning of a group which doesn't have a superblock.
+
+Thu Nov 6 16:10:20 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c, pass2.c, pass3.c, pass4.c, pass5.c: Add calls to the
+ progress indicator function.
+
+ * pass1.c (scan_callback): Add call to the progress feedback
+ function (if it exists).
+
+Tue Nov 4 09:45:36 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * super.c (check_super_block): Skip the device size check if the
+ get_device_size returns EXT2_EXT_UNIMPLEMENTED.
+
+ * iscan.c (main): Don't use fatal_error() anymore.
+
+ * pass1b.c, swapfs.c, badblocks.c: Set E2F_FLAG_ABORT instead of
+ calling fatal_error(0).
+
+ * problem.c, pass3.c (PR_3_ROOT_NOT_DIR_ABORT,
+ PR_3_NO_ROOT_INODE_ABORT): New problem codes.
+
+ * problem.c, pass2.c (PR_2_SPLIT_DOT): New problem code.
+
+ * problem.c, pass1.c (PR_1_SUPPRESS_MESSAGES): New problem code.
+
+ * problemP.h: New file which separates out the private fix_problem
+ data structures.
+
+ * util.c, dirinfo.c, pass1.c, pass1b.c, pass2.c, pass5.c, super.c,
+ swapfs.c util.c: allocate_memory() now takes a e2fsck
+ context as its first argument, and rename it to be
+ e2fsck_allocate_memory().
+
+Mon Nov 3 14:35:29 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * unix.c (main): Add a special case check for the error code EROFS
+ and display an appropriate error message for this case.
+
+ * [lots of files]: Change ext2fs_read_inode, ext2fs_write_inode
+ to take the e2fsck context as their first argument.
+ Change dir_info.c routines to take an e2fsck_context,
+ renamed them to start with e2fsck_ to avoid namespace
+ issues, and changed them to store the directory
+ information inside the e2fsck context.
+ Added e2fsck_run() which calls all of the e2fsck passes in
+ the correct order, and which handles the return of abort
+ codes. Added abort processing, both via setjmp/longjmp
+ and via flags in the e2fsck context. Use a flag in the
+ e2fsck context instead of the restart_e2fsck global
+ variable. Change uses of free and malloc to
+ ext2fs_free_mem and ext2fs_get_mem.
+
+Fri Oct 31 01:12:43 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c, pass3.c: Rename new error codes to _ET_ in them for
+ consistency.
+
+Sat Oct 25 00:10:58 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass3.c (get_lost_and_found): Check error return of
+ EXT2_FILE_NOT_FOUND instead of ENOTDIR
+
+ * pass1.c (pass1_check_directory): Return EXT2_NO_DIRECTORY
+ instead of ENOTDIR
+
+Fri Oct 24 00:12:39 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * unix.c (PRS): Make the variable which getopt returns into be
+ an int, so that it won't lose on platforms where char is
+ unsigned.
+
+ * pass1b.c (clone_file): Fix bug in error reporting in the case
+ where cs.errcode is non-zero.
+
+Sun Oct 19 21:12:11 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass*.c, super.c, unix.c, util.c, e2fsck.h: Place #ifdef
+ RESOURCE_TRACK around code which uses init_resource_track
+ and print_resource_track. (Not all systems have timeval)
+
+ * super.c: Remove excess #includes which are not necessary.
+
+ * e2fsck.h: Add #ifdef's for HAVE_SYS_TYPES_H and HAVE_SYS_TIME_H
+
+Fri Oct 3 13:40:03 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass*.c, super.c: Massive changes to avoid using printf and
+ com_err routines. All diagnostic messages are now routed
+ through the fix_problem interface.
+
+Sat Sep 6 17:13:28 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass2.c (check_dir_block): Check for duplicate '.' and '..'
+ entries.
+
+ * problem.c, problem.h: Add new problem codes PR_2_DUP_DOT and
+ PR_2_DUP_DOT_DOT.
+
+Tue Sep 2 09:04:51 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * problem.c: Added new problem codes for some of the
+ superblock corruption checks, and for the pass header
+ messages. ("Pass 1: xxxxx")
+
+ * util.c (print_resource_track): Now takes a description
+ argument.
+
+Mon Aug 25 10:23:13 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * super.c, unix.c, e2fsck.c: New files to separate out the
+ operating-specific operations out from e2fsck.c.
+ e2fsck.c now contains the global e2fsck context management
+ routines, and super.c contains the "pass 0" initial
+ validation of the superblock and global block group
+ descriptors.
+
+ * pass1.c, pass2.c, pass3.c, pass4.c, pass5.c, util.c: Eliminate
+ (nearly) all global variables and moved them to the e2fsck
+ context structure.
+
+ * problem.c, problem.h: Added new problem codes PR_0_SB_CORRUPT,
+ PR_0_FS_SIZE_WRONG, PR_0_NO_FRAGMENTS,
+ PR_0_BLOCKS_PER_GROUP, PR_0_FIRST_DATA_BLOCK
+
+Thu Aug 14 10:55:21 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * message.c: Add compression for the word "Illegal"
+
+ * problem.c: Added entries for PR_2_BAD_CHAR_DEV and
+ PR_2_BAD_BLOCK_DEV
+
+Wed Aug 13 09:55:57 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c (pass1, check_device_inode), pass2.c
+ (process_bad_inode): Use a more stringent test for a valid
+ device.
+
+Sun Aug 10 18:58:02 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (check_mount): Add stronger warning message about the
+ perils of running e2fsck on a mounted filesystem.
+
+Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.11
+
+Thu Jun 12 00:25:31 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c (mark_table_blocks): Mark the superblock and group
+ descriptor blocks first, so that any conflicts between
+ these and the bitmap or inode table blocks is noticed.
+
+ * problem.c: Fix message printed out when a block or inode bitmap
+ conflicts with other fs data, has the correct group number
+ in it.
+
+Tue Jun 10 12:07:37 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass2.c (pass2): Check the error return from ext2fs_dblist_iterate.
+
+Thu May 8 22:45:27 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsck.8.in: Fix minor typos and grammer oops found by Bill
+ Hawes (whawes at star.net).
+
+ * badblocks.c (read_bad_blocks_file): Pass the blocksize to the
+ bad blocks command so that all of the filesystem gets
+ tested in the case where the blocksize 2048 or 4096.
+
+Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * Release of E2fsprogs version 1.10
+
+Mon Apr 21 22:43:08 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1b.c (pass1b): While scanning for inodes, simply skip inodes
+ where ext2fs_get_next_inode returns the
+ EXT2_ET_BAD_BLOCK_IN_INODE_TABLE error.
+
+Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.09
+
+Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.08
+
+Thu Apr 10 13:51:16 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1b.c (clone_file_block): If we clone a directory, we need to
+ update the dblist entry so that we check (and correct) the
+ right directory block.
+
+Sun Apr 6 09:13:12 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c (process_block): Don't clear blocks references to
+ filesystem metadata; let pass 1B handle this case.
+
+ * problem.c, problem.h: Add new problem, PR_1B_SHARE_METADATA.
+
+ * pass1b.c (pass1d): Deal with a block which is shared with
+ filesystem metadata.
+
+ * e2fsck.h: Make block_illegal_map be a global variable
+
+Sat Apr 5 11:51:58 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c, pass1.c (mark_table_blocks): Support the sparse_super
+ feature.
+ (get_backup_sb): New function which attempts to obtain the
+ correct backup superblock (if possible).
+
+Fri Apr 4 10:46:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (main): Check the version of the library, and warn if
+ the library is out of date; this happens generally due to
+ users who manually install e2fsprogs.
+
+ * pass1.c (pass1_get_blocks): If the passed in inode number for
+ get_blocks isn't what we're expecting pass back
+ EXT2_ET_CALLBACK_NOT_HANDLED.
+
+Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * Release of E2fsprogs version 1.07
+
+Tue Mar 11 10:31:47 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * icount.c: New file which implements an inode count abstraction.
+ This significantly reduces amount of memory needed to
+ check really large filesystems.
+
+ * pass1.c, pass2.c, pass3.c, pass4.c: Modified to use the icount
+ abstraction.
+
+Fri Mar 7 08:28:55 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * dirinfo.c (dir_info_iter): New function which allows iteration
+ over the directories in the dir_info map.
+
+ * pass3.c (pass3, check_directory): Speed up pass 3 by iterating
+ over all directories in the dir_info structure, instead of
+ iterating all inodes looking for directories, and then
+ looking up the directories using get_dir_info().
+
+Sat Feb 1 11:33:43 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c (pass1, process_block):
+ * pass2.c (pass2): Use the ext2_dblist abstraction instead of
+ manual code to manage the directory block list information.
+
+ * pass1.c (check_blocks), pass1b.c (pass1b), pass2.c
+ (deallocate_inode): Call the ext2 library routine
+ ext2_inode_has_valid_blocks() instead of
+ inode_has_valid_blocks().
+
+ * swapfs.c (swap_inodes): Add check so that we don't try to call
+ swap_inode_blocks unless the inode has valid blocks.
+ (Otherwise a long fast symlink might cause
+ swap_inode_blocks to erroneously get called.)
+
+Wed Jan 22 14:42:53 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * problem.c, problem.h: Added entries for PR_2_DOT_NULL_TERM and
+ PR_2_DOT_DOT_NULL_TERM.
+
+ * pass2.c (check_dot, check_dot_dot): Make sure the new . and
+ .. entries are null-terminated, since the 2.0 kernel
+ requires this (for no good reason).
+
+Mon Jan 20 20:05:11 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c (pass1): Set the EXT2_SF_SKIP_MISSING_ITABLE flag so
+ that we can recover from missing inode tables.
+
+ * dirinfo.c (get_dir_info): If there are no directories in the
+ dir_info abstraction, don't core dump (because dir_info is
+ NULL).
+
+ * e2fsck.c (main): Don't try using the backup superblocks if there
+ aren't any.
+ (check_super_block): If there are illegal inode table or
+ bitmaps, set the filesystem as being in error.
+
+Wed Jan 15 11:32:01 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass2.c (check_dir_block): Added check to make sure that rec_len
+ is a a multiple of 4 (so that the directory entries are
+ 4-byte aligned).
+
+Sat Dec 28 12:16:32 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (uninstall): Uninstall all programs in the PROGS
+ line.
+ (PROGS): Don't build and install the extend program by
+ default.
+
+
+Sat Dec 7 16:41:02 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c (process_inodes): Make sure the stashed_ino variable is
+ saved and restored as well.
+ (pass1): For fast sym links, skip the check_blocks
+ processing step altogether.
+
+Mon Dec 2 09:28:24 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * problem.c, message.c: New files, to completely refurbish how
+ filesystem problems are reported to the user. The
+ diagnostic messages are now encoded out in an easily
+ customizable, extensible format. The messages printed out
+ in preen mode are all on one line, and contain the device
+ name.
+
+Fri Nov 29 20:26:08 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * swapfs.c (swap_inodes): When swapping a filesystem, ignore
+ deleted files.
+
+ * pass1.c (pass1): Ignore missing inode table errors during the
+ scan, and just skip past those inodes.
+
+ * pass3.c (check_root): Remove root_ino argument, and assume that
+ the root inode must be EXT2_ROOT_INO. Move responsibility
+ of setting the parent of the root inode in the directory
+ inode structure to pass2().
+
+ * pass2.c (check_dir_block): Don't allow links to the root
+ directory.
+
+ * dirinfo.c (add_dir_info): Remove last argument to add_dir_info,
+ since the inode is no longer used.
+
+Tue Oct 15 00:06:49 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (main): If the superblock magic number is wrong, or the
+ block group fails a sanity check, then automatically
+ restart trying to use the backup superblocks.
+
+ * pass1.c (mark_table_blocks): Make the inode tables ahead of
+ everything else; in the case where a bitmap block overlays
+ the inode table, the inode table should take precedence.
+
+ * pass2.c (maybe_clear_entry): Make the deleted/unused error
+ message fit on one line, since the error can happen during
+ a preen pass. (We eventually need to revamp the whole
+ e2fsck error reporting and prompting system, but that's a
+ job for another day.)
+
+Mon Oct 14 22:29:49 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (main): Read in the list badblocks into fs->badblocks
+ for the benefit of the inode scan functions.
+
+ * pass1.c (pass1): If ext2fs_get_next_inode() returns an error
+ indicating that an inode is in a bad block, mark that
+ inode as being used, as well as in the inode "bb" map.
+
+ * pass2.c (maybe_clear_entry): New function which generalizes the
+ error cases when a directory entry needs to be cleared.
+ (check_dir_block): If an inode is in the "bb" map, offer
+ to clear the directory entry, since the inode is in a bad
+ block.
+
+ * pass4.c (pass4): If an inode is marked as used, but is is marked
+ in the "bb" map, don't process it as a disconnected inode.
+
+Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.06
+
+Mon Oct 7 00:45:30 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (main): Print out the version number of the shared
+ library when using the -V option.
+
+ * swapfs.c (swap_filesys): Change EXT2_SWAP to EXT2_FLAG_SWAP for
+ consistency's sake.
+
+ * e2fsck.c (main): By setting EXT2_FLAG_MASTER_SB_ONLY, only write
+ out the backup superblocks when we know we have a valid
+ filesystem.
+
+Tue Oct 1 22:00:29 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * util.c (preenhalt): Make it explicit on preenhalt that running
+ e2fsck manually means without the -a or -p flag.
+
+Fri Sep 27 14:41:08 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c (pass1): Add support for the EXT2_BOOT_LOADER inode.
+ (Linux/FT actually sets the mode bits, so we have to
+ handle it specially.)
+
+ * e2fsck.c (check_if_skip): Print a message if the filesystem is
+ just dirty, so that the user knows that it's about to be
+ checked (since this will take a while).
+
+Mon Sep 16 17:00:01 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass4.c: If a disconnected inode is zero-length, prompt to
+ delete it instead of connecting it to lost+found.
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
+Fri Aug 30 20:24:30 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass4.c (pass4): If the user refuses to connect an unattached
+ inode to lost+found, don't try to set i_links_count. This
+ is bad, since if the user says yes, the inode will be
+ marked as unused, which is not necessarily the right
+ thing, especially since the rest of the cleanup doesn't
+ happen here.
+
+ * pass2.c (deallocate_inode): Set inode_link_info[ino] when
+ dellocating an inode. (Not strictly necessary, but...)
+
+ * pass4.c (pass4): Add "bonehead" explanation to the "programming
+ error" message.
+
+Tue Aug 27 11:26:32 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (PRS,main): Added new options -s and -S. -s will
+ byte-swap the filesystem so that it is normalized. -S
+ will byte-swap the filesystem regardless of its current
+ byte-order.
+
+ * swapfs.c: New file, which will byte-swap a filesystem.
+
+Tue Aug 20 09:41:37 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c (pass1): Change handling on files with non-zero dtime
+ and non-zero i_link_count; before we treated them as
+ deleted file per botched ext2 0.3c kernel behavior. We
+ now clear dtime instead.
+
+Mon Aug 19 23:33:57 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (main): If e2fsck sets the clean bit, even if
+ nothing else is changed, make sure FSCK_NONDESTRUCT is
+ set (since after all having the filesystem set to
+ invalid is an error. :-)
+
+Fri Aug 9 10:25:13 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pass1.c (process_block): Make sure that meta data doesn't get
+ accidentally set in the dir_blocks array (which could
+ happen in some error condtions).
+
+ * pass1.c (pass1):
+ * pass2.c (process_bad_inode): Check for fragments in a
+ OS-independent fashion.
+
+Thu Aug 8 15:20:54 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (check_if_skip): Close the filesystem when skipping the
+ cleanup for the filesystem.
+
+Mon Jul 22 22:03:28 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c: Improve corrupt_msg, so that it's less confusing.
+
+Thu May 16 11:12:30 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.04
+
+Wed May 15 21:41:29 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (relocate_hint): Issue a hint that the user may wish to
+ try "e2fsck -b 8193" before allowing e2fsck to relocate
+ inode table blocks.
+
+ * Makefile.in (e2fsck): Build e2fsck statically or dynamically
+ depending on the option to configure. Added targets for
+ e2fsck.static and e2fsck.shared for people who want to
+ build a static or shared variant manually.
+
+Wed Mar 27 00:33:40 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.03
+
+Tue Mar 26 12:03:42 1996 <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (show_stats): Don't use floating point to display
+ percentage of non-contiguous files, as different libc
+ handle result truncation differently, and this causes the
+ test suite to bomb out depending on which libc you are
+ using.
+
+ * util.c (allocate_memory): Fix error message to omit extraneous
+ %%s.
+
+Tue Mar 5 03:50:40 1996 <tytso at rsts-11.mit.edu>
+
+ * pass4.c (pass4):
+ * pass2.c (check_dir_block):
+ * pass1.c (pass1): Add support for dynamic first inode revision.
+
+Wed Feb 14 16:27:30 1996 <tytso at rsts-11.mit.edu>
+
+ * pass3.c (check_root): Fix spelling typo
+
+Mon Feb 5 22:30:30 1996 <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (check_super_block): If the superblock fails certain
+ internal consistency checks, exit with a fatal error after
+ printing the "superblock is corrupt message".
+
+Wed Jan 31 11:06:08 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.02
+
+Wed Dec 15 21:24:26 1996 <tytso at rsts-11.mit.edu>
+
+ * pass1.c (process_block): Check to see if a file is "fragmented".
+ i.e., non-contiguous. Note that any file which is larger
+ than the block group is guaranteed to be non-contiguous.
+ We may want to use a different hueristic for deciding
+ whether or not a file is "fragmented".
+
+ * e2fsck.c (show_stats): Print statistics of how many
+ non-contiguous files are on the system.
+
+Fri Dec 15 19:19:47 1995 <tytso at rsts-11.mit.edu>
+
+ * badblocks.c (read_bad_blocks_file, test_disk): Fold
+ functionality of test_disk() (which runs badblocks) into
+ read_bad_blocks_file(); test_disk() now calls
+ read_bad_blocks_file() with a NULL bad_blocks_file
+ argument.
+
+Mon Nov 20 18:30:10 1995 <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (check_mount): Use #if defined(__linux__) instead of
+ #if defined(linux). The latter won't work if we're
+ compiling -ansi.
+
+Mon Oct 30 20:31:17 1995 <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (check_mount): For Linux systems, the check to see if
+ the root is mounted read-only has to be done for all
+ filesystems, not just for the root filesystem, due to the
+ way that some /etc/rc scripts are set up.
+
+Thu Oct 26 12:05:30 1995 <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (install): Strip programs when they are installed.
+ (e2fsck): Build e2fsck statically.
+
+Wed Oct 25 21:18:16 1995 <tytso at rsts-11.mit.edu>
+
+ * util.c (preenhalt): Preenhalt now takes an argument, which is an
+ ext2fs_filsys; this allows it to set the EXT2_ERROR_FS
+ flag in the superblock in cases where preenhalt is called.
+ All calls to preenhalt() were changed to either
+ preenhalt(fs) or preenhalt(NULL) in a few cases where the
+ fs pointer was not available. (Most notable, for block
+ read/write errors.)
+
+Mon Sep 4 21:41:03 1995 Remy Card <card at bbj>
+
+ * ehandler.c:
+ util.c: Include <sys/time.h> before <sys/resource.h>. BSD needs it.
+
+Mon Sep 4 10:14:49 1995 <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (show_stats): Show statistics about how many inodes
+ have indirect, doubly indirect, and triply indirect
+ blocks. Allow up to 8 digits for statistics, instead of
+ merely 6, so things look pretty for large filesystems.
+
+ * pass1.c (pass1): Keep statistics about indirect, doubly
+ indirect, and triply indirect blocks.
+
+ * pass1.c (unwind_pass1): Clear the above statistics when unwinding
+ pass 1.
+
+Fri Aug 18 15:17:10 1995 Theodore Y. Ts'o <tytso at dcl>
+
+ * util.c, ehandler.c: Move #include of <sys/resource.h> after
+ #include of "e2fsck.h", since sys/resource.h may depend on
+ sys/time.h, which is #included in e2fsck.h.
+
+Thu Aug 17 22:33:37 1995 <tytso at rsts-11.mit.edu>
+
+ * e2fsck.c (check_mount): Use the new ext2fs_check_if_mounted()
+ function to determine if the device is mounted.
+
+ * e2fsck.c (main): Add better error messages if ext2fs_open()
+ fails.
+
+Wed Aug 16 16:25:02 1995 <tytso at rsts-11.mit.edu>
+
+ * pass1.c (check_blocks): If we're clearing a directory, clear
+ pb.is_dir so we don't do the following check of making
+ sure the directory size matches; this is pointless, since
+ we've already cleared the inode.
+
+Fri Aug 11 09:08:54 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * pass1.c (bad_primary_block): New function, called by
+ process_bad_block, which explains the facts of life to the
+ user when a block in the primary superblock or primary
+ group descriptors is bad.
+
+ * pass2.c (check_dot): Handle the case where the first directory
+ entry is used, but not ".".
+
+ * pass2.c (check_dotdot): Handle the case where the second directory
+ entry is used, but is not "..".
+
+Thu Aug 10 10:05:10 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * e2fsck.c (check_super_block): Get the size of the physical
+ device and if it is smaller than the reported size of the
+ filesystem, report an error.
+
+Sat Aug 12 03:39:18 1995 Remy Card <card at bbj>
+
+ * e2fsck.c (check_if_skip): Print the number of allocated files and
+ blocks on clean filesystems.
+
+Fri Aug 11 14:15:36 1995 Remy Card <card at bbj>
+
+ * e2fsck.8: Updated date and version number.
+
+Thu Aug 10 14:26:01 1995 Remy Card <card at bbj>
+
+ * pass1.c (check_blocks): Check that directory size matches *exactly*
+ the count of allocated blocks.
+
+Wed Aug 9 21:21:24 1995 Theodore Y. Ts'o <tytso at dcl>
+
+ * pass1b.c (pass1d): Free the shared[] array when we're done with
+ it to avoid a memory leak.
+
+ * pass1.c (unwind_pass1): Use ext2fs_free_block_bitmap to free the
+ block_dup_map.
+
+ * pass2.c (process_bad_inode): When clearing the inode, make sure
+ the pathname is freed, to prevent a memory leak.
+
+ * pass5.c (check_inode_bitmaps): Free free_array and dir_array
+ when we're finished with them.
+ (check_block_bitmaps): Free free_array when we're finished
+ with them.
+
+ * Makefile.in (e2fsck, flushb): Use $(LD) instead of $(CC) when
+ linking the executable.
+
+ * pass2.c (process_bad_inode): Even on OS's that don't support the
+ fragment fields, make sure the Linux equivalent fields are
+ set to zero. If an OS wants to reuse these fields, which
+ is probably a bad idea (although we may get desperate in
+ the future) this code will have to be changed.
+
+ * pass1.c (dir_block_cmp): If the block numbers are equal, compare
+ on the inode field, and then blockcnt field. This is just
+ to keep the ordering of dir_blocks the same on all
+ platforms when there are more than on missing directory
+ blocks, which are indicated directories with holes, which
+ are indicated with the block number being set to zero.
+
+Sun Aug 6 15:40:58 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * pass1.c (check_blocks, process_block): check_blocks() modified
+ to call the ext2fs_block_iterate() with BLOCK_FLAG_HOLE if
+ the inode is a directory. process_block() now checks to
+ see if a directory has a "hole", or missing block. If so,
+ this fact is recorded in the directory block list so that
+ the problem can be resolved in pass #2.
+
+ * pass2.c (allocate_dir_block): Added allocate_dir_block() to
+ allocate new blocks for directories with "holes". Called
+ out of check_dir_block if a block in the directory block
+ list is zero.
+
+ * pass3.c (get_lost_and_found): Move location of free(block) to
+ prevent possible memory leak.
+
+Sat Aug 5 12:42:22 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * pass2.c (check_dir_block): Use a automatic, fixed-saize array
+ instead of alloca() --- alloca is not portable! Check to
+ make sure the filename is not longer than EXT2_NAME_LEN,
+ and offer to fix it by truncating it, since it should
+ never happen.
+
+ * e2fsck.c (PRS): Use malloc() instead of alloca() --- alloca() is
+ not portable!! In any case putenv() in some systems must
+ take a static character array or malloc()'ed memory;
+ passing memory allocated using alloca() to putenv() is not
+ advisable.
+
+ * pass2.c (check_dot, check_dotdot): Use malloc() instead of
+ alloca() --- alloca() is not portable!!!
+
+Tue Jul 18 20:04:02 1995 <tytso at rsx-11.mit.edu>
+
+ * pass1b.c (pass1c):
+ * pass3.c (check_root, get_lost_and_found):
+ * pass2.c (check_dir_block): Use ext2fs_{read,write}_dir_block
+ to read/write the directory block.
+
+Mon Jul 17 04:00:56 1995 <tytso at rsx-11.mit.edu>
+
+ * util.c (ask_yn): Apply patch supplied by Peter A. Zaitcev to
+ make sure VMIN and VTIME are set correct.
+
+Fri Jul 14 19:26:29 1995 <tytso at rsx-11.mit.edu>
+
+ * pass1.c (mark_block_used): Change to be an inline function.
+ Assume that the block validity checks are already done,
+ and use the fast variant of the bitmap functions.
+
+Thu Jul 13 08:10:55 1995 <tytso at rsx-11.mit.edu>
+
+ * pass5.c (check_block_bitmaps, check_inode_bitmaps): Check the
+ bounds of the bitmaps in advance, and then use the fast
+ variant of e2fs_test_{block,inode}_bitmap.
+
+ * pass1.c (mark_block_used): Use ext2_fast_mark_block_bitmap since
+ the bounds checking has already been done earlier.
+
+Wed Jul 12 02:22:46 1995 <tytso at rsx-11.mit.edu>
+
+ * pass1.c (pass1): Allocate and free the block_illegal_map, which
+ is used for shortcut processing in process_block.
+ (mark_table_blocks): Initialize block_illegal_map with the
+ filesystem blocks.
+ (describe_illegal_block): New helper function that
+ describes why a block is illegal.
+ (process_block): Use block_illegal_map as a shortcut
+ to determine whether a block is bad. Use
+ describe_illegal_block to print out why the block is illegal.
+
+Mon Jun 12 19:11:06 1995 Theodore Y. Ts'o (tytso at dcl)
+
+ * flushb.c: Don't include <linux/fs.h> if it doesn't exist.
+
+ * scantest.c: Don't include <linux/fs.h>, <getopt.h>, or
+ <mntent.h> if they don't exist. (Mostly so that "make
+ depend" works.)
+
+ * pass1.c, pass1b.c, pass3.c, badblocks.c: Include <errno.h> (if
+ it exists).
+
+ * e2fsck.c, scantest.c: Don't include <getopt.h> if it doesn't
+ exist.
+
+Mon Jun 12 08:37:49 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * pass2.c (process_bad_inode, check_for_zero_long,
+ check_for_zero_char): Change long to u32, and char to u8.
+
+Sun Jun 11 15:05:57 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * util.c (inode_has_valid_blocks):
+ * pass2.c (process_bad_inode):
+ * pass1.c (pass1, check_blocks, pass1_check_directory): Use
+ LINUX_S_IS* instead of S_IS*.
+
+ * e2fsck.h: Don't #include <sys/stat.h>
+
+ * flushb.c (main): Add #ifdef BLKFLSBUF around ioctl. (Although
+ this program is pretty much useless if BLKFLSBUF isn't
+ supported.)
+
+ * e2fsck.c, badblocks.c: Add #include <errno.h>, since errno is
+ used.
+
+Thu Jun 8 12:31:19 1995 Miles Bader <miles at churchy.gnu.ai.mit.edu>
+
+ * pass2.c (check_dot, check_dotdot, check_dir_block): Use alloca
+ to allocate space for file names instead of using fixed size buffers.
+ (process_bad_inode): Only check inode frag fields if
+ HAVE_EXT2_FRAGS is defined (by configure).
+ * pass1.c (pass1): Only check the inode frag fields if
+ HAVE_EXT2_FRAGS is defined (by configure).
+
+ * e2fsck.c (check_mount): Only check for a mounted filesystem if
+ HAVE_MNTENT_H is defined (by configure).
+ (PRS): Use alloca to allocate the new path string, instead of
+ having a fixed size buffer (which was the wrong size anyway).
+ (PRS): Only support the -F (flush) option if the BLKFLSBUF ioctl
+ is defined.
+
+ * e2fsck.h: Only include <linux/fs.h> if HAVE_LINUX_FS_H is
+ defined (by configure).
+
+ * Makefile.in: Rewritten to conform to GNU coding standards and
+ support separate compilation directories.
+
+Thu Apr 6 15:04:36 1995 Remy Card <card at bbj.ibp.fr>
+
+ * pass1.c (pass1): Test the mode in reserved inodes (must be zero).
+
+Sat Mar 11 13:12:16 1995 Theodore Y. Ts'o <tytso at localhost>
+
+ * pass1.c (unwind_pass1): Clear the file type statistics counter
+ when pass 1 needs to be restarted from scratch.
+
+ * pass1.c (handle_fs_bad_blocks): Fix bug where bitmap blocks were
+ being reallocated to blocks in the next block group,
+ instead of the current block grup.
+
+ * pass1.c (pass1, check_blocks): Set inode_link_info[ino] whenever
+ inode.i_links_count is set.
+
+Tue Feb 14 01:38:04 1995 Theodore Y. Ts'o (tytso at rt-11)
+
+ * pass1.c (process_block): Add checks for if the block is
+ trepassing on a superblock or group descriptor table.
+
+Sat Dec 31 00:52:11 1994 <tytso at rsx-11.mit.edu>
+
+ * main.c (corrupt_msg): Extend the message which is printed out
+ when the superblock is corrupt, to include the suggestion
+ of using the -b option to specify an alternate superblock.
+
+Thu Nov 24 09:29:58 1994 Theodore Y. Ts'o (tytso at rt-11)
+
+ * badblocks.c (read_bad_blocks_file): If we are adding or
+ replacing bad blocks in the bad blocks inode, sanity check
+ the bad block inode first, and clear out any illegal blocks.
+
+ * pass2.c (check_name): Don't bomb out if the attempt to get the
+ pathname of the containing directory returns an error; the
+ directory may be too badly damaged to expect that
+ ext2fs_get_pathname will always succeed. Use "???" if the
+ pathname can't be obtained (it's only for a printf to the
+ user anyway).
+
+ The name of the containing directory and the bad filename
+ were incorrectly interchanged in the user message. Fixed.
+
+ * pass2.c (check_name, check_dir_block): Use a common static
+ string for the unknown pathname.
+
+Mon Nov 7 22:30:54 1994 Remy Card <card at bbj>
+
+ * Fixed lots of printf formats to make sure that block and inode
+ numbers are printed as unsigned integers.
+
+Mon Oct 24 14:10:46 1994 (tytso at rsx-11)
+
+ * pass5.c (check_block_end): Fix calculation of how the last block
+ in the block bitmap should be calculated.
+
+Wed Sep 7 10:01:13 1994 (tytso at rsx-11)
+
+ * pass1b.c (pass1_dupblocks): Fix declaration of dup_inode_map to
+ be an ext2fs_inode_bitmap, and free it properly.
+
+ * e2fsck.h
+ * e2fsck.c (main): Folded in Remy Card's changes to add a revision
+ level to the superblock.
+
+Wed Aug 17 22:00:20 1994 Remy Card (card at bbj)
+
+ * e2fsck.c (usage): Fixed bogus usage message.
+
+Wed Aug 17 11:21:45 1994 Theodore Y. Ts'o (tytso at rt-11)
+
+ * pass1.c (process_bad_block): Fixed bug so that blocks in the
+ backup superblocks and group descriptors are handled gracefully.
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/Makefile.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/Makefile.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/Makefile.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,290 @@
+#
+# Makefile for e2fsck
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = e2fsck
+INSTALL = @INSTALL@
+LDFLAG_STATIC = @LDFLAG_STATIC@
+
+ at MCONFIG@
+
+PROGS= e2fsck
+MANPAGES= e2fsck.8
+XTRA_CFLAGS= -DRESOURCE_TRACK
+
+LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBUUID)
+DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR) $(DEPLIBUUID)
+
+STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(STATIC_LIBUUID)
+STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(DEPSTATIC_LIBUUID)
+
+PROFILED_LIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) $(PROFILED_LIBUUID)
+PROFILED_DEPLIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) \
+ $(DEPPROFILED_LIBUUID)
+
+.c.o:
+ $(CC) -c $(ALL_CFLAGS) $< -o $@
+ at PROFILE_CMT@ $(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= unix.o e2fsck.o super.o pass1.o pass1b.o pass2.o pass3.o pass4.o \
+ pass5.o journal.o swapfs.o badblocks.o util.o dirinfo.o ehandler.o \
+ problem.o message.o recovery.o region.o revoke.o ea_refcount.o \
+ $(MTRACE_OBJ)
+
+PROFILED_OBJS= profiled/unix.o profiled/e2fsck.o profiled/super.o \
+ profiled/pass1.o profiled/pass1b.o \
+ profiled/pass2.o profiled/pass3.o profiled/pass4.o profiled/pass5.o \
+ profiled/journal.o profiled/badblocks.o profiled/util.o \
+ profiled/dirinfo.o profiled/ehandler.o profiled/message.o \
+ profiled/problem.o profiled/swapfs.o profiled/recovery.o \
+ profiled/region.o profiled/revoke.o profiled/ea_refcount.o
+
+SRCS= $(srcdir)/e2fsck.c \
+ $(srcdir)/super.c \
+ $(srcdir)/pass1.c \
+ $(srcdir)/pass1b.c \
+ $(srcdir)/pass2.c \
+ $(srcdir)/pass3.c \
+ $(srcdir)/pass4.c \
+ $(srcdir)/pass5.c \
+ $(srcdir)/journal.c \
+ $(srcdir)/recovery.c \
+ $(srcdir)/revoke.c \
+ $(srcdir)/badblocks.c \
+ $(srcdir)/util.c \
+ $(srcdir)/unix.c \
+ $(srcdir)/dirinfo.c \
+ $(srcdir)/ehandler.c \
+ $(srcdir)/problem.c \
+ $(srcdir)/message.c \
+ $(srcdir)/swapfs.c \
+ $(srcdir)/ea_refcount.c \
+ $(srcdir)/region.c \
+ $(MTRACE_SRC)
+
+all:: profiled $(PROGS) e2fsck.static e2fsck.shared $(MANPAGES)
+ @sync
+
+ at PROFILE_CMT@all:: e2fsck.profiled
+
+e2fsck: e2fsck. at E2FSCK_TYPE@
+ $(CP) e2fsck. at E2FSCK_TYPE@ e2fsck
+
+e2fsck.static: $(OBJS) $(STATIC_DEPLIBS)
+ $(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o e2fsck.static $(OBJS) \
+ $(STATIC_LIBS)
+
+e2fsck.shared: $(OBJS) $(DEPLIBS)
+ $(LD) $(ALL_LDFLAGS) -o e2fsck.shared $(OBJS) $(LIBS)
+
+e2fsck.profiled: $(PROFILED_OBJS) $(PROFILED_DEPLIBS)
+ $(LD) $(ALL_LDFLAGS) -g -pg -o e2fsck.profiled $(PROFILED_OBJS) \
+ $(PROFILED_LIBS)
+
+tst_refcount: ea_refcount.c
+ $(CC) -o tst_refcount $(srcdir)/ea_refcount.c \
+ $(ALL_CFLAGS) -DTEST_PROGRAM -lcom_err
+
+tst_region: region.c
+ $(CC) -o tst_region $(srcdir)/region.c \
+ $(ALL_CFLAGS) -DTEST_PROGRAM -lcom_err
+
+extend: extend.o
+ $(LD) $(ALL_LDFLAGS) -o extend extend.o $(CHECKLIB)
+
+flushb: flushb.o
+ $(LD) $(ALL_LDFLAGS) -o flushb flushb.o $(CHECKLIB)
+
+iscan: iscan.o util.o ehandler.o $(DEPLIBS)
+ $(LD) $(ALL_LDFLAGS) -o iscan iscan.o util.o ehandler.o $(LIBS)
+
+profiled:
+ mkdir profiled
+
+e2fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/e2fsck.8.in
+ $(SUBSTITUTE) $(srcdir)/e2fsck.8.in e2fsck.8
+
+installdirs:
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(root_sbindir) \
+ $(DESTDIR)$(man8dir)
+
+install: $(PROGS) $(MANPAGES) installdirs
+ for i in $(PROGS); do \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
+ $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ $(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \
+ $(DESTDIR)$(root_sbindir)/fsck.ext2
+ $(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \
+ $(DESTDIR)$(root_sbindir)/fsck.ext3
+ for i in $(MANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man8dir)/$$i.gz; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
+ done
+ $(LN) -f $(DESTDIR)$(man8dir)/e2fsck.8 $(DESTDIR)$(man8dir)/fsck.ext2.8
+ $(LN) -f $(DESTDIR)$(man8dir)/e2fsck.8 $(DESTDIR)$(man8dir)/fsck.ext3.8
+
+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
+ for i in $(MANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
+ done
+ $(RM) -f $(DESTDIR)$(root_sbindir)/fsck.ext2 \
+ $(DESTDIR)$(root_sbindir)/fsck.ext3
+
+clean:
+ $(RM) -f $(PROGS) \#* *\# *.s *.o *.a *~ core e2fsck.static \
+ e2fsck.shared e2fsck.profiled flushb e2fsck.8
+ $(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 $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
+super.o: $(srcdir)/super.c $(top_srcdir)/lib/uuid/uuid.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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
+pass1.o: $(srcdir)/pass1.c $(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/et/com_err.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/ext2_ext_attr.h \
+ $(srcdir)/problem.h
+pass1b.o: $(srcdir)/pass1b.c $(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/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
+pass2.o: $(srcdir)/pass2.c $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
+pass3.o: $(srcdir)/pass3.c $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
+pass4.o: $(srcdir)/pass4.c $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
+pass5.o: $(srcdir)/pass5.c $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
+journal.o: $(srcdir)/journal.c $(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/et/com_err.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/kernel-jbd.h \
+ $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h \
+ $(srcdir)/problem.h $(top_srcdir)/lib/uuid/uuid.h
+recovery.o: $(srcdir)/recovery.c $(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/et/com_err.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/kernel-jbd.h \
+ $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h
+revoke.o: $(srcdir)/revoke.c $(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/et/com_err.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/kernel-jbd.h \
+ $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h
+badblocks.o: $(srcdir)/badblocks.c $(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/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+util.o: $(srcdir)/util.c $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+unix.o: $(srcdir)/unix.c $(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/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
+ $(srcdir)/problem.h $(top_srcdir)/version.h
+dirinfo.o: $(srcdir)/dirinfo.c $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+ehandler.o: $(srcdir)/ehandler.c $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+problem.o: $(srcdir)/problem.c $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h $(srcdir)/problemP.h
+message.o: $(srcdir)/message.c $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
+swapfs.o: $(srcdir)/swapfs.c $(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/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+ea_refcount.o: $(srcdir)/ea_refcount.c $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+region.o: $(srcdir)/region.c $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/badblocks.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/badblocks.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/badblocks.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,139 @@
+/*
+ * 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, 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,
+ _("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,
+ _("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 %s%s%s %d", fs->blocksize,
+ (ctx->options & E2F_OPT_PREEN) ? "" : "-s ",
+ (ctx->options & E2F_OPT_WRITECHECK) ? "-n " : "",
+ fs->device_name, fs->super->s_blocks_count);
+ 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,
+ _("while reading in list of bad blocks from file"));
+ goto fatal;
+ }
+
+ /*
+ * Finally, update the bad blocks from the bad_block_map
+ */
+ retval = ext2fs_update_bb_inode(fs, bb_list);
+ if (retval) {
+ com_err("ext2fs_update_bb_inode", retval,
+ _("while updating bad block inode"));
+ goto fatal;
+ }
+
+ ext2fs_badblocks_list_free(bb_list);
+ return;
+
+fatal:
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+
+}
+
+void test_disk(e2fsck_t ctx)
+{
+ read_bad_blocks_file(ctx, 0, 0);
+}
+
+static int check_bb_inode_blocks(ext2_filsys fs, blk_t *block_nr, int blockcnt,
+ void *priv_data)
+{
+ if (!*block_nr)
+ return 0;
+
+ /*
+ * If the block number is outrageous, clear it and ignore it.
+ */
+ if (*block_nr >= fs->super->s_blocks_count ||
+ *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;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/dirinfo.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/dirinfo.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/dirinfo.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,137 @@
+/*
+ * 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"
+
+/*
+ * This subroutine is called during pass1 to create a directory info
+ * entry. During pass1, the passed-in parent is 0; it will get filled
+ * in during pass2.
+ */
+void e2fsck_add_dir_info(e2fsck_t ctx, ext2_ino_t ino, ext2_ino_t parent)
+{
+ struct dir_info *dir;
+ int i, j;
+ ext2_ino_t num_dirs;
+ errcode_t retval;
+ unsigned long old_size;
+
+#if 0
+ printf("add_dir_info for inode %lu...\n", ino);
+#endif
+ if (!ctx->dir_info) {
+ ctx->dir_info_count = 0;
+ retval = ext2fs_get_num_dirs(ctx->fs, &num_dirs);
+ if (retval)
+ num_dirs = 1024; /* Guess */
+ ctx->dir_info_size = num_dirs + 10;
+ ctx->dir_info = (struct dir_info *)
+ e2fsck_allocate_memory(ctx, ctx->dir_info_size
+ * sizeof (struct dir_info),
+ "directory map");
+ }
+
+ 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),
+ (void **) &ctx->dir_info);
+ if (retval) {
+ ctx->dir_info_size -= 10;
+ 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[ctx->dir_info_count-1].ino >= ino) {
+ for (i = ctx->dir_info_count-1; i > 0; i--)
+ if (ctx->dir_info[i-1].ino < ino)
+ break;
+ dir = &ctx->dir_info[i];
+ if (dir->ino != ino)
+ for (j = ctx->dir_info_count++; j > i; j--)
+ ctx->dir_info[j] = ctx->dir_info[j-1];
+ } else
+ dir = &ctx->dir_info[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.
+ */
+struct dir_info *e2fsck_get_dir_info(e2fsck_t ctx, ext2_ino_t ino)
+{
+ int low, high, mid;
+
+ low = 0;
+ high = ctx->dir_info_count-1;
+ if (!ctx->dir_info)
+ return 0;
+ if (ino == ctx->dir_info[low].ino)
+ return &ctx->dir_info[low];
+ if (ino == ctx->dir_info[high].ino)
+ return &ctx->dir_info[high];
+
+ while (low < high) {
+ mid = (low+high)/2;
+ if (mid == low || mid == high)
+ break;
+ if (ino == ctx->dir_info[mid].ino)
+ return &ctx->dir_info[mid];
+ if (ino < ctx->dir_info[mid].ino)
+ high = mid;
+ else
+ low = mid;
+ }
+ return 0;
+}
+
+/*
+ * Free the dir_info structure when it isn't needed any more.
+ */
+void e2fsck_free_dir_info(e2fsck_t ctx)
+{
+ if (ctx->dir_info) {
+ ext2fs_free_mem((void **) &ctx->dir_info);
+ ctx->dir_info = 0;
+ }
+ ctx->dir_info_size = 0;
+ ctx->dir_info_count = 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_count;
+}
+
+/*
+ * A simple interator function
+ */
+struct dir_info *e2fsck_dir_info_iter(e2fsck_t ctx, int *control)
+{
+ if (*control >= ctx->dir_info_count)
+ return 0;
+
+ return(ctx->dir_info + (*control)++);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/e2fsck.8.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/e2fsck.8.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/e2fsck.8.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,286 @@
+.\" -*- 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 second extended file system
+.SH SYNOPSIS
+.B e2fsck
+[
+.B \-pacnyrdfvstFSV
+]
+[
+.B \-b
+.I superblock
+]
+[
+.B \-B
+.I blocksize
+]
+[
+.BR \-l | \-L
+.I bad_blocks_file
+]
+[
+.B \-C
+.I fd
+]
+ at JDEV@[
+ at JDEV@.B \-j
+ at JDEV@.I external-journal
+ at JDEV@]
+.I device
+.SH DESCRIPTION
+.B e2fsck
+is used to check a Linux second extended file system (e2fs). E2fsck also
+supports ext2 filesystems countaining a journal, which are
+also sometimes known as ext3 filesystems.
+.PP
+.I device
+is the device file where the filesystem is stored (e.g.
+.IR /dev/hdc1 ).
+.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 run the
+.BR badblocks (8)
+program to find any blocks which are bad on the filesystem,
+and then marks them as bad by adding them to the bad block inode.
+If this option is specified twice, then the bad block scan will be done
+using a non-destructive read-write test.
+.TP
+.B \-C
+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 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 \-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.
+ at JDEV@.TP
+ at JDEV@.BI \-j " external-journal"
+ at JDEV@Set the pathname where the external-journal for this filesystem can be
+ at JDEV@found.
+.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. (Note: if the
+.BR \-c ,
+.BR \-l ,
+or
+.B \-L
+options are specified in addition to the
+.B \-n
+option, then the filesystem will be opened read-write, to permit the
+bad-blocks list to be updated. However, no other changes will be made
+to the filesystem.)
+.TP
+.B \-p
+Automatically repair ("preen") the file system without any questions.
+.TP
+.B \-r
+This option does nothing at all; it is provided only for backwards
+compatibility.
+.TP
+.B \-s
+This option will byte-swap the filesystem so that it is using the normalized,
+standard byte-order (which is i386 or little endian). If the filesystem is
+already in the standard byte-order,
+.B e2fsck
+will take no action.
+.TP
+.B \-S
+This option will byte-swap the filesystem, regardless of its current
+byte-order.
+.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.
+.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 if file system was mounted
+.br
+\ 4\ \-\ File system errors left uncorrected
+.br
+\ 8\ \-\ Operational error
+.br
+\ 16\ \-\ Usage or syntax error
+.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. (See discussion of the
+.B \-C
+option.)
+.TP
+.B SIGUSR2
+This signal causes
+.B e2fsck
+to stop displaying a completion bar.
+.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. If you
+have a writeable 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).
+.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 at mit.edu>.
+.SH SEE ALSO
+.BR mke2fs (8),
+.BR tune2fs (8),
+.BR dumpe2fs (8),
+.BR debugfs (8)
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/e2fsck.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/e2fsck.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/e2fsck.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,195 @@
+/*
+ * 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;
+
+ retval = ext2fs_get_mem(sizeof(struct e2fsck_struct),
+ (void **) &context);
+ if (retval)
+ return retval;
+
+ memset(context, 0, sizeof(struct e2fsck_struct));
+
+ context->process_inode_size = 256;
+
+ *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)
+{
+ ctx->flags = 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);
+ 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;
+ }
+
+ /*
+ * Clear the array of invalid meta-data flags
+ */
+ if (ctx->invalid_inode_bitmap_flag) {
+ ext2fs_free_mem((void **) &ctx->invalid_inode_bitmap_flag);
+ ctx->invalid_inode_bitmap_flag = 0;
+ }
+ if (ctx->invalid_block_bitmap_flag) {
+ ext2fs_free_mem((void **) &ctx->invalid_block_bitmap_flag);
+ ctx->invalid_block_bitmap_flag = 0;
+ }
+ if (ctx->invalid_inode_table_flag) {
+ ext2fs_free_mem((void **) &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->large_files = 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);
+
+ ext2fs_free_mem((void **) &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);
+
+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))
+ 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;
+ 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;
+}
+
+
+
+
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/e2fsck.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/e2fsck.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/e2fsck.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,373 @@
+/*
+ * e2fsck.h
+ *
+ * Copyright (C) 1993, 1994 Theodore Ts'o. This file may be
+ * redistributed under the terms of the GNU Public License.
+ *
+ */
+
+#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"
+#else
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.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
+/* FIXME */
+#define NLS_CAT_NAME "e2fsprogs"
+#define LOCALEDIR "/usr/share/locale"
+/* FIXME */
+#else
+#define _(a) (a)
+#define N_(a) a
+#endif
+
+/*
+ * Exit codes used by fsck-type programs
+ */
+#define FSCK_OK 0 /* No errors */
+#define FSCK_NONDESTRUCT 1 /* File system errors corrected */
+#define FSCK_REBOOT 2 /* System should be rebooted */
+#define FSCK_UNCORRECTED 4 /* File system errors left uncorrected */
+#define FSCK_ERROR 8 /* Operational error */
+#define FSCK_USAGE 16 /* Usage or syntax error */
+#define FSCK_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 */
+};
+
+#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;
+};
+#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
+
+/*
+ * 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_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 */
+
+/*
+ * 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;
+
+struct e2fsck_struct {
+ ext2_filsys fs;
+ const char *program_name;
+ const char *filesystem_name;
+ const char *device_name;
+ int flags; /* E2fsck internal flags */
+ int options;
+ blk_t use_superblock; /* sb requested by user */
+ blk_t superblock; /* sb used to open fs */
+ int blocksize; /* blocksize */
+ blk_t num_blocks; /* Total number of blocks */
+
+#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;
+
+ /*
+ * Directory information
+ */
+ int dir_info_count;
+ int dir_info_size;
+ struct dir_info *dir_info;
+
+ /*
+ * Tuning parameters
+ */
+ int process_inode_size;
+ int inode_buffer_blocks;
+
+ /*
+ * ext3 journal support
+ */
+ io_channel journal_io;
+ const char *journal_name;
+
+#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;
+
+ /* File counts */
+ int fs_directory_count;
+ int fs_regular_count;
+ int fs_blockdev_count;
+ int fs_chardev_count;
+ int fs_links_count;
+ int fs_symlinks_count;
+ int fs_fast_symlinks_count;
+ int fs_fifo_count;
+ int fs_total_count;
+ int fs_badblocks_count;
+ int fs_sockets_count;
+ int fs_ind_count;
+ int fs_dind_count;
+ int fs_tind_count;
+ int fs_fragmented;
+ int large_files;
+ int fs_ext_attr_inodes;
+ int fs_ext_attr_blocks;
+
+ /*
+ * 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;
+
+/*
+ * 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);
+extern void test_disk(e2fsck_t ctx);
+
+/* dirinfo.c */
+extern void e2fsck_add_dir_info(e2fsck_t ctx, ext2_ino_t ino, ext2_ino_t parent);
+extern struct dir_info *e2fsck_get_dir_info(e2fsck_t ctx, ext2_ino_t ino);
+extern void e2fsck_free_dir_info(e2fsck_t ctx);
+extern int e2fsck_get_num_dirs(e2fsck_t ctx);
+extern int e2fsck_get_num_dirinfo(e2fsck_t ctx);
+extern struct dir_info *e2fsck_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, blk_t blk,
+ int *ret);
+extern errcode_t ea_refcount_increment(ext2_refcount_t refcount,
+ blk_t blk, int *ret);
+extern errcode_t ea_refcount_decrement(ext2_refcount_t refcount,
+ blk_t blk, int *ret);
+extern errcode_t ea_refcount_store(ext2_refcount_t refcount,
+ blk_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 blk_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 int e2fsck_check_ext3_journal(e2fsck_t ctx);
+extern int e2fsck_run_ext3_journal(e2fsck_t ctx);
+extern void e2fsck_move_ext3_journal(e2fsck_t ctx);
+
+/* pass1.c */
+extern void e2fsck_use_inode_shortcuts(e2fsck_t ctx, int bool);
+extern int e2fsck_pass1_check_device_inode(struct ext2_inode *inode);
+extern int e2fsck_pass1_check_symlink(ext2_filsys fs, struct ext2_inode *inode);
+
+/* pass2.c */
+extern int e2fsck_process_bad_inode(e2fsck_t ctx, ext2_ino_t dir, ext2_ino_t ino);
+
+/* pass3.c */
+extern int e2fsck_reconnect_file(e2fsck_t ctx, ext2_ino_t inode);
+
+/* 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);
+
+/* super.c */
+void check_super_block(e2fsck_t ctx);
+errcode_t e2fsck_get_device_size(e2fsck_t ctx);
+
+/* swapfs.c */
+void swap_filesys(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(const char * string, int def);
+extern void fatal_error(e2fsck_t ctx, const char * fmt_string);
+extern void e2fsck_read_bitmaps(e2fsck_t ctx);
+extern void e2fsck_write_bitmaps(e2fsck_t ctx);
+extern void preenhalt(e2fsck_t ctx);
+#ifdef RESOURCE_TRACK
+extern void print_resource_track(const char *desc,
+ struct resource_track *track);
+extern void init_resource_track(struct resource_track *track);
+#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_write_inode(e2fsck_t ctx, unsigned long ino,
+ struct ext2_inode * inode, const char * proc);
+#ifdef MTRACE
+extern void mtrace_print(char *mesg);
+#endif
+extern blk_t get_backup_sb(e2fsck_t ctx, ext2_filsys fs,
+ const char *name, io_manager manager);
+extern int ext2_file_type(unsigned int mode);
+
+/* unix.c */
+extern void e2fsck_clear_progbar(e2fsck_t ctx);
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/ea_refcount.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/ea_refcount.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/ea_refcount.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,480 @@
+/*
+ * 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>
+
+#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 {
+ blk_t ea_blk;
+ int ea_count;
+};
+
+struct ea_refcount {
+ blk_t count;
+ blk_t size;
+ int cursor;
+ struct ea_refcount_el *list;
+};
+
+void ea_refcount_free(ext2_refcount_t refcount)
+{
+ if (!refcount)
+ return;
+
+ if (refcount->list)
+ ext2fs_free_mem((void **) &refcount->list);
+ ext2fs_free_mem((void **) &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),
+ (void **) &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, (void **) &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)
+{
+ 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,
+ blk_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),
+ (void **) &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,
+ blk_t blk, int create)
+{
+ float range;
+ int low, high, mid;
+ blk_t lowval, highval;
+
+ 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) {
+#if 0
+ mid = (low+high)/2;
+#else
+ if (low == high)
+ mid = low;
+ else {
+ /* Interpolate for efficiency */
+ lowval = refcount->list[low].ea_blk;
+ highval = refcount->list[high].ea_blk;
+
+ if (blk < lowval)
+ range = 0;
+ else if (blk > highval)
+ range = 1;
+ else
+ range = ((float) (blk - lowval)) /
+ (highval - lowval);
+ mid = low + ((int) (range * (high-low)));
+ }
+#endif
+ 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, blk_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, blk_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, blk_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, blk_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;
+}
+
+
+blk_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=%u, list[%d].blk=%u\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;
+ blk_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, "");
+ 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++];
+ retval = ea_refcount_store(refcount, blk, arg);
+ printf("Storing blk %u with value %d\n", blk, arg);
+ if (retval)
+ com_err("ea_refcount_store", retval, "");
+ 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, "");
+ else
+ printf("bcode_fetch(%u) 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,
+ "");
+ else
+ printf("bcode_increment(%u) 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 %u", blk);
+ else
+ printf("bcode_decrement(%u) returns %d\n",
+ blk, arg);
+ break;
+ case BCODE_VALIDATE:
+ retval = ea_refcount_validate(refcount, stderr);
+ if (retval)
+ com_err("ea_refcount_validate",
+ retval, "");
+ 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=%u, count=%d\n", blk,
+ arg);
+ }
+ break;
+ case BCODE_COLLAPSE:
+ refcount_collapse(refcount);
+ break;
+ }
+
+ }
+}
+
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/ehandler.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/ehandler.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/ehandler.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,121 @@
+/*
+ * 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,
+ int actual,
+ 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 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_blk(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))
+ 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,
+ int actual,
+ 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 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_blk(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;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/emptydir.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/emptydir.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/emptydir.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,192 @@
+/*
+ * 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;
+ blk_t logblk;
+ blk_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_entry *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_entry *db)
+{
+ if (!edi || !db)
+ return;
+
+ if (db->ino == 11)
+ return; /* Inode number 11 is usually lost+found */
+
+ printf(_("Empty directory block %d (#%d) in inode %d\n"),
+ db->blk, db->blockcnt, db->ino);
+
+ ext2fs_mark_block_bitmap(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_block(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, blk_t *block_nr, e2_blkcnt_t blockcnt,
+ blk_t ref_block, int ref_offset, void *priv_data)
+{
+ empty_dir_info edi = (empty_dir_info) priv_data;
+ blk_t block, new_block;
+ errcode_t retval;
+
+ if (blockcnt < 0)
+ return 0;
+ block = *block_nr;
+ do {
+ retval = ext2fs_bmap(fs, edi->ino, &edi->inode,
+ edi->block_buf, 0, edi->logblk,
+ &new_block);
+ if (retval)
+ return DIRENT_ABORT; /* XXX what to do? */
+ if (new_block == 0)
+ break;
+ edi->logblk++;
+ } while (ext2fs_test_block_bitmap(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_entry *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_iterate2(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;
+ edi->inode.i_blocks -= edi->freed_blocks *
+ (fs->blocksize / 512);
+ (void) ext2fs_write_inode(fs, db->ino, &edi->inode);
+ }
+ 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_iterate(edi->empty_dblist,
+ fix_directory, &edi);
+ }
+ free(edi->block_buf);
+ free_empty_dirblock(edi);
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/extend.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/extend.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/extend.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -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);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/flushb.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/flushb.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/flushb.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,76 @@
+/*
+ * flushb.c --- This routine flushes the disk buffers for a disk
+ *
+ * Copyright 1997, 2000, by Theodore Ts'o.
+ *
+ * This program may be used under the provisions of the GNU Public
+ * License, *EXCEPT* that a binary copy of the executable may not be
+ * packaged as a part of binary package which is distributed as part
+ * of a Linux distribution. (Yes, this violates the Debian Free
+ * Software Guidelines of restricting its field of use. That's the
+ * point. I don't want this program being distributed in Debian,
+ * because I don't care to support it, and the maintainer, Yann
+ * Dirson, doesn't seem to pay attention to my wishes on this matter.
+ * So I'm deliberately adding this clause so it violates the Debian
+ * Free Software Guidelines to force him to take it out. (What part
+ * of THIS IS FOR MY OWN USE don't you understand? And no, I'm going
+ * to write a man page for it either. And don't file a bug about it
+ * or bug me about it.) If this doesn't work, I'll have to remove it
+ * from the upstream source distribution at the next release. End of
+ * Rant. :-)
+ *
+ * (BTW, use of flushb on some older 2.2 kernels on a heavily loaded
+ * system will corrupt filesystems.)
+ */
+
+#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
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/iscan.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/iscan.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/iscan.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,139 @@
+/*
+ * 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
+#ifdef HAVE_MNTENT_H
+#include <mntent.h>
+#endif
+#include <sys/ioctl.h>
+#include <malloc.h>
+
+#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;
+ char 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;
+ int 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(_("%d inodes scanned.\n"), num_inodes);
+
+ exit(0);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/jfs_user.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/jfs_user.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/jfs_user.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,112 @@
+/*
+ * 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 {
+ char b_data[8192];
+ e2fsck_t b_ctx;
+ io_channel b_io;
+ int b_size;
+ blk_t b_blocknr;
+ int b_dirty;
+ int b_uptodate;
+ int b_err;
+};
+
+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 fsync_no_super(dev) 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;
+} kmem_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)
+
+/*
+ * We use the standard libext2fs portability tricks for inline
+ * functions.
+ */
+extern kmem_cache_t * do_cache_create(int len);
+extern void do_cache_destroy(kmem_cache_t *cache);
+
+#if (defined(E2FSCK_INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS))
+#ifdef E2FSCK_INCLUDE_INLINE_FUNCS
+#define _INLINE_ extern
+#else
+#ifdef __GNUC__
+#define _INLINE_ extern __inline__
+#else /* For Watcom C */
+#define _INLINE_ extern inline
+#endif
+#endif
+
+_INLINE_ kmem_cache_t * do_cache_create(int len)
+{
+ kmem_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(kmem_cache_t *cache)
+{
+ free(cache);
+}
+#undef _INLINE_
+#endif
+
+#define __init
+
+/*
+ * Now pull in the real linux/jfs.h definitions.
+ */
+#include <ext2fs/kernel-jbd.h>
+
+/*
+ * Kernel compatibility functions are defined in journal.c
+ */
+int journal_bmap(journal_t *journal, blk_t block, unsigned long *phys);
+struct buffer_head *getblk(kdev_t ctx, blk_t blocknr, int blocksize);
+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);
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/journal.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/journal.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/journal.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,889 @@
+/*
+ * 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/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;
+int journal_enable_debug = 2;
+#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, blk_t block, unsigned long *phys)
+{
+#ifdef USE_INODE_IO
+ *phys = block;
+ return 0;
+#else
+ struct inode *inode = journal->j_inode;
+ errcode_t retval;
+ blk_t pblk;
+
+ if (!inode) {
+ *phys = block;
+ return 0;
+ }
+
+ retval= ext2fs_bmap(inode->i_ctx->fs, inode->i_ino,
+ &inode->i_ext2, NULL, 0, block, &pblk);
+ *phys = pblk;
+ return (retval);
+#endif
+}
+
+struct buffer_head *getblk(kdev_t kdev, blk_t blocknr, int blocksize)
+{
+ struct buffer_head *bh;
+
+ bh = e2fsck_allocate_memory(kdev->k_ctx, sizeof(*bh), "block buffer");
+ if (!bh)
+ return NULL;
+
+ jfs_debug(4, "getblk for block %lu (%d bytes)(total %d)\n",
+ (unsigned 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 ll_rw_block(int rw, int nr, struct buffer_head *bhp[])
+{
+ int retval;
+ struct buffer_head *bh;
+
+ for (; nr > 0; --nr) {
+ bh = *bhp++;
+ if (rw == READ && !bh->b_uptodate) {
+ jfs_debug(3, "reading block %lu/%p\n",
+ (unsigned long) bh->b_blocknr, (void *) bh);
+ retval = io_channel_read_blk(bh->b_io,
+ bh->b_blocknr,
+ 1, bh->b_data);
+ if (retval) {
+ com_err(bh->b_ctx->device_name, retval,
+ "while reading block %ld\n",
+ bh->b_blocknr);
+ bh->b_err = retval;
+ continue;
+ }
+ bh->b_uptodate = 1;
+ } else if (rw == WRITE && bh->b_dirty) {
+ jfs_debug(3, "writing block %lu/%p\n",
+ (unsigned long) bh->b_blocknr, (void *) bh);
+ retval = io_channel_write_blk(bh->b_io,
+ bh->b_blocknr,
+ 1, bh->b_data);
+ if (retval) {
+ com_err(bh->b_ctx->device_name, retval,
+ "while writing block %ld\n",
+ bh->b_blocknr);
+ bh->b_err = retval;
+ continue;
+ }
+ bh->b_dirty = 0;
+ bh->b_uptodate = 1;
+ } else
+ jfs_debug(3, "no-op %s for block %lu\n",
+ rw == READ ? "read" : "write",
+ (unsigned long) 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 %lu/%p (total %d)\n",
+ (unsigned long) bh->b_blocknr, (void *) bh, --bh_count);
+ ext2fs_free_mem((void **) &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);
+}
+
+static errcode_t e2fsck_get_journal(e2fsck_t ctx, journal_t **ret_journal)
+{
+ 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;
+ char *journal_name = 0;
+ journal_t *journal = NULL;
+ errcode_t retval;
+ io_manager io_ptr;
+ unsigned long start = 0;
+ int free_journal_name = 0;
+ int ext_journal = 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)
+ return EXT2_ET_BAD_INODE_NUM;
+ 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)))
+ goto errout;
+ if (!j_inode->i_ext2.i_links_count ||
+ !LINUX_S_ISREG(j_inode->i_ext2.i_mode)) {
+ retval = EXT2_ET_NO_JOURNAL;
+ goto errout;
+ }
+ if (j_inode->i_ext2.i_size / journal->j_blocksize <
+ JFS_MIN_JOURNAL_BLOCKS) {
+ retval = EXT2_ET_JOURNAL_TOO_SMALL;
+ goto errout;
+ }
+
+ journal->j_maxlen = j_inode->i_ext2.i_size / journal->j_blocksize;
+
+#ifdef USE_INODE_IO
+ retval = ext2fs_inode_io_intern(ctx->fs, sb->s_journal_inum,
+ &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 = journal_bmap(journal, 0, &start)) != 0)
+ goto errout;
+#endif
+ } else {
+ ext_journal = 1;
+ journal_name = ctx->journal_name;
+ if (!journal_name) {
+ journal_name = ext2fs_find_block_device(sb->s_journal_dev);
+ free_journal_name = 1;
+ }
+
+ if (!journal_name) {
+ fix_problem(ctx, PR_0_CANT_FIND_JOURNAL, &pctx);
+ return EXT2_ET_LOAD_EXT_JOURNAL;
+ }
+
+ jfs_debug(1, "Using journal file %s\n", journal_name);
+ io_ptr = unix_io_manager;
+ }
+
+#if 0
+ test_io_backing_manager = io_ptr;
+ io_ptr = test_io_manager;
+#endif
+#ifndef USE_INODE_IO
+ if (ext_journal)
+#endif
+ retval = io_ptr->open(journal_name, IO_FLAG_RW,
+ &ctx->journal_io);
+ if (free_journal_name)
+ free((void *) journal_name);
+ if (retval)
+ goto errout;
+
+ io_channel_set_blksize(ctx->journal_io, ctx->fs->blocksize);
+
+ if (ext_journal) {
+ 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)
+ goto errout;
+ memcpy(&jsuper, start ? bh->b_data : bh->b_data + 1024,
+ sizeof(jsuper));
+ brelse(bh);
+#ifdef EXT2FS_ENABLE_SWAPFS
+ 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;
+ }
+
+ journal->j_maxlen = jsuper.s_blocks_count;
+ 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((void **)&j_inode);
+#endif
+
+ *ret_journal = journal;
+ return 0;
+
+errout:
+ if (dev_fs)
+ ext2fs_free_mem((void **)&dev_fs);
+ if (j_inode)
+ ext2fs_free_mem((void **)&j_inode);
+ if (journal)
+ ext2fs_free_mem((void **)&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; /* FIXME: todo */
+ 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,
+ _("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 &&
+ (ctx->fs->io == ctx->journal_io))
+ 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((void **)&journal->j_inode);
+#endif
+ if (journal->j_fs_dev)
+ ext2fs_free_mem((void **)&journal->j_fs_dev);
+ ext2fs_free_mem((void **)&journal);
+}
+
+/*
+ * This function makes sure that the superblock fields regarding the
+ * journal are consistent.
+ */
+int 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;
+ int 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_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;
+ 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?
+ */
+ }
+
+ e2fsck_journal_release(ctx, journal, reset, 0);
+ return retval;
+}
+
+static errcode_t recover_ext3_journal(e2fsck_t ctx)
+{
+ journal_t *journal;
+ int retval;
+
+ 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_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);
+ }
+
+errout:
+ journal_destroy_revoke(journal);
+ journal_destroy_revoke_caches();
+ e2fsck_journal_release(ctx, journal, 1, 0);
+ return retval;
+}
+
+int 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;
+
+ 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.
+ */
+ ext2fs_close(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;
+
+ /* Set the superblock flags */
+ e2fsck_clear_recover(ctx, recover_retval);
+ return 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;
+ int group, mount_flags;
+
+ /*
+ * If the filesystem is opened read-only, or there is no
+ * journal, or the journal is already in the hidden inode,
+ * then do nothing.
+ */
+ if ((ctx->options & E2F_OPT_READONLY) ||
+ (sb->s_journal_inum == 0) ||
+ (sb->s_journal_inum == EXT2_JOURNAL_INO) ||
+ !(sb->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL))
+ 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;
+
+ /*
+ * The inode had better have only one link and not be readable.
+ */
+ if (ext2fs_read_inode(fs, ino, &inode) != 0)
+ return;
+ if (inode.i_links_count != 1)
+ return;
+
+ /* We need the inode bitmap to be loaded */
+ retval = ext2fs_read_bitmaps(fs);
+ if (retval)
+ return;
+
+ clear_problem_context(&pctx);
+ 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);
+ inode.i_links_count = 0;
+ inode.i_dtime = time(0);
+ if ((retval = ext2fs_write_inode(fs, ino, &inode)) != 0)
+ goto err_out;
+
+ group = ext2fs_group_of_ino(fs, ino);
+ ext2fs_unmark_inode_bitmap(fs->inode_map, ino);
+ ext2fs_mark_ib_dirty(fs);
+ fs->group_desc[group].bg_free_inodes_count++;
+ 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;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/malloc.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/malloc.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/malloc.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 at ai.mit.edu,
+ or (US mail) as Mike Haertel c/o Free Software Foundation. */
+
+#ifndef _MALLOC_H
+
+#define _MALLOC_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 /* malloc.h */
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/message.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/message.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/message.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,448 @@
+/*
+ * 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> 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
+ * %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
+ *
+ * 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
+ * @i inode
+ * @I illegal
+ * @j journal
+ * @l lost+found
+ * @L is a link
+ * @o orphaned
+ * @r root inode
+ * @s should be
+ * @S superblock
+ * @u unattached
+ * @v device
+ * @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 at e '%Dn' in %p (%i)"),
+ N_("ffilesystem"),
+ N_("Ffor @i %i (%Q) is"),
+ N_("ggroup"),
+ N_("llost+found"),
+ N_("Lis a link"),
+ N_("oorphaned"),
+ N_("rroot @i"),
+ N_("sshould be"),
+ N_("Ssuper at b"),
+ N_("uunattached"),
+ N_("vdevice"),
+ 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 ACL index inode>"), /* 3 */
+ N_("<The ACL data 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(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);
+ }
+}
+
+
+/*
+ * This function prints a pathname, using the ext2fs_get_pathname
+ * function
+ */
+static void print_pathname(ext2_filsys fs, ext2_ino_t dir, ext2_ino_t ino)
+{
+ errcode_t retval;
+ char *path;
+
+ if (!dir && (ino < num_special_inodes)) {
+ fputs(_(special_inode_name[ino]), stdout);
+ return;
+ }
+
+ retval = ext2fs_get_pathname(fs, dir, ino, &path);
+ if (retval)
+ fputs("???", stdout);
+ else {
+ safe_print(path, -1);
+ ext2fs_free_mem((void **) &path);
+ }
+}
+
+/*
+ * This function handles the '@' expansion. We allow recursive
+ * expansion; an @ expression can contain further '@' and '%'
+ * expressions.
+ */
+static _INLINE_ void expand_at_expression(e2fsck_t ctx, char ch,
+ struct problem_context *pctx,
+ int *first)
+{
+ const char **cpp, *str;
+
+ /* Search for the abbreviation */
+ for (cpp = abbrevs; *cpp; cpp++) {
+ if (ch == *cpp[0])
+ break;
+ }
+ if (*cpp) {
+ str = (*cpp) + 1;
+ if (*first && islower(*str)) {
+ *first = 0;
+ fputc(toupper(*str++), stdout);
+ }
+ print_e2fsck_message(ctx, _(str), pctx, *first);
+ } else
+ printf("@%c", ch);
+}
+
+/*
+ * This function expands '%IX' expressions
+ */
+static _INLINE_ void expand_inode_expression(char ch,
+ struct problem_context *ctx)
+{
+ struct ext2_inode *inode;
+ char * time_str;
+ time_t t;
+
+ if (!ctx || !ctx->inode)
+ goto no_inode;
+
+ inode = ctx->inode;
+
+ switch (ch) {
+ case 's':
+ if (LINUX_S_ISDIR(inode->i_mode))
+ printf("%u", inode->i_size);
+ else {
+#ifdef EXT2_NO_64_TYPE
+ if (inode->i_size_high)
+ printf("0x%x%08x", inode->i_size_high,
+ inode->i_size);
+ else
+ printf("%u", inode->i_size);
+#else
+ printf("%llu", (inode->i_size |
+ ((__u64) inode->i_size_high << 32)));
+#endif
+ }
+ break;
+ case 'b':
+ printf("%u", inode->i_blocks);
+ break;
+ case 'l':
+ printf("%d", inode->i_links_count);
+ break;
+ case 'm':
+ printf("0%o", inode->i_mode);
+ break;
+ case 'M':
+ t = inode->i_mtime;
+ time_str = ctime(&t);
+ printf("%.24s", time_str);
+ break;
+ case 'F':
+ printf("%u", inode->i_faddr);
+ break;
+ case 'f':
+ printf("%u", inode->i_file_acl);
+ break;
+ case 'd':
+ printf("%u", (LINUX_S_ISDIR(inode->i_mode) ?
+ inode->i_dir_acl : 0));
+ break;
+ case 'u':
+ printf("%d", (inode->i_uid |
+ (inode->osd2.linux2.l_i_uid_high << 16)));
+ break;
+ case 'g':
+ printf("%d", (inode->i_gid |
+ (inode->osd2.linux2.l_i_gid_high << 16)));
+ break;
+ default:
+ no_inode:
+ printf("%%I%c", ch);
+ break;
+ }
+}
+
+/*
+ * This function expands '%dX' expressions
+ */
+static _INLINE_ void expand_dirent_expression(char ch,
+ struct problem_context *ctx)
+{
+ struct ext2_dir_entry *dirent;
+ int len;
+
+ if (!ctx || !ctx->dirent)
+ goto no_dirent;
+
+ dirent = ctx->dirent;
+
+ switch (ch) {
+ case 'i':
+ printf("%u", dirent->inode);
+ break;
+ case 'n':
+ len = dirent->name_len & 0xFF;
+ if (len > EXT2_NAME_LEN)
+ len = EXT2_NAME_LEN;
+ if (len > dirent->rec_len)
+ len = dirent->rec_len;
+ safe_print(dirent->name, len);
+ break;
+ case 'r':
+ printf("%u", dirent->rec_len);
+ break;
+ case 'l':
+ printf("%u", dirent->name_len & 0xFF);
+ break;
+ case 't':
+ printf("%u", dirent->name_len >> 8);
+ break;
+ default:
+ no_dirent:
+ printf("%%D%c", ch);
+ break;
+ }
+}
+
+static _INLINE_ void expand_percent_expression(ext2_filsys fs, char ch,
+ struct problem_context *ctx)
+{
+ if (!ctx)
+ goto no_context;
+
+ switch (ch) {
+ case '%':
+ fputc('%', stdout);
+ break;
+ case 'b':
+ printf("%u", ctx->blk);
+ break;
+ case 'B':
+#ifdef EXT2_NO_64_TYPE
+ printf("%d", ctx->blkcount);
+#else
+ printf("%lld", ctx->blkcount);
+#endif
+ break;
+ case 'c':
+ printf("%u", ctx->blk2);
+ break;
+ case 'd':
+ printf("%u", ctx->dir);
+ break;
+ case 'g':
+ printf("%d", ctx->group);
+ break;
+ case 'i':
+ printf("%u", ctx->ino);
+ break;
+ case 'j':
+ printf("%u", ctx->ino2);
+ break;
+ case 'm':
+ printf("%s", error_message(ctx->errcode));
+ break;
+ case 'N':
+#ifdef EXT2_NO_64_TYPE
+ printf("%u", ctx->num);
+#else
+ printf("%llu", ctx->num);
+#endif
+ break;
+ case 'p':
+ print_pathname(fs, ctx->ino, 0);
+ break;
+ case 'P':
+ print_pathname(fs, ctx->ino2,
+ ctx->dirent ? ctx->dirent->inode : 0);
+ break;
+ case 'q':
+ print_pathname(fs, ctx->dir, 0);
+ break;
+ case 'Q':
+ print_pathname(fs, ctx->dir, ctx->ino);
+ break;
+ case 'S':
+ printf("%d", get_backup_sb(NULL, fs, NULL, NULL));
+ break;
+ case 's':
+ printf("%s", ctx->str ? ctx->str : "NULL");
+ break;
+ case 'X':
+#ifdef EXT2_NO_64_TYPE
+ printf("0x%x", ctx->num);
+#else
+ printf("0x%llx", ctx->num);
+#endif
+ break;
+ default:
+ no_context:
+ printf("%%%c", ch);
+ break;
+ }
+}
+
+void print_e2fsck_message(e2fsck_t ctx, const char *msg,
+ struct problem_context *pctx, int first)
+{
+ ext2_filsys fs = ctx->fs;
+ const char * cp;
+ int i;
+
+ e2fsck_clear_progbar(ctx);
+ for (cp = msg; *cp; cp++) {
+ if (cp[0] == '@') {
+ cp++;
+ expand_at_expression(ctx, *cp, pctx, &first);
+ } else if (cp[0] == '%' && cp[1] == 'I') {
+ cp += 2;
+ expand_inode_expression(*cp, pctx);
+ } else if (cp[0] == '%' && cp[1] == 'D') {
+ cp += 2;
+ expand_dirent_expression(*cp, pctx);
+ } else if ((cp[0] == '%')) {
+ cp++;
+ expand_percent_expression(fs, *cp, pctx);
+ } else {
+ for (i=0; cp[i]; i++)
+ if ((cp[i] == '@') || cp[i] == '%')
+ break;
+ printf("%.*s", i, cp);
+ cp += i-1;
+ }
+ first = 0;
+ }
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/mtrace.awk
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/mtrace.awk 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/mtrace.awk 2006-07-10 20:52:46 UTC (rev 35)
@@ -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];
+ }
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/mtrace.awk
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/mtrace.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/mtrace.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/mtrace.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 at 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;
+ }
+ }
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/mtrace.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/mtrace.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/mtrace.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 at 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 */
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass1.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass1.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass1.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1850 @@
+/*
+ * 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.
+ */
+
+#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, blk_t *blocknr,
+ e2_blkcnt_t blockcnt, blk_t ref_blk,
+ int ref_offset, void *priv_data);
+static int process_bad_block(ext2_filsys fs, blk_t *block_nr,
+ e2_blkcnt_t blockcnt, blk_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 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, blk_t block); */
+
+struct process_block_struct {
+ ext2_ino_t ino;
+ int is_dir:1, clear:1, suppress:1,
+ fragmented:1, compressed:1;
+ blk_t num_blocks;
+ e2_blkcnt_t last_block;
+ int num_illegal_blocks;
+ blk_t previous_block;
+ struct ext2_inode *inode;
+ struct problem_context *pctx;
+ 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[4];
+
+/*
+ * Free all memory allocated by pass1 in preparation for restarting
+ * things.
+ */
+static void unwind_pass1(ext2_filsys fs)
+{
+ ext2fs_free_mem((void **) &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(struct ext2_inode *inode)
+{
+ int i;
+
+ /*
+ * If i_blocks is non-zero, then this is a bogus device/fifo/socket
+ */
+ if (inode->i_blocks)
+ 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;
+}
+
+#ifndef HAVE_STRNLEN
+/*
+ * Incredibly, libc5 doesn't appear to have strnlen. So we have to
+ * provide our own.
+ */
+static int strnlen(const char * s, int count)
+{
+ const char *cp = s;
+
+ while (count-- && *cp)
+ cp++;
+ return cp - s;
+}
+#endif
+
+/*
+ * 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, struct ext2_inode *inode)
+{
+ int i;
+
+ if ((inode->i_size_high || inode->i_size == 0) ||
+ (inode->i_flags & (EXT2_IMMUTABLE_FL | EXT2_APPEND_FL |
+ EXT2_INDEX_FL)))
+ return 0;
+
+ if (inode->i_blocks) {
+ if ((inode->i_size > fs->blocksize) ||
+ (inode->i_blocks != fs->blocksize >> 9) ||
+ (inode->i_block[0] < fs->super->s_first_data_block) ||
+ (inode->i_block[0] >= fs->super->s_blocks_count))
+ return 0;
+
+ for (i = 1; i < EXT2_N_BLOCKS; i++)
+ if (inode->i_block[i])
+ return 0;
+ } else {
+ if (inode->i_size > sizeof(inode->i_block) - 1)
+ return 0;
+
+ if (inode->i_size !=
+ strnlen((char *)inode->i_block, sizeof(inode->i_block)))
+ return 0;
+ }
+ return 1;
+}
+
+/*
+ * If the immutable (or append-only) flag is set on the inode, offer
+ * to clear it.
+ */
+static void check_immutable(e2fsck_t ctx, struct problem_context *pctx)
+{
+ if (!(pctx->inode->i_flags & (EXT2_IMMUTABLE_FL | EXT2_APPEND_FL)))
+ return;
+
+ if (!fix_problem(ctx, PR_1_SET_IMMUTABLE, pctx))
+ return;
+
+ pctx->inode->i_flags &= ~((EXT2_IMMUTABLE_FL | EXT2_APPEND_FL));
+ 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 ((inode->i_size == 0) && (inode->i_size_high == 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");
+}
+
+
+void e2fsck_pass1(e2fsck_t ctx)
+{
+ int i;
+ __u64 max_sizes, max_sect_limit;
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t ino;
+ 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;
+ int imagic_fs;
+
+#ifdef RESOURCE_TRACK
+ init_resource_track(&rtrack);
+#endif
+ clear_problem_context(&pctx);
+
+ if (!(ctx->options & E2F_OPT_PREEN))
+ fix_problem(ctx, PR_1_PASS_HEADER, &pctx);
+
+#ifdef MTRACE
+ mtrace_print("Pass 1");
+#endif
+
+#define EXT2_BPP(bits) (1UL << ((bits) - 2))
+
+ for (i=0; i < 4; i++) {
+ max_sizes = EXT2_NDIR_BLOCKS + EXT2_BPP(10+i);
+ max_sizes = max_sizes + EXT2_BPP(10+i) * EXT2_BPP(10+i);
+ max_sizes = (max_sizes +
+ (__u64) EXT2_BPP(10+i) * EXT2_BPP(10+i) *
+ EXT2_BPP(10+i));
+ max_sizes = (max_sizes * (1UL << (10+i))) - 1;
+ max_sect_limit = 512ULL * ((1LL << 32) - (1 << (i+1)));
+ if (max_sizes > max_sect_limit)
+ max_sizes = max_sect_limit;
+ ext2_max_sizes[i] = max_sizes;
+ }
+#undef EXT2_BPP
+
+ imagic_fs = (sb->s_feature_compat & EXT2_FEATURE_COMPAT_IMAGIC_INODES);
+
+ /*
+ * Allocate bitmaps structures
+ */
+ pctx.errcode = ext2fs_allocate_inode_bitmap(fs, _("in-use inode 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 = ext2fs_allocate_inode_bitmap(fs,
+ _("directory inode 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 = ext2fs_allocate_inode_bitmap(fs,
+ _("regular file inode 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 = ext2fs_allocate_block_bitmap(fs, _("in-use block map"),
+ &ctx->block_found_map);
+ if (pctx.errcode) {
+ pctx.num = 1;
+ fix_problem(ctx, PR_1_ALLOCATE_BBITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ pctx.errcode = ext2fs_create_icount2(fs, 0, 0, 0,
+ &ctx->inode_link_info);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1_ALLOCATE_ICOUNT, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ 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;
+ 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);
+ block_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 3,
+ "block interate buffer");
+ e2fsck_use_inode_shortcuts(ctx, 1);
+ ehandler_operation(_("doing inode scan"));
+ pctx.errcode = ext2fs_open_inode_scan(fs, ctx->inode_buffer_blocks,
+ &scan);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1_ISCAN_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ ext2fs_inode_scan_flags(scan, EXT2_SF_SKIP_MISSING_ITABLE, 0);
+ pctx.errcode = ext2fs_get_next_inode(scan, &ino, &inode);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1_ISCAN_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ 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;
+ while (ino) {
+ 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;
+ }
+ }
+ if (ino == EXT2_BAD_INO) {
+ struct process_block_struct pb;
+
+ pb.ino = EXT2_BAD_INO;
+ pb.num_blocks = pb.last_block = 0;
+ pb.num_illegal_blocks = 0;
+ pb.suppress = 0; pb.clear = 0; pb.is_dir = 0;
+ pb.fragmented = 0;
+ pb.inode = &inode;
+ pb.pctx = &pctx;
+ pb.ctx = ctx;
+ pctx.errcode = ext2fs_block_iterate2(fs, ino, 0,
+ block_buf, process_bad_block, &pb);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1_BLOCK_ITERATE, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ ext2fs_mark_inode_bitmap(ctx->inode_used_map, ino);
+ clear_problem_context(&pctx);
+ goto next;
+ } 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)) {
+ inode.i_dtime = time(0);
+ inode.i_links_count = 0;
+ ext2fs_icount_store(ctx->inode_link_info,
+ ino, 0);
+ e2fsck_write_inode(ctx, ino, &inode,
+ "pass1");
+ }
+
+ }
+ /*
+ * 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_bitmap(ctx->inode_used_map, ino);
+ if (fs->super->s_journal_inum == EXT2_JOURNAL_INO) {
+ /*
+ * XXX arguably this check should be
+ * in journal.c, before we decide it's
+ * safe to run the journal...
+ */
+ 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);
+ goto next;
+ }
+ if ((inode.i_links_count || inode.i_blocks ||
+ inode.i_blocks || inode.i_block[0]) &&
+ fix_problem(ctx, PR_1_JOURNAL_INODE_NOT_CLEAR,
+ &pctx)) {
+ memset(&inode, 0, sizeof(inode));
+ ext2fs_icount_store(ctx->inode_link_info,
+ ino, 0);
+ e2fsck_write_inode(ctx, ino, &inode, "pass1");
+ }
+ } else if (ino < EXT2_FIRST_INODE(fs->super)) {
+ int problem = 0;
+
+ ext2fs_mark_inode_bitmap(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);
+ goto next;
+ }
+ /*
+ * 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 &&
+ 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 : time(0);
+ 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 = time(0);
+ e2fsck_write_inode(ctx, ino, &inode,
+ "pass1");
+ }
+ }
+ goto next;
+ }
+ /*
+ * 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_bitmap(ctx->inode_used_map, ino);
+ switch (fs->super->s_creator_os) {
+ case EXT2_OS_LINUX:
+ frag = inode.osd2.linux2.l_i_frag;
+ fsize = inode.osd2.linux2.l_i_fsize;
+ break;
+ case EXT2_OS_HURD:
+ frag = inode.osd2.hurd2.h_i_frag;
+ fsize = inode.osd2.hurd2.h_i_fsize;
+ break;
+ case EXT2_OS_MASIX:
+ frag = inode.osd2.masix2.m_i_frag;
+ fsize = inode.osd2.masix2.m_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 (inode.i_flags & EXT2_IMAGIC_FL) {
+ if (imagic_fs) {
+ if (!ctx->inode_imagic_map)
+ alloc_imagic_map(ctx);
+ ext2fs_mark_inode_bitmap(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");
+ }
+ }
+ }
+
+ if (LINUX_S_ISDIR(inode.i_mode)) {
+ ext2fs_mark_inode_bitmap(ctx->inode_dir_map, ino);
+ e2fsck_add_dir_info(ctx, ino, 0);
+ ctx->fs_directory_count++;
+ } else if (LINUX_S_ISREG (inode.i_mode)) {
+ ext2fs_mark_inode_bitmap(ctx->inode_reg_map, ino);
+ ctx->fs_regular_count++;
+ } else if (LINUX_S_ISCHR (inode.i_mode) &&
+ e2fsck_pass1_check_device_inode(&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(&inode)) {
+ check_immutable(ctx, &pctx);
+ check_size(ctx, &pctx);
+ ctx->fs_blockdev_count++;
+ } else if (LINUX_S_ISLNK (inode.i_mode)) {
+ check_immutable(ctx, &pctx);
+ ctx->fs_symlinks_count++;
+ if (!e2fsck_pass1_check_symlink(fs, &inode))
+ mark_inode_bad(ctx, ino);
+ if (!inode.i_blocks) {
+ ctx->fs_fast_symlinks_count++;
+ goto next;
+ }
+ }
+ else if (LINUX_S_ISFIFO (inode.i_mode) &&
+ e2fsck_pass1_check_device_inode(&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(&inode)) {
+ check_immutable(ctx, &pctx);
+ check_size(ctx, &pctx);
+ ctx->fs_sockets_count++;
+ } else
+ mark_inode_bad(ctx, ino);
+ 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_block[EXT2_IND_BLOCK] ||
+ inode.i_block[EXT2_DIND_BLOCK] ||
+ inode.i_block[EXT2_TIND_BLOCK] ||
+ inode.i_file_acl) {
+ 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;
+ }
+ next:
+ pctx.errcode = ext2fs_get_next_inode(scan, &ino, &inode);
+ 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_bitmap(ctx->inode_bb_map, ino);
+ ext2fs_mark_inode_bitmap(ctx->inode_used_map, ino);
+ goto next;
+ }
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1_ISCAN_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ }
+ process_inodes(ctx, block_buf);
+ ext2fs_close_inode_scan(scan);
+ ehandler_operation(0);
+
+ /*
+ * 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_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((void **) &inodes_to_process);
+endit:
+ e2fsck_use_inode_shortcuts(ctx, 0);
+
+ ext2fs_free_mem((void **) &block_buf);
+
+#ifdef RESOURCE_TRACK
+ if (ctx->options & E2F_OPT_TIME2) {
+ e2fsck_clear_progbar(ctx);
+ print_resource_track(_("Pass 1"), &rtrack);
+ }
+#endif
+}
+
+/*
+ * 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,
+ 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)
+ ret = ib_a->inode.i_file_acl - ib_b->inode.i_file_acl;
+ 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 = ext2fs_allocate_inode_bitmap(ctx->fs,
+ _("bad inode 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_bitmap(ctx->inode_bad_map, ino);
+}
+
+
+/*
+ * 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 = ext2fs_allocate_inode_bitmap(ctx->fs,
+ _("inode in bad block 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 = ext2fs_allocate_inode_bitmap(ctx->fs,
+ _("imagic inode 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, blk_t block)
+{
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+
+ if (ext2fs_fast_test_block_bitmap(ctx->block_found_map, block)) {
+ if (!ctx->block_dup_map) {
+ pctx.errcode = ext2fs_allocate_block_bitmap(ctx->fs,
+ _("multiply claimed block 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_bitmap(ctx->block_dup_map, block);
+ } else {
+ ext2fs_fast_mark_block_bitmap(ctx->block_found_map, 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;
+ blk_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_attr(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_attr(fs, blk,
+ block_buf);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1_EXTATTR_WRITE, &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;
+ blk_t blk;
+ char * end;
+ struct ext2_ext_attr_header *header;
+ struct ext2_ext_attr_entry *entry;
+ int count;
+ region_t region;
+
+ blk = inode->i_file_acl;
+ 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 >= fs->super->s_blocks_count)) {
+ mark_inode_bad(ctx, ino);
+ return 0;
+ }
+
+ /* If ea bitmap hasn't been allocated, create it */
+ if (!ctx->block_ea_map) {
+ pctx->errcode = ext2fs_allocate_block_bitmap(fs,
+ _("ext attr block 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_bitmap(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_attr(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 = inode->i_file_acl;
+ if (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, 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) {
+ 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;
+ }
+ if (entry->e_name_len == 0 || entry->e_name_index != 0) {
+ if (fix_problem(ctx, PR_1_EA_BAD_NAME, pctx))
+ goto clear_extattr;
+ }
+ if (entry->e_value_block != 0) {
+ if (fix_problem(ctx, PR_1_EA_BAD_VALUE, pctx))
+ goto clear_extattr;
+ }
+ 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;
+ }
+ 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_bitmap(ctx->block_ea_map, blk);
+
+ return 1;
+
+clear_extattr:
+ inode->i_file_acl = 0;
+ e2fsck_write_inode(ctx, ino, inode, "check_ext_attr");
+ return 0;
+}
+
+
+/*
+ * 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;
+ int bad_size = 0;
+ __u64 size;
+
+ if (!ext2fs_inode_has_valid_blocks(pctx->inode))
+ return;
+
+ pb.ino = ino;
+ pb.num_blocks = pb.last_block = 0;
+ 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(pctx->inode->i_mode);
+ pb.inode = inode;
+ pb.pctx = pctx;
+ pb.ctx = ctx;
+ pctx->ino = ino;
+
+ 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;
+ e2fsck_write_inode(ctx, ino, inode,
+ "check_blocks");
+ }
+ }
+ }
+
+ pctx->errcode = ext2fs_block_iterate2(fs, ino,
+ pb.is_dir ? BLOCK_FLAG_HOLE : 0,
+ block_buf, process_block, &pb);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ return;
+ end_problem_latch(ctx, PR_LATCH_BLOCK);
+ if (pctx->errcode)
+ fix_problem(ctx, PR_1_BLOCK_ITERATE, pctx);
+
+ if (pb.fragmented && pb.num_blocks < fs->super->s_blocks_per_group)
+ ctx->fs_fragmented++;
+
+ if (pb.clear) {
+ e2fsck_read_inode(ctx, ino, inode, "check_blocks");
+ inode->i_links_count = 0;
+ ext2fs_icount_store(ctx->inode_link_info, ino, 0);
+ inode->i_dtime = time(0);
+ e2fsck_write_inode(ctx, ino, inode, "check_blocks");
+ ext2fs_unmark_inode_bitmap(ctx->inode_dir_map, ino);
+ ext2fs_unmark_inode_bitmap(ctx->inode_reg_map, ino);
+ ext2fs_unmark_inode_bitmap(ctx->inode_used_map, ino);
+ /*
+ * The inode was probably partially accounted for
+ * before processing was aborted, so we need to
+ * restart the pass 1 scan.
+ */
+ ctx->flags |= E2F_FLAG_RESTART;
+ return;
+ }
+ if (inode->i_file_acl && check_ext_attr(ctx, pctx, block_buf))
+ pb.num_blocks++;
+
+ pb.num_blocks *= (fs->blocksize / 512);
+#if 0
+ printf("inode %u, i_size = %lu, last_block = %lld, i_blocks=%lu, num_blocks = %lu\n",
+ ino, inode->i_size, pb.last_block, inode->i_blocks,
+ pb.num_blocks);
+#endif
+ if (!pb.num_blocks && pb.is_dir) {
+ if (fix_problem(ctx, PR_1_ZERO_LENGTH_DIR, pctx)) {
+ inode->i_links_count = 0;
+ ext2fs_icount_store(ctx->inode_link_info, ino, 0);
+ inode->i_dtime = time(0);
+ e2fsck_write_inode(ctx, ino, inode, "check_blocks");
+ ext2fs_unmark_inode_bitmap(ctx->inode_dir_map, ino);
+ ext2fs_unmark_inode_bitmap(ctx->inode_reg_map, ino);
+ ext2fs_unmark_inode_bitmap(ctx->inode_used_map, ino);
+ ctx->fs_directory_count--;
+ pb.is_dir = 0;
+ }
+ }
+ if (pb.is_dir) {
+ int nblock = inode->i_size >> EXT2_BLOCK_SIZE_BITS(fs->super);
+ /* We don't let a directory become larger than 2GB */
+ if (nblock > (pb.last_block + 1) ||
+ (inode->i_size & ((fs->blocksize-1) | 0x80000000UL)) != 0)
+ 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 {
+ size = inode->i_size | ((__u64) inode->i_size_high << 32);
+ if ((size < pb.last_block * fs->blocksize))
+ bad_size = 3;
+ else if (size > ext2_max_sizes[fs->super->s_log_block_size])
+ bad_size = 4;
+ /* FIXME: need to ensure pb.num_blocks < 2^32 */
+ }
+ if (bad_size) {
+ pctx->num = (pb.last_block+1) * fs->blocksize;
+ if (fix_problem(ctx, PR_1_BAD_I_SIZE, pctx)) {
+ inode->i_size = pctx->num;
+ if (!pb.is_dir)
+ inode->i_size_high = pctx->num >> 32;
+ e2fsck_write_inode(ctx, ino, inode, "check_blocks");
+ }
+ pctx->num = 0;
+ }
+ if (!pb.is_dir && (inode->i_size_high || inode->i_size & 0x80000000UL))
+ ctx->large_files++;
+ if (pb.num_blocks != inode->i_blocks) {
+ pctx->num = pb.num_blocks;
+ if (fix_problem(ctx, PR_1_BAD_I_BLOCKS, pctx)) {
+ inode->i_blocks = pb.num_blocks;
+ e2fsck_write_inode(ctx, ino, inode, "check_blocks");
+ }
+ pctx->num = 0;
+ }
+}
+
+#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, blk_t block)
+{
+ blk_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 >= fs->super->s_blocks_count) {
+ sprintf(problem, "> BLOCKS (%u)", fs->super->s_blocks_count);
+ 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 == fs->group_desc[i].bg_block_bitmap) {
+ sprintf(problem, "is the block bitmap of group %d", i);
+ break;
+ }
+ if (block == fs->group_desc[i].bg_inode_bitmap) {
+ sprintf(problem, "is the inode bitmap of group %d", i);
+ break;
+ }
+ if (block >= fs->group_desc[i].bg_inode_table &&
+ (block < fs->group_desc[i].bg_inode_table
+ + 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,
+ blk_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block,
+ int ref_offset,
+ void *priv_data)
+{
+ struct process_block_struct *p;
+ struct problem_context *pctx;
+ blk_t blk = *block_nr;
+ int ret_code = 0;
+ int 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) {
+ if (p->is_dir == 0) {
+ /*
+ * Should never happen, since only directories
+ * get called with BLOCK_FLAG_HOLE
+ */
+#if DEBUG_E2FSCK
+ printf("process_block() called with blk == 0, "
+ "blockcnt=%d, inode %lu???\n",
+ blockcnt, p->ino);
+#endif
+ return 0;
+ }
+ if (blockcnt < 0)
+ return 0;
+ if (blockcnt * fs->blocksize < p->inode->i_size) {
+#if 0
+ printf("Missing block (#%d) in directory inode %lu!\n",
+ blockcnt, p->ino);
+#endif
+ goto mark_dir;
+ }
+ 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)) {
+ if (p->previous_block+1 != blk)
+ p->fragmented = 1;
+ }
+ p->previous_block = blk;
+
+ if (blk < fs->super->s_first_data_block ||
+ blk >= fs->super->s_blocks_count)
+ 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;
+ }
+
+ mark_block_used(ctx, blk);
+ p->num_blocks++;
+ if (blockcnt >= 0)
+ p->last_block = blockcnt;
+mark_dir:
+ if (p->is_dir && (blockcnt >= 0)) {
+ pctx->errcode = ext2fs_add_dir_block(fs->dblist, p->ino,
+ blk, blockcnt);
+ if (pctx->errcode) {
+ pctx->blk = blk;
+ pctx->num = blockcnt;
+ fix_problem(ctx, PR_1_ADD_DBLOCK, pctx);
+ /* Should never get here */
+ ctx->flags |= E2F_FLAG_ABORT;
+ return BLOCK_ABORT;
+ }
+ }
+ return ret_code;
+}
+
+static void bad_block_indirect(e2fsck_t ctx, blk_t blk)
+{
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+ /*
+ * Prompt to see if we should continue or not.
+ */
+ if (!fix_problem(ctx, PR_1_BBINODE_BAD_METABLOCK, &pctx))
+ ctx->flags |= E2F_FLAG_ABORT;
+}
+
+static int process_bad_block(ext2_filsys fs,
+ blk_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block,
+ int ref_offset,
+ void *priv_data)
+{
+ struct process_block_struct *p;
+ blk_t blk = *block_nr;
+ int first_block;
+ int 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 >= fs->super->s_blocks_count)) {
+ 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_bitmap(ctx->block_found_map, blk)) {
+ bad_block_indirect(ctx, blk);
+ 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_bitmap(ctx->block_found_map, blk)) {
+ ext2fs_mark_block_bitmap(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 == fs->group_desc[i].bg_block_bitmap) {
+ if (fix_problem(ctx, PR_1_BB_BAD_BLOCK, pctx)) {
+ ctx->invalid_block_bitmap_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ return 0;
+ }
+ if (blk == fs->group_desc[i].bg_inode_bitmap) {
+ if (fix_problem(ctx, PR_1_IB_BAD_BLOCK, pctx)) {
+ ctx->invalid_inode_bitmap_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ return 0;
+ }
+ if ((blk >= fs->group_desc[i].bg_inode_table) &&
+ (blk < (fs->group_desc[i].bg_inode_table +
+ 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]) ||
+ p->inode->i_block[EXT2_DIND_BLOCK]) {
+ bad_block_indirect(ctx, blk);
+ 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, blk_t first_block, int group,
+ const char *name, int num, blk_t *new_block)
+{
+ ext2_filsys fs = ctx->fs;
+ blk_t old_block = *new_block;
+ int i;
+ char *buf;
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+
+ pctx.group = group;
+ pctx.blk = old_block;
+ pctx.str = name;
+
+ pctx.errcode = ext2fs_get_free_blocks(fs, first_block,
+ first_block + fs->super->s_blocks_per_group,
+ 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);
+ return;
+ }
+ pctx.errcode = ext2fs_get_mem(fs->blocksize, (void **) &buf);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1_RELOC_MEMORY_ALLOCATE, &pctx);
+ ext2fs_unmark_valid(fs);
+ return;
+ }
+ ext2fs_mark_super_dirty(fs);
+ 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_bitmap(ctx->block_found_map, (*new_block)+i);
+ if (old_block) {
+ pctx.errcode = io_channel_read_blk(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_blk(fs->io, pctx.blk,
+ 1, buf);
+ if (pctx.errcode)
+ fix_problem(ctx, PR_1_RELOC_WRITE_ERR, &pctx);
+ }
+ ext2fs_free_mem((void **) &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;
+ int i;
+ int first_block = fs->super->s_first_data_block;
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ if (ctx->invalid_block_bitmap_flag[i]) {
+ new_table_block(ctx, first_block, i, _("block bitmap"),
+ 1, &fs->group_desc[i].bg_block_bitmap);
+ }
+ if (ctx->invalid_inode_bitmap_flag[i]) {
+ new_table_block(ctx, first_block, i, _("inode bitmap"),
+ 1, &fs->group_desc[i].bg_inode_bitmap);
+ }
+ if (ctx->invalid_inode_table_flag[i]) {
+ new_table_block(ctx, first_block, i, _("inode table"),
+ fs->inode_blocks_per_group,
+ &fs->group_desc[i].bg_inode_table);
+ ctx->flags |= E2F_FLAG_RESTART;
+ }
+ first_block += fs->super->s_blocks_per_group;
+ }
+ 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;
+ blk_t block, b;
+ int i,j;
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+
+ block = fs->super->s_first_data_block;
+ for (i = 0; i < fs->group_desc_count; i++) {
+ pctx.group = i;
+
+ if (ext2fs_bg_has_super(fs, i)) {
+ /*
+ * Mark this group's copy of the superblock
+ */
+ ext2fs_mark_block_bitmap(ctx->block_found_map, block);
+
+ /*
+ * Mark this group's copy of the descriptors
+ */
+ for (j = 0; j < fs->desc_blocks; j++) {
+ ext2fs_mark_block_bitmap(ctx->block_found_map,
+ block + j + 1);
+ }
+ }
+
+ /*
+ * Mark the blocks used for the inode table
+ */
+ if (fs->group_desc[i].bg_inode_table) {
+ for (j = 0, b = fs->group_desc[i].bg_inode_table;
+ j < fs->inode_blocks_per_group;
+ j++, b++) {
+ if (ext2fs_test_block_bitmap(ctx->block_found_map,
+ b)) {
+ pctx.blk = b;
+ if (fix_problem(ctx,
+ PR_1_ITABLE_CONFLICT, &pctx)) {
+ ctx->invalid_inode_table_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ } else {
+ ext2fs_mark_block_bitmap(ctx->block_found_map,
+ b);
+ }
+ }
+ }
+
+ /*
+ * Mark block used for the block bitmap
+ */
+ if (fs->group_desc[i].bg_block_bitmap) {
+ if (ext2fs_test_block_bitmap(ctx->block_found_map,
+ fs->group_desc[i].bg_block_bitmap)) {
+ pctx.blk = fs->group_desc[i].bg_block_bitmap;
+ if (fix_problem(ctx, PR_1_BB_CONFLICT, &pctx)) {
+ ctx->invalid_block_bitmap_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ } else {
+ ext2fs_mark_block_bitmap(ctx->block_found_map,
+ fs->group_desc[i].bg_block_bitmap);
+ }
+
+ }
+ /*
+ * Mark block used for the inode bitmap
+ */
+ if (fs->group_desc[i].bg_inode_bitmap) {
+ if (ext2fs_test_block_bitmap(ctx->block_found_map,
+ fs->group_desc[i].bg_inode_bitmap)) {
+ pctx.blk = fs->group_desc[i].bg_inode_bitmap;
+ if (fix_problem(ctx, PR_1_IB_CONFLICT, &pctx)) {
+ ctx->invalid_inode_bitmap_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ } else {
+ ext2fs_mark_block_bitmap(ctx->block_found_map,
+ fs->group_desc[i].bg_inode_bitmap);
+ }
+ }
+ block += fs->super->s_blocks_per_group;
+ }
+}
+
+/*
+ * 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)
+ *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;
+}
+
+void e2fsck_use_inode_shortcuts(e2fsck_t ctx, int bool)
+{
+ ext2_filsys fs = ctx->fs;
+
+ if (bool) {
+ fs->get_blocks = pass1_get_blocks;
+ fs->check_directory = pass1_check_directory;
+ fs->read_inode = pass1_read_inode;
+ fs->write_inode = pass1_write_inode;
+ ctx->stashed_ino = 0;
+ } else {
+ fs->get_blocks = 0;
+ fs->check_directory = 0;
+ fs->read_inode = 0;
+ fs->write_inode = 0;
+ }
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass1b.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass1b.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass1b.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,763 @@
+/*
+ * 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
+
+#include <et/com_err.h>
+#include "e2fsck.h"
+
+#include "problem.h"
+
+/* Define an extension to the ext2 library's block count information */
+#define BLOCK_COUNT_EXTATTR (-5)
+
+/*
+ * This is structure is allocated for each time that a block is
+ * claimed by more than one file. So if a particular block is claimed
+ * by 3 files, then three copies of this structure will be allocated,
+ * one for each conflict.
+ *
+ * The linked list structure is as follows:
+ *
+ * dup_blk --> block #34 --> block #35 --> block #47
+ * inode #12 inode #14 inode #17
+ * num_bad = 3 num_bad = 2 num_bad = 2
+ * | | |
+ * V V V
+ * block #34 block #35 block #47
+ * inode #14 inode #15 inode #23
+ * |
+ * V
+ * block #34
+ * inode #15
+ *
+ * The num_bad field indicates how many inodes are sharing a
+ * particular block, and is only stored in the first element of the
+ * linked list for a particular block. As the block conflicts are
+ * resolved, num_bad is decremented; when it reaches 1, then we no
+ * longer need to worry about that block.
+ */
+struct dup_block {
+ blk_t block; /* Block number */
+ ext2_ino_t ino; /* Inode number */
+ int num_bad;
+ int flags;
+ /* Pointer to next dup record with different block */
+ struct dup_block *next_block;
+ /* Pointer to next dup record with different inode */
+ struct dup_block *next_inode;
+};
+
+#define FLAG_EXTATTR (1)
+
+/*
+ * 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 ino, dir;
+ int num_dupblocks;
+ struct ext2_inode inode;
+ struct dup_inode *next;
+};
+
+static int process_pass1b_block(ext2_filsys fs, blk_t *blocknr,
+ e2_blkcnt_t blockcnt, blk_t ref_blk,
+ int ref_offset, void *priv_data);
+static void delete_file(e2fsck_t ctx, struct dup_inode *dp,
+ char *block_buf);
+static int clone_file(e2fsck_t ctx, struct dup_inode *dp, char* block_buf);
+static int check_if_fs_block(e2fsck_t ctx, blk_t test_blk);
+
+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 struct dup_block *dup_blk = 0;
+static struct dup_inode *dup_ino = 0;
+static int dup_inode_count = 0;
+
+static ext2fs_inode_bitmap inode_dup_map;
+
+/*
+ * Main procedure for handling duplicate blocks
+ */
+void e2fsck_pass1_dupblocks(e2fsck_t ctx, char *block_buf)
+{
+ ext2_filsys fs = ctx->fs;
+ struct dup_block *p, *q, *next_p, *next_q;
+ struct dup_inode *r, *next_r;
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+
+ pctx.errcode = ext2fs_allocate_inode_bitmap(fs,
+ _("multiply claimed inode map"), &inode_dup_map);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1B_ALLOCATE_IBITMAP_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+
+ pass1b(ctx, block_buf);
+ pass1c(ctx, block_buf);
+ pass1d(ctx, block_buf);
+
+ /*
+ * Time to free all of the accumulated data structures that we
+ * don't need anymore.
+ */
+ ext2fs_free_inode_bitmap(inode_dup_map); inode_dup_map = 0;
+ ext2fs_free_block_bitmap(ctx->block_dup_map); ctx->block_dup_map = 0;
+ for (p = dup_blk; p; p = next_p) {
+ next_p = p->next_block;
+ for (q = p; q; q = next_q) {
+ next_q = q->next_inode;
+ ext2fs_free_mem((void **) &q);
+ }
+ }
+ for (r = dup_ino; r; r = next_r) {
+ next_r = r->next;
+ ext2fs_free_mem((void **) &r);
+ }
+}
+
+/*
+ * Scan the inodes looking for inodes that contain duplicate blocks.
+ */
+struct process_block_struct {
+ ext2_ino_t ino;
+ int dup_blocks;
+ e2fsck_t ctx;
+ struct problem_context *pctx;
+};
+
+static void pass1b(e2fsck_t ctx, char *block_buf)
+{
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+ ext2_inode_scan scan;
+ struct process_block_struct pb;
+ struct dup_inode *dp;
+ struct dup_block *q, *r;
+ struct problem_context pctx;
+ int i, ea_flag;
+
+ clear_problem_context(&pctx);
+
+ 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;
+ }
+ pctx.errcode = ext2fs_get_next_inode(scan, &ino, &inode);
+ 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 (ino) {
+ pctx.ino = ctx->stashed_ino = ino;
+ if ((ino != EXT2_BAD_INO) &&
+ (!ext2fs_test_inode_bitmap(ctx->inode_used_map, ino) ||
+ !ext2fs_inode_has_valid_blocks(&inode)))
+ goto next;
+
+ pb.ino = ino;
+ pb.dup_blocks = 0;
+ pctx.errcode = ext2fs_block_iterate2(fs, ino, 0, block_buf,
+ process_pass1b_block, &pb);
+ if (inode.i_file_acl)
+ process_pass1b_block(fs, &inode.i_file_acl,
+ BLOCK_COUNT_EXTATTR, 0, 0, &pb);
+ if (pb.dup_blocks) {
+ end_problem_latch(ctx, PR_LATCH_DBLOCK);
+ dp = (struct dup_inode *) e2fsck_allocate_memory(ctx,
+ sizeof(struct dup_inode),
+ "duplicate inode record");
+ dp->ino = ino;
+ dp->dir = 0;
+ dp->inode = inode;
+ dp->num_dupblocks = pb.dup_blocks;
+ dp->next = dup_ino;
+ dup_ino = dp;
+ if (ino != EXT2_BAD_INO)
+ dup_inode_count++;
+ }
+ if (pctx.errcode)
+ fix_problem(ctx, PR_1B_BLOCK_ITERATE, &pctx);
+ next:
+ pctx.errcode = ext2fs_get_next_inode(scan, &ino, &inode);
+ if (pctx.errcode == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE)
+ goto next;
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_1B_ISCAN_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ }
+ ext2fs_close_inode_scan(scan);
+ e2fsck_use_inode_shortcuts(ctx, 0);
+ /*
+ * Set the num_bad field
+ */
+ for (q = dup_blk; q; q = q->next_block) {
+ i = 0;
+ ea_flag = 0;
+ for (r = q; r; r = r->next_inode) {
+ if (r->flags & FLAG_EXTATTR) {
+ if (ea_flag++)
+ continue;
+ }
+ i++;
+ }
+ q->num_bad = i;
+ }
+}
+
+static int process_pass1b_block(ext2_filsys fs,
+ blk_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_blk,
+ int ref_offset,
+ void *priv_data)
+{
+ struct process_block_struct *p;
+ struct dup_block *dp, *q;
+ e2fsck_t ctx;
+
+ if (HOLE_BLKADDR(*block_nr))
+ return 0;
+ p = (struct process_block_struct *) priv_data;
+ ctx = p->ctx;
+
+ if (ext2fs_test_block_bitmap(ctx->block_dup_map, *block_nr)) {
+ /* 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_block_bitmap(ctx->block_dup_map, *block_nr);
+ ext2fs_mark_inode_bitmap(inode_dup_map, p->ino);
+ dp = (struct dup_block *) e2fsck_allocate_memory(ctx,
+ sizeof(struct dup_block),
+ "duplicate block record");
+ dp->block = *block_nr;
+ dp->ino = p->ino;
+ dp->num_bad = 0;
+ dp->flags = (blockcnt == BLOCK_COUNT_EXTATTR) ?
+ FLAG_EXTATTR : 0;
+ q = dup_blk;
+ while (q) {
+ if (q->block == *block_nr)
+ break;
+ q = q->next_block;
+ }
+ if (q) {
+ dp->next_inode = q->next_inode;
+ q->next_inode = dp;
+ } else {
+ dp->next_block = dup_blk;
+ dup_blk = dp;
+ }
+ }
+ 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, int blocksize,
+ char *buf, void *priv_data)
+{
+ struct search_dir_struct *sd;
+ struct dup_inode *p;
+
+ 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 || (entry < DIRENT_OTHER_FILE) ||
+ !ext2fs_test_inode_bitmap(inode_dup_map, dirent->inode))
+ return 0;
+
+ for (p = dup_ino; p; p = p->next) {
+ if ((p->ino >= sd->first_inode) &&
+ (p->ino == dirent->inode))
+ break;
+ }
+
+ if (!p || p->dir)
+ return 0;
+
+ 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 dup_inode *p;
+ int inodes_left = dup_inode_count;
+ struct search_dir_struct sd;
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+
+ fix_problem(ctx, PR_1C_PASS_HEADER, &pctx);
+
+ /*
+ * First check to see if any of the inodes with dup blocks is
+ * a special inode. (Note that the bad block inode isn't
+ * counted.)
+ */
+ for (p = dup_ino; p; p = p->next) {
+ if ((p->ino < EXT2_FIRST_INODE(fs->super)) &&
+ (p->ino != EXT2_BAD_INO))
+ inodes_left--;
+ }
+
+ /*
+ * Search through all directories to translate inodes to names
+ * (by searching for the containing directory for that inode.)
+ */
+ sd.count = inodes_left;
+ 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, *s;
+ struct dup_block *q, *r;
+ ext2_ino_t *shared;
+ int shared_len;
+ int i;
+ int file_ok;
+ int meta_data = 0;
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+
+ fix_problem(ctx, PR_1D_PASS_HEADER, &pctx);
+ e2fsck_read_bitmaps(ctx);
+
+ pctx.num = dup_inode_count;
+ fix_problem(ctx, PR_1D_NUM_DUP_INODES, &pctx);
+ shared = (ext2_ino_t *) e2fsck_allocate_memory(ctx,
+ sizeof(ext2_ino_t) * dup_inode_count,
+ "Shared inode list");
+ for (p = dup_ino; p; p = p->next) {
+ shared_len = 0;
+ file_ok = 1;
+ if (p->ino == EXT2_BAD_INO)
+ continue;
+
+ /*
+ * Search through the duplicate records to see which
+ * inodes share blocks with this one
+ */
+ for (q = dup_blk; q; q = q->next_block) {
+ /*
+ * See if this block is used by this inode.
+ * If it isn't, continue.
+ */
+ for (r = q; r; r = r->next_inode)
+ if (r->ino == p->ino)
+ break;
+ if (!r)
+ continue;
+ if (q->num_bad > 1)
+ file_ok = 0;
+ if (check_if_fs_block(ctx, q->block)) {
+ 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; r; r = r->next_inode) {
+ if (r->ino == p->ino)
+ continue;
+ for (i = 0; i < shared_len; i++)
+ if (shared[i] == r->ino)
+ break;
+ if (i == shared_len) {
+ shared[shared_len++] = r->ino;
+ }
+ }
+ }
+
+ /*
+ * Report the inode that we are working on
+ */
+ pctx.inode = &p->inode;
+ pctx.ino = p->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++) {
+ for (s = dup_ino; s; s = s->next)
+ if (s->ino == shared[i])
+ break;
+ if (!s)
+ continue;
+ /*
+ * Report the inode that we are sharing with
+ */
+ pctx.inode = &s->inode;
+ pctx.ino = s->ino;
+ pctx.dir = s->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, 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, p, block_buf);
+ else
+ ext2fs_unmark_valid(fs);
+ }
+ ext2fs_free_mem((void **) &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, struct dup_block *p)
+{
+ p->num_bad--;
+ if (p->num_bad <= 0 ||
+ (p->num_bad == 1 && !check_if_fs_block(ctx, p->block)))
+ ext2fs_unmark_block_bitmap(ctx->block_dup_map, p->block);
+}
+
+static int delete_file_block(ext2_filsys fs,
+ blk_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block,
+ int ref_offset,
+ void *priv_data)
+{
+ struct process_block_struct *pb;
+ struct dup_block *p;
+ e2fsck_t ctx;
+
+ pb = (struct process_block_struct *) priv_data;
+ ctx = pb->ctx;
+
+ if (HOLE_BLKADDR(*block_nr))
+ return 0;
+
+ if (ext2fs_test_block_bitmap(ctx->block_dup_map, *block_nr)) {
+ for (p = dup_blk; p; p = p->next_block)
+ if (p->block == *block_nr)
+ break;
+ if (p) {
+ decrement_badcount(ctx, p);
+ } else
+ com_err("delete_file_block", 0,
+ _("internal error; can't find dup_blk for %d\n"),
+ *block_nr);
+ } else {
+ ext2fs_unmark_block_bitmap(ctx->block_found_map, *block_nr);
+ ext2fs_unmark_block_bitmap(fs->block_map, *block_nr);
+ }
+
+ return 0;
+}
+
+static void delete_file(e2fsck_t ctx, struct dup_inode *dp, char* block_buf)
+{
+ ext2_filsys fs = ctx->fs;
+ struct process_block_struct pb;
+ struct ext2_inode inode;
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+ pctx.ino = pb.ino = dp->ino;
+ pb.dup_blocks = dp->num_dupblocks;
+ pb.ctx = ctx;
+ pctx.str = "delete_file";
+
+ pctx.errcode = ext2fs_block_iterate2(fs, dp->ino, 0, block_buf,
+ delete_file_block, &pb);
+ if (pctx.errcode)
+ fix_problem(ctx, PR_1B_BLOCK_ITERATE, &pctx);
+ ext2fs_unmark_inode_bitmap(ctx->inode_used_map, dp->ino);
+ ext2fs_unmark_inode_bitmap(ctx->inode_dir_map, dp->ino);
+ if (ctx->inode_bad_map)
+ ext2fs_unmark_inode_bitmap(ctx->inode_bad_map, dp->ino);
+ ext2fs_unmark_inode_bitmap(fs->inode_map, dp->ino);
+ ext2fs_mark_ib_dirty(fs);
+ ext2fs_mark_bb_dirty(fs);
+ e2fsck_read_inode(ctx, dp->ino, &inode, "delete_file");
+ inode.i_links_count = 0;
+ inode.i_dtime = time(0);
+ if (inode.i_file_acl)
+ delete_file_block(fs, &inode.i_file_acl,
+ BLOCK_COUNT_EXTATTR, 0, 0, &pb);
+ e2fsck_write_inode(ctx, dp->ino, &inode, "delete_file");
+}
+
+struct clone_struct {
+ errcode_t errcode;
+ ext2_ino_t dir;
+ char *buf;
+ e2fsck_t ctx;
+};
+
+static int clone_file_block(ext2_filsys fs,
+ blk_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block,
+ int ref_offset,
+ void *priv_data)
+{
+ struct dup_block *p;
+ blk_t new_block;
+ errcode_t retval;
+ struct clone_struct *cs = (struct clone_struct *) priv_data;
+ e2fsck_t ctx;
+
+ ctx = cs->ctx;
+
+ if (HOLE_BLKADDR(*block_nr))
+ return 0;
+
+ if (ext2fs_test_block_bitmap(ctx->block_dup_map, *block_nr)) {
+ for (p = dup_blk; p; p = p->next_block)
+ if (p->block == *block_nr)
+ break;
+ if (p) {
+ retval = ext2fs_new_block(fs, 0, ctx->block_found_map,
+ &new_block);
+ if (retval) {
+ cs->errcode = retval;
+ return BLOCK_ABORT;
+ }
+ if (cs->dir && (blockcnt >= 0)) {
+ retval = ext2fs_set_dir_block(fs->dblist,
+ cs->dir, new_block, blockcnt);
+ if (retval) {
+ cs->errcode = retval;
+ return BLOCK_ABORT;
+ }
+ }
+#if 0
+ printf("Cloning block %u to %u\n", *block_nr,
+ new_block);
+#endif
+ retval = io_channel_read_blk(fs->io, *block_nr, 1,
+ cs->buf);
+ if (retval) {
+ cs->errcode = retval;
+ return BLOCK_ABORT;
+ }
+ retval = io_channel_write_blk(fs->io, new_block, 1,
+ cs->buf);
+ if (retval) {
+ cs->errcode = retval;
+ return BLOCK_ABORT;
+ }
+ decrement_badcount(ctx, p);
+ *block_nr = new_block;
+ ext2fs_mark_block_bitmap(ctx->block_found_map,
+ new_block);
+ ext2fs_mark_block_bitmap(fs->block_map, new_block);
+ return BLOCK_CHANGED;
+ } else
+ com_err("clone_file_block", 0,
+ _("internal error; can't find dup_blk for %d\n"),
+ *block_nr);
+ }
+ return 0;
+}
+
+static int clone_file(e2fsck_t ctx, struct dup_inode *dp, char* block_buf)
+{
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+ struct clone_struct cs;
+ struct problem_context pctx;
+ blk_t blk;
+
+ clear_problem_context(&pctx);
+ cs.errcode = 0;
+ cs.dir = 0;
+ cs.ctx = ctx;
+ retval = ext2fs_get_mem(fs->blocksize, (void **) &cs.buf);
+ if (retval)
+ return retval;
+
+ if (ext2fs_test_inode_bitmap(ctx->inode_dir_map, dp->ino))
+ cs.dir = dp->ino;
+
+ pctx.ino = dp->ino;
+ pctx.str = "clone_file";
+ pctx.errcode = ext2fs_block_iterate2(fs, dp->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,
+ _("returned from clone_file_block"));
+ retval = cs.errcode;
+ goto errout;
+ }
+ blk = dp->inode.i_file_acl;
+ if (blk && (clone_file_block(fs, &dp->inode.i_file_acl,
+ BLOCK_COUNT_EXTATTR, 0, 0, &cs) ==
+ BLOCK_CHANGED)) {
+ struct dup_block *p, *q;
+ struct dup_inode *r;
+
+ /*
+ * 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.
+ */
+ for (p = dup_blk; p; p = p->next_block) {
+ if (p->block == blk)
+ break;
+ }
+ for (q = p; q ; q = q->next_inode) {
+ if (!(q->flags & FLAG_EXTATTR))
+ continue;
+ for (r = dup_ino; r; r = r->next)
+ if (r->ino == q->ino)
+ break;
+ if (r) {
+ r->inode.i_file_acl = dp->inode.i_file_acl;
+ e2fsck_write_inode(ctx, q->ino, &r->inode,
+ "clone file EA");
+ }
+ q->ino = 0; /* Should free the structure... */
+ decrement_badcount(ctx, p);
+ }
+ }
+ retval = 0;
+errout:
+ ext2fs_free_mem((void **) &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, blk_t test_block)
+{
+ ext2_filsys fs = ctx->fs;
+ blk_t block;
+ int i;
+
+ block = fs->super->s_first_data_block;
+ for (i = 0; i < fs->group_desc_count; i++) {
+
+ /* Check superblocks/block group descriptros */
+ if (ext2fs_bg_has_super(fs, i)) {
+ if (test_block >= block &&
+ (test_block <= block + fs->desc_blocks))
+ return 1;
+ }
+
+ /* Check the inode table */
+ if ((fs->group_desc[i].bg_inode_table) &&
+ (test_block >= fs->group_desc[i].bg_inode_table) &&
+ (test_block < (fs->group_desc[i].bg_inode_table +
+ fs->inode_blocks_per_group)))
+ return 1;
+
+ /* Check the bitmap blocks */
+ if ((test_block == fs->group_desc[i].bg_block_bitmap) ||
+ (test_block == fs->group_desc[i].bg_inode_bitmap))
+ return 1;
+
+ block += fs->super->s_blocks_per_group;
+ }
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass2.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass2.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass2.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,913 @@
+/*
+ * 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
+ */
+
+#include "e2fsck.h"
+#include "problem.h"
+
+#ifdef NO_INLINE_FUNCS
+#define _INLINE_
+#else
+#define _INLINE_ inline
+#endif
+
+/*
+ * 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_entry *dir_blocks_info,
+ void *priv_data);
+static int allocate_dir_block(e2fsck_t ctx,
+ struct ext2_db_entry *dir_blocks_info,
+ char *buf, struct problem_context *pctx);
+static int update_dir_block(ext2_filsys fs,
+ blk_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block,
+ int ref_offset,
+ void *priv_data);
+
+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 dir_info *dir;
+ struct check_dir_struct cd;
+
+#ifdef RESOURCE_TRACK
+ init_resource_track(&rtrack);
+#endif
+
+ 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);
+
+ cd.pctx.errcode = ext2fs_create_icount2(fs, EXT2_ICOUNT_OPT_INCREMENT,
+ 0, ctx->inode_link_info,
+ &ctx->inode_count);
+ if (cd.pctx.errcode) {
+ fix_problem(ctx, PR_2_ALLOCATE_ICOUNT, &cd.pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ buf = (char *) e2fsck_allocate_memory(ctx, 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.)
+ */
+ dir = e2fsck_get_dir_info(ctx, EXT2_ROOT_INO);
+ if (dir)
+ dir->parent = EXT2_ROOT_INO;
+
+ cd.buf = buf;
+ cd.ctx = ctx;
+ cd.count = 1;
+ cd.max = ext2fs_dblist_count(fs->dblist);
+
+ if (ctx->progress)
+ (void) (ctx->progress)(ctx, 2, 0, cd.max);
+
+ cd.pctx.errcode = ext2fs_dblist_iterate(fs->dblist, check_dir_block,
+ &cd);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ return;
+ if (cd.pctx.errcode) {
+ fix_problem(ctx, PR_2_DBLIST_ITERATE, &cd.pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+
+ ext2fs_free_mem((void **) &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;
+ }
+
+ 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;
+ 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);
+ }
+ } else if (!ctx->large_files &&
+ (sb->s_feature_ro_compat &
+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE)) {
+ if (fs->flags & EXT2_FLAG_RW) {
+ sb->s_feature_ro_compat &=
+ ~EXT2_FEATURE_RO_COMPAT_LARGE_FILE;
+ ext2fs_mark_super_dirty(fs);
+ }
+ }
+
+#ifdef RESOURCE_TRACK
+ if (ctx->options & E2F_OPT_TIME2) {
+ e2fsck_clear_progbar(ctx);
+ print_resource_track("Pass 2", &rtrack);
+ }
+#endif
+}
+
+/*
+ * 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;
+ int status = 0;
+ int created = 0;
+ int new_len;
+ int 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;
+
+ if (problem) {
+ if (fix_problem(ctx, problem, pctx)) {
+ if (dirent->rec_len < 12)
+ 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 (dirent->rec_len > 12) {
+ new_len = dirent->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;
+ nextdir->rec_len = new_len;
+ 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,
+ struct dir_info *dir, struct problem_context *pctx)
+{
+ int problem = 0;
+
+ 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;
+
+ if (problem) {
+ if (fix_problem(ctx, problem, pctx)) {
+ if (dirent->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;
+ }
+ dir->dotdot = dirent->inode;
+ 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,
+ ext2_ino_t dir_ino, 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, 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_bitmap(ctx->inode_dir_map, dirent->inode)) {
+ should_be = EXT2_FT_DIR;
+ } else if (ext2fs_test_inode_bitmap(ctx->inode_reg_map,
+ dirent->inode)) {
+ should_be = EXT2_FT_REG_FILE;
+ } else if (ctx->inode_bad_map &&
+ ext2fs_test_inode_bitmap(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;
+}
+
+
+static int check_dir_block(ext2_filsys fs,
+ struct ext2_db_entry *db,
+ void *priv_data)
+{
+ struct dir_info *subdir, *dir;
+ struct ext2_dir_entry *dirent;
+ int offset = 0;
+ int dir_modified = 0;
+ int dot_state;
+ blk_t block_nr = db->blk;
+ ext2_ino_t ino = db->ino;
+ __u16 links;
+ struct check_dir_struct *cd;
+ char *buf;
+ e2fsck_t ctx;
+ int problem;
+
+ cd = (struct check_dir_struct *) priv_data;
+ buf = cd->buf;
+ ctx = cd->ctx;
+
+ if (ctx->progress)
+ if ((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_bitmap(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 0
+ printf("In process_dir_block block %lu, #%d, inode %lu\n", block_nr,
+ db->blockcnt, ino);
+#endif
+
+ cd->pctx.errcode = ext2fs_read_dir_block(fs, block_nr, buf);
+ 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);
+ }
+
+ do {
+ dot_state++;
+ problem = 0;
+ dirent = (struct ext2_dir_entry *) (buf + offset);
+ cd->pctx.dirent = dirent;
+ cd->pctx.num = offset;
+ if (((offset + dirent->rec_len) > fs->blocksize) ||
+ (dirent->rec_len < 12) ||
+ ((dirent->rec_len % 4) != 0) ||
+ (((dirent->name_len & 0xFF)+8) > dirent->rec_len)) {
+ if (fix_problem(ctx, PR_2_DIR_CORRUPTED, &cd->pctx)) {
+ dirent->rec_len = fs->blocksize - offset;
+ dirent->name_len = 0;
+ dirent->inode = 0;
+ dir_modified++;
+ } else
+ return DIRENT_ABORT;
+ }
+ 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++;
+ }
+ }
+
+ if (dot_state == 1) {
+ if (check_dot(ctx, dirent, ino, &cd->pctx))
+ dir_modified++;
+ } else if (dot_state == 2) {
+ dir = e2fsck_get_dir_info(ctx, ino);
+ if (!dir) {
+ fix_problem(ctx, PR_2_NO_DIRINFO, &cd->pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return DIRENT_ABORT;
+ }
+ if (check_dotdot(ctx, dirent, dir, &cd->pctx))
+ 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 (!(ext2fs_test_inode_bitmap(ctx->inode_used_map,
+ dirent->inode))) {
+ /*
+ * If the inode is unused, offer to clear it.
+ */
+ problem = PR_2_UNUSED_INODE;
+ } else if (ctx->inode_bb_map &&
+ (ext2fs_test_inode_bitmap(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 > 2) &&
+ ((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 > 2) &&
+ ((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 > 2) &&
+ (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 > 2) &&
+ (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_bitmap(ctx->inode_bad_map,
+ dirent->inode)) {
+ if (e2fsck_process_bad_inode(ctx, ino,
+ dirent->inode)) {
+ dirent->inode = 0;
+ dir_modified++;
+ goto next;
+ }
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ return DIRENT_ABORT;
+ }
+
+ if (check_name(ctx, dirent, ino, &cd->pctx))
+ dir_modified++;
+
+ if (check_filetype(ctx, dirent, ino, &cd->pctx))
+ dir_modified++;
+
+ /*
+ * 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 > 2) &&
+ (ext2fs_test_inode_bitmap(ctx->inode_dir_map,
+ dirent->inode))) {
+ subdir = e2fsck_get_dir_info(ctx, dirent->inode);
+ if (!subdir) {
+ cd->pctx.ino = dirent->inode;
+ fix_problem(ctx, PR_2_NO_DIRINFO, &cd->pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return DIRENT_ABORT;
+ }
+ 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
+ subdir->parent = ino;
+ }
+
+ ext2fs_icount_increment(ctx->inode_count, dirent->inode,
+ &links);
+ if (links > 1)
+ ctx->fs_links_count++;
+ ctx->fs_total_count++;
+ next:
+ offset += dirent->rec_len;
+ } while (offset < fs->blocksize);
+#if 0
+ printf("\n");
+#endif
+ if (offset != fs->blocksize) {
+ cd->pctx.num = dirent->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_block(fs, block_nr, buf);
+ if (cd->pctx.errcode) {
+ if (!fix_problem(ctx, PR_2_WRITE_DIRBLOCK,
+ &cd->pctx)) {
+ ctx->flags |= E2F_FLAG_ABORT;
+ return DIRENT_ABORT;
+ }
+ }
+ ext2fs_mark_changed(fs);
+ }
+ return 0;
+}
+
+/*
+ * 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,
+ blk_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block,
+ int ref_offset,
+ void *priv_data)
+{
+ e2fsck_t ctx = (e2fsck_t) priv_data;
+
+ if (HOLE_BLKADDR(*block_nr))
+ return 0;
+ ext2fs_unmark_block_bitmap(ctx->block_found_map, *block_nr);
+ ext2fs_unmark_block_bitmap(fs->block_map, *block_nr);
+ 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;
+
+ ext2fs_icount_store(ctx->inode_link_info, ino, 0);
+ e2fsck_read_inode(ctx, ino, &inode, "deallocate_inode");
+ inode.i_links_count = 0;
+ inode.i_dtime = time(0);
+ e2fsck_write_inode(ctx, ino, &inode, "deallocate_inode");
+ clear_problem_context(&pctx);
+ pctx.ino = ino;
+
+ /*
+ * Fix up the bitmaps...
+ */
+ e2fsck_read_bitmaps(ctx);
+ ext2fs_unmark_inode_bitmap(ctx->inode_used_map, ino);
+ ext2fs_unmark_inode_bitmap(ctx->inode_dir_map, ino);
+ if (ctx->inode_bad_map)
+ ext2fs_unmark_inode_bitmap(ctx->inode_bad_map, ino);
+ ext2fs_unmark_inode_bitmap(fs->inode_map, ino);
+ ext2fs_mark_ib_dirty(fs);
+
+ if (!ext2fs_inode_has_valid_blocks(&inode))
+ return;
+
+ if (!LINUX_S_ISDIR(inode.i_mode) &&
+ (inode.i_size_high || inode.i_size & 0x80000000UL))
+ ctx->large_files--;
+
+ if (inode.i_file_acl) {
+ ext2fs_unmark_block_bitmap(ctx->block_found_map,
+ inode.i_file_acl);
+ ext2fs_unmark_block_bitmap(fs->block_map, inode.i_file_acl);
+ }
+
+ ext2fs_mark_bb_dirty(fs);
+ pctx.errcode = ext2fs_block_iterate2(fs, ino, 0, block_buf,
+ deallocate_inode_block, ctx);
+ if (pctx.errcode) {
+ fix_problem(ctx, PR_2_DEALLOC_INODE, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+}
+
+extern int e2fsck_process_bad_inode(e2fsck_t ctx, ext2_ino_t dir,
+ ext2_ino_t ino)
+{
+ ext2_filsys fs = ctx->fs;
+ struct ext2_inode inode;
+ int inode_modified = 0;
+ unsigned char *frag, *fsize;
+ struct problem_context pctx;
+ int 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 (!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(&inode))
+ problem = PR_2_BAD_CHAR_DEV;
+ else if (LINUX_S_ISBLK(inode.i_mode)
+ && !e2fsck_pass1_check_device_inode(&inode))
+ problem = PR_2_BAD_BLOCK_DEV;
+ else if (LINUX_S_ISFIFO(inode.i_mode)
+ && !e2fsck_pass1_check_device_inode(&inode))
+ problem = PR_2_BAD_FIFO;
+ else if (LINUX_S_ISSOCK(inode.i_mode)
+ && !e2fsck_pass1_check_device_inode(&inode))
+ problem = PR_2_BAD_SOCKET;
+ else if (LINUX_S_ISLNK(inode.i_mode)
+ && !e2fsck_pass1_check_symlink(fs, &inode)) {
+ problem = PR_2_SYMLINK_SIZE;
+ }
+
+ if (problem) {
+ if (fix_problem(ctx, problem, &pctx)) {
+ deallocate_inode(ctx, ino, 0);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ return 0;
+ return 1;
+ }
+ problem = 0;
+ }
+
+ if (inode.i_faddr &&
+ fix_problem(ctx, PR_2_FADDR_ZERO, &pctx)) {
+ inode.i_faddr = 0;
+ inode_modified++;
+ }
+
+ switch (fs->super->s_creator_os) {
+ case EXT2_OS_LINUX:
+ frag = &inode.osd2.linux2.l_i_frag;
+ fsize = &inode.osd2.linux2.l_i_fsize;
+ break;
+ case EXT2_OS_HURD:
+ frag = &inode.osd2.hurd2.h_i_frag;
+ fsize = &inode.osd2.hurd2.h_i_fsize;
+ break;
+ case EXT2_OS_MASIX:
+ frag = &inode.osd2.masix2.m_i_frag;
+ fsize = &inode.osd2.masix2.m_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++;
+ }
+ pctx.num = 0;
+ }
+ if (fsize && *fsize) {
+ pctx.num = *fsize;
+ if (fix_problem(ctx, PR_2_FSIZE_ZERO, &pctx)) {
+ *fsize = 0;
+ inode_modified++;
+ }
+ pctx.num = 0;
+ }
+
+ if (inode.i_file_acl &&
+ !(fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_EXT_ATTR) &&
+ fix_problem(ctx, PR_2_FILE_ACL_ZERO, &pctx)) {
+ inode.i_file_acl = 0;
+ inode_modified++;
+ }
+ if (inode.i_file_acl &&
+ ((inode.i_file_acl < fs->super->s_first_data_block) ||
+ (inode.i_file_acl >= fs->super->s_blocks_count)) &&
+ fix_problem(ctx, PR_2_FILE_ACL_BAD, &pctx)) {
+ inode.i_file_acl = 0;
+ inode_modified++;
+ }
+ if (inode.i_dir_acl &&
+ LINUX_S_ISDIR(inode.i_mode) &&
+ fix_problem(ctx, PR_2_DIR_ACL_ZERO, &pctx)) {
+ inode.i_dir_acl = 0;
+ inode_modified++;
+ }
+ if (inode_modified)
+ e2fsck_write_inode(ctx, ino, &inode, "process_bad_inode");
+ 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_entry *db,
+ char *buf, struct problem_context *pctx)
+{
+ ext2_filsys fs = ctx->fs;
+ blk_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_block(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_bitmap(ctx->block_found_map, blk);
+ ext2fs_mark_block_bitmap(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_block(fs, blk, block);
+ ext2fs_free_mem((void **) &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");
+ inode.i_blocks += fs->blocksize / 512;
+ 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_block_iterate2(fs, db->ino, BLOCK_FLAG_HOLE,
+ 0, update_dir_block, db);
+ if (pctx->errcode) {
+ pctx->str = "ext2fs_block_iterate";
+ fix_problem(ctx, PR_2_ALLOC_DIRBOCK, pctx);
+ return 1;
+ }
+
+ return 0;
+}
+
+/*
+ * This is a helper function for allocate_dir_block().
+ */
+static int update_dir_block(ext2_filsys fs,
+ blk_t *block_nr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block,
+ int ref_offset,
+ void *priv_data)
+{
+ struct ext2_db_entry *db;
+
+ db = (struct ext2_db_entry *) priv_data;
+ if (db->blockcnt == (int) blockcnt) {
+ *block_nr = db->blk;
+ return BLOCK_CHANGED;
+ }
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass3.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass3.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass3.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,787 @@
+/*
+ * 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, struct dir_info *dir,
+ struct problem_context *pctx);
+static ext2_ino_t get_lost_and_found(e2fsck_t ctx);
+static void fix_dotdot(e2fsck_t ctx, struct dir_info *dir, ext2_ino_t parent);
+static errcode_t adjust_inode_count(e2fsck_t ctx, ext2_ino_t ino, int adj);
+static errcode_t expand_directory(e2fsck_t ctx, ext2_ino_t dir);
+
+static ext2_ino_t lost_and_found = 0;
+static int bad_lost_and_found = 0;
+
+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;
+ int i;
+#ifdef RESOURCE_TRACK
+ struct resource_track rtrack;
+#endif
+ struct problem_context pctx;
+ struct dir_info *dir;
+ unsigned long maxdirs, count;
+
+#ifdef RESOURCE_TRACK
+ init_resource_track(&rtrack);
+#endif
+
+ 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 = ext2fs_allocate_inode_bitmap(fs, _("inode done bitmap"),
+ &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;
+ }
+#ifdef RESOURCE_TRACK
+ if (ctx->options & E2F_OPT_TIME) {
+ e2fsck_clear_progbar(ctx);
+ print_resource_track(_("Peak memory"), &ctx->global_rtrack);
+ }
+#endif
+
+ check_root(ctx);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ goto abort_exit;
+
+ ext2fs_mark_inode_bitmap(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;
+
+ for (i=0; (dir = e2fsck_dir_info_iter(ctx, &i)) != 0;) {
+ if (ctx->progress)
+ if ((ctx->progress)(ctx, 3, count++, maxdirs))
+ goto abort_exit;
+ if (ext2fs_test_inode_bitmap(ctx->inode_dir_map, dir->ino))
+ if (check_directory(ctx, dir, &pctx))
+ goto abort_exit;
+ }
+
+ /*
+ * Force the creation of /lost+found if not present
+ */
+ if ((ctx->flags & E2F_OPT_READONLY) == 0)
+ get_lost_and_found(ctx);
+
+abort_exit:
+ 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;
+ }
+#ifdef RESOURCE_TRACK
+ if (ctx->options & E2F_OPT_TIME2) {
+ e2fsck_clear_progbar(ctx);
+ print_resource_track(_("Pass 3"), &rtrack);
+ }
+#endif
+}
+
+/*
+ * 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;
+ blk_t blk;
+ struct ext2_inode inode;
+ char * block;
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+
+ if (ext2fs_test_inode_bitmap(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_bitmap(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_block(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_bitmap(ctx->block_found_map, blk);
+ ext2fs_mark_block_bitmap(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_block(fs, blk, block);
+ if (pctx.errcode) {
+ pctx.str = "ext2fs_write_dir_block";
+ fix_problem(ctx, PR_3_CREATE_ROOT_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ ext2fs_free_mem((void **) &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 = time(0);
+ inode.i_links_count = 2;
+ inode.i_blocks = fs->blocksize / 512;
+ inode.i_block[0] = blk;
+
+ /*
+ * Write out the inode.
+ */
+ pctx.errcode = ext2fs_write_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_bitmap(ctx->inode_used_map, EXT2_ROOT_INO);
+ ext2fs_mark_inode_bitmap(ctx->inode_dir_map, EXT2_ROOT_INO);
+ ext2fs_mark_inode_bitmap(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, struct dir_info *dir,
+ struct problem_context *pctx)
+{
+ ext2_filsys fs = ctx->fs;
+ struct dir_info *p = dir;
+ int loop_pass = 0, parent_count = 0;
+
+ if (!p)
+ return 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_bitmap(inode_done_map, p->ino))
+ break;
+
+ /*
+ * 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 (!p->parent ||
+ (loop_pass &&
+ (ext2fs_test_inode_bitmap(inode_loop_detect,
+ p->parent)))) {
+ pctx->ino = p->ino;
+ if (fix_problem(ctx, PR_3_UNCONNECTED_DIR, pctx)) {
+ if (e2fsck_reconnect_file(ctx, p->ino))
+ ext2fs_unmark_valid(fs);
+ else {
+ p->parent = lost_and_found;
+ fix_dotdot(ctx, p, lost_and_found);
+ }
+ }
+ break;
+ }
+ p = e2fsck_get_dir_info(ctx, p->parent);
+ if (!p) {
+ fix_problem(ctx, PR_3_NO_DIRINFO, pctx);
+ return 0;
+ }
+ if (loop_pass) {
+ ext2fs_mark_inode_bitmap(inode_loop_detect,
+ p->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 = ext2fs_allocate_inode_bitmap(fs, _("inode loop detection bitmap"), &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;
+ }
+ }
+ p = dir;
+ }
+ }
+
+ /*
+ * Make sure that .. and the parent directory are the same;
+ * offer to fix it if not.
+ */
+ if (dir->parent != dir->dotdot) {
+ pctx->ino = dir->ino;
+ pctx->ino2 = dir->dotdot;
+ pctx->dir = dir->parent;
+ if (fix_problem(ctx, PR_3_BAD_DOT_DOT, pctx))
+ fix_dotdot(ctx, dir, dir->parent);
+ }
+ return 0;
+}
+
+/*
+ * This routine gets the lost_and_found inode, making it a directory
+ * if necessary
+ */
+static ext2_ino_t get_lost_and_found(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t ino;
+ blk_t blk;
+ errcode_t retval;
+ struct ext2_inode inode;
+ char * block;
+ static const char name[] = "lost+found";
+ struct problem_context pctx;
+ struct dir_info *dirinfo;
+
+ clear_problem_context(&pctx);
+
+ retval = ext2fs_lookup(fs, EXT2_ROOT_INO, name,
+ sizeof(name)-1, 0, &ino);
+ if (!retval) {
+ if (ext2fs_test_inode_bitmap(ctx->inode_dir_map, ino))
+ return ino;
+ /* Lost+found isn't a directory! */
+ 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;
+ }
+ dirinfo = e2fsck_get_dir_info(ctx, ino);
+ if (dirinfo)
+ dirinfo->parent = 0;
+ 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_block(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_bitmap(ctx->block_found_map, blk);
+ ext2fs_mark_block_bitmap(fs->block_map, blk);
+ ext2fs_mark_bb_dirty(fs);
+
+ /*
+ * Next find a free inode.
+ */
+ retval = ext2fs_new_inode(fs, EXT2_ROOT_INO, 040755,
+ 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_bitmap(ctx->inode_used_map, ino);
+ ext2fs_mark_inode_bitmap(ctx->inode_dir_map, ino);
+ ext2fs_mark_inode_bitmap(fs->inode_map, ino);
+ ext2fs_mark_ib_dirty(fs);
+
+ /*
+ * 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_block(fs, blk, block);
+ ext2fs_free_mem((void **) &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 = 040755;
+ inode.i_size = fs->blocksize;
+ inode.i_atime = inode.i_ctime = inode.i_mtime = time(0);
+ inode.i_links_count = 2;
+ inode.i_blocks = fs->blocksize / 512;
+ inode.i_block[0] = blk;
+
+ /*
+ * Next, write out the inode.
+ */
+ pctx.errcode = ext2fs_write_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);
+ 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);
+#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 (!bad_lost_and_found && !lost_and_found) {
+ lost_and_found = get_lost_and_found(ctx);
+ if (!lost_and_found)
+ bad_lost_and_found++;
+ }
+ if (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, 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 = expand_directory(ctx, lost_and_found);
+ if (retval) {
+ pctx.errcode = retval;
+ fix_problem(ctx, PR_3_CANT_EXPAND_LPF, &pctx);
+ return 1;
+ }
+ retval = ext2fs_link(fs, lost_and_found, name, ino, file_type);
+ }
+ if (retval) {
+ pctx.errcode = retval;
+ fix_problem(ctx, PR_3_CANT_RECONNECT, &pctx);
+ return 1;
+ }
+ adjust_inode_count(ctx, ino, 1);
+
+ return 0;
+}
+
+/*
+ * Utility routine to adjust the inode counts on an inode.
+ */
+static errcode_t 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--;
+ } else {
+ /* Should never happen */
+ fatal_error(ctx, _("Debug error in e2fsck adjust_inode_count, "
+ "should never happen.\n"));
+ }
+
+ 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,
+ int blocksize,
+ char *buf,
+ 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 = adjust_inode_count(fp->ctx, dirent->inode, -1);
+ if (retval) {
+ pctx.errcode = retval;
+ fix_problem(fp->ctx, PR_3_ADJUST_INODE, &pctx);
+ }
+ retval = 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;
+
+ fp->done++;
+ return DIRENT_ABORT | DIRENT_CHANGED;
+}
+
+static void fix_dotdot(e2fsck_t ctx, struct dir_info *dir, 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", dir->ino, parent);
+#endif
+
+ retval = ext2fs_dir_iterate(fs, dir->ino, DIRENT_FLAG_INCLUDE_EMPTY,
+ 0, fix_dotdot_proc, &fp);
+ if (retval || !fp.done) {
+ clear_problem_context(&pctx);
+ pctx.ino = dir->ino;
+ pctx.errcode = retval;
+ fix_problem(ctx, retval ? PR_3_FIX_PARENT_ERR :
+ PR_3_FIX_PARENT_NOFIND, &pctx);
+ ext2fs_unmark_valid(fs);
+ }
+ dir->dotdot = parent;
+
+ return;
+}
+
+/*
+ * These routines are responsible for expanding a /lost+found if it is
+ * too small.
+ */
+
+struct expand_dir_struct {
+ int done;
+ int newblocks;
+ errcode_t err;
+ e2fsck_t ctx;
+};
+
+static int expand_dir_proc(ext2_filsys fs,
+ blk_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block,
+ int ref_offset,
+ void *priv_data)
+{
+ struct expand_dir_struct *es = (struct expand_dir_struct *) priv_data;
+ blk_t new_blk;
+ static blk_t last_blk = 0;
+ char *block;
+ errcode_t retval;
+ e2fsck_t ctx;
+
+ ctx = es->ctx;
+
+ if (*blocknr) {
+ last_blk = *blocknr;
+ return 0;
+ }
+ retval = ext2fs_new_block(fs, last_blk, ctx->block_found_map,
+ &new_blk);
+ if (retval) {
+ es->err = retval;
+ return BLOCK_ABORT;
+ }
+ 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, (void **) &block);
+ if (retval) {
+ es->err = retval;
+ return BLOCK_ABORT;
+ }
+ memset(block, 0, fs->blocksize);
+ retval = io_channel_write_blk(fs->io, new_blk, 1, block);
+ }
+ if (retval) {
+ es->err = retval;
+ return BLOCK_ABORT;
+ }
+ ext2fs_free_mem((void **) &block);
+ *blocknr = new_blk;
+ ext2fs_mark_block_bitmap(ctx->block_found_map, new_blk);
+ ext2fs_mark_block_bitmap(fs->block_map, new_blk);
+ ext2fs_mark_bb_dirty(fs);
+ es->newblocks++;
+
+ if (es->done)
+ return (BLOCK_CHANGED | BLOCK_ABORT);
+ else
+ return BLOCK_CHANGED;
+}
+
+static errcode_t expand_directory(e2fsck_t ctx, ext2_ino_t dir)
+{
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+ struct expand_dir_struct es;
+ struct ext2_inode inode;
+
+ 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.done = 0;
+ es.err = 0;
+ es.newblocks = 0;
+ es.ctx = ctx;
+
+ retval = ext2fs_block_iterate2(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;
+ inode.i_blocks += (fs->blocksize / 512) * es.newblocks;
+
+ e2fsck_write_inode(ctx, dir, &inode, "expand_directory");
+
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass4.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass4.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass4.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,167 @@
+/*
+ * 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"
+
+/*
+ * This routine is called when an inode is not connected to the
+ * directory tree.
+ *
+ * This subroutine returns 1 then the caller shouldn't bother with the
+ * rest of the pass 4 tests.
+ */
+static int disconnect_inode(e2fsck_t ctx, ext2_ino_t i)
+{
+ ext2_filsys fs = ctx->fs;
+ struct ext2_inode inode;
+ struct problem_context pctx;
+
+ e2fsck_read_inode(ctx, i, &inode, "pass4: disconnect_inode");
+ clear_problem_context(&pctx);
+ pctx.ino = i;
+ pctx.inode = &inode;
+
+ if (!inode.i_blocks && (LINUX_S_ISREG(inode.i_mode) ||
+ LINUX_S_ISDIR(inode.i_mode))) {
+ /*
+ * This is a zero-length file; prompt to delete it...
+ */
+ if (fix_problem(ctx, PR_4_ZERO_LEN_INODE, &pctx)) {
+ ext2fs_icount_store(ctx->inode_link_info, i, 0);
+ inode.i_links_count = 0;
+ inode.i_dtime = time(0);
+ e2fsck_write_inode(ctx, i, &inode,
+ "disconnect_inode");
+ /*
+ * Fix up the bitmaps...
+ */
+ e2fsck_read_bitmaps(ctx);
+ ext2fs_unmark_inode_bitmap(ctx->inode_used_map, i);
+ ext2fs_unmark_inode_bitmap(ctx->inode_dir_map, i);
+ ext2fs_unmark_inode_bitmap(fs->inode_map, i);
+ ext2fs_mark_ib_dirty(fs);
+ 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;
+ int group, maxgroup;
+
+#ifdef RESOURCE_TRACK
+ init_resource_track(&rtrack);
+#endif
+
+#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;
+
+ for (i=1; i <= fs->super->s_inodes_count; i++) {
+ if ((i % fs->super->s_inodes_per_group) == 0) {
+ group++;
+ if (ctx->progress)
+ if ((ctx->progress)(ctx, 4, group, maxgroup))
+ return;
+ }
+ if (i == EXT2_BAD_INO ||
+ (i > EXT2_ROOT_INO && i < EXT2_FIRST_INODE(fs->super)))
+ continue;
+ if (!(ext2fs_test_inode_bitmap(ctx->inode_used_map, i)) ||
+ (ctx->inode_imagic_map &&
+ ext2fs_test_inode_bitmap(ctx->inode_imagic_map, i)) ||
+ (ctx->inode_bb_map &&
+ ext2fs_test_inode_bitmap(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 (e2fsck_process_bad_inode(ctx, 0, i))
+ continue;
+ if (disconnect_inode(ctx, i))
+ continue;
+ ext2fs_icount_fetch(ctx->inode_link_info, i,
+ &link_count);
+ ext2fs_icount_fetch(ctx->inode_count, i,
+ &link_counted);
+ }
+ 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) {
+ pctx.num = link_count;
+ fix_problem(ctx,
+ PR_4_INCONSISTENT_COUNT, &pctx);
+ }
+ pctx.num = link_counted;
+ if (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;
+#ifdef RESOURCE_TRACK
+ if (ctx->options & E2F_OPT_TIME2) {
+ e2fsck_clear_progbar(ctx);
+ print_resource_track(_("Pass 4"), &rtrack);
+ }
+#endif
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass5.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass5.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/pass5.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,547 @@
+/*
+ * 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 "e2fsck.h"
+#include "problem.h"
+
+static void check_block_bitmaps(e2fsck_t ctx);
+static void check_inode_bitmaps(e2fsck_t ctx);
+static void check_inode_end(e2fsck_t ctx);
+static void check_block_end(e2fsck_t ctx);
+
+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
+
+#ifdef RESOURCE_TRACK
+ init_resource_track(&rtrack);
+#endif
+
+ 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;
+
+#ifdef RESOURCE_TRACK
+ if (ctx->options & E2F_OPT_TIME2) {
+ e2fsck_clear_progbar(ctx);
+ print_resource_track(_("Pass 5"), &rtrack);
+ }
+#endif
+}
+
+#define NO_BLK ((blk_t) -1)
+
+static void print_bitmap_problem(e2fsck_t ctx, int 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;
+}
+
+static void check_block_bitmaps(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ blk_t i;
+ int *free_array;
+ int group = 0;
+ int blocks = 0;
+ int free_blocks = 0;
+ int group_free = 0;
+ int actual, bitmap;
+ struct problem_context pctx;
+ int problem, save_problem, fixit, had_problem;
+ errcode_t retval;
+
+ clear_problem_context(&pctx);
+ free_array = (int *) e2fsck_allocate_memory(ctx,
+ fs->group_desc_count * sizeof(int), "free block count array");
+
+ if ((fs->super->s_first_data_block <
+ ext2fs_get_block_bitmap_start(ctx->block_found_map)) ||
+ (fs->super->s_blocks_count-1 >
+ ext2fs_get_block_bitmap_end(ctx->block_found_map))) {
+ pctx.num = 1;
+ pctx.blk = fs->super->s_first_data_block;
+ pctx.blk2 = fs->super->s_blocks_count -1;
+ pctx.ino = ext2fs_get_block_bitmap_start(ctx->block_found_map);
+ pctx.ino2 = ext2fs_get_block_bitmap_end(ctx->block_found_map);
+ fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx);
+
+ ctx->flags |= E2F_FLAG_ABORT; /* fatal */
+ return;
+ }
+
+ if ((fs->super->s_first_data_block <
+ ext2fs_get_block_bitmap_start(fs->block_map)) ||
+ (fs->super->s_blocks_count-1 >
+ ext2fs_get_block_bitmap_end(fs->block_map))) {
+ pctx.num = 2;
+ pctx.blk = fs->super->s_first_data_block;
+ pctx.blk2 = fs->super->s_blocks_count -1;
+ pctx.ino = ext2fs_get_block_bitmap_start(fs->block_map);
+ pctx.ino2 = ext2fs_get_block_bitmap_end(fs->block_map);
+ fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx);
+
+ ctx->flags |= E2F_FLAG_ABORT; /* fatal */
+ return;
+ }
+
+redo_counts:
+ had_problem = 0;
+ save_problem = 0;
+ pctx.blk = pctx.blk2 = NO_BLK;
+ for (i = fs->super->s_first_data_block;
+ i < fs->super->s_blocks_count;
+ i++) {
+ actual = ext2fs_fast_test_block_bitmap(ctx->block_found_map, i);
+ bitmap = ext2fs_fast_test_block_bitmap(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 (pctx.blk == NO_BLK) {
+ pctx.blk = pctx.blk2 = i;
+ save_problem = problem;
+ } else {
+ if ((problem == save_problem) &&
+ (pctx.blk2 == i-1))
+ pctx.blk2++;
+ else {
+ print_bitmap_problem(ctx, save_problem, &pctx);
+ pctx.blk = pctx.blk2 = i;
+ save_problem = problem;
+ }
+ }
+ ctx->flags |= E2F_FLAG_PROG_SUPPRESS;
+ had_problem++;
+
+ do_counts:
+ if (!bitmap) {
+ group_free++;
+ free_blocks++;
+ }
+ blocks ++;
+ if ((blocks == fs->super->s_blocks_per_group) ||
+ (i == fs->super->s_blocks_count-1)) {
+ free_array[group] = group_free;
+ group ++;
+ blocks = 0;
+ group_free = 0;
+ if (ctx->progress)
+ if ((ctx->progress)(ctx, 5, group,
+ fs->group_desc_count*2))
+ return;
+ }
+ }
+ 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;
+ return;
+ }
+ 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));
+ goto redo_counts;
+ } else if (fixit == 0)
+ ext2fs_unmark_valid(fs);
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ if (free_array[i] != fs->group_desc[i].bg_free_blocks_count) {
+ pctx.group = i;
+ pctx.blk = fs->group_desc[i].bg_free_blocks_count;
+ pctx.blk2 = free_array[i];
+
+ if (fix_problem(ctx, PR_5_FREE_BLOCK_COUNT_GROUP,
+ &pctx)) {
+ fs->group_desc[i].bg_free_blocks_count =
+ free_array[i];
+ ext2fs_mark_super_dirty(fs);
+ } else
+ ext2fs_unmark_valid(fs);
+ }
+ }
+ if (free_blocks != fs->super->s_free_blocks_count) {
+ pctx.group = 0;
+ pctx.blk = fs->super->s_free_blocks_count;
+ pctx.blk2 = free_blocks;
+
+ if (fix_problem(ctx, PR_5_FREE_BLOCK_COUNT, &pctx)) {
+ fs->super->s_free_blocks_count = free_blocks;
+ ext2fs_mark_super_dirty(fs);
+ } else
+ ext2fs_unmark_valid(fs);
+ }
+ ext2fs_free_mem((void **) &free_array);
+}
+
+static void check_inode_bitmaps(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ ext2_ino_t i;
+ int free_inodes = 0;
+ int group_free = 0;
+ int dirs_count = 0;
+ int group = 0;
+ int inodes = 0;
+ int *free_array;
+ int *dir_array;
+ int actual, bitmap;
+ errcode_t retval;
+ struct problem_context pctx;
+ int problem, save_problem, fixit, had_problem;
+
+ clear_problem_context(&pctx);
+ free_array = (int *) e2fsck_allocate_memory(ctx,
+ fs->group_desc_count * sizeof(int), "free inode count array");
+
+ dir_array = (int *) e2fsck_allocate_memory(ctx,
+ fs->group_desc_count * sizeof(int), "directory count array");
+
+ if ((1 < ext2fs_get_inode_bitmap_start(ctx->inode_used_map)) ||
+ (fs->super->s_inodes_count >
+ ext2fs_get_inode_bitmap_end(ctx->inode_used_map))) {
+ pctx.num = 3;
+ pctx.blk = 1;
+ pctx.blk2 = fs->super->s_inodes_count;
+ pctx.ino = ext2fs_get_inode_bitmap_start(ctx->inode_used_map);
+ pctx.ino2 = ext2fs_get_inode_bitmap_end(ctx->inode_used_map);
+ fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx);
+
+ ctx->flags |= E2F_FLAG_ABORT; /* fatal */
+ return;
+ }
+ if ((1 < ext2fs_get_inode_bitmap_start(fs->inode_map)) ||
+ (fs->super->s_inodes_count >
+ ext2fs_get_inode_bitmap_end(fs->inode_map))) {
+ pctx.num = 4;
+ pctx.blk = 1;
+ pctx.blk2 = fs->super->s_inodes_count;
+ pctx.ino = ext2fs_get_inode_bitmap_start(fs->inode_map);
+ pctx.ino2 = ext2fs_get_inode_bitmap_end(fs->inode_map);
+ fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx);
+
+ ctx->flags |= E2F_FLAG_ABORT; /* fatal */
+ return;
+ }
+
+redo_counts:
+ had_problem = 0;
+ save_problem = 0;
+ pctx.ino = pctx.ino2 = 0;
+ for (i = 1; i <= fs->super->s_inodes_count; i++) {
+ actual = ext2fs_fast_test_inode_bitmap(ctx->inode_used_map, i);
+ bitmap = ext2fs_fast_test_inode_bitmap(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;
+ }
+ 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++;
+
+do_counts:
+ if (!bitmap) {
+ group_free++;
+ free_inodes++;
+ } else {
+ if (ext2fs_test_inode_bitmap(ctx->inode_dir_map, i))
+ dirs_count++;
+ }
+ inodes++;
+ if ((inodes == fs->super->s_inodes_per_group) ||
+ (i == fs->super->s_inodes_count)) {
+ free_array[group] = group_free;
+ dir_array[group] = dirs_count;
+ group ++;
+ inodes = 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))
+ return;
+ }
+ }
+ 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;
+ return;
+ }
+ 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));
+ goto redo_counts;
+ } else if (fixit == 0)
+ ext2fs_unmark_valid(fs);
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ if (free_array[i] != fs->group_desc[i].bg_free_inodes_count) {
+ pctx.group = i;
+ pctx.ino = fs->group_desc[i].bg_free_inodes_count;
+ pctx.ino2 = free_array[i];
+ if (fix_problem(ctx, PR_5_FREE_INODE_COUNT_GROUP,
+ &pctx)) {
+ fs->group_desc[i].bg_free_inodes_count =
+ free_array[i];
+ ext2fs_mark_super_dirty(fs);
+ } else
+ ext2fs_unmark_valid(fs);
+ }
+ if (dir_array[i] != fs->group_desc[i].bg_used_dirs_count) {
+ pctx.group = i;
+ pctx.ino = fs->group_desc[i].bg_used_dirs_count;
+ pctx.ino2 = dir_array[i];
+
+ if (fix_problem(ctx, PR_5_FREE_DIR_COUNT_GROUP,
+ &pctx)) {
+ fs->group_desc[i].bg_used_dirs_count =
+ 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);
+ } else
+ ext2fs_unmark_valid(fs);
+ }
+ ext2fs_free_mem((void **) &free_array);
+ ext2fs_free_mem((void **) &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;
+
+ for (i = save_inodes_count + 1; i <= end; i++) {
+ if (!ext2fs_test_inode_bitmap(fs->inode_map, i)) {
+ if (fix_problem(ctx, PR_5_INODE_BMAP_PADDING, &pctx)) {
+ for (i = save_inodes_count + 1; 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;
+ blk_t end, save_blocks_count, i;
+ struct problem_context pctx;
+
+ clear_problem_context(&pctx);
+
+ end = fs->block_map->start +
+ (EXT2_BLOCKS_PER_GROUP(fs->super) * fs->group_desc_count) - 1;
+ pctx.errcode = ext2fs_fudge_block_bitmap_end(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;
+
+ for (i = save_blocks_count + 1; i <= end; i++) {
+ if (!ext2fs_test_block_bitmap(fs->block_map, i)) {
+ if (fix_problem(ctx, PR_5_BLOCK_BMAP_PADDING, &pctx)) {
+ for (i = save_blocks_count + 1; i <= end; i++)
+ ext2fs_mark_block_bitmap(fs->block_map,
+ i);
+ ext2fs_mark_bb_dirty(fs);
+ } else
+ ext2fs_unmark_valid(fs);
+ break;
+ }
+ }
+
+ pctx.errcode = ext2fs_fudge_block_bitmap_end(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;
+ }
+}
+
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/problem.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/problem.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/problem.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1426 @@
+/*
+ * 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_NULL 18
+
+/*
+ * 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 duplicate/bad blocks"), /* 14 */
+ N_("Delete file"), /* 15 */
+ N_("Suppress messages"),/* 16 */
+ N_("Unlink"), /* 17 */
+ "", /* 18 */
+};
+
+/*
+ * 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_("DUPLICATE/BAD BLOCKS CLONED"), /* 14 */
+ N_("FILE DELETED"), /* 15 */
+ N_("SUPPRESSED"), /* 16 */
+ N_("UNLINKED"), /* 17 */
+};
+
+static const 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_ at 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 there is several inode or block bitmap blocks\n"
+ "which require relocation, or one part of the inode table\n"
+ "which must be moved, you may wish to try running e2fsck\n"
+ "with the '-b %S' option first. The problem may lie only\n"
+ "with the primary block group descriptor, and the backup\n"
+ "block group descriptor 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, should be %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 a bad ext3 @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_("Ext3 @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_("Ext3 @j @S is corrupt.\n"),
+ PROMPT_FIX, PR_PREEN_OK },
+
+ /* Superblock flag should be cleared */
+ { PR_0_JOURNAL_HAS_JOURNAL,
+ N_("@S doesn't have has_ at j flag, but has ext3 @j %s.\n"),
+ PROMPT_CLEAR, PR_PREEN_OK },
+
+ /* Superblock flag is incorrect */
+ { PR_0_JOURNAL_RECOVER_SET,
+ N_("@S has ext3 needs_recovery flag set, but no @j.\n"),
+ PROMPT_CLEAR, PR_PREEN_OK },
+
+ /* Journal has data, but recovery flag is clear */
+ { PR_0_JOURNAL_RECOVERY_CLEAR,
+ N_("ext3 recovery flag 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 },
+
+ /* 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 },
+
+ /* 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 (%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 (%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 },
+
+ /* Filesystem revision is 0, but feature flags are set */
+ { PR_0_FS_REV_LEVEL,
+ "@f has feature flag(s) set, but is a revision 0 @f. ",
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK },
+
+ /* Journal superblock has an unknown read-only feature flag set */
+ { PR_0_JOURNAL_UNSUPP_ROCOMPAT,
+ N_("Ext3 @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_("Ext3 @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 inode.\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 invalid V2 @j @S fields (from V1 journal).\n"
+ "Clearing fields beyond the V1 @j @S...\n\n"),
+ PROMPT_NONE, 0 },
+
+ /* Pass 1 errors */
+
+ /* Pass 1: Checking inodes, blocks, and sizes */
+ { PR_1_PASS_HEADER,
+ N_("Pass 1: Checking @is, @bs, and sizes\n"),
+ PROMPT_NONE, 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 bad 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_ at bs is %Ib, @s %N. "),
+ PROMPT_FIX, PR_PREEN_OK },
+
+ /* Illegal blocknumber in inode */
+ { PR_1_ILLEGAL_BLOCK_NUM,
+ N_("@I @b #%B (%b) in @i %i. "),
+ PROMPT_CLEAR, PR_LATCH_BLOCK },
+
+ /* Block number overlaps fs metadata */
+ { PR_1_BLOCK_OVERLAPS_METADATA,
+ N_("@b #%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 (%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 indirect @b?!?\n"),
+ PROMPT_NONE, PR_AFTER_CODE, PR_1_BBINODE_BAD_METABLOCK_PROMPT },
+
+ /* Inconsistency can't be fixed prompt */
+ { PR_1_BBINODE_BAD_METABLOCK_PROMPT,
+ N_("\nThis 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"),
+ 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 clear the this @b (and hope for the best) from the\n"
+ "bad @b list and hope that @b is really OK, but there are no\n"
+ "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_ at b.\n"),
+ PROMPT_NONE, PR_PREEN_OK },
+
+ /* Error allocating blocks for relocating metadata */
+ { PR_1_RELOC_BLOCK_ALLOCATE,
+ N_("@A %N @b(s) 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"),
+ 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,
+ "@A @i @B (%N): %m\n",
+ PROMPT_NONE, PR_FATAL },
+
+ /* Error allocating block bitmap */
+ { PR_1_ALLOCATE_BBITMAP_ERROR,
+ "@A @b @B (%N): %m\n",
+ PROMPT_NONE, PR_FATAL },
+
+ /* Error allocating icount structure */
+ { PR_1_ALLOCATE_ICOUNT,
+ N_("@A icount link information: %m\n"),
+ PROMPT_NONE, PR_FATAL },
+
+ /* Error allocating dbcount */
+ { 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,
+ "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,
+ "@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,
+ "@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 orphaned @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,
+ "@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_ABORT, 0 },
+
+ /* Extended attribute reference count incorrect */
+ { PR_1_EXTATTR_REFCOUNT,
+ N_("@a @b %b has reference count %B, should be %N. "),
+ PROMPT_FIX, 0 },
+
+ /* Error writing Extended Attribute block while fixing refcount */
+ { PR_1_EXTATTR_WRITE,
+ N_("Error writing @a @b %b (%m). "),
+ PROMPT_ABORT, 0 },
+
+ /* Multiple EA blocks not supported */
+ { PR_1_EA_MULTI_BLOCK,
+ N_("@a @b %b has h_blocks > 1. "),
+ PROMPT_CLEAR, 0},
+
+ /* Error allocating EA region allocation structure */
+ { PR_1_EA_ALLOC_REGION,
+ N_("Error allocating @a @b %b. "),
+ PROMPT_ABORT, 0},
+
+ /* 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 (invalid name). "),
+ PROMPT_CLEAR, 0},
+
+ /* Bad extended attribute value */
+ { PR_1_EA_BAD_VALUE,
+ N_("@a @b %b is corrupt (invalid value). "),
+ PROMPT_CLEAR, 0},
+
+ /* Pass 1b errors */
+
+ /* Pass 1B: Rescan for duplicate/bad blocks */
+ { PR_1B_PASS_HEADER,
+ N_("Duplicate @bs found... invoking duplicate @b passes.\n"
+ "Pass 1B: Rescan for duplicate/bad @bs\n"),
+ PROMPT_NONE, 0 },
+
+ /* Duplicate/bad block(s) header */
+ { PR_1B_DUP_BLOCK_HEADER,
+ N_("Duplicate/bad @b(s) in @i %i:"),
+ PROMPT_NONE, 0 },
+
+ /* Duplicate/bad block(s) in inode */
+ { PR_1B_DUP_BLOCK,
+ " %b",
+ PROMPT_NONE, PR_LATCH_DBLOCK },
+
+ /* Duplicate/bad block(s) end */
+ { PR_1B_DUP_BLOCK_END,
+ "\n",
+ PROMPT_NONE, 0 },
+
+ /* 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 (inode_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 },
+
+ /* Pass 1C: Scan directories for inodes with dup blocks. */
+ { PR_1C_PASS_HEADER,
+ N_("Pass 1C: Scan directories for @is with dup @bs.\n"),
+ PROMPT_NONE, 0 },
+
+
+ /* Pass 1D: Reconciling duplicate blocks */
+ { PR_1D_PASS_HEADER,
+ N_("Pass 1D: Reconciling duplicate @bs\n"),
+ PROMPT_NONE, 0 },
+
+ /* File has duplicate blocks */
+ { PR_1D_DUP_FILE,
+ N_("File %Q (@i #%i, mod time %IM) \n"
+ " has %B duplicate @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 duplicate/bad @bs.)\n\n"),
+ PROMPT_NONE, 0 },
+
+ /* Duplicated blocks already reassigned or cloned. */
+ { PR_1D_DUP_BLOCKS_DEALT,
+ N_("Duplicated @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_("Bad @i number for '.' in @d @i %i.\n"),
+ PROMPT_FIX, 0 },
+
+ /* Directory entry has bad inode number */
+ { PR_2_BAD_INO,
+ N_("@E has bad @i #: %Di.\n"),
+ PROMPT_CLEAR, 0 },
+
+ /* Directory entry has deleted or unused inode */
+ { 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' (inode=%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' (inode=%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 a bad mode (%Im).\n"),
+ PROMPT_CLEAR, 0 },
+
+ /* directory corrupted */
+ { PR_2_DIR_CORRUPTED,
+ N_("@d @i %i, @b %B, offset %N: @d corrupted\n"),
+ PROMPT_SALVAGE, 0 },
+
+ /* filename too long */
+ { PR_2_FILENAME_LONG,
+ N_("@d @i %i, @b %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 #%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, should be %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 interating 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 '.' is big. "),
+ 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, should be %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 zero-length name.\n"),
+ PROMPT_CLEAR, 0 },
+
+ /* Invalid fast symlink size */
+ { PR_2_SYMLINK_SIZE,
+ N_("Symlink %Q (@i #%i) has an invalid size (%Is).\n"),
+ PROMPT_CLEAR, 0 },
+
+ /* i_file_acl (extended attribute block) is bad */
+ { PR_2_FILE_ACL_BAD,
+ N_("@a @b @F is invalid (%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 },
+
+ /* 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_ at 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_ at 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_ at 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_ at 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 entry\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, PR_FATAL },
+
+ /* 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 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,
+ "@u @z @i %i. ",
+ PROMPT_CLEAR, PR_PREEN_OK|PR_NO_OK },
+
+ /* Unattached inode */
+ { PR_4_UNATTACHED_INODE,
+ "@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 should be 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_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_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,
+ "Error copying in replacement @i @B: %m\n",
+ PROMPT_NONE, PR_FATAL },
+
+ /* Error copying in replacement block bitmap */
+ { PR_5_COPY_BBITMAP_ERROR,
+ "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 },
+
+ { 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 },
+ { -1, 0, 0 },
+};
+
+static const struct e2fsck_problem *find_problem(int 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;
+}
+
+int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx)
+{
+ ext2_filsys fs = ctx->fs;
+ const 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;
+ }
+ def_yn = 1;
+ 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))
+ suppress++;
+ if (!suppress) {
+ message = ptr->e2p_description;
+ if (ctx->options & E2F_OPT_PREEN) {
+ printf("%s: ", ctx->device_name ?
+ ctx->device_name : ctx->filesystem_name);
+#if 0
+ if (ptr->e2p_preen_msg)
+ message = ptr->e2p_preen_msg;
+#endif
+ }
+ print_e2fsck_message(ctx, _(message), pctx, 1);
+ }
+ 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 (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))) {
+ if (!suppress)
+ print_answer = 1;
+ if (ldesc->flags & PRL_YES)
+ answer = 1;
+ else
+ answer = 0;
+ } else
+ answer = ask(ctx, _(prompt[(int) ptr->prompt]), def_yn);
+ if (!answer && !(ptr->flags & PR_NO_OK))
+ ext2fs_unmark_valid(fs);
+
+ if (print_answer)
+ printf("%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;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/problem.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/problem.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/problem.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,757 @@
+/*
+ * problem.h --- e2fsck problem error codes
+ *
+ * Copyright 1996 by Theodore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+typedef __u32 problem_t;
+
+struct problem_context {
+ errcode_t errcode;
+ ext2_ino_t ino, ino2, dir;
+ struct ext2_inode *inode;
+ struct ext2_dir_entry *dirent;
+ blk_t blk, blk2;
+ e2_blkcnt_t blkcount;
+ int group;
+ __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(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
+
+/*
+ * 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 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 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 0x0100423
+
+/*
+ * 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 0x0110006
+
+
+/* Pass 1C: Scan directories for inodes with dup blocks. */
+#define PR_1C_PASS_HEADER 0x012000
+
+
+/* Pass 1D: Reconciling duplicate blocks */
+#define PR_1D_PASS_HEADER 0x013000
+
+/* File has duplicate blocks */
+#define PR_1D_DUP_FILE 0x013001
+
+/* List of files sharing duplicate blocks */
+#define PR_1D_DUP_FILE_LIST 0x013002
+
+/* File sharing blocks with filesystem metadata */
+#define PR_1D_SHARE_METADATA 0x013003
+
+/* Report of how many duplicate/bad inodes */
+#define PR_1D_NUM_DUP_INODES 0x013004
+
+/* Duplicated blocks already reassigned or cloned. */
+#define PR_1D_DUP_BLOCKS_DEALT 0x013005
+
+/* Clone duplicate/bad blocks? */
+#define PR_1D_CLONE_QUESTION 0x013006
+
+/* Delete file? */
+#define PR_1D_DELETE_QUESTION 0x013007
+
+/* Couldn't clone file (error) */
+#define PR_1D_CLONE_ERROR 0x013008
+
+/*
+ * Pass 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 fast symlink size */
+#define PR_2_SYMLINK_SIZE 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
+
+/*
+ * 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 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
+
+/*
+ * 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 *ctx);
+
+/* message.c */
+void print_e2fsck_message(e2fsck_t ctx, const char *msg,
+ struct problem_context *pctx, int first);
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/problemP.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/problemP.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/problemP.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,41 @@
+/*
+ * 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;
+};
+
+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 */
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/recovery.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/recovery.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/recovery.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,587 @@
+/*
+ * linux/fs/recovery.c
+ *
+ * Written by Stephen C. Tweedie <sct at 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/sched.h>
+#include <linux/fs.h>
+#include <linux/jbd.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/locks.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 */
+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 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 blocknr;
+ struct buffer_head *bh;
+
+ *bhp = NULL;
+
+ J_ASSERT (offset < journal->j_maxlen);
+
+ 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(struct buffer_head *bh, int size)
+{
+ char * tagp;
+ journal_block_tag_t * tag;
+ int nr = 0;
+
+ tagp = &bh->b_data[sizeof(journal_header_t)];
+
+ while ((tagp - bh->b_data + sizeof(journal_block_tag_t)) <= size) {
+ tag = (journal_block_tag_t *) tagp;
+
+ nr++;
+ tagp += sizeof(journal_block_tag_t);
+ if (!(tag->t_flags & htonl(JFS_FLAG_SAME_UUID)))
+ tagp += 16;
+
+ if (tag->t_flags & htonl(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
+ *
+ * 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",
+ ntohl(sb->s_sequence));
+ journal->j_transaction_sequence = ntohl(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(0, "JBD: recovery, exit status %d, "
+ "recovered transactions %u to %u\n",
+ err, info.start_transaction, info.end_transaction);
+ jbd_debug(0, "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);
+ fsync_no_super(journal->j_fs_dev);
+ return err;
+}
+
+/*
+ * journal_skip_recovery
+ *
+ * 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).
+ *
+ * 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;
+ journal_superblock_t * sb;
+
+ struct recovery_info info;
+
+ memset (&info, 0, sizeof(info));
+ sb = journal->j_superblock;
+
+ 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
+ int dropped = info.end_transaction - ntohl(sb->s_sequence);
+#endif
+
+ jbd_debug(0,
+ "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 int do_one_pass(journal_t *journal,
+ struct recovery_info *info, enum passtype pass)
+{
+
+ unsigned int first_commit_ID, next_commit_ID;
+ unsigned long next_log_block;
+ int err, success = 0;
+ journal_superblock_t * sb;
+ journal_header_t * tmp;
+ struct buffer_head * bh;
+ unsigned int sequence;
+ int blocktype;
+
+ /* Precompute the maximum metadata descriptors in a descriptor block */
+ int MAX_BLOCKS_PER_DESC;
+ MAX_BLOCKS_PER_DESC = ((journal->j_blocksize-sizeof(journal_header_t))
+ / sizeof(journal_block_tag_t));
+
+ /*
+ * 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 = ntohl(sb->s_sequence);
+ next_log_block = ntohl(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;
+
+ /* If we already know where to stop the log traversal,
+ * check right now that we haven't gone past the end of
+ * the log. */
+
+ if (pass != PASS_SCAN)
+ if (tid_geq(next_commit_ID, info->end_transaction))
+ break;
+
+ jbd_debug(2, "Scanning for sequence ID %u at %lu/%lu\n",
+ next_commit_ID, next_log_block, 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 %ld\n", next_log_block);
+ err = jread(&bh, journal, next_log_block);
+ if (err)
+ goto failed;
+
+ next_log_block++;
+ wrap(journal, next_log_block);
+
+ /* What kind of buffer is it?
+ *
+ * If it is a descriptor block, check that it has the
+ * expected sequence number. Otherwise, we're all done
+ * here. */
+
+ tmp = (journal_header_t *)bh->b_data;
+
+ if (tmp->h_magic != htonl(JFS_MAGIC_NUMBER)) {
+ brelse(bh);
+ break;
+ }
+
+ blocktype = ntohl(tmp->h_blocktype);
+ sequence = ntohl(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; otherwise, just skip over the
+ * blocks it describes. */
+ if (pass != PASS_REPLAY) {
+ next_log_block +=
+ count_tags(bh, journal->j_blocksize);
+ 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 +sizeof(journal_block_tag_t))
+ <= journal->j_blocksize) {
+ unsigned long io_block;
+
+ tag = (journal_block_tag_t *) tagp;
+ flags = ntohl(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 %ld in log\n",
+ err, io_block);
+ } else {
+ unsigned long blocknr;
+
+ J_ASSERT(obh != NULL);
+ blocknr = ntohl(tag->t_blocknr);
+
+ /* 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;
+ }
+
+ memcpy(nbh->b_data, obh->b_data,
+ journal->j_blocksize);
+ if (flags & JFS_FLAG_ESCAPE) {
+ *((unsigned int *)bh->b_data) =
+ htonl(JFS_MAGIC_NUMBER);
+ }
+
+ BUFFER_TRACE(nbh, "marking dirty");
+ mark_buffer_dirty(nbh);
+ BUFFER_TRACE(nbh, "marking uptodate");
+ mark_buffer_uptodate(nbh, 1);
+ ++info->nr_replays;
+ /* ll_rw_block(WRITE, 1, &nbh); */
+ brelse(obh);
+ brelse(nbh);
+ }
+
+ skip_write:
+ tagp += sizeof(journal_block_tag_t);
+ if (!(flags & JFS_FLAG_SAME_UUID))
+ tagp += 16;
+
+ if (flags & JFS_FLAG_LAST_TAG)
+ break;
+ }
+
+ brelse(bh);
+ continue;
+
+ case JFS_COMMIT_BLOCK:
+ /* Found an expected commit block: not much to
+ * do other than move on to the next sequence
+ * number. */
+ 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);
+ 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)
+ 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;
+
+ header = (journal_revoke_header_t *) bh->b_data;
+ offset = sizeof(journal_revoke_header_t);
+ max = ntohl(header->r_count);
+
+ while (offset < max) {
+ unsigned long blocknr;
+ int err;
+
+ blocknr = ntohl(* ((unsigned int *) (bh->b_data+offset)));
+ offset += 4;
+ err = journal_set_revoke(journal, blocknr, sequence);
+ if (err)
+ return err;
+ ++info->nr_revokes;
+ }
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/region.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/region.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/region.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,204 @@
+/*
+ * 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>
+
+#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;
+ int pc = 0, ret;
+ region_addr_t start, end, len;
+
+
+ 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 */
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/revoke.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/revoke.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/revoke.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,639 @@
+/*
+ * linux/fs/revoke.c
+ *
+ * Written by Stephen C. Tweedie <sct at 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 kmem_cache_t *revoke_record_cache;
+static kmem_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);
+}
+
+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);
+ }
+ }
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/scantest.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/scantest.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/scantest.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,141 @@
+/*
+ * 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>
+#ifdef HAVE_MNTENT_H
+#include <mntent.h>
+#endif
+#include <sys/ioctl.h>
+#include <malloc.h>
+#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;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/super.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/super.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/super.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,523 @@
+/*
+ * 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
+
+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))) {
+ 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! */
+ }
+}
+
+/*
+ * This routine may get stubbed out in special compilations of the
+ * e2fsck code..
+ */
+#ifndef EXT2_SPECIAL_DEVICE_SIZE
+errcode_t e2fsck_get_device_size(e2fsck_t ctx)
+{
+ return (ext2fs_get_device_size(ctx->filesystem_name,
+ EXT2_BLOCK_SIZE(ctx->fs->super),
+ &ctx->num_blocks));
+}
+#endif
+
+/*
+ * helper function to release an inode
+ */
+struct process_block_struct {
+ e2fsck_t ctx;
+ char *buf;
+ struct problem_context *pctx;
+ int truncating;
+ int truncate_offset;
+ blk_t truncate_block;
+ int truncated_blocks;
+ int abort;
+ errcode_t errcode;
+};
+
+static int release_inode_block(ext2_filsys fs,
+ blk_t *block_nr,
+ int blockcnt,
+ void *priv_data)
+{
+ struct process_block_struct *pb;
+ e2fsck_t ctx;
+ struct problem_context *pctx;
+ blk_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 >= fs->super->s_blocks_count)) {
+ fix_problem(ctx, PR_0_ORPHAN_ILLEGAL_BLOCK_NUM, pctx);
+ return_abort:
+ pb->abort = 1;
+ return BLOCK_ABORT;
+ }
+
+ if (!ext2fs_test_block_bitmap(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_blk(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_blk(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_blk(fs->io, blk, 1,
+ pb->buf);
+ if (pb->errcode)
+ goto return_abort;
+ }
+ pb->truncated_blocks++;
+ *block_nr = 0;
+ retval |= BLOCK_CHANGED;
+ }
+
+ ext2fs_unmark_block_bitmap(fs->block_map, blk);
+ fs->group_desc[ext2fs_group_of_blk(fs, blk)].bg_free_blocks_count++;
+ fs->super->s_free_blocks_count++;
+
+ 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)
+{
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+ struct process_block_struct pb;
+
+ if (!ext2fs_inode_has_valid_blocks(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 = (blk_t)
+ ((((long long)inode->i_size_high << 32) +
+ inode->i_size + 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_iterate(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)
+ inode->i_blocks -= pb.truncated_blocks *
+ (fs->blocksize / 512);
+
+ ext2fs_mark_bb_dirty(fs);
+ 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;
+ int group;
+ 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_unmark_inode_bitmap(fs->inode_map, ino);
+ ext2fs_mark_ib_dirty(fs);
+ group = ext2fs_group_of_ino(fs, ino);
+ fs->group_desc[group].bg_free_inodes_count++;
+ fs->super->s_free_inodes_count++;
+ if (LINUX_S_ISDIR(inode.i_mode))
+ fs->group_desc[group].bg_used_dirs_count--;
+
+ inode.i_dtime = time(0);
+ }
+ e2fsck_write_inode(ctx, ino, &inode, "delete_file");
+ ino = next_ino;
+ }
+ ext2fs_free_mem((void **) &block_buf);
+ return 0;
+return_abort:
+ ext2fs_free_mem((void **) &block_buf);
+ return 1;
+}
+
+
+void check_super_block(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ blk_t first_block, last_block;
+ struct ext2_super_block *sb = fs->super;
+ blk_t blocks_per_group = fs->super->s_blocks_per_group;
+ int inodes_per_block;
+ dgrp_t i;
+ blk_t should_be;
+ struct problem_context pctx;
+
+ inodes_per_block = (EXT2_BLOCK_SIZE(fs->super) /
+ EXT2_INODE_SIZE(fs->super));
+
+ 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", sb->s_blocks_count,
+ MIN_CHECK, 1, 0);
+ check_super_value(ctx, "first_data_block", sb->s_first_data_block,
+ MAX_CHECK, 0, sb->s_blocks_count);
+ check_super_value(ctx, "log_frag_size", sb->s_log_frag_size,
+ MAX_CHECK, 0, 2);
+ check_super_value(ctx, "log_block_size", sb->s_log_block_size,
+ MIN_CHECK | MAX_CHECK, sb->s_log_frag_size,
+ 2);
+ check_super_value(ctx, "frags_per_group", sb->s_frags_per_group,
+ MIN_CHECK | MAX_CHECK, sb->s_blocks_per_group,
+ 8 * EXT2_BLOCK_SIZE(sb));
+ check_super_value(ctx, "blocks_per_group", sb->s_blocks_per_group,
+ MIN_CHECK | MAX_CHECK, 8, 8 * EXT2_BLOCK_SIZE(sb));
+ check_super_value(ctx, "inodes_per_group", sb->s_inodes_per_group,
+ MIN_CHECK | MAX_CHECK, inodes_per_block,
+ inodes_per_block * (blocks_per_group-4));
+ check_super_value(ctx, "r_blocks_count", sb->s_r_blocks_count,
+ MAX_CHECK, 0, sb->s_blocks_count / 4);
+
+ if (!ctx->num_blocks) {
+ pctx.errcode = e2fsck_get_device_size(ctx);
+ if (pctx.errcode && pctx.errcode != EXT2_ET_UNIMPLEMENTED) {
+ fix_problem(ctx, PR_0_GETSIZE_ERROR, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ if ((pctx.errcode != EXT2_ET_UNIMPLEMENTED) &&
+ (ctx->num_blocks < sb->s_blocks_count)) {
+ pctx.blk = sb->s_blocks_count;
+ pctx.blk2 = ctx->num_blocks;
+ if (fix_problem(ctx, PR_0_FS_SIZE_WRONG, &pctx)) {
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ }
+ }
+
+ if (sb->s_log_block_size != sb->s_log_frag_size) {
+ pctx.blk = EXT2_BLOCK_SIZE(sb);
+ pctx.blk2 = EXT2_FRAG_SIZE(sb);
+ fix_problem(ctx, PR_0_NO_FRAGMENTS, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+
+ should_be = sb->s_frags_per_group >>
+ (sb->s_log_block_size - sb->s_log_frag_size);
+ if (sb->s_blocks_per_group != should_be) {
+ pctx.blk = sb->s_blocks_per_group;
+ pctx.blk2 = should_be;
+ fix_problem(ctx, PR_0_BLOCKS_PER_GROUP, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+
+ should_be = (sb->s_log_block_size == 0) ? 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);
+ }
+ }
+
+ /*
+ * Verify the group descriptors....
+ */
+ first_block = fs->super->s_first_data_block;
+ last_block = first_block + blocks_per_group;
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ pctx.group = i;
+
+ if (i == fs->group_desc_count - 1)
+ last_block = fs->super->s_blocks_count;
+ if ((fs->group_desc[i].bg_block_bitmap < first_block) ||
+ (fs->group_desc[i].bg_block_bitmap >= last_block)) {
+ pctx.blk = fs->group_desc[i].bg_block_bitmap;
+ if (fix_problem(ctx, PR_0_BB_NOT_GROUP, &pctx))
+ fs->group_desc[i].bg_block_bitmap = 0;
+ }
+ if (fs->group_desc[i].bg_block_bitmap == 0) {
+ ctx->invalid_block_bitmap_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ if ((fs->group_desc[i].bg_inode_bitmap < first_block) ||
+ (fs->group_desc[i].bg_inode_bitmap >= last_block)) {
+ pctx.blk = fs->group_desc[i].bg_inode_bitmap;
+ if (fix_problem(ctx, PR_0_IB_NOT_GROUP, &pctx))
+ fs->group_desc[i].bg_inode_bitmap = 0;
+ }
+ if (fs->group_desc[i].bg_inode_bitmap == 0) {
+ ctx->invalid_inode_bitmap_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ if ((fs->group_desc[i].bg_inode_table < first_block) ||
+ ((fs->group_desc[i].bg_inode_table +
+ fs->inode_blocks_per_group - 1) >= last_block)) {
+ pctx.blk = fs->group_desc[i].bg_inode_table;
+ if (fix_problem(ctx, PR_0_ITABLE_NOT_GROUP, &pctx))
+ fs->group_desc[i].bg_inode_table = 0;
+ }
+ if (fs->group_desc[i].bg_inode_table == 0) {
+ ctx->invalid_inode_table_flag[i]++;
+ ctx->invalid_bitmaps++;
+ }
+ first_block += fs->super->s_blocks_per_group;
+ last_block += fs->super->s_blocks_per_group;
+ }
+ /*
+ * If we have invalid bitmaps, set the error state of the
+ * filesystem.
+ */
+ if (ctx->invalid_bitmaps && !(ctx->options & E2F_OPT_READONLY)) {
+ fs->super->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);
+ ext2fs_mark_super_dirty(fs);
+ }
+ }
+#endif
+
+ /*
+ * 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);
+
+ }
+ }
+
+ /*
+ * 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);
+ }
+
+ /*
+ * 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);
+ }
+
+ /*
+ * Move the ext3 journal file, if necessary.
+ */
+ e2fsck_move_ext3_journal(ctx);
+ return;
+}
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/swapfs.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/swapfs.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/swapfs.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,233 @@
+/*
+ * swapfs.c --- byte-swap an ext2 filesystem
+ *
+ * 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 <et/com_err.h>
+#include "e2fsck.h"
+
+#ifdef ENABLE_SWAPFS
+
+struct swap_block_struct {
+ ext2_ino_t ino;
+ int isdir;
+ errcode_t errcode;
+ char *dir_buf;
+ struct ext2_inode *inode;
+};
+
+/*
+ * This is a helper function for block_iterate. We mark all of the
+ * indirect and direct blocks as changed, so that block_iterate will
+ * write them out.
+ */
+static int swap_block(ext2_filsys fs, blk_t *block_nr, int blockcnt,
+ void *priv_data)
+{
+ errcode_t retval;
+
+ struct swap_block_struct *sb = (struct swap_block_struct *) priv_data;
+
+ if (sb->isdir && (blockcnt >= 0) && *block_nr) {
+ retval = ext2fs_read_dir_block(fs, *block_nr, sb->dir_buf);
+ if (retval) {
+ sb->errcode = retval;
+ return BLOCK_ABORT;
+ }
+ retval = ext2fs_write_dir_block(fs, *block_nr, sb->dir_buf);
+ if (retval) {
+ sb->errcode = retval;
+ return BLOCK_ABORT;
+ }
+ }
+ if (blockcnt >= 0) {
+ if (blockcnt < EXT2_NDIR_BLOCKS)
+ return 0;
+ return BLOCK_CHANGED;
+ }
+ if (blockcnt == BLOCK_COUNT_IND) {
+ if (*block_nr == sb->inode->i_block[EXT2_IND_BLOCK])
+ return 0;
+ return BLOCK_CHANGED;
+ }
+ if (blockcnt == BLOCK_COUNT_DIND) {
+ if (*block_nr == sb->inode->i_block[EXT2_DIND_BLOCK])
+ return 0;
+ return BLOCK_CHANGED;
+ }
+ if (blockcnt == BLOCK_COUNT_TIND) {
+ if (*block_nr == sb->inode->i_block[EXT2_TIND_BLOCK])
+ return 0;
+ return BLOCK_CHANGED;
+ }
+ return BLOCK_CHANGED;
+}
+
+/*
+ * This function is responsible for byte-swapping all of the indirect,
+ * block pointers. It is also responsible for byte-swapping directories.
+ */
+static void swap_inode_blocks(e2fsck_t ctx, ext2_ino_t ino, char *block_buf,
+ struct ext2_inode *inode)
+{
+ errcode_t retval;
+ struct swap_block_struct sb;
+
+ sb.ino = ino;
+ sb.inode = inode;
+ sb.dir_buf = block_buf + ctx->fs->blocksize*3;
+ sb.errcode = 0;
+ sb.isdir = 0;
+ if (LINUX_S_ISDIR(inode->i_mode))
+ sb.isdir = 1;
+
+ retval = ext2fs_block_iterate(ctx->fs, ino, 0, block_buf,
+ swap_block, &sb);
+ if (retval) {
+ com_err("swap_inode_blocks", retval,
+ _("while calling ext2fs_block_iterate"));
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ if (sb.errcode) {
+ com_err("swap_inode_blocks", sb.errcode,
+ _("while calling iterator function"));
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+}
+
+static void swap_inodes(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ int i, group;
+ ext2_ino_t ino = 1;
+ char *buf, *block_buf;
+ errcode_t retval;
+ struct ext2_inode * inode;
+
+ e2fsck_use_inode_shortcuts(ctx, 1);
+
+ retval = ext2fs_get_mem(fs->blocksize * fs->inode_blocks_per_group,
+ (void **) &buf);
+ if (retval) {
+ com_err("swap_inodes", retval,
+ _("while allocating inode buffer"));
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ block_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 4,
+ "block interate buffer");
+ for (group = 0; group < fs->group_desc_count; group++) {
+ retval = io_channel_read_blk(fs->io,
+ fs->group_desc[group].bg_inode_table,
+ fs->inode_blocks_per_group, buf);
+ if (retval) {
+ com_err("swap_inodes", retval,
+ _("while reading inode table (group %d)"),
+ group);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ inode = (struct ext2_inode *) buf;
+ for (i=0; i < fs->super->s_inodes_per_group;
+ i++, ino++, inode++) {
+ ctx->stashed_ino = ino;
+ ctx->stashed_inode = inode;
+
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES_READ)
+ ext2fs_swap_inode(fs, inode, inode, 0);
+
+ /*
+ * Skip deleted files.
+ */
+ if (inode->i_links_count == 0)
+ continue;
+
+ if (LINUX_S_ISDIR(inode->i_mode) ||
+ ((inode->i_block[EXT2_IND_BLOCK] ||
+ inode->i_block[EXT2_DIND_BLOCK] ||
+ inode->i_block[EXT2_TIND_BLOCK]) &&
+ ext2fs_inode_has_valid_blocks(inode)))
+ swap_inode_blocks(ctx, ino, block_buf, inode);
+
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ return;
+
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)
+ ext2fs_swap_inode(fs, inode, inode, 1);
+ }
+ retval = io_channel_write_blk(fs->io,
+ fs->group_desc[group].bg_inode_table,
+ fs->inode_blocks_per_group, buf);
+ if (retval) {
+ com_err("swap_inodes", retval,
+ _("while writing inode table (group %d)"),
+ group);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ }
+ ext2fs_free_mem((void **) &buf);
+ ext2fs_free_mem((void **) &block_buf);
+ e2fsck_use_inode_shortcuts(ctx, 0);
+}
+
+void swap_filesys(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+#ifdef RESOURCE_TRACK
+ struct resource_track rtrack;
+
+ init_resource_track(&rtrack);
+#endif
+
+ if (!(ctx->options & E2F_OPT_PREEN))
+ printf(_("Pass 0: Doing byte-swap of filesystem\n"));
+
+#ifdef MTRACE
+ mtrace_print("Byte swap");
+#endif
+
+ if (fs->super->s_mnt_count) {
+ fprintf(stderr, _("%s: the filesystem must be freshly "
+ "checked using fsck\n"
+ "and not mounted before trying to "
+ "byte-swap it.\n"), ctx->device_name);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
+ }
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES) {
+ fs->flags &= ~(EXT2_FLAG_SWAP_BYTES|
+ EXT2_FLAG_SWAP_BYTES_WRITE);
+ fs->flags |= EXT2_FLAG_SWAP_BYTES_READ;
+ } else {
+ fs->flags &= ~EXT2_FLAG_SWAP_BYTES_READ;
+ fs->flags |= EXT2_FLAG_SWAP_BYTES_WRITE;
+ }
+ swap_inodes(ctx);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ return;
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)
+ fs->flags |= EXT2_FLAG_SWAP_BYTES;
+ fs->flags &= ~(EXT2_FLAG_SWAP_BYTES_READ|
+ EXT2_FLAG_SWAP_BYTES_WRITE);
+ ext2fs_flush(fs);
+
+#ifdef RESOURCE_TRACK
+ if (ctx->options & E2F_OPT_TIME2)
+ print_resource_track(_("Byte swap"), &rtrack);
+#endif
+}
+
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/unix.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/unix.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/unix.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1005 @@
+/*
+ * 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%
+ */
+
+#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_MNTENT_H
+#include <mntent.h>
+#endif
+#include <sys/ioctl.h>
+#include <malloc.h>
+
+#include "et/com_err.h"
+#include "e2fsck.h"
+#include "problem.h"
+#include "../version.h"
+
+/* Command line options */
+static int swapfs = 0;
+static int normalize_swapfs = 0;
+static int cflag = 0; /* check disk */
+static int show_version_only = 0;
+static int verbose = 0;
+
+static int replace_bad_blocks = 0;
+static char *bad_blocks_file = 0;
+
+static int possible_block_sizes[] = { 1024, 2048, 4096, 8192, 0};
+
+static int root_filesystem = 0;
+static int read_only_root = 0;
+
+e2fsck_t e2fsck_global_ctx; /* Try your very best not to use this! */
+
+static void usage(e2fsck_t ctx)
+{
+ fprintf(stderr,
+ _("Usage: %s [-panyrcdfvstFSV] [-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 ext-journal] device\n"),
+ ctx->program_name);
+
+ fprintf(stderr, _("\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\n"
+ " -f Force checking even if filesystem is marked clean\n"));
+ fprintf(stderr, _(""
+ " -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;
+ int inodes, inodes_used, blocks, blocks_used;
+ int dir_links;
+ int num_files, num_links;
+ int frag_percent;
+
+ 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 = fs->super->s_blocks_count;
+ blocks_used = (fs->super->s_blocks_count -
+ fs->super->s_free_blocks_count);
+
+ frag_percent = (10000 * ctx->fs_fragmented) / inodes_used;
+ frag_percent = (frag_percent + 5) / 10;
+
+ if (!verbose) {
+ printf(_("%s: %d/%d files (%0d.%d%% non-contiguous), %d/%d blocks\n"),
+ ctx->device_name, inodes_used, inodes,
+ frag_percent / 10, frag_percent % 10,
+ blocks_used, blocks);
+ return;
+ }
+ /*
+ * This is a bit ugly. But I think there will nearly always be more
+ * than one "thing" to report about, so I won't try writing complex
+ * code to handle one/two/many forms of all words.
+ * Some languages (Italian, at least) never uses the plural form
+ * of foreign words, so in real life this could not be a problem.
+ * md at linux.it - 2000-1-15
+ */
+#ifdef ENABLE_NLS
+ printf (_("\n%8d inodes used (%d%%)\n"), inodes_used,
+ (inodes_used != 1), 100 * inodes_used / inodes);
+ printf (_("%8d non-contiguous inodes (%0d.%d%%)\n"),
+ ctx->fs_fragmented, frag_percent / 10, frag_percent % 10);
+ printf (_(" # of inodes with ind/dind/tind blocks: %d/%d/%d\n"),
+ ctx->fs_ind_count, ctx->fs_dind_count, ctx->fs_tind_count);
+ printf (_("%8d blocks used (%d%%)\n"
+ "%8d bad blocks\n"), blocks_used,
+ (int) ((long long) 100 * blocks_used / blocks),
+ ctx->fs_badblocks_count);
+ printf(_("%8d large files\n"), ctx->large_files);
+ printf (_("\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"),
+ ctx->fs_regular_count,
+ ctx->fs_directory_count,
+ ctx->fs_chardev_count,
+ ctx->fs_blockdev_count,
+ ctx->fs_fifo_count,
+ ctx->fs_links_count - dir_links,
+ ctx->fs_symlinks_count,
+ ctx->fs_fast_symlinks_count,
+ ctx->fs_sockets_count,
+ ctx->fs_total_count - dir_links);
+#else
+ printf ("\n%8d inode%s used (%d%%)\n", inodes_used,
+ (inodes_used != 1) ? "s" : "",
+ 100 * inodes_used / inodes);
+ printf ("%8d non-contiguous inodes (%0d.%d%%)\n",
+ ctx->fs_fragmented, frag_percent / 10, frag_percent % 10);
+ printf (" # of inodes with ind/dind/tind blocks: %d/%d/%d\n",
+ ctx->fs_ind_count, ctx->fs_dind_count, ctx->fs_tind_count);
+ printf ("%8d block%s used (%d%%)\n"
+ "%8d bad block%s\n", blocks_used,
+ (blocks_used != 1) ? "s" : "",
+ 100 * blocks_used / blocks, ctx->fs_badblocks_count,
+ ctx->fs_badblocks_count != 1 ? "s" : "");
+ printf(_("%8d large file%s\n"), ctx->large_files,
+ (ctx->large_files != 1) ? "s" : "");
+ printf ("\n%8d regular file%s\n"
+ "%8d director%s\n"
+ "%8d character device file%s\n"
+ "%8d block device file%s\n"
+ "%8d fifo%s\n"
+ "%8d link%s\n"
+ "%8d symbolic link%s (%d fast symbolic link%s)\n"
+ "%8d socket%s\n"
+ "--------\n"
+ "%8d file%s\n",
+ ctx->fs_regular_count,
+ (ctx->fs_regular_count != 1) ? "s" : "",
+ ctx->fs_directory_count,
+ (ctx->fs_directory_count != 1) ? "ies" : "y",
+ ctx->fs_chardev_count,
+ (ctx->fs_chardev_count != 1) ? "s" : "",
+ ctx->fs_blockdev_count,
+ (ctx->fs_blockdev_count != 1) ? "s" : "",
+ ctx->fs_fifo_count,
+ (ctx->fs_fifo_count != 1) ? "s" : "",
+ ctx->fs_links_count - dir_links,
+ ((ctx->fs_links_count - dir_links) != 1) ? "s" : "",
+ ctx->fs_symlinks_count,
+ (ctx->fs_symlinks_count != 1) ? "s" : "",
+ ctx->fs_fast_symlinks_count,
+ (ctx->fs_fast_symlinks_count != 1) ? "s" : "",
+ ctx->fs_sockets_count, (ctx->fs_sockets_count != 1) ? "s" : "",
+ ctx->fs_total_count - dir_links,
+ ((ctx->fs_total_count - dir_links) != 1) ? "s" : "");
+#endif
+}
+
+static void check_mount(e2fsck_t ctx)
+{
+ errcode_t retval;
+ int mount_flags, cont;
+
+ retval = ext2fs_check_if_mounted(ctx->filesystem_name, &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, then everything's fine.
+ */
+ if ((!(mount_flags & EXT2_MF_MOUNTED)) ||
+ ((mount_flags & EXT2_MF_ISROOT) &&
+ (mount_flags & EXT2_MF_READONLY)))
+ return;
+
+ if (ctx->options & E2F_OPT_READONLY) {
+ printf(_("Warning! %s is mounted.\n"), ctx->filesystem_name);
+ return;
+ }
+
+ printf(_("%s is mounted. "), ctx->filesystem_name);
+ if (!isatty(0) || !isatty(1))
+ fatal_error(ctx, _("Cannot continue, aborting.\n\n"));
+ printf(_("\n\n\007\007\007\007WARNING!!! "
+ "Running e2fsck on a mounted filesystem may cause\n"
+ "SEVERE filesystem damage.\007\007\007\n\n"));
+ cont = ask_yn(_("Do you really want to continue"), -1);
+ if (!cont) {
+ printf (_("check aborted.\n"));
+ exit (0);
+ }
+ return;
+}
+
+/*
+ * 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;
+ const char *reason = NULL;
+ unsigned int reason_arg = 0;
+
+ if ((ctx->options & E2F_OPT_FORCE) || bad_blocks_file ||
+ cflag || swapfs)
+ return;
+
+ if (fs->super->s_state & EXT2_ERROR_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 ((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;
+ } else if (fs->super->s_checkinterval &&
+ time(0) >= (fs->super->s_lastcheck +
+ fs->super->s_checkinterval)) {
+ reason = _(" has gone %u days without being checked");
+ reason_arg = (time(0) - fs->super->s_lastcheck)/(3600*24);
+ }
+ if (reason) {
+ fputs(ctx->device_name, stdout);
+ printf(reason, reason_arg);
+ fputs(_(", check forced.\n"), stdout);
+ return;
+ }
+ printf(_("%s: clean, %d/%d files, %d/%d blocks\n"), ctx->device_name,
+ fs->super->s_inodes_count - fs->super->s_free_inodes_count,
+ fs->super->s_inodes_count,
+ fs->super->s_blocks_count - fs->super->s_free_blocks_count,
+ fs->super->s_blocks_count);
+ 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];
+};
+struct percent_tbl e2fsck_tbl = {
+ 5, { 0, 70, 90, 92, 95, 100 }
+};
+static char bar[] =
+ "==============================================================="
+ "===============================================================";
+static char spaces[] =
+ " "
+ " ";
+
+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]);
+}
+
+extern void e2fsck_clear_progbar(e2fsck_t ctx)
+{
+ if (!(ctx->flags & E2F_FLAG_PROG_BAR))
+ return;
+
+ printf("%s\r", spaces + (sizeof(spaces) - 80));
+ ctx->flags &= ~E2F_FLAG_PROG_BAR;
+}
+
+static int e2fsck_update_progress(e2fsck_t ctx, int pass,
+ unsigned long cur, unsigned long max)
+{
+ static const char spinner[] = "\\|/-";
+ char buf[80];
+ int i;
+ float percent;
+ int tick;
+ struct timeval tv;
+ static int dpywidth = 0;
+
+ if (pass == 0)
+ return 0;
+
+ if (ctx->progress_fd) {
+ sprintf(buf, "%d %lu %lu\n", pass, cur, max);
+ write(ctx->progress_fd, buf, strlen(buf));
+ } else {
+ if (ctx->flags & E2F_FLAG_PROG_SUPPRESS)
+ return 0;
+ if (dpywidth == 0) {
+ dpywidth = 66 - strlen(ctx->device_name);
+ dpywidth = 8 * (dpywidth / 8);
+ }
+ /*
+ * Calculate the new progress position. If the
+ * percentage hasn't changed, then we skip out right
+ * away.
+ */
+ percent = calc_percent(&e2fsck_tbl, pass, cur, max);
+ if (ctx->progress_last_percent == (int) 10 * percent)
+ return 0;
+ ctx->progress_last_percent = (int) 10 * 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) &&
+ (cur != max) && (cur != 0))
+ 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;
+
+ i = ((percent * dpywidth) + 50) / 100;
+ printf("%s: |%s%s", ctx->device_name,
+ bar + (sizeof(bar) - (i+1)),
+ spaces + (sizeof(spaces) - (dpywidth - i + 1)));
+ if (percent == 100.0)
+ fputc('|', stdout);
+ else
+ fputc(spinner[ctx->progress_pos & 3], stdout);
+ printf(" %4.1f%% \r", percent);
+ if (percent == 100.0)
+ e2fsck_clear_progbar(ctx);
+ fflush(stdout);
+ }
+ return 0;
+}
+
+#define PATH_SET "PATH=/sbin"
+
+static void reserve_stdio_fds(void)
+{
+ int fd;
+
+ while (1) {
+ fd = open("/dev/null", O_RDWR);
+ if (fd > 2)
+ break;
+ if (fd < 0) {
+ fprintf(stderr, _("ERROR: Couldn't open "
+ "/dev/null (%s)\n"),
+ strerror(errno));
+ break;
+ }
+ }
+ close(fd);
+}
+
+#ifdef HAVE_SIGNAL_H
+static void signal_progress_on(int sig)
+{
+ e2fsck_t ctx = e2fsck_global_ctx;
+
+ if (!ctx)
+ return;
+
+ ctx->progress = e2fsck_update_progress;
+ ctx->progress_fd = 0;
+}
+
+static void signal_progress_off(int sig)
+{
+ e2fsck_t ctx = e2fsck_global_ctx;
+
+ if (!ctx)
+ return;
+
+ e2fsck_clear_progbar(ctx);
+ ctx->progress = 0;
+}
+#endif
+
+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
+
+ retval = e2fsck_allocate_context(&ctx);
+ if (retval)
+ return retval;
+
+ *ret_ctx = ctx;
+
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+ initialize_ext2_error_table();
+
+ if (argc && *argv)
+ ctx->program_name = *argv;
+ else
+ ctx->program_name = "e2fsck";
+ while ((c = getopt (argc, argv, "panyrcC:B:dfvtFVM:b:I:j:P:l:L:N:Ss")) != EOF)
+ switch (c) {
+ case 'C':
+ ctx->progress = e2fsck_update_progress;
+ ctx->progress_fd = atoi(optarg);
+ 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 'p':
+ case 'a':
+ ctx->options |= E2F_OPT_PREEN;
+ ctx->options &= ~(E2F_OPT_YES|E2F_OPT_NO);
+ break;
+ case 'n':
+ ctx->options |= E2F_OPT_NO;
+ ctx->options &= ~(E2F_OPT_YES|E2F_OPT_PREEN);
+ break;
+ case 'y':
+ ctx->options |= E2F_OPT_YES;
+ ctx->options &= ~(E2F_OPT_PREEN|E2F_OPT_NO);
+ 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':
+ ctx->use_superblock = atoi(optarg);
+ ctx->flags |= E2F_FLAG_SB_SPECIFIED;
+ break;
+ case 'B':
+ ctx->blocksize = atoi(optarg);
+ break;
+ case 'I':
+ ctx->inode_buffer_blocks = atoi(optarg);
+ break;
+ case 'j':
+ ctx->journal_name = optarg;
+ break;
+ case 'P':
+ ctx->process_inode_size = atoi(optarg);
+ break;
+ case 'L':
+ replace_bad_blocks++;
+ case 'l':
+ bad_blocks_file = (char *) malloc(strlen(optarg)+1);
+ if (!bad_blocks_file)
+ fatal_error(ctx,
+ "Couldn't malloc bad_blocks_file");
+ strcpy(bad_blocks_file, optarg);
+ 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 = optarg;
+ break;
+#ifdef ENABLE_SWAPFS
+ case 's':
+ normalize_swapfs = 1;
+ case 'S':
+ swapfs = 1;
+ break;
+#else
+ case 's':
+ case 'S':
+ fprintf(stderr, _("Byte-swapping filesystems "
+ "not compiled in this version "
+ "of e2fsck\n"));
+ exit(1);
+#endif
+ default:
+ usage(ctx);
+ }
+ if (show_version_only)
+ return 0;
+ if (optind != argc - 1)
+ usage(ctx);
+ if ((ctx->options & E2F_OPT_NO) && !bad_blocks_file &&
+ !cflag && !swapfs)
+ ctx->options |= E2F_OPT_READONLY;
+ ctx->filesystem_name = argv[optind];
+ 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);
+ }
+#ifdef ENABLE_SWAPFS
+ if (swapfs) {
+ if (cflag || bad_blocks_file) {
+ fprintf(stderr, _("Incompatible options not "
+ "allowed when byte-swapping.\n"));
+ exit(FSCK_USAGE);
+ }
+ }
+#endif
+ if (cflag && bad_blocks_file) {
+ fprintf(stderr, _("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));
+#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");
+ if (oldpath) {
+ char *newpath;
+
+ newpath = (char *) malloc(sizeof (PATH_SET) + 1 +
+ strlen (oldpath));
+ if (!newpath)
+ fatal_error(ctx, "Couldn't malloc() newpath");
+ strcpy (newpath, PATH_SET);
+ strcat (newpath, ":");
+ strcat (newpath, oldpath);
+ putenv (newpath);
+ } else
+ putenv (PATH_SET);
+ }
+ return 0;
+}
+
+static const char *my_ver_string = E2FSPROGS_VERSION;
+static const char *my_ver_date = E2FSPROGS_DATE;
+
+int main (int argc, char *argv[])
+{
+ errcode_t retval = 0;
+ int exit_value = FSCK_OK;
+ int i;
+ 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;
+ struct problem_context pctx;
+ int flags, run_result;
+
+ clear_problem_context(&pctx);
+#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);
+#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, _("Error: ext2fs library version "
+ "out of date!\n"));
+ show_version_only++;
+ }
+
+ retval = PRS(argc, argv, &ctx);
+ if (retval) {
+ com_err("e2fsck", retval,
+ _("while trying to initialize program"));
+ exit(FSCK_ERROR);
+ }
+ reserve_stdio_fds();
+
+#ifdef RESOURCE_TRACK
+ init_resource_track(&ctx->global_rtrack);
+#endif
+
+ if (!(ctx->options & E2F_OPT_PREEN) || show_version_only)
+ fprintf (stderr, "e2fsck %s (%s)\n", my_ver_string,
+ my_ver_date);
+
+ if (show_version_only) {
+ fprintf(stderr, _("\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 (!isatty (0) || !isatty (1))
+ fatal_error(ctx,
+ _("need terminal for interactive repairs"));
+ }
+ ctx->superblock = ctx->use_superblock;
+restart:
+#if 1
+ io_ptr = unix_io_manager;
+#else
+ io_ptr = test_io_manager;
+ test_io_backing_manager = unix_io_manager;
+#endif
+ flags = 0;
+ if ((ctx->options & E2F_OPT_READONLY) == 0)
+ flags |= EXT2_FLAG_RW;
+
+ if (ctx->superblock && ctx->blocksize) {
+ retval = ext2fs_open(ctx->filesystem_name, flags,
+ ctx->superblock, ctx->blocksize,
+ io_ptr, &fs);
+ } else if (ctx->superblock) {
+ for (i=0; possible_block_sizes[i]; i++) {
+ retval = ext2fs_open(ctx->filesystem_name, flags,
+ ctx->superblock,
+ possible_block_sizes[i],
+ io_ptr, &fs);
+ if (!retval)
+ break;
+ }
+ } else
+ retval = ext2fs_open(ctx->filesystem_name, flags,
+ 0, 0, io_ptr, &fs);
+ if (!ctx->superblock && !(ctx->options & E2F_OPT_PREEN) &&
+ !(ctx->flags & E2F_FLAG_SB_SPECIFIED) &&
+ ((retval == EXT2_ET_BAD_MAGIC) ||
+ ((retval == 0) && ext2fs_check_desc(fs)))) {
+ if (!fs || (fs->group_desc_count > 1)) {
+ printf(_("%s trying backup blocks...\n"),
+ retval ? _("Couldn't find ext2 superblock,") :
+ _("Group descriptors look bad..."));
+ get_backup_sb(ctx, fs, ctx->filesystem_name, io_ptr);
+ if (fs)
+ ext2fs_close(fs);
+ goto restart;
+ }
+ }
+ if (retval) {
+ com_err(ctx->program_name, retval, _("while trying to open %s"),
+ ctx->filesystem_name);
+ if (retval == EXT2_ET_REV_TOO_HIGH) {
+ printf(_("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)
+ printf(_("Could this be a zero-length partition?\n"));
+ else if ((retval == EPERM) || (retval == EACCES))
+ printf(_("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)
+ printf(_("Possibly non-existent or swap device?\n"));
+#ifdef EROFS
+ else if (retval == EROFS)
+ printf(_("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);
+ }
+ ctx->fs = fs;
+ fs->priv_data = ctx;
+ 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)) {
+ char *cp = malloc(sizeof(sb->s_volume_name)+1);
+ if (cp) {
+ strncpy(cp, sb->s_volume_name,
+ sizeof(sb->s_volume_name));
+ cp[sizeof(sb->s_volume_name)] = 0;
+ ctx->device_name = cp;
+ }
+ }
+ if (ctx->device_name == 0)
+ ctx->device_name = ctx->filesystem_name;
+
+ /*
+ * 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) {
+ printf(_("Warning: skipping journal recovery "
+ "because doing a read-only filesystem "
+ "check.\n"));
+ io_channel_flush(ctx->fs->io);
+ } else {
+ 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;
+ goto restart;
+ }
+ }
+
+ /*
+ * Check for compatibility with the feature sets. We need to
+ * be more stringent than ext2fs_open().
+ */
+ if ((sb->s_feature_compat & ~EXT2_LIB_FEATURE_COMPAT_SUPP) ||
+ (sb->s_feature_incompat & ~EXT2_LIB_FEATURE_INCOMPAT_SUPP)) {
+ com_err(ctx->program_name, EXT2_ET_UNSUPP_FEATURE,
+ "(%s)", ctx->device_name);
+ goto get_newer;
+ }
+ if (sb->s_feature_ro_compat & ~EXT2_LIB_FEATURE_RO_COMPAT_SUPP) {
+ com_err(ctx->program_name, EXT2_ET_RO_UNSUPP_FEATURE,
+ "(%s)", ctx->device_name);
+ goto get_newer;
+ }
+#ifdef ENABLE_COMPRESSION
+ if (sb->s_feature_incompat & EXT2_FEATURE_INCOMPAT_COMPRESSION)
+ com_err(ctx->program_name, 0,
+ _("Warning: compression support is experimental.\n"));
+#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);
+
+ /*
+ * Don't overwrite the backup superblock and block
+ * descriptors, until we're sure the filesystem is OK....
+ */
+ fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
+
+ ehandler_init(fs->io);
+
+ if (ctx->superblock)
+ set_latch_flags(PR_LATCH_RELOC, PRL_LATCHED, 0);
+ check_super_block(ctx);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ fatal_error(ctx, 0);
+ check_if_skip(ctx);
+ if (bad_blocks_file)
+ read_bad_blocks_file(ctx, bad_blocks_file, replace_bad_blocks);
+ else if (cflag)
+ test_disk(ctx);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ fatal_error(ctx, 0);
+#ifdef ENABLE_SWAPFS
+ if (normalize_swapfs) {
+ if ((fs->flags & EXT2_FLAG_SWAP_BYTES) ==
+ ext2fs_native_flag()) {
+ fprintf(stderr, _("%s: Filesystem byte order "
+ "already normalized.\n"), ctx->device_name);
+ fatal_error(ctx, 0);
+ }
+ }
+ if (swapfs) {
+ swap_filesys(ctx);
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
+ fatal_error(ctx, 0);
+ }
+#endif
+
+ /*
+ * Mark the system as valid, 'til proven otherwise
+ */
+ ext2fs_mark_valid(fs);
+
+ retval = ext2fs_read_bb_inode(fs, &fs->badblocks);
+ if (retval) {
+ com_err(ctx->program_name, retval,
+ _("while reading bad blocks inode"));
+ preenhalt(ctx);
+ printf(_("This doesn't bode well,"
+ " but we'll try to go on...\n"));
+ }
+
+ run_result = e2fsck_run(ctx);
+ e2fsck_clear_progbar(ctx);
+ if (run_result == E2F_FLAG_RESTART) {
+ printf(_("Restarting e2fsck from the beginning...\n"));
+ retval = e2fsck_reset_context(ctx);
+ if (retval) {
+ com_err(ctx->program_name, retval,
+ _("while resetting context"));
+ fatal_error(ctx, 0);
+ }
+ ext2fs_close(fs);
+ goto restart;
+ }
+ if (run_result & E2F_FLAG_SIGNAL_MASK)
+ fatal_error(ctx, 0);
+ if (run_result & E2F_FLAG_CANCEL)
+ ext2fs_unmark_valid(fs);
+
+#ifdef MTRACE
+ mtrace_print("Cleanup");
+#endif
+ if (ext2fs_test_changed(fs)) {
+ exit_value = FSCK_NONDESTRUCT;
+ if (!(ctx->options & E2F_OPT_PREEN))
+ printf(_("\n%s: ***** FILE SYSTEM WAS MODIFIED *****\n"),
+ ctx->device_name);
+ if (root_filesystem && !read_only_root) {
+ printf(_("%s: ***** REBOOT LINUX *****\n"),
+ ctx->device_name);
+ exit_value = FSCK_REBOOT;
+ }
+ }
+ if (ext2fs_test_valid(fs))
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+ else {
+ printf(_("\n%s: ********** WARNING: Filesystem still has "
+ "errors **********\n\n"), ctx->device_name);
+ exit_value = FSCK_UNCORRECTED;
+ }
+ 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;
+ sb->s_lastcheck = time(NULL);
+ ext2fs_mark_super_dirty(fs);
+ }
+ show_stats(ctx);
+
+ e2fsck_write_bitmaps(ctx);
+
+ ext2fs_close(fs);
+ ctx->fs = NULL;
+ e2fsck_free_context(ctx);
+
+#ifdef RESOURCE_TRACK
+ if (ctx->options & E2F_OPT_TIME)
+ print_resource_track(NULL, &ctx->global_rtrack);
+#endif
+
+ return exit_value;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/util.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/util.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsck/util.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,416 @@
+/*
+ * 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 <unistd.h>
+#include <string.h>
+#include <ctype.h>
+
+#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
+#include <stdio.h>
+#define read_a_char() getchar()
+#endif
+
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
+#include "e2fsck.h"
+
+#include <sys/time.h>
+#include <sys/resource.h>
+
+void fatal_error(e2fsck_t ctx, const char *msg)
+{
+ if (msg)
+ fprintf (stderr, "e2fsck: %s\n", msg);
+ if (ctx->fs && ctx->fs->io) {
+ if (ctx->fs->io->magic == EXT2_ET_MAGIC_IO_CHANNEL)
+ io_channel_flush(ctx->fs->io);
+ else
+ fprintf(stderr, "e2fsck: io manager magic bad!\n");
+ }
+ ctx->flags |= E2F_FLAG_ABORT;
+ if (ctx->flags & E2F_FLAG_SETJMP_OK)
+ longjmp(ctx->abort_loc, 1);
+ exit(FSCK_ERROR);
+}
+
+void *e2fsck_allocate_memory(e2fsck_t ctx, unsigned int size,
+ const char *description)
+{
+ void *ret;
+ char buf[256];
+
+#ifdef DEBUG_ALLOCATE_MEMORY
+ printf("Allocating %d bytes for %s...\n", size, description);
+#endif
+ ret = malloc(size);
+ if (!ret) {
+ sprintf(buf, "Can't allocate %s\n", description);
+ fatal_error(ctx, buf);
+ }
+ memset(ret, 0, size);
+ return ret;
+}
+
+int ask_yn(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)");
+ printf("%s%s? ", string, defstr);
+ while (1) {
+ fflush (stdout);
+ if ((c = read_a_char()) == EOF)
+ break;
+ if (strchr(short_yes, (char) c)) {
+ def = 1;
+ break;
+ }
+ else if (strchr(short_no, (char) c)) {
+ def = 0;
+ break;
+ }
+ else if ((c == ' ' || c == '\n') && (def != -1))
+ break;
+ }
+ if (def)
+ printf ("yes\n\n");
+ else
+ printf ("no\n\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) {
+ printf (_("%s? no\n\n"), string);
+ return 0;
+ }
+ if (ctx->options & E2F_OPT_YES) {
+ printf (_("%s? yes\n\n"), string);
+ return 1;
+ }
+ if (ctx->options & E2F_OPT_PREEN) {
+ printf ("%s? %s\n\n", string, def ? _("yes") : _("no"));
+ return def;
+ }
+ return ask_yn(string, def);
+}
+
+void e2fsck_read_bitmaps(e2fsck_t ctx)
+{
+ ext2_filsys fs = ctx->fs;
+ errcode_t retval;
+
+ 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);
+ }
+
+ ehandler_operation(_("reading inode and block bitmaps"));
+ retval = ext2fs_read_bitmaps(fs);
+ ehandler_operation(0);
+ 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;
+
+ if (ext2fs_test_bb_dirty(fs)) {
+ ehandler_operation(_("writing block bitmaps"));
+ retval = ext2fs_write_block_bitmap(fs);
+ ehandler_operation(0);
+ if (retval) {
+ com_err(ctx->program_name, retval,
+ _("while retrying to write block bitmaps for %s"),
+ ctx->device_name);
+ fatal_error(ctx, 0);
+ }
+ }
+
+ if (ext2fs_test_ib_dirty(fs)) {
+ ehandler_operation(_("writing inode bitmaps"));
+ retval = ext2fs_write_inode_bitmap(fs);
+ ehandler_operation(0);
+ if (retval) {
+ com_err(ctx->program_name, retval,
+ _("while retrying to write 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;
+ fprintf(stderr, _("\n\n%s: UNEXPECTED INCONSISTENCY; "
+ "RUN fsck MANUALLY.\n\t(i.e., without -a or -p options)\n"),
+ ctx->device_name);
+ 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)
+{
+#ifdef HAVE_GETRUSAGE
+ struct rusage r;
+#endif
+
+ 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
+}
+
+#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(const char *desc, struct resource_track *track)
+{
+#ifdef HAVE_GETRUSAGE
+ struct rusage r;
+#endif
+#ifdef HAVE_MALLINFO
+ struct mallinfo malloc_info;
+#endif
+ struct timeval time_end;
+
+ gettimeofday(&time_end, 0);
+
+ if (desc)
+ printf("%s: ", desc);
+
+#ifdef HAVE_MALLINFO
+#define kbytes(x) (((x) + 1023) / 1024)
+
+ malloc_info = mallinfo();
+ printf(_("Memory used: %dk/%dk (%dk/%dk), "),
+ kbytes(malloc_info.arena), kbytes(malloc_info.hblkhd),
+ kbytes(malloc_info.uordblks), kbytes(malloc_info.fordblks));
+#else
+ printf(_("Memory used: %d, "),
+ (int) (((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
+}
+#endif /* RESOURCE_TRACK */
+
+void e2fsck_read_inode(e2fsck_t ctx, unsigned long ino,
+ struct ext2_inode * inode, const char *proc)
+{
+ int retval;
+
+ retval = ext2fs_read_inode(ctx->fs, ino, inode);
+ if (retval) {
+ com_err("ext2fs_read_inode", retval,
+ _("while reading inode %ld in %s"), ino, proc);
+ fatal_error(ctx, 0);
+ }
+}
+
+extern void e2fsck_write_inode(e2fsck_t ctx, unsigned long ino,
+ struct ext2_inode * inode, const char *proc)
+{
+ int retval;
+
+ retval = ext2fs_write_inode(ctx->fs, ino, inode);
+ if (retval) {
+ com_err("ext2fs_write_inode", retval,
+ _("while writing inode %ld 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
+
+blk_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;
+ blk_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=1024; blocksize <= 8192 ; blocksize = blocksize*2) {
+ superblock = blocksize*8;
+ if (blocksize == 1024)
+ superblock++;
+ io_channel_set_blksize(io, blocksize);
+ if (io_channel_read_blk(io, superblock,
+ -SUPERBLOCK_SIZE, buf))
+ continue;
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if (sb->s_magic == ext2fs_swab16(EXT2_SUPER_MAGIC))
+ ext2fs_swap_super(sb);
+#endif
+ if (sb->s_magic == EXT2_SUPER_MAGIC) {
+ ret_sb = 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;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsprogs.lsm
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsprogs.lsm 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsprogs.lsm 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,16 @@
+Begin3
+Title: EXT2 Filesystem utilities
+Version: 1.27
+Entered-date: 08Mar2002
+Description: The filesystem utilities for the EXT2 filesystem, including
+ e2fsck, mke2fs, dumpe2fs, fsck, and others.
+Keywords: utilities, fsck, filesystem, Ext2fs
+Author: tytso at mit.edu (Theodore Tso)
+Maintained-by: tytso at mit.edu (Theodore Tso)
+Primary-site: download.sourceforge.net /pub/sourceforge/e2fsprogs
+ 1340kB e2fsprogs-1.27.tar.gz
+ 1kB e2fsprogs-1.27.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
+Copying-policy: GPL/LGPL
+End
Added: trunk/yaboot/lib/e2fsprogs-1.27/e2fsprogs.spec
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/e2fsprogs.spec 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/e2fsprogs.spec 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,145 @@
+Summary: Utilities for managing the second extended (ext2) filesystem.
+Name: e2fsprogs
+Version: 1.27
+Release: 0
+Copyright: GPL
+Group: System Environment/Base
+Buildroot: /var/tmp/%{name}-root
+Source: ftp://download.sourceforge.net/pub/sourceforge/e2fsprogs/e2fsprogs-%{version}.tar.gz
+Prereq: /sbin/ldconfig
+
+%description
+The e2fsprogs package contains a number of utilities for creating,
+checking, modifying and correcting any inconsistencies in second
+extended (ext2) 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
+filesystems (if you're not sure, you probably should install this
+package).
+
+%package devel
+Summary: Ext2 filesystem-specific static libraries and headers.
+Group: Development/Libraries
+Requires: e2fsprogs
+
+%description devel
+E2fsprogs-devel contains the libraries and header files needed to
+develop second extended (ext2) filesystem-specific programs.
+
+You should install e2fsprogs-devel if you want to develop ext2
+filesystem-specific programs. If you install e2fsprogs-devel, you'll
+also need to install e2fsprogs.
+
+%prep
+%setup
+
+%build
+CFLAGS="$RPM_OPT_FLAGS" ; export CFLAGS
+./configure --enable-elf-shlibs --mandir=%{_mandir} --infodir=%{_infodir}
+
+make libs progs docs
+
+%install
+rm -rf $RPM_BUILD_ROOT
+export PATH=/sbin:$PATH
+make install install-libs DESTDIR="$RPM_BUILD_ROOT"
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/ldconfig
+# Remove possibly old version
+/bin/rm -f /usr/sbin/resize2fs
+
+%postun -p /sbin/ldconfig
+
+%post devel
+if [ -x /sbin/install-info ]; then
+ /sbin/install-info %{_infodir}/libext2fs.info.gz %{_infodir}/dir
+fi
+
+%postun devel
+if [ $1 = 0 -a -x /sbin/install-info ]; then
+ /sbin/install-info --delete %{_infodir}/libext2fs.info.gz %{_infodir}/dir
+fi
+
+%files
+%defattr(-,root,root)
+%doc README RELEASE-NOTES
+
+/sbin/badblocks
+/sbin/debugfs
+/sbin/dumpe2fs
+/sbin/e2fsck
+/sbin/e2label
+/sbin/e2image
+/sbin/fsck
+/sbin/fsck.ext2
+/sbin/fsck.ext3
+/sbin/mke2fs
+/sbin/mkfs.ext2
+/sbin/mkfs.ext3
+/sbin/tune2fs
+/sbin/resize2fs
+/usr/sbin/mklost+found
+
+/lib/libcom_err.so.*
+/lib/libe2p.so.*
+/lib/libext2fs.so.*
+/lib/libss.so.*
+/lib/libuuid.so.*
+
+/usr/bin/chattr
+/usr/bin/lsattr
+/usr/bin/uuidgen
+%{_mandir}/man1/chattr.1*
+%{_mandir}/man1/lsattr.1*
+%{_mandir}/man1/uuidgen.1*
+
+%{_mandir}/man8/badblocks.8*
+%{_mandir}/man8/debugfs.8*
+%{_mandir}/man8/dumpe2fs.8*
+%{_mandir}/man8/e2fsck.8*
+%{_mandir}/man8/e2label.8*
+%{_mandir}/man8/e2image.8*
+%{_mandir}/man8/fsck.8*
+%{_mandir}/man8/mke2fs.8*
+%{_mandir}/man8/mklost+found.8*
+%{_mandir}/man8/resize2fs.8*
+%{_mandir}/man8/tune2fs.8*
+
+%files devel
+%defattr(-,root,root)
+%{_infodir}/libext2fs.info*
+/usr/bin/compile_et
+/usr/bin/mk_cmds
+
+/usr/lib/libcom_err.a
+/usr/lib/libcom_err.so
+/usr/lib/libe2p.a
+/usr/lib/libe2p.so
+/usr/lib/libext2fs.a
+/usr/lib/libext2fs.so
+/usr/lib/libss.a
+/usr/lib/libss.so
+/usr/lib/libuuid.a
+/usr/lib/libuuid.so
+
+/usr/share/et
+/usr/share/ss
+/usr/include/et
+/usr/include/ext2fs
+/usr/include/ss
+/usr/include/uuid
+%{_mandir}/man1/compile_et.1*
+%{_mandir}/man3/com_err.3*
+%{_mandir}/man3/libuuid.3*
+%{_mandir}/man3/uuid*.3*
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,51 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-25 <tytso at valinux.com>
+
+ * config.h: Add #define's for strcasecmp and strncasecmp
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/asm/types.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/asm/types.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/asm/types.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+#include "../linux/types.h"
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/config.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/config.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/config.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/dirent.h
===================================================================
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/getopt.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/getopt.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/getopt.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 */
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/grp.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/grp.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/grp.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/linux/types.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/linux/types.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/linux/types.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 */
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/pwd.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/pwd.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/pwd.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/file.h
===================================================================
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/ioctl.h
===================================================================
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/param.h
===================================================================
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/resource.h
===================================================================
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/socket.h
===================================================================
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/time.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/time.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/time.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+#include <time.h>
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/sys/wait.h
===================================================================
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/termios.h
===================================================================
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/unistd.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/unistd.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/unistd.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
+
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/utime.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/utime.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/include/nonunix/utime.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+#include <sys/utime.h>
Added: trunk/yaboot/lib/e2fsprogs-1.27/install-sh
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/install-sh 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/install-sh 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/install-sh
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/install-utils/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/install-utils/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/install-utils/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,117 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+2000-04-02 Theodore Ts'o <tytso at valinux.com>
+
+ * Add e2label.8 to the remove_preformat_manpages script.
+ (Probably isn't being used any more, but...)
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-07-18 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.15
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.11
+
+Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * Release of E2fsprogs version 1.10
+
+Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.09
+
+Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.08
+
+Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * Release of E2fsprogs version 1.07
+
+Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.06
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
+Thu May 16 11:12:30 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.04
+
+Wed Mar 27 00:33:40 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.03
+
+Wed Jan 31 11:06:08 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.02
+
+Sat Mar 11 18:26:33 1995 Theodore Y. Ts'o <tytso at localhost>
+
+ * compile_manpages: Include an exit 0 at the end because some
+ implementations of man exit with a status of 1.
Added: trunk/yaboot/lib/e2fsprogs-1.27/install-utils/compile_manpages
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/install-utils/compile_manpages 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/install-utils/compile_manpages 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/install-utils/compile_manpages
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/install-utils/convfstab
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/install-utils/convfstab 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/install-utils/convfstab 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,78 @@
+#!/bin/sh
+# Make /etc/fstab standard compliant.
+# M.Weller (eowmob at 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 -o $# -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
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/install-utils/convfstab
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/install-utils/remove_preformat_manpages
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/install-utils/remove_preformat_manpages 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/install-utils/remove_preformat_manpages 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/install-utils/remove_preformat_manpages
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2 @@
+Makefile
+po2tbl.sed
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1126 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+1998-04-29 Ulrich Drepper <drepper at cygnus.com>
+
+ * intl/localealias.c (read_alias_file): Use unsigned char for
+ local variables. Remove unused variable tp.
+ * intl/l10nflist.c (_nl_normalize_codeset): Use unsigned char *
+ for type of codeset. For losing Solaris systems.
+ * intl/loadinfo.h: Adapt prototype of _nl_normalize_codeset.
+ * intl/bindtextdom.c (BINDTEXTDOMAIN): Don't define local variable
+ len if not needed.
+ Patches by Jim Meyering.
+
+1998-04-28 Ulrich Drepper <drepper at cygnus.com>
+
+ * loadmsgcat.c (_nl_load_domain): Don't assign the element use_mmap if
+ mmap is not supported.
+
+ * hash-string.h: Don't include <values.h>.
+
+1998-04-27 Ulrich Drepper <drepper at cygnus.com>
+
+ * textdomain.c: Use strdup is available.
+
+ * localealias.c: Define HAVE_MEMPCPY so that we can use this
+ function. Define and use semapahores to protect modfication of
+ global objects when compiling for glibc. Add code to allow
+ freeing alias table.
+
+ * l10nflist.c: Don't assume stpcpy not being a macro.
+
+ * gettextP.h: Define internal_function macri if not already done.
+ Use glibc byte-swap macros instead of defining SWAP when compiled
+ for glibc.
+ (struct loaded_domain): Add elements to allow unloading.
+
+ * Makefile.in (distclean): Don't remove libintl.h here.
+
+ * bindtextdomain.c: Carry over changes from glibc. Use strdup if
+ available.
+
+ * dcgettext.c: Don't assume stpcpy not being a macro. Mark internal
+ functions. Add memory freeing code for glibc.
+
+ * dgettext.c: Update copyright.
+
+ * explodename.c: Include stdlib.h and string.h only if they exist.
+ Use strings.h eventually.
+
+ * finddomain.c: Mark internal functions. Use strdup if available.
+ Add memory freeing code for glibc.
+
+1997-10-10 20:00 Ulrich Drepper <drepper at cygnus.com>
+
+ * libgettext.h: Fix dummy textdomain and bindtextdomain macros.
+ They should return reasonable values.
+ Reported by Tom Tromey <tromey at cygnus.com>.
+
+1997-09-16 03:33 Ulrich Drepper <drepper at cygnus.com>
+
+ * libgettext.h: Define PARAMS also to `args' if __cplusplus is defined.
+ * intlh.inst.in: Likewise.
+ Reported by Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes at inria.fr>.
+
+ * libintl.glibc: Update from current glibc version.
+
+1997-09-06 02:10 Ulrich Drepper <drepper at cygnus.com>
+
+ * intlh.inst.in: Reformat copyright.
+
+1997-08-19 15:22 Ulrich Drepper <drepper at cygnus.com>
+
+ * dcgettext.c (DCGETTEXT): Remove wrong comment.
+
+1997-08-16 00:13 Ulrich Drepper <drepper at cygnus.com>
+
+ * Makefile.in (install-data): Don't change directory to install.
+
+1997-08-01 14:30 Ulrich Drepper <drepper at cygnus.com>
+
+ * cat-compat.c: Fix copyright.
+
+ * localealias.c: Don't define strchr unless !HAVE_STRCHR.
+
+ * loadmsgcat.c: Update copyright. Fix typos.
+
+ * l10nflist.c: Don't define strchr unless !HAVE_STRCHR.
+ (_nl_make_l10nflist): Handle sponsor and revision correctly.
+
+ * gettext.c: Update copyright.
+ * gettext.h: Likewise.
+ * hash-string.h: Likewise.
+
+ * finddomain.c: Remoave dead code. Define strchr only if
+ !HAVE_STRCHR.
+
+ * explodename.c: Include <sys/types.h>.
+
+ * explodename.c: Reformat copyright text.
+ (_nl_explode_name): Fix typo.
+
+ * dcgettext.c: Define and use __set_errno.
+ (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is
+ not defined.
+
+ * bindtextdom.c: Pretty printing.
+
+1997-05-01 02:25 Ulrich Drepper <drepper at cygnus.com>
+
+ * dcgettext.c (guess_category_value): Don't depend on
+ HAVE_LC_MESSAGES. We don't need the macro here.
+ Patch by Bruno Haible <haible at ilog.fr>.
+
+ * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL
+ macro. Instead use HAVE_LOCALE_NULL and define it when using
+ glibc, as in dcgettext.c.
+ Patch by Bruno Haible <haible at ilog.fr>.
+
+ * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois
+ Pinard.
+
+Mon Mar 10 06:51:17 1997 Ulrich Drepper <drepper at cygnus.com>
+
+ * Makefile.in: Implement handling of libtool.
+
+ * gettextP.h: Change data structures for use of generic lowlevel
+ i18n file handling.
+
+Wed Dec 4 20:21:18 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * textdomain.c: Put parentheses around arguments of memcpy macro
+ definition.
+ * localealias.c: Likewise.
+ * l10nflist.c: Likewise.
+ * finddomain.c: Likewise.
+ * bindtextdom.c: Likewise.
+ Reported by Thomas Esken.
+
+Mon Nov 25 22:57:51 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * textdomain.c: Move definition of `memcpy` macro to right
+ position.
+
+Fri Nov 22 04:01:58 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using
+ bcopy if not already defined. Reported by Thomas Esken.
+ * bindtextdom.c: Likewise.
+ * l10nflist.c: Likewise.
+ * localealias.c: Likewise.
+ * textdomain.c: Likewise.
+
+Tue Oct 29 11:10:27 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * Makefile.in (libdir): Change to use exec_prefix instead of
+ prefix. Reported by Knut-HåvardAksnes <etokna at eto.ericsson.se>.
+
+Sat Aug 31 03:07:09 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * l10nflist.c (_nl_normalize_codeset): We convert to lower case,
+ so don't prepend uppercase `ISO' for only numeric arg.
+
+Fri Jul 19 00:15:46 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after
+ definition of _GNU_SOURCE. Patch by Roland McGrath.
+
+ * Makefile.in (uninstall): Fix another bug with `for' loop and
+ empty arguments. Patch by Jim Meyering. Correct name os
+ uninstalled files: no intl- prefix anymore.
+
+ * Makefile.in (install-data): Again work around shells which
+ cannot handle mpty for list. Reported by Jim Meyering.
+
+Sat Jul 13 18:11:35 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * Makefile.in (install): Split goal. Now depend on install-exec
+ and install-data.
+ (install-exec, install-data): New goals. Created from former
+ install goal.
+ Reported by Karl Berry.
+
+Sat Jun 22 04:58:14 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * Makefile.in (MKINSTALLDIRS): New variable. Path to
+ mkinstalldirs script.
+ (install): use MKINSTALLDIRS variable or if the script is not present
+ try to find it in the $top_scrdir).
+
+Wed Jun 19 02:56:56 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * l10nflist.c: Linux libc *partly* includes the argz_* functions.
+ Grr. Work around by renaming the static version and use macros
+ for renaming.
+
+Tue Jun 18 20:11:17 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * l10nflist.c: Correct presence test macros of __argz_* functions.
+
+ * l10nflist.c: Include <argz.h> based on test of it instead when
+ __argz_* functions are available.
+ Reported by Andreas Schwab.
+
+Thu Jun 13 15:17:44 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * explodename.c, l10nflist.c: Define NULL for dumb systems.
+
+Tue Jun 11 17:05:13 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * intlh.inst.in, libgettext.h (dcgettext): Rename local variable
+ result to __result to prevent name clash.
+
+ * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to
+ get prototype for stpcpy and strcasecmp.
+
+ * intlh.inst.in, libgettext.h: Move declaration of
+ `_nl_msg_cat_cntr' outside __extension__ block to prevent warning
+ from gcc's -Wnested-extern option.
+
+Fri Jun 7 01:58:00 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * Makefile.in (install): Remove comment.
+
+Thu Jun 6 17:28:17 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * Makefile.in (install): Work around for another Buglix stupidity.
+ Always use an `else' close for `if's. Reported by Nelson Beebe.
+
+ * Makefile.in (intlh.inst): Correct typo in phony rule.
+ Reported by Nelson Beebe.
+
+Thu Jun 6 01:49:52 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * dcgettext.c (read_alias_file): Rename variable alloca_list to
+ block_list as the macro calls assume.
+ Patch by Eric Backus.
+
+ * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using
+ malloc.
+ (read_alias_file): Rename varriabe alloca_list to block_list as the
+ macro calls assume.
+ Patch by Eric Backus.
+
+ * l10nflist.c: Correct conditional for <argz.h> inclusion.
+ Reported by Roland McGrath.
+
+ * Makefile.in (all): Depend on all- at USE_INCLUDED_LIBINTL@, not
+ all- at USE_NLS@.
+
+ * Makefile.in (install): intlh.inst comes from local dir, not
+ $(srcdir).
+
+ * Makefile.in (intlh.inst): Special handling of this goal. If
+ used in gettext, this is really a rul to construct this file. If
+ used in any other package it is defined as a .PHONY rule with
+ empty body.
+
+ * finddomain.c: Extract locale file information handling into
+ l10nfile.c. Rename local stpcpy__ function to stpcpy.
+
+ * dcgettext.c (stpcpy): Add local definition.
+
+ * l10nflist.c: Solve some portability problems. Patches partly by
+ Thomas Esken. Add local definition of stpcpy.
+
+Tue Jun 4 02:47:49 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * intlh.inst.in: Don't depend including <locale.h> on
+ HAVE_LOCALE_H. Instead configure must rewrite this fiile
+ depending on the result of the configure run.
+
+ * Makefile.in (install): libintl.inst is now called intlh.inst.
+ Add rules for updating intlh.inst from intlh.inst.in.
+
+ * libintl.inst: Renamed to intlh.inst.in.
+
+ * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1
+ because gcc has __buitlin_alloca.
+ Reported by Roland McGrath.
+
+Mon Jun 3 00:32:16 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * Makefile.in (installcheck): New goal to fulfill needs of
+ automake's distcheck.
+
+ * Makefile.in (install): Reorder commands so that VERSION is
+ found.
+
+ * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in
+ @datadir@/gettext.
+ (COMSRCS): Add l10nfile.c.
+ (OBJECTS): Add l10nfile.o.
+ (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common).
+ (DISTFILE.gettext): Remove $(DISTFILES.common).
+ (all-gettext): Remove goal.
+ (install): If $(PACKAGE) = gettext install, otherwose do nothing. No
+ package but gettext itself should install libintl.h + headers.
+ (dist): Extend goal to work for gettext, too.
+ (dist-gettext): Remove goal.
+
+ * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc.
+
+Sun Jun 2 17:33:06 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * loadmsgcat.c (_nl_load_domain): Parameter is now comes from
+ find_l10nfile.
+
+Sat Jun 1 02:23:03 1996 Ulrich Drepper <drepper at cygnus.com>
+
+ * l10nflist.c (__argz_next): Add definition.
+
+ * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca
+ code. Use new l10nfile handling.
+
+ * localealias.c [!HAVE_ALLOCA]: Add code for handling missing
+ alloca code.
+
+ * l10nflist.c: Initial revision.
+
+Tue Apr 2 18:51:18 1996 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (all-gettext): New goal. Same as all-yes.
+
+Thu Mar 28 23:01:22 1996 Karl Eichwalder <ke at ke.central.de>
+
+ * Makefile.in (gettextsrcdir): Define using @datadir at .
+
+Tue Mar 26 12:39:14 1996 Ulrich Drepper <drepper at myware>
+
+ * finddomain.c: Include <ctype.h>. Reported by Roland McGrath.
+
+Sat Mar 23 02:00:35 1996 Ulrich Drepper <drepper at myware>
+
+ * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing
+ with external declaration.
+
+Sat Mar 2 00:47:09 1996 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (all-no): Rename from all_no.
+
+Sat Feb 17 00:25:59 1996 Ulrich Drepper <drepper at myware>
+
+ * gettextP.h [loaded_domain]: Array `successor' must now contain up
+ to 63 elements (because of codeset name normalization).
+
+ * finddomain.c: Implement codeset name normalization.
+
+Thu Feb 15 04:39:09 1996 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (all): Define to `all- at USE_NLS@'.
+ (all-yes, all_no): New goals. `all-no' is noop, `all-yes'
+ is former all.
+
+Mon Jan 15 21:46:01 1996 Howard Gayle <howard at hal.com>
+
+ * localealias.c (alias_compare): Increment string pointers in loop
+ of strcasecmp replacement.
+
+Fri Dec 29 21:16:34 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (install-src): Who commented this goal out ? :-)
+
+Fri Dec 29 15:08:16 1995 Ulrich Drepper <drepper at myware>
+
+ * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls
+ should not effect it because a missing catalog is no error.
+ Reported by Harald K<o:>nig <koenig at tat.physik.uni-tuebingen.de>.
+
+Tue Dec 19 22:09:13 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (Makefile): Explicitly use $(SHELL) for running
+ shell scripts.
+
+Fri Dec 15 17:34:59 1995 Andreas Schwab <schwab at issan.informatik.uni-dortmund.de>
+
+ * Makefile.in (install-src): Only install library and header when
+ we use the own implementation. Don't do it when using the
+ system's gettext or catgets functions.
+
+ * dcgettext.c (find_msg): Must not swap domain->hash_size here.
+
+Sat Dec 9 16:24:37 1995 Ulrich Drepper <drepper at myware>
+
+ * localealias.c, libintl.inst, libgettext.h, hash-string.h,
+ gettextP.h, finddomain.c, dcgettext.c, cat-compat.c:
+ Use PARAMS instead of __P. Suggested by Roland McGrath.
+
+Tue Dec 5 11:39:14 1995 Larry Schwimmer <rosebud at cyclone.stanford.edu>
+
+ * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if
+ !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty.
+
+Mon Dec 4 15:42:07 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (install-src):
+ Install libintl.inst instead of libintl.h.install.
+
+Sat Dec 2 22:51:38 1995 Marcus Daniels <marcus at sysc.pdx.edu>
+
+ * cat-compat.c (textdomain):
+ Reverse order in which files are tried you load. First
+ try local file, when this failed absolute path.
+
+Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe <beebe at math.utah.edu>
+
+ * cat-compat.c (bindtextdomain): Add missing { }.
+
+Sun Nov 26 18:21:41 1995 Ulrich Drepper <drepper at myware>
+
+ * libintl.inst: Add missing __P definition. Reported by Nelson Beebe.
+
+ * Makefile.in:
+ Add dummy `all' and `dvi' goals. Reported by Tom Tromey.
+
+Sat Nov 25 16:12:01 1995 Franc,ois Pinard <pinard at iro.umontreal.ca>
+
+ * hash-string.h: Capitalize arguments of macros.
+
+Sat Nov 25 12:01:36 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (DISTFILES): Prevent files names longer than 13
+ characters. libintl.h.glibc->libintl.glibc,
+ libintl.h.install->libintl.inst. Reported by Joshua R. Poulson.
+
+Sat Nov 25 11:31:12 1995 Eric Backus <ericb at lsid.hp.com>
+
+ * dcgettext.c: Fix bug in preprocessor conditionals.
+
+Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe <beebe at math.utah.edu>
+
+ * libgettext.h: Solaris cc does not understand
+ #if !SYMBOL1 && !SYMBOL2. Sad but true.
+
+Thu Nov 23 16:22:14 1995 Ulrich Drepper <drepper at myware>
+
+ * hash-string.h (hash_string):
+ Fix for machine with >32 bit `unsigned long's.
+
+ * dcgettext.c (DCGETTEXT):
+ Fix horrible bug in loop for alternative translation.
+
+Thu Nov 23 01:45:29 1995 Ulrich Drepper <drepper at myware>
+
+ * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed:
+ Some further simplifications in message number generation.
+
+Mon Nov 20 21:08:43 1995 Ulrich Drepper <drepper at myware>
+
+ * libintl.h.glibc: Use __const instead of const in prototypes.
+
+ * Makefile.in (install-src):
+ Install libintl.h.install instead of libintl.h. This
+ is a stripped-down version. Suggested by Peter Miller.
+
+ * libintl.h.install, libintl.h.glibc: Initial revision.
+
+ * localealias.c (_nl_expand_alias, read_alias_file):
+ Protect prototypes in type casts by __P.
+
+Tue Nov 14 16:43:58 1995 Ulrich Drepper <drepper at myware>
+
+ * hash-string.h: Correct prototype for hash_string.
+
+Sun Nov 12 12:42:30 1995 Ulrich Drepper <drepper at myware>
+
+ * hash-string.h (hash_string): Add prototype.
+
+ * gettextP.h: Fix copyright.
+ (SWAP): Add prototype.
+
+Wed Nov 8 22:56:33 1995 Ulrich Drepper <drepper at myware>
+
+ * localealias.c (read_alias_file): Forgot sizeof.
+ Avoid calling *printf function. This introduces a big overhead.
+ Patch by Roland McGrath.
+
+Tue Nov 7 14:21:08 1995 Ulrich Drepper <drepper at myware>
+
+ * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy.
+
+ * finddomain.c (stpcpy):
+ Define substitution function local. The macro was to flaky.
+
+ * cat-compat.c: Fix typo.
+
+ * xopen-msg.sed, linux-msg.sed:
+ While bringing message number to right place only accept digits.
+
+ * linux-msg.sed, xopen-msg.sed: Now that the counter does not have
+ leading 0s we don't need to remove them. Reported by Marcus
+ Daniels.
+
+ * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in
+ dependency. Reported by Marcus Daniels.
+
+ * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement.
+ Generally cleanup using #if instead of #ifndef.
+
+ * Makefile.in: Correct typos in comment. By Franc,ois Pinard.
+
+Mon Nov 6 00:27:02 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (install-src): Don't install libintl.h and libintl.a
+ if we use an available gettext implementation.
+
+Sun Nov 5 22:02:08 1995 Ulrich Drepper <drepper at myware>
+
+ * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported
+ by Franc,ois Pinard.
+
+ * libgettext.h: Use #if instead of #ifdef/#ifndef.
+
+ * finddomain.c:
+ Comments describing what has to be done should start with FIXME.
+
+Sun Nov 5 19:38:01 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning.
+ DISTFILES.common names the files common to both dist goals.
+ DISTFILES.gettext are the files only distributed in GNU gettext.
+
+Sun Nov 5 17:32:54 1995 Ulrich Drepper <drepper at myware>
+
+ * dcgettext.c (DCGETTEXT): Correct searching in derived locales.
+ This was necessary since a change in _nl_find_msg several weeks
+ ago. I really don't know this is still not fixed.
+
+Sun Nov 5 12:43:12 1995 Ulrich Drepper <drepper at myware>
+
+ * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This
+ might mark a special condition.
+
+ * finddomain.c (make_entry_rec): Don't make illegal entry as decided.
+
+ * Makefile.in (dist): Suppress error message when ln failed.
+ Get files from $(srcdir) explicitly.
+
+ * libgettext.h (gettext_const): Rename to gettext_noop.
+
+Fri Nov 3 07:36:50 1995 Ulrich Drepper <drepper at myware>
+
+ * finddomain.c (make_entry_rec):
+ Protect against wrong locale names by testing mask.
+
+ * libgettext.h (gettext_const): Add macro definition.
+ Capitalize macro arguments.
+
+Thu Nov 2 23:15:51 1995 Ulrich Drepper <drepper at myware>
+
+ * finddomain.c (_nl_find_domain):
+ Test for pointer != NULL before accessing value.
+ Reported by Tom Tromey.
+
+ * gettext.c (NULL):
+ Define as (void*)0 instad of 0. Reported by Franc,ois Pinard.
+
+Mon Oct 30 21:28:52 1995 Ulrich Drepper <drepper at myware>
+
+ * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering.
+
+Sat Oct 28 23:20:47 1995 Ulrich Drepper <drepper at myware>
+
+ * libgettext.h: Disable dcgettext optimization for Solaris 2.3.
+
+ * localealias.c (alias_compare):
+ Peter Miller reported that tolower in some systems is
+ even dumber than I thought. Protect call by `isupper'.
+
+Fri Oct 27 22:22:51 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (libdir, includedir): New variables.
+ (install-src): Install libintl.a and libintl.h in correct dirs.
+
+Fri Oct 27 22:07:29 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c.
+
+ * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques.
+
+ * localealias.c:
+ Fix typo and superflous test. Reported by Christian von Roques.
+
+Fri Oct 6 11:52:05 1995 Ulrich Drepper <drepper at myware>
+
+ * finddomain.c (_nl_find_domain):
+ Correct some remainder from the pre-CEN syntax. Now
+ we don't have a constant number of successors anymore.
+
+Wed Sep 27 21:41:13 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (DISTFILES): Add libintl.h.glibc.
+
+ * Makefile.in (dist-libc): Add goal for packing sources for glibc.
+ (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc.
+
+ * loadmsgcat.c: Forget to continue #if line.
+
+ * localealias.c:
+ [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name
+ space clean.
+
+ * dcgettext.c, finddomain.c: Better comment to last change.
+
+ * loadmsgcat.c:
+ [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to
+ __fstat, __open, __close, __read, __mmap, and __munmap resp
+ to keep ANSI C name space clean.
+
+ * finddomain.c:
+ [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean.
+
+ * dcgettext.c:
+ [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to
+ keep ANSI C name space clean.
+
+ * libgettext.h:
+ Include sys/types.h for those old SysV systems out there.
+ Reported by Francesco Potorti`.
+
+ * loadmsgcat.c (use_mmap): Define if compiled for glibc.
+
+ * bindtextdom.c: Include all those standard headers
+ unconditionally if _LIBC is defined.
+
+ * finddomain.c: Fix 2 times defiend -> defined.
+
+ * textdomain.c: Include libintl.h instead of libgettext.h when
+ compiling for glibc. Include all those standard headers
+ unconditionally if _LIBC is defined.
+
+ * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc.
+
+ * gettext.c:
+ Include libintl.h instead of libgettext.h when compiling for glibc.
+ Get NULL from stddef.h if we compile for glibc.
+
+ * finddomain.c: Include libintl.h instead of libgettext.h when
+ compiling for glibc. Include all those standard headers
+ unconditionally if _LIBC is defined.
+
+ * dcgettext.c: Include all those standard headers unconditionally
+ if _LIBC is defined.
+
+ * dgettext.c: If compiled in glibc include libintl.h instead of
+ libgettext.h.
+ (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc.
+
+ * dcgettext.c: If compiled in glibc include libintl.h instead of
+ libgettext.h.
+ (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc.
+
+ * bindtextdom.c:
+ If compiled in glibc include libintl.h instead of libgettext.h.
+
+Mon Sep 25 22:23:06 1995 Ulrich Drepper <drepper at myware>
+
+ * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0.
+ Reported by Marcus Daniels.
+
+ * cat-compat.c (bindtextdomain):
+ String used in putenv must not be recycled.
+ Reported by Marcus Daniels.
+
+ * libgettext.h (__USE_GNU_GETTEXT):
+ Additional symbol to signal that we use GNU gettext
+ library.
+
+ * cat-compat.c (bindtextdomain):
+ Fix bug with the strange stpcpy replacement.
+ Reported by Nelson Beebe.
+
+Sat Sep 23 08:23:51 1995 Ulrich Drepper <drepper at myware>
+
+ * cat-compat.c: Include <string.h> for stpcpy prototype.
+
+ * localealias.c (read_alias_file):
+ While expand strdup code temporary variable `cp' hided
+ higher level variable with same name. Rename to `tp'.
+
+ * textdomain.c (textdomain):
+ Avoid warning by using temporary variable in strdup code.
+
+ * finddomain.c (_nl_find_domain): Remove unused variable `application'.
+
+Thu Sep 21 15:51:44 1995 Ulrich Drepper <drepper at myware>
+
+ * localealias.c (alias_compare):
+ Use strcasecmp() only if available. Else use
+ implementation in place.
+
+ * intl-compat.c:
+ Wrapper functions now call *__ functions instead of __*.
+
+ * libgettext.h: Declare prototypes for *__ functions instead for __*.
+
+ * cat-compat.c, loadmsgcat.c:
+ Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+ of the standard libc and so prevent libintl.a from being used
+ standalone.
+
+ * bindtextdom.c:
+ Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+ of the standard libc and so prevent libintl.a from being used
+ standalone.
+ Rename to bindtextdomain__ if not used in GNU C Library.
+
+ * dgettext.c:
+ Rename function to dgettext__ if not used in GNU C Library.
+
+ * gettext.c:
+ Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+ of the standard libc and so prevent libintl.a from being used
+ standalone.
+ Functions now called gettext__ if not used in GNU C Library.
+
+ * dcgettext.c, localealias.c, textdomain.c, finddomain.c:
+ Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+ of the standard libc and so prevent libintl.a from being used
+ standalone.
+
+Sun Sep 17 23:14:49 1995 Ulrich Drepper <drepper at myware>
+
+ * finddomain.c: Correct some bugs in handling of CEN standard
+ locale definitions.
+
+Thu Sep 7 01:49:28 1995 Ulrich Drepper <drepper at myware>
+
+ * finddomain.c: Implement CEN syntax.
+
+ * gettextP.h (loaded_domain): Extend number of successors to 31.
+
+Sat Aug 19 19:25:29 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (aliaspath): Remove path to X11 locale dir.
+
+ * Makefile.in: Make install-src depend on install. This helps
+ gettext to install the sources and other packages can use the
+ install goal.
+
+Sat Aug 19 15:19:33 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (uninstall): Remove stuff installed by install-src.
+
+Tue Aug 15 13:13:53 1995 Ulrich Drepper <drepper at myware>
+
+ * VERSION.in: Initial revision.
+
+ * Makefile.in (DISTFILES):
+ Add VERSION file. This is not necessary for gettext, but
+ for other packages using this library.
+
+Tue Aug 15 06:16:44 1995 Ulrich Drepper <drepper at myware>
+
+ * gettextP.h (_nl_find_domain):
+ New prototype after changing search strategy.
+
+ * finddomain.c (_nl_find_domain):
+ We now try only to find a specified catalog. Fall back to other
+ catalogs listed in the locale list is now done in __dcgettext.
+
+ * dcgettext.c (__dcgettext):
+ Now we provide message fall back even to different languages.
+ I.e. if a message is not available in one language all the other
+ in the locale list a tried. Formerly fall back was only possible
+ within one language. Implemented by moving one loop from
+ _nl_find_domain to here.
+
+Mon Aug 14 23:45:50 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (gettextsrcdir):
+ Directory where source of GNU gettext library are made
+ available.
+ (INSTALL, INSTALL_DATA): Programs used for installing sources.
+ (gettext-src): New. Rule to install GNU gettext sources for use in
+ gettextize shell script.
+
+Sun Aug 13 14:40:48 1995 Ulrich Drepper <drepper at myware>
+
+ * loadmsgcat.c (_nl_load_domain):
+ Use mmap for loading only when munmap function is
+ also available.
+
+ * Makefile.in (install): Depend on `all' goal.
+
+Wed Aug 9 11:04:33 1995 Ulrich Drepper <drepper at myware>
+
+ * localealias.c (read_alias_file):
+ Do not overwrite '\n' when terminating alias value string.
+
+ * localealias.c (read_alias_file):
+ Handle long lines. Ignore the rest not fitting in
+ the buffer after the initial `fgets' call.
+
+Wed Aug 9 00:54:29 1995 Ulrich Drepper <drepper at myware>
+
+ * gettextP.h (_nl_load_domain):
+ Add prototype, replacing prototype for _nl_load_msg_cat.
+
+ * finddomain.c (_nl_find_domain):
+ Remove unneeded variable filename and filename_len.
+ (expand_alias): Remove prototype because functions does not
+ exist anymore.
+
+ * localealias.c (read_alias_file):
+ Change type of fname_len parameter to int.
+ (xmalloc): Add prototype.
+
+ * loadmsgcat.c: Better prototypes for xmalloc.
+
+Tue Aug 8 22:30:39 1995 Ulrich Drepper <drepper at myware>
+
+ * finddomain.c (_nl_find_domain):
+ Allow alias name to be constructed from the four components.
+
+ * Makefile.in (aliaspath): New variable. Set to preliminary value.
+ (SOURCES): Add localealias.c.
+ (OBJECTS): Add localealias.o.
+
+ * gettextP.h: Add prototype for _nl_expand_alias.
+
+ * finddomain.c: Aliasing handled in intl/localealias.c.
+
+ * localealias.c: Aliasing for locale names.
+
+ * bindtextdom.c: Better prototypes for xmalloc and xstrdup.
+
+Mon Aug 7 23:47:42 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (DISTFILES): gettext.perl is now found in misc/.
+
+ * cat-compat.c (bindtextdomain):
+ Correct implementation. dirname parameter was not used.
+ Reported by Marcus Daniels.
+
+ * gettextP.h (loaded_domain):
+ New fields `successor' and `decided' for oo, lazy
+ message handling implementation.
+
+ * dcgettext.c:
+ Adopt for oo, lazy message handliing.
+ Now we can inherit translations from less specific locales.
+ (find_msg): New function.
+
+ * loadmsgcat.c, finddomain.c:
+ Complete rewrite. Implement oo, lazy message handling :-).
+ We now have an additional environment variable `LANGUAGE' with
+ a higher priority than LC_ALL for the LC_MESSAGE locale.
+ Here we can set a colon separated list of specifications each
+ of the form `language[_territory[.codeset]][@modifier]'.
+
+Sat Aug 5 09:55:42 1995 Ulrich Drepper <drepper at myware>
+
+ * finddomain.c (unistd.h):
+ Include to get _PC_PATH_MAX defined on system having it.
+
+Fri Aug 4 22:42:00 1995 Ulrich Drepper <drepper at myware>
+
+ * finddomain.c (stpcpy): Include prototype.
+
+ * Makefile.in (dist): Remove `copying instead' message.
+
+Wed Aug 2 18:52:03 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (ID, TAGS): Do not use $^.
+
+Tue Aug 1 20:07:11 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (TAGS, ID): Use $^ as command argument.
+ (TAGS): Give etags -o option t write to current directory,
+ not $(srcdir).
+ (ID): Use $(srcdir) instead os $(top_srcdir)/src.
+ (distclean): Remove ID.
+
+Sun Jul 30 11:51:46 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (gnulocaledir):
+ New variable, always using share/ for data directory.
+ (DEFS): Add GNULOCALEDIR, used in finddomain.c.
+
+ * finddomain.c (_nl_default_dirname):
+ Set to GNULOCALEDIR, because it always has to point
+ to the directory where GNU gettext Library writes it to.
+
+ * intl-compat.c (textdomain, bindtextdomain):
+ Undefine macros before function definition.
+
+Sat Jul 22 01:10:02 1995 Ulrich Drepper <drepper at myware>
+
+ * libgettext.h (_LIBINTL_H):
+ Protect definition in case where this file is included as
+ libgettext.h on Solaris machines. Add comment about this.
+
+Wed Jul 19 02:36:42 1995 Ulrich Drepper <drepper at myware>
+
+ * intl-compat.c (textdomain): Correct typo.
+
+Wed Jul 19 01:51:35 1995 Ulrich Drepper <drepper at myware>
+
+ * dcgettext.c (dcgettext): Function now called __dcgettext.
+
+ * dgettext.c (dgettext): Now called __dgettext and calls
+ __dcgettext.
+
+ * gettext.c (gettext):
+ Function now called __gettext and calls __dgettext.
+
+ * textdomain.c (textdomain): Function now called __textdomain.
+
+ * bindtextdom.c (bindtextdomain): Function now called
+ __bindtextdomain.
+
+ * intl-compat.c: Initial revision.
+
+ * Makefile.in (SOURCES): Add intl-compat.c.
+ (OBJECTS): We always compile the GNU gettext library functions.
+ OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o,
+ and intl-compat.o.
+ (GETTOBJS): Contains now only intl-compat.o.
+
+ * libgettext.h:
+ Re-include protection matches dualistic character of libgettext.h.
+ For all functions in GNU gettext library define __ counter part.
+
+ * finddomain.c (strchr): Define as index if not found in C library.
+ (_nl_find_domain): For relative paths paste / in between.
+
+Tue Jul 18 16:37:45 1995 Ulrich Drepper <drepper at myware>
+
+ * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h.
+
+ * xopen-msg.sed: Fix bug with `msgstr ""' lines.
+ A little bit better comments.
+
+Tue Jul 18 01:18:27 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in:
+ po-mode.el, makelinks, combine-sh are now found in ../misc.
+
+ * po-mode.el, makelinks, combine-sh, elisp-comp:
+ Moved to ../misc/.
+
+ * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__.
+
+Sun Jul 16 22:33:02 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (INSTALL, INSTALL_DATA): New variables.
+ (install-data, uninstall): Install/uninstall .elc file.
+
+ * po-mode.el (Installation comment):
+ Add .pox as possible extension of .po files.
+
+Sun Jul 16 13:23:27 1995 Ulrich Drepper <drepper at myware>
+
+ * elisp-comp: Complete new version by Franc,ois: This does not
+ fail when not compiling in the source directory.
+
+Sun Jul 16 00:12:17 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (../po/cat-id-tbl.o):
+ Use $(MAKE) instead of make for recursive make.
+
+ * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh.
+ (install-exec): Add missing dummy goal.
+ (install-data, uninstall): @ in multi-line shell command at
+ beginning, not in front of echo. Reported by Eric Backus.
+
+Sat Jul 15 00:21:28 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (DISTFILES):
+ Rename libgettext.perl to gettext.perl to fit in 14 chars
+ file systems.
+
+ * gettext.perl:
+ Rename to gettext.perl to fit in 14 chars file systems.
+
+Thu Jul 13 23:17:20 1995 Ulrich Drepper <drepper at myware>
+
+ * cat-compat.c: If !STDC_HEADERS try to include malloc.h.
+
+Thu Jul 13 20:55:02 1995 Ulrich Drepper <drepper at myware>
+
+ * po2tbl.sed.in: Pretty printing.
+
+ * linux-msg.sed, xopen-msg.sed:
+ Correct bugs with handling substitute flags in branches.
+
+ * hash-string.h (hash_string):
+ Old K&R compilers don't under stand `unsigned char'.
+
+ * gettext.h (nls_uint32):
+ Some old K&R compilers (eg HP) don't understand `unsigned int'.
+
+ * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes.
+
+Thu Jul 13 01:34:33 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (ELCFILES): New variable.
+ (DISTFILES): Add elisp-comp.
+ Add implicit rule for .el -> .elc compilation.
+ (install-data): install $ELCFILES
+ (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp.
+
+ * elisp-comp: Initial revision
+
+Wed Jul 12 16:14:52 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in:
+ cat-id-tbl.c is now found in po/. This enables us to use an identical
+ intl/ directory in all packages.
+
+ * dcgettext.c (dcgettext): hashing does not work for table size <= 2.
+
+ * textdomain.c: fix typo (#if def -> #if defined)
+
+Tue Jul 11 18:44:43 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in (stamp-cat-id): use top_srcdir to address source files
+ (DISTFILES,distclean): move tupdate.perl to src/
+
+ * po-to-tbl.sed.in:
+ add additional jump to clear change flag to recognize multiline strings
+
+Tue Jul 11 01:32:50 1995 Ulrich Drepper <drepper at myware>
+
+ * textdomain.c: Protect inclusion of stdlib.h and string.h.
+
+ * loadmsgcat.c: Protect inclusion of stdlib.h.
+
+ * libgettext.h: Protect inclusion of locale.h.
+ Allow use in C++ programs.
+ Define NULL is not happened already.
+
+ * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of
+ po-to-tbl.sed.
+ (distclean): remove po-to-tbl.sed and tupdate.perl.
+
+ * tupdate.perl.in: Substitute Perl path even in exec line.
+ Don't include entries without translation from old .po file.
+
+Tue Jul 4 00:41:51 1995 Ulrich Drepper <drepper at myware>
+
+ * tupdate.perl.in: use "Updated: " in msgid "".
+
+ * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR).
+ Define getenv if !__STDC__.
+
+ * bindtextdom.c: Protect stdlib.h and string.h inclusion.
+ Define free if !__STDC__.
+
+ * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
+ Define free if !__STDC__.
+
+ * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
+
+Mon Jul 3 23:56:30 1995 Ulrich Drepper <drepper at myware>
+
+ * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR.
+ Remove unneeded $(srcdir) from Makefile.in dependency.
+
+ * makelinks: Add copyright and short description.
+
+ * po-mode.el: Last version for 0.7.
+
+ * tupdate.perl.in: Fix die message.
+
+ * dcgettext.c: Protect include of string.h.
+
+ * gettext.c: Protect include of stdlib.h and further tries to get NULL.
+
+ * finddomain.c: Some corrections in includes.
+
+ * Makefile.in (INCLUDES): Prune list correct path to Makefile.in.
+
+ * po-to-tbl.sed: Adopt for new .po file format.
+
+ * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format.
+
+Sun Jul 2 23:55:03 1995 Ulrich Drepper <drepper at myware>
+
+ * tupdate.perl.in: Complete rewrite for new .po file format.
+
+Sun Jul 2 02:06:50 1995 Ulrich Drepper <drepper at myware>
+
+ * First official release. This directory contains all the code
+ needed to internationalize own packages. It provides functions
+ which allow to use the X/Open catgets function with an interface
+ like the Uniforum gettext function. For system which does not
+ have neither of those a complete implementation is provided.
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/Makefile.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/Makefile.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/Makefile.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,214 @@
+# Makefile for directory with message catalog handling in GNU NLS Utilities.
+# Copyright (C) 1995, 1996, 1997 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.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = ..
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+transform = @program_transform_name@
+libdir = $(exec_prefix)/lib
+includedir = $(prefix)/include
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+gnulocaledir = $(prefix)/share/locale
+gettextsrcdir = @datadir@/gettext/intl
+aliaspath = $(localedir):.
+subdir = intl
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+
+l = @l@
+
+AR = ar
+CC = @CC@
+LIBTOOL = @LIBTOOL@
+RANLIB = @RANLIB@
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
+-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+HEADERS = $(COMHDRS) libgettext.h loadinfo.h
+COMHDRS = gettext.h gettextP.h hash-string.h
+SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
+COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
+finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
+explodename.c
+OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
+finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
+explodename.$lo
+CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
+GETTOBJS = intl-compat.$lo
+DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
+xopen-msg.sed $(HEADERS) $(SOURCES)
+DISTFILES.normal = VERSION
+DISTFILES.gettext = libintl.glibc intlh.inst.in
+
+.SUFFIXES:
+.SUFFIXES: .c .o .lo
+.c.o:
+ $(COMPILE) $<
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) $<
+
+INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
+
+all: all- at USE_INCLUDED_LIBINTL@
+
+all-yes: libintl.$la intlh.inst
+all-no:
+
+libintl.a: $(OBJECTS)
+ rm -f $@
+ $(AR) cru $@ $(OBJECTS)
+ $(RANLIB) $@
+
+libintl.la: $(OBJECTS)
+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
+ -version-info 1:0 -rpath $(libdir)
+
+../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
+ cd ../po && $(MAKE) cat-id-tbl.$lo
+
+check: all
+
+# This installation goal is only used in GNU gettext. Packages which
+# only use the library should use install instead.
+
+# We must not install the libintl.h/libintl.a files if we are on a
+# system which has the gettext() function in its C library or in a
+# separate library or use the catgets interface. A special case is
+# where configure found a previously installed GNU gettext 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
+ if test "$(PACKAGE)" = "gettext" \
+ && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(libdir) $(includedir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \
+ fi; \
+ $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \
+ $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
+ else \
+ : ; \
+ fi
+install-data: all
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(gettextsrcdir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \
+ dists="$(DISTFILES.common)"; \
+ for file in $$dists; do \
+ $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ dists="$(DISTFILES.common)"; \
+ for file in $$dists; do \
+ rm -f $(gettextsrcdir)/$$file; \
+ done
+
+info dvi:
+
+$(OBJECTS): ../config.h libgettext.h
+bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
+dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
+
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES)
+ here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
+
+id: ID
+
+ID: $(HEADERS) $(SOURCES)
+ here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
+
+
+mostlyclean:
+ rm -f *.a *.o *.lo core core.*
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile ID TAGS po2msg.sed po2tbl.sed
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "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 $(DISTFILES)
+ if test "$(PACKAGE)" = gettext; then \
+ additional="$(DISTFILES.gettext)"; \
+ else \
+ additional="$(DISTFILES.normal)"; \
+ fi; \
+ for file in $(DISTFILES.common) $$additional; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+dist-libc:
+ tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
+
+Makefile: Makefile.in ../config.status
+ cd .. \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# The dependency for intlh.inst is different in gettext and all other
+# packages. Because we cannot you GNU make features we have to solve
+# the problem while rewriting Makefile.in.
+ at GT_YES@intlh.inst: intlh.inst.in ../config.status
+ at GT_YES@ cd .. \
+ at GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
+ at GT_YES@ $(SHELL) ./config.status
+ at GT_NO@.PHONY: intlh.inst
+ at GT_NO@intlh.inst:
+
+# 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:
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/VERSION
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/VERSION 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/VERSION 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+GNU gettext library from gettext-0.10.35
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/bindtextdom.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/bindtextdom.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/bindtextdom.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,203 @@
+/* Implementation of the bindtextdomain(3) function
+ 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. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#else
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# else
+void free ();
+# endif
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+#include "gettext.h"
+#include "gettextP.h"
+
+/* @@ end of prolog @@ */
+
+/* Contains the default location of the message catalogs. */
+extern const char _nl_default_dirname[];
+
+/* List with bindings of specific domains. */
+extern struct binding *_nl_domain_bindings;
+
+
+/* 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
+# ifndef strdup
+# define strdup(str) __strdup (str)
+# endif
+#else
+# define BINDTEXTDOMAIN bindtextdomain__
+#endif
+
+/* Specify that the DOMAINNAME message catalog will be found
+ in DIRNAME rather than in the system locale data base. */
+char *
+BINDTEXTDOMAIN (domainname, dirname)
+ const char *domainname;
+ const char *dirname;
+{
+ struct binding *binding;
+
+ /* Some sanity checks. */
+ if (domainname == NULL || domainname[0] == '\0')
+ return NULL;
+
+ 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 (dirname == NULL)
+ /* The current binding has be to returned. */
+ return binding == NULL ? (char *) _nl_default_dirname : binding->dirname;
+
+ if (binding != NULL)
+ {
+ /* The domain is already bound. If the new value and the old
+ one are equal we simply do nothing. Otherwise replace the
+ old binding. */
+ if (strcmp (dirname, binding->dirname) != 0)
+ {
+ char *new_dirname;
+
+ if (strcmp (dirname, _nl_default_dirname) == 0)
+ new_dirname = (char *) _nl_default_dirname;
+ else
+ {
+#if defined _LIBC || defined HAVE_STRDUP
+ new_dirname = strdup (dirname);
+ if (new_dirname == NULL)
+ return NULL;
+#else
+ size_t len = strlen (dirname) + 1;
+ new_dirname = (char *) malloc (len);
+ if (new_dirname == NULL)
+ return NULL;
+
+ memcpy (new_dirname, dirname, len);
+#endif
+ }
+
+ if (binding->dirname != _nl_default_dirname)
+ free (binding->dirname);
+
+ binding->dirname = new_dirname;
+ }
+ }
+ else
+ {
+ /* We have to create a new binding. */
+#if !defined _LIBC && !defined HAVE_STRDUP
+ size_t len;
+#endif
+ struct binding *new_binding =
+ (struct binding *) malloc (sizeof (*new_binding));
+
+ if (new_binding == NULL)
+ return NULL;
+
+#if defined _LIBC || defined HAVE_STRDUP
+ new_binding->domainname = strdup (domainname);
+ if (new_binding->domainname == NULL)
+ return NULL;
+#else
+ len = strlen (domainname) + 1;
+ new_binding->domainname = (char *) malloc (len);
+ if (new_binding->domainname == NULL)
+ return NULL;
+ memcpy (new_binding->domainname, domainname, len);
+#endif
+
+ if (strcmp (dirname, _nl_default_dirname) == 0)
+ new_binding->dirname = (char *) _nl_default_dirname;
+ else
+ {
+#if defined _LIBC || defined HAVE_STRDUP
+ new_binding->dirname = strdup (dirname);
+ if (new_binding->dirname == NULL)
+ return NULL;
+#else
+ len = strlen (dirname) + 1;
+ new_binding->dirname = (char *) malloc (len);
+ if (new_binding->dirname == NULL)
+ return NULL;
+ memcpy (new_binding->dirname, dirname, len);
+#endif
+ }
+
+ /* 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;
+ }
+
+ binding = new_binding;
+ }
+
+ return binding->dirname;
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__bindtextdomain, bindtextdomain);
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/cat-compat.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/cat-compat.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/cat-compat.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,262 @@
+/* Compatibility code for gettext-using-catgets interface.
+ Copyright (C) 1995, 1997 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. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#else
+char *getenv ();
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# endif
+#endif
+
+#ifdef HAVE_NL_TYPES_H
+# include <nl_types.h>
+#endif
+
+#include "libgettext.h"
+
+/* @@ end of prolog @@ */
+
+/* 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. And even worse: POSIX
+ defines this not at all. So we can use this feature only on selected
+ system (e.g. those using GNU C Library). */
+#ifdef _LIBC
+# define HAVE_LOCALE_NULL
+#endif
+
+/* The catalog descriptor. */
+static nl_catd catalog = (nl_catd) -1;
+
+/* Name of the default catalog. */
+static const char default_catalog_name[] = "messages";
+
+/* Name of currently used catalog. */
+static const char *catalog_name = default_catalog_name;
+
+/* Get ID for given string. If not found return -1. */
+static int msg_to_cat_id PARAMS ((const char *msg));
+
+/* Substitution for systems lacking this function in their C library. */
+#if !_LIBC && !HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+#endif
+
+
+/* Set currently used domain/catalog. */
+char *
+textdomain (domainname)
+ const char *domainname;
+{
+ nl_catd new_catalog;
+ char *new_name;
+ size_t new_name_len;
+ char *lang;
+
+#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \
+ && defined HAVE_LOCALE_NULL
+ lang = setlocale (LC_MESSAGES, NULL);
+#else
+ lang = getenv ("LC_ALL");
+ if (lang == NULL || lang[0] == '\0')
+ {
+ lang = getenv ("LC_MESSAGES");
+ if (lang == NULL || lang[0] == '\0')
+ lang = getenv ("LANG");
+ }
+#endif
+ if (lang == NULL || lang[0] == '\0')
+ lang = "C";
+
+ /* See whether name of currently used domain is asked. */
+ if (domainname == NULL)
+ return (char *) catalog_name;
+
+ if (domainname[0] == '\0')
+ domainname = default_catalog_name;
+
+ /* Compute length of added path element. */
+ new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang)
+ + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1
+ + sizeof (".cat");
+
+ new_name = (char *) malloc (new_name_len);
+ if (new_name == NULL)
+ return NULL;
+
+ strcpy (new_name, PACKAGE);
+ new_catalog = catopen (new_name, 0);
+
+ if (new_catalog == (nl_catd) -1)
+ {
+ /* NLSPATH search didn't work, try absolute path */
+ sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang,
+ PACKAGE);
+ new_catalog = catopen (new_name, 0);
+
+ if (new_catalog == (nl_catd) -1)
+ {
+ free (new_name);
+ return (char *) catalog_name;
+ }
+ }
+
+ /* Close old catalog. */
+ if (catalog != (nl_catd) -1)
+ catclose (catalog);
+ if (catalog_name != default_catalog_name)
+ free ((char *) catalog_name);
+
+ catalog = new_catalog;
+ catalog_name = new_name;
+
+ return (char *) catalog_name;
+}
+
+char *
+bindtextdomain (domainname, dirname)
+ const char *domainname;
+ const char *dirname;
+{
+#if HAVE_SETENV || HAVE_PUTENV
+ char *old_val, *new_val, *cp;
+ size_t new_val_len;
+
+ /* This does not make much sense here but to be compatible do it. */
+ if (domainname == NULL)
+ return NULL;
+
+ /* Compute length of added path element. If we use setenv we don't need
+ the first byts for NLSPATH=, but why complicate the code for this
+ peanuts. */
+ new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname)
+ + sizeof ("/%L/LC_MESSAGES/%N.cat");
+
+ old_val = getenv ("NLSPATH");
+ if (old_val == NULL || old_val[0] == '\0')
+ {
+ old_val = NULL;
+ new_val_len += 1 + sizeof (LOCALEDIR) - 1
+ + sizeof ("/%L/LC_MESSAGES/%N.cat");
+ }
+ else
+ new_val_len += strlen (old_val);
+
+ new_val = (char *) malloc (new_val_len);
+ if (new_val == NULL)
+ return NULL;
+
+# if HAVE_SETENV
+ cp = new_val;
+# else
+ cp = stpcpy (new_val, "NLSPATH=");
+# endif
+
+ cp = stpcpy (cp, dirname);
+ cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:");
+
+ if (old_val == NULL)
+ {
+# if __STDC__
+ stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat");
+# else
+
+ cp = stpcpy (cp, LOCALEDIR);
+ stpcpy (cp, "/%L/LC_MESSAGES/%N.cat");
+# endif
+ }
+ else
+ stpcpy (cp, old_val);
+
+# if HAVE_SETENV
+ setenv ("NLSPATH", new_val, 1);
+ free (new_val);
+# else
+ putenv (new_val);
+ /* Do *not* free the environment entry we just entered. It is used
+ from now on. */
+# endif
+
+#endif
+
+ return (char *) domainname;
+}
+
+#undef gettext
+char *
+gettext (msg)
+ const char *msg;
+{
+ int msgid;
+
+ if (msg == NULL || catalog == (nl_catd) -1)
+ return (char *) msg;
+
+ /* Get the message from the catalog. We always use set number 1.
+ The message ID is computed by the function `msg_to_cat_id'
+ which works on the table generated by `po-to-tbl'. */
+ msgid = msg_to_cat_id (msg);
+ if (msgid == -1)
+ return (char *) msg;
+
+ return catgets (catalog, 1, msgid, (char *) msg);
+}
+
+/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries
+ for the one equal to msg. If it is found return the ID. In case when
+ the string is not found return -1. */
+static int
+msg_to_cat_id (msg)
+ const char *msg;
+{
+ int cnt;
+
+ for (cnt = 0; cnt < _msg_tbl_length; ++cnt)
+ if (strcmp (msg, _msg_tbl[cnt]._msg) == 0)
+ return _msg_tbl[cnt]._msg_number;
+
+ return -1;
+}
+
+
+/* @@ 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 (dest, src)
+ char *dest;
+ const char *src;
+{
+ while ((*dest++ = *src++) != '\0')
+ /* Do nothing. */ ;
+ return dest - 1;
+}
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/dcgettext.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/dcgettext.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/dcgettext.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,624 @@
+/* Implementation of the dcgettext(3) function.
+ 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. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#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
+
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+#ifndef __set_errno
+# define __set_errno(val) errno = (val)
+#endif
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#else
+char *getenv ();
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# else
+void free ();
+# endif
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+# endif
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+#if !HAVE_STRCHR && !defined _LIBC
+# ifndef strchr
+# define strchr index
+# endif
+#endif
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+#include "hash-string.h"
+
+/* @@ 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
+#else
+# if !defined HAVE_GETCWD
+char *getwd ();
+# define getcwd(buf, max) getwd (buf)
+# else
+char *getcwd ();
+# endif
+# ifndef HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+# 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
+
+/* 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. And even worse: POSIX
+ defines this not at all. So we can use this feature only on selected
+ system (e.g. those using GNU C Library). */
+#ifdef _LIBC
+# define HAVE_LOCALE_NULL
+#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[] = "messages";
+
+/* Value used as the default domain for gettext(3). */
+const char *_nl_current_default_domain = _nl_default_default_domain;
+
+/* Contains the default location of the message catalogs. */
+const char _nl_default_dirname[] = GNULOCALEDIR;
+
+/* List with bindings of specific domains created by bindtextdomain()
+ calls. */
+struct binding *_nl_domain_bindings;
+
+/* Prototypes for local functions. */
+static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file,
+ const char *msgid)) internal_function;
+static const char *category_to_name PARAMS ((int category)) internal_function;
+static const char *guess_category_value PARAMS ((int category,
+ const char *categoryname))
+ internal_function;
+
+
+/* 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 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); \
+ } \
+ } while (0)
+# undef alloca
+# define alloca(size) (malloc (size))
+#endif /* have alloca */
+
+
+/* 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
+#else
+# define DCGETTEXT dcgettext__
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+ locale. */
+char *
+DCGETTEXT (domainname, msgid, category)
+ const char *domainname;
+ const char *msgid;
+ 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;
+ int saved_errno = errno;
+
+ /* If no real MSGID is given return NULL. */
+ if (msgid == NULL)
+ return NULL;
+
+ /* 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
+ defintion left this undefined. */
+ if (domainname == NULL)
+ domainname = _nl_current_default_domain;
+
+ /* 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 *) _nl_default_dirname;
+ else if (binding->dirname[0] == '/')
+ 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) PATH_MAX;
+ path_max += 2; /* The getcwd docs say to do this. */
+
+ dirname = (char *) alloca (path_max + dirname_len);
+ ADD_BLOCK (block_list, dirname);
+
+ __set_errno (0);
+ while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE)
+ {
+ path_max += PATH_INCR;
+ dirname = (char *) alloca (path_max + dirname_len);
+ ADD_BLOCK (block_list, dirname);
+ __set_errno (0);
+ }
+
+ if (ret == NULL)
+ {
+ /* We cannot get the current working directory. Don't signal an
+ error but simply return the default string. */
+ FREE_BLOCKS (block_list);
+ __set_errno (saved_errno);
+ return (char *) msgid;
+ }
+
+ 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);
+
+ xdomainname = (char *) alloca (strlen (categoryname)
+ + strlen (domainname) + 5);
+ ADD_BLOCK (block_list, xdomainname);
+
+ stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
+ domainname),
+ ".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 th 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';
+ }
+
+ /* 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)
+ {
+ FREE_BLOCKS (block_list);
+ __set_errno (saved_errno);
+ return (char *) msgid;
+ }
+
+
+ /* Find structure describing the message catalog matching the
+ DOMAINNAME and CATEGORY. */
+ domain = _nl_find_domain (dirname, single_locale, xdomainname);
+
+ if (domain != NULL)
+ {
+ retval = find_msg (domain, msgid);
+
+ if (retval == NULL)
+ {
+ int cnt;
+
+ for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
+ {
+ retval = find_msg (domain->successor[cnt], msgid);
+
+ if (retval != NULL)
+ break;
+ }
+ }
+
+ if (retval != NULL)
+ {
+ FREE_BLOCKS (block_list);
+ __set_errno (saved_errno);
+ return retval;
+ }
+ }
+ }
+ /* NOTREACHED */
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__dcgettext, dcgettext);
+#endif
+
+
+static char *
+internal_function
+find_msg (domain_file, msgid)
+ struct loaded_l10nfile *domain_file;
+ const char *msgid;
+{
+ size_t top, act, bottom;
+ struct loaded_domain *domain;
+
+ if (domain_file->decided == 0)
+ _nl_load_domain (domain_file);
+
+ if (domain_file->data == NULL)
+ return NULL;
+
+ domain = (struct loaded_domain *) domain_file->data;
+
+ /* Locate the MSGID and its translation. */
+ if (domain->hash_size > 2 && 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));
+ nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
+
+ if (nstr == 0)
+ /* Hash table entry is empty. */
+ return NULL;
+
+ if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
+ && strcmp (msgid,
+ domain->data + W (domain->must_swap,
+ domain->orig_tab[nstr - 1].offset)) == 0)
+ return (char *) domain->data + W (domain->must_swap,
+ domain->trans_tab[nstr - 1].offset);
+
+ while (1)
+ {
+ if (idx >= domain->hash_size - incr)
+ idx -= domain->hash_size - incr;
+ else
+ idx += incr;
+
+ nstr = W (domain->must_swap, domain->hash_tab[idx]);
+ if (nstr == 0)
+ /* Hash table entry is empty. */
+ return NULL;
+
+ if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
+ && strcmp (msgid,
+ domain->data + W (domain->must_swap,
+ domain->orig_tab[nstr - 1].offset))
+ == 0)
+ return (char *) domain->data
+ + W (domain->must_swap, domain->trans_tab[nstr - 1].offset);
+ }
+ /* NOTREACHED */
+ }
+
+ /* Now we try the default method: binary search in the sorted
+ array of messages. */
+ bottom = 0;
+ top = domain->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
+ break;
+ }
+
+ /* If an translation is found return this. */
+ return bottom >= top ? NULL : (char *) domain->data
+ + W (domain->must_swap,
+ domain->trans_tab[act].offset);
+}
+
+
+/* Return string representation of locale CATEGORY. */
+static const char *
+internal_function
+category_to_name (category)
+ 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;
+}
+
+/* Guess value of current locale from value of the environment variables. */
+static const char *
+internal_function
+guess_category_value (category, categoryname)
+ int category;
+ const char *categoryname;
+{
+ const char *retval;
+
+ /* The highest priority value is the `LANGUAGE' environment
+ variable. This is a GNU extension. */
+ retval = getenv ("LANGUAGE");
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+
+ /* `LANGUAGE' is not set. So 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. */
+#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
+ return setlocale (category, NULL);
+#else
+ /* Setting of LC_ALL overwrites all other. */
+ retval = getenv ("LC_ALL");
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+
+ /* Next comes the name of the desired category. */
+ retval = getenv (categoryname);
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+
+ /* Last possibility is the LANG environment variable. */
+ retval = getenv ("LANG");
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+
+ /* We use C as the default domain. POSIX says this is implementation
+ defined. */
+ return "C";
+#endif
+}
+
+/* @@ 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 (dest, src)
+ char *dest;
+ const char *src;
+{
+ while ((*dest++ = *src++) != '\0')
+ /* Do nothing. */ ;
+ return dest - 1;
+}
+#endif
+
+
+#ifdef _LIBC
+/* If we want to free all resources we have to do some work at
+ program's end. */
+static void __attribute__ ((unused))
+free_mem (void)
+{
+ struct binding *runp;
+
+ for (runp = _nl_domain_bindings; runp != NULL; runp = runp->next)
+ {
+ free (runp->domainname);
+ if (runp->dirname != _nl_default_dirname)
+ /* Yes, this is a pointer comparison. */
+ free (runp->dirname);
+ }
+
+ if (_nl_current_default_domain != _nl_default_default_domain)
+ /* Yes, again a pointer comparison. */
+ free ((char *) _nl_current_default_domain);
+}
+
+text_set_element (__libc_subfreeres, free_mem);
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/dgettext.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/dgettext.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/dgettext.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,59 @@
+/* Implementation of the dgettext(3) function
+ Copyright (C) 1995, 1996, 1997 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. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined HAVE_LOCALE_H || defined _LIBC
+# include <locale.h>
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.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 __dcgettext
+#else
+# define DGETTEXT dgettext__
+# define DCGETTEXT dcgettext__
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog of the current
+ LC_MESSAGES locale. */
+char *
+DGETTEXT (domainname, msgid)
+ 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/explodename.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/explodename.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/explodename.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,188 @@
+/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper at gnu.ai.mit.edu>, 1995.
+
+ 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. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+#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 @@ */
+
+int
+_nl_explode_name (name, language, modifier, territory, codeset,
+ normalized_codeset, special, sponsor, revision)
+ 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;
+ while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@'
+ && cp[0] != '+' && cp[0] != ',')
+ ++cp;
+
+ 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;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/finddomain.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/finddomain.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/finddomain.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,216 @@
+/* Handle list of needed message catalogs
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper at gnu.ai.mit.edu>, 1995.
+
+ 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. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#else
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# else
+void free ();
+# endif
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+#if !HAVE_STRCHR && !defined _LIBC
+# ifndef strchr
+# define strchr index
+# endif
+#endif
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.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 (dirname, locale, domainname)
+ const char *dirname;
+ char *locale;
+ const char *domainname;
+{
+ 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);
+
+ 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]);
+
+ 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);
+ 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]);
+ if (retval->successor[cnt]->data != NULL)
+ break;
+ }
+ }
+
+ /* The room for an alias was dynamically allocated. Free it now. */
+ if (alias_value != NULL)
+ free (locale);
+
+ return retval;
+}
+
+
+#ifdef _LIBC
+static void __attribute__ ((unused))
+free_mem (void)
+{
+ 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 (here);
+ }
+}
+
+text_set_element (__libc_subfreeres, free_mem);
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/gettext.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/gettext.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/gettext.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,70 @@
+/* Implementation of gettext(3) function.
+ Copyright (C) 1995, 1997 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. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# define __need_NULL
+# include <stddef.h>
+#else
+# ifdef STDC_HEADERS
+# include <stdlib.h> /* Just for NULL. */
+# else
+# ifdef HAVE_STRING_H
+# include <string.h>
+# else
+# define NULL ((void *) 0)
+# endif
+# endif
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.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 DGETTEXT __dgettext
+#else
+# define GETTEXT gettext__
+# define DGETTEXT dgettext__
+#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 (msgid)
+ const char *msgid;
+{
+ return DGETTEXT (NULL, msgid);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__gettext, gettext);
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/gettext.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/gettext.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/gettext.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,105 @@
+/* Internal header for GNU gettext internationalization functions.
+ Copyright (C) 1995, 1997 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 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 _GETTEXT_H
+#define _GETTEXT_H 1
+
+#include <stdio.h>
+
+#if HAVE_LIMITS_H || _LIBC
+# include <limits.h>
+#endif
+
+/* @@ 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
+
+/* 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
+ doing that would require that the configure script compile and *run*
+ the resulting executable. Locally running cross-compiled executables
+ is usually not possible. */
+
+#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 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 translation strings. */
+ nls_uint32 trans_tab_offset;
+ /* Size of hashing table. */
+ nls_uint32 hash_tab_size;
+ /* Offset of first hashing entry. */
+ nls_uint32 hash_tab_offset;
+};
+
+struct string_desc
+{
+ /* Length of addressed string. */
+ nls_uint32 length;
+ /* Offset of string in file. */
+ nls_uint32 offset;
+};
+
+/* @@ begin of epilog @@ */
+
+#endif /* gettext.h */
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/gettextP.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/gettextP.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/gettextP.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,89 @@
+/* Header describing internals of gettext library
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper at gnu.ai.mit.edu>, 1995.
+
+ 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. */
+
+#ifndef _GETTEXTP_H
+#define _GETTEXTP_H
+
+#include "loadinfo.h"
+
+/* @@ end of prolog @@ */
+
+#ifndef PARAMS
+# if __STDC__
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+#ifndef internal_function
+# define internal_function
+#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 nls_uint32 SWAP PARAMS ((nls_uint32 i));
+
+static inline nls_uint32
+SWAP (i)
+ nls_uint32 i;
+{
+ return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
+}
+#endif
+
+
+struct loaded_domain
+{
+ const char *data;
+ int use_mmap;
+ size_t mmap_size;
+ int must_swap;
+ nls_uint32 nstrings;
+ struct string_desc *orig_tab;
+ struct string_desc *trans_tab;
+ nls_uint32 hash_size;
+ nls_uint32 *hash_tab;
+};
+
+struct binding
+{
+ struct binding *next;
+ char *domainname;
+ char *dirname;
+};
+
+struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
+ char *__locale,
+ const char *__domainname))
+ internal_function;
+void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain))
+ internal_function;
+void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
+ internal_function;
+
+/* @@ begin of epilog @@ */
+
+#endif /* gettextP.h */
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/hash-string.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/hash-string.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/hash-string.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,59 @@
+/* Implements a string hashing function.
+ Copyright (C) 1995, 1997 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 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. */
+
+/* @@ end of prolog @@ */
+
+#ifndef PARAMS
+# if __STDC__
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
+#endif
+
+/* 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 unsigned long hash_string PARAMS ((const char *__str_param));
+
+static inline unsigned long
+hash_string (str_param)
+ 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 long) *str++;
+ g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
+ if (g != 0)
+ {
+ hval ^= g >> (HASHWORDBITS - 8);
+ hval ^= g;
+ }
+ }
+ return hval;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/intl-compat.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/intl-compat.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/intl-compat.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,76 @@
+/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
+ Library.
+ Copyright (C) 1995 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. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "libgettext.h"
+
+/* @@ end of prolog @@ */
+
+
+#undef gettext
+#undef dgettext
+#undef dcgettext
+#undef textdomain
+#undef bindtextdomain
+
+
+char *
+bindtextdomain (domainname, dirname)
+ const char *domainname;
+ const char *dirname;
+{
+ return bindtextdomain__ (domainname, dirname);
+}
+
+
+char *
+dcgettext (domainname, msgid, category)
+ const char *domainname;
+ const char *msgid;
+ int category;
+{
+ return dcgettext__ (domainname, msgid, category);
+}
+
+
+char *
+dgettext (domainname, msgid)
+ const char *domainname;
+ const char *msgid;
+{
+ return dgettext__ (domainname, msgid);
+}
+
+
+char *
+gettext (msgid)
+ const char *msgid;
+{
+ return gettext__ (msgid);
+}
+
+
+char *
+textdomain (domainname)
+ const char *domainname;
+{
+ return textdomain__ (domainname);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/l10nflist.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/l10nflist.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/l10nflist.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,411 @@
+/* Handle list of needed message catalogs
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper at gnu.ai.mit.edu>, 1995.
+
+ 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. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#if defined HAVE_STRING_H || defined _LIBC
+# ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+# endif
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+#if !HAVE_STRCHR && !defined _LIBC
+# ifndef strchr
+# define strchr index
+# endif
+#endif
+
+#if defined _LIBC || defined HAVE_ARGZ_H
+# include <argz.h>
+#endif
+#include <ctype.h>
+#include <sys/types.h>
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#endif
+
+#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
+static char *stpcpy PARAMS ((char *dest, const char *src));
+# endif
+#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__ PARAMS ((const char *argz, size_t len));
+
+static size_t
+argz_count__ (argz, len)
+ 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)
+#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__ PARAMS ((char *argz, size_t len, int sep));
+
+static void
+argz_stringify__ (argz, len, sep)
+ 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)
+#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
+static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
+ const char *entry));
+
+static char *
+argz_next__ (argz, argz_len, entry)
+ 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 int pop PARAMS ((int x));
+
+static inline int
+pop (x)
+ 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 (l10nfile_list, dirlist, dirlist_len, mask, language,
+ territory, codeset, normalized_codeset, modifier, special,
+ sponsor, revision, filename, do_allocate)
+ 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 *last = NULL;
+ struct loaded_l10nfile *retval;
+ char *cp;
+ size_t entries;
+ int cnt;
+
+ /* 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) + 1 : 0)
+ + ((mask & CEN_REVISION) != 0
+ ? strlen (revision) + 1 : 0)) : 0)
+ + 1 + strlen (filename) + 1);
+
+ if (abs_filename == NULL)
+ return NULL;
+
+ retval = NULL;
+ last = NULL;
+
+ /* Construct file name. */
+ memcpy (abs_filename, dirlist, dirlist_len);
+ __argz_stringify (abs_filename, dirlist_len, ':');
+ cp = abs_filename + (dirlist_len - 1);
+ *cp++ = '/';
+ 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. */
+ last = NULL;
+ 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;
+ }
+
+ last = retval;
+ }
+
+ if (retval != NULL || do_allocate == 0)
+ {
+ free (abs_filename);
+ return retval;
+ }
+
+ retval = (struct loaded_l10nfile *)
+ malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
+ * (1 << pop (mask))
+ * sizeof (struct loaded_l10nfile *)));
+ if (retval == NULL)
+ return NULL;
+
+ retval->filename = abs_filename;
+ retval->decided = (__argz_count (dirlist, dirlist_len) != 1
+ || ((mask & XPG_CODESET) != 0
+ && (mask & XPG_NORM_CODESET) != 0));
+ retval->data = NULL;
+
+ if (last == NULL)
+ {
+ retval->next = *l10nfile_list;
+ *l10nfile_list = retval;
+ }
+ else
+ {
+ retval->next = last->next;
+ last->next = retval;
+ }
+
+ entries = 0;
+ /* If the DIRLIST is a real list the RETVAL entry corresponds not to
+ a real file. So we have to use the DIRLIST separation mechanism
+ of the inner loop. */
+ cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
+ for (; cnt >= 0; --cnt)
+ if ((cnt & ~mask) == 0
+ && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
+ && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
+ {
+ /* 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);
+ }
+ 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. */
+const char *
+_nl_normalize_codeset (codeset, name_len)
+ const unsigned 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 (codeset[cnt]))
+ {
+ ++len;
+
+ if (isalpha (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 (codeset[cnt]))
+ *wp++ = tolower (codeset[cnt]);
+ else if (isdigit (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 (dest, src)
+ char *dest;
+ const char *src;
+{
+ while ((*dest++ = *src++) != '\0')
+ /* Do nothing. */ ;
+ return dest - 1;
+}
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/libgettext.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/libgettext.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/libgettext.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/linux-msg.sed
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/linux-msg.sed 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/linux-msg.sed 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,100 @@
+# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file
+# Copyright (C) 1995 Free Software Foundation, Inc.
+# Ulrich Drepper <drepper at gnu.ai.mit.edu>, 1995.
+#
+# 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.
+#
+#
+# The first directive in the .msg should be the definition of the
+# message set number. We use always set number 1.
+#
+1 {
+ i\
+$set 1 # Automatically created by po2msg.sed
+ h
+ s/.*/0/
+ x
+}
+#
+# Mitch's old catalog format does not allow comments.
+#
+# We copy the original message as a comment into the .msg file.
+#
+/^msgid/ {
+ s/msgid[ ]*"//
+#
+# This does not work now with the new format.
+# /"$/! {
+# s/\\$//
+# s/$/ ... (more lines following)"/
+# }
+ x
+# The following nice solution is by
+# Bruno <Haible at ma2s2.mathematik.uni-karlsruhe.de>
+ td
+# Increment a decimal number in pattern space.
+# First hide trailing `9' digits.
+ :d
+ s/9\(_*\)$/_\1/
+ td
+# Assure at least one digit is available.
+ s/^\(_*\)$/0\1/
+# Increment the last digit.
+ s/8\(_*\)$/9\1/
+ s/7\(_*\)$/8\1/
+ s/6\(_*\)$/7\1/
+ s/5\(_*\)$/6\1/
+ s/4\(_*\)$/5\1/
+ s/3\(_*\)$/4\1/
+ s/2\(_*\)$/3\1/
+ s/1\(_*\)$/2\1/
+ s/0\(_*\)$/1\1/
+# Convert the hidden `9' digits to `0's.
+ s/_/0/g
+ x
+ G
+ s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p
+}
+#
+# The .msg file contains, other then the .po file, only the translations
+# but each given a unique ID. Starting from 1 and incrementing by 1 for
+# each message we assign them to the messages.
+# It is important that the .po file used to generate the cat-id-tbl.c file
+# (with po-to-tbl) is the same as the one used here. (At least the order
+# of declarations must not be changed.)
+#
+/^msgstr/ {
+ s/msgstr[ ]*"\(.*\)"/# \1/
+# Clear substitution flag.
+ tb
+# Append the next line.
+ :b
+ N
+# Look whether second part is continuation line.
+ s/\(.*\n\)"\(.*\)"/\1\2/
+# Yes, then branch.
+ ta
+ P
+ D
+# Note that D includes a jump to the start!!
+# We found a continuation line. But before printing insert '\'.
+ :a
+ s/\(.*\)\(\n.*\)/\1\\\2/
+ P
+# We cannot use D here.
+ s/.*\n\(.*\)/\1/
+ tb
+}
+d
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/loadinfo.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/loadinfo.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/loadinfo.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,76 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper at cygnus.com>, 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, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef PARAMS
+# if __STDC__
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#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];
+};
+
+
+extern const char *_nl_normalize_codeset PARAMS ((const unsigned char *codeset,
+ size_t name_len));
+
+extern struct loaded_l10nfile *
+_nl_make_l10nflist PARAMS ((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));
+
+
+extern const char *_nl_expand_alias PARAMS ((const char *name));
+
+extern int _nl_explode_name PARAMS ((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));
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/loadmsgcat.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/loadmsgcat.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/loadmsgcat.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,222 @@
+/* Load needed message catalogs.
+ 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. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#endif
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC
+# include <sys/mman.h>
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+
+/* @@ 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
+
+/* 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 = 0;
+
+
+/* Load the message catalogs specified by FILENAME. If it is no valid
+ message catalog do nothing. */
+void
+internal_function
+_nl_load_domain (domain_file)
+ struct loaded_l10nfile *domain_file;
+{
+ int fd;
+ size_t size;
+ struct stat st;
+ struct mo_file_header *data = (struct mo_file_header *) -1;
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+ || defined _LIBC
+ int use_mmap = 0;
+#endif
+ struct loaded_domain *domain;
+
+ domain_file->decided = 1;
+ domain_file->data = NULL;
+
+ /* 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);
+ if (fd == -1)
+ return;
+
+ /* We must know about the size of the file. */
+ if (fstat (fd, &st) != 0
+ || (size = (size_t) st.st_size) != st.st_size
+ || size < sizeof (struct mo_file_header))
+ {
+ /* Something went wrong. */
+ close (fd);
+ return;
+ }
+
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+ || defined _LIBC
+ /* 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 (data != (struct mo_file_header *) -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 == -1)
+ {
+ 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 (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED)
+ {
+ /* The magic number is wrong: not a message catalog file. */
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+ || defined _LIBC
+ if (use_mmap)
+ munmap ((caddr_t) data, size);
+ else
+#endif
+ free (data);
+ return;
+ }
+
+ domain_file->data
+ = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
+ if (domain_file->data == NULL)
+ return;
+
+ domain = (struct loaded_domain *) domain_file->data;
+ domain->data = (char *) data;
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+ || defined _LIBC
+ domain->use_mmap = use_mmap;
+#endif
+ domain->mmap_size = size;
+ domain->must_swap = data->magic != _MAGIC;
+
+ /* Fill in the information about the available tables. */
+ switch (W (domain->must_swap, data->revision))
+ {
+ case 0:
+ domain->nstrings = W (domain->must_swap, data->nstrings);
+ domain->orig_tab = (struct string_desc *)
+ ((char *) data + W (domain->must_swap, data->orig_tab_offset));
+ domain->trans_tab = (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 = (nls_uint32 *)
+ ((char *) data + W (domain->must_swap, data->hash_tab_offset));
+ break;
+ default:
+ /* This is an illegal revision. */
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+ || defined _LIBC
+ if (use_mmap)
+ munmap ((caddr_t) data, size);
+ else
+#endif
+ free (data);
+ free (domain);
+ domain_file->data = NULL;
+ return;
+ }
+
+ /* Show that one domain is changed. This might make some cached
+ translations invalid. */
+ ++_nl_msg_cat_cntr;
+}
+
+
+#ifdef _LIBC
+void
+internal_function
+_nl_unload_domain (domain)
+ struct loaded_domain *domain;
+{
+ if (domain->use_mmap)
+ munmap ((caddr_t) domain->data, domain->mmap_size);
+ else
+ free ((void *) domain->data);
+
+ free (domain);
+}
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/localealias.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/localealias.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/localealias.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,424 @@
+/* Handle aliases for locale names.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper at gnu.ai.mit.edu>, 1995.
+
+ 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. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#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
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#else
+char *getenv ();
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# else
+void free ();
+# endif
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+# endif
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+#if !HAVE_STRCHR && !defined _LIBC
+# ifndef strchr
+# define strchr index
+# endif
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+
+/* @@ 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
+
+# define mempcpy __mempcpy
+# define HAVE_MEMPCPY 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
+
+
+/* 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 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); \
+ } \
+ } while (0)
+# undef alloca
+# define alloca(size) (malloc (size))
+#endif /* have alloca */
+
+
+struct alias_map
+{
+ const char *alias;
+ const char *value;
+};
+
+
+static char *string_space = NULL;
+static size_t string_space_act = 0;
+static size_t string_space_max = 0;
+static struct alias_map *map;
+static size_t nmap = 0;
+static size_t maxmap = 0;
+
+
+/* Prototypes for local functions. */
+static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
+ internal_function;
+static void extend_alias_table PARAMS ((void));
+static int alias_compare PARAMS ((const struct alias_map *map1,
+ const struct alias_map *map2));
+
+
+const char *
+_nl_expand_alias (name)
+ const char *name;
+{
+ static const char *locale_alias_path = LOCALE_ALIAS_PATH;
+ struct alias_map *retval;
+ const char *result = NULL;
+ size_t added;
+
+#ifdef _LIBC
+ __libc_lock_lock (lock);
+#endif
+
+ do
+ {
+ struct alias_map item;
+
+ item.alias = name;
+
+ if (nmap > 0)
+ retval = (struct alias_map *) bsearch (&item, map, nmap,
+ sizeof (struct alias_map),
+ (int (*) PARAMS ((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] == ':')
+ ++locale_alias_path;
+ start = locale_alias_path;
+
+ while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':')
+ ++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 (fname, fname_len)
+ const char *fname;
+ int fname_len;
+{
+#ifndef HAVE_ALLOCA
+ struct block_list *block_list = NULL;
+#endif
+ FILE *fp;
+ char *full_fname;
+ size_t added;
+ static const char aliasfile[] = "/locale.alias";
+
+ full_fname = (char *) alloca (fname_len + sizeof aliasfile);
+ ADD_BLOCK (block_list, full_fname);
+#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 (full_fname, "r");
+ if (fp == NULL)
+ {
+ FREE_BLOCKS (block_list);
+ return 0;
+ }
+
+ 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
+ */
+ unsigned char buf[BUFSIZ];
+ unsigned char *alias;
+ unsigned char *value;
+ unsigned char *cp;
+
+ if (fgets (buf, sizeof buf, fp) == NULL)
+ /* EOF reached. */
+ break;
+
+ /* Possibly not the whole line fits into the buffer. Ignore
+ the rest of the line. */
+ if (strchr (buf, '\n') == NULL)
+ {
+ char altbuf[BUFSIZ];
+ do
+ if (fgets (altbuf, sizeof altbuf, fp) == NULL)
+ /* Make sure the inner loop will be left. The outer loop
+ will exit at the `feof' test. */
+ break;
+ while (strchr (altbuf, '\n') == NULL);
+ }
+
+ cp = buf;
+ /* Ignore leading white space. */
+ while (isspace (cp[0]))
+ ++cp;
+
+ /* A leading '#' signals a comment line. */
+ if (cp[0] != '\0' && cp[0] != '#')
+ {
+ alias = cp++;
+ while (cp[0] != '\0' && !isspace (cp[0]))
+ ++cp;
+ /* Terminate alias name. */
+ if (cp[0] != '\0')
+ *cp++ = '\0';
+
+ /* Now look for the beginning of the value. */
+ while (isspace (cp[0]))
+ ++cp;
+
+ if (cp[0] != '\0')
+ {
+ size_t alias_len;
+ size_t value_len;
+
+ value = cp++;
+ while (cp[0] != '\0' && !isspace (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)
+ extend_alias_table ();
+
+ 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)
+ {
+ FREE_BLOCKS (block_list);
+ return added;
+ }
+ 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;
+ }
+ }
+ }
+
+ /* 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 (*) PARAMS ((const void *, const void *))) alias_compare);
+
+ FREE_BLOCKS (block_list);
+ return added;
+}
+
+
+static void
+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;
+
+ map = new_map;
+ maxmap = new_size;
+}
+
+
+#ifdef _LIBC
+static void __attribute__ ((unused))
+free_mem (void)
+{
+ if (string_space != NULL)
+ free (string_space);
+ if (map != NULL)
+ free (map);
+}
+text_set_element (__libc_subfreeres, free_mem);
+#endif
+
+
+static int
+alias_compare (map1, map2)
+ 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
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/po2tbl.sed.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/po2tbl.sed.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/po2tbl.sed.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,102 @@
+# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets
+# Copyright (C) 1995 Free Software Foundation, Inc.
+# Ulrich Drepper <drepper at gnu.ai.mit.edu>, 1995.
+#
+# 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.
+#
+1 {
+ i\
+/* Automatically generated by po2tbl.sed from @PACKAGE NAME at .pot. */\
+\
+#if HAVE_CONFIG_H\
+# include <config.h>\
+#endif\
+\
+#include "libgettext.h"\
+\
+const struct _msg_ent _msg_tbl[] = {
+ h
+ s/.*/0/
+ x
+}
+#
+# Write msgid entries in C array form.
+#
+/^msgid/ {
+ s/msgid[ ]*\(".*"\)/ {\1/
+ tb
+# Append the next line
+ :b
+ N
+# Look whether second part is continuation line.
+ s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/
+# Yes, then branch.
+ ta
+# Because we assume that the input file correctly formed the line
+# just read cannot be again be a msgid line. So it's safe to ignore
+# it.
+ s/\(.*\)\n.*/\1/
+ bc
+# We found a continuation line. But before printing insert '\'.
+ :a
+ s/\(.*\)\(\n.*\)/\1\\\2/
+ P
+# We cannot use D here.
+ s/.*\n\(.*\)/\1/
+# Some buggy seds do not clear the `successful substitution since last ``t'''
+# flag on `N', so we do a `t' here to clear it.
+ tb
+# Not reached
+ :c
+ x
+# The following nice solution is by
+# Bruno <Haible at ma2s2.mathematik.uni-karlsruhe.de>
+ td
+# Increment a decimal number in pattern space.
+# First hide trailing `9' digits.
+ :d
+ s/9\(_*\)$/_\1/
+ td
+# Assure at least one digit is available.
+ s/^\(_*\)$/0\1/
+# Increment the last digit.
+ s/8\(_*\)$/9\1/
+ s/7\(_*\)$/8\1/
+ s/6\(_*\)$/7\1/
+ s/5\(_*\)$/6\1/
+ s/4\(_*\)$/5\1/
+ s/3\(_*\)$/4\1/
+ s/2\(_*\)$/3\1/
+ s/1\(_*\)$/2\1/
+ s/0\(_*\)$/1\1/
+# Convert the hidden `9' digits to `0's.
+ s/_/0/g
+ x
+ G
+ s/\(.*\)\n\([0-9]*\)/\1, \2},/
+ s/\(.*\)"$/\1/
+ p
+}
+#
+# Last line.
+#
+$ {
+ i\
+};\
+
+ g
+ s/0*\(.*\)/int _msg_tbl_length = \1;/p
+}
+d
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/textdomain.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/textdomain.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/textdomain.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,108 @@
+/* Implementation of the textdomain(3) function.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper at gnu.ai.mit.edu>, 1995.
+
+ 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. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#endif
+
+#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Name of the default text domain. */
+extern const char _nl_default_default_domain[];
+
+/* Default text domain in which entries for gettext(3) are to be found. */
+extern const char *_nl_current_default_domain;
+
+
+/* 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 textdomain__
+#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". */
+char *
+TEXTDOMAIN (domainname)
+ const char *domainname;
+{
+ char *old;
+
+ /* A NULL pointer requests the current setting. */
+ if (domainname == NULL)
+ return (char *) _nl_current_default_domain;
+
+ old = (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;
+ 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
+ _nl_current_default_domain = strdup (domainname);
+#else
+ size_t len = strlen (domainname) + 1;
+ char *cp = (char *) malloc (len);
+ if (cp != NULL)
+ memcpy (cp, domainname, len);
+ _nl_current_default_domain = cp;
+#endif
+ }
+
+ if (old != _nl_default_default_domain)
+ free (old);
+
+ return (char *) _nl_current_default_domain;
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__textdomain, textdomain);
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/intl/xopen-msg.sed
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/intl/xopen-msg.sed 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/intl/xopen-msg.sed 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,104 @@
+# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file
+# Copyright (C) 1995 Free Software Foundation, Inc.
+# Ulrich Drepper <drepper at gnu.ai.mit.edu>, 1995.
+#
+# 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.
+#
+#
+# The first directive in the .msg should be the definition of the
+# message set number. We use always set number 1.
+#
+1 {
+ i\
+$set 1 # Automatically created by po2msg.sed
+ h
+ s/.*/0/
+ x
+}
+#
+# We copy all comments into the .msg file. Perhaps they can help.
+#
+/^#/ s/^#[ ]*/$ /p
+#
+# We copy the original message as a comment into the .msg file.
+#
+/^msgid/ {
+# Does not work now
+# /"$/! {
+# s/\\$//
+# s/$/ ... (more lines following)"/
+# }
+ s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/
+ p
+}
+#
+# The .msg file contains, other then the .po file, only the translations
+# but each given a unique ID. Starting from 1 and incrementing by 1 for
+# each message we assign them to the messages.
+# It is important that the .po file used to generate the cat-id-tbl.c file
+# (with po-to-tbl) is the same as the one used here. (At least the order
+# of declarations must not be changed.)
+#
+/^msgstr/ {
+ s/msgstr[ ]*"\(.*\)"/\1/
+ x
+# The following nice solution is by
+# Bruno <Haible at ma2s2.mathematik.uni-karlsruhe.de>
+ td
+# Increment a decimal number in pattern space.
+# First hide trailing `9' digits.
+ :d
+ s/9\(_*\)$/_\1/
+ td
+# Assure at least one digit is available.
+ s/^\(_*\)$/0\1/
+# Increment the last digit.
+ s/8\(_*\)$/9\1/
+ s/7\(_*\)$/8\1/
+ s/6\(_*\)$/7\1/
+ s/5\(_*\)$/6\1/
+ s/4\(_*\)$/5\1/
+ s/3\(_*\)$/4\1/
+ s/2\(_*\)$/3\1/
+ s/1\(_*\)$/2\1/
+ s/0\(_*\)$/1\1/
+# Convert the hidden `9' digits to `0's.
+ s/_/0/g
+ x
+# Bring the line in the format `<number> <message>'
+ G
+ s/^[^\n]*$/& /
+ s/\(.*\)\n\([0-9]*\)/\2 \1/
+# Clear flag from last substitution.
+ tb
+# Append the next line.
+ :b
+ N
+# Look whether second part is a continuation line.
+ s/\(.*\n\)"\(.*\)"/\1\2/
+# Yes, then branch.
+ ta
+ P
+ D
+# Note that `D' includes a jump to the start!!
+# We found a continuation line. But before printing insert '\'.
+ :a
+ s/\(.*\)\(\n.*\)/\1\\\2/
+ P
+# We cannot use the sed command `D' here
+ s/.*\n\(.*\)/\1/
+ tb
+}
+d
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,181 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2001-05-19 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.bsd-lib, Makefile.dll-lib, Makefile.elf-lib,
+ Makefile.solaris-lib: Use $(LDCONFIG) instead of -ldconfig.
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-07-18 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.15
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+1998-03-31 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.bsd-lib, Makefile.dll-lib, Makefile.elf-lib,
+ Makefile.profile: Change to use new installation directory
+ variables convention. Add uninstall rules.
+
+1998-03-28 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.elf-lib (installdirs): Change use of DLL_INSTALL_DIR to
+ ELF_INSTALL_DIR. (Doesn't make a difference currently,
+ but it's correct this way.)
+
+Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.11
+
+Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * Release of E2fsprogs version 1.10
+
+Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.09
+
+Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.08
+
+Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * Release of E2fsprogs version 1.07
+
+Sat Mar 8 13:23:43 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.elf-lib (image): Allow Makefile.in files to specify
+ a list of libraries which the shared library depends upon.
+
+Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.06
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+Wed Aug 28 15:20:26 1996 Miles Bader <miles at gnu.ai.mit.edu>
+
+ * Makefile.elf-lib (installdirs-elf-lib): Renamed from installdirs
+ to avoid making random directories only neeeded when installing
+ normal libraries.
+ (install-shlibs): Use installdirs-elf-lib instead of installdirs.
+
+Thu May 23 12:40:12 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.elf-lib: Install the .so files in /usr/lib, since the
+ .a files are stored there. (We were installing the .so
+ files in the wrong place before.)
+
+Thu May 16 11:12:30 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.04
+
+Wed May 15 22:59:06 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.profile (install): Add an install production so that
+ the profiling libraries are installed.
+
+Wed Mar 27 00:33:40 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.03
+
+Wed Jan 31 11:06:08 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.02
+
+Mon Oct 30 21:11:47 1995 <tytso at rsts-11.mit.edu>
+
+ * Makefile.elf-lib: Changes to pass -soname to the linker, so that
+ ld.so knows which version of the library to load when
+ there's more than one major version of the shared library.
+
+Mon Sep 4 21:42:46 1995 Remy Card <card at bbj>
+
+ * Makefile.bsd-lib: New file containing support for BSD shared
+ libraries.
+
+Sat Aug 5 11:43:05 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * Makefile.dll-lib: Added new target install-shlibs, which just
+ installs the shared libraries.
+
+ * Makefile.elf-lib: Added new target install-shlibs, which just
+ installs the shared libraries.
+
+Tue Jul 18 21:24:13 1995 <tytso at rsx-11.mit.edu>
+
+ * Makefile.dll-lib (jump): For each of the libraries jump/jump.*
+ files are now in in dll/jump.*; now the subdirs target
+ takes care of creating the jump directory, and then copy
+ the jump.* files from the dll directory to the jump
+ directory. This allows dll libraries to be built where
+ the build directory is not equal to the source directory.
+
+Tue Jul 11 22:05:56 1995 <tytso at rsx-11.mit.edu>
+
+ * Makefile.checker,Makefile.elf-lib,Makefile.dll-lib,
+ Makefile.profile: Add rule to mkdir the appropriate object
+ subdirectory (checker, elfshared, jump, profiled, etc.)
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.bsd-lib
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.bsd-lib 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.bsd-lib 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,41 @@
+#
+# 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:: pic image
+
+subdirs:: pic
+
+pic:
+ mkdir pic
+
+BSD_LIB = $(BSDLIB_IMAGE).so.$(BSDLIB_VERSION)
+
+image: $(BSD_LIB)
+
+$(BSD_LIB): $(OBJS)
+ (cd pic; ld -Bshareable -o $(BSD_LIB) $(OBJS))
+ $(MV) pic/$(BSD_LIB) .
+ $(RM) -f ../$(BSD_LIB)
+ $(LN) $(BSD_LIB) ../$(BSD_LIB)
+
+install-shlibs install:: $(BSD_LIB)
+ $(INSTALL_PROGRAM) $(BSD_LIB) \
+ $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
+ -$(LDCONFIG)
+
+uninstall-shlibs uninstall::
+ $(RM) -f $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
+
+clean::
+ $(RM) -rf pic
+ $(RM) -f $(BSD_LIB)
+ $(RM) -f ../$(BSD_LIB)
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.checker
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.checker 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.checker 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,16 @@
+all:: checker $(LIBRARY)_chk.a
+
+subdirs:: checker
+
+checker:
+ mkdir checker
+
+clean::
+ $(RM) -rf checker
+
+$(LIBRARY)_chk.a: $(OBJS)
+ @(test -r $@ && $(RM) -f $@.bak && $(MV) $@ $@.bak)
+ (cd checker; $(ARUPD) $@ $(OBJS))
+ -$(RANLIB) $@
+ $(RM) -f ../$@
+ $(LN) $@ ../$@
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.dll-lib
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.dll-lib 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.dll-lib 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,101 @@
+#
+# This is a Makefile stub which handles the creation of Linux DLL-style shared
+# libraries.
+#
+# In order to use this stub, the following makefile variables must be defined.
+#
+# DLL_ADDRESS = 0x80000000
+# DLL_JUMPSIZE = 0x1000
+# DLL_GOTSIZE = 0x1000
+# DLL_VERSION = 1.0
+# DLL_IMAGE = libce
+# DLL_STUB = libcom_err
+# DLL_MYDIR = et
+# DLL_INSTALL_DIR = $(SHLIBDIR)
+#
+
+all:: jump image stubs
+
+subdirs:: jump jump/jump.funcs jump/jump.ignore jump/jump.import \
+ jump/jump.params jump/jump.undefs jump/jump.vars
+
+jump:
+ mkdir jump
+
+jump/jump.funcs: dll/jump.funcs
+ $(CP) $< $@
+
+jump/jump.ignore: dll/jump.ignore
+ $(CP) $< $@
+
+jump/jump.import: dll/jump.import
+ $(CP) $< $@
+
+jump/jump.params: dll/jump.params
+ $(CP) $< $@
+
+jump/jump.undefs: dll/jump.undefs
+ $(CP) $< $@
+
+jump/jump.vars: dll/jump.vars
+ $(CP) $< $@
+
+#
+# This is a horrible hack to try to find libgcc.a --- the DLL documentation
+# states that you should just be able to do -lgcc, but modern gcc
+# installation packages don't install /usr/lib/libgcc.a --- as well they
+# shouldn't since libgcc.a can be gcc version dependent.
+# If this hack doesn't work, try replacing it with a hardcoded path to
+# libgcc.a, or -lgcc.
+#
+#DLL_LIBGCC ="`$(CC) -v 2>&1 | head -1 | \
+# sed -e 's;[^/]*;;' -e 's/specs/libgcc.a/'`"
+DLL_LIBGCC ="`$(CC) --print-libgcc-file-name`"
+
+image: $(DLL_IMAGE).so.$(DLL_VERSION)
+
+stubs: $(DLL_STUB).sa $(OBJS)
+
+$(DLL_IMAGE).so.$(DLL_VERSION): $(OBJS)
+ (cd jump; export JUMP_DIR=`pwd`; \
+ $(DLL_BIN)/mkimage -l $(DLL_IMAGE) -v $(DLL_VERSION) \
+ -a $(DLL_ADDRESS) -j $(DLL_JUMPSIZE) -g $(DLL_GOTSIZE) -- \
+ $(OBJS) -lc $(DLL_LIBS) $(DLL_LIBGCC) -lc)
+ $(MV) jump/$(DLL_IMAGE).so.$(DLL_VERSION) .
+ $(LN) -f $(DLL_IMAGE).so.$(DLL_VERSION) \
+ `echo ../$(DLL_IMAGE).so.$(DLL_VERSION) | \
+ sed -e 's/\.[0-9]*\$$//'`
+
+$(DLL_STUB).sa:
+ (cd jump; export JUMP_DIR=`pwd`; \
+ $(DLL_BIN)/mkstubs -l $(DLL_IMAGE) -v $(DLL_VERSION) \
+ -a $(DLL_ADDRESS) -j $(DLL_JUMPSIZE) -g $(DLL_GOTSIZE) \
+ -- $(DLL_STUB))
+ $(MV) jump/$(DLL_STUB).sa .
+ $(RM) -f ../$@
+ $(LN) $@ ../$@
+
+installdirs::
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(DLL_INSTALL_DIR)
+
+install-shlibs install:: $(DLL_IMAGE).so.$(DLL_VERSION) installdirs
+ $(INSTALL_PROGRAM) $(DLL_IMAGE).so.$(DLL_VERSION) \
+ $(DESTDIR)$(DLL_INSTALL_DIR)/$(DLL_IMAGE).so.$(DLL_VERSION)
+ $(STRIP) $(DESTDIR)$(DLL_INSTALL_DIR)/$(DLL_IMAGE).so.$(DLL_VERSION)
+ -$(LDCONFIG)
+
+uninstall-shlibs unistall::
+ $(RM) $(DESTDIR)$(DLL_INSTALL_DIR)/$(DLL_IMAGE).so.$(DLL_VERSION)
+
+install:: $(DLL_STUB).sa
+ $(INSTALL_DATA) $(DLL_STUB).sa $(DESTDIR)$(libdir)/$(DLL_STUB).sa
+ $(CHMOD) 644 $(DESTDIR)$(libdir)/$(DLL_STUB).sa
+ $(RANLIB) $(DESTDIR)$(libdir)/$(DLL_STUB).sa
+ $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/$(DLL_STUB).sa
+
+clean::
+ $(RM) -f ../$(DLL_STUB).sa $(DLL_STUB).sa \
+ $(DLL_IMAGE).so.$(DLL_VERSION) ../$(DLL_IMAGE).so.*
+ $(RM) -rf jump
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.elf-lib
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.elf-lib 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.elf-lib 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,59 @@
+#
+# 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:: elfshared image
+
+subdirs:: elfshared
+
+elfshared:
+ mkdir elfshared
+
+ELF_LIB = $(ELF_IMAGE).so.$(ELF_VERSION)
+ELF_SONAME = $(ELF_IMAGE).so.$(ELF_SO_VERSION)
+
+image: $(ELF_LIB)
+
+$(ELF_LIB): $(OBJS)
+ (cd elfshared; $(CC) --shared -o $(ELF_LIB) -Wl,-soname,$(ELF_SONAME) \
+ $(OBJS) $(ELF_OTHER_LIBS))
+ $(MV) elfshared/$(ELF_LIB) .
+ $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)
+ $(LN) $(ELF_LIB) ../$(ELF_LIB)
+ $(LN) ../$(ELF_LIB) ../$(ELF_IMAGE).so
+ $(LN) ../$(ELF_LIB) ../$(ELF_SONAME)
+
+installdirs-elf-lib::
+ $(top_srcdir)/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)
+ $(STRIP) --strip-debug \
+ $(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)
+
+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)
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.library
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.library 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.library 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,13 @@
+all:: subdirs $(LIBRARY).a
+
+install-shlibs::
+
+subdirs::
+
+$(LIBRARY).a: $(OBJS)
+ (if test -r $@; then $(RM) -f $@.bak && $(MV) $@ $@.bak; fi)
+ $(ARUPD) $@ $(OBJS)
+ -$(RANLIB) $@
+ $(RM) -f ../$@
+ $(LN) $@ ../$@
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.profile
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.profile 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.profile 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,26 @@
+all:: profiled $(LIBRARY)_p.a
+
+subdirs:: profiled
+
+profiled:
+ mkdir profiled
+
+clean::
+ $(RM) -rf profiled
+ $(RM) -f $(LIBRARY)_p.a ../$(LIBRARY)_p.a
+
+$(LIBRARY)_p.a: $(OBJS)
+ (if test -r $@; then $(RM) -f $@.bak && $(MV) $@ $@.bak; fi)
+ (cd profiled; $(ARUPD) ../$@ $(OBJS))
+ -$(RANLIB) $@
+ $(RM) -f ../$@
+ $(LN) $@ ../$@
+
+install:: $(LIBRARY)_p.a installdirs
+ $(INSTALL_DATA) $(LIBRARY)_p.a $(DESTDIR)$(libdir)/$(LIBRARY)_p.a
+ $(CHMOD) 644 $(DESTDIR)$(libdir)/$(LIBRARY)_p.a
+ -$(RANLIB) $(DESTDIR)$(libdir)/$(LIBRARY)_p.a
+ $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/$(LIBRARY)_p.a
+
+uninstall::
+ $(RM) -f $(DESTDIR)$(libdir)/$(LIBRARY)_p.a
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.solaris-lib
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.solaris-lib 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/Makefile.solaris-lib 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,59 @@
+#
+# 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:: elfshared image
+
+subdirs:: elfshared
+
+elfshared:
+ mkdir elfshared
+
+ELF_LIB = $(ELF_IMAGE).so.$(ELF_VERSION)
+ELF_SONAME = $(ELF_IMAGE).so.$(ELF_SO_VERSION)
+
+image: $(ELF_LIB)
+
+$(ELF_LIB): $(OBJS)
+ (cd elfshared; $(CC) --shared -o $(ELF_LIB) -Wl,-h,$(ELF_SONAME) \
+ $(OBJS) $(ELF_OTHER_LIBS))
+ $(MV) elfshared/$(ELF_LIB) .
+ $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)
+ $(LN) $(ELF_LIB) ../$(ELF_LIB)
+ $(LN) ../$(ELF_LIB) ../$(ELF_IMAGE).so
+ $(LN) ../$(ELF_LIB) ../$(ELF_SONAME)
+
+installdirs-elf-lib::
+ $(top_srcdir)/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)
+ $(STRIP) -x \
+ $(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)
+
+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)
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+Makefile
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,413 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-12-16 Theodore Tso <tytso at mit.edu>
+
+ * pf.c: Add const to struct flags_name to avoid -Wall complaints.
+
+2001-11-05 Theodore Tso <tytso at mit.edu>
+
+ * pf.c: Add a new file attribute, EXT2_NOTAIL_FL
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * feature.c: Add entry in feature table to interpret
+ EXT2_FEATURE_COMPAT_EXT_ATTR.
+
+ * Release of E2fsprogs 1.22
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-06-01 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in, uuid.c: Move include/asm/types.h.in to
+ lib/ext2fs/ext2_types.h.in.
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2001-05-20 Theodore Tso <tytso at valinux.com>
+
+ * e2p.h: #include <> instead of "" for ext2fs and et header files,
+ since they will be installed in /usr/include
+
+2001-05-14 Theodore Tso <tytso at valinux.com>
+
+ * e2p.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
+
+2001-05-11 Andreas Dilger <adilger at turbolinux.com>
+
+ * feature.c: Add COMPAT_DIR_INDEX and RESIZE_INODE known features
+
+2001-05-13 Theodore Tso <tytso at valinux.com>
+
+ * ls.c (print_features): Added missing space when printing (none)
+ as the filesystem feature.
+ (list_super2): If the filesystem revision is unknown, say so.
+
+2001-01-15 Theodore Ts'o <tytso at valinux.com>
+
+ * ls.c (list_super2): Fix bug where we were printing the
+ filesystem UUID instead of journal UUID when trying to
+ display the journal UUID.
+
+2001-01-14 Theodore Ts'o <tytso at valinux.com>
+
+ * feature.c: Remove backward compatibility #ifdef's for old
+ ext2_fs.h header files.
+
+ * feature.c: Add definition for EXT3_FEATURE_INCOMPAT_JOURNAL_DEV
+
+2001-01-11 Theodore Ts'o <tytso at valinux.com>
+
+ * pf.c: Clarified name of the Compression_Raw_Access flag, and
+ capitalized Journaled_Data.
+
+2001-01-01 <tytso at snap.thunk.org>
+
+ * ls.c: Remove our own internal definition of struct ext2fs_sb.
+ We can assume that ext2_super_block is always up to date.
+
+2000-12-31 <tytso at snap.thunk.org>
+
+ * pf.c: Add code to print out the journalled data flag.
+
+2000-12-02 <tytso at snap.thunk.org>
+
+ * fgetflags.c (fgetflags):
+ * fgetversion.c (fgetversion):
+ * fsetflags.c (fsetflags):
+ * fsetversion.c (fsetversion): Use the LFS API if available so
+ that the files are opened with O_LARGEFILE. Addresses
+ Debian bug #72690.
+
+2000-08-14 <tytso at valinux.com>
+
+ * ls.c (list_super): Use better description of s_last_orphan
+
+ * ls.c (list_super, list_super2): Added new API function which
+ takes a FILE * so that the output can be redirected to a
+ stream.
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+2000-07-06 Theodore Ts'o <tytso at valinux.com>
+
+ * ls.c (list_super): Display the journal information fields in the
+ superblock if the filesystem has a journal.
+
+2000-07-04 Theodore Ts'o <tytso at valinux.com>
+
+ * Makefile.in: Remove explicit link of -lc in the shared library.
+ (It shouldn't be necessary, and is harmful in some cases).
+
+2000-05-08 Theodore Ts'o <tytso at valinux.com>
+
+ * ls.c (list_super): Change the string displayed for the Hurd to
+ be GNU/Hurd, instead of just "GNU".
+
+Thu Apr 6 17:38:00 2000 Theodore Y. Ts'o <tytso at signal.thunk.org>
+
+ * feature.c: Make feature_list static; it shouldn't be exported.
+
+ * dll/jump.funcs: Update a.out shared library control file.
+
+2000-04-03 Theodore Ts'o <tytso at valinux.com>
+
+ * pf.c (print_flags): Rename EXT2_NOCOMP_FL to EXT2_NOCOMPR_FL.
+
+ * Makefile.in: Add "set -e" so that any errors in installing
+ header files causes an immediate exit.
+
+2000-02-10 Theodore Ts'o <tytso at valinux.com>
+
+ * Makefile.in: Install the e2p.h header.
+
+ * e2p.h, pf.c (print_flags): Change the third parameter of
+ print_flags() to be an option parameter, although we only
+ support one option at this point.
+
+ * pf.c (print_flags): Updated to use a more generic structure for
+ storing the ext2 inode flags. Add support for the
+ (current) set of compression flags.
+
+1999-11-19 <tytso at valinux.com>
+
+ * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
+ the source directory.
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-26 <tytso at valinux.com>
+
+ * feature.c: Fix GCC warnings; add const to the char * types in
+ the function prototypes for e2p_feature2string and
+ e2p_edit_feature.
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-10-22 <tytso at valinux.com>
+
+ * feature.c (e2p_edit_feature), e2p.h: Add a new argument which
+ allows the calling application to limit what features the
+ user is allowed to set or clear using this function.
+ Also add support for comma separated lists.
+
+1999-09-07 <tytso at valinux.com>
+
+ * Makefile.in, feature.c, e2p.h: New file which is used for
+ displaying and editing superblock feature sets.
+
+ * ls.c (print_features, list_super): Add new function
+ print_features which is used to display the feature
+ bits in the superblock.
+
+1999-07-18 Theodore Ts'o <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.15
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+Mon Jan 4 02:34:53 1999 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * uuid.c: Use asm/types.h instead of linux/types.h, to be
+ consistent with other locations where we've had to do this
+ to work around glibc.
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-12-02 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Updated dependencies.
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+1998-03-30 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Change to use new installation directory variables
+ convention. Fix uninstall rules to take $(DESTDIR) into
+ account.
+
+1998-03-29 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * getversion.c (getversion): Return 0 if there's no error.
+
+ * fgetversion.c (fgetversion): Pass the address of the temporary
+ variable instead of the unitialized variable to the
+ EXT2_IOC_GETVERSION ioctl.
+
+Mon Mar 9 08:05:30 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * fgetflags.c, fgetversion.c, fsetflags.c, fsetversion.c,
+ getflags.c, getversion.c, setflags.c, setversion.c:
+ The ext2 version and flags ioctl's take an int *, not a
+ long *. Fix library to use the correct type, so we don't
+ have problems on the Alpha.
+
+Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.11
+
+Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * Release of E2fsprogs version 1.10
+
+Wed Apr 23 22:41:55 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * ls.c (list_super): Add #ifdef's so it will compile under 1.2.13
+
+Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.09
+
+Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.08
+
+Sat Apr 5 11:48:03 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ls.c (list_super): Display the filesystem revision and any
+ features that might be implemented.
+
+Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * Release of E2fsprogs version 1.07
+
+Thu Jan 2 00:06:29 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * uuid.c: Include string.h, since we use memcpy().
+
+Wed Jan 1 23:47:22 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ls.c (list_super): Copy times from the superblock to a time_t
+ variable. (The alpha has different sizes for time_t and
+ the time in the superblock.)
+
+Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.06
+
+Sun Sep 22 16:20:12 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * pf.c: Add support for the 'A' (no atime) flag.
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
+Sat Sep 7 14:48:35 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ls.c (interval_string): Pretty print the check interval.
+
+Tue Aug 6 14:12:36 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ls.c (list_super): Display the OS, volume label, last mounted,
+ and UUID field if present.
+
+Mon Jun 24 09:55:58 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ps.c, pf.c, pe.c, ls.c, setversion.c, setflags.c, getversion.c,
+ fsetversion.c, fsetflags.c, fgetversion.c, fgetflags.c,
+ getflags.c: Remove include of ext2_fs.h, since it's
+ included by e2p.h; this also solves a sys/types.h vs
+ linux/types.h inclusion ordering problem with the GNU libc.
+
+Thu May 16 11:12:30 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.04
+
+Wed Mar 27 00:33:40 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.03
+
+Wed Jan 31 11:06:08 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.02
+
+Tue Jan 2 20:50:44 1996 <tytso at rsts-11.mit.edu>
+
+ * fgetflags.c (fgetflags):
+ * fsetflags.c (fsetflags):
+ * fgetversion.c (fgetversion):
+ * fsetversion.c (fsetversion): Add the O_NONBLOCK flag to open
+ call, so that we don't hang trying to open things like
+ named pipes.
+
+Mon Oct 30 17:44:07 1995 <tytso at rsts-11.mit.edu>
+
+ * ls.c (list_super): Use the correct field (s_def_resgid) when
+ printing the reserved group gid.
+
+Fri Oct 27 18:07:48 1995 <tytso at rsts-11.mit.edu>
+
+ * iod.c (iterate_on_dir): Don't assume that d->reclen is the size
+ of the dirent structure; it isn't under Linux.
+
+Mon Sep 4 21:43:53 1995 Remy Card <card at bbj>
+
+ * Makefile.in: Added support for BSD shared libraries.
+
+Fri Aug 11 08:36:40 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * setflags.c: #include <sys/types.h> before including <sys/stat.h>
+
+Sat Aug 12 03:11:45 1995 Remy Card <card at bbj>
+
+ * Makefile.in (install): Install static libraries in $(ulibdir)
+ (/usr/lib on Linux) instead of $(libdir) (/lib on Linux).
+
+Sat Aug 5 11:43:36 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * Makefile.in (DLL_INSTALL_DIR, ELF_INSTALL_DIR): Set the
+ installation directories correctly.
+
+Thu Jun 15 23:41:20 1995 Remy Card <card at bbj>
+
+ * Makefile.in: Added support for ELF shared libraries.
+
+Mon Jun 12 08:34:44 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * e2p.h: Move <direct.h> after <stdio.h>
+
+Thu Jun 8 12:47:04 1995 Miles Bader <miles at churchy.gnu.ai.mit.edu>
+
+ * iod.c (iterate_on_dir): If struct dirent has a d_namlen field,
+ assume that actual dirent entries may be larger than the structure
+ (by the name field), and take extra care deal with this case.
+ This code assumes that d_reclen is a valid dirent field.
+ Also, don't include <dirent.h>, as e2p.h already does.
+
+ * fgetversion.c (fgetversion): Only use the ext2 ioctl if it
+ doesn't cause a compile-time barf, otherwise just return EOPNOTSUPP.
+ * getversion.c (getversion): Ditto.
+ * fsetversion.c (fsetversion): Ditto.
+ * setversion.c (setversion): Ditto.
+ * fsetflags.c (fsetflags): Use chflags instead of the ext2 ioctl
+ if possible, and otherwise only use the ioctl if it doesn't barf.
+ * setflags.c (setflags): Ditto (with fchflags).
+ * fgetflags.c (fgetflags): Use the stat st_flags field instead of
+ the ext2 ioctl if possible, and otherwise only use the ioctl if it
+ doesn't barf.
+ * getflags.c (getflags): Ditto.
+
+ * e2p.h: Include <sys/types.h>, as some <dirent.h>s need it.
+ * ls.c: Move the include of <sys/types.h> to where <grp.h> can see it.
+
+ * Makefile.in: Rewritten to conform to GNU coding standards and
+ support separate compilation directories.
+
+Mon Nov 7 21:59:12 1994 Remy Card <card at bbj>
+
+ * ls.c (list_super): List the new fields s_def_resuid and
+ s_def_resgid.
+
+ (print_user): New function which prints the uid and the user name.
+
+ (print_group): New function which prints the gid and the group name.
+
+Wed Aug 17 21:50:39 1994 Remy Card (card at bbj)
+
+ * pf.c (print_flags): New attributes are recognized and a long
+ format can be used.
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/Makefile.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/Makefile.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/Makefile.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,131 @@
+# Makefile for the second extended file system utility functions
+#
+# Copyright (C) 1993 Remy Card (card at 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@
+
+ at MCONFIG@
+
+all::
+
+OBJS= feature.o fgetflags.o fsetflags.o fgetversion.o fsetversion.o \
+ getflags.o getversion.o iod.o ls.o pe.o pf.o ps.o \
+ setflags.o setversion.o uuid.o
+
+SRCS= $(srcdir)/feature.c $(srcdir)/fgetflags.c \
+ $(srcdir)/fsetflags.c $(srcdir)/fgetversion.c \
+ $(srcdir)/fsetversion.c $(srcdir)/getflags.c \
+ $(srcdir)/getversion.c $(srcdir)/iod.c $(srcdir)/ls.c \
+ $(srcdir)/pe.c $(srcdir)/pf.c $(srcdir)/ps.c \
+ $(srcdir)/setflags.c $(srcdir)/setversion.c \
+ $(srcdir)/uuid.c
+
+HFILES= e2p.h
+
+LIBRARY= libe2p
+LIBDIR= e2p
+
+DLL_ADDRESS = 0x66980000
+DLL_JUMPSIZE = 0x1000
+DLL_GOTSIZE = 0x1000
+DLL_VERSION = 1.3
+DLL_IMAGE = libe2p
+DLL_STUB = libe2p
+DLL_MYDIR = e2p
+DLL_INSTALL_DIR = $(root_libdir)
+
+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)
+
+ at MAKEFILE_LIBRARY@
+ at MAKEFILE_DLL@
+ at MAKEFILE_ELF@
+ at MAKEFILE_BSDLIB@
+ at MAKEFILE_PROFILE@
+ at MAKEFILE_CHECKER@
+
+.c.o:
+ $(CC) $(ALL_CFLAGS) -c $< -o $@
+ at PROFILE_CMT@ $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+ at CHECKER_CMT@ $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
+ at DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) $(ALL_CFLAGS) \
+ at DLL_CMT@ -o jump/$*.o -c $<)
+ at ELF_CMT@ $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
+ at BSDLIB_CMT@ $(CC) $(ALL_CFLAGS) -fpic -o pic/$*.o -c $<
+
+installdirs::
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(includedir)/e2p
+
+install:: all installdirs
+ $(INSTALL_DATA) libe2p.a $(DESTDIR)$(libdir)/libe2p.a
+ $(CHMOD) 644 $(DESTDIR)$(libdir)/libe2p.a
+ -$(RANLIB) $(DESTDIR)$(libdir)/libe2p.a
+ $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libe2p.a
+ set -e; for i in $(HFILES); do \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/e2p/$$i; \
+ done
+
+uninstall::
+ $(RM) -f $(DESTDIR)$(libdir)/libe2p.a
+ $(RM) -rf $(DESTDIR)$(includedir)/e2p
+
+clean::
+ $(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* checker/*
+ $(RM) -f ../libe2p.a ../libe2p_p.a
+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
+#
+feature.o: $(srcdir)/feature.c $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+fgetflags.o: $(srcdir)/fgetflags.c $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+fsetflags.o: $(srcdir)/fsetflags.c $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+fgetversion.o: $(srcdir)/fgetversion.c $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+fsetversion.o: $(srcdir)/fsetversion.c $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+getflags.o: $(srcdir)/getflags.c $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+getversion.o: $(srcdir)/getversion.c $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+iod.o: $(srcdir)/iod.c $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h
+ls.o: $(srcdir)/ls.c $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h
+pe.o: $(srcdir)/pe.c $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h
+pf.o: $(srcdir)/pf.c $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h
+ps.o: $(srcdir)/ps.c $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h
+setflags.o: $(srcdir)/setflags.c $(srcdir)/e2p.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h
+setversion.o: $(srcdir)/setversion.c $(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/ext2fs/ext2_types.h \
+ $(srcdir)/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.funcs
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.funcs 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.funcs 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,18 @@
+00000000 T _fgetflags libe2p fgetflags
+00000000 T _fsetflags libe2p fsetflags
+00000000 T _fgetversion libe2p fgetversion
+00000000 T _fsetversion libe2p fsetversion
+00000000 T _getflags libe2p getflags
+00000000 T _getversion libe2p getversion
+00000000 T _iterate_on_dir libe2p iod
+00000000 T _list_super libe2p ls
+00000000 T _print_fs_errors libe2p pe
+00000000 T _print_flags libe2p pf
+00000000 T _print_fs_state libe2p ps
+00000000 T _setflags libe2p setflags
+00000000 T _setversion libe2p setversion
+00000000 T _e2p_is_null_uuid libe2p uuid
+00000000 T _e2p_uuid_to_str libe2p uuid
+00000000 T _e2p_feature2string libe2p feature
+00000000 T _e2p_string2feature libe2p feature
+00000000 T _e2p_edit_feature libe2p feature
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.ignore
===================================================================
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.import
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.import 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.import 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,164 @@
+/usr/lib/libc.sa(__libc.o):00001000 a __GOT_SIZE
+/usr/lib/libc.sa(__libc.o):6008f0b0 A _AL
+/usr/lib/libc.sa(__libc.o):6008f198 A _AL_PARM
+/usr/lib/libc.sa(__libc.o):6008f060 A _AM
+/usr/lib/libc.sa(__libc.o):6008f0b4 A _BC
+/usr/lib/libc.sa(__libc.o):6008f064 A _BS
+/usr/lib/libc.sa(__libc.o):6008f0bc A _BT
+/usr/lib/libc.sa(__libc.o):6008f068 A _CA
+/usr/lib/libc.sa(__libc.o):6008f0c0 A _CD
+/usr/lib/libc.sa(__libc.o):6008f0c4 A _CE
+/usr/lib/libc.sa(__libc.o):6008f0c8 A _CL
+/usr/lib/libc.sa(__libc.o):6008f0cc A _CM
+/usr/lib/libc.sa(__libc.o):6008f048 A _COLS
+/usr/lib/libc.sa(__libc.o):6008f0d0 A _CR
+/usr/lib/libc.sa(__libc.o):6008f0d4 A _CS
+/usr/lib/libc.sa(__libc.o):6008f06c A _DA
+/usr/lib/libc.sa(__libc.o):6008f070 A _DB
+/usr/lib/libc.sa(__libc.o):6008f0d8 A _DC
+/usr/lib/libc.sa(__libc.o):6008f0dc A _DL
+/usr/lib/libc.sa(__libc.o):6008f19c A _DL_PARM
+/usr/lib/libc.sa(__libc.o):6008f0e0 A _DM
+/usr/lib/libc.sa(__libc.o):6008f0e4 A _DO
+/usr/lib/libc.sa(__libc.o):6008f1a4 A _DOWN_PARM
+/usr/lib/libc.sa(__libc.o):6008f03c A _Def_term
+/usr/lib/libc.sa(__libc.o):6008f0e8 A _ED
+/usr/lib/libc.sa(__libc.o):6008f0ec A _EI
+/usr/lib/libc.sa(__libc.o):6008f074 A _EO
+/usr/lib/libc.sa(__libc.o):6008f1b8 A _GT
+/usr/lib/libc.sa(__libc.o):6008f078 A _HC
+/usr/lib/libc.sa(__libc.o):6008f118 A _HO
+/usr/lib/libc.sa(__libc.o):6008f07c A _HZ
+/usr/lib/libc.sa(__libc.o):6008f11c A _IC
+/usr/lib/libc.sa(__libc.o):6008f120 A _IM
+/usr/lib/libc.sa(__libc.o):6008f080 A _IN
+/usr/lib/libc.sa(__libc.o):6008f124 A _IP
+/usr/lib/libc.sa(__libc.o):6008f0f0 A _K0
+/usr/lib/libc.sa(__libc.o):6008f0f4 A _K1
+/usr/lib/libc.sa(__libc.o):6008f0f8 A _K2
+/usr/lib/libc.sa(__libc.o):6008f0fc A _K3
+/usr/lib/libc.sa(__libc.o):6008f100 A _K4
+/usr/lib/libc.sa(__libc.o):6008f104 A _K5
+/usr/lib/libc.sa(__libc.o):6008f108 A _K6
+/usr/lib/libc.sa(__libc.o):6008f10c A _K7
+/usr/lib/libc.sa(__libc.o):6008f110 A _K8
+/usr/lib/libc.sa(__libc.o):6008f114 A _K9
+/usr/lib/libc.sa(__libc.o):6008f128 A _KD
+/usr/lib/libc.sa(__libc.o):6008f12c A _KE
+/usr/lib/libc.sa(__libc.o):6008f130 A _KH
+/usr/lib/libc.sa(__libc.o):6008f134 A _KL
+/usr/lib/libc.sa(__libc.o):6008f138 A _KR
+/usr/lib/libc.sa(__libc.o):6008f13c A _KS
+/usr/lib/libc.sa(__libc.o):6008f140 A _KU
+/usr/lib/libc.sa(__libc.o):6008f1a8 A _LEFT_PARM
+/usr/lib/libc.sa(__libc.o):6008f044 A _LINES
+/usr/lib/libc.sa(__libc.o):6008f144 A _LL
+/usr/lib/libc.sa(__libc.o):6008f148 A _MA
+/usr/lib/libc.sa(__libc.o):6008f300 A _MCAppPath
+/usr/lib/libc.sa(__libc.o):6008f084 A _MI
+/usr/lib/libc.sa(__libc.o):6008f088 A _MS
+/usr/lib/libc.sa(__libc.o):6008f030 A _My_term
+/usr/lib/libc.sa(__libc.o):6008f08c A _NC
+/usr/lib/libc.sa(__libc.o):6008f14c A _ND
+/usr/lib/libc.sa(__libc.o):6008f150 A _NL
+/usr/lib/libc.sa(__libc.o):6008f1bc A _NONL
+/usr/lib/libc.sa(__libc.o):6008f090 A _NS
+/usr/lib/libc.sa(__libc.o):6008f094 A _OS
+/usr/lib/libc.sa(__libc.o):6008f1b0 A _PC
+/usr/lib/libc.sa(__libc.o):6008f154 A _RC
+/usr/lib/libc.sa(__libc.o):6008f1ac A _RIGHT_PARM
+/usr/lib/libc.sa(__libc.o):6008f158 A _SC
+/usr/lib/libc.sa(__libc.o):6008f15c A _SE
+/usr/lib/libc.sa(__libc.o):6008f160 A _SF
+/usr/lib/libc.sa(__libc.o):6008f164 A _SO
+/usr/lib/libc.sa(__libc.o):6008f168 A _SR
+/usr/lib/libc.sa(__libc.o):6008f16c A _TA
+/usr/lib/libc.sa(__libc.o):6008f170 A _TE
+/usr/lib/libc.sa(__libc.o):6008f174 A _TI
+/usr/lib/libc.sa(__libc.o):6008f178 A _UC
+/usr/lib/libc.sa(__libc.o):6008f17c A _UE
+/usr/lib/libc.sa(__libc.o):6008f098 A _UL
+/usr/lib/libc.sa(__libc.o):6008f180 A _UP
+/usr/lib/libc.sa(__libc.o):6008f1c0 A _UPPERCASE
+/usr/lib/libc.sa(__libc.o):6008f1a0 A _UP_PARM
+/usr/lib/libc.sa(__libc.o):6008f188 A _US
+/usr/lib/libc.sa(__libc.o):6008f18c A _VB
+/usr/lib/libc.sa(__libc.o):6008f194 A _VE
+/usr/lib/libc.sa(__libc.o):6008f190 A _VS
+/usr/lib/libc.sa(__libc.o):6008f09c A _XB
+/usr/lib/libc.sa(__libc.o):6008f0a0 A _XN
+/usr/lib/libc.sa(__libc.o):6008f0a8 A _XS
+/usr/lib/libc.sa(__libc.o):6008f0a4 A _XT
+/usr/lib/libc.sa(__libc.o):6008f0ac A _XX
+/usr/lib/libc.sa(__libc.o):6008f2a4 A __IO_file_jumps
+/usr/lib/libc.sa(__libc.o):6008f1f4 A __IO_list_all
+/usr/lib/libc.sa(__libc.o):6008f2a8 A __IO_proc_jumps
+/usr/lib/libc.sa(__libc.o):6008f1ec A __IO_stderr_
+/usr/lib/libc.sa(__libc.o):6008f1e4 A __IO_stdin_
+/usr/lib/libc.sa(__libc.o):6008f1e8 A __IO_stdout_
+/usr/lib/libc.sa(__libc.o):6008f2ac A __IO_str_jumps
+/usr/lib/libc.sa(__libc.o):6008f214 A ____brk_addr
+/usr/lib/libc.sa(__libc.o):6008f01c A ___ctype_b
+/usr/lib/libc.sa(__libc.o):6008f020 A ___ctype_tolower
+/usr/lib/libc.sa(__libc.o):6008f024 A ___ctype_toupper
+/usr/lib/libc.sa(__libc.o):6008f1fc A ___environ
+/usr/lib/libc.sa(__libc.o):6008f250 A ___exit_funcs
+/usr/lib/libc.sa(__libc.o):6008f2f0 A ___glob_closedir_hook
+/usr/lib/libc.sa(__libc.o):6008f2f4 A ___glob_opendir_hook
+/usr/lib/libc.sa(__libc.o):6008f2f8 A ___glob_readdir_hook
+/usr/lib/libc.sa(__libc.o):6008f278 A ___ttyname
+/usr/lib/libc.sa(__libc.o):6008f238 A __collate_info
+/usr/lib/libc.sa(__libc.o):6008f23c A __ctype_info
+/usr/lib/libc.sa(__libc.o):6008f028 A __echoit
+/usr/lib/libc.sa(__libc.o):6008f034 A __endwin
+/usr/lib/libc.sa(__libc.o):6008f288 A __gdbm_fetch_val
+/usr/lib/libc.sa(__libc.o):6008f280 A __gdbm_file
+/usr/lib/libc.sa(__libc.o):6008f284 A __gdbm_memory
+/usr/lib/libc.sa(__libc.o):6008f240 A __monetary_info
+/usr/lib/libc.sa(__libc.o):6008f234 A __null_auth
+/usr/lib/libc.sa(__libc.o):6008f244 A __numeric_info
+/usr/lib/libc.sa(__libc.o):6008f2ec A __obstack
+/usr/lib/libc.sa(__libc.o):6008f1c8 A __pfast
+/usr/lib/libc.sa(__libc.o):6008f02c A __rawmode
+/usr/lib/libc.sa(__libc.o):6008f1dc A __res
+/usr/lib/libc.sa(__libc.o):6008f04c A __res_iflg
+/usr/lib/libc.sa(__libc.o):6008f050 A __res_lflg
+/usr/lib/libc.sa(__libc.o):6008f270 A __res_opcodes
+/usr/lib/libc.sa(__libc.o):6008f274 A __res_resultcodes
+/usr/lib/libc.sa(__libc.o):6008f248 A __response_info
+/usr/lib/libc.sa(__libc.o):6008f2fc A __sigintr
+/usr/lib/libc.sa(__libc.o):6008f00c A __sys_errlist
+/usr/lib/libc.sa(__libc.o):6008f010 A __sys_nerr
+/usr/lib/libc.sa(__libc.o):6008f014 A __sys_siglist
+/usr/lib/libc.sa(__libc.o):6008f24c A __time_info
+/usr/lib/libc.sa(__libc.o):6008f05c A __tty
+/usr/lib/libc.sa(__libc.o):6008f040 A __tty_ch
+/usr/lib/libc.sa(__libc.o):6008f1cc A __unctrl
+/usr/lib/libc.sa(__libc.o):6008f27c A __win
+/usr/lib/libc.sa(__libc.o):6008f058 A _curscr
+/usr/lib/libc.sa(__libc.o):6008f228 A _daylight
+/usr/lib/libc.sa(__libc.o):6008f200 A _errno
+/usr/lib/libc.sa(__libc.o):6008f1d0 A _gdbm_errno
+/usr/lib/libc.sa(__libc.o):6008f28c A _gdbm_version
+/usr/lib/libc.sa(__libc.o):6008f008 A _h_errlist
+/usr/lib/libc.sa(__libc.o):6008f1d8 A _h_errno
+/usr/lib/libc.sa(__libc.o):6008f2a0 A _h_nerr
+/usr/lib/libc.sa(__libc.o):6008f1c4 A _normtty
+/usr/lib/libc.sa(__libc.o):6008f204 A _optarg
+/usr/lib/libc.sa(__libc.o):6008f20c A _opterr
+/usr/lib/libc.sa(__libc.o):6008f208 A _optind
+/usr/lib/libc.sa(__libc.o):6008f2e4 A _optopt
+/usr/lib/libc.sa(__libc.o):6008f218 A _ospeed
+/usr/lib/libc.sa(__libc.o):6008f26c A _re_max_failures
+/usr/lib/libc.sa(__libc.o):6008f210 A _re_syntax_options
+/usr/lib/libc.sa(__libc.o):6008f1e0 A _rexecoptions
+/usr/lib/libc.sa(__libc.o):6008f230 A _rpc_createerr
+/usr/lib/libc.sa(__libc.o):6008f25c A _stderr
+/usr/lib/libc.sa(__libc.o):6008f254 A _stdin
+/usr/lib/libc.sa(__libc.o):6008f258 A _stdout
+/usr/lib/libc.sa(__libc.o):6008f054 A _stdscr
+/usr/lib/libc.sa(__libc.o):6008f2e8 A _svc_fdset
+/usr/lib/libc.sa(__libc.o):6008f224 A _timezone
+/usr/lib/libc.sa(__libc.o):6008f21c A _tputs_baud_rate
+/usr/lib/libc.sa(__libc.o):6008f038 A _ttytype
+/usr/lib/libc.sa(__libc.o):6008f220 A _tzname
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.params
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.params 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.params 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,6 @@
+Name=libe2p
+Text=0x66980000
+Data=0x00000000
+Jump=0x00001000
+GOT=0x00001000
+Version=1.3.0
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.undefs
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.undefs 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.undefs 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+66982040 D __NEEDS_SHRLIB_libc_4
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/dll/jump.vars
===================================================================
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/e2p.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/e2p.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/e2p.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,39 @@
+#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
+
+
+/* `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);
+int e2p_string2feature(char *string, int *compat, unsigned int *mask);
+int e2p_edit_feature(const char *str, __u32 *compat_array, __u32 *ok_array);
+
+int e2p_is_null_uuid(void *uu);
+void e2p_uuid_to_str(void *uu, char *out);
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/feature.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/feature.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/feature.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,188 @@
+/*
+ * feature.c --- convert between features and strings
+ *
+ * Copyright (C) 1999 Theodore Ts'o <tytso at mit.edu>
+ *
+ * This file can be redistributed under the terms of the GNU Library General
+ * Public License
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+
+#include "e2p.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_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, EXT2_FEATURE_RO_COMPAT_BTREE_DIR,
+ "btree_dir" },
+ { 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" },
+ { 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;
+}
+
+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.
+ */
+int e2p_edit_feature(const char *str, __u32 *compat_array, __u32 *ok_array)
+{
+ char *cp, *buf, *next;
+ int neg;
+ unsigned int mask;
+ int compat_type;
+
+ 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++;
+ case '+':
+ cp++;
+ break;
+ }
+ if (e2p_string2feature(cp, &compat_type, &mask))
+ return 1;
+ if (ok_array && !(ok_array[compat_type] & mask))
+ return 1;
+ if (neg)
+ compat_array[compat_type] &= ~mask;
+ else
+ compat_array[compat_type] |= mask;
+ cp = next ? next+1 : 0;
+ }
+ return 0;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fgetflags.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fgetflags.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fgetflags.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,82 @@
+/*
+ * fgetflags.c - Get a file flags on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card at 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 Library General
+ * Public License
+ */
+
+/*
+ * 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
+#if HAVE_STAT_FLAGS
+#include <sys/stat.h>
+#else
+#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)
+{
+#if HAVE_STAT_FLAGS
+ struct stat buf;
+
+ if (stat (name, &buf) == -1)
+ return -1;
+
+ *flags = 0;
+#ifdef UF_IMMUTABLE
+ if (buf.st_flags & UF_IMMUTABLE)
+ *flags |= EXT2_IMMUTABLE_FL;
+#endif
+#ifdef UF_APPEND
+ if (buf.st_flags & UF_APPEND)
+ *flags |= EXT2_APPEND_FL;
+#endif
+#ifdef UF_NODUMP
+ if (buf.st_flags & UF_NODUMP)
+ *flags |= EXT2_NODUMP_FL;
+#endif
+
+ return 0;
+#else
+#if HAVE_EXT2_IOCTLS
+ int fd, r, f;
+
+ fd = open (name, OPEN_FLAGS);
+ if (fd == -1)
+ return -1;
+ r = ioctl (fd, EXT2_IOC_GETFLAGS, &f);
+ *flags = f;
+
+ close (fd);
+ return r;
+#else /* ! HAVE_EXT2_IOCTLS */
+ extern int errno;
+ errno = EOPNOTSUPP;
+ return -1;
+#endif /* ! HAVE_EXT2_IOCTLS */
+#endif
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fgetversion.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fgetversion.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fgetversion.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,54 @@
+/*
+ * fgetversion.c - Get a file version on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card at 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 Library General
+ * Public License
+ */
+
+/*
+ * 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
+ int fd, r, ver;
+
+ fd = open (name, OPEN_FLAGS);
+ if (fd == -1)
+ return - 1;
+ r = ioctl (fd, EXT2_IOC_GETVERSION, &ver);
+ *version = ver;
+ close (fd);
+ return r;
+#else /* ! HAVE_EXT2_IOCTLS */
+ extern int errno;
+ errno = EOPNOTSUPP;
+ return -1;
+#endif /* ! HAVE_EXT2_IOCTLS */
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fsetflags.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fsetflags.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fsetflags.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,77 @@
+/*
+ * fsetflags.c - Set a file flags on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card at 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 Library General
+ * Public License
+ */
+
+/*
+ * 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
+#if HAVE_CHFLAGS
+#include <sys/stat.h> /* For the flag values. */
+#else
+#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 fsetflags (const char * name, 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 chflags (name, bsd_flags);
+#else
+#if HAVE_EXT2_IOCTLS
+ int fd, r, f;
+
+ fd = open (name, OPEN_FLAGS);
+ if (fd == -1)
+ return -1;
+ f = (int) flags;
+ r = ioctl (fd, EXT2_IOC_SETFLAGS, &f);
+ close (fd);
+ return r;
+#else /* ! HAVE_EXT2_IOCTLS */
+ extern int errno;
+ errno = EOPNOTSUPP;
+ return -1;
+#endif /* ! HAVE_EXT2_IOCTLS */
+#endif
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fsetversion.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fsetversion.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/fsetversion.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,54 @@
+/*
+ * fsetversion.c - Set a file version on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card at 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 Library General
+ * Public License
+ */
+
+/*
+ * 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
+ int fd, r, ver;
+
+ fd = open (name, OPEN_FLAGS);
+ if (fd == -1)
+ return -1;
+ ver = (int) version;
+ r = ioctl (fd, EXT2_IOC_SETVERSION, &ver);
+ close (fd);
+ return r;
+#else /* ! HAVE_EXT2_IOCTLS */
+ extern int errno;
+ errno = EOPNOTSUPP;
+ return -1;
+#endif /* ! HAVE_EXT2_IOCTLS */
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/getflags.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/getflags.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/getflags.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,64 @@
+/*
+ * getflags.c - Get a file flags on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card at 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 Library General
+ * Public License
+ */
+
+/*
+ * History:
+ * 93/10/30 - Creation
+ */
+
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_STAT_FLAGS
+#include <sys/stat.h>
+#else
+#include <sys/ioctl.h>
+#endif
+
+#include "e2p.h"
+
+int getflags (int fd, unsigned long * flags)
+{
+#if HAVE_STAT_FLAGS
+ struct stat buf;
+
+ if (fstat (fd, &buf) == -1)
+ return -1;
+
+ *flags = 0;
+#ifdef UF_IMMUTABLE
+ if (buf.st_flags & UF_IMMUTABLE)
+ *flags |= EXT2_IMMUTABLE_FL;
+#endif
+#ifdef UF_APPEND
+ if (buf.st_flags & UF_APPEND)
+ *flags |= EXT2_APPEND_FL;
+#endif
+#ifdef UF_NODUMP
+ if (buf.st_flags & UF_NODUMP)
+ *flags |= EXT2_NODUMP_FL;
+#endif
+
+ return 0;
+#else
+#if HAVE_EXT2_IOCTLS
+ int r, f;
+
+ r = ioctl (fd, EXT2_IOC_GETFLAGS, &f);
+ *flags = f;
+ return r;
+#else /* ! HAVE_EXT2_IOCTLS */
+ extern int errno;
+ errno = EOPNOTSUPP;
+ return -1;
+#endif /* ! HAVE_EXT2_IOCTLS */
+#endif
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/getversion.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/getversion.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/getversion.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,37 @@
+/*
+ * getversion.c - Get a file version on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card at 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 Library General
+ * Public License
+ */
+
+/*
+ * 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 0;
+#else /* ! HAVE_EXT2_IOCTLS */
+ extern int errno;
+ errno = EOPNOTSUPP;
+ return -1;
+#endif /* ! HAVE_EXT2_IOCTLS */
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/iod.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/iod.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/iod.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,66 @@
+/*
+ * iod.c - Iterate a function on each entry of a directory
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card at 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 Library General
+ * Public License
+ */
+
+/*
+ * History:
+ * 93/10/30 - Creation
+ */
+
+#include "e2p.h"
+
+int iterate_on_dir (const char * dir_name,
+ int (*func) (const char *, struct dirent *, void *),
+ void * private)
+{
+ DIR * dir;
+#if HAVE_DIRENT_NAMELEN
+ /* Declare DE_BUF with some extra room for the name. */
+ char de_buf[sizeof (struct dirent) + 32];
+ struct dirent *de = (struct dirent *)&de_buf;
+#else
+ struct dirent de_buf, *de = &de_buf;
+#endif
+ struct dirent *dep;
+
+ dir = opendir (dir_name);
+ if (dir == NULL)
+ return -1;
+ while ((dep = readdir (dir)))
+ {
+#if HAVE_DIRENT_NAMELEN
+ /* See if there's enough room for this entry in DE, and grow if
+ not. */
+ if (de_len < dep->d_reclen)
+ {
+ de_len = dep->d_reclen + 32;
+ de =
+ (de == (struct dirent *)&de_buf
+ ? malloc (de_len)
+ : realloc (de, de_len));
+ if (de == NULL)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+ }
+ memcpy (de, dep, dep->d_reclen);
+#else
+ *de = *dep;
+#endif
+ (*func) (dir_name, de, private);
+ }
+#if HAVE_DIRENT_NAMELEN
+ if (de != (struct dirent *)&de_buf)
+ free (de);
+#endif
+ closedir (dir);
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/ls.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/ls.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/ls.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,230 @@
+/*
+ * ls.c - List the contents of an ext2fs superblock
+ *
+ * Copyright (C) 1992, 1993, 1994 Remy Card <card at masi.ibp.fr>
+ * Laboratoire MASI, Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ * Copyright (C) 1995, 1996, 1997 Theodore Ts'o <tytso at mit.edu>
+ *
+ * This file can be redistributed under the terms of the GNU Library General
+ * Public License
+ */
+
+#include <stdio.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
+}
+
+
+
+#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];
+ const char *os;
+ 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);
+ if (!e2p_is_null_uuid(sb->s_uuid)) {
+ e2p_uuid_to_str(sb->s_uuid, buf);
+ } else
+ strcpy(buf, "<none>");
+ fprintf(f, "Filesystem UUID: %s\n", buf);
+ 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);
+ 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");
+ switch (sb->s_creator_os) {
+ case EXT2_OS_LINUX: os = "Linux"; break;
+ case EXT2_OS_HURD: os = "GNU/Hurd"; break;
+ case EXT2_OS_MASIX: os = "Masix"; break;
+ default: os = "unknown"; break;
+ }
+ fprintf(f, "Filesystem OS type: %s\n", os);
+ fprintf(f, "Inode count: %u\n", sb->s_inodes_count);
+ fprintf(f, "Block count: %u\n", sb->s_blocks_count);
+ fprintf(f, "Reserved block count: %u\n", sb->s_r_blocks_count);
+ fprintf(f, "Free blocks: %u\n", sb->s_free_blocks_count);
+ 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));
+ fprintf(f, "Fragment size: %u\n", EXT2_FRAG_SIZE(sb));
+ fprintf(f, "Blocks per group: %u\n", sb->s_blocks_per_group);
+ fprintf(f, "Fragments per group: %u\n", sb->s_frags_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);
+ tm = sb->s_mtime;
+ fprintf(f, "Last mount time: %s", ctime(&tm));
+ 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));
+ }
+ 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_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) {
+ if (e2p_is_null_uuid(sb->s_journal_uuid)) {
+ strcpy(buf, "<none>");
+ } else
+ e2p_uuid_to_str(sb->s_journal_uuid, buf);
+ fprintf(f, "Journal UUID: %s\n", buf);
+ fprintf(f, "Journal inode: %u\n", sb->s_journal_inum);
+ fprintf(f, "Journal device: 0x%04x\n", sb->s_journal_dev);
+ fprintf(f, "First orphan inode: %u\n", sb->s_last_orphan);
+ }
+}
+
+void list_super (struct ext2_super_block * s)
+{
+ list_super2(s, stdout);
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/pe.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/pe.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/pe.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,37 @@
+/*
+ * pe.c - Print a second extended filesystem errors behavior
+ *
+ * Copyright (C) 1992, 1993, 1994 Remy Card <card at 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 Library General
+ * Public License
+ */
+
+/*
+ * 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)");
+ }
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/pf.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/pf.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/pf.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,69 @@
+/*
+ * pf.c - Print file attributes on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card at 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 Library General
+ * Public License
+ */
+
+/*
+ * 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_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" },
+ { EXT2_COMPRBLK_FL, "B", "Compressed_File" },
+ { EXT2_DIRTY_FL, "D", "Compressed_Dirty_File" },
+ { EXT2_NOCOMPR_FL, "X", "Compression_Raw_Access" },
+ { EXT2_ECOMPR_FL, "E", "Compression_Error" },
+ { EXT3_JOURNAL_DATA_FL, "j", "Journaled_Data" },
+ { EXT2_NOTAIL_FL, "t", "No_Tailmerging" },
+ { 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);
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/ps.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/ps.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/ps.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,29 @@
+/*
+ * ps.c - Print filesystem state
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card at 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 Library General
+ * Public License
+ */
+
+/*
+ * 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");
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/setflags.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/setflags.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/setflags.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,60 @@
+/*
+ * setflags.c - Set a file flags on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card at 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 Library General
+ * Public License
+ */
+
+/*
+ * History:
+ * 93/10/30 - Creation
+ */
+
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_CHFLAGS
+#include <sys/types.h>
+#include <sys/stat.h> /* For the flag values. */
+#else
+#include <sys/ioctl.h>
+#endif
+
+#include "e2p.h"
+
+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
+#if HAVE_EXT2_IOCTLS
+ int f;
+
+ f = (int) flags;
+ return ioctl (fd, EXT2_IOC_SETFLAGS, &f);
+#else /* ! HAVE_EXT2_IOCTLS */
+ extern int errno;
+ errno = EOPNOTSUPP;
+ return -1;
+#endif /* ! HAVE_EXT2_IOCTLS */
+#endif
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/setversion.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/setversion.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/setversion.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,36 @@
+/*
+ * setversion.c - Set a file version on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card at 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 Library General
+ * Public License
+ */
+
+/*
+ * 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 */
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/uuid.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/uuid.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/e2p/uuid.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,68 @@
+/*
+ * uuid.c -- utility routines for manipulating UUID's.
+ */
+
+#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]);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2 @@
+Makefile
+compile_et
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,231 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-02-23 Theodore Tso <tytso at mit.edu>
+
+ * com_err.texinfo: Fix up the com_err info file so that it
+ includes the directory node information. (Taken from the
+ Debian diff file.)
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-12-02 Theodore Tso <tytso at mit.edu>
+
+ * com_err.c (default_com_err_proc): Work around bug in diet libc
+ which core dumps when using fputc on stderr; besides, it
+ shaves bytes off of com_err.o if we use fputs instead of
+ two fputc calls.
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-16 Theodore Tso <tytso at mit.edu>
+
+ * compile_et.sh.in: Make the shell script safe from directory
+ pathnames with spaces.
+
+2001-09-10 Theodore Tso <tytso at mit.edu>
+
+ * com_err.texinfo: Add appropriate @node and @menu lines so that
+ the a valid .info file can be made. Use @deftypefun to
+ define functions. Change the e-mail address where bug
+ reports to be sent to be is the e2fsprogs maintainer.
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2000-12-04 <tytso at snap.thunk.org>
+
+ * compile_et.1: Fix simple typo in the man page.
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+2000-07-04 Theodore Ts'o <tytso at valinux.com>
+
+ * Makefile.in: Remove explicit link of -lc in the shared library.
+ (It shouldn't be necessary, and is harmful in some cases).
+
+1999-11-19 <tytso at valinux.com>
+
+ * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
+ the source directory.
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-10-22 <tytso at valinux.com>
+
+ * com_err.3: Fix to have correct #include path for com_err.h
+
+1999-09-07 <tytso at rsts-11.mit.edu>
+
+ * Updated copyright statements with permission of the original
+ authors.
+
+1999-07-18 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.15
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+1998-06-27 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * et_h.awk, et_c.awk: Work around libm bug on the ARM.
+
+1998-03-30 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Fix bug where my_dir was set incorrectly. Install
+ the et_c.awk and et_h.awk files in $(datadir)/et (i.e.,
+ /usr/share/et) directory. Change to use new
+ installation directory variables convention. Fix
+ uninstall rules to take $(DESTDIR) into account.
+
+ * compile_et.1: Change man page to reflect the fact that
+ compile_et is now a awk/sed script, not a yacc script.
+
+ * compile_et.sh.in: Look in $(datadir)/et for et_c.awk and
+ et_h.awk; if not found, look in the build directory. Add
+ error checking for non-existent input file.
+
+Fri Oct 31 01:14:41 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * et_c.awk, et_h.awk: Remove support for non STDC compilers, since
+ the workarounds caused problems with the header file.
+
+Sun Aug 10 09:40:54 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * error_table.h:
+ * et_name.c (error_table_name):
+ * error_message.c (error_message.c): Make code be 16-bit safe.
+
+Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.11
+
+Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * Release of E2fsprogs version 1.10
+
+Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.09
+
+Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.08
+
+Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * Release of E2fsprogs version 1.07
+
+Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.06
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
+Thu May 16 11:12:30 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.04
+
+Wed Mar 27 00:33:40 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.03
+
+Wed Jan 31 11:06:08 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.02
+
+Mon Sep 4 21:44:47 1995 Remy Card <card at bbj>
+
+ * Makefile.in: Added support for BSD shared libraries.
+
+Sat Aug 12 03:11:28 1995 Remy Card <card at bbj>
+
+ * Makefile.in (install): Install static libraries in $(ulibdir)
+ (/usr/lib on Linux) instead of $(libdir) (/lib on Linux).
+
+Sat Aug 5 11:44:17 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * Makefile.in (DLL_INSTALL_DIR, ELF_INSTALL_DIR): Set the
+ installation directories correctly.
+
+Thu Jun 15 23:39:51 1995 Remy Card <card at bbj>
+
+ * Makefile.in: Added support for ELF shared libraries.
+ Fixed typos in the compilation rules.
+ (distclean): Added compile_et.sh.
+
+Sat Jun 10 19:56:13 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * compile_et.sh.in: Use ET_DIR instead of srcdir to determine the
+ location of the et directory.
+
+Thu Jun 8 12:45:41 1995 Miles Bader <miles at churchy.gnu.ai.mit.edu>
+
+ * vfprintf.c (vfprintf): Only compile this function if vfprintf
+ doesn't already exist and _doprnt does.
+
+ * compile_et.sh: Moved to compile_et.sh.in.
+
+ * Makefile.in: Rewritten to conform to GNU coding standards and
+ support separate compilation directories.
+ Don't preprocess compile_et.sh, as this is now done by configure.
+
+Mon Nov 7 21:17:48 1994 Remy Card <card at bbj>
+
+ * Makefile: Added a dummy install target in case shared libraries
+ are not built.
+
+Thu Sep 8 22:33:33 1994 (tytso at rsx-11)
+
+ * com_err.c (default_com_err_proc): Reversed order of \n\r to make
+ jik happy.
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/Makefile.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/Makefile.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/Makefile.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,129 @@
+#
+# 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)
+
+ at MCONFIG@
+
+all:: compile_et
+
+OBJS= error_message.o et_name.o init_et.o com_err.o
+SRCS = $(srcdir)/error_message.c $(srcdir)/et_name.c $(srcdir)/init_et.c \
+ $(srcdir)/com_err.c
+
+HFILES= com_err.h
+SHARE_FILES= et_c.awk et_h.awk
+
+LIBRARY= libcom_err
+LIBDIR= et
+
+DLL_ADDRESS = 0x66800000
+DLL_JUMPSIZE = 0x1000
+DLL_GOTSIZE = 0x1000
+DLL_VERSION = 1.0
+DLL_IMAGE = libet
+DLL_STUB = libcom_err
+DLL_MYDIR = et
+DLL_INSTALL_DIR = $(root_libdir)
+
+ELF_VERSION = 2.0
+ELF_SO_VERSION = 2
+ELF_IMAGE = libcom_err
+ELF_MYDIR = et
+ELF_INSTALL_DIR = $(root_libdir)
+ELF_OTHER_LIBS =
+
+BSDLIB_VERSION = 1.0
+BSDLIB_IMAGE = libcom_err
+BSDLIB_MYDIR = et
+BSDLIB_INSTALL_DIR = $(root_libdir)
+
+#
+# what to build...
+#
+.c.o:
+ $(CC) $(ALL_CFLAGS) -c $< -o $@
+ at PROFILE_CMT@ $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+ at CHECKER_CMT@ $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
+ at DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) $(ALL_CFLAGS) \
+ at DLL_CMT@ -o jump/$*.o -c $<)
+ at ELF_CMT@ $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
+ at BSDLIB_CMT@ $(CC) $(ALL_CFLAGS) -fpic -o pic/$*.o -c $<
+
+ at MAKEFILE_LIBRARY@
+ at MAKEFILE_DLL@
+ at MAKEFILE_ELF@
+ at MAKEFILE_BSDLIB@
+ at MAKEFILE_PROFILE@
+ at MAKEFILE_CHECKER@
+
+compile_et: $(DEP_SUBSTITUTE) $(srcdir)/compile_et.sh.in
+ $(SUBSTITUTE) $(srcdir)/compile_et.sh.in compile_et
+ $(CHMOD) +x compile_et
+
+com_err.ps : com_err.dvi
+com_err.dvi: com_err.texinfo
+
+#libcom_err.o: $(LIBOBJS)
+# $(LD) -r -s -o libcom_err.o $(LIBOBJS)
+# chmod -x libcom_err.o
+
+TAGS: $(SRCS)
+ $(TAGS) $(SRCS)
+
+installdirs::
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(includedir)/et $(DESTDIR)$(datadir)/et \
+ $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) \
+ $(DESTDIR)$(man3dir)
+
+install:: compile_et libcom_err.a $(HFILES) installdirs
+ $(INSTALL_DATA) libcom_err.a $(DESTDIR)$(libdir)/libcom_err.a
+ $(CHMOD) 644 $(DESTDIR)$(libdir)/libcom_err.a
+ -$(RANLIB) $(DESTDIR)$(libdir)/libcom_err.a
+ $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libcom_err.a
+ for i in $(HFILES); do \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/et/$$i; \
+ done
+ for i in $(SHARE_FILES); do \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(datadir)/et/$$i; \
+ done
+ $(INSTALL) compile_et $(DESTDIR)$(bindir)/compile_et
+ $(INSTALL_DATA) $(srcdir)/com_err.3 $(DESTDIR)$(man3dir)/com_err.3
+ $(INSTALL_DATA) $(srcdir)/compile_et.1 \
+ $(DESTDIR)$(man1dir)/compile_et.1
+
+uninstall::
+ $(RM) -f $(DESTDIR)$(libdir)/libcom_err.a \
+ $(DESTDIR)$(bindir)/compile_et
+ $(RM) -rf $(DESTDIR)$(includedir)/et $(DESTDIR)$(datadir)/et
+
+clean::
+ $(RM) -f compile_et libcom_err.a libcom_err_p.a
+ $(RM) -f $(OBJS) profiled/*
+ $(RM) -f *~ \#* *.bak *.otl *.aux *.toc *.PS *.dvi *.ps TAGS *.ln
+ $(RM) -f ../libcom_err.a ../libcom_err_p.a
+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
+#
+error_message.o: $(srcdir)/error_message.c $(srcdir)/com_err.h \
+ $(srcdir)/error_table.h $(srcdir)/internal.h
+et_name.o: $(srcdir)/et_name.c $(srcdir)/com_err.h $(srcdir)/error_table.h \
+ $(srcdir)/internal.h
+init_et.o: $(srcdir)/init_et.c $(srcdir)/com_err.h $(srcdir)/error_table.h
+com_err.o: $(srcdir)/com_err.c $(srcdir)/com_err.h $(srcdir)/error_table.h \
+ $(srcdir)/internal.h
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.3
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.3 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.3 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,94 @@
+.\" 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>
+.PP
+void com_err (whoami, code, format, ...);
+ const char *whoami;
+ long code;
+ const char *format;
+.PP
+proc = set_com_err_hook (proc);
+.fi
+void (*
+.I proc
+) (const char *, long, const char *, va_list);
+.nf
+.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".
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,119 @@
+/*
+ * 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 "com_err.h"
+#include "error_table.h"
+#include "internal.h"
+
+#if !defined(__STDC__) && !defined(STDARG_PROTOTYPES)
+#include <varargs.h>
+#define VARARGS
+#endif
+
+static void
+#ifdef __STDC__
+ default_com_err_proc (const char *whoami, errcode_t code, const
+ char *fmt, va_list args)
+#else
+ default_com_err_proc (whoami, code, fmt, args)
+ const char *whoami;
+ errcode_t code;
+ const char *fmt;
+ va_list args;
+#endif
+{
+ if (whoami) {
+ fputs(whoami, stderr);
+ fputs(": ", stderr);
+ }
+ if (code) {
+ fputs(error_message(code), stderr);
+ fputs(" ", stderr);
+ }
+ if (fmt) {
+ vfprintf (stderr, fmt, args);
+ }
+ /* should output \r only if using a tty in raw mode */
+ fputs("\r\n", stderr);
+ fflush(stderr);
+}
+
+#ifdef __STDC__
+typedef void (*errf) (const char *, errcode_t, const char *, va_list);
+#else
+typedef void (*errf) ();
+#endif
+
+errf com_err_hook = default_com_err_proc;
+
+#ifdef __STDC__
+void com_err_va (const char *whoami, errcode_t code, const char *fmt,
+ va_list args)
+#else
+void com_err_va (whoami, code, fmt, args)
+ const char *whoami;
+ errcode_t code;
+ const char *fmt;
+ va_list args;
+#endif
+{
+ (*com_err_hook) (whoami, code, fmt, args);
+}
+
+#ifndef VARARGS
+void com_err (const char *whoami,
+ errcode_t code,
+ const char *fmt, ...)
+{
+#else
+void com_err (va_alist)
+ va_dcl
+{
+ const char *whoami, *fmt;
+ errcode_t code;
+#endif
+ va_list pvar;
+
+ if (!com_err_hook)
+ com_err_hook = default_com_err_proc;
+#ifdef VARARGS
+ va_start (pvar);
+ whoami = va_arg (pvar, const char *);
+ code = va_arg (pvar, errcode_t);
+ fmt = va_arg (pvar, const char *);
+#else
+ va_start(pvar, fmt);
+#endif
+ com_err_va (whoami, code, fmt, pvar);
+ va_end(pvar);
+}
+
+errf set_com_err_hook (new_proc)
+ 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 () {
+ errf x = com_err_hook;
+ com_err_hook = default_com_err_proc;
+ return x;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef __COM_ERR_H
+
+typedef long errcode_t;
+
+#ifdef __STDC__
+#include <stdarg.h>
+
+/* ANSI C -- use prototypes etc */
+void com_err (const char *, long, const char *, ...);
+void com_err_va (const char *whoami, errcode_t code, const char *fmt,
+ va_list args);
+char const *error_message (long);
+extern void (*com_err_hook) (const char *, long, const char *, va_list);
+void (*set_com_err_hook (void (*) (const char *, long, const char *, va_list)))
+ (const char *, long, const char *, va_list);
+void (*reset_com_err_hook (void)) (const char *, long, const char *, va_list);
+int init_error_table(const char * const *msgs, int base, int count);
+#else
+/* no prototypes */
+void com_err ();
+void com_err_va ();
+char *error_message ();
+extern void (*com_err_hook) ();
+void (*set_com_err_hook ()) ();
+void (*reset_com_err_hook ()) ();
+int init_error_table();
+#endif
+
+#define __COM_ERR_H
+#endif /* ! defined(__COM_ERR_H) */
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.texinfo
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.texinfo 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/com_err.texinfo 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,579 @@
+\input texinfo @c -*-texinfo-*-
+
+ at c $Header: lib/et/SCCS/s.com_err.texinfo 1.15 02/02/23 21:23:25-05:00 tytso at think.thunk.org $
+ at c $Source: /usr/src/e2fsprogs/BK/e2fsprogs/lib/et/SCCS/s.com_err.texinfo $
+ at c $Locker: <Not implemented> $
+
+ at c Note that although this source file is in texinfo format (more
+ at c or less), it is not yet suitable for turning into an ``info''
+ at c file. Sorry, maybe next time.
+ at c
+ at c In order to produce hardcopy documentation from a texinfo file,
+ at c run ``tex com_err.texinfo'' which will load in texinfo.tex,
+ at c provided in this distribution. (texinfo.tex is from the Free
+ at c Software Foundation, and is under different copyright restrictions
+ at c from the rest of this package.)
+
+ at setfilename com_err
+ at settitle A Common Error Description Library for UNIX
+
+ at ifinfo
+ at dircategory Development
+ at format
+START-INFO-DIR-ENTRY
+* com_err: (com_err.info). A Common Error Description Library for UNIX.
+END-INFO-DIR-ENTRY
+ at end format
+ at end ifinfo
+
+ at iftex
+ at tolerance 10000
+
+ at c Mutate section headers...
+ at begingroup
+ @catcode#=6
+ @gdef at secheading#1#2#3{@secheadingi {#3 at enspace #1}}
+ at endgroup
+ at end iftex
+
+ at 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.
+
+ at 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).
+
+ at end ignore
+
+ at setchapternewpage odd
+
+ at titlepage
+ at center @titlefont{A Common Error Description}
+ at center @titlefont{Library for UNIX}
+ at sp 2
+ at center Ken Raeburn
+ at center Bill Sommerfeld
+ at sp 1
+ at center MIT Student Information Processing Board
+ at sp 3
+ at center last updated 1 January 1989
+ at center for version 1.2
+ at center ***DRAFT COPY ONLY***
+
+ at vskip 2in
+
+ at 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.
+
+ at page
+ at 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.
+
+ at end titlepage
+
+
+ at node Top, Why com_err?, (dir), (dir)
+
+ at top A Common Error Description Library for UNIX
+
+This manual documents the com_err library.
+
+ at 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::
+ at end menu
+
+ at end ifinfo
+
+ at page
+
+ at node Why com_err?, Error codes, Top, Top
+ at section 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},
+ at 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.
+
+ at node Error codes, Error table source file, Why com_err?, Top
+ at section 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.
+
+ at node Error table source file, The error-table compiler, Error codes, Top
+ at section Error table source file
+
+The error table source file begins with the declaration of the table name,
+as
+
+ at example
+error_table @var{tablename}
+ at end example
+
+Individual error codes are
+specified with
+
+ at example
+error_code @var{ERROR_NAME}, @var{"text message"}
+ at 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:
+
+ at 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
+
+ at end example
+
+ at node The error-table compiler, Run-time support routines, Error table source file, Top
+ at section 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.,
+ at 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.
+
+This translator accepts a @kbd{-language @var{lang}} argument, which
+determines for which language (or language variant) the output should be
+written. At the moment, @var{lang} is currently limited to @kbd{ANSI-C}
+and @kbd{K&R-C}, and some abbreviated forms of each. Eventually, this will
+be extended to include some support for C++. The default is currently
+ at kbd{K&R-C}, though the generated sources will have ANSI-C code
+conditionalized on the symbol @t{__STDC__}.
+
+ at node Run-time support routines, Coding Conventions, The error-table compiler, Top
+ at section 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:
+
+ at example
+void initialize_ at var{xxxx}_error_table (void);
+ at 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.
+
+ at example
+#define ERROR_TABLE_BASE_ at var{xxxx} @var{nnnnn}L
+ at 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.
+
+ at 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.
+
+ at end deftypefun
+
+ at 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.
+
+ at end deftypefun
+
+ at 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).
+
+ at end deftypefun
+
+ at 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});
+
+ at deftypefunx void reset_com_err_hook ();
+
+These two routines allow a routine to be dynamically substituted for
+ at 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.
+ at 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),
+ at 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:
+
+ at 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);
+@}
+ at end example
+
+After making the call
+ at code{set_com_err_hook (hook);},
+any calls to @code{com_err} will result in messages being sent to the
+ at var{syslogd} daemon for logging.
+The name of the program, @samp{whoami}, is supplied to the
+ at 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
+ at code{vsprintf} (or @code{_doprnt} on BSD systems without full support for
+the ANSI C library).
+
+ at end deftypefun
+
+ at node Coding Conventions, Building and Installation, Run-time support routines, Top
+ at section 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:
+
+ at 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);
+ @}
+@}
+ at 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.
+
+ at 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;
+@}
+ at end example
+
+ at node Building and Installation, Bug Reports, Coding Conventions, Top
+ at section 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
+ at 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},
+ at 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.
+
+Potential problems:
+
+ at itemize @bullet
+
+ at item Use of @code{strcasecmp}, a routine provided in BSD for
+case-insensitive string comparisons. If an equivalent routine is
+available, you can modify @code{CFLAGS} in the makefile to define
+ at code{strcasecmp} to the name of that routine.
+
+ at item Compilers that defined @code{__STDC__} without providing the header
+file @code{<stdarg.h>}. One such example is Metaware's High ``C''
+compiler, as provided at Project Athena on the IBM RT/PC workstation; if
+ at code{__HIGHC__} is defined, it is assumed that @code{<stdarg.h>} is not
+available, and therefore @code{<varargs.h>} must be used. If the symbol
+ at code{VARARGS} is defined (e.g., in the makefile), @code{<varargs.h>} will
+be used.
+
+ at item If your linker rejects symbols that are simultaneously defined in two
+library files, edit @samp{Makefile} to remove @samp{perror.c} from the
+library. This file contains a version of @cite{perror(3)} which calls
+ at code{com_err} instead of calling @code{write} directly.
+
+ at end itemize
+
+As I do not have access to non-BSD systems, there are probably
+bugs present that may interfere with building or using this package on
+other systems. If they are reported to me, they can probably be fixed for
+the next version.
+
+ at node Bug Reports, Acknowledgements, Building and Installation, Top
+ at section 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}.
+
+
+ at node Acknowledgements, , Bug Reports, Top
+ at section 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.
+
+ at bye
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/compile_et.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/compile_et.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/compile_et.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,82 @@
+.\" Copyright (c) 1988 Massachusetts Institute of Technology,
+.\" Student Information Processing Board. All rights reserved.
+.\"
+.\" $Header: lib/et/SCCS/s.compile_et.1 1.15 00/12/04 23:49:07-00:00 tytso at mit.edu $
+.\"
+.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".
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/compile_et.sh.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/compile_et.sh.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/compile_et.sh.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+#
+AWK=@AWK@
+DIR="${DIR- at datadir@/et}"
+ET_DIR="@ET_DIR@"
+
+if test "x$1" = x ; then
+ echo "Usage: compile_et file"
+ exit 1
+fi
+
+if test ! -f "$DIR/et_h.awk" -o ! -f "$DIR/et_c.awk" ; then
+ DIR="$ET_DIR"
+# echo "Falling back to $DIR..."
+ if test ! -f "$DIR/et_h.awk" -o ! -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" "$ROOT.et"
+$AWK -f "${DIR}/et_c.awk" "outfile=${BASE}.c" "$ROOT.et"
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.funcs
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.funcs 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.funcs 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,6 @@
+00000000 T _error_message libcom_err jump/error_message
+00000000 T _init_error_table libcom_err jump/init_et
+00000000 T _com_err_va libcom_err jump/com_err
+00000000 T _com_err libcom_err jump/com_err
+00000000 T _set_com_err_hook libcom_err jump/com_err
+00000000 T _reset_com_err_hook libcom_err jump/com_err
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.ignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.ignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.ignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+00000000 T _error_table_name libxyzzy jump/et_name
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.import
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.import 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.import 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,164 @@
+/usr/lib/libc.sa(__libc.o):00001000 a __GOT_SIZE
+/usr/lib/libc.sa(__libc.o):6008f0b0 A _AL
+/usr/lib/libc.sa(__libc.o):6008f198 A _AL_PARM
+/usr/lib/libc.sa(__libc.o):6008f060 A _AM
+/usr/lib/libc.sa(__libc.o):6008f0b4 A _BC
+/usr/lib/libc.sa(__libc.o):6008f064 A _BS
+/usr/lib/libc.sa(__libc.o):6008f0bc A _BT
+/usr/lib/libc.sa(__libc.o):6008f068 A _CA
+/usr/lib/libc.sa(__libc.o):6008f0c0 A _CD
+/usr/lib/libc.sa(__libc.o):6008f0c4 A _CE
+/usr/lib/libc.sa(__libc.o):6008f0c8 A _CL
+/usr/lib/libc.sa(__libc.o):6008f0cc A _CM
+/usr/lib/libc.sa(__libc.o):6008f048 A _COLS
+/usr/lib/libc.sa(__libc.o):6008f0d0 A _CR
+/usr/lib/libc.sa(__libc.o):6008f0d4 A _CS
+/usr/lib/libc.sa(__libc.o):6008f06c A _DA
+/usr/lib/libc.sa(__libc.o):6008f070 A _DB
+/usr/lib/libc.sa(__libc.o):6008f0d8 A _DC
+/usr/lib/libc.sa(__libc.o):6008f0dc A _DL
+/usr/lib/libc.sa(__libc.o):6008f19c A _DL_PARM
+/usr/lib/libc.sa(__libc.o):6008f0e0 A _DM
+/usr/lib/libc.sa(__libc.o):6008f0e4 A _DO
+/usr/lib/libc.sa(__libc.o):6008f1a4 A _DOWN_PARM
+/usr/lib/libc.sa(__libc.o):6008f03c A _Def_term
+/usr/lib/libc.sa(__libc.o):6008f0e8 A _ED
+/usr/lib/libc.sa(__libc.o):6008f0ec A _EI
+/usr/lib/libc.sa(__libc.o):6008f074 A _EO
+/usr/lib/libc.sa(__libc.o):6008f1b8 A _GT
+/usr/lib/libc.sa(__libc.o):6008f078 A _HC
+/usr/lib/libc.sa(__libc.o):6008f118 A _HO
+/usr/lib/libc.sa(__libc.o):6008f07c A _HZ
+/usr/lib/libc.sa(__libc.o):6008f11c A _IC
+/usr/lib/libc.sa(__libc.o):6008f120 A _IM
+/usr/lib/libc.sa(__libc.o):6008f080 A _IN
+/usr/lib/libc.sa(__libc.o):6008f124 A _IP
+/usr/lib/libc.sa(__libc.o):6008f0f0 A _K0
+/usr/lib/libc.sa(__libc.o):6008f0f4 A _K1
+/usr/lib/libc.sa(__libc.o):6008f0f8 A _K2
+/usr/lib/libc.sa(__libc.o):6008f0fc A _K3
+/usr/lib/libc.sa(__libc.o):6008f100 A _K4
+/usr/lib/libc.sa(__libc.o):6008f104 A _K5
+/usr/lib/libc.sa(__libc.o):6008f108 A _K6
+/usr/lib/libc.sa(__libc.o):6008f10c A _K7
+/usr/lib/libc.sa(__libc.o):6008f110 A _K8
+/usr/lib/libc.sa(__libc.o):6008f114 A _K9
+/usr/lib/libc.sa(__libc.o):6008f128 A _KD
+/usr/lib/libc.sa(__libc.o):6008f12c A _KE
+/usr/lib/libc.sa(__libc.o):6008f130 A _KH
+/usr/lib/libc.sa(__libc.o):6008f134 A _KL
+/usr/lib/libc.sa(__libc.o):6008f138 A _KR
+/usr/lib/libc.sa(__libc.o):6008f13c A _KS
+/usr/lib/libc.sa(__libc.o):6008f140 A _KU
+/usr/lib/libc.sa(__libc.o):6008f1a8 A _LEFT_PARM
+/usr/lib/libc.sa(__libc.o):6008f044 A _LINES
+/usr/lib/libc.sa(__libc.o):6008f144 A _LL
+/usr/lib/libc.sa(__libc.o):6008f148 A _MA
+/usr/lib/libc.sa(__libc.o):6008f300 A _MCAppPath
+/usr/lib/libc.sa(__libc.o):6008f084 A _MI
+/usr/lib/libc.sa(__libc.o):6008f088 A _MS
+/usr/lib/libc.sa(__libc.o):6008f030 A _My_term
+/usr/lib/libc.sa(__libc.o):6008f08c A _NC
+/usr/lib/libc.sa(__libc.o):6008f14c A _ND
+/usr/lib/libc.sa(__libc.o):6008f150 A _NL
+/usr/lib/libc.sa(__libc.o):6008f1bc A _NONL
+/usr/lib/libc.sa(__libc.o):6008f090 A _NS
+/usr/lib/libc.sa(__libc.o):6008f094 A _OS
+/usr/lib/libc.sa(__libc.o):6008f1b0 A _PC
+/usr/lib/libc.sa(__libc.o):6008f154 A _RC
+/usr/lib/libc.sa(__libc.o):6008f1ac A _RIGHT_PARM
+/usr/lib/libc.sa(__libc.o):6008f158 A _SC
+/usr/lib/libc.sa(__libc.o):6008f15c A _SE
+/usr/lib/libc.sa(__libc.o):6008f160 A _SF
+/usr/lib/libc.sa(__libc.o):6008f164 A _SO
+/usr/lib/libc.sa(__libc.o):6008f168 A _SR
+/usr/lib/libc.sa(__libc.o):6008f16c A _TA
+/usr/lib/libc.sa(__libc.o):6008f170 A _TE
+/usr/lib/libc.sa(__libc.o):6008f174 A _TI
+/usr/lib/libc.sa(__libc.o):6008f178 A _UC
+/usr/lib/libc.sa(__libc.o):6008f17c A _UE
+/usr/lib/libc.sa(__libc.o):6008f098 A _UL
+/usr/lib/libc.sa(__libc.o):6008f180 A _UP
+/usr/lib/libc.sa(__libc.o):6008f1c0 A _UPPERCASE
+/usr/lib/libc.sa(__libc.o):6008f1a0 A _UP_PARM
+/usr/lib/libc.sa(__libc.o):6008f188 A _US
+/usr/lib/libc.sa(__libc.o):6008f18c A _VB
+/usr/lib/libc.sa(__libc.o):6008f194 A _VE
+/usr/lib/libc.sa(__libc.o):6008f190 A _VS
+/usr/lib/libc.sa(__libc.o):6008f09c A _XB
+/usr/lib/libc.sa(__libc.o):6008f0a0 A _XN
+/usr/lib/libc.sa(__libc.o):6008f0a8 A _XS
+/usr/lib/libc.sa(__libc.o):6008f0a4 A _XT
+/usr/lib/libc.sa(__libc.o):6008f0ac A _XX
+/usr/lib/libc.sa(__libc.o):6008f2a4 A __IO_file_jumps
+/usr/lib/libc.sa(__libc.o):6008f1f4 A __IO_list_all
+/usr/lib/libc.sa(__libc.o):6008f2a8 A __IO_proc_jumps
+/usr/lib/libc.sa(__libc.o):6008f1ec A __IO_stderr_
+/usr/lib/libc.sa(__libc.o):6008f1e4 A __IO_stdin_
+/usr/lib/libc.sa(__libc.o):6008f1e8 A __IO_stdout_
+/usr/lib/libc.sa(__libc.o):6008f2ac A __IO_str_jumps
+/usr/lib/libc.sa(__libc.o):6008f214 A ____brk_addr
+/usr/lib/libc.sa(__libc.o):6008f01c A ___ctype_b
+/usr/lib/libc.sa(__libc.o):6008f020 A ___ctype_tolower
+/usr/lib/libc.sa(__libc.o):6008f024 A ___ctype_toupper
+/usr/lib/libc.sa(__libc.o):6008f1fc A ___environ
+/usr/lib/libc.sa(__libc.o):6008f250 A ___exit_funcs
+/usr/lib/libc.sa(__libc.o):6008f2f0 A ___glob_closedir_hook
+/usr/lib/libc.sa(__libc.o):6008f2f4 A ___glob_opendir_hook
+/usr/lib/libc.sa(__libc.o):6008f2f8 A ___glob_readdir_hook
+/usr/lib/libc.sa(__libc.o):6008f278 A ___ttyname
+/usr/lib/libc.sa(__libc.o):6008f238 A __collate_info
+/usr/lib/libc.sa(__libc.o):6008f23c A __ctype_info
+/usr/lib/libc.sa(__libc.o):6008f028 A __echoit
+/usr/lib/libc.sa(__libc.o):6008f034 A __endwin
+/usr/lib/libc.sa(__libc.o):6008f288 A __gdbm_fetch_val
+/usr/lib/libc.sa(__libc.o):6008f280 A __gdbm_file
+/usr/lib/libc.sa(__libc.o):6008f284 A __gdbm_memory
+/usr/lib/libc.sa(__libc.o):6008f240 A __monetary_info
+/usr/lib/libc.sa(__libc.o):6008f234 A __null_auth
+/usr/lib/libc.sa(__libc.o):6008f244 A __numeric_info
+/usr/lib/libc.sa(__libc.o):6008f2ec A __obstack
+/usr/lib/libc.sa(__libc.o):6008f1c8 A __pfast
+/usr/lib/libc.sa(__libc.o):6008f02c A __rawmode
+/usr/lib/libc.sa(__libc.o):6008f1dc A __res
+/usr/lib/libc.sa(__libc.o):6008f04c A __res_iflg
+/usr/lib/libc.sa(__libc.o):6008f050 A __res_lflg
+/usr/lib/libc.sa(__libc.o):6008f270 A __res_opcodes
+/usr/lib/libc.sa(__libc.o):6008f274 A __res_resultcodes
+/usr/lib/libc.sa(__libc.o):6008f248 A __response_info
+/usr/lib/libc.sa(__libc.o):6008f2fc A __sigintr
+/usr/lib/libc.sa(__libc.o):6008f00c A __sys_errlist
+/usr/lib/libc.sa(__libc.o):6008f010 A __sys_nerr
+/usr/lib/libc.sa(__libc.o):6008f014 A __sys_siglist
+/usr/lib/libc.sa(__libc.o):6008f24c A __time_info
+/usr/lib/libc.sa(__libc.o):6008f05c A __tty
+/usr/lib/libc.sa(__libc.o):6008f040 A __tty_ch
+/usr/lib/libc.sa(__libc.o):6008f1cc A __unctrl
+/usr/lib/libc.sa(__libc.o):6008f27c A __win
+/usr/lib/libc.sa(__libc.o):6008f058 A _curscr
+/usr/lib/libc.sa(__libc.o):6008f228 A _daylight
+/usr/lib/libc.sa(__libc.o):6008f200 A _errno
+/usr/lib/libc.sa(__libc.o):6008f1d0 A _gdbm_errno
+/usr/lib/libc.sa(__libc.o):6008f28c A _gdbm_version
+/usr/lib/libc.sa(__libc.o):6008f008 A _h_errlist
+/usr/lib/libc.sa(__libc.o):6008f1d8 A _h_errno
+/usr/lib/libc.sa(__libc.o):6008f2a0 A _h_nerr
+/usr/lib/libc.sa(__libc.o):6008f1c4 A _normtty
+/usr/lib/libc.sa(__libc.o):6008f204 A _optarg
+/usr/lib/libc.sa(__libc.o):6008f20c A _opterr
+/usr/lib/libc.sa(__libc.o):6008f208 A _optind
+/usr/lib/libc.sa(__libc.o):6008f2e4 A _optopt
+/usr/lib/libc.sa(__libc.o):6008f218 A _ospeed
+/usr/lib/libc.sa(__libc.o):6008f26c A _re_max_failures
+/usr/lib/libc.sa(__libc.o):6008f210 A _re_syntax_options
+/usr/lib/libc.sa(__libc.o):6008f1e0 A _rexecoptions
+/usr/lib/libc.sa(__libc.o):6008f230 A _rpc_createerr
+/usr/lib/libc.sa(__libc.o):6008f25c A _stderr
+/usr/lib/libc.sa(__libc.o):6008f254 A _stdin
+/usr/lib/libc.sa(__libc.o):6008f258 A _stdout
+/usr/lib/libc.sa(__libc.o):6008f054 A _stdscr
+/usr/lib/libc.sa(__libc.o):6008f2e8 A _svc_fdset
+/usr/lib/libc.sa(__libc.o):6008f224 A _timezone
+/usr/lib/libc.sa(__libc.o):6008f21c A _tputs_baud_rate
+/usr/lib/libc.sa(__libc.o):6008f038 A _ttytype
+/usr/lib/libc.sa(__libc.o):6008f220 A _tzname
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.params
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.params 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.params 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,6 @@
+Name=libet
+Text=0x66800000
+Data=0x00000000
+Jump=0x00001000
+GOT=0x00001000
+Version=1.0.0
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.undefs
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.undefs 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.undefs 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+66803000 D __NEEDS_SHRLIB_libc_4
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.vars
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.vars 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/dll/jump.vars 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2 @@
+00000004 D __et_list libcom_err jump/error_message
+00000004 D _com_err_hook libcom_err jump/com_err
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/error_message.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/error_message.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/error_message.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,88 @@
+/*
+ * $Header: lib/et/SCCS/s.error_message.c 1.16 99/10/23 01:16:05-00:00 tytso at mit.edu $
+ * $Source: /usr/src/e2fsprogs/BK/e2fsprogs/lib/et/SCCS/s.error_message.c $
+ * $Locker: <Not implemented> $
+ *
+ * Copyright 1987 by the Student Information Processing Board
+ * of the Massachusetts Institute of Technology
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include "com_err.h"
+#include "error_table.h"
+#include "internal.h"
+
+static char buffer[25];
+
+struct et_list * _et_list = (struct et_list *) NULL;
+
+
+#ifdef __STDC__
+const char * error_message (errcode_t code)
+#else
+const char * error_message (code)
+ errcode_t code;
+#endif
+{
+ 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
+ }
+ for (et = _et_list; et; et = et->next) {
+ if (et->table->base == table_num) {
+ /* This is the right table */
+ if (et->table->n_msgs <= offset)
+ goto oops;
+ return(et->table->msgs[offset]);
+ }
+ }
+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);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/error_table.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/error_table.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/error_table.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,42 @@
+/*
+ * 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
+/* Are we using ANSI C? */
+#ifndef __STDC__
+#define const
+#endif
+
+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;
+
+#define ERRCODE_RANGE 8 /* # of bits to shift table number */
+#define BITS_PER_CHAR 6 /* # bits to shift per character in name */
+
+#ifdef __STDC__
+extern const char *error_table_name(errcode_t num);
+#else
+extern const char *error_table_name();
+#endif
+
+#define _ET_H
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/et_c.awk
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/et_c.awk 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/et_c.awk 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,187 @@
+BEGIN {
+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
+ table_name = $2
+ mod_base = 1000000
+ for(i=1; i<=length(table_name); i++) {
+ table_number=(table_number*char_shift)+c2n[substr(table_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 " * " outfile ":" > outfile
+ print " * This file is automatically generated; please do not edit it." > outfile
+ print " */" > outfile
+
+ print "" > outfile
+ print "static const char * const text[] = {" > outfile
+ table_item_count = 0
+}
+
+/^[ \t]*(error_code|ec)[ \t]+[A-Z_0-9]+,[ \t]*$/ {
+ 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 "\t%s,\n", text > outfile
+ table_item_count++
+}
+
+{
+ if (skipone) {
+ printf "\t%s,\n", $0 > outfile
+ table_item_count++
+ }
+ skipone=0
+}
+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 "static const struct error_table et = { text, " \
+ sprintf("%dL, %d };", tab_base_sign*tab_base_low, \
+ table_item_count) > outfile
+ } else {
+ print "static const struct error_table et = { 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(void);" > outfile
+ print "" > outfile
+ print "void initialize_" table_name "_error_table(void) {" > outfile
+ print " if (!link.table) {" > outfile
+ print " link.next = _et_list;" > outfile
+ print " link.table = &et;" > outfile
+ print " _et_list = &link;" > outfile
+ print " }" > outfile
+ print "}" > outfile
+
+
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/et_h.awk
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/et_h.awk 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/et_h.awk 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,159 @@
+BEGIN {
+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
+ table_name = $2
+ mod_base = 1000000
+ for(i=1; i<=length(table_name); i++) {
+ table_number=(table_number*char_shift)+c2n[substr(table_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--
+ }
+ }
+ curr_low = tab_base_low
+ curr_high = tab_base_high
+ curr_sign = tab_base_sign
+ print "/*" > outfile
+ print " * " outfile ":" > outfile
+ print " * This file is automatically generated; please do not edit it." > outfile
+ print " */" > outfile
+ print "" > outfile
+}
+
+/^[ \t]*(error_code|ec)[ \t]+[A-Z_0-9]+,/ {
+ tag=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;
+ if (curr_low >= mod_base) {
+ curr_low -= mod_base;
+ curr_high++
+ }
+ if (curr_low < 0) {
+ cur_low += mod_base
+ cur_high--
+ }
+}
+
+END {
+ print "extern void initialize_" table_name "_error_table(void);" > 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
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/et_name.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/et_name.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/et_name.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,43 @@
+/*
+ * Copyright 1987 by MIT Student Information Processing Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include "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(num)
+ 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);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/init_et.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/init_et.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/init_et.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,63 @@
+/*
+ * $Header: lib/et/SCCS/s.init_et.c 1.15 99/10/23 01:16:06-00:00 tytso at mit.edu $
+ * $Source: /usr/src/e2fsprogs/BK/e2fsprogs/lib/et/SCCS/s.init_et.c $
+ * $Locker: <Not implemented> $
+ *
+ * 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"
+
+#ifndef __STDC__
+#define const
+#endif
+
+struct foobar {
+ struct et_list etl;
+ struct error_table et;
+};
+
+extern struct et_list * _et_list;
+
+#ifdef __STDC__
+int init_error_table(const char * const *msgs, int base, int count)
+#else
+int init_error_table(msgs, base, count)
+ const char * const * msgs;
+ int base;
+ int count;
+#endif
+{
+ 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_list;
+ _et_list = &new_et->etl;
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/internal.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/internal.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/internal.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+#ifndef __STDC__
+#undef const
+#define const
+#endif
+
+#include <errno.h>
+
+#ifdef NEED_SYS_ERRLIST
+extern char const * const sys_errlist[];
+extern const int sys_nerr;
+#endif
+
+/* AIX and Ultrix have standard conforming header files. */
+#if !defined(ultrix) && !defined(_AIX)
+#ifdef __STDC__
+void perror (const char *);
+#endif
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/texinfo.tex
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/texinfo.tex 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/texinfo.tex 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2077 @@
+%% TeX macros to handle texinfo files
+
+% Copyright (C) 1985, 1986, 1988 Richard M. Stallman
+
+% NO WARRANTY
+
+% BECAUSE THIS PROGRAM IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY
+%NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT
+%WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC,
+%RICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE THIS 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.
+
+% IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M.
+%STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., AND/OR ANY OTHER PARTY
+%WHO MAY MODIFY AND REDISTRIBUTE THIS PROGRAM AS PERMITTED BELOW, BE
+%LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR
+%OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+%USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR
+%DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR
+%A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) THIS
+%PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
+%DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
+
+% GENERAL PUBLIC LICENSE TO COPY
+
+% 1. You may copy and distribute verbatim copies of this source file
+%as you receive it, in any medium, provided that you conspicuously
+%and appropriately publish on each copy a valid copyright notice
+%"Copyright (C) 1986 Richard M. Stallman"; and include
+%following the copyright notice a verbatim copy of the above disclaimer
+%of warranty and of this License.
+
+% 2. You may modify your copy or copies of this source file or
+%any portion of it, and copy and distribute such modifications under
+%the terms of Paragraph 1 above, provided that you also do the following:
+
+% a) cause the modified files to carry prominent notices stating
+% that you changed the files and the date of any change; and
+
+% b) cause the whole of any work that you distribute or publish,
+% that in whole or in part contains or is a derivative of this
+% program or any part thereof, to be licensed at no charge to all
+% third parties on terms identical to those contained in this
+% License Agreement (except that you may choose to grant more extensive
+% warranty protection to some or all third parties, at your option).
+
+% c) You may charge a distribution fee for the physical act of
+% transferring a copy, and you may at your option offer warranty
+% protection in exchange for a fee.
+
+%Mere aggregation of another unrelated program with this program (or its
+%derivative) on a volume of a storage or distribution medium does not bring
+%the other program under the scope of these terms.
+
+% 3. You may copy and distribute this program (or a portion or derivative
+%of it, under Paragraph 2) in object code or executable form under the terms
+%of Paragraphs 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
+% Paragraphs 1 and 2 above; or,
+
+% b) accompany it with a written offer, valid for at least three
+% years, to give any third party free (except for a nominal
+% shipping charge) a complete machine-readable copy of the
+% corresponding source code, to be distributed under the terms of
+% Paragraphs 1 and 2 above; or,
+
+% c) accompany it with the information you received as to where the
+% corresponding source code may be obtained. (This alternative is
+% allowed only for noncommercial distribution and only if you
+% received the program in object code or executable form alone.)
+
+%For an executable file, complete source code means all the source code for
+%all modules it contains; but, as a special exception, it need not include
+%source code for modules which are standard libraries that accompany the
+%operating system on which the executable file runs.
+
+% 4. You may not copy, sublicense, distribute or transfer this program
+%except as expressly provided under this License Agreement. Any attempt
+%otherwise to copy, sublicense, distribute or transfer this program is void and
+%your rights to use the program under this License agreement shall be
+%automatically terminated. However, parties who have received computer
+%software programs from you with this License Agreement will not have
+%their licenses terminated so long as such parties remain in full compliance.
+
+% 5. If you wish to incorporate parts of this program into other free
+%programs whose distribution conditions are different, write to the Free
+%Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not yet
+%worked out a simple rule that can be stated here, but we will often permit
+%this. We 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.
+
+%In other words, you are welcome to use, share and improve this program.
+%You are forbidden to forbid anyone else to use, share and improve
+%what you give them. Help stamp out software-hoarding!
+
+\def\texinfoversion{1.18}
+\message{Loading texinfo package [Version \texinfoversion]:}
+\message{}
+
+% Save some parts of plain tex whose names we will redefine.
+
+\let\ptexlbrace=\{
+\let\ptexrbrace=\}
+\let\ptexdot=\.
+\let\ptexstar=\*
+\let\ptexend=\end
+\let\ptexbullet=\bullet
+\let\ptexb=\b
+\let\ptexc=\c
+\let\ptexi=\i
+\let\ptext=\t
+\let\ptexl=\l
+\let\ptexL=\L
+
+\def\tie{\penalty 10000\ } % Save plain tex definition of ~.
+
+\message{Basics,}
+\chardef\other=12
+
+\hyphenation{ap-pen-dix}
+\hyphenation{mini-buf-fer mini-buf-fers}
+\hyphenation{eshell}
+
+% Margin to add to right of even pages, to left of odd pages.
+\newdimen \bindingoffset \bindingoffset=0pt
+\newdimen \normaloffset \normaloffset=\hoffset
+\newdimen\pagewidth \newdimen\pageheight
+\pagewidth=\hsize \pageheight=\vsize
+
+%---------------------Begin change-----------------------
+%
+% Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986
+%
+\newdimen\cornerlong \newdimen\cornerthick
+\newdimen \topandbottommargin
+\newdimen \outerhsize \newdimen \outervsize
+\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
+\outerhsize=7in
+\outervsize=9.5in
+\topandbottommargin=.75in
+%
+%---------------------End change-----------------------
+
+% \onepageout takes a vbox as an argument. Note that \pagecontents
+% does insertions itself, but you have to call it yourself.
+\chardef\PAGE=255 \output={\onepageout{\pagecontents\PAGE}}
+\def\onepageout#1{\hoffset=\normaloffset
+\ifodd\pageno \advance\hoffset by \bindingoffset
+\else \advance\hoffset by -\bindingoffset\fi
+\shipout\vbox{{\let\hsize=\pagewidth \makeheadline} \pagebody{#1}%
+ {\let\hsize=\pagewidth \makefootline}}
+\advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
+
+
+% Here is a modification of the main output routine for Near East Publications
+% This provides right-angle cropmarks at all four corners.
+% The contents of the page are centerlined into the cropmarks,
+% and any desired binding offset is added as an \hskip on either
+% site of the centerlined box. (P. A. MacKay, 12 November, 1986)
+%
+\def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up
+ \shipout
+ \vbox to \outervsize{\hsize=\outerhsize
+ \vbox{\line{\ewtop\hfill\ewtop}}
+ \nointerlineskip
+ \line{\vbox{\moveleft\cornerthick\nstop}
+ \hfill
+ \vbox{\moveright\cornerthick\nstop}}
+ \vskip \topandbottommargin
+ \centerline{\ifodd\pageno\hskip\bindingoffset\fi
+ \vbox{
+ {\let\hsize=\pagewidth \makeheadline}
+ \pagebody{#1}
+ {\let\hsize=\pagewidth \makefootline}}
+ \ifodd\pageno\else\hskip\bindingoffset\fi}
+ \vskip \topandbottommargin plus1fill minus1fill
+ \boxmaxdepth\cornerthick
+ \line{\vbox{\moveleft\cornerthick\nsbot}
+ \hfill
+ \vbox{\moveright\cornerthick\nsbot}}
+ \nointerlineskip
+ \vbox{\line{\ewbot\hfill\ewbot}}
+ }
+ \advancepageno
+ \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
+%
+% Do @cropmarks to get crop marks
+\def\cropmarks{\let\onepageout=\croppageout }
+
+\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
+{\catcode`\@ =11
+\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
+\dimen@=\dp#1 \unvbox#1
+\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
+\ifr at 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 can be delimited with [...] or with "..." or braces
+% or it can be a whole line.
+% #1 should be a macro which expects
+% an ordinary undelimited TeX argument.
+
+\def\parsearg #1{\let\next=#1\begingroup\obeylines\futurelet\temp\parseargx}
+
+\def\parseargx{%
+\ifx \obeyedspace\temp \aftergroup\parseargdiscardspace \else%
+\aftergroup \parseargline %
+\fi \endgroup}
+
+{\obeyspaces %
+\gdef\parseargdiscardspace {\begingroup\obeylines\futurelet\temp\parseargx}}
+
+\gdef\obeyedspace{\ }
+
+\def\parseargline{\begingroup \obeylines \parsearglinex}
+{\obeylines %
+\gdef\parsearglinex #1^^M{\endgroup \next {#1}}}
+
+\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
+
+%% These are used to keep @begin/@end levels from running away
+%% Call \inENV within environments (after a \begingroup)
+\newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
+\def\ENVcheck{%
+\ifENV\errmessage{Still within an environment. Type Return to continue.}
+\endgroup\fi} % This is not perfect, but it should reduce lossage
+
+% @begin foo is the same as @foo, for now.
+\newhelp\EMsimple{Type <Return> to continue}
+
+\outer\def\begin{\parsearg\beginxxx}
+
+\def\beginxxx #1{%
+\expandafter\ifx\csname #1\endcsname\relax
+{\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else
+\csname #1\endcsname\fi}
+
+%% @end foo executes the definition of \Efoo.
+%% foo can be delimited by doublequotes or brackets.
+
+\def\end{\parsearg\endxxx}
+
+\def\endxxx #1{%
+\expandafter\ifx\csname E#1\endcsname\relax
+\expandafter\ifx\csname #1\endcsname\relax
+\errmessage{Undefined command @end #1}\else
+\errorE{#1}\fi\fi
+\csname E#1\endcsname}
+\def\errorE#1{
+{\errhelp=\EMsimple \errmessage{@end #1 not within #1 environment}}}
+
+% Single-spacing is done by various environments.
+
+\newskip\singlespaceskip \singlespaceskip = \baselineskip
+\def\singlespace{%
+{\advance \baselineskip by -\singlespaceskip
+\kern \baselineskip}%
+\baselineskip=\singlespaceskip
+}
+
+%% Simple single-character @ commands
+
+% @@ prints an @
+% Kludge this until the fonts are right (grr).
+\def\@{{\sf \char '100}}
+
+% Define @` and @' to be the same as ` and '
+% but suppressing ligatures.
+\def\`{{`}}
+\def\'{{'}}
+
+% Used to generate quoted braces.
+
+\def\mylbrace {{\tt \char '173}}
+\def\myrbrace {{\tt \char '175}}
+\let\{=\mylbrace
+\let\}=\myrbrace
+
+% @: forces normal size whitespace following.
+\def\:{\spacefactor=1000 }
+
+% @* forces a line break.
+\def\*{\hfil\break}
+
+% @. is an end-of-sentence period.
+\def\.{.\spacefactor=3000 }
+
+% @w prevents a word break
+\def\w #1{\hbox{#1}}
+
+% @group ... @end group forces ... to be all on one page.
+
+\def\group{\begingroup% \inENV ???
+\def \Egroup{\egroup\endgroup}
+\vbox\bgroup}
+
+% @br forces paragraph break
+
+\let\br = \par
+
+% @dots{} output some dots
+
+\def\dots{$\ldots$}
+
+% @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
+
+\def\exdent{\errmessage{@exdent in filled text}}
+ % @lisp, etc, define \exdent locally from \internalexdent
+
+{\obeyspaces
+\gdef\internalexdent{\parsearg\exdentzzz}}
+
+\def\exdentzzz #1{{\advance \leftskip by -\lispnarrowing
+\advance \hsize by -\leftskip
+\advance \hsize by -\rightskip
+\leftline{{\rm#1}}}}
+
+% @include file insert text of that file as input.
+
+\def\include{\parsearg\includezzz}
+\def\includezzz #1{{\def\thisfile{#1}\input #1
+}}
+
+\def\thisfile{}
+
+% @center line outputs that line, centered
+
+\def\center{\parsearg\centerzzz}
+\def\centerzzz #1{{\advance\hsize by -\leftskip
+\advance\hsize by -\rightskip
+\centerline{#1}}}
+
+% @sp n outputs n lines of vertical space
+
+\def\sp{\parsearg\spxxx}
+\def\spxxx #1{\par \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{\parsearg \commentxxx}
+
+\def\commentxxx #1{}
+
+\let\c=\comment
+
+\long\def\ignore #1\end ignore{}
+
+\outer\def\ifset{\parsearg\ifsetxxx}
+
+\def\ifsetxxx #1#2\end ifset{%
+\expandafter\ifx\csname IF#1\endcsname\relax \else #2\fi}
+
+\outer\def\ifclear{\parsearg\ifclearxxx}
+
+\def\ifclearxxx #1#2\end ifclear{%
+\expandafter\ifx\csname IF#1\endcsname\relax #2\fi}
+
+% Some texinfo constructs that are trivial in tex
+
+\def\iftex{}
+\def\Eiftex{}
+\long\def\ifinfo #1\end ifinfo{}
+\long\def\menu #1\end menu{}
+\def\asis#1{#1}
+
+\def\node{\parsearg\nodezzz}
+\def\nodezzz#1{\nodexxx [#1,]}
+\def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
+\let\lastnode=\relax
+
+\def\donoderef{\ifx\lastnode\relax\else
+\expandafter\expandafter\expandafter\setref{\lastnode}\fi
+\let\lastnode=\relax}
+
+\def\unnumbnoderef{\ifx\lastnode\relax\else
+\expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi
+\let\lastnode=\relax}
+
+\let\refill=\relax
+
+\let\setfilename=\comment
+
+\def\inforef #1{\inforefzzz #1,,,,**}
+\def\inforefzzz #1,#2,#3,#4**{See Info file \file{\losespace#3{}}, node `\losespace#1{}'}
+\def\losespace #1{#1}
+
+\message{fonts,}
+
+% Font-change commands.
+
+%% Try out Computer Modern fonts at \magstephalf
+\font\tenrm=cmr10 scaled \magstephalf
+\font\tentt=cmtt10 scaled \magstephalf
+% Instead of cmb10, you many want to use cmbx10.
+% cmbx10 is a prettier font on its own, but cmb10
+% looks better when embedded in a line with cmr10.
+\font\tenbf=cmb10 scaled \magstephalf
+\font\tenit=cmti10 scaled \magstephalf
+\font\tensl=cmsl10 scaled \magstephalf
+\font\tensf=cmss10 scaled \magstephalf
+\def\li{\sf}
+\font\tensc=cmcsc10 scaled \magstephalf
+
+% Fonts for @defun, etc.
+\font\defbf=cmbx10 scaled \magstep1 %was 1314
+\let\deftt=\tentt
+\def\df{\let\tt=\deftt \defbf}
+
+% Font for title
+\font\titlerm = cmbx10 scaled \magstep5
+
+% Fonts for indices
+\font\indit=cmti9 \font\indrm=cmr9
+\def\indbf{\indrm} \def\indsl{\indit}
+\def\indexfonts{\let\it=\indit \let\sl=\indsl \let\bf=\indbf \let\rm=\indrm}
+
+% Fonts for headings
+\font\chaprm=cmbx10 scaled \magstep3
+\font\chapit=cmti10 scaled \magstep3
+\font\chapsl=cmsl10 scaled \magstep3
+\font\chaptt=cmtt10 scaled \magstep3
+\font\chapsf=cmss10 scaled \magstep3
+\let\chapbf=\chaprm
+
+\font\secrm=cmbx10 scaled \magstep2
+\font\secit=cmti10 scaled \magstep2
+\font\secsl=cmsl10 scaled \magstep2
+\font\sectt=cmtt10 scaled \magstep2
+\font\secsf=cmss10 scaled \magstep2
+\let\secbf=\secrm
+
+\font\ssecrm=cmbx10 scaled \magstep1
+\font\ssecit=cmti10 scaled \magstep1
+\font\ssecsl=cmsl10 scaled \magstep1
+\font\ssectt=cmtt10 scaled \magstep1
+\font\ssecsf=cmss10 scaled \magstep1
+\let\ssecbf=\ssecrm
+
+\def\textfonts{\let\rm=\tenrm\let\it=\tenit\let\sl=\tensl\let\bf=\tenbf%
+\let\sc=\tensc\let\sf=\tensf}
+\def\chapfonts{\let\rm=\chaprm\let\it=\chapit\let\sl=\chapsl\let\bf=\chapbf\let\tt=\chaptt\let\sf=\chapsf}
+\def\secfonts{\let\rm=\secrm\let\it=\secit\let\sl=\secsl\let\bf=\secbf\let\tt=\sectt\let\sf=\secsf}
+\def\subsecfonts{\let\rm=\ssecrm\let\it=\ssecit\let\sl=\ssecsl\let\bf=\ssecbf\let\tt=\ssectt\let\sf=\ssecsf}
+% Count depth in font-changes, for error checks
+\newcount\fontdepth \fontdepth=0
+
+%% Add scribe-like font environments, plus @l for inline lisp (usually sans
+%% serif) and @ii for TeX italic
+
+\def\i#1{{\sl #1}}
+\let\var=\i
+\let\dfn=\i
+\let\emph=\i
+\let\cite=\i
+
+\def\b#1{{\bf #1}}
+\let\strong=\b
+
+\def\t#1{{\tt \rawbackslash \frenchspacing #1}\null}
+\let\ttfont = \t
+\let\kbd=\t
+\let\code=\t
+\def\samp #1{`{\tt \rawbackslash \frenchspacing #1}'\null}
+\def\key #1{{\tt \uppercase{#1}}\null}
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+
+\let\file=\samp
+
+\def\l#1{{\li #1}\null}
+
+\def\r#1{{\rm #1}}
+\def\s#1{{\sc #1}}
+\def\ii#1{{\it #1}}
+
+\def\titlefont#1{{\titlerm #1}}
+
+\def\titlepage{\begingroup \parindent=0pt \hbox{}%
+\let\oldpage=\page
+\def\page{\oldpage \hbox{}}}
+
+\def\Etitlepage{\endgroup\page\HEADINGSon}
+
+% Make altmode in file print out right
+
+\catcode `\^^[=\active \def^^[{$\diamondsuit$}
+
+\message{page headings,}
+
+%%% Set up page headings and footings.
+
+\let\thispage=\folio
+
+\newtoks \evenheadline % Token sequence for heading line of even pages
+\newtoks \oddheadline % Token sequence for heading line of odd pages
+\newtoks \evenfootline % Token sequence for footing line of even pages
+\newtoks \oddfootline % Token sequence for footing line of 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}}
+
+% 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\oddheading{\parsearg\oddheadingxxx}
+\def\everyheading{\parsearg\everyheadingxxx}
+
+\def\evenfooting{\parsearg\evenfootingxxx}
+\def\oddfooting{\parsearg\oddfootingxxx}
+\def\everyfooting{\parsearg\everyfootingxxx}
+
+{\catcode`\@=0 %
+
+\gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish}
+\gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{%
+\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish}
+\gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{%
+\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\everyheadingxxx #1{\everyheadingyyy #1@|@|@|@|\finish}
+\gdef\everyheadingyyy #1@|#2@|#3@|#4\finish{%
+\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
+\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish}
+\gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{%
+\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish}
+\gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{%
+\global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\everyfootingxxx #1{\everyfootingyyy #1@|@|@|@|\finish}
+\gdef\everyfootingyyy #1@|#2@|#3@|#4\finish{%
+\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
+\global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+%
+}% unbind the catcode of @.
+
+% @headings on turns them on.
+% @headings off turns them off.
+% By default, they are off.
+
+\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,
+% Put current file name in lower left corner,
+% Put 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\HEADINGSon{
+\pagealignmacro
+\global\pageno=1
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\folio\hfil\thistitle}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+}
+
+% Subroutines used in generating headings
+% Produces Day Month Year style of output.
+\def\today{\number\day\space
+\ifcase\month\or
+January\or February\or March\or April\or May\or June\or
+July\or August\or September\or October\or November\or December\fi
+\space\number\year}
+
+% Use this if you want the Month Day, Year style of output.
+%\def\today{\ifcase\month\or
+%January\or February\or March\or April\or May\or June\or
+%July\or August\or September\or October\or November\or December\fi
+%\space\number\day, \number\year}
+
+% @settitle line... specifies the title of the document, for headings
+% It generates no output of its own
+
+\def\thistitle{No Title}
+\def\settitle{\parsearg\settitlezzz}
+\def\settitlezzz #1{\gdef\thistitle{#1}}
+
+\message{tables,}
+
+% Tables -- @table, @ftable, @item(x), @kitem(x), @xitem(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 and @ftable define @item, @itemx, etc., with these defs.
+% They also define \itemindex
+% to index the item name in whatever manner is desired (perhaps none).
+
+\def\internalBitem{\smallbreak \parsearg\itemzzz}
+\def\internalBitemx{\par \parsearg\itemzzz}
+
+\def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz}
+\def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \par \parsearg\xitemzzz}
+
+\def\internalBkitem{\smallbreak \parsearg\kitemzzz}
+\def\internalBkitemx{\par \parsearg\kitemzzz}
+
+\def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}\itemzzz {#1}}
+
+\def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}\itemzzz {#1}}
+
+\def\itemzzz #1{\begingroup %
+\advance \hsize by -\rightskip %
+\advance \hsize by -\leftskip %
+\setbox0=\hbox{\itemfont{#1}}%
+\itemindex{#1}%
+\parskip=0in %
+\noindent %
+\ifdim \wd0>\itemmax %
+\vadjust{\penalty 10000}%
+\hbox to \hsize{\hskip -\tableindent\box0\hss}\ %
+\else %
+\hbox to 0pt{\hskip -\tableindent\box0\hss}%
+\fi %
+\endgroup %
+}
+
+\def\item{\errmessage{@item while not in a table}}
+\def\itemx{\errmessage{@itemx while not in a table}}
+\def\kitem{\errmessage{@kitem while not in a table}}
+\def\kitemx{\errmessage{@kitemx while not in a table}}
+\def\xitem{\errmessage{@xitem while not in a table}}
+\def\xitemx{\errmessage{@xitemx while not in a table}}
+
+%% Contains a kludge to get @end[description] to work
+\def\description{\tablez{\dontindex}{1}{}{}{}{}}
+
+\def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}
+{\obeylines\obeyspaces%
+\gdef\tablex #1^^M{%
+\tabley\dontindex#1 \endtabley}}
+
+\def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex}
+{\obeylines\obeyspaces%
+\gdef\ftablex #1^^M{%
+\tabley\fnitemindex#1 \endtabley}}
+
+\def\dontindex #1{}
+\def\fnitemindex #1{\doind {fn}{\code{#1}}}%
+
+{\obeyspaces %
+\gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup%
+\tablez{#1}{#2}{#3}{#4}{#5}{#6}}}
+
+\def\tablez #1#2#3#4#5#6{%
+\aboveenvbreak %
+\begingroup %
+\def\Edescription{\Etable}% Neccessary kludge.
+\let\itemindex=#1%
+\ifnum 0#3>0 \advance \leftskip by #3\mil \fi %
+\ifnum 0#4>0 \tableindent=#4\mil \fi %
+\ifnum 0#5>0 \advance \rightskip by #5\mil \fi %
+\def\itemfont{#2}%
+\itemmax=\tableindent %
+\advance \itemmax by -\itemmargin %
+\advance \leftskip by \tableindent %
+\parindent = 0pt
+\parskip = \smallskipamount
+\ifdim \parskip=0pt \parskip=2pt \fi%
+\def\Etable{\endgraf\endgroup\afterenvbreak}%
+\let\item = \internalBitem %
+\let\itemx = \internalBitemx %
+\let\kitem = \internalBkitem %
+\let\kitemx = \internalBkitemx %
+\let\xitem = \internalBxitem %
+\let\xitemx = \internalBxitemx %
+}
+
+% This is the counter used by @enumerate, which is really @itemize
+
+\newcount \itemno
+
+\def\itemize{\parsearg\itemizezzz}
+
+\def\itemizezzz #1{\itemizey {#1}{\Eitemize}}
+
+\def\itemizey #1#2{%
+\aboveenvbreak %
+\begingroup %
+\itemno = 0 %
+\itemmax=\itemindent %
+\advance \itemmax by -\itemmargin %
+\advance \leftskip by \itemindent %
+\parindent = 0pt
+\parskip = \smallskipamount
+\ifdim \parskip=0pt \parskip=2pt \fi%
+\def#2{\endgraf\endgroup\afterenvbreak}%
+\def\itemcontents{#1}%
+\let\item=\itemizeitem}
+
+\def\bullet{$\ptexbullet$}
+\def\minus{$-$}
+
+\def\enumerate{\itemizey{\the\itemno.}\Eenumerate\flushcr}
+
+% Definition of @item while inside @itemize.
+
+\def\itemizeitem{%
+\advance\itemno by 1
+{\let\par=\endgraf \smallbreak}%
+\ifhmode \errmessage{\in hmode at itemizeitem}\fi
+{\parskip=0in \hskip 0pt
+\hbox to 0pt{\hss \itemcontents\hskip \itemmargin}%
+\vadjust{\penalty 300}}%
+\flushcr}
+
+\message{indexing,}
+% Index generation facilities
+
+% Define \newwrite to be identical to plain tex's \newwrite
+% except not \outer, so it can be used within \newindex.
+{\catcode`\@=11
+\gdef\newwrite{\alloc at 7\write\chardef\sixt@@n}}
+
+% \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{
+\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
+\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\noexpand\doindex {#1}}
+}
+
+% @defindex foo == \newindex{foo}
+
+\def\defindex{\parsearg\newindex}
+
+% Define @defcodeindex, like @defindex except put all entries in @code.
+
+\def\newcodeindex #1{
+\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
+\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\noexpand\docodeindex {#1}}
+}
+
+\def\defcodeindex{\parsearg\newcodeindex}
+
+% @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.
+\def\synindex #1 #2 {%
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\noexpand\doindex {#2}}%
+}
+
+% @syncodeindex foo bar similar, but put all entries made for index foo
+% inside @code.
+\def\syncodeindex #1 #2 {%
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\noexpand\docodeindex {#2}}%
+}
+
+% 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}}}
+
+\def\indexdummies{%
+\def\bf{\realbackslash bf }%
+\def\rm{\realbackslash rm }%
+\def\sl{\realbackslash sl }%
+\def\dots{\realbackslash dots }%
+\def\copyright{\realbackslash copyright }%
+}
+
+% \indexnofonts no-ops all font-change commands.
+% This is used when outputting the strings to sort the index by.
+\def\indexdummyfont#1{#1}
+\def\indexnofonts{%
+\let\code=\indexdummyfont
+\let\samp=\indexdummyfont
+\let\kbd=\indexdummyfont
+\let\key=\indexdummyfont
+\let\var=\indexdummyfont
+}
+
+% To define \realbackslash, we must make \ not be an escape.
+% We must first make another character (@) an escape
+% so we do not become unable to do a definition.
+
+{\catcode`\@=0 \catcode`\\=\other
+ at gdef@realbackslash{\}}
+
+\let\indexbackslash=0 %overridden during \printindex.
+
+\def\doind #1#2{%
+{\indexdummies % Must do this here, since \bf, etc expand at this stage
+\count10=\lastpenalty %
+\escapechar=`\\%
+{\let\folio=0% Expand all macros now EXCEPT \folio
+\def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
+% so it will be output as is; and it will print as backslash in the indx.
+%
+% Now process the index-string once, with all font commands turned off,
+% to get the string to sort the index by.
+{\indexnofonts
+\xdef\temp1{#2}%
+}%
+% Now produce the complete index entry. We process the index-string again,
+% this time with font commands expanded, to get what to print in the index.
+\edef\temp{%
+\write \csname#1indfile\endcsname{%
+\realbackslash entry {\temp1}{\folio}{#2}}}%
+\temp }%
+\penalty\count10}}
+
+\def\dosubind #1#2#3{%
+{\indexdummies % Must do this here, since \bf, etc expand at this stage
+\count10=\lastpenalty %
+\escapechar=`\\%
+{\let\folio=0%
+\def\rawbackslashxx{\indexbackslash}%
+%
+% Now process the index-string once, with all font commands turned off,
+% to get the string to sort the index by.
+{\indexnofonts
+\xdef\temp1{#2 #3}%
+}%
+% Now produce the complete index entry. We process the index-string again,
+% this time with font commands expanded, to get what to print in the index.
+\edef\temp{%
+\write \csname#1indfile\endcsname{%
+\realbackslash entry {\temp1}{\folio}{#2}{#3}}}%
+\temp }%
+\penalty\count10}}
+
+% 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.
+
+% This is what you call to cause a particular index to get printed.
+% Write
+% @unnumbered Function Index
+% @printindex fn
+
+\def\printindex{\parsearg\doprintindex}
+
+\def\doprintindex#1{\tex %
+\catcode`\%=\other\catcode`\&=\other\catcode`\#=\other
+\catcode`\$=\other\catcode`\_=\other
+\catcode`\~=\other
+\def\indexbackslash{\rawbackslashxx}
+\indexfonts\rm \tolerance=9500 \advance\baselineskip -1pt
+\begindoublecolumns
+\openin 1 \jobname.#1s
+\ifeof 1 \else \closein 1 \input \jobname.#1s
+\fi
+\enddoublecolumns
+\Etex}
+
+% These macros are used by the sorted index file itself.
+% Change them to control the appearance of the index.
+
+% Same as \bigskipamount except no shrink.
+% \balancecolumns gets confused if there is any shrink.
+\newskip\initialskipamount \initialskipamount 12pt plus4pt
+
+\outer\def\initial #1{%
+{\let\tentt=\sectt \let\sf=\sectt
+\ifdim\lastskip<\initialskipamount
+\removelastskip \penalty-200 \vskip \initialskipamount\fi
+\line{\secbf#1\hfill}\kern 2pt\penalty3000}}
+
+\outer\def\entry #1#2{
+{\parfillskip=0in \parskip=0in \parindent=0in
+\hangindent=1in \hangafter=1%
+\noindent\hbox{#1}\leaders\Dotsbox\hskip 0pt plus 1filll #2\par
+}}
+
+\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}\leaders\Dotsbox\hskip 0pt plus 1filll#2\par
+}}
+
+%% Define two-column mode, which is used in indexes.
+%% Adapted from the TeXBook, page 416
+\catcode `\@=11
+
+\newbox\partialpage
+
+\newdimen\doublecolumnhsize \doublecolumnhsize = 3.11in
+\newdimen\doublecolumnvsize \doublecolumnvsize = 19.1in
+
+\def\begindoublecolumns{\begingroup
+ \output={\global\setbox\partialpage=\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}\eject
+ \output={\doublecolumnout} \hsize=\doublecolumnhsize \vsize=\doublecolumnvsize}
+\def\enddoublecolumns{\output={\balancecolumns}\eject
+ \endgroup \pagegoal=\vsize}
+
+\def\doublecolumnout{\splittopskip=\topskip \splitmaxdepth=\maxdepth
+ \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage
+ \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
+ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty}
+\def\pagesofar{\unvbox\partialpage %
+ \hsize=\doublecolumnhsize % have to restore this since output routine
+% changes it to set cropmarks (P. A. MacKay, 12 Nov. 1986)
+ \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}}
+\def\balancecolumns{\setbox0=\vbox{\unvbox255} \dimen@=\ht0
+ \advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip
+ \divide\dimen@ by2 \splittopskip=\topskip
+ {\vbadness=10000 \loop \global\setbox3=\copy0
+ \global\setbox1=\vsplit3 to\dimen@
+ \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}
+ \setbox0=\vbox to\dimen@{\unvbox1} \setbox2=\vbox to\dimen@{\unvbox3}
+ \pagesofar}
+
+\catcode `\@=\other
+\message{sectioning,}
+% Define chapters, sections, etc.
+
+\newcount \chapno
+\newcount \secno
+\newcount \subsecno
+\newcount \subsubsecno
+
+% This counter is funny since it counts through charcodes of letters A, B, ...
+\newcount \appendixno \appendixno = `\@
+\def\appendixletter{\char\the\appendixno}
+
+\newwrite \contentsfile
+\openout \contentsfile = \jobname.toc
+
+% Each @chapter defines this as the name of the chapter.
+% page headings and footings can use it. @section does likewise
+
+\def\thischapter{} \def\thissection{}
+\def\seccheck#1{\if \pageno<0 %
+\errmessage{@#1 not allowed after generating table of contents}\fi
+%
+}
+
+\outer\def\chapter{\parsearg\chapterzzz}
+\def\chapterzzz #1{\seccheck{chapter}%
+\secno=0 \subsecno=0 \subsubsecno=0 \global\advance \chapno by 1 \message{Chapter \the\chapno}%
+\chapmacro {#1}{\the\chapno}%
+\gdef\thissection{#1}\gdef\thischapter{#1}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\donoderef %
+}
+
+\outer\def\appendix{\parsearg\appendixzzz}
+\def\appendixzzz #1{\seccheck{appendix}%
+\secno=0 \subsecno=0 \subsubsecno=0 \global\advance \appendixno by 1 \message{Appendix \appendixletter}%
+\chapmacro {#1}{Appendix \appendixletter}%
+\gdef\thischapter{#1}\gdef\thissection{#1}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash chapentry {#1}{Appendix \appendixletter}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+}
+
+\outer\def\unnumbered{\parsearg\unnumberedzzz}
+\def\unnumberedzzz #1{\seccheck{unnumbered}%
+\secno=0 \subsecno=0 \subsubsecno=0 \message{(#1)}
+\unnumbchapmacro {#1}%
+\gdef\thischapter{#1}\gdef\thissection{#1}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash unnumbchapentry {#1}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+}
+
+\outer\def\section{\parsearg\sectionzzz}
+\def\sectionzzz #1{\seccheck{section}%
+\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
+\gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash secentry %
+{#1}{\the\chapno}{\the\secno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\donoderef %
+\penalty 10000 %
+}
+
+\outer\def\appendixsection{\parsearg\appendixsectionzzz}
+\outer\def\appendixsec{\parsearg\appendixsectionzzz}
+\def\appendixsectionzzz #1{\seccheck{appendixsection}%
+\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
+\gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash secentry %
+{#1}{\appendixletter}{\the\secno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\penalty 10000 %
+}
+
+\outer\def\unnumberedsec{\parsearg\unnumberedseczzz}
+\def\unnumberedseczzz #1{\seccheck{unnumberedsec}%
+\plainsecheading {#1}\gdef\thissection{#1}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash unnumbsecentry{#1}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\penalty 10000 %
+}
+
+\outer\def\subsection{\parsearg\subsectionzzz}
+\def\subsectionzzz #1{\seccheck{subsection}%
+\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
+\subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash subsecentry %
+{#1}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\donoderef %
+\penalty 10000 %
+}
+
+\outer\def\appendixsubsec{\parsearg\appendixsubseczzz}
+\def\appendixsubseczzz #1{\seccheck{appendixsubsec}%
+\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
+\subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash subsecentry %
+{#1}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\penalty 10000 %
+}
+
+\outer\def\unnumberedsubsec{\parsearg\unnumberedsubseczzz}
+\def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%
+\plainsecheading {#1}\gdef\thissection{#1}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\penalty 10000 %
+}
+
+\outer\def\subsubsection{\parsearg\subsubsectionzzz}
+\def\subsubsectionzzz #1{\seccheck{subsubsection}%
+\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
+\subsubsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash subsubsecentry %
+{#1}{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%\
+\escapechar=`\\%
+\write \contentsfile \temp %
+\donoderef %
+\penalty 10000 %
+}
+
+\outer\def\appendixsubsubsec{\parsearg\appendixsubsubseczzz}
+\def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}%
+\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
+\subsubsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash subsubsecentry{#1}%
+{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%\
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\penalty 10000 %
+}
+
+\outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz}
+\def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%
+\plainsecheading {#1}\gdef\thissection{#1}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\penalty 10000 %
+}
+
+% Define @majorheading, @heading and @subheading
+
+\outer\def\majorheading #1{%
+{\advance\chapheadingskip by 10pt \chapbreak }%
+{\chapfonts \line{\chaprm #1\hfill}}\bigskip \par\penalty 200}
+
+\outer\def\chapheading #1{\chapbreak %
+{\chapfonts \line{\chaprm #1\hfill}}\bigskip \par\penalty 200}
+
+\let\heading=\secheadingi
+\let\subheading=\subsecheadingi
+\let\subsubheading=\subsubsecheadingi
+
+% 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}
+
+\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
+
+%%% Define plain chapter starts, and page on/off switching for it
+% Parameter controlling skip before chapter headings (if needed)
+
+\newskip \chapheadingskip \chapheadingskip = 30pt plus 8pt minus 4pt
+
+\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\pchapsepmacro=\chapbreak
+\global\let\pagealignmacro=\chappager}
+
+\def\CHAPPAGon{
+\global\let\pchapsepmacro=\chappager
+\global\let\pagealignmacro=\chappager}
+
+\def\CHAPPAGodd{
+\global\let\pchapsepmacro=\chapoddpage
+\global\let\pagealignmacro=\chapoddpage}
+
+\CHAPPAGon
+
+\def\CHAPFplain{
+\global\let\chapmacro=\chfplain
+\global\let\unnumbchapmacro=\unnchfplain}
+
+\def\chfplain #1#2{%
+\pchapsepmacro %
+{\chapfonts \line{\chaprm #2.\enspace #1\hfill}}\bigskip \par\penalty 5000 %
+}
+
+\def\unnchfplain #1{%
+\pchapsepmacro %
+{\chapfonts \line{\chaprm #1\hfill}}\bigskip \par\penalty 10000 %
+}
+\CHAPFplain % The default
+
+\def\unnchfopen #1{%
+\chapoddpage {\chapfonts \line{\chaprm #1\hfill}}\bigskip \par\penalty 10000 %
+}
+
+\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\CHAPFopen{
+\global\let\chapmacro=\chfopen
+\global\let\unnumbchapmacro=\unnchfopen}
+
+% Parameter controlling skip before section headings.
+
+\newskip \subsecheadingskip \subsecheadingskip = 17pt plus 8pt minus 4pt
+\def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}}
+
+\newskip \secheadingskip \secheadingskip = 21pt plus 8pt minus 4pt
+\def\secheadingbreak{\dobreak \secheadingskip {-1000}}
+
+\def\secheading #1#2#3{\secheadingi {#2.#3\enspace #1}}
+\def\plainsecheading #1{\secheadingi {#1}}
+\def\secheadingi #1{{\advance \secheadingskip by \parskip %
+\secheadingbreak}%
+{\secfonts \line{\secrm #1\hfill}}%
+\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }
+
+\def\subsecheading #1#2#3#4{{\advance \subsecheadingskip by \parskip %
+\subsecheadingbreak}%
+{\secfonts \line{\secrm#2.#3.#4\enspace #1\hfill}}%
+\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }
+
+\def\subsubsecfonts{\subsecfonts} % Maybe this should change
+
+\def\subsubsecheading #1#2#3#4#5{{\advance \subsecheadingskip by \parskip %
+\subsecheadingbreak}%
+{\secfonts \line{\secrm#2.#3.#4.#5\enspace #1\hfill}}%
+\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000}
+
+\message{toc printing,}
+
+\def\Dotsbox{\hbox to 1em{\hss.\hss}} % Used by index macros
+
+\def\finishcontents{%
+\ifnum\pageno>0 %
+\pagealignmacro %
+\immediate\closeout \contentsfile%
+\pageno=-1 % Request roman numbered pages
+\fi}
+
+\outer\def\contents{%
+\finishcontents %
+\unnumbchapmacro{Table of Contents}
+\def\thischapter{Table of Contents}
+{\catcode`\\=0
+\catcode`\{=1 % Set up to handle contents files properly
+\catcode`\}=2
+\catcode`\@=11
+\input \jobname.toc
+}
+\vfill \eject}
+
+\outer\def\summarycontents{%
+\finishcontents %
+\unnumbchapmacro{Summary Table of Contents}
+\def\thischapter{Summary Table of Contents}
+{\catcode`\\=0
+\catcode`\{=1 % Set up to handle contents files properly
+\catcode`\}=2
+\catcode`\@=11
+\def\smallbreak{}
+\def\secentry ##1##2##3##4{}
+\def\subsecentry ##1##2##3##4##5{}
+\def\subsubsecentry ##1##2##3##4##5##6{}
+\def\unnumbsecentry ##1##2{}
+\def\unnumbsubsecentry ##1##2{}
+\def\unnumbsubsubsecentry ##1##2{}
+\let\medbreak=\smallbreak
+\input \jobname.toc
+}
+\vfill \eject}
+
+\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
+
+% 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, ...
+
+\def\chapentry #1#2#3{%
+\medbreak
+\line{#2.\space#1\leaders\hbox to 1em{\hss.\hss}\hfill #3}
+}
+
+\def\unnumbchapentry #1#2{%
+\medbreak
+\line{#1\leaders\Dotsbox\hfill #2}
+}
+
+\def\secentry #1#2#3#4{%
+\line{\enspace\enspace#2.#3\space#1\leaders\Dotsbox\hfill#4}
+}
+
+\def\unnumbsecentry #1#2{%
+\line{\enspace\enspace#1\leaders\Dotsbox\hfill #2}
+}
+
+\def\subsecentry #1#2#3#4#5{%
+\line{\enspace\enspace\enspace\enspace
+#2.#3.#4\space#1\leaders\Dotsbox\hfill #5}
+}
+
+\def\unnumbsubsecentry #1#2{%
+\line{\enspace\enspace\enspace\enspace#1\leaders\Dotsbox\hfill #2}
+}
+
+\def\subsubsecentry #1#2#3#4#5#6{%
+\line{\enspace\enspace\enspace\enspace\enspace\enspace
+#2.#3.#4.#5\space#1\leaders\Dotsbox\hfill #6}
+}
+
+\def\unnumbsubsubsecentry #1#2{%
+\line{\enspace\enspace\enspace\enspace\enspace\enspace#1\leaders\Dotsbox\hfill #2}
+}
+
+\message{environments,}
+
+% @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.
+
+\def\tex{\begingroup
+\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
+\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
+\catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
+\catcode `\%=14
+\catcode`\"=12
+\catcode`\|=12
+\catcode`\<=12
+\catcode`\>=12
+\escapechar=`\\
+%
+\let\{=\ptexlbrace
+\let\}=\ptexrbrace
+\let\.=\ptexdot
+\let\*=\ptexstar
+\def\@={@}%
+\let\bullet=\ptexbullet
+\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext \let\l=\ptexl
+\let\L=\ptexL
+%
+\let\Etex=\endgroup}
+
+% Define @lisp ... @endlisp.
+% @lisp does a \begingroup so it can rebind things,
+% including the definition of @endlisp (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
+% phr: changed space to \null, to avoid overfull hbox problems.
+{\obeyspaces%
+\gdef\lisppar{\null\endgraf}}
+
+% Cause \obeyspaces to make each Space cause a word-separation
+% rather than the default which is that it acts punctuation.
+% This is because space in tt font looks funny.
+{\obeyspaces %
+\gdef\sepspaces{\def {\ }}}
+
+\newskip\aboveenvskipamount \aboveenvskipamount= 0pt
+\def\aboveenvbreak{{\advance\aboveenvskipamount by \parskip
+\endgraf \ifdim\lastskip<\aboveenvskipamount
+\removelastskip \penalty-50 \vskip\aboveenvskipamount \fi}}
+
+\def\afterenvbreak{\endgraf \ifdim\lastskip<\aboveenvskipamount
+\removelastskip \penalty-50 \vskip\aboveenvskipamount \fi}
+
+\def\lisp{\aboveenvbreak\begingroup\inENV %This group ends at the end of the @lisp body
+\hfuzz=12truept % Don't be fussy
+% Make spaces be word-separators rather than space tokens.
+\sepspaces %
+% Single space lines
+\singlespace %
+% The following causes blank lines not to be ignored
+% by adding a space to the end of each line.
+\let\par=\lisppar
+\def\Elisp{\endgroup\afterenvbreak}%
+\parskip=0pt \advance \rightskip by \lispnarrowing
+\advance \leftskip by \lispnarrowing
+\parindent=0pt
+\let\exdent=\internalexdent
+\obeyspaces \obeylines \tt \rawbackslash
+\def\next##1{}\next}
+
+
+\let\example=\lisp
+\def\Eexample{\Elisp}
+
+\let\smallexample=\lisp
+\def\Esmallexample{\Elisp}
+
+% Macro for 9 pt. examples, necessary to print with 5" lines.
+% From Pavel at xerox. This is not really used unless the
+% @smallbook command is given.
+
+\def\smalllispx{\aboveenvbreak\begingroup\inENV
+% This group ends at the end of the @lisp body
+\hfuzz=12truept % Don't be fussy
+% Make spaces be word-separators rather than space tokens.
+\sepspaces %
+% Single space lines
+\singlespace %
+% The following causes blank lines not to be ignored
+% by adding a space to the end of each line.
+\let\par=\lisppar
+\def\Esmalllisp{\endgroup\afterenvbreak}%
+\parskip=0pt \advance \rightskip by \lispnarrowing
+\advance \leftskip by \lispnarrowing
+\parindent=0pt
+\let\exdent=\internalexdent
+\obeyspaces \obeylines \ninett \rawbackslash
+\def\next##1{}\next}
+
+% This is @display; same as @lisp except use roman font.
+
+\def\display{\begingroup\inENV %This group ends at the end of the @display body
+\aboveenvbreak
+% Make spaces be word-separators rather than space tokens.
+\sepspaces %
+% Single space lines
+\singlespace %
+% The following causes blank lines not to be ignored
+% by adding a space to the end of each line.
+\let\par=\lisppar
+\def\Edisplay{\endgroup\afterenvbreak}%
+\parskip=0pt \advance \rightskip by \lispnarrowing
+\advance \leftskip by \lispnarrowing
+\parindent=0pt
+\let\exdent=\internalexdent
+\obeyspaces \obeylines
+\def\next##1{}\next}
+
+% This is @format; same as @lisp except use roman font and don't narrow margins
+
+\def\format{\begingroup\inENV %This group ends at the end of the @format body
+\aboveenvbreak
+% Make spaces be word-separators rather than space tokens.
+\sepspaces %
+\singlespace %
+% The following causes blank lines not to be ignored
+% by adding a space to the end of each line.
+\let\par=\lisppar
+\def\Eformat{\endgroup\afterenvbreak}
+\parskip=0pt \parindent=0pt
+\obeyspaces \obeylines
+\def\next##1{}\next}
+
+% @flushleft and @flushright
+
+\def\flushleft{\begingroup\inENV %This group ends at the end of the @format body
+\aboveenvbreak
+% Make spaces be word-separators rather than space tokens.
+\sepspaces %
+% The following causes blank lines not to be ignored
+% by adding a space to the end of each line.
+% This also causes @ to work when the directive name
+% is terminated by end of line.
+\let\par=\lisppar
+\def\Eflushleft{\endgroup\afterenvbreak}%
+\parskip=0pt \parindent=0pt
+\obeyspaces \obeylines
+\def\next##1{}\next}
+
+\def\flushright{\begingroup\inENV %This group ends at the end of the @format body
+\aboveenvbreak
+% Make spaces be word-separators rather than space tokens.
+\sepspaces %
+% The following causes blank lines not to be ignored
+% by adding a space to the end of each line.
+% This also causes @ to work when the directive name
+% is terminated by end of line.
+\let\par=\lisppar
+\def\Eflushright{\endgroup\afterenvbreak}%
+\parskip=0pt \parindent=0pt
+\advance \leftskip by 0pt plus 1fill
+\obeyspaces \obeylines
+\def\next##1{}\next}
+
+% @quotation - narrow the margins.
+
+\def\quotation{\begingroup\inENV %This group ends at the end of the @quotation body
+{\parskip=0pt % because we will skip by \parskip too, later
+\aboveenvbreak}%
+\singlespace
+\parindent=0pt
+\def\Equotation{\par\endgroup\afterenvbreak}%
+\advance \rightskip by \lispnarrowing
+\advance \leftskip by \lispnarrowing}
+
+\message{defuns,}
+% Define formatter for defuns
+% First, allow user to change definition object font (\df) internally
+\def\setdeffont #1 {\csname DEF#1\endcsname}
+
+\newskip\defbodyindent \defbodyindent=36pt
+\newskip\defargsindent \defargsindent=50pt
+\newskip\deftypemargin \deftypemargin=12pt
+\newskip\deflastargmargin \deflastargmargin=18pt
+
+\newcount\parencount
+% define \functionparens, which makes ( and ) and & do special things.
+% \functionparens affects the group it is contained in.
+\def\activeparens{%
+\catcode`\(=\active \catcode`\)=\active \catcode`\&=\active
+\catcode`\[=\active \catcode`\]=\active}
+{\activeparens % Now, smart parens don't turn on until &foo (see \amprm)
+\gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 }
+\gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
+
+% Definitions of (, ) and & used in args for functions.
+% This is the definition of ( outside of all parentheses.
+\gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested %
+\global\advance\parencount by 1 }
+%
+% This is the definition of ( when already inside a level of parens.
+\gdef\opnested{\char`\(\global\advance\parencount by 1 }
+%
+\gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0.
+% also in that case restore the outer-level definition of (.
+\ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi
+\global\advance \parencount by -1 }
+% If we encounter &foo, then turn on ()-hacking afterwards
+\gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ }
+%
+\gdef\normalparens{\boldbrax\let&=\ampnr}
+} % End of definition inside \activeparens
+%% These parens (in \boldbrax) actually are a little bolder than the
+%% contained text. This is especially needed for [ and ]
+\def\opnr{{\sf\char`\(}} \def\clnr{{\sf\char`\)}} \def\ampnr{\&}
+\def\lbrb{{\tt\char`\[}} \def\rbrb{{\tt\char`\]}}
+
+% First, defname, which formats the header line itself.
+% #1 should be the function name.
+% #2 should be the type of definition, such as "Function".
+
+\def\defname #1#2{%
+\leftskip = 0in %
+\noindent %
+\setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%
+\dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line
+\dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations
+\parshape 2 0in \dimen0 \defargsindent \dimen1 %
+% Now output arg 2 ("Function" or some such)
+% ending at \deftypemargin from the right margin,
+% but stuck inside a box of width 0 so it does not interfere with linebreaking
+\rlap{\rightline{{\rm #2}\hskip \deftypemargin}}%
+\tolerance=10000 \hbadness=10000 % Make all lines underfull and no complaints
+{\df #1}\enskip % Generate function name
+}
+
+% Actually process the body of a definition
+% #1 should be the terminating control sequence, such as \Edefun.
+% #2 should be the "another name" control sequence, such as \defunx.
+% #3 should be the control sequence that actually processes the header,
+% such as \defunheader.
+
+\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
+\medbreak %
+% Define the end token that this defining construct specifies
+% so that it will exit this group.
+\def#1{\endgraf\endgroup\medbreak}%
+\def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
+\parindent=0in \leftskip=\defbodyindent %
+\begingroup\obeylines\activeparens\spacesplit#3}
+
+\def\defmethparsebody #1#2#3#4 {\begingroup\inENV %
+\medbreak %
+% Define the end token that this defining construct specifies
+% so that it will exit this group.
+\def#1{\endgraf\endgroup\medbreak}%
+\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
+\parindent=0in \leftskip=\defbodyindent %
+\begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
+
+% Split up #2 at the first space token.
+% call #1 with two arguments:
+% the first is all of #2 before the space token,
+% the second is all of #2 after that space token.
+% If #2 contains no space token, all of it is passed as the first arg
+% and the second is passed as empty.
+
+{\obeylines
+\gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}%
+\long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{%
+\ifx\relax #3%
+#1{#2}{}\else #1{#2}{#3#4}\fi}}
+
+% So much for the things common to all kinds of definitions.
+
+% Define @defun.
+
+% First, define the processing that is wanted for arguments of \defun
+% Use this to expand the args and terminate the paragraph they make up
+
+\def\defunargs #1{\functionparens \sl #1%
+\ifnum\parencount=0 \else \errmessage{unbalanced parens in @def arguments}\fi%
+\interlinepenalty=10000
+\endgraf\vskip -\parskip \penalty 10000}
+
+% Do complete processing of one @defun or @defunx line already parsed.
+
+% @deffn Command forward-char nchars
+
+\def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader}
+
+\def\deffnheader #1#2#3{\doind {fn}{\code{#2}}%
+\begingroup\defname {#2}{#1}\defunargs{#3}\endgroup}
+
+% @defun == @deffn Function
+
+\def\defun{\defparsebody\Edefun\defunx\defunheader}
+
+\def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
+\begingroup\defname {#1}{Function}%
+\defunargs {#2}\endgroup %
+}
+
+% @defmac == @deffn Macro
+
+\def\defmac{\defparsebody\Edefmac\defmacx\defmacheader}
+
+\def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
+\begingroup\defname {#1}{Macro}%
+\defunargs {#2}\endgroup %
+}
+
+% @defspec == @deffn Special Form
+
+\def\defspec{\defparsebody\Edefspec\defspecx\defspecheader}
+
+\def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
+\begingroup\defname {#1}{Special form}%
+\defunargs {#2}\endgroup %
+}
+
+% This definition is run if you use @defunx
+% anywhere other than immediately after a @defun or @defunx.
+
+\def\deffnx #1 {\errmessage{@deffnx in invalid context}}
+\def\defunx #1 {\errmessage{@defunx in invalid context}}
+\def\defmacx #1 {\errmessage{@defmacx in invalid context}}
+\def\defspecx #1 {\errmessage{@defspecx in invalid context}}
+
+% @defmethod, and so on
+
+% @defop {Funny Method} foo-class frobnicate argument
+
+\def\defop #1 {\def\defoptype{#1}%
+\defmethparsebody\Edefop\defopx\defopheader}
+
+\def\defopheader #1#2#3{\dosubind {fn}{\code{#2}}{on #1}% Make entry in function index
+\begingroup\defname {#2}{\defoptype{} on #1}%
+\defunargs {#3}\endgroup %
+}
+
+% @defmethod == @defop Method
+
+\def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}
+
+\def\defmethodheader #1#2#3{\dosubind {fn}{\code{#2}}{on #1}% entry in function index
+\begingroup\defname {#2}{Operation on #1}%
+\defunargs {#3}\endgroup %
+}
+
+% @defcv {Class Option} foo-class foo-flag
+
+\def\defcv #1 {\def\defcvtype{#1}%
+\defmethparsebody\Edefcv\defcvx\defcvheader}
+
+\def\defcvarheader #1#2#3{%
+\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
+\begingroup\defname {#2}{\defcvtype of #1}%
+\defvarargs {#3}\endgroup %
+}
+
+% @defivar == @defcv {Instance Variable}
+
+\def\defivar{\defmethparsebody\Edefivar\defivarx\defivarheader}
+
+\def\defivarheader #1#2#3{%
+\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
+\begingroup\defname {#2}{Instance variable of #1}%
+\defvarargs {#3}\endgroup %
+}
+
+% These definitions are run if you use @defmethodx, etc.,
+% anywhere other than immediately after a @defmethod, etc.
+
+\def\defopx #1 {\errmessage{@defopx in invalid context}}
+\def\defmethodx #1 {\errmessage{@defmethodx in invalid context}}
+\def\defcvx #1 {\errmessage{@defcvx in invalid context}}
+\def\defivarx #1 {\errmessage{@defivarx in invalid context}}
+
+% Now @defvar
+
+% First, define the processing that is wanted for arguments of @defvar.
+% This is actually simple: just print them in roman.
+% This must expand the args and terminate the paragraph they make up
+\def\defvarargs #1{\normalparens #1%
+\interlinepenalty=10000
+\endgraf\vskip -\parskip \penalty 10000}
+
+% @defvr Counter foo-count
+
+\def\defvr{\defmethparsebody\Edefvr\defvrx\defvrheader}
+
+\def\defvrheader #1#2#3{\doind {vr}{\code{#2}}%
+\begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup}
+
+% @defvar == @defvr Variable
+
+\def\defvar{\defparsebody\Edefvar\defvarx\defvarheader}
+
+\def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
+\begingroup\defname {#1}{Variable}%
+\defvarargs {#2}\endgroup %
+}
+
+% @defopt == @defvr {User Option}
+
+\def\defopt{\defparsebody\Edefopt\defoptx\defoptheader}
+
+\def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
+\begingroup\defname {#1}{User Option}%
+\defvarargs {#2}\endgroup %
+}
+
+% This definition is run if you use @defvarx
+% anywhere other than immediately after a @defvar or @defvarx.
+
+\def\defvrx #1 {\errmessage{@defvrx in invalid context}}
+\def\defvarx #1 {\errmessage{@defvarx in invalid context}}
+\def\defoptx #1 {\errmessage{@defoptx in invalid context}}
+
+% Now define @deftp
+% Args are printed in bold, a slight difference from @defvar.
+
+\def\deftpargs #1{\bf \defvarargs{#1}}
+
+% @deftp Class window height width ...
+
+\def\deftp{\defmethparsebody\Edeftp\deftpx\deftpheader}
+
+\def\deftpheader #1#2#3{\doind {tp}{\code{#2}}%
+\begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup}
+
+% This definition is run if you use @deftpx, etc
+% anywhere other than immediately after a @deftp, etc.
+
+\def\deftpx #1 {\errmessage{@deftpx in invalid context}}
+
+\message{cross reference,}
+% Define cross-reference macros
+\newwrite \auxfile
+
+% \setref{foo} defines a cross-reference point named foo.
+
+\def\setref#1{%
+\dosetq{#1-pg}{Ypagenumber}%
+\dosetq{#1-snt}{Ysectionnumberandtype}}
+
+\def\unnumbsetref#1{%
+\dosetq{#1-pg}{Ypagenumber}%
+\dosetq{#1-snt}{Ynothing}}
+
+% \xref and \pxref generate cross references to specified points.
+
+\def\pxref #1{see \xrefX [#1,,,,,,,]}
+\def\xref #1{See \xrefX [#1,,,,,,,]}
+\def\xrefX [#1,#2,#3,#4,#5,#6]{%
+\setbox1=\hbox{\i{\losespace#5{}}}%
+\setbox0=\hbox{\losespace#3{}}%
+\ifdim \wd0 =0pt \setbox0=\hbox{\losespace#1{}}\fi%
+\ifdim \wd1 >0pt%
+section \unhbox0{} in \unhbox1%
+\else%
+\refx{#1-snt} [\unhbox0], page\tie \refx{#1-pg}%
+\fi }
+
+% \dosetq is the interface for calls from other macros
+
+\def\dosetq #1#2{{\let\folio=0%
+\edef\next{\write\auxfile{\internalsetq {#1}{#2}}}%
+\next}}
+
+% \internalsetq {foo}{page} expands into CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
+% When the aux file is read, ' is the escape character
+
+\def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}}
+
+% Things to be expanded by \internalsetq
+
+\def\Ypagenumber{\folio}
+
+\def\Ynothing{}
+
+\def\Ysectionnumberandtype{%
+\ifnum\secno=0 chapter\xreftie\the\chapno %
+\else \ifnum \subsecno=0 section\xreftie\the\chapno.\the\secno %
+\else \ifnum \subsubsecno=0 %
+section\xreftie\the\chapno.\the\secno.\the\subsecno %
+\else %
+section\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno %
+\fi \fi \fi }
+
+\gdef\xreftie{'tie}
+
+% Define @refx to reference a specific cross-reference string.
+
+\def\refx#1{%
+{%
+\expandafter\ifx\csname X#1\endcsname\relax
+% If not defined, say something at least.
+\expandafter\gdef\csname X#1\endcsname {$<$undefined$>$}%
+\message {WARNING: Cross-reference "#1" used but not yet defined}%
+\message {}%
+\fi %
+\csname X#1\endcsname %It's defined, so just use it.
+}}
+
+% Read the last existing aux file, if any. No error if none exists.
+
+% This is the macro invoked by entries in the aux file.
+\def\xrdef #1#2{
+{\catcode`\'=\other\expandafter \gdef \csname X#1\endcsname {#2}}}
+
+{
+\catcode `\^^@=\other
+\catcode `\=\other
+\catcode `\=\other
+\catcode `\^^C=\other
+\catcode `\^^D=\other
+\catcode `\^^E=\other
+\catcode `\^^F=\other
+\catcode `\^^G=\other
+\catcode `\^^H=\other
+\catcode `\=\other
+\catcode `\^^L=\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
+\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
+\catcode`\|=\other
+\catcode`\<=\other
+\catcode`\>=\other
+\catcode `\$=\other
+\catcode `\#=\other
+\catcode `\&=\other
+
+% the aux file uses ' as the escape.
+% Turn off \ as an escape so we do not lose on
+% entries which were dumped with control sequences in their names.
+% For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
+% Reference to such entries still does not work the way one would wish,
+% but at least they do not bomb out when the aux file is read in.
+
+\catcode `\{=1 \catcode `\}=2
+\catcode `\%=\other
+\catcode `\'=0
+\catcode `\\=\other
+
+'openin 1 'jobname.aux
+'ifeof 1 'else 'closein 1 'input 'jobname.aux
+'fi
+}
+
+% Open the new aux file. Tex will close it automatically at exit.
+
+\openout \auxfile=\jobname.aux
+
+% Footnotes.
+
+\newcount \footnoteno
+
+\def\supereject{\par\penalty -20000\footnoteno =0 }
+
+\let\ptexfootnote=\footnote
+
+{\catcode `\@=11
+\gdef\footnote{\global\advance \footnoteno by \@ne
+\edef\thisfootno{$^{\the\footnoteno}$}%
+\let\@sf\empty
+\ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
+\thisfootno\@sf\parsearg\footnotezzz}
+
+\gdef\footnotezzz #1{\insert\footins{
+\interlinepenalty\interfootnotelinepenalty
+\splittopskip\ht\strutbox % top baseline for broken footnotes
+\splitmaxdepth\dp\strutbox \floatingpenalty\@MM
+\leftskip\z at skip \rightskip\z at skip \spaceskip\z at skip \xspaceskip\z at skip
+\footstrut\hang\textindent{\thisfootno}#1\strut}}
+
+}%end \catcode `\@=11
+
+% End of control word definitions.
+
+\message{and turning on texinfo input format.}
+
+\newindex{cp}
+\newcodeindex{fn}
+\newcodeindex{vr}
+\newcodeindex{tp}
+\newcodeindex{ky}
+\newcodeindex{pg}
+
+% Set some numeric style parameters, for 8.5 x 11 format.
+
+\hsize = 6.5in
+\parindent 15pt
+\parskip 18pt plus 1pt
+\baselineskip 15pt
+\advance\topskip by 1.2cm
+
+% Prevent underfull vbox error messages.
+\vbadness=10000
+
+% Use @smallbook to reset parameters for 7x9.5 format
+\def\smallbook{
+\global\lispnarrowing = 0.3in
+\global\baselineskip 12pt
+\global\parskip 3pt plus 1pt
+\global\hsize = 5in
+\global\doublecolumnhsize=2.4in \global\doublecolumnvsize=15.0in
+\global\vsize=7.5in
+\global\tolerance=700
+\global\hfuzz=1pt
+
+\global\pagewidth=\hsize
+\global\pageheight=\vsize
+\global\font\ninett=cmtt9
+
+\global\let\smalllisp=\smalllispx
+\global\let\smallexample=\smalllispx
+\global\def\Esmallexample{\Esmalllisp}
+}
+
+%% 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}
+
+% Turn off all special characters except @
+% (and those which the user can use as if they were ordinary)
+% Define certain chars to be always in tt font.
+
+\catcode`\"=\active
+\def\activedoublequote{{\tt \char '042}}
+\let"=\activedoublequote
+\catcode`\~=\active
+\def~{{\tt \char '176}}
+\chardef\hat=`\^
+\catcode`\^=\active
+\def^{{\tt \hat}}
+\catcode`\_=\active
+\def_{{\tt \char '137}}
+\catcode`\|=\active
+\def|{{\tt \char '174}}
+\chardef \less=`\<
+\catcode`\<=\active
+\def<{{\tt \less}}
+\chardef \gtr=`\>
+\catcode`\>=\active
+\def>{{\tt \gtr}}
+
+\catcode`\@=0
+
+% \rawbackslashxx output one backslash character in current font
+{\catcode`\\=\other
+ at gdef@rawbackslashxx{\}}
+
+% \rawbackslash redefines \ as input to do \rawbackslashxx.
+{\catcode`\\=\active
+ at gdef@rawbackslash{@let\=@rawbackslashxx }}
+
+% \normalbackslash outputs one backslash in fixed width font.
+\def\normalbackslash{{\tt\rawbackslashxx}}
+
+% Say @foo, not \foo, in error messages.
+\escapechar=`\@
+
+%% These look ok in all fonts, so just make them not special. The @rm below
+%% makes sure that the current font starts out as the newly loaded cmr10
+\catcode`\$=\other \catcode`\%=\other \catcode`\&=\other \catcode`\#=\other
+
+\catcode 17=0 @c Define control-q
+\catcode`\\=\active
+ at let\=@normalbackslash
+
+ at textfonts
+ at rm
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/et/vfprintf.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/et/vfprintf.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/et/vfprintf.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 */
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,4 @@
+Makefile
+ext2_err.et
+ext2_err.h
+ext2_err.c
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2434 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-03-07 Theodore Tso <tytso at mit.edu>
+
+ * ext2fs.h (ext2fs_inode_io_intern): Add missing function prototype.
+
+ * bmap.c, fileio.c, inode_io.c, tst_badblocks.c,
+ tst_byteswap.c: Fix gcc -Wall complaints
+
+ * Makefile.in (check): Use LD_LIBRARY_PATH to run test programs.
+ (From Philipp Thomas <pthomas at suse.de>)
+
+2002-02-25 Theodore Tso <tytso at mit.edu>
+
+ * ext2_fs.h: Add structure definitions for the directory indexing
+ extension.
+
+2002-02-23 Theodore Tso <tytso at mit.edu>
+
+ * unix_io.c (unix_open): Fix 2.4 resource limit workaround so that
+ it doesn't break things on mis32, sparc32, and alpha
+ platforms.
+
+2002-02-21 Theodore Tso <tytso at mit.edu>
+
+ * ismounted.c (is_swap_device): Fix file descriptor/memory leak;
+ we were missing an fclose().
+
+2002-02-20 Theodore Tso <tytso at mit.edu>
+
+ * Makefile.in, inode_io.c, ext2fs.h, ext2_err.et.in: Add new io
+ abstraction interface which exports an ext2 inode.
+
+ * ext2fs.h, fileio.c (ext2fs_file_flush): Export ext2fs_file_flush
+ as a public interface. Change void * to const void * in
+ ext2fs_file_write's interface.
+
+ * test_io.c (test_close), unix_io.c (unix_close): Remove unneeded
+ conditional; save a few bytes.
+
+2002-02-12 Theodore Tso <tytso at mit.edu>
+
+ * Makefile.in (tst_badblocks): Add some extra .o files when
+ linking the debugging program tst_badblocks which are
+ needed if we aren't compiling with inline functions enable.
+
+ * kernel-list.h (__inline__): On non-gcc and non-Watcom compilers,
+ define away __inline__ since it may not be supported.
+
+ * kernel-jbd.h (jbd_debug): For systems that don't do STDC, use a
+ stripped down jbd_debug that doesn't use variadic
+ arguments. This will cause warnings under AIX, but things
+ should still build.
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2002-02-03 Theodore Tso <tytso at mit.edu>
+
+ * mkdir.c (ext2fs_mkdir): Change to use ext2fs_inode_alloc_stats2
+ so that the number of directories in use is adjusted
+ appropriately.
+
+ * alloc_stats.c (ext2fs_inode_alloc_stats2): Add new function
+ which optionally will modify the number of directories
+ count.
+
+2002-01-03 Theodore Tso <tytso at mit.edu>
+
+ * dir_iterate.c (ext2fs_dir_iterate2, ext2fs_process_dir_block):
+ Add support for a new flag, DIRENT_FLAG_INCLUDE_REMOVED,
+ which will return deleted directory entries.
+ ext2fs_dir_iterate2 takes a new callback function which
+ is identical with the one used by
+ ext2fs_dblist_dir_iterate(). If the directory entry is
+ deleted, the callback function will be called with the
+ entry paraemter set to DIRENT_DELETED_FILE.
+
+ * Makefile.in, alloc_stats.c (ext2fs_inode_alloc_stats,
+ ext2fs_block_alloc_stats): New functions which update
+ block/inode allocation statistics in the bitmaps, block
+ group descriptors, and superblock.
+
+ * mkjournal.c (mkjournal_proc), mkdir.c (ext2fs_mkdir),
+ expanddir.c (expand_dir_proc), bb_inode.c
+ (clear_bad_block_proc, set_bad_block_proc,
+ ext2fs_update_bb_inode), alloc.c (ext2fs_alloc_block):
+ Update to use new block/inode allocation statistics.
+
+2001-12-24 Theodore Tso <tytso at mit.edu>
+
+ * ismounted.c (is_swap_device): New function used by
+ ext2fs_check_if_mounted and ext2fs_check_mount_point which
+ determines whether or not the specified device is a swap
+ device by using /proc/swaps. More bulletproofing for
+ idiotic/careless system administrators!
+
+ * ext2fs.h, openfs.c (ext2fs_open), initialize.c
+ (ext2fs_initialize), mkdir.c (ext2fs_mkdir): Add a new
+ field to struct_ext2_filsys, umask. This field is
+ initialize to 022, and affects ext2fs_mkdir in the obvious
+ way. (In the future umask should also affect new file
+ creation routines, but the fileio functions don't
+ currently support this yes.)
+
+ * ismounted.c (check_mntent_file): Stat all of the entries in
+ /etc/mtab and/or /proc/mounts in order to catch dim-witted
+ system administrators who might have created alias
+ devices.
+
+2001-12-23 Theodore Tso <tytso at mit.edu>
+
+ * Makefile.in, jfs_user.h: Move linux/jbd.h to
+ ext2fs/kernel-jbd.h, to avoid using the system header
+ file version of hbd.h when using diet glibc (since it
+ forcibly adds /usr/include to the beginning of the
+ include search path.)
+
+ * kernel-jbd.h, kernel-list.h, jfs_compat.h: Move files from
+ include/linux directory.
+
+2001-12-16 Theodore Tso <tytso at mit.edu>
+
+ * bitops.h (ext2fs_mark_generic_bitmap, ext2fs_unmark_generic_bitmap),
+ ext_attr.c (ext2fs_read_ext_attr, ext2fs_write_ext_attr),
+ fileio.c (ext2fs_file_write): Fix gcc -Wall nits
+
+ * Makefile.in, jfs_user.h: linux/jfs.h has been renamed to
+ linux/jbd.h
+
+2001-12-03 Theodore Tso <tytso at mit.edu>
+
+ * unix_io.c (unix_open): Make sure the ulimit workaround works
+ regardless of the version of glibc which is used to
+ compild e2fsprogs.
+
+2001-11-26 Theodore Tso <tytso at mit.edu>
+
+ * unix_io.c (unix_open): Work around a bug in 2.4.10+ kernels by
+ trying to unset the filesize limit if at all possible,
+ if a block device is getting opened. (The filesize limit
+ shouldn't be applied against writes to a block device, but
+ starting in 2.4.10, the kernel is doing this.)
+
+2001-11-05 Theodore Tso <tytso at mit.edu>
+
+ * mkjournal.c (ext2fs_add_journal_inode): When creating a .journal
+ file on adding a journal to an already-mounted filesystem,
+ try to clear the ext2 file attributes on an already
+ existing .journal file so that we don't fail if on a
+ partially added journal to the filesystem.
+
+ * ext2_fs.h: Define a new ext2 file attribute, EXT2_NOTAIL_FL,
+ which signals that a particular inode should not have the
+ last bits of data (the "tail") be merged with another
+ file. This is necessary to keep LILO happy.
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-16 Theodore Tso <tytso at mit.edu>
+
+ * ext2_ext_attr.h: Remove unneeded #include of <linux/config.h>
+ which was breaking the build on the Hurd. (Addresses
+ Debian bug #112414).
+
+2001-09-13 Theodore Ts'o <tytso at mit.edu>
+
+ * ismounted.c (check_mntent_file): We now validate the entry in
+ /etc/mtab to make sure the filesystem is really mounted,
+ since some broken distributions (read: Slackware) have
+ buggy boot scripts that 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.)
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-30 Theodore Tso <tytso at valinux.com>
+
+ * getsize.c (ext2fs_get_device_size): Back out BLKGETSIZE64
+ changes, since the ioctl number has been reused by another
+ unofficial patch.
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-08-05 Theodore Tso <tytso at valinux.com>
+
+ * alloc.c (ext2fs_new_inode, ext2fs_new_block): Use the fast
+ version of the bitmap test routines to speed up these
+ routines. (At some point I may want to make these
+ routines use the find_first_bit functions, but that will
+ add a lot of complexity since it means that these
+ functions will have to break the bitmap abstraction
+ boundary. It's not clear it's worth it.)
+
+ * mkjournal.c (mkjournal_proc): Remember the last block allocated
+ to speed up ext2fs_new_block().
+
+2001-07-29 Theodore Tso <tytso at valinux.com>
+
+ * finddev.c (scan_dir): Fix memory leak; we weren't calling
+ closedir() when exiting the function in all cases.
+
+2001-07-27 Theodore Tso <tytso at valinux.com>
+
+ * mkjournal.c (ext2fs_create_journal_superblock): Set the first
+ block usable in the journal for external journals to be 2
+ or 3, depending on the blocksize, so that the existing
+ kernel code does the right thing.
+
+ * getsize.c (ext2fs_get_device_size): Add support for the
+ BLKGETSIZE64 ioctl. (Ioctl defined by unofficial patches
+ from Ben LaHaise, but it's likely this interface won't
+ change.)
+
+ * mkjournal.c (ext2fs_add_journal_device): Use the correct block
+ when writing the journal superblock, too. (Oops! Needed
+ to make 1k filesystems with external journal to work.)
+
+2001-07-26 Theodore Tso <tytso at valinux.com>
+
+ * mkjournal.c (ext2fs_add_journal_device): Use the correct block
+ to find the journal superblock if the blocksize is 1024.
+
+2001-07-21 Theodore Tso <tytso at valinux.com>
+
+ * ext2_err.et.in (EXT2_ET_LOAD_EXT_JOURNAL): Add new error code
+
+2001-07-20 Theodore Tso <tytso at valinux.com>
+
+ * ext_attr.c (ext2fs_write_ext_attr): When writing the extended
+ attribute block, set the filesystem changed bit.
+
+ * bitops.h (ext2fs_find_first_bit_set, ext2fs_find_next_bit_set):
+ Comment out these functions since we're not using them.
+
+2001-07-10 Theodore Tso <tytso at valinux.com>
+
+ * closefs.c (write_primary_superblock): After writing changes to
+ the primary superblock, update the original superblock
+ copy so we don't have to re-write those changes in the
+ future.
+ (ext2fs_flush): Clear the superblock dirty flag after
+ we've flushed out changes to disk.
+
+2001-07-07 Theodore Tso <tytso at valinux.com>
+
+ * bitops.h (ext2fs_find_first_bit_set): Use %esi instead of %ebx
+ to avoid register conflicts when compiling in PIC mode.
+
+2001-07-04 Theodore Tso <tytso at valinux.com>
+
+ * bitops.h (ext2fs_find_first_bit_set, ext2fs_find_next_bit_set):
+ Add new functions (C and in i386 assembler) which quickly
+ find bits set in a bitmask.
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in, ext_attr.c, ext2_attr.c, ext2fs.h: Add new files
+ ext2_ext_attr.h and ext_attr.c for extended attributes
+ support.
+
+ * Release of E2fsprogs 1.22
+
+2001-06-22 Theodore Tso <tytso at valinux.com>
+
+ * mkjournal.c (ext2fs_add_journal_inode): Move close of file
+ descriptor so that adding a journal to a mounted
+ filesystem doesn't die. (Fixes a bug accidentally
+ introduced in e2fsprogs 1.21.)
+
+ * mkjournal.c (ext2fs_add_journal_inode): Only use fchflags if
+ HAVE_CHFLAGS and UF_NODUMP are defined, since the Hurd has
+ fchflags without defining UF_NODUMP. (Addresses Debian
+ bug #101361)
+
+ * flushb.c: Use platform independent method of defining the
+ BLKFLSBUF and FDFLUSH ioctl's. Also include sys/mount.h
+ since on newer glibc's BLKFLSBUF is defined there.
+
+ * bitops.h: The C language versions of ext2fs_swab16/32 need to be
+ included if EXT2FS_ENABLE_SWAPFS is defined, since we need
+ to support byte swapping even if we don't support the
+ conversion functions. (Fixes Debian bug #101686).
+
+ * dirblock.c (ext2fs_read_dir_block): Remove use of dir_entry_2
+ since the byte-swapping code all assumes the
+ ext2_dir_entry structure. (It's a question of whether or
+ not name_len should be byte-swapped or not, and whether
+ it's a 16 bit or 8 bit field.)
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in: Fix bug in installation of ext2_types.h. It is a
+ file which is generated and is therefore found in the
+ build directory, not source directory.
+
+ * ismounted.c (check_mntent_file): Use a test file in / to check
+ to see if the root filesystem is mounted read-only. This
+ protects against the case where /etc might not be on /, as
+ well as the case where /etc/mtab doesn't exist. (Both are
+ should-never happen scenarios, but you never know...)
+
+2001-06-14 Theodore Tso <tytso at valinux.com>
+
+ * ismounted.c (ext2fs_check_if_mounted): Fix grammer in comment.
+ Remove unneeded #pragma argsused, since the arguments are
+ always used.
+
+2001-06-13 Theodore Tso <tytso at valinux.com>
+
+ * ext2_types.h.in: If linux/types.h has been defined, then don't
+ try to redefine the typedefs.
+
+ * Makefile.in (HFILES): Add ext2_types.h to the list of files
+ which should be installed.
+
+ * ismounted.c (check_mntent_file): Work around GNU hurd brain
+ damage. Addresses Debian bug #100304.
+
+ * Makefile.in: Limit some .o files from being included into the
+ library if --disable-debugfs, --disable-swapfs,
+ --disable-imager, or --disable-resizer are used.
+
+2001-06-12 Theodore Tso <tytso at valinux.com>
+
+ * inode.c, tst_iscan.c: Stop using the compatibility badblocks
+ function, and use the ext2fs_badblocks_* functions
+ instead.
+
+2001-06-11 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in, gen_bitmap.c, bitops.h: Move inline functions
+ ext2fs_mark_generic_bitmap and
+ ext2fs_unmark_generic_bitmap to gen_bitmap.c as normal
+ functions. (This saves space and doesn't significantly
+ change the speed of e2fsck on a P-III.)
+
+ * ext2fs.h, bitops.h, block.c, bmap.c, closefs.c, dirblock.c,
+ inode.c, native.c, openfs.c, rw_bitmaps.c, swapfs.c: Only
+ include the byte-swapping logic if ENABLE_SWAPFS is turned
+ on or if we're on a big-endian machine.
+
+ * initialize.c (ext2fs_initialize):Use WORDS_BIGENDIAN directly to
+ set EXT2_FLAG_SWAP_BYTES, instead of using
+ ext2fs_native_flag.
+
+ * native.c (ext2fs_native_flag): Use WORDS_BIGENDIAN provided by
+ autoconf to determine whether or not return
+ EXT2_FLAG_SWAP_BYTES.
+
+2001-06-10 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in: Remove the dependence on the libe2p library.
+
+ * mkjournal.c (ext2fs_add_journal_inode): Replace use of fsetflags
+ with direct usage of the ioctl/fchflags so that we don't
+ have to depend on the libe2p library.
+
+2001-06-08 Theodore Tso <tytso at valinux.com>
+
+ * ext2_types.h.in: Use unsigned ints in favor of unsigned longs
+ when trying to find a 32-bit wide type.
+
+ * icount.c (insert_icount_el): Fix the code used to estimate the
+ size of the new icount array to be more intelligent, to
+ avoid reallocating the array too many times. Thanks to
+ Enrique Perez-Terron for pointing this out.
+
+2001-06-02 Theodore Tso <tytso at valinux.com>
+
+ * valid_blk.c (ext2fs_inode_has_valid_blocks): Only check i_blocks
+ for a symlink to determine whether it is a fast symlink.
+
+2001-06-01 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in, dosio.c, ext2_fs.h, ext2_types.h.in, ext2fs.h:
+ Move include/asm/types.h.in to lib/ext2fs/ext2_types.h.in.
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * ismounted.c: More cleanups for ismounted.c, some from Andreas,
+ some to clean up Andreas's patches. Use strncpy instead
+ of strcpy to save the root's mountpoint. Clean up #ifdef
+ structure. Remove uneeded variable in testing/debug driver.
+
+2001-05-24 Andreas Dilger <adilger at turbolinux.com>
+
+ * ismounted.c: Add check for root device which doesn't depend on
+ /etc/fstab or /proc/mounts to be correct. Don't call
+ endmntent() before we are done with mnt struct.
+
+2001-05-23 Theodore Tso <tytso at valinux.com>
+
+ * ext2_err.et.in (EXT2_ET_JOURNAL_UNSUPP_VERSION): Added new error
+ code.
+
+2001-05-21 Theodore Tso <tytso at valinux.com>
+
+ * ext2_fs.h: Change assignment of EXT2_FEATURE_COMPAT_DIR_INDEX to
+ make room for pre-existing usage of
+ EXT2_FEATURE_COMPAT_EXT_ATTR. Add flag EXT2_INDEX_FL with
+ the same codepoint as EXT2_BTREE_FL.
+
+2001-05-20 Theodore Tso <tytso at valinux.com>
+
+ * ext2fs.h: #include <> instead of "" for ext2fs and et header
+ files, since they will be installed in /usr/include
+
+2001-05-14 Theodore Tso <tytso at valinux.com>
+
+ * alloc.c, alloc_tables.c, badblocks.c, bb_compat.c, bb_inode.c,
+ bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
+ check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c,
+ dblist_dir.c, dir_iterate.c, dirblock.c, dupfs.c,
+ expanddir.c, ext2_fs.h, fileio.c, finddev.c, flushb.c,
+ freefs.c, get_pathname.c, getsize.c, icount.c, imager.c,
+ initialize.c, inline.c, inode.c, irel_ma.c, ismounted.c,
+ link.c, lookup.c, mkdir.c, mkjournal.c, namei.c, native.c,
+ newdir.c, nt_io.c, openfs.c, read_bb.c, read_bb_file.c,
+ rs_bitmap.c, rw_bitmaps.c, swapfs.c, test_io.c,
+ tst_badblocks.c, tst_byteswap.c, tst_getsize.c,
+ tst_iscan.c, unix_io.c, unlink.c, valid_blk.c, version.c,
+ write_bb_file.c, ext2_fs.h: Moved file from include/linux.
+ Adjust all files in this directroy to include this file.
+
+ * mkjournal.c (ext2fs_create_journal_superblock): Remove redundant
+ code.
+
+2001-05-05 Theodore Tso <tytso at valinux.com>
+
+ * fileio.c (ext2fs_file_read): Factored out common code and
+ cleaned up function. Fixed a bug where if there was an
+ error reading from the disk, the number of bytes read
+ wasn't reliably set. (Fixes Debian bug #79163)
+ (ext2fs_file_write): Factored out common code and made
+ function more efficient; if writing a full block, don't
+ bother to do a read-modify-write cycle.
+
+2001-05-04 Theodore Tso <tytso at valinux.com>
+
+ * dirblock.c (ext2fs_read_dir_block): Check for an directory
+ record length which isn't a multiple four, and treat that
+ as an invalid. Scan the directory and return an error
+ (EXT2_ET_DIR_CORRUPTED) if the directory records are
+ corrupted.
+ (ext2fs_write_dir_block): If while byte-swapping the
+ directory block, if there's an error, abort and return
+ EXT2_ET_DIR_CORRUPTED.
+
+2001-05-02 Theodore Tso <tytso at valinux.com>
+
+ * ext2fs.h (EXT2_FLAG_IMAGE_FILE): Add new flag, and add
+ image_header field in the ext2_filsys structure
+
+ * block.c (block_iterate_ind, block_iterate_dind, block_iterate_tind):
+ * inode.c (ext2fs_read_inode):
+ * rw_bitmaps.c (read_bitmaps):
+ * openfs.c (ext2fs_open): Add support for EXT2_FLAG_IMAGE_FILE
+
+ * imager.c (ext2fs_image_bitmap_read): Fix bug in imager to make
+ sure the full bitmap is saved.
+
+2001-05-01 Theodore Tso <tytso at valinux.com>
+
+ * e2image.h (struct ext2_image_hdr): Add space for the device name
+ in the image header.
+
+ * dir_iterate.c (ext2fs_process_dir_block): Add a double-check to
+ make sure the rec_len is a multiple of 4, to prevent
+ bus-errors on architectures which care about mis-aligned
+ pointer references.
+
+2001-04-25 Theodore Tso <tytso at valinux.com>
+
+ * getsize.c (ext2fs_get_device_size): Use an unsigned long to
+ query the device sizes using the BLKGETSIZE ioctl.
+
+2001-04-16 Theodore Tso <tytso at valinux.com>
+
+ * ismounted.c (check_mntent): Check /proc/mounts on Linux systems
+ before checking /etc/mtab. The EXT2_MF_READONLY flag is
+ now set from the /etc/mtab options field for all
+ filesystems, not just the root filesystem. Add debugging
+ code to make it easier to test ext2fs_check_if_mounted().
+
+ * mkjournal.c (ext2fs_create_journal_superblock): Add safety
+ check; return an error if there's an attempt to create a
+ journal less than 1024 filesystem blocks.
+
+ * ext2_err.et.in, mkjournal.c: Change EXT2_JOURNAL_NOT_BLOCK and
+ EXT2_NO_JOURNAL_SB to be EXT2_ET_*.
+
+2001-02-20 Theodore Tso <tytso at valinux.com>
+
+ * bitops.h (ext2fs_swab16, ext2fs_swab32): Add i386 assembly
+ inline functions.
+
+ * tst_byteswap.c: New function to test the byteswap functions.
+ Add to regression test suite.
+
+2001-02-08 Theodore Tso <tytso at valinux.com>
+
+ * e2image.h (struct ext2_image_hdr): Fix type for fs_hostname
+
+2001-02-07 Theodore Tso <tytso at valinux.com>
+
+ * mkjournal.c (ext2fs_create_journal_superblock): Fix the setting
+ of s_first for external devices to always be 1, since
+ jsb->s_first is always relative to the start of the
+ journal superblock. Use htonl(1) when setting s_nr_users.
+
+2001-01-17 Theodore Ts'o <tytso at valinux.com>
+
+ * mkjournal.c (ext2fs_add_journal_device): Fix bug where the
+ device number of the filesystem (instead of the journal)
+ was being dropped into s_journal_dev.
+
+2001-01-15 Theodore Ts'o <tytso at valinux.com>
+
+ * initialize.c (ext2fs_initialize): Add support for initializing
+ the ext2 superblock for external journal devices. This
+ basically means we don't bother to allocate any block
+ group descriptors.
+
+ * openfs.c (ext2fs_open): Only open external journal devices if
+ the new flag EXT2_FLAG_JOURNAL_DEV_OK is passed to
+ ext2fs_open. When opening such devices, don't try to read
+ the block group descriptors, since they're not there.
+
+ * ext2_err.et.in (EXT2_NO_JOURNAL_SB): Add new error code
+
+ * mkjournal.c: Export a new function,
+ ext2fs_create_journal_superblock(), which allocates and
+ returns a buffer containing a journal superblock. This is
+ needed by mke2fs to create an external journal. Rewrote
+ ext2fs_add_journal_device() so that it no longer creates
+ the external journal, but rather adds a filesystem to an
+ existing external journal. It handles all of the UUID
+ manipulation.
+
+ * ext2fs.h: List the EXT3_FEATURE_JOURNAL_DEV as a flag supported
+ by the library. Define the EXT2_FLAG_JOURNAL_DEV_OK.
+ Changed function prototype for ext2fs_add_journal_device().
+
+2001-01-14 Theodore Ts'o <tytso at valinux.com>
+
+ * closefs.c (ext2fs_flush): Don't write out anything beyond the
+ primary superblock if EXT2_INCOMPAT_JOURNAL_DEV is
+ listed.
+
+2001-01-12 Theodore Ts'o <tytso at valinux.com>
+
+ * imager.c: Fix gcc -Wall complaints and a series of bugs where
+ retval wasn't set correctly. (Thanks to Andreas Dilger
+ for pointing this out.)
+
+2001-01-11 <tytso at snap.thunk.org>
+
+ * flushb.c (ext2fs_sync_device): New function 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).
+
+2001-01-10 <tytso at snap.thunk.org>
+
+ * alloc.c, bb_inode.c, bitmaps.c, bitops.h, block.c, bmap.c,
+ bmove.c, brel.h, cmp_bitmaps.c, dblist.c, dblist_dir.c,
+ dir_iterate.c, expanddir.c, ext2fs.h, ext2fsP.h, fileio.c,
+ finddev.c, get_pathname.c, icount.c, inode.c, irel.h,
+ irel_ma.c, ismounted.c, link.c, lookup.c, mkdir.c,
+ mkjournal.c, namei.c, newdir.c, read_bb_file.c, test_io.c,
+ tst_iscan.c, unix_io.c, unlink.c: Change use of ino_t to
+ 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.
+
+2001-01-05 <tytso at snap.thunk.org>
+
+ * dirblock.c (ext2fs_read_dir_block): Fix a potential case where
+ we may overrun allocated memory in case of a corrupted
+ filesystem (or an e2fsck test case :-) when byte-swapping
+ the directory block.
+
+ * ext2fs.h: Indent the #warning to fix gcc -Wall complaint.
+
+ * mkjournal.c (ext2fs_add_journal_device): Fix various gcc -Wall
+ complaints including a missing return 0 at the end of
+ ext2fs_add_journal_device.
+
+2001-01-03 <tytso at snap.thunk.org>
+
+ * Makefile.in: Link in libe2p when creating libext2fs as a shared
+ library, since mkjournal.c now references fsetflags().
+
+ * mkjournal.c (ext2fs_add_journal_inode): Folded in Andreas
+ Dilger's changes (with fixups) to allow on-line creation
+ of a journal file.
+
+ * ext2fs.h, closefs.c (ext2fs_flush): Add new flag,
+ EXT2_FLAG_SUPER_ONLY, which the close routines to only
+ update the superblock, and not the group descriptors.
+
+2000-12-30 Andreas Dilger <adilger at turbolinux.com>
+
+ * ismounted.c: add ext2fs_check_mount_point() function, which will
+ optionally return the mount point of a device if mounted
+
+2000-12-14 Andreas Dilger <adilger at turbolinux.com>
+
+ * mkjournal.c: rename ext2fs_add_journal_fs() to the more descriptive
+ ext2fs_add_journal_inode()
+
+2001-01-01 <tytso at snap.thunk.org>
+
+ * ext2fs.h: Remove definition of ext2fs_sb. Note: this may break
+ source (but not binary) compatibility of some users of the
+ ext2 library. They should just simply do a global search
+ and replace of struct ext2fs_sb with struct
+ ext2_super_block, and use their own private copy of
+ ext2_fs.h if they aren't already.
+
+ * closefs.c, initialize.c, link.c, newdir.c, openfs.c, swapfs.c:
+ Replace use of ext2fs_sb with ext2_super_block.
+
+2000-12-31 <tytso at snap.thunk.org>
+
+ * ext2fs.h: Cleaned up header file by removing definitions of
+ feature flags that might not have been defined in older
+ ext2 header files. Now that we're using our own
+ include/linux/ext2fs.h header file, this can never happen.
+
+ * jfs_dat.h: Removed old header file which is no longer needed.
+
+2000-12-13 Theodore Ts'o <tytso at valinux.com>
+
+ * closefs.c (ext2fs_update_dynamic_rev): New function suggested
+ by Andreas Dilger to update the filesystem revision to
+ EXT2_DYNAMIC_REV.
+
+ * swapfs.c (ext2fs_swap_super): Add byte swapping for the journal
+ fields.
+
+2000-12-09 <tytso at snap.thunk.org>
+
+ * ext2fs.h, mkjournal.c (ext2fs_add_journal_inode,
+ ext2fs_add_journal_device): Add a new argument to the APIs
+ of these function, which is a flags word. This is used to
+ allow the creation of a V1 superblock for those folks who
+ are using ext3 0.3b in production. Note, the user-land
+ interface for getting at this flag won't be documented, as
+ the V1 superblock is deprecated.
+
+ * mkjournal.c (init_journal_superblock): Sync Stephen's changes
+ which creates a V2 superblock instead of a V1 superblock.
+
+2000-11-21 <tytso at snap.thunk.org>
+
+ * test_io.c (test_write_blk, test_write_byte): Fix typos pointed
+ out by Andreas Dilger.
+
+2000-11-05 <tytso at snap.thunk.org>
+
+ * imager.c (ext2fs_image_{inode,super,bitmap}_{read,write},
+ ext2_fs.h, Makefile.in: New file that has routines that
+ save ext2fs metadata to a file.
+
+ * ext2_err.et.in (EXT2_ET_MAGIC_E2IMAGE): New error code assigned.
+
+ * e2image.h: New file which defines the file format for the ext2
+ image file. (Saved copy of ext2 metadata to a file as a
+ saving throw against worst-case damage.)
+
+2000-11-01 <tytso at snap.thunk.org>
+
+ * inode.c (ext2fs_flush_icache): Add new function
+ ext2fs_flush_icache() which flushes the internal inode
+ cache. Applications which modify the inode table blocks
+ directly must call this function.
+
+2000-10-26 <tytso at snap.thunk.org>
+
+ * mkjournal.c: Add #include of netinet/in.h, since Solaris
+ requires it for ntohl().
+
+ * ext2_io.h (io_channel_write_byte): Add new interface to allow
+ callers to write specific byte ranges. This is an
+ optional interface, which not all IO channels may
+ implement.
+
+ * unix_io.c (unix_write_byte):
+ * test_io.c (test_write_byte): Add implementation of the
+ write_byte function.
+
+ * closefs.c (write_primary_superblock, ext2fs_flush): Add a new
+ function which writes the primary superblock. If the IO
+ channel supports writing raw bytes directly, only fields
+ which were modified are written to the disk. This makes
+ it safe(r) to use utilities like tune2fs on a mounted
+ filesystem.
+
+ * freefs.c (ext2fs_free): Free the original superblock if it is
+ available.
+
+ * openfs.c (ext2fs_open): Store a copy of the original superblock
+ when opening it.
+
+ * ext2fs.h: Add a field to store the original superblock in the
+ ext2 context structure.
+
+2000-10-24 <tytso at snap.thunk.org>
+
+ * llseek.c: Add #ifdef's for IA64 (it's a 64-bit platform, so we
+ don't need to use llseek).
+
+2000-10-24 <tytso at valinux.com>
+
+ * Makefile.in, ext2fs.h, jfs_dat.h, mkjournal.c: Add functions for
+ creating an ext3 journal on a filesystem.
+
+2000-08-21 <tytso at valinux.com>
+
+ * ext2_err.et.in (EXT2_JOURNAL_NOT_BLOCK): Add new error code.
+
+2000-08-22 <tytso at valinux.com>
+
+ * unix_io.c: Make massive changes to support a multiple block
+ writethrough cacheing.
+
+ * ext2_io.h: Added flags field to the io_channel structure.
+
+2000-08-19 <tytso at valinux.com>
+
+ * finddev.c, ext2fs.h, Makefile.in: Add new file, finddev.c, which
+ provides the function ext2fs_find_block_device(). This
+ function returns the pathname to a block device, given its
+ device number.
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+2000-07-07 Theodore Ts'o <tytso at valinux.com>
+
+ * ext2fs.h (EXT2_LIB_FEATURE_INCOMPAT_SUPP): Add
+ EXT3_FEATURE_INCOMPAT_RECOVER (aka needs_recovery) to the
+ list of filesystem flags supported by the library.
+
+2000-07-04 Theodore Ts'o <tytso at valinux.com>
+
+ * ext2fs.h: Update to include latest journalling additions to the
+ superblock.
+
+ * dll/jump.funcs: Add new jumptable entries for
+ ext2fs_write_bb_FILE, ext2fs_read_bb_FILE2, and
+ ext2fs_badblocks_equal.
+
+ * tst_badblocks.c: Update test program to test
+ ext2fs_read_bb_FILE2 and ext2fs_write_FILE.
+
+ * write_bb_file.c (ext2fs_write_bb_FILE): New function which
+ writes out bad blocks list to a file.
+
+ * read_bb_file.c (ext2fs_read_bb_FILE2): Add new function which
+ changes the callback function to take two additional
+ arguments; a private blind pointer supplied by the caller,
+ and pointer to a char * containing a pointer to the
+ invalid string.
+
+ * badblocks.c (ext2fs_badblocks_equal): Add new function which
+ returns true if two badblocks list are equal.
+
+ * Makefile.in: Remove explicit link of -lc in the shared library.
+ (It shouldn't be necessary, and is harmful in some cases).
+
+2000-06-10 Theodore Ts'o <tytso at valinux.com>
+
+ * getsize.c (main): Add debugging code under #ifdef DEBUG
+
+2000-05-27 Theodore Ts'o <tytso at valinux.com>
+
+ * mkdir.c (ext2fs_mkdir): Read the parent directory's inode
+ earlier, so that if there's an error reading it, we can
+ more cleanly back out of the operation.
+
+2000-05-25 <tytso at snap.thunk.org>
+
+ * getsize.c (ext2fs_get_device_size): Use open64() instead of
+ open() if it exists. Under linux, manually define the
+ ioctl for BLKGETSIZE if it isn't already defined and it's
+ safe to do so.
+
+ * unix_io.c (unix_open): Use open64() instead of open() if it
+ exists.
+
+ * llseek.c: Simplify header includes of unistd.h. If lseek64 is
+ available (and prototypes are defined) use it in
+ preference to llseek.
+
+ * Makefile: Add hack dependency rule so that parallel makes work
+ correctly.
+
+2000-05-18 Theodore Ts'o <tytso at valinux.com>
+
+ * ext2fs.h: Add appropriate ifdef's to support C++ compilation.
+
+2000-04-03 Theodore Ts'o <tytso at valinux.com>
+
+ * block.c: Readibility tweak in conditionals involving
+ ctx->fs->flags.
+
+ * ext2fs.h: Use AUTOCONF SIZEOF_* macros if available to determine
+ how to define __s64 and __u64. Turn off "compression is
+ experimental" warning if the cpp macro
+ I_KNOW_THAT_COMPRESSION_IS_EXPERIMENTAL is defined.
+
+2000-02-11 <tytso at snap.thunk.org>
+
+ * ext2fs.h: Define EXT2FS_COMPRESSED_BLKADDR and HOLE_BLKADDR.
+ Conditionally include Compression as a supported type if
+ ENABLE_COMPRESSION (via --enable-compression) is turned on.
+
+ * swapfs.c (ext2fs_swap_super): Swap the compression usage bitmap.
+
+2000-02-08 <tytso at snap.thunk.org>
+
+ * bitops.h (ext2fs_mark_generic_bitmap, ext2fs_unmark_generic_bitmap,
+ ext2fs_mark_block_bitmap, ext2fs_unmark_block_bitmap,
+ ext2fs_mark_inode_bitmap, ext2fs_unmark_inode_bitmap):
+ Change to return the previous state of the bit that is
+ being marked or unmarked. For speed optimization.
+
+2000-02-02 Theodore Ts'o <tytso at valinux.com>
+
+ * getsize.c, ismounted.c: Remove unneeded include of linux/fs.h
+
+ * swapfs.c: Remove #ifdef HAVE_EXT2_INODE_VERSION since it's not
+ needed any more; we know it will always be i_generation.
+ Add support for swapping the high bits of the uid and gid.
+
+1999-11-19 <tytso at valinux.com>
+
+ * mkdir.c (ext2fs_mkdir): Only update the parent's inode link
+ counts if the link was successful. Patch suggested by
+ jeremy at goop.org.
+
+ * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
+ the source directory.
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-11-08 <tytso at valinux.com>
+
+ * Makefile.in (tst_badblocks): Add freefs.o to the object list,
+ since ext2fs_badblocks_list_free was moved to freefs.c.
+
+ * tst_badblocks.c: Use the newer badblocks API names. Add
+ duplicate blocks to the test inputs to test dealing with
+ adding blocks which are already in the badblocks list.
+
+ * badblocks.c (ext2fs_badblocks_list_add): If appending to the end
+ of the list, use a shortcut O(1) operations instead of an
+ O(n) operation. (Idea suggested by David Beattie.)
+
+ * freefs.c (ext2fs_free): Use ext2fs_badblocks_list_free() instead
+ of badblocks_list_free(), to save a procedure call.
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-26 <tytso at valinux.com>
+
+ * ext2fs.h: Add kludge to deal with the fact that egcs cpp doesn't
+ seem to handle ~0UL the same way as they used to.
+
+1999-10-25 <tytso at valinux.com>
+
+ * nt_io.c (_OpenNtName): Open the device using
+ FILE_SYNCHRONOUS_IO_NONALERT instead of
+ FILE_SYNCHRONOUS_IO_ALERT
+ (nt_open): At the end of the device open routine, unlock
+ the drive but do not dismount it.
+
+ * initialize.c (CREATOR_OS): Use __GNU__ instead of __gnu__ to
+ detect the Hurd OS.
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-10-22 <tytso at valinux.com>
+
+ * mkdir.c (ext2fs_mkdir): Pass EXT2_FT_DIR flag to ext2fs_link().
+
+ * link.c (ext2fs_link): This call now uses the low three bits of
+ the flags parameter to pass the directory filetype
+ information; it will set the directory entry FILETYPE
+ information if the filesystem supports it.
+
+ * newdir.c (ext2fs_new_dir_block): If the FILETYPE superblock
+ option is set, then create the '.' and '..' entries with
+ the filetype set to EXT2_FT_DIR.
+
+1999-09-24 <tytso at valinux.com>
+
+ * nt_io.c: New file which supports I/O under Windows NT.
+
+1999-09-07 <tytso at valinux.com>
+
+ * ext2fs.h: Add new fields for journalling and define new
+ feature bits used by newer filesystems: IMAGIC_INODES,
+ HAS_JOURNAL, RECOVER.
+
+ * expanddir.c (ext2fs_expand_dir, expand_dir_proc): Change where
+ we update the inode block count and size files so that the
+ block count field is updated correctly when we create an
+ indirect block.
+
+1999-07-18 Theodore Ts'o <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.15
+
+1999-06-23 <tytso at valinux.com>
+
+ * swapfs.c (ext2fs_swap_inode): Add compatibility for Linux 2.3
+ kernels that use i_generation instead of i_version. Patch
+ supplied by Jon Bright <sircus at sircus.demon.co.uk>.
+
+1999-06-21 <tytso at valinux.com>
+
+ * dir_iterate.c (ext2fs_process_dir_block): Check for corrupted
+ directory entry before calling the callback function.
+ This should prevent some core dumps of insufficiently
+ paranoid callback functions.
+
+1999-05-29 <tytso at rsts-11.mit.edu>
+
+ * ext2fs.h: Add feature definition for AFS IMAGIC inodes.
+
+ * fileio.c (ext2fs_file_open): Remove obsolete comment stating
+ that we don't handle writing yet (we do). Fixed bug where
+ we weren't allocating a big enough buffer for ext2_bmap.
+
+1999-05-03 <tytso at rsts-11.mit.edu>
+
+ * openfs.c (ext2fs_open): Check to make sure that the number of
+ blocks per group is not zero --- if so, it must be a bad
+ superblock!
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+1999-01-07 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * inode.c (ext2fs_read_inode, ext2fs_write_inode): Check to see if
+ the inode number is zero; if it's zero, return
+ EXT2_ET_BAD_INODE_NUM.
+
+1998-12-30 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * initialize.c (ext2fs_initialize): Use EXT2_FIRST_INODE instead
+ of EXT2_FIRST_INO to ensure compatibility with Linux 1.2
+ header files.
+
+Mon Jan 4 02:32:09 1999 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * llseek.c (ext2fs_llseek): Change ext2fs_llseek() in the
+ non-Linux case to use EINVAL by default, unless it isn't
+ defined, in which case we use EXT2_ET_INVALID_ARGUMENT
+ instead.
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-12-03 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Updated dependencies.
+
+1998-09-22 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * initialize.c (ext2fs_initialize): Make sure that we allocate
+ enough inodes so that we can make a valid filesystem.
+
+1998-09-02 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * rw_bitmaps.c: Fixed signed/unsigned warnings.
+
+ * fileio.c (ext2fs_file_set_size): Remove unneeded extern from the
+ function declaration.
+
+ * dblist.c (make_dblist): Add safety check in case the dblist
+ pointer passed in is null (in which case, assign it to
+ fs->dblist). Fixed some signed/unsigned warnings.
+
+ * bmap.c: Make addr_per_block be of type blk_t to avoid
+ signed/unsigned warnings.
+
+ * namei.c (ext2fs_follow_link): Remove uneeded extern from the
+ function declaration.
+
+ * get_pathname.c (get_pathname_proc): Use return value from
+ ext2fs_get_mem, instead of checking if &gp->name is
+ NULL.
+
+ * dir_iterate.c (ext2fs_process_dir_block):
+ * dblist_dir.c (ext2fs_dblist_dir_iterate): Remove uneeded extern
+ from the function declaration.
+
+ * block.c (ext2fs_block_iterate2): If the read_inode call fails,
+ return the error directly instead of jumping to the
+ cleanup routine, since we don't need to do any cleanup.
+
+ * alloc_table.c (ext2fs_allocate_group_table): Make this
+ function take a dgrp_t for its group argument.
+
+ * ext2fs.h: Make dgrp_t an __u32 type, and make
+ fs->desc_group_count be of type dgrp_t.
+
+1998-07-27 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * badblocks.c (ext2fs_badblocks_list_add): Use a bigger increment
+ than 10 blocks when we need to expand the size of the
+ badblocks list.
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+1998-06-30 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * closefs.c (ext2fs_flush): Update the s_block_group_nr field as
+ appropriate for all of the block group copies, so that
+ it's clear where the beginning of the filesystem is on the
+ disk. (For when the partition table gets scrod.)
+
+ * ext2fs.h: Change the name of the feature from
+ EXT2_FEATURE_INCOMPAT_DIRNAME_SIZE to
+ EXT2_FEATURE_INCOMPAT_FILESIZE (to match with the kernel).
+
+1998-06-18 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * inode.c (get_next_blockgroup): Fix bug where if
+ get_next_blockgroup() is called early because of a missing
+ inode table in a block group, the current_inode counter
+ wasn't incremented correctly.
+
+1998-06-16 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * read_bb.c (ext2fs_read_bb_inode): Make function more robust
+ against a completely trashed bad block inode.
+
+1998-06-10 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * alloc_tables.c (ext2fs_allocate_group_table): Fix bug so that if
+ the stride length hits a bad value, we retry the block
+ allocation starting at the beginning of the block group.
+
+ * ext2fs.h, bb_inode.c, block.c, bmove.c, dir_iterate.c,
+ expanddir.c, ext2fsP.h, read_bb.c: Change blkcnt_t to be
+ e2_blkcnt_t to avoid collision with LFS API.
+
+1998-05-01 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * initialize.c (ext2fs_initialize): Initialize s_inodes_count in a
+ way that avoids overflows on disk sizes greater than 4GB.
+
+1998-04-28 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ext2fs.h: Define EXT2_QSORT_TYPE appropriately for the
+ return type for comparison functions for qsort.
+
+ * dblist.c (dir_block_cmp): Use EXT2_QSORT_TYPE in function
+ declaration.
+
+1998-04-26 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ext2fs.h, bitops.h: Add support for the Watcom C compiler to do
+ inline functions.
+
+ * ext2fs.h, dosio.c: Use asm/types.h instead of linux/types.h to
+ evade a potential problem with glibc's header files trying
+ to spike out linux/types.h.
+
+ * ext2fs.h (ext2fs_resize_mem): Change the function prototype to
+ include the old size of the memory, which is needed for
+ some braindamaged memory allocation systems that don't
+ support realloc().
+
+ * badblocks.c (ext2fs_badblocks_list_add):
+ bb_inode.c (clear_bad_block_proc):
+ dblist.c (ext2fs_add_dir_block):
+ icount.c (insert_icount_el):
+ irel_ma.c (ima_put):
+ rs_bitmap.c (ext2fs_resize_generic_bitmap): Update functions to
+ pass the old size of the memory to be resized to
+ ext2fs_resize_mem().
+
+1998-03-30 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Change to use new installation directory variables
+ convention. Fix uninstall rules to take $(DESTDIR) into
+ account.
+
+1998-03-29 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ext2fs.h: If __STRICT_ANSI__ is defined and we're on a platform
+ with 32 bit longs, then we need to manually define __s64
+ and __u64, since the current kernel header files don't
+ define these if __STRICT_ANSI__ is defined. This is a
+ problem if we are compiling with full GCC warnings, since
+ we do need 64 bit support.
+
+ * Makefile.in (OBJS): Remove bmove.o from files to be built,
+ since we're not using ext2fs_move_blocks() and there
+ is some question as to its usefulness in its current
+ form.
+
+ * bmap.c (block_bmap): Remove unused function.
+
+ * bmove.c (process_block): Fix -Wall warning.
+
+1998-03-23 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * block.c (ext2fs_block_iterate3): Make the ref_offset field
+ contain the offset into the inode.i_blocks array when
+ ref_block is zero. Since we haven't done a formal
+ release of e2fsprogs since block_iterate2 was first
+ introduced, I removed block_iterate2, and renamed
+ block_iterate3 to be block_iterate2.
+
+ * bb_inode.c, bmove.c, dblist_dir.c, dir_iterate.c,
+ expanddir.c, ext2fs.h, ext2fsP.h, read_bb.c: Change
+ use of block_iterate and block_iterate2 to
+ block_iterate2 with the new prototype for the
+ interator function. (using blkcnt_t forr blockcount)
+
+1998-03-21 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ext2fs.h: Add new superblock fields (s_algorithm_usage_bitmap,
+ s_prealloc_blocks, s_prealloc_dir_blocks). Added
+ conditional defines of new features COMPAT_DIR_PREALLOC,
+ RO_COMPAT_LARGE_FILE RO_COMPAT_BTREE_DIR,
+ INCOMPAT_COMPRESSION, INCOMPAT_DIRNAME_SIZE. Changed
+ the library to declare that we support COMPAT_DIR_PREALLOC,
+ INCOMPAT_DIRNAME_SIZE, RO_COMPAT_LARGE_FILE.
+
+ * fileio.c: Rename function ext2fs_file_llseek to be
+ ext2fs_file_lseek, which is more accurate.
+
+ * block.c: Add new function ext2fs_block_iterate3 which calls
+ the iterator function with the blockcount argument of
+ type blkcnt_t. This version of the function is
+ allowed to handle large files; the other fucntions are
+ not.
+
+ * ext2fs.h: Add new type blkcnt_t
+
+ * ext2_err.et.in: Add error code EXT2_ET_FILE_TOO_BIG
+
+ * block.c (ext2fs_block_iterate2): Fix bug where the block count
+ field wasn't getting correctly incremented for sparse
+ files when the indirect or doubly-indirect block
+ specified in the inode was zero.
+
+Sun Mar 8 22:42:47 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * unlink.c (unlink_proc):
+ * lookup.c (lookup_proc):
+ * link.c (link_proc):
+ * get_pathname.c (get_pathname_proc):
+ * dir_iterate.c (ext2fs_process_dir_block): Mask off high 8 bits
+ from dirent->name_len, so it can be used for other
+ purposes.
+
+ * ext2fs.h: Add definition of EXT2_FEATURE_INCOMPAT_DIRNAME_SIZE,
+ and indicate that we have support for this incompatible
+ option.
+
+Mon Feb 23 08:46:33 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ext2_err.et.in: Added new error code, EXT2_ET_CANCEL_REQUESTED.
+
+Fri Feb 20 23:58:01 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * dblist.c (ext2fs_get_num_dirs): Improve the estimation of the
+ number of directories when the block group information is
+ unreliable.
+
+1998-02-20 Theodore Y. Ts'o <tytso at edt.mit.edu>
+
+ * inode.c (ext2fs_get_next_inode): Always do the check to see if the
+ inode table is missing so that we catch the case where the
+ first block group is missing.
+
+ * getsize.c, ismounted.c, unix_io.c: #include errno.h since it's
+ needed.
+
+Mon Feb 16 16:16:00 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ext2_io.h, ext2fs.h: Protect against being included multiple times.
+
+ * bmove.c: #include ext2fsP.h instead of "ext2fs/ext2fs.h"
+
+ * test_io.c (test_flush): Add a debugging printf when the flush
+ method is called.
+
+ * rw_bitmaps.c (ext2fs_read_bitmaps): If the bitmaps are already
+ read in, return right away.
+
+Sun Feb 1 08:20:24 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * bitops.h: Don't try to do i386 inline asm functions if the
+ compiler isn't GCC.
+
+ * ext2fs.h: If EXT2_FLAT_INCLUDES is defined, #include e2_types.h,
+ instead of linux/types.h, and e2_bitops.h instead of
+ ext2fs/bitops.h.
+
+ * icount.c, version.c: Don't #include <et/com_err.h>, as it isn't
+ necessary.
+
+Sat Jan 17 13:13:31 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * inode.c (ext2fs_open_inode_scan): Initialize the group variables
+ so that we don't need to call get_next_blockgroup() the
+ first time around. Saves a bit of time, and prevents us
+ from needing to assign -1 to current_group (which is an
+ unsigned value).
+
+ * icount.c (insert_icount_el): Cast the estimated number of inodes
+ from a float to an ino_t.
+
+ * alloc.c, alloc_tables.c, badlbocks.c, bb_compat.c, bb_inode.c,
+ bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
+ check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c,
+ dblist_dir.c, dir_iterate.c, dirblock.c, dupfs.c,
+ expanddir.c, ext2fs.h, fileio.c, freefs.c,
+ get_pathname.c, getsize.c, icount.c, initialize.c,
+ inline.c, inode.c, irel_ma.c, ismounted.c, link.c,
+ lookup.c, mkdir.c, namei.c, native.c, newdir.c,
+ openfs.c, read_bb.c, read_bb_file.c, rs_bitmap.c,
+ rw_bitmaps.c, swapfs.c, test_io.c, tst_badblocks.c,
+ tst_getsize.c, tst_iscan.c, unix_io.c, unlink.c,
+ valid_blk.c, version.c: If EXT2_FLAT_INCLUDES is
+ defined, then assume all of the
+ ext2-specific header files are in a flat directory.
+
+ * block.c, bmove.c, dirblock.c, fileio.c: Explicitly cast
+ all assignments from void * to be compatible with C++.
+
+Tue Jan 6 11:28:15 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * closefs.c (ext2fs_flush): Add a call to io_channel_flush() to
+ make sure the contents of the disk are flushed to disk.
+
+Mon Dec 29 14:39:13 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * dblist.c (ext2fs_add_dir_block): Change new to be new_entry to
+ avoid C++ namespace clash.
+
+ * bitmaps.c (ext2fs_copy_bitmap): Change new to be new_map to
+ avoid C++ namespace clash.
+
+ * ext2fs.h, bb_inode.c, block.c, bmove.c, brel.h, brel_ma.c,
+ irel.h, irel_ma.c, dblist.c, dblist_dir.c, dir_iterate.c,
+ ext2fsP.h, expanddir.c, get_pathname.c, inode.c, link.c,
+ unlink.c: Change private to be priv_data (to avoid C++
+ namespace clash)
+
+Fri Nov 28 09:26:31 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * dblist.c (ext2fs_get_num_dirs): Make ext2fs_get_num_dirs more
+ paranoid about validating the directory counts from the
+ block group information.
+
+ * all files: Don't include stdlib.h anymore; include it in
+ ext2_fs.h, since that file requires stdlib.h
+
+Thu Nov 20 16:07:38 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * expanddir.c (ext2fs_expand_dir): Check to make sure the block
+ bitmap is loaded, and return an error if it is not.
+ (expand_dir_proc): Only use ext2fs_write_dir_block when
+ writing a directory block, not when writing out a fresh
+ indirect block.
+
+Tue Nov 11 22:46:45 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in, tst_getsize.c: Added new file which is used to test
+ the ext2fs_get_device_size function.
+
+ * ext2_err.et.in (EXT2_ET_UNIMPLEMENTED): Added new error code.
+
+Sun Nov 2 20:36:13 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ext2fs.h: Make ext2fs_get_mem take an unsigned argument.
+
+ * fileio.c (ext2fs_file_get_size, ext2fs_file_set_size,
+ ext2fs_file_get_fs): New functions added.
+
+
+Fri Oct 31 12:16:52 1997 <tytso at EDT.MIT.EDU>
+
+ * bitops.c (ext2fs_warn_bitmap, ext2fs_warn_bitmap2): Don't call
+ com_err if OMIT_COM_ERR is defined.
+
+Thu Oct 30 11:33:57 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Rename new error codes to _ET_ in them for consistency.
+
+Sat Oct 25 00:06:58 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * [all files, basically]: Added definition of ext2fs_get_mem,
+ ext2fs_free_mem, and ext2fs_resize_mem in ext2fs.h, and
+ changed all library routines to use these wrapper functions.
+
+ * dblist.c, mkdir.c: use EXT2_DIR_EXISTS and EXT2_DB_NOT_FOUND
+ instead of the system error messages.
+
+ * ext2_err.et.in: Added new error messages EXT2_DIR_EXISTS and
+ EXT2_DB_NOT_FOUND
+
+ * ext2fs.h: Added function declarations and constants for bmap.c
+ and fileio.c.
+
+ * ext2_err.et.in: Added new error messages EXT2_FILE_RO and
+ EXT2_ET_MAGIC_EXT2_FILE
+
+ * Makefile.in: Added files bmap.c and fileio.c, and temporarily
+ commented out brel_ma.c and irel_ma.c
+
+ * bmap.c: New file which maps a file's logical block number to its
+ physical block number.
+
+ * fileio.c: New file which implements simple file reading and
+ writing primitives.
+
+ * alloc.c (ext2fs_alloc_block): New function which allocates a
+ block, zeros it, and updates the filesystem accounting
+ records appropriately.
+
+Wed Oct 22 16:47:27 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ext2_err.et.in: Added new error codes: EXT2_NO_MEMORY,
+ EXT2_INVALID_ARGUMENT, EXT2_BLOCK_ALLOC_FAIL,
+ EXT2_INODE_ALLOC_FAIL, EXT2_NOT_DIRECTORY
+
+ * Change various library files to use these functions instead of
+ EINVAL, ENOENT, etc.
+
+Mon Oct 20 19:32:40 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * llseek.c: Check HAVE_LLSEEK_PROTOTYPE to see whether or not we
+ need to declare llseek().
+
+Sun Oct 19 18:56:22 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Rename io.h to be ext2_io.h (avoid namespace collisions)
+
+ * Add #ifdef's for HAVE_SYS_STAT_H and HAVE_SYS_TYPES_H
+
+Fri Oct 3 13:35:59 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * llseek.c (ext2fs_llseek): Fix type error for ext2fs_llseek()
+
+ * icount.c (ext2fs_icount_validate):
+ * bmove.c (process_block): Fix lint error in type for fprintf().
+
+Mon Sep 15 11:45:09 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * inode.c (ext2fs_check_directory): Add support for the callback
+ to return the error code EXT2_ET_CALLBACK_NOTHANDLED.
+
+Thu Sep 4 12:28:22 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * bitmaps.c (ext2fs_set_bitmap_padding): New function which sets the
+ padding of the bitmap to be all one's.
+
+Wed Sep 3 14:27:30 1997 Theodore Y. Ts'o <tytso at edt.mit.edu>
+
+ * llseek.c: Added missing semicolon to glibc fixup declaration of
+ llseek().
+
+ * bmove.c: Add #include of errno.h
+
+Sat Aug 23 22:47:46 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (ELF_SO_VERSION): Bump version to be 2.4 since we've
+ added a new field to the io_channel (app_data).
+
+ * io.h: Add a new element to the io_channel structure, app_data.
+
+ * initialize.c, openfs.c: Set io->app_data to point at the
+ filesystem handle.
+
+Thu Aug 14 08:14:17 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * io.h: Change the prototype of ext2fs_llseek() to use int's
+ instead of unsigned int's.
+
+ * llseek.c: Change to allow PIC and !HAVE_LLSEEK. Add a prototype
+ to make life easer for GNU Libc 2.
+
+ * rw_bitmaps.c: On the PowerPC, the big-endian variant of the ext2
+ filesystem has its bitmaps stored as 32-bit words with bit
+ 0 as the LSB of each word. Thus a bitmap with only bit 0
+ set would be, as a string of bytes, 00 00 00 01 00 ... To
+ cope with this, we byte-reverse each word of a bitmap if
+ we have a big-endian filesystem, that is, if we are *not*
+ byte-swapping other word-sized numbers.
+
+Mon Aug 11 03:30:48 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * dosio.c: New file to do DOS/BIOS disk accesses.
+
+ * namei.c (open_namei): Make pathlen be of type size_t.
+
+ * llseek.c: Always #include stdlib.h since it's need to define
+ size_t.
+
+ * io.h: Use errcode_t for magic numbers.
+
+ * icount.c (get_icount_el): Use size_t where appropriate
+
+ * dupfs.c (ext2fs_dup_handle):
+ * dblist.c (dir_block_cmp): Use size_t where appropriate.
+
+ * read_bb.c (ext2fs_read_bb_inode):
+ * cmp_bitmaps.c (ext2fs_compare_inode_bitmap): Use blk_t, ino_t
+ and size_t where appropriate.
+
+ * closefs.c (ext2fs_flush): Use dgrp_t instead of int where
+ appropriate.
+
+ * openfs.c (ext2fs_open):
+ * check_desc.c (ext2fs_check_desc): Use blk_t instead of int where
+ appropriate.
+
+ * rw_bitmaps.c (read_bitmaps):
+ * irel_ma.c:
+ * inode.c (ext2fs_write_inode):
+ * initialize.c (ext2fs_initialize):
+ * brel_ma.c: Fix to make be 16-bit safe.
+
+ * link.c (ext2fs_link):
+ * unlink.c (ext2fs_unlink):
+ * lookup.c (lookup_proc):
+ * ismounted.c (ext2fs_check_if_mounted):
+ * block.c (xlate_func): Add #pragma argsused for Turbo C.
+
+Sun Aug 10 10:05:22 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * block.c (ext2fs_block_iterate2): Use retval which is a errcode_t
+ type.
+
+ * bitmaps.c (make_bitmap): Use size_t instead of int where
+ appropriate.
+
+ * bb_inode.c (set_bad_block_proc): Add #pragma argsused for Turbo C.
+
+ * alloc.c (ext2fs_new_inode): Use ino_t instead of int for the
+ group number.
+
+ * get_pathname.c: Use ino_t instead of int where appropriate.
+
+ * ext2fs.h: Make the magic structure element be errcode_t instead
+ of int.
+
+ * alloc.c alloc_tables.c badblocks.c bb_compat.c bb_inode.c
+ bitmaps.c block.c bmove.c brel_ma.c check_desc.c closefs.c
+ cmp_bitmaps.c dblist.c dblist_dir.c dir_iterate.c
+ dirblock.c dupfs.c expanddir.c freefs.c get_pathname.c
+ icount.c initialize.c inline.c inode.c irel_ma.c link.c
+ llseek.c lookup.c mkdir.c namei.c newdir.c read_bb.c
+ read_bb_file.c rs_bitmap.c rw_bitmaps.c swapfs.c
+ test_io.c tst_badblocks.c tst_iscan.c unix_io.c unlink.c
+ valid_blk.c version.c: Add an #ifdef for HAVE_UNISTD_H
+
+Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * unix_io.c (unix_read_blk): If ext2fs_llseek() fails, but errno
+ is zero, then return EXT2_IO_LLSEEK_FAILED.
+
+ * ext2_err.et.in: Add a new error code, EXT2_IO_LLSEEK_FAILED.
+
+ * Release of E2fsprogs 1.11
+
+Mon Jun 16 23:53:06 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * dblist.c (ext2fs_dblist_count): Added new function which returns
+ the number of directory blocks in dblist.
+
+Sat Jun 14 01:39:13 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * unix_io.c (unix_flush): Make the io_channel flush function do a
+ fsync to flush the kernel buffers to disk.
+
+Wed Jun 11 18:25:31 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * inode.c (ext2fs_inode_scan_goto_blockgroup): Fix bug; the
+ current inode number wasn't being set by the
+ goto_blockgroup function.
+
+Mon Jun 9 10:45:48 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * bmove.c (ext2fs_move_blocks): New function which takes a bitmap
+ of blocks which need to be moved, and moves those blocks
+ to another location in the filesystem.
+
+ * rs_bitmap.c (ext2fs_resize_generic_bitmap): When expanding a
+ bitmap, make sure all of the new parts of the bitmap are
+ zero.
+
+Sun Jun 8 16:24:39 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * bitmaps.c (ext2fs_copy_bitmap): Fix bug; the destination bitmap
+ wasn't being returned to the caller.
+
+ * alloc_tables.c (ext2fs_allocate_group_table): Add new function
+ ext2fs_allocate_group_table() which sets the group tables
+ for a particular block group. The relevant code was
+ factored out of ext2fs_allocate_tables().
+
+ * dblist.c (make_dblist): Adjust the initial size of the directory
+ block list to be a bit more realistic (ten plus twice the
+ number of directories in the filesystem).
+
+Thu May 8 22:19:09 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * badblocks.c (ext2fs_badblocks_list_test): Fix bug where
+ ext2fs_badblocks_list_test would test the list (and exceed
+ array boundaries) if there were no bad blocks on the bad
+ blocks list. (Showed up when user tried: mke2fs -c -b 4096).
+
+Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * Release of E2fsprogs version 1.10
+
+Thu Apr 24 10:13:42 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * alloc_tables.c (ext2fs_allocate_tables): Correctly place the
+ inode and block bitmaps based on the RAID 0 stride
+ parameter (which is passed by mke2fs).
+
+ * ext2fs.h: Add "stride" parameter to ext2_filsys, to be used by
+ mke2fs to communicate the stride length to
+ ext2fs_allocate_tables()
+
+Wed Apr 23 21:50:42 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * initialize.c (ext2fs_initialize): Fix to compile under Linux 1.2
+ systems. (We can't assume that the new filesystem types
+ are supported.)
+
+Wed Apr 23 18:40:53 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * alloc_tables.c (ext2fs_allocate_tables): Make sure that we
+ allocate the inode and block bitmaps inside block group at
+ all times.
+
+Mon Apr 21 00:06:28 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * alloc.c (ext2fs_new_block): Fix bug where if goal==0 and the
+ filesystem has no free blocks, ext2fs_new_block would loop
+ forever.
+
+ * dupfs.c (ext2fs_dup_handle): Duplicate an ext2 filesystem handle
+
+ * freefs.c (ext2fs_free_inode_cache): Decrement refcount and only
+ free if refcount goes to zero.
+
+ * inode.c (create_icache): Initialize refcount to 1.
+
+ * ext2fsP.h: Added refcount to ext2_inode_cache
+
+ * dblist.c (ext2fs_copy_dblist): New function to copy a directory
+ block list.
+
+ * badblocks.c (ext2fs_badblocks_copy): New function to copy a
+ badblocks structure.
+
+Sun Apr 20 23:19:51 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * bitmaps.c (ext2fs_copy_bitmap): New function to copy a bitmap.
+
+ * unix_io.c, test_io.c (unix_open, test_open): Initialize the
+ refcount to 1.
+ (unix_close, test_close): Decrement the refcount and only
+ close the io_channel if the refcount goes to 0.
+
+ * io.h: Add refcount to the io_channel structure. Add new macro
+ interface io_channel_bumpcount() to bump the refcount.
+
+Thu Apr 17 20:25:03 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * inode.c (ext2fs_read_inode, ext2fs_write_inode): Use the inode
+ cache in the filesystem handle, instead of the inode cache
+ in a static variable.
+
+ * freefs.c: Added static function to free the inode cache (called by
+ ext2fs_free).
+
+ * ext2fsP.h: Added definition of the ext2_inode_cache structures.
+
+ * ext2fs.h: Added pointer to the inode_cache structure.
+
+ * block.c (block_iterate_ind, block_iterate_dind,
+ block_iterate_tind): If there are holes in the indirect,
+ doubly indirect, or triply indirect blocks, increment the
+ block count field automatically.
+
+Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.09
+
+Mon Apr 14 20:38:56 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * version.c (ext2fs_parse_version_string): Check the passed in
+ version string (instead of the hard-coded one).
+
+ * alloc_tables.c (ext2fs_allocate_tables): If the last block is
+ greater filesystem size, clamp it to prevent allocating a
+ block or inode bitmap beyond the filesystem.
+
+ * initialize.c (ext2fs_initialize): Fix bug where the metatdata
+ overhead calculation was accidentally removed.
+
+Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.08
+
+Thu Apr 10 13:15:15 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * dblist.c (ext2fs_set_dir_block): New function which sets the
+ block of a dblist entry, given the directory inode and
+ blockcnt.
+
+Sat Apr 5 12:42:42 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * alloc_tables.c (ext2fs_allocate_tables): Allocate the bitmap and
+ inode bitmaps at staggered locations across the block
+ groups, to avoid concentrating the bitmaps on a small
+ number of disks when using striped RAID arrays.
+
+ * initialize.c (ext2fs_initialize): By default, choose the maximum
+ possible number of blocks per group (based on the size of
+ the bitmaps in the blocksize).
+
+Fri Apr 4 11:28:16 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * initialize.c (ext2fs_initialize): Add support for
+ EXT2_COMPAT_SPARSE_SUPER feature.
+
+ * closefs.c (ext2fs_bg_has_super): New function to determine
+ whether or a particular block group should have a
+ superblock and block group descriptor. Used for the
+ EXT2_COMPAT_SPARSE_SUPER feature is turned on.
+ (ext2fs_flush): Check ext2fs_bg_has_super to see whether
+ or not the superblock should be written out for the block
+ group.
+
+ * ext2fs.h (EXT2_COMPAT_SPARSE_SUPER): Define compatibility flag
+ for sparse duplicate superblocks.
+
+ * version.c (ext2fs_get_library_version): New function which
+ returns the library version.
+
+ * version.c (ext2fs_parse_version_string): New function which
+ parses a version string and returns a version number,
+ so application programs can compare version numbers as
+ integers.
+
+Wed Mar 26 00:43:52 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * icount.c (ext2fs_create_icount): Change function so that it also
+ takes a new argument which contains a "hint" icount
+ structure. This "hint" icount allows the create function
+ to set up the sorted list in advance. This reduces
+ significantly the amount of data moving needed to insert
+ these inodes into the list later.
+
+ * icount.c (ext2fs_icount_validate): New function which validates
+ that the icount structure's rep invariant.
+
+ * icount.c (get_icount_el): Completely revamped implementation
+ to subsume put_icount_el(). Put_icount_el() used to
+ use an O(N) implementation to insert in the middle
+ of the icount list. It now uses a O(ln N) to search
+ for where the icount should be inserted, and then uses
+ a memcpy to move the list down (instead of a for loop).
+
+ * icount.c (ext2fs_icount_fetch, ext2fs_icount_store,
+ ext2fs_icount_increment, ext2fs_icount_decrement): Check
+ to see if the inode is within bounds; if it isn't, return
+ EINVAL.
+
+ * bitops.h (ext2fs_test_generic_bitmap): Fix error message given
+ when a bad inode number is passed to test_generic_bitmap
+ to be EXT2FS_TEST_ERROR instead of the wrong
+ EXT2FS_UNMARK_ERROR.
+
+Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * Release of E2fsprogs version 1.07
+
+Sun Mar 2 16:46:18 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (ELF_VERSION): Change version to be 2.2
+
+Tue Feb 11 14:54:02 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * alloc.c (ext2fs_get_free_blocks): Change routine to use
+ ext2fs_fast_test_block_bitmap_range().
+
+ * bitops.h (ext2fs_fast_test_block_bitmap_range,
+ ext2fs_test_block_bitmap_range: New inline functions which
+ test to see whether a contiguous range of blocks is
+ available.
+
+Thu Feb 6 10:00:13 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * badblocks.c (ext2fs_badblocks_list_create): Rename sybmols to use
+ use ext2fs_badblocks_* instead of badblocks_*
+
+ * bb_compat.c: New file which translates between old badblocks_*()
+ names to ext2fs_badblocks_*()
+
+ * unlink.c (ext2fs_unlink): New file, moved ext2fs_unlink() from
+ link.c (since e2fsck doesn't use ext2fs_unlink()).
+
+ * rs_bitmap.c (ext2fs_resize_generic_bitmap): New file, contains
+ bitmap resizing routine moved from bitmaps.c, since e2fsck
+ doesn't need to use this function.
+
+ * lookup.c (ext2fs_lookup): Moved ext2fs_lookup to its own file,
+ since e2fsck only needs ext2fs_lookup.
+
+Mon Feb 3 10:11:40 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * inode.c (ext2fs_open_inode_scan): Set fs->badblocks if it is not
+ already set; this is needed so that programs like dump
+ which use the inode scan functions will deal with
+ filesystems that have bad blocks in the inode table.
+
+Sun Feb 2 00:17:36 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ext2fs.h (struct_badblocks_list, struct_badblocks_iterate):
+ Moved to ext2fsP.h, since it doesn't need to be part of
+ the public interface.
+
+ * dir_iterate.c: Move ext2_dir_iterate out of namei.c.
+
+Sat Feb 1 10:14:55 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * dblist.c (ext2fs_get_num_dirs): New file, which implements a
+ directory block list abstraction. (Code moved from
+ e2fsck).
+
+ * ext2fs.h, inode.c: Moved definition of ext2_struct_inode_scan to
+ to inode.c (since no one else should be peeking inside it!)
+
+ * valid_blk.c (ext2_inode_has_valid_blocks): New function.
+
+ * openfs.c (ext2fs_open): Check the feature set in the ext2
+ superblock, and refuse to open filesystems if they contain
+ incompatible features. (Can be overriden with the
+ EXT2_FLAG_FORCE
+
+Sun Jan 12 11:31:46 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * block.c (ext2fs_block_iterate2): Added new function
+ ext2fs_block_iterate2 which changes the function
+ signature of the callback function to include the
+ referencing block and offset.
+
+ * inode.c (ext2fs_inode_scan_goto_blockgroup): Added new function
+ ext2fs_inode_scan_goto_blockgroup which allows an
+ application to jump to a particular block group while
+ doing an inode scan.
+
+Wed Jan 1 23:50:12 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * dirblock.c: Include string.h, since we use memcpy().
+
+Tue Dec 3 12:27:29 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * getsize.c (ext2fs_get_device_size): The ioctl BLKGETSIZE returns
+ a long not an int; this doesn't matter on i386 machines,
+ but it does on Alpha's.
+
+Fri Nov 29 20:57:37 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * inode.c (ext2fs_write_inode, ext2fs_read_inode): If the inode
+ table pointer is NULL, then return an error indicating
+ that the inode table is missing.
+ (get_next_blockgroup, get_next_blocks,
+ ext2fs_get_next_inode): Don't treat a missing inode table
+ as permanent error. Return MISSING_INODE_TABLE, but as an
+ advisory error code, much like BAD_BLOCK_IN_INODE_TABLE.
+
+ * rw_bitmaps.c (ext2fs_write_block_bitmap,
+ ext2fs_write_inode_bitmap): If the inode or block bitmap
+ block is zero, then don't write out the inode or block
+ bitmap. The idea here is to avoid stomping on the
+ superblock.
+ (read_bitmaps): If the inode or block bitmap block is
+ zero, then fill in that portion of the inode or block
+ bitmap with all zeros.
+
+ * inode.c (ext2fs_get_next_inode): Fix bug in handling of bad
+ blocks in inode table when the inode table size is
+ non-standard (and can therefore span blocks).
+
+Tue Oct 29 20:13:14 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * alloc.c (ext2fs_new_block): Fix fencepost error in
+ ext2fs_new_block; make sure we don't try to allocate the
+ first block beyond the end of the filesystem.
+
+Mon Oct 14 11:00:48 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * inode.c (check_for_inode_bad_blocks): New function called by
+ get_next_blocks() to avoid reading in bad blocks marked in
+ fs->badblocks. Inodes located in bad blocks are returned
+ by ext2fs_get_next_inode() returns the error code
+ EXT2_ET_BAD_BLOCK_IN_INODE_TABLE.
+
+ * alloc_tables.c (ext2fs_allocate_tables): New function which
+ performs the part of mke2fs's job of allocating the
+ filesystem tables.
+
+ * test_io.c (test_close): IO manager which is used for testing
+ purposes.
+
+Sun Oct 13 04:31:57 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * inode.c (ext2fs_get_next_inode): Separate out the function of
+ setting up for a new block group to get_next_blockgroup().
+ Separate out the function of reading in blocks of the
+ inode table to get_next_blocks().
+
+ * ext2fs.h: Add the badblocks list to the ext2_filsys entry
+
+ * badblocks.c (badblocks_list_add, badblocks_list_test): Add
+ blocks to the badblock list in sorted order. This allows
+ badblocks_list_test to be coded using a binary search for
+ speed.
+
+Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.06
+
+Mon Oct 7 00:44:17 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ext2fs.h, block.c, closefs.c, dirblock.c, inode.c, native.c,
+ open.c: Change EXT2_SWAP to EXT2_FLAG_SWAP for
+ consistency's sake.
+
+ * closefs.c (ext2fs_flush): If the flag EXT2_MASTER_SB_ONLY is
+ set, then only write out the master superblock.
+
+Sun Oct 6 21:45:26 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * block.c (ext2fs_block_iterate): Fixed bug which caused
+ block_iterate to fail to handle HURD created filesystems;
+ it tested the inode translator field before the inode was
+ loaded.
+
+Tue Sep 17 14:08:24 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * initialize.c (ext2fs_initialize): Make sure the description for
+ the inode bitmap is set correctly.
+
+ * bitmaps.c (ext2fs_allocate_generic_bitmap): Fix minor type typo.
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
+Sat Sep 7 07:36:03 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * initialize.c: Override the kernel's idea of default
+ checkinterval from 0 (never) to 180 days.
+
+Wed Aug 28 03:20:03 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * namei.c (ext2fs_namei_follow): New function which follows
+ symbolic link (if any) at the target.
+
+Tue Aug 27 01:48:43 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * inode.c (ext2fs_read_inode, ext2fs_write_inode): Add support
+ for shortcut function fs->read_inode() and fs->write_inode().
+ Added inode_cache to reduce CPU time spent in doing
+ byte swapping.
+
+ * swapfs.c (ext2fs_swap_super): Swap the new fields in a V2
+ superblock.
+
+ * namei.c (ext2fs_follow_link): New function.
+ (ext2fs_namei): Extended to have support for chasing
+ symbolic links. ext2fs_namei() still returns an inode
+ which is a symbolic link. Symbolic links are only chased
+ while resolving the containing directory. To chase
+ symbolic links of the final result, use
+ ext2fs_follow_link().
+
+Mon Aug 26 23:46:07 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ext2_err.et.in: Added new error code EXT2_ET_SYMLINK_LOOP.
+
+ * bitops.h (ext2fs_set_bit, ext2fs_celar_bit): Use asm inlines
+ provided by Pete A. Zaitcev (zaitcev at lab.sun.mcst.ru).
+
+Thu Aug 22 00:40:18 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * initialize.c (ext2fs_initialize): On systems where the byte
+ order is not i386 compatible, set the swap_byte flag.
+
+ * inode.c (inocpy_with_swap): Check to see if inode contains a
+ fast symlink before swapping the inode block fields. This
+ required adding a new argument to inocpy_with_swap to
+ determine whether the mode field is in host order or not.
+
+Wed Aug 21 00:45:42 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * bitops.h (ext2fs_set_bit, ext2fs_clear_bit, ext2fs_test_bit): On
+ the sparc, if EXT2_STD_BITOPS set, use the standard
+ i386-compatible bitmask operations, instead on the
+ non-standard native bitmask operators.
+
+Fri Aug 9 11:11:35 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * block.c (ext2fs_block_iterate): Cause block iterator to return
+ the HURD translator block (along with everything else).
+ If the flag BLOCK_FLAG_DATA_ONLY is passed to the block
+ iterator, then don't return any meta data blocks
+ (including the HURD translator).
+
+Wed Jul 17 17:13:34 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * gen_uuid.c: New file, which generates DCE-compatible UUIDs.
+
+ * uuid.c: New file, containing UUID utility functions.
+
+Tue Jul 16 10:19:16 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ext2fs.h: Add a definition of the "real" ext2 superblock.
+
+Fri May 24 14:54:55 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * ext2fs.h: Fix erroneous ino_t type used in block_bitmap type.
+
+Sun May 19 15:39:03 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * openfs.c (ext2fs_open): If the blocksize in the superblock is
+ zero, return the error EXT2_ET_CORRUPT_SUPERBLOCK, since
+ that's a basic value that must be correct for the rest of
+ the library to work.
+
+ * ext2_err.et.in (EXT2_ET_CORRUPT_SUPERBLOCK): Added new error
+ code.
+
+Thu May 16 11:12:30 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.04
+
+Wed Mar 27 00:33:40 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.03
+
+Tue Mar 26 12:06:32 1996 <tytso at rsts-11.mit.edu>
+
+ * bitops.h (ext2fs_set_bit, ext2fs_clear_bit, ext2fs_test_bit):
+ Change the m68k bit numbering for bitmasks to match with
+ the bit numbering used by all other ext2 implementations.
+
+Thu Mar 7 03:37:00 1996 <tytso at rsts-11.mit.edu>
+
+ * inode.c (ext2fs_get_next_inode, ext2fs_close_inode_scan,
+ ext2fs_open_inode_scan): Support dynamically-sized inodes.
+
+Wed Mar 6 12:26:29 1996 <tytso at rsts-11.mit.edu>
+
+ * inode.c (ext2fs_read_inode, ext2fs_write_inode): Support
+ dynamically-sized inodes.
+
+ * openfs.c (ext2fs_open): Allow dynamic revision filesystem to be
+ loaded.
+
+Tue Mar 5 03:49:37 1996 <tytso at rsts-11.mit.edu>
+
+ * initialize.c (ext2fs_initialize): Catch an error condition where
+ the passed in size is *really* too small.
+
+ * alloc.c (ext2fs_new_inode):
+ * ext2fs.h (EXT2_FIRST_INODE): Add support for dynamic revision to
+ get first inode.
+
+Wed Feb 21 15:56:17 1996 <tytso at rsts-11.mit.edu>
+
+ * getsize.c (ext2fs_get_device_size): Open the device read-only
+ when trying to determine its size.
+
+Wed Jan 31 11:06:08 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.02
+
+Sat Dec 9 09:57:50 1995 <tytso at rsts-11.mit.edu>
+
+ * rw_bitops.c (ext2fs_write_block_bitmap):
+ * bitops.c (ext2fs_test_bit, ext2fs_clear_bit, ext2fs_set_bit):
+ * bitops.h (ext2fs_test_bit, ext2fs_clear_bit, ext2fs_set_bit):
+ Rename {test,set,clear}_bit to ext2fs_{test,set,clear}_bit,
+ to avoid conflicts with with kernel include files. Also
+ rename ADDR and CONST_ADDR to EXT2FS_ADDR and
+ EXT2FS_CONST_ADDR.
+
+Thu Oct 26 12:09:16 1995 <tytso at rsts-11.mit.edu>
+
+ * ext2_err.et: Updated message in EXT2_ET_BASE to say version 0.5c
+
+ * swapfs.c (ext2fs_swap_super): Put an #ifdef check around
+ s_def_resuid and s_def_resgid for backwards compatibility.
+
+Fri Oct 20 23:33:31 1995 <tytso at rsts-11.mit.edu>
+
+ * bitops.h: Added #ifdef's for Sparc.
+
+Wed Sep 6 22:14:46 1995 <tytso at rsts-11.mit.edu>
+
+ * getsize.c: #include <sys/ioctl.h> under Linux to pick up ioctl()
+ declaration
+
+ * closefs.c: #include <string.h> to pick up memset() declaration
+
+Mon Sep 4 21:45:29 1995 Remy Card <card at bbj>
+
+ * Makefile.in: Added support for BSD shared libraries.
+
+ * initialize.c (ext2fs_initialize): Correctly set the s_creator_os
+ flag.
+
+Mon Sep 4 09:55:30 1995 <tytso at rsts-11.mit.edu>
+
+ * unix_io.c (unix_open): Add a double check; if the passed in name
+ is NULL, return EXT2_ET_BAD_DEVICE_NAME.
+
+ * ext2_err.et (EXT2_ET_BAD_DEVICE_NAME): Added new error code
+
+Wed Aug 16 15:44:10 1995 <tytso at rsts-11.mit.edu>
+
+ * inode.c (ext2fs_check_directory): Use LINUX_S_ISDIR instead of
+ S_ISDIR.
+
+Tue Aug 15 13:08:36 1995 <tytso at rsts-11.mit.edu>
+
+ * getsize.c (ext2fs_get_device_size): Add support for reading the
+ partition size from a BSD disk label.
+
+Thu Aug 10 09:33:26 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * getsize.c (ext2fs_get_device_size): New function that determins
+ the size of a device. Used by mke2fs and e2fsck.
+
+Sat Aug 12 03:09:54 1995 Remy Card <card at bbj>
+
+ * Makefile.in (install): Install static libraries in $(ulibdir)
+ (/usr/lib on Linux) instead of $(libdir) (/lib on Linux).
+
+Wed Aug 9 17:04:23 1995 Theodore Y. Ts'o <tytso at dcl>
+
+ * bitmaps.c (ext2fs_free_inode_bitmap, ext2fs_free_block_bitmap):
+ Move these functions to freefs.c.
+
+ * closefs.c (ext2fs_flush): If swapping blocks, clear the group
+ descriptors shadow memory to keep purify quiet. (This
+ also has the nice benefit that the unused portion of the
+ shadow descriptors are zeroed out.)
+
+ * dirblock.c (ext2fs_write_dir_block): We need to use
+ dirent->rec_len *before* it's byteswapped to find the
+ location of the next directory structure!
+
+ * alloc.c (ext2fs_new_inode): Fix bug which could potentially
+ cause ext2fs_new_inode to loop infinitely if we're trying
+ to allocate an inode in group #0 and there are no free
+ inodes at all in the system.
+
+ * closefs.c: #include <errno.h> if it exists.
+
+Sun Aug 6 13:27:50 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * ext2fs.h (BLOCK_FLAG_HOLE): Added new definition for
+ BLOCK_FLAG_APPEND. Added documentation for the block
+ interator flags.
+
+Sat Aug 5 11:44:05 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * Makefile.in (DLL_INSTALL_DIR, ELF_INSTALL_DIR): Set the
+ installation directories correctly.
+
+Tue Jul 18 09:27:38 1995 <tytso at rsx-11.mit.edu>
+
+ * namei.c (process_dir_block):
+ * mkdir.c (ext2fs_mkdir):
+ * expanddir.c (expand_dir_proc): Use ext2fs_{read,write}_dir_block
+ to read/write the directory block.
+
+ * dirblock.c (ext2fs_read_dir_block), ext2fs_write_dir_block): New
+ file containing functions for reading and writing
+ directory blocks (byte swapping if necesssary)
+
+ * block.c (block_iterate_ind, block_iterate_dind,
+ block_iterate_tind): Byte swap the block addresses if
+ EXT2_SWAP_BYTES is set (and swap them back before writing
+ them out.)
+
+ * inode.c (inocpy_with_swap): New function.
+ (ext2fs_get_next_inode, ext2fs_read_inode, ext2fs_write_inode):
+ Call inocpy_with_swap if EXT2_SWAP_BYTES if set.
+
+ * closefs.c (ext2fs_flush): If EXT2_SWAP_BYTES is set, then swap
+ the superblock and group descriptors before writing it out.
+
+ * openfs.c (ext2fs_open): If the magic number is byte-swapped,
+ then set the EXT2_SWAP_BYTES and byte-swap the superblock
+ and group descriptors.
+
+ * swapfs.c (ext2fs_swap_super, ext2fs_swap_group_desc): New functions
+ to desp ext2 filesystem structures.
+
+ * bitops.c (set_bit, clear_bit, test_bit): Use modifications
+ supplied by Pete A. Zaitcev so that the C language
+ versions of these functions are more portable. They will
+ now work on both little and big endian systems, and the
+ assumption that 32-bit integers are used is gone.
+
+ * bitops.h (ext2_swab16, ext2_swab32): Added new functions for
+ doing byte swapping.
+
+ * ext2fs.h (EXT2_SWAP_BYTES): Add new flag which indicates that
+ byte swapping should take place.
+
+Sun Jul 16 06:21:43 1995 <tytso at rsx-11.mit.edu>
+
+ * Makefile.in, cmp_bitmaps.c (ext2fs_compare_block_bitmap_end,
+ ext2fs_compare_inode_bitmap_end): Added new file
+ containing routines to compare bitmaps.
+
+ * ext2_err.et (EXT2_ET_NEQ_BLOCK_BITMAP, EXT2_ET_NEQ_INODE_BITMAP):
+ Added new error codes.
+
+Sat Jul 15 04:23:37 1995 <tytso at rsx-11.mit.edu>
+
+ * inode.c (ext2fs_get_next_inode): Don't check scan->inode_buffer;
+ if the magic number is correct, it will be allocated.
+
+Fri Jul 14 19:02:59 1995 <tytso at rsx-11.mit.edu>
+
+ * block.c (block_iterate_ind, block_iterate_dind,
+ block_iterate_tind): Don't recompute block_nr each loop;
+ just increment it! Factor check of BLOCK_FLAG_APPEND out
+ of the loop. Factor mask of BLOCK_CHANGED into changed
+ variable out of the loop. (block_iterate_ind, in
+ particular, gets called a lot, so every little
+ optimization helps.)
+
+Thu Jul 13 08:02:45 1995 <tytso at rsx-11.mit.edu>
+
+ * block.c (block_iterate_ind, block_iterate_dind,
+ block_iterate_tind): Precompute limit of loop to speed up
+ block_iterate_ind and company.
+
+ * bitops.h (ext2fs_fast_mark_block_bitmap,
+ ext2fs_fast_unmark_block_bitmap, ext2fs_fast_test_block_bitmap,
+ ext2fs_fast_mark_inode_bitmap, ext2fs_fast_unmark_inode_bitmap,
+ ext2fs_fast_test_inode_bitmap): Add fast version of these
+ functions, which don't do range checking.
+
+ * bitops.h (ext2fs_get_block_bitmap_start,
+ ext2fs_get_inode_bitmap_start, ext2fs_get_block_bitmap_end,
+ ext2fs_get_inode_bitmap_end): Add new accessor functions
+ which return the start and end points of the bitmaps.
+
+Tue Jul 11 18:59:41 1995 <tytso at rsx-11.mit.edu>
+
+ * llseek.c (ext2_llseek): If the offset is small enough, use lseek
+ instead of llseek. The errno if the offset is too large
+ and lseek is not supported should be EINVAL, not -EINVAL.
+
+Thu Jun 15 23:43:02 1995 Remy Card <card at bbj>
+
+ * Makefile.in: Added support for ELF shared libraries.
+ Fixed typos in the compilation rules.
+ (distclean): Added Makefile.
+
+ * llseek.c (llseek): New function, if llseek() does not exist in the
+ C library.
+ (ext2_llseek): Changed to call llseek().
+
+Mon Jun 12 08:29:07 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * ext2fs.h: Use __u32 to define blk_t, instead of unsigned long.
+
+Sun Jun 11 15:02:54 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * mkdir.c (ext2fs_mkdir): Use LINUX_S_IFDIR instead of S_IFDIR.
+
+ * ext2fs.h (LINUX_S_IFDIR): Define a linux specific versions of
+ the S_*, which are normally defined in <sys/stat.h>. This
+ allows us to compile e2fsprogs on a non-Linux system,
+ which may have a different value for S_IFDIR.
+
+Sat Jun 10 23:47:05 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * bitops.c (clear_bit, set_bit): Remove calls to cli() and sti();
+ this is a user-mode application!
+
+Thu Jun 8 13:13:22 1995 Miles Bader <miles at churchy.gnu.ai.mit.edu>
+
+ * llseek.c: Put the include of <linux/unistd.h> inside the #ifdef
+ __linux__ so that non-linux systems won't see it.
+
+ * alloc.c: Include <errno.h> if possible.
+ * badblocks.c: Ditto.
+ * bb_inode.c: Ditto.
+ * bitmaps.c: Ditto.
+ * block.c: Ditto.
+ * expanddir.c: Ditto.
+ * get_pathname.c: Ditto.
+ * initialize.c: Ditto.
+ * inode.c: Ditto.
+ * llseek.c: Ditto.
+ * mkdir.c: Ditto.
+ * namei.c: Ditto.
+ * newdir.c: Ditto.
+ * openfs.c: Ditto.
+ * rw_bitmaps.c: Ditto.
+ * unix_io.c: Ditto.
+
+ * Makefile.in: Rewritten to conform to GNU coding standards and
+ support separate compilation directories.
+
+Thu May 11 04:13:12 1995 <tytso at rsx-11.mit.edu>
+
+ * initialize.c (ext2fs_initialize): Don't allow more than one
+ bitmaps's worth of inodes in a group.
+
+Sat Mar 11 14:07:11 1995 Theodore Y. Ts'o <tytso at localhost>
+
+ * llseek.c (ext2_llseek): Added error checking to the llseek()
+ compat code to protect against overflow. This only
+ applies to 1.0 and early 1.1 kernels, which don't support
+ the llseek() system call.
+
+Thu Nov 24 16:29:00 1994 Theodore Y. Ts'o (tytso at rt-11)
+
+ * unix_io.c (unix_open): Initialize the read_error and write_error
+ io_channel pointers to be null.
+
+ * bb_inode.c (clear_bad_block_proc): If an illegal block number is
+ found, clear it but don't try to update the filesystem
+ accounting information, since that's hopeless anyway.
+
+ * block.c (bloblock_iterate_ind, bloblock_iterate_dind,
+ bloblock_iterate_tind): Check to see if the indirect blocks are
+ valid before trying to read them.
+
+ * ext2_err.et (EXT2_ET_BAD_IND_BLOCK, EX2_ET_BAD_DIND_BLOCK,
+ EXT2_ET_BAD_TIND_BLOCK): Add new error codes.
+
+ * bitops.h (ext2fs_mark_block_bitmap, ext2fs_unmark_block_bitmap,
+ ext2fs_test_block_bitmap, ext2fs_mark_inode_bitmap,
+ ext2fs_unmark_inode_bitmap, ext2fs_test_inode_bitmap): If an
+ illegal block or inode number is passed in, return instead
+ of trying to test, set, or clear the bit.
+
+Mon Nov 7 21:32:33 1994 Remy Card <card at bbj>
+
+ * Makefile: Added a dummy install target in case shared libraries
+ are not built.
+
+Mon Oct 24 14:11:44 1994 (tytso at rsx-11)
+
+ * bitmaps.c (ext2fs_allocate_block_bitmap): Fix calculation of how
+ the real last block of the bitmap should be calculated.
+
+Wed Sep 7 10:05:36 1994 (tytso at rsx-11)
+
+ * bitmaps.c (ext2fs_fudge_inode_bitmap_end,
+ ext2fs_fudge_block_bitmap_end, ext2fs_clear_inode_bitmap,
+ ext2fs_clear_block_bitmap, ext2fs_free_inode_bitmap,
+ ext2fs_free_block_bitmap): Add magic number checking for
+ the inode and block bitmaps.
+
+ * bitmaps.c (ext2fs_allocate_block_bitmap): Fix to set the correct
+ magic number for a block bitmap instead of an inode bitmap.
+
+ * inode.c (ext2fs_close_inode_scan, ext2fs_get_next_inode): Add
+ magic number checking for the inode_scan structure.
+
+ * badblocks.c (badblocks_list_free, badblocks_list_add,
+ badblocks_list_test, badblocks_list_iterate_begin,
+ badblocks_list_iterate, badblocks_list_iterate_end): Add
+ magic number checking for the badblocks_list and
+ badblocks_iterate structures.
+
+ * ext2_err.et (EXT2_ET_MAGIC_UNIX_IO_CHANNEL):
+ * unix_io.c (unix_open, unix_close, unix_set_blksize, unix_read_blk,
+ unix_write_blk, unix_flush): Add magic number checking
+ both for io_channel structure and unix_private_data
+ structure.
+
+ * openfs.c (ext2fs_open): Add check for io_manager structure's
+ magic number.
+
+ * rw_bitmaps.c (ext2fs_write_inode_bitmap, ext2fs_write_block_bitmap,
+ ext2fs_read_inode_bitmap, ext2fs_read_block_bitmap,
+ ext2fs_read_bitmaps, ext2fs_write_bitmaps):
+ * read_bb.c (ext2fs_read_bb_inode):
+ * read_bb_file.c (ext2fs_read_bb_FILE):
+ * newdir.c (ext2fs_new_dir_block):
+ * namei.c (ext2fs_dir_iterate, ext2fs_lookup, ext2fs_namei):
+ * link.c (ext2fs_link, ext2fs_unlink):
+ * inode.c (ext2fs_open_inode_scan, ext2fs_read_inode,
+ ext2fs_write_inode, ext2fs_get_blocks,
+ ext2fs_check_directory):
+ * get_pathname.c (ext2fs_get_pathname):
+ * expanddir.c (ext2fs_expand_dir):
+ * block.c (ext2fs_block_iterate):
+ * bitmaps.c (ext2fs_allocate_inode_bitmap,
+ ext2fs_allocate_block_bitmap):
+ * bb_inode.c (ext2fs_update_bb_inode):
+ * alloc.c (ext2fs_new_inode,ext2fs_new_block,ext2fs_get_free_blocks):
+ * check_desc.c (ext2fs_check_desc):
+ * closefs.c (ext2fs_close, ext2fs_flush):
+ * freefs.c (ext2fs_free): Add check for ext2_filsys magic number.
+
+ * Makefile:
+ * ext2fs.h:
+ * openfs.c:
+ * check_desc.c (ext2fs_check_desc): Move ext2fs_check_desc from
+ openfs.c into its own file.
+
+ * ext2fs.h (EXT2_CHECK_MAGIC): Added macro for checking for
+ structure magic numbers.
+
+ * closefs.c (ext2fs_flush): Folded in Remy Card's changes to clear
+ the EXT2_VALID_FS flag in the backup superblock blocks, so that if
+ someone uses the -b option to specify the use of the backup
+ superblock --- this usually means that the main superblock is
+ toast. :-)
+
+ * ext2fs.h:
+ * ext2_err.et (EXT2_ET_REV_TOO_HIGH):
+ * openfs.c (ext2fs_open): Folded in Remy Card's changes to add a
+ revision level to the superblock.
+
+Sun Aug 21 00:50:08 1994 Theodore Y. Ts'o (tytso at rt-11)
+
+ * ext2fs.h:
+ * bitmaps.c:
+ * bitops.c
+ * bitops.h:
+ * openfs.c:
+ * initialize.c: Completely revamped the inode and block bitmap
+ structures, so that they can be better chance of being extensible
+ in a shared library. They are now their own type, instead of
+ being a char *. Also, the function signatures of
+ ext2fs_test_block_bitmap, ext2fs_mark_block_bitmap,
+ ext2fs_unmark_block_bitmap, ext2fs_test_inode_bitmap,
+ ext2fs_mark_inode_bitmap, and ext2fs_unmark_inode_bitmap were
+ changed to eliminate the ext2_filsys argument, since it is no
+ longer necessary.
+
+Wed Aug 17 21:46:44 1994 Remy Card (card at bbj)
+
+ * unix_io.c (unix_read_blk and unix_write_blk): use the llseek
+ system call if available.
+
+ * llseek.c: new file. This is the stub calling the llseek system
+ call which allows supports for 2GB+ file systems.
+
+ * initialize.c (ext2fs_initialize): Ext2fs_initialize now stores
+ the creator operating system.
+
+Wed Aug 17 10:03:24 1994 Theodore Y. Ts'o (tytso at rt-11)
+
+ * initialize.c (ext2fs_initialize): Ext2fs_initialize now sets up
+ the group descriptor statistics in addition to everything else.
+ This relieves mke2fs of the responsibility of doing it.
+
+ * bitops.c, bitops.h: Add assembly inline functions for the 68000.
+ Added a new #define, _EXT2_HAVE_ASM_BITOPS_ to control whether or
+ not the generic C function equivalents should be included or not.
+
+ * openfs.c (ext2fs_open): If a superblock is specified, then use
+ the backup group descriptors that go along with this superblock,
+ instead of using the primary group descriptors. This allows
+ e2fsck to recover filesystems where the primary group descriptors
+ have been trashed.
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/Makefile.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/Makefile.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/Makefile.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,489 @@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = lib/ext2fs
+INSTALL = @INSTALL@
+
+ at MCONFIG@
+
+ at DEBUGFS_CMT@DEBUGFS_LIB_OBJS = bb_compat.o cmp_bitmaps.o dupfs.o inode_io.o fileio.o \
+ at DEBUGFS_CMT@ namei.o test_io.o write_bb_file.o
+
+ at RESIZER_CMT@RESIZE_LIB_OBJS = rs_bitmap.o
+
+ at IMAGER_CMT@E2IMAGE_LIB_OBJS = imager.o
+
+OBJS= $(DEBUGFS_LIB_OBJS) $(RESIZE_LIB_OBJS) $(E2IMAGE_LIB_OBJS) \
+ ext2_err.o \
+ alloc.o \
+ alloc_stats.o \
+ alloc_tables.o \
+ badblocks.o \
+ bb_inode.o \
+ bitmaps.o \
+ bitops.o \
+ block.o \
+ bmap.o \
+ check_desc.o \
+ closefs.o \
+ dblist.o \
+ dblist_dir.o \
+ dirblock.o \
+ dir_iterate.o \
+ expanddir.o \
+ ext_attr.o \
+ finddev.o \
+ flushb.o \
+ freefs.o \
+ gen_bitmap.o \
+ get_pathname.o \
+ getsize.o \
+ icount.o \
+ initialize.o \
+ inline.o \
+ inode.o \
+ ismounted.o \
+ link.o \
+ llseek.o \
+ lookup.o \
+ mkdir.o \
+ mkjournal.o \
+ native.o \
+ newdir.o \
+ openfs.o \
+ read_bb.o \
+ read_bb_file.o \
+ rw_bitmaps.o \
+ swapfs.o \
+ unix_io.o \
+ unlink.o \
+ valid_blk.o \
+ version.o
+
+SRCS= ext2_err.c \
+ $(srcdir)/alloc.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)/block.c \
+ $(srcdir)/bmap.c \
+ $(srcdir)/check_desc.c \
+ $(srcdir)/closefs.c \
+ $(srcdir)/cmp_bitmaps.c \
+ $(srcdir)/dblist.c \
+ $(srcdir)/dblist_dir.c \
+ $(srcdir)/dirblock.c \
+ $(srcdir)/dir_iterate.c \
+ $(srcdir)/dupfs.c \
+ $(srcdir)/expanddir.c \
+ $(srcdir)/ext_attr.c \
+ $(srcdir)/fileio.c \
+ $(srcdir)/finddev.c \
+ $(srcdir)/flushb.c \
+ $(srcdir)/freefs.c \
+ $(srcdir)/gen_bitmap.c \
+ $(srcdir)/get_pathname.c \
+ $(srcdir)/getsize.c \
+ $(srcdir)/icount.c \
+ $(srcdir)/imager.c \
+ $(srcdir)/initialize.c \
+ $(srcdir)/inline.c \
+ $(srcdir)/inode.c \
+ $(srcdir)/inode_io.c \
+ $(srcdir)/ismounted.c \
+ $(srcdir)/link.c \
+ $(srcdir)/llseek.c \
+ $(srcdir)/lookup.c \
+ $(srcdir)/mkdir.c \
+ $(srcdir)/mkjournal.c \
+ $(srcdir)/namei.c \
+ $(srcdir)/native.c \
+ $(srcdir)/newdir.c \
+ $(srcdir)/openfs.c \
+ $(srcdir)/read_bb.c \
+ $(srcdir)/read_bb_file.c \
+ $(srcdir)/rs_bitmap.c \
+ $(srcdir)/rw_bitmaps.c \
+ $(srcdir)/swapfs.c \
+ $(srcdir)/test_io.c \
+ $(srcdir)/unix_io.c \
+ $(srcdir)/unlink.c \
+ $(srcdir)/valid_blk.c \
+ $(srcdir)/version.c \
+ $(srcdir)/write_bb_file.c \
+ $(srcdir)/tst_badblocks.c \
+ $(srcdir)/tst_bitops.c \
+ $(srcdir)/tst_byteswap.c \
+ $(srcdir)/tst_getsize.c \
+ $(srcdir)/tst_iscan.c
+
+HFILES= bitops.h ext2fs.h ext2_io.h ext2_fs.h ext2_ext_attr.h
+HFILES_IN= ext2_err.h ext2_types.h
+
+LIBRARY= libext2fs
+LIBDIR= ext2fs
+
+DLL_ADDRESS = 0x66900000
+DLL_JUMPSIZE = 0x1000
+DLL_GOTSIZE = 0x1000
+DLL_VERSION = 1.2
+DLL_IMAGE = libe2fs
+DLL_STUB = libext2fs
+DLL_LIBS = -L../.. -lcom_err
+DLL_MYDIR = ext2fs
+DLL_INSTALL_DIR = $(root_libdir)
+
+ELF_VERSION = 2.4
+ELF_SO_VERSION = 2
+ELF_IMAGE = libext2fs
+ELF_MYDIR = ext2fs
+ELF_INSTALL_DIR = $(root_libdir)
+ELF_OTHER_LIBS = -L../.. -lcom_err
+
+BSDLIB_VERSION = 2.1
+BSDLIB_IMAGE = libext2fs
+BSDLIB_MYDIR = ext2fs
+BSDLIB_INSTALL_DIR = $(root_libdir)
+
+ at MAKEFILE_LIBRARY@
+ at MAKEFILE_DLL@
+ at MAKEFILE_ELF@
+ at MAKEFILE_BSDLIB@
+ at MAKEFILE_PROFILE@
+ at MAKEFILE_CHECKER@
+
+.c.o:
+ $(CC) $(ALL_CFLAGS) -c $< -o $@
+ at PROFILE_CMT@ $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+ at CHECKER_CMT@ $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
+ at DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) $(ALL_CFLAGS) \
+ at DLL_CMT@ -o jump/$*.o -c $<)
+ at ELF_CMT@ $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
+ at BSDLIB_CMT@ $(CC) $(ALL_CFLAGS) -fpic -o pic/$*.o -c $<
+
+COMPILE_ET=../et/compile_et
+
+DISTFILES= Makefile *.c *.h image
+
+ext2_err.et: $(DEP_SUBSTITUTE) $(srcdir)/ext2_err.et.in
+ $(SUBSTITUTE) $(srcdir)/ext2_err.et.in ext2_err.et
+
+ext2_err.c ext2_err.h: ext2_err.et
+ $(COMPILE_ET) ext2_err.et
+
+tst_badblocks: tst_badblocks.o freefs.o \
+ read_bb_file.o write_bb_file.o badblocks.o
+ $(CC) -o tst_badblocks tst_badblocks.o freefs.o \
+ read_bb_file.o write_bb_file.o badblocks.o \
+ inline.o bitops.o gen_bitmap.o $(LIBCOM_ERR)
+
+tst_iscan: tst_iscan.o inode.o badblocks.o test_io.o $(STATIC_LIBEXT2FS)
+ $(CC) -o tst_iscan tst_iscan.o inode.o badblocks.o test_io.o \
+ $(STATIC_LIBEXT2FS) $(LIBCOM_ERR)
+
+tst_getsize: tst_getsize.o getsize.o $(STATIC_LIBEXT2FS)
+ $(CC) -o tst_getsize tst_getsize.o getsize.o $(STATIC_LIBEXT2FS) \
+ $(LIBCOM_ERR)
+
+tst_ismounted: $(srcdir)/ismounted.c $(STATIC_LIBEXT2FS)
+ $(CC) -o tst_ismounted $(srcdir)/ismounted.c -DDEBUG $(ALL_CFLAGS) $(LIBCOM_ERR)
+
+tst_byteswap: tst_byteswap.o bitops.o $(STATIC_LIBEXT2FS)
+ $(CC) -o tst_byteswap tst_byteswap.o bitops.o $(STATIC_LIBEXT2FS) \
+ $(LIBCOM_ERR)
+
+tst_bitops: tst_bitops.o inline.o $(STATIC_LIBEXT2FS)
+ $(CC) -o tst_bitops tst_bitops.o inline.o \
+ $(STATIC_LIBEXT2FS) $(LIBCOM_ERR)
+
+mkjournal: mkjournal.c $(STATIC_LIBEXT2FS)
+ $(CC) -o mkjournal $(srcdir)/mkjournal.c -DDEBUG $(STATIC_LIBEXT2FS) $(LIBCOM_ERR) $(ALL_CFLAGS)
+
+check:: tst_badblocks tst_iscan tst_byteswap
+ LD_LIBRARY_PATH=$(LIB) ./tst_badblocks
+ LD_LIBRARY_PATH=$(LIB) ./tst_iscan
+ LD_LIBRARY_PATH=$(LIB) ./tst_byteswap
+
+installdirs::
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(includedir)/ext2fs
+
+install:: all $(HFILES) $(HFILES_IN) installdirs
+ $(INSTALL_DATA) libext2fs.a $(DESTDIR)$(libdir)/libext2fs.a
+ $(CHMOD) 644 $(DESTDIR)$(libdir)/libext2fs.a
+ -$(RANLIB) $(DESTDIR)$(libdir)/libext2fs.a
+ $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libext2fs.a
+ for i in $(HFILES); do \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/ext2fs/$$i; \
+ done
+ for i in $(HFILES_IN); do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(includedir)/ext2fs/$$i; \
+ done
+
+uninstall::
+ $(RM) -f $(DESTDIR)$(libdir)/libext2fs.a
+ $(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 mkjournal \
+ ../libext2fs.a ../libext2fs_p.a ../libext2fs_chk.a
+
+mostlyclean:: clean
+distclean:: clean
+ $(RM) -f .depend ext2_err.c ext2_err.h Makefile \
+ $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+#
+# Hack to parallel makes recognize dependencies correctly.
+#
+$(top_builddir)/lib/ext2fs/ext2_err.h: ext2_err.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 $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+alloc_stats.o: $(srcdir)/alloc_stats.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+alloc_tables.o: $(srcdir)/alloc_tables.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+badblocks.o: $(srcdir)/badblocks.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+bb_compat.o: $(srcdir)/bb_compat.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+bb_inode.o: $(srcdir)/bb_inode.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+bitmaps.o: $(srcdir)/bitmaps.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+bitops.o: $(srcdir)/bitops.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+block.o: $(srcdir)/block.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+bmap.o: $(srcdir)/bmap.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+check_desc.o: $(srcdir)/check_desc.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+closefs.o: $(srcdir)/closefs.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+cmp_bitmaps.o: $(srcdir)/cmp_bitmaps.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+dblist.o: $(srcdir)/dblist.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+dblist_dir.o: $(srcdir)/dblist_dir.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+dirblock.o: $(srcdir)/dirblock.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+dir_iterate.o: $(srcdir)/dir_iterate.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+dupfs.o: $(srcdir)/dupfs.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+expanddir.o: $(srcdir)/expanddir.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+ext_attr.o: $(srcdir)/ext_attr.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2_ext_attr.h \
+ $(srcdir)/ext2fs.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+fileio.o: $(srcdir)/fileio.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+finddev.o: $(srcdir)/finddev.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+flushb.o: $(srcdir)/flushb.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+freefs.o: $(srcdir)/freefs.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+gen_bitmap.o: $(srcdir)/gen_bitmap.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+get_pathname.o: $(srcdir)/get_pathname.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+getsize.o: $(srcdir)/getsize.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+icount.o: $(srcdir)/icount.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+imager.o: $(srcdir)/imager.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+initialize.o: $(srcdir)/initialize.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+inline.o: $(srcdir)/inline.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+inode.o: $(srcdir)/inode.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \
+ $(srcdir)/ext2fs.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h $(srcdir)/e2image.h
+inode_io.o: $(srcdir)/inode_io.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+ismounted.o: $(srcdir)/ismounted.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+link.o: $(srcdir)/link.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+llseek.o: $(srcdir)/llseek.c $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_io.h
+lookup.o: $(srcdir)/lookup.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+mkdir.o: $(srcdir)/mkdir.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+mkjournal.o: $(srcdir)/mkjournal.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/e2p/e2p.h \
+ $(srcdir)/ext2fs.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h \
+ $(srcdir)/jfs_user.h $(srcdir)/kernel-jbd.h $(srcdir)/jfs_compat.h \
+ $(srcdir)/kernel-list.h
+namei.o: $(srcdir)/namei.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+native.o: $(srcdir)/native.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+newdir.o: $(srcdir)/newdir.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+openfs.o: $(srcdir)/openfs.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h $(srcdir)/e2image.h
+read_bb.o: $(srcdir)/read_bb.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+read_bb_file.o: $(srcdir)/read_bb_file.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+rs_bitmap.o: $(srcdir)/rs_bitmap.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+rw_bitmaps.o: $(srcdir)/rw_bitmaps.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h $(srcdir)/e2image.h
+swapfs.o: $(srcdir)/swapfs.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+test_io.o: $(srcdir)/test_io.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+unix_io.o: $(srcdir)/unix_io.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+unlink.o: $(srcdir)/unlink.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+valid_blk.o: $(srcdir)/valid_blk.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+version.o: $(srcdir)/version.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h \
+ $(top_srcdir)/version.h
+write_bb_file.o: $(srcdir)/write_bb_file.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+tst_badblocks.o: $(srcdir)/tst_badblocks.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+tst_bitops.o: $(srcdir)/tst_bitops.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+tst_byteswap.o: $(srcdir)/tst_byteswap.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+tst_getsize.o: $(srcdir)/tst_getsize.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
+tst_iscan.o: $(srcdir)/tst_iscan.c $(srcdir)/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/bitops.h
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/alloc.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/alloc.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/alloc.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,172 @@
+/*
+ * 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 Public
+ * License.
+ * %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"
+
+/*
+ * 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_inode_bitmap map, ext2_ino_t *ret)
+{
+ ext2_ino_t dir_group = 0;
+ ext2_ino_t i;
+ ext2_ino_t start_inode;
+
+ 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)
+ dir_group = (dir - 1) / EXT2_INODES_PER_GROUP(fs->super);
+
+ start_inode = (dir_group * EXT2_INODES_PER_GROUP(fs->super)) + 1;
+ if (start_inode < EXT2_FIRST_INODE(fs->super))
+ start_inode = EXT2_FIRST_INODE(fs->super);
+ i = start_inode;
+
+ do {
+ if (!ext2fs_fast_test_inode_bitmap(map, i))
+ break;
+ i++;
+ if (i > fs->super->s_inodes_count)
+ i = EXT2_FIRST_INODE(fs->super);
+ } while (i != start_inode);
+
+ if (ext2fs_test_inode_bitmap(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_block(ext2_filsys fs, blk_t goal,
+ ext2fs_block_bitmap map, blk_t *ret)
+{
+ blk_t i;
+
+ 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 >= fs->super->s_blocks_count))
+ goal = fs->super->s_first_data_block;
+ i = goal;
+ do {
+ if (!ext2fs_fast_test_block_bitmap(map, i)) {
+ *ret = i;
+ return 0;
+ }
+ i++;
+ if (i >= fs->super->s_blocks_count)
+ i = fs->super->s_first_data_block;
+ } while (i != goal);
+ return EXT2_ET_BLOCK_ALLOC_FAIL;
+}
+
+/*
+ * This function zeros out the allocated block, and updates all of the
+ * appropriate filesystem records.
+ */
+errcode_t ext2fs_alloc_block(ext2_filsys fs, blk_t goal,
+ char *block_buf, blk_t *ret)
+{
+ errcode_t retval;
+ blk_t block;
+ char *buf = 0;
+
+ if (!block_buf) {
+ retval = ext2fs_get_mem(fs->blocksize, (void **) &buf);
+ if (retval)
+ return retval;
+ block_buf = buf;
+ }
+ memset(block_buf, 0, fs->blocksize);
+
+ if (!fs->block_map) {
+ retval = ext2fs_read_block_bitmap(fs);
+ if (retval)
+ goto fail;
+ }
+
+ retval = ext2fs_new_block(fs, goal, 0, &block);
+ if (retval)
+ goto fail;
+
+ retval = io_channel_write_blk(fs->io, block, 1, block_buf);
+ if (retval)
+ goto fail;
+
+ ext2fs_block_alloc_stats(fs, block, +1);
+ *ret = block;
+ return 0;
+
+fail:
+ if (buf)
+ ext2fs_free_mem((void **) &buf);
+ return retval;
+}
+
+errcode_t ext2fs_get_free_blocks(ext2_filsys fs, blk_t start, blk_t finish,
+ int num, ext2fs_block_bitmap map, blk_t *ret)
+{
+ blk_t b = start;
+
+ 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;
+ do {
+ if (b+num-1 > fs->super->s_blocks_count)
+ b = fs->super->s_first_data_block;
+ if (ext2fs_fast_test_block_bitmap_range(map, b, num)) {
+ *ret = b;
+ return 0;
+ }
+ b++;
+ } while (b != finish);
+ return EXT2_ET_BLOCK_ALLOC_FAIL;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/alloc_stats.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/alloc_stats.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/alloc_stats.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,52 @@
+/*
+ * 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 Public
+ * License.
+ * %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);
+
+ if (inuse > 0)
+ ext2fs_mark_inode_bitmap(fs->inode_map, ino);
+ else
+ ext2fs_unmark_inode_bitmap(fs->inode_map, ino);
+ fs->group_desc[group].bg_free_inodes_count -= inuse;
+ if (isdir)
+ fs->group_desc[group].bg_used_dirs_count += inuse;
+ 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_stats(ext2_filsys fs, blk_t blk, int inuse)
+{
+ int group = ext2fs_group_of_blk(fs, blk);
+
+ if (inuse > 0)
+ ext2fs_mark_block_bitmap(fs->block_map, blk);
+ else
+ ext2fs_unmark_block_bitmap(fs->block_map, blk);
+ fs->group_desc[group].bg_free_blocks_count -= inuse;
+ fs->super->s_free_blocks_count -= inuse;
+ ext2fs_mark_super_dirty(fs);
+ ext2fs_mark_bb_dirty(fs);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/alloc_tables.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/alloc_tables.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/alloc_tables.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,120 @@
+/*
+ * 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 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 "ext2fs.h"
+
+errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group,
+ ext2fs_block_bitmap bmap)
+{
+ errcode_t retval;
+ blk_t group_blk, start_blk, last_blk, new_blk, blk;
+ int j;
+
+ group_blk = fs->super->s_first_data_block +
+ (group * fs->super->s_blocks_per_group);
+
+ last_blk = group_blk + fs->super->s_blocks_per_group;
+ if (last_blk >= fs->super->s_blocks_count)
+ last_blk = fs->super->s_blocks_count - 1;
+
+ start_blk = group_blk + 3 + fs->desc_blocks;
+ if (start_blk > last_blk)
+ start_blk = group_blk;
+
+ if (!bmap)
+ bmap = fs->block_map;
+
+ /*
+ * Allocate the inode table
+ */
+ if (!fs->group_desc[group].bg_inode_table) {
+ retval = ext2fs_get_free_blocks(fs, start_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_bitmap(bmap, blk);
+ fs->group_desc[group].bg_inode_table = new_blk;
+ }
+
+ /*
+ * Allocate the block and inode bitmaps, if necessary
+ */
+ if (fs->stride) {
+ start_blk += fs->inode_blocks_per_group;
+ start_blk += ((fs->stride * group) %
+ (last_blk - start_blk));
+ if (start_blk > last_blk)
+ /* should never happen */
+ start_blk = group_blk;
+ } else
+ start_blk = group_blk;
+
+ if (!fs->group_desc[group].bg_block_bitmap) {
+ retval = ext2fs_get_free_blocks(fs, start_blk, last_blk,
+ 1, bmap, &new_blk);
+ if (retval == EXT2_ET_BLOCK_ALLOC_FAIL)
+ retval = ext2fs_get_free_blocks(fs, group_blk,
+ last_blk, 1, bmap, &new_blk);
+ if (retval)
+ return retval;
+ ext2fs_mark_block_bitmap(bmap, new_blk);
+ fs->group_desc[group].bg_block_bitmap = new_blk;
+ }
+
+ if (!fs->group_desc[group].bg_inode_bitmap) {
+ retval = ext2fs_get_free_blocks(fs, start_blk, last_blk,
+ 1, bmap, &new_blk);
+ if (retval == EXT2_ET_BLOCK_ALLOC_FAIL)
+ retval = ext2fs_get_free_blocks(fs, group_blk,
+ last_blk, 1, bmap, &new_blk);
+ if (retval)
+ return retval;
+ ext2fs_mark_block_bitmap(bmap, new_blk);
+ fs->group_desc[group].bg_inode_bitmap = new_blk;
+ }
+ return 0;
+}
+
+
+
+errcode_t ext2fs_allocate_tables(ext2_filsys fs)
+{
+ errcode_t retval;
+ dgrp_t i;
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ retval = ext2fs_allocate_group_table(fs, i, fs->block_map);
+ if (retval)
+ return retval;
+ }
+ return 0;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/badblocks.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/badblocks.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/badblocks.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,236 @@
+/*
+ * 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 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"
+
+/*
+ * Helper function for making a badblocks list
+ */
+static errcode_t make_badblocks_list(int size, int num, blk_t *list,
+ ext2_badblocks_list *ret)
+{
+ ext2_badblocks_list bb;
+ errcode_t retval;
+
+ retval = ext2fs_get_mem(sizeof(struct ext2_struct_badblocks_list),
+ (void **) &bb);
+ if (retval)
+ return retval;
+ memset(bb, 0, sizeof(struct ext2_struct_badblocks_list));
+ bb->magic = EXT2_ET_MAGIC_BADBLOCKS_LIST;
+ bb->size = size ? size : 10;
+ bb->num = num;
+ retval = ext2fs_get_mem(bb->size * sizeof(blk_t), (void **) &bb->list);
+ if (!bb->list) {
+ ext2fs_free_mem((void **) &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 badblocks list.
+ */
+errcode_t ext2fs_badblocks_list_create(ext2_badblocks_list *ret, int size)
+{
+ return make_badblocks_list(size, 0, 0, ret);
+}
+
+/*
+ * This procedure copies a badblocks list
+ */
+errcode_t ext2fs_badblocks_copy(ext2_badblocks_list src,
+ ext2_badblocks_list *dest)
+{
+ errcode_t retval;
+
+ retval = make_badblocks_list(src->size, src->num, src->list,
+ dest);
+ if (retval)
+ return retval;
+ (*dest)->badblocks_flags = src->badblocks_flags;
+ return 0;
+}
+
+
+/*
+ * This procedure frees a badblocks list.
+ *
+ * (note: moved to closefs.c)
+ */
+
+
+/*
+ * This procedure adds a block to a badblocks list.
+ */
+errcode_t ext2fs_badblocks_list_add(ext2_badblocks_list bb, blk_t 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(blk_t);
+ bb->size += 100;
+ retval = ext2fs_resize_mem(old_size, bb->size * sizeof(blk_t),
+ (void **) &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;
+}
+
+/*
+ * This procedure tests to see if a particular block is on a badblocks
+ * list.
+ */
+int ext2fs_badblocks_list_test(ext2_badblocks_list bb, blk_t blk)
+{
+ int low, high, mid;
+
+ if (bb->magic != EXT2_ET_MAGIC_BADBLOCKS_LIST)
+ return 0;
+
+ if (bb->num == 0)
+ return 0;
+
+ low = 0;
+ high = bb->num-1;
+ if (blk == bb->list[low])
+ return 1;
+ if (blk == bb->list[high])
+ return 1;
+
+ while (low < high) {
+ mid = (low+high)/2;
+ if (mid == low || mid == high)
+ break;
+ if (blk == bb->list[mid])
+ return 1;
+ if (blk < bb->list[mid])
+ high = mid;
+ else
+ low = mid;
+ }
+ return 0;
+}
+
+errcode_t ext2fs_badblocks_list_iterate_begin(ext2_badblocks_list bb,
+ ext2_badblocks_iterate *ret)
+{
+ ext2_badblocks_iterate iter;
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(bb, EXT2_ET_MAGIC_BADBLOCKS_LIST);
+
+ retval = ext2fs_get_mem(sizeof(struct ext2_struct_badblocks_iterate),
+ (void **) &iter);
+ if (retval)
+ return retval;
+
+ iter->magic = EXT2_ET_MAGIC_BADBLOCKS_ITERATE;
+ iter->bb = bb;
+ iter->ptr = 0;
+ *ret = iter;
+ return 0;
+}
+
+int ext2fs_badblocks_list_iterate(ext2_badblocks_iterate iter, blk_t *blk)
+{
+ ext2_badblocks_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;
+}
+
+void ext2fs_badblocks_list_iterate_end(ext2_badblocks_iterate iter)
+{
+ if (!iter || (iter->magic != EXT2_ET_MAGIC_BADBLOCKS_ITERATE))
+ return;
+
+ iter->bb = 0;
+ ext2fs_free_mem((void **) &iter);
+}
+
+int ext2fs_badblocks_equal(ext2_badblocks_list bb1, ext2_badblocks_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;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bb_compat.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bb_compat.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bb_compat.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 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"
+
+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);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bb_inode.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bb_inode.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bb_inode.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,264 @@
+/*
+ * 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 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 "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;
+
+ rec.bad_block_count = 0;
+ rec.ind_blocks_size = rec.ind_blocks_ptr = 0;
+ rec.max_ind_blocks = 10;
+ retval = ext2fs_get_mem(rec.max_ind_blocks * sizeof(blk_t),
+ (void **) &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, (void **) &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 = time(0);
+ if (!inode.i_ctime)
+ inode.i_ctime = time(0);
+ inode.i_blocks = rec.bad_block_count * (fs->blocksize / 512);
+ 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((void **) &rec.ind_blocks);
+ ext2fs_free_mem((void **) &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, int ref_offset,
+ 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 >= fs->super->s_blocks_count ||
+ *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),
+ (void **) &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_stats(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,
+ int ref_offset, 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_bitmap(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_blk(fs->io, blk, 1, rec->block_buf);
+ if (retval) {
+ rec->err = retval;
+ return BLOCK_ABORT;
+ }
+ }
+
+ /*
+ * Update block counts
+ */
+ ext2fs_block_alloc_stats(fs, blk, +1);
+
+ *block_nr = blk;
+ return BLOCK_CHANGED;
+}
+
+
+
+
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bitmaps.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bitmaps.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bitmaps.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,213 @@
+/*
+ * 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 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 "ext2fs.h"
+
+static errcode_t make_bitmap(__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),
+ (void **) &bitmap);
+ if (retval)
+ return retval;
+
+ bitmap->magic = EXT2_ET_MAGIC_GENERIC_BITMAP;
+ bitmap->fs = NULL;
+ bitmap->start = start;
+ bitmap->end = end;
+ bitmap->real_end = real_end;
+ bitmap->base_error_code = EXT2_ET_BAD_GENERIC_MARK;
+ if (descr) {
+ retval = ext2fs_get_mem(strlen(descr)+1,
+ (void **) &bitmap->description);
+ if (retval) {
+ ext2fs_free_mem((void **) &bitmap);
+ return retval;
+ }
+ strcpy(bitmap->description, descr);
+ } else
+ bitmap->description = 0;
+
+ size = (size_t) (((bitmap->real_end - bitmap->start) / 8) + 1);
+ retval = ext2fs_get_mem(size, (void **) &bitmap->bitmap);
+ if (retval) {
+ ext2fs_free_mem((void **) &bitmap->description);
+ ext2fs_free_mem((void **) &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 make_bitmap(start, end, real_end, descr, 0, ret);
+}
+
+errcode_t ext2fs_copy_bitmap(ext2fs_generic_bitmap src,
+ ext2fs_generic_bitmap *dest)
+{
+ errcode_t retval;
+ ext2fs_generic_bitmap new_map;
+
+ retval = make_bitmap(src->start, src->end, src->real_end,
+ src->description, src->bitmap, &new_map);
+ if (retval)
+ return retval;
+ new_map->magic = src->magic;
+ new_map->fs = src->fs;
+ new_map->base_error_code = src->base_error_code;
+ *dest = new_map;
+ return 0;
+}
+
+void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map)
+{
+ __u32 i, j;
+
+ for (i=map->end+1, j = i - map->start; i <= map->real_end; i++, j++)
+ ext2fs_set_bit(j, map->bitmap);
+
+ return;
+}
+
+errcode_t ext2fs_allocate_inode_bitmap(ext2_filsys fs,
+ const char *descr,
+ ext2fs_inode_bitmap *ret)
+{
+ ext2fs_inode_bitmap bitmap;
+ errcode_t retval;
+ __u32 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);
+
+ retval = ext2fs_allocate_generic_bitmap(start, end, real_end,
+ descr, &bitmap);
+ if (retval)
+ return retval;
+
+ bitmap->magic = EXT2_ET_MAGIC_INODE_BITMAP;
+ bitmap->fs = fs;
+ bitmap->base_error_code = EXT2_ET_BAD_INODE_MARK;
+
+ *ret = bitmap;
+ return 0;
+}
+
+errcode_t ext2fs_allocate_block_bitmap(ext2_filsys fs,
+ const char *descr,
+ ext2fs_block_bitmap *ret)
+{
+ ext2fs_block_bitmap bitmap;
+ errcode_t retval;
+ __u32 start, end, real_end;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ fs->write_bitmaps = ext2fs_write_bitmaps;
+
+ start = fs->super->s_first_data_block;
+ end = fs->super->s_blocks_count-1;
+ real_end = (EXT2_BLOCKS_PER_GROUP(fs->super)
+ * fs->group_desc_count)-1 + start;
+
+ retval = ext2fs_allocate_generic_bitmap(start, end, real_end,
+ descr, &bitmap);
+ if (retval)
+ return retval;
+
+ bitmap->magic = EXT2_ET_MAGIC_BLOCK_BITMAP;
+ bitmap->fs = fs;
+ bitmap->base_error_code = EXT2_ET_BAD_BLOCK_MARK;
+
+ *ret = bitmap;
+ return 0;
+}
+
+errcode_t ext2fs_fudge_inode_bitmap_end(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t end, ext2_ino_t *oend)
+{
+ EXT2_CHECK_MAGIC(bitmap, EXT2_ET_MAGIC_INODE_BITMAP);
+
+ if (end > bitmap->real_end)
+ return EXT2_ET_FUDGE_INODE_BITMAP_END;
+ if (oend)
+ *oend = bitmap->end;
+ bitmap->end = end;
+ return 0;
+}
+
+errcode_t ext2fs_fudge_block_bitmap_end(ext2fs_block_bitmap bitmap,
+ blk_t end, blk_t *oend)
+{
+ EXT2_CHECK_MAGIC(bitmap, EXT2_ET_MAGIC_BLOCK_BITMAP);
+
+ if (end > bitmap->real_end)
+ return EXT2_ET_FUDGE_BLOCK_BITMAP_END;
+ if (oend)
+ *oend = bitmap->end;
+ bitmap->end = end;
+ return 0;
+}
+
+void ext2fs_clear_inode_bitmap(ext2fs_inode_bitmap bitmap)
+{
+ if (!bitmap || (bitmap->magic != EXT2_ET_MAGIC_INODE_BITMAP))
+ return;
+
+ memset(bitmap->bitmap, 0,
+ (size_t) (((bitmap->real_end - bitmap->start) / 8) + 1));
+}
+
+void ext2fs_clear_block_bitmap(ext2fs_block_bitmap bitmap)
+{
+ if (!bitmap || (bitmap->magic != EXT2_ET_MAGIC_BLOCK_BITMAP))
+ return;
+
+ memset(bitmap->bitmap, 0,
+ (size_t) (((bitmap->real_end - bitmap->start) / 8) + 1));
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bitops.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bitops.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bitops.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,91 @@
+/*
+ * 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 Public
+ * License.
+ * %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(int nr,void * addr)
+{
+ int mask, retval;
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ retval = (mask & *ADDR) != 0;
+ *ADDR |= mask;
+ return retval;
+}
+
+int ext2fs_clear_bit(int nr, void * addr)
+{
+ int mask, retval;
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ retval = (mask & *ADDR) != 0;
+ *ADDR &= ~mask;
+ return retval;
+}
+
+int ext2fs_test_bit(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) != 0);
+}
+
+#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, "#%u for %s", arg, description);
+ else
+ com_err(0, errcode, "#%u", arg);
+#endif
+}
+
+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,
+ "#%u for %s", arg, bitmap->description);
+ else
+ com_err(0, bitmap->base_error_code + code, "#%u", arg);
+#endif
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bitops.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bitops.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bitops.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,715 @@
+/*
+ * 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 Public
+ * License.
+ * %End-Header%
+ *
+ * i386 bitops operations taken from <asm/bitops.h>, Copyright 1992,
+ * Linus Torvalds.
+ */
+
+
+extern int ext2fs_set_bit(int nr,void * addr);
+extern int ext2fs_clear_bit(int nr, void * addr);
+extern int ext2fs_test_bit(int nr, const void * addr);
+extern __u16 ext2fs_swab16(__u16 val);
+extern __u32 ext2fs_swab32(__u32 val);
+
+/*
+ * 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);
+
+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_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 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);
+extern void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map);
+
+/* These two routines moved to gen_bitmap.c */
+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);
+/*
+ * 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__) || defined(__mc68000__) || \
+ defined(__sparc__)))
+ /* 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
+#define _INLINE_ extern
+#else
+#ifdef __GNUC__
+#define _INLINE_ extern __inline__
+#else /* For Watcom C */
+#define _INLINE_ extern inline
+#endif
+#endif
+
+#if ((defined __GNUC__) && !defined(_EXT2_USE_C_VERSIONS_) && \
+ (defined(__i386__) || defined(__i486__) || defined(__i586__)))
+
+#define _EXT2_HAVE_ASM_BITOPS_
+#define _EXT2_HAVE_ASM_SWAB_
+#define _EXT2_HAVE_ASM_FINDBIT_
+
+/*
+ * 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(int nr, void * addr)
+{
+ int oldbit;
+
+ __asm__ __volatile__("btsl %2,%1\n\tsbbl %0,%0"
+ :"=r" (oldbit),"=m" (EXT2FS_ADDR)
+ :"r" (nr));
+ return oldbit;
+}
+
+_INLINE_ int ext2fs_clear_bit(int nr, void * addr)
+{
+ int oldbit;
+
+ __asm__ __volatile__("btrl %2,%1\n\tsbbl %0,%0"
+ :"=r" (oldbit),"=m" (EXT2FS_ADDR)
+ :"r" (nr));
+ return oldbit;
+}
+
+_INLINE_ int ext2fs_test_bit(int nr, const void * addr)
+{
+ int oldbit;
+
+ __asm__ __volatile__("btl %2,%1\n\tsbbl %0,%0"
+ :"=r" (oldbit)
+ :"m" (EXT2FS_CONST_ADDR),"r" (nr));
+ return oldbit;
+}
+
+#if 0
+_INLINE_ int ext2fs_find_first_bit_set(void * addr, unsigned size)
+{
+ int d0, d1, d2;
+ int res;
+
+ if (!size)
+ return 0;
+ /* This looks at memory. Mark it volatile to tell gcc not to move it around */
+ __asm__ __volatile__(
+ "cld\n\t"
+ "xorl %%eax,%%eax\n\t"
+ "xorl %%edx,%%edx\n\t"
+ "repe; scasl\n\t"
+ "je 1f\n\t"
+ "movl -4(%%edi),%%eax\n\t"
+ "subl $4,%%edi\n\t"
+ "bsfl %%eax,%%edx\n"
+ "1:\tsubl %%esi,%%edi\n\t"
+ "shll $3,%%edi\n\t"
+ "addl %%edi,%%edx"
+ :"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2)
+ :"1" ((size + 31) >> 5), "2" (addr), "S" (addr));
+ return res;
+}
+
+_INLINE_ int ext2fs_find_next_bit_set (void * addr, int size, int offset)
+{
+ unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
+ int set = 0, bit = offset & 31, res;
+
+ if (bit) {
+ /*
+ * Look for zero in first byte
+ */
+ __asm__("bsfl %1,%0\n\t"
+ "jne 1f\n\t"
+ "movl $32, %0\n"
+ "1:"
+ : "=r" (set)
+ : "r" (*p >> bit));
+ if (set < (32 - bit))
+ return set + offset;
+ set = 32 - bit;
+ p++;
+ }
+ /*
+ * No bit found yet, search remaining full bytes for a bit
+ */
+ res = ext2fs_find_first_bit_set(p, size - 32 * (p - (unsigned long *) addr));
+ return (offset + set + res);
+}
+#endif
+
+#ifdef EXT2FS_ENABLE_SWAPFS
+_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;
+}
+#endif
+
+#undef EXT2FS_ADDR
+
+#endif /* i386 */
+
+#ifdef __mc68000__
+
+#define _EXT2_HAVE_ASM_BITOPS_
+
+_INLINE_ int ext2fs_set_bit(int nr,void * addr)
+{
+ char retval;
+
+ __asm__ __volatile__ ("bfset %2@{%1:#1}; sne %0"
+ : "=d" (retval) : "d" (nr^7), "a" (addr));
+
+ return retval;
+}
+
+_INLINE_ int ext2fs_clear_bit(int nr, void * addr)
+{
+ char retval;
+
+ __asm__ __volatile__ ("bfclr %2@{%1:#1}; sne %0"
+ : "=d" (retval) : "d" (nr^7), "a" (addr));
+
+ return retval;
+}
+
+_INLINE_ int ext2fs_test_bit(int nr, const void * addr)
+{
+ char retval;
+
+ __asm__ __volatile__ ("bftst %2@{%1:#1}; sne %0"
+ : "=d" (retval) : "d" (nr^7), "a" (addr));
+
+ return retval;
+}
+
+#endif /* __mc68000__ */
+
+#ifdef __sparc__
+
+#define _EXT2_HAVE_ASM_BITOPS_
+
+#ifndef EXT2_OLD_BITOPS
+
+/*
+ * Do the bitops so that we are compatible with the standard i386
+ * convention.
+ */
+
+_INLINE_ int ext2fs_set_bit(int nr,void * addr)
+{
+#if 1
+ int mask;
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ __asm__ __volatile__("ldub [%0], %%g6\n\t"
+ "or %%g6, %2, %%g5\n\t"
+ "stb %%g5, [%0]\n\t"
+ "and %%g6, %2, %0\n"
+ : "=&r" (ADDR)
+ : "0" (ADDR), "r" (mask)
+ : "g5", "g6");
+ return (int) ADDR;
+#else
+ int mask, retval;
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ retval = (mask & *ADDR) != 0;
+ *ADDR |= mask;
+ return retval;
+#endif
+}
+
+_INLINE_ int ext2fs_clear_bit(int nr, void * addr)
+{
+#if 1
+ int mask;
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ __asm__ __volatile__("ldub [%0], %%g6\n\t"
+ "andn %%g6, %2, %%g5\n\t"
+ "stb %%g5, [%0]\n\t"
+ "and %%g6, %2, %0\n"
+ : "=&r" (ADDR)
+ : "0" (ADDR), "r" (mask)
+ : "g5", "g6");
+ return (int) ADDR;
+
+#else
+ int mask, retval;
+ unsigned char *ADDR = (unsigned char *) addr;
+
+ ADDR += nr >> 3;
+ mask = 1 << (nr & 0x07);
+ retval = (mask & *ADDR) != 0;
+ *ADDR &= ~mask;
+ return retval;
+#endif
+}
+
+_INLINE_ int ext2fs_test_bit(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) != 0);
+}
+
+#else
+
+/* Do things the old, unplesant way. */
+
+_INLINE_ int ext2fs_set_bit(int nr, void *addr)
+{
+ int mask, retval;
+ unsigned long *ADDR = (unsigned long *) addr;
+
+ ADDR += nr >> 5;
+ mask = 1 << (nr & 31);
+ retval = ((mask & *ADDR) != 0);
+ *ADDR |= mask;
+ return retval;
+}
+
+_INLINE_ int ext2fs_clear_bit(int nr, void *addr)
+{
+ int mask, retval;
+ unsigned long *ADDR = (unsigned long *) addr;
+
+ ADDR += nr >> 5;
+ mask = 1 << (nr & 31);
+ retval = ((mask & *ADDR) != 0);
+ *ADDR &= ~mask;
+ return retval;
+}
+
+_INLINE_ int ext2fs_test_bit(int nr, const void *addr)
+{
+ int mask;
+ const unsigned long *ADDR = (const unsigned long *) addr;
+
+ ADDR += nr >> 5;
+ mask = 1 << (nr & 31);
+ return ((mask & *ADDR) != 0);
+}
+#endif
+
+#endif /* __sparc__ */
+
+#if !defined(_EXT2_HAVE_ASM_SWAB_) && defined(EXT2FS_ENABLE_SWAPFS)
+
+_INLINE_ __u16 ext2fs_swab16(__u16 val)
+{
+ return (val >> 8) | (val << 8);
+}
+
+_INLINE_ __u32 ext2fs_swab32(__u32 val)
+{
+ return ((val>>24) | ((val>>8)&0xFF00) |
+ ((val<<8)&0xFF0000) | (val<<24));
+}
+
+#endif /* !_EXT2_HAVE_ASM_SWAB */
+
+#if !defined(_EXT2_HAVE_ASM_FINDBIT_)
+_INLINE_ int ext2fs_find_first_bit_set(void * addr, unsigned size)
+{
+ char *cp = (unsigned char *) addr;
+ int res = 0, d0;
+
+ if (!size)
+ return 0;
+
+ while ((size > res) && (*cp == 0)) {
+ cp++;
+ res += 8;
+ }
+ d0 = ffs(*cp);
+ if (d0 == 0)
+ return size;
+
+ return res + d0 - 1;
+}
+
+_INLINE_ int ext2fs_find_next_bit_set (void * addr, int size, int offset)
+{
+ unsigned char * p;
+ int set = 0, bit = offset & 7, res = 0, d0;
+
+ res = offset >> 3;
+ p = ((unsigned char *) addr) + res;
+
+ if (bit) {
+ set = ffs(*p & ~((1 << bit) - 1));
+ if (set)
+ return (offset & ~7) + set - 1;
+ p++;
+ res += 8;
+ }
+ while ((size > res) && (*p == 0)) {
+ p++;
+ res += 8;
+ }
+ d0 = ffs(*p);
+ if (d0 == 0)
+ return size;
+
+ return (res + d0 - 1);
+}
+#endif
+
+_INLINE_ int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap,
+ blk_t bitno);
+
+_INLINE_ int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap,
+ blk_t bitno)
+{
+ 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);
+}
+
+_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)
+{
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((block < bitmap->start) || (block > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_MARK, block,
+ bitmap->description);
+ return;
+ }
+#endif
+ ext2fs_set_bit(block - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ void ext2fs_fast_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
+ blk_t block)
+{
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((block < bitmap->start) || (block > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_UNMARK,
+ block, bitmap->description);
+ return;
+ }
+#endif
+ ext2fs_clear_bit(block - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ int ext2fs_fast_test_block_bitmap(ext2fs_block_bitmap bitmap,
+ blk_t block)
+{
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((block < bitmap->start) || (block > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_TEST,
+ block, bitmap->description);
+ return 0;
+ }
+#endif
+ return ext2fs_test_bit(block - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ void ext2fs_fast_mark_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((inode < bitmap->start) || (inode > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_INODE_MARK,
+ inode, bitmap->description);
+ return;
+ }
+#endif
+ ext2fs_set_bit(inode - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ void ext2fs_fast_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((inode < bitmap->start) || (inode > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_INODE_UNMARK,
+ inode, bitmap->description);
+ return;
+ }
+#endif
+ ext2fs_clear_bit(inode - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ int ext2fs_fast_test_inode_bitmap(ext2fs_inode_bitmap bitmap,
+ ext2_ino_t inode)
+{
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((inode < bitmap->start) || (inode > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_INODE_TEST,
+ inode, bitmap->description);
+ return 0;
+ }
+#endif
+ return ext2fs_test_bit(inode - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ blk_t ext2fs_get_block_bitmap_start(ext2fs_block_bitmap bitmap)
+{
+ return bitmap->start;
+}
+
+_INLINE_ ext2_ino_t ext2fs_get_inode_bitmap_start(ext2fs_inode_bitmap bitmap)
+{
+ return bitmap->start;
+}
+
+_INLINE_ blk_t ext2fs_get_block_bitmap_end(ext2fs_block_bitmap bitmap)
+{
+ return bitmap->end;
+}
+
+_INLINE_ ext2_ino_t ext2fs_get_inode_bitmap_end(ext2fs_inode_bitmap bitmap)
+{
+ return bitmap->end;
+}
+
+_INLINE_ int ext2fs_test_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_TEST,
+ block, bitmap->description);
+ return 0;
+ }
+ for (i=0; i < num; i++) {
+ if (ext2fs_fast_test_block_bitmap(bitmap, block+i))
+ return 0;
+ }
+ return 1;
+}
+
+_INLINE_ int ext2fs_fast_test_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num)
+{
+ int i;
+
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((block < bitmap->start) || (block+num-1 > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_TEST,
+ block, bitmap->description);
+ return 0;
+ }
+#endif
+ for (i=0; i < num; i++) {
+ if (ext2fs_fast_test_block_bitmap(bitmap, block+i))
+ return 0;
+ }
+ return 1;
+}
+
+_INLINE_ 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_set_bit(block + i - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ void ext2fs_fast_mark_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num)
+{
+ int i;
+
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((block < bitmap->start) || (block+num-1 > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_MARK, block,
+ bitmap->description);
+ return;
+ }
+#endif
+ for (i=0; i < num; i++)
+ ext2fs_set_bit(block + i - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ 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_clear_bit(block + i - bitmap->start, bitmap->bitmap);
+}
+
+_INLINE_ void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
+ blk_t block, int num)
+{
+ int i;
+
+#ifdef EXT2FS_DEBUG_FAST_OPS
+ if ((block < bitmap->start) || (block+num-1 > bitmap->end)) {
+ ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_UNMARK, block,
+ bitmap->description);
+ return;
+ }
+#endif
+ for (i=0; i < num; i++)
+ ext2fs_clear_bit(block + i - bitmap->start, bitmap->bitmap);
+}
+#undef _INLINE_
+#endif
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/block.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/block.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/block.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,496 @@
+/*
+ * 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 Public
+ * License.
+ * %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,
+ blk_t *blocknr,
+ e2_blkcnt_t bcount,
+ blk_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;
+};
+
+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;
+
+ limit = ctx->fs->blocksize >> 2;
+ if (!(ctx->flags & BLOCK_FLAG_DEPTH_TRAVERSE) &&
+ !(ctx->flags & BLOCK_FLAG_DATA_ONLY))
+ ret = (*ctx->func)(ctx->fs, ind_block,
+ BLOCK_COUNT_IND, ref_block,
+ ref_offset, ctx->priv_data);
+ if (!*ind_block || (ret & BLOCK_ABORT)) {
+ ctx->bcount += limit;
+ return ret;
+ }
+ if (*ind_block >= ctx->fs->super->s_blocks_count ||
+ *ind_block < ctx->fs->super->s_first_data_block) {
+ ctx->errcode = EXT2_ET_BAD_IND_BLOCK;
+ ret |= BLOCK_ERROR;
+ return ret;
+ }
+ if (ctx->fs->flags & EXT2_FLAG_IMAGE_FILE) {
+ ctx->errcode = 0;
+ memset(ctx->ind_buf, 0, ctx->fs->blocksize);
+ } else
+ ctx->errcode = io_channel_read_blk(ctx->fs->io, *ind_block,
+ 1, ctx->ind_buf);
+ if (ctx->errcode) {
+ ret |= BLOCK_ERROR;
+ return ret;
+ }
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if (ctx->fs->flags & (EXT2_FLAG_SWAP_BYTES |
+ EXT2_FLAG_SWAP_BYTES_READ)) {
+ block_nr = (blk_t *) ctx->ind_buf;
+ for (i = 0; i < limit; i++, block_nr++)
+ *block_nr = ext2fs_swab32(*block_nr);
+ }
+#endif
+ 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++) {
+ flags = (*ctx->func)(ctx->fs, block_nr, ctx->bcount,
+ *ind_block, offset,
+ ctx->priv_data);
+ 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)
+ continue;
+ flags = (*ctx->func)(ctx->fs, block_nr, ctx->bcount,
+ *ind_block, offset,
+ ctx->priv_data);
+ changed |= flags;
+ if (flags & BLOCK_ABORT) {
+ ret |= BLOCK_ABORT;
+ break;
+ }
+ offset += sizeof(blk_t);
+ }
+ }
+ if (!(ctx->fs->flags & EXT2_FLAG_IMAGE_FILE) &&
+ (changed & BLOCK_CHANGED)) {
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if (ctx->fs->flags & (EXT2_FLAG_SWAP_BYTES |
+ EXT2_FLAG_SWAP_BYTES_WRITE)) {
+ block_nr = (blk_t *) ctx->ind_buf;
+ for (i = 0; i < limit; i++, block_nr++)
+ *block_nr = ext2fs_swab32(*block_nr);
+ }
+#endif
+ ctx->errcode = io_channel_write_blk(ctx->fs->io, *ind_block,
+ 1, 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))
+ ret |= (*ctx->func)(ctx->fs, ind_block,
+ BLOCK_COUNT_IND, ref_block,
+ ref_offset, ctx->priv_data);
+ 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;
+
+ limit = ctx->fs->blocksize >> 2;
+ if (!(ctx->flags & (BLOCK_FLAG_DEPTH_TRAVERSE |
+ BLOCK_FLAG_DATA_ONLY)))
+ ret = (*ctx->func)(ctx->fs, dind_block,
+ BLOCK_COUNT_DIND, ref_block,
+ ref_offset, ctx->priv_data);
+ if (!*dind_block || (ret & BLOCK_ABORT)) {
+ ctx->bcount += limit*limit;
+ return ret;
+ }
+ if (*dind_block >= ctx->fs->super->s_blocks_count ||
+ *dind_block < ctx->fs->super->s_first_data_block) {
+ ctx->errcode = EXT2_ET_BAD_DIND_BLOCK;
+ ret |= BLOCK_ERROR;
+ return ret;
+ }
+ if (ctx->fs->flags & EXT2_FLAG_IMAGE_FILE) {
+ ctx->errcode = 0;
+ memset(ctx->dind_buf, 0, ctx->fs->blocksize);
+ } else
+ ctx->errcode = io_channel_read_blk(ctx->fs->io, *dind_block,
+ 1, ctx->dind_buf);
+ if (ctx->errcode) {
+ ret |= BLOCK_ERROR;
+ return ret;
+ }
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if (ctx->fs->flags & (EXT2_FLAG_SWAP_BYTES |
+ EXT2_FLAG_SWAP_BYTES_READ)) {
+ block_nr = (blk_t *) ctx->dind_buf;
+ for (i = 0; i < limit; i++, block_nr++)
+ *block_nr = ext2fs_swab32(*block_nr);
+ }
+#endif
+ 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);
+ }
+ }
+ if (!(ctx->fs->flags & EXT2_FLAG_IMAGE_FILE) &&
+ (changed & BLOCK_CHANGED)) {
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if (ctx->fs->flags & (EXT2_FLAG_SWAP_BYTES |
+ EXT2_FLAG_SWAP_BYTES_WRITE)) {
+ block_nr = (blk_t *) ctx->dind_buf;
+ for (i = 0; i < limit; i++, block_nr++)
+ *block_nr = ext2fs_swab32(*block_nr);
+ }
+#endif
+ ctx->errcode = io_channel_write_blk(ctx->fs->io, *dind_block,
+ 1, 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))
+ ret |= (*ctx->func)(ctx->fs, dind_block,
+ BLOCK_COUNT_DIND, ref_block,
+ ref_offset, ctx->priv_data);
+ 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;
+
+ limit = ctx->fs->blocksize >> 2;
+ if (!(ctx->flags & (BLOCK_FLAG_DEPTH_TRAVERSE |
+ BLOCK_FLAG_DATA_ONLY)))
+ ret = (*ctx->func)(ctx->fs, tind_block,
+ BLOCK_COUNT_TIND, ref_block,
+ ref_offset, ctx->priv_data);
+ if (!*tind_block || (ret & BLOCK_ABORT)) {
+ ctx->bcount += limit*limit*limit;
+ return ret;
+ }
+ if (*tind_block >= ctx->fs->super->s_blocks_count ||
+ *tind_block < ctx->fs->super->s_first_data_block) {
+ ctx->errcode = EXT2_ET_BAD_TIND_BLOCK;
+ ret |= BLOCK_ERROR;
+ return ret;
+ }
+ if (ctx->fs->flags & EXT2_FLAG_IMAGE_FILE) {
+ ctx->errcode = 0;
+ memset(ctx->tind_buf, 0, ctx->fs->blocksize);
+ } else
+ ctx->errcode = io_channel_read_blk(ctx->fs->io, *tind_block,
+ 1, ctx->tind_buf);
+ if (ctx->errcode) {
+ ret |= BLOCK_ERROR;
+ return ret;
+ }
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if (ctx->fs->flags & (EXT2_FLAG_SWAP_BYTES |
+ EXT2_FLAG_SWAP_BYTES_READ)) {
+ block_nr = (blk_t *) ctx->tind_buf;
+ for (i = 0; i < limit; i++, block_nr++)
+ *block_nr = ext2fs_swab32(*block_nr);
+ }
+#endif
+ 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);
+ }
+ }
+ if (!(ctx->fs->flags & EXT2_FLAG_IMAGE_FILE) &&
+ (changed & BLOCK_CHANGED)) {
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if (ctx->fs->flags & (EXT2_FLAG_SWAP_BYTES |
+ EXT2_FLAG_SWAP_BYTES_WRITE)) {
+ block_nr = (blk_t *) ctx->tind_buf;
+ for (i = 0; i < limit; i++, block_nr++)
+ *block_nr = ext2fs_swab32(*block_nr);
+ }
+#endif
+ ctx->errcode = io_channel_write_blk(ctx->fs->io, *tind_block,
+ 1, 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))
+ ret |= (*ctx->func)(ctx->fs, tind_block,
+ BLOCK_COUNT_TIND, ref_block,
+ ref_offset, ctx->priv_data);
+
+ 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)
+{
+ int i;
+ int got_inode = 0;
+ int ret = 0;
+ blk_t blocks[EXT2_N_BLOCKS]; /* directory data blocks */
+ struct ext2_inode inode;
+ errcode_t retval;
+ struct block_context ctx;
+ int limit;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ /*
+ * Check to see if we need to limit large files
+ */
+ if (flags & BLOCK_FLAG_NO_LARGE) {
+ ctx.errcode = ext2fs_read_inode(fs, ino, &inode);
+ if (ctx.errcode)
+ return ctx.errcode;
+ got_inode = 1;
+ if (!LINUX_S_ISDIR(inode.i_mode) &&
+ (inode.i_size_high != 0))
+ return EXT2_ET_FILE_TOO_BIG;
+ }
+
+ retval = ext2fs_get_blocks(fs, ino, blocks);
+ if (retval)
+ return retval;
+
+ 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_mem(fs->blocksize * 3,
+ (void **) &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)) {
+ ctx.errcode = ext2fs_read_inode(fs, ino, &inode);
+ if (ctx.errcode)
+ goto abort_exit;
+ got_inode = 1;
+ if (inode.osd1.hurd1.h_i_translator) {
+ ret |= (*ctx.func)(fs,
+ &inode.osd1.hurd1.h_i_translator,
+ BLOCK_COUNT_TRANSLATOR,
+ 0, 0, priv_data);
+ if (ret & BLOCK_ABORT)
+ goto abort_exit;
+ }
+ }
+
+ /*
+ * Iterate over normal data blocks
+ */
+ for (i = 0; i < EXT2_NDIR_BLOCKS ; i++, ctx.bcount++) {
+ if (blocks[i] || (flags & BLOCK_FLAG_APPEND)) {
+ ret |= (*ctx.func)(fs, &blocks[i],
+ ctx.bcount, 0, i, priv_data);
+ if (ret & BLOCK_ABORT)
+ goto abort_exit;
+ }
+ }
+ if (*(blocks + EXT2_IND_BLOCK) || (flags & BLOCK_FLAG_APPEND)) {
+ ret |= block_iterate_ind(blocks + EXT2_IND_BLOCK,
+ 0, EXT2_IND_BLOCK, &ctx);
+ if (ret & BLOCK_ABORT)
+ goto abort_exit;
+ } else
+ ctx.bcount += limit;
+ if (*(blocks + EXT2_DIND_BLOCK) || (flags & BLOCK_FLAG_APPEND)) {
+ ret |= block_iterate_dind(blocks + EXT2_DIND_BLOCK,
+ 0, EXT2_DIND_BLOCK, &ctx);
+ if (ret & BLOCK_ABORT)
+ goto abort_exit;
+ } else
+ ctx.bcount += limit * limit;
+ if (*(blocks + EXT2_TIND_BLOCK) || (flags & BLOCK_FLAG_APPEND)) {
+ ret |= block_iterate_tind(blocks + EXT2_TIND_BLOCK,
+ 0, EXT2_TIND_BLOCK, &ctx);
+ if (ret & BLOCK_ABORT)
+ goto abort_exit;
+ }
+
+abort_exit:
+ if (ret & BLOCK_CHANGED) {
+ if (!got_inode) {
+ retval = ext2fs_read_inode(fs, ino, &inode);
+ if (retval)
+ return retval;
+ }
+ for (i=0; i < EXT2_N_BLOCKS; i++)
+ inode.i_block[i] = blocks[i];
+ retval = ext2fs_write_inode(fs, ino, &inode);
+ if (retval)
+ return retval;
+ }
+
+ if (!block_buf)
+ ext2fs_free_mem((void **) &ctx.ind_buf);
+
+ return (ret & BLOCK_ERROR) ? ctx.errcode : 0;
+}
+
+/*
+ * Emulate the old ext2fs_block_iterate function!
+ */
+
+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, int ref_offset, 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);
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bmap.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bmap.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bmap.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,237 @@
+/*
+ * 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 Public
+ * License.
+ * %End-Header%
+ */
+
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.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 BMAP_ALLOC 1
+
+#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) {
+ *ret_blk = 0;
+ return 0;
+ }
+ retval = io_channel_read_blk(fs->io, ind, 1, block_buf);
+ if (retval)
+ return retval;
+
+ b = ((blk_t *) block_buf)[nr];
+
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if ((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (fs->flags & EXT2_FLAG_SWAP_BYTES_READ))
+ 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 EXT2FS_ENABLE_SWAPFS
+ if ((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE))
+ ((blk_t *) block_buf)[nr] = ext2fs_swab32(b);
+ else
+#endif
+ ((blk_t *) block_buf)[nr] = b;
+
+ 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;
+ errcode_t retval;
+ blk_t addr_per_block;
+
+ addr_per_block = (blk_t) fs->blocksize >> 2;
+
+ retval = block_ind_bmap(fs, flags, 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;
+ errcode_t retval;
+ blk_t addr_per_block;
+
+ addr_per_block = (blk_t) fs->blocksize >> 2;
+
+ retval = block_dind_bmap(fs, flags, 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;
+}
+
+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)
+{
+ struct ext2_inode inode_buf;
+ blk_t addr_per_block;
+ blk_t b;
+ char *buf = 0;
+ errcode_t retval = 0;
+ int blocks_alloc = 0;
+
+ *phys_blk = 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 (!block_buf) {
+ retval = ext2fs_get_mem(fs->blocksize * 2, (void **) &buf);
+ if (retval)
+ return retval;
+ block_buf = buf;
+ }
+
+ if (block < EXT2_NDIR_BLOCKS) {
+ *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;
+ if (block < addr_per_block) {
+ b = inode_bmap(inode, EXT2_IND_BLOCK);
+ if (!b) {
+ if (!(bmap_flags & BMAP_ALLOC))
+ 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, phys_blk);
+ 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))
+ 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, phys_blk);
+ 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))
+ 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, phys_blk);
+done:
+ if (buf)
+ ext2fs_free_mem((void **) &buf);
+ if ((retval == 0) && blocks_alloc) {
+ inode->i_blocks += (blocks_alloc * fs->blocksize) / 512;
+ retval = ext2fs_write_inode(fs, ino, inode);
+ }
+ return retval;
+}
+
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bmove.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bmove.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/bmove.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,160 @@
+/*
+ * bmove.c --- Move blocks around to make way for a particular
+ * filesystem structure.
+ *
+ * Copyright (C) 1997 Theodore Ts'o. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#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, blk_t *block_nr,
+ e2_blkcnt_t blockcnt, blk_t ref_block,
+ int ref_offset, void *priv_data)
+{
+ struct process_block_struct *pb;
+ errcode_t retval;
+ int ret;
+ blk_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_bitmap(pb->reserve, block)) {
+ do {
+ if (++block >= fs->super->s_blocks_count)
+ block = fs->super->s_first_data_block;
+ if (block == orig) {
+ pb->error = EXT2_ET_BLOCK_ALLOC_FAIL;
+ return BLOCK_ABORT;
+ }
+ } while (ext2fs_test_block_bitmap(pb->reserve, block) ||
+ ext2fs_test_block_bitmap(pb->alloc_map, block));
+
+ retval = io_channel_read_blk(fs->io, orig, 1, pb->buf);
+ if (retval) {
+ pb->error = retval;
+ return BLOCK_ABORT;
+ }
+ retval = io_channel_write_blk(fs->io, block, 1, pb->buf);
+ if (retval) {
+ pb->error = retval;
+ return BLOCK_ABORT;
+ }
+ *block_nr = block;
+ ext2fs_mark_block_bitmap(pb->alloc_map, block);
+ ret = BLOCK_CHANGED;
+ if (pb->flags & EXT2_BMOVE_DEBUG)
+ printf("ino=%ld, blockcnt=%lld, %d->%d\n", pb->ino,
+ blockcnt, orig, block);
+ }
+ if (pb->add_dir) {
+ retval = ext2fs_add_dir_block(fs->dblist, pb->ino,
+ block, (int) 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_mem(fs->blocksize * 4, (void **) &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_blocks(&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_iterate2(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;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/brel.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/brel.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/brel.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 Public
+ * License.
+ * %End-Header%
+ */
+
+struct ext2_block_relocate_entry {
+ blk_t new;
+ __s16 offset;
+ __u16 flags;
+ union {
+ blk_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;
+ blk_t current;
+ void *priv_data;
+
+ /*
+ * Add a block relocation entry.
+ */
+ errcode_t (*put)(ext2_brel brel, blk_t old,
+ struct ext2_block_relocate_entry *ent);
+
+ /*
+ * Get a block relocation entry.
+ */
+ errcode_t (*get)(ext2_brel brel, blk_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, blk_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, blk_t old, blk_t new);
+
+ /*
+ * Remove a block relocation entry.
+ */
+ errcode_t (*delete)(ext2_brel brel, blk_t old);
+
+
+ /*
+ * Free the block relocation table.
+ */
+ errcode_t (*free)(ext2_brel brel);
+};
+
+errcode_t ext2fs_brel_memarray_create(char *name, blk_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)))
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/brel_ma.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/brel_ma.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/brel_ma.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,197 @@
+/*
+ * 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 Public
+ * License.
+ * %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, blk_t old,
+ struct ext2_block_relocate_entry *ent);
+static errcode_t bma_get(ext2_brel brel, blk_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, blk_t *old,
+ struct ext2_block_relocate_entry *ent);
+static errcode_t bma_move(ext2_brel brel, blk_t old, blk_t new);
+static errcode_t bma_delete(ext2_brel brel, blk_t old);
+static errcode_t bma_free(ext2_brel brel);
+
+struct brel_ma {
+ __u32 magic;
+ blk_t max_block;
+ struct ext2_block_relocate_entry *entries;
+};
+
+errcode_t ext2fs_brel_memarray_create(char *name, blk_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),
+ (void **) &brel);
+ if (retval)
+ goto errout;
+ memset(brel, 0, sizeof(struct ext2_block_relocation_table));
+
+ retval = ext2fs_get_mem(strlen(name)+1, (void **) &brel->name);
+ if (retval)
+ goto errout;
+ strcpy(brel->name, name);
+
+ retval = ext2fs_get_mem(sizeof(struct brel_ma), (void **) &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_mem(size, (void **) &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, blk_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, blk_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, blk_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, blk_t old, blk_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, blk_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((void **) &ma->entries);
+ ext2fs_free_mem((void **) &ma);
+ }
+ if (brel->name)
+ ext2fs_free_mem((void **) &brel->name);
+ ext2fs_free_mem((void **) &brel);
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/check_desc.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/check_desc.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/check_desc.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,68 @@
+/*
+ * 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 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 "ext2fs.h"
+
+/*
+ * This routine sanity checks the group descriptors
+ */
+errcode_t ext2fs_check_desc(ext2_filsys fs)
+{
+ int i;
+ blk_t block = fs->super->s_first_data_block;
+ blk_t next;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ next = block + fs->super->s_blocks_per_group;
+ /*
+ * Check to make sure block bitmap for group is
+ * located within the group.
+ */
+ if (fs->group_desc[i].bg_block_bitmap < block ||
+ fs->group_desc[i].bg_block_bitmap >= next)
+ return EXT2_ET_GDESC_BAD_BLOCK_MAP;
+ /*
+ * Check to make sure inode bitmap for group is
+ * located within the group
+ */
+ if (fs->group_desc[i].bg_inode_bitmap < block ||
+ fs->group_desc[i].bg_inode_bitmap >= next)
+ return EXT2_ET_GDESC_BAD_INODE_MAP;
+ /*
+ * Check to make sure inode table for group is located
+ * within the group
+ */
+ if (fs->group_desc[i].bg_inode_table < block ||
+ ((fs->group_desc[i].bg_inode_table +
+ fs->inode_blocks_per_group) >= next))
+ return EXT2_ET_GDESC_BAD_INODE_TABLE;
+
+ block = next;
+ }
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/closefs.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/closefs.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/closefs.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,291 @@
+/*
+ * 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 Public
+ * License.
+ * %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(int a, int b)
+{
+ if (a == 0)
+ return 1;
+ while (1) {
+ if (a == 1)
+ return 1;
+ if (a % b)
+ return 0;
+ a = a / b;
+ }
+}
+
+int ext2fs_bg_has_super(ext2_filsys fs, int group_block)
+{
+ if (!(fs->super->s_feature_ro_compat &
+ EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER))
+ return 1;
+
+ if (test_root(group_block, 3) || (test_root(group_block, 5)) ||
+ test_root(group_block, 7))
+ return 1;
+
+ return 0;
+}
+
+/*
+ * 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) {
+ io_channel_set_blksize(fs->io, SUPERBLOCK_OFFSET);
+ retval = io_channel_write_blk(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)
+ 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 */
+}
+
+errcode_t ext2fs_flush(ext2_filsys fs)
+{
+ dgrp_t i,j,maxgroup,sgrp;
+ blk_t group_block;
+ errcode_t retval;
+ char *group_ptr;
+ unsigned long fs_state;
+ struct ext2_super_block *super_shadow = 0;
+ struct ext2_group_desc *group_shadow = 0;
+ struct ext2_group_desc *s, *t;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ fs_state = fs->super->s_state;
+
+ fs->super->s_wtime = time(NULL);
+ fs->super->s_block_group_nr = 0;
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES) {
+ retval = EXT2_ET_NO_MEMORY;
+ retval = ext2fs_get_mem(SUPERBLOCK_SIZE,
+ (void **) &super_shadow);
+ if (retval)
+ goto errout;
+ retval = ext2fs_get_mem((size_t)(fs->blocksize *
+ fs->desc_blocks),
+ (void **) &group_shadow);
+ if (retval)
+ goto errout;
+ memset(group_shadow, 0, (size_t) fs->blocksize *
+ fs->desc_blocks);
+
+ /* swap the superblock */
+ *super_shadow = *fs->super;
+ ext2fs_swap_super(super_shadow);
+
+ /* swap the group descriptors */
+ for (j=0, s=fs->group_desc, t=group_shadow;
+ j < fs->group_desc_count; j++, t++, s++) {
+ *t = *s;
+ ext2fs_swap_group_desc(t);
+ }
+ } else {
+ super_shadow = fs->super;
+ group_shadow = fs->group_desc;
+ }
+#else
+ super_shadow = fs->super;
+ group_shadow = fs->group_desc;
+#endif
+
+ /*
+ * Write out master superblock. This has to be done
+ * separately, since it is located at a fixed location
+ * (SUPERBLOCK_OFFSET).
+ */
+ retval = write_primary_superblock(fs, super_shadow);
+ if (retval)
+ goto errout;
+
+ /*
+ * 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) {
+ retval = 0;
+ goto errout;
+ }
+
+ /*
+ * Set the state of the FS to be non-valid. (The state has
+ * already been backed up earlier, and will be restored when
+ * we exit.)
+ */
+ fs->super->s_state &= ~EXT2_VALID_FS;
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES) {
+ *super_shadow = *fs->super;
+ ext2fs_swap_super(super_shadow);
+ }
+#endif
+
+ /*
+ * Write out the master group descriptors, and the backup
+ * superblocks and group descriptors.
+ */
+ group_block = fs->super->s_first_data_block;
+ maxgroup = (fs->flags & EXT2_FLAG_MASTER_SB_ONLY) ? 1 :
+ fs->group_desc_count;
+ for (i = 0; i < maxgroup; i++) {
+ if (!ext2fs_bg_has_super(fs, i))
+ goto next_group;
+
+ sgrp = i;
+ if (sgrp > ((1 << 16) - 1))
+ sgrp = (1 << 16) - 1;
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES)
+ super_shadow->s_block_group_nr = ext2fs_swab16(sgrp);
+ else
+#endif
+ fs->super->s_block_group_nr = sgrp;
+
+ if (i !=0 ) {
+ retval = io_channel_write_blk(fs->io, group_block,
+ -SUPERBLOCK_SIZE,
+ super_shadow);
+ if (retval)
+ goto errout;
+ }
+ if (fs->flags & EXT2_FLAG_SUPER_ONLY)
+ goto next_group;
+ group_ptr = (char *) group_shadow;
+ for (j=0; j < fs->desc_blocks; j++) {
+ retval = io_channel_write_blk(fs->io,
+ group_block+1+j, 1,
+ group_ptr);
+ if (retval)
+ goto errout;
+ group_ptr += fs->blocksize;
+ }
+ next_group:
+ group_block += EXT2_BLOCKS_PER_GROUP(fs->super);
+ }
+ fs->super->s_block_group_nr = 0;
+
+ /*
+ * If the write_bitmaps() function is present, call it to
+ * flush the bitmaps. This is done this way so that a simple
+ * program that doesn't mess with the bitmaps doesn't need to
+ * drag in the bitmaps.c code.
+ */
+ if (fs->write_bitmaps) {
+ retval = fs->write_bitmaps(fs);
+ if (retval)
+ goto errout;
+ }
+
+ fs->flags &= ~EXT2_FLAG_DIRTY;
+
+ /*
+ * Flush the blocks out to disk
+ */
+ retval = io_channel_flush(fs->io);
+errout:
+ fs->super->s_state = fs_state;
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES) {
+ if (super_shadow)
+ ext2fs_free_mem((void **) &super_shadow);
+ if (group_shadow)
+ ext2fs_free_mem((void **) &group_shadow);
+ }
+ return retval;
+}
+
+errcode_t ext2fs_close(ext2_filsys fs)
+{
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (fs->flags & EXT2_FLAG_DIRTY) {
+ retval = ext2fs_flush(fs);
+ if (retval)
+ return retval;
+ }
+ if (fs->write_bitmaps) {
+ retval = fs->write_bitmaps(fs);
+ if (retval)
+ return retval;
+ }
+ ext2fs_free(fs);
+ return 0;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/cmp_bitmaps.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/cmp_bitmaps.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/cmp_bitmaps.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,72 @@
+/*
+ * cmp_bitmaps.c --- routines to compare inode and block bitmaps.
+ *
+ * Copyright (C) 1995 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 "ext2fs.h"
+
+errcode_t ext2fs_compare_block_bitmap(ext2fs_block_bitmap bm1,
+ ext2fs_block_bitmap bm2)
+{
+ blk_t i;
+
+ EXT2_CHECK_MAGIC(bm1, EXT2_ET_MAGIC_BLOCK_BITMAP);
+ EXT2_CHECK_MAGIC(bm2, EXT2_ET_MAGIC_BLOCK_BITMAP);
+
+ if ((bm1->start != bm2->start) ||
+ (bm1->end != bm2->end) ||
+ (memcmp(bm1->bitmap, bm2->bitmap,
+ (size_t) (bm1->end - bm1->start)/8)))
+ return EXT2_ET_NEQ_BLOCK_BITMAP;
+
+ 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 EXT2_ET_NEQ_BLOCK_BITMAP;
+
+ return 0;
+}
+
+errcode_t ext2fs_compare_inode_bitmap(ext2fs_inode_bitmap bm1,
+ ext2fs_inode_bitmap bm2)
+{
+ ext2_ino_t i;
+
+ EXT2_CHECK_MAGIC(bm1, EXT2_ET_MAGIC_INODE_BITMAP);
+ EXT2_CHECK_MAGIC(bm2, EXT2_ET_MAGIC_INODE_BITMAP);
+
+ if ((bm1->start != bm2->start) ||
+ (bm1->end != bm2->end) ||
+ (memcmp(bm1->bitmap, bm2->bitmap,
+ (size_t) (bm1->end - bm1->start)/8)))
+ return EXT2_ET_NEQ_INODE_BITMAP;
+
+ for (i = bm1->end - ((bm1->end - bm1->start) % 8); i <= bm1->end; i++)
+ if (ext2fs_fast_test_inode_bitmap(bm1, i) !=
+ ext2fs_fast_test_inode_bitmap(bm2, i))
+ return EXT2_ET_NEQ_INODE_BITMAP;
+
+ return 0;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dblist.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dblist.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dblist.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,254 @@
+/*
+ * 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 Public
+ * License.
+ * %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);
+
+/*
+ * 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 (fs->group_desc[i].bg_used_dirs_count > max_dirs)
+ num_dirs += max_dirs / 8;
+ else
+ num_dirs += fs->group_desc[i].bg_used_dirs_count;
+ }
+ 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_entry *list,
+ ext2_dblist *ret_dblist)
+{
+ ext2_dblist dblist;
+ errcode_t retval;
+ 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),
+ (void **) &dblist);
+ if (retval)
+ return retval;
+ 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, &dblist->size);
+ if (retval)
+ goto cleanup;
+ dblist->size = (dblist->size * 2) + 12;
+ }
+ len = (size_t) sizeof(struct ext2_db_entry) * dblist->size;
+ dblist->count = count;
+ retval = ext2fs_get_mem(len, (void **) &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((void **) &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_block(ext2_dblist dblist, ext2_ino_t ino, blk_t blk,
+ int blockcnt)
+{
+ struct ext2_db_entry *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_entry);
+ dblist->size += 100;
+ retval = ext2fs_resize_mem(old_size, (size_t) dblist->size *
+ sizeof(struct ext2_db_entry),
+ (void **) &dblist->list);
+ if (retval) {
+ dblist->size -= 100;
+ return retval;
+ }
+ }
+ new_entry = dblist->list + ( (int) 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_block(ext2_dblist dblist, ext2_ino_t ino, blk_t blk,
+ int 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;
+}
+
+/*
+ * This function iterates over the directory block list
+ */
+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)
+{
+ ext2_ino_t i;
+ int ret;
+
+ EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST);
+
+ if (!dblist->sorted) {
+ qsort(dblist->list, (size_t) dblist->count,
+ sizeof(struct ext2_db_entry), dir_block_cmp);
+ dblist->sorted = 1;
+ }
+ for (i=0; i < dblist->count; i++) {
+ ret = (*func)(dblist->fs, &dblist->list[(int)i], priv_data);
+ if (ret & DBLIST_ABORT)
+ return 0;
+ }
+ return 0;
+}
+
+
+static EXT2_QSORT_TYPE dir_block_cmp(const void *a, const void *b)
+{
+ const struct ext2_db_entry *db_a =
+ (const struct ext2_db_entry *) a;
+ const struct ext2_db_entry *db_b =
+ (const struct ext2_db_entry *) 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 (int) (db_a->blockcnt - db_b->blockcnt);
+}
+
+int ext2fs_dblist_count(ext2_dblist dblist)
+{
+ return (int) dblist->count;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dblist_dir.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dblist_dir.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dblist_dir.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,76 @@
+/*
+ * 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 Public
+ * License.
+ * %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_entry *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,
+ (void **) &ctx.buf);
+ if (retval)
+ return retval;
+ }
+ ctx.func = func;
+ ctx.priv_data = priv_data;
+ ctx.errcode = 0;
+
+ retval = ext2fs_dblist_iterate(dblist, db_dir_proc, &ctx);
+
+ if (!block_buf)
+ ext2fs_free_mem((void **) &ctx.buf);
+ if (retval)
+ return retval;
+ return ctx.errcode;
+}
+
+static int db_dir_proc(ext2_filsys fs, struct ext2_db_entry *db_info,
+ void *priv_data)
+{
+ struct dir_context *ctx;
+
+ ctx = (struct dir_context *) priv_data;
+ ctx->dir = db_info->ino;
+
+ return ext2fs_process_dir_block(fs, &db_info->blk,
+ db_info->blockcnt, 0, 0, priv_data);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dir_iterate.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dir_iterate.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dir_iterate.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,217 @@
+/*
+ * 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 Public
+ * License.
+ * %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"
+
+/*
+ * 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(char *buf, int offset, int final_offset)
+{
+ struct ext2_dir_entry *dirent;
+
+ while (offset < final_offset) {
+ dirent = (struct ext2_dir_entry *)(buf + offset);
+ offset += dirent->rec_len;
+ if ((dirent->rec_len < 8) ||
+ ((dirent->rec_len % 4) != 0) ||
+ (((dirent->name_len & 0xFF)+8) > dirent->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, (void **) &ctx.buf);
+ if (retval)
+ return retval;
+ }
+ ctx.func = func;
+ ctx.priv_data = priv_data;
+ ctx.errcode = 0;
+ retval = ext2fs_block_iterate2(fs, dir, 0, 0,
+ ext2fs_process_dir_block, &ctx);
+ if (!block_buf)
+ ext2fs_free_mem((void **) &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, int entry,
+ 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);
+}
+
+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)
+{
+ 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,
+ blk_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block,
+ int ref_offset,
+ void *priv_data)
+{
+ struct dir_context *ctx = (struct dir_context *) priv_data;
+ int offset = 0;
+ int next_real_entry = 0;
+ int ret = 0;
+ int changed = 0;
+ int do_abort = 0;
+ int entry, size;
+ struct ext2_dir_entry *dirent;
+
+ if (blockcnt < 0)
+ return 0;
+
+ entry = blockcnt ? DIRENT_OTHER_FILE : DIRENT_DOT_FILE;
+
+ ctx->errcode = ext2fs_read_dir_block(fs, *blocknr, ctx->buf);
+ if (ctx->errcode)
+ return BLOCK_ABORT;
+
+ while (offset < fs->blocksize) {
+ dirent = (struct ext2_dir_entry *) (ctx->buf + offset);
+ if (((offset + dirent->rec_len) > fs->blocksize) ||
+ (dirent->rec_len < 8) ||
+ ((dirent->rec_len % 4) != 0) ||
+ (((dirent->name_len & 0xFF)+8) > dirent->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)
+ changed++;
+ if (ret & DIRENT_ABORT) {
+ do_abort++;
+ break;
+ }
+next:
+ if (next_real_entry == offset)
+ next_real_entry += dirent->rec_len;
+
+ if (ctx->flags & DIRENT_FLAG_INCLUDE_REMOVED) {
+ size = ((dirent->name_len & 0xFF) + 11) & ~3;
+
+ if (dirent->rec_len != size) {
+ int final_offset = offset + dirent->rec_len;
+
+ offset += size;
+ while (offset < final_offset &&
+ !ext2fs_validate_entry(ctx->buf,
+ offset,
+ final_offset))
+ offset += 4;
+ continue;
+ }
+ }
+ offset += dirent->rec_len;
+ }
+
+ if (changed) {
+ ctx->errcode = ext2fs_write_dir_block(fs, *blocknr, ctx->buf);
+ if (ctx->errcode)
+ return BLOCK_ABORT;
+ }
+ if (do_abort)
+ return BLOCK_ABORT;
+ return 0;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dirblock.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dirblock.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dirblock.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,100 @@
+/*
+ * 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 Public
+ * License.
+ * %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_block(ext2_filsys fs, blk_t block,
+ void *buf)
+{
+ errcode_t retval;
+ char *p, *end;
+ struct ext2_dir_entry *dirent;
+ unsigned int rec_len, do_swap;
+
+ retval = io_channel_read_blk(fs->io, block, 1, buf);
+ if (retval)
+ return retval;
+#ifdef EXT2FS_ENABLE_SWAPFS
+ do_swap = (fs->flags & (EXT2_FLAG_SWAP_BYTES|
+ EXT2_FLAG_SWAP_BYTES_READ)) != 0;
+#endif
+ p = (char *) buf;
+ end = (char *) buf + fs->blocksize;
+ while (p < end-8) {
+ dirent = (struct ext2_dir_entry *) p;
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if (do_swap) {
+ dirent->inode = ext2fs_swab32(dirent->inode);
+ dirent->rec_len = ext2fs_swab16(dirent->rec_len);
+ dirent->name_len = ext2fs_swab16(dirent->name_len);
+ }
+#endif
+ rec_len = dirent->rec_len;
+ if ((rec_len < 8) || (rec_len % 4)) {
+ rec_len = 8;
+ retval = EXT2_ET_DIR_CORRUPTED;
+ }
+ if (((dirent->name_len & 0xFF) + 8) > dirent->rec_len)
+ retval = EXT2_ET_DIR_CORRUPTED;
+ p += rec_len;
+ }
+ return retval;
+}
+
+errcode_t ext2fs_write_dir_block(ext2_filsys fs, blk_t block,
+ void *inbuf)
+{
+ errcode_t retval;
+ char *p, *end, *write_buf;
+ char *buf = 0;
+ struct ext2_dir_entry *dirent;
+
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if ((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)) {
+ retval = ext2fs_get_mem(fs->blocksize, (void **) &buf);
+ if (retval)
+ return retval;
+ write_buf = buf;
+ memcpy(buf, inbuf, fs->blocksize);
+ p = buf;
+ end = buf + fs->blocksize;
+ while (p < end) {
+ dirent = (struct ext2_dir_entry *) p;
+ if ((dirent->rec_len < 8) ||
+ (dirent->rec_len % 4)) {
+ retval = EXT2_ET_DIR_CORRUPTED;
+ goto errout;
+ }
+ p += dirent->rec_len;
+ dirent->inode = ext2fs_swab32(dirent->inode);
+ dirent->rec_len = ext2fs_swab16(dirent->rec_len);
+ dirent->name_len = ext2fs_swab16(dirent->name_len);
+ }
+ } else
+#endif
+ write_buf = (char *) inbuf;
+ retval = io_channel_write_blk(fs->io, block, 1, write_buf);
+errout:
+ if (buf)
+ ext2fs_free_mem((void **) &buf);
+ return retval;
+}
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.funcs
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.funcs 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.funcs 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,178 @@
+00000000 T _ext2fs_open libext2fs openfs
+00000000 T _ext2fs_check_desc libext2fs openfs
+00000000 T _ext2fs_free libext2fs freefs
+00000000 T _ext2fs_flush libext2fs closefs
+00000000 T _ext2fs_close libext2fs closefs
+00000000 T _ext2fs_allocate_inode_bitmap libext2fs bitmaps
+00000000 T _ext2fs_allocate_block_bitmap libext2fs bitmaps
+00000000 T _ext2fs_free_inode_bitmap libext2fs bitmaps
+00000000 T _ext2fs_free_block_bitmap libext2fs bitmaps
+00000000 T _ext2fs_fudge_inode_bitmap_end libext2fs bitmaps
+00000000 T _ext2fs_fudge_block_bitmap_end libext2fs bitmaps
+00000000 T _ext2fs_clear_inode_bitmap libext2fs bitmaps
+00000000 T _ext2fs_clear_block_bitmap libext2fs bitmaps
+00000000 T _ext2fs_write_inode_bitmap libext2fs rw_bitmaps
+00000000 T _ext2fs_write_block_bitmap libext2fs rw_bitmaps
+00000000 T _ext2fs_read_inode_bitmap libext2fs rw_bitmaps
+00000000 T _ext2fs_read_block_bitmap libext2fs rw_bitmaps
+00000000 T _ext2fs_read_bitmaps libext2fs rw_bitmaps
+00000000 T _ext2fs_write_bitmaps libext2fs rw_bitmaps
+00000000 T _ext2fs_open_inode_scan libext2fs inode
+00000000 T _ext2fs_close_inode_scan libext2fs inode
+00000000 T _ext2fs_get_next_inode libext2fs inode
+00000000 T _ext2fs_read_inode libext2fs inode
+00000000 T _ext2fs_write_inode libext2fs inode
+00000000 T _ext2fs_get_blocks libext2fs inode
+00000000 T _ext2fs_check_directory libext2fs inode
+00000000 T _ext2fs_block_iterate libext2fs block
+00000000 T _ext2fs_dir_iterate libext2fs namei
+00000000 T _ext2fs_lookup libext2fs namei
+00000000 T _ext2fs_namei libext2fs namei
+00000000 T _ext2fs_new_dir_block libext2fs newdir
+00000000 T _ext2fs_mkdir libext2fs mkdir
+00000000 T _ext2fs_get_pathname libext2fs get_pathname
+00000000 T _ext2fs_warn_bitmap libext2fs bitops
+00000000 T _ext2fs_link libext2fs link
+00000000 T _ext2fs_unlink libext2fs link
+00000000 T _ext2fs_new_inode libext2fs alloc
+00000000 T _ext2fs_new_block libext2fs alloc
+00000000 T _ext2fs_get_free_blocks libext2fs alloc
+00000000 T _ext2fs_expand_dir libext2fs expanddir
+00000000 T _ext2fs_set_bit libext2fs inline
+00000000 T _ext2fs_clear_bit libext2fs inline
+00000000 T _ext2fs_test_bit libext2fs inline
+00000000 T _ext2fs_mark_block_bitmap libext2fs inline
+00000000 T _ext2fs_unmark_block_bitmap libext2fs inline
+00000000 T _ext2fs_test_block_bitmap libext2fs inline
+00000000 T _ext2fs_mark_inode_bitmap libext2fs inline
+00000000 T _ext2fs_unmark_inode_bitmap libext2fs inline
+00000000 T _ext2fs_test_inode_bitmap libext2fs inline
+00000000 T _ext2fs_mark_super_dirty libext2fs inline
+00000000 T _ext2fs_mark_changed libext2fs inline
+00000000 T _ext2fs_test_changed libext2fs inline
+00000000 T _ext2fs_mark_valid libext2fs inline
+00000000 T _ext2fs_unmark_valid libext2fs inline
+00000000 T _ext2fs_test_valid libext2fs inline
+00000000 T _ext2fs_mark_ib_dirty libext2fs inline
+00000000 T _ext2fs_mark_bb_dirty libext2fs inline
+00000000 T _ext2fs_test_ib_dirty libext2fs inline
+00000000 T _ext2fs_test_bb_dirty libext2fs inline
+00000000 T _ext2fs_group_of_blk libext2fs inline
+00000000 T _ext2fs_group_of_ino libext2fs inline
+00000000 T _ext2fs_initialize libext2fs initialize
+00000000 T _badblocks_list_create libext2fs badblocks
+00000000 T _badblocks_list_free libext2fs badblocks
+00000000 T _badblocks_list_add libext2fs badblocks
+00000000 T _badblocks_list_test libext2fs badblocks
+00000000 T _badblocks_list_iterate_begin libext2fs badblocks
+00000000 T _badblocks_list_iterate libext2fs badblocks
+00000000 T _badblocks_list_iterate_end libext2fs badblocks
+00000000 T _ext2fs_read_bb_inode libext2fs read_bb
+00000000 T _ext2fs_update_bb_inode libext2fs bb_inode
+00000000 T _ext2fs_read_bb_FILE libext2fs read_bb_file
+00000000 T _initialize_ext2_error_table libext2fs ext2_err
+00000000 T _ext2fs_llseek libext2fs llseek
+00000000 T _ext2fs_set_inode_callback libext2fs inode
+00000000 T _ext2fs_compare_block_bitmap libext2fs cmp_bitmaps
+00000000 T _ext2fs_compare_inode_bitmap libext2fs cmp_bitmaps
+00000000 T _ext2fs_read_dir_block libext2fs dirblock
+00000000 T _ext2fs_write_dir_block libext2fs dirblock
+00000000 T _ext2fs_swab16 libext2fs inline
+00000000 T _ext2fs_swab32 libext2fs inline
+00000000 T _ext2fs_fast_mark_block_bitmap libext2fs inline
+00000000 T _ext2fs_fast_unmark_block_bitmap libext2fs inline
+00000000 T _ext2fs_fast_test_block_bitmap libext2fs inline
+00000000 T _ext2fs_fast_mark_inode_bitmap libext2fs inline
+00000000 T _ext2fs_fast_unmark_inode_bitmap libext2fs inline
+00000000 T _ext2fs_fast_test_inode_bitmap libext2fs inline
+00000000 T _ext2fs_get_block_bitmap_start libext2fs inline
+00000000 T _ext2fs_get_inode_bitmap_start libext2fs inline
+00000000 T _ext2fs_get_block_bitmap_end libext2fs inline
+00000000 T _ext2fs_get_inode_bitmap_end libext2fs inline
+00000000 T _ext2fs_swap_super libext2fs swapfs
+00000000 T _ext2fs_swap_group_desc libext2fs swapfs
+00000000 T _ext2fs_get_device_size libext2fs getsize
+00000000 T _ext2fs_check_if_mounted libext2fs ismounted
+00000000 T _ext2fs_allocate_tables libext2fs alloc_tables
+00000000 T _ext2fs_allocate_generic_bitmap libext2fs bitmaps
+00000000 T _ext2fs_warn_bitmap2 libext2fs bitops
+00000000 T _ext2fs_free_generic_bitmap libext2fs freefs
+00000000 T _ext2fs_mark_generic_bitmap libext2fs inline
+00000000 T _ext2fs_unmark_generic_bitmap libext2fs inline
+00000000 T _ext2fs_test_generic_bitmap libext2fs inline
+00000000 T _ext2fs_namei_follow libext2fs namei
+00000000 T _ext2fs_follow_link libext2fs namei
+00000000 T _ext2fs_native_flag libext2fs native
+00000000 T _ext2fs_swap_inode libext2fs swapfs
+00000000 T _ext2fs_block_iterate2 libext2fs block
+00000000 T _ext2fs_inode_scan_goto_blockgroup libext2fs inode
+00000000 T _ext2fs_badblocks_list_create libext2fs badblocks
+00000000 T _ext2fs_badblocks_list_add libext2fs badblocks
+00000000 T _ext2fs_badblocks_list_test libext2fs badblocks
+00000000 T _ext2fs_badblocks_list_iterate_begin libext2fs badblocks
+00000000 T _ext2fs_badblocks_list_iterate libext2fs badblocks
+00000000 T _ext2fs_badblocks_list_iterate_end libext2fs badblocks
+#00000000 U _ext2fs_brel_memarray_create libext2fs brel_ma
+00000000 T __DUMMY__ libext2fs brel_ma
+00000000 T _ext2fs_badblocks_list_free libext2fs closefs
+00000000 T _ext2fs_free_dblist libext2fs closefs
+00000000 T _ext2fs_get_num_dirs libext2fs dblist
+00000000 T _ext2fs_init_dblist libext2fs dblist
+00000000 T _ext2fs_add_dir_block libext2fs dblist
+00000000 T _ext2fs_dblist_iterate libext2fs dblist
+00000000 T _ext2fs_dblist_dir_iterate libext2fs dblist_dir
+00000000 T _ext2fs_process_dir_block libext2fs dir_iterate
+00000000 T _ext2fs_test_block_bitmap_range libext2fs inline
+00000000 T _ext2fs_fast_test_block_bitmap_range libext2fs inline
+00000000 T _ext2fs_mark_block_bitmap_range libext2fs inline
+00000000 T _ext2fs_fast_mark_block_bitmap_range libext2fs inline
+00000000 T _ext2fs_unmark_block_bitmap_range libext2fs inline
+00000000 T _ext2fs_fast_unmark_block_bitmap_range libext2fs inline
+00000000 T _ext2fs_inode_scan_flags libext2fs inode
+#00000000 U _ext2fs_irel_memarray_create libext2fs irel_ma
+00000000 U __DUMMY__ libext2fs irel_ma
+00000000 T _ext2fs_resize_generic_bitmap libext2fs rs_bitmap
+00000000 T _ext2fs_inode_has_valid_blocks libext2fs valid_blk
+00000000 T _ext2fs_free_icount libext2fs icount
+00000000 T _ext2fs_create_icount libext2fs icount
+00000000 T _ext2fs_icount_fetch libext2fs icount
+00000000 T _ext2fs_icount_increment libext2fs icount
+00000000 T _ext2fs_icount_decrement libext2fs icount
+00000000 T _ext2fs_icount_store libext2fs icount
+00000000 T _ext2fs_get_icount_size libext2fs icount
+00000000 T _ext2fs_create_icount2 libext2fs icount
+00000000 T _ext2fs_get_library_version libext2fs version
+00000000 T _ext2fs_parse_version_string libext2fs version
+00000000 T _ext2fs_set_dir_block libext2fs dblist
+00000000 T _ext2fs_badblocks_copy libext2fs badblocks
+00000000 T _ext2fs_copy_bitmap libext2fs bitmaps
+00000000 T _ext2fs_bg_has_super libext2fs closefs
+00000000 T _ext2fs_copy_dblist libext2fs dblist
+00000000 T _ext2fs_dup_handle libext2fs dupfs
+00000000 T _ext2fs_icount_validate libext2fs icount
+00000000 T _ext2fs_resize_inode_bitmap libext2fs rs_bitmap
+00000000 T _ext2fs_resize_block_bitmap libext2fs rs_bitmap
+00000000 T _ext2fs_dblist_count libext2fs dblist
+00000000 T _ext2fs_alloc_block libext2fs alloc
+00000000 T _ext2fs_allocate_group_table libext2fs alloc_tables
+00000000 T _ext2fs_set_bitmap_padding libext2fs bitmaps
+00000000 T _ext2fs_bmap libext2fs bmap
+#00000000 T _ext2fs_move_blocks libext2fs bmove
+00000000 T __DUMMY__ libext2fs bmove
+00000000 T _ext2fs_file_open libext2fs fileio
+00000000 T _ext2fs_file_get_fs libext2fs fileio
+00000000 T _ext2fs_file_close libext2fs fileio
+00000000 T _ext2fs_file_read libext2fs fileio
+00000000 T _ext2fs_file_write libext2fs fileio
+00000000 T _ext2fs_file_lseek libext2fs fileio
+00000000 T _ext2fs_file_get_size libext2fs fileio
+00000000 T _ext2fs_file_set_size libext2fs fileio
+00000000 T _ext2fs_get_mem libext2fs inline
+00000000 T _ext2fs_free_mem libext2fs inline
+00000000 T _ext2fs_resize_mem libext2fs inline
+00000000 T _ext2fs_read_bb_FILE2 libext2fs read_bb_file
+00000000 T _ext2fs_write_bb_FILE libext2fs write_bb_file
+00000000 T _ext2fs_badblocks_equal libext2fs badblocks
+00000000 T _ext2fs_update_dynamic_rev libext2fs closefs
+00000000 T _ext2fs_sync_device libext2fs flushb
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.ignore
===================================================================
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.import
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.import 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.import 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,166 @@
+00000004 D __et_list libcom_err jump/error_message
+00000004 D _com_err_hook libcom_err jump/com_err
+/usr/lib/libc.sa(__libc.o):00001000 a __GOT_SIZE
+/usr/lib/libc.sa(__libc.o):6008f0b0 A _AL
+/usr/lib/libc.sa(__libc.o):6008f198 A _AL_PARM
+/usr/lib/libc.sa(__libc.o):6008f060 A _AM
+/usr/lib/libc.sa(__libc.o):6008f0b4 A _BC
+/usr/lib/libc.sa(__libc.o):6008f064 A _BS
+/usr/lib/libc.sa(__libc.o):6008f0bc A _BT
+/usr/lib/libc.sa(__libc.o):6008f068 A _CA
+/usr/lib/libc.sa(__libc.o):6008f0c0 A _CD
+/usr/lib/libc.sa(__libc.o):6008f0c4 A _CE
+/usr/lib/libc.sa(__libc.o):6008f0c8 A _CL
+/usr/lib/libc.sa(__libc.o):6008f0cc A _CM
+/usr/lib/libc.sa(__libc.o):6008f048 A _COLS
+/usr/lib/libc.sa(__libc.o):6008f0d0 A _CR
+/usr/lib/libc.sa(__libc.o):6008f0d4 A _CS
+/usr/lib/libc.sa(__libc.o):6008f06c A _DA
+/usr/lib/libc.sa(__libc.o):6008f070 A _DB
+/usr/lib/libc.sa(__libc.o):6008f0d8 A _DC
+/usr/lib/libc.sa(__libc.o):6008f0dc A _DL
+/usr/lib/libc.sa(__libc.o):6008f19c A _DL_PARM
+/usr/lib/libc.sa(__libc.o):6008f0e0 A _DM
+/usr/lib/libc.sa(__libc.o):6008f0e4 A _DO
+/usr/lib/libc.sa(__libc.o):6008f1a4 A _DOWN_PARM
+/usr/lib/libc.sa(__libc.o):6008f03c A _Def_term
+/usr/lib/libc.sa(__libc.o):6008f0e8 A _ED
+/usr/lib/libc.sa(__libc.o):6008f0ec A _EI
+/usr/lib/libc.sa(__libc.o):6008f074 A _EO
+/usr/lib/libc.sa(__libc.o):6008f1b8 A _GT
+/usr/lib/libc.sa(__libc.o):6008f078 A _HC
+/usr/lib/libc.sa(__libc.o):6008f118 A _HO
+/usr/lib/libc.sa(__libc.o):6008f07c A _HZ
+/usr/lib/libc.sa(__libc.o):6008f11c A _IC
+/usr/lib/libc.sa(__libc.o):6008f120 A _IM
+/usr/lib/libc.sa(__libc.o):6008f080 A _IN
+/usr/lib/libc.sa(__libc.o):6008f124 A _IP
+/usr/lib/libc.sa(__libc.o):6008f0f0 A _K0
+/usr/lib/libc.sa(__libc.o):6008f0f4 A _K1
+/usr/lib/libc.sa(__libc.o):6008f0f8 A _K2
+/usr/lib/libc.sa(__libc.o):6008f0fc A _K3
+/usr/lib/libc.sa(__libc.o):6008f100 A _K4
+/usr/lib/libc.sa(__libc.o):6008f104 A _K5
+/usr/lib/libc.sa(__libc.o):6008f108 A _K6
+/usr/lib/libc.sa(__libc.o):6008f10c A _K7
+/usr/lib/libc.sa(__libc.o):6008f110 A _K8
+/usr/lib/libc.sa(__libc.o):6008f114 A _K9
+/usr/lib/libc.sa(__libc.o):6008f128 A _KD
+/usr/lib/libc.sa(__libc.o):6008f12c A _KE
+/usr/lib/libc.sa(__libc.o):6008f130 A _KH
+/usr/lib/libc.sa(__libc.o):6008f134 A _KL
+/usr/lib/libc.sa(__libc.o):6008f138 A _KR
+/usr/lib/libc.sa(__libc.o):6008f13c A _KS
+/usr/lib/libc.sa(__libc.o):6008f140 A _KU
+/usr/lib/libc.sa(__libc.o):6008f1a8 A _LEFT_PARM
+/usr/lib/libc.sa(__libc.o):6008f044 A _LINES
+/usr/lib/libc.sa(__libc.o):6008f144 A _LL
+/usr/lib/libc.sa(__libc.o):6008f148 A _MA
+/usr/lib/libc.sa(__libc.o):6008f300 A _MCAppPath
+/usr/lib/libc.sa(__libc.o):6008f084 A _MI
+/usr/lib/libc.sa(__libc.o):6008f088 A _MS
+/usr/lib/libc.sa(__libc.o):6008f030 A _My_term
+/usr/lib/libc.sa(__libc.o):6008f08c A _NC
+/usr/lib/libc.sa(__libc.o):6008f14c A _ND
+/usr/lib/libc.sa(__libc.o):6008f150 A _NL
+/usr/lib/libc.sa(__libc.o):6008f1bc A _NONL
+/usr/lib/libc.sa(__libc.o):6008f090 A _NS
+/usr/lib/libc.sa(__libc.o):6008f094 A _OS
+/usr/lib/libc.sa(__libc.o):6008f1b0 A _PC
+/usr/lib/libc.sa(__libc.o):6008f154 A _RC
+/usr/lib/libc.sa(__libc.o):6008f1ac A _RIGHT_PARM
+/usr/lib/libc.sa(__libc.o):6008f158 A _SC
+/usr/lib/libc.sa(__libc.o):6008f15c A _SE
+/usr/lib/libc.sa(__libc.o):6008f160 A _SF
+/usr/lib/libc.sa(__libc.o):6008f164 A _SO
+/usr/lib/libc.sa(__libc.o):6008f168 A _SR
+/usr/lib/libc.sa(__libc.o):6008f16c A _TA
+/usr/lib/libc.sa(__libc.o):6008f170 A _TE
+/usr/lib/libc.sa(__libc.o):6008f174 A _TI
+/usr/lib/libc.sa(__libc.o):6008f178 A _UC
+/usr/lib/libc.sa(__libc.o):6008f17c A _UE
+/usr/lib/libc.sa(__libc.o):6008f098 A _UL
+/usr/lib/libc.sa(__libc.o):6008f180 A _UP
+/usr/lib/libc.sa(__libc.o):6008f1c0 A _UPPERCASE
+/usr/lib/libc.sa(__libc.o):6008f1a0 A _UP_PARM
+/usr/lib/libc.sa(__libc.o):6008f188 A _US
+/usr/lib/libc.sa(__libc.o):6008f18c A _VB
+/usr/lib/libc.sa(__libc.o):6008f194 A _VE
+/usr/lib/libc.sa(__libc.o):6008f190 A _VS
+/usr/lib/libc.sa(__libc.o):6008f09c A _XB
+/usr/lib/libc.sa(__libc.o):6008f0a0 A _XN
+/usr/lib/libc.sa(__libc.o):6008f0a8 A _XS
+/usr/lib/libc.sa(__libc.o):6008f0a4 A _XT
+/usr/lib/libc.sa(__libc.o):6008f0ac A _XX
+/usr/lib/libc.sa(__libc.o):6008f2a4 A __IO_file_jumps
+/usr/lib/libc.sa(__libc.o):6008f1f4 A __IO_list_all
+/usr/lib/libc.sa(__libc.o):6008f2a8 A __IO_proc_jumps
+/usr/lib/libc.sa(__libc.o):6008f1ec A __IO_stderr_
+/usr/lib/libc.sa(__libc.o):6008f1e4 A __IO_stdin_
+/usr/lib/libc.sa(__libc.o):6008f1e8 A __IO_stdout_
+/usr/lib/libc.sa(__libc.o):6008f2ac A __IO_str_jumps
+/usr/lib/libc.sa(__libc.o):6008f214 A ____brk_addr
+/usr/lib/libc.sa(__libc.o):6008f01c A ___ctype_b
+/usr/lib/libc.sa(__libc.o):6008f020 A ___ctype_tolower
+/usr/lib/libc.sa(__libc.o):6008f024 A ___ctype_toupper
+/usr/lib/libc.sa(__libc.o):6008f1fc A ___environ
+/usr/lib/libc.sa(__libc.o):6008f250 A ___exit_funcs
+/usr/lib/libc.sa(__libc.o):6008f2f0 A ___glob_closedir_hook
+/usr/lib/libc.sa(__libc.o):6008f2f4 A ___glob_opendir_hook
+/usr/lib/libc.sa(__libc.o):6008f2f8 A ___glob_readdir_hook
+/usr/lib/libc.sa(__libc.o):6008f278 A ___ttyname
+/usr/lib/libc.sa(__libc.o):6008f238 A __collate_info
+/usr/lib/libc.sa(__libc.o):6008f23c A __ctype_info
+/usr/lib/libc.sa(__libc.o):6008f028 A __echoit
+/usr/lib/libc.sa(__libc.o):6008f034 A __endwin
+/usr/lib/libc.sa(__libc.o):6008f288 A __gdbm_fetch_val
+/usr/lib/libc.sa(__libc.o):6008f280 A __gdbm_file
+/usr/lib/libc.sa(__libc.o):6008f284 A __gdbm_memory
+/usr/lib/libc.sa(__libc.o):6008f240 A __monetary_info
+/usr/lib/libc.sa(__libc.o):6008f234 A __null_auth
+/usr/lib/libc.sa(__libc.o):6008f244 A __numeric_info
+/usr/lib/libc.sa(__libc.o):6008f2ec A __obstack
+/usr/lib/libc.sa(__libc.o):6008f1c8 A __pfast
+/usr/lib/libc.sa(__libc.o):6008f02c A __rawmode
+/usr/lib/libc.sa(__libc.o):6008f1dc A __res
+/usr/lib/libc.sa(__libc.o):6008f04c A __res_iflg
+/usr/lib/libc.sa(__libc.o):6008f050 A __res_lflg
+/usr/lib/libc.sa(__libc.o):6008f270 A __res_opcodes
+/usr/lib/libc.sa(__libc.o):6008f274 A __res_resultcodes
+/usr/lib/libc.sa(__libc.o):6008f248 A __response_info
+/usr/lib/libc.sa(__libc.o):6008f2fc A __sigintr
+/usr/lib/libc.sa(__libc.o):6008f00c A __sys_errlist
+/usr/lib/libc.sa(__libc.o):6008f010 A __sys_nerr
+/usr/lib/libc.sa(__libc.o):6008f014 A __sys_siglist
+/usr/lib/libc.sa(__libc.o):6008f24c A __time_info
+/usr/lib/libc.sa(__libc.o):6008f05c A __tty
+/usr/lib/libc.sa(__libc.o):6008f040 A __tty_ch
+/usr/lib/libc.sa(__libc.o):6008f1cc A __unctrl
+/usr/lib/libc.sa(__libc.o):6008f27c A __win
+/usr/lib/libc.sa(__libc.o):6008f058 A _curscr
+/usr/lib/libc.sa(__libc.o):6008f228 A _daylight
+/usr/lib/libc.sa(__libc.o):6008f200 A _errno
+/usr/lib/libc.sa(__libc.o):6008f1d0 A _gdbm_errno
+/usr/lib/libc.sa(__libc.o):6008f28c A _gdbm_version
+/usr/lib/libc.sa(__libc.o):6008f008 A _h_errlist
+/usr/lib/libc.sa(__libc.o):6008f1d8 A _h_errno
+/usr/lib/libc.sa(__libc.o):6008f2a0 A _h_nerr
+/usr/lib/libc.sa(__libc.o):6008f1c4 A _normtty
+/usr/lib/libc.sa(__libc.o):6008f204 A _optarg
+/usr/lib/libc.sa(__libc.o):6008f20c A _opterr
+/usr/lib/libc.sa(__libc.o):6008f208 A _optind
+/usr/lib/libc.sa(__libc.o):6008f2e4 A _optopt
+/usr/lib/libc.sa(__libc.o):6008f218 A _ospeed
+/usr/lib/libc.sa(__libc.o):6008f26c A _re_max_failures
+/usr/lib/libc.sa(__libc.o):6008f210 A _re_syntax_options
+/usr/lib/libc.sa(__libc.o):6008f1e0 A _rexecoptions
+/usr/lib/libc.sa(__libc.o):6008f230 A _rpc_createerr
+/usr/lib/libc.sa(__libc.o):6008f25c A _stderr
+/usr/lib/libc.sa(__libc.o):6008f254 A _stdin
+/usr/lib/libc.sa(__libc.o):6008f258 A _stdout
+/usr/lib/libc.sa(__libc.o):6008f054 A _stdscr
+/usr/lib/libc.sa(__libc.o):6008f2e8 A _svc_fdset
+/usr/lib/libc.sa(__libc.o):6008f224 A _timezone
+/usr/lib/libc.sa(__libc.o):6008f21c A _tputs_baud_rate
+/usr/lib/libc.sa(__libc.o):6008f038 A _ttytype
+/usr/lib/libc.sa(__libc.o):6008f220 A _tzname
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.params
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.params 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.params 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,6 @@
+Name=libe2fs
+Text=0x66900000
+Data=0x00000000
+Jump=0x00001000
+GOT=0x00001000
+Version=1.2.0
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.undefs
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.undefs 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.undefs 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2 @@
+6690b080 D __NEEDS_SHRLIB_libc_4
+6690b098 D __NEEDS_SHRLIB_libet_1
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.vars
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.vars 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dll/jump.vars 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,6 @@
+00000004 D _unix_io_manager libext2fs unix_io
+00000004 D _test_io_manager libext2fs test_io
+00000004 D _test_io_backing_manager libext2fs test_io
+00000004 D _test_io_cb_read_blk libext2fs test_io
+00000004 D _test_io_cb_write_blk libext2fs test_io
+00000004 D _test_io_cb_set_blksize libext2fs test_io
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dosio.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dosio.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dosio.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,456 @@
+/*
+ * dosio.c -- Disk I/O module for the ext2fs/DOS library.
+ *
+ * Copyright (c) 1997 by Theodore Ts'o.
+ *
+ * Copyright (c) 1997 Mark Habersack
+ * This file may be distributed under the terms of the GNU Public License.
+ *
+ */
+
+#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;
+ if (part)
+ 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;
+ if (part)
+ 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;
+ if (part)
+ 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)
+{
+ if (channel->name)
+ free(channel->name);
+ if (channel)
+ 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;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dosio.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dosio.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dosio.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,153 @@
+/*
+ * v1.0
+ *
+ * Disk I/O include file for the ext2fs/DOS library.
+ *
+ * Copyright (c) 1997 Mark Habersack
+ * This file may be distributed under the terms of the GNU Public License.
+ *
+ */
+#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 */
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dupfs.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dupfs.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/dupfs.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,92 @@
+/*
+ * dupfs.c --- duplicate a ext2 filesystem handle
+ *
+ * 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>
+#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),
+ (void **) &fs);
+ if (retval)
+ return retval;
+
+ *fs = *src;
+ fs->device_name = 0;
+ fs->super = 0;
+ fs->group_desc = 0;
+ fs->inode_map = 0;
+ fs->block_map = 0;
+ fs->badblocks = 0;
+ fs->dblist = 0;
+
+ io_channel_bumpcount(fs->io);
+ if (fs->icache)
+ fs->icache->refcount++;
+
+ retval = ext2fs_get_mem(strlen(src->device_name)+1,
+ (void **) &fs->device_name);
+ if (retval)
+ goto errout;
+ strcpy(fs->device_name, src->device_name);
+
+ retval = ext2fs_get_mem(SUPERBLOCK_SIZE, (void **) &fs->super);
+ if (retval)
+ goto errout;
+ memcpy(fs->super, src->super, SUPERBLOCK_SIZE);
+
+ retval = ext2fs_get_mem((size_t) fs->desc_blocks * fs->blocksize,
+ (void **) &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;
+ }
+ *dest = fs;
+ return 0;
+errout:
+ ext2fs_free(fs);
+ return retval;
+
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/e2image.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/e2image.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/e2image.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,51 @@
+/*
+ * 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 Public
+ * License.
+ * %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];
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/expanddir.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/expanddir.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/expanddir.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,126 @@
+/*
+ * 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 Public
+ * License.
+ * %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;
+ errcode_t err;
+};
+
+static int expand_dir_proc(ext2_filsys fs,
+ blk_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block,
+ int ref_offset,
+ void *priv_data)
+{
+ struct expand_dir_struct *es = (struct expand_dir_struct *) priv_data;
+ blk_t new_blk;
+ static blk_t last_blk = 0;
+ char *block;
+ errcode_t retval;
+
+ if (*blocknr) {
+ last_blk = *blocknr;
+ return 0;
+ }
+ retval = ext2fs_new_block(fs, last_blk, 0, &new_blk);
+ if (retval) {
+ es->err = retval;
+ return BLOCK_ABORT;
+ }
+ 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, (void **) &block);
+ if (retval) {
+ es->err = retval;
+ return BLOCK_ABORT;
+ }
+ memset(block, 0, fs->blocksize);
+ retval = io_channel_write_blk(fs->io, new_blk, 1, block);
+ }
+ if (retval) {
+ es->err = retval;
+ return BLOCK_ABORT;
+ }
+ ext2fs_free_mem((void **) &block);
+ *blocknr = new_blk;
+ ext2fs_block_alloc_stats(fs, new_blk, +1);
+ es->newblocks++;
+
+ 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.newblocks = 0;
+
+ retval = ext2fs_block_iterate2(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;
+ inode.i_blocks += (fs->blocksize / 512) * es.newblocks;
+
+ retval = ext2fs_write_inode(fs, dir, &inode);
+ if (retval)
+ return retval;
+
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_err.et.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_err.et.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_err.et.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,279 @@
+#
+# 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_RESERVED_9,
+ "Wrong magic number --- RESERVED_9"
+
+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 an block bitmap"
+
+ec EXT2_ET_BLOCK_BITMAP_READ,
+ "Can't read an 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 from 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"
+
+ end
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_ext_attr.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_ext_attr.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_ext_attr.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,58 @@
+/*
+ File: linux/ext2_ext_attr.h
+
+ On-disk format of extended attributes for the ext2 filesystem.
+
+ (C) 2000 Andreas Gruenbacher, <a.gruenbacher at computer.org>
+*/
+
+/* Magic value in attribute blocks */
+#define EXT2_EXT_ATTR_MAGIC 0xEA010000
+
+/* 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; /* index into table of names (n/i) */
+ __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 */
+ char e_name[0]; /* attribute name */
+};
+
+#define EXT2_EXT_ATTR_PAD_BITS 2
+#define EXT2_EXT_ATTR_PAD (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)
+
+#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__ */
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_fs.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_fs.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_fs.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,656 @@
+/*
+ * linux/include/linux/ext2_fs.h
+ *
+ * Copyright (C) 1992, 1993, 1994, 1995
+ * Remy Card (card at 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 inodes numbers
+ */
+#define EXT2_BAD_INO 1 /* Bad blocks inode */
+#define EXT2_ROOT_INO 2 /* Root inode */
+#define EXT2_ACL_IDX_INO 3 /* ACL inode */
+#define EXT2_ACL_DATA_INO 4 /* ACL 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 */
+
+/* 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
+
+/*
+ * Maximal count of links to a file
+ */
+#define EXT2_LINK_MAX 32000
+
+/*
+ * Macro-instructions used to manage several block sizes
+ */
+#define EXT2_MIN_BLOCK_SIZE 1024
+#define EXT2_MAX_BLOCK_SIZE 4096
+#define EXT2_MIN_BLOCK_LOG_SIZE 10
+#ifdef __KERNEL__
+# define EXT2_BLOCK_SIZE(s) ((s)->s_blocksize)
+#else
+# define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
+#endif
+#define EXT2_ACLE_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_acl_entry))
+#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
+#ifdef __KERNEL__
+# define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits)
+#else
+# define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
+#endif
+#ifdef __KERNEL__
+#define EXT2_ADDR_PER_BLOCK_BITS(s) ((s)->u.ext2_sb.s_addr_per_block_bits)
+#define EXT2_INODE_SIZE(s) ((s)->u.ext2_sb.s_inode_size)
+#define EXT2_FIRST_INO(s) ((s)->u.ext2_sb.s_first_ino)
+#else
+#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
+
+/*
+ * Macro-instructions used to manage fragments
+ */
+#define EXT2_MIN_FRAG_SIZE 1024
+#define EXT2_MAX_FRAG_SIZE 4096
+#define EXT2_MIN_FRAG_LOG_SIZE 10
+#ifdef __KERNEL__
+# define EXT2_FRAG_SIZE(s) ((s)->u.ext2_sb.s_frag_size)
+# define EXT2_FRAGS_PER_BLOCK(s) ((s)->u.ext2_sb.s_frags_per_block)
+#else
+# define EXT2_FRAG_SIZE(s) (EXT2_MIN_FRAG_SIZE << (s)->s_log_frag_size)
+# define EXT2_FRAGS_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_FRAG_SIZE(s))
+#endif
+
+/*
+ * 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_pad;
+ __u32 bg_reserved[3];
+};
+
+/*
+ * 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;
+};
+
+struct ext2_dx_entry {
+ __u32 hash;
+ __u32 block;
+};
+
+struct ext2_dx_countlimit {
+ __u16 limit;
+ __u16 count;
+};
+
+
+/*
+ * Macro-instructions used to manage group descriptors
+ */
+#ifdef __KERNEL__
+# define EXT2_BLOCKS_PER_GROUP(s) ((s)->u.ext2_sb.s_blocks_per_group)
+# define EXT2_DESC_PER_BLOCK(s) ((s)->u.ext2_sb.s_desc_per_block)
+# define EXT2_INODES_PER_GROUP(s) ((s)->u.ext2_sb.s_inodes_per_group)
+# define EXT2_DESC_PER_BLOCK_BITS(s) ((s)->u.ext2_sb.s_desc_per_block_bits)
+#else
+# define EXT2_BLOCKS_PER_GROUP(s) ((s)->s_blocks_per_group)
+# define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc))
+# define EXT2_INODES_PER_GROUP(s) ((s)->s_inodes_per_group)
+#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 */
+#define EXT2_ECOMPR_FL 0x00000800 /* Compression error */
+/* 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_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
+
+#define EXT2_FL_USER_VISIBLE 0x0000DFFF /* User visible flags */
+#define EXT2_FL_USER_MODIFIABLE 0x000080FF /* User modifiable flags */
+
+/*
+ * ioctl commands
+ */
+#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)
+
+/*
+ * 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; /* Creation 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_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_generation; /* 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;
+ __u16 l_i_uid_high; /* these 2 fields */
+ __u16 l_i_gid_high; /* were reserved2[0] */
+ __u32 l_i_reserved2;
+ } 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 */
+};
+
+#define i_size_high i_dir_acl
+
+#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
+#define i_reserved2 osd2.linux2.l_i_reserved2
+
+#elif 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
+
+#elif defined(__masix__)
+
+#define i_reserved1 osd1.masix1.m_i_reserved1
+#define i_frag osd2.masix2.m_i_frag
+#define i_fsize osd2.masix2.m_i_fsize
+#define i_reserved2 osd2.masix2.m_i_reserved2
+
+#endif /* defined(__KERNEL) || defined(__linux__) */
+
+/*
+ * File system states
+ */
+#define EXT2_VALID_FS 0x0001 /* Unmounted cleanly */
+#define EXT2_ERROR_FS 0x0002 /* Errors detected */
+
+/*
+ * 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) ((sb)->u.ext2_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
+
+/*
+ * 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 */
+ /*
+ * 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_padding1;
+ /*
+ * 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_reserved[197]; /* Padding to the end of the block */
+};
+
+#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
+
+/*
+ * Codes for operating systems
+ */
+#define EXT2_OS_LINUX 0
+#define EXT2_OS_HURD 1
+#define EXT2_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
+
+/*
+ * 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_RO_COMPAT_SPARSE_SUPER 0x0001
+#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
+#define EXT2_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
+
+#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_COMPAT_SUPP 0
+#define EXT2_FEATURE_INCOMPAT_SUPP EXT2_FEATURE_INCOMPAT_FILETYPE
+#define EXT2_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
+ 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
+
+/*
+ * 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)
+
+#ifdef __KERNEL__
+/*
+ * Function prototypes
+ */
+
+/*
+ * Ok, these declarations are also in <linux/kernel.h> but none of the
+ * ext2 source programs needs to include it so they are duplicated here.
+ */
+# define NORET_TYPE /**/
+# define ATTRIB_NORET __attribute__((noreturn))
+# define NORET_AND noreturn,
+
+/* acl.c */
+extern int ext2_permission (struct inode *, int);
+
+/* balloc.c */
+extern int ext2_bg_has_super(struct super_block *sb, int group);
+extern unsigned long ext2_bg_num_gdb(struct super_block *sb, int group);
+extern int ext2_new_block (const struct inode *, unsigned long,
+ __u32 *, __u32 *, int *);
+extern void ext2_free_blocks (const struct inode *, unsigned long,
+ unsigned long);
+extern unsigned long ext2_count_free_blocks (struct super_block *);
+extern void ext2_check_blocks_bitmap (struct super_block *);
+extern struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb,
+ unsigned int block_group,
+ struct buffer_head ** bh);
+
+/* bitmap.c */
+extern unsigned long ext2_count_free (struct buffer_head *, unsigned);
+
+/* dir.c */
+extern int ext2_check_dir_entry (const char *, struct inode *,
+ struct ext2_dir_entry_2 *, struct buffer_head *,
+ unsigned long);
+
+/* file.c */
+extern int ext2_read (struct inode *, struct file *, char *, int);
+extern int ext2_write (struct inode *, struct file *, char *, int);
+
+/* fsync.c */
+extern int ext2_sync_file (struct file *, struct dentry *, int);
+extern int ext2_fsync_inode (struct inode *, int);
+
+/* ialloc.c */
+extern struct inode * ext2_new_inode (const struct inode *, int);
+extern void ext2_free_inode (struct inode *);
+extern unsigned long ext2_count_free_inodes (struct super_block *);
+extern void ext2_check_inodes_bitmap (struct super_block *);
+
+/* inode.c */
+
+extern struct buffer_head * ext2_getblk (struct inode *, long, int, int *);
+extern struct buffer_head * ext2_bread (struct inode *, int, int, int *);
+
+extern void ext2_read_inode (struct inode *);
+extern void ext2_write_inode (struct inode *, int);
+extern void ext2_put_inode (struct inode *);
+extern void ext2_delete_inode (struct inode *);
+extern int ext2_sync_inode (struct inode *);
+extern void ext2_discard_prealloc (struct inode *);
+
+/* ioctl.c */
+extern int ext2_ioctl (struct inode *, struct file *, unsigned int,
+ unsigned long);
+
+/* namei.c */
+extern struct inode_operations ext2_dir_inode_operations;
+
+/* super.c */
+extern void ext2_error (struct super_block *, const char *, const char *, ...)
+ __attribute__ ((format (printf, 3, 4)));
+extern NORET_TYPE void ext2_panic (struct super_block *, const char *,
+ const char *, ...)
+ __attribute__ ((NORET_AND format (printf, 3, 4)));
+extern void ext2_warning (struct super_block *, const char *, const char *, ...)
+ __attribute__ ((format (printf, 3, 4)));
+extern void ext2_update_dynamic_rev (struct super_block *sb);
+extern void ext2_put_super (struct super_block *);
+extern void ext2_write_super (struct super_block *);
+extern int ext2_remount (struct super_block *, int *, char *);
+extern struct super_block * ext2_read_super (struct super_block *,void *,int);
+extern int ext2_statfs (struct super_block *, struct statfs *);
+
+/* truncate.c */
+extern void ext2_truncate (struct inode *);
+
+/*
+ * Inodes and files operations
+ */
+
+/* dir.c */
+extern struct file_operations ext2_dir_operations;
+
+/* file.c */
+extern struct inode_operations ext2_file_inode_operations;
+extern struct file_operations ext2_file_operations;
+
+/* symlink.c */
+extern struct inode_operations ext2_fast_symlink_inode_operations;
+
+extern struct address_space_operations ext2_aops;
+
+#endif /* __KERNEL__ */
+
+#endif /* _LINUX_EXT2_FS_H */
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_io.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_io.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_io.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,100 @@
+/*
+ * 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 Public
+ * License.
+ * %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;
+
+#define CHANNEL_FLAGS_WRITETHROUGH 0x01
+
+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;
+ int reserved[14];
+ void *private_data;
+ void *app_data;
+};
+
+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);
+ int reserved[15];
+};
+
+#define IO_FLAG_RW 1
+
+/*
+ * 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_write_byte(c,b,n,d) ((c)->manager->write_byte((c),b,n,d))
+#define io_channel_bumpcount(c) ((c)->refcount++)
+
+/* unix_io.c */
+extern io_manager unix_io_manager;
+
+/* 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_set_blksize)
+ (int blksize, errcode_t err);
+
+#endif /* _EXT2FS_EXT2_IO_H */
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_types.h.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_types.h.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2_types.h.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,53 @@
+#ifndef _EXT2_TYPES_H
+#define _EXT2_TYPES_H
+
+/*
+ * If linux/types.h is already been included, assume it has defined
+ * everything we need. (cross fingers)
+ */
+#ifndef _LINUX_TYPES_H
+
+typedef unsigned char __u8;
+typedef signed char __s8;
+
+#if (@SIZEOF_INT@ == 8)
+typedef int __s64;
+typedef unsigned int __u64;
+#elif (@SIZEOF_LONG@ == 8)
+typedef long __s64;
+typedef unsigned long __u64;
+#elif (@SIZEOF_LONG_LONG@ == 8)
+#if defined(__GNUC__)
+typedef __signed__ long long __s64;
+#else
+typedef signed long long __s64;
+#endif
+typedef unsigned long long __u64;
+#endif
+
+#if (@SIZEOF_INT@ == 2)
+typedef int __s16;
+typedef unsigned int __u16;
+#elif (@SIZEOF_SHORT@ == 2)
+typedef short __s16;
+typedef unsigned short __u16;
+#else
+ ?==error: undefined 16 bit type
+#endif
+
+#if (@SIZEOF_INT@ == 4)
+typedef int __s32;
+typedef unsigned int __u32;
+#elif (@SIZEOF_LONG@ == 4)
+typedef long __s32;
+typedef unsigned long __u32;
+#elif (@SIZEOF_SHORT@ == 4)
+typedef short __s32;
+typedef unsigned short __u32;
+#else
+ ?== error: undefined 32 bit type
+#endif
+
+#endif /* LINUX_TYPES_H */
+
+#endif /* EXT2_TYPES_H */
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2fs.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2fs.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2fs.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1003 @@
+/*
+ * 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 Public
+ * License.
+ * %End-Header%
+ */
+
+#ifndef _EXT2FS_EXT2FS_H
+#define _EXT2FS_EXT2FS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Non-GNU C compilers won't necessarily understand inline
+ */
+#if (!defined(__GNUC__) && !defined(__WATCOMC__))
+#define NO_INLINE_FUNCS
+#endif
+
+/*
+ * Build in support for byte-swapping filesystems if we the feature
+ * has been configured or if we're being built on a CPU architecture
+ * with a non-native byte order.
+ */
+#if defined(ENABLE_SWAPFS) || defined(WORDS_BIGENDIAN)
+#define EXT2FS_ENABLE_SWAPFS
+#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 <stdlib.h>
+
+#if EXT2_FLAT_INCLUDES
+#include "e2_types.h"
+#else
+#include <ext2fs/ext2_types.h>
+#endif /* EXT2_FLAT_INCLUDES */
+
+typedef __u32 ext2_ino_t;
+typedef __u32 blk_t;
+typedef __u32 dgrp_t;
+typedef __u32 ext2_off_t;
+typedef __s64 e2_blkcnt_t;
+
+#if EXT2_FLAT_INCLUDES
+#include "com_err.h"
+#include "ext2_io.h"
+#include "ext2_err.h"
+#else
+#include <et/com_err.h>
+#include <ext2fs/ext2_io.h>
+#include <ext2fs/ext2_err.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;
+
+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_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;
+
+#ifdef EXT2_DYNAMIC_REV
+#define EXT2_FIRST_INODE(s) EXT2_FIRST_INO(s)
+#else
+#define EXT2_FIRST_INODE(s) EXT2_FIRST_INO
+#define EXT2_INODE_SIZE(s) sizeof(struct ext2_inode)
+#endif
+
+/*
+ * badblocks list definitions
+ */
+
+typedef struct ext2_struct_badblocks_list *ext2_badblocks_list;
+typedef struct ext2_struct_badblocks_iterate *ext2_badblocks_iterate;
+
+/* old */
+typedef struct ext2_struct_badblocks_list *badblocks_list;
+typedef struct ext2_struct_badblocks_iterate *badblocks_iterate;
+
+#define BADBLOCKS_FLAG_DIRTY 1
+
+/*
+ * ext2_dblist structure and abstractions (see dblist.c)
+ */
+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
+
+/*
+ * 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
+ *
+ * EXT2_MKJOURNAL_V1_SUPER Make a (deprecated) V1 journal superblock
+ */
+#define EXT2_MKJOURNAL_V1_SUPER 0x0000001
+
+struct struct_ext2_filsys {
+ errcode_t magic;
+ io_channel io;
+ int flags;
+ char * device_name;
+ struct ext2_super_block * super;
+ int blocksize;
+ int fragsize;
+ dgrp_t group_desc_count;
+ unsigned long desc_blocks;
+ struct ext2_group_desc * group_desc;
+ int inode_blocks_per_group;
+ ext2fs_inode_bitmap inode_map;
+ ext2fs_block_bitmap block_map;
+ 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);
+ badblocks_list badblocks;
+ ext2_dblist dblist;
+ __u32 stride; /* for mke2fs */
+ struct ext2_super_block * orig_super;
+ struct ext2_image_hdr * image_header;
+ __u32 umask;
+ /*
+ * Reserved for future expansion
+ */
+ __u32 reserved[8];
+
+ /*
+ * Reserved for the use of the calling application.
+ */
+ void * priv_data;
+
+ /*
+ * Inode cache
+ */
+ struct ext2_inode_cache *icache;
+};
+
+#if EXT2_FLAT_INCLUDES
+#include "e2_bitops.h"
+#else
+#include <ext2fs/bitops.h>
+#endif
+
+/*
+ * 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_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_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_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
+
+/*
+ * 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
+
+/*
+ * 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
+
+/*
+ * 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_icount_t abstraction
+ */
+#define EXT2_ICOUNT_OPT_INCREMENT 0x01
+
+typedef struct ext2_icount *ext2_icount_t;
+
+/*
+ * Flags for ext2fs_bmap
+ */
+#define BMAP_ALLOC 1
+
+/*
+ * 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) 0xffffffff)
+#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_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|\
+ EXT3_FEATURE_INCOMPAT_RECOVER)
+#else
+#define EXT2_LIB_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE|\
+ EXT3_FEATURE_INCOMPAT_JOURNAL_DEV|\
+ EXT3_FEATURE_INCOMPAT_RECOVER)
+#endif
+#define EXT2_LIB_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER|\
+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE)
+/*
+ * function prototypes
+ */
+
+/* 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_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_alloc_block(ext2_filsys fs, blk_t goal,
+ char *block_buf, blk_t *ret);
+
+/* 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);
+
+/* 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_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 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);
+
+/* 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 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_generic_bitmap(__u32 start,
+ __u32 end,
+ __u32 real_end,
+ const char *descr,
+ ext2fs_generic_bitmap *ret);
+extern errcode_t ext2fs_allocate_block_bitmap(ext2_filsys fs,
+ const char *descr,
+ ext2fs_block_bitmap *ret);
+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 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);
+
+/* 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);
+
+/* 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);
+
+
+#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_flush(ext2_filsys fs);
+extern int ext2fs_bg_has_super(ext2_filsys fs, int group_block);
+extern void ext2fs_update_dynamic_rev(ext2_filsys fs);
+
+/* cmp_bitmaps.c */
+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);
+
+/* 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_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_set_dir_block(ext2_dblist dblist, ext2_ino_t ino,
+ blk_t blk, int blockcnt);
+extern errcode_t ext2fs_copy_dblist(ext2_dblist src,
+ ext2_dblist *dest);
+extern int ext2fs_dblist_count(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_write_dir_block(ext2_filsys fs, blk_t block,
+ void *buf);
+
+/* dir_iterate.c */
+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 */
+void ext2fs_swap_ext_attr(ext2_filsys fs, char *to, char *from);
+extern errcode_t ext2fs_read_ext_attr(ext2_filsys fs, blk_t block, void *buf);
+extern errcode_t ext2fs_write_ext_attr(ext2_filsys fs, blk_t block, void *buf);
+/* fileio.c */
+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);
+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_lseek(ext2_file_t file, ext2_off_t offset,
+ int whence, ext2_off_t *ret_pos);
+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);
+
+/* 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_generic_bitmap(ext2fs_inode_bitmap bitmap);
+extern void ext2fs_free_block_bitmap(ext2fs_block_bitmap bitmap);
+extern void ext2fs_free_inode_bitmap(ext2fs_inode_bitmap bitmap);
+extern void ext2fs_free_dblist(ext2_dblist dblist);
+extern void ext2fs_badblocks_list_free(badblocks_list bb);
+
+/* getsize.c */
+extern errcode_t ext2fs_get_device_size(const char *file, int blocksize,
+ blk_t *retblocks);
+
+/* 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);
+
+/* 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_icount2(ext2_filsys fs, int flags, int size,
+ ext2_icount_t hint, ext2_icount_t *ret);
+extern errcode_t ext2fs_create_icount(ext2_filsys fs, int flags, 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 *);
+
+/* inode.c */
+extern errcode_t ext2fs_flush_icache(ext2_filsys fs);
+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 (ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode);
+extern errcode_t ext2fs_write_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);
+
+/* 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);
+
+/* 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_create_journal_superblock(ext2_filsys fs,
+ __u32 size, 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 size,
+ int flags);
+
+/* openfs.c */
+extern errcode_t ext2fs_open(const char *name, int flags, int superblock,
+ int block_size, io_manager manager,
+ ext2_filsys *ret_fs);
+
+/* 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);
+
+/* 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 *private,
+ void (*invalid)(ext2_filsys fs,
+ blk_t blk,
+ char *badstr,
+ void *private));
+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));
+
+/* rs_bitmap.c */
+extern errcode_t ext2fs_resize_generic_bitmap(__u32 new_end,
+ __u32 new_real_end,
+ ext2fs_generic_bitmap bmap);
+extern errcode_t ext2fs_resize_inode_bitmap(__u32 new_end, __u32 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_copy_bitmap(ext2fs_generic_bitmap src,
+ ext2fs_generic_bitmap *dest);
+
+/* swapfs.c */
+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_inode(ext2_filsys fs,struct ext2_inode *t,
+ struct ext2_inode *f, int hostorder);
+
+/* valid_blk.c */
+extern int ext2fs_inode_has_valid_blocks(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 */
+extern errcode_t ext2fs_get_mem(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 int ext2fs_group_of_blk(ext2_filsys fs, blk_t blk);
+extern int ext2fs_group_of_ino(ext2_filsys fs, ext2_ino_t ino);
+
+/*
+ * 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
+#ifdef __GNUC__
+#define _INLINE_ extern __inline__
+#else /* For Watcom C */
+#define _INLINE_ extern inline
+#endif
+#endif
+
+#ifndef EXT2_CUSTOM_MEMORY_ROUTINES
+/*
+ * Allocate memory
+ */
+_INLINE_ errcode_t ext2fs_get_mem(unsigned long size, void **ptr)
+{
+ *ptr = malloc(size);
+ if (!*ptr)
+ return EXT2_ET_NO_MEMORY;
+ return 0;
+}
+
+/*
+ * Free memory
+ */
+_INLINE_ errcode_t ext2fs_free_mem(void **ptr)
+{
+ free(*ptr);
+ *ptr = 0;
+ return 0;
+}
+
+/*
+ * Resize memory
+ */
+_INLINE_ errcode_t ext2fs_resize_mem(unsigned long old_size,
+ unsigned long size, void **ptr)
+{
+ void *p;
+
+ p = realloc(*ptr, size);
+ if (!p)
+ return EXT2_ET_NO_MEMORY;
+ *ptr = 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_ int ext2fs_group_of_blk(ext2_filsys fs, blk_t blk)
+{
+ return (blk - fs->super->s_first_data_block) /
+ fs->super->s_blocks_per_group;
+}
+
+/*
+ * Return the group # of an inode number
+ */
+_INLINE_ int ext2fs_group_of_ino(ext2_filsys fs, ext2_ino_t ino)
+{
+ return (ino - 1) / fs->super->s_inodes_per_group;
+}
+#undef _INLINE_
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _EXT2FS_EXT2FS_H */
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2fsP.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2fsP.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext2fsP.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,88 @@
+/*
+ * 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 Public
+ * License.
+ * %End-Header%
+ */
+
+#include "ext2fs.h"
+
+/*
+ * Badblocks list
+ */
+struct ext2_struct_badblocks_list {
+ int magic;
+ int num;
+ int size;
+ blk_t *list;
+ int badblocks_flags;
+};
+
+struct ext2_struct_badblocks_iterate {
+ int magic;
+ badblocks_list bb;
+ int ptr;
+};
+
+
+/*
+ * Directory block iterator definition
+ */
+struct ext2_struct_dblist {
+ int magic;
+ ext2_filsys fs;
+ ext2_ino_t size;
+ ext2_ino_t count;
+ int sorted;
+ struct ext2_db_entry * 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;
+ blk_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,
+ blk_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block,
+ int ref_offset,
+ void *priv_data);
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext_attr.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext_attr.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ext_attr.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,98 @@
+/*
+ * ext_attr.c --- extended attribute blocks
+ *
+ * Copyright (C) Andreas Gruenbacher, <a.gruenbacher at computer.org>
+ *
+ * %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
+#include <string.h>
+#include <time.h>
+
+#include "ext2_fs.h"
+#include "ext2_ext_attr.h"
+
+#include "ext2fs.h"
+
+#ifdef EXT2FS_ENABLE_SWAPFS
+void ext2fs_swap_ext_attr(ext2_filsys fs, char *to, char *from)
+{
+ 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 + fs->blocksize;
+ int n;
+
+ if (to_header != from_header)
+ memcpy(to_header, from_header, fs->blocksize);
+
+ 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);
+ for (n=0; n<4; n++)
+ to_header->h_reserved[n] =
+ ext2fs_swab32(from_header->h_reserved[n]);
+
+ from_entry = (struct ext2_ext_attr_entry *)(from_header+1);
+ to_entry = (struct ext2_ext_attr_entry *)(to_header+1);
+ while ((char *)from_entry < from_end && *(__u32 *)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);
+ from_entry = EXT2_EXT_ATTR_NEXT(from_entry);
+ to_entry = EXT2_EXT_ATTR_NEXT(to_entry);
+ }
+}
+#endif
+
+errcode_t ext2fs_read_ext_attr(ext2_filsys fs, blk_t block, void *buf)
+{
+ errcode_t retval;
+
+ retval = io_channel_read_blk(fs->io, block, 1, buf);
+ if (retval)
+ return retval;
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if ((fs->flags & (EXT2_FLAG_SWAP_BYTES|
+ EXT2_FLAG_SWAP_BYTES_READ)) != 0)
+ ext2fs_swap_ext_attr(fs, buf, buf);
+#endif
+ return 0;
+}
+
+errcode_t ext2fs_write_ext_attr(ext2_filsys fs, blk_t block, void *inbuf)
+{
+ errcode_t retval;
+ char *write_buf;
+ char *buf = NULL;
+
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if ((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)) {
+ retval = ext2fs_get_mem(fs->blocksize, (void **) &buf);
+ if (retval)
+ return retval;
+ write_buf = buf;
+ ext2fs_swap_ext_attr(fs, buf, inbuf);
+ } else
+#endif
+ write_buf = (char *) inbuf;
+ retval = io_channel_write_blk(fs->io, block, 1, write_buf);
+ if (buf)
+ ext2fs_free_mem((void **) &buf);
+ if (!retval)
+ ext2fs_mark_changed(fs);
+ return retval;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/fileio.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/fileio.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/fileio.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,334 @@
+/*
+ * 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 Public
+ * License.
+ * %End-Header%
+ */
+
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+struct ext2_file {
+ errcode_t magic;
+ ext2_filsys fs;
+ ext2_ino_t ino;
+ struct ext2_inode inode;
+ int flags;
+ ext2_off_t pos;
+ blk_t blockno;
+ blk_t physblock;
+ char *buf;
+};
+
+#define BMAP_BUFFER (file->buf + fs->blocksize)
+
+errcode_t ext2fs_file_open(ext2_filsys fs, ext2_ino_t ino,
+ 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), (void **) &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;
+
+ retval = ext2fs_read_inode(fs, ino, &file->inode);
+ if (retval)
+ goto fail;
+
+ retval = ext2fs_get_mem(fs->blocksize * 3, (void **) &file->buf);
+ if (retval)
+ goto fail;
+
+ *ret = file;
+ return 0;
+
+fail:
+ if (file->buf)
+ ext2fs_free_mem((void **) &file->buf);
+ ext2fs_free_mem((void **) &file);
+ return retval;
+}
+
+/*
+ * 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 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_bmap(fs, file->ino, &file->inode,
+ BMAP_BUFFER, BMAP_ALLOC,
+ file->blockno, &file->physblock);
+ if (retval)
+ return retval;
+ }
+
+ retval = io_channel_write_blk(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)
+{
+ blk_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_bmap(fs, file->ino, &file->inode,
+ BMAP_BUFFER, 0, file->blockno,
+ &file->physblock);
+ if (retval)
+ return retval;
+ if (!dontfill) {
+ if (file->physblock) {
+ retval = io_channel_read_blk(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((void **) &file->buf);
+ ext2fs_free_mem((void **) &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, left, c, count = 0;
+ char *ptr = (char *) buf;
+
+ EXT2_CHECK_MAGIC(file, EXT2_ET_MAGIC_EXT2_FILE);
+ fs = file->fs;
+
+ while ((file->pos < file->inode.i_size) && (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 = file->inode.i_size - 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;
+
+ file->flags |= EXT2_FILE_BUF_DIRTY;
+ memcpy(file->buf+start, ptr, c);
+ file->pos += c;
+ ptr += c;
+ count += c;
+ nbytes -= c;
+ }
+
+fail:
+ if (written)
+ *written = count;
+ return retval;
+}
+
+errcode_t ext2fs_file_lseek(ext2_file_t file, ext2_off_t offset,
+ int whence, ext2_off_t *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 = file->inode.i_size + offset;
+ else
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (ret_pos)
+ *ret_pos = file->pos;
+
+ 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)
+{
+ if (file->magic != EXT2_ET_MAGIC_EXT2_FILE)
+ return 0;
+ return file->inode.i_size;
+}
+
+/*
+ * This function sets the size of the file, truncating it if necessary
+ *
+ * XXX still need to call truncate
+ */
+errcode_t ext2fs_file_set_size(ext2_file_t file, ext2_off_t size)
+{
+ errcode_t retval;
+ EXT2_CHECK_MAGIC(file, EXT2_ET_MAGIC_EXT2_FILE);
+
+ file->inode.i_size = size;
+ retval = ext2fs_write_inode(file->fs, file->ino, &file->inode);
+ if (retval)
+ return retval;
+
+ /*
+ * XXX truncate inode if necessary
+ */
+
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/finddev.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/finddev.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/finddev.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,208 @@
+/*
+ * 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 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 "ext2_fs.h"
+#include "ext2fs.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;
+
+ /*
+ * 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;
+ }
+ }
+ 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/flushb.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/flushb.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/flushb.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,76 @@
+/*
+ * 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 Public
+ * License.
+ * %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/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
+ ioctl (fd, BLKFLSBUF, 0); /* In case this is a HD */
+#else
+ #warning BLKFLSBUF not defined
+#endif
+#ifdef FDFLUSH
+ ioctl (fd, FDFLUSH, 0); /* In case this is floppy */
+#else
+ #warning FDFLUSH not defined
+#endif
+ }
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/freefs.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/freefs.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/freefs.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,137 @@
+/*
+ * 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 Public
+ * License.
+ * %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->io) {
+ io_channel_close(fs->io);
+ }
+ if (fs->device_name)
+ ext2fs_free_mem((void **) &fs->device_name);
+ if (fs->super)
+ ext2fs_free_mem((void **) &fs->super);
+ if (fs->orig_super)
+ ext2fs_free_mem((void **) &fs->orig_super);
+ if (fs->group_desc)
+ ext2fs_free_mem((void **) &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->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);
+
+ fs->magic = 0;
+
+ ext2fs_free_mem((void **) &fs);
+}
+
+void ext2fs_free_generic_bitmap(ext2fs_inode_bitmap bitmap)
+{
+ if (!bitmap || (bitmap->magic != EXT2_ET_MAGIC_GENERIC_BITMAP))
+ return;
+
+ bitmap->magic = 0;
+ if (bitmap->description) {
+ ext2fs_free_mem((void **) &bitmap->description);
+ bitmap->description = 0;
+ }
+ if (bitmap->bitmap) {
+ ext2fs_free_mem((void **) &bitmap->bitmap);
+ bitmap->bitmap = 0;
+ }
+ ext2fs_free_mem((void **) &bitmap);
+}
+
+void ext2fs_free_inode_bitmap(ext2fs_inode_bitmap bitmap)
+{
+ if (!bitmap || (bitmap->magic != EXT2_ET_MAGIC_INODE_BITMAP))
+ return;
+
+ bitmap->magic = EXT2_ET_MAGIC_GENERIC_BITMAP;
+ ext2fs_free_generic_bitmap(bitmap);
+}
+
+void ext2fs_free_block_bitmap(ext2fs_block_bitmap bitmap)
+{
+ if (!bitmap || (bitmap->magic != EXT2_ET_MAGIC_BLOCK_BITMAP))
+ return;
+
+ bitmap->magic = EXT2_ET_MAGIC_GENERIC_BITMAP;
+ ext2fs_free_generic_bitmap(bitmap);
+}
+
+/*
+ * 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((void **) &icache->buffer);
+ if (icache->cache)
+ ext2fs_free_mem((void **) &icache->cache);
+ icache->buffer_blk = 0;
+ ext2fs_free_mem((void **) &icache);
+}
+
+/*
+ * This procedure frees a badblocks list.
+ */
+void ext2fs_badblocks_list_free(ext2_badblocks_list bb)
+{
+ if (bb->magic != EXT2_ET_MAGIC_BADBLOCKS_LIST)
+ return;
+
+ if (bb->list)
+ ext2fs_free_mem((void **) &bb->list);
+ bb->list = 0;
+ ext2fs_free_mem((void **) &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((void **) &dblist->list);
+ dblist->list = 0;
+ if (dblist->fs && dblist->fs->dblist == dblist)
+ dblist->fs->dblist = 0;
+ dblist->magic = 0;
+ ext2fs_free_mem((void **) &dblist);
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/gen_bitmap.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/gen_bitmap.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/gen_bitmap.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,48 @@
+/*
+ * gen_bitmap.c --- Generic bitmap routines that used to be inlined.
+ *
+ * Copyright (C) 2001 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 "ext2fs.h"
+
+int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap,
+ __u32 bitno)
+{
+ 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 ((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);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/get_pathname.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/get_pathname.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/get_pathname.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,158 @@
+/*
+ * 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 Public
+ * License.
+ * %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,
+ int blocksize,
+ char *buf,
+ 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,
+ (void **) &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, *ret;
+ errcode_t retval;
+
+ if (dir == ino) {
+ retval = ext2fs_get_mem(2, (void **)name);
+ if (retval)
+ return retval;
+ strcpy(*name, (dir == EXT2_ROOT_INO) ? "/" : ".");
+ return 0;
+ }
+
+ if (!dir || (maxdepth < 0)) {
+ retval = ext2fs_get_mem(4, (void **)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)
+ 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,
+ (void **) &ret);
+ else
+ retval = ext2fs_get_mem(strlen(parent_name)+5,
+ (void **) &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;
+ ext2fs_free_mem((void **) &parent_name);
+ retval = 0;
+
+cleanup:
+ if (gp.name)
+ ext2fs_free_mem((void **) &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, (void **) &buf);
+ if (retval)
+ return retval;
+ if (dir == ino)
+ ino = 0;
+ retval = ext2fs_get_pathname_int(fs, dir, ino, 32, buf, name);
+ ext2fs_free_mem((void **) &buf);
+ return retval;
+
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/getsize.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/getsize.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/getsize.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,157 @@
+/*
+ * 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 Public
+ * License.
+ * %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
+#ifdef HAVE_SYS_DISKLABEL_H
+#include <sys/ioctl.h>
+#include <sys/disklabel.h>
+#endif /* HAVE_SYS_DISKLABEL_H */
+
+#if defined(__linux__) && defined(_IO) && !defined(BLKGETSIZE)
+#define BLKGETSIZE _IO(0x12,96) /* return device size */
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+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_size(const char *file, int blocksize,
+ blk_t *retblocks)
+{
+ int fd;
+#ifdef BLKGETSIZE
+ unsigned long size;
+#endif
+ ext2_loff_t high, low;
+#ifdef FDGETPRM
+ struct floppy_struct this_floppy;
+#endif
+#ifdef HAVE_SYS_DISKLABEL_H
+ int part;
+ struct disklabel lab;
+ struct partition *pp;
+ char ch;
+#endif /* HAVE_SYS_DISKLABEL_H */
+
+#ifdef HAVE_OPEN64
+ fd = open64(file, O_RDONLY);
+#else
+ fd = open(file, O_RDONLY);
+#endif
+ if (fd < 0)
+ return errno;
+
+#ifdef BLKGETSIZE
+ if (ioctl(fd, BLKGETSIZE, &size) >= 0) {
+ close(fd);
+ *retblocks = size / (blocksize / 512);
+ return 0;
+ }
+#endif
+#ifdef FDGETPRM
+ if (ioctl(fd, FDGETPRM, &this_floppy) >= 0) {
+ close(fd);
+ *retblocks = this_floppy.size / (blocksize / 512);
+ return 0;
+ }
+#endif
+#ifdef HAVE_SYS_DISKLABEL_H
+ 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) {
+ close(fd);
+ *retblocks = pp->p_size / (blocksize / 512);
+ return 0;
+ }
+ }
+#endif /* HAVE_SYS_DISKLABEL_H */
+
+ /*
+ * 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);
+ close(fd);
+ *retblocks = (low + 1) / blocksize;
+ return 0;
+}
+
+#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 %d 1k blocks.\n", argv[1], blocks);
+ exit(0);
+}
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/icount.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/icount.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/icount.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,482 @@
+/*
+ * 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 Public
+ * License.
+ * %End-Header%
+ */
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <stdio.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.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;
+ __u16 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;
+ int cursor;
+ struct ext2_icount_el *list;
+};
+
+void ext2fs_free_icount(ext2_icount_t icount)
+{
+ if (!icount)
+ return;
+
+ icount->magic = 0;
+ if (icount->list)
+ ext2fs_free_mem((void **) &icount->list);
+ if (icount->single)
+ ext2fs_free_inode_bitmap(icount->single);
+ if (icount->multiple)
+ ext2fs_free_inode_bitmap(icount->multiple);
+ ext2fs_free_mem((void **) &icount);
+}
+
+errcode_t ext2fs_create_icount2(ext2_filsys fs, int flags, int size,
+ ext2_icount_t hint, ext2_icount_t *ret)
+{
+ ext2_icount_t icount;
+ errcode_t retval;
+ size_t bytes;
+ int i;
+
+ if (hint) {
+ EXT2_CHECK_MAGIC(hint, EXT2_ET_MAGIC_ICOUNT);
+ if (hint->size > size)
+ size = (size_t) hint->size;
+ }
+
+ retval = ext2fs_get_mem(sizeof(struct ext2_icount), (void **) &icount);
+ if (retval)
+ return retval;
+ memset(icount, 0, sizeof(struct ext2_icount));
+
+ retval = ext2fs_allocate_inode_bitmap(fs, 0,
+ &icount->single);
+ if (retval)
+ goto errout;
+
+ if (flags & EXT2_ICOUNT_OPT_INCREMENT) {
+ retval = ext2fs_allocate_inode_bitmap(fs, 0,
+ &icount->multiple);
+ if (retval)
+ goto errout;
+ } else
+ icount->multiple = 0;
+
+ 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 %d entries, %d bytes.\n",
+ icount->size, bytes);
+#endif
+ retval = ext2fs_get_mem(bytes, (void **) &icount->list);
+ if (retval)
+ goto errout;
+ memset(icount->list, 0, bytes);
+
+ icount->magic = EXT2_ET_MAGIC_ICOUNT;
+ icount->count = 0;
+ icount->cursor = 0;
+ icount->num_inodes = fs->super->s_inodes_count;
+
+ /*
+ * 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, 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->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 %d 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),
+ (void **) &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;
+ 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)
+{
+ float range;
+ int low, high, mid;
+ ext2_ino_t lowval, highval;
+
+ 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) {
+#if 0
+ mid = (low+high)/2;
+#else
+ if (low == high)
+ mid = low;
+ else {
+ /* Interpolate for efficiency */
+ lowval = icount->list[low].ino;
+ highval = icount->list[high].ino;
+
+ if (ino < lowval)
+ range = 0;
+ else if (ino > highval)
+ range = 1;
+ else
+ range = ((float) (ino - lowval)) /
+ (highval - lowval);
+ mid = low + ((int) (range * (high-low)));
+ }
+#endif
+ 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;
+}
+
+errcode_t ext2fs_icount_validate(ext2_icount_t icount, FILE *out)
+{
+ errcode_t ret = 0;
+ 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)
+{
+ struct ext2_icount_el *el;
+
+ EXT2_CHECK_MAGIC(icount, EXT2_ET_MAGIC_ICOUNT);
+
+ if (!ino || (ino > icount->num_inodes))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (ext2fs_test_inode_bitmap(icount->single, ino)) {
+ *ret = 1;
+ return 0;
+ }
+ if (icount->multiple &&
+ !ext2fs_test_inode_bitmap(icount->multiple, ino)) {
+ *ret = 0;
+ return 0;
+ }
+ el = get_icount_el(icount, ino, 0);
+ if (!el) {
+ *ret = 0;
+ return 0;
+ }
+ *ret = el->count;
+ return 0;
+}
+
+errcode_t ext2fs_icount_increment(ext2_icount_t icount, ext2_ino_t ino,
+ __u16 *ret)
+{
+ struct ext2_icount_el *el;
+
+ EXT2_CHECK_MAGIC(icount, EXT2_ET_MAGIC_ICOUNT);
+
+ if (!ino || (ino > icount->num_inodes))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ if (ext2fs_test_inode_bitmap(icount->single, ino)) {
+ /*
+ * If the existing count is 1, then we know there is
+ * no entry in the list.
+ */
+ el = get_icount_el(icount, ino, 1);
+ if (!el)
+ return EXT2_ET_NO_MEMORY;
+ ext2fs_unmark_inode_bitmap(icount->single, ino);
+ el->count = 2;
+ } 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 find it using
+ * get_icount_el().
+ */
+ if (ext2fs_test_inode_bitmap(icount->multiple, ino)) {
+ el = get_icount_el(icount, ino, 1);
+ if (!el)
+ return EXT2_ET_NO_MEMORY;
+ el->count++;
+ } else {
+ /*
+ * The count was zero; mark the single bitmap
+ * and return.
+ */
+ zero_count:
+ ext2fs_mark_inode_bitmap(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.
+ */
+ el = get_icount_el(icount, ino, 0);
+ if (!el) {
+ /* No entry means the count was zero */
+ goto zero_count;
+ }
+ el = get_icount_el(icount, ino, 1);
+ if (!el)
+ return EXT2_ET_NO_MEMORY;
+ el->count++;
+ }
+ if (icount->multiple)
+ ext2fs_mark_inode_bitmap(icount->multiple, ino);
+ if (ret)
+ *ret = el->count;
+ return 0;
+}
+
+errcode_t ext2fs_icount_decrement(ext2_icount_t icount, ext2_ino_t ino,
+ __u16 *ret)
+{
+ struct ext2_icount_el *el;
+
+ if (!ino || (ino > icount->num_inodes))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ EXT2_CHECK_MAGIC(icount, EXT2_ET_MAGIC_ICOUNT);
+
+ if (ext2fs_test_inode_bitmap(icount->single, ino)) {
+ ext2fs_unmark_inode_bitmap(icount->single, ino);
+ if (icount->multiple)
+ ext2fs_unmark_inode_bitmap(icount->multiple, ino);
+ else {
+ el = get_icount_el(icount, ino, 0);
+ if (el)
+ el->count = 0;
+ }
+ if (ret)
+ *ret = 0;
+ return 0;
+ }
+
+ if (icount->multiple &&
+ !ext2fs_test_inode_bitmap(icount->multiple, ino))
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ el = get_icount_el(icount, ino, 0);
+ if (!el || el->count == 0)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ el->count--;
+ if (el->count == 1)
+ ext2fs_mark_inode_bitmap(icount->single, ino);
+ if ((el->count == 0) && icount->multiple)
+ ext2fs_unmark_inode_bitmap(icount->multiple, ino);
+
+ if (ret)
+ *ret = el->count;
+ return 0;
+}
+
+errcode_t ext2fs_icount_store(ext2_icount_t icount, ext2_ino_t ino,
+ __u16 count)
+{
+ struct ext2_icount_el *el;
+
+ 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_bitmap(icount->single, ino);
+ if (icount->multiple)
+ ext2fs_unmark_inode_bitmap(icount->multiple, ino);
+ return 0;
+ }
+ if (count == 0) {
+ ext2fs_unmark_inode_bitmap(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_bitmap(icount->multiple, ino);
+ } else {
+ el = get_icount_el(icount, ino, 0);
+ if (el)
+ el->count = 0;
+ }
+ return 0;
+ }
+
+ /*
+ * Get the icount element
+ */
+ el = get_icount_el(icount, ino, 1);
+ if (!el)
+ return EXT2_ET_NO_MEMORY;
+ el->count = count;
+ ext2fs_unmark_inode_bitmap(icount->single, ino);
+ if (icount->multiple)
+ ext2fs_mark_inode_bitmap(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;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/imager.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/imager.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/imager.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,380 @@
+/*
+ * 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 Public
+ * License.
+ * %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"
+
+/*
+ * 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;
+ blk_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 = fs->group_desc[(unsigned)group].bg_inode_table;
+ if (!blk)
+ return EXT2_ET_MISSING_INODE_TABLE;
+ left = fs->inode_blocks_per_group;
+ while (left) {
+ c = BUF_BLOCKS;
+ if (c > left)
+ c = left;
+ retval = io_channel_read_blk(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;
+ lseek(fd, fs->blocksize, SEEK_CUR);
+ 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 != 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)
+{
+ unsigned int group, c, left;
+ char *buf;
+ blk_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 = fs->group_desc[(unsigned)group].bg_inode_table;
+ if (!blk) {
+ retval = EXT2_ET_MISSING_INODE_TABLE;
+ goto errout;
+ }
+ left = fs->inode_blocks_per_group;
+ while (left) {
+ c = BUF_BLOCKS;
+ if (c > left)
+ c = left;
+ actual = read(fd, buf, fs->blocksize * c);
+ if (actual == -1) {
+ retval = errno;
+ goto errout;
+ }
+ if (actual != fs->blocksize * c) {
+ retval = EXT2_ET_SHORT_READ;
+ goto errout;
+ }
+ retval = io_channel_write_blk(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)
+{
+ 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 != 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 != 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)
+{
+ 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)
+{
+ char *ptr;
+ int c, size;
+ char zero_buf[1024];
+ ssize_t actual;
+ errcode_t retval;
+
+ if (flags & IMAGER_FLAG_INODEMAP) {
+ if (!fs->inode_map) {
+ retval = ext2fs_read_inode_bitmap(fs);
+ if (retval)
+ return retval;
+ }
+ ptr = fs->inode_map->bitmap;
+ size = (EXT2_INODES_PER_GROUP(fs->super) / 8);
+ } else {
+ if (!fs->block_map) {
+ retval = ext2fs_read_block_bitmap(fs);
+ if (retval)
+ return retval;
+ }
+ ptr = fs->block_map->bitmap;
+ size = EXT2_BLOCKS_PER_GROUP(fs->super) / 8;
+ }
+ size = size * fs->group_desc_count;
+
+ actual = write(fd, ptr, size);
+ if (actual == -1) {
+ retval = errno;
+ goto errout;
+ }
+ if (actual != size) {
+ retval = EXT2_ET_SHORT_WRITE;
+ goto errout;
+ }
+ size = size % fs->blocksize;
+ memset(zero_buf, 0, sizeof(zero_buf));
+ if (size) {
+ size = fs->blocksize - size;
+ while (size) {
+ c = size;
+ if (c > sizeof(zero_buf))
+ c = sizeof(zero_buf);
+ actual = write(fd, zero_buf, c);
+ if (actual == -1) {
+ retval = errno;
+ goto errout;
+ }
+ if (actual != c) {
+ retval = EXT2_ET_SHORT_WRITE;
+ goto errout;
+ }
+ size -= c;
+ }
+ }
+ retval = 0;
+errout:
+ return (retval);
+}
+
+
+/*
+ * Read the block/inode bitmaps.
+ */
+errcode_t ext2fs_image_bitmap_read(ext2_filsys fs, int fd, int flags)
+{
+ char *ptr, *buf = 0;
+ int size;
+ ssize_t actual;
+ errcode_t retval;
+
+ if (flags & IMAGER_FLAG_INODEMAP) {
+ if (!fs->inode_map) {
+ retval = ext2fs_read_inode_bitmap(fs);
+ if (retval)
+ return retval;
+ }
+ ptr = fs->inode_map->bitmap;
+ size = (EXT2_INODES_PER_GROUP(fs->super) / 8);
+ } else {
+ if (!fs->block_map) {
+ retval = ext2fs_read_block_bitmap(fs);
+ if (retval)
+ return retval;
+ }
+ ptr = fs->block_map->bitmap;
+ size = EXT2_BLOCKS_PER_GROUP(fs->super) / 8;
+ }
+ size = size * fs->group_desc_count;
+
+ buf = malloc(size);
+ if (!buf)
+ return ENOMEM;
+
+ actual = read(fd, buf, size);
+ if (actual == -1) {
+ retval = errno;
+ goto errout;
+ }
+ if (actual != size) {
+ retval = EXT2_ET_SHORT_WRITE;
+ goto errout;
+ }
+ memcpy(ptr, buf, size);
+
+ retval = 0;
+errout:
+ if (buf)
+ free(buf);
+ return (retval);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/initialize.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/initialize.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/initialize.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,327 @@
+/*
+ * 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 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 "ext2fs.h"
+
+#if defined(__linux__) && defined(EXT2_OS_LINUX)
+#define CREATOR_OS EXT2_OS_LINUX
+#elif defined(__GNU__) && defined(EXT2_OS_HURD)
+#define CREATOR_OS EXT2_OS_HURD
+#elif defined(__FreeBSD__) && defined(EXT2_OS_FREEBSD)
+#define CREATOR_OS EXT2_OS_FREEBSD
+#elif defined(LITES) && defined(EXT2_OS_LITES)
+#define CREATOR_OS EXT2_OS_LITES
+#else
+#define CREATOR_OS EXT2_OS_LINUX /* by default */
+#endif
+
+/*
+ * 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)
+
+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;
+ int frags_per_block;
+ int rem;
+ int overhead = 0;
+ blk_t group_block;
+ int i, j;
+ blk_t numblocks;
+ char *buf;
+
+ if (!param || !param->s_blocks_count)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ retval = ext2fs_get_mem(sizeof(struct struct_ext2_filsys),
+ (void **) &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;
+#ifdef WORDS_BIGENDIAN
+ fs->flags |= EXT2_FLAG_SWAP_BYTES;
+#endif
+ retval = manager->open(name, IO_FLAG_RW, &fs->io);
+ if (retval)
+ goto cleanup;
+ fs->io->app_data = fs;
+ retval = ext2fs_get_mem(strlen(name)+1, (void **) &fs->device_name);
+ if (retval)
+ goto cleanup;
+
+ strcpy(fs->device_name, name);
+ retval = ext2fs_get_mem(SUPERBLOCK_SIZE, (void **) &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))
+
+ super->s_magic = EXT2_SUPER_MAGIC;
+ super->s_state = EXT2_VALID_FS;
+
+ set_field(s_log_block_size, 0); /* default blocksize: 1024 bytes */
+ set_field(s_log_frag_size, 0); /* default fragsize: 1024 bytes */
+ set_field(s_first_data_block, super->s_log_block_size ? 0 : 1);
+ set_field(s_max_mnt_count, EXT2_DFL_MAX_MNT_COUNT);
+ 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);
+ if (super->s_feature_incompat & ~EXT2_LIB_FEATURE_INCOMPAT_SUPP)
+ return EXT2_ET_UNSUPP_FEATURE;
+ if (super->s_feature_ro_compat & ~EXT2_LIB_FEATURE_RO_COMPAT_SUPP)
+ return EXT2_ET_RO_UNSUPP_FEATURE;
+
+ 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);
+ }
+
+ set_field(s_checkinterval, EXT2_DFL_CHECKINTERVAL);
+ super->s_lastcheck = time(NULL);
+
+ super->s_creator_os = CREATOR_OS;
+
+ fs->blocksize = EXT2_BLOCK_SIZE(super);
+ fs->fragsize = EXT2_FRAG_SIZE(super);
+ frags_per_block = fs->blocksize / fs->fragsize;
+
+ /* default: (fs->blocksize*8) blocks/group */
+ set_field(s_blocks_per_group, fs->blocksize*8);
+ super->s_frags_per_group = super->s_blocks_per_group * frags_per_block;
+
+ super->s_blocks_count = param->s_blocks_count;
+ super->s_r_blocks_count = param->s_r_blocks_count;
+ if (super->s_r_blocks_count >= param->s_blocks_count) {
+ retval = EXT2_ET_INVALID_ARGUMENT;
+ goto cleanup;
+ }
+
+ /*
+ * 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 = (super->s_blocks_count -
+ super->s_first_data_block +
+ EXT2_BLOCKS_PER_GROUP(super) - 1)
+ / EXT2_BLOCKS_PER_GROUP(super);
+ if (fs->group_desc_count == 0)
+ return EXT2_ET_TOOSMALL;
+ fs->desc_blocks = (fs->group_desc_count +
+ EXT2_DESC_PER_BLOCK(super) - 1)
+ / EXT2_DESC_PER_BLOCK(super);
+
+ /* n.b., fs->blocksize is <= 4096 */
+ set_field(s_inodes_count, super->s_blocks_count/(4096/fs->blocksize));
+
+ /*
+ * 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
+ */
+ super->s_inodes_per_group = (super->s_inodes_count +
+ fs->group_desc_count - 1) /
+ fs->group_desc_count;
+ if (super->s_inodes_per_group > fs->blocksize*8)
+ super->s_inodes_per_group = fs->blocksize*8;
+
+ /*
+ * 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.
+ */
+ 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
+ */
+ super->s_inodes_count = super->s_inodes_per_group *
+ fs->group_desc_count;
+ super->s_free_inodes_count = super->s_inodes_count;
+
+ /*
+ * 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.
+ *
+ * XXX Not all block groups need the descriptor blocks, but
+ * being clever is tricky...
+ */
+ overhead = (int) (3 + fs->desc_blocks + fs->inode_blocks_per_group);
+
+ /*
+ * See if the last group is big enough to support the
+ * necessary data structures. If not, we need to get rid of
+ * it.
+ */
+ rem = (int) ((super->s_blocks_count - super->s_first_data_block) %
+ super->s_blocks_per_group);
+ if ((fs->group_desc_count == 1) && rem && (rem < overhead))
+ return EXT2_ET_TOOSMALL;
+ if (rem && (rem < overhead+50)) {
+ super->s_blocks_count -= rem;
+ 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,
+ (void **) &buf);
+ if (retval)
+ goto cleanup;
+
+ sprintf(buf, "block bitmap for %s", fs->device_name);
+ retval = ext2fs_allocate_block_bitmap(fs, buf, &fs->block_map);
+ if (retval)
+ goto cleanup;
+
+ sprintf(buf, "inode bitmap for %s", fs->device_name);
+ retval = ext2fs_allocate_inode_bitmap(fs, buf, &fs->inode_map);
+ if (retval)
+ goto cleanup;
+
+ ext2fs_free_mem((void **) &buf);
+
+ retval = ext2fs_get_mem((size_t) fs->desc_blocks * fs->blocksize,
+ (void **) &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.
+ */
+ group_block = super->s_first_data_block;
+ super->s_free_blocks_count = 0;
+ for (i = 0; i < fs->group_desc_count; i++) {
+ if (i == fs->group_desc_count-1) {
+ numblocks = (fs->super->s_blocks_count -
+ 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;
+
+ if (ext2fs_bg_has_super(fs, i)) {
+ for (j=0; j < fs->desc_blocks+1; j++)
+ ext2fs_mark_block_bitmap(fs->block_map,
+ group_block + j);
+ numblocks -= 1 + fs->desc_blocks;
+ }
+
+ numblocks -= 2 + fs->inode_blocks_per_group;
+
+ super->s_free_blocks_count += numblocks;
+ fs->group_desc[i].bg_free_blocks_count = numblocks;
+ fs->group_desc[i].bg_free_inodes_count =
+ fs->super->s_inodes_per_group;
+ fs->group_desc[i].bg_used_dirs_count = 0;
+
+ group_block += super->s_blocks_per_group;
+ }
+
+ 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:
+ ext2fs_free(fs);
+ return retval;
+}
+
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/inline.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/inline.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/inline.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,32 @@
+/*
+ * 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 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"
+#define INCLUDE_INLINE_FUNCS
+#include "ext2fs.h"
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/inode.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/inode.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/inode.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,724 @@
+/*
+ * 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 Public
+ * License.
+ * %End-Header%
+ */
+
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.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"
+
+struct ext2_struct_inode_scan {
+ errcode_t magic;
+ ext2_filsys fs;
+ ext2_ino_t current_inode;
+ blk_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;
+
+ 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),
+ (void **) &fs->icache);
+ if (retval)
+ return retval;
+
+ memset(fs->icache, 0, sizeof(struct ext2_inode_cache));
+ retval = ext2fs_get_mem(fs->blocksize, (void **) &fs->icache->buffer);
+ if (retval) {
+ ext2fs_free_mem((void **) &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_mem(sizeof(struct ext2_inode_cache_ent)
+ * fs->icache->cache_size,
+ (void **) &fs->icache->cache);
+ if (retval) {
+ ext2fs_free_mem((void **) &fs->icache->buffer);
+ ext2fs_free_mem((void **) &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),
+ (void **) &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 = scan->fs->
+ group_desc[scan->current_group].bg_inode_table;
+ scan->inodes_left = EXT2_INODES_PER_GROUP(scan->fs->super);
+ scan->blocks_left = scan->fs->inode_blocks_per_group;
+ retval = ext2fs_get_mem((size_t) (scan->inode_buffer_blocks *
+ fs->blocksize),
+ (void **) &scan->inode_buffer);
+ scan->done_group = 0;
+ scan->done_group_data = 0;
+ scan->bad_block_ptr = 0;
+ if (retval) {
+ ext2fs_free_mem((void **) &scan);
+ return retval;
+ }
+ retval = ext2fs_get_mem(scan->inode_size,
+ (void **) &scan->temp_buffer);
+ if (retval) {
+ ext2fs_free_mem((void **) &scan->inode_buffer);
+ ext2fs_free_mem((void **) &scan);
+ return retval;
+ }
+ if (scan->fs->badblocks && scan->fs->badblocks->num)
+ scan->scan_flags |= EXT2_SF_CHK_BADBLOCKS;
+ *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((void **) &scan->inode_buffer);
+ scan->inode_buffer = NULL;
+ ext2fs_free_mem((void **) &scan->temp_buffer);
+ scan->temp_buffer = NULL;
+ ext2fs_free_mem((void **) &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)
+{
+ scan->current_group++;
+ scan->groups_left--;
+
+ scan->current_block = scan->fs->
+ group_desc[scan->current_group].bg_inode_table;
+
+ scan->current_inode = scan->current_group *
+ EXT2_INODES_PER_GROUP(scan->fs->super);
+
+ scan->bytes_left = 0;
+ scan->inodes_left = EXT2_INODES_PER_GROUP(scan->fs->super);
+ scan->blocks_left = scan->fs->inode_blocks_per_group;
+ 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,
+ blk_t *num_blocks)
+{
+ blk_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)
+{
+ blk_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_blk(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(ext2_inode_scan scan, ext2_ino_t *ino,
+ struct ext2_inode *inode)
+{
+ 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;
+ }
+ /*
+ * This is done outside the above if statement so that the
+ * check can be done for block group #0.
+ */
+ 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 EXT2FS_ENABLE_SWAPFS
+ if ((scan->fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (scan->fs->flags & EXT2_FLAG_SWAP_BYTES_READ))
+ ext2fs_swap_inode(scan->fs, inode,
+ (struct ext2_inode *) scan->temp_buffer, 0);
+ else
+#endif
+ *inode = *((struct ext2_inode *) scan->temp_buffer);
+ 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 EXT2FS_ENABLE_SWAPFS
+ if ((scan->fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (scan->fs->flags & EXT2_FLAG_SWAP_BYTES_READ))
+ ext2fs_swap_inode(scan->fs, inode,
+ (struct ext2_inode *) scan->ptr, 0);
+ else
+#endif
+ *inode = *((struct ext2_inode *) scan->ptr);
+ 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;
+}
+
+/*
+ * Functions to read and write a single inode.
+ */
+errcode_t ext2fs_read_inode (ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode)
+{
+ unsigned long group, block, block_nr, offset;
+ char *ptr;
+ errcode_t retval;
+ int clen, length, i, inodes_per_block;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ /* Check to see if user has an override function */
+ if (fs->read_inode) {
+ retval = (fs->read_inode)(fs, ino, inode);
+ if (retval != EXT2_ET_CALLBACK_NOTHANDLED)
+ return retval;
+ }
+ /* 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 */
+ 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 ((ino == 0) || (ino > fs->super->s_inodes_count))
+ return EXT2_ET_BAD_INODE_NUM;
+ 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);
+ } else {
+ 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 (!fs->group_desc[(unsigned)group].bg_inode_table)
+ return EXT2_ET_MISSING_INODE_TABLE;
+ block_nr = fs->group_desc[(unsigned)group].bg_inode_table +
+ block;
+ }
+ if (block_nr != fs->icache->buffer_blk) {
+ retval = io_channel_read_blk(fs->io, block_nr, 1,
+ fs->icache->buffer);
+ if (retval)
+ return retval;
+ fs->icache->buffer_blk = block_nr;
+ }
+ offset &= (EXT2_BLOCK_SIZE(fs->super) - 1);
+ ptr = ((char *) fs->icache->buffer) + (unsigned) offset;
+
+ memset(inode, 0, sizeof(struct ext2_inode));
+ length = EXT2_INODE_SIZE(fs->super);
+ if (length > sizeof(struct ext2_inode))
+ length = sizeof(struct ext2_inode);
+
+ if ((offset + length) > EXT2_BLOCK_SIZE(fs->super)) {
+ clen = (int) (EXT2_BLOCK_SIZE(fs->super) - offset);
+ memcpy((char *) inode, ptr, clen);
+ length -= clen;
+
+ retval = io_channel_read_blk(fs->io, block_nr+1, 1,
+ fs->icache->buffer);
+ if (retval) {
+ fs->icache->buffer_blk = 0;
+ return retval;
+ }
+ fs->icache->buffer_blk = block_nr+1;
+
+ memcpy(((char *) inode) + clen,
+ fs->icache->buffer, length);
+ } else
+ memcpy((char *) inode, ptr, length);
+
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if ((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (fs->flags & EXT2_FLAG_SWAP_BYTES_READ))
+ ext2fs_swap_inode(fs, inode, inode, 0);
+#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_write_inode(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode * inode)
+{
+ unsigned long group, block, block_nr, offset;
+ errcode_t retval;
+ struct ext2_inode temp_inode;
+ char *ptr;
+ int clen, length, i;
+
+ 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;
+
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if ((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE))
+ ext2fs_swap_inode(fs, &temp_inode, inode, 1);
+ else
+#endif
+ memcpy(&temp_inode, inode, sizeof(struct ext2_inode));
+
+ 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 (!fs->group_desc[(unsigned) group].bg_inode_table)
+ return EXT2_ET_MISSING_INODE_TABLE;
+ block_nr = fs->group_desc[(unsigned) group].bg_inode_table + block;
+ offset &= (EXT2_BLOCK_SIZE(fs->super) - 1);
+ ptr = (char *) fs->icache->buffer + (unsigned) offset;
+
+ length = EXT2_INODE_SIZE(fs->super);
+ clen = length;
+ if (length > sizeof(struct ext2_inode))
+ length = sizeof(struct ext2_inode);
+
+ if (fs->icache->buffer_blk != block_nr) {
+ retval = io_channel_read_blk(fs->io, block_nr, 1,
+ fs->icache->buffer);
+ if (retval)
+ return retval;
+ fs->icache->buffer_blk = block_nr;
+ }
+
+ if ((offset + length) > EXT2_BLOCK_SIZE(fs->super)) {
+ clen = (int) (EXT2_BLOCK_SIZE(fs->super) - offset);
+ length -= clen;
+ } else {
+ length = 0;
+ }
+ memcpy(ptr, &temp_inode, clen);
+ retval = io_channel_write_blk(fs->io, block_nr, 1, fs->icache->buffer);
+ if (retval)
+ return retval;
+
+ if (length) {
+ retval = io_channel_read_blk(fs->io, ++block_nr, 1,
+ fs->icache->buffer);
+ if (retval) {
+ fs->icache->buffer_blk = 0;
+ return retval;
+ }
+ fs->icache->buffer_blk = block_nr;
+ memcpy(fs->icache->buffer, ((char *) &temp_inode) + clen,
+ length);
+
+ retval = io_channel_write_blk(fs->io, block_nr, 1,
+ fs->icache->buffer);
+ if (retval)
+ return retval;
+ }
+
+ fs->flags |= EXT2_FLAG_CHANGED;
+ return 0;
+}
+
+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;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/inode_io.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/inode_io.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/inode_io.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,255 @@
+/*
+ * 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 Public
+ * License.
+ * %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;
+ int flags;
+ struct inode_private_data *next;
+};
+
+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 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
+};
+
+io_manager inode_io_manager = &struct_inode_manager;
+
+errcode_t ext2fs_inode_io_intern(ext2_filsys fs, ext2_ino_t ino,
+ char **name)
+{
+ struct inode_private_data *data;
+ errcode_t retval;
+
+ if ((retval = ext2fs_get_mem(sizeof(struct inode_private_data),
+ (void **) &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;
+ data->next = top_intern;
+ top_intern = data;
+ *name = data->name;
+ return 0;
+}
+
+
+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),
+ (void **) &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, (void **) &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_open(data->fs, data->ino, open_flags,
+ &data->file);
+ if (retval)
+ goto cleanup;
+
+ *channel = io;
+ return 0;
+
+cleanup:
+ if (data) {
+ ext2fs_free_mem((void **) &data);
+ }
+ if (io)
+ ext2fs_free_mem((void **) &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((void **) &channel->private_data);
+ if (channel->name)
+ ext2fs_free_mem((void **) &channel->name);
+ ext2fs_free_mem((void **) &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_blk(io_channel channel, unsigned 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_write_blk(io_channel channel, unsigned 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_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);
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/irel.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/irel.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/irel.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 Public
+ * License.
+ * %End-Header%
+ */
+
+struct ext2_inode_reference {
+ blk_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)))
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/irel_ma.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/irel_ma.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/irel_ma.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,373 @@
+/*
+ * irel_ma.c
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %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),
+ (void **) &irel);
+ if (retval)
+ goto errout;
+ memset(irel, 0, sizeof(struct ext2_inode_relocation_table));
+
+ retval = ext2fs_get_mem(strlen(name)+1, (void **) &irel->name);
+ if (retval)
+ goto errout;
+ strcpy(irel->name, name);
+
+ retval = ext2fs_get_mem(sizeof(struct irel_ma), (void **) &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_mem(size, (void **) &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_mem(size, (void **) &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(size, (void **) &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,
+ (void **) &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_mem(size, (void **) &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((void **) &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((void **) &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((void **) &ma->orig_map);
+ if (ma->entries)
+ ext2fs_free_mem((void **) &ma->entries);
+ if (ma->ref_entries) {
+ for (ino = 0; ino <= ma->max_inode; ino++) {
+ if (ma->ref_entries[(unsigned) ino].refs)
+ ext2fs_free_mem((void **) &ma->ref_entries[(unsigned) ino].refs);
+ }
+ ext2fs_free_mem((void **) &ma->ref_entries);
+ }
+ ext2fs_free_mem((void **) &ma);
+ }
+ if (irel->name)
+ ext2fs_free_mem((void **) &irel->name);
+ ext2fs_free_mem((void **) &irel);
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ismounted.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ismounted.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/ismounted.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,328 @@
+/*
+ * 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 Public
+ * License.
+ * %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_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"
+
+#ifdef HAVE_MNTENT_H
+/*
+ * 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;
+ FILE *f;
+ int fd;
+
+ *mount_flags = 0;
+ if ((f = setmntent (mtab_file, "r")) == NULL)
+ return errno;
+ file_dev = 0;
+#ifndef __GNU__ /* The GNU hurd is broken with respect to stat devices */
+ if (stat(file, &st_buf) == 0)
+ file_dev = st_buf.st_rdev;
+#endif
+ while ((mnt = getmntent (f)) != NULL) {
+ if (strcmp(file, mnt->mnt_fsname) == 0)
+ break;
+#ifndef __GNU__
+ if (file_dev && (stat(mnt->mnt_fsname, &st_buf) == 0) &&
+ file_dev == st_buf.st_rdev)
+ break;
+#endif
+ }
+
+ 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_dev && stat("/", &st_buf) == 0) {
+ if (st_buf.st_dev == file_dev) {
+ *mount_flags = EXT2_MF_MOUNTED;
+ if (mtpt)
+ strncpy(mtpt, "/", mtlen);
+ goto is_root;
+ }
+ }
+#endif
+ goto exit;
+ }
+#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
+ retval = 0;
+ }
+ goto exit;
+ }
+ if (file_dev && (st_buf.st_dev != file_dev)) {
+#ifdef DEBUG
+ printf("Bogus entry in %s! (%s not mounted on %s)\n",
+ mtab_file, file, mnt->mnt_dir);
+#endif
+ goto exit;
+ }
+#endif
+ *mount_flags = EXT2_MF_MOUNTED;
+
+ /* Check to see if the ro option is set */
+ if (hasmntopt(mnt, MNTOPT_RO))
+ *mount_flags |= EXT2_MF_READONLY;
+
+ 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);
+ if (fd < 0) {
+ if (errno == EROFS)
+ *mount_flags |= EXT2_MF_READONLY;
+ } else
+ close(fd);
+ (void) unlink(TEST_FILE);
+ }
+ retval = 0;
+exit:
+ endmntent (f);
+ return retval;
+}
+
+/*
+ * 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)
+ file_dev = st_buf.st_rdev;
+#endif
+
+ if (!(f = fopen("/proc/swaps", "r")))
+ return 0;
+ /* Skip the first line */
+ fgets(buf, sizeof(buf), f);
+ while (!feof(f)) {
+ if (!fgets(buf, sizeof(buf), f))
+ break;
+ 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) &&
+ file_dev == st_buf.st_rdev) {
+ ret++;
+ break;
+ }
+#endif
+ }
+ fclose(f);
+ return ret;
+}
+
+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
+#ifdef __linux__
+ retval = check_mntent_file("/proc/mounts", file, mount_flags,
+ mtpt, mtlen);
+ if (retval == 0)
+ return 0;
+#endif
+ retval = check_mntent_file(MOUNTED, file, mount_flags, mtpt, mtlen);
+ return retval;
+}
+
+#elif 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 */
+
+/*
+ * ext2fs_check_mount_point() returns 1 if the device is mounted, 0
+ * otherwise. 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)
+{
+ if (is_swap_device(device)) {
+ *mount_flags = EXT2_MF_MOUNTED | EXT2_MF_SWAP;
+ strncpy(mtpt, "<swap>", mtlen);
+ return 0;
+ }
+#ifdef HAVE_MNTENT_H
+ return check_mntent(device, mount_flags, mtpt, mtlen);
+#else
+#ifdef HAVE_GETMNTINFO
+ return check_getmntinfo(device, mount_flags, mtpt, mtlen);
+#else
+#warning "Can't use getmntent or getmntinfo to check for mounted filesystems!"
+ *mount_flags = 0;
+ return 0;
+#endif /* HAVE_GETMNTINFO */
+#endif /* HAVE_MNTENT_H */
+}
+
+/*
+ * 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);
+ }
+
+ 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_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
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/jfs_compat.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/jfs_compat.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/jfs_compat.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,67 @@
+
+#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 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;
+};
+
+#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 */
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/jfs_dat.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/jfs_dat.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/jfs_dat.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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;
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/jfs_user.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/jfs_user.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/jfs_user.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 */
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/kernel-jbd.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/kernel-jbd.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/kernel-jbd.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,902 @@
+/*
+ * linux/include/linux/jbd.h
+ *
+ * Written by Stephen C. Tweedie <sct at 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
+
+#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
+#define jbd_debug(f, a...) /**/
+#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;
+
+
+/*
+ * 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;
+
+/*
+ * 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 & cpu_to_be32((mask))))
+#define JFS_HAS_RO_COMPAT_FEATURE(j,mask) \
+ ((j)->j_format_version >= 2 && \
+ ((j)->j_superblock->s_feature_ro_compat & cpu_to_be32((mask))))
+#define JFS_HAS_INCOMPAT_FEATURE(j,mask) \
+ ((j)->j_format_version >= 2 && \
+ ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask))))
+
+#define JFS_FEATURE_INCOMPAT_REVOKE 0x00000001
+
+/* 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
+
+#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;
+};
+
+/*
+ * 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__ */
+
+/* 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 */
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/kernel-list.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/kernel-list.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/kernel-list.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,112 @@
+#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 LIST_HEAD(name) \
+ struct list_head 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/link.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/link.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/link.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,121 @@
+/*
+ * 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 Public
+ * License.
+ * %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;
+ int done;
+ 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;
+ int rec_len, min_rec_len;
+ int ret = 0;
+
+ rec_len = EXT2_DIR_REC_LEN(ls->namelen);
+
+ /*
+ * See if the following directory entry (if any) is unused;
+ * if so, absorb it into this one.
+ */
+ next = (struct ext2_dir_entry *) (buf + offset + dirent->rec_len);
+ if ((offset + dirent->rec_len < blocksize - 8) &&
+ (next->inode == 0) &&
+ (offset + dirent->rec_len + next->rec_len <= blocksize)) {
+ dirent->rec_len += next->rec_len;
+ 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 (dirent->rec_len < (min_rec_len + rec_len))
+ return ret;
+ rec_len = dirent->rec_len - min_rec_len;
+ dirent->rec_len = min_rec_len;
+ next = (struct ext2_dir_entry *) (buf + offset +
+ dirent->rec_len);
+ next->inode = 0;
+ next->name_len = 0;
+ next->rec_len = rec_len;
+ 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 (dirent->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;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!(fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+
+ ls.name = name;
+ ls.namelen = name ? strlen(name) : 0;
+ ls.inode = ino;
+ ls.flags = flags;
+ ls.done = 0;
+ ls.sb = fs->super;
+
+ retval = ext2fs_dir_iterate(fs, dir, DIRENT_FLAG_INCLUDE_EMPTY,
+ 0, link_proc, &ls);
+ if (retval)
+ return retval;
+
+ return (ls.done) ? 0 : EXT2_ET_DIR_NO_SPACE;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/llseek.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/llseek.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/llseek.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,132 @@
+/*
+ * 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 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 "et/com_err.h"
+#include "ext2fs/ext2_io.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 defined(__alpha__) || defined (__ia64__)
+
+#define llseek lseek
+
+#else /* !__alpha__ && !__ia64__*/
+
+#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 /* __alpha__ || __ia64__ */
+
+#endif /* HAVE_LLSEEK */
+
+ext2_loff_t ext2fs_llseek (int fd, ext2_loff_t offset, int origin)
+{
+ ext2_loff_t result;
+ static int do_compat = 0;
+
+ if ((sizeof(off_t) >= sizeof(ext2_loff_t)) ||
+ (offset < ((ext2_loff_t) 1 << ((sizeof(off_t)*8) -1))))
+ return lseek(fd, (off_t) offset, origin);
+
+ if (do_compat) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ 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++;
+ errno = EINVAL;
+ }
+ return result;
+}
+
+#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 ((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 /* linux */
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/lookup.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/lookup.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/lookup.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 Public
+ * License.
+ * %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,
+ int blocksize,
+ char *buf,
+ 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;
+}
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/mkdir.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/mkdir.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/mkdir.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,142 @@
+/*
+ * 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 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 "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)
+{
+ errcode_t retval;
+ struct ext2_inode parent_inode, inode;
+ ext2_ino_t ino = inum;
+ ext2_ino_t scratch_ino;
+ blk_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_block(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;
+ inode.i_blocks = fs->blocksize / 512;
+ inode.i_block[0] = blk;
+ inode.i_links_count = 2;
+ inode.i_ctime = inode.i_atime = inode.i_mtime = time(NULL);
+ 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_inode(fs, ino, &inode);
+ 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_stats(fs, blk, +1);
+ ext2fs_inode_alloc_stats2(fs, ino, +1, 1);
+
+cleanup:
+ if (block)
+ ext2fs_free_mem((void **) &block);
+ return retval;
+
+}
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/mkjournal.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/mkjournal.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/mkjournal.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,419 @@
+/*
+ * 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 Public
+ * License.
+ * %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 size, int flags,
+ char **ret_jsb)
+{
+ errcode_t retval;
+ journal_superblock_t *jsb;
+
+ if (size < 1024)
+ return EXT2_ET_JOURNAL_TOO_SMALL;
+
+ if ((retval = ext2fs_get_mem(fs->blocksize, (void **) &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(size);
+ 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 size, int flags)
+{
+ errcode_t retval;
+ char *buf = 0;
+ int i, fd, ret_size;
+
+ if ((retval = ext2fs_create_journal_superblock(fs, size, flags, &buf)))
+ return retval;
+
+ /* Open the device or journal file */
+ if ((fd = open(filename, O_WRONLY)) < 0) {
+ retval = errno;
+ goto errout;
+ }
+
+ /* 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 != fs->blocksize)
+ goto errout;
+ memset(buf, 0, fs->blocksize);
+
+ for (i = 1; i < size; i++) {
+ ret_size = write(fd, buf, fs->blocksize);
+ if (ret_size < 0) {
+ retval = errno;
+ goto errout;
+ }
+ if (ret_size != fs->blocksize)
+ goto errout;
+ }
+ close(fd);
+
+ retval = 0;
+errout:
+ ext2fs_free_mem((void **) &buf);
+ return retval;
+}
+
+/*
+ * Helper function for creating the journal using direct I/O routines
+ */
+struct mkjournal_struct {
+ int num_blocks;
+ int newblocks;
+ char *buf;
+ errcode_t err;
+};
+
+static int mkjournal_proc(ext2_filsys fs,
+ blk_t *blocknr,
+ e2_blkcnt_t blockcnt,
+ blk_t ref_block,
+ int ref_offset,
+ void *priv_data)
+{
+ struct mkjournal_struct *es = (struct mkjournal_struct *) priv_data;
+ blk_t new_blk;
+ static blk_t last_blk = 0;
+ errcode_t retval;
+
+ if (*blocknr) {
+ last_blk = *blocknr;
+ return 0;
+ }
+ retval = ext2fs_new_block(fs, last_blk, 0, &new_blk);
+ if (retval) {
+ es->err = retval;
+ return BLOCK_ABORT;
+ }
+ if (blockcnt > 0)
+ es->num_blocks--;
+
+ es->newblocks++;
+ retval = io_channel_write_blk(fs->io, new_blk, 1, es->buf);
+
+ if (blockcnt == 0)
+ memset(es->buf, 0, fs->blocksize);
+
+ if (retval) {
+ es->err = retval;
+ return BLOCK_ABORT;
+ }
+ *blocknr = new_blk;
+ last_blk = new_blk;
+ ext2fs_block_alloc_stats(fs, new_blk, +1);
+
+ 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 size, int flags)
+{
+ char *buf;
+ errcode_t retval;
+ struct ext2_inode inode;
+ struct mkjournal_struct es;
+
+ if ((retval = ext2fs_create_journal_superblock(fs, size, flags, &buf)))
+ return retval;
+
+ if ((retval = ext2fs_read_bitmaps(fs)))
+ return retval;
+
+ if ((retval = ext2fs_read_inode(fs, journal_ino, &inode)))
+ return retval;
+
+ if (inode.i_blocks > 0)
+ return EEXIST;
+
+ es.num_blocks = size;
+ es.newblocks = 0;
+ es.buf = buf;
+ es.err = 0;
+
+ retval = ext2fs_block_iterate2(fs, journal_ino, BLOCK_FLAG_APPEND,
+ 0, mkjournal_proc, &es);
+ if (es.err) {
+ retval = es.err;
+ goto errout;
+ }
+
+ if ((retval = ext2fs_read_inode(fs, journal_ino, &inode)))
+ goto errout;
+
+ inode.i_size += fs->blocksize * size;
+ inode.i_blocks += (fs->blocksize / 512) * es.newblocks;
+ inode.i_mtime = inode.i_ctime = time(0);
+ inode.i_links_count = 1;
+ inode.i_mode = LINUX_S_IFREG | 0600;
+
+ if ((retval = ext2fs_write_inode(fs, journal_ino, &inode)))
+ goto errout;
+ retval = 0;
+
+errout:
+ ext2fs_free_mem((void **) &buf);
+ return retval;
+}
+
+/*
+ * 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 i, start;
+ __u32 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_blk(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) != 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_blk(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 size, int flags)
+{
+ errcode_t retval;
+ ext2_ino_t journal_ino;
+ struct stat st;
+ char jfile[1024];
+ int fd, mount_flags, f;
+
+ if ((retval = ext2fs_check_mount_point(fs->device_name, &mount_flags,
+ jfile, sizeof(jfile)-10)))
+ return retval;
+
+ if (mount_flags & EXT2_MF_MOUNTED) {
+ 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) {
+ f = 0;
+ ioctl(fd, EXT2_IOC_SETFLAGS, &f);
+ close(fd);
+ }
+#endif
+#endif
+
+ /* Create the journal file */
+ if ((fd = open(jfile, O_CREAT|O_WRONLY, 0600)) < 0)
+ return errno;
+
+ if ((retval = write_journal_file(fs, jfile, size, flags)))
+ goto errout;
+
+ /* Get inode number of the journal file */
+ if (fstat(fd, &st) < 0)
+ goto errout;
+
+#if defined(HAVE_CHFLAGS) && defined(UF_NODUMP)
+ retval = fchflags (fd, UF_NODUMP|UF_IMMUTABLE);
+#else
+#if HAVE_EXT2_IOCTLS
+ f = EXT2_NODUMP_FL | EXT2_IMMUTABLE_FL;
+ retval = ioctl(fd, EXT2_IOC_SETFLAGS, &f);
+#endif
+#endif
+ if (retval)
+ goto errout;
+
+ close(fd);
+ journal_ino = st.st_ino;
+ } else {
+ journal_ino = EXT2_JOURNAL_INO;
+ if ((retval = write_journal_inode(fs, journal_ino,
+ size, 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:
+ 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);
+ 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/namei.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/namei.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/namei.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,205 @@
+/*
+ * 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 Public
+ * License.
+ * %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"
+
+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;
+
+#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++ > 5) {
+ return EXT2_ET_SYMLINK_LOOP;
+ }
+ if (ei.i_blocks) {
+ retval = ext2fs_get_mem(fs->blocksize, (void **) &buffer);
+ if (retval)
+ return retval;
+ retval = io_channel_read_blk(fs->io, ei.i_block[0], 1, buffer);
+ if (retval) {
+ ext2fs_free_mem((void **) &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((void **) &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 *basename;
+ 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, &basename, &namelen, &dir);
+ if (retval) return retval;
+ if (!namelen) { /* special case: '/usr/' etc */
+ *res_inode=dir;
+ return 0;
+ }
+ retval = ext2fs_lookup (fs, dir, basename, 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, (void **) &buf);
+ if (retval)
+ return retval;
+
+ retval = open_namei(fs, root, cwd, name, strlen(name), 0, 0,
+ buf, inode);
+
+ ext2fs_free_mem((void **) &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, (void **) &buf);
+ if (retval)
+ return retval;
+
+ retval = open_namei(fs, root, cwd, name, strlen(name), 1, 0,
+ buf, inode);
+
+ ext2fs_free_mem((void **) &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, (void **) &buf);
+ if (retval)
+ return retval;
+
+ retval = follow_link(fs, root, cwd, inode, 0, buf, res_inode);
+
+ ext2fs_free_mem((void **) &buf);
+ return retval;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/native.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/native.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/native.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 Public
+ * License.
+ * %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
+}
+
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/newdir.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/newdir.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/newdir.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,72 @@
+/*
+ * 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 Public
+ * License.
+ * %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, (void **) &buf);
+ if (retval)
+ return retval;
+ memset(buf, 0, fs->blocksize);
+ dir = (struct ext2_dir_entry *) buf;
+ dir->rec_len = fs->blocksize;
+
+ 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 = dir->rec_len - 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);
+ dir->rec_len = rec_len;
+ dir->inode = parent_ino;
+ dir->name_len = 2 | filetype;
+ dir->name[0] = '.';
+ dir->name[1] = '.';
+
+ }
+ *block = buf;
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/nt_io.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/nt_io.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/nt_io.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1513 @@
+/*
+ * 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 at ns.cr.cyco.com)
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
+//
+// I need some warnings to disable...
+//
+
+
+#pragma warning(disable:4514) // unreferenced inline function has been removed
+#pragma warning(push,4)
+
+#pragma warning(disable:4201) // nonstandard extension used : nameless struct/union)
+#pragma warning(disable:4214) // nonstandard extension used : bit field types other than int
+#pragma warning(disable:4115) // named type definition in parentheses
+
+#include <ntddk.h>
+#include <ntdddisk.h>
+#include <ntstatus.h>
+
+#pragma warning(pop)
+
+
+//
+// Some native APIs.
+//
+
+NTSYSAPI
+ULONG
+NTAPI
+RtlNtStatusToDosError(
+ IN NTSTATUS Status
+ );
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtClose(
+ IN HANDLE Handle
+ );
+
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtOpenFile(
+ OUT PHANDLE FileHandle,
+ IN ACCESS_MASK DesiredAccess,
+ IN POBJECT_ATTRIBUTES ObjectAttributes,
+ OUT PIO_STATUS_BLOCK IoStatusBlock,
+ IN ULONG ShareAccess,
+ IN ULONG OpenOptions
+ );
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtFlushBuffersFile(
+ IN HANDLE FileHandle,
+ OUT PIO_STATUS_BLOCK IoStatusBlock
+ );
+
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtReadFile(
+ IN HANDLE FileHandle,
+ IN HANDLE Event OPTIONAL,
+ IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
+ IN PVOID ApcContext OPTIONAL,
+ OUT PIO_STATUS_BLOCK IoStatusBlock,
+ OUT PVOID Buffer,
+ IN ULONG Length,
+ IN PLARGE_INTEGER ByteOffset OPTIONAL,
+ IN PULONG Key OPTIONAL
+ );
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtWriteFile(
+ IN HANDLE FileHandle,
+ IN HANDLE Event OPTIONAL,
+ IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
+ IN PVOID ApcContext OPTIONAL,
+ OUT PIO_STATUS_BLOCK IoStatusBlock,
+ IN PVOID Buffer,
+ IN ULONG Length,
+ IN PLARGE_INTEGER ByteOffset OPTIONAL,
+ IN PULONG Key OPTIONAL
+ );
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtDeviceIoControlFile(
+ IN HANDLE FileHandle,
+ IN HANDLE Event OPTIONAL,
+ IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
+ IN PVOID ApcContext OPTIONAL,
+ OUT PIO_STATUS_BLOCK IoStatusBlock,
+ IN ULONG IoControlCode,
+ IN PVOID InputBuffer OPTIONAL,
+ IN ULONG InputBufferLength,
+ OUT PVOID OutputBuffer OPTIONAL,
+ IN ULONG OutputBufferLength
+ );
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtFsControlFile(
+ IN HANDLE FileHandle,
+ IN HANDLE Event OPTIONAL,
+ IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
+ IN PVOID ApcContext OPTIONAL,
+ OUT PIO_STATUS_BLOCK IoStatusBlock,
+ IN ULONG IoControlCode,
+ IN PVOID InputBuffer OPTIONAL,
+ IN ULONG InputBufferLength,
+ OUT PVOID OutputBuffer OPTIONAL,
+ IN ULONG OutputBufferLength
+ );
+
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtDelayExecution(
+ IN BOOLEAN Alertable,
+ IN PLARGE_INTEGER Interval
+ );
+
+
+#define FSCTL_LOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define FSCTL_UNLOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define FSCTL_DISMOUNT_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define FSCTL_IS_VOLUME_MOUNTED CTL_CODE(FILE_DEVICE_FILE_SYSTEM,10, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+
+//
+// useful macros
+//
+
+#define BooleanFlagOn(Flags,SingleFlag) ((BOOLEAN)((((Flags) & (SingleFlag)) != 0)))
+
+
+//
+// Include Win32 error codes.
+//
+
+#include <winerror.h>
+
+//
+// standard stuff
+//
+
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <malloc.h>
+
+#include <linux/types.h>
+#include "ext2_fs.h"
+#include <errno.h>
+
+#include "et/com_err.h"
+#include "ext2fs/ext2fs.h"
+#include "ext2fs/ext2_err.h"
+
+
+
+
+//
+// For checking structure magic numbers...
+//
+
+
+#define EXT2_CHECK_MAGIC(struct, code) \
+ if ((struct)->magic != (code)) return (code)
+
+#define EXT2_ET_MAGIC_NT_IO_CHANNEL 0x10ed
+
+
+//
+// Private data block
+//
+
+typedef struct _NT_PRIVATE_DATA {
+ int magic;
+ HANDLE Handle;
+ int Flags;
+ PCHAR Buffer;
+ __u32 BufferBlockNumber;
+ ULONG BufferSize;
+ BOOLEAN OpenedReadonly;
+ BOOLEAN Written;
+}NT_PRIVATE_DATA, *PNT_PRIVATE_DATA;
+
+
+
+//
+// Standard interface prototypes
+//
+
+static errcode_t nt_open(const char *name, int flags, io_channel *channel);
+static errcode_t nt_close(io_channel channel);
+static errcode_t nt_set_blksize(io_channel channel, int blksize);
+static errcode_t nt_read_blk(io_channel channel, unsigned long block,
+ int count, void *data);
+static errcode_t nt_write_blk(io_channel channel, unsigned long block,
+ int count, const void *data);
+static errcode_t nt_flush(io_channel channel);
+
+static struct struct_io_manager struct_nt_manager = {
+ 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)
+ {
+ if(NULL != io->name)
+ {
+ free(io->name);
+ }
+
+ free(io);
+ }
+
+ if (NULL != NtData)
+ {
+ if(NULL != NtData->Handle)
+ {
+ _UnlockDrive(NtData->Handle);
+ _CloseDisk(NtData->Handle);
+ }
+
+ if(NULL != NtData->Buffer)
+ {
+ 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;
+ }
+
+ if(NULL != channel->name)
+ {
+ free(channel->name);
+ }
+
+
+ free(channel);
+
+ if (NULL != NtData)
+ {
+ if(NULL != NtData->Handle)
+ {
+ _DismountDrive(NtData->Handle);
+ _UnlockDrive(NtData->Handle);
+ _CloseDisk(NtData->Handle);
+ }
+
+ if(NULL != NtData->Buffer)
+ {
+ 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;
+}
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/openfs.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/openfs.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/openfs.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,240 @@
+/*
+ * 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 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 "ext2fs.h"
+#include "e2image.h"
+
+/*
+ * 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
+ */
+errcode_t ext2fs_open(const char *name, int flags, int superblock,
+ int block_size, io_manager manager, ext2_filsys *ret_fs)
+{
+ ext2_filsys fs;
+ errcode_t retval;
+ int i, j, groups_per_block;
+ blk_t group_block;
+ char *dest;
+ struct ext2_group_desc *gdp;
+
+ EXT2_CHECK_MAGIC(manager, EXT2_ET_MAGIC_IO_MANAGER);
+
+ retval = ext2fs_get_mem(sizeof(struct struct_ext2_filsys),
+ (void **) &fs);
+ if (retval)
+ return retval;
+
+ memset(fs, 0, sizeof(struct struct_ext2_filsys));
+ fs->magic = EXT2_ET_MAGIC_EXT2FS_FILSYS;
+ fs->flags = flags;
+ fs->umask = 022;
+ retval = manager->open(name, (flags & EXT2_FLAG_RW) ? IO_FLAG_RW : 0,
+ &fs->io);
+ if (retval)
+ goto cleanup;
+ fs->io->app_data = fs;
+ retval = ext2fs_get_mem(strlen(name)+1, (void **) &fs->device_name);
+ if (retval)
+ goto cleanup;
+ strcpy(fs->device_name, name);
+ retval = ext2fs_get_mem(SUPERBLOCK_SIZE, (void **) &fs->super);
+ if (retval)
+ goto cleanup;
+ if (flags & EXT2_FLAG_IMAGE_FILE) {
+ retval = ext2fs_get_mem(sizeof(struct ext2_image_hdr),
+ (void **) &fs->image_header);
+ if (retval)
+ goto cleanup;
+ retval = io_channel_read_blk(fs->io, 0,
+ -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 + 1;
+ fs->orig_super = 0;
+ } else {
+ io_channel_set_blksize(fs->io, SUPERBLOCK_OFFSET);
+ superblock = 1;
+ group_block = 0;
+ retval = ext2fs_get_mem(SUPERBLOCK_SIZE,
+ (void **) &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 EXT2FS_ENABLE_SWAPFS
+ if ((fs->super->s_magic == ext2fs_swab16(EXT2_SUPER_MAGIC)) ||
+ (fs->flags & EXT2_FLAG_SWAP_BYTES)) {
+ fs->flags |= EXT2_FLAG_SWAP_BYTES;
+
+ ext2fs_swap_super(fs->super);
+ }
+#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)) {
+ if (fs->super->s_feature_incompat &
+ ~EXT2_LIB_FEATURE_INCOMPAT_SUPP) {
+ retval = EXT2_ET_UNSUPP_FEATURE;
+ goto cleanup;
+ }
+ if ((flags & EXT2_FLAG_RW) &&
+ (fs->super->s_feature_ro_compat &
+ ~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;
+ }
+ }
+
+ fs->blocksize = EXT2_BLOCK_SIZE(fs->super);
+ if (fs->blocksize == 0) {
+ retval = EXT2_ET_CORRUPT_SUPERBLOCK;
+ goto cleanup;
+ }
+ fs->fragsize = EXT2_FRAG_SIZE(fs->super);
+ fs->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));
+ 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;
+ }
+
+ /*
+ * Read group descriptors
+ */
+ if ((EXT2_BLOCKS_PER_GROUP(fs->super)) == 0) {
+ retval = EXT2_ET_CORRUPT_SUPERBLOCK;
+ goto cleanup;
+ }
+ fs->group_desc_count = (fs->super->s_blocks_count -
+ fs->super->s_first_data_block +
+ EXT2_BLOCKS_PER_GROUP(fs->super) - 1)
+ / EXT2_BLOCKS_PER_GROUP(fs->super);
+ fs->desc_blocks = (fs->group_desc_count +
+ EXT2_DESC_PER_BLOCK(fs->super) - 1)
+ / EXT2_DESC_PER_BLOCK(fs->super);
+ retval = ext2fs_get_mem(fs->desc_blocks * fs->blocksize,
+ (void **) &fs->group_desc);
+ if (retval)
+ goto cleanup;
+ if (!group_block)
+ group_block = fs->super->s_first_data_block + 1;
+ dest = (char *) fs->group_desc;
+ for (i=0 ; i < fs->desc_blocks; i++) {
+ retval = io_channel_read_blk(fs->io, group_block, 1, dest);
+ if (retval)
+ goto cleanup;
+ group_block++;
+#ifdef EXT2FS_ENABLE_SWAPFS
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES) {
+ gdp = (struct ext2_group_desc *) dest;
+ groups_per_block = fs->blocksize /
+ sizeof(struct ext2_group_desc);
+ for (j=0; j < groups_per_block; j++)
+ ext2fs_swap_group_desc(gdp++);
+ }
+#endif
+ dest += fs->blocksize;
+ }
+
+ *ret_fs = fs;
+ return 0;
+cleanup:
+ ext2fs_free(fs);
+ return retval;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/read_bb.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/read_bb.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/read_bb.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,95 @@
+/*
+ * 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 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 "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, blk_t ref_block,
+ int ref_offset, 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 >= fs->super->s_blocks_count))
+ 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;
+ if (inode.i_blocks < 500)
+ numblocks = (inode.i_blocks /
+ (fs->blocksize / 512)) + 20;
+ else
+ 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, 0, 0,
+ mark_bad_block, &rb);
+ if (retval)
+ return retval;
+
+ return rb.err;
+}
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/read_bb_file.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/read_bb_file.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/read_bb_file.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,96 @@
+/*
+ * 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 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 "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 *private,
+ void (*invalid)(ext2_filsys fs,
+ blk_t blk,
+ char *badstr,
+ void *private))
+{
+ errcode_t retval;
+ blk_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, "%u", &blockno);
+ if (count <= 0)
+ continue;
+ if (fs &&
+ ((blockno < fs->super->s_first_data_block) ||
+ (blockno >= fs->super->s_blocks_count))) {
+ if (invalid)
+ (invalid)(fs, blockno, buf, private);
+ continue;
+ }
+ retval = ext2fs_badblocks_list_add(*bb_list, blockno);
+ if (retval)
+ return retval;
+ }
+ return 0;
+}
+
+static void call_compat_invalid(ext2_filsys fs, blk_t blk,
+ char *badstr, void *private)
+{
+ void (*invalid)(ext2_filsys, blk_t);
+
+ invalid = (void (*)(ext2_filsys, blk_t)) private;
+ if (invalid)
+ 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))
+{
+ return ext2fs_read_bb_FILE2(fs, f, bb_list, (void *) invalid,
+ call_compat_invalid);
+}
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/rs_bitmap.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/rs_bitmap.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/rs_bitmap.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,107 @@
+/*
+ * rs_bitmap.c --- routine for changing the size of a bitmap
+ *
+ * Copyright (C) 1996, 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 <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"
+
+errcode_t ext2fs_resize_generic_bitmap(__u32 new_end, __u32 new_real_end,
+ ext2fs_generic_bitmap bmap)
+{
+ errcode_t retval;
+ size_t size, new_size;
+ __u32 bitno;
+
+ if (!bmap)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ EXT2_CHECK_MAGIC(bmap, EXT2_ET_MAGIC_GENERIC_BITMAP);
+
+ /*
+ * 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,
+ (void **) &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_resize_inode_bitmap(__u32 new_end, __u32 new_real_end,
+ ext2fs_inode_bitmap bmap)
+{
+ errcode_t retval;
+
+ if (!bmap)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ EXT2_CHECK_MAGIC(bmap, EXT2_ET_MAGIC_INODE_BITMAP);
+
+ bmap->magic = EXT2_ET_MAGIC_GENERIC_BITMAP;
+ retval = ext2fs_resize_generic_bitmap(new_end, new_real_end,
+ bmap);
+ bmap->magic = EXT2_ET_MAGIC_INODE_BITMAP;
+ return retval;
+}
+
+errcode_t ext2fs_resize_block_bitmap(__u32 new_end, __u32 new_real_end,
+ ext2fs_block_bitmap bmap)
+{
+ errcode_t retval;
+
+ if (!bmap)
+ return EXT2_ET_INVALID_ARGUMENT;
+
+ EXT2_CHECK_MAGIC(bmap, EXT2_ET_MAGIC_BLOCK_BITMAP);
+
+ bmap->magic = EXT2_ET_MAGIC_GENERIC_BITMAP;
+ retval = ext2fs_resize_generic_bitmap(new_end, new_real_end,
+ bmap);
+ bmap->magic = EXT2_ET_MAGIC_BLOCK_BITMAP;
+ return retval;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/rw_bitmaps.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/rw_bitmaps.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/rw_bitmaps.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,302 @@
+/*
+ * 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 Public
+ * License.
+ * %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"
+
+#if defined(__powerpc__) && defined(EXT2FS_ENABLE_SWAPFS)
+/*
+ * On the PowerPC, the big-endian variant of the ext2 filesystem
+ * has its bitmaps stored as 32-bit words with bit 0 as the LSB
+ * of each word. Thus a bitmap with only bit 0 set would be, as
+ * a string of bytes, 00 00 00 01 00 ...
+ * To cope with this, we byte-reverse each word of a bitmap if
+ * we have a big-endian filesystem, that is, if we are *not*
+ * byte-swapping other word-sized numbers.
+ */
+#define EXT2_BIG_ENDIAN_BITMAPS
+#endif
+
+#ifdef EXT2_BIG_ENDIAN_BITMAPS
+void ext2fs_swap_bitmap(ext2_filsys fs, char *bitmap, int nbytes)
+{
+ __u32 *p = (__u32 *) bitmap;
+ int n;
+
+ for (n = nbytes / sizeof(__u32); n > 0; --n, ++p)
+ *p = ext2fs_swab32(*p);
+}
+#endif
+
+errcode_t ext2fs_write_inode_bitmap(ext2_filsys fs)
+{
+ dgrp_t i;
+ size_t nbytes;
+ errcode_t retval;
+ char * inode_bitmap = fs->inode_map->bitmap;
+ char * bitmap_block = NULL;
+ blk_t blk;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!(fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+ if (!inode_bitmap)
+ return 0;
+ nbytes = (size_t) ((EXT2_INODES_PER_GROUP(fs->super)+7) / 8);
+
+ retval = ext2fs_get_mem(fs->blocksize, (void **) &bitmap_block);
+ if (retval)
+ return retval;
+ memset(bitmap_block, 0xff, fs->blocksize);
+ for (i = 0; i < fs->group_desc_count; i++) {
+ memcpy(bitmap_block, inode_bitmap, nbytes);
+ blk = fs->group_desc[i].bg_inode_bitmap;
+ if (blk) {
+#ifdef EXT2_BIG_ENDIAN_BITMAPS
+ if (!((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)))
+ ext2fs_swap_bitmap(fs, bitmap_block, nbytes);
+#endif
+ retval = io_channel_write_blk(fs->io, blk, 1,
+ bitmap_block);
+ if (retval)
+ return EXT2_ET_INODE_BITMAP_WRITE;
+ }
+ inode_bitmap += nbytes;
+ }
+ fs->flags |= EXT2_FLAG_CHANGED;
+ fs->flags &= ~EXT2_FLAG_IB_DIRTY;
+ ext2fs_free_mem((void **) &bitmap_block);
+ return 0;
+}
+
+errcode_t ext2fs_write_block_bitmap (ext2_filsys fs)
+{
+ dgrp_t i;
+ int j;
+ int nbytes;
+ int nbits;
+ errcode_t retval;
+ char * block_bitmap = fs->block_map->bitmap;
+ char * bitmap_block = NULL;
+ blk_t blk;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!(fs->flags & EXT2_FLAG_RW))
+ return EXT2_ET_RO_FILSYS;
+ if (!block_bitmap)
+ return 0;
+ nbytes = EXT2_BLOCKS_PER_GROUP(fs->super) / 8;
+ retval = ext2fs_get_mem(fs->blocksize, (void **) &bitmap_block);
+ if (retval)
+ return retval;
+ memset(bitmap_block, 0xff, fs->blocksize);
+ for (i = 0; i < fs->group_desc_count; i++) {
+ memcpy(bitmap_block, block_bitmap, nbytes);
+ if (i == fs->group_desc_count - 1) {
+ /* Force bitmap padding for the last group */
+ nbits = (int) ((fs->super->s_blocks_count
+ - fs->super->s_first_data_block)
+ % EXT2_BLOCKS_PER_GROUP(fs->super));
+ if (nbits)
+ for (j = nbits; j < fs->blocksize * 8; j++)
+ ext2fs_set_bit(j, bitmap_block);
+ }
+ blk = fs->group_desc[i].bg_block_bitmap;
+ if (blk) {
+#ifdef EXT2_BIG_ENDIAN_BITMAPS
+ if (!((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)))
+ ext2fs_swap_bitmap(fs, bitmap_block, nbytes);
+#endif
+ retval = io_channel_write_blk(fs->io, blk, 1,
+ bitmap_block);
+ if (retval)
+ return EXT2_ET_BLOCK_BITMAP_WRITE;
+ }
+ block_bitmap += nbytes;
+ }
+ fs->flags |= EXT2_FLAG_CHANGED;
+ fs->flags &= ~EXT2_FLAG_BB_DIRTY;
+ ext2fs_free_mem((void **) &bitmap_block);
+ return 0;
+}
+
+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 = (int) EXT2_BLOCKS_PER_GROUP(fs->super) / 8;
+ int inode_nbytes = (int) EXT2_INODES_PER_GROUP(fs->super) / 8;
+ blk_t blk;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ fs->write_bitmaps = ext2fs_write_bitmaps;
+
+ retval = ext2fs_get_mem(strlen(fs->device_name) + 80, (void **) &buf);
+ if (retval)
+ return retval;
+ if (do_block) {
+ if (fs->block_map)
+ ext2fs_free_block_bitmap(fs->block_map);
+ sprintf(buf, "block bitmap for %s", fs->device_name);
+ retval = ext2fs_allocate_block_bitmap(fs, buf, &fs->block_map);
+ if (retval)
+ goto cleanup;
+ block_bitmap = fs->block_map->bitmap;
+ }
+ if (do_inode) {
+ if (fs->inode_map)
+ ext2fs_free_inode_bitmap(fs->inode_map);
+ sprintf(buf, "inode bitmap for %s", fs->device_name);
+ retval = ext2fs_allocate_inode_bitmap(fs, buf, &fs->inode_map);
+ if (retval)
+ goto cleanup;
+ inode_bitmap = fs->inode_map->bitmap;
+ }
+ ext2fs_free_mem((void **) &buf);
+
+ if (fs->flags & EXT2_FLAG_IMAGE_FILE) {
+ if (inode_bitmap) {
+ blk = (fs->image_header->offset_inodemap /
+ fs->blocksize);
+ retval = io_channel_read_blk(fs->io, blk,
+ -(inode_nbytes * fs->group_desc_count),
+ inode_bitmap);
+ if (retval)
+ goto cleanup;
+ }
+ if (block_bitmap) {
+ blk = (fs->image_header->offset_blockmap /
+ fs->blocksize);
+ retval = io_channel_read_blk(fs->io, blk,
+ -(block_nbytes * fs->group_desc_count),
+ block_bitmap);
+ if (retval)
+ goto cleanup;
+ }
+ return 0;
+ }
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ if (block_bitmap) {
+ blk = fs->group_desc[i].bg_block_bitmap;
+ if (blk) {
+ retval = io_channel_read_blk(fs->io, blk,
+ -block_nbytes, block_bitmap);
+ if (retval) {
+ retval = EXT2_ET_BLOCK_BITMAP_READ;
+ goto cleanup;
+ }
+#ifdef EXT2_BIG_ENDIAN_BITMAPS
+ if (!((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (fs->flags & EXT2_FLAG_SWAP_BYTES_READ)))
+ ext2fs_swap_bitmap(fs, block_bitmap, block_nbytes);
+#endif
+ } else
+ memset(block_bitmap, 0, block_nbytes);
+ block_bitmap += block_nbytes;
+ }
+ if (inode_bitmap) {
+ blk = fs->group_desc[i].bg_inode_bitmap;
+ if (blk) {
+ retval = io_channel_read_blk(fs->io, blk,
+ -inode_nbytes, inode_bitmap);
+ if (retval) {
+ retval = EXT2_ET_INODE_BITMAP_READ;
+ goto cleanup;
+ }
+#ifdef EXT2_BIG_ENDIAN_BITMAPS
+ if (!((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (fs->flags & EXT2_FLAG_SWAP_BYTES_READ)))
+ ext2fs_swap_bitmap(fs, inode_bitmap, inode_nbytes);
+#endif
+ } else
+ memset(inode_bitmap, 0, inode_nbytes);
+ inode_bitmap += inode_nbytes;
+ }
+ }
+ return 0;
+
+cleanup:
+ if (do_block) {
+ ext2fs_free_mem((void **) &fs->block_map);
+ fs->block_map = 0;
+ }
+ if (do_inode) {
+ ext2fs_free_mem((void **) &fs->inode_map);
+ fs->inode_map = 0;
+ }
+ if (buf)
+ ext2fs_free_mem((void **) &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_read_bitmaps(ext2_filsys fs)
+{
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ 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)
+{
+ errcode_t retval;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (fs->block_map && ext2fs_test_bb_dirty(fs)) {
+ retval = ext2fs_write_block_bitmap(fs);
+ if (retval)
+ return retval;
+ }
+ if (fs->inode_map && ext2fs_test_ib_dirty(fs)) {
+ retval = ext2fs_write_inode_bitmap(fs);
+ if (retval)
+ return retval;
+ }
+ return 0;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/swapfs.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/swapfs.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/swapfs.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,145 @@
+/*
+ * swapfs.c --- swap ext2 filesystem data structures
+ *
+ * Copyright (C) 1995, 1996 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
+#include <time.h>
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+#ifdef EXT2FS_ENABLE_SWAPFS
+void ext2fs_swap_super(struct ext2_super_block * sb)
+{
+ 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_frag_size = ext2fs_swab32(sb->s_log_frag_size);
+ sb->s_blocks_per_group = ext2fs_swab32(sb->s_blocks_per_group);
+ sb->s_frags_per_group = ext2fs_swab32(sb->s_frags_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_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);
+}
+
+void ext2fs_swap_group_desc(struct ext2_group_desc *gdp)
+{
+ 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);
+}
+
+void ext2fs_swap_inode(ext2_filsys fs, struct ext2_inode *t,
+ struct ext2_inode *f, int hostorder)
+{
+ unsigned i;
+ int islnk = 0;
+
+ 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_blocks = ext2fs_swab32(f->i_blocks);
+ t->i_flags = ext2fs_swab32(f->i_flags);
+ if (!islnk || f->i_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_file_acl = ext2fs_swab32(f->i_file_acl);
+ t->i_dir_acl = ext2fs_swab32(f->i_dir_acl);
+ t->i_faddr = ext2fs_swab32(f->i_faddr);
+
+ switch (fs->super->s_creator_os) {
+ case EXT2_OS_LINUX:
+ t->osd1.linux1.l_i_reserved1 =
+ ext2fs_swab32(f->osd1.linux1.l_i_reserved1);
+ t->osd2.linux2.l_i_frag = f->osd2.linux2.l_i_frag;
+ t->osd2.linux2.l_i_fsize = f->osd2.linux2.l_i_fsize;
+ t->osd2.linux2.i_pad1 = ext2fs_swab16(f->osd2.linux2.i_pad1);
+ 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_reserved2 =
+ ext2fs_swab32(f->osd2.linux2.l_i_reserved2);
+ 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;
+ case EXT2_OS_MASIX:
+ t->osd1.masix1.m_i_reserved1 =
+ ext2fs_swab32(f->osd1.masix1.m_i_reserved1);
+ t->osd2.masix2.m_i_frag = f->osd2.masix2.m_i_frag;
+ t->osd2.masix2.m_i_fsize = f->osd2.masix2.m_i_fsize;
+ t->osd2.masix2.m_pad1 = ext2fs_swab16(f->osd2.masix2.m_pad1);
+ t->osd2.masix2.m_i_reserved2[0] =
+ ext2fs_swab32(f->osd2.masix2.m_i_reserved2[0]);
+ t->osd2.masix2.m_i_reserved2[1] =
+ ext2fs_swab32(f->osd2.masix2.m_i_reserved2[1]);
+ break;
+ }
+}
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/test_io.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/test_io.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/test_io.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,264 @@
+/*
+ * 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 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 "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;
+ 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);
+};
+
+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_flush(io_channel channel);
+static errcode_t test_write_byte(io_channel channel, unsigned long offset,
+ int count, const void *buf);
+
+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
+
+};
+
+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_set_blksize)
+ (int blksize, errcode_t err) = 0;
+void (*test_io_cb_write_byte)
+ (unsigned long block, int count, errcode_t err) = 0;
+
+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;
+
+ if (name == 0)
+ return EXT2_ET_BAD_DEVICE_NAME;
+ retval = ext2fs_get_mem(sizeof(struct struct_io_channel),
+ (void **) &io);
+ if (retval)
+ return retval;
+ memset(io, 0, sizeof(struct struct_io_channel));
+ io->magic = EXT2_ET_MAGIC_IO_CHANNEL;
+ retval = ext2fs_get_mem(sizeof(struct test_private_data),
+ (void **) &data);
+ if (retval) {
+ retval = EXT2_ET_NO_MEMORY;
+ goto cleanup;
+ }
+ io->manager = test_io_manager;
+ retval = ext2fs_get_mem(strlen(name)+1, (void **) &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;
+
+ *channel = io;
+ return 0;
+
+cleanup:
+ if (io)
+ ext2fs_free_mem((void **) &io);
+ if (data)
+ ext2fs_free_mem((void **) &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);
+
+ ext2fs_free_mem((void **) &channel->private_data);
+ if (channel->name)
+ ext2fs_free_mem((void **) &channel->name);
+ ext2fs_free_mem((void **) &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);
+ if (data->set_blksize)
+ data->set_blksize(blksize, retval);
+ else
+ printf("Test_io: set_blksize(%d) returned %s\n",
+ blksize, retval ? error_message(retval) : "OK");
+ 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);
+ else
+ printf("Test_io: read_blk(%lu, %d) returned %s\n",
+ block, count, retval ? error_message(retval) : "OK");
+ 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);
+ else
+ printf("Test_io: write_blk(%lu, %d) returned %s\n",
+ block, count, retval ? error_message(retval) : "OK");
+ 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);
+ else
+ printf("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);
+
+ printf("Test_io: flush() returned %s\n",
+ retval ? error_message(retval) : "OK");
+
+ return retval;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_badblocks.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_badblocks.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_badblocks.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,237 @@
+/*
+ * 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 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 <sys/stat.h>
+#include <sys/types.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+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 };
+
+static int test_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("%d ", 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 %d is %s --- %s\n", vec[i],
+ match ? "present" : "absent",
+ ok ? "OK" : "NOT OK");
+ }
+}
+
+int file_test(badblocks_list bb)
+{
+ char tmp_filename[20] = "#testXXXXXX";
+ badblocks_list new_bb = 0;
+ errcode_t retval;
+ FILE *f;
+
+ mktemp(tmp_filename);
+
+ unlink(tmp_filename);
+ f = fopen(tmp_filename, "w");
+ if (!f) {
+ fprintf(stderr, "Error opening temp file %s: %s\n",
+ tmp_filename, 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;
+ }
+ fclose(f);
+
+ f = fopen(tmp_filename, "r");
+ if (!f) {
+ fprintf(stderr, "Error re-opening temp file %s: %s\n",
+ tmp_filename, error_message(errno));
+ return 1;
+ }
+ 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;
+}
+
+
+int main(int argc, char **argv)
+{
+ badblocks_list bb1, bb2, bb3, bb4;
+ int equal;
+ errcode_t retval;
+
+ bb1 = bb2 = bb3 = bb4 = 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");
+
+ if (bb1 && bb2 && bb3 && bb4) {
+ 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++;
+ printf("\n");
+ }
+
+ if (test_fail == 0)
+ printf("ext2fs library badblocks tests checks out OK!\n");
+
+ file_test(bb4);
+
+ 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;
+
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_bitops.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_bitops.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_bitops.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,44 @@
+/*
+ * 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 Public
+ * License.
+ * %End-Header%
+ */
+
+/* #define _EXT2_USE_C_VERSIONS_ */
+
+#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"
+
+unsigned char bitarray[] = {
+ 0x80, 0xF0, 0x40, 0x40, 0x0, 0x0, 0x0, 0x0, 0x10, 0x20, 0x00, 0x00
+ };
+
+main(int argc, char **argv)
+{
+ int i, size;
+
+ size = sizeof(bitarray)*8;
+ 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);
+ }
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_byteswap.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_byteswap.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_byteswap.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 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 <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;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_getsize.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_getsize.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_getsize.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,44 @@
+/*
+ * 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 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 <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);
+ }
+ 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 %d blocks.\n", argv[1], blocks);
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_iscan.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_iscan.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/tst_iscan.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,218 @@
+/*
+ * 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 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 <sys/stat.h>
+#include <sys/types.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+blk_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 test_read_blk(unsigned long block, int count, errcode_t err)
+{
+ int i;
+
+ if (first_no_comma)
+ first_no_comma = 0;
+ else
+ printf(", ");
+
+ if (count > 1)
+ printf("%lu-%lu", block, block+count-1);
+ else
+ printf("%lu", block);
+
+ for (i=0; i < count; i++, block++) {
+ if (ext2fs_test_block_bitmap(touched_map, block)) {
+ printf("\nDuplicate block?!? --- %lu\n", block);
+ failed++;
+ first_no_comma = 1;
+ }
+ ext2fs_mark_block_bitmap(touched_map, block);
+ }
+}
+
+/*
+ * 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(¶m, 0, sizeof(param));
+ param.s_blocks_count = 12000;
+
+
+ test_io_cb_read_blk = test_read_blk;
+
+ retval = ext2fs_initialize("test fs", 0, ¶m,
+ 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_bitmap(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_bitmap(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;
+ unsigned long blk;
+
+ for (i=0; test_vec[i]; i++) {
+ if (ext2fs_test_block_bitmap(touched_map, test_vec[i])) {
+ printf("Bad block was touched --- %d\n", test_vec[i]);
+ failed++;
+ first_no_comma = 1;
+ }
+ ext2fs_mark_block_bitmap(touched_map, test_vec[i]);
+ }
+ for (i = 0; i < test_fs->group_desc_count; i++) {
+ for (j=0, blk = test_fs->group_desc[i].bg_inode_table;
+ j < test_fs->inode_blocks_per_group;
+ j++, blk++) {
+ if (!ext2fs_test_block_bitmap(touched_map, blk) &&
+ !ext2fs_test_block_bitmap(bad_block_map, blk)) {
+ printf("Missing block --- %lu\n", blk);
+ failed++;
+ }
+ }
+ }
+ printf("Bad inodes: ");
+ for (i=1; i <= test_fs->super->s_inodes_count; i++) {
+ if (ext2fs_test_inode_bitmap(bad_inode_map, i)) {
+ if (first)
+ first = 0;
+ else
+ printf(", ");
+ printf("%d", i);
+ }
+ }
+ printf("\n");
+}
+
+
+int main(int argc, char **argv)
+{
+ setup();
+ iterate();
+ check_map();
+ if (!failed)
+ printf("Inode scan tested OK!\n");
+ return failed;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/unix_io.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/unix_io.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/unix_io.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,586 @@
+/*
+ * unix_io.c --- This is the Unix I/O interface to the I/O manager.
+ *
+ * Implements a one-block write-through cache.
+ *
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ * 2002 by Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %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>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include <sys/resource.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 unix_cache {
+ char *buf;
+ unsigned long block;
+ int access_time;
+ int dirty:1;
+ int in_use:1;
+};
+
+#define CACHE_SIZE 8
+#define WRITE_VIA_CACHE_SIZE 4 /* Must be smaller than CACHE_SIZE */
+
+struct unix_private_data {
+ int magic;
+ int dev;
+ int flags;
+ int access_time;
+ struct unix_cache cache[CACHE_SIZE];
+};
+
+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 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
+};
+
+io_manager unix_io_manager = &struct_unix_manager;
+
+/*
+ * Here are the raw I/O functions
+ */
+static errcode_t raw_read_blk(io_channel channel,
+ struct unix_private_data *data,
+ unsigned long block,
+ int count, void *buf)
+{
+ errcode_t retval;
+ size_t size;
+ ext2_loff_t location;
+ int actual = 0;
+
+ size = (count < 0) ? -count : count * channel->block_size;
+ location = (ext2_loff_t) block * channel->block_size;
+ if (ext2fs_llseek(data->dev, location, SEEK_SET) != location) {
+ retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
+ goto error_out;
+ }
+ actual = read(data->dev, buf, size);
+ if (actual != size) {
+ if (actual < 0)
+ actual = 0;
+ retval = EXT2_ET_SHORT_READ;
+ goto error_out;
+ }
+ 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 block,
+ int count, const void *buf)
+{
+ size_t size;
+ ext2_loff_t location;
+ int actual = 0;
+ errcode_t retval;
+
+ if (count == 1)
+ size = channel->block_size;
+ else {
+ if (count < 0)
+ size = -count;
+ else
+ size = count * channel->block_size;
+ }
+
+ location = (ext2_loff_t) block * channel->block_size;
+ if (ext2fs_llseek(data->dev, location, SEEK_SET) != location) {
+ retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
+ goto error_out;
+ }
+
+ actual = write(data->dev, buf, size);
+ if (actual != size) {
+ retval = EXT2_ET_SHORT_WRITE;
+ goto error_out;
+ }
+ 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 ((retval = ext2fs_get_mem(channel->block_size,
+ (void **) &cache->buf)))
+ return retval;
+ }
+ return 0;
+}
+
+/* Free the cache buffers */
+static void free_cache(io_channel channel,
+ 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((void **) &cache->buf);
+ cache->buf = 0;
+ }
+}
+
+/*
+ * Try to find a block in the cache. If get_cache is non-zero, then
+ * if the block isn't in the cache, evict the oldest block in the
+ * cache and create a new cache entry for the requested block.
+ */
+static struct unix_cache *find_cached_block(io_channel channel,
+ struct unix_private_data *data,
+ unsigned long block,
+ int get_cache)
+{
+ 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) {
+ 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 (!get_cache)
+ return 0;
+
+ /*
+ * Try to allocate cache slot.
+ */
+ if (unused_cache)
+ cache = unused_cache;
+ else {
+ cache = oldest_cache;
+ if (cache->dirty)
+ raw_write_blk(channel, data,
+ cache->block, 1, cache->buf);
+ }
+ cache->in_use = 1;
+ cache->block = block;
+ cache->access_time = ++data->access_time;
+ return cache;
+}
+
+/*
+ * 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;
+}
+
+
+
+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;
+ struct stat st;
+
+ if (name == 0)
+ return EXT2_ET_BAD_DEVICE_NAME;
+ retval = ext2fs_get_mem(sizeof(struct struct_io_channel),
+ (void **) &io);
+ if (retval)
+ return retval;
+ memset(io, 0, sizeof(struct struct_io_channel));
+ io->magic = EXT2_ET_MAGIC_IO_CHANNEL;
+ retval = ext2fs_get_mem(sizeof(struct unix_private_data),
+ (void **) &data);
+ if (retval)
+ goto cleanup;
+
+ io->manager = unix_io_manager;
+ retval = ext2fs_get_mem(strlen(name)+1, (void **) &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;
+
+ if ((retval = alloc_cache(io, data)))
+ goto cleanup;
+
+ open_flags = (flags & IO_FLAG_RW) ? O_RDWR : O_RDONLY;
+#ifdef HAVE_OPEN64
+ data->dev = open64(name, open_flags);
+#else
+ data->dev = open(name, open_flags);
+#endif
+ if (data->dev < 0) {
+ retval = errno;
+ goto cleanup;
+ }
+
+#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+ kernels where writes to block
+ * devices are wrongly getting hit by the filesize limit.
+ */
+ if ((flags & IO_FLAG_RW) &&
+ (fstat(data->dev, &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) {
+ free_cache(io, data);
+ ext2fs_free_mem((void **) &data);
+ }
+ if (io)
+ ext2fs_free_mem((void **) &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;
+
+ retval = flush_cached_blocks(channel, data, 0);
+
+ if (close(data->dev) < 0)
+ retval = errno;
+ free_cache(channel, data);
+
+ ext2fs_free_mem((void **) &channel->private_data);
+ if (channel->name)
+ ext2fs_free_mem((void **) &channel->name);
+ ext2fs_free_mem((void **) &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) {
+ if ((retval = flush_cached_blocks(channel, data, 0)))
+ return retval;
+
+ channel->block_size = blksize;
+ free_cache(channel, data);
+ if ((retval = alloc_cache(channel, data)))
+ return retval;
+ }
+ return 0;
+}
+
+
+static errcode_t unix_read_blk(io_channel channel, unsigned long block,
+ int count, void *buf)
+{
+ struct unix_private_data *data;
+ struct unix_cache *cache;
+ errcode_t retval;
+ char *cp;
+ int i, j;
+
+ EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
+ data = (struct unix_private_data *) channel->private_data;
+ EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
+
+ /*
+ * If we're doing an odd-sized read, flush out the cache and
+ * then do a direct read.
+ */
+ if (count < 0) {
+ 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(channel, data, block, 0))) {
+#ifdef DEBUG
+ printf("Using cached block %d\n", block);
+#endif
+ memcpy(cp, cache->buf, channel->block_size);
+ count--;
+ block++;
+ cp += channel->block_size;
+ continue;
+ }
+ /*
+ * Find the number of uncached blocks so we can do a
+ * single read request
+ */
+ for (i=1; i < count; i++)
+ if (find_cached_block(channel, data, block+i, 0))
+ break;
+#ifdef DEBUG
+ printf("Reading %d blocks starting at %d\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 = find_cached_block(channel, data, block++, 1);
+ if (cache)
+ memcpy(cache->buf, cp, channel->block_size);
+ cp += channel->block_size;
+ }
+ }
+ return 0;
+}
+
+static errcode_t unix_write_blk(io_channel channel, unsigned long block,
+ int count, const void *buf)
+{
+ struct unix_private_data *data;
+ struct unix_cache *cache;
+ errcode_t retval = 0, retval2;
+ 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);
+
+ /*
+ * 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_VIA_CACHE_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(channel, data, block, 1);
+ if (!cache) {
+ /*
+ * Oh shit, we couldn't get cache descriptor.
+ * Force the write directly.
+ */
+ if ((retval2 = raw_write_blk(channel, data, block,
+ 1, cp)))
+ retval = retval2;
+ } else {
+ memcpy(cache->buf, cp, channel->block_size);
+ cache->dirty = !writethrough;
+ }
+ count--;
+ block++;
+ cp += channel->block_size;
+ }
+ return retval;
+}
+
+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;
+ size_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);
+
+ /*
+ * Flush out the cache completely
+ */
+ if ((retval = flush_cached_blocks(channel, data, 1)))
+ return retval;
+
+ if (lseek(data->dev, 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);
+
+ retval = flush_cached_blocks(channel, data, 0);
+ fsync(data->dev);
+ return retval;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/unlink.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/unlink.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/unlink.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,80 @@
+/*
+ * 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 Public
+ * License.
+ * %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;
+ int done;
+};
+
+#ifdef __TURBOC__
+ #pragma argsused
+#endif
+static int unlink_proc(struct ext2_dir_entry *dirent,
+ int offset,
+ int blocksize,
+ char *buf,
+ void *priv_data)
+{
+ struct link_struct *ls = (struct link_struct *) priv_data;
+
+ if (ls->name && ((dirent->name_len & 0xFF) != ls->namelen))
+ return 0;
+ if (ls->name && strncmp(ls->name, dirent->name,
+ dirent->name_len & 0xFF))
+ return 0;
+ if (ls->inode && (dirent->inode != ls->inode))
+ return 0;
+
+ dirent->inode = 0;
+ ls->done++;
+ return DIRENT_ABORT|DIRENT_CHANGED;
+}
+
+#ifdef __TURBOC__
+ #pragma argsused
+#endif
+errcode_t ext2fs_unlink(ext2_filsys fs, ext2_ino_t dir,
+ const char *name, ext2_ino_t ino,
+ int flags)
+{
+ errcode_t retval;
+ struct link_struct ls;
+
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!(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;
+
+ retval = ext2fs_dir_iterate(fs, dir, 0, 0, unlink_proc, &ls);
+ if (retval)
+ return retval;
+
+ return (ls.done) ? 0 : EXT2_ET_DIR_NO_SPACE;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/valid_blk.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/valid_blk.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/valid_blk.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,45 @@
+/*
+ * 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 Public
+ * License.
+ * %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_blocks(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) && inode->i_blocks == 0)
+ return 0;
+
+ return 1;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/version.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/version.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/version.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,50 @@
+/*
+ * 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 Public
+ * License.
+ * %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;
+
+ for (cp = ver_string; *cp; cp++) {
+ if (!isdigit(*cp))
+ continue;
+ 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);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/write_bb_file.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/write_bb_file.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ext2fs/write_bb_file.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 Public
+ * License.
+ * %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,
+ 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, "%d\n", blk);
+ }
+ ext2fs_badblocks_list_iterate_end(bb_iter);
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/fpopen.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/fpopen.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/fpopen.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -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);
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,5 @@
+Makefile
+mk_cmds
+ss_err.c
+ss_err.h
+std_rqs.c
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,302 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-03-07 Theodore Tso <tytso at mit.edu>
+
+ * pager.c (ss_pager_create), list_rqs.c (ss_list_requests): Fix
+ function prototypes to avoid gcc -Wall complaints.
+
+ * listen.c (ss_listen): Make sure the signal handler for SIGCONT
+ is restored when we exit. Also, make sure we don't
+ clubber any variables after setjmp/longjmp. Also removed
+ some bogus, fairly dubious coude.
+
+ * ss.h, ss_internal.h, execute_cmd.c: Add function prototypes to
+ prevent gcc -Wall complaints.
+
+2002-02-12 Theodore Tso <tytso at mit.edu>
+
+ * requests.c (DECLARE): Fix bug in non-STDC declaration --- we
+ had a mismatch in the function signature and parameter
+ declaration sections for info/infop.
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-16 Theodore Tso <tytso at mit.edu>
+
+ * mk_cmds.sh.in: Make the shell script safe from directory
+ pathnames with spaces.
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-06-01 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in: Move include/asm/types.h.in to
+ lib/ext2fs/ext2_types.h.in.
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+2000-07-04 Theodore Ts'o <tytso at valinux.com>
+
+ * Makefile.in: Remove explicit link of -lc in the shared library.
+ (It shouldn't be necessary, and is harmful in some cases).
+
+2000-07-03 <tytso at snap.thunk.org>
+
+ * ct_c.awk: Work around a bug in gawk 3.05
+
+ * mk_cmds.sh.in: Allow the build system to override the standard
+ location for finding the ct_c.* files by setting the
+ _SS_DIR_OVERRIDE environment variable.
+
+ * Makefile.in: Use _SS_DIR_OVERRIDE to make sure we get the
+ version in the source tree.
+
+2000-05-25 <tytso at snap.thunk.org>
+
+ * Makefile: Add hack dependency rule so that parallel makes work
+ correctly.
+
+1999-11-19 <tytso at valinux.com>
+
+ * execute_cmd.c (ss_execute_line): Fix memory leak; we weren't
+ freeing the argv array.
+
+ * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
+ the source directory.
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-09-07 <tytso at rsts-11.mit.edu>
+
+ * Updated copyright statements with permission of the original
+ authors.
+
+1999-07-18 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.15
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+Mon Jan 4 00:05:14 1999 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * mk_cmds.sh.in (TMP): Fixed portability bug in shell script; we
+ were depending on a bash'ism.
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-07-10 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * mk_cmds.sh.in: Fix error message so that it says mk_cmds's
+ template files instead of compile_et's template files.
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+1998-03-30 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Install the ct_c.awk and ct_c.sed files in
+ $(datadir)/ss (i.e., /usr/share/ss) directory. Change
+ to use new installation directory variables
+ convention. Fix uninstall rules to take $(DESTDIR)
+ into account.
+
+ * mk_cmds.sh.in: Look in $(datadir)/ss for ct_c.awk and
+ ct_c.sed; if not found, look in the build directory. Add
+ error checking for non-existent input file.
+
+Thu Aug 14 08:17:22 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (install): Fix rm command to use $(DESTDIR)
+ appropriately.
+
+Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.11
+
+Wed Jun 4 15:04:03 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (install): Install the ss_err.h header file out of
+ the build directory instead of the source directory (since
+ it is a constructed file).
+
+Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * Release of E2fsprogs version 1.10
+
+Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.09
+
+Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.08
+
+Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * Release of E2fsprogs version 1.07
+
+Wed Mar 12 21:54:32 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * help.c, pager.c, ss.h: Don't use "extern int errno", but use
+ #include <errno.h> instead.
+
+Thu Jan 2 00:16:03 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * parse.c: Put in an include of string.h
+
+Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.06
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
+Fri Aug 30 22:36:48 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * invocation.c (ss_create_invocation): Change function prototype
+ of invocation so that the first two arguments are const
+ char *, and that the info_ptr is a void *, not a char *.
+
+ * ss.h: Added declaration of ss_execute_line()
+
+Sat Aug 10 00:17:14 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * listen.c (ss_listen): Fix -Wall flames.
+
+Thu May 16 11:12:30 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.04
+
+Thu May 16 10:04:09 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (INSTALL_HFILES): Install the correct header files
+ so that /usr/include/ss/ss.h is actually usable!
+
+Wed Mar 27 00:33:40 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.03
+
+Wed Jan 31 11:06:08 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.02
+
+Wed Oct 25 11:58:20 1995 <tytso at rsts-11.mit.edu>
+
+ * ss_internal.h: Removed malloc, realloc, free definitions, and
+ #include <stdlib.h> instead.
+
+Mon Sep 4 21:46:00 1995 Remy Card <card at bbj>
+
+ * Makefile.in: Added support for BSD shared libraries.
+ (distclean): Use the -f option when removing files.
+
+Fri Aug 18 15:15:09 1995 Theodore Y. Ts'o <tytso at dcl>
+
+ * Makefile.in (mk_cmds): Remove usage of $<, since it's not
+ portable.
+
+Sat Aug 12 03:11:02 1995 Remy Card <card at bbj>
+
+ * Makefile.in (install): Install static libraries in $(ulibdir)
+ (/usr/lib on Linux) instead of $(libdir) (/lib on Linux).
+
+Thu Aug 10 14:23:31 1995 Remy Card <card at bbj>
+
+ * Makefile.in (distclean): Remove mk_cmds.sh.
+
+Sat Aug 5 11:44:29 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * mk_cmds.sh.in: Remove the old .c file before moving the new file
+ into place.
+
+ * Makefile.in (DLL_INSTALL_DIR, ELF_INSTALL_DIR): Set the
+ installation directories correctly.
+
+ * Makefile.in (clean): Don't remove mk_cmds.sh, since it's built
+ from the configure script.
+
+Tue Jul 11 20:47:46 1995 <tytso at rsx-11.mit.edu>
+
+ * help.c (ss_help): Use malloc instead of alloca for maximal
+ portability. Check return value of malloc before using
+ buffer. Allocate memory when printing usage message.
+
+Thu Jun 15 23:46:16 1995 Remy Card <card at bbj>
+
+ * Makefile.in: Added support for ELF shared libraries.
+ Fixed typos in the compilation rules.
+ (distclean): Added mk_cmds.sh.
+
+Sat Jun 10 19:57:07 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * mk_cmds.sh.in: Use SS_DIR instead of srcdir to determine the
+ location of the ss directory.
+
+Thu Jun 8 13:18:48 1995 Miles Bader <miles at churchy.gnu.ai.mit.edu>
+
+ * help.c (ss_help): Use alloca to allocate space for filenames
+ instead of fixed buffers.
+ * error.c (ss_error, & includes): Change the selection of
+ varargs/stdarg to work with configure.
+ * pager.c: Include <errno.h> if possible.
+ * parse.c: Ditto.
+ * request_tbl.c: Ditto.
+
+ * Makefile.in: Rewritten to conform to GNU coding standards and
+ support separate compilation directories.
+ Don't preprocess mk_cmds.sh, as this is now done by configure.
+
+Sat Mar 11 18:14:52 1995 Theodore Y. Ts'o <tytso at localhost>
+
+ * Makefile.in (DLL_INSTALL_DIR): Install libss in /lib, since it's
+ needed by debugfs (which is installed in /sbin).
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/Makefile.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/Makefile.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/Makefile.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,196 @@
+#
+# Makefile for lib/ss
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = lib/ss
+INSTALL = @INSTALL@
+
+ at MCONFIG@
+
+LIBRARY= libss
+LIBDIR= ss
+
+DLL_ADDRESS = 0x66880000
+DLL_JUMPSIZE = 0x1000
+DLL_GOTSIZE = 0x1000
+DLL_VERSION = 1.0
+DLL_IMAGE = libss
+DLL_STUB = libss
+DLL_LIBS = -L../.. -lcom_err
+DLL_MYDIR = ss
+DLL_INSTALL_DIR = $(root_libdir)
+
+ELF_VERSION = 2.0
+ELF_SO_VERSION = 2
+ELF_IMAGE = libss
+ELF_MYDIR = ss
+ELF_INSTALL_DIR = $(root_libdir)
+ELF_OTHER_LIBS = -L../.. -lcom_err
+
+BSDLIB_VERSION = 1.0
+BSDLIB_IMAGE = libss
+BSDLIB_MYDIR = ss
+BSDLIB_INSTALL_DIR = $(root_libdir)
+
+TAGS=etags
+COMPILE_ET=../et/compile_et
+MK_CMDS=_SS_DIR_OVERRIDE=. ./mk_cmds
+
+# -I.. is so that ss/ss_err.h works
+# -I$(srcdir)/.. is so that ss/ss.h works
+# -I$(srcdir)/../et is so com_err.h works
+XTRA_CFLAGS=-DPOSIX_SIGNALS -I$(srcdir)/../et
+
+.c.o:
+ $(CC) $(ALL_CFLAGS) -c $<
+ at PROFILE_CMT@ $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+ at CHECKER_CMT@ $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
+ at DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) \
+ at DLL_CMT@ $(ALL_CFLAGS) -o jump/$*.o -c $<)
+ at ELF_CMT@ $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
+ at BSDLIB_CMT@ $(CC) $(ALL_CFLAGS) -fpic -o pic/$*.o -c $<
+
+# for the library
+
+LIB= libss.a
+
+# 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
+
+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
+
+all:: mk_cmds
+
+ at MAKEFILE_LIBRARY@
+ at MAKEFILE_DLL@
+ at MAKEFILE_ELF@
+ at MAKEFILE_BSDLIB@
+ at MAKEFILE_PROFILE@
+ at 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 # libss_p.a lint
+
+std_rqs.c: std_rqs.ct mk_cmds
+ DIR=$(srcdir) $(MK_CMDS) $(srcdir)/std_rqs.ct
+
+ss_err.c ss_err.h: ss_err.et
+ $(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
+ $(SUBSTITUTE) $(srcdir)/mk_cmds.sh.in mk_cmds
+ $(CHMOD) +x mk_cmds
+
+installdirs::
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(includedir)/ss $(DESTDIR)$(datadir)/ss \
+ $(DESTDIR)$(bindir)
+
+install:: libss.a $(INSTALL_HFILES) installdirs ss_err.h mk_cmds
+ $(INSTALL_DATA) libss.a $(DESTDIR)$(libdir)/libss.a
+ $(CHMOD) 644 $(DESTDIR)$(libdir)/libss.a
+ -$(RANLIB) $(DESTDIR)$(libdir)/libss.a
+ $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libss.a
+ $(RM) -f $(DESTDIR)$(includedir)/ss/*
+ for i in $(INSTALL_HFILES); do \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/ss/$$i; \
+ done
+ $(INSTALL_DATA) ss_err.h $(DESTDIR)$(includedir)/ss/ss_err.h
+ for i in $(SHARE_FILES); do \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(datadir)/ss/$$i; \
+ done
+ $(INSTALL) mk_cmds $(DESTDIR)$(bindir)/mk_cmds
+
+uninstall::
+ $(RM) -f $(DESTDIR)$(libdir)/libss.a $(DESTDIR)$(bindir)/mk_cmds
+ $(RM) -rf $(DESTDIR)$(includedir)/ss $(DESTDIR)$(datadir)/ss
+
+clean::
+ $(RM) -f ../libss.a libss.a mk_cmds ss_err.h ss_err.c std_rqs.c \
+ *.o *~ \#* *.bak core
+
+mostlyclean:: clean
+distclean:: clean
+ $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+#
+# Hack to parallel makes recognize dependencies correctly.
+#
+$(top_builddir)/lib/ss/ss_err.h: ss_err.h
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+invocation.o: $(srcdir)/invocation.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h
+help.o: $(srcdir)/help.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h
+execute_cmd.o: $(srcdir)/execute_cmd.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h
+listen.o: $(srcdir)/listen.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h
+parse.o: $(srcdir)/parse.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h
+error.o: $(srcdir)/error.c $(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 $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h
+request_tbl.o: $(srcdir)/request_tbl.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h
+list_rqs.o: $(srcdir)/list_rqs.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h
+pager.o: $(srcdir)/pager.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h
+requests.o: $(srcdir)/requests.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h
+data.o: $(srcdir)/data.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ct_c.awk
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ct_c.awk 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ct_c.awk 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,79 @@
+/^command_table / {
+ cmdtbl = $2;
+ printf "/* %s.c - automatically generated from %s.ct */\n", \
+ rootname, rootname > outfile
+ print "#include <ss/ss.h>" > outfile
+ print "" >outfile
+ print "#ifndef __STDC__" > outfile
+ print "#define const" > outfile
+ print "#endif" > 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
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ct_c.sed
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ct_c.sed 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ct_c.sed 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/data.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/data.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/data.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -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;
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.funcs
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.funcs 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.funcs 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,26 @@
+00000000 T _initialize_ss_error_table libss jump/ss_err
+00000000 T _ss_create_invocation libss jump/invocation
+00000000 T _ss_delete_invocation libss jump/invocation
+00000000 T _ss_help libss jump/help
+00000000 T _ss_add_info_dir libss jump/help
+00000000 T _ss_delete_info_dir libss jump/help
+00000000 T _ss_execute_command libss jump/execute_cmd
+00000000 T _ss_execute_line libss jump/execute_cmd
+00000000 T _ss_listen libss jump/listen
+00000000 T _ss_abort_subsystem libss jump/listen
+00000000 T _ss_quit libss jump/listen
+00000000 T _ss_parse libss jump/parse
+00000000 T _ss_name libss jump/error
+00000000 T _ss_error libss jump/error
+00000000 T _ss_perror libss jump/error
+00000000 T _ss_set_prompt libss jump/prompt
+00000000 T _ss_get_prompt libss jump/prompt
+00000000 T _ss_add_request_table libss jump/request_tbl
+00000000 T _ss_delete_request_table libss jump/request_tbl
+00000000 T _ss_list_requests libss jump/list_rqs
+00000000 T _ss_pager_create libss jump/pager
+00000000 T _ss_page_stdin libss jump/pager
+00000000 T _ss_self_identify libss jump/requests
+00000000 T _ss_subsystem_name libss jump/requests
+00000000 T _ss_subsystem_version libss jump/requests
+00000000 T _ss_unimplemented libss jump/requests
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.ignore
===================================================================
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.import
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.import 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.import 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,166 @@
+00000004 D __et_list libcom_err jump/error_message
+00000004 D _com_err_hook libcom_err jump/com_err
+/usr/lib/libc.sa(__libc.o):00001000 a __GOT_SIZE
+/usr/lib/libc.sa(__libc.o):6008f0b0 A _AL
+/usr/lib/libc.sa(__libc.o):6008f198 A _AL_PARM
+/usr/lib/libc.sa(__libc.o):6008f060 A _AM
+/usr/lib/libc.sa(__libc.o):6008f0b4 A _BC
+/usr/lib/libc.sa(__libc.o):6008f064 A _BS
+/usr/lib/libc.sa(__libc.o):6008f0bc A _BT
+/usr/lib/libc.sa(__libc.o):6008f068 A _CA
+/usr/lib/libc.sa(__libc.o):6008f0c0 A _CD
+/usr/lib/libc.sa(__libc.o):6008f0c4 A _CE
+/usr/lib/libc.sa(__libc.o):6008f0c8 A _CL
+/usr/lib/libc.sa(__libc.o):6008f0cc A _CM
+/usr/lib/libc.sa(__libc.o):6008f048 A _COLS
+/usr/lib/libc.sa(__libc.o):6008f0d0 A _CR
+/usr/lib/libc.sa(__libc.o):6008f0d4 A _CS
+/usr/lib/libc.sa(__libc.o):6008f06c A _DA
+/usr/lib/libc.sa(__libc.o):6008f070 A _DB
+/usr/lib/libc.sa(__libc.o):6008f0d8 A _DC
+/usr/lib/libc.sa(__libc.o):6008f0dc A _DL
+/usr/lib/libc.sa(__libc.o):6008f19c A _DL_PARM
+/usr/lib/libc.sa(__libc.o):6008f0e0 A _DM
+/usr/lib/libc.sa(__libc.o):6008f0e4 A _DO
+/usr/lib/libc.sa(__libc.o):6008f1a4 A _DOWN_PARM
+/usr/lib/libc.sa(__libc.o):6008f03c A _Def_term
+/usr/lib/libc.sa(__libc.o):6008f0e8 A _ED
+/usr/lib/libc.sa(__libc.o):6008f0ec A _EI
+/usr/lib/libc.sa(__libc.o):6008f074 A _EO
+/usr/lib/libc.sa(__libc.o):6008f1b8 A _GT
+/usr/lib/libc.sa(__libc.o):6008f078 A _HC
+/usr/lib/libc.sa(__libc.o):6008f118 A _HO
+/usr/lib/libc.sa(__libc.o):6008f07c A _HZ
+/usr/lib/libc.sa(__libc.o):6008f11c A _IC
+/usr/lib/libc.sa(__libc.o):6008f120 A _IM
+/usr/lib/libc.sa(__libc.o):6008f080 A _IN
+/usr/lib/libc.sa(__libc.o):6008f124 A _IP
+/usr/lib/libc.sa(__libc.o):6008f0f0 A _K0
+/usr/lib/libc.sa(__libc.o):6008f0f4 A _K1
+/usr/lib/libc.sa(__libc.o):6008f0f8 A _K2
+/usr/lib/libc.sa(__libc.o):6008f0fc A _K3
+/usr/lib/libc.sa(__libc.o):6008f100 A _K4
+/usr/lib/libc.sa(__libc.o):6008f104 A _K5
+/usr/lib/libc.sa(__libc.o):6008f108 A _K6
+/usr/lib/libc.sa(__libc.o):6008f10c A _K7
+/usr/lib/libc.sa(__libc.o):6008f110 A _K8
+/usr/lib/libc.sa(__libc.o):6008f114 A _K9
+/usr/lib/libc.sa(__libc.o):6008f128 A _KD
+/usr/lib/libc.sa(__libc.o):6008f12c A _KE
+/usr/lib/libc.sa(__libc.o):6008f130 A _KH
+/usr/lib/libc.sa(__libc.o):6008f134 A _KL
+/usr/lib/libc.sa(__libc.o):6008f138 A _KR
+/usr/lib/libc.sa(__libc.o):6008f13c A _KS
+/usr/lib/libc.sa(__libc.o):6008f140 A _KU
+/usr/lib/libc.sa(__libc.o):6008f1a8 A _LEFT_PARM
+/usr/lib/libc.sa(__libc.o):6008f044 A _LINES
+/usr/lib/libc.sa(__libc.o):6008f144 A _LL
+/usr/lib/libc.sa(__libc.o):6008f148 A _MA
+/usr/lib/libc.sa(__libc.o):6008f300 A _MCAppPath
+/usr/lib/libc.sa(__libc.o):6008f084 A _MI
+/usr/lib/libc.sa(__libc.o):6008f088 A _MS
+/usr/lib/libc.sa(__libc.o):6008f030 A _My_term
+/usr/lib/libc.sa(__libc.o):6008f08c A _NC
+/usr/lib/libc.sa(__libc.o):6008f14c A _ND
+/usr/lib/libc.sa(__libc.o):6008f150 A _NL
+/usr/lib/libc.sa(__libc.o):6008f1bc A _NONL
+/usr/lib/libc.sa(__libc.o):6008f090 A _NS
+/usr/lib/libc.sa(__libc.o):6008f094 A _OS
+/usr/lib/libc.sa(__libc.o):6008f1b0 A _PC
+/usr/lib/libc.sa(__libc.o):6008f154 A _RC
+/usr/lib/libc.sa(__libc.o):6008f1ac A _RIGHT_PARM
+/usr/lib/libc.sa(__libc.o):6008f158 A _SC
+/usr/lib/libc.sa(__libc.o):6008f15c A _SE
+/usr/lib/libc.sa(__libc.o):6008f160 A _SF
+/usr/lib/libc.sa(__libc.o):6008f164 A _SO
+/usr/lib/libc.sa(__libc.o):6008f168 A _SR
+/usr/lib/libc.sa(__libc.o):6008f16c A _TA
+/usr/lib/libc.sa(__libc.o):6008f170 A _TE
+/usr/lib/libc.sa(__libc.o):6008f174 A _TI
+/usr/lib/libc.sa(__libc.o):6008f178 A _UC
+/usr/lib/libc.sa(__libc.o):6008f17c A _UE
+/usr/lib/libc.sa(__libc.o):6008f098 A _UL
+/usr/lib/libc.sa(__libc.o):6008f180 A _UP
+/usr/lib/libc.sa(__libc.o):6008f1c0 A _UPPERCASE
+/usr/lib/libc.sa(__libc.o):6008f1a0 A _UP_PARM
+/usr/lib/libc.sa(__libc.o):6008f188 A _US
+/usr/lib/libc.sa(__libc.o):6008f18c A _VB
+/usr/lib/libc.sa(__libc.o):6008f194 A _VE
+/usr/lib/libc.sa(__libc.o):6008f190 A _VS
+/usr/lib/libc.sa(__libc.o):6008f09c A _XB
+/usr/lib/libc.sa(__libc.o):6008f0a0 A _XN
+/usr/lib/libc.sa(__libc.o):6008f0a8 A _XS
+/usr/lib/libc.sa(__libc.o):6008f0a4 A _XT
+/usr/lib/libc.sa(__libc.o):6008f0ac A _XX
+/usr/lib/libc.sa(__libc.o):6008f2a4 A __IO_file_jumps
+/usr/lib/libc.sa(__libc.o):6008f1f4 A __IO_list_all
+/usr/lib/libc.sa(__libc.o):6008f2a8 A __IO_proc_jumps
+/usr/lib/libc.sa(__libc.o):6008f1ec A __IO_stderr_
+/usr/lib/libc.sa(__libc.o):6008f1e4 A __IO_stdin_
+/usr/lib/libc.sa(__libc.o):6008f1e8 A __IO_stdout_
+/usr/lib/libc.sa(__libc.o):6008f2ac A __IO_str_jumps
+/usr/lib/libc.sa(__libc.o):6008f214 A ____brk_addr
+/usr/lib/libc.sa(__libc.o):6008f01c A ___ctype_b
+/usr/lib/libc.sa(__libc.o):6008f020 A ___ctype_tolower
+/usr/lib/libc.sa(__libc.o):6008f024 A ___ctype_toupper
+/usr/lib/libc.sa(__libc.o):6008f1fc A ___environ
+/usr/lib/libc.sa(__libc.o):6008f250 A ___exit_funcs
+/usr/lib/libc.sa(__libc.o):6008f2f0 A ___glob_closedir_hook
+/usr/lib/libc.sa(__libc.o):6008f2f4 A ___glob_opendir_hook
+/usr/lib/libc.sa(__libc.o):6008f2f8 A ___glob_readdir_hook
+/usr/lib/libc.sa(__libc.o):6008f278 A ___ttyname
+/usr/lib/libc.sa(__libc.o):6008f238 A __collate_info
+/usr/lib/libc.sa(__libc.o):6008f23c A __ctype_info
+/usr/lib/libc.sa(__libc.o):6008f028 A __echoit
+/usr/lib/libc.sa(__libc.o):6008f034 A __endwin
+/usr/lib/libc.sa(__libc.o):6008f288 A __gdbm_fetch_val
+/usr/lib/libc.sa(__libc.o):6008f280 A __gdbm_file
+/usr/lib/libc.sa(__libc.o):6008f284 A __gdbm_memory
+/usr/lib/libc.sa(__libc.o):6008f240 A __monetary_info
+/usr/lib/libc.sa(__libc.o):6008f234 A __null_auth
+/usr/lib/libc.sa(__libc.o):6008f244 A __numeric_info
+/usr/lib/libc.sa(__libc.o):6008f2ec A __obstack
+/usr/lib/libc.sa(__libc.o):6008f1c8 A __pfast
+/usr/lib/libc.sa(__libc.o):6008f02c A __rawmode
+/usr/lib/libc.sa(__libc.o):6008f1dc A __res
+/usr/lib/libc.sa(__libc.o):6008f04c A __res_iflg
+/usr/lib/libc.sa(__libc.o):6008f050 A __res_lflg
+/usr/lib/libc.sa(__libc.o):6008f270 A __res_opcodes
+/usr/lib/libc.sa(__libc.o):6008f274 A __res_resultcodes
+/usr/lib/libc.sa(__libc.o):6008f248 A __response_info
+/usr/lib/libc.sa(__libc.o):6008f2fc A __sigintr
+/usr/lib/libc.sa(__libc.o):6008f00c A __sys_errlist
+/usr/lib/libc.sa(__libc.o):6008f010 A __sys_nerr
+/usr/lib/libc.sa(__libc.o):6008f014 A __sys_siglist
+/usr/lib/libc.sa(__libc.o):6008f24c A __time_info
+/usr/lib/libc.sa(__libc.o):6008f05c A __tty
+/usr/lib/libc.sa(__libc.o):6008f040 A __tty_ch
+/usr/lib/libc.sa(__libc.o):6008f1cc A __unctrl
+/usr/lib/libc.sa(__libc.o):6008f27c A __win
+/usr/lib/libc.sa(__libc.o):6008f058 A _curscr
+/usr/lib/libc.sa(__libc.o):6008f228 A _daylight
+/usr/lib/libc.sa(__libc.o):6008f200 A _errno
+/usr/lib/libc.sa(__libc.o):6008f1d0 A _gdbm_errno
+/usr/lib/libc.sa(__libc.o):6008f28c A _gdbm_version
+/usr/lib/libc.sa(__libc.o):6008f008 A _h_errlist
+/usr/lib/libc.sa(__libc.o):6008f1d8 A _h_errno
+/usr/lib/libc.sa(__libc.o):6008f2a0 A _h_nerr
+/usr/lib/libc.sa(__libc.o):6008f1c4 A _normtty
+/usr/lib/libc.sa(__libc.o):6008f204 A _optarg
+/usr/lib/libc.sa(__libc.o):6008f20c A _opterr
+/usr/lib/libc.sa(__libc.o):6008f208 A _optind
+/usr/lib/libc.sa(__libc.o):6008f2e4 A _optopt
+/usr/lib/libc.sa(__libc.o):6008f218 A _ospeed
+/usr/lib/libc.sa(__libc.o):6008f26c A _re_max_failures
+/usr/lib/libc.sa(__libc.o):6008f210 A _re_syntax_options
+/usr/lib/libc.sa(__libc.o):6008f1e0 A _rexecoptions
+/usr/lib/libc.sa(__libc.o):6008f230 A _rpc_createerr
+/usr/lib/libc.sa(__libc.o):6008f25c A _stderr
+/usr/lib/libc.sa(__libc.o):6008f254 A _stdin
+/usr/lib/libc.sa(__libc.o):6008f258 A _stdout
+/usr/lib/libc.sa(__libc.o):6008f054 A _stdscr
+/usr/lib/libc.sa(__libc.o):6008f2e8 A _svc_fdset
+/usr/lib/libc.sa(__libc.o):6008f224 A _timezone
+/usr/lib/libc.sa(__libc.o):6008f21c A _tputs_baud_rate
+/usr/lib/libc.sa(__libc.o):6008f038 A _ttytype
+/usr/lib/libc.sa(__libc.o):6008f220 A _tzname
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.params
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.params 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.params 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,6 @@
+Name=libss
+Text=0x66880000
+Data=0x00000000
+Jump=0x00001000
+GOT=0x00001000
+Version=1.0.0
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.undefs
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.undefs 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.undefs 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2 @@
+66885010 D __NEEDS_SHRLIB_libc_4
+66885028 D __NEEDS_SHRLIB_libet_1
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.vars
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.vars 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/dll/jump.vars 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,3 @@
+00000020 K _ss_std_requests libss jump/std_rqs
+00000004 D __ss_table libss jump/data
+00000004 D __ss_pager_name libss jump/data
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/error.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/error.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/error.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,109 @@
+/*
+ * 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>
+
+/*
+ * I'm assuming that com_err.h includes varargs.h, which it does
+ * (right now). There really ought to be a way for me to include the
+ * file without worrying about whether com_err.h includes it or not,
+ * but varargs.h doesn't define anything that I can use as a flag, and
+ * gcc will lose if I try to include it twice and redefine stuff.
+ */
+#if !defined(__STDC__) || !defined(ibm032) || !defined(NeXT)
+#define ss_error ss_error_external
+#endif
+
+#include <com_err.h>
+#include "ss_internal.h"
+
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#else
+#include <vararg.h>
+#endif
+
+#undef ss_error
+
+char * ss_name(sci_idx)
+ 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);
+ }
+}
+
+#ifdef HAVE_STDARG_H
+void ss_error (int sci_idx, long code, const char * fmt, ...)
+#else
+void ss_error (va_alist)
+ va_dcl
+#endif
+{
+ register char *whoami;
+ va_list pvar;
+#ifndef HAVE_STDARG_H
+ int sci_idx;
+ long code;
+ char * fmt;
+ va_start (pvar);
+ sci_idx = va_arg (pvar, int);
+ code = va_arg (pvar, long);
+ fmt = va_arg (pvar, char *);
+#else
+ va_start (pvar, fmt);
+#endif
+ whoami = ss_name (sci_idx);
+ com_err_va (whoami, code, fmt, pvar);
+ free (whoami);
+ va_end(pvar);
+}
+
+void ss_perror (sci_idx, code, msg) /* for compatibility */
+ int sci_idx;
+ long code;
+ char const *msg;
+{
+ ss_error (sci_idx, code, "%s", msg);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/execute_cmd.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/execute_cmd.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/execute_cmd.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,232 @@
+/*
+ * 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
+#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 (rqtbl, argc, argv, sci_idx)
+ 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 (sci_idx, argc, argv)
+ 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(sci_idx, argv)
+ 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 (sci_idx, line_ptr)
+ 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++;
+ system(line_ptr);
+ return 0;
+ }
+ }
+
+ /* parse it */
+ argv = ss_parse(sci_idx, line_ptr, &argc);
+ if (argc == 0)
+ return 0;
+
+ /* look it up in the request tables, execute if found */
+ ret = really_execute_command (sci_idx, argc, &argv);
+
+ free(argv);
+
+ return(ret);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/help.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/help.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/help.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,185 @@
+/*
+ * Copyright 1987, 1988 by MIT Student Information Processing Board
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose is hereby granted, provided that
+ * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. M.I.T. and the
+ * M.I.T. S.I.P.B. make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#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
+#include <sys/wait.h>
+#include "ss_internal.h"
+
+void ss_help (argc, argv, sci_idx, info_ptr)
+ 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");
+ 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(0) != child) {
+ /* do nothing if wrong pid */
+ };
+ }
+}
+
+#ifndef HAVE_DIRENT_H
+#include <sys/dir.h>
+#else
+#include <dirent.h>
+#endif
+
+void ss_add_info_dir(sci_idx, info_dir, code_ptr)
+ 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) {
+ *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(sci_idx, info_dir, code_ptr)
+ 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;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/invocation.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/invocation.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/invocation.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,87 @@
+/*
+ * 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 *)
+
+int ss_create_invocation(subsystem_name, version_string, info_ptr,
+ request_table_ptr, code_ptr)
+ const char *subsystem_name, *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);
+ 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;
+ _ss_table = table;
+ return(sci_idx);
+}
+
+void
+ss_delete_invocation(sci_idx)
+ int sci_idx;
+{
+ register ss_data *t;
+ int ignored_code;
+
+ t = ss_info(sci_idx);
+ free(t->prompt);
+ free((char *)t->rqt_tables);
+ while(t->info_dirs[0] != (char *)NULL)
+ ss_delete_info_dir(sci_idx, t->info_dirs[0], &ignored_code);
+ free((char *)t->info_dirs);
+ free((char *)t);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/list_rqs.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/list_rqs.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/list_rqs.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,108 @@
+/*
+ * 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;
+
+#ifdef lint /* "lint returns a value which is sometimes ignored" */
+#define DONT_USE(x) x=x;
+#else /* !lint */
+#define DONT_USE(x) ;
+#endif /* lint */
+
+static char const twentyfive_spaces[26] =
+ " ";
+static char const NL[2] = "\n";
+
+void ss_list_requests(argc, argv, sci_idx, info_ptr)
+ int argc;
+ char const * const * argv;
+ int sci_idx;
+ pointer info_ptr;
+{
+ register ss_request_entry *entry;
+ register char const * const *name;
+ register int spacing;
+ register ss_request_table **table;
+
+ char buffer[BUFSIZ];
+ FILE *output;
+ int fd;
+#ifdef POSIX_SIGNALS
+ sigset_t omask, igmask;
+#else
+ int mask;
+#endif
+ sigret_t (*func) PROTOTYPE((int));
+#ifndef NO_FORK
+ int waitb;
+#endif
+
+ DONT_USE(argc);
+ DONT_USE(argv);
+
+#ifdef POSIX_SIGNALS
+ sigemptyset(&igmask);
+ sigaddset(&igmask, SIGINT);
+ sigprocmask(SIG_BLOCK, &igmask, &omask);
+#else
+ mask = sigblock(sigmask(SIGINT));
+#endif
+ func = signal(SIGINT, SIG_IGN);
+ fd = ss_pager_create();
+ output = fdopen(fd, "w");
+#ifdef POSIX_SIGNALS
+ sigprocmask(SIG_SETMASK, &omask, (sigset_t *) 0);
+#else
+ sigsetmask(mask);
+#endif
+
+ 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++) {
+ register 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);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/listen.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/listen.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/listen.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,150 @@
+/*
+ * Listener loop for subsystem library libss.a.
+ *
+ * $Header: lib/ss/SCCS/s.listen.c 1.16 02/03/07 23:52:55-05:00 tytso at think.thunk.org $
+ * $Locker: <Not implemented> $
+ *
+ * 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>
+#ifdef BSD
+#include <sgtty.h>
+#endif
+
+#ifndef lint
+static char const rcs_id[] =
+ "$Header: lib/ss/SCCS/s.listen.c 1.16 02/03/07 23:52:55-05:00 tytso at think.thunk.org $";
+#endif
+
+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)
+{
+#ifdef BSD
+ /* put input into a reasonable mode */
+ struct sgttyb ttyb;
+ if (ioctl(fileno(stdin), TIOCGETP, &ttyb) != -1) {
+ if (ttyb.sg_flags & (CBREAK|RAW)) {
+ ttyb.sg_flags &= ~(CBREAK|RAW);
+ (void) ioctl(0, TIOCSETP, &ttyb);
+ }
+ }
+#endif
+ (void) fputs(current_info->prompt, stdout);
+ (void) fflush(stdout);
+}
+
+static sigret_t listen_int_handler(int sig)
+{
+ 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];
+#ifdef POSIX_SIGNALS
+ sigset_t omask, igmask;
+#else
+ int mask;
+#endif
+ int code;
+ jmp_buf old_jmpb;
+ ss_data *old_info = current_info;
+
+ current_info = info = ss_info(sci_idx);
+ sig_cont = (sigret_t (*)(int)) 0;
+ info->abort = 0;
+#ifdef POSIX_SIGNALS
+ sigemptyset(&igmask);
+ sigaddset(&igmask, SIGINT);
+ sigprocmask(SIG_BLOCK, &igmask, &omask);
+#else
+ mask = sigblock(sigmask(SIGINT));
+#endif
+ memcpy(old_jmpb, listen_jmpb, sizeof(jmp_buf));
+ sig_int = signal(SIGINT, listen_int_handler);
+ setjmp(listen_jmpb);
+#ifdef POSIX_SIGNALS
+ sigprocmask(SIG_SETMASK, &omask, (sigset_t *) 0);
+#else
+ (void) sigsetmask(mask);
+#endif
+ while(!info->abort) {
+ print_prompt(0);
+ old_sig_cont = sig_cont;
+ sig_cont = signal(SIGCONT, print_prompt);
+ if (sig_cont == print_prompt)
+ sig_cont = old_sig_cont;
+ if (fgets(input, BUFSIZ, stdin) != input) {
+ code = SS_ET_EOF;
+ (void) signal(SIGCONT, sig_cont);
+ goto egress;
+ }
+ input[BUFSIZ-1] = 0;
+
+ cp = strchr(input, '\n');
+ if (cp) {
+ *cp = '\0';
+ if (cp == input)
+ continue;
+ }
+ (void) signal(SIGCONT, sig_cont);
+
+ code = ss_execute_line (sci_idx, input);
+ if (code == SS_ET_COMMAND_NOT_FOUND) {
+ register char *c = input;
+ 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);
+ }
+ }
+ 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, const char * const *argv, int sci_idx, pointer infop)
+{
+ ss_abort_subsystem(sci_idx, 0);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/mit-sipb-copyright.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/mit-sipb-copyright.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/mit-sipb-copyright.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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.
+
+*/
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/mk_cmds.sh.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/mk_cmds.sh.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/mk_cmds.sh.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+#
+
+DIR="${DIR- at datadir@/ss}"
+SS_DIR="@SS_DIR@"
+AWK=@AWK@
+SED=@SED@
+
+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 -o ! -f $DIR/ct_c.awk ; then
+ DIR="$SS_DIR"
+# echo "Falling back to $DIR..."
+ if test ! -f "$DIR/ct_c.sed" -o ! -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 "$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 "${TMP}" "${BASE}.c"
+ exit 0
+fi
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/pager.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/pager.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/pager.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,112 @@
+/*
+ * 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.
+ */
+
+#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>
+
+static char MORE[] = "more";
+extern char *_ss_pager_name;
+extern char *getenv PROTOTYPE((const char *));
+
+/*
+ * 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(NOARGS)
+{
+ 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
+
+void ss_page_stdin()
+{
+ int i;
+ for (i = 3; i < 32; i++)
+ (void) close(i);
+ (void) signal(SIGINT, SIG_DFL);
+ {
+#ifdef POSIX_SIGNALS
+ sigset_t mask;
+
+ sigprocmask(SIG_BLOCK, 0, &mask);
+ sigdelset(&mask, SIGINT);
+ sigprocmask(SIG_SETMASK, &mask, 0);
+#else
+ int mask = sigblock(0);
+ mask &= ~sigmask(SIGINT);
+ sigsetmask(mask);
+#endif
+ }
+ if (_ss_pager_name == (char *)NULL) {
+ if ((_ss_pager_name = 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(1, buf, n);
+ }
+ exit(errno);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/parse.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/parse.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/parse.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,148 @@
+/*
+ * 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 (sci_idx, line_ptr, argc_ptr)
+ 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);
+ 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);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/prompt.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/prompt.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/prompt.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,41 @@
+/*
+ * prompt.c: Routines for retrieving and setting a prompt.
+ *
+ * $Header: lib/ss/SCCS/s.prompt.c 1.15 99/10/23 01:16:22-00:00 tytso at mit.edu $
+ * $Locker: <Not implemented> $
+ *
+ * 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"
+
+#ifdef __STDC__
+void ss_set_prompt(int sci_idx, char *new_prompt)
+#else
+void ss_set_prompt(sci_idx, new_prompt)
+ int sci_idx;
+ char *new_prompt;
+#endif
+{
+ ss_info(sci_idx)->prompt = new_prompt;
+}
+
+#ifdef __STDC__
+char *ss_get_prompt(int sci_idx)
+#else
+char *ss_get_prompt(sci_idx)
+ int sci_idx;
+#endif
+{
+ return(ss_info(sci_idx)->prompt);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/request_tbl.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/request_tbl.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/request_tbl.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,73 @@
+/*
+ * 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(sci_idx, rqtbl_ptr, position, code_ptr)
+ int sci_idx;
+ ssrt *rqtbl_ptr;
+ int position; /* 1 -> becomes second... */
+ int *code_ptr;
+{
+ register ss_data *info;
+ register int i, size;
+
+ 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 */
+ info->rqt_tables = (ssrt **)realloc((char *)info->rqt_tables,
+ (unsigned)size*sizeof(ssrt));
+ if (info->rqt_tables == (ssrt **)NULL) {
+ *code_ptr = errno;
+ return;
+ }
+ 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(sci_idx, rqtbl_ptr, code_ptr)
+ 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;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/requests.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/requests.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/requests.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,60 @@
+/*
+ * 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"
+
+#ifdef __STDC__
+#define DECLARE(name) void name(int argc,const char * const *argv, \
+ int sci_idx, void *infop)
+#else
+#define DECLARE(name) void name(argc,argv,sci_idx,infop) \
+ int argc,sci_idx;char **argv;void *infop;
+#endif
+
+/*
+ * ss_self_identify -- assigned by default to the "." request
+ */
+DECLARE(ss_self_identify)
+{
+ 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
+ */
+DECLARE(ss_subsystem_name)
+{
+ printf("%s\n", ss_info(sci_idx)->subsystem_name);
+}
+
+/*
+ * ss_subsystem_version -- print version of subsystem
+ */
+DECLARE(ss_subsystem_version)
+{
+ printf("%s\n", ss_info(sci_idx)->subsystem_version);
+}
+
+/*
+ * ss_unimplemented -- routine not implemented (should be
+ * set up as (dont_list,dont_summarize))
+ */
+DECLARE(ss_unimplemented)
+{
+ ss_perror(sci_idx, SS_ET_UNIMPLEMENTED, "");
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ss.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ss.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ss.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,99 @@
+/*
+ * 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_h
+#define _ss_h __FILE__
+
+#include <ss/ss_err.h>
+
+#ifdef __STDC__
+#define __SS_CONST const
+#define __SS_PROTO (int, const char * const *, int, void *)
+#else
+#define __SS_CONST
+#define __SS_PROTO ()
+#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
+#ifdef __STDC__
+char *ss_name(int sci_idx);
+void ss_error (int, long, char const *, ...);
+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);
+#else
+char *ss_name();
+void ss_error ();
+void ss_perror ();
+int ss_create_invocation();
+void ss_delete_invocation();
+int ss_listen();
+int ss_execute_line();
+void ss_add_request_table();
+void ss_delete_request_table();
+void ss_abort_subsystem();
+void ss_quit();
+void ss_self_identify();
+void ss_subsystem_name();
+void ss_subsystem_version();
+void ss_unimplemented();
+void ss_set_prompt;
+char *ss_get_prompt;
+#endif
+extern ss_request_table ss_std_requests;
+#endif /* _ss_h */
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ss_err.et
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ss_err.et 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ss_err.et 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ss_internal.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ss_internal.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/ss_internal.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,131 @@
+/*
+ * 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>
+
+#ifdef __STDC__
+
+#define NOARGS void
+#define PROTOTYPE(p) p
+typedef void * pointer;
+
+#else
+
+#define NOARGS
+#define const
+#define volatile
+#define PROTOTYPE(p) ()
+typedef char * pointer;
+
+#endif /* not __STDC__ */
+
+#include "ss.h"
+
+#if defined(__GNUC__)
+#define LOCAL_ALLOC(x) __builtin_alloca(x)
+#define LOCAL_FREE(x)
+#else
+#if defined(vax)
+#define LOCAL_ALLOC(x) alloca(x)
+#define LOCAL_FREE(x)
+extern pointer alloca PROTOTYPE((unsigned));
+#else
+#if defined(__HIGHC__) /* Barf! */
+pragma on(alloca);
+#define LOCAL_ALLOC(x) alloca(x)
+#define LOCAL_FREE(x)
+extern pointer alloca PROTOTYPE((unsigned));
+#else
+/* no alloca? */
+#define LOCAL_ALLOC(x) malloc(x)
+#define LOCAL_FREE(x) free(x)
+#endif
+#endif
+#endif /* LOCAL_ALLOC stuff */
+
+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;
+ /* 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 PROTOTYPE((int sci_idx, char *info_dir,
+ int *code_ptr));
+void ss_delete_info_dir PROTOTYPE((int sci_idx, char *info_dir,
+ int *code_ptr));
+int ss_execute_line PROTOTYPE((int sci_idx, char *line_ptr));
+char **ss_parse PROTOTYPE((int sci_idx, char *line_ptr, int *argc_ptr));
+ss_abbrev_info *ss_abbrev_initialize PROTOTYPE((char *, int *));
+void ss_page_stdin(NOARGS);
+void ss_list_requests PROTOTYPE((int, char const * const *, int, pointer));
+int ss_execute_command PROTOTYPE((int sci_idx, char *argv[]));
+int ss_pager_create(NOARGS);
+
+extern ss_data **_ss_table;
+extern char *ss_et_msgs[];
+
+#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 */
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/std_rqs.ct
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/std_rqs.ct 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/std_rqs.ct 2006-07-10 20:52:46 UTC (rev 35)
@@ -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;
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/test_ss.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/test_ss.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/ss/test_ss.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,133 @@
+/*
+ *------------------------------------------------------------------
+ *
+ * $Source: /usr/src/e2fsprogs/BK/e2fsprogs/lib/ss/SCCS/s.test_ss.c $
+ * $Revision: 1.13 $
+ * $Date: 97/04/29 21:26:37-00:00 $
+ * $State: <unknown> $
+ * $Author: tytso at mit.edu $
+ * $Locker: <Not implemented> $
+ *
+ * $Log: <Not implemented> $
+ * Revision 1.13 1997/04/29 21:26:37 tytso
+ * Checkin of e2fsprogs 1.10
+ *
+ * Revision 1.1 1993/06/03 12:31:25 tytso
+ * Initial revision
+ *
+ * Revision 1.1 1991/12/21 16:41:47 eichin
+ * Initial revision
+ *
+ * Revision 1.1 1991/12/21 11:13:39 eichin
+ * Initial revision
+ *
+ * Revision 1.2 89/01/25 07:52:27 raeburn
+ * *** empty log message ***
+ *
+ * Revision 1.1 88/01/23 15:50:26 raeburn
+ * Initial revision
+ *
+ *
+ *------------------------------------------------------------------
+ */
+
+#ifndef lint
+static char const rcsid_test_c[] =
+ "$Header: lib/ss/SCCS/s.test_ss.c 1.13 97/04/29 21:26:37-00:00 tytso at mit.edu $";
+#endif /* lint */
+
+#include <stdio.h>
+#include "ss.h"
+
+extern ss_request_table test_cmds;
+
+#define TRUE 1
+#define FALSE 0
+
+static char def_subsystem_name[5] = "test";
+static char version [4] = "1.0";
+extern void ss_listen();
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+ int code;
+ char *argv0 = argv[0];
+ char *initial_request = (char *)NULL;
+ int quit = FALSE; /* quit after processing request */
+ int sci_idx;
+ char *subsystem_name;
+
+ subsystem_name = def_subsystem_name;
+
+ for (; *argv; ++argv, --argc) {
+ printf("checking arg: %s\n", *argv);
+ if (!strcmp(*argv, "-prompt")) {
+ if (argc == 1) {
+ fprintf(stderr,
+ "No argument supplied with -prompt\n");
+ exit(1);
+ }
+ argc--; argv++;
+ subsystem_name = *argv;
+ }
+ else if (!strcmp(*argv, "-request") || !strcmp(*argv, "-rq")) {
+ if (argc == 1) {
+ fprintf(stderr,
+ "No string supplied with -request.\n");
+ exit(1);
+ }
+ argc--; argv++;
+ initial_request = *argv;
+ }
+ else if (!strcmp(*argv, "-quit"))
+ quit = TRUE;
+ else if (!strcmp(*argv, "-no_quit"))
+ quit = FALSE;
+ else if (**argv == '-') {
+ fprintf(stderr, "Unknown control argument %s\n",
+ *argv);
+ fprintf(stderr,
+ "Usage: %s [gateway] [ -prompt name ] [ -request name ] [ -quit ]\n",
+ argv0);
+ 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);
+ }
+
+ if (!quit)
+ printf("test version %s. Type '?' for a list of commands.\n\n",
+ version);
+
+ if (initial_request != (char *)NULL) {
+ code = ss_execute_line(sci_idx, initial_request);
+ if (code != 0)
+ ss_perror(sci_idx, code, initial_request);
+ }
+ if (!quit || code)
+ (void) ss_listen (sci_idx, &code);
+ exit(0);
+}
+
+
+void test_cmd (argc, argv)
+ int argc;
+ char **argv;
+{
+ while (++argv, --argc)
+ fputs(*argv, stdout);
+ putchar ('\n');
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,12 @@
+Makefile
+libuuid.3
+uuid_clear.3
+uuid_compare.3
+uuid_copy.3
+uuid_generate.3
+uuid_is_null.3
+uuid_unparse.3
+uuid_parse.3
+uuid_time.3
+tst_uuid
+uuid_time
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,356 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-02-24 Theodore Tso <tytso at mit.edu>
+
+ * Makefile.in (install): Install hard links to man pages for
+ uuid_generate_random and uuid_generate_time. Remove
+ any compressed man pages before installing the man pages.
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-10 Theodore Tso <tytso at mit.edu>
+
+ * compare.c (uuid_compare), copy.c (uuid_copy),
+ isnull.c (uuid_is_null), pack.c (uuid_pack),
+ parse.c (uuid_parse), unpack.c (uuid_unpack),
+ unparse.c (uuid_unparse), uuid.h, uuidP.h,
+ uuid_time.c (uuid_time, uuid_type, uuid_variant):
+ Use const for pointer variables that we don't modify. Add
+ the appropriate ifdef's in uuid.h to make it be C++ friendly.
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-21 Theodore Tso <tytso at valinux.com>
+
+ * uuid.h: Add protection against multiple inclusion
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-06-01 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in, uuidP.h: Move include/asm/types.h.in to
+ lib/ext2fs/ext2_types.h.in.
+
+2001-06-01 Theodore Tso <tytso at valinux.com>
+
+ * unpack.c, unparse.c, uuid_time.c: Update files to be under the
+ LGPL (that somehow were missed when libuuid was converted
+ to use the LGPL). Whoops.
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2001-05-14 Theodore Tso <tytso at valinux.com>
+
+ * tst_uuid.c, uuid_time.c: Remove unneeded #include of ext2_fs.h
+
+2001-05-12 Theodore Tso <tytso at valinux.com>
+
+ * libuuid.3.in, uuid_clear.3.in, uuid_compare.3.in, uuid_copy.3.in,
+ uuid_generate.3.in, uuid_is_null.3.in, uuid_parse.3.in,
+ uuid_time.3.in, uuid_unparse.3.in: Update URL location of
+ e2fsprogs package.
+
+2001-05-01 Theodore Tso <tytso at valinux.com>
+
+ * parse.c, compare.c: Include string.h to fix gcc -Wall
+ complaints.
+
+ * gen_uuid.c: Define _SVID_SOURCE to avoid gcc -Wall errors
+ because some required structures wouldn't be otherwise
+ defined. Fix a minor gcc -Wall nit in the declaration of
+ get_random_fd().
+
+2001-01-12 Theodore Ts'o <tytso at valinux.com>
+
+ * uuid_time.c (main), tst_uuid.c (main): Fix gcc -Wall complaints.
+
+ * uuid.h, copy.c (uuid_copy): Change arguments to make it
+ clear which argument is the source and which is the
+ destination.
+
+ * gen_uuid.c (get_random_fd): Use gettimeofday to seed the PRNG,
+ so we can take advantage of tv_usec to do (slightly)
+ better at seeding it.
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+2000-07-07 Theodore Ts'o <tytso at valinux.com>
+
+ * Makefile.in (uuid_time): Fix compilation rule so that
+ uuid_time.o doesn't get bashed in order to build the
+ command-line version of uuid_time.
+
+2000-07-04 Theodore Ts'o <tytso at valinux.com>
+
+ * Makefile.in: Remove explicit link of -lc in the shared library.
+ (It shouldn't be necessary, and is harmful in some cases).
+
+2000-06-12 Theodore Ts'o <tytso at valinux.com>
+
+ * gen_uuid.c (get_random_bytes): Use O_NONBLOCK when trying to
+ open /dev/random. Break out the /dev/random
+ initialization code into a get_random_fd() function, and
+ use that function in uuid_generate() to determine whether
+ to use uuid_generate_random() or uuid_generate_time().
+
+2000-05-25 <tytso at snap.thunk.org>
+
+ * Makefile: Add hack dependency rule so that parallel makes work
+ correctly.
+
+2000-04-07 Theodore Ts'o <tytso at valinux.com>
+
+ * clear.c, compare.c, copy.c, gen_uuid.c, isnull.c, pack.c,
+ parse.c, uuid.h, uuidP.h: Changed copyright to be the
+ LGPL.
+
+Thu Apr 6 17:38:58 2000 Theodore Y. Ts'o <tytso at signal.thunk.org>
+
+ * Makefile.in (uuid_time): Compile uuid_time in two steps (first
+ create .o, then link it against the libraries) to work
+ around bug in a.out linker.
+
+ * dll/jump.funcs, dll/jump.import, dll/jump.params: Update a.out
+ shared library control files to reflect new added files.
+
+2000-04-03 Theodore Ts'o <tytso at valinux.com>
+
+ * gen_uuid.c (get_clock): Fix bug where the last timeval wasn't
+ getting set, causing potentially duplicate UUID's to be
+ generated.
+
+2000-03-12 Theodore Ts'o <tytso at valinux.com>
+
+ * gen_uuid.c (get_random_bytes): Make more paranoid about
+ misbehaving /dev/urandom. If we get a return of zero
+ without an error more than 8 times in a row, we break out
+ and return an error. Also, if /dev/urandom doesn't exist,
+ try /dev/random.
+
+2000-01-18 Theodore Ts'o <tytso at valinux.com>
+
+ * Makefile.in: Since LIBUUID can sometimes include
+ "-lsocket" we need a separate DEPLIBUUID that can be used
+ in Makefile's dependency rules.
+
+1999-11-19 <tytso at valinux.com>
+
+ * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
+ the source directory.
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-26 <tytso at valinux.com>
+
+ * uuid_time.c (variant_string): Declare to be static to avoid gcc
+ warnings.
+
+ * uuid.h: Add function prototypes for uuid_generate_random() and
+ uuid_generate_time().
+
+1999-10-25 <tytso at valinux.com>
+
+ * gen_uuid_nt.c (uuid_generate): W2K strikes again! An
+ incompatible interface change means we need to detect
+ whether the code is running on an NT4 or NT5 system.
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-10-21 <tytso at valinux.com>
+
+ * uuid_generate.8.in: Update man page to use a more standard
+ format (bold option flags and italicized variables), as
+ suggested by Andreas Dilger (adilger at enel.ucalgary.ca)
+
+1999-09-24 <tytso at valinux.com>
+
+ * gen_uuid_nt.c: New file which creates a UUID under Windows NT.
+
+1999-07-18 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.15
+
+1999-05-17 <tytso at rsts-11.mit.edu>
+
+ * gen_uuid.c (get_random_bytes): Use a while loop when reading
+ from /dev/urandom so that if we get interrupted while
+ reading the right thing happens.
+ (uuid_generate_random): Add new function which uses the
+ new UUID format which uses 122 random bits to form the
+ 128-bit UUID.
+ (uuid_generate): Rename the old uuid_generate to be
+ uuid_generate_time, and create a new uuid_generate
+ function which calls either uuid_generate_random or
+ uuid_genereate_time depending on whether /dev/urandom is
+ present.
+
+ * uuid_generate.3.in: Update to reflect changesin uuid_generate
+ and its two new variants.
+
+ * tst_uuid.c: Updated to test new uuid_generate functions, and to
+ reflect new semantics of uuid_compare. Added tests to
+ make sure the UUID type and variant created by UUID
+ generate is correct.
+
+ * uuid_time.c (uuid_variant, uuid_type): Added new functions to
+ return the UUID variant and type information. The
+ debugging program now prints the UUID variant and type,
+ and warns if the unparsed time information is likely to be
+ incorrect.
+
+ * uuid_parse.3.in, libuuid.3.in: Miscellaneous text cleanups.
+
+1999-05-03 <tytso at rsts-11.mit.edu>
+
+ * compare.c (uuid_compare): Change sense of uuid_compare so that
+ its return values match that of memcpy and the
+ uuid_compare() found in Paul Leach's internet-draft.
+
+1999-03-11 Andreas Dilger <adilger at enel.ucalgary.ca>
+
+ * Created man pages for libuuid functions.
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-12-04 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Update version numbers of the UUID shared library,
+ since we've added a new function (uuid_time()).
+
+ * uuid_time.c: New file which returns the time field of a UUID.
+ (Good for debugging purposes)
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+1998-06-25 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * tst_uuid.c (main): Fixed bogus declaration of the main's argv
+ parameter.
+
+1998-04-26 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * uuidP.h: Use asm/types.h instead of linux/types.h to avoid a
+ problem caused by glibc hack to prevent linux/types.h from
+ being included.
+
+1998-03-30 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Change to use new installation directory variables
+ convention. Fix uninstall rules to take $(DESTDIR) into
+ account.
+
+Sun Mar 8 22:17:59 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * gen_uuid.c (get_node_id): Use char * instead of caddr_t, which
+ doesn't always exist for glibc.
+
+Tue Oct 14 21:48:16 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * gen_uuid.c: Use clock_reg instead of clock, since clock
+ conflicts with a header file declaration.
+
+Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.11
+
+Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * Release of E2fsprogs version 1.10
+
+Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.09
+
+Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.08
+
+Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * Release of E2fsprogs version 1.07
+
+Sun Mar 2 16:45:36 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (ELF_VERSION): Change version to be 1.1
+
+Thu Feb 6 23:08:07 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * gen_uuid.c (uuid_generate): Set Multicast bit when picking a
+ random node_id, to prevent conflicts with IEEE 802
+ addresses obtained from network cards.
+
+Wed Jan 1 23:51:09 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * unpack.c, pack.c: Include string.h, since we use memcpy().
+
+Tue Dec 3 13:05:11 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * parse.c: Add #include of ctype.h and stdlib.h, to pull in the
+ required prototypes.
+
+Fri Oct 11 17:15:10 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (DLL_ADDRESS): Updated DLL address for libuuid.
+
+Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.06
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
+Tue Aug 27 16:50:43 1996 Miles Bader <miles at gnu.ai.mit.edu>
+
+ * uuid/gen_uuid.c [HAVE_NET_IF_H] <net/if.h>: Include guarded.
+ [HAVE_NETINET_IN_H] <netinet/in.h>: Include guarded.
+ (get_node_id): Surround bulk of function with #ifdef HAVE_NET_IF_H.
+
+Tue Aug 27 16:50:16 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * gen_uuid.c (get_node_id): Add a specific ifdef for the HURD,
+ since it is broken w.r.t getting hardware addresses.
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/Makefile.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/Makefile.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/Makefile.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,191 @@
+# Makefile for the second extended file system utility functions
+#
+# Copyright (C) 1993 Remy Card (card at 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/uuid
+INSTALL = @INSTALL@
+
+ at MCONFIG@
+
+all::
+
+SMANPAGES= libuuid.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
+
+DLL_ADDRESS = 0x67900000
+DLL_JUMPSIZE = 0x1000
+DLL_GOTSIZE = 0x1000
+DLL_VERSION = 0.1
+DLL_IMAGE = libuuid
+DLL_STUB = libuuid
+DLL_MYDIR = uuid
+DLL_INSTALL_DIR = $(root_libdir)
+
+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)
+
+ at MAKEFILE_LIBRARY@
+ at MAKEFILE_DLL@
+ at MAKEFILE_ELF@
+ at MAKEFILE_BSDLIB@
+ at MAKEFILE_PROFILE@
+ at MAKEFILE_CHECKER@
+
+.c.o:
+ $(CC) $(ALL_CFLAGS) -c $< -o $@
+ at PROFILE_CMT@ $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
+ at CHECKER_CMT@ $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
+ at DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) $(ALL_CFLAGS) \
+ at DLL_CMT@ -o jump/$*.o -c $<)
+ at ELF_CMT@ $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
+ at BSDLIB_CMT@ $(CC) $(ALL_CFLAGS) -fpic -o pic/$*.o -c $<
+
+all:: tst_uuid uuid_time $(SMANPAGES)
+
+tst_uuid.o: $(srcdir)/tst_uuid.c
+ $(CC) $(ALL_CFLAGS) -c $(srcdir)/tst_uuid.c -o tst_uuid.o
+
+tst_uuid: tst_uuid.o $(DEPLIBUUID)
+ $(CC) $(ALL_LDFLAGS) -o tst_uuid tst_uuid.o $(LIBUUID)
+
+uuid_time: $(srcdir)/uuid_time.c $(DEPLIBUUID)
+ $(CC) $(ALL_CFLAGS) -DDEBUG -o uuid_time $(srcdir)/uuid_time.c \
+ $(LIBUUID)
+
+libuuid.3: $(DEP_SUBSTITUTE) $(srcdir)/libuuid.3.in
+ $(SUBSTITUTE) $(srcdir)/libuuid.3.in libuuid.3
+
+uuid_clear.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_clear.3.in
+ $(SUBSTITUTE) $(srcdir)/uuid_clear.3.in uuid_clear.3
+
+uuid_compare.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_compare.3.in
+ $(SUBSTITUTE) $(srcdir)/uuid_compare.3.in uuid_compare.3
+
+uuid_copy.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_copy.3.in
+ $(SUBSTITUTE) $(srcdir)/uuid_copy.3.in uuid_copy.3
+
+uuid_generate.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_generate.3.in
+ $(SUBSTITUTE) $(srcdir)/uuid_generate.3.in uuid_generate.3
+
+uuid_is_null.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_is_null.3.in
+ $(SUBSTITUTE) $(srcdir)/uuid_is_null.3.in uuid_is_null.3
+
+uuid_parse.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_parse.3.in
+ $(SUBSTITUTE) $(srcdir)/uuid_parse.3.in uuid_parse.3
+
+uuid_time.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_time.3.in
+ $(SUBSTITUTE) $(srcdir)/uuid_time.3.in uuid_time.3
+
+uuid_unparse.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_unparse.3.in
+ $(SUBSTITUTE) $(srcdir)/uuid_unparse.3.in uuid_unparse.3
+
+installdirs::
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(includedir)/uuid $(DESTDIR)$(man3dir)
+
+install:: all installdirs
+ $(INSTALL_DATA) libuuid.a $(DESTDIR)$(libdir)/libuuid.a
+ $(CHMOD) 644 $(DESTDIR)$(libdir)/libuuid.a
+ -$(RANLIB) $(DESTDIR)$(libdir)/libuuid.a
+ $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libuuid.a
+ $(INSTALL_DATA) $(srcdir)/uuid.h $(DESTDIR)$(includedir)/uuid/uuid.h
+ for i in $(SMANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man3dir)/$$i.gz; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man3dir)/$$i; \
+ done
+ $(RM) -f $(DESTDIR)$(man3dir)/uuid_generate_random.3.gz \
+ $(DESTDIR)$(man3dir)/uuid_generate_time.3.gz
+ $(LN) -f $(DESTDIR)$(man3dir)/uuid_generate.3 $(DESTDIR)$(man3dir)/uuid_generate_random.3
+ $(LN) -f $(DESTDIR)$(man3dir)/uuid_generate.3 $(DESTDIR)$(man3dir)/uuid_generate_time.3
+
+uninstall::
+ $(RM) -f $(DESTDIR)$(libdir)/libuuid.a
+ 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/*
+ $(RM) -f ../libuuid.a ../libuuid_p.a tst_uuid uuid_time $(SMANPAGES)
+
+check:: tst_uuid
+ LD_LIBRARY_PATH=$(LIB) ./tst_uuid
+
+mostlyclean:: clean
+distclean:: clean
+ $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
+
+#
+# Hack to parallel makes recognize dependencies correctly.
+#
+../../lib/libuuid.a: libuuid.a
+../../lib/libuuid.so: image
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+clear.o: $(srcdir)/clear.c $(srcdir)/uuidP.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/uuid.h
+compare.o: $(srcdir)/compare.c $(srcdir)/uuidP.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/uuid.h
+copy.o: $(srcdir)/copy.c $(srcdir)/uuidP.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/uuid.h
+gen_uuid.o: $(srcdir)/gen_uuid.c $(srcdir)/uuidP.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/uuid.h
+isnull.o: $(srcdir)/isnull.c $(srcdir)/uuidP.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/uuid.h
+pack.o: $(srcdir)/pack.c $(srcdir)/uuidP.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/uuid.h
+parse.o: $(srcdir)/parse.c $(srcdir)/uuidP.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/uuid.h
+unpack.o: $(srcdir)/unpack.c $(srcdir)/uuidP.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/uuid.h
+unparse.o: $(srcdir)/unparse.c $(srcdir)/uuidP.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/uuid.h
+uuid_time.o: $(srcdir)/uuid_time.c $(srcdir)/uuidP.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/uuid.h
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/clear.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/clear.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/clear.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,20 @@
+/*
+ * clear.c -- Clear a UUID
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU
+ * Library General Public License.
+ * %End-Header%
+ */
+
+#include "string.h"
+
+#include "uuidP.h"
+
+void uuid_clear(uuid_t uu)
+{
+ memset(uu, 0, 16);
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/compare.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/compare.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/compare.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,32 @@
+/*
+ * 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%
+ * This file may be redistributed under the terms of the GNU
+ * Library General Public License.
+ * %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);
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/configure.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/configure.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/configure.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -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)
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/copy.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/copy.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/copy.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,22 @@
+/*
+ * copy.c --- copy UUIDs
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU
+ * Library General Public License.
+ * %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++;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.funcs
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.funcs 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.funcs 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,14 @@
+00000000 T _uuid_clear libuuid clear
+00000000 T _uuid_compare libuuid compare
+00000000 T _uuid_copy libuuid copy
+00000000 T _uuid_generate libuuid gen_uuid
+00000000 T _uuid_is_null libuuid isnull
+00000000 T _uuid_pack libuuid pack
+00000000 T _uuid_parse libuuid parse
+00000000 T _uuid_unpack libuuid unpack
+00000000 T _uuid_unparse libuuid unparse
+00000000 T _uuid_generate_time libuuid gen_uuid
+00000000 T _uuid_generate_random libuuid gen_uuid
+00000000 T _uuid_time libuuid uuid_time
+00000000 T _uuid_type libuuid uuid_time
+00000000 T _uuid_variant libuuid uuid_time
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.ignore
===================================================================
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.import
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.import 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.import 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,163 @@
+/usr/lib/libc.sa(__libc.o):6008f0b0 A _AL
+/usr/lib/libc.sa(__libc.o):6008f198 A _AL_PARM
+/usr/lib/libc.sa(__libc.o):6008f060 A _AM
+/usr/lib/libc.sa(__libc.o):6008f0b4 A _BC
+/usr/lib/libc.sa(__libc.o):6008f064 A _BS
+/usr/lib/libc.sa(__libc.o):6008f0bc A _BT
+/usr/lib/libc.sa(__libc.o):6008f068 A _CA
+/usr/lib/libc.sa(__libc.o):6008f0c0 A _CD
+/usr/lib/libc.sa(__libc.o):6008f0c4 A _CE
+/usr/lib/libc.sa(__libc.o):6008f0c8 A _CL
+/usr/lib/libc.sa(__libc.o):6008f0cc A _CM
+/usr/lib/libc.sa(__libc.o):6008f048 A _COLS
+/usr/lib/libc.sa(__libc.o):6008f0d0 A _CR
+/usr/lib/libc.sa(__libc.o):6008f0d4 A _CS
+/usr/lib/libc.sa(__libc.o):6008f06c A _DA
+/usr/lib/libc.sa(__libc.o):6008f070 A _DB
+/usr/lib/libc.sa(__libc.o):6008f0d8 A _DC
+/usr/lib/libc.sa(__libc.o):6008f0dc A _DL
+/usr/lib/libc.sa(__libc.o):6008f19c A _DL_PARM
+/usr/lib/libc.sa(__libc.o):6008f0e0 A _DM
+/usr/lib/libc.sa(__libc.o):6008f0e4 A _DO
+/usr/lib/libc.sa(__libc.o):6008f1a4 A _DOWN_PARM
+/usr/lib/libc.sa(__libc.o):6008f03c A _Def_term
+/usr/lib/libc.sa(__libc.o):6008f0e8 A _ED
+/usr/lib/libc.sa(__libc.o):6008f0ec A _EI
+/usr/lib/libc.sa(__libc.o):6008f074 A _EO
+/usr/lib/libc.sa(__libc.o):6008f1b8 A _GT
+/usr/lib/libc.sa(__libc.o):6008f078 A _HC
+/usr/lib/libc.sa(__libc.o):6008f118 A _HO
+/usr/lib/libc.sa(__libc.o):6008f07c A _HZ
+/usr/lib/libc.sa(__libc.o):6008f11c A _IC
+/usr/lib/libc.sa(__libc.o):6008f120 A _IM
+/usr/lib/libc.sa(__libc.o):6008f080 A _IN
+/usr/lib/libc.sa(__libc.o):6008f124 A _IP
+/usr/lib/libc.sa(__libc.o):6008f0f0 A _K0
+/usr/lib/libc.sa(__libc.o):6008f0f4 A _K1
+/usr/lib/libc.sa(__libc.o):6008f0f8 A _K2
+/usr/lib/libc.sa(__libc.o):6008f0fc A _K3
+/usr/lib/libc.sa(__libc.o):6008f100 A _K4
+/usr/lib/libc.sa(__libc.o):6008f104 A _K5
+/usr/lib/libc.sa(__libc.o):6008f108 A _K6
+/usr/lib/libc.sa(__libc.o):6008f10c A _K7
+/usr/lib/libc.sa(__libc.o):6008f110 A _K8
+/usr/lib/libc.sa(__libc.o):6008f114 A _K9
+/usr/lib/libc.sa(__libc.o):6008f128 A _KD
+/usr/lib/libc.sa(__libc.o):6008f12c A _KE
+/usr/lib/libc.sa(__libc.o):6008f130 A _KH
+/usr/lib/libc.sa(__libc.o):6008f134 A _KL
+/usr/lib/libc.sa(__libc.o):6008f138 A _KR
+/usr/lib/libc.sa(__libc.o):6008f13c A _KS
+/usr/lib/libc.sa(__libc.o):6008f140 A _KU
+/usr/lib/libc.sa(__libc.o):6008f1a8 A _LEFT_PARM
+/usr/lib/libc.sa(__libc.o):6008f044 A _LINES
+/usr/lib/libc.sa(__libc.o):6008f144 A _LL
+/usr/lib/libc.sa(__libc.o):6008f148 A _MA
+/usr/lib/libc.sa(__libc.o):6008f300 A _MCAppPath
+/usr/lib/libc.sa(__libc.o):6008f084 A _MI
+/usr/lib/libc.sa(__libc.o):6008f088 A _MS
+/usr/lib/libc.sa(__libc.o):6008f030 A _My_term
+/usr/lib/libc.sa(__libc.o):6008f08c A _NC
+/usr/lib/libc.sa(__libc.o):6008f14c A _ND
+/usr/lib/libc.sa(__libc.o):6008f150 A _NL
+/usr/lib/libc.sa(__libc.o):6008f1bc A _NONL
+/usr/lib/libc.sa(__libc.o):6008f090 A _NS
+/usr/lib/libc.sa(__libc.o):6008f094 A _OS
+/usr/lib/libc.sa(__libc.o):6008f1b0 A _PC
+/usr/lib/libc.sa(__libc.o):6008f154 A _RC
+/usr/lib/libc.sa(__libc.o):6008f1ac A _RIGHT_PARM
+/usr/lib/libc.sa(__libc.o):6008f158 A _SC
+/usr/lib/libc.sa(__libc.o):6008f15c A _SE
+/usr/lib/libc.sa(__libc.o):6008f160 A _SF
+/usr/lib/libc.sa(__libc.o):6008f164 A _SO
+/usr/lib/libc.sa(__libc.o):6008f168 A _SR
+/usr/lib/libc.sa(__libc.o):6008f16c A _TA
+/usr/lib/libc.sa(__libc.o):6008f170 A _TE
+/usr/lib/libc.sa(__libc.o):6008f174 A _TI
+/usr/lib/libc.sa(__libc.o):6008f178 A _UC
+/usr/lib/libc.sa(__libc.o):6008f17c A _UE
+/usr/lib/libc.sa(__libc.o):6008f098 A _UL
+/usr/lib/libc.sa(__libc.o):6008f180 A _UP
+/usr/lib/libc.sa(__libc.o):6008f1c0 A _UPPERCASE
+/usr/lib/libc.sa(__libc.o):6008f1a0 A _UP_PARM
+/usr/lib/libc.sa(__libc.o):6008f188 A _US
+/usr/lib/libc.sa(__libc.o):6008f18c A _VB
+/usr/lib/libc.sa(__libc.o):6008f194 A _VE
+/usr/lib/libc.sa(__libc.o):6008f190 A _VS
+/usr/lib/libc.sa(__libc.o):6008f09c A _XB
+/usr/lib/libc.sa(__libc.o):6008f0a0 A _XN
+/usr/lib/libc.sa(__libc.o):6008f0a8 A _XS
+/usr/lib/libc.sa(__libc.o):6008f0a4 A _XT
+/usr/lib/libc.sa(__libc.o):6008f0ac A _XX
+/usr/lib/libc.sa(__libc.o):6008f2a4 A __IO_file_jumps
+/usr/lib/libc.sa(__libc.o):6008f1f4 A __IO_list_all
+/usr/lib/libc.sa(__libc.o):6008f2a8 A __IO_proc_jumps
+/usr/lib/libc.sa(__libc.o):6008f1ec A __IO_stderr_
+/usr/lib/libc.sa(__libc.o):6008f1e4 A __IO_stdin_
+/usr/lib/libc.sa(__libc.o):6008f1e8 A __IO_stdout_
+/usr/lib/libc.sa(__libc.o):6008f2ac A __IO_str_jumps
+/usr/lib/libc.sa(__libc.o):6008f214 A ____brk_addr
+/usr/lib/libc.sa(__libc.o):6008f01c A ___ctype_b
+/usr/lib/libc.sa(__libc.o):6008f020 A ___ctype_tolower
+/usr/lib/libc.sa(__libc.o):6008f024 A ___ctype_toupper
+/usr/lib/libc.sa(__libc.o):6008f1fc A ___environ
+/usr/lib/libc.sa(__libc.o):6008f250 A ___exit_funcs
+/usr/lib/libc.sa(__libc.o):6008f2f0 A ___glob_closedir_hook
+/usr/lib/libc.sa(__libc.o):6008f2f4 A ___glob_opendir_hook
+/usr/lib/libc.sa(__libc.o):6008f2f8 A ___glob_readdir_hook
+/usr/lib/libc.sa(__libc.o):6008f278 A ___ttyname
+/usr/lib/libc.sa(__libc.o):6008f238 A __collate_info
+/usr/lib/libc.sa(__libc.o):6008f23c A __ctype_info
+/usr/lib/libc.sa(__libc.o):6008f028 A __echoit
+/usr/lib/libc.sa(__libc.o):6008f034 A __endwin
+/usr/lib/libc.sa(__libc.o):6008f288 A __gdbm_fetch_val
+/usr/lib/libc.sa(__libc.o):6008f280 A __gdbm_file
+/usr/lib/libc.sa(__libc.o):6008f284 A __gdbm_memory
+/usr/lib/libc.sa(__libc.o):6008f240 A __monetary_info
+/usr/lib/libc.sa(__libc.o):6008f234 A __null_auth
+/usr/lib/libc.sa(__libc.o):6008f244 A __numeric_info
+/usr/lib/libc.sa(__libc.o):6008f2ec A __obstack
+/usr/lib/libc.sa(__libc.o):6008f1c8 A __pfast
+/usr/lib/libc.sa(__libc.o):6008f02c A __rawmode
+/usr/lib/libc.sa(__libc.o):6008f1dc A __res
+/usr/lib/libc.sa(__libc.o):6008f04c A __res_iflg
+/usr/lib/libc.sa(__libc.o):6008f050 A __res_lflg
+/usr/lib/libc.sa(__libc.o):6008f270 A __res_opcodes
+/usr/lib/libc.sa(__libc.o):6008f274 A __res_resultcodes
+/usr/lib/libc.sa(__libc.o):6008f248 A __response_info
+/usr/lib/libc.sa(__libc.o):6008f2fc A __sigintr
+/usr/lib/libc.sa(__libc.o):6008f00c A __sys_errlist
+/usr/lib/libc.sa(__libc.o):6008f010 A __sys_nerr
+/usr/lib/libc.sa(__libc.o):6008f014 A __sys_siglist
+/usr/lib/libc.sa(__libc.o):6008f24c A __time_info
+/usr/lib/libc.sa(__libc.o):6008f05c A __tty
+/usr/lib/libc.sa(__libc.o):6008f040 A __tty_ch
+/usr/lib/libc.sa(__libc.o):6008f1cc A __unctrl
+/usr/lib/libc.sa(__libc.o):6008f27c A __win
+/usr/lib/libc.sa(__libc.o):6008f058 A _curscr
+/usr/lib/libc.sa(__libc.o):6008f228 A _daylight
+/usr/lib/libc.sa(__libc.o):6008f200 A _errno
+/usr/lib/libc.sa(__libc.o):6008f1d0 A _gdbm_errno
+/usr/lib/libc.sa(__libc.o):6008f28c A _gdbm_version
+/usr/lib/libc.sa(__libc.o):6008f008 A _h_errlist
+/usr/lib/libc.sa(__libc.o):6008f1d8 A _h_errno
+/usr/lib/libc.sa(__libc.o):6008f2a0 A _h_nerr
+/usr/lib/libc.sa(__libc.o):6008f1c4 A _normtty
+/usr/lib/libc.sa(__libc.o):6008f204 A _optarg
+/usr/lib/libc.sa(__libc.o):6008f20c A _opterr
+/usr/lib/libc.sa(__libc.o):6008f208 A _optind
+/usr/lib/libc.sa(__libc.o):6008f2e4 A _optopt
+/usr/lib/libc.sa(__libc.o):6008f218 A _ospeed
+/usr/lib/libc.sa(__libc.o):6008f26c A _re_max_failures
+/usr/lib/libc.sa(__libc.o):6008f210 A _re_syntax_options
+/usr/lib/libc.sa(__libc.o):6008f1e0 A _rexecoptions
+/usr/lib/libc.sa(__libc.o):6008f230 A _rpc_createerr
+/usr/lib/libc.sa(__libc.o):6008f25c A _stderr
+/usr/lib/libc.sa(__libc.o):6008f254 A _stdin
+/usr/lib/libc.sa(__libc.o):6008f258 A _stdout
+/usr/lib/libc.sa(__libc.o):6008f054 A _stdscr
+/usr/lib/libc.sa(__libc.o):6008f2e8 A _svc_fdset
+/usr/lib/libc.sa(__libc.o):6008f224 A _timezone
+/usr/lib/libc.sa(__libc.o):6008f21c A _tputs_baud_rate
+/usr/lib/libc.sa(__libc.o):6008f038 A _ttytype
+/usr/lib/libc.sa(__libc.o):6008f220 A _tzname
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.params
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.params 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.params 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,6 @@
+Name=libuuid
+Text=0x67900000
+Data=0x00000000
+Jump=0x00001000
+GOT=0x00001000
+Version=0.1.0
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.undefs
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.undefs 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.undefs 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+67903014 D __NEEDS_SHRLIB_libc_4
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/dll/jump.vars
===================================================================
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/gen_uuid.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/gen_uuid.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/gen_uuid.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,276 @@
+/*
+ * gen_uuid.c --- generate a DCE-compatible uuid
+ *
+ * Copyright (C) 1996, 1997, 1998, 1999 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU
+ * Library General Public License.
+ * %End-Header%
+ */
+
+/*
+ * Force inclusion of SVID stuff since we need it if we're compiling in
+ * gcc-wall wall mode
+ */
+#define _SVID_SOURCE
+
+#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>
+#include <sys/time.h>
+#include <sys/stat.h>
+#include <sys/file.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#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
+
+#include "uuidP.h"
+
+#ifdef HAVE_SRANDOM
+#define srand(x) srandom(x)
+#define rand() random()
+#endif
+
+static int get_random_fd(void)
+{
+ struct timeval tv;
+ static int fd = -2;
+ int i;
+
+ if (fd == -2) {
+ gettimeofday(&tv, 0);
+ fd = open("/dev/urandom", O_RDONLY);
+ if (fd == -1)
+ fd = open("/dev/random", O_RDONLY | O_NONBLOCK);
+ srand((getpid() << 16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec);
+ }
+ /* 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, fd = get_random_fd();
+ int lose_counter = 0;
+ char *cp = (char *) buf;
+
+ if (fd >= 0) {
+ while (nbytes > 0) {
+ i = read(fd, cp, nbytes);
+ if ((i < 0) &&
+ ((errno == EINTR) || (errno == EAGAIN)))
+ continue;
+ if (i <= 0) {
+ if (lose_counter++ == 8)
+ break;
+ continue;
+ }
+ nbytes -= i;
+ cp += i;
+ lose_counter = 0;
+ }
+ }
+
+ /* XXX put something better here if no /dev/random! */
+ for (i = 0; i < nbytes; i++)
+ *cp++ = rand() & 0xFF;
+ return;
+}
+
+/*
+ * Get the ethernet hardware address, if we can find it...
+ */
+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;
+
+/*
+ * 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(*ifr) ) {
+ 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
+ /*
+ * XXX we don't have a way of getting the hardware
+ * address
+ */
+ close(sd);
+ return 0;
+#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(__u32 *clock_high, __u32 *clock_low, __u16 *ret_clock_seq)
+{
+ static int adjustment = 0;
+ static struct timeval last = {0, 0};
+ static __u16 clock_seq;
+ struct timeval tv;
+ unsigned long long clock_reg;
+
+try_again:
+ gettimeofday(&tv, 0);
+ if ((last.tv_sec == 0) && (last.tv_usec == 0)) {
+ get_random_bytes(&clock_seq, sizeof(clock_seq));
+ clock_seq &= 0x1FFF;
+ last = tv;
+ last.tv_sec--;
+ }
+ if ((tv.tv_sec < last.tv_sec) ||
+ ((tv.tv_sec == last.tv_sec) &&
+ (tv.tv_usec < last.tv_usec))) {
+ clock_seq = (clock_seq+1) & 0x1FFF;
+ 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 += ((unsigned long long) tv.tv_sec)*10000000;
+ clock_reg += (((unsigned long long) 0x01B21DD2) << 32) + 0x13814000;
+
+ *clock_high = clock_reg >> 32;
+ *clock_low = clock_reg;
+ *ret_clock_seq = clock_seq;
+ return 0;
+}
+
+void uuid_generate_time(uuid_t out)
+{
+ static unsigned char node_id[6];
+ static int has_init = 0;
+ struct uuid uu;
+ __u32 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] |= 0x80;
+ }
+ has_init = 1;
+ }
+ get_clock(&clock_mid, &uu.time_low, &uu.clock_seq);
+ uu.clock_seq |= 0x8000;
+ uu.time_mid = (__u16) clock_mid;
+ uu.time_hi_and_version = (clock_mid >> 16) | 0x1000;
+ memcpy(uu.node, node_id, 6);
+ uuid_pack(&uu, out);
+}
+
+void uuid_generate_random(uuid_t out)
+{
+ uuid_t buf;
+ struct uuid uu;
+
+ 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);
+}
+
+/*
+ * 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);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/gen_uuid_nt.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/gen_uuid_nt.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/gen_uuid_nt.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,92 @@
+/*
+ * gen_uuid_nt.c -- Use NT api to generate uuid
+ *
+ * Written by Andrey Shedel (andreys at 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);
+ }
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/isnull.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/isnull.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/isnull.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,25 @@
+/*
+ * isnull.c --- Check whether or not the UUID is null
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU
+ * Library General Public License.
+ * %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;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/libuuid.3.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/libuuid.3.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/libuuid.3.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,70 @@
+.\" Copyright 1999 Andreas Dilger (adilger at 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 LIBUUID 3 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+libuuid \- DCE compatible Universally Unique Identifier library
+.SH SYNOPSIS
+.B #include <uuid/uuid.h>
+.sp
+.B cc
+.I file.c
+.B \-luuid
+.SH DESCRIPTION
+The
+.B libuuid
+library is used to generate unique identifiers for objects that may be
+accessible beyond the local system. The Linux implementation was created
+to uniquely identify ext2 filesystems created by a machine. 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
+.B libuuid
+was written by Theodore Y. Ts'o for the ext2 filesystem utilties.
+.SH AVAILABILITY
+.B libuuid
+is part of the e2fsprogs package and is available from
+.UR http://e2fsprogs.sourceforge.net/
+http://e2fsprogs.sourceforge.net/
+.UE
+.SH COPYING
+.B libuuid
+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
+59 Temple Place
+.br
+Suite 330
+.br
+Boston, MA 02111-1307 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 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)
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/pack.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/pack.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/pack.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,46 @@
+/*
+ * Internal routine for packing UUID's
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU
+ * Library General Public License.
+ * %End-Header%
+ */
+
+#include <string.h>
+#include "uuidP.h"
+
+void uuid_pack(const struct uuid *uu, uuid_t ptr)
+{
+ __u32 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);
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/parse.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/parse.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/parse.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,53 @@
+/*
+ * parse.c --- UUID parsing
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU
+ * Library General Public License.
+ * %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;
+ 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;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/tst_uuid.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/tst_uuid.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/tst_uuid.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,118 @@
+/*
+ * tst_uuid.c --- test program from the UUID library
+ *
+ * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include <stdio.h>
+
+#include "uuid.h"
+
+int
+main(int argc, char **argv)
+{
+ uuid_t buf, tst;
+ char str[100];
+ struct timeval tv;
+ time_t time_reg;
+ 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");
+
+ 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 time is: (%ld, %ld): %s\n", tv.tv_sec, tv.tv_usec,
+ ctime(&time_reg));
+ 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++;
+ }
+ if (failed) {
+ printf("%d failures.\n", failed);
+ exit(1);
+ }
+ return 0;
+}
+
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/unpack.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/unpack.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/unpack.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,40 @@
+/*
+ * Internal routine for unpacking UUID
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU
+ * Library General Public License.
+ * %End-Header%
+ */
+
+#include <string.h>
+#include "uuidP.h"
+
+void uuid_unpack(const uuid_t in, struct uuid *uu)
+{
+ const __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);
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/unparse.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/unparse.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/unparse.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,28 @@
+/*
+ * unparse.c -- convert a UUID to string
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU
+ * Library General Public License.
+ * %End-Header%
+ */
+
+#include <stdio.h>
+
+#include "uuidP.h"
+
+void uuid_unparse(const uuid_t uu, char *out)
+{
+ struct uuid uuid;
+
+ uuid_unpack(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]);
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,63 @@
+/*
+ * Public include file for the UUID library
+ *
+ * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU
+ * Library General Public License.
+ * %End-Header%
+ */
+
+#ifndef _UUID_UUID_H
+#define _UUID_UUID_H
+
+#include <sys/types.h>
+#include <sys/time.h>
+#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
+
+#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);
+
+/* 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 */
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuidP.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuidP.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuidP.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,40 @@
+/*
+ * uuid.h -- private header file for uuids
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU
+ * Library General Public License.
+ * %End-Header%
+ */
+
+#include <sys/types.h>
+#include <ext2fs/ext2_types.h>
+
+#include "uuid.h"
+
+/*
+ * Offset between 15-Oct-1582 and 1-Jan-70
+ */
+#define TIME_OFFSET_HIGH 0x01B21DD2
+#define TIME_OFFSET_LOW 0x13814000
+
+struct uuid {
+ __u32 time_low;
+ __u16 time_mid;
+ __u16 time_hi_and_version;
+ __u16 clock_seq;
+ __u8 node[6];
+};
+
+
+/*
+ * prototypes
+ */
+void uuid_pack(const struct uuid *uu, uuid_t ptr);
+void uuid_unpack(const uuid_t in, struct uuid *uu);
+
+
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_clear.3.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_clear.3.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_clear.3.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,35 @@
+.\" Copyright 1999 Andreas Dilger (adilger at 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 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
+.B uuid_clear
+was written by Theodore Y. Ts'o for the ext2 filesystem utilties.
+.SH AVAILABILITY
+.B uuid_clear
+is part of libuuid from the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH "SEE ALSO"
+.BR libuuid (3),
+.BR uuid_compare (3),
+.BR uuid_copy (3),
+.BR uuid_generate (3),
+.BR uuid_is_null (3)
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_compare.3.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_compare.3.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_compare.3.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,41 @@
+.\" Copyright 1999 Andreas Dilger (adilger at 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 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
+.B uuid_compare
+was written by Theodore Y. Ts'o for the ext2 filesystem utilties.
+.SH AVAILABILITY
+.B uuid_compare
+is part of libuuid from the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH "SEE ALSO"
+.BR libuuid (3),
+.BR uuid_clear (3),
+.BR uuid_copy (3),
+.BR uuid_generate (3),
+.BR uuid_is_null (3)
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_copy.3.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_copy.3.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_copy.3.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,37 @@
+.\" Copyright 1999 Andreas Dilger (adilger at 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 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
+.B uuid_copy
+was written by Theodore Y. Ts'o for the ext2 filesystem utilties.
+.SH AVAILABILITY
+.B uuid_copy
+is part of libuuid from the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH "SEE ALSO"
+.BR libuuid (3),
+.BR uuid_clear (3),
+.BR uuid_compare (3),
+.BR uuid_generate (3),
+.BR uuid_is_null (3)
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_generate.3.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_generate.3.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_generate.3.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,81 @@
+.\" Copyright 1999 Andreas Dilger (adilger at 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 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
+.B uuid_generate
+was written by Theodore Y. Ts'o for the ext2 filesystem utilties.
+.SH AVAILABILITY
+.B uuid_generate
+is part of libuuid from the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH "SEE ALSO"
+.BR libuuid (3),
+.BR uuid_clear (3),
+.BR uuid_compare (3),
+.BR uuid_copy (3),
+.BR uuidgen (1),
+.BR uuid_is_null (3),
+.BR uuid_parse (3),
+.BR uuid_time (3),
+.BR uuid_unparse (3)
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_is_null.3.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_is_null.3.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_is_null.3.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,37 @@
+.\" Copyright 1999 Andreas Dilger (adilger at 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 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
+.B uuid_is_null
+was written by Theodore Y. Ts'o for the ext2 filesystem utilties.
+.SH AVAILABILITY
+.B uuid_is_null
+is part of libuuid from the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH "SEE ALSO"
+.BR libuuid (3),
+.BR uuid_clear (3),
+.BR uuid_compare (3),
+.BR uuid_copy (3),
+.BR uuid_generate (3),
+.BR uuid_time (3)
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_parse.3.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_parse.3.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_parse.3.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,50 @@
+.\" Copyright 1999 Andreas Dilger (adilger at 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 UUID_PARSE 3 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+uuid_parse \- convert an input UUID string into the libuuid internal format
+.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 internal
+.B uuid_t
+format. 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
+.B uuid_parse
+was written by Theodore Y. Ts'o for the ext2 filesystem utilties.
+.SH AVAILABILITY
+.B uuid_parse
+is part of libuuid from the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH "SEE ALSO"
+.BR libuuid (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)
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_time.3.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_time.3.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_time.3.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,52 @@
+.\" Copyright 1999 Andreas Dilger (adilger at 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 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 UUID
+.I uu
+was created. Note that the UUID creation time is encoded within the UUID,
+and this function can only reasonably expect to extract the creation time
+for UUIDs created with the
+.BR uuid_generate (3)
+function. It may or may not work with UUIDs created by OSF DCE
+.BR uuidgen .
+.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
+.B uuid_time
+was written by Theodore Y. Ts'o for the ext2 filesystem utilties.
+.SH AVAILABILITY
+.B uuid_time
+is part of libuuid from the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH "SEE ALSO"
+.BR libuuid (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)
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_time.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_time.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_time.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,138 @@
+/*
+ * 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%
+ * This file may be redistributed under the terms of the GNU
+ * Library General Public License.
+ * %End-Header%
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+#include "uuidP.h"
+
+time_t uuid_time(const uuid_t uu, struct timeval *ret_tv)
+{
+ struct uuid uuid;
+ __u32 high;
+ struct timeval tv;
+ unsigned long long clock_reg;
+
+ uuid_unpack(uu, &uuid);
+
+ high = uuid.time_mid | ((uuid.time_hi_and_version & 0xFFF) << 16);
+ clock_reg = uuid.time_low | ((unsigned long long) high << 32);
+
+ clock_reg -= (((unsigned long long) 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, tv.tv_usec,
+ ctime(&time_reg));
+
+ return 0;
+}
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_unparse.3.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_unparse.3.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/lib/uuid/uuid_unparse.3.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,40 @@
+.\" Copyright 1999 Andreas Dilger (adilger at 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 UUID_UNPARSE 3 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+uuid_unparse \- output UUID variable in string format
+.SH SYNOPSIS
+.nf
+.B #include <uuid/uuid.h>
+.sp
+.BI "void uuid_unparse(uuid_t " uu ", char *" out );
+.fi
+.SH DESCRIPTION
+The
+.B uuid_unparse
+function converts the supplied UUID
+.I uu
+from the internal binary format into a 36\-byte string (plus tailing '\\0')
+of the form 1b4e28ba\-2fa1\-11d2\-883f\-b9a76 and stores this value in the
+character string pointed to by
+.IR out .
+.SH "CONFORMING TO"
+OSF DCE 1.1
+.SH AUTHOR
+.B uuid_unparse
+was written by Theodore Y. Ts'o for the ext2 filesystem utilties.
+.SH AVAILABILITY
+.B uuid_unparse
+is part of libuuid from the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH "SEE ALSO"
+.BR libuuid (3),
+.BR uuid_clear (3),
+.BR uuid_generate (3),
+.BR uuid_parse (3),
+.BR uuid_time (3)
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,21 @@
+Makefile
+fsck
+badblocks
+e2label
+dumpe2fs
+chattr
+lsattr
+mklost+found
+uuidgen
+mke2fs
+tune2fs
+mklost+found.8
+tune2fs.8
+dumpe2fs.8
+mke2fs.8
+badblocks.8
+e2label.8
+uuidgen.1
+fsck.8
+chattr.1
+lsattr.1
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2036 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * mke2fs.c: Check for the BSD disklabel on all architectures, and
+ also check the byte-swapped magic number as well.
+
+2002-03-07 Theodore Tso <tytso at mit.edu>
+
+ * mke2fs.c: Output warnings to stderr
+ (From Philipp Thomas <pthomas at suse.de>)
+
+ * base_device.c (main): Fix gcc -Wall complaints in debug code.
+
+ * mke2fs.c (zap_sector): Don't erase BSD disklabels on Alpha.
+ (From Thorsten Kukuk <kukuk at suse.de>)
+
+2002-03-04 Philipp Thomas <pthomas at suse.de>
+
+ * chattr.c (main), fsck.c (main), mke2fs.c (main), findsuper.c
+ (main), dumpe2fs.c (main), lsattr.c (main), partinfo.c (main),
+ tune2fs.c (main), mklost+found.c (main), badblocks.c
+ (main), e2image.c (main): Newer libintl needs LC_CTYPE to
+ be set in addition to LC_MESSAGES.
+
+2002-02-25 Andreas Dilger <adilger at clusterfs.com>
+
+ * mke2fs.c: Add check for mkfs.ext3 and create a journal in
+ this case.
+
+2002-02-24 Theodore Tso <tytso at mit.edu>
+
+ * Makefile.in (install): Install hard links for man pages for
+ mkfs.ext2 and mkfs.ext3. Also install hard link for
+ mkfs.ext3. Remove any compressed man pages before
+ installing the man pages.
+
+2002-02-23 Theodore Tso <tytso at mit.edu>
+
+ * badblocks.8.in: Clarify man page's description of the -f option
+
+2002-02-12 Theodore Tso <tytso at mit.edu>
+
+ * get_device_by_label.c: Since on non-STDC compilers, we define
+ away const, include get_device_by_label.h after we include
+ fsck.h.
+
+ * Makefile.in (base_device): Remove use of $<, which is
+ non-portable.
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2002-02-03 Theodore Tso <tytso at mit.edu>
+
+ * fsck.c (interpret_type): Allow filesystems types of the form
+ "ext3,ext2", etc.
+
+ * fstype.c (identify_fs): Add support for only searching for a
+ specified list of filesystems. Also add support for
+ identifying reiserfs filesystems.
+
+2002-01-29 Theodore Tso <tytso at mit.edu>
+
+ * fsck.c: Allow the number of outstanding processes fs-specific
+ fsck programs to be capped via the FSCK_MAX_INST
+ envrionment variable.
+
+ * fsck.8.in: Document all of the environment variables used by fsck.
+
+2002-01-27 Theodore Tso <tytso at mit.edu>
+
+ * tune2fs.8.in: Document the -f flag to tune2fs.
+
+2002-01-02 Theodore Tso <tytso at mit.edu>
+
+ * badblocks.c (main): Open the device as O_RDWR if possible, since
+ fsync() isn't guaranteed to work if the filesystem is
+ opened read-only.
+
+2001-12-26 Theodore Tso <tytso at mit.edu>
+
+ * tune2fs.8.in, tune2fs.c (parse_tune2fs_options, main): Add
+ support for new option, -T, which allows the user to set
+ the last checked time on the filesystem.
+
+2001-12-24 Theodore Tso <tytso at mit.edu>
+
+ * mke2fs.c (main, test_disk): If two -c options are
+ specified, then perform a destructive read/write test
+ of the disk.
+
+ * mke2fs.8.in: Document the double -c option; also encourage users
+ to use -c instead of the -l/-L options since it's too hard
+ for users to get things like the blocksize parameter correct.
+
+ * badblocks.8.in: Encourage users to use the -c option in mke2fs
+ and e2fsck instead of running badblocks directly.
+
+ * mke2fs.c (create_lost_and_found): The lost+found directory is
+ now created with 0700 permissions, since files which get
+ dropped into that directory may have come from a protected
+ directory, and the system administrator may not deal with
+ immediately. (Addresses Debian bug #118443)
+
+2001-12-23 Theodore Tso <tytso at mit.edu>
+
+ * Makefile.in, jfs_user.h: Move linux/jbd.h to
+ ext2fs/kernel-jbd.h, to avoid using the system header
+ file version of hbd.h when using diet glibc (since it
+ forcibly adds /usr/include to the beginning of the
+ include search path.)
+
+2001-12-22 Theodore Tso <tytso at mit.edu>
+
+ * get_device_by_label.c (init_lvm): Add support to read out
+ information from the LVM proc hierarchy, so that the UUID
+ cache can search the LVM logical volumes for UUID's,
+ labels, etc.
+
+2001-12-21 Theodore Tso <tytso at mit.edu>
+
+ * dumpe2fs.c (list_bad_blocks): Change to not die if the listing
+ of the bad blocks can't be found. Slimmed down dumpe2fs
+ by eliminating duplicate code paths.
+
+2001-12-16 Theodore Tso <tytso at mit.edu>
+
+ * dumpe2fs.c (list_desc), fsck.c (fs_match),
+ get_device_by_label.c (get_label_uuid),
+ mke2fs.c (set_fs_defaults, zap_sector, PRS),
+ tune2fs.c (remove_journal_device, update_feature_set),
+ util.c (figure_journal_size), util.h: Fix gcc -Wall nits.
+
+ * e2image.c (write_raw_image_file): Fix gcc -Wall nits, and use
+ the stashed inode functions to optimize away system calls.
+
+ * Makefile.in, jfs_user.h: linux/jfs.h has been renamed to
+ linux/jbd.h
+
+2001-12-02 Theodore Tso <tytso at mit.edu>
+
+ * dumpe2fs.c: Don't print the offset to the bitmap and inode table
+ if it's negative. Also did some generalized code clean up
+ to slim it down the support of the -x option.
+
+2001-11-24 Theodore Tso <tytso at mit.edu>
+
+ * e2image.8.in: Fix cut-and-paste typo (Addresses Debian bug
+ #119624)
+
+2001-11-13 Theodore Tso <tytso at mit.edu>
+
+ * util.c (check_plausibility): Use stat64 if available so that
+ check_plausibility() works with files > 2GB.
+
+2001-11-05 Theodore Tso <tytso at mit.edu>
+
+ * chattr.1.in: Update the man page to document the EXT2_NOTAIL_FL
+ flag.
+
+ * chattr.c: Add support for the EXT2_NOTAIL_FL flag.
+
+ * fsck.c (interpret_type): If the "auto" type is specified, make
+ sure interpet_device() is called so that device
+ specifications which use LABEL= or UUID= are translated
+ into a real device name.
+
+2001-10-12 Theodore Tso <tytso at mit.edu>
+
+ * e2image.c (output_meta_data_blocks): Optimize away excess
+ lseek() calls when creating a sparse file. Fewer system
+ calls are a good thing. <g>
+
+2001-10-07 Andreas Dilger <adilger at turbolinux.com>
+
+ * mke2fs.c (main): Always exit with non-zero code in case of error.
+
+ * mke2fs.c (zap_sector): Check that buffer allocation succeeded.
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-19 Theodore Tso <tytso at mit.edu>
+
+ * tune2fs.c (remove_journal_inode): Remove dead code that wasn't
+ in use.
+
+ * tune2fs.8.in: Update man page to reflect the fact that adding or
+ removing a journal doesn't require running e2fsck.
+
+2001-09-13 Theodore Tso <tytso at mit.edu>
+
+ * mke2fs.c (zap_sector): Allocate sufficient space for
+ zero-filled buffer.
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-31 Andreas Dilger <adilger at turbolinux.com>
+
+ * mke2fs.c (main): Fix version format string.
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-30 Theodore Tso <tytso at valinux.com>
+
+ * badblocks.8.in: Fix spelling typo. (Addresses Debian bug #110621)
+
+ * mke2fs.c (zap_sector): Now takes a third argument, which is how
+ many sectors to clear out. Fixed up Andreas's patch to
+ make it a bit more efficient/compact.
+
+2001-08-30 Andreas Dilger <adilger at turbolinux.com>
+
+ * mke2fs.c (main): Zap the second sector of the disk, along with
+ any sectors in the same filesystem block after the superblock.
+ The latter will remove (for example) swapspace signatures
+ on 4kB+ blocksize filesystems. Also when zeroing the "end"
+ of the filesystem don't actually zero the start of a very
+ small device (less than 64 blocks).
+
+2001-08-27 Theodore Tso <tytso at valinux.com>
+
+ * fsck.c (main): Make version display consistent with the other
+ e2fsprogs programs.
+
+ * lsattr.c, chattr.c, mke2fs.c, tune2fs.c, dumpe2fs.c, e2image.c,
+ mklost+found.c: Remove EXT2FS_VERSION from the version
+ display, since it only confuses people.
+
+2001-08-18 Theodore Tso <tytso at valinux.com>
+
+ * tune2fs.c (remove_journal_device): Remove unused variable
+ check_uuid.
+
+ * get_device_by_label.h: Define function prototype for
+ copy_string(), since this was moved from fsck.c to
+ get_device_by_label.c by Andreas's BK changeset.
+
+2001-08-17 Andreas Dilger <adilger at turbolinux.com>
+
+ * get_device_by_label.[ch], fsck.c, util.c: New interpret_spec()
+ function in get_device_by_label.c to allow the use of
+ UUID= or LABEL= when creating filesystems which use external
+ journal dev (e.g. mke2fs -J device=LABEL=<journal_label>).
+
+ * tune2fs.c: Use superblock s_journal_uuid to locate an external
+ journal device instead of s_journal_dev when removing it.
+ Allow opening journal devices to set the label and UUID
+ in the ext2 superblock.
+
+ * mke2fs.c, tune2fs.c: Free journal_device after use, as it is
+ malloc'd in interpret spec.
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * tune2fs.c: Make sure that error messages are sent to stderr, and
+ normal messages are sent to stdout. (Addresses Debian bug
+ #108555.)
+
+ * fsck.8.in: Fixed error in synopsis of the man page.
+
+ * fsck.c (check_all): Don't bother to interpret a device where the
+ pass number is zero. (Addresses Debian bug #106696.)
+ (main): Print a warning message if there are no devices to
+ be checked. (Addresses Debian bug #107458.)
+
+ * mke2fs.c (PRS): Handle -O and -s options in line in the getopt
+ loop, so that -s and -O handling are a bit more intuitive.
+ (Not that they should be mixed anyway; -s is deprecated.)
+
+ * tune2fs.c (parse_tune2fs_options): Give an error if -O is
+ specified more than once.
+
+2001-08-10 Theodore Tso <tytso at valinux.com>
+
+ * mke2fs.8.in: Slim down text describing the -O flag to remove
+ text that erroneously implied that all features
+ (including compatible flags) aren't compatible with older
+ kernels.
+
+2001-08-09 Theodore Tso <tytso at valinux.com>
+
+ * mke2fs.c (PRS): Fix bug pointed out by Christopher Niessen; if
+ mke2fs -O none is specified, the sparse_super feature
+ should not be present.
+
+ * e2image.c, e2image.8.in: Add support for raw image files.
+
+2001-08-04 Andreas Dilger <root at lynx.adilger.int>
+
+ * mke2fs.c (PRS): Put check for JOURNAL_DEV before sparse_option,
+ so we don't set the sparse superblock flag on journal devices.
+
+2001-07-31 Theodore Tso <tytso at valinux.com>
+
+ * tune2fs.c (update_feature_set, remove_journal_inode): If
+ removing an in-filesystem journal, clear out the journal
+ inode and update the filesystem accounting structures so
+ we don't have to run e2fsck to clean up after ourselves
+
+2001-07-30 Theodore Tso <tytso at valinux.com>
+
+ * tune2fs.c (update_feature_set): Don't require a forced fsck if
+ we're removing an external journal from a filesystem.
+
+2001-07-27 Theodore Tso <tytso at valinux.com>
+
+ * mke2fs.c (PRS): If the blocksize is not specified and the
+ journal device is specified, use it to determine the
+ blocksize of the new filesystem.
+
+2001-07-20 Theodore Tso <tytso at valinux.com>
+
+ * fsck.8.in: Add much more explicit language documenting how the
+ fs_passno field in /etc/fstab is handled. (Addresses
+ Debian bug #30833).
+
+2001-07-19 Theodore Tso <tytso at valinux.com>
+
+ * fstype.c (identify_fs): New file which looks at the superblock
+ of the filesystem to determines its type.
+
+ * fsck.c (fsck_device, ignore, interpret_type): Call identify_fs
+ if the type specified in /etc/fstab is "auto".
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-06-14 Theodore Tso <tytso at valinux.com>
+
+ * mke2fs.c (PRS): Remove unneeded test in when creating a external
+ filesystem journal.
+
+2001-06-13 Theodore Tso <tytso at valinux.com>
+
+ * tune2fs.c, mke2fs.c, util.c, util.h (print_check_message): Move
+ the message which displays how often the filesystem will
+ be checked from mke2fs into a utility subroutine. Then
+ cause tune2fs to call that function to display the message
+ after adding a journal to a filesystem.
+
+ * mke2fs.8.in: Add manual page fixups and explanation for why it's
+ good to check filesystems periodically from Andreas
+ Dilger.
+
+ * Makefile.in: Don't build e2image if --disable-imager is
+ specified to configure.
+
+2001-06-12 Theodore Tso <tytso at valinux.com>
+
+ * dumpe2fs.c: Use WORDS_BIGENDIAN to determine whether or not
+ we're (not) using i386 byte order.
+
+ * dumpe2fs.c, mke2fs.c: Stop using the compatibility badblocks
+ function, and use the ext2fs_badblocks_* functions
+ instead.
+
+ * fsck.c (device_already_active): Fixed bug which can cause fsck
+ to core dump if there are a mix of devices with standard
+ and non-standard names. (Addresses Debian bug #100559)
+
+2001-06-07 Theodore Tso <tytso at valinux.com>
+
+ * chattr.c, lsattr.c: Don't use _FILE_BITS_OFFSET method of using
+ the 64-bit function, since this changes the expected size
+ of struct dirent. Instead use lseek64 explicitly.
+
+2001-06-01 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in: Move include/asm/types.h.in to
+ lib/ext2fs/ext2_types.h.in.
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * tune2fs.c (update_feature_set): Fix capitalization typo.
+
+2001-05-23 Theodore Tso <tytso at valinux.com>
+
+ * partinfo.c (main): Use unsigned long instead of long when
+ querying the size of a device using the BLKGETSIZE ioctl,
+ to remove the 1TB limit (and turn it into a 2TB limit :-)
+
+ * fsck.c (compile_fs_type): Fix I18N compilation bug: use N_()
+ instead of _() to initialize static variables.
+
+2001-05-20 Theodore Tso <tytso at valinux.com>
+
+ * fsck.8.in, fsck.c (compile_fs_type, fs_type, ignore): Fix
+ handling of -t option to be more intuitive. Also add
+ support for the Mandrake -t loop hack. See man page
+ for description of new -t semantics.
+
+ * fsck.c (device_already_active): Fix bug in
+ device_already_active which could cause infinite loops if
+ we don't know the base_device of the filesystem.
+
+ * fsck.c: Make sure all exit status codes returned by fsck are
+ consistent with the error codes documented in the fsck man
+ page.
+
+2001-05-14 Theodore Tso <tytso at valinux.com>
+
+ * badblocks.c, chattr.c, dumpe2fs.c, e2image.c, findsuper.c,
+ lsattr.c, mke2fs.c, mklost+found.c, tune2fs.c, util.c:
+ Change location of ext2_fs.h to be ext2fs/ext2_fs.h
+
+ * tune2fs.8.in: Fix typo's and make other clarifications suggested
+ by Andreas Dilger.
+
+2001-05-11 Andreas Dilger <adilger at turbolinux.com>
+
+ * mke2fs.c: don't zap the superblock if we are running with noaction!
+ Zap the end of the device to remove stale RAID superblocks.
+
+2001-05-14 Theodore Tso <tytso at valinux.com>
+
+ * tune2fs.c (update_feature_set): Clean up some printf messages.
+
+ * fsck.8.in, mke2fs.8.in, tune2fs.8.in: Fix typo's and make other
+ clarifications suggested by Andreas Dilger.
+
+2001-05-13 Theodore Tso <tytso at valinux.com>
+
+ * mke2fs.c (PRS): Integrated changes from Andreas Dilger which
+ make the revision superblock field be set to the correct
+ value depending on if superblock features are set.
+
+2001-05-12 Theodore Tso <tytso at valinux.com>
+
+ * fsck.c (PRS): fsck -? now prints the usage message.
+
+ * badblocks.8.in, dumpe2fs.8.in, e2label.8.in, mke2fs.8.in,
+ mklost+found.8.in, tune2fs.8.in: Fix typo; removed
+ excess "anonymous" in the AVAILABILITY section.
+
+ * chattr.1.in, lsattr.1.in, uuidgen.1.in: Update URL location of
+ e2fsprogs package.
+
+2001-05-07 Theodore Tso <tytso at valinux.com>
+
+ * util.c: Use specific check for HAVE_SYS_STAT_H.
+
+2001-05-05 Theodore Tso <tytso at valinux.com>
+
+ * fsck.8.in: Add explicit language to describe how options get
+ passed to filesystem-specific checkers.
+
+ * badblocks.8.in: Fixed man page to describe the first optional
+ parameter to badblocks as last_block, instead of
+ num_blocks. (Debian bug #87216)
+
+ * badblocks.c: Change the blocks_count variable to be last_count,
+ which is a more accurate description of the variable.
+
+2001-05-03 Theodore Tso <tytso at valinux.com>
+
+ * e2image.8.in: New manual page
+
+ * badblocks.8.in, e2label.8.in, mke2fs.8.in mklost+found.8.in,
+ tune2fs.8.in: Update location of e2fsprogs to be
+ http://e2fsprogs.sourceforge.net.
+
+ * dumpe2fs.c (main): Add new flag, -i, which will allow dumpe2fs
+ to dump out the filesystem statistics from an ext2 image
+ file.
+
+ * e2image.c (main): Fix format of e2image to be easier to be parse
+ by ext2fs_open().
+
+2001-05-01 Theodore Tso <tytso at valinux.com>
+
+ * fsck.c (device_already_active): If we're not able to determine
+ the base device, we should assume that the device is
+ already active in order to force serialization.
+
+2001-04-26 Theodore Tso <tytso at valinux.com>
+
+ * tune2fs.c (parse_tune2fs_options): Interpret -c 0 as -c -1 (for
+ backwards compatibility with older kernels). -c 0 makes
+ more sense to users.
+
+2001-04-22 Theodore Tso <tytso at valinux.com>
+
+ * tune2fs.c (remove_journal_device): If the force flag is given,
+ tune2fs will remove the journal device information from
+ the superblock even if tune2fs failed to open the journal
+ device or otherwise other failed to remove the filesystem
+ from journal device.
+ (parse_tune2fs_options): Fix -j option so that it works
+ (it was missing the open_flag being set to EXT2_FLAG_RW).
+ (main): Accept "-U clear" to set a null UID.
+
+2001-04-21 Theodore Tso <tytso at valinux.com>
+
+ * mke2fs.8.in: Manual page cleanups. Temporarily comment out the
+ documentation for the extern journal device support.
+
+ * mke2fs.c (usage): Remove the deprecated -s option from the usage
+ message.
+
+2001-04-16 Theodore Tso <tytso at valinux.com>
+
+ * mke2fs.c (main): Add better explanation about when the
+ filesystem will be checked after it is created.
+
+ * util.c (parse_journal_opts): Remove code which allowed a bare
+ number to be treated as a journal size.
+
+ * mke2fs.c, tune2fs.c: Add newlines to error messages so that they
+ look nicer.
+
+ * mke2fs.c (create_journal_dev): Call
+ ext2fs_create_journal_superblock() first, so if it's going
+ to error out, the user finds out before waiting for the
+ entire device to get zero'ed.
+
+2001-03-26 Theodore Tso <tytso at valinux.com>
+
+ * mke2fs.8.in, tune2fs.8.in: Change man paegs to document that the
+ journal must be bewteen 1024 and 102,400 file system
+ blocks.
+
+ * mke2fs.c, tune2fs.c: Change to use figure_journal_size()
+
+ * util.c, util.h (figure_journal_size): Change
+ journal_default_size into routine which also converts the
+ requested journal size into filesystem blocks and does
+ bounds checking to make sure the journal is sized
+ reasonably. Renamed function to journal_default_size.
+ (parse_journal_opts): Remove bounds check for the journal
+ size, since this is now done in figure_journal_size, and
+ based on the number of filesystem blocks, as opposed to
+ using the absolute size of the journal.
+
+2001-02-17 Theodore Tso <tytso at valinux.com>
+
+ * mke2fs.c (main): Flush out the "creating journal" message.
+ Also handle the case where the default journal size
+ returns zero blocks == no journal. Print out how often
+ the filesystem will be checked.
+
+2001-02-08 Theodore Tso <tytso at valinux.com>
+
+ * e2image.c (main): Add code to write the e2image header.
+
+2001-02-07 Theodore Tso <tytso at valinux.com>
+
+ * tune2fs.8.in: Update man page to reflect that 2.0.39 supports
+ sparse_super.
+
+ * dumpe2fs.c (list_desc): Fix fencepost error when calculating the
+ range of inode table blocks. Add '0x' to values printed
+ in hex.
+
+ * chattr.c, lsattr.c: Define the _LARGEFILE64_SOURCE to force the
+ use of the LFS so that lstat will work on large files.
+
+2001-01-17 Theodore Ts'o <tytso at valinux.com>
+
+ * tune2fs.c, mke2fs.c, tune2fs.8.in, mke2fs.8.in: Change user
+ interface so that -J is used to specify journal options,
+ and -j is used to request creation of a journal using
+ default values. (This is a UI change, but we haven't done
+ a formal release, and it makes things much more consistent
+ with the rest of the options out there.)
+
+ * tune2fs.c: Add support for removing a filesystem from an
+ external journal; we correctly remove the filesystem UUID
+ from the external journal's filesystem list.
+
+ * util.h, util.c (journal_default_size): New function from Andreas
+ Dilger to calculate an appropriate default journal size
+ given a filesystem size.
+
+ * util.c (parse_journal_opts): Allow the creation of a journal as
+ small as 1MB.
+
+ * dumpe2fs.c (print_journal_information): Use s_first_data_block
+ to find the correct block to read the journal superblock.
+
+2001-01-15 Theodore Ts'o <tytso at valinux.com>
+
+ * tune2fs.c: Changed the external journal code so that it simply
+ adds a filesystem to a journal; the journal must have bene
+ created via "mke2fs -O journal_dev /dev/XXX".
+
+ * mke2fs.c: Add support for creating an external journal device by
+ using the command "mke2fs -O journal_dev /dev/XXX". Also
+ changed the external journal code so -j device=/dev/XXX it
+ simply adds a filesystem to that journal; the journal must
+ have been created via separate step.
+
+ * dumpe2fs.c (print_journal_information): Add support for dumping
+ information about an external journal device.
+
+2001-01-14 Theodore Ts'o <tytso at valinux.com>
+
+ * mke2fs.c: Add new filesystem types, largefile and largefile4,
+ for those filesystems whose average inode size is 1MB and
+ 4MB, respectively. Allow the inode ratio specified to be
+ has high as 4MB. Make the s_max_mount_count vary between
+ 20 and 40, to avoid needing to check all of the
+ filesystems at the same time. Add some random jitter to
+ the s_max_mount_count value so that we avoid checking all
+ of the filesystems at the same time when we reboot.
+
+ * tune2fs.8.in: Add description of the -j option.
+
+ * tune2fs.c (add_journal): Minor fixes from Andreas Dilger. Flush
+ stdout after printing in-progress message.
+ (main): Exit with status code 1 if we failed to determine
+ the mount status of the device.
+
+2001-01-11 <tytso at snap.thunk.org>
+
+ * e2image.c, mke2fs.c, mklost+found.c, tune2fs.c, util.c,
+ uuidgen.c: Fix gcc -Wall complaints, including one bug in
+ tune2fs caused by a block automatic shadowing version of
+ the variable we really wanted to use, which broke the
+ logic testing to see if the filesystem was mounted.
+
+ * badblocks.c (flush_bufs): Use ext2fs_sync_device() to sync and
+ flush the device.
+
+ * mke2fs.c: Change ino_t to ext2_ino_t.
+
+2001-01-08 <tytso at snap.thunk.org>
+
+ * Makefile.in, tune2fs.c: Move e2label functionality into tune2fs,
+ using argv[0] as a dispatch. This allows e2label to be
+ (more) safely used on mounted filesystems.
+
+2001-01-05 <tytso at snap.thunk.org>
+
+ * get_device_by_label.h (get_volume_label_by_spec): Add function
+ prototype.
+
+ * get_device_by_label.c: Use string_copy() instead of strdup() for
+ portability's sake. Fix a few other gcc -Wall
+ complaints.
+
+ * fsck.c (string_copy): Export string_copy() extern.
+
+ * badblocks.c: Fix various gcc -Wall complaints, including
+ an incorrect reference to sync in flush_bufs().
+
+2001-01-03 <tytso at snap.thunk.org>
+
+ * tune2fs.c (update_feature_set, add_journal): Moved to separate
+ functions. Added ability to add and remove the journal
+ while the filesystem is live. Added support for setting
+ a time-based UUID. Removed zero-initialized static variables.
+
+ * mke2fs.c, util.c, util.h (strcasecmp, proceed_question,
+ check_plausibility, parse_journal_opts, check_mount):
+ Moved functions to util.c so they can be used by tune2fs.
+
+ * mke2fs.c (main): Change ext2fs_add_journal_fs() to
+ ext2fs_add_journal_inode() to reflect function renaming.
+
+2001-01-01 <tytso at snap.thunk.org>
+
+ * mke2fs.c, e2image.c: Removed references to struct ext2fs_sb to
+ struct ext2_super_block.
+
+ * tune2fs.c (main): Add support to allow HAS_JOURNAL flag to be
+ cleared, but only if the filesystem is unmounted or
+ mounted read-only. Changed struct ext2fs_sb to struct
+ ext2_super_block, and cleaned up old code which was needed
+ for old versions of ext2_fs.h (not needed since we're
+ using our own version now).
+
+2000-12-31 <tytso at snap.thunk.org>
+
+ * fsck.c (check_all): Call interpet_device to resolve LABEL= and
+ UUID= right away so that the device_already_active() logic
+ can do the right thing. Also cleaned up the the root
+ filesystem logic checking code; fixed up a logic bug with
+ the parallel_root option.
+
+ * lsattr.1.in: Add pointer to chattr man page for definition of
+ the file attributes.
+
+ * lsattr.c (list_attributes): Minor cleanup to smooth out logic
+ flow. Also removed static initialized variables to zero.
+
+ * chattr.c (decode_arg, get_flag): Use a table-driven method for
+ decoding the ext2 file flags character options. Add
+ support for the journaled data flag.
+
+ * chattr.1.in: Document the -j/+j/=j flag.
+
+2000-12-30 <tytso at snap.thunk.org>
+
+ * mke2fs.8.in: Minor clarity edit.
+
+ * mke2fs.c (usage): Document the -j option.
+ (main): Print the number blocks used in the journal.
+
+2000-12-28 <tytso at snap.thunk.org>
+
+ * base_device.c (base_device): Add support for DAC960 device
+ names.
+
+ * fsck.c (device_already_active): Handle the case where
+ base_device doesn't know how to interpret the device name,
+ instead of core dumping.
+
+2000-12-09 <tytso at snap.thunk.org>
+
+ * mke2fs.c (main, parse_journal_opts): Add support for creating V1
+ superblocks. We now pass in a journal_flags field to the
+ journal creation routines for this purpose.
+
+ * mke2fs.c: Remove zero initializers to save a few bytes from the
+ executable image. (Are we excited yet?)
+
+ * findsuper.c: And non-subtle copyright licensing restriction to
+ get Yann to remove this program from the Debian package. :-)
+
+2000-12-03 <tytso at snap.thunk.org>
+
+ * fsck.c (device_already_active): Change to use new version of
+ base_device() which now returns dynamically allocated
+ memory.
+
+ * base_device.c (base_device): New version moved from fsck.c which
+ now understands ugly devfs names. (Debian bug #65181)
+
+ * base_device.tst: Test case for base_device.c
+
+2000-12-02 <tytso at snap.thunk.org>
+
+ * fsck.8.in: Add clarification that filesystems with a fs_passno
+ of 0 are skipped with the -A option. (Debian wishlist/bug
+ #63442)
+
+ * fsck.c (wait_one): When we let a new fsck take control of the
+ console to display the progress bar, set FLAG_PROGRESS to
+ so that fsck knows not to start new processes during an
+ fsck pass with the progress bar. (Should fix debian bug
+ #65267)
+
+ * tune2fs.8.in: Add clarifying statement about converting user and
+ group names to uid's before storing them in the
+ superblock. (Debian bug #67446)
+
+2000-11-16 Theodore Ts'o <tytso at valinux.com>
+
+ * mke2fs.c(main): Expand the -j option so that it parses
+ option=argument style options, and add support for
+ creating filesystems with external journals.
+
+ * mke2fs.8.in: Document new syntax for the -j option.
+
+2000-11-05 <tytso at snap.thunk.org>
+
+ * e2image.c, Makefile.in: New program which saves ext2 metadata to
+ a file for people who need a last-ditch saving throw.
+
+2000-10-24 <tytso at snap.thunk.org>
+
+ * mke2fs.c (PRS): Applied Andreas Dilger's patch to make the -r -s
+ handling a bit more sane. (Even though -s is deprecated
+ at this point.)
+
+ * get_device_by_label.c: Apply fix from Erik Troan to support 16
+ character labels.
+
+ * fsck.c (device_already_active): Add a special case check for MD
+ devices, so we don't try to check them in parallel with
+ other devices.
+
+ * mke2fs.c (PRS, main), mke2fs.8.in: Add support for the -j
+ option, which builds an ext2/3 filesystem with an ext3
+ journal.
+
+2000-10-24 <tytso at valinux.com>
+
+ * mke2fs.c (zap_sector): Fix really stupid typo which gcc 2.95
+ didn't catch.
+
+2000-09-12 <tytso at valinux.com>
+
+ * fsck.c: Add base device definitions for hd[e-h], for those
+ systems with four IDE interfaces.
+
+2000-09-11 <tytso at valinux.com>
+
+ * mke2fs.c (zap_sector): Fix error message printed when zap_sector
+ fails.
+
+ * dumpe2fs.c (list_desc): Fixed format string bug when printing
+ the inode table location in non-hex format.
+
+2000-08-20 <tytso at valinux.com>
+
+ * get_device_by_label.c: Add call to ext2fs_find_block_device if
+ we can't find the device using the name given by
+ /proc/partitions. (This can happen if devfs is compiled
+ into the kernel, but not mounted.)
+
+2000-06-27 Andreas Dilger <adilger at turbolabs.com>
+
+ * dumpe2fs.c (usage): add fhx options to usage message, add -x option
+ to print out the per-group block numbers in hex, add line for
+ location of primary/backup superblock and group descriptors
+
+ * mke2fs.c: rename max to group_blk_max avoid potential macro conflict
+
+2000-08-14 <tytso at valinux.com>
+
+ * mke2fs.c (zap_sector): Change zap_bootsect to more general
+ zap_sect.
+ (main): Clear the superblock when starting mke2fs, to
+ avoid leaving the filesystem in an inconsistent state.
+
+2000-07-26 <tytso at valinux.com>
+
+ * get_device_by_label.c: Improve /proc/partitions parsing in
+ fsck, and speed up fsck -a.
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+2000-07-13 <tytso at snap.thunk.org>
+
+ * badblocks.8.in: Added text explaining that the -n and -w options
+ are mutually exclusive.
+
+ * badblocks.c (usage): Fix usage message to make it clear that the
+ block count must be specified if the starting block is to
+ be specified. (The starting block should be a option, in
+ the long run.)
+
+ * badblocks.c (test_nd): Save and restore the currently_testing
+ variable before going into the write verification loop.
+ This avoids a loop termination problem if the last block
+ on the disk is bad. Also, turn off the SIGALRM signal
+ while restoring blocks after the user types ^C. The
+ num_saved variable is now static so that it won't get
+ clobbered by a longjmp. buf_used and bb_count are no
+ longer static, since they aren't used by the cleanup
+ routines anymore.
+
+ * badblocks.c (main): Removed an unsued varaible (buf_size).
+ Fixed bad getopt argument that didn't allow the 'b' option
+ to take an argument. Added error checking when parsing
+ the starting block number. Fixed lint warning in fscanf
+ format string.
+
+2000-07-06 Theodore Ts'o <tytso at valinux.com>
+
+ * fsck.c (execute, wait_one): Treat fsck.ext3 the same as
+ fsck.ext2 (because they are the same) for the purposes of
+ the progress bar display logic.
+
+ * tune2fs.8.in: Update manual page to document what happens if
+ max_mount_count is negative.
+
+ * tune2fs.c (main): Allow setting the maximal count value to be
+ negative, since the kernel interprets that as forcing a
+ check.
+
+ * fsck.c (lookup, load_fs_info, check_all): Use lazy evaluation
+ for calling interpret_device(), since this requires root
+ privileges if the partitions need to be scanned.
+ Otherwise, it's not possible to do non-proot fsck's for
+ removeable devices such as floppies if there are any
+ LABEL= or UUID= entries in /etc/fstab.
+
+ * badblocks.c (check_mount, main): Check to see if the filesystem
+ is mounted before doing a read/write or non-destructive
+ test. This can be overriden using the new -f option.
+
+ * badblocks.8.in: Update manual page to reflect that the
+ blocks-count parameter is now optional. Also properly
+ document the start-block parameter. Added documentation
+ for the -f option.
+
+ * badblocks.c (main): Allow the blocks-count parameter to be
+ optional. If it's not specified, use the size of the
+ device as a default.
+
+2000-07-05 Theodore Ts'o <tytso at valinux.com>
+
+ * badblocks.c (test_nd): Significantly simplify the logic so that
+ it's more obviously what's going on. Fixed a few
+ potential cases which weren't handled correctly in the
+ old, overly complicated logic.
+ (flush_bufs): Now doesn't take a second argument, and
+ always forces a sync; this is required before it's really
+ safe to call BLKFLSBUF, at least for some kernels.
+
+2000-05-29 Theodore Ts'o <tytso at valinux.com>
+
+ * mke2fs.c (PRS): Add a much more specific error message if the
+ filesystem size is defaulted and get_device_size returns a
+ size of zero. Otherwise, users get a confusing "invalid
+ argument while passed to ext2 library" error message.
+
+2000-05-08 Theodore Ts'o <tytso at valinux.com>
+
+ * fsck.c (interpret_device): Add better error messages if a UUID=
+ or LABEL= specification is given.
+
+ * mke2fs.c (main): We forcibly turn off the filetype feature if
+ the OS is the hurd, since the hurd doesn't support it.
+ (And since the hurd allows the transmogrification of files
+ to special files and vice versa --- for no good reason
+ that I can understand --- it can't support the filetype
+ feature for the forseeable future, either.)
+
+ * mke2fs.c (proceed_question): Fix reversed sense of
+ proceed_question that was busted due to the
+ internationalization patch. Fixed bug where if
+ proceed_question was called twice, the input buffer wasn't
+ cleared of the previous question's newline.
+
+Thu Apr 6 17:50:25 2000 Theodore Y. Ts'o <tytso at signal.thunk.org>
+
+ * badblocks.c (flush_bufs): Use fsync() if the system doesn't
+ support fdatasync().
+
+2000-04-03 Theodore Ts'o <tytso at valinux.com>
+
+ * badblocks.c, dumpe2fs.c, e2label.c, mke2fs.c, tune2fs.c,
+ uuidgen.c: For platforms that don't define optarg.h,
+ manually define optarg and optind.
+
+ * badblocks.8.in: Updated manual page with suggestions from David
+ Beattie.
+
+ * badblocks.c (test_nd): Generalized cleanup and bug-fixes. We
+ now explicitly clear out the signal handlers to prevent a
+ longjmp to a deactivated stack frame.
+ (test_rw): Fixed a signed vs. unsigned comparison error.
+
+ * badblocks.8.in, chattr.1.in, dumpe2fs.8.in, lsattr.1.in,
+ mklost+found.8.in, tune2fs.8.in: Update Remy Card's e-mail
+ address.
+ chattr.1.in: Update which attributes aren't supported.
+
+2000-02-09 Theodore Ts'o <tytso at valinux.com>
+
+ * chattr.1.in:
+ * lsattr.1.in: Change "version" to "version/generation number".
+
+ * chattr.1.in: Fix stupid file vs filesystem typo.
+
+ * tune2fs.c Fix spelling error (spare vs sparse).
+
+ * mke2fs.c (PRS): Add safety check to make sure the number of
+ blocks doesn't exceed 32 bits on a 64 bit machine.
+
+ * chattr.c: Random cleanup; file-only variables are now static.
+ Options for setting/clearings flags put into order, and
+ #ifdef's removed (since we now use a built-in header
+ file). Add error message if user tries to set and reset
+ the same flag.
+
+ * lsattr.c: Random cleanup; file-only variables are now static.
+ The -l "long" listing has been changed to look nicer.
+ Options names have been renamed to be more descriptive.
+
+2000-02-06 Theodore Ts'o <tytso at valinux.com>
+
+ * badblocks.c, chattr.c, dumpe2fs.c, e2label.c, findsuper.c,
+ fsck.c, get_device_by_label.c, lsattr.c, mke2fs.c,
+ mklost+found.c, nls-enable.h, partinfo.c, tune2fs.c,
+ uuidgen.c: Add Internationalization support as
+ suggested by Marco d'Itri <md at linux.it>.
+
+ * badblocks.c: Fix non-destructive read/write patches from David
+ Beattie. Non-standard variable-length automatic arrays
+ removed. Non-destrutive write test fixed so that logic is
+ clearer and more provably correct. (I believe the old
+ code had a bug where the disk data wasn't restored if it
+ was interrupted at the wrong time.)
+
+ * badblocks.8.in: Document new options in man page.
+
+2000-02-02 Theodore Ts'o <tytso at valinux.com>
+
+ * fsck.c (interpret_device): If there was an attempt to interpret
+ a device specification of the type "UUID=" or "LABEL=",
+ and it fails, check to see if /proc/partitions is
+ readable. If not, print a warning message about /proc
+ perhaps not being mounted, and exit.
+
+ * mke2fs.c (check_plausibility): Remove unneeded #include of
+ linux/fs.h. Add #define of MAJOR if necessary.
+
+ * partinfo.c: Remove unneeded #include of linux/fs.h
+
+2000-01-19 Theodore Ts'o <tytso at valinux.com>
+
+ * tune2fs.c (usage): Update the usage message to correctly
+ document the -s option.
+
+2000-01-18 Theodore Ts'o <tytso at valinux.com>
+
+ * badblocks.c: Folded in patches David Beattie <dbeattie at usa.net>.
+ Need to do cleanup before release: use of GCC extensions
+ (dynamic arrays); unclean coding tricks (use of || instead
+ of if statements, etc.). Comments from David Beattie:
+
+ "I added non-destructive write-testing, and quite a few
+ other features. The non-destructive write testing,
+ triggered by new "-n" command-line option, will write test
+ patterns to the disk, but only after reading data off the
+ disk into memory. Then, comparing the test patterns gives
+ a result as to whether or not those sectors are reliable.
+ Finally, the original data is written back.
+
+ To streamline this operation, I added another option, "-c
+ blocks_at_once", which will give the number of disk blocks
+ to process at one time (mnemonic--"count"). I made this
+ default to 16 (as in the read-only testing mode), and also
+ affect the read-only testing mode. Of course, read-only
+ mode needs (count * block_size) amount of memory, and
+ non-destructive read-write needs 3 times that much, so it
+ makes sense to do the calculations and not overrun
+ available RAM...I would have liked to implement and
+ auto-memory-usage heuristic, but I have no idea if it's
+ even possible to determine the amount of free memory on a
+ Unix system except by reading /proc entries, and that
+ didn't seem portable. I did NOT make this blocks_at_once
+ affect the behavior of the test_rw routine, as it is
+ processing the whole disk at once, anyway.
+
+ I *think* that I got higher detection rates on my hard
+ drive using random test data than patterned test data, so
+ my non-destructive mode initializes its test data buffer
+ randomly.
+
+ I fixed a typo in flush_bufs that caused the ioctl
+ BLKFLSBUF to never get compiled into the program.
+
+ Also, I added an "undocumented" (I didn't put it into the
+ usage message; you can if you think it's useful) "-h"
+ option to specify the host device to flush--useful if you
+ want to test out my "non-destructive" code on something
+ other than a hard drive, such as a file on a hard drive,
+ and want the host hard drive to flush.
+
+ I provided support for an "input" file (via option "-i",
+ similar to the "-o" option)...containing a list of
+ already-known bad blocks; it will skip testing those
+ blocks, thus adding speed to the bad block scan (on my
+ computer, hitting a physically bad block causes a
+ half-second-or-more freeze as the kernel waits for the
+ hard drive to give up and reset itself; pretty annoying
+ when you already know the block is bad from a previous
+ scan).
+
+ Finally, the real killer, the persistent re-scan (option:
+ "-p num_passes") that I created will, if desired,
+ persistently re-scan the drive until it has completed a
+ user-decidable number of passes in a row during which no
+ new bad blocks are found. On my drive, I would see
+ behavior that a certain percentage of bad blocks would be
+ found with each pass (it was not reliable in the defective
+ areas!), so I wanted it to check it over and over again
+ until it didn't find any more, several times. Perhaps
+ this will be useful to others. Defaults of course to
+ zero, meaning it will stop after the first pass. I used
+ "-p 2" on my drive, and it ran for 2 1/2 days...then used
+ "-p 3" a couple days later and it ran for a few more
+ hours, and since then the rest of my drive has been
+ completely reliable.
+
+ Implementation of these last two features, "-i" and "-p",
+ I did using a bb_list from libext2fs. I debated whether
+ bad blocks input through "-i" should be output into the
+ "-o" file (or stdout, of course), and decided against it,
+ but left the code to do so in place, commented out, just
+ for your information.
+
+ In order to maintain data integrity upon interruption of a
+ non-destructive-write test, I created a signal handler
+ which I install which will write back whatever original
+ disk data is in the buffers upon any of the fatal signals
+ (except SIGKILL, of course).
+
+ Of course, ideally, the new options would be reflected in
+ the badblocks manual page, but I am not experienced at
+ manual page modification; if you decide my patch to
+ badblocks should be incorporated into the distribution, I
+ could learn how to update the manpage and other
+ documentation, or you could do it for me after exercising
+ your opinions, if you have any, on exactly what the
+ command-line parameters should be called and which ones
+ should be in the distribution."
+
+2000-01-07 Theodore Ts'o <tytso at valinux.com>
+
+ * Really fix the bug where "fsck -As" will actually allow
+ interactive fsck's. (For those people who like to do
+ interactive fsck's in the /etc/rc scripts!?!)
+
+1999-11-23 <tytso at valinux.com>
+
+ * tune2fs.8.in: Fix man page so that the sparse_super filesystem
+ option is properly named.
+
+1999-11-22 <tytso at valinux.com>
+
+ * mke2fs.c: Change log2() and log10() to int_log2() and
+ int_log10() to avoid namespace collisions. Change #ifdef
+ sparc to #ifdef __sparc__.
+
+1999-11-19 <tytso at valinux.com>
+
+ * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
+ the source directory.
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-11-10 <tytso at valinux.com>
+
+ * mke2fs.8.in: Update manual page so that the sparse_option
+ filesystem option is properly named.
+
+1999-11-04 <tytso at valinux.com>
+
+ * fsck.c (main): Move setting of the interactive flag to before
+ the call to check_all(), so that people who try to use
+ fsck -As can do so interactively.
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-26 <tytso at valinux.com>
+
+ * fsck.c (PRS, device_already_active): Add debugging hook; if the
+ environment variable FSCK_FORCE_ALL_PARALLEL is set, then
+ force all fsck runs to happen in parallel.
+
+ * get_device_by_label.c (has_right_label): Fixed bug where code
+ used a strncmp to compare a binary UUID value which may
+ contain a NULL. Fixed GCC warnings; added const to char *
+ typed variables. Eliminated non-portable use of u_char.
+
+ * mke2fs.c (PRS): Fix gcc warnings; add const to some char *
+ variables, including in struct mke2fs_defaults.
+ (set_fs_defaults): Changed parameter name to avoid
+ gcc warnings.
+
+ * fsck.c (wait_one): Fix gcc warnings; add #include for ctype.h,
+ add const to char * variables, and use NOARGS to declare
+ functions that take no arguments. Also fix a memory leak
+ in execute() where we weren't freeing argv[] after forking
+ the child process.
+
+ * chattr.c: Add hack to compile in a definition for S_ISLNK so we
+ can successfully compile even with warnings turned on.
+
+1999-10-25 <tytso at valinux.com>
+
+ * mke2fs.c (show_stats): Capitalized Hurd to make the GNU types
+ happy.
+ (PRS): Use __u64 instead of long long for portability
+ reasons. Also moved #include of sys/stat.h inside #ifdef
+ HAVE_LINUX_MAJOR_H for portability reasons.
+
+ * fsck.c (execute): Fix really stupid bug in the linked list
+ management which caused fsck in parallel mode to go into
+ an infinite loop.
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-10-22 <tytso at valinux.com>
+
+ * tune2fs.c (main): Add a new option -O which allows the user to
+ set and clear certain "safe" filsystem feature flags.
+ Currently, the only ones which are supported for
+ modification are sparse_superblock and filetype.
+
+ * mke2fs.c (PRS): Add new option -O which allows the user to
+ request filesystems with specific filesystem options. By
+ default on 2.2 and later systems, create filesystems that
+ have both file type information and sparse superblocks.
+
+1999-10-21 <tytso at valinux.com>
+
+ * badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
+ fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
+ tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
+ format (bold option flags and italicized variables), as
+ suggested by Andreas Dilger (adilger at enel.ucalgary.ca)
+
+1999-10-14 <tytso at valinux.com>
+
+ * tune2fs.c (main): Fix typo (double spaces) in messages regarding
+ changing the sparse superblock option
+
+ * fsck.c (wait_one): If the fsck process just started, wait a
+ second before sending a SIGUSR1, to give it a chance
+ to set the signal handler; otherwise, fsck will die on an
+ unhandled SIGUSR1.
+
+1999-09-15 <tytso at valinux.com>
+
+ * mke2fs.c (show_stats): Fix display bug when printing out the
+ number of superblocks. Suggested by Yann Dirson.
+
+1999-09-08 <tytso at valinux.com>
+
+ * partinfo.c: Fix minor compilation bugs pointed out by Yann
+ Dirson.
+
+ * mke2fs.c: Don't turn on sparse superblocks by default on pre-2.2
+ kernels.
+
+ * mke2fs.8.in: Add the possible valid block sizes for mke2fs.
+ Document the -n flag, and the new defaults for the -s
+ flag.
+
+ * dumpe2fs.c, dumpe2fs.8.in: Add new options -f (force) and -h
+ (header-only).
+
+1999-08-13 <tytso at valinux.com>
+
+ * mke2fs.c (PRS): Fix logic for turning on/off the sparse
+ superblock option.
+
+1999-07-18 Theodore Ts'o <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.15
+
+1999-07-18 <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c (PRS, set_fs_defaults): Add new option -T which allows
+ the user to specify the how the filesystem is to be used.
+ Mke2fs now chooses the filesystem parameters automatically
+ based on the size of the filesystem and the intended use
+ of the filesystem. Add new option -n which simply goes
+ through the calculations to determine the parameters of
+ the filesystem the system would make.
+
+1999-07-18 <tytso at valinux.com>
+
+ * fsck.c, fsck.h: Add support for new option -C. This option will
+ automatically manage e2fsck processes so that they will
+ print completion/progress bars. If multiple filesystems
+ are being checked, arrange to make sure that only one
+ e2fsck process is displaying a progress bar at a time.
+
+1999-07-08 <tytso at valinux.com>
+
+ * badblocks.c (do_test): Don't complain if the write error occurs
+ on a non-block boundary. This is perfectly common when
+ using blocksizes larger than 1k.
+
+1999-07-03 <tytso at valinux.com>
+
+ * uuidgen.c: Add option parsing so that user can ask for either a
+ time-based UUID or a random-based UUID.
+
+1999-07-02 <tytso at valinux.com>
+
+ * fsck.c: Added support for LABEL= and UUID= specifications for
+ the filesystem's device, to match what recent mount
+ programs can support. Also, close stdin when doing fsck
+ -A or when checking more than one filesystem at a time, so
+ that e2fsck doesn't try to ask interactive questions if
+ the filesystem appears to be mounted.
+
+ * get_device_by_label.c: New file added to support LABEL=foo and
+ UUID=bar type specifications.
+
+1999-07-01 <tytso at valinux.com>
+
+ * badblocks.c: Make the "done" string include enough spaces to
+ clear out a large block number.
+
+1999-06-29 <tytso at valinux.com>
+
+ * mke2fs.c (check_mount): Allow a filesystem to be made even if it
+ appears mounted if the force option is given.
+
+1999-06-24 <tytso at valinux.com>
+
+ * mke2fs.8.in: Fix typo in man page which caused the badblocks
+ command to not show up in the "SEE ALSO" section.
+
+1999-05-02 <tytso at rsts-11.mit.edu>
+
+ * findsuper.c: Added documentation from aeb at cwi.nl; some minor
+ code cleanups.
+
+1999-05-20 <tytso at rsts-11.mit.edu>
+
+ * dumpe2fs.c, dumpe2fs.8.in: Added 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.
+
+1999-03-11 Andreas Dilger <adilger at enel.ucalgary.ca>
+
+ * uuidgen.c, uuidgen.1.in: Created command-line utility to
+ generate UUIDs.
+
+1999-03-14 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * fsck.c (fsck_device, execute): Don't dereference a null pointer
+ when checking a filesystem not in /etc/fstab.
+
+1999-02-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * fsck.c (fsck_device): Print an error message if the user passes
+ in a device or directory name which isn't found in /etc/fstab.
+ Allow the location of /etc/fstab to be overridden by
+ the FSTAB_FILE environment variable.
+
+1999-01-30 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c (write_inode_tables): Add kludge code so that when the
+ MKE2FS_SYNC environment variable is set, mke2fs will sync
+ every MKE2FS_SYNC block groups, while it is writing out
+ the inode tables. 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.
+
+1999-01-16 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * fsck.c (execute, wait_one): Modified routines so that they
+ accurately create an fsck_instance even when the noexecute
+ flag is set. This allows for accurate debugging of the
+ fsck pass structure.
+ (check_all): When the verbose flag is given twice, print
+ debugging information about when fsck is waiting for jobs
+ to finish.
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * fsck.8.in: Clarified and expanded the documentation for the -A
+ switch.
+
+1999-01-07 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * fsck.c (load_fs_info): If the pass number field is missing, it
+ needs to be treated as zero.
+
+1999-01-05 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c (PRS): Add -N option to allow the user to specify
+ exactly how many inodes he/she wishes.
+
+ * chattr.c, lsattr.c: Only print the version information for the
+ program if the -V option is given.
+
+ * chattr.c: Ignore symbolic links when doing a recursive descent
+ through a directory.
+
+1999-01-01 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * fsck.c (load_fs_info, parse_fstab_line): Ignore fstab lines
+ are commented out. Also allow blank lines in the
+ /etc/fstab file.
+ (execute): In verbose mode, print the mountpount of the
+ filesystem which we are checking (user request).
+
+1998-12-30 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c: Add definition of SCSI_BLK_MAJOR if not defined, for
+ compatibility with Linux 1.2.13 header files.
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-12-07 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * mke2fs.8.in: Fixed stupid typo ("Raid options are _comma_
+ seperated", instead of common separated)
+
+1998-12-03 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Updated dependencies.
+
+1998-11-27 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * fsck.c (load_fs_info): Parse /etc/fstab ourselves, instead of
+ relying on getmntent(). This has the advantage of
+ allowing us to properly handle missing pass numbers correctly.
+
+1998-11-13 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * tune2fs.8.in: Fix minor display bug in the nroff.
+
+ * mke2fs.c (show_stats, write_inode_tables): Use the log10
+ function to calculate the display of block numbers so that
+ things look nice on an 80 character display.
+
+1998-10-12 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c (usage): Add the sparse-super-flag to the usage
+ message.
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+1998-07-04 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * findsuper.c (main): Print the block group number which is now
+ being written by e2fsprogs.
+
+1998-06-25 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * fsck.c (ignore): Remove unused variable cp.
+
+ * chattr.c (fatal_error):
+ * tune2fs.c (usage):
+ * lsattr.c (usage):
+ * dumpe2fs.c (usage):
+ * badblocks.c (usage): Remove volatile from declaration.
+
+ * fsck.c: Change use of strdup to be string_copy, since we don't
+ trust what glibc is doing with strdup. (Whatever it is,
+ it isn't pretty.)
+
+1998-06-19 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c (PRS): Add a -V option which prints the version number
+ and exit.
+
+1998-05-14 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * fsck.c (ignore): Remove check for filesystems with the noauto
+ option.
+
+1998-03-30 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Change to use new installation directory variables
+ convention. Fix uninstall rules to take $(DESTDIR) into
+ account. Remove cat8dir and cat1dir from the installdirs
+ target, since modern man package don't necessarily put the
+ cat directory in /usr/man/cat?.
+
+1998-03-29 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e2label.8.in: New man page to document the e2label function.
+
+ * e2label.c: Fix -Wall warning by making functions static.
+
+1998-03-28 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * chattr.1.in: Document that the append-only attribute may
+ only be set or cleared by the superuser.
+
+ * Update all manual pages to that the availability section is
+ up-to-date.
+
+ * e2label.8.in, tune2fs.8.in: Update manual page to state that
+ labels must be no longer than 16 characters, or they will
+ be truncated.
+
+ * e2label.c (change_label), tune2fs.c (main): If the label is
+ longer than 16 characters, print a warning message stating
+ that the label will be truncated.
+
+ * mke2fs.c (PRS): If the user specifies a filesystem size, and
+ it's larger than the apparent size of the device, print a
+ warning message and ask if the user wants to proceed.
+
+1998-03-21 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c (check_plausibility): Fixed spelling typo in warning
+ message. Fixed up -Wall warnings in file.
+
+Sun Mar 8 22:21:48 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * partinfo.c (main): The ioctl BLKGETSIZE requires a long, not an
+ int.
+
+Sun Feb 1 16:53:36 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * badblocks.8: Update documentation to note that output format
+ of badblocks is suitable for use with e2fsck -l or
+ mke2fs -l.
+
+ * mke2fs.c (handle_bad_blocks): Fix bug so that all groups with
+ bad superblock backup blocks are printed (not just the
+ first one).
+
+Mon Dec 1 17:01:04 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * badblocks.8.in: Add documentation for the -s option.
+
+Fri Oct 24 23:37:52 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * fsck.c:
+ * chattr.c: Remove #include of getopt.h, since it's not needed.
+
+ * tune2fs.c (main):
+ * lsattr.c (main):
+ * badblocks.c (main):
+ * dumpe2fs.c (main):
+ * mke2fs.c (PRS): Make the variable which getopt returns into be
+ an int, so that it won't lose on platforms where char is
+ unsigned.
+
+Fri Oct 3 13:38:45 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c (parse_raid_opts): Make parse_raid_opts return a void,
+ to fix a -Wall warning.
+
+Mon Sep 15 22:07:12 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * tune2fs.c (main):
+ * mklost+found.c (main):
+ * lsattr.c (main):
+ * dumpe2fs.c (main):
+ * chattr.c (main):
+ * badblocks.c (main): Declare main to return an int, as required.
+ Make sure main always ends with an exit(0). (Some
+ programs weren't doing this, and thus were returning a
+ random exit value.)
+
+Mon Jul 14 15:27:29 1997 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * e2label.c: New file contributed by Andries Brouwer which
+ provides an easy-to-use interface to modify the filesystem
+ label.
+
+ * Makefile.in (SPROGS): Add Makefile support to build e2label
+
+Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.11
+
+Mon Jun 16 23:37:54 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c (show_stats): Adjust the number of columns printed when
+ displaying the superblock backups to avoid running over
+ 80 columns when making a really big disk.
+
+Thu May 8 22:22:08 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * badblocks.8.in, chattr.1.in, dumpe2fs.8.in, fsck.8.in,
+ mke2fs.8.in, tune2fs.8.in: Fix minor typos and grammer
+ oops found by Bill Hawes (whawes at star.net).
+
+ * mke2fs.c (test_disk): Pass the blocksize to the bad blocks
+ command so that all of the filesystem gets tested in the
+ case where the blocksize 2048 or 4096.
+
+Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * Release of E2fsprogs version 1.10
+
+Thu Apr 24 09:52:47 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * mke2fs.c: Added new option -R, which specifies RAID options.
+ Currently the only supported RAID option is "stride" which
+ specifies the stripe width in RAID filesystem. This is
+ used to aid in the placement of the inode and block
+ bitmaps.
+
+ * mke2fs.8.in, tune2fs.8.in: Added warnings that the sparse
+ superblock option isn't yet supported by most kernels.
+
+Wed Apr 23 22:42:51 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * mke2fs.c (PRS): Make the default filesystem revision be 0, not
+ 1. (Since some people are still worried about 1.2.13
+ compatibility).
+
+Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.09
+
+Fri Apr 11 18:57:24 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * chattr.1.in: Updated man page so that the 'A' attribute is
+ specified everywhere.
+
+ * chattr.c (usage): Added usage message for the 'A' attribute.
+
+Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.08
+
+Thu Apr 10 07:08:03 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * dumpe2fs.c (list_desc): List the offsets of the inode and block
+ bitmaps, and the inode table. List the block boundaries
+ for the groups.
+
+Sat Apr 5 11:55:52 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * tune2fs.c (main): Implement the -s flag allows the user to
+ set and reset the sparse superblock flag.
+
+ * mke2fs.c (PRS): By default generate DYNAMIC revision
+ filesystems. The -s flag controls whether or not the
+ sparse superblock flag is set.
+ (PRS): Change to allow the user to specify the true
+ maximum number of blocks per group to reflect the
+ blocksize.
+
+Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * Release of E2fsprogs version 1.07
+
+Thu Mar 6 17:15:05 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c (create_root_dir): Set the root directory's i_uid and
+ i_gid to be the real user and group id.
+
+Tue Mar 4 10:14:33 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c (check_plausibility): Add more intelligent error
+ messages when the device doesn't exist.
+
+Sat Mar 1 10:43:32 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * fsck.c (main): Fix bug where the PATH environment variable isn't
+ set when it is unset.
+
+Tue Jan 14 12:30:45 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c (write_inode_tables): Fixed bug in write_inode_tables
+ where a loop variable was getting reused in a nested loop.
+ This caused the inode table to not be correctly
+ initialized.
+
+Thu Jan 2 00:00:37 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * lsattr.c, chattr.c: Include string.h, since we use memcpy().
+
+ * findsuper.c: Use time_t for ctime(), not __u32.
+
+Sat Dec 28 23:39:18 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * badblocks.c: Adapted -vv modifications from Rik Faith so that
+ they frequently update the block number field.
+
+ * badblocks.8.in: Document the optional start-block parameter
+
+Mon Oct 14 11:52:58 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c: Updated to use new ext2fs_allocate_tables() function.
+
+Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.06
+
+Mon Oct 7 00:56:24 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * chattr.1.in: Documented the 'A' (noatime) attribute.
+
+ * dumpe2fs.c (main): Change EXT2_SWAP to EXT2_FLAG_SWAP for
+ consistency's sake.
+
+Sun Sep 22 16:18:47 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * chattr.c (decode_arg): Add support for the 'A' (noatime) flag.
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
+Sat Sep 7 07:34:11 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * tune2fs.c (main): Add support for new option -C, which sets the
+ current number of mounts.
+ (main): Allow the interval to be specified in seconds,
+ mostly for debugging.
+
+Tue Aug 27 17:27:43 1996 Miles Bader <miles at gnu.ai.mit.edu>
+
+ * Makefile.in (SMANPAGES): Use @FSCK_MAN@ instead of fsck.8.
+ (SPROGS): Use @FSCK_PROG@ instead of fsck.
+
+Thu Aug 22 00:51:44 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c (zap_bootblock): Don't do zap_bootblock on a
+ sparc.
+
+Tue Aug 20 00:15:46 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * chattr.c (main): Fixed bug so that chattr -v works. (Bug report
+ and fix sent by Charles Howes, chowes at eznet.ca)
+
+Fri Aug 9 11:52:42 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * tune2fs.8.in:
+ * tune2fs.c: Added support for the -L option which sets the volume
+ label, the -M option which sets the last mounted
+ directory, and the -U option which sets the filesystem UUID.
+
+ * mke2fs.8.in:
+ * mke2fs.c: Added support for the -o option, which overrides the
+ creator OS. Generate a UUID for the filesystem, if
+ applicable. Added support for the -L option which sets
+ the volume label, and the -M option which sets the last
+ mounted directory.
+
+Sat Jun 22 17:43:17 1996 Remy Card <card at bbj.linux.eu.org>
+
+ * chattr.c (decode_arg): Integrated Michael Nonweiler's fix to
+ avoid a segmentation fault when the "-v" option is used
+ and no version number is specified.
+
+Thu May 16 11:12:30 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.04
+
+Wed May 15 21:15:43 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (fsck): fsck doesn't need to be linked with the ext2
+ libraries.
+
+Wed Mar 27 00:33:40 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.03
+
+Thu Mar 7 03:43:20 1996 <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c (PRS): Add (for development only) support to
+ specify revision and inode size of the new filesystem.
+
+Tue Mar 5 03:51:35 1996 <tytso at rsts-11.mit.edu>
+
+ * mke2fs.8.in: Fix a few minor typo's in the man page.
+
+ * mke2fs.c (reserve_inodes): Add support for dynamic first inode
+ revision.
+
+Mon Feb 5 22:19:49 1996 <tytso at rsts-11.mit.edu>
+
+ * fsck.c (check_all, PRS): Added new flag -P, which turns on the
+ parallel root option. This allows you to check the root
+ filesystem in parallel with the other filesystems. Note
+ that this is not the safest thing in the world to do,
+ since if the root filesystem is in doubt things like
+ the e2fsck executable might be corrupted! But some
+ sysadmins, who don't want to repartition the root
+ filesystem to be small and compact, may really want this
+ option turned on.
+
+Wed Jan 31 11:06:08 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.02
+
+Tue Oct 30 21:14:12 1995 <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c (check_plausibility): Add check to warn user if they
+ are trying to mke2fs the whole disk. (/dev/hda
+ vs. /dev/hda1)
+
+Fri Dec 15 19:09:56 1995 <tytso at rsts-11.mit.edu>
+
+ * fsck.c (check_all): If we break out of the loop because we are
+ serializing and have just started at fsck we haven't
+ finished the pass. We need to go round again in case there
+ are more filesystems to be done in this pass. (Patch
+ submitted by Mike Jagdis)
+
+Sat Dec 9 10:07:16 1995 <tytso at rsts-11.mit.edu>
+
+ * dumpe2fs.c (in_use): test_bit() was renamed to
+ ext2fs_test_bit().
+
+Mon Oct 30 20:21:18 1995 <tytso at rsts-11.mit.edu>
+
+ * fsck.c (fsck_device): Check fstype instead of type; this was a
+ stupid typo which caused coredumps in some cases.
+
+Thu Oct 26 12:05:18 1995 <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (install): Strip programs when they are installed.
+
+Fri Aug 18 15:10:40 1995 Theodore Y. Ts'o <tytso at dcl>
+
+ * mke2fs.c (PRS): Move call of check_mount() from main() to PRS(),
+ so we do the check to see if the filesystem is mounted
+ *before* we try to determine the size of the device.
+
+Wed Sep 6 23:34:07 1995 Remy Card <card at bbj>
+
+ * fsck.c (load_fs_info): Load the informations from /etc/fstab in
+ the same order.
+
+Thu Aug 17 22:33:09 1995 <tytso at rsts-11.mit.edu>
+
+ * mke2fs.c (check_mount): Use the new ext2fs_check_if_mounted()
+ function to determine if the device is mounted.
+
+ * mke2fs.c (PRS): Change call to use the new
+ ext2fs_get_device_size() function in order to determine
+ the size of the filesystem. Remove get_size() and
+ is_valid_offset(), which are no longer called.
+
+Fri Aug 11 08:26:24 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * fsck.c (fsck_device): Make sure fstype has been set by the user
+ and that it does not begin with "no" and the user has
+ specified exactly one type before using it as the type to
+ check.
+
+Fri Aug 11 14:17:18 1995 Remy Card <card at bbj>
+
+ * badblocks.8:
+ * chattr.1:
+ * dumpe2fs.8:
+ * fsck.8:
+ * lsattr.1:
+ * mke2fs.8:
+ * mklost+found.8:
+ * tune2fs.8: Updated date and version number.
+
+Thu Aug 10 14:18:36 1995 Remy Card <card at bbj>
+
+ * tune2fs.c: Fixed a bug which prevented the use of user and group
+ names with the -g and -u options. Thanks to Jean Christophe
+ ANDRE <progfou at mycrob.cafard.freenix.fr>.
+
+ * mke2fs.8:
+ * tune2fs.8: Fixed a spelling error in Ted's name :-)
+
+Wed Aug 9 20:41:54 1995 Theodore Y. Ts'o <tytso at dcl>
+
+ * mke2fs.c (count_blocks): Divide the size by
+ EXT2_BLOCK_SIZE(¶m), instead of assuming that the
+ blocksize is always 1024 bytes.
+
+Sat Aug 5 12:00:51 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * mke2fs.c (PRS): Use malloc() instead of alloca() --- alloca() is
+ not portable!! In any case putenv() in some systems must
+ take a static character array or malloc()'ed memory;
+ passing memory allocated using alloca() to putenv() is not
+ advisable.
+
+ * chattr.c (chattr_dir_proc):
+ * lsattr.c (lsattr_dir_proc): Use malloc() instead of alloca() ---
+ alloca is not portable!
+
+ * fsck.c (fsck_device): If the filesystem type is specified by the
+ user using the -t option, let it override the type in
+ /etc/fstab.
+
+ * fsck.c (strdup): Don't build strdup() if the system defines it.
+
+Mon Jun 12 19:15:10 1995 Theodore Y. Ts'o (tytso at dcl)
+
+ * chattr.c, lsattr.c: Include <sys/types.h> for <dirent.h>'s
+ benefit.
+
+ * The $(UPROGS) go in bin, not sbin.
+
+ * badblocks.c, chattr.c, dumpe2fs.c, fsck.c, lsattr.c, mke2fs.c,
+ tune2fs.c: Don't include <getopt.h> if it doesn't exist.
+
+Mon Jun 12 16:36:04 1995 Theodore Y. Ts'o <tytso at dcl>
+
+ * badblocks.c, chattr.c, dumpe2fs.c, fsck.c, lsattr.c, mke2fs.c,
+ tune2fs.c: Only include getopt.h if HAVE_GETOPT_H is defined.
+
+Sat Jun 10 23:37:09 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * chattr.c: Include errno.h, since we use errno
+
+ * fsck.c (load_fs_info): If HAVE_MNTENT_H is not defined,
+ explicitly initialize filesys_info to be NULL.
+
+ * mke2fs.c: Include the stdio.h and errno.h header files
+
+Thu Jun 8 13:25:23 1995 Miles Bader <miles at churchy.gnu.ai.mit.edu>
+
+ * mke2fs.c: Only include <linux/fs.h> if we can.
+ (get_size): Don't try to use the BLKGETSIZE ioctl unless it's defined.
+ (check_mount): Only check to see if the device is mounted if
+ HAVE_MNTENT_H is defined (by configure).
+
+ * fsck.c (load_fs_info): Only try to get info about filesystems if
+ HAVE_MNTENT_H is defined (by configure).
+ (main): Allocate space for a new fsck_path instead of append to a
+ statically sized buffer.
+ (PRS): Use alloca to allocate the new path string, instead of
+ having a fixed size buffer (which was the wrong size anyway).
+
+ * chattr.c (chattr_dir_proc): Use alloca to allocate space for a
+ filename instead of using a fixed-size buffer.
+ * lsattr.c (lsattr_dir_proc): Ditto.
+ * mklost+fond.c (main): Calculate the actual needed size for the
+ path buffer instead of using MAXPATHLEN (which not all systems have).
+
+ * badblocks.c: Only include linux include files if we have them.
+ (flush_bufs): New function to flush a block device, optionally
+ syncing it first. This replaces other copies of this code.
+ (test_ro): Replace calls to ioctl with flush_bufs().
+ (test_rw): Ditto.
+
+ * Makefile.in: Rewritten to conform to GNU coding standards and
+ support separate compilation directories.
+
+Sat Mar 11 10:59:58 1995 Theodore Y. Ts'o <tytso at localhost>
+
+ * mke2fs.c (main, zap_bootblock): Added new function
+ zap_bootblock() which clears the first 512 bytes of the
+ filesystem. This protects the filesystem from being
+ misidentified as a MS-DOS FAT filesystem.
+
+ * badblocks.c (alarm_intr, test_ro, test_rw): Increase the space
+ allocated for printing the block numbers, so that the
+ display doesn't get corrupted when running badblocks on a
+ very large partition.
+
+ * badblocks.c (do_test, test_ro, test_rw): Added missing cast to
+ ext2_loff_t, so that when checking a large device,
+ spurious seek errors aren't reported.
+
+ * mke2fs.c (count_blocks): Declare mid to be of type ext2_loff_t
+ instead of type int, so that it works for filesystems
+ greater than 2 GB. (Fortunately count_blocks is only
+ called if the device does not support the BLKGETSIZE
+ ioctl, which most do.)
+
+ * fsck.c (ignore): Add check to ignore filesystems with a pass
+ number of zero. (This check was accidentally deleted at
+ during 0.5b development.)
+
+Sat Dec 31 00:47:16 1994 <tytso at rsx-11.mit.edu>
+
+ * mke2fs.c (new_table_block, alloc_tables, PRS, main): Add a new
+ option, -S, which only writes the superblock and group
+ descriptors. Useful for recovering when all of the
+ superblocks are corrupted somehow (as a last ditch
+ measure).
+
+ Also, don't bother initializing the bitmap blocks in
+ alloc_tables(), since they will be overwritten at the end
+ anyway. (Should speed up mke2fs by a little.)
+
+Tue Dec 6 02:20:55 1994 <tytso at rsx-11.mit.edu>
+
+ * fsck.c (main): Fix stupid typo where a null inst would be freed.
+
+ * fsck.c (wait_one): Check WIFEXITED on status before trying to
+ extract the exit status. In other cases, return
+ FSCK_ERROR if the back end processor exited with a signal.
+
+Tue Nov 15 10:20:00 1994 Remy Card <card at bbj>
+
+ * tune2fs.c (main): Fixed a bug which prevented the use of the
+ new options.
+ Added the `w' (week) suffix recognition in the check interval.
+
+Sun Nov 13 15:58:48 1994 (tytso at rsx-11)
+
+ * fsck.c (load_fs_info): If the user has an obviously old
+ /etc/fstab file, issue a warning message and assume that
+ all partitions should be checked.
+
+Sat Nov 12 00:33:18 1994 (tytso at rsx-11)
+
+ * dumpe2fs.c (list_desc): Update to new inode and block bitmap
+ structures.
+
+ * mke2fs.c (create_root_dir): Create the root directory owned by
+ the effective uid.
+
+Mon Nov 7 22:04:37 1994 Remy Card <card at bbj>
+
+ * tune2fs.c (main.c): Added support for new options:
+ -r reserved_blocks_count, -g reserved_gid, -u reserved_uid.
+
+Sun Aug 21 00:57:33 1994 Theodore Y. Ts'o (tytso at rt-11)
+
+ * fsck.c (ignore): If the pass number is 0, ignore the filesystem.
+
+Wed Aug 17 21:55:03 1994 Remy Card (card at bbj)
+
+ * badblocks.c (test_rw): Added verbose output like in the
+ read-only test.
+
+ (do_test and test_rw): Use the llseek system call if available.
+
+ * chattr.c: Added support for new attributes.
+
+ * lsattr.c: Added support for long format.
+
+ * mke2fs.c (usage): Fixed bogus usage message.
+
+ (valid_offset): Use the llseek system call if available.
+
+Wed Aug 17 10:50:57 1994 Theodore Y. Ts'o (tytso at rt-11)
+
+ * mke2fs.c (handle_bad_blocks): Check to see if a bad block is
+ where a backup superblock/group descriptor is stored. If so,
+ print a warning message and adjust the superblock counts so that
+ they are correct. (Otherwise, the bad block will get counted
+ twice and the # of free blocks count will be wrong.)
+
+ (alloc_tables): Removed code which calcualated the free block
+ statistics, which was moved to lib/ext2fs/initialize.c. This
+ allows the bad block code to adjust the group descriptor
+ statistics if necessary.
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/Makefile.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/Makefile.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/Makefile.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,259 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = misc
+INSTALL = @INSTALL@
+
+ at MCONFIG@
+
+ at IMAGER_CMT@E2IMAGE_PROG= e2image
+ at IMAGER_CMT@E2IMAGE_MAN= e2image.8
+
+SPROGS= mke2fs badblocks tune2fs dumpe2fs $(E2IMAGE_PROG) @FSCK_PROG@
+USPROGS= mklost+found
+SMANPAGES= tune2fs.8 mklost+found.8 mke2fs.8 dumpe2fs.8 badblocks.8 \
+ e2label.8 $(E2IMAGE_MAN) @FSCK_MAN@
+
+UPROGS= chattr lsattr uuidgen
+UMANPAGES= chattr.1 lsattr.1 uuidgen.1
+
+TUNE2FS_OBJS= tune2fs.o util.o get_device_by_label.o
+MKLPF_OBJS= mklost+found.o
+MKE2FS_OBJS= mke2fs.o util.o get_device_by_label.o
+CHATTR_OBJS= chattr.o
+LSATTR_OBJS= lsattr.o
+UUIDGEN_OBJS= uuidgen.o
+DUMPE2FS_OBJS= dumpe2fs.o
+BADBLOCKS_OBJS= badblocks.o
+E2IMAGE_OBJS= e2image.o
+FSCK_OBJS= fsck.o get_device_by_label.o base_device.o fstype.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)/fstype.c
+
+LIBS= $(LIBEXT2FS) $(LIBCOM_ERR)
+DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR)
+
+STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+
+LIBS_E2P= $(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR)
+DEPLIBS_E2P= $(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR)
+
+.c.o:
+ $(CC) -c $(ALL_CFLAGS) $< -o $@
+
+all:: $(SPROGS) $(UPROGS) $(USPROGS) $(SMANPAGES) $(UMANPAGES)
+
+findsuper: findsuper.o
+ $(CC) $(ALL_LDFLAGS) -o findsuper findsuper.o
+
+tune2fs: $(TUNE2FS_OBJS) $(DEPLIBS_E2P) $(DEPLIBUUID)
+ $(CC) $(ALL_LDFLAGS) -o tune2fs $(TUNE2FS_OBJS) $(LIBS_E2P) $(LIBUUID)
+
+e2image: $(E2IMAGE_OBJS) $(DEPLIBS)
+ $(CC) $(ALL_LDFLAGS) -o e2image $(E2IMAGE_OBJS) $(LIBS)
+
+base_device: base_device.c
+ $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(srcdir)/base_device.c \
+ -DDEBUG -o base_device
+
+fstype: fstype.c
+ $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -DTEST_PROGRAM $(srcdir)/fstype.c \
+ get_device_by_label.o $(LIBUUID) $(LIBS) -o fstype
+
+check:: base_device
+ ./base_device < $(srcdir)/base_device.tst > base_device.out
+ cmp $(srcdir)/base_device.tst base_device.out
+
+mklost+found: $(MKLPF_OBJS)
+ $(CC) $(ALL_LDFLAGS) -o mklost+found $(MKLPF_OBJS)
+
+mke2fs: $(MKE2FS_OBJS) $(DEPLIBS) $(LIBE2P) $(DEPLIBUUID)
+ $(CC) $(ALL_LDFLAGS) -o mke2fs $(MKE2FS_OBJS) $(LIBS) $(LIBE2P) $(LIBUUID)
+
+mke2fs.static: $(MKE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIBUUID)
+ $(CC) $(ALL_LDFLAGS) -static -o mke2fs.static $(MKE2FS_OBJS) \
+ $(STATIC_LIBS) $(STATIC_LIBE2P) $(STATIC_LIBUUID)
+
+resize2fs: resize2fs.o $(DEPLIBS)
+ $(CC) $(ALL_LDFLAGS) -o resize2fs resize2fs.o $(LIBS)
+
+chattr: $(CHATTR_OBJS) $(DEPLIBS_E2P)
+ $(CC) $(ALL_LDFLAGS) -o chattr $(CHATTR_OBJS) $(LIBS_E2P)
+
+lsattr: $(LSATTR_OBJS) $(DEPLIBS_E2P)
+ $(CC) $(ALL_LDFLAGS) -o lsattr $(LSATTR_OBJS) $(LIBS_E2P)
+
+uuidgen: $(UUIDGEN_OBJS) $(DEPLIBUUID)
+ $(CC) $(ALL_LDFLAGS) -o uuidgen $(UUIDGEN_OBJS) $(LIBUUID)
+
+dumpe2fs: $(DUMPE2FS_OBJS) $(DEPLIBS_E2P) $(DEPLIBUUID)
+ $(CC) $(ALL_LDFLAGS) -o dumpe2fs $(DUMPE2FS_OBJS) $(LIBS_E2P) $(LIBUUID)
+
+fsck: $(FSCK_OBJS)
+ $(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBS)
+
+badblocks: $(BADBLOCKS_OBJS) $(DEPLIBS)
+ $(CC) $(ALL_LDFLAGS) -o badblocks $(BADBLOCKS_OBJS) $(LIBS)
+
+tune2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/tune2fs.8.in
+ $(SUBSTITUTE) $(srcdir)/tune2fs.8.in tune2fs.8
+
+mklost+found.8: $(DEP_SUBSTITUTE) $(srcdir)/mklost+found.8.in
+ $(SUBSTITUTE) $(srcdir)/mklost+found.8.in mklost+found.8
+
+mke2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/mke2fs.8.in
+ $(SUBSTITUTE) $(srcdir)/mke2fs.8.in mke2fs.8
+
+e2label.8: $(DEP_SUBSTITUTE) $(srcdir)/e2label.8.in
+ $(SUBSTITUTE) $(srcdir)/e2label.8.in e2label.8
+
+e2image.8: $(DEP_SUBSTITUTE) $(srcdir)/e2image.8.in
+ $(SUBSTITUTE) $(srcdir)/e2image.8.in e2image.8
+
+dumpe2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/dumpe2fs.8.in
+ $(SUBSTITUTE) $(srcdir)/dumpe2fs.8.in dumpe2fs.8
+
+badblocks.8: $(DEP_SUBSTITUTE) $(srcdir)/badblocks.8.in
+ $(SUBSTITUTE) $(srcdir)/badblocks.8.in badblocks.8
+
+fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/fsck.8.in
+ $(SUBSTITUTE) $(srcdir)/fsck.8.in fsck.8
+
+chattr.1: $(DEP_SUBSTITUTE) $(srcdir)/chattr.1.in
+ $(SUBSTITUTE) $(srcdir)/chattr.1.in chattr.1
+
+lsattr.1: $(DEP_SUBSTITUTE) $(srcdir)/lsattr.1.in
+ $(SUBSTITUTE) $(srcdir)/lsattr.1.in lsattr.1
+
+uuidgen.1: $(DEP_SUBSTITUTE) $(srcdir)/uuidgen.1.in
+ $(SUBSTITUTE) $(srcdir)/uuidgen.1.in uuidgen.1
+
+installdirs:
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) \
+ $(DESTDIR)$(root_sbindir) $(DESTDIR)$(bindir) \
+ $(DESTDIR)$(man1dir) $(DESTDIR)$(man8dir)
+
+install: all $(SMANPAGES) $(UMANPAGES) installdirs
+ for i in $(SPROGS); do \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
+ $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ for i in $(USPROGS); do \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir)/$$i; \
+ $(STRIP) $(DESTDIR)$(sbindir)/$$i; \
+ done
+ $(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \
+ $(DESTDIR)$(root_sbindir)/mkfs.ext2
+ $(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \
+ $(DESTDIR)$(root_sbindir)/mkfs.ext3
+ $(LN) -f $(DESTDIR)$(root_sbindir)/tune2fs \
+ $(DESTDIR)$(root_sbindir)/e2label
+ for i in $(UPROGS); do \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir)/$$i; \
+ $(STRIP) $(DESTDIR)$(bindir)/$$i; \
+ done
+ for i in $(SMANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man8dir)/$$i.gz; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
+ done
+ $(RM) -f $(DESTDIR)$(man8dir)/mkfs.ext2.8.gz \
+ $(DESTDIR)$(man8dir)/mkfs.ext3.8.gz
+ $(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 $(DESTDIR)$(man8dir)/mkfs.ext2.8
+ $(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 $(DESTDIR)$(man8dir)/mkfs.ext3.8
+ for i in $(UMANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man1dir)/$$i.gz; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man1dir)/$$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
+ $(RM) -f $(DESTDIR)$(root_sbindir)/mkfs.ext2 \
+ $(DESTDIR)$(root_sbindir)/mkfs.ext3
+ 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
+ for i in $(UMANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man1dir)/$$i; \
+ done
+
+clean:
+ $(RM) -f $(SPROGS) $(USPROGS) $(UPROGS) $(UMANPAGES) $(SMANPAGES) \
+ base_device base_device.out mke2fs.static \
+ \#* *.s *.o *.a *~ core
+
+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_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.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/bitops.h \
+ $(top_srcdir)/lib/uuid/uuid.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 $(srcdir)/get_device_by_label.h $(top_srcdir)/version.h \
+ $(srcdir)/nls-enable.h
+mklost+found.o: $(srcdir)/mklost+found.c $(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_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/uuid/uuid.h $(top_srcdir)/lib/e2p/e2p.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 \
+ $(srcdir)/util.h $(top_srcdir)/version.h $(srcdir)/nls-enable.h
+chattr.o: $(srcdir)/chattr.c $(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_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_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.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/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)/lib/uuid/uuid.h \
+ $(top_srcdir)/version.h $(srcdir)/nls-enable.h
+badblocks.o: $(srcdir)/badblocks.c $(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_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
+ $(srcdir)/nls-enable.h
+fsck.o: $(srcdir)/fsck.c $(top_srcdir)/version.h $(srcdir)/nls-enable.h \
+ $(srcdir)/fsck.h $(srcdir)/get_device_by_label.h
+util.o: $(srcdir)/util.c $(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/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/nls-enable.h \
+ $(srcdir)/get_device_by_label.h $(srcdir)/util.h
+uuidgen.o: $(srcdir)/uuidgen.c $(top_srcdir)/lib/uuid/uuid.h \
+ $(srcdir)/nls-enable.h
+fstype.o: $(srcdir)/fstype.c $(srcdir)/fsck.h
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/badblocks.8.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/badblocks.8.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/badblocks.8.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,180 @@
+.\" -*- 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 \-svwnf
+]
+[
+.B \-b
+.I block-size
+]
+[
+.B \-c
+.I blocks_at_once
+]
+[
+.B \-i
+.I input_file
+]
+[
+.B \-o
+.I output_file
+]
+[
+.B \-p
+.I num_passes
+]
+.I device
+[
+.I last-block
+] [
+.I start-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 start-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 is very dependent on the
+block size in use. 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.
+.TP
+.BI \-c " number of blocks"
+is the number of blocks which are tested at a time. The default is 16.
+Increasing this number will increase the efficiency of
+.B badblocks
+but also will increase its memory usage.
+.B Badblocks
+needs memory proportional to the number of blocks tested at once, in
+read-only mode, proportional to twice that number in read-write mode,
+and proportional to three times that number in non-destructive read-write
+mode. If you set the number-of-blocks parameter to too high a value,
+.B badblocks
+will exit almost immediately with an out-of-memory error "while allocating
+buffers". If you set it too low, however, for a non-destructive-write-mode
+test, then it's possble for questionable blocks on an unreliable
+hard drive to be hidden by the effects of the hard disk track buffer.
+.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; even a non-destructive test can damage a mounted
+filesystem. This can be overriden 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
+.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 \-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
+.B \-s
+Show the progress of the scan by writing out the block numbers as they
+are checked.
+.TP
+.B \-v
+Verbose mode.
+.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.
+.SH WARNING
+Never use the
+.B \-w
+option on an 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.
+.SH AUTHOR
+.B badblocks
+was written by Remy Card <Remy.Card at linux.org>. Current maintainer is
+Theodore Ts'o <tytso at alum.mit.edu>. Non-destructive read/write test
+implemented by David Beattie <dbeattie at 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)
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/badblocks.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/badblocks.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/badblocks.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,866 @@
+/*
+ * badblocks.c - Bad blocks checker
+ *
+ * Copyright (C) 1992, 1993, 1994 Remy Card <card at 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 at 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)
+ */
+
+#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 <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"
+
+const char * program_name = "badblocks";
+const char * done_string = N_("done \n");
+
+static int v_flag = 0; /* verbose */
+static int w_flag = 0; /* do r/w test: 0=no, 1=yes,
+ * 2=non-destructive */
+static int s_flag = 0; /* show progress of test */
+static int force = 0; /* force check of mounted device */
+
+static void usage(void)
+{
+ fprintf(stderr, _("Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnf]\n [-c blocks_at_once] [-p num_passes] device [last_block [start_count]]\n"),
+ program_name);
+ exit (1);
+}
+
+static unsigned long currently_testing = 0;
+static unsigned long num_blocks = 0;
+static ext2_badblocks_list bb_list = NULL;
+static FILE *out;
+static blk_t next_bad = 0;
+static ext2_badblocks_iterate bb_iter = NULL;
+
+/*
+ * 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 (unsigned long bad)
+{
+ errcode_t errcode;
+
+ if (ext2fs_badblocks_list_test(bb_list, bad))
+ return 0;
+
+ fprintf (out, "%lu\n", bad);
+
+ 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);
+ return 1;
+}
+
+static void print_status(void)
+{
+ fprintf(stderr, "%9ld/%9ld", currently_testing, num_blocks);
+ fprintf(stderr, "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
+ fflush (stderr);
+}
+
+static void alarm_intr(int alnum)
+{
+ signal (SIGALRM, alarm_intr);
+ alarm(1);
+ if (!num_blocks)
+ return;
+ fprintf(stderr, "%9ld/%9ld", currently_testing, num_blocks);
+ fprintf(stderr, "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
+ fflush (stderr);
+}
+
+static void *terminate_addr = NULL;
+
+static void terminate_intr(int signo)
+{
+ 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);
+}
+
+/*
+ * Perform a read of a sequence of blocks; return the number of blocks
+ * successfully sequentially read.
+ */
+static long do_read (int dev, char * buffer, int try, int block_size,
+ unsigned long current_block)
+{
+ long got;
+
+ 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, _("during seek"));
+
+ /* Try the read */
+ got = read (dev, buffer, try * block_size);
+ if (got < 0)
+ got = 0;
+ if (got & 511)
+ fprintf(stderr, _("Weird value (%ld) in do_read\n"), got);
+ got /= block_size;
+ return got;
+}
+
+/*
+ * Perform a write of a sequence of blocks; return the number of blocks
+ * successfully sequentially written.
+ */
+static long do_write (int dev, char * buffer, int try, int block_size,
+ unsigned long current_block)
+{
+ long got;
+
+ 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, _("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;
+
+ retval = ext2fs_sync_device(host_dev, 1);
+ if (retval)
+ com_err(program_name, retval, _("during ext2fs_sync_device"));
+}
+
+static unsigned int test_ro (int dev, unsigned long last_block,
+ int block_size, unsigned long from_count,
+ unsigned long blocks_at_once)
+{
+ char * blkbuf;
+ int try;
+ long got;
+ unsigned int bb_count = 0;
+ errcode_t errcode;
+
+ errcode = ext2fs_badblocks_list_iterate_begin(bb_list,&bb_iter);
+ if (errcode) {
+ com_err (program_name, errcode,
+ _("while beginning bad block list iteration"));
+ exit (1);
+ }
+ do {
+ ext2fs_badblocks_list_iterate (bb_iter, &next_bad);
+ } while (next_bad && next_bad < from_count);
+
+ blkbuf = malloc (blocks_at_once * block_size);
+ if (!blkbuf)
+ {
+ com_err (program_name, ENOMEM, _("while allocating buffers"));
+ exit (1);
+ }
+ flush_bufs();
+ if (v_flag) {
+ fprintf(stderr, _("Checking for bad blocks in read-only mode\n"));
+ fprintf (stderr, _("From block %lu to %lu\n"), from_count,
+ last_block);
+ }
+ try = blocks_at_once;
+ currently_testing = from_count;
+ num_blocks = last_block;
+ if (s_flag || v_flag > 1) {
+ fprintf(stderr,
+ _("Checking for bad blocks (read-only test): "));
+ if (v_flag <= 1)
+ alarm_intr(SIGALRM);
+ }
+ while (currently_testing < last_block)
+ {
+ 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);
+ currently_testing += got;
+ if (got == try) {
+ try = blocks_at_once;
+ continue;
+ }
+ else
+ try = 1;
+ if (got == 0) {
+ bb_count += bb_output(currently_testing++);
+ }
+ }
+ num_blocks = 0;
+ alarm(0);
+ if (s_flag || v_flag > 1)
+ fprintf(stderr, _(done_string));
+
+ fflush (stderr);
+ free (blkbuf);
+
+ ext2fs_badblocks_list_iterate_end(bb_iter);
+
+ return bb_count;
+}
+
+static unsigned int test_rw (int dev, unsigned long last_block,
+ int block_size, unsigned long from_count,
+ unsigned long blocks_at_once)
+{
+ int i;
+ char * buffer;
+ static unsigned char pattern[] = {0xaa, 0x55, 0xff, 0x00};
+ unsigned int bb_count = 0;
+
+ buffer = malloc (2 * block_size);
+ if (!buffer)
+ {
+ com_err (program_name, ENOMEM, _("while allocating buffers"));
+ exit (1);
+ }
+
+ flush_bufs();
+
+ if (v_flag) {
+ fprintf(stderr,
+ _("Checking for bad blocks in read-write mode\n"));
+ fprintf(stderr, _("From block %lu to %lu\n"),
+ from_count, last_block);
+ }
+ for (i = 0; i < sizeof (pattern); i++) {
+ memset (buffer, pattern[i], block_size);
+ if (s_flag | v_flag)
+ fprintf (stderr, _("Writing pattern 0x%08x: "),
+ *((int *) buffer));
+ num_blocks = last_block;
+ currently_testing = from_count;
+ if (s_flag && v_flag <= 1)
+ alarm_intr(SIGALRM);
+ for (;
+ currently_testing < last_block;
+ currently_testing++)
+ {
+ if (ext2fs_llseek (dev, (ext2_loff_t) currently_testing *
+ block_size, SEEK_SET) !=
+ (ext2_loff_t) currently_testing * block_size)
+ com_err (program_name, errno,
+ _("during seek on block %d"),
+ currently_testing);
+ if (v_flag > 1)
+ print_status();
+ write (dev, buffer, block_size);
+ }
+ num_blocks = 0;
+ alarm (0);
+ if (s_flag | v_flag)
+ fprintf(stderr, _(done_string));
+ flush_bufs();
+ if (s_flag | v_flag)
+ fprintf (stderr, _("Reading and comparing: "));
+ num_blocks = last_block;
+ currently_testing = from_count;
+ if (s_flag && v_flag <= 1)
+ alarm_intr(SIGALRM);
+ for (;
+ currently_testing < last_block;
+ currently_testing++)
+ {
+ if (ext2fs_llseek (dev, (ext2_loff_t) currently_testing *
+ block_size, SEEK_SET) !=
+ (ext2_loff_t) currently_testing * block_size)
+ com_err (program_name, errno,
+ _("during seek on block %d"),
+ currently_testing);
+ if (v_flag > 1)
+ print_status();
+ if ((read (dev, buffer + block_size, block_size)
+ != block_size) ||
+ memcmp(buffer, buffer + block_size, block_size))
+ bb_count += bb_output(currently_testing);
+ }
+ num_blocks = 0;
+ alarm (0);
+ if (s_flag | v_flag)
+ fprintf(stderr, _(done_string));
+ flush_bufs();
+ }
+
+ return bb_count;
+}
+
+struct saved_blk_record {
+ blk_t block;
+ int num;
+};
+
+static unsigned int test_nd (int dev, unsigned long last_block,
+ int block_size, unsigned long from_count,
+ unsigned long blocks_at_once)
+{
+ char *blkbuf, *save_ptr, *test_ptr, *read_ptr;
+ char * ptr;
+ int try, i;
+ long got, used2, written, 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;
+ long buf_used;
+ unsigned int bb_count;
+
+ errcode = ext2fs_badblocks_list_iterate_begin(bb_list,&bb_iter);
+ if (errcode) {
+ com_err (program_name, errcode,
+ _("while beginning bad block list iteration"));
+ exit (1);
+ }
+ do {
+ ext2fs_badblocks_list_iterate (bb_iter, &next_bad);
+ } while (next_bad && next_bad < from_count);
+
+ blkbuf = malloc (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, _("while allocating buffers"));
+ exit (1);
+ }
+ num_saved = 0;
+
+ /* inititalize the test data randomly: */
+ if (v_flag) {
+ fprintf (stderr, _("Initializing random test data\n"));
+ }
+ for(ptr = blkbuf + blocks_at_once * block_size;
+ ptr < blkbuf + 2 * blocks_at_once * block_size;
+ ++ptr) {
+ (*ptr) = random() % (1 << sizeof(char));
+ }
+
+ flush_bufs();
+ if (v_flag) {
+ fprintf (stderr,
+ _("Checking for bad blocks in non-destructive read-write mode\n"));
+ fprintf (stderr, _("From block %lu to %lu\n"), from_count, last_block);
+ }
+ if (s_flag || v_flag > 1) {
+ fprintf(stderr, _("Checking for bad blocks (non-destructive read-write test): "));
+ if (v_flag <= 1)
+ alarm_intr(SIGALRM);
+ }
+ if (setjmp(terminate_env)) {
+ /*
+ * Abnormal termination by a signal is handled here.
+ */
+ signal (SIGALRM, SIG_IGN);
+ fprintf(stderr, _("\nInterrupt caught, cleaning up\n"));
+
+ save_ptr = blkbuf;
+ 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);
+
+ buf_used = 0;
+ bb_count = 0;
+ save_ptr = blkbuf;
+ test_ptr = blkbuf + (blocks_at_once * block_size);
+ currently_testing = from_count;
+ num_blocks = last_block;
+
+ while (currently_testing < last_block) {
+ try = blocks_at_once - 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) {
+ /* First block must have been bad. */
+ bb_count += bb_output(currently_testing++);
+ 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"),
+ currently_testing + written);
+
+ buf_used += got;
+ save_ptr += got * block_size;
+ test_ptr += got * block_size;
+ currently_testing += got;
+ if (got != try)
+ bb_count += bb_output(currently_testing++);
+
+ 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 != blocks_at_once) &&
+ (currently_testing < last_block))
+ continue;
+
+ 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 = blkbuf;
+ test_ptr = blkbuf + (blocks_at_once * block_size);
+ read_ptr = blkbuf + (2 * blocks_at_once * block_size);
+ 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);
+ if (got < try) {
+ bb_count += bb_output(currently_testing + got);
+ got++;
+ }
+
+ /* when done, write back original data */
+ do_write (dev, save_ptr, got, block_size,
+ currently_testing);
+
+ currently_testing += got;
+ save_ptr += got * block_size;
+ 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 = blkbuf;
+ test_ptr = blkbuf + (blocks_at_once * block_size);
+ currently_testing = save_currently_testing;
+ }
+ num_blocks = 0;
+ alarm(0);
+ uncapture_terminate();
+ if (s_flag || v_flag > 1)
+ fprintf(stderr, _(done_string));
+
+ 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))
+ return;
+
+ fprintf(stderr, _("%s is mounted; "), device_name);
+ if (force) {
+ fprintf(stderr, _("badblocks forced anyway. "
+ "Hope /etc/mtab is incorrect.\n"));
+ return;
+ }
+ fprintf(stderr, _("it's not safe to run badblocks!\n"));
+ exit(1);
+}
+
+
+int main (int argc, char ** argv)
+{
+ int c;
+ char * tmp;
+ char * device_name;
+ char * host_device_name = NULL;
+ char * input_file = NULL;
+ char * output_file = NULL;
+ FILE * in = NULL;
+ int block_size = 1024;
+ unsigned long blocks_at_once = 16;
+ blk_t last_block, from_count;
+ int num_passes = 0;
+ int passes_clean = 0;
+ int dev;
+ errcode_t errcode;
+ unsigned int (*test_func)(int, unsigned long,
+ int, unsigned long,
+ unsigned long);
+
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+#endif
+ test_func = test_ro;
+
+ if (argc && *argv)
+ program_name = *argv;
+ while ((c = getopt (argc, argv, "b:fi:o:svwnc:p:h:")) != EOF) {
+ switch (c) {
+ case 'b':
+ block_size = strtoul (optarg, &tmp, 0);
+ if (*tmp || block_size > 4096) {
+ com_err (program_name, 0,
+ _("bad block size - %s"), optarg);
+ exit (1);
+ }
+ 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)
+ usage();
+ test_func = test_rw;
+ w_flag = 1;
+ break;
+ case 'n':
+ if (w_flag)
+ usage();
+ test_func = test_nd;
+ w_flag = 2;
+ break;
+ case 'c':
+ blocks_at_once = strtoul (optarg, &tmp, 0);
+ if (*tmp) {
+ com_err (program_name, 0,
+ "bad simultaneous block count - %s", optarg);
+ exit (1);
+ }
+ break;
+ case 'p':
+ num_passes = strtoul (optarg, &tmp, 0);
+ if (*tmp) {
+ com_err (program_name, 0,
+ "bad number of clean passes - %s", optarg);
+ exit (1);
+ }
+ break;
+ case 'h':
+ host_device_name = optarg;
+ break;
+ default:
+ usage();
+ }
+ }
+ if (optind > argc - 1)
+ usage();
+ device_name = argv[optind++];
+ if (optind > argc - 1) {
+ errcode = ext2fs_get_device_size(device_name,
+ block_size,
+ &last_block);
+ if (errcode == EXT2_ET_UNIMPLEMENTED) {
+ com_err(program_name, 0,
+ _("Couldn't determine device size; you "
+ "must specify\nthe size manually\n"));
+ exit(1);
+ }
+ if (errcode) {
+ com_err(program_name, errcode,
+ _("while trying to determine device size"));
+ exit(1);
+ }
+ } else {
+ last_block = strtoul (argv[optind], &tmp, 0);
+ if (*tmp) {
+ com_err (program_name, 0, _("bad blocks count - %s"),
+ argv[optind]);
+ exit (1);
+ }
+ optind++;
+ }
+ if (optind <= argc-1) {
+ from_count = strtoul (argv[optind], &tmp, 0);
+ if (*tmp) {
+ com_err (program_name, 0, _("bad starting block - %s"),
+ argv[optind]);
+ exit (1);
+ }
+ } else from_count = 0;
+ if (from_count >= last_block) {
+ com_err (program_name, 0, _("bad blocks range: %lu-%lu"),
+ from_count, last_block);
+ exit (1);
+ }
+ if (w_flag)
+ check_mount(device_name);
+
+ dev = open (device_name, O_RDWR);
+ if ((dev == -1) && ((errno == EPERM) || (errno == EACCES)) &&
+ (w_flag == 0))
+ dev = open(device_name, O_RDONLY);
+ 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, O_RDWR);
+ if ((host_dev == -1) &&
+ ((errno == EPERM) || (errno == EACCES)))
+ host_dev = open(host_device_name, O_RDONLY);
+ 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,
+ _("creating in-memory bad blocks list"));
+ exit (1);
+ }
+
+ if (in) {
+ for(;;) {
+ switch(fscanf (in, "%u\n", &next_bad)) {
+ case 0:
+ com_err (program_name, 0, "input file - bad format");
+ exit (1);
+ case EOF:
+ break;
+ default:
+ errcode = ext2fs_badblocks_list_add(bb_list,next_bad);
+ if (errcode) {
+ com_err (program_name, errcode, _("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,
+ from_count, blocks_at_once);
+ if (bb_count)
+ passes_clean = 0;
+ else
+ ++passes_clean;
+
+ if (v_flag)
+ fprintf(stderr,
+ _("Pass completed, %u bad blocks found.\n"),
+ bb_count);
+
+ } while (passes_clean < num_passes);
+
+ close (dev);
+ if (out != stdout)
+ fclose (out);
+ return 0;
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/base_device.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/base_device.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/base_device.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 at 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(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
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/base_device.tst
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/base_device.tst 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/base_device.tst 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/chattr.1.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/chattr.1.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/chattr.1.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,100 @@
+.\" -*- nroff -*-
+.TH CHATTR 1 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+chattr \- change file attributes on a Linux second extended file system
+.SH SYNOPSIS
+.B chattr
+[
+.B \-RV
+]
+[
+.B \-v
+.I version
+]
+[
+.I mode
+]
+.I files...
+.SH DESCRIPTION
+.B chattr
+changes the file attributes on a Linux second extended file system.
+.PP
+The format of a symbolic mode is +-=[ASacdistu].
+.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 `ASacdijsu' select the new attributes for the files:
+don't update atime (A), synchronous updates (S), append only (a),
+compressed (c), no dump (d), immutable (i), data journalling (j),
+secure deletion (s), and undeletable (u).
+.SH OPTIONS
+.TP
+.B \-R
+Recursively change attributes of directories and their contents.
+Symbolic links encountered during recursive directory traversals are
+ignored.
+.TP
+.B \-V
+Be verbose with chattr's output and print the program version.
+.TP
+.BI \-v " version"
+Set the file's version/generation number.
+.SH ATTRIBUTES
+When a file with the 'A' attribute set is modified, 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 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.
+.PP
+A file with the `d' attribute set is not candidate for backup when the
+.BR dump (8)
+program is run.
+.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 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=journalled" option all file data
+is already journalled and this attribute has no effect.
+.PP
+When a file with the `s' attribute set is deleted, its blocks are zeroed and
+written back to the disk.
+.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 file with the 't' attribute will not have a partial block fragment at
+the 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 who don't understand tail-merged
+files.
+.PP
+When a file with the `u' attribute set is deleted, its contents are saved.
+This allows the user to ask for its undeletion.
+.PP
+.SH AUTHOR
+.B chattr
+was written by Remy Card <Remy.Card at linux.org>.
+.SH BUGS AND LIMITATIONS
+As of Linux 2.2, the `c', 's', and `u' attribute are not honored
+by the kernel filesystem code. These attributes will be implemented
+in a future ext2 fs version.
+.PP
+The `j' option is only useful if the filesystem is mounted as ext3.
+.SH AVAILABILITY
+.B chattr
+is part of the e2fsprogs package and is available from
+http://e2fsprogs.sourceforge.net.
+.SH SEE ALSO
+.BR lsattr (1)
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/chattr.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/chattr.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/chattr.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,294 @@
+/*
+ * chattr.c - Change file attributes on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card at 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"
+
+#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 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 fatal_error(const char * fmt_string, int errcode)
+{
+ fprintf (stderr, fmt_string, program_name);
+ exit (errcode);
+}
+
+#define usage() fatal_error(_("usage: %s [-RV] [-+=AacdijsSu] [-v version] files...\n"), \
+ 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_APPEND_FL, 'a' },
+ { EXT2_COMPR_FL, 'c' },
+ { EXT2_NODUMP_FL, 'd' },
+ { EXT2_IMMUTABLE_FL, 'i' },
+ { EXT3_JOURNAL_DATA_FL, 'j' },
+ { EXT2_SECRM_FL, 's' },
+ { EXT2_UNRM_FL, 'u' },
+ { EXT2_NOTAIL_FL, 't' },
+ { 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 == '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 void change_attributes (const char * name)
+{
+ unsigned long flags;
+ STRUCT_STAT st;
+
+ if (LSTAT (name, &st) == -1) {
+ com_err (program_name, errno, _("while trying to stat %s"),
+ name);
+ return;
+ }
+ if (S_ISLNK(st.st_mode) && recursive)
+ return;
+
+ /* Don't try to open device files, fifos etc. We probably
+ ought to display an error if the file was explicitly given
+ on the command line (whether or not recursive was
+ requested). */
+ if (!S_ISREG(st.st_mode) && !S_ISLNK(st.st_mode) &&
+ !S_ISDIR(st.st_mode))
+ return;
+
+ 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 (fgetflags (name, &flags) == -1)
+ com_err (program_name, errno,
+ _("while reading flags on %s"), 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 (fsetflags (name, flags) == -1)
+ com_err (program_name, errno,
+ _("while setting flags on %s"), name);
+ }
+ }
+ if (set_version) {
+ if (verbose)
+ printf (_("Version of %s set as %lu\n"), name, version);
+ if (fsetversion (name, version) == -1)
+ com_err (program_name, errno,
+ _("while setting version on %s"), name);
+ }
+ if (S_ISDIR(st.st_mode) && recursive)
+ iterate_on_dir (name, chattr_dir_proc, NULL);
+}
+
+static int chattr_dir_proc (const char * dir_name, struct dirent * de,
+ void * unused_private)
+{
+ if (strcmp (de->d_name, ".") && strcmp (de->d_name, "..")) {
+ char *path;
+
+ path = malloc(strlen (dir_name) + 1 + strlen (de->d_name) + 1);
+ if (!path)
+ fatal_error(_("Couldn't allocate path variable "
+ "in chattr_dir_proc"), 1);
+ sprintf (path, "%s/%s", dir_name, de->d_name);
+ change_attributes (path);
+ free(path);
+ }
+ return 0;
+}
+
+int main (int argc, char ** argv)
+{
+ int i, j;
+ int end_arg = 0;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+#endif
+ if (argc && *argv)
+ program_name = *argv;
+ i = 1;
+ while (i < argc && !end_arg) {
+ if (decode_arg (&i, argc, argv) == EOF)
+ end_arg = 1;
+ else
+ i++;
+ }
+ if (i >= argc)
+ usage ();
+ if (set && (add || rem)) {
+ fprintf (stderr, _("= is incompatible with - and +\n"));
+ exit (1);
+ }
+ if ((rf & af) != 0) {
+ fprintf (stderr, "Can't both set and unset same flag.\n");
+ exit (1);
+ }
+ if (!(add || rem || set || set_version)) {
+ fprintf (stderr, _("Must use '-v', =, - or +\n"));
+ exit (1);
+ }
+ if (verbose)
+ fprintf (stderr, "chattr %s (%s)\n",
+ E2FSPROGS_VERSION, E2FSPROGS_DATE);
+ for (j = i; j < argc; j++)
+ change_attributes (argv[j]);
+ exit(0);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/dumpe2fs.8.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/dumpe2fs.8.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/dumpe2fs.8.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,88 @@
+.\" -*- 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 filesystem information
+.SH SYNOPSIS
+.B dumpe2fs
+[
+.B \-bfhixV
+]
+[
+.B \-ob
+.I superblock
+]
+[
+.B \-oB
+.I blocksize
+]
+.I device
+.SH DESCRIPTION
+.B dumpe2fs
+prints the super block and blocks group information for the filesystem
+present on
+.I device.
+.PP
+.B dumpe2fs
+is similar to Berkeley's
+.B dumpfs
+program for the BSD Fast File System.
+.SH OPTIONS
+.TP
+.B \-b
+print the blocks which are reserved as bad in the filesystem.
+.TP
+.BI \-ob " superblock"
+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 corupted filesystem.
+.TP
+.BI \-oB " blocksize"
+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 corupted 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 at linux.org>.
+.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)
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/dumpe2fs.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/dumpe2fs.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/dumpe2fs.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,344 @@
+/*
+ * dumpe2fs.c - List the control structures of a second
+ * extended filesystem
+ *
+ * Copyright (C) 1992, 1993, 1994 Remy Card <card at 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)))
+
+const char * program_name = "dumpe2fs";
+char * device_name = NULL;
+const char *num_format = "%lu";
+char range_format[16];
+
+static void usage(void)
+{
+ fprintf (stderr, _("Usage: %s [-bfhixV] [-ob superblock] "
+ "[-oB blocksize] device\n"), program_name);
+ exit (1);
+}
+
+static void print_free (unsigned long group, char * bitmap,
+ unsigned long nbytes, unsigned long offset)
+{
+ int p = 0;
+ unsigned long i;
+ unsigned long j;
+
+ offset += group * nbytes;
+ for (i = 0; i < nbytes; i++)
+ if (!in_use (bitmap, i))
+ {
+ if (p)
+ printf (", ");
+ printf (num_format, i + offset);
+ for (j = i; j < nbytes && !in_use (bitmap, j); j++)
+ ;
+ if (--j != i) {
+ fputc('-', stdout);
+ printf(num_format, j + offset);
+ i = j;
+ }
+ p = 1;
+ }
+}
+
+static void list_desc (ext2_filsys fs)
+{
+ unsigned long i;
+ long diff;
+ blk_t group_blk, next_blk;
+ char * block_bitmap = fs->block_map->bitmap;
+ char * inode_bitmap = fs->inode_map->bitmap;
+ int inode_blocks_per_group;
+ int group_desc_blocks;
+
+ 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);
+ group_desc_blocks = ((fs->super->s_blocks_count -
+ fs->super->s_first_data_block +
+ EXT2_BLOCKS_PER_GROUP(fs->super) - 1) /
+ EXT2_BLOCKS_PER_GROUP(fs->super) +
+ EXT2_DESC_PER_BLOCK(fs->super) - 1) /
+ EXT2_DESC_PER_BLOCK(fs->super);
+
+ fputc('\n', stdout);
+ group_blk = fs->super->s_first_data_block;
+ for (i = 0; i < fs->group_desc_count; i++) {
+ next_blk = group_blk + fs->super->s_blocks_per_group;
+ if (next_blk > fs->super->s_blocks_count)
+ next_blk = fs->super->s_blocks_count;
+ printf (_("Group %lu: (Blocks "), i);
+ printf(range_format, group_blk, next_blk - 1);
+ fputs(")\n", stdout);
+ if (ext2fs_bg_has_super (fs, i)) {
+ printf (_(" %s Superblock at "),
+ i == 0 ? _("Primary") : _("Backup"));
+ printf(num_format, group_blk);
+ printf(_(", Group Descriptors at "));
+ printf(range_format, group_blk+1,
+ group_blk + group_desc_blocks);
+ fputc('\n', stdout);
+ }
+ fputs(_(" Block bitmap at "), stdout);
+ printf(num_format, fs->group_desc[i].bg_block_bitmap);
+ diff = fs->group_desc[i].bg_block_bitmap - group_blk;
+ if (diff >= 0)
+ printf(" (+%ld)", diff);
+ fputs(_(", Inode bitmap at "), stdout);
+ printf(num_format, fs->group_desc[i].bg_inode_bitmap);
+ diff = fs->group_desc[i].bg_inode_bitmap - group_blk;
+ if (diff >= 0)
+ printf(" (+%ld)", diff);
+ fputs(_("\n Inode table at "), stdout);
+ printf(range_format, fs->group_desc[i].bg_inode_table,
+ fs->group_desc[i].bg_inode_table +
+ inode_blocks_per_group - 1);
+ diff = fs->group_desc[i].bg_inode_table - group_blk;
+ if (diff > 0)
+ printf(" (+%ld)", diff);
+ printf (_("\n %d free blocks, %d free inodes, "
+ "%d directories\n Free blocks: "),
+ fs->group_desc[i].bg_free_blocks_count,
+ fs->group_desc[i].bg_free_inodes_count,
+ fs->group_desc[i].bg_used_dirs_count);
+ print_free (i, block_bitmap, fs->super->s_blocks_per_group,
+ fs->super->s_first_data_block);
+ fputs(_("\n Free inodes: "), stdout);
+ print_free (i, inode_bitmap, fs->super->s_inodes_per_group, 1);
+ fputc('\n', stdout);
+ block_bitmap += fs->super->s_blocks_per_group / 8;
+ inode_bitmap += fs->super->s_inodes_per_group / 8;
+ group_blk = next_blk;
+ }
+}
+
+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, "");
+ return;
+ }
+ retval = ext2fs_badblocks_list_iterate_begin(bb_list, &bb_iter);
+ if (retval) {
+ com_err("ext2fs_badblocks_list_iterate_begin", retval,
+ _("while printing bad block list"));
+ return;
+ }
+ if (dump) {
+ header = fmt = "%d\n";
+ } else {
+ header = _("Bad blocks: %d");
+ fmt = ", %d";
+ }
+ 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);
+}
+
+static void print_journal_information(ext2_filsys fs)
+{
+ errcode_t retval;
+ char buf[1024];
+ char str[80];
+ int i;
+ journal_superblock_t *jsb;
+
+ /* Get the journal superblock */
+ if ((retval = io_channel_read_blk(fs->io, fs->super->s_first_data_block+1, -1024, buf))) {
+ com_err(program_name, retval,
+ _("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,
+ _("Couldn't find journal superblock magic numbers"));
+ exit(1);
+ }
+
+ printf(_("\nJournal block size: %d\n"
+ "Journal length: %d\n"
+ "Journal first block: %d\n"
+ "Journal sequence: 0x%08x\n"
+ "Journal start: %d\n"
+ "Journal number of users: %d\n"),
+ ntohl(jsb->s_blocksize), ntohl(jsb->s_maxlen),
+ ntohl(jsb->s_first), ntohl(jsb->s_sequence),
+ ntohl(jsb->s_start), 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);
+ }
+}
+
+int main (int argc, char ** argv)
+{
+ errcode_t retval;
+ ext2_filsys fs;
+ int print_badblocks = 0;
+ int use_superblock = 0;
+ int use_blocksize = 0;
+ int image_dump = 0;
+ int force = 0;
+ int flags;
+ int header_only = 0;
+ int big_endian;
+ int c;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+#endif
+ initialize_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':
+ if (optarg[0] == 'b')
+ use_superblock = atoi(optarg+1);
+ else if (optarg[0] == 'B')
+ use_blocksize = atoi(optarg+1);
+ else
+ usage();
+ break;
+ case 'V':
+ /* Print version number and exit */
+ fprintf(stderr, _("\tUsing %s\n"),
+ error_message(EXT2_ET_BASE));
+ exit(0);
+ case 'x':
+ num_format = "0x%04x";
+ break;
+ default:
+ usage();
+ }
+ }
+ if (optind > argc - 1)
+ usage();
+ sprintf(range_format, "%s-%s", num_format, num_format);
+ device_name = argv[optind++];
+ if (use_superblock && !use_blocksize)
+ use_blocksize = 1024;
+ flags = EXT2_FLAG_JOURNAL_DEV_OK;
+ if (force)
+ flags |= EXT2_FLAG_FORCE;
+ if (image_dump)
+ flags |= EXT2_FLAG_IMAGE_FILE;
+
+ 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 (_("Couldn't find valid filesystem superblock.\n"));
+ exit (1);
+ }
+ if (print_badblocks) {
+ list_bad_blocks(fs, 1);
+ } else {
+ big_endian = ((fs->flags & EXT2_FLAG_SWAP_BYTES) != 0);
+#ifdef WORDS_BIGENDIAN
+ big_endian = !big_endian;
+#endif
+ if (big_endian)
+ printf(_("Note: This is a byte-swapped filesystem\n"));
+ list_super (fs->super);
+ if (fs->super->s_feature_incompat &
+ EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) {
+ print_journal_information(fs);
+ ext2fs_close(fs);
+ exit(0);
+ }
+ list_bad_blocks(fs, 0);
+ if (header_only) {
+ ext2fs_close (fs);
+ exit (0);
+ }
+ retval = ext2fs_read_bitmaps (fs);
+ if (retval) {
+ com_err (program_name, retval,
+ _("while trying to read the bitmaps"),
+ device_name);
+ ext2fs_close (fs);
+ exit (1);
+ }
+ list_desc (fs);
+ }
+ ext2fs_close (fs);
+ exit (0);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/e2image.8.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/e2image.8.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/e2image.8.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,93 @@
+.\" -*- 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 filesystem data to a file
+.SH SYNOPSIS
+.B e2image
+[
+.B \-r
+]
+.I device
+.I image-file
+.SH DESCRIPTION
+The
+.B e2image
+program will save critical filesystem data on the ext2 filesystem 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 be used by an expert in assisting
+the recovery of 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
+If
+.I image-file
+is -, then the output of
+.B e2image
+will be sent to standard output.
+.PP
+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 data blocks, which the current image file does not have,
+although this may change in the future.
+.PP
+It is a very good idea to periodically (at boot time and
+every week or so) to create image files for all of
+filesystems on a system, as well as saving the partition
+layout (which can be generated using the using
+.B fdisk -l
+command). Ideally the image file should be stored on some filesystem
+other that
+the filesystem whose data it contains, to ensure that its 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.
+Hence, if the image file
+needs to be copied to another location, it should
+either be compressed first or copied using the
+.B \--sparse=always
+option to GNU version of
+.BR cp .
+.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 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 AUTHOR
+.B e2image
+was written by Theodore Ts'o (tytso at mit.edu).
+.SH AVAILABILITY
+.B e2image
+is part of the e2fsprogs package and is available from anonymous
+http://e2fsprogs.sourceforge.net.
+.SH SEE ALSO
+.BR dumpe2fs (8),
+.BR debugfs (8)
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/e2image.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/e2image.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/e2image.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,500 @@
+/*
+ * 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>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/types.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 "../version.h"
+#include "nls-enable.h"
+
+const char * program_name = "e2image";
+char * device_name = NULL;
+
+static void usage(void)
+{
+ fprintf(stderr, _("Usage: %s [-r] device file\n"), program_name);
+ exit (1);
+}
+
+static void write_header(int fd, struct ext2_image_hdr *hdr, int blocksize)
+{
+ char *header_buf;
+ int actual;
+
+ header_buf = malloc(blocksize);
+ if (!header_buf) {
+ fprintf(stderr, _("Couldn't allocate header buffer\n"));
+ exit(1);
+ }
+
+ if (lseek(fd, 0, SEEK_SET) < 0) {
+ perror("lseek while writing header");
+ exit(1);
+ }
+ memset(header_buf, 0, blocksize);
+
+ if (hdr)
+ memcpy(header_buf, hdr, sizeof(struct ext2_image_hdr));
+
+ actual = write(fd, header_buf, blocksize);
+ if (actual < 0) {
+ perror("write header");
+ exit(1);
+ }
+ if (actual != blocksize) {
+ fprintf(stderr, _("short write (only %d bytes) for"
+ "writing image header"), actual);
+ exit(1);
+ }
+ free(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, fs->blocksize);
+ memset(&hdr, 0, sizeof(struct ext2_image_hdr));
+
+ hdr.offset_super = lseek(fd, 0, SEEK_CUR);
+ retval = ext2fs_image_super_write(fs, fd, 0);
+ if (retval) {
+ com_err(program_name, retval, _("while writing superblock"));
+ exit(1);
+ }
+
+ hdr.offset_inode = lseek(fd, 0, SEEK_CUR);
+ retval = ext2fs_image_inode_write(fs, fd,
+ (fd != 1) ? IMAGER_FLAG_SPARSEWRITE : 0);
+ if (retval) {
+ com_err(program_name, retval, _("while writing inode table"));
+ exit(1);
+ }
+
+ hdr.offset_blockmap = lseek(fd, 0, SEEK_CUR);
+ retval = ext2fs_image_bitmap_write(fs, fd, 0);
+ if (retval) {
+ com_err(program_name, retval, _("while writing block bitmap"));
+ exit(1);
+ }
+
+ hdr.offset_inodemap = lseek(fd, 0, SEEK_CUR);
+ retval = ext2fs_image_bitmap_write(fs, fd, IMAGER_FLAG_INODEMAP);
+ if (retval) {
+ com_err(program_name, retval, _("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));
+ strncat(hdr.fs_device_name, device_name, sizeof(hdr.fs_device_name));
+ 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, fs->blocksize);
+}
+
+/*
+ * These set of functions are used to write a RAW image file.
+ */
+ext2fs_block_bitmap meta_block_map;
+
+struct process_block_struct {
+ ext2_ino_t ino;
+};
+
+/*
+ * 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, 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, 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, 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 bool)
+{
+ if (bool) {
+ 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, blk_t *block_nr,
+ e2_blkcnt_t blockcnt, blk_t ref_block,
+ int ref_offset, void *priv_data)
+{
+ ext2fs_mark_block_bitmap(meta_block_map, *block_nr);
+ return 0;
+}
+
+static int process_file_block(ext2_filsys fs, blk_t *block_nr,
+ e2_blkcnt_t blockcnt, blk_t ref_block,
+ int ref_offset, void *priv_data)
+{
+ if (blockcnt < 0) {
+ ext2fs_mark_block_bitmap(meta_block_map, *block_nr);
+ }
+ return 0;
+}
+
+static void mark_table_blocks(ext2_filsys fs)
+{
+ blk_t block, b;
+ int i,j;
+
+ block = fs->super->s_first_data_block;
+ /*
+ * Mark primary superblock
+ */
+ ext2fs_mark_block_bitmap(meta_block_map, block);
+
+ /*
+ * Mark the primary superblock descriptors
+ */
+ for (j = 0; j < fs->desc_blocks; j++) {
+ ext2fs_mark_block_bitmap(meta_block_map,
+ block + j + 1);
+ }
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ /*
+ * Mark the blocks used for the inode table
+ */
+ if (fs->group_desc[i].bg_inode_table) {
+ for (j = 0, b = fs->group_desc[i].bg_inode_table;
+ j < fs->inode_blocks_per_group;
+ j++, b++)
+ ext2fs_mark_block_bitmap(meta_block_map, b);
+ }
+
+ /*
+ * Mark block used for the block bitmap
+ */
+ if (fs->group_desc[i].bg_block_bitmap) {
+ ext2fs_mark_block_bitmap(meta_block_map,
+ fs->group_desc[i].bg_block_bitmap);
+ }
+
+ /*
+ * Mark block used for the inode bitmap
+ */
+ if (fs->group_desc[i].bg_inode_bitmap) {
+ ext2fs_mark_block_bitmap(meta_block_map,
+ fs->group_desc[i].bg_inode_bitmap);
+ }
+ block += fs->super->s_blocks_per_group;
+ }
+}
+
+/*
+ * 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;
+}
+
+static void write_block(int fd, char *buf, int sparse_offset,
+ int blocksize, blk_t block)
+{
+ int count;
+ errcode_t err;
+
+ if (sparse_offset) {
+#ifdef HAVE_LSEEK64
+ if (lseek64(fd, sparse_offset, SEEK_CUR) < 0)
+ perror("lseek");
+#else
+ if (lseek(fd, sparse_offset, SEEK_CUR) < 0)
+ perror("lseek");
+#endif
+ }
+ if (blocksize) {
+ count = write(fd, buf, blocksize);
+ if (count != blocksize) {
+ if (count == -1)
+ err = errno;
+ else
+ err = 0;
+ com_err(program_name, err, "error writing block %d",
+ block);
+ }
+ }
+}
+
+static void output_meta_data_blocks(ext2_filsys fs, int fd)
+{
+ errcode_t retval;
+ blk_t blk;
+ char buf[8192], zero_buf[8192];
+ int sparse = 0;
+
+ memset(zero_buf, 0, sizeof(zero_buf));
+ for (blk = 0; blk < fs->super->s_blocks_count; blk++) {
+ if ((blk >= fs->super->s_first_data_block) &&
+ ext2fs_test_block_bitmap(meta_block_map, blk)) {
+ retval = io_channel_read_blk(fs->io, blk, 1, buf);
+ if (retval) {
+ com_err(program_name, retval,
+ "error reading block %d", blk);
+ }
+ if ((fd != 1) && check_zero_block(buf, fs->blocksize))
+ goto sparse_write;
+ write_block(fd, buf, sparse, fs->blocksize, blk);
+ sparse = 0;
+ } else {
+ sparse_write:
+ if (fd == 1) {
+ write_block(fd, zero_buf, 0,
+ fs->blocksize, blk);
+ continue;
+ }
+ sparse += fs->blocksize;
+ if (sparse >= 1024*1024) {
+ write_block(fd, 0, sparse, 0, 0);
+ sparse = 0;
+ }
+ }
+ }
+ write_block(fd, zero_buf, sparse, 1, -1);
+}
+
+static void write_raw_image_file(ext2_filsys fs, int fd)
+{
+ struct process_block_struct pb;
+ struct ext2_inode inode;
+ ext2_inode_scan scan;
+ ext2_ino_t ino;
+ errcode_t retval;
+ char * block_buf;
+
+ 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);
+ }
+
+ mark_table_blocks(fs);
+
+ retval = ext2fs_open_inode_scan(fs, 0, &scan);
+ if (retval) {
+ com_err(program_name, retval, _("while opening inode scan"));
+ exit(1);
+ }
+
+ block_buf = malloc(fs->blocksize * 3);
+ if (!block_buf) {
+ com_err(program_name, 0, "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) {
+ com_err(program_name, retval,
+ _("while getting next inode"));
+ exit(1);
+ }
+ if (ino == 0)
+ break;
+ if (!inode.i_links_count ||
+ !ext2fs_inode_has_valid_blocks(&inode))
+ continue;
+
+ stashed_ino = ino;
+ if (LINUX_S_ISDIR(inode.i_mode) ||
+ ino == fs->super->s_journal_inum) {
+ retval = ext2fs_block_iterate2(fs, ino, 0,
+ block_buf, process_dir_block, &pb);
+ if (retval) {
+ com_err(program_name, retval,
+ "while iterating over inode %d",
+ ino);
+ exit(1);
+ }
+ } else {
+ if (inode.i_block[EXT2_IND_BLOCK] ||
+ inode.i_block[EXT2_DIND_BLOCK] ||
+ inode.i_block[EXT2_TIND_BLOCK]) {
+ retval = ext2fs_block_iterate2(fs,
+ ino, 0, block_buf,
+ process_file_block, &pb);
+ if (retval) {
+ com_err(program_name, retval,
+ "while iterating over %d", ino);
+ exit(1);
+ }
+ }
+ if (inode.i_file_acl) {
+ ext2fs_mark_block_bitmap(meta_block_map,
+ inode.i_file_acl);
+ }
+ }
+ }
+ use_inode_shortcuts(fs, 0);
+ output_meta_data_blocks(fs, fd);
+}
+
+int main (int argc, char ** argv)
+{
+ int c;
+ errcode_t retval;
+ ext2_filsys fs;
+ char *outfn;
+ int open_flag = 0;
+ int raw_flag = 0;
+ int fd = 0;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+#endif
+ fprintf (stderr, "e2image %s (%s)\n", E2FSPROGS_VERSION,
+ E2FSPROGS_DATE);
+ if (argc && *argv)
+ program_name = *argv;
+ initialize_ext2_error_table();
+ while ((c = getopt (argc, argv, "r")) != EOF)
+ switch (c) {
+ case 'r':
+ raw_flag++;
+ break;
+ default:
+ usage();
+ }
+ if (optind != argc - 2 )
+ usage();
+ device_name = argv[optind];
+ outfn = argv[optind+1];
+ retval = ext2fs_open (device_name, open_flag, 0, 0,
+ unix_io_manager, &fs);
+ if (retval) {
+ com_err (program_name, retval, _("while trying to open %s"),
+ device_name);
+ printf(_("Couldn't find valid filesystem superblock.\n"));
+ exit(1);
+ }
+
+ if (strcmp(outfn, "-") == 0)
+ fd = 1;
+ else {
+#ifdef HAVE_OPEN64
+ fd = open64(outfn, O_CREAT|O_TRUNC|O_WRONLY, 0600);
+#else
+ fd = open(outfn, O_CREAT|O_TRUNC|O_WRONLY, 0600);
+#endif
+ if (fd < 0) {
+ com_err(program_name, errno,
+ _("while trying to open %s"), argv[optind+1]);
+ exit(1);
+ }
+ }
+
+ if (raw_flag)
+ write_raw_image_file(fs, fd);
+ else
+ write_image_file(fs, fd);
+
+ ext2fs_close (fs);
+ exit (0);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/e2label.8.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/e2label.8.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/e2label.8.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,52 @@
+.\" -*- 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 filesystem
+.SH SYNOPSIS
+.B e2label
+.I device
+[
+.I new-label
+]
+.SH DESCRIPTION
+.B e2label
+will display or change the filesystem label on the ext2 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 at 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)
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/e2label.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/e2label.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/e2label.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,120 @@
+/*
+ * e2label.c - Print or change the volume label on an ext2 fs
+ *
+ * Written by Andries Brouwer (aeb at 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;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/findsuper.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/findsuper.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/findsuper.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,217 @@
+/*
+ * 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.
+ *
+ * This program may be used under the provisions of the GNU Public
+ * License, *EXCEPT* that a binary copy of the executable may not be
+ * packaged as a part of binary package which is distributed as part
+ * of a Linux distribution. (Yes, this violates the Debian Free
+ * Software Guidelines in terms of restricting its field of use.
+ * That's the point. I don't want this program being distributed in
+ * Debian, because I don't care to support it, and the maintainer,
+ * Yann Dirson, doesn't seem to pay attention to my wishes on this
+ * matter. So I'm delibiately adding this clause so it violates the
+ * Debian Free Software Guidelines to force him to take it out. If
+ * this doesn't work, I'll have to remove it from the upstream source
+ * distribution at the next release. End of Rant. :-)
+ *
+ *
+ * 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 at nevets.oau.org
+ * ssd at mae.engr.ucf.edu
+ *
+ * Additional notes by Andreas Dilger <adilger at 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.
+ */
+
+/*
+ * Documentation addendum added by Andreas dwguest at win.tue.nl/aeb at 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 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 "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
+
+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;
+
+ 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);
+#endif
+ if (argc<2) {
+ fprintf(stderr,
+ _("Usage: findsuper device [skipbytes [startkb]]\n"));
+ exit(1);
+ }
+ if (argc>2)
+ skiprate = strtol(argv[2], &s, 0);
+ if (s == argv[2]) {
+ fprintf(stderr,_("skiprate should be a number, not %s\n"), s);
+ exit(1);
+ }
+ if (skiprate & 0x1ff) {
+ fprintf(stderr,
+ _("skipbytes must be a multiple of the sector size\n"));
+ exit(2);
+ }
+ if (argc>3)
+ sk = skl = strtoll(argv[3], &s, 0) << 10;
+ if (s == argv[3]) {
+ fprintf(stderr,_("startkb should be a number, not %s\n"), s);
+ exit(1);
+ }
+ if (sk < 0) {
+ fprintf(stderr,_("startkb should be positive, not %Ld\n"), sk);
+ exit(1);
+ }
+ fd = open(argv[1], O_RDONLY);
+ if (fd < 0) {
+ perror(argv[1]);
+ exit(1);
+ }
+
+ /* Now, go looking for the superblock ! */
+ printf(_("starting at %Ld, with %d byte increments\n"), sk, skiprate);
+ printf(_(" thisoff block fs_blk_sz blksz grp last_mount\n"));
+ for (; lseek64(fd, sk, SEEK_SET) != -1 &&
+ read(fd, &ext2, 512) == 512; sk += skiprate) {
+
+ 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%14Ld: %8LdkB/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 > 4)
+ WHY("log block size > 4 (%d)\n", ext2.s_log_block_size);
+ if (ext2.s_r_blocks_count > ext2.s_blocks_count)
+ WHY("r_blocks_count > blocks_count (%d > %d)\n",
+ ext2.s_r_blocks_count, ext2.s_blocks_count);
+ if (ext2.s_free_blocks_count > ext2.s_blocks_count)
+ WHY("free_blocks_count > blocks_count\n (%d > %d)\n",
+ ext2.s_free_blocks_count, ext2.s_blocks_count);
+ if (ext2.s_free_inodes_count > ext2.s_inodes_count)
+ WHY("free_inodes_count > inodes_count (%d > %d)\n",
+ ext2.s_free_inodes_count, ext2.s_inodes_count);
+
+ tm = ext2.s_mtime;
+ s=ctime(&tm);
+ s[24]=0;
+ printf("\r%14Ld %9Ld %9d %5d %4d %s\n",
+ sk, sk >> 10, ext2.s_blocks_count,
+ 1 << (ext2.s_log_block_size + 10),
+ ext2.s_block_group_nr, s);
+ }
+ printf(_("\n%14Ld: finished with errno %d\n"), sk, errno);
+ close(fd);
+
+ return errno;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/fsck.8.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/fsck.8.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/fsck.8.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,339 @@
+.\" -*- 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 \-sACVRTNP
+]
+[
+.B \-t
+.I fstype
+]
+.I filesys [ ... ]
+[\-\-] [
+.B fsck-options
+]
+.SH DESCRIPTION
+.B fsck
+is used to check and optionally repair a 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).
+The
+.B fsck
+program will try to run filesystems on different physical disk drives
+in parallel to reduce total amount time to check all of the filesystems.
+.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
+\ 128\ \-\ Shared library error
+.br
+The exit code returned when all file systems are checked using the
+.B \-A
+option 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 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,
+and may be prefixed by a negation operator. If an options specifier is
+present, then only filesystems whose
+.B /etc/fstab
+entry do (or do not, if the options specifier was prefixed by a negation
+operator) contain
+.I fs-option
+in their options field of the
+.B /etc/fstab
+file 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 initalization 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 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 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
+Display completion/progress bars for those filesystems checkers (currently
+only for ext2) which support them. Fsck will manage the filesystem checkers
+so that only one of them will display a progress bar at a time.
+.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 fsck-options
+Options which 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
+Currently, standardized file system-specific options are somewhat in
+flux. 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 most file system checkers support.
+.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.
+.SH AUTHOR
+Theodore Ts'o (tytso at 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 use for developers who are testing
+.BR fsck .
+.SH SEE ALSO
+.BR fstab (5),
+.BR mkfs (8),
+.BR fsck.minix (8),
+.BR fsck.ext2 (8)
+or
+.BR e2fsck (8),
+.BR fsck.xiafs (8).
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/fsck.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/fsck.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/fsck.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1145 @@
+/*
+ * 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 at mit.edu>
+ *
+ * Usage: fsck [-ACVRNTM] [-s] [-t fstype] [fs-options] device
+ *
+ * Miquel van Smoorenburg (miquels at 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 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 <sys/wait.h>
+#include <sys/signal.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
+#include <malloc.h>
+
+#include "../version.h"
+#include "nls-enable.h"
+#include "fsck.h"
+#include "get_device_by_label.h"
+
+#ifndef _PATH_MNTTAB
+#define _PATH_MNTTAB "/etc/fstab"
+#endif
+
+static const char *ignored_types[] = {
+ "ignore",
+ "iso9660",
+ "nfs",
+ "proc",
+ "sw",
+ "swap",
+ NULL
+};
+
+static const char *really_wanted[] = {
+ "minix",
+ "ext2",
+ "ext3",
+ "xiafs",
+ NULL
+};
+
+#define BASE_MD "/dev/md"
+
+/*
+ * Global variables for options
+ */
+char *devices[MAX_DEVICES];
+char *args[MAX_ARGS];
+int num_devices, num_args;
+
+int verbose = 0;
+int doall = 0;
+int noexecute = 0;
+int serialize = 0;
+int skip_root = 0;
+int like_mount = 0;
+int notitle = 0;
+int parallel_root = 0;
+int progress = 0;
+int force_all_parallel = 0;
+int num_running = 0;
+int max_running = 0;
+char *progname;
+char *fstype = NULL;
+struct fs_info *filesys_info;
+struct fsck_instance *instance_list;
+const char *fsck_prefix_path = "/sbin:/sbin/fs.d:/sbin/fs:/etc/fs:/etc";
+char *fsck_path = 0;
+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 free_instance(struct fsck_instance *i)
+{
+ if (i->prog)
+ free(i->prog);
+ if (i->device)
+ free(i->device);
+ if (i->base_device)
+ free(i->base_device);
+ free(i);
+ return;
+}
+
+static int parse_fstab_line(char *line, struct fs_info **ret_fs)
+{
+ char *device, *mntpnt, *type, *opts, *freq, *passno, *cp;
+ struct fs_info *fs;
+
+ *ret_fs = 0;
+ strip_line(line);
+ 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 0; /* Allow blank lines */
+
+ if (!mntpnt || !type)
+ return -1;
+
+ if (!(fs = malloc(sizeof(struct fs_info))))
+ return -1;
+
+ 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;
+
+ *ret_fs = fs;
+
+ return 0;
+}
+
+/*
+ * Interpret the device name if necessary
+ */
+static char *interpret_device(char *spec)
+{
+ char *dev = interpret_spec(spec);
+
+ if (dev)
+ return dev;
+
+ /*
+ * Check to see if this was 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",
+ spec);
+ else
+ fprintf(stderr, "Couldn't find matching filesystem: %s\n",
+ spec);
+ exit(EXIT_ERROR);
+}
+
+/*
+ * Interpret filesystem auto type if necessary
+ */
+static void interpret_type(struct fs_info *fs)
+{
+ const char *type;
+
+ if (strcmp(fs->type, "auto") == 0 ||
+ (strchr(fs->type, ',') != 0)) {
+ if (fs && strchr(fs->device, '='))
+ fs->device = interpret_device(fs->device);
+ type = identify_fs(fs->device, fs->type);
+ if (type) {
+ free(fs->type);
+ fs->type = string_copy(type);
+ } else
+ fprintf(stderr, _("Could not determine "
+ "filesystem type for %s\n"),
+ fs->device);
+ }
+}
+
+
+/*
+ * 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, *fs_last = NULL;
+
+ filesys_info = NULL;
+ 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 (!filesys_info)
+ filesys_info = fs;
+ else
+ fs_last->next = fs;
+ fs_last = fs;
+ if (fs->passno < 0)
+ fs->passno = 0;
+ else
+ old_fstab = 0;
+ }
+
+ fclose(f);
+
+ if (old_fstab) {
+ fprintf(stderr, _("\007\007\007"
+ "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"));
+
+ 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;
+ int try_again = 0;
+
+ /* No filesys name given. */
+ if (filesys == NULL)
+ return NULL;
+
+ for (fs = filesys_info; fs; fs = fs->next) {
+ if (strchr(fs->device, '='))
+ try_again++;
+ if (!strcmp(filesys, fs->device) ||
+ !strcmp(filesys, fs->mountpt))
+ break;
+ }
+ if (fs && strchr(fs->device, '='))
+ fs->device = interpret_device(fs->device);
+
+ if (fs || !try_again)
+ return fs;
+
+ for (fs = filesys_info; fs; fs = fs->next) {
+ fs->device = interpret_device(fs->device);
+ if (!strcmp(filesys, fs->device) ||
+ !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, char *device, 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 & !progress_active()) {
+ if ((strcmp(type, "ext2") == 0) ||
+ (strcmp(type, "ext3") == 0)) {
+ argv[argc++] = string_copy("-C0");
+ inst->flags |= FLAG_PROGRESS;
+ }
+ }
+
+ argv[argc++] = string_copy(device);
+ argv[argc] = 0;
+
+ s = find_fsck(prog);
+ if (s == NULL) {
+ fprintf(stderr, _("fsck: %s: not found\n"), prog);
+ 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");
+ return errno;
+ } else if (pid == 0) {
+ if (!interactive)
+ close(0);
+ (void) execv(s, argv);
+ perror(argv[0]);
+ 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;
+}
+
+/*
+ * 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 ((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;
+ 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"))
+ 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;
+}
+
+/*
+ * Wait until all executing child processes have exited; return the
+ * logical OR of all of their exit code values.
+ */
+static int wait_all(int flags)
+{
+ struct fsck_instance *inst;
+ int global_status = 0;
+
+ while ((inst = wait_one(flags))) {
+ global_status |= inst->exit_status;
+ free_instance(inst);
+#ifdef RANDOM_DEBUG
+ if (noexecute && (flags & WNOHANG) && !(random() % 3))
+ break;
+#endif
+ }
+ 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(char *device, int interactive)
+{
+ const char *type = 0;
+ struct fs_info *fsent;
+ int retval;
+
+ if (fstype && strncmp(fstype, "no", 2) &&
+ strncmp(fstype, "opts=", 5) && strncmp(fstype, "loop", 4) &&
+ !strchr(fstype, ','))
+ type = fstype;
+
+ if ((fsent = lookup(device))) {
+ device = fsent->device;
+ interpret_type(fsent);
+ if (!type)
+ type = fsent->type;
+ }
+ if (!type)
+ type = DEFAULT_FSTYPE;
+
+ num_running++;
+ retval = execute(type, device, fsent ? fsent->mountpt : 0,
+ interactive);
+ if (retval) {
+ fprintf(stderr, _("%s: Error %d while executing fsck.%s "
+ "for %s\n"), progname, retval, type, device);
+ num_running--;
+ }
+}
+
+
+/*
+ * Deal with the fsck -t argument.
+ */
+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) {
+ fprintf(stderr, _("Couldn't allocate memory for "
+ "filesystem types\n"));
+ 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)) {
+ fprintf(stderr, _(fs_type_syntax_error));
+ 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(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;
+
+ 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;
+ struct fsck_instance *inst;
+ int status = EXIT_OK;
+ int not_done_yet = 1;
+ int passno = 1;
+ int pass_done;
+
+ if (verbose)
+ printf(_("Checking all file systems.\n"));
+
+ /*
+ * Do an initial scan over the filesystem; mark filesystems
+ * which should be ignored as done, and resolve LABEL= and
+ * UUID= specifications to the real device.
+ */
+ for (fs = filesys_info; fs; fs = fs->next) {
+ if (ignore(fs))
+ fs->flags |= FLAG_DONE;
+ else
+ fs->device = interpret_device(fs->device);
+ }
+
+ /*
+ * 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)) {
+ fsck_device(fs->device, 1);
+ status |= wait_all(0);
+ if (status > EXIT_NONDESTRUCT)
+ return status;
+ }
+ fs->flags |= FLAG_DONE;
+ }
+ }
+
+ while (not_done_yet) {
+ not_done_yet = 0;
+ pass_done = 1;
+
+ for (fs = filesys_info; fs; fs = fs->next) {
+ 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 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->device, 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 (verbose > 1)
+ printf(_("--waiting-- (pass %d)\n"), passno);
+ status |= wait_all(pass_done ? 0 : WNOHANG);
+ if (pass_done) {
+ if (verbose > 1)
+ printf("----------------------------------\n");
+ passno++;
+ } else
+ not_done_yet++;
+ }
+ status |= wait_all(0);
+ return status;
+}
+
+static void usage(NOARGS)
+{
+ fprintf(stderr,
+ _("Usage: fsck [-ACNPRTV] [-t fstype] [fs-options] filesys\n"));
+ exit(EXIT_USAGE);
+}
+
+static void PRS(int argc, char *argv[])
+{
+ int i, j;
+ char *arg, *tmp;
+ char options[128];
+ int opt = 0;
+ int opts_for_fsck = 0;
+
+ 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) ||
+ (strncmp(arg, "LABEL=", 6) == 0) ||
+ (strncmp(arg, "UUID=", 5) == 0)) {
+ if (num_devices >= MAX_DEVICES) {
+ fprintf(stderr, _("%s: too many devices\n"),
+ progname);
+ exit(EXIT_ERROR);
+ }
+ devices[num_devices++] =
+ interpret_device(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++;
+ break;
+ case 'V':
+ verbose++;
+ break;
+ case 'N':
+ noexecute++;
+ break;
+ case 'R':
+ skip_root++;
+ break;
+ case 'T':
+ notitle++;
+ break;
+ case 'M':
+ like_mount++;
+ break;
+ case 'P':
+ parallel_root++;
+ break;
+ case 's':
+ serialize++;
+ break;
+ case 't':
+ 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;
+ int status = 0;
+ int interactive = 0;
+ char *oldpath = getenv("PATH");
+ const char *fstab;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+#endif
+ 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);
+ 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) {
+ fprintf(stderr, _("\nNo devices specified to be checked!\n"));
+ exit(EXIT_ERROR);
+ }
+ for (i = 0 ; i < num_devices; i++) {
+ fsck_device(devices[i], interactive);
+ if (serialize || (num_running >= max_running)) {
+ struct fsck_instance *inst;
+
+ inst = wait_one(0);
+ if (inst) {
+ status |= inst->exit_status;
+ free_instance(inst);
+ }
+ }
+ }
+ status |= wait_all(0);
+ free(fsck_path);
+ return status;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/fsck.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/fsck.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/fsck.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,64 @@
+/*
+ * fsck.h
+ */
+
+#include <time.h>
+
+#ifdef __STDC__
+#define NOARGS void
+#else
+#define NOARGS
+#define const
+#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(char *device);
+extern char *string_copy(const char *s);
+extern const char *identify_fs(const char *fs_name, const char *fs_types);
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/fstype.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/fstype.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/fstype.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,110 @@
+/*
+ * fstype.c
+ *
+ * Copyright (C) 2001 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 <sys/types.h>
+
+#include "fsck.h"
+
+struct fs_magic {
+ const char *fs_name;
+ int offset;
+ int len;
+ const char *magic;
+};
+
+#define REISERFS_SUPER_MAGIC_STRING "ReIsErFs"
+#define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs"
+#define REISERFS_DISK_OFFSET_IN_BYTES ((64 * 1024) + 52)
+/* the spot for the super in versions 3.5 - 3.5.10 (inclusive) */
+#define REISERFS_OLD_DISK_OFFSET_IN_BYTES ((8 * 1024) + 52)
+
+struct fs_magic type_array[] = {
+ { "ext2", 1024+56, 2, "\123\357" },
+ { "ext3", 1024+56, 2, "\123\357" },
+ { "reiserfs", REISERFS_DISK_OFFSET_IN_BYTES, 9,
+ REISER2FS_SUPER_MAGIC_STRING },
+ { "reiserfs", REISERFS_DISK_OFFSET_IN_BYTES, 8,
+ REISERFS_SUPER_MAGIC_STRING },
+ { "reiserfs", REISERFS_OLD_DISK_OFFSET_IN_BYTES, 9,
+ REISER2FS_SUPER_MAGIC_STRING },
+ { "reiserfs", REISERFS_OLD_DISK_OFFSET_IN_BYTES, 8,
+ REISERFS_SUPER_MAGIC_STRING },
+ { "minix", 1040, 2, "\177\023" },
+ { "minix", 1040, 2, "\217\023" },
+ { "minix", 1040, 2, "\150\044" },
+ { "minix", 1040, 2, "\170\044" },
+ { "xfs", 0, 4, "XFSB" },
+ { 0, 0, 0, 0 }
+};
+
+const char *identify_fs(const char *fs_name, const char *fs_types)
+{
+ char buf[73728], *s;
+ const char *t;
+ struct fs_magic *p;
+ int fd;
+
+ fd = open(fs_name, O_RDONLY);
+ if (fd < 0)
+ return NULL;
+ if (lseek(fd, 0, SEEK_SET) < 0)
+ return NULL;
+ if (read(fd, buf, sizeof(buf)) != sizeof(buf))
+ return NULL;
+ close(fd);
+ if (!fs_types || !strcmp(fs_types, "auto")) {
+ for (p = type_array; p->fs_name; p++) {
+ if (memcmp(p->magic, buf+p->offset, p->len) == 0)
+ return p->fs_name;
+ }
+ } else {
+ s = string_copy(fs_types);
+ for (t = strtok(s, ","); t; t = strtok(NULL, ",")) {
+ for (p = type_array; p->fs_name; p++) {
+ if (strcmp(p->fs_name, t))
+ continue;
+ if (memcmp(p->magic, buf+p->offset,
+ p->len) == 0) {
+ free(s);
+ return p->fs_name;
+ }
+ }
+ }
+ free(s);
+ }
+ return NULL;
+}
+
+#ifdef TEST_PROGRAM
+int main(int argc, char **argv)
+{
+ const char *type;
+
+ if (argc < 2 || argc > 3) {
+ fprintf(stderr, "Usage: %s [type list] device\n", argv[0]);
+ exit(1);
+ }
+ if (argc == 2) {
+ type = identify_fs(argv[1], NULL);
+ printf("%s is a %s filesystem\n", argv[1], type);
+ } else {
+ type = identify_fs(argv[2],argv[1]);
+ printf("%s is a %s filesystem\n", argv[2], type);
+ }
+ return (0);
+}
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/get_device_by_label.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/get_device_by_label.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/get_device_by_label.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,373 @@
+/*
+ * get_device_by_label.h
+ *
+ * Copyright 1999 by Andries Brouwer
+ * Copyright 1999, 2000 by Theodore Ts'o
+ *
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ *
+ * Taken from aeb's mount, 990619
+ * Updated from aeb's mount, 20000725
+ * Added call to ext2fs_find_block_device, so that we can find devices
+ * even if devfs (ugh) is compiled in, but not mounted, since
+ * this messes up /proc/partitions, by TYT.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_SYS_MKDEV_H
+#include <sys/mkdev.h>
+#endif
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
+#include <dirent.h>
+#include "nls-enable.h"
+#include "fsck.h"
+#include "get_device_by_label.h"
+
+/* function prototype from libext2 */
+extern char *ext2fs_find_block_device(dev_t device);
+
+#define PROC_PARTITIONS "/proc/partitions"
+#define DEVLABELDIR "/dev"
+#define VG_DIR "/proc/lvm/VGs"
+
+#define EXT2_SUPER_MAGIC 0xEF53
+struct ext2_super_block {
+ unsigned char s_dummy1[56];
+ unsigned char s_magic[2];
+ unsigned char s_dummy2[46];
+ unsigned char s_uuid[16];
+ unsigned char s_volume_name[16];
+};
+#define ext2magic(s) ((unsigned int) s.s_magic[0] + (((unsigned int) s.s_magic[1]) << 8))
+
+#define XFS_SUPER_MAGIC "XFSB"
+struct xfs_super_block {
+ unsigned char s_magic[4];
+ unsigned char s_dummy[28];
+ unsigned char s_uuid[16];
+ unsigned char s_dummy2[60];
+ unsigned char s_fname[12];
+};
+
+static struct uuidCache_s {
+ struct uuidCache_s *next;
+ char uuid[16];
+ char *label;
+ char *device;
+} *uuidCache = NULL;
+
+char *string_copy(const char *s)
+{
+ char *ret;
+
+ ret = malloc(strlen(s)+1);
+ if (ret)
+ strcpy(ret, s);
+ return ret;
+}
+
+/* for now, only ext2 and xfs are supported */
+static int
+get_label_uuid(const char *device, char **label, char *uuid) {
+
+ /* start with ext2 and xfs tests, taken from mount_guess_fstype */
+ /* should merge these later */
+ int fd;
+ size_t label_size;
+ unsigned char *sb_uuid = 0, *sb_label = 0;
+ struct ext2_super_block e2sb;
+ struct xfs_super_block xfsb;
+
+ fd = open(device, O_RDONLY);
+ if (fd < 0)
+ return 1;
+
+ if (lseek(fd, 1024, SEEK_SET) == 1024
+ && read(fd, (char *) &e2sb, sizeof(e2sb)) == sizeof(e2sb)
+ && (ext2magic(e2sb) == EXT2_SUPER_MAGIC)) {
+ sb_uuid = e2sb.s_uuid;
+ sb_label = e2sb.s_volume_name;
+ label_size = sizeof(e2sb.s_volume_name);
+ } else if (lseek(fd, 0, SEEK_SET) == 0
+ && read(fd, (char *) &xfsb, sizeof(xfsb)) == sizeof(xfsb)
+ && strncmp((char *) &xfsb.s_magic, XFS_SUPER_MAGIC, 4) == 0) {
+ sb_uuid = xfsb.s_uuid;
+ sb_label = xfsb.s_fname;
+ label_size = sizeof(xfsb.s_fname);
+ } else {
+ close(fd);
+ return 1;
+ }
+
+ close(fd);
+ if (sb_uuid)
+ memcpy(uuid, sb_uuid, sizeof(e2sb.s_uuid));
+ if (sb_label) {
+ if ((*label = calloc(label_size + 1, 1)) != NULL)
+ memcpy(*label, sb_label, label_size);
+ }
+ return 0;
+}
+
+static void
+uuidcache_addentry(char *device, char *label, char *uuid) {
+ struct uuidCache_s *last;
+
+ if (!uuidCache) {
+ last = uuidCache = malloc(sizeof(*uuidCache));
+ } else {
+ for (last = uuidCache; last->next; last = last->next) ;
+ last->next = malloc(sizeof(*uuidCache));
+ last = last->next;
+ }
+ last->next = NULL;
+ last->device = device;
+ last->label = label;
+ memcpy(last->uuid, uuid, sizeof(last->uuid));
+}
+
+/*
+ * 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 void init_lvm(void)
+{
+ DIR *vg_dir, *lv_list;
+ char *vdirname, *lvm_device;
+ char uuid[16], *label, *vname, *lname;
+ struct dirent *vg_iter, *lv_iter;
+
+ if ((vg_dir = opendir(VG_DIR)) == NULL)
+ return;
+
+ while ((vg_iter = readdir(vg_dir)) != 0) {
+ vname = vg_iter->d_name;
+ if (!strcmp(vname, ".") || !strcmp(vname, ".."))
+ continue;
+ vdirname = malloc(strlen(VG_DIR)+strlen(vname)+8);
+ if (!vdirname) {
+ closedir(vg_dir);
+ return;
+ }
+ sprintf(vdirname, "%s/%s/LVs", VG_DIR, vname);
+
+ lv_list = opendir(vdirname);
+ free(vdirname);
+ if (lv_list != NULL)
+ return;
+
+ while ((lv_iter = readdir(lv_list)) != 0) {
+ lname = lv_iter->d_name;
+ if (!strcmp(lname, ".") || !strcmp(lname, ".."))
+ continue;
+
+ lvm_device = malloc(strlen(DEVLABELDIR) +
+ strlen(vname)+
+ strlen(lname)+8);
+ if (!lvm_device) {
+ closedir(lv_list);
+ closedir(vg_dir);
+ return;
+ }
+ sprintf(lvm_device, "%s/%s/%s", DEVLABELDIR,
+ vname, lname);
+ if (!get_label_uuid(lvm_device, &label, uuid)) {
+ uuidcache_addentry(string_copy(lvm_device),
+ label, uuid);
+ } else
+ free(lvm_device);
+ }
+ closedir(lv_list);
+ }
+ closedir( vg_dir );
+}
+#endif
+
+static void
+uuidcache_init(void) {
+ char line[100];
+ char *s;
+ int ma, mi, sz;
+ static char ptname[100];
+ FILE *procpt;
+ char uuid[16], *label, *devname;
+ char device[110];
+ dev_t dev;
+ struct stat statbuf;
+ int firstPass;
+ int handleOnFirst;
+
+ if (uuidCache)
+ return;
+
+#ifdef VG_DIR
+ init_lvm();
+#endif
+
+ procpt = fopen(PROC_PARTITIONS, "r");
+ if (!procpt)
+ return;
+
+ for (firstPass = 1; firstPass >= 0; firstPass--) {
+ fseek(procpt, 0, SEEK_SET);
+
+ while (fgets(line, sizeof(line), procpt)) {
+ if (sscanf (line, " %d %d %d %[^\n ]",
+ &ma, &mi, &sz, ptname) != 4)
+ continue;
+
+ /* skip extended partitions (heuristic: size 1) */
+ if (sz == 1)
+ continue;
+
+ /* look only at md devices on first pass */
+ handleOnFirst = !strncmp(ptname, "md", 2);
+ if (firstPass != handleOnFirst)
+ continue;
+
+ /* skip entire disk (minor 0, 64, ... on ide;
+ 0, 16, ... on sd) */
+ /* heuristic: partition name ends in a digit */
+
+ for(s = ptname; *s; s++);
+ if (isdigit(s[-1])) {
+ /*
+ * We first look in /dev for the device, but
+ * if we don't find it, or if the stat
+ * information doesn't check out, we use
+ * ext2fs_find_block_device to find it.
+ */
+ sprintf(device, "%s/%s", DEVLABELDIR, ptname);
+ dev = makedev(ma, mi);
+ if ((stat(device, &statbuf) < 0) ||
+ (statbuf.st_rdev != dev)) {
+ devname = ext2fs_find_block_device(dev);
+ } else
+ devname = string_copy(device);
+ if (!devname)
+ continue;
+ if (!get_label_uuid(devname, &label, uuid))
+ uuidcache_addentry(devname, label, uuid);
+ else
+ free(devname);
+ }
+ }
+ }
+
+ fclose(procpt);
+}
+
+#define UUID 1
+#define VOL 2
+
+static char *
+get_spec_by_x(int n, const char *t) {
+ struct uuidCache_s *uc;
+
+ uuidcache_init();
+ uc = uuidCache;
+
+ if (t == NULL)
+ return NULL;
+
+ while(uc) {
+ switch (n) {
+ case UUID:
+ if (!memcmp(t, uc->uuid, sizeof(uc->uuid)))
+ return string_copy(uc->device);
+ break;
+ case VOL:
+ if (!strcmp(t, uc->label))
+ return string_copy(uc->device);
+ break;
+ }
+ uc = uc->next;
+ }
+ return NULL;
+}
+
+static char fromhex(char c)
+{
+ if (isdigit(c))
+ return (c - '0');
+ else if (islower(c))
+ return (c - 'a' + 10);
+ else
+ return (c - 'A' + 10);
+}
+
+char *
+get_spec_by_uuid(const char *s)
+{
+ char uuid[16];
+ int i;
+
+ if (strlen(s) != 36 ||
+ s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-')
+ goto bad_uuid;
+ for (i=0; i<16; i++) {
+ if (*s == '-') s++;
+ if (!isxdigit(s[0]) || !isxdigit(s[1]))
+ goto bad_uuid;
+ uuid[i] = ((fromhex(s[0])<<4) | fromhex(s[1]));
+ s += 2;
+ }
+ return get_spec_by_x(UUID, uuid);
+
+ bad_uuid:
+ fprintf(stderr, _("WARNING: %s: bad UUID"), s);
+ return NULL;
+}
+
+char *
+get_spec_by_volume_label(const char *s) {
+ return get_spec_by_x(VOL, s);
+}
+
+const char *
+get_volume_label_by_spec(const char *spec) {
+ struct uuidCache_s *uc;
+
+ uuidcache_init();
+ uc = uuidCache;
+
+ while(uc) {
+ if (!strcmp(spec, uc->device))
+ return uc->label;
+ uc = uc->next;
+ }
+ return NULL;
+}
+
+/*
+ * Interpret the device name if necessary.
+ * Frees the pointer passed to it if we return a different device string.
+ */
+char *interpret_spec(char *spec)
+{
+ char *dev = NULL;
+
+ if (!spec)
+ return NULL;
+
+ if (!strncmp(spec, "UUID=", 5))
+ dev = get_spec_by_uuid(spec+5);
+ else if (!strncmp(spec, "LABEL=", 6))
+ dev = get_spec_by_volume_label(spec+6);
+ else
+ dev = string_copy(spec);
+ return dev;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/get_device_by_label.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/get_device_by_label.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/get_device_by_label.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,15 @@
+/*
+ * get_device_by_label.h
+ *
+ * Copyright 1999 by Andries Brouwer
+ * Copyright 1999, 2000 by Theodore Ts'o
+ *
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ */
+
+extern char *string_copy(const char *s);
+extern char *get_spec_by_uuid(const char *uuid);
+extern char *get_spec_by_volume_label(const char *volumelabel);
+extern const char *get_volume_label_by_spec(const char *spec);
+extern char *interpret_spec(char *spec);
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/jfs_user.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/jfs_user.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/jfs_user.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 */
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/lsattr.1.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/lsattr.1.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/lsattr.1.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,44 @@
+.\" -*- 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 at linux.org>.
+.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)
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/lsattr.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/lsattr.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/lsattr.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,190 @@
+/*
+ * lsattr.c - List file attributes on an ext2 file system
+ *
+ * Copyright (C) 1993, 1994 Remy Card <card at 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"
+
+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 void 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;
+ }
+ if (generation_opt) {
+ if (fgetversion (name, &generation) == -1) {
+ com_err (program_name, errno,
+ _("While reading version on %s"),
+ name);
+ return;
+ }
+ 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);
+ }
+}
+
+static int lsattr_dir_proc (const char *, struct dirent *, void *);
+
+static void lsattr_args (const char * name)
+{
+ STRUCT_STAT st;
+
+ if (LSTAT (name, &st) == -1)
+ com_err (program_name, errno, _("while trying to stat %s"),
+ name);
+ else {
+ if (S_ISDIR(st.st_mode) && !dirs_opt)
+ iterate_on_dir (name, lsattr_dir_proc, NULL);
+ else
+ list_attributes (name);
+ }
+}
+
+static int lsattr_dir_proc (const char * dir_name, struct dirent * de, void * private)
+{
+ STRUCT_STAT st;
+ char *path;
+
+ path = malloc(strlen (dir_name) + 1 + strlen (de->d_name) + 1);
+
+ 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;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+#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)
+ lsattr_args (".");
+ else
+ for (i = optind; i < argc; i++)
+ lsattr_args (argv[i]);
+ exit(0);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/mke2fs.8.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/mke2fs.8.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/mke2fs.8.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,401 @@
+.\" -*- 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 a Linux second extended file system
+.SH SYNOPSIS
+.B mke2fs
+[
+.B \-c
+|
+.B \-l
+.I filename
+]
+[
+.B \-b
+.I block-size
+]
+[
+.B \-f
+.I fragment-size
+]
+[
+.B \-i
+.I bytes-per-inode
+]
+[
+.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 \-R
+.I raid-options
+]
+[
+.B \-v
+]
+[
+.B \-F
+]
+[
+.B \-L
+.I volume-label
+]
+[
+.B \-M
+.I last-mounted-directory
+]
+[
+.B \-S
+]
+[
+.B \-T
+.I filesystem-type
+]
+[
+.B \-V
+]
+.I device
+[
+.I blocks-count
+]
+ at JDEV@.sp
+ at JDEV@.B "mke2fs \-O journal_dev"
+ at JDEV@[
+ at JDEV@.B \-b
+ at JDEV@.I block-size
+ at JDEV@]
+.\" No external-journal specific journal options yet (size is ignored)
+.\" @JDEV@[
+.\" @JDEV at .B \-J
+.\" @JDEV at .I journal-options
+.\" @JDEV@]
+ at JDEV@[
+ at JDEV@.B \-L
+ at JDEV@.I volume-label
+ at JDEV@]
+ at JDEV@[
+ at JDEV@.B \-n
+ at JDEV@]
+ at JDEV@[
+ at JDEV@.B \-q
+ at JDEV@]
+ at JDEV@[
+ at JDEV@.B \-v
+ at JDEV@]
+ at JDEV@.I external-journal
+ at JDEV@[
+ at JDEV@.I blocks-count
+ at JDEV@]
+.SH DESCRIPTION
+.B mke2fs
+is used to create a Linux second extended file system on a device (usually
+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.
+.SH OPTIONS
+.TP
+.BI \-b " block-size"
+Specify the size of blocks in bytes. Valid block size vales are 1024,
+2048 and 4096 bytes per block. If omitted,
+.B mke2fs
+block-size is determined by the file system size and the expected usage
+of the filesystem (see the
+.B \-T
+option).
+.TP
+.B \-c
+Check the device for bad blocks before creating the file system. If
+this option is specified twice, then a slower, destructive, read-write
+test is used instead of a fast read-only test.
+.TP
+.BI \-f " fragment-size"
+Specify the size of fragments in bytes.
+.TP
+.B \-F
+Force
+.B mke2fs
+to run, even if the specified device is not a
+block special device, or appears to be mounted.
+.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 then too many
+inodes will be made. Be warned that is not possible to expand the number
+of inodes on a filesystem after it is created, so be careful deciding the
+correct value for this parameter.
+.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 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.
+The journal must fit within the newly created filesystem.
+ at JDEV@.TP
+ at JDEV@.BI device= external-journal
+ at JDEV@Attach the filesystem to the journal block device located on
+ at JDEV@.IR external-journal .
+ at JDEV@The external
+ at JDEV@journal must already have been created using the command
+ at JDEV@.IP
+ at JDEV@.B mke2fs -O journal_dev
+ at JDEV@.I external-journal
+ at JDEV@.IP
+ at JDEV@Note that
+ at JDEV@.I external-journal
+ at JDEV@must have been created with the
+ at JDEV@same block size as the new filesystem.
+ at JDEV@.IP
+ at JDEV@Instead of specifying a device name directly,
+ at JDEV@.I external-journal
+ at JDEV@can also be specified by either
+ at JDEV@.BI LABEL= label
+ at JDEV@or
+ at JDEV@.BI UUID= UUID
+ at JDEV@to locate the external journal by either the volume label or UUID
+ at JDEV@stored in the ext2 superblock at the start of the journal. Use
+ at JDEV@.BR dumpe2fs (8)
+ at JDEV@to display a journal device's volume label and UUID. See also the
+ at JDEV@.B -L
+ at JDEV@option of
+ at JDEV@.BR tune2fs (8).
+.RE
+ at JDEV@.IP
+ at JDEV@Only one of the
+ at JDEV@.BR size " or " device
+ at 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 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
+.B \-L
+Set the volume label for the filesystem.
+.TP
+.BI \-m " reserved-blocks-percentage"
+Specify the percentage of the filesystem blocks reserved for
+the super-user. This value defaults to 5%.
+.TP
+.B \-M
+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 filesytem should be mounted.
+.TP
+.B \-n
+causes mke2fs to not actually create a filesystem, but display what it
+would do if it were to create a filesystem.
+.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"
+Manually override the default value of the "creator os" field of the
+filesystem. Normally the creator field is set by default to the native OS
+of the
+.B mke2fs
+executable.
+.TP
+.B "\-O \fIfeature\fR[,...]"
+Create filesystem with given features (filesystem options).
+Currently, the
+.B sparse_super
+and
+.B filetype
+features are turned on by default unless
+.B mke2fs
+is run on a system with a pre-2.2 Linux kernel. Filesystems that
+may need to mounted on pre-2.2 kernels should be created with
+.B "\-O none"
+(or
+.B "\-r 0"
+for 1.2 kernels) which will disable these features, even if
+.B mke2fs
+is run on a system which can support them.
+.sp
+The following filesystem options are supported:
+.RS 1.2i
+.TP
+.B sparse_super
+Create a filesystem with fewer superblock backup copies
+(saves space on large filesystems).
+.TP
+.B filetype
+Store file type information in directory entries.
+.TP
+.B has_journal
+Create an ext3 journal (as if using the
+.B \-j
+option).
+ at JDEV@.TP
+ at JDEV@.B journal_dev
+ at JDEV@Create an external ext3 journal on the given device
+ at JDEV@instead of a regular ext2 filesystem.
+ at JDEV@Note that
+ at JDEV@.I external-journal
+ at JDEV@must be created with the same
+ at JDEV@block size as the filesystems that will be using it.
+.RE
+.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
+.BI \-R " raid-options"
+Set raid-related options for the filesystem. Raid options are comma
+separated, and may take an argument using the equals ('=') sign. The
+following options are supported:
+.RS 1.2i
+.TP
+.BI stride= stripe-size
+Configure the filesystem for a RAID array with
+.I stripe-size
+filesystem blocks per stripe.
+.RE
+.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 how the filesystem is going to be used, so that mke2fs can
+chose optimal filesystem parameters for that use. The supported
+filesystem types are:
+.RS 1.2i
+.TP 1.2i
+news
+one inode per 4kb block
+.TP
+largefile
+one inode per megabyte
+.TP
+largefile4
+one inode per 4 megabytes
+.RE
+.TP
+.B \-v
+Verbose execution.
+.TP
+.B \-V
+Print the version number of
+.B mke2fs
+and exit.
+.SH AUTHOR
+This version of
+.B mke2fs
+has been written by Theodore Ts'o <tytso at 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 badblocks (8),
+.BR dumpe2fs (8),
+.BR e2fsck (8),
+.BR tune2fs (8)
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/mke2fs.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/mke2fs.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/mke2fs.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1363 @@
+/*
+ * mke2fs.c - Make a ext2fs filesystem.
+ *
+ * Copyright (C) 1994, 1995, 1996, 1997 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 :-).
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <time.h>
+#ifdef __linux__
+#include <sys/utsname.h>
+#endif
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_MNTENT_H
+#include <mntent.h>
+#endif
+#include <sys/ioctl.h>
+#include <sys/types.h>
+
+#include "ext2fs/ext2_fs.h"
+#include "et/com_err.h"
+#include "uuid/uuid.h"
+#include "e2p/e2p.h"
+#include "ext2fs/ext2fs.h"
+#include "util.h"
+#include "../version.h"
+#include "nls-enable.h"
+
+#define STRIDE_LENGTH 8
+
+#ifndef __sparc__
+#define ZAP_BOOTBLOCK
+#endif
+
+extern int isatty(int);
+extern FILE *fpopen(const char *cmd, const char *mode);
+
+const char * program_name = "mke2fs";
+const char * device_name /* = NULL */;
+
+/* Command line options */
+int cflag;
+int verbose;
+int quiet;
+int super_only;
+int force;
+int noaction;
+int journal_size;
+int journal_flags;
+char *bad_blocks_filename;
+__u32 fs_stride;
+
+struct ext2_super_block param;
+char *creator_os;
+char *volume_label;
+char *mount_dir;
+char *journal_device;
+int sync_kludge; /* Set using the MKE2FS_SYNC env. option */
+
+static void usage(void)
+{
+ fprintf(stderr, _("Usage: %s [-c|-t|-l filename] [-b block-size] "
+ "[-f fragment-size]\n\t[-i bytes-per-inode] [-j] [-J journal-options]"
+ " [-N number-of-inodes]\n\t[-m reserved-blocks-percentage] "
+ "[-o creator-os] [-g blocks-per-group]\n\t[-L volume-label] "
+ "[-M last-mounted-directory] [-O feature[,...]]\n\t"
+ "[-r fs-revision] [-R raid_opts] [-qvSV] device [blocks-count]\n"),
+ program_name);
+ exit(1);
+}
+
+static int int_log2(int arg)
+{
+ int l = 0;
+
+ arg >>= 1;
+ while (arg) {
+ l++;
+ arg >>= 1;
+ }
+ return l;
+}
+
+static int int_log10(unsigned int arg)
+{
+ int l;
+
+ for (l=0; arg ; l++)
+ arg = arg / 10;
+ return l;
+}
+
+/*
+ * This function sets the default parameters for a filesystem
+ *
+ * The type is specified by the user. The size is the maximum size
+ * (in megabytes) for which a set of parameters applies, with a size
+ * of zero meaning that it is the default parameter for the type.
+ * Note that order is important in the table below.
+ */
+static char default_str[] = "default";
+struct mke2fs_defaults {
+ const char *type;
+ int size;
+ int blocksize;
+ int inode_ratio;
+} settings[] = {
+ { default_str, 0, 4096, 8192 },
+ { default_str, 512, 1024, 4096 },
+ { default_str, 3, 1024, 8192 },
+ { "journal", 0, 4096, 8192 },
+ { "news", 0, 4096, 4096 },
+ { "largefile", 0, 4096, 1024 * 1024 },
+ { "largefile4", 0, 4096, 4096 * 1024 },
+ { 0, 0, 0, 0},
+};
+
+static void set_fs_defaults(const char *fs_type,
+ struct ext2_super_block *super,
+ int blocksize, int *inode_ratio)
+{
+ int megs;
+ int ratio = 0;
+ struct mke2fs_defaults *p;
+
+ megs = (super->s_blocks_count * (EXT2_BLOCK_SIZE(super) / 1024) /
+ 1024);
+ if (inode_ratio)
+ ratio = *inode_ratio;
+ if (!fs_type)
+ fs_type = default_str;
+ for (p = settings; p->type; p++) {
+ if ((strcmp(p->type, fs_type) != 0) &&
+ (strcmp(p->type, default_str) != 0))
+ continue;
+ if ((p->size != 0) &&
+ (megs > p->size))
+ continue;
+ if (ratio == 0)
+ *inode_ratio = p->inode_ratio;
+ if (blocksize == 0) {
+ super->s_log_frag_size = super->s_log_block_size =
+ int_log2(p->blocksize >> EXT2_MIN_BLOCK_LOG_SIZE);
+ }
+ }
+ if (blocksize == 0)
+ super->s_blocks_count /= EXT2_BLOCK_SIZE(super) / 1024;
+}
+
+/*
+ * Helper function for read_bb_file and test_disk
+ */
+static void invalid_block(ext2_filsys fs, 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,
+ _("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 %s%s%s %d", fs->blocksize,
+ quiet ? "" : "-s ", (cflag > 1) ? "-w " : "",
+ fs->device_name, fs->super->s_blocks_count);
+ if (verbose)
+ printf(_("Running command: %s\n"), buf);
+ f = popen(buf, "r");
+ if (!f) {
+ com_err("popen", errno,
+ _("while trying 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,
+ _("while processing list of bad blocks from program"));
+ exit(1);
+ }
+}
+
+static void handle_bad_blocks(ext2_filsys fs, badblocks_list bb_list)
+{
+ int i, j;
+ int 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 %d through %d must be good "
+ "in order to build a filesystem.\n"),
+ fs->super->s_first_data_block, must_be_good);
+ fprintf(stderr, _("Aborting....\n"));
+ 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 %d contain\n"
+" bad blocks.\n\n"),
+ group_block);
+ group_bad++;
+ group = ext2fs_group_of_blk(fs, group_block+j);
+ fs->group_desc[group].bg_free_blocks_count++;
+ fs->super->s_free_blocks_count++;
+ }
+ }
+ 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,
+ _("while marking bad blocks as used"));
+ exit(1);
+ }
+ while (ext2fs_badblocks_list_iterate(bb_iter, &blk))
+ ext2fs_mark_block_bitmap(fs->block_map, blk);
+ ext2fs_badblocks_list_iterate_end(bb_iter);
+}
+
+/*
+ * These functions implement a generalized progress meter.
+ */
+struct progress_struct {
+ char format[20];
+ char backup[80];
+ __u32 max;
+};
+
+static void progress_init(struct progress_struct *progress,
+ const char *label,__u32 max)
+{
+ int i;
+
+ memset(progress, 0, sizeof(struct progress_struct));
+ if (quiet)
+ return;
+
+ /*
+ * Figure out how many digits we need
+ */
+ i = int_log10(max);
+ sprintf(progress->format, "%%%dd/%%%dld", i, i);
+ memset(progress->backup, '\b', sizeof(progress->backup)-1);
+ progress->backup[sizeof(progress->backup)-1] = 0;
+ if ((2*i)+1 < sizeof(progress->backup))
+ progress->backup[(2*i)+1] = 0;
+ progress->max = max;
+
+ fputs(label, stdout);
+ fflush(stdout);
+}
+
+static void progress_update(struct progress_struct *progress, __u32 val)
+{
+ if (progress->format[0] == 0)
+ return;
+ printf(progress->format, val, progress->max);
+ fputs(progress->backup, stdout);
+}
+
+static void progress_close(struct progress_struct *progress)
+{
+ if (progress->format[0] == 0)
+ return;
+ fputs(_("done \n"), stdout);
+}
+
+
+/*
+ * 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.)
+ */
+static errcode_t zero_blocks(ext2_filsys fs, blk_t blk, int num,
+ struct progress_struct *progress,
+ blk_t *ret_blk, int *ret_count)
+{
+ int j, count, next_update, next_update_incr;
+ 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,
+ _("while allocating zeroizing buffer"));
+ exit(1);
+ }
+ memset(buf, 0, fs->blocksize * STRIDE_LENGTH);
+ }
+ /* OK, do the write loop */
+ next_update = 0;
+ next_update_incr = num / 100;
+ if (next_update_incr < 1)
+ next_update_incr = 1;
+ for (j=0; j < num; j += STRIDE_LENGTH, blk += STRIDE_LENGTH) {
+ if (num-j > STRIDE_LENGTH)
+ count = STRIDE_LENGTH;
+ else
+ count = num - j;
+ retval = io_channel_write_blk(fs->io, blk, count, buf);
+ if (retval) {
+ if (ret_count)
+ *ret_count = count;
+ if (ret_blk)
+ *ret_blk = blk;
+ return retval;
+ }
+ if (progress && j > next_update) {
+ next_update += num / 100;
+ progress_update(progress, blk);
+ }
+ }
+ return 0;
+}
+
+static void write_inode_tables(ext2_filsys fs)
+{
+ errcode_t retval;
+ blk_t blk;
+ int i, num;
+ struct progress_struct progress;
+
+ if (quiet)
+ memset(&progress, 0, sizeof(progress));
+ else
+ progress_init(&progress, _("Writing inode tables: "),
+ fs->group_desc_count);
+
+ for (i = 0; i < fs->group_desc_count; i++) {
+ progress_update(&progress, i);
+
+ blk = fs->group_desc[i].bg_inode_table;
+ num = fs->inode_blocks_per_group;
+
+ retval = zero_blocks(fs, blk, num, 0, &blk, &num);
+ if (retval) {
+ fprintf(stderr, _("\nCould not write %d blocks "
+ "in inode table starting at %d: %s\n"),
+ num, blk, error_message(retval));
+ exit(1);
+ }
+ if (sync_kludge) {
+ if (sync_kludge == 1)
+ sync();
+ else if ((i % sync_kludge) == 0)
+ sync();
+ }
+ }
+ zero_blocks(0, 0, 0, 0, 0, 0);
+ progress_close(&progress);
+}
+
+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, _("while creating root dir"));
+ exit(1);
+ }
+ if (geteuid()) {
+ retval = ext2fs_read_inode(fs, EXT2_ROOT_INO, &inode);
+ if (retval) {
+ com_err("ext2fs_read_inode", retval,
+ _("while reading root inode"));
+ exit(1);
+ }
+ inode.i_uid = getuid();
+ if (inode.i_uid)
+ inode.i_gid = getgid();
+ retval = ext2fs_write_inode(fs, EXT2_ROOT_INO, &inode);
+ if (retval) {
+ com_err("ext2fs_write_inode", retval,
+ _("while setting root inode ownership"));
+ exit(1);
+ }
+ }
+}
+
+static void create_lost_and_found(ext2_filsys fs)
+{
+ errcode_t retval;
+ ext2_ino_t ino;
+ const char *name = "lost+found";
+ int i;
+ int lpf_size = 0;
+
+ fs->umask = 077;
+ retval = ext2fs_mkdir(fs, EXT2_ROOT_INO, 0, name);
+ if (retval) {
+ com_err("ext2fs_mkdir", retval,
+ _("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,
+ _("while looking up /lost+found"));
+ exit(1);
+ }
+
+ for (i=1; i < EXT2_NDIR_BLOCKS; i++) {
+ if ((lpf_size += fs->blocksize) >= 16*1024)
+ break;
+ retval = ext2fs_expand_dir(fs, ino);
+ if (retval) {
+ com_err("ext2fs_expand_dir", retval,
+ _("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_bitmap(fs->inode_map, EXT2_BAD_INO);
+ fs->group_desc[0].bg_free_inodes_count--;
+ fs->super->s_free_inodes_count--;
+ retval = ext2fs_update_bb_inode(fs, bb_list);
+ if (retval) {
+ com_err("ext2fs_update_bb_inode", retval,
+ _("while setting bad block inode"));
+ exit(1);
+ }
+
+}
+
+static void reserve_inodes(ext2_filsys fs)
+{
+ ext2_ino_t i;
+ int group;
+
+ for (i = EXT2_ROOT_INO + 1; i < EXT2_FIRST_INODE(fs->super); i++) {
+ ext2fs_mark_inode_bitmap(fs->inode_map, i);
+ group = ext2fs_group_of_ino(fs, i);
+ fs->group_desc[group].bg_free_inodes_count--;
+ fs->super->s_free_inodes_count--;
+ }
+ 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);
+ }
+ memset(buf, 0, 512*nsect);
+
+ if (sect == 0) {
+ /* Check for a BSD disklabel, and don't erase it if so */
+ retval = io_channel_read_blk(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;
+ }
+ }
+
+ io_channel_set_blksize(fs->io, 512);
+ retval = io_channel_write_blk(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 progress_struct progress;
+ errcode_t retval;
+ char *buf;
+ blk_t blk;
+ int count;
+
+ retval = ext2fs_create_journal_superblock(fs,
+ fs->super->s_blocks_count, 0, &buf);
+ if (retval) {
+ com_err("create_journal_dev", retval,
+ _("while initializing journal superblock"));
+ exit(1);
+ }
+ if (quiet)
+ memset(&progress, 0, sizeof(progress));
+ else
+ progress_init(&progress, _("Zeroing journal device: "),
+ fs->super->s_blocks_count);
+
+ retval = zero_blocks(fs, 0, fs->super->s_blocks_count,
+ &progress, &blk, &count);
+ if (retval) {
+ com_err("create_journal_dev", retval,
+ _("while zeroing journal device (block %u, count %d)"),
+ blk, count);
+ exit(1);
+ }
+ zero_blocks(0, 0, 0, 0, 0, 0);
+
+ retval = io_channel_write_blk(fs->io,
+ fs->super->s_first_data_block+1,
+ 1, buf);
+ if (retval) {
+ com_err("create_journal_dev", retval,
+ _("while writing journal superblock"));
+ exit(1);
+ }
+ progress_close(&progress);
+}
+
+static void show_stats(ext2_filsys fs)
+{
+ struct ext2_super_block *s = fs->super;
+ char buf[80];
+ blk_t group_block;
+ int i, need, col_left;
+
+ if (param.s_blocks_count != s->s_blocks_count)
+ fprintf(stderr, _("warning: %d blocks unused.\n\n"),
+ param.s_blocks_count - s->s_blocks_count);
+
+ memset(buf, 0, sizeof(buf));
+ strncpy(buf, s->s_volume_name, sizeof(s->s_volume_name));
+ printf(_("Filesystem label=%s\n"), buf);
+ printf(_("OS type: "));
+ switch (fs->super->s_creator_os) {
+ case EXT2_OS_LINUX: printf ("Linux"); break;
+ case EXT2_OS_HURD: printf ("GNU/Hurd"); break;
+ case EXT2_OS_MASIX: printf ("Masix"); break;
+ default: printf (_("(unknown os)"));
+ }
+ printf("\n");
+ printf(_("Block size=%u (log=%u)\n"), fs->blocksize,
+ s->s_log_block_size);
+ printf(_("Fragment size=%u (log=%u)\n"), fs->fragsize,
+ s->s_log_frag_size);
+ printf(_("%u inodes, %u blocks\n"), s->s_inodes_count,
+ s->s_blocks_count);
+ printf(_("%u blocks (%2.2f%%) reserved for the super user\n"),
+ s->s_r_blocks_count,
+ 100.0 * s->s_r_blocks_count / s->s_blocks_count);
+ printf(_("First data block=%u\n"), s->s_first_data_block);
+ 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);
+ printf(_("%u blocks per group, %u fragments per group\n"),
+ s->s_blocks_per_group, s->s_frags_per_group);
+ printf(_("%u inodes per group\n"), s->s_inodes_per_group);
+
+ if (fs->group_desc_count == 1) {
+ printf("\n");
+ return;
+ }
+
+ printf(_("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("%u", 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, "masix") == 0)
+ sb->s_creator_os = EXT2_OS_MASIX;
+ else
+ return 0;
+ return 1;
+}
+
+#define PATH_SET "PATH=/sbin"
+
+static void parse_raid_opts(const char *opts)
+{
+ char *buf, *token, *next, *p, *arg;
+ int len;
+ int raid_usage = 0;
+
+ len = strlen(opts);
+ buf = malloc(len+1);
+ if (!buf) {
+ fprintf(stderr, _("Couldn't allocate memory to parse "
+ "raid 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, "stride") == 0) {
+ if (!arg) {
+ raid_usage++;
+ continue;
+ }
+ fs_stride = strtoul(arg, &p, 0);
+ if (*p || (fs_stride == 0)) {
+ fprintf(stderr,
+ _("Invalid stride parameter.\n"));
+ raid_usage++;
+ continue;
+ }
+ } else
+ raid_usage++;
+ }
+ if (raid_usage) {
+ fprintf(stderr, _("\nBad raid options specified.\n\n"
+ "Raid options are separated by commas, "
+ "and may take an argument which\n"
+ "\tis set off by an equals ('=') sign.\n\n"
+ "Valid raid options are:\n"
+ "\tstride=<stride length in blocks>\n\n"));
+ exit(1);
+ }
+}
+
+static __u32 ok_features[3] = {
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL, /* Compat */
+ EXT2_FEATURE_INCOMPAT_FILETYPE| /* Incompat */
+ EXT3_FEATURE_INCOMPAT_JOURNAL_DEV,
+ EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER /* R/O compat */
+};
+
+
+static void PRS(int argc, char *argv[])
+{
+ int c;
+ int size;
+ char * tmp;
+ blk_t group_blk_max = 8192;
+ int blocksize = 0;
+ int inode_ratio = 0;
+ int reserved_ratio = 5;
+ ext2_ino_t num_inodes = 0;
+ errcode_t retval;
+ char * oldpath = getenv("PATH");
+ char * raid_opts = 0;
+ const char * fs_type = 0;
+ int default_features = 1;
+ blk_t dev_size;
+#ifdef __linux__
+ struct utsname ut;
+#endif
+
+ /* Update our PATH to include /sbin */
+ if (oldpath) {
+ char *newpath;
+
+ newpath = malloc(sizeof (PATH_SET) + 1 + strlen (oldpath));
+ strcpy (newpath, PATH_SET);
+ strcat (newpath, ":");
+ strcat (newpath, oldpath);
+ putenv (newpath);
+ } else
+ putenv (PATH_SET);
+
+ tmp = getenv("MKE2FS_SYNC");
+ if (tmp)
+ sync_kludge = atoi(tmp);
+
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+ initialize_ext2_error_table();
+ memset(¶m, 0, sizeof(struct ext2_super_block));
+ param.s_rev_level = 1; /* Create revision 1 filesystems now */
+ param.s_feature_incompat |= EXT2_FEATURE_INCOMPAT_FILETYPE;
+ param.s_feature_ro_compat |= EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
+
+#ifdef __linux__
+ if (uname(&ut)) {
+ perror("uname");
+ exit(1);
+ }
+ if ((ut.release[0] == '1') ||
+ (ut.release[0] == '2' && ut.release[1] == '.' &&
+ ut.release[2] < '2' && ut.release[3] == '.')) {
+ param.s_rev_level = 0;
+ param.s_feature_incompat = 0;
+ param.s_feature_compat = 0;
+ param.s_feature_ro_compat = 0;
+ }
+#endif
+ fprintf (stderr, "mke2fs %s (%s)\n",
+ E2FSPROGS_VERSION, E2FSPROGS_DATE);
+
+ if (argc && *argv) {
+ program_name = get_progname(*argv);
+
+ /* If called as mkfs.ext3, create a journal inode */
+ if (!strcmp(program_name, "mkfs.ext3"))
+ journal_size = -1;
+ }
+
+ while ((c = getopt (argc, argv,
+ "b:cf:g:i:jl:m:no:qr:R:s:tvI:J:ST:FL:M:N:O:V")) != EOF)
+ switch (c) {
+ case 'b':
+ blocksize = strtoul(optarg, &tmp, 0);
+ if (blocksize < 1024 || blocksize > 4096 || *tmp) {
+ com_err(program_name, 0,
+ _("bad block size - %s"), optarg);
+ exit(1);
+ }
+ param.s_log_block_size =
+ int_log2(blocksize >> EXT2_MIN_BLOCK_LOG_SIZE);
+ group_blk_max = blocksize * 8;
+ break;
+ case 'c': /* Check for bad blocks */
+ case 't': /* deprecated */
+ cflag++;
+ break;
+ case 'f':
+ size = strtoul(optarg, &tmp, 0);
+ if (size < 1024 || size > 4096 || *tmp) {
+ com_err(program_name, 0,
+ _("bad fragment size - %s"),
+ optarg);
+ exit(1);
+ }
+ param.s_log_frag_size =
+ int_log2(size >> EXT2_MIN_BLOCK_LOG_SIZE);
+ fprintf(stderr, _("Warning: fragments not supported. "
+ "Ignoring -f option\n"));
+ break;
+ case 'g':
+ param.s_blocks_per_group = strtoul(optarg, &tmp, 0);
+ if (*tmp) {
+ com_err(program_name, 0,
+ _("Illegal number for blocks per group"));
+ exit(1);
+ }
+ if ((param.s_blocks_per_group % 8) != 0) {
+ com_err(program_name, 0,
+ _("blocks per group must be multiple of 8"));
+ exit(1);
+ }
+ break;
+ case 'i':
+ inode_ratio = strtoul(optarg, &tmp, 0);
+ if (inode_ratio < 1024 || inode_ratio > 4096 * 1024 ||
+ *tmp) {
+ com_err(program_name, 0,
+ _("bad inode ratio - %s"), optarg);
+ exit(1);
+ }
+ break;
+ case 'J':
+ parse_journal_opts(optarg);
+ break;
+ case 'j':
+ param.s_feature_compat |=
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+ if (!journal_size)
+ journal_size = -1;
+ break;
+ case 'l':
+ bad_blocks_filename = malloc(strlen(optarg)+1);
+ if (!bad_blocks_filename) {
+ com_err(program_name, ENOMEM,
+ _("in malloc for bad_blocks_filename"));
+ exit(1);
+ }
+ strcpy(bad_blocks_filename, optarg);
+ break;
+ case 'm':
+ reserved_ratio = strtoul(optarg, &tmp, 0);
+ if (reserved_ratio > 50 || *tmp) {
+ com_err(program_name, 0,
+ _("bad reserved blocks percent - %s"),
+ optarg);
+ exit(1);
+ }
+ break;
+ case 'n':
+ noaction++;
+ break;
+ case 'o':
+ creator_os = optarg;
+ break;
+ case 'r':
+ param.s_rev_level = atoi(optarg);
+ if (param.s_rev_level == EXT2_GOOD_OLD_REV) {
+ param.s_feature_incompat = 0;
+ param.s_feature_compat = 0;
+ param.s_feature_ro_compat = 0;
+ }
+ break;
+ case 's': /* deprecated */
+ if (atoi(optarg))
+ param.s_feature_ro_compat |=
+ EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
+ else
+ param.s_feature_ro_compat &=
+ ~EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
+ break;
+#ifdef EXT2_DYNAMIC_REV
+ case 'I':
+ param.s_inode_size = atoi(optarg);
+ break;
+#endif
+ case 'N':
+ num_inodes = atoi(optarg);
+ break;
+ case 'v':
+ verbose = 1;
+ break;
+ case 'q':
+ quiet = 1;
+ break;
+ case 'F':
+ force = 1;
+ break;
+ case 'L':
+ volume_label = optarg;
+ break;
+ case 'M':
+ mount_dir = optarg;
+ break;
+ case 'O':
+ if (!strcmp(optarg, "none") || default_features) {
+ param.s_feature_compat = 0;
+ param.s_feature_incompat = 0;
+ param.s_feature_ro_compat = 0;
+ default_features = 0;
+ }
+ if (!strcmp(optarg, "none"))
+ break;
+ if (e2p_edit_feature(optarg,
+ ¶m.s_feature_compat,
+ ok_features)) {
+ fprintf(stderr,
+ _("Invalid filesystem option set: %s\n"), optarg);
+ exit(1);
+ }
+ break;
+ case 'R':
+ raid_opts = optarg;
+ break;
+ case 'S':
+ super_only = 1;
+ break;
+ case 'T':
+ fs_type = optarg;
+ break;
+ case 'V':
+ /* Print version number and exit */
+ fprintf(stderr, _("\tUsing %s\n"),
+ error_message(EXT2_ET_BASE));
+ exit(0);
+ default:
+ usage();
+ }
+ if (optind == argc)
+ usage();
+ device_name = argv[optind];
+ optind++;
+ if (optind < argc) {
+ unsigned long tmp2 = strtoul(argv[optind++], &tmp, 0);
+
+ if ((*tmp) || (tmp2 > 0xfffffffful)) {
+ com_err(program_name, 0, _("bad blocks count - %s"),
+ argv[optind - 1]);
+ exit(1);
+ }
+ param.s_blocks_count = tmp2;
+ }
+ if (optind < argc)
+ usage();
+
+ if (raid_opts)
+ parse_raid_opts(raid_opts);
+
+ /*
+ * 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;
+
+ retval = ext2fs_open(journal_device,
+ EXT2_FLAG_JOURNAL_DEV_OK, 0,
+ 0, unix_io_manager, &jfs);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while trying to open journal device %s\n"),
+ journal_device);
+ exit(1);
+ }
+ blocksize = jfs->blocksize;
+ param.s_log_block_size =
+ int_log2(blocksize >> EXT2_MIN_BLOCK_LOG_SIZE);
+ ext2fs_close(jfs);
+ }
+
+ if (param.s_feature_incompat & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) {
+ if (!fs_type)
+ fs_type = "journal";
+ reserved_ratio = 0;
+ param.s_feature_incompat = EXT3_FEATURE_INCOMPAT_JOURNAL_DEV;
+ param.s_feature_compat = 0;
+ param.s_feature_ro_compat = 0;
+ }
+ if (param.s_rev_level == EXT2_GOOD_OLD_REV &&
+ (param.s_feature_compat || param.s_feature_ro_compat ||
+ param.s_feature_incompat))
+ param.s_rev_level = 1; /* Create a revision 1 filesystem */
+
+ if (!force)
+ check_plausibility(device_name);
+ check_mount(device_name, force, _("filesystem"));
+
+ param.s_log_frag_size = param.s_log_block_size;
+
+ if (noaction && param.s_blocks_count) {
+ dev_size = param.s_blocks_count;
+ retval = 0;
+ } else
+ retval = ext2fs_get_device_size(device_name,
+ EXT2_BLOCK_SIZE(¶m),
+ &dev_size);
+ if (retval && (retval != EXT2_ET_UNIMPLEMENTED)) {
+ com_err(program_name, retval,
+ _("while trying to determine filesystem size"));
+ exit(1);
+ }
+ if (!param.s_blocks_count) {
+ if (retval == EXT2_ET_UNIMPLEMENTED) {
+ com_err(program_name, 0,
+ _("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,
+ _("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);
+ }
+ param.s_blocks_count = dev_size;
+ }
+
+ } else if (!force && (param.s_blocks_count > dev_size)) {
+ com_err(program_name, 0,
+ _("Filesystem larger than apparent filesystem size."));
+ proceed_question();
+ }
+
+ /*
+ * If the user asked for HAS_JOURNAL, then make sure a journal
+ * gets created.
+ */
+ if ((param.s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
+ !journal_size)
+ journal_size = -1;
+
+ set_fs_defaults(fs_type, ¶m, blocksize, &inode_ratio);
+
+ if (param.s_blocks_per_group) {
+ if (param.s_blocks_per_group < 256 ||
+ param.s_blocks_per_group > group_blk_max || *tmp) {
+ com_err(program_name, 0,
+ _("blocks per group count out of range"));
+ exit(1);
+ }
+ }
+
+ /*
+ * Calculate number of inodes based on the inode ratio
+ */
+ param.s_inodes_count = num_inodes ? num_inodes :
+ ((__u64) param.s_blocks_count * EXT2_BLOCK_SIZE(¶m))
+ / inode_ratio;
+
+ /*
+ * Calculate number of blocks to reserve
+ */
+ param.s_r_blocks_count = (param.s_blocks_count * reserved_ratio) / 100;
+
+}
+
+int main (int argc, char *argv[])
+{
+ errcode_t retval = 0;
+ ext2_filsys fs;
+ badblocks_list bb_list = 0;
+ int journal_blocks;
+ int i, val;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+#endif
+ PRS(argc, argv);
+
+ /*
+ * Initialize the superblock....
+ */
+ retval = ext2fs_initialize(device_name, 0, ¶m,
+ unix_io_manager, &fs);
+ if (retval) {
+ com_err(device_name, retval, _("while setting up superblock"));
+ exit(1);
+ }
+
+ /*
+ * Wipe out the old on-disk superblock
+ */
+ if (!noaction)
+ zap_sector(fs, 2, 6);
+
+ /*
+ * Generate a UUID for it...
+ */
+ uuid_generate(fs->super->s_uuid);
+
+ /*
+ * 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;
+
+ /*
+ * 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;
+ retval = ext2fs_allocate_tables(fs);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while trying to allocate filesystem tables"));
+ exit(1);
+ }
+ if (super_only) {
+ fs->super->s_state |= EXT2_ERROR_FS;
+ fs->flags &= ~(EXT2_FLAG_IB_DIRTY|EXT2_FLAG_BB_DIRTY);
+ } else {
+ /* rsv must be a power of two (64kB is MD RAID sb alignment) */
+ int rsv = 65536 / fs->blocksize;
+ unsigned long blocks = fs->super->s_blocks_count;
+ unsigned long start;
+ blk_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 = zero_blocks(fs, start, blocks - start,
+ NULL, &ret_blk, NULL);
+
+ if (retval) {
+ com_err(program_name, retval,
+ _("zeroing block %u at end of filesystem"),
+ ret_blk);
+ exit(1);
+ }
+ write_inode_tables(fs);
+ create_root_dir(fs);
+ create_lost_and_found(fs);
+ reserve_inodes(fs);
+ create_bad_block_inode(fs, bb_list);
+ }
+
+ 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(_("done\n"));
+ ext2fs_close(jfs);
+ free(journal_device);
+ } else if (journal_size) {
+ journal_blocks = figure_journal_size(journal_size, fs);
+
+ if (!journal_blocks) {
+ fs->super->s_feature_compat &=
+ ~EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+ goto no_journal;
+ }
+ if (!quiet) {
+ printf(_("Creating journal (%d blocks): "),
+ journal_blocks);
+ fflush(stdout);
+ }
+ retval = ext2fs_add_journal_inode(fs, journal_blocks,
+ journal_flags);
+ if (retval) {
+ com_err (program_name, retval,
+ _("\n\twhile trying to create journal"));
+ exit(1);
+ }
+ if (!quiet)
+ printf(_("done\n"));
+ }
+no_journal:
+
+ if (!quiet)
+ printf(_("Writing superblocks and "
+ "filesystem accounting information: "));
+ retval = ext2fs_flush(fs);
+ if (retval) {
+ fprintf(stderr,
+ _("\nWarning, had trouble writing out superblocks."));
+ }
+ if (!quiet) {
+ printf(_("done\n\n"));
+ print_check_message(fs);
+ }
+ val = ext2fs_close(fs);
+ return (retval || val) ? 1 : 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/mklost+found.8.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/mklost+found.8.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/mklost+found.8.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,42 @@
+.\" -*- 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 at linux.org>.
+.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)
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/mklost+found.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/mklost+found.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/mklost+found.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,85 @@
+/*
+ * mklost+found.c - Creates a directory lost+found on a mounted second
+ * extended file system
+ *
+ * Copyright (C) 1992, 1993 Remy Card <card at 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) {
+ fprintf (stderr, _("Usage: mklost+found\n"));
+ exit(1);
+ }
+ if (mkdir (LPF, 0755) == -1) {
+ perror ("mkdir");
+ exit(1);
+ }
+
+ i = 0;
+ memset (name, 'x', 252);
+ do {
+ sprintf (name + 252, "%02d", 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 + 252, "%02d", j);
+ strcpy (path, LPF);
+ strcat (path, "/");
+ strcat (path, name);
+ if (unlink (path) == -1) {
+ perror ("unlink");
+ exit (1);
+ }
+ }
+ exit (0);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/nls-enable.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/nls-enable.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/nls-enable.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,17 @@
+#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
+/* FIXME */
+#define NLS_CAT_NAME "e2fsprogs"
+#define LOCALEDIR "/usr/share/locale"
+/* FIXME */
+#else
+#define _(a) (a)
+#define N_(a) a
+#endif
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/partinfo.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/partinfo.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/partinfo.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,74 @@
+/*
+ * partinfo.c
+ *
+ * Originally written by Alain Knaff, <alknaff at innet.lu>.
+ *
+ * Cleaned up by Theodore Ts'o, <tytso at mit.edu>.
+ *
+ */
+
+#include <sys/types.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <linux/hdreg.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include "nls-enable.h"
+
+void print_error(char *operation, int error, char *device)
+{
+ fprintf(stderr, _("%s failed for %s: %s\n"), operation, device,
+ strerror(error));
+}
+
+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);
+#endif
+ if (argc == 1) {
+ fprintf(stderr, _("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"), argv[0], argv[0]);
+ exit(1);
+ }
+
+ for (i=1; i < argc; i++) {
+ fd = open(argv[i], O_RDONLY);
+
+ if (fd < 0) {
+ print_error("open", errno, argv[i]);
+ continue;
+ }
+
+ if (ioctl(fd, HDIO_GETGEO, &loc) < 0) {
+ print_error(_("HDIO_GETGEO ioctl"), errno, argv[i]);
+ close(fd);
+ continue;
+ }
+
+
+ if (ioctl(fd, BLKGETSIZE, &size) < 0) {
+ print_error(_("BLKGETSIZE ioctl"), errno, argv[i]);
+ 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);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/tune2fs.8.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/tune2fs.8.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/tune2fs.8.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,396 @@
+.\" 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 second extended 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 \-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 \-L
+.I volume-name
+]
+[
+.B \-M
+.I last-mounted-directory
+]
+[
+.B \-O
+.RI [^] feature [,...]
+]
+[
+.B \-T
+.I time-last-checked
+]
+[
+.B \-U
+.I UUID
+]
+device
+.SH DESCRIPTION
+.BI tune2fs
+adjusts tunable filesystem parameters on a Linux second extended filesystem.
+.SH OPTIONS
+.TP
+.BI \-c " max-mount-counts"
+Adjust the maximal mounts count between two filesystem checks. If
+.I max-mount-counts
+is 0 then 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.
+Can be used in conjunction with -c to force an fsck on
+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
+.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 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 postfix or
+.B d
+result in days,
+.B m
+in months, and
+.B w
+in 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 to go
+unnoticed until they cause 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.
+.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.
+ at JDEV@.TP
+ at JDEV@.BI device= external-journal
+ at JDEV@Attach the filesystem to the journal block device located on
+ at JDEV@.IR external-journal .
+ at JDEV@The external
+ at JDEV@journal must have been already created using the command
+ at JDEV@.IP
+ at JDEV@.B mke2fs -O journal_dev
+ at JDEV@.I external-journal
+ at JDEV@.IP
+ at JDEV@Note that
+ at JDEV@.I external-journal
+ at JDEV@must be formatted with the same block
+ at JDEV@size as filesystems which will be using it.
+ at JDEV@.IP
+ at JDEV@Instead of specifying a device name directly,
+ at JDEV@.I external-journal
+ at JDEV@can also be specified by either
+ at JDEV@.BI LABEL= label
+ at JDEV@or
+ at JDEV@.BI UUID= UUID
+ at JDEV@to locate the external journal by either the volume label or UUID
+ at JDEV@stored in the ext2 superblock at the start of the journal. Use
+ at JDEV@.BR dumpe2fs (8)
+ at JDEV@to display a journal device's volume label and UUID. See also the
+ at JDEV@.B -L
+ at JDEV@option of
+ at JDEV@.BR tune2fs (8).
+.RE
+ at JDEV@.IP
+ at JDEV@Only one of the
+ at JDEV@.BR size " or " device
+ at JDEV@options can be given for a filesystem.
+.TP
+.B \-l
+List the contents of the filesystem superblock.
+.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 reserved filesystem blocks.
+.TP
+.BI \-M " last-mounted-directory"
+Set the last-mounted directory for the filesystem.
+.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.
+.IP
+The following filesystem features can be set or cleared using
+.BR tune2fs :
+.RS 1.2i
+.TP
+.B sparse_super
+Limit the number of backup superblocks to save space on large filesystems.
+.TP
+.B filetype
+Store file type information in directory entries.
+.TP
+.B has_journal
+Create an ext3 journal (as if using the
+.B \-j
+option).
+.RE
+.IP
+After setting or clearing
+.B sparse_super
+and
+.B filetype
+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.
+.IP
+.B Warning:
+Linux kernels before 2.0.39 and many 2.1 series kernels do not support
+the filesystems that use any of these features.
+Enabling certain filesystem features may prevent the filesystem from
+being mounted by kernels which do not support those features.
+.TP
+.BI \-r " reserved-blocks-count"
+Set the number of reserved filesystem blocks.
+.TP
+.BR \-s " [" 0 | 1 ]
+Turn the sparse super feature off or on. Turning this feature on
+saves space on really big filesystems. This is the same as using the
+.B "\-O sparse_super"
+option.
+.IP
+.B Warning:
+Linux kernels before 2.0.39 do not support this feature. Neither do
+all Linux 2.1 kernels; please don't use this unless you know what you're
+doing! You need to run
+.BR e2fsck (8)
+on the filesystem after changing this feature in order to have a valid
+filesystem.
+.TP
+.BI \-T " time-last-checked"
+Set the time the filesystem was last checked using
+.BR e2fsck .
+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[[HHMM]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 hypthens,
+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 at linux.org>.
+.B tune2fs
+uses the ext2fs library written by Theodore Ts'o <tytso at mit.edu>.
+This manual page was written by Christian Kuhtz <chk at data-hh.Hanse.DE>.
+Time-dependent checking was added by Uwe Ohse <uwe at 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 dumpe2fs (8),
+.BR e2fsck (8),
+.BR mke2fs (8)
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/tune2fs.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/tune2fs.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/tune2fs.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,804 @@
+/*
+ * tune2fs.c - Change the file system parameters on an ext2 file system
+ *
+ * Copyright (C) 1992, 1993, 1994 Remy Card <card at 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 at duteca.et.tudelft.nl)
+ * F.W. ten Wolde (franky at 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 at tirka.gun.de)
+ */
+
+#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>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <sys/types.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 "get_device_by_label.h"
+
+#include "../version.h"
+#include "nls-enable.h"
+
+const char * program_name = "tune2fs";
+char * device_name;
+char * new_label, *new_last_mounted, *new_UUID;
+static int c_flag, C_flag, e_flag, f_flag, g_flag, i_flag, l_flag, L_flag;
+static int m_flag, M_flag, r_flag, s_flag = -1, u_flag, U_flag, T_flag;
+static time_t last_check_time;
+static int print_label;
+static int max_mount_count, mount_count, mount_flags;
+static unsigned long interval, reserved_ratio, reserved_blocks;
+static unsigned long resgid, resuid;
+static unsigned short errors;
+static int open_flag;
+static char *features_cmd;
+
+int journal_size, journal_flags;
+char *journal_device;
+
+static const char *please_fsck = N_("Please run e2fsck on the filesystem.\n");
+
+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]\n"
+ "\t[-l] [-s sparse-flag] [-m reserved-blocks-percent]\n"
+ "\t[-r reserved-blocks-count] [-u user] [-C mount-count]\n"
+ "\t[-L volume-label] [-M last-mounted-dir]\n"
+ "\t[-O [^]feature[,...]] [-T last-check-time] [-U UUID]"
+ " device\n"), program_name);
+ exit (1);
+}
+
+static __u32 ok_features[3] = {
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL, /* Compat */
+ EXT2_FEATURE_INCOMPAT_FILETYPE, /* Incompat */
+ EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER /* R/O compat */
+};
+
+/*
+ * Remove an external journal from the filesystem
+ */
+static void 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;
+
+ if (f_flag)
+ commit_remove_journal = 1; /* force removal even if error */
+
+ uuid_unparse(fs->super->s_journal_uuid, buf);
+ journal_path = get_spec_by_uuid(buf);
+
+ if (!journal_path) {
+ journal_path =
+ ext2fs_find_block_device(fs->super->s_journal_dev);
+ if (!journal_path)
+ return;
+ }
+
+ retval = ext2fs_open(journal_path, 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 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_blk(jfs->io, 1, -1024, buf))) {
+ com_err(program_name, retval,
+ _("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))) {
+ fprintf(stderr, _("Journal superblock not found!\n"));
+ 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) {
+ fprintf(stderr,
+ _("Filesystem's UUID not found on journal device.\n"));
+ 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_blk(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) {
+ fprintf(stderr, _("Journal NOT removed\n"));
+ exit(1);
+ }
+ fs->super->s_journal_dev = 0;
+ memset(fs->super->s_journal_uuid, 0,
+ sizeof(fs->super->s_journal_uuid));
+ ext2fs_mark_super_dirty(fs);
+ printf(_("Journal removed\n"));
+ free(journal_path);
+}
+
+/* Helper function for remove_journal_inode */
+static int release_blocks_proc(ext2_filsys fs, blk_t *blocknr,
+ int blockcnt, void *private)
+{
+ blk_t block;
+ int group;
+
+ block = *blocknr;
+ ext2fs_unmark_block_bitmap(fs->block_map,block);
+ group = ext2fs_group_of_blk(fs, block);
+ fs->group_desc[group].bg_free_blocks_count++;
+ fs->super->s_free_blocks_count++;
+ return 0;
+}
+
+/*
+ * Remove the journal inode from the filesystem
+ */
+static void 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,
+ _("while reading journal inode"));
+ exit(1);
+ }
+ if (ino == EXT2_JOURNAL_INO) {
+ retval = ext2fs_read_bitmaps(fs);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while reading bitmaps"));
+ exit(1);
+ }
+ retval = ext2fs_block_iterate(fs, ino, 0, NULL,
+ release_blocks_proc, NULL);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while clearing journal inode"));
+ exit(1);
+ }
+ 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,
+ _("while writing journal inode"));
+ exit(1);
+ }
+ fs->super->s_journal_inum = 0;
+ ext2fs_mark_super_dirty(fs);
+}
+
+/*
+ * Update the feature set as provided by the user.
+ */
+static void update_feature_set(ext2_filsys fs, char *features)
+{
+ int sparse, old_sparse, filetype, old_filetype;
+ int journal, old_journal;
+ struct ext2_super_block *sb= fs->super;
+
+ old_sparse = sb->s_feature_ro_compat &
+ EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
+ old_filetype = sb->s_feature_incompat &
+ EXT2_FEATURE_INCOMPAT_FILETYPE;
+ old_journal = sb->s_feature_compat &
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+ if (e2p_edit_feature(features, &sb->s_feature_compat,
+ ok_features)) {
+ fprintf(stderr, _("Invalid filesystem option set: %s\n"),
+ features);
+ exit(1);
+ }
+ sparse = sb->s_feature_ro_compat &
+ EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
+ filetype = sb->s_feature_incompat &
+ EXT2_FEATURE_INCOMPAT_FILETYPE;
+ journal = sb->s_feature_compat &
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+ if (old_journal && !journal) {
+ if ((mount_flags & EXT2_MF_MOUNTED) &&
+ !(mount_flags & EXT2_MF_READONLY)) {
+ fprintf(stderr,
+ _("The has_journal flag may only be "
+ "cleared when the filesystem is\n"
+ "unmounted or mounted "
+ "read-only.\n"));
+ exit(1);
+ }
+ if (sb->s_feature_incompat &
+ EXT3_FEATURE_INCOMPAT_RECOVER) {
+ fprintf(stderr,
+ _("The needs_recovery flag is set. "
+ "Please run e2fsck before clearing\n"
+ "the has_journal flag.\n"));
+ exit(1);
+ }
+ if (sb->s_journal_inum) {
+ remove_journal_inode(fs);
+ }
+ if (sb->s_journal_dev) {
+ remove_journal_device(fs);
+ }
+ }
+ if (journal && !old_journal) {
+ /*
+ * If adding a journal flag, let the create journal
+ * code below handle creating 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 (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 ((sparse != old_sparse) ||
+ (filetype != old_filetype)) {
+ sb->s_state &= ~EXT2_VALID_FS;
+ printf("\n%s\n", _(please_fsck));
+ }
+ ext2fs_mark_super_dirty(fs);
+}
+
+/*
+ * Add a journal to the filesystem.
+ */
+static void add_journal(ext2_filsys fs)
+{
+ unsigned long journal_blocks;
+ errcode_t retval;
+ ext2_filsys jfs;
+
+ if (fs->super->s_feature_compat &
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL) {
+ fprintf(stderr, _("The filesystem already has a journal.\n"));
+ goto err;
+ }
+ if (journal_device) {
+ check_plausibility(journal_device);
+ check_mount(journal_device, 0, _("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,
+ _("\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;
+ }
+ printf(_("done\n"));
+ } else if (journal_size) {
+ printf(_("Creating journal inode: "));
+ 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,
+ _("\n\twhile trying to create journal file"));
+ exit(1);
+ } else
+ printf(_("done\n"));
+ /*
+ * 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);
+ return;
+
+err:
+ if (journal_device)
+ free(journal_device);
+ exit(1);
+}
+
+
+static void parse_e2label_options(int argc, char ** argv)
+{
+ if ((argc < 2) || (argc > 3)) {
+ fprintf(stderr, _("Usage: e2label device [newlabel]\n"));
+ exit(1);
+ }
+ device_name = argv[1];
+ if (argc == 3) {
+ open_flag = EXT2_FLAG_RW | EXT2_FLAG_JOURNAL_DEV_OK;
+ 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));
+ strptime(optarg, "%Y%m%d%H%M%S", &ts);
+ if (ts.tm_mday == 0) {
+ com_err(program_name, 0,
+ _("Couldn't parse date/time specifier: %s"),
+ str);
+ usage();
+ }
+ return (mktime(&ts));
+}
+
+static void parse_tune2fs_options(int argc, char **argv)
+{
+ int c;
+ char * tmp;
+ struct group * gr;
+ struct passwd * pw;
+
+ printf("tune2fs %s (%s)\n", E2FSPROGS_VERSION, E2FSPROGS_DATE);
+ while ((c = getopt(argc, argv, "c:e:fg:i:jlm:r:s:u:C:J:L:M:O:T:U:")) != 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 '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 || interval > (365 * 86400)) {
+ 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 = strtoul (optarg, &tmp, 0);
+ if (*tmp || reserved_ratio > 50) {
+ 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 (features_cmd) {
+ com_err (program_name, 0,
+ _("-O may only be specified once"));
+ usage();
+ }
+ features_cmd = optarg;
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 'r':
+ reserved_blocks = strtoul (optarg, &tmp, 0);
+ if (*tmp) {
+ com_err (program_name, 0,
+ _("bad reserved blocks count - %s"),
+ optarg);
+ usage();
+ }
+ r_flag = 1;
+ open_flag = EXT2_FLAG_RW;
+ break;
+ case 's':
+ 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;
+ default:
+ usage();
+ }
+ if (optind < argc - 1 || optind == argc)
+ usage();
+ if (!open_flag && !l_flag)
+ usage();
+ device_name = argv[optind];
+}
+
+
+
+int main (int argc, char ** argv)
+{
+ errcode_t retval;
+ ext2_filsys fs;
+ struct ext2_super_block *sb;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+#endif
+ if (argc && *argv)
+ program_name = *argv;
+ initialize_ext2_error_table();
+
+ if (strcmp(get_progname(argv[0]), "e2label") == 0)
+ parse_e2label_options(argc, argv);
+ else
+ parse_tune2fs_options(argc, argv);
+
+ retval = ext2fs_open (device_name, open_flag, 0, 0,
+ unix_io_manager, &fs);
+ if (retval) {
+ com_err (program_name, retval, _("while trying to open %s"),
+ device_name);
+ fprintf(stderr,
+ _("Couldn't find valid filesystem superblock.\n"));
+ exit(1);
+ }
+ sb = fs->super;
+ if (print_label) {
+ /* For e2label emulation */
+ printf("%.*s\n", (int) sizeof(sb->s_volume_name),
+ sb->s_volume_name);
+ exit(0);
+ }
+ 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);
+ exit(1);
+ }
+ /* 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) {
+ sb->s_checkinterval = interval;
+ ext2fs_mark_super_dirty(fs);
+ printf (_("Setting interval between check %lu seconds\n"), interval);
+ }
+ if (m_flag) {
+ sb->s_r_blocks_count = (sb->s_blocks_count / 100)
+ * reserved_ratio;
+ ext2fs_mark_super_dirty(fs);
+ printf (_("Setting reserved blocks percentage to %lu (%u blocks)\n"),
+ reserved_ratio, sb->s_r_blocks_count);
+ }
+ if (r_flag) {
+ if (reserved_blocks >= sb->s_blocks_count) {
+ com_err (program_name, 0,
+ _("reserved blocks count is too big (%ul)"),
+ reserved_blocks);
+ exit (1);
+ }
+ sb->s_r_blocks_count = reserved_blocks;
+ ext2fs_mark_super_dirty(fs);
+ printf (_("Setting reserved blocks count to %lu\n"),
+ reserved_blocks);
+ }
+ if (s_flag == 1) {
+ if (sb->s_feature_ro_compat &
+ EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)
+ fprintf(stderr, _("\nThe filesystem already"
+ " has sparse superblocks.\n"));
+ 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) {
+ if (!(sb->s_feature_ro_compat &
+ EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER))
+ fprintf(stderr, _("\nThe filesystem already"
+ " has sparse superblocks disabled.\n"));
+ else {
+ sb->s_feature_ro_compat &=
+ ~EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
+ sb->s_state &= ~EXT2_VALID_FS;
+ fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
+ ext2fs_mark_super_dirty(fs);
+ printf(_("\nSparse superblock flag cleared. %s"),
+ _(please_fsck));
+ }
+ }
+ 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))
+ fprintf(stderr, _("Warning: label too "
+ "long, truncating.\n"));
+ 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 (features_cmd)
+ update_feature_set(fs, features_cmd);
+ if (journal_size || journal_device)
+ add_journal(fs);
+
+ if (U_flag) {
+ 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, _("Invalid UUID format\n"));
+ exit(1);
+ }
+ ext2fs_mark_super_dirty(fs);
+ }
+
+ if (l_flag)
+ list_super (sb);
+ return (ext2fs_close (fs) ? 1 : 0);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/util.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/util.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/util.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,268 @@
+/*
+ * 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 "et/com_err.h"
+#include "e2p/e2p.h"
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+#include "nls-enable.h"
+#include "get_device_by_label.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);
+ printf(_("Proceed anyway? (y,n) "));
+ buf[0] = 0;
+ fgets(buf, sizeof(buf), stdin);
+ if (strchr(short_yes, buf[0]) == 0)
+ exit(1);
+}
+
+void check_plausibility(const char *device)
+{
+ int val;
+#ifdef HAVE_OPEN64
+ struct stat64 s;
+
+ val = stat64(device, &s);
+#else
+ struct stat s;
+
+ val = stat(device, &s);
+#endif
+
+ if(val == -1) {
+ fprintf(stderr, _("Could not stat %s --- %s\n"),
+ device, error_message(errno));
+ if (errno == ENOENT)
+ fprintf(stderr, _("\nThe device apparently does "
+ "not exist; did you specify it correctly?\n"));
+ exit(1);
+ }
+ if (!S_ISBLK(s.st_mode)) {
+ 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
+#define SCSI_BLK_MAJOR(M) ((M) == SCSI_DISK_MAJOR || (M) == SCSI_CDROM_MAJOR)
+#endif
+ 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))
+ return;
+
+ fprintf(stderr, _("%s is mounted; "), device);
+ if (force) {
+ fprintf(stderr, _("mke2fs forced anyway. "
+ "Hope /etc/mtab is incorrect.\n"));
+ } else {
+ fprintf(stderr, _("will not make a %s here!\n"), type);
+ exit(1);
+ }
+}
+
+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) {
+ fprintf(stderr, _("Couldn't allocate memory to parse "
+ "journal 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 0
+ printf("Journal option=%s, argument=%s\n", token,
+ arg ? arg : "NONE");
+#endif
+ if (strcmp(token, "device") == 0) {
+ journal_device = interpret_spec(arg);
+ if (!journal_device) {
+ 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) {
+ fprintf(stderr, _("\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 raid options are:\n"
+ "\tsize=<journal size in megabytes>\n"
+ "\tdevice=<journal device>\n\n"
+ "The journal size must be between "
+ "1024 and 102400 filesystem blocks.\n\n" ));
+ exit(1);
+ }
+}
+
+/*
+ * 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.
+ */
+int figure_journal_size(int size, ext2_filsys fs)
+{
+ blk_t j_blocks;
+
+ if (fs->super->s_blocks_count < 2048) {
+ fprintf(stderr, _("\nFilesystem too small for a journal\n"));
+ return 0;
+ }
+
+ if (size >= 0) {
+ j_blocks = size * 1024 / (fs->blocksize / 1024);
+ if (j_blocks < 1024 || j_blocks > 102400) {
+ fprintf(stderr, _("\nThe requested journal "
+ "size is %d blocks; it must be\n"
+ "between 1024 and 102400 blocks. "
+ "Aborting.\n"),
+ j_blocks);
+ exit(1);
+ }
+ if (j_blocks > fs->super->s_free_blocks_count) {
+ fprintf(stderr, _("\nJournal size too big "
+ "for filesystem.\n"));
+ exit(1);
+ }
+ return j_blocks;
+ }
+
+ if (fs->super->s_blocks_count < 32768)
+ j_blocks = 1024;
+ else if (fs->super->s_blocks_count < 262144)
+ j_blocks = 4096;
+ else
+ j_blocks = 8192;
+
+ return j_blocks;
+}
+
+void print_check_message(ext2_filsys fs)
+{
+ 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"),
+ fs->super->s_max_mnt_count,
+ (double)fs->super->s_checkinterval / (3600 * 24));
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/util.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/util.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/util.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,26 @@
+/*
+ * 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 int figure_journal_size(int size, ext2_filsys fs);
+extern void print_check_message(ext2_filsys fs);
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/uuidgen.1.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/uuidgen.1.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/uuidgen.1.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,66 @@
+.\" Copyright 1999 Andreas Dilger (adilger at 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 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 RETURN VALUE
+The UUID of the form 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb (in
+.BR printf (3)
+format "%08x-%04x-%04x-%04x-%012x") is output to the standard output.
+.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)
Added: trunk/yaboot/lib/e2fsprogs-1.27/misc/uuidgen.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/misc/uuidgen.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/misc/uuidgen.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,71 @@
+/*
+ * 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 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;
+
+ 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;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/mkinstalldirs
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/mkinstalldirs 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/mkinstalldirs 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,32 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman at prep.ai.mit.edu>
+# Created: 1993-05-16
+# Last modified: 1994-03-25
+# Public domain
+
+errstatus=0
+
+for file in ${1+"$@"} ; do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d in ${1+"$@"} ; do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp" 1>&2
+ mkdir "$pathcomp" || errstatus=$?
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/mkinstalldirs
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/po/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/po/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/po/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,6 @@
+Makefile.in
+Makefile
+POTFILES
+*.gmo
+stamp-cat-id
+cat-id-tbl.c
Added: trunk/yaboot/lib/e2fsprogs-1.27/po/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/po/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/po/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,41 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2000-12-08 <tytso at snap.thunk.org>
+
+ * Makefile.in.in: Fix so that top-level "make check" works
+ correctly.
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/po/Makefile.in.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/po/Makefile.in.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/po/Makefile.in.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,248 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
+#
+# This file file be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+ at SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+gnulocaledir = $(prefix)/share/locale
+gettextsrcdir = $(prefix)/share/gettext/po
+subdir = po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
+
+CC = @CC@
+GENCAT = @GENCAT@
+GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
+MSGMERGE = PATH=../src:$$PATH msgmerge
+
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+
+INCLUDES = -I.. -I$(top_srcdir)/intl
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+SOURCES = cat-id-tbl.c
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
+stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
+
+.SUFFIXES:
+.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
+
+.c.o:
+ $(COMPILE) $<
+
+.po.pox:
+ $(MAKE) $(PACKAGE).pot
+ $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && $(GENCAT) $@ $*.msg
+
+
+all: all- at USE_NLS@
+
+all-yes: cat-id-tbl.c $(CATALOGS)
+all-no:
+
+$(srcdir)/$(PACKAGE).pot: $(POTFILES)
+ $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ --add-comments --keyword=_ --keyword=N_ \
+ --files-from=$(srcdir)/POTFILES.in \
+ && test ! -f $(PACKAGE).po \
+ || ( rm -f $(srcdir)/$(PACKAGE).pot \
+ && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
+
+$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
+$(srcdir)/stamp-cat-id: $(PACKAGE).pot
+ rm -f cat-id-tbl.tmp
+ sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
+ | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
+ if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
+ rm cat-id-tbl.tmp; \
+ else \
+ echo cat-id-tbl.c changed; \
+ rm -f $(srcdir)/cat-id-tbl.c; \
+ mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
+ fi
+ cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data- at USE_NLS@
+install-data-no: all
+install-data-yes: all
+ if test -r "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
+ fi
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
+ if test -r "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $$dir; \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
+ fi; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $(gettextsrcdir); \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+ $(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ done
+ rm -f $(gettextsrcdir)/po-Makefile.in.in
+
+check:: all
+
+cat-id-tbl.o: ../intl/libgettext.h
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
+
+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 $(GMOFILES)
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: update-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ for file in $$dists; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(PACKAGE).pot
+ PATH=`pwd`/../src:$$PATH; \
+ cd $(srcdir); \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ mv $$lang.po $$lang.old.po; \
+ echo "$$lang:"; \
+ if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
+ rm -f $$lang.old.po; \
+ else \
+ echo "msgmerge for $$cat failed!"; \
+ rm -f $$lang.po; \
+ mv $$lang.old.po $$lang.po; \
+ fi; \
+ done
+
+POTFILES: POTFILES.in
+ ( if test 'x$(srcdir)' != 'x.'; then \
+ posrcprefix='$(top_srcdir)/'; \
+ else \
+ posrcprefix="../"; \
+ fi; \
+ rm -f $@-t $@ \
+ && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
+ -e "s at .*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//') > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@ )
+
+Makefile: Makefile.in.in ../config.status POTFILES
+ cd .. \
+ && CONFIG_FILES=$(subdir)/$@.in 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:
Added: trunk/yaboot/lib/e2fsprogs-1.27/po/POTFILES.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/po/POTFILES.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/po/POTFILES.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,38 @@
+e2fsck/badblocks.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/pass3.c
+e2fsck/pass4.c
+e2fsck/pass5.c
+e2fsck/problem.c
+e2fsck/recovery.c
+e2fsck/scantest.c
+e2fsck/super.c
+e2fsck/swapfs.c
+e2fsck/unix.c
+e2fsck/util.c
+misc/badblocks.c
+misc/chattr.c
+misc/dumpe2fs.c
+misc/e2label.c
+misc/e2image.c
+misc/findsuper.c
+misc/fsck.c
+misc/get_device_by_label.c
+misc/lsattr.c
+misc/mke2fs.c
+misc/mklost+found.c
+misc/partinfo.c
+misc/tune2fs.c
+misc/uuidgen.c
+misc/util.c
+resize/main.c
+resize/resize2fs.c
+resize/extent.c
Added: trunk/yaboot/lib/e2fsprogs-1.27/po/e2fsprogs.pot
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/po/e2fsprogs.pot 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/po/e2fsprogs.pot 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,3309 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2001-10-08 11:47-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: e2fsck/badblocks.c:22 misc/mke2fs.c:181
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr ""
+
+#: e2fsck/badblocks.c:45
+msgid "while sanity checking the bad blocks inode"
+msgstr ""
+
+#: e2fsck/badblocks.c:57
+msgid "while reading the bad blocks inode"
+msgstr ""
+
+#: e2fsck/badblocks.c:71 e2fsck/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:765 e2fsck/unix.c:797 misc/badblocks.c:767
+#: misc/badblocks.c:776 misc/badblocks.c:790 misc/badblocks.c:801
+#: misc/dumpe2fs.c:316 misc/e2image.c:433 misc/e2image.c:449 misc/mke2fs.c:197
+#: misc/tune2fs.c:649 resize/main.c:196
+#, c-format
+msgid "while trying to open %s"
+msgstr ""
+
+#: e2fsck/badblocks.c:81
+#, c-format
+msgid "while trying popen '%s'"
+msgstr ""
+
+#: e2fsck/badblocks.c:92 misc/mke2fs.c:204
+msgid "while reading in list of bad blocks from file"
+msgstr ""
+
+#: e2fsck/badblocks.c:102
+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:53
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr ""
+
+#: e2fsck/ehandler.c:56
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr ""
+
+#: e2fsck/ehandler.c:59 e2fsck/ehandler.c:103
+msgid "Ignore error"
+msgstr ""
+
+#: e2fsck/ehandler.c:97
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr ""
+
+#: e2fsck/ehandler.c:100
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr ""
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr ""
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr ""
+
+#. Inode number 11 is usually lost+found
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %d (#%d) in inode %d\n"
+msgstr ""
+
+#: e2fsck/extend.c:21
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr ""
+
+#: e2fsck/extend.c:43
+msgid "Illegal number of blocks!\n"
+msgstr ""
+
+#: e2fsck/extend.c:49
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr ""
+
+#: e2fsck/flushb.c:44
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr ""
+
+#: e2fsck/flushb.c:73
+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:599 resize/main.c:173
+#, c-format
+msgid "while opening %s for flushing"
+msgstr ""
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:605 resize/main.c:180
+#, c-format
+msgid "while trying to flush %s"
+msgstr ""
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:340
+msgid "while opening inode scan"
+msgstr ""
+
+#: e2fsck/iscan.c:127 misc/e2image.c:355
+msgid "while getting next inode"
+msgstr ""
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%d inodes scanned.\n"
+msgstr ""
+
+#: e2fsck/journal.c:47
+#, c-format
+msgid "bmap journal inode %ld, block %d\n"
+msgstr ""
+
+#: e2fsck/journal.c:384
+msgid "reading journal superblock\n"
+msgstr ""
+
+#: e2fsck/journal.c:441
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr ""
+
+#: e2fsck/journal.c:450
+#, c-format
+msgid "%s: journal too short\n"
+msgstr ""
+
+#: e2fsck/journal.c:702
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr ""
+
+#: e2fsck/journal.c:704
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr ""
+
+#: e2fsck/journal.c:725
+#, c-format
+msgid "while trying to re-open %s"
+msgstr ""
+
+#: e2fsck/message.c:103
+msgid "aextended attribute"
+msgstr ""
+
+#: e2fsck/message.c:104
+msgid "Aerror allocating"
+msgstr ""
+
+#: e2fsck/message.c:105
+msgid "bblock"
+msgstr ""
+
+#: e2fsck/message.c:106
+msgid "Bbitmap"
+msgstr ""
+
+#: e2fsck/message.c:107
+msgid "ccompress"
+msgstr ""
+
+#: e2fsck/message.c:108
+msgid "Cconflicts with some other fs @b"
+msgstr ""
+
+#: e2fsck/message.c:109
+msgid "iinode"
+msgstr ""
+
+#: e2fsck/message.c:110
+msgid "Iillegal"
+msgstr ""
+
+#: e2fsck/message.c:111
+msgid "jjournal"
+msgstr ""
+
+#: e2fsck/message.c:112
+msgid "Ddeleted"
+msgstr ""
+
+#: e2fsck/message.c:113
+msgid "ddirectory"
+msgstr ""
+
+#: e2fsck/message.c:114
+msgid "eentry"
+msgstr ""
+
+#: e2fsck/message.c:115
+msgid "E at e '%Dn' in %p (%i)"
+msgstr ""
+
+#: e2fsck/message.c:116
+msgid "ffilesystem"
+msgstr ""
+
+#: e2fsck/message.c:117
+msgid "Ffor @i %i (%Q) is"
+msgstr ""
+
+#: e2fsck/message.c:118
+msgid "ggroup"
+msgstr ""
+
+#: e2fsck/message.c:119
+msgid "llost+found"
+msgstr ""
+
+#: e2fsck/message.c:120
+msgid "Lis a link"
+msgstr ""
+
+#: e2fsck/message.c:121
+msgid "oorphaned"
+msgstr ""
+
+#: e2fsck/message.c:122
+msgid "rroot @i"
+msgstr ""
+
+#: e2fsck/message.c:123
+msgid "sshould be"
+msgstr ""
+
+#: e2fsck/message.c:124
+msgid "Ssuper at b"
+msgstr ""
+
+#: e2fsck/message.c:125
+msgid "uunattached"
+msgstr ""
+
+#: e2fsck/message.c:126
+msgid "vdevice"
+msgstr ""
+
+#: e2fsck/message.c:127
+msgid "zzero-length"
+msgstr ""
+
+#: e2fsck/message.c:138
+msgid "<The NULL inode>"
+msgstr ""
+
+#. 0
+#: e2fsck/message.c:139
+msgid "<The bad blocks inode>"
+msgstr ""
+
+#. 1
+#. 2
+#: e2fsck/message.c:141
+msgid "<The ACL index inode>"
+msgstr ""
+
+#. 3
+#: e2fsck/message.c:142
+msgid "<The ACL data inode>"
+msgstr ""
+
+#. 4
+#: e2fsck/message.c:143
+msgid "<The boot loader inode>"
+msgstr ""
+
+#. 5
+#: e2fsck/message.c:144
+msgid "<The undelete directory inode>"
+msgstr ""
+
+#. 6
+#: e2fsck/message.c:145
+msgid "<The group descriptor inode>"
+msgstr ""
+
+#. 7
+#: e2fsck/message.c:146
+msgid "<The journal inode>"
+msgstr ""
+
+#. 8
+#: e2fsck/message.c:147
+msgid "<Reserved inode 9>"
+msgstr ""
+
+#. 9
+#: e2fsck/message.c:148
+msgid "<Reserved inode 10>"
+msgstr ""
+
+#: e2fsck/pass1b.c:127
+msgid "multiply claimed inode map"
+msgstr ""
+
+#: e2fsck/pass1b.c:539 e2fsck/pass1b.c:650
+#, c-format
+msgid "internal error; can't find dup_blk for %d\n"
+msgstr ""
+
+#: e2fsck/pass1b.c:687
+msgid "returned from clone_file_block"
+msgstr ""
+
+#.
+#. * Allocate bitmaps structures
+#.
+#: e2fsck/pass1.c:290
+msgid "in-use inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:299
+msgid "directory inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:307
+msgid "regular file inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:314
+msgid "in-use block map"
+msgstr ""
+
+#: e2fsck/pass1.c:361
+msgid "doing inode scan"
+msgstr ""
+
+#: e2fsck/pass1.c:737
+msgid "Pass 1"
+msgstr ""
+
+#: e2fsck/pass1.c:795
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr ""
+
+#: e2fsck/pass1.c:837
+msgid "bad inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:859
+msgid "inode in bad block map"
+msgstr ""
+
+#: e2fsck/pass1.c:879
+msgid "imagic inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:906
+msgid "multiply claimed block map"
+msgstr ""
+
+#: e2fsck/pass1.c:1006
+msgid "ext attr block map"
+msgstr ""
+
+#: e2fsck/pass1.c:1673
+msgid "block bitmap"
+msgstr ""
+
+#: e2fsck/pass1.c:1677
+msgid "inode bitmap"
+msgstr ""
+
+#: e2fsck/pass1.c:1681
+msgid "inode table"
+msgstr ""
+
+#.
+#. * Allocate some bitmaps to do loop detection.
+#.
+#: e2fsck/pass3.c:85
+msgid "inode done bitmap"
+msgstr ""
+
+#: e2fsck/pass3.c:96
+msgid "Peak memory"
+msgstr ""
+
+#: e2fsck/pass3.c:141
+msgid "Pass 3"
+msgstr ""
+
+#: e2fsck/pass3.c:331
+msgid "inode loop detection bitmap"
+msgstr ""
+
+#. Should never happen
+#: e2fsck/pass3.c:584
+msgid "Debug error in e2fsck adjust_inode_count, should never happen.\n"
+msgstr ""
+
+#: e2fsck/pass4.c:163
+msgid "Pass 4"
+msgstr ""
+
+#: e2fsck/pass5.c:70
+msgid "Pass 5"
+msgstr ""
+
+#: e2fsck/problem.c:47
+msgid "(no prompt)"
+msgstr ""
+
+#. 0
+#: e2fsck/problem.c:48
+msgid "Fix"
+msgstr ""
+
+#. 1
+#: e2fsck/problem.c:49
+msgid "Clear"
+msgstr ""
+
+#. 2
+#: e2fsck/problem.c:50
+msgid "Relocate"
+msgstr ""
+
+#. 3
+#: e2fsck/problem.c:51
+msgid "Allocate"
+msgstr ""
+
+#. 4
+#: e2fsck/problem.c:52
+msgid "Expand"
+msgstr ""
+
+#. 5
+#: e2fsck/problem.c:53
+msgid "Connect to /lost+found"
+msgstr ""
+
+#. 6
+#: e2fsck/problem.c:54
+msgid "Create"
+msgstr ""
+
+#. 7
+#: e2fsck/problem.c:55
+msgid "Salvage"
+msgstr ""
+
+#. 8
+#: e2fsck/problem.c:56
+msgid "Truncate"
+msgstr ""
+
+#. 9
+#: e2fsck/problem.c:57
+msgid "Clear inode"
+msgstr ""
+
+#. 10
+#: e2fsck/problem.c:58
+msgid "Abort"
+msgstr ""
+
+#. 11
+#: e2fsck/problem.c:59
+msgid "Split"
+msgstr ""
+
+#. 12
+#: e2fsck/problem.c:60
+msgid "Continue"
+msgstr ""
+
+#. 13
+#: e2fsck/problem.c:61
+msgid "Clone duplicate/bad blocks"
+msgstr ""
+
+#. 14
+#: e2fsck/problem.c:62
+msgid "Delete file"
+msgstr ""
+
+#. 15
+#: e2fsck/problem.c:63
+msgid "Suppress messages"
+msgstr ""
+
+#. 16
+#: e2fsck/problem.c:64
+msgid "Unlink"
+msgstr ""
+
+#: e2fsck/problem.c:72
+msgid "(NONE)"
+msgstr ""
+
+#. 0
+#: e2fsck/problem.c:73
+msgid "FIXED"
+msgstr ""
+
+#. 1
+#: e2fsck/problem.c:74
+msgid "CLEARED"
+msgstr ""
+
+#. 2
+#: e2fsck/problem.c:75
+msgid "RELOCATED"
+msgstr ""
+
+#. 3
+#: e2fsck/problem.c:76
+msgid "ALLOCATED"
+msgstr ""
+
+#. 4
+#: e2fsck/problem.c:77
+msgid "EXPANDED"
+msgstr ""
+
+#. 5
+#: e2fsck/problem.c:78
+msgid "RECONNECTED"
+msgstr ""
+
+#. 6
+#: e2fsck/problem.c:79
+msgid "CREATED"
+msgstr ""
+
+#. 7
+#: e2fsck/problem.c:80
+msgid "SALVAGED"
+msgstr ""
+
+#. 8
+#: e2fsck/problem.c:81
+msgid "TRUNCATED"
+msgstr ""
+
+#. 9
+#: e2fsck/problem.c:82
+msgid "INODE CLEARED"
+msgstr ""
+
+#. 10
+#: e2fsck/problem.c:83
+msgid "ABORTED"
+msgstr ""
+
+#. 11
+#: e2fsck/problem.c:84
+msgid "SPLIT"
+msgstr ""
+
+#. 12
+#: e2fsck/problem.c:85
+msgid "CONTINUING"
+msgstr ""
+
+#. 13
+#: e2fsck/problem.c:86
+msgid "DUPLICATE/BAD BLOCKS CLONED"
+msgstr ""
+
+#. 14
+#: e2fsck/problem.c:87
+msgid "FILE DELETED"
+msgstr ""
+
+#. 15
+#: e2fsck/problem.c:88
+msgid "SUPPRESSED"
+msgstr ""
+
+#. 16
+#: e2fsck/problem.c:89
+msgid "UNLINKED"
+msgstr ""
+
+#. Pre-Pass 1 errors
+#. Block bitmap not in group
+#: e2fsck/problem.c:97
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr ""
+
+#. Inode bitmap not in group
+#: e2fsck/problem.c:101
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr ""
+
+#: e2fsck/problem.c:106
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+
+#: e2fsck/problem.c:112
+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:121
+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:128
+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:135
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr ""
+
+#: e2fsck/problem.c:140
+msgid "@S first_data_ at b = %b, should have been %c\n"
+msgstr ""
+
+#: e2fsck/problem.c:145
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:150
+msgid ""
+"Note: if there is several inode or block bitmap blocks\n"
+"which require relocation, or one part of the inode table\n"
+"which must be moved, you may wish to try running e2fsck\n"
+"with the '-b %S' option first. The problem may lie only\n"
+"with the primary block group descriptor, and the backup\n"
+"block group descriptor may be OK.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:160
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr ""
+
+#: e2fsck/problem.c:165
+#, c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:170
+msgid "@i count in @S is %i, should be %j.\n"
+msgstr ""
+
+#: e2fsck/problem.c:174
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr ""
+
+#: e2fsck/problem.c:179
+#, c-format
+msgid "@S has a bad ext3 @j (@i %i).\n"
+msgstr ""
+
+#: e2fsck/problem.c:184
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr ""
+
+#: e2fsck/problem.c:189
+msgid "Can't find external @j\n"
+msgstr ""
+
+#: e2fsck/problem.c:194
+msgid "External @j has bad @S\n"
+msgstr ""
+
+#: e2fsck/problem.c:199
+msgid "External @j does not support this @f\n"
+msgstr ""
+
+#: e2fsck/problem.c:204
+msgid ""
+"Ext3 @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:212
+msgid "Ext3 @j @S is corrupt.\n"
+msgstr ""
+
+#: e2fsck/problem.c:217
+#, c-format
+msgid "@S doesn't have has_journal flag, but has ext3 @j %s.\n"
+msgstr ""
+
+#: e2fsck/problem.c:222
+msgid "@S has ext3 needs_recovery flag set, but no @j.\n"
+msgstr ""
+
+#: e2fsck/problem.c:227
+msgid "*** WARNING *** leaving data in the @j may be DANGEROUS.\n"
+msgstr ""
+
+#: e2fsck/problem.c:232
+msgid "ext3 recovery flag clear, but journal has data.\n"
+msgstr ""
+
+#: e2fsck/problem.c:237
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr ""
+
+#: e2fsck/problem.c:242
+msgid "@I @b #%B (%b) found in @o @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:247
+msgid "Already cleared @b #%B (%b) found in @o @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:252
+#, c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr ""
+
+#: e2fsck/problem.c:257
+#, c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr ""
+
+#: e2fsck/problem.c:267
+msgid "Ext3 @j @S has an unknown read-only feature flag set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:272
+msgid "Ext3 @j @S has an unknown incompatible feature flag set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:277
+msgid "@j version not supported by this e2fsck.\n"
+msgstr ""
+
+#: e2fsck/problem.c:282
+#, c-format
+msgid ""
+"Moving @j from /%s to hidden inode.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:287
+#, c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:292
+msgid ""
+"Found invalid V2 @j @S fields (from V1 journal).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:300
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr ""
+
+#. Root directory is not an inode
+#: e2fsck/problem.c:304
+msgid "@r is not a @d. "
+msgstr ""
+
+#: e2fsck/problem.c:309
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr ""
+
+#: e2fsck/problem.c:314
+msgid "Reserved @i %i %Q has bad mode. "
+msgstr ""
+
+#: e2fsck/problem.c:319
+#, c-format
+msgid "@D @i %i has zero dtime. "
+msgstr ""
+
+#: e2fsck/problem.c:324
+#, c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr ""
+
+#: e2fsck/problem.c:329
+#, c-format
+msgid "@i %i is a @z @d. "
+msgstr ""
+
+#: e2fsck/problem.c:334
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr ""
+
+#: e2fsck/problem.c:339
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr ""
+
+#: e2fsck/problem.c:344
+msgid "@g %g's @i table at %b @C.\n"
+msgstr ""
+
+#: e2fsck/problem.c:349
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr ""
+
+#: e2fsck/problem.c:354
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr ""
+
+#: e2fsck/problem.c:359
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr ""
+
+#: e2fsck/problem.c:364
+msgid "@i %i, i_ at bs is %Ib, @s %N. "
+msgstr ""
+
+#: e2fsck/problem.c:369
+msgid "@I @b #%B (%b) in @i %i. "
+msgstr ""
+
+#: e2fsck/problem.c:374
+msgid "@b #%B (%b) overlaps @f metadata in @i %i. "
+msgstr ""
+
+#: e2fsck/problem.c:379
+#, c-format
+msgid "@i %i has illegal @b(s). "
+msgstr ""
+
+#: e2fsck/problem.c:384
+#, c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:389
+msgid "@I @b #%B (%b) in bad @b @i. "
+msgstr ""
+
+#: e2fsck/problem.c:394
+msgid "Bad @b @i has illegal @b(s). "
+msgstr ""
+
+#: e2fsck/problem.c:399
+msgid "Duplicate or bad @b in use!\n"
+msgstr ""
+
+#: e2fsck/problem.c:404
+msgid "Bad @b %b used as bad @b indirect @b?!?\n"
+msgstr ""
+
+#: e2fsck/problem.c:409
+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 ""
+
+#: e2fsck/problem.c:417
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+
+#: e2fsck/problem.c:422
+msgid ""
+"You can clear the this @b (and hope for the best) from the\n"
+"bad @b list and hope that @b is really OK, but there are no\n"
+"guarantees.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:429
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr ""
+
+#: e2fsck/problem.c:434
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr ""
+
+#: e2fsck/problem.c:440
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr ""
+
+#: e2fsck/problem.c:445
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr ""
+
+#: e2fsck/problem.c:451
+msgid "Programming error? @b #%b claimed for no reason in process_bad_ at b.\n"
+msgstr ""
+
+#: e2fsck/problem.c:457
+msgid "@A %N @b(s) for %s: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:462
+#, c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr ""
+
+#: e2fsck/problem.c:467
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr ""
+
+#: e2fsck/problem.c:472
+#, c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr ""
+
+#: e2fsck/problem.c:477
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:482
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:497
+#, c-format
+msgid "@A icount link information: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:502
+#, c-format
+msgid "@A @d @b array: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:507
+#, c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:512
+#, c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:517
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:522
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:528
+#, c-format
+msgid "Error reading @i %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:536
+#, c-format
+msgid "@i %i has imagic flag set. "
+msgstr ""
+
+#: e2fsck/problem.c:541
+#, c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+
+#: e2fsck/problem.c:547
+#, c-format
+msgid "@i %i has @cion flag set on @f without @cion support. "
+msgstr ""
+
+#: e2fsck/problem.c:567
+msgid "@j is not regular file. "
+msgstr ""
+
+#: e2fsck/problem.c:572
+#, c-format
+msgid "@i %i was part of the orphaned @i list. "
+msgstr ""
+
+#: e2fsck/problem.c:578
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr ""
+
+#: e2fsck/problem.c:588
+msgid "Error reading @a @b %b for @i %i. "
+msgstr ""
+
+#: e2fsck/problem.c:593
+msgid "@i %i has a bad @a @b %b. "
+msgstr ""
+
+#: e2fsck/problem.c:598
+msgid "Error reading @a @b %b (%m). "
+msgstr ""
+
+#: e2fsck/problem.c:603
+msgid "@a @b %b has reference count %B, should be %N. "
+msgstr ""
+
+#: e2fsck/problem.c:608
+msgid "Error writing @a @b %b (%m). "
+msgstr ""
+
+#: e2fsck/problem.c:613
+msgid "@a @b %b has h_blocks > 1. "
+msgstr ""
+
+#: e2fsck/problem.c:618
+msgid "Error allocating @a @b %b. "
+msgstr ""
+
+#: e2fsck/problem.c:623
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr ""
+
+#: e2fsck/problem.c:628
+msgid "@a @b %b is corrupt (invalid name). "
+msgstr ""
+
+#: e2fsck/problem.c:633
+msgid "@a @b %b is corrupt (invalid value). "
+msgstr ""
+
+#: e2fsck/problem.c:640
+msgid ""
+"Duplicate @bs found... invoking duplicate @b passes.\n"
+"Pass 1B: Rescan for duplicate/bad @bs\n"
+msgstr ""
+
+#: e2fsck/problem.c:646
+#, c-format
+msgid "Duplicate/bad @b(s) in @i %i:"
+msgstr ""
+
+#: e2fsck/problem.c:661
+#, c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:666
+#, c-format
+msgid "@A @i @B (inode_dup_map): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:671
+#, c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:676
+msgid "Pass 1C: Scan directories for @is with dup @bs.\n"
+msgstr ""
+
+#: e2fsck/problem.c:682
+msgid "Pass 1D: Reconciling duplicate @bs\n"
+msgstr ""
+
+#: e2fsck/problem.c:687
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %B duplicate @b(s), shared with %N file(s):\n"
+msgstr ""
+
+#: e2fsck/problem.c:693
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr ""
+
+#: e2fsck/problem.c:698
+msgid "\t<@f metadata>\n"
+msgstr ""
+
+#: e2fsck/problem.c:703
+msgid ""
+"(There are %N @is containing duplicate/bad @bs.)\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:708
+msgid ""
+"Duplicated @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:721
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:727
+msgid "Pass 2: Checking @d structure\n"
+msgstr ""
+
+#: e2fsck/problem.c:732
+#, c-format
+msgid "Bad @i number for '.' in @d @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:737
+msgid "@E has bad @i #: %Di.\n"
+msgstr ""
+
+#: e2fsck/problem.c:742
+msgid "@E has @D/unused @i %Di. "
+msgstr ""
+
+#: e2fsck/problem.c:747
+msgid "@E @L to '.' "
+msgstr ""
+
+#: e2fsck/problem.c:752
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr ""
+
+#: e2fsck/problem.c:757
+msgid "@E @L to @d %P (%Di).\n"
+msgstr ""
+
+#: e2fsck/problem.c:762
+msgid "@E @L to the @r.\n"
+msgstr ""
+
+#: e2fsck/problem.c:767
+msgid "@E has illegal characters in its name.\n"
+msgstr ""
+
+#: e2fsck/problem.c:772
+#, c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:777
+#, c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:782
+msgid "First @e '%Dn' (inode=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr ""
+
+#: e2fsck/problem.c:787
+msgid "Second @e '%Dn' (inode=%Di) in @d @i %i @s '..'\n"
+msgstr ""
+
+#: e2fsck/problem.c:792
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:797
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:802
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:807
+msgid "i_frag @F %N, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:812
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:817
+msgid "@i %i (%Q) has a bad mode (%Im).\n"
+msgstr ""
+
+#: e2fsck/problem.c:822
+msgid "@d @i %i, @b %B, offset %N: @d corrupted\n"
+msgstr ""
+
+#: e2fsck/problem.c:827
+msgid "@d @i %i, @b %B, offset %N: filename too long\n"
+msgstr ""
+
+#: e2fsck/problem.c:832
+msgid "@d @i %i has an unallocated @b #%B. "
+msgstr ""
+
+#: e2fsck/problem.c:837
+#, c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+
+#: e2fsck/problem.c:842
+#, c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+
+#: e2fsck/problem.c:847
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr ""
+
+#: e2fsck/problem.c:852
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr ""
+
+#: e2fsck/problem.c:857
+msgid "@E is duplicate '.' @e.\n"
+msgstr ""
+
+#: e2fsck/problem.c:862
+msgid "@E is duplicate '..' @e.\n"
+msgstr ""
+
+#: e2fsck/problem.c:867 e2fsck/problem.c:1069
+#, c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:872
+msgid "@E has rec_len of %Dr, should be %N.\n"
+msgstr ""
+
+#: e2fsck/problem.c:877
+#, c-format
+msgid "@A icount structure: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:882
+#, c-format
+msgid "Error interating over @d @bs: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:887
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:892
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:897
+#, c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:902
+#, c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:907
+msgid "@d @e for '.' is big. "
+msgstr ""
+
+#: e2fsck/problem.c:912
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr ""
+
+#: e2fsck/problem.c:917
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr ""
+
+#: e2fsck/problem.c:922
+msgid "Setting filetype for @E to %N.\n"
+msgstr ""
+
+#: e2fsck/problem.c:927
+msgid "@E has an incorrect filetype (was %Dt, should be %N).\n"
+msgstr ""
+
+#: e2fsck/problem.c:932
+msgid "@E has filetype set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:937
+msgid "@E has a zero-length name.\n"
+msgstr ""
+
+#: e2fsck/problem.c:942
+msgid "Symlink %Q (@i #%i) has an invalid size (%Is).\n"
+msgstr ""
+
+#: e2fsck/problem.c:947
+msgid "@a @b @F is invalid (%If).\n"
+msgstr ""
+
+#: e2fsck/problem.c:952
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr ""
+
+#: e2fsck/problem.c:959
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr ""
+
+#: e2fsck/problem.c:964
+msgid "@r not allocated. "
+msgstr ""
+
+#: e2fsck/problem.c:969
+msgid "No room in @l @d. "
+msgstr ""
+
+#: e2fsck/problem.c:974
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr ""
+
+#: e2fsck/problem.c:979
+msgid "/@l not found. "
+msgstr ""
+
+#: e2fsck/problem.c:984
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr ""
+
+#: e2fsck/problem.c:989
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr ""
+
+#: e2fsck/problem.c:994
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:999
+#, c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1004
+#, c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1009
+#, c-format
+msgid "ext2fs_new_ at b: %m while trying to create /@l @d\n"
+msgstr ""
+
+#: e2fsck/problem.c:1014
+#, c-format
+msgid "ext2fs_new_ at i: %m while trying to create /@l @d\n"
+msgstr ""
+
+#: e2fsck/problem.c:1019
+#, c-format
+msgid "ext2fs_new_dir_ at b: %m while creating new @d @b\n"
+msgstr ""
+
+#: e2fsck/problem.c:1024
+#, c-format
+msgid "ext2fs_write_dir_ at b: %m while writing the @d @b for /@l\n"
+msgstr ""
+
+#: e2fsck/problem.c:1029
+#, c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr ""
+
+#: e2fsck/problem.c:1034
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1039
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d entry\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1044
+msgid "@A @i @B (%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1049
+#, c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1054
+#, c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1059
+msgid "@r is not a @d; aborting.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1064
+msgid "Cannot proceed without a @r.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1074
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1081
+msgid "Pass 4: Checking reference counts\n"
+msgstr ""
+
+#: e2fsck/problem.c:1096
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr ""
+
+#: e2fsck/problem.c:1100
+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 should be the same!\n"
+msgstr ""
+
+#: e2fsck/problem.c:1110
+msgid "Pass 5: Checking @g summary information\n"
+msgstr ""
+
+#: e2fsck/problem.c:1115
+msgid "Padding at end of @i @B is not set. "
+msgstr ""
+
+#: e2fsck/problem.c:1120
+msgid "Padding at end of @b @B is not set. "
+msgstr ""
+
+#: e2fsck/problem.c:1125
+msgid "@b @B differences: "
+msgstr ""
+
+#: e2fsck/problem.c:1145
+msgid "@i @B differences: "
+msgstr ""
+
+#: e2fsck/problem.c:1165
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1170
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1175
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1180
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1185
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1190
+msgid ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
+"endpoints (%i, %j)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1196
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1308
+#, c-format
+msgid "Unhandled error code (%d)!\n"
+msgstr ""
+
+#: e2fsck/problem.c:1382
+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:200
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr ""
+
+#: e2fsck/super.c:266
+msgid "Truncating"
+msgstr ""
+
+#: e2fsck/super.c:267
+msgid "Clearing"
+msgstr ""
+
+#: e2fsck/swapfs.c:98
+msgid "while calling ext2fs_block_iterate"
+msgstr ""
+
+#: e2fsck/swapfs.c:104
+msgid "while calling iterator function"
+msgstr ""
+
+#: e2fsck/swapfs.c:125
+msgid "while allocating inode buffer"
+msgstr ""
+
+#: e2fsck/swapfs.c:137
+#, c-format
+msgid "while reading inode table (group %d)"
+msgstr ""
+
+#: e2fsck/swapfs.c:175
+#, c-format
+msgid "while writing inode table (group %d)"
+msgstr ""
+
+#: e2fsck/swapfs.c:196
+msgid "Pass 0: Doing byte-swap of filesystem\n"
+msgstr ""
+
+#: e2fsck/swapfs.c:203
+#, c-format
+msgid ""
+"%s: the filesystem must be freshly checked using fsck\n"
+"and not mounted before trying to byte-swap it.\n"
+msgstr ""
+
+#: e2fsck/swapfs.c:229
+msgid "Byte swap"
+msgstr ""
+
+#: e2fsck/unix.c:66
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfvstFSV] [-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 ext-journal] device\n"
+msgstr ""
+
+#: e2fsck/unix.c:71
+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\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+
+#: e2fsck/unix.c:77
+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:111
+#, c-format
+msgid "%s: %d/%d files (%0d.%d%% non-contiguous), %d/%d blocks\n"
+msgstr ""
+
+#: e2fsck/unix.c:126
+#, c-format
+msgid ""
+"\n"
+"%8d inodes used (%d%%)\n"
+msgstr ""
+
+#: e2fsck/unix.c:128
+#, c-format
+msgid "%8d non-contiguous inodes (%0d.%d%%)\n"
+msgstr ""
+
+#: e2fsck/unix.c:130
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %d/%d/%d\n"
+msgstr ""
+
+#: e2fsck/unix.c:132
+#, c-format
+msgid ""
+"%8d blocks used (%d%%)\n"
+"%8d bad blocks\n"
+msgstr ""
+
+#: e2fsck/unix.c:136
+#, c-format
+msgid "%8d large files\n"
+msgstr ""
+
+#: e2fsck/unix.c:137
+#, c-format
+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 ""
+
+#: e2fsck/unix.c:170
+#, c-format
+msgid "%8d large file%s\n"
+msgstr ""
+
+#: e2fsck/unix.c:212 misc/badblocks.c:612 misc/tune2fs.c:665 misc/util.c:110
+#: resize/main.c:96
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr ""
+
+#: e2fsck/unix.c:227
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr ""
+
+#: e2fsck/unix.c:231
+#, c-format
+msgid "%s is mounted. "
+msgstr ""
+
+#: e2fsck/unix.c:233
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:234
+msgid ""
+"\n"
+"\n"
+"WARNING!!! Running e2fsck on a mounted filesystem may cause\n"
+"SEVERE filesystem damage.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:237
+msgid "Do you really want to continue"
+msgstr ""
+
+#: e2fsck/unix.c:239
+msgid "check aborted.\n"
+msgstr ""
+
+#: e2fsck/unix.c:260
+msgid " contains a file system with errors"
+msgstr ""
+
+#: e2fsck/unix.c:262
+msgid " was not cleanly unmounted"
+msgstr ""
+
+#: e2fsck/unix.c:266
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:277
+msgid ", check forced.\n"
+msgstr ""
+
+#: e2fsck/unix.c:280
+#, c-format
+msgid "%s: clean, %d/%d files, %d/%d blocks\n"
+msgstr ""
+
+#: e2fsck/unix.c:411
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr ""
+
+#: e2fsck/unix.c:482
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:486
+msgid "Invalid completion information file descriptor"
+msgstr ""
+
+#: e2fsck/unix.c:510
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr ""
+
+#: e2fsck/unix.c:578
+msgid "Byte-swapping filesystems not compiled in this version of e2fsck\n"
+msgstr ""
+
+#: e2fsck/unix.c:614
+msgid "Incompatible options not allowed when byte-swapping.\n"
+msgstr ""
+
+#: e2fsck/unix.c:687
+msgid "Error: ext2fs library version out of date!\n"
+msgstr ""
+
+#: e2fsck/unix.c:695
+msgid "while trying to initialize program"
+msgstr ""
+
+#: e2fsck/unix.c:709
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:721
+msgid "need terminal for interactive repairs"
+msgstr ""
+
+#: e2fsck/unix.c:755
+#, c-format
+msgid "%s trying backup blocks...\n"
+msgstr ""
+
+#: e2fsck/unix.c:756
+msgid "Couldn't find ext2 superblock,"
+msgstr ""
+
+#: e2fsck/unix.c:757
+msgid "Group descriptors look bad..."
+msgstr ""
+
+#: e2fsck/unix.c:768
+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:774
+msgid "Could this be a zero-length partition?\n"
+msgstr ""
+
+#: e2fsck/unix.c:776
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr ""
+
+#: e2fsck/unix.c:781
+msgid "Possibly non-existent or swap device?\n"
+msgstr ""
+
+#: e2fsck/unix.c:784
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+
+#: e2fsck/unix.c:800
+msgid "Get a newer version of e2fsck!"
+msgstr ""
+
+#: e2fsck/unix.c:826
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr ""
+
+#: e2fsck/unix.c:838
+msgid ""
+"Warning: skipping journal recovery because doing a read-only filesystem "
+"check.\n"
+msgstr ""
+
+#: e2fsck/unix.c:846
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr ""
+
+#: e2fsck/unix.c:874
+msgid "Warning: compression support is experimental.\n"
+msgstr ""
+
+#: e2fsck/unix.c:910
+#, c-format
+msgid "%s: Filesystem byte order already normalized.\n"
+msgstr ""
+
+#: e2fsck/unix.c:930
+msgid "while reading bad blocks inode"
+msgstr ""
+
+#: e2fsck/unix.c:932
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr ""
+
+#: e2fsck/unix.c:939
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr ""
+
+#: e2fsck/unix.c:943
+msgid "while resetting context"
+msgstr ""
+
+#: e2fsck/unix.c:960
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+
+#: e2fsck/unix.c:963
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr ""
+
+#: e2fsck/unix.c:971
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:76 misc/util.c:51
+msgid "yY"
+msgstr ""
+
+#: e2fsck/util.c:77
+msgid "nN"
+msgstr ""
+
+#: e2fsck/util.c:91
+msgid "<y>"
+msgstr ""
+
+#: e2fsck/util.c:93
+msgid "<n>"
+msgstr ""
+
+#: e2fsck/util.c:95
+msgid " (y/n)"
+msgstr ""
+
+#: e2fsck/util.c:125
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:129
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:133
+msgid "yes"
+msgstr ""
+
+#: e2fsck/util.c:133
+msgid "no"
+msgstr ""
+
+#: e2fsck/util.c:146
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr ""
+
+#: e2fsck/util.c:151
+msgid "reading inode and block bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:156
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:168
+msgid "writing block bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:173
+#, c-format
+msgid "while retrying to write block bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:180
+msgid "writing inode bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:185
+#, c-format
+msgid "while retrying to write inode bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:198
+#, 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:263
+#, c-format
+msgid "Memory used: %dk/%dk (%dk/%dk), "
+msgstr ""
+
+#: e2fsck/util.c:267
+#, c-format
+msgid "Memory used: %d, "
+msgstr ""
+
+#: e2fsck/util.c:273
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr ""
+
+#: e2fsck/util.c:278
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr ""
+
+#: e2fsck/util.c:292
+#, c-format
+msgid "while reading inode %ld in %s"
+msgstr ""
+
+#: e2fsck/util.c:305
+#, c-format
+msgid "while writing inode %ld in %s"
+msgstr ""
+
+#: misc/badblocks.c:57
+msgid "done \n"
+msgstr ""
+
+#: misc/badblocks.c:67
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnf]\n"
+" [-c blocks_at_once] [-p num_passes] device [last_block [start_count]]\n"
+msgstr ""
+
+#: misc/badblocks.c:171 misc/badblocks.c:198
+msgid "during seek"
+msgstr ""
+
+#: misc/badblocks.c:178
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr ""
+
+#: misc/badblocks.c:219
+msgid "during ext2fs_sync_device"
+msgstr ""
+
+#: misc/badblocks.c:235 misc/badblocks.c:411
+msgid "while beginning bad block list iteration"
+msgstr ""
+
+#: misc/badblocks.c:245 misc/badblocks.c:314 misc/badblocks.c:421
+msgid "while allocating buffers"
+msgstr ""
+
+#: misc/badblocks.c:250
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr ""
+
+#: misc/badblocks.c:251 misc/badblocks.c:323 misc/badblocks.c:440
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr ""
+
+#: misc/badblocks.c:259
+msgid "Checking for bad blocks (read-only test): "
+msgstr ""
+
+#: misc/badblocks.c:322
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:329
+#, c-format
+msgid "Writing pattern 0x%08x: "
+msgstr ""
+
+#: misc/badblocks.c:343 misc/badblocks.c:368
+#, c-format
+msgid "during seek on block %d"
+msgstr ""
+
+#: misc/badblocks.c:355
+msgid "Reading and comparing: "
+msgstr ""
+
+#: misc/badblocks.c:428
+msgid "Initializing random test data\n"
+msgstr ""
+
+#: misc/badblocks.c:439
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:443
+msgid "Checking for bad blocks (non-destructive read-write test): "
+msgstr ""
+
+#: misc/badblocks.c:452
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+
+#: misc/badblocks.c:509
+#, c-format
+msgid "during test data write, block %lu"
+msgstr ""
+
+#: misc/badblocks.c:619 misc/util.c:117
+#, c-format
+msgid "%s is mounted; "
+msgstr ""
+
+#: misc/badblocks.c:621
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/badblocks.c:625
+msgid "it's not safe to run badblocks!\n"
+msgstr ""
+
+#: misc/badblocks.c:667 misc/mke2fs.c:825
+#, c-format
+msgid "bad block size - %s"
+msgstr ""
+
+#: misc/badblocks.c:730
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+
+#: misc/badblocks.c:736
+msgid "while trying to determine device size"
+msgstr ""
+
+#: misc/badblocks.c:742 misc/mke2fs.c:985
+#, c-format
+msgid "bad blocks count - %s"
+msgstr ""
+
+#: misc/badblocks.c:751
+#, c-format
+msgid "bad starting block - %s"
+msgstr ""
+
+#: misc/badblocks.c:757
+#, c-format
+msgid "bad blocks range: %lu-%lu"
+msgstr ""
+
+#: misc/badblocks.c:812
+msgid "creating in-memory bad blocks list"
+msgstr ""
+
+#: misc/badblocks.c:827
+msgid "adding to in-memory bad block list"
+msgstr ""
+
+#: misc/badblocks.c:851
+#, c-format
+msgid "Pass completed, %u bad blocks found.\n"
+msgstr ""
+
+#: misc/chattr.c:81
+#, c-format
+msgid "usage: %s [-RV] [-+=AacdijsSu] [-v version] files...\n"
+msgstr ""
+
+#: misc/chattr.c:139
+#, c-format
+msgid "bad version - %s\n"
+msgstr ""
+
+#: misc/chattr.c:183 misc/lsattr.c:107
+#, c-format
+msgid "while trying to stat %s"
+msgstr ""
+
+#: misc/chattr.c:200 misc/chattr.c:216
+#, c-format
+msgid "Flags of %s set as "
+msgstr ""
+
+#: misc/chattr.c:209
+#, c-format
+msgid "while reading flags on %s"
+msgstr ""
+
+#: misc/chattr.c:222
+#, c-format
+msgid "while setting flags on %s"
+msgstr ""
+
+#: misc/chattr.c:227
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr ""
+
+#: misc/chattr.c:230
+#, c-format
+msgid "while setting version on %s"
+msgstr ""
+
+#: misc/chattr.c:244
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr ""
+
+#: misc/chattr.c:275
+msgid "= is incompatible with - and +\n"
+msgstr ""
+
+#: misc/chattr.c:283
+msgid "Must use '-v', =, - or +\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:52
+#, c-format
+msgid "Usage: %s [-bfhixV] [-ob superblock] [-oB blocksize] device\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:112
+#, c-format
+msgid "Group %lu: (Blocks 0x%04x -- 0x%04x)\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:113
+#, c-format
+msgid "Group %lu: (Blocks %u -- %u)\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:116
+#, c-format
+msgid " %s Superblock at 0x%04x, Group Descriptors at 0x%04x-0x%04x\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:118
+#, c-format
+msgid " %s Superblock at %u, Group Descriptors at %u-%u\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:120
+msgid "Primary"
+msgstr ""
+
+#: misc/dumpe2fs.c:120
+msgid "Backup"
+msgstr ""
+
+#: misc/dumpe2fs.c:123
+#, c-format
+msgid ""
+" Block bitmap at 0x%04x (+%d), Inode bitmap at 0x%04x (+%d)\n"
+" Inode table at 0x%04x-0x%04x (+%d)\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:126
+#, c-format
+msgid ""
+" Block bitmap at %u (+%d), Inode bitmap at %u (+%d)\n"
+" Inode table at %u-%u (+%d)\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:137
+#, c-format
+msgid " %d free blocks, %d free inodes, %d directories\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:141
+msgid " Free blocks: "
+msgstr ""
+
+#: misc/dumpe2fs.c:146
+msgid " Free inodes: "
+msgstr ""
+
+#: misc/dumpe2fs.c:169 misc/dumpe2fs.c:195
+msgid "while printing bad block list"
+msgstr ""
+
+#: misc/dumpe2fs.c:173
+#, c-format
+msgid "Bad blocks: %d"
+msgstr ""
+
+#: misc/dumpe2fs.c:214 misc/tune2fs.c:136
+msgid "while reading journal superblock"
+msgstr ""
+
+#: misc/dumpe2fs.c:222
+msgid "Couldn't find journal superblock magic numbers"
+msgstr ""
+
+#. Print version number and exit
+#: misc/dumpe2fs.c:292 misc/mke2fs.c:971
+#, c-format
+msgid "\tUsing %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:318 misc/e2image.c:435 misc/tune2fs.c:652 resize/main.c:198
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:329
+msgid "Note: This is a byte-swapped filesystem\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:345
+msgid "while trying to read the bitmaps"
+msgstr ""
+
+#: misc/e2label.c:57
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr ""
+
+#: misc/e2label.c:62
+msgid "e2label: cannot seek to superblock\n"
+msgstr ""
+
+#: misc/e2label.c:67
+msgid "e2label: error reading superblock\n"
+msgstr ""
+
+#: misc/e2label.c:71
+msgid "e2label: not an ext2 filesystem\n"
+msgstr ""
+
+#: misc/e2label.c:96 misc/tune2fs.c:753
+msgid "Warning: label too long, truncating.\n"
+msgstr ""
+
+#: misc/e2label.c:99
+msgid "e2label: cannot seek to superblock again\n"
+msgstr ""
+
+#: misc/e2label.c:104
+msgid "e2label: error writing superblock\n"
+msgstr ""
+
+#: misc/e2label.c:116 misc/tune2fs.c:411
+msgid "Usage: e2label device [newlabel]\n"
+msgstr ""
+
+#: misc/e2image.c:50
+#, c-format
+msgid "Usage: %s [-r] device file\n"
+msgstr ""
+
+#: misc/e2image.c:61
+msgid "Couldn't allocate header buffer\n"
+msgstr ""
+
+#: misc/e2image.c:80
+#, c-format
+msgid "short write (only %d bytes) forwriting image header"
+msgstr ""
+
+#: misc/e2image.c:99
+msgid "while writing superblock"
+msgstr ""
+
+#: misc/e2image.c:107
+msgid "while writing inode table"
+msgstr ""
+
+#: misc/e2image.c:114
+msgid "while writing block bitmap"
+msgstr ""
+
+#: misc/e2image.c:121
+msgid "while writing inode bitmap"
+msgstr ""
+
+#: misc/findsuper.c:117
+msgid "Usage: findsuper device [skiprate [start]]\n"
+msgstr ""
+
+#: misc/findsuper.c:124
+msgid "Do you really want to skip less than a sector??\n"
+msgstr ""
+
+#: misc/findsuper.c:130
+#, c-format
+msgid "Have to start at 0 or greater,not %ld\n"
+msgstr ""
+
+#: misc/findsuper.c:143
+msgid "read failed"
+msgstr ""
+
+#: misc/findsuper.c:156
+#, c-format
+msgid "Failed on %d at %ld\n"
+msgstr ""
+
+#: misc/fsck.c:251
+#, c-format
+msgid "Could not determine filesystem type for %s\n"
+msgstr ""
+
+#: misc/fsck.c:271
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr ""
+
+#: misc/fsck.c:281
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr ""
+
+#: misc/fsck.c:301
+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:415
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr ""
+
+#: misc/fsck.c:498
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr ""
+
+#: misc/fsck.c:520
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr ""
+
+#: misc/fsck.c:526
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr ""
+
+#: misc/fsck.c:615
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr ""
+
+#: misc/fsck.c:635
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+
+#: misc/fsck.c:654
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr ""
+
+#: misc/fsck.c:794
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr ""
+
+#: misc/fsck.c:851
+msgid "Checking all file systems.\n"
+msgstr ""
+
+#: misc/fsck.c:921
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr ""
+
+#: misc/fsck.c:942
+msgid "Usage: fsck [-ACNPRTV] [-t fstype] [fs-options] filesys\n"
+msgstr ""
+
+#: misc/fsck.c:968
+#, c-format
+msgid "%s: too many devices\n"
+msgstr ""
+
+#: misc/fsck.c:978 misc/fsck.c:1049
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr ""
+
+#: misc/fsck.c:1103
+msgid ""
+"\n"
+"No devices specified to be checked!\n"
+msgstr ""
+
+#: misc/get_device_by_label.c:265
+#, c-format
+msgid "WARNING: %s: bad UUID"
+msgstr ""
+
+#: misc/lsattr.c:67
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr ""
+
+#: misc/lsattr.c:77
+#, c-format
+msgid "While reading flags on %s"
+msgstr ""
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading version on %s"
+msgstr ""
+
+#: misc/mke2fs.c:89
+#, c-format
+msgid ""
+"Usage: %s [-c|-t|-l filename] [-b block-size] [-f fragment-size]\n"
+"\t[-i bytes-per-inode] [-j] [-J journal-options] [-N number-of-inodes]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os] [-g blocks-per-group]\n"
+"\t[-L volume-label] [-M last-mounted-directory] [-O feature[,...]]\n"
+"\t[-r fs-revision] [-R raid_opts] [-qvSV] device [blocks-count]\n"
+msgstr ""
+
+#: misc/mke2fs.c:222
+#, c-format
+msgid "Running command: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:226
+#, c-format
+msgid "while trying run '%s'"
+msgstr ""
+
+#: misc/mke2fs.c:233
+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 %d through %d 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 %d contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:302
+msgid "while marking bad blocks as used"
+msgstr ""
+
+#: misc/mke2fs.c:355
+msgid "done \n"
+msgstr ""
+
+#: misc/mke2fs.c:390
+msgid "while allocating zeroizing buffer"
+msgstr ""
+
+#: misc/mke2fs.c:431
+msgid "Writing inode tables: "
+msgstr ""
+
+#: misc/mke2fs.c:442
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %d: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:465
+msgid "while creating root dir"
+msgstr ""
+
+#: misc/mke2fs.c:472
+msgid "while reading root inode"
+msgstr ""
+
+#: misc/mke2fs.c:481
+msgid "while setting root inode ownership"
+msgstr ""
+
+#: misc/mke2fs.c:498
+msgid "while creating /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:505
+msgid "while looking up /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:515
+msgid "while expanding /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:531
+msgid "while setting bad block inode"
+msgstr ""
+
+#: misc/mke2fs.c:564
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:580
+msgid "while initializing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:586
+msgid "Zeroing journal device: "
+msgstr ""
+
+#: misc/mke2fs.c:593
+#, c-format
+msgid "while zeroing journal device (block %u, count %d)"
+msgstr ""
+
+#: misc/mke2fs.c:604
+msgid "while writing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:618
+#, c-format
+msgid ""
+"warning: %d blocks unused.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:623
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr ""
+
+#: misc/mke2fs.c:624
+msgid "OS type: "
+msgstr ""
+
+#: misc/mke2fs.c:629
+msgid "(unknown os)"
+msgstr ""
+
+#: misc/mke2fs.c:632
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:634
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:636
+#, c-format
+msgid "%u inodes, %u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:638
+#, c-format
+msgid "%u blocks (%2.2f%%) reserved for the super user\n"
+msgstr ""
+
+#: misc/mke2fs.c:641
+#, c-format
+msgid "First data block=%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:643
+#, c-format
+msgid "%u block groups\n"
+msgstr ""
+
+#: misc/mke2fs.c:645
+#, c-format
+msgid "%u block group\n"
+msgstr ""
+
+#: misc/mke2fs.c:646
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:648
+#, c-format
+msgid "%u inodes per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:655
+msgid "Superblock backups stored on blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:705
+msgid "Couldn't allocate memory to parse raid options!\n"
+msgstr ""
+
+#: misc/mke2fs.c:730
+msgid "Invalid stride parameter.\n"
+msgstr ""
+
+#: misc/mke2fs.c:738
+msgid ""
+"\n"
+"Bad raid options specified.\n"
+"\n"
+"Raid options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid raid options are:\n"
+"\tstride=<stride length in blocks>\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:840
+#, c-format
+msgid "bad fragment size - %s"
+msgstr ""
+
+#: misc/mke2fs.c:846
+msgid "Warning: fragments not supported. Ignoring -f option\n"
+msgstr ""
+
+#: misc/mke2fs.c:853
+msgid "Illegal number for blocks per group"
+msgstr ""
+
+#: misc/mke2fs.c:858
+msgid "blocks per group must be multiple of 8"
+msgstr ""
+
+#: misc/mke2fs.c:867
+#, c-format
+msgid "bad inode ratio - %s"
+msgstr ""
+
+#: misc/mke2fs.c:884
+msgid "in malloc for bad_blocks_filename"
+msgstr ""
+
+#: misc/mke2fs.c:893
+#, c-format
+msgid "bad reserved blocks percent - %s"
+msgstr ""
+
+#: misc/mke2fs.c:956 misc/tune2fs.c:265
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1009 misc/mke2fs.c:1270
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1034
+msgid "filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:1047 resize/main.c:221
+msgid "while trying to determine filesystem size"
+msgstr ""
+
+#: misc/mke2fs.c:1053
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+
+#: misc/mke2fs.c:1060
+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:1075
+msgid "Filesystem larger than apparent filesystem size."
+msgstr ""
+
+#: misc/mke2fs.c:1093
+msgid "blocks per group count out of range"
+msgstr ""
+
+#: misc/mke2fs.c:1133
+msgid "while setting up superblock"
+msgstr ""
+
+#: misc/mke2fs.c:1161
+#, c-format
+msgid "unknown os - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1216
+msgid "while trying to allocate filesystem tables"
+msgstr ""
+
+#: misc/mke2fs.c:1247
+#, c-format
+msgid "zeroing block %u at end of filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:1263 misc/tune2fs.c:340
+msgid "journal"
+msgstr ""
+
+#: misc/mke2fs.c:1275
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr ""
+
+#: misc/mke2fs.c:1282
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+
+#: misc/mke2fs.c:1287 misc/mke2fs.c:1311 misc/tune2fs.c:362 misc/tune2fs.c:376
+msgid "done\n"
+msgstr ""
+
+#: misc/mke2fs.c:1299
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr ""
+
+#: misc/mke2fs.c:1307
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+
+#: misc/mke2fs.c:1316
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+
+#: misc/mke2fs.c:1320
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+
+#: misc/mke2fs.c:1323
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+
+#: misc/mklost+found.c:47
+msgid "Usage: mklost+found\n"
+msgstr ""
+
+#: misc/partinfo.c:21
+#, c-format
+msgid "%s failed for %s: %s\n"
+msgstr ""
+
+#: misc/partinfo.c:37
+#, c-format
+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 ""
+
+#: misc/partinfo.c:54
+msgid "HDIO_GETGEO ioctl"
+msgstr ""
+
+#: misc/partinfo.c:61
+msgid "BLKGETSIZE ioctl"
+msgstr ""
+
+#: misc/tune2fs.c:72
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:77
+#, 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]\n"
+"\t[-l] [-s sparse-flag] [-m reserved-blocks-percent]\n"
+"\t[-r reserved-blocks-count] [-u user] [-C mount-count]\n"
+"\t[-L volume-label] [-M last-mounted-dir] [-U UUID]\n"
+"\t[-O [^]feature[,...]] device\n"
+msgstr ""
+
+#: misc/tune2fs.c:124
+msgid "while trying to open external journal"
+msgstr ""
+
+#: misc/tune2fs.c:128
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:143
+msgid "Journal superblock not found!\n"
+msgstr ""
+
+#: misc/tune2fs.c:156
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:176
+msgid "Journal NOT removed\n"
+msgstr ""
+
+#: misc/tune2fs.c:183
+msgid "Journal removed\n"
+msgstr ""
+
+#: misc/tune2fs.c:214
+msgid "while reading journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:221
+msgid "while reading bitmaps"
+msgstr ""
+
+#: misc/tune2fs.c:228
+msgid "while clearing journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:239
+msgid "while writing journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:279
+msgid ""
+"The has_journal flag may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:288
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+
+#: misc/tune2fs.c:335
+msgid "The filesystem already has a journal.\n"
+msgstr ""
+
+#: misc/tune2fs.c:346
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:350
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr ""
+
+#: misc/tune2fs.c:358
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr ""
+
+#: misc/tune2fs.c:364
+msgid "Creating journal inode: "
+msgstr ""
+
+#: misc/tune2fs.c:373
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+
+#: misc/tune2fs.c:439 misc/tune2fs.c:452
+#, c-format
+msgid "bad mounts count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:468
+#, c-format
+msgid "bad error behavior - %s"
+msgstr ""
+
+#: misc/tune2fs.c:491
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:524
+#, c-format
+msgid "bad interval - %s"
+msgstr ""
+
+#: misc/tune2fs.c:552
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr ""
+
+#: misc/tune2fs.c:567
+msgid "-O may only be specified once"
+msgstr ""
+
+#: misc/tune2fs.c:577
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:601
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:675
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:681
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:686
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:691
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:696
+#, c-format
+msgid "Setting interval between check %lu seconds\n"
+msgstr ""
+
+#: misc/tune2fs.c:702
+#, c-format
+msgid "Setting reserved blocks percentage to %lu (%u blocks)\n"
+msgstr ""
+
+#: misc/tune2fs.c:708
+#, c-format
+msgid "reserved blocks count is too big (%ul)"
+msgstr ""
+
+#: misc/tune2fs.c:714
+#, c-format
+msgid "Setting reserved blocks count to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:720
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+
+#: misc/tune2fs.c:727
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+
+#: misc/tune2fs.c:734
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks disabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:742
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag cleared. %s"
+msgstr ""
+
+#: misc/tune2fs.c:749
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:780
+msgid "Invalid UUID format\n"
+msgstr ""
+
+#: misc/uuidgen.c:30
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr ""
+
+#: misc/util.c:55
+msgid "Proceed anyway? (y,n) "
+msgstr ""
+
+#: misc/util.c:70
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr ""
+
+#: misc/util.c:73
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+
+#: misc/util.c:78
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr ""
+
+#: misc/util.c:95
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr ""
+
+#: misc/util.c:119
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/util.c:122
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr ""
+
+#: misc/util.c:136
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr ""
+
+#: misc/util.c:178
+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 raid options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\n"
+"The journal size must be between 1024 and 102400 filesystem blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/util.c:205
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+
+#: misc/util.c:213
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 102400 blocks. Aborting.\n"
+msgstr ""
+
+#: misc/util.c:221
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+
+#: misc/util.c:240
+#, 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 ""
+
+#: resize/main.c:31
+#, c-format
+msgid ""
+"usage: %s [-d debug_flags] [-f] [-F] [-p] device [new-size]\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:52
+msgid "Extending the inode table"
+msgstr ""
+
+#: resize/main.c:55
+msgid "Relocating blocks"
+msgstr ""
+
+#: resize/main.c:58
+msgid "Scanning inode table"
+msgstr ""
+
+#: resize/main.c:61
+msgid "Updating inode references"
+msgstr ""
+
+#: resize/main.c:64
+msgid "Moving inode table"
+msgstr ""
+
+#: resize/main.c:67
+msgid "Unknown pass?!?"
+msgstr ""
+
+#: resize/main.c:70
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr ""
+
+#: resize/main.c:95
+msgid "ext2fs_check_if_mount"
+msgstr ""
+
+#: resize/main.c:103
+#, c-format
+msgid ""
+"%s is mounted; can't resize a mounted filesystem!\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:125
+#, c-format
+msgid "resize2fs %s (%s)\n"
+msgstr ""
+
+#: resize/main.c:158
+#, c-format
+msgid "bad filesystem size - %s"
+msgstr ""
+
+#: resize/main.c:227
+#, c-format
+msgid ""
+"The containing partition (or device) is only %d blocks.\n"
+"You requested a new size of %d blocks.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:234
+#, c-format
+msgid ""
+"The filesystem is already %d blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:239
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:247
+#, c-format
+msgid "while trying to resize %s"
+msgstr ""
+
+#: resize/main.c:251
+#, c-format
+msgid ""
+"The filesystem on %s is now %d blocks long.\n"
+"\n"
+msgstr ""
+
+#: resize/resize2fs.c:108
+#, c-format
+msgid "Number of free blocks: %d/%d, Needed: %d\n"
+msgstr ""
+
+#: resize/resize2fs.c:426
+msgid "meta-data blocks"
+msgstr ""
+
+#: resize/resize2fs.c:489
+msgid "reserved blocks"
+msgstr ""
+
+#: resize/resize2fs.c:494
+msgid "blocks to be moved"
+msgstr ""
+
+#: resize/resize2fs.c:725
+msgid "Going into desperation mode for block allocations\n"
+msgstr ""
+
+#: resize/resize2fs.c:814
+#, c-format
+msgid "Moving %d blocks %u->%u\n"
+msgstr ""
+
+#: resize/resize2fs.c:884
+#, c-format
+msgid "ino=%ld, blockcnt=%ld, %u->%u\n"
+msgstr ""
+
+#: resize/resize2fs.c:1040
+#, c-format
+msgid "Inode moved %ld->%ld\n"
+msgstr ""
+
+#: resize/resize2fs.c:1103
+#, c-format
+msgid "Inode translate (dir=%ld, name=%.*s, %u->%ld)\n"
+msgstr ""
+
+#: resize/resize2fs.c:1222
+#, c-format
+msgid "Itable move group %d block %u->%u (diff %d)\n"
+msgstr ""
+
+#: resize/resize2fs.c:1248
+#, c-format
+msgid "%d blocks of zeros...\n"
+msgstr ""
+
+#: resize/resize2fs.c:1283
+msgid "Inode table move finished.\n"
+msgstr ""
+
+#: resize/extent.c:197
+msgid "# Extent dump:\n"
+msgstr ""
+
+#: resize/extent.c:198
+#, c-format
+msgid "#\tNum=%d, Size=%d, Cursor=%d, Sorted=%d\n"
+msgstr ""
+
+#: resize/extent.c:201
+#, c-format
+msgid "#\t\t %u -> %u (%d)\n"
+msgstr ""
Added: trunk/yaboot/lib/e2fsprogs-1.27/po/it.po
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/po/it.po 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/po/it.po 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,3308 @@
+# Italian translation for e2fsprogs
+# Copyright (C) 2000 Marco d'Itri
+# Marco d'Itri <md at linux.it>, 2000.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.18\n"
+"POT-Creation-Date: 2001-10-08 11:47-0400\n"
+"PO-Revision-Date: 2000-01-15 14:21+01:00\n"
+"Last-Translator: Marco d'Itri <md at linux.it>\n"
+"Language-Team: Italian <it at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: e2fsck/badblocks.c:22 misc/mke2fs.c:181
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr ""
+
+#: e2fsck/badblocks.c:45
+msgid "while sanity checking the bad blocks inode"
+msgstr ""
+
+#: e2fsck/badblocks.c:57
+msgid "while reading the bad blocks inode"
+msgstr ""
+
+#: e2fsck/badblocks.c:71 e2fsck/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:765 e2fsck/unix.c:797 misc/badblocks.c:767
+#: misc/badblocks.c:776 misc/badblocks.c:790 misc/badblocks.c:801
+#: misc/dumpe2fs.c:316 misc/e2image.c:433 misc/e2image.c:449 misc/mke2fs.c:197
+#: misc/tune2fs.c:649 resize/main.c:196
+#, c-format
+msgid "while trying to open %s"
+msgstr ""
+
+#: e2fsck/badblocks.c:81
+#, c-format
+msgid "while trying popen '%s'"
+msgstr ""
+
+#: e2fsck/badblocks.c:92 misc/mke2fs.c:204
+msgid "while reading in list of bad blocks from file"
+msgstr ""
+
+#: e2fsck/badblocks.c:102
+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:53
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr ""
+
+#: e2fsck/ehandler.c:56
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr ""
+
+#: e2fsck/ehandler.c:59 e2fsck/ehandler.c:103
+msgid "Ignore error"
+msgstr ""
+
+#: e2fsck/ehandler.c:97
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr ""
+
+#: e2fsck/ehandler.c:100
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr ""
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr ""
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr ""
+
+#. Inode number 11 is usually lost+found
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %d (#%d) in inode %d\n"
+msgstr ""
+
+#: e2fsck/extend.c:21
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr ""
+
+#: e2fsck/extend.c:43
+msgid "Illegal number of blocks!\n"
+msgstr ""
+
+#: e2fsck/extend.c:49
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr ""
+
+#: e2fsck/flushb.c:44
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr ""
+
+#: e2fsck/flushb.c:73
+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:599 resize/main.c:173
+#, c-format
+msgid "while opening %s for flushing"
+msgstr ""
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:605 resize/main.c:180
+#, c-format
+msgid "while trying to flush %s"
+msgstr ""
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:340
+msgid "while opening inode scan"
+msgstr ""
+
+#: e2fsck/iscan.c:127 misc/e2image.c:355
+msgid "while getting next inode"
+msgstr ""
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%d inodes scanned.\n"
+msgstr ""
+
+#: e2fsck/journal.c:47
+#, c-format
+msgid "bmap journal inode %ld, block %d\n"
+msgstr ""
+
+#: e2fsck/journal.c:384
+msgid "reading journal superblock\n"
+msgstr ""
+
+#: e2fsck/journal.c:441
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr ""
+
+#: e2fsck/journal.c:450
+#, c-format
+msgid "%s: journal too short\n"
+msgstr ""
+
+#: e2fsck/journal.c:702
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr ""
+
+#: e2fsck/journal.c:704
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr ""
+
+#: e2fsck/journal.c:725
+#, c-format
+msgid "while trying to re-open %s"
+msgstr ""
+
+#: e2fsck/message.c:103
+msgid "aextended attribute"
+msgstr ""
+
+#: e2fsck/message.c:104
+msgid "Aerror allocating"
+msgstr ""
+
+#: e2fsck/message.c:105
+msgid "bblock"
+msgstr ""
+
+#: e2fsck/message.c:106
+msgid "Bbitmap"
+msgstr ""
+
+#: e2fsck/message.c:107
+msgid "ccompress"
+msgstr ""
+
+#: e2fsck/message.c:108
+msgid "Cconflicts with some other fs @b"
+msgstr ""
+
+#: e2fsck/message.c:109
+msgid "iinode"
+msgstr ""
+
+#: e2fsck/message.c:110
+msgid "Iillegal"
+msgstr ""
+
+#: e2fsck/message.c:111
+msgid "jjournal"
+msgstr ""
+
+#: e2fsck/message.c:112
+msgid "Ddeleted"
+msgstr ""
+
+#: e2fsck/message.c:113
+msgid "ddirectory"
+msgstr ""
+
+#: e2fsck/message.c:114
+msgid "eentry"
+msgstr ""
+
+#: e2fsck/message.c:115
+msgid "E at e '%Dn' in %p (%i)"
+msgstr ""
+
+#: e2fsck/message.c:116
+msgid "ffilesystem"
+msgstr ""
+
+#: e2fsck/message.c:117
+msgid "Ffor @i %i (%Q) is"
+msgstr ""
+
+#: e2fsck/message.c:118
+msgid "ggroup"
+msgstr ""
+
+#: e2fsck/message.c:119
+msgid "llost+found"
+msgstr ""
+
+#: e2fsck/message.c:120
+msgid "Lis a link"
+msgstr ""
+
+#: e2fsck/message.c:121
+msgid "oorphaned"
+msgstr ""
+
+#: e2fsck/message.c:122
+msgid "rroot @i"
+msgstr ""
+
+#: e2fsck/message.c:123
+msgid "sshould be"
+msgstr ""
+
+#: e2fsck/message.c:124
+msgid "Ssuper at b"
+msgstr ""
+
+#: e2fsck/message.c:125
+msgid "uunattached"
+msgstr ""
+
+#: e2fsck/message.c:126
+msgid "vdevice"
+msgstr ""
+
+#: e2fsck/message.c:127
+msgid "zzero-length"
+msgstr ""
+
+#: e2fsck/message.c:138
+msgid "<The NULL inode>"
+msgstr ""
+
+#. 0
+#: e2fsck/message.c:139
+msgid "<The bad blocks inode>"
+msgstr ""
+
+#. 1
+#. 2
+#: e2fsck/message.c:141
+msgid "<The ACL index inode>"
+msgstr ""
+
+#. 3
+#: e2fsck/message.c:142
+msgid "<The ACL data inode>"
+msgstr ""
+
+#. 4
+#: e2fsck/message.c:143
+msgid "<The boot loader inode>"
+msgstr ""
+
+#. 5
+#: e2fsck/message.c:144
+msgid "<The undelete directory inode>"
+msgstr ""
+
+#. 6
+#: e2fsck/message.c:145
+msgid "<The group descriptor inode>"
+msgstr ""
+
+#. 7
+#: e2fsck/message.c:146
+msgid "<The journal inode>"
+msgstr ""
+
+#. 8
+#: e2fsck/message.c:147
+msgid "<Reserved inode 9>"
+msgstr ""
+
+#. 9
+#: e2fsck/message.c:148
+msgid "<Reserved inode 10>"
+msgstr ""
+
+#: e2fsck/pass1b.c:127
+msgid "multiply claimed inode map"
+msgstr ""
+
+#: e2fsck/pass1b.c:539 e2fsck/pass1b.c:650
+#, c-format
+msgid "internal error; can't find dup_blk for %d\n"
+msgstr ""
+
+#: e2fsck/pass1b.c:687
+msgid "returned from clone_file_block"
+msgstr ""
+
+#.
+#. * Allocate bitmaps structures
+#.
+#: e2fsck/pass1.c:290
+msgid "in-use inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:299
+msgid "directory inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:307
+msgid "regular file inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:314
+msgid "in-use block map"
+msgstr ""
+
+#: e2fsck/pass1.c:361
+msgid "doing inode scan"
+msgstr ""
+
+#: e2fsck/pass1.c:737
+msgid "Pass 1"
+msgstr ""
+
+#: e2fsck/pass1.c:795
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr ""
+
+#: e2fsck/pass1.c:837
+msgid "bad inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:859
+msgid "inode in bad block map"
+msgstr ""
+
+#: e2fsck/pass1.c:879
+msgid "imagic inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:906
+msgid "multiply claimed block map"
+msgstr ""
+
+#: e2fsck/pass1.c:1006
+msgid "ext attr block map"
+msgstr ""
+
+#: e2fsck/pass1.c:1673
+msgid "block bitmap"
+msgstr ""
+
+#: e2fsck/pass1.c:1677
+msgid "inode bitmap"
+msgstr ""
+
+#: e2fsck/pass1.c:1681
+msgid "inode table"
+msgstr ""
+
+#.
+#. * Allocate some bitmaps to do loop detection.
+#.
+#: e2fsck/pass3.c:85
+msgid "inode done bitmap"
+msgstr ""
+
+#: e2fsck/pass3.c:96
+msgid "Peak memory"
+msgstr ""
+
+#: e2fsck/pass3.c:141
+msgid "Pass 3"
+msgstr ""
+
+#: e2fsck/pass3.c:331
+msgid "inode loop detection bitmap"
+msgstr ""
+
+#. Should never happen
+#: e2fsck/pass3.c:584
+msgid "Debug error in e2fsck adjust_inode_count, should never happen.\n"
+msgstr ""
+
+#: e2fsck/pass4.c:163
+msgid "Pass 4"
+msgstr ""
+
+#: e2fsck/pass5.c:70
+msgid "Pass 5"
+msgstr ""
+
+#: e2fsck/problem.c:47
+msgid "(no prompt)"
+msgstr ""
+
+#. 0
+#: e2fsck/problem.c:48
+msgid "Fix"
+msgstr ""
+
+#. 1
+#: e2fsck/problem.c:49
+msgid "Clear"
+msgstr ""
+
+#. 2
+#: e2fsck/problem.c:50
+msgid "Relocate"
+msgstr ""
+
+#. 3
+#: e2fsck/problem.c:51
+msgid "Allocate"
+msgstr ""
+
+#. 4
+#: e2fsck/problem.c:52
+msgid "Expand"
+msgstr ""
+
+#. 5
+#: e2fsck/problem.c:53
+msgid "Connect to /lost+found"
+msgstr ""
+
+#. 6
+#: e2fsck/problem.c:54
+msgid "Create"
+msgstr ""
+
+#. 7
+#: e2fsck/problem.c:55
+msgid "Salvage"
+msgstr ""
+
+#. 8
+#: e2fsck/problem.c:56
+msgid "Truncate"
+msgstr ""
+
+#. 9
+#: e2fsck/problem.c:57
+msgid "Clear inode"
+msgstr ""
+
+#. 10
+#: e2fsck/problem.c:58
+msgid "Abort"
+msgstr ""
+
+#. 11
+#: e2fsck/problem.c:59
+msgid "Split"
+msgstr ""
+
+#. 12
+#: e2fsck/problem.c:60
+msgid "Continue"
+msgstr ""
+
+#. 13
+#: e2fsck/problem.c:61
+msgid "Clone duplicate/bad blocks"
+msgstr ""
+
+#. 14
+#: e2fsck/problem.c:62
+msgid "Delete file"
+msgstr ""
+
+#. 15
+#: e2fsck/problem.c:63
+msgid "Suppress messages"
+msgstr ""
+
+#. 16
+#: e2fsck/problem.c:64
+msgid "Unlink"
+msgstr ""
+
+#: e2fsck/problem.c:72
+msgid "(NONE)"
+msgstr ""
+
+#. 0
+#: e2fsck/problem.c:73
+msgid "FIXED"
+msgstr ""
+
+#. 1
+#: e2fsck/problem.c:74
+msgid "CLEARED"
+msgstr ""
+
+#. 2
+#: e2fsck/problem.c:75
+msgid "RELOCATED"
+msgstr ""
+
+#. 3
+#: e2fsck/problem.c:76
+msgid "ALLOCATED"
+msgstr ""
+
+#. 4
+#: e2fsck/problem.c:77
+msgid "EXPANDED"
+msgstr ""
+
+#. 5
+#: e2fsck/problem.c:78
+msgid "RECONNECTED"
+msgstr ""
+
+#. 6
+#: e2fsck/problem.c:79
+msgid "CREATED"
+msgstr ""
+
+#. 7
+#: e2fsck/problem.c:80
+msgid "SALVAGED"
+msgstr ""
+
+#. 8
+#: e2fsck/problem.c:81
+msgid "TRUNCATED"
+msgstr ""
+
+#. 9
+#: e2fsck/problem.c:82
+msgid "INODE CLEARED"
+msgstr ""
+
+#. 10
+#: e2fsck/problem.c:83
+msgid "ABORTED"
+msgstr ""
+
+#. 11
+#: e2fsck/problem.c:84
+msgid "SPLIT"
+msgstr ""
+
+#. 12
+#: e2fsck/problem.c:85
+msgid "CONTINUING"
+msgstr ""
+
+#. 13
+#: e2fsck/problem.c:86
+msgid "DUPLICATE/BAD BLOCKS CLONED"
+msgstr ""
+
+#. 14
+#: e2fsck/problem.c:87
+msgid "FILE DELETED"
+msgstr ""
+
+#. 15
+#: e2fsck/problem.c:88
+msgid "SUPPRESSED"
+msgstr ""
+
+#. 16
+#: e2fsck/problem.c:89
+msgid "UNLINKED"
+msgstr ""
+
+#. Pre-Pass 1 errors
+#. Block bitmap not in group
+#: e2fsck/problem.c:97
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr ""
+
+#. Inode bitmap not in group
+#: e2fsck/problem.c:101
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr ""
+
+#: e2fsck/problem.c:106
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+
+#: e2fsck/problem.c:112
+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:121
+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:128
+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:135
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr ""
+
+#: e2fsck/problem.c:140
+msgid "@S first_data_ at b = %b, should have been %c\n"
+msgstr ""
+
+#: e2fsck/problem.c:145
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:150
+msgid ""
+"Note: if there is several inode or block bitmap blocks\n"
+"which require relocation, or one part of the inode table\n"
+"which must be moved, you may wish to try running e2fsck\n"
+"with the '-b %S' option first. The problem may lie only\n"
+"with the primary block group descriptor, and the backup\n"
+"block group descriptor may be OK.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:160
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr ""
+
+#: e2fsck/problem.c:165
+#, c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:170
+msgid "@i count in @S is %i, should be %j.\n"
+msgstr ""
+
+#: e2fsck/problem.c:174
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr ""
+
+#: e2fsck/problem.c:179
+#, c-format
+msgid "@S has a bad ext3 @j (@i %i).\n"
+msgstr ""
+
+#: e2fsck/problem.c:184
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr ""
+
+#: e2fsck/problem.c:189
+msgid "Can't find external @j\n"
+msgstr ""
+
+#: e2fsck/problem.c:194
+msgid "External @j has bad @S\n"
+msgstr ""
+
+#: e2fsck/problem.c:199
+msgid "External @j does not support this @f\n"
+msgstr ""
+
+#: e2fsck/problem.c:204
+msgid ""
+"Ext3 @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:212
+msgid "Ext3 @j @S is corrupt.\n"
+msgstr ""
+
+#: e2fsck/problem.c:217
+#, c-format
+msgid "@S doesn't have has_journal flag, but has ext3 @j %s.\n"
+msgstr ""
+
+#: e2fsck/problem.c:222
+msgid "@S has ext3 needs_recovery flag set, but no @j.\n"
+msgstr ""
+
+#: e2fsck/problem.c:227
+msgid "*** WARNING *** leaving data in the @j may be DANGEROUS.\n"
+msgstr ""
+
+#: e2fsck/problem.c:232
+msgid "ext3 recovery flag clear, but journal has data.\n"
+msgstr ""
+
+#: e2fsck/problem.c:237
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr ""
+
+#: e2fsck/problem.c:242
+msgid "@I @b #%B (%b) found in @o @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:247
+msgid "Already cleared @b #%B (%b) found in @o @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:252
+#, c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr ""
+
+#: e2fsck/problem.c:257
+#, c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr ""
+
+#: e2fsck/problem.c:267
+msgid "Ext3 @j @S has an unknown read-only feature flag set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:272
+msgid "Ext3 @j @S has an unknown incompatible feature flag set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:277
+msgid "@j version not supported by this e2fsck.\n"
+msgstr ""
+
+#: e2fsck/problem.c:282
+#, c-format
+msgid ""
+"Moving @j from /%s to hidden inode.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:287
+#, c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:292
+msgid ""
+"Found invalid V2 @j @S fields (from V1 journal).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:300
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr ""
+
+#. Root directory is not an inode
+#: e2fsck/problem.c:304
+msgid "@r is not a @d. "
+msgstr ""
+
+#: e2fsck/problem.c:309
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr ""
+
+#: e2fsck/problem.c:314
+msgid "Reserved @i %i %Q has bad mode. "
+msgstr ""
+
+#: e2fsck/problem.c:319
+#, c-format
+msgid "@D @i %i has zero dtime. "
+msgstr ""
+
+#: e2fsck/problem.c:324
+#, c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr ""
+
+#: e2fsck/problem.c:329
+#, c-format
+msgid "@i %i is a @z @d. "
+msgstr ""
+
+#: e2fsck/problem.c:334
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr ""
+
+#: e2fsck/problem.c:339
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr ""
+
+#: e2fsck/problem.c:344
+msgid "@g %g's @i table at %b @C.\n"
+msgstr ""
+
+#: e2fsck/problem.c:349
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr ""
+
+#: e2fsck/problem.c:354
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr ""
+
+#: e2fsck/problem.c:359
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr ""
+
+#: e2fsck/problem.c:364
+msgid "@i %i, i_ at bs is %Ib, @s %N. "
+msgstr ""
+
+#: e2fsck/problem.c:369
+msgid "@I @b #%B (%b) in @i %i. "
+msgstr ""
+
+#: e2fsck/problem.c:374
+msgid "@b #%B (%b) overlaps @f metadata in @i %i. "
+msgstr ""
+
+#: e2fsck/problem.c:379
+#, c-format
+msgid "@i %i has illegal @b(s). "
+msgstr ""
+
+#: e2fsck/problem.c:384
+#, c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:389
+msgid "@I @b #%B (%b) in bad @b @i. "
+msgstr ""
+
+#: e2fsck/problem.c:394
+msgid "Bad @b @i has illegal @b(s). "
+msgstr ""
+
+#: e2fsck/problem.c:399
+msgid "Duplicate or bad @b in use!\n"
+msgstr ""
+
+#: e2fsck/problem.c:404
+msgid "Bad @b %b used as bad @b indirect @b?!?\n"
+msgstr ""
+
+#: e2fsck/problem.c:409
+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 ""
+
+#: e2fsck/problem.c:417
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+
+#: e2fsck/problem.c:422
+msgid ""
+"You can clear the this @b (and hope for the best) from the\n"
+"bad @b list and hope that @b is really OK, but there are no\n"
+"guarantees.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:429
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr ""
+
+#: e2fsck/problem.c:434
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr ""
+
+#: e2fsck/problem.c:440
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr ""
+
+#: e2fsck/problem.c:445
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr ""
+
+#: e2fsck/problem.c:451
+msgid "Programming error? @b #%b claimed for no reason in process_bad_ at b.\n"
+msgstr ""
+
+#: e2fsck/problem.c:457
+msgid "@A %N @b(s) for %s: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:462
+#, c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr ""
+
+#: e2fsck/problem.c:467
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr ""
+
+#: e2fsck/problem.c:472
+#, c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr ""
+
+#: e2fsck/problem.c:477
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:482
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:497
+#, c-format
+msgid "@A icount link information: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:502
+#, c-format
+msgid "@A @d @b array: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:507
+#, c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:512
+#, c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:517
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:522
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:528
+#, c-format
+msgid "Error reading @i %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:536
+#, c-format
+msgid "@i %i has imagic flag set. "
+msgstr ""
+
+#: e2fsck/problem.c:541
+#, c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+
+#: e2fsck/problem.c:547
+#, c-format
+msgid "@i %i has @cion flag set on @f without @cion support. "
+msgstr ""
+
+#: e2fsck/problem.c:567
+msgid "@j is not regular file. "
+msgstr ""
+
+#: e2fsck/problem.c:572
+#, c-format
+msgid "@i %i was part of the orphaned @i list. "
+msgstr ""
+
+#: e2fsck/problem.c:578
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr ""
+
+#: e2fsck/problem.c:588
+msgid "Error reading @a @b %b for @i %i. "
+msgstr ""
+
+#: e2fsck/problem.c:593
+msgid "@i %i has a bad @a @b %b. "
+msgstr ""
+
+#: e2fsck/problem.c:598
+msgid "Error reading @a @b %b (%m). "
+msgstr ""
+
+#: e2fsck/problem.c:603
+msgid "@a @b %b has reference count %B, should be %N. "
+msgstr ""
+
+#: e2fsck/problem.c:608
+msgid "Error writing @a @b %b (%m). "
+msgstr ""
+
+#: e2fsck/problem.c:613
+msgid "@a @b %b has h_blocks > 1. "
+msgstr ""
+
+#: e2fsck/problem.c:618
+msgid "Error allocating @a @b %b. "
+msgstr ""
+
+#: e2fsck/problem.c:623
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr ""
+
+#: e2fsck/problem.c:628
+msgid "@a @b %b is corrupt (invalid name). "
+msgstr ""
+
+#: e2fsck/problem.c:633
+msgid "@a @b %b is corrupt (invalid value). "
+msgstr ""
+
+#: e2fsck/problem.c:640
+msgid ""
+"Duplicate @bs found... invoking duplicate @b passes.\n"
+"Pass 1B: Rescan for duplicate/bad @bs\n"
+msgstr ""
+
+#: e2fsck/problem.c:646
+#, c-format
+msgid "Duplicate/bad @b(s) in @i %i:"
+msgstr ""
+
+#: e2fsck/problem.c:661
+#, c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:666
+#, c-format
+msgid "@A @i @B (inode_dup_map): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:671
+#, c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:676
+msgid "Pass 1C: Scan directories for @is with dup @bs.\n"
+msgstr ""
+
+#: e2fsck/problem.c:682
+msgid "Pass 1D: Reconciling duplicate @bs\n"
+msgstr ""
+
+#: e2fsck/problem.c:687
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %B duplicate @b(s), shared with %N file(s):\n"
+msgstr ""
+
+#: e2fsck/problem.c:693
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr ""
+
+#: e2fsck/problem.c:698
+msgid "\t<@f metadata>\n"
+msgstr ""
+
+#: e2fsck/problem.c:703
+msgid ""
+"(There are %N @is containing duplicate/bad @bs.)\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:708
+msgid ""
+"Duplicated @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:721
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:727
+msgid "Pass 2: Checking @d structure\n"
+msgstr ""
+
+#: e2fsck/problem.c:732
+#, c-format
+msgid "Bad @i number for '.' in @d @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:737
+msgid "@E has bad @i #: %Di.\n"
+msgstr ""
+
+#: e2fsck/problem.c:742
+msgid "@E has @D/unused @i %Di. "
+msgstr ""
+
+#: e2fsck/problem.c:747
+msgid "@E @L to '.' "
+msgstr ""
+
+#: e2fsck/problem.c:752
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr ""
+
+#: e2fsck/problem.c:757
+msgid "@E @L to @d %P (%Di).\n"
+msgstr ""
+
+#: e2fsck/problem.c:762
+msgid "@E @L to the @r.\n"
+msgstr ""
+
+#: e2fsck/problem.c:767
+msgid "@E has illegal characters in its name.\n"
+msgstr ""
+
+#: e2fsck/problem.c:772
+#, c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:777
+#, c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:782
+msgid "First @e '%Dn' (inode=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr ""
+
+#: e2fsck/problem.c:787
+msgid "Second @e '%Dn' (inode=%Di) in @d @i %i @s '..'\n"
+msgstr ""
+
+#: e2fsck/problem.c:792
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:797
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:802
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:807
+msgid "i_frag @F %N, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:812
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:817
+msgid "@i %i (%Q) has a bad mode (%Im).\n"
+msgstr ""
+
+#: e2fsck/problem.c:822
+msgid "@d @i %i, @b %B, offset %N: @d corrupted\n"
+msgstr ""
+
+#: e2fsck/problem.c:827
+msgid "@d @i %i, @b %B, offset %N: filename too long\n"
+msgstr ""
+
+#: e2fsck/problem.c:832
+msgid "@d @i %i has an unallocated @b #%B. "
+msgstr ""
+
+#: e2fsck/problem.c:837
+#, c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+
+#: e2fsck/problem.c:842
+#, c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+
+#: e2fsck/problem.c:847
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr ""
+
+#: e2fsck/problem.c:852
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr ""
+
+#: e2fsck/problem.c:857
+msgid "@E is duplicate '.' @e.\n"
+msgstr ""
+
+#: e2fsck/problem.c:862
+msgid "@E is duplicate '..' @e.\n"
+msgstr ""
+
+#: e2fsck/problem.c:867 e2fsck/problem.c:1069
+#, c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:872
+msgid "@E has rec_len of %Dr, should be %N.\n"
+msgstr ""
+
+#: e2fsck/problem.c:877
+#, c-format
+msgid "@A icount structure: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:882
+#, c-format
+msgid "Error interating over @d @bs: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:887
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:892
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:897
+#, c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:902
+#, c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:907
+msgid "@d @e for '.' is big. "
+msgstr ""
+
+#: e2fsck/problem.c:912
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr ""
+
+#: e2fsck/problem.c:917
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr ""
+
+#: e2fsck/problem.c:922
+msgid "Setting filetype for @E to %N.\n"
+msgstr ""
+
+#: e2fsck/problem.c:927
+msgid "@E has an incorrect filetype (was %Dt, should be %N).\n"
+msgstr ""
+
+#: e2fsck/problem.c:932
+msgid "@E has filetype set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:937
+msgid "@E has a zero-length name.\n"
+msgstr ""
+
+#: e2fsck/problem.c:942
+msgid "Symlink %Q (@i #%i) has an invalid size (%Is).\n"
+msgstr ""
+
+#: e2fsck/problem.c:947
+msgid "@a @b @F is invalid (%If).\n"
+msgstr ""
+
+#: e2fsck/problem.c:952
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr ""
+
+#: e2fsck/problem.c:959
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr ""
+
+#: e2fsck/problem.c:964
+msgid "@r not allocated. "
+msgstr ""
+
+#: e2fsck/problem.c:969
+msgid "No room in @l @d. "
+msgstr ""
+
+#: e2fsck/problem.c:974
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr ""
+
+#: e2fsck/problem.c:979
+msgid "/@l not found. "
+msgstr ""
+
+#: e2fsck/problem.c:984
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr ""
+
+#: e2fsck/problem.c:989
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr ""
+
+#: e2fsck/problem.c:994
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:999
+#, c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1004
+#, c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1009
+#, c-format
+msgid "ext2fs_new_ at b: %m while trying to create /@l @d\n"
+msgstr ""
+
+#: e2fsck/problem.c:1014
+#, c-format
+msgid "ext2fs_new_ at i: %m while trying to create /@l @d\n"
+msgstr ""
+
+#: e2fsck/problem.c:1019
+#, c-format
+msgid "ext2fs_new_dir_ at b: %m while creating new @d @b\n"
+msgstr ""
+
+#: e2fsck/problem.c:1024
+#, c-format
+msgid "ext2fs_write_dir_ at b: %m while writing the @d @b for /@l\n"
+msgstr ""
+
+#: e2fsck/problem.c:1029
+#, c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr ""
+
+#: e2fsck/problem.c:1034
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1039
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d entry\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1044
+msgid "@A @i @B (%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1049
+#, c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1054
+#, c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1059
+msgid "@r is not a @d; aborting.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1064
+msgid "Cannot proceed without a @r.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1074
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1081
+msgid "Pass 4: Checking reference counts\n"
+msgstr ""
+
+#: e2fsck/problem.c:1096
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr ""
+
+#: e2fsck/problem.c:1100
+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 should be the same!\n"
+msgstr ""
+
+#: e2fsck/problem.c:1110
+msgid "Pass 5: Checking @g summary information\n"
+msgstr ""
+
+#: e2fsck/problem.c:1115
+msgid "Padding at end of @i @B is not set. "
+msgstr ""
+
+#: e2fsck/problem.c:1120
+msgid "Padding at end of @b @B is not set. "
+msgstr ""
+
+#: e2fsck/problem.c:1125
+msgid "@b @B differences: "
+msgstr ""
+
+#: e2fsck/problem.c:1145
+msgid "@i @B differences: "
+msgstr ""
+
+#: e2fsck/problem.c:1165
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1170
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1175
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1180
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1185
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1190
+msgid ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
+"endpoints (%i, %j)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1196
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1308
+#, c-format
+msgid "Unhandled error code (%d)!\n"
+msgstr ""
+
+#: e2fsck/problem.c:1382
+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:200
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr ""
+
+#: e2fsck/super.c:266
+msgid "Truncating"
+msgstr ""
+
+#: e2fsck/super.c:267
+msgid "Clearing"
+msgstr ""
+
+#: e2fsck/swapfs.c:98
+msgid "while calling ext2fs_block_iterate"
+msgstr ""
+
+#: e2fsck/swapfs.c:104
+msgid "while calling iterator function"
+msgstr ""
+
+#: e2fsck/swapfs.c:125
+msgid "while allocating inode buffer"
+msgstr ""
+
+#: e2fsck/swapfs.c:137
+#, c-format
+msgid "while reading inode table (group %d)"
+msgstr ""
+
+#: e2fsck/swapfs.c:175
+#, c-format
+msgid "while writing inode table (group %d)"
+msgstr ""
+
+#: e2fsck/swapfs.c:196
+msgid "Pass 0: Doing byte-swap of filesystem\n"
+msgstr ""
+
+#: e2fsck/swapfs.c:203
+#, c-format
+msgid ""
+"%s: the filesystem must be freshly checked using fsck\n"
+"and not mounted before trying to byte-swap it.\n"
+msgstr ""
+
+#: e2fsck/swapfs.c:229
+msgid "Byte swap"
+msgstr ""
+
+#: e2fsck/unix.c:66
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfvstFSV] [-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 ext-journal] device\n"
+msgstr ""
+
+#: e2fsck/unix.c:71
+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\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+
+#: e2fsck/unix.c:77
+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:111
+#, c-format
+msgid "%s: %d/%d files (%0d.%d%% non-contiguous), %d/%d blocks\n"
+msgstr ""
+
+#: e2fsck/unix.c:126
+#, c-format
+msgid ""
+"\n"
+"%8d inodes used (%d%%)\n"
+msgstr ""
+
+#: e2fsck/unix.c:128
+#, c-format
+msgid "%8d non-contiguous inodes (%0d.%d%%)\n"
+msgstr ""
+
+#: e2fsck/unix.c:130
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %d/%d/%d\n"
+msgstr ""
+
+#: e2fsck/unix.c:132
+#, c-format
+msgid ""
+"%8d blocks used (%d%%)\n"
+"%8d bad blocks\n"
+msgstr ""
+
+#: e2fsck/unix.c:136
+#, c-format
+msgid "%8d large files\n"
+msgstr ""
+
+#: e2fsck/unix.c:137
+#, c-format
+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 ""
+
+#: e2fsck/unix.c:170
+#, c-format
+msgid "%8d large file%s\n"
+msgstr ""
+
+#: e2fsck/unix.c:212 misc/badblocks.c:612 misc/tune2fs.c:665 misc/util.c:110
+#: resize/main.c:96
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr ""
+
+#: e2fsck/unix.c:227
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr ""
+
+#: e2fsck/unix.c:231
+#, c-format
+msgid "%s is mounted. "
+msgstr ""
+
+#: e2fsck/unix.c:233
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:234
+msgid ""
+"\n"
+"\n"
+"WARNING!!! Running e2fsck on a mounted filesystem may cause\n"
+"SEVERE filesystem damage.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:237
+msgid "Do you really want to continue"
+msgstr ""
+
+#: e2fsck/unix.c:239
+msgid "check aborted.\n"
+msgstr ""
+
+#: e2fsck/unix.c:260
+msgid " contains a file system with errors"
+msgstr ""
+
+#: e2fsck/unix.c:262
+msgid " was not cleanly unmounted"
+msgstr ""
+
+#: e2fsck/unix.c:266
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:277
+msgid ", check forced.\n"
+msgstr ""
+
+#: e2fsck/unix.c:280
+#, c-format
+msgid "%s: clean, %d/%d files, %d/%d blocks\n"
+msgstr ""
+
+#: e2fsck/unix.c:411
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr ""
+
+#: e2fsck/unix.c:482
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:486
+msgid "Invalid completion information file descriptor"
+msgstr ""
+
+#: e2fsck/unix.c:510
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr ""
+
+#: e2fsck/unix.c:578
+msgid "Byte-swapping filesystems not compiled in this version of e2fsck\n"
+msgstr ""
+
+#: e2fsck/unix.c:614
+msgid "Incompatible options not allowed when byte-swapping.\n"
+msgstr ""
+
+#: e2fsck/unix.c:687
+msgid "Error: ext2fs library version out of date!\n"
+msgstr ""
+
+#: e2fsck/unix.c:695
+msgid "while trying to initialize program"
+msgstr ""
+
+#: e2fsck/unix.c:709
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:721
+msgid "need terminal for interactive repairs"
+msgstr ""
+
+#: e2fsck/unix.c:755
+#, c-format
+msgid "%s trying backup blocks...\n"
+msgstr ""
+
+#: e2fsck/unix.c:756
+msgid "Couldn't find ext2 superblock,"
+msgstr ""
+
+#: e2fsck/unix.c:757
+msgid "Group descriptors look bad..."
+msgstr ""
+
+#: e2fsck/unix.c:768
+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:774
+msgid "Could this be a zero-length partition?\n"
+msgstr ""
+
+#: e2fsck/unix.c:776
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr ""
+
+#: e2fsck/unix.c:781
+msgid "Possibly non-existent or swap device?\n"
+msgstr ""
+
+#: e2fsck/unix.c:784
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+
+#: e2fsck/unix.c:800
+msgid "Get a newer version of e2fsck!"
+msgstr ""
+
+#: e2fsck/unix.c:826
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr ""
+
+#: e2fsck/unix.c:838
+msgid ""
+"Warning: skipping journal recovery because doing a read-only filesystem "
+"check.\n"
+msgstr ""
+
+#: e2fsck/unix.c:846
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr ""
+
+#: e2fsck/unix.c:874
+msgid "Warning: compression support is experimental.\n"
+msgstr ""
+
+#: e2fsck/unix.c:910
+#, c-format
+msgid "%s: Filesystem byte order already normalized.\n"
+msgstr ""
+
+#: e2fsck/unix.c:930
+msgid "while reading bad blocks inode"
+msgstr ""
+
+#: e2fsck/unix.c:932
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr ""
+
+#: e2fsck/unix.c:939
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr ""
+
+#: e2fsck/unix.c:943
+msgid "while resetting context"
+msgstr ""
+
+#: e2fsck/unix.c:960
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+
+#: e2fsck/unix.c:963
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr ""
+
+#: e2fsck/unix.c:971
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:76 misc/util.c:51
+msgid "yY"
+msgstr ""
+
+#: e2fsck/util.c:77
+msgid "nN"
+msgstr ""
+
+#: e2fsck/util.c:91
+msgid "<y>"
+msgstr ""
+
+#: e2fsck/util.c:93
+msgid "<n>"
+msgstr ""
+
+#: e2fsck/util.c:95
+msgid " (y/n)"
+msgstr ""
+
+#: e2fsck/util.c:125
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:129
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:133
+msgid "yes"
+msgstr ""
+
+#: e2fsck/util.c:133
+msgid "no"
+msgstr ""
+
+#: e2fsck/util.c:146
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr ""
+
+#: e2fsck/util.c:151
+msgid "reading inode and block bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:156
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:168
+msgid "writing block bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:173
+#, c-format
+msgid "while retrying to write block bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:180
+msgid "writing inode bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:185
+#, c-format
+msgid "while retrying to write inode bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:198
+#, 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:263
+#, c-format
+msgid "Memory used: %dk/%dk (%dk/%dk), "
+msgstr ""
+
+#: e2fsck/util.c:267
+#, c-format
+msgid "Memory used: %d, "
+msgstr ""
+
+#: e2fsck/util.c:273
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr ""
+
+#: e2fsck/util.c:278
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr ""
+
+#: e2fsck/util.c:292
+#, c-format
+msgid "while reading inode %ld in %s"
+msgstr ""
+
+#: e2fsck/util.c:305
+#, c-format
+msgid "while writing inode %ld in %s"
+msgstr ""
+
+#: misc/badblocks.c:57
+msgid "done \n"
+msgstr ""
+
+#: misc/badblocks.c:67
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnf]\n"
+" [-c blocks_at_once] [-p num_passes] device [last_block [start_count]]\n"
+msgstr ""
+
+#: misc/badblocks.c:171 misc/badblocks.c:198
+msgid "during seek"
+msgstr ""
+
+#: misc/badblocks.c:178
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr ""
+
+#: misc/badblocks.c:219
+msgid "during ext2fs_sync_device"
+msgstr ""
+
+#: misc/badblocks.c:235 misc/badblocks.c:411
+msgid "while beginning bad block list iteration"
+msgstr ""
+
+#: misc/badblocks.c:245 misc/badblocks.c:314 misc/badblocks.c:421
+msgid "while allocating buffers"
+msgstr ""
+
+#: misc/badblocks.c:250
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr ""
+
+#: misc/badblocks.c:251 misc/badblocks.c:323 misc/badblocks.c:440
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr ""
+
+#: misc/badblocks.c:259
+msgid "Checking for bad blocks (read-only test): "
+msgstr ""
+
+#: misc/badblocks.c:322
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:329
+#, c-format
+msgid "Writing pattern 0x%08x: "
+msgstr ""
+
+#: misc/badblocks.c:343 misc/badblocks.c:368
+#, c-format
+msgid "during seek on block %d"
+msgstr ""
+
+#: misc/badblocks.c:355
+msgid "Reading and comparing: "
+msgstr ""
+
+#: misc/badblocks.c:428
+msgid "Initializing random test data\n"
+msgstr ""
+
+#: misc/badblocks.c:439
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:443
+msgid "Checking for bad blocks (non-destructive read-write test): "
+msgstr ""
+
+#: misc/badblocks.c:452
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+
+#: misc/badblocks.c:509
+#, c-format
+msgid "during test data write, block %lu"
+msgstr ""
+
+#: misc/badblocks.c:619 misc/util.c:117
+#, c-format
+msgid "%s is mounted; "
+msgstr ""
+
+#: misc/badblocks.c:621
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/badblocks.c:625
+msgid "it's not safe to run badblocks!\n"
+msgstr ""
+
+#: misc/badblocks.c:667 misc/mke2fs.c:825
+#, c-format
+msgid "bad block size - %s"
+msgstr ""
+
+#: misc/badblocks.c:730
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+
+#: misc/badblocks.c:736
+msgid "while trying to determine device size"
+msgstr ""
+
+#: misc/badblocks.c:742 misc/mke2fs.c:985
+#, c-format
+msgid "bad blocks count - %s"
+msgstr ""
+
+#: misc/badblocks.c:751
+#, c-format
+msgid "bad starting block - %s"
+msgstr ""
+
+#: misc/badblocks.c:757
+#, c-format
+msgid "bad blocks range: %lu-%lu"
+msgstr ""
+
+#: misc/badblocks.c:812
+msgid "creating in-memory bad blocks list"
+msgstr ""
+
+#: misc/badblocks.c:827
+msgid "adding to in-memory bad block list"
+msgstr ""
+
+#: misc/badblocks.c:851
+#, c-format
+msgid "Pass completed, %u bad blocks found.\n"
+msgstr ""
+
+#: misc/chattr.c:81
+#, c-format
+msgid "usage: %s [-RV] [-+=AacdijsSu] [-v version] files...\n"
+msgstr ""
+
+#: misc/chattr.c:139
+#, c-format
+msgid "bad version - %s\n"
+msgstr ""
+
+#: misc/chattr.c:183 misc/lsattr.c:107
+#, c-format
+msgid "while trying to stat %s"
+msgstr ""
+
+#: misc/chattr.c:200 misc/chattr.c:216
+#, c-format
+msgid "Flags of %s set as "
+msgstr ""
+
+#: misc/chattr.c:209
+#, c-format
+msgid "while reading flags on %s"
+msgstr ""
+
+#: misc/chattr.c:222
+#, c-format
+msgid "while setting flags on %s"
+msgstr ""
+
+#: misc/chattr.c:227
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr ""
+
+#: misc/chattr.c:230
+#, c-format
+msgid "while setting version on %s"
+msgstr ""
+
+#: misc/chattr.c:244
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr ""
+
+#: misc/chattr.c:275
+msgid "= is incompatible with - and +\n"
+msgstr ""
+
+#: misc/chattr.c:283
+msgid "Must use '-v', =, - or +\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:52
+#, c-format
+msgid "Usage: %s [-bfhixV] [-ob superblock] [-oB blocksize] device\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:112
+#, c-format
+msgid "Group %lu: (Blocks 0x%04x -- 0x%04x)\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:113
+#, c-format
+msgid "Group %lu: (Blocks %u -- %u)\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:116
+#, c-format
+msgid " %s Superblock at 0x%04x, Group Descriptors at 0x%04x-0x%04x\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:118
+#, c-format
+msgid " %s Superblock at %u, Group Descriptors at %u-%u\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:120
+msgid "Primary"
+msgstr ""
+
+#: misc/dumpe2fs.c:120
+msgid "Backup"
+msgstr ""
+
+#: misc/dumpe2fs.c:123
+#, c-format
+msgid ""
+" Block bitmap at 0x%04x (+%d), Inode bitmap at 0x%04x (+%d)\n"
+" Inode table at 0x%04x-0x%04x (+%d)\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:126
+#, c-format
+msgid ""
+" Block bitmap at %u (+%d), Inode bitmap at %u (+%d)\n"
+" Inode table at %u-%u (+%d)\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:137
+#, c-format
+msgid " %d free blocks, %d free inodes, %d directories\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:141
+msgid " Free blocks: "
+msgstr ""
+
+#: misc/dumpe2fs.c:146
+msgid " Free inodes: "
+msgstr ""
+
+#: misc/dumpe2fs.c:169 misc/dumpe2fs.c:195
+msgid "while printing bad block list"
+msgstr ""
+
+#: misc/dumpe2fs.c:173
+#, c-format
+msgid "Bad blocks: %d"
+msgstr ""
+
+#: misc/dumpe2fs.c:214 misc/tune2fs.c:136
+msgid "while reading journal superblock"
+msgstr ""
+
+#: misc/dumpe2fs.c:222
+msgid "Couldn't find journal superblock magic numbers"
+msgstr ""
+
+#. Print version number and exit
+#: misc/dumpe2fs.c:292 misc/mke2fs.c:971
+#, c-format
+msgid "\tUsing %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:318 misc/e2image.c:435 misc/tune2fs.c:652 resize/main.c:198
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:329
+msgid "Note: This is a byte-swapped filesystem\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:345
+msgid "while trying to read the bitmaps"
+msgstr ""
+
+#: misc/e2label.c:57
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr ""
+
+#: misc/e2label.c:62
+msgid "e2label: cannot seek to superblock\n"
+msgstr ""
+
+#: misc/e2label.c:67
+msgid "e2label: error reading superblock\n"
+msgstr ""
+
+#: misc/e2label.c:71
+msgid "e2label: not an ext2 filesystem\n"
+msgstr ""
+
+#: misc/e2label.c:96 misc/tune2fs.c:753
+msgid "Warning: label too long, truncating.\n"
+msgstr ""
+
+#: misc/e2label.c:99
+msgid "e2label: cannot seek to superblock again\n"
+msgstr ""
+
+#: misc/e2label.c:104
+msgid "e2label: error writing superblock\n"
+msgstr ""
+
+#: misc/e2label.c:116 misc/tune2fs.c:411
+msgid "Usage: e2label device [newlabel]\n"
+msgstr ""
+
+#: misc/e2image.c:50
+#, c-format
+msgid "Usage: %s [-r] device file\n"
+msgstr ""
+
+#: misc/e2image.c:61
+msgid "Couldn't allocate header buffer\n"
+msgstr ""
+
+#: misc/e2image.c:80
+#, c-format
+msgid "short write (only %d bytes) forwriting image header"
+msgstr ""
+
+#: misc/e2image.c:99
+msgid "while writing superblock"
+msgstr ""
+
+#: misc/e2image.c:107
+msgid "while writing inode table"
+msgstr ""
+
+#: misc/e2image.c:114
+msgid "while writing block bitmap"
+msgstr ""
+
+#: misc/e2image.c:121
+msgid "while writing inode bitmap"
+msgstr ""
+
+#: misc/findsuper.c:117
+msgid "Usage: findsuper device [skiprate [start]]\n"
+msgstr ""
+
+#: misc/findsuper.c:124
+msgid "Do you really want to skip less than a sector??\n"
+msgstr ""
+
+#: misc/findsuper.c:130
+#, c-format
+msgid "Have to start at 0 or greater,not %ld\n"
+msgstr ""
+
+#: misc/findsuper.c:143
+msgid "read failed"
+msgstr ""
+
+#: misc/findsuper.c:156
+#, c-format
+msgid "Failed on %d at %ld\n"
+msgstr ""
+
+#: misc/fsck.c:251
+#, c-format
+msgid "Could not determine filesystem type for %s\n"
+msgstr ""
+
+#: misc/fsck.c:271
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr ""
+
+#: misc/fsck.c:281
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr ""
+
+#: misc/fsck.c:301
+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:415
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr ""
+
+#: misc/fsck.c:498
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr ""
+
+#: misc/fsck.c:520
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr ""
+
+#: misc/fsck.c:526
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr ""
+
+#: misc/fsck.c:615
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr ""
+
+#: misc/fsck.c:635
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+
+#: misc/fsck.c:654
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr ""
+
+#: misc/fsck.c:794
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr ""
+
+#: misc/fsck.c:851
+msgid "Checking all file systems.\n"
+msgstr ""
+
+#: misc/fsck.c:921
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr ""
+
+#: misc/fsck.c:942
+msgid "Usage: fsck [-ACNPRTV] [-t fstype] [fs-options] filesys\n"
+msgstr ""
+
+#: misc/fsck.c:968
+#, c-format
+msgid "%s: too many devices\n"
+msgstr ""
+
+#: misc/fsck.c:978 misc/fsck.c:1049
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr ""
+
+#: misc/fsck.c:1103
+msgid ""
+"\n"
+"No devices specified to be checked!\n"
+msgstr ""
+
+#: misc/get_device_by_label.c:265
+#, c-format
+msgid "WARNING: %s: bad UUID"
+msgstr ""
+
+#: misc/lsattr.c:67
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr ""
+
+#: misc/lsattr.c:77
+#, c-format
+msgid "While reading flags on %s"
+msgstr ""
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading version on %s"
+msgstr ""
+
+#: misc/mke2fs.c:89
+#, c-format
+msgid ""
+"Usage: %s [-c|-t|-l filename] [-b block-size] [-f fragment-size]\n"
+"\t[-i bytes-per-inode] [-j] [-J journal-options] [-N number-of-inodes]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os] [-g blocks-per-group]\n"
+"\t[-L volume-label] [-M last-mounted-directory] [-O feature[,...]]\n"
+"\t[-r fs-revision] [-R raid_opts] [-qvSV] device [blocks-count]\n"
+msgstr ""
+
+#: misc/mke2fs.c:222
+#, c-format
+msgid "Running command: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:226
+#, c-format
+msgid "while trying run '%s'"
+msgstr ""
+
+#: misc/mke2fs.c:233
+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 %d through %d 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 %d contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:302
+msgid "while marking bad blocks as used"
+msgstr ""
+
+#: misc/mke2fs.c:355
+msgid "done \n"
+msgstr ""
+
+#: misc/mke2fs.c:390
+msgid "while allocating zeroizing buffer"
+msgstr ""
+
+#: misc/mke2fs.c:431
+msgid "Writing inode tables: "
+msgstr ""
+
+#: misc/mke2fs.c:442
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %d: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:465
+msgid "while creating root dir"
+msgstr ""
+
+#: misc/mke2fs.c:472
+msgid "while reading root inode"
+msgstr ""
+
+#: misc/mke2fs.c:481
+msgid "while setting root inode ownership"
+msgstr ""
+
+#: misc/mke2fs.c:498
+msgid "while creating /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:505
+msgid "while looking up /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:515
+msgid "while expanding /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:531
+msgid "while setting bad block inode"
+msgstr ""
+
+#: misc/mke2fs.c:564
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:580
+msgid "while initializing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:586
+msgid "Zeroing journal device: "
+msgstr ""
+
+#: misc/mke2fs.c:593
+#, c-format
+msgid "while zeroing journal device (block %u, count %d)"
+msgstr ""
+
+#: misc/mke2fs.c:604
+msgid "while writing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:618
+#, c-format
+msgid ""
+"warning: %d blocks unused.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:623
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr ""
+
+#: misc/mke2fs.c:624
+msgid "OS type: "
+msgstr ""
+
+#: misc/mke2fs.c:629
+msgid "(unknown os)"
+msgstr ""
+
+#: misc/mke2fs.c:632
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:634
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:636
+#, c-format
+msgid "%u inodes, %u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:638
+#, c-format
+msgid "%u blocks (%2.2f%%) reserved for the super user\n"
+msgstr ""
+
+#: misc/mke2fs.c:641
+#, c-format
+msgid "First data block=%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:643
+#, c-format
+msgid "%u block groups\n"
+msgstr ""
+
+#: misc/mke2fs.c:645
+#, c-format
+msgid "%u block group\n"
+msgstr ""
+
+#: misc/mke2fs.c:646
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:648
+#, c-format
+msgid "%u inodes per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:655
+msgid "Superblock backups stored on blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:705
+msgid "Couldn't allocate memory to parse raid options!\n"
+msgstr ""
+
+#: misc/mke2fs.c:730
+msgid "Invalid stride parameter.\n"
+msgstr ""
+
+#: misc/mke2fs.c:738
+msgid ""
+"\n"
+"Bad raid options specified.\n"
+"\n"
+"Raid options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid raid options are:\n"
+"\tstride=<stride length in blocks>\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:840
+#, c-format
+msgid "bad fragment size - %s"
+msgstr ""
+
+#: misc/mke2fs.c:846
+msgid "Warning: fragments not supported. Ignoring -f option\n"
+msgstr ""
+
+#: misc/mke2fs.c:853
+msgid "Illegal number for blocks per group"
+msgstr ""
+
+#: misc/mke2fs.c:858
+msgid "blocks per group must be multiple of 8"
+msgstr ""
+
+#: misc/mke2fs.c:867
+#, c-format
+msgid "bad inode ratio - %s"
+msgstr ""
+
+#: misc/mke2fs.c:884
+msgid "in malloc for bad_blocks_filename"
+msgstr ""
+
+#: misc/mke2fs.c:893
+#, c-format
+msgid "bad reserved blocks percent - %s"
+msgstr ""
+
+#: misc/mke2fs.c:956 misc/tune2fs.c:265
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1009 misc/mke2fs.c:1270
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1034
+msgid "filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:1047 resize/main.c:221
+msgid "while trying to determine filesystem size"
+msgstr ""
+
+#: misc/mke2fs.c:1053
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+
+#: misc/mke2fs.c:1060
+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:1075
+msgid "Filesystem larger than apparent filesystem size."
+msgstr ""
+
+#: misc/mke2fs.c:1093
+msgid "blocks per group count out of range"
+msgstr ""
+
+#: misc/mke2fs.c:1133
+msgid "while setting up superblock"
+msgstr ""
+
+#: misc/mke2fs.c:1161
+#, c-format
+msgid "unknown os - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1216
+msgid "while trying to allocate filesystem tables"
+msgstr ""
+
+#: misc/mke2fs.c:1247
+#, c-format
+msgid "zeroing block %u at end of filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:1263 misc/tune2fs.c:340
+msgid "journal"
+msgstr ""
+
+#: misc/mke2fs.c:1275
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr ""
+
+#: misc/mke2fs.c:1282
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+
+#: misc/mke2fs.c:1287 misc/mke2fs.c:1311 misc/tune2fs.c:362 misc/tune2fs.c:376
+msgid "done\n"
+msgstr ""
+
+#: misc/mke2fs.c:1299
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr ""
+
+#: misc/mke2fs.c:1307
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+
+#: misc/mke2fs.c:1316
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+
+#: misc/mke2fs.c:1320
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+
+#: misc/mke2fs.c:1323
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+
+#: misc/mklost+found.c:47
+msgid "Usage: mklost+found\n"
+msgstr ""
+
+#: misc/partinfo.c:21
+#, c-format
+msgid "%s failed for %s: %s\n"
+msgstr ""
+
+#: misc/partinfo.c:37
+#, c-format
+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 ""
+
+#: misc/partinfo.c:54
+msgid "HDIO_GETGEO ioctl"
+msgstr ""
+
+#: misc/partinfo.c:61
+msgid "BLKGETSIZE ioctl"
+msgstr ""
+
+#: misc/tune2fs.c:72
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:77
+#, 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]\n"
+"\t[-l] [-s sparse-flag] [-m reserved-blocks-percent]\n"
+"\t[-r reserved-blocks-count] [-u user] [-C mount-count]\n"
+"\t[-L volume-label] [-M last-mounted-dir] [-U UUID]\n"
+"\t[-O [^]feature[,...]] device\n"
+msgstr ""
+
+#: misc/tune2fs.c:124
+msgid "while trying to open external journal"
+msgstr ""
+
+#: misc/tune2fs.c:128
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:143
+msgid "Journal superblock not found!\n"
+msgstr ""
+
+#: misc/tune2fs.c:156
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:176
+msgid "Journal NOT removed\n"
+msgstr ""
+
+#: misc/tune2fs.c:183
+msgid "Journal removed\n"
+msgstr ""
+
+#: misc/tune2fs.c:214
+msgid "while reading journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:221
+msgid "while reading bitmaps"
+msgstr ""
+
+#: misc/tune2fs.c:228
+msgid "while clearing journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:239
+msgid "while writing journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:279
+msgid ""
+"The has_journal flag may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:288
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+
+#: misc/tune2fs.c:335
+msgid "The filesystem already has a journal.\n"
+msgstr ""
+
+#: misc/tune2fs.c:346
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:350
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr ""
+
+#: misc/tune2fs.c:358
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr ""
+
+#: misc/tune2fs.c:364
+msgid "Creating journal inode: "
+msgstr ""
+
+#: misc/tune2fs.c:373
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+
+#: misc/tune2fs.c:439 misc/tune2fs.c:452
+#, c-format
+msgid "bad mounts count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:468
+#, c-format
+msgid "bad error behavior - %s"
+msgstr ""
+
+#: misc/tune2fs.c:491
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:524
+#, c-format
+msgid "bad interval - %s"
+msgstr ""
+
+#: misc/tune2fs.c:552
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr ""
+
+#: misc/tune2fs.c:567
+msgid "-O may only be specified once"
+msgstr ""
+
+#: misc/tune2fs.c:577
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:601
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:675
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:681
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:686
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:691
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:696
+#, c-format
+msgid "Setting interval between check %lu seconds\n"
+msgstr ""
+
+#: misc/tune2fs.c:702
+#, c-format
+msgid "Setting reserved blocks percentage to %lu (%u blocks)\n"
+msgstr ""
+
+#: misc/tune2fs.c:708
+#, c-format
+msgid "reserved blocks count is too big (%ul)"
+msgstr ""
+
+#: misc/tune2fs.c:714
+#, c-format
+msgid "Setting reserved blocks count to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:720
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+
+#: misc/tune2fs.c:727
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+
+#: misc/tune2fs.c:734
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks disabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:742
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag cleared. %s"
+msgstr ""
+
+#: misc/tune2fs.c:749
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:780
+msgid "Invalid UUID format\n"
+msgstr ""
+
+#: misc/uuidgen.c:30
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr ""
+
+#: misc/util.c:55
+msgid "Proceed anyway? (y,n) "
+msgstr ""
+
+#: misc/util.c:70
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr ""
+
+#: misc/util.c:73
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+
+#: misc/util.c:78
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr ""
+
+#: misc/util.c:95
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr ""
+
+#: misc/util.c:119
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/util.c:122
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr ""
+
+#: misc/util.c:136
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr ""
+
+#: misc/util.c:178
+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 raid options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\n"
+"The journal size must be between 1024 and 102400 filesystem blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/util.c:205
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+
+#: misc/util.c:213
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 102400 blocks. Aborting.\n"
+msgstr ""
+
+#: misc/util.c:221
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+
+#: misc/util.c:240
+#, 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 ""
+
+#: resize/main.c:31
+#, c-format
+msgid ""
+"usage: %s [-d debug_flags] [-f] [-F] [-p] device [new-size]\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:52
+msgid "Extending the inode table"
+msgstr ""
+
+#: resize/main.c:55
+msgid "Relocating blocks"
+msgstr ""
+
+#: resize/main.c:58
+msgid "Scanning inode table"
+msgstr ""
+
+#: resize/main.c:61
+msgid "Updating inode references"
+msgstr ""
+
+#: resize/main.c:64
+msgid "Moving inode table"
+msgstr ""
+
+#: resize/main.c:67
+msgid "Unknown pass?!?"
+msgstr ""
+
+#: resize/main.c:70
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr ""
+
+#: resize/main.c:95
+msgid "ext2fs_check_if_mount"
+msgstr ""
+
+#: resize/main.c:103
+#, c-format
+msgid ""
+"%s is mounted; can't resize a mounted filesystem!\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:125
+#, c-format
+msgid "resize2fs %s (%s)\n"
+msgstr ""
+
+#: resize/main.c:158
+#, c-format
+msgid "bad filesystem size - %s"
+msgstr ""
+
+#: resize/main.c:227
+#, c-format
+msgid ""
+"The containing partition (or device) is only %d blocks.\n"
+"You requested a new size of %d blocks.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:234
+#, c-format
+msgid ""
+"The filesystem is already %d blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:239
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:247
+#, c-format
+msgid "while trying to resize %s"
+msgstr ""
+
+#: resize/main.c:251
+#, c-format
+msgid ""
+"The filesystem on %s is now %d blocks long.\n"
+"\n"
+msgstr ""
+
+#: resize/resize2fs.c:108
+#, c-format
+msgid "Number of free blocks: %d/%d, Needed: %d\n"
+msgstr ""
+
+#: resize/resize2fs.c:426
+msgid "meta-data blocks"
+msgstr ""
+
+#: resize/resize2fs.c:489
+msgid "reserved blocks"
+msgstr ""
+
+#: resize/resize2fs.c:494
+msgid "blocks to be moved"
+msgstr ""
+
+#: resize/resize2fs.c:725
+msgid "Going into desperation mode for block allocations\n"
+msgstr ""
+
+#: resize/resize2fs.c:814
+#, c-format
+msgid "Moving %d blocks %u->%u\n"
+msgstr ""
+
+#: resize/resize2fs.c:884
+#, c-format
+msgid "ino=%ld, blockcnt=%ld, %u->%u\n"
+msgstr ""
+
+#: resize/resize2fs.c:1040
+#, c-format
+msgid "Inode moved %ld->%ld\n"
+msgstr ""
+
+#: resize/resize2fs.c:1103
+#, c-format
+msgid "Inode translate (dir=%ld, name=%.*s, %u->%ld)\n"
+msgstr ""
+
+#: resize/resize2fs.c:1222
+#, c-format
+msgid "Itable move group %d block %u->%u (diff %d)\n"
+msgstr ""
+
+#: resize/resize2fs.c:1248
+#, c-format
+msgid "%d blocks of zeros...\n"
+msgstr ""
+
+#: resize/resize2fs.c:1283
+msgid "Inode table move finished.\n"
+msgstr ""
+
+#: resize/extent.c:197
+msgid "# Extent dump:\n"
+msgstr ""
+
+#: resize/extent.c:198
+#, c-format
+msgid "#\tNum=%d, Size=%d, Cursor=%d, Sorted=%d\n"
+msgstr ""
+
+#: resize/extent.c:201
+#, c-format
+msgid "#\t\t %u -> %u (%d)\n"
+msgstr ""
Added: trunk/yaboot/lib/e2fsprogs-1.27/po/nyc.po
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/po/nyc.po 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/po/nyc.po 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,3382 @@
+# New York City (dummy test) translation for e2fsprogs
+#
+# This is a joke, son!
+#
+# Copyright (C) 2000 Theodore Ts'o
+# Theodore Ts'o <tytso at alum.mit.edu>, 2000.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.18\n"
+"POT-Creation-Date: 2001-10-08 11:47-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING\n"
+
+#: e2fsck/badblocks.c:22 misc/mke2fs.c:181
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr ""
+
+#: e2fsck/badblocks.c:45
+msgid "while sanity checking the bad blocks inode"
+msgstr ""
+
+#: e2fsck/badblocks.c:57
+msgid "while reading the bad blocks inode"
+msgstr ""
+
+#: e2fsck/badblocks.c:71 e2fsck/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:765 e2fsck/unix.c:797 misc/badblocks.c:767
+#: misc/badblocks.c:776 misc/badblocks.c:790 misc/badblocks.c:801
+#: misc/dumpe2fs.c:316 misc/e2image.c:433 misc/e2image.c:449 misc/mke2fs.c:197
+#: misc/tune2fs.c:649 resize/main.c:196
+#, c-format
+msgid "while trying to open %s"
+msgstr ""
+
+#: e2fsck/badblocks.c:81
+#, c-format
+msgid "while trying popen '%s'"
+msgstr ""
+
+#: e2fsck/badblocks.c:92 misc/mke2fs.c:204
+msgid "while reading in list of bad blocks from file"
+msgstr ""
+
+#: e2fsck/badblocks.c:102
+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:53
+#, c-format
+msgid "Error reading block %lu (%s) while %s. "
+msgstr ""
+
+#: e2fsck/ehandler.c:56
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr ""
+
+#: e2fsck/ehandler.c:59 e2fsck/ehandler.c:103
+msgid "Ignore error"
+msgstr ""
+
+#: e2fsck/ehandler.c:97
+#, c-format
+msgid "Error writing block %lu (%s) while %s. "
+msgstr ""
+
+#: e2fsck/ehandler.c:100
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr ""
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr ""
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr ""
+
+#. Inode number 11 is usually lost+found
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %d (#%d) in inode %d\n"
+msgstr ""
+
+#: e2fsck/extend.c:21
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr ""
+
+#: e2fsck/extend.c:43
+msgid "Illegal number of blocks!\n"
+msgstr ""
+
+#: e2fsck/extend.c:49
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr ""
+
+#: e2fsck/flushb.c:44
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: %s disk\n"
+
+#: e2fsck/flushb.c:73
+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 ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: %s [-F] [-I inode_buffer_blocks] device\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:599 resize/main.c:173
+#, c-format
+msgid "while opening %s for flushing"
+msgstr ""
+
+#: e2fsck/iscan.c:86 e2fsck/unix.c:605 resize/main.c:180
+#, c-format
+msgid "while trying to flush %s"
+msgstr ""
+
+#: e2fsck/iscan.c:119 e2fsck/scantest.c:114 misc/e2image.c:340
+msgid "while opening inode scan"
+msgstr ""
+
+#: e2fsck/iscan.c:127 misc/e2image.c:355
+msgid "while getting next inode"
+msgstr ""
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%d inodes scanned.\n"
+msgstr ""
+
+#: e2fsck/journal.c:47
+#, c-format
+msgid "bmap journal inode %ld, block %d\n"
+msgstr ""
+
+#: e2fsck/journal.c:384
+msgid "reading journal superblock\n"
+msgstr ""
+
+#: e2fsck/journal.c:441
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr ""
+
+#: e2fsck/journal.c:450
+#, c-format
+msgid "%s: journal too short\n"
+msgstr ""
+
+#: e2fsck/journal.c:702
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr ""
+
+#: e2fsck/journal.c:704
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr ""
+
+#: e2fsck/journal.c:725
+#, c-format
+msgid "while trying to re-open %s"
+msgstr ""
+
+#: e2fsck/message.c:103
+msgid "aextended attribute"
+msgstr ""
+
+#: e2fsck/message.c:104
+msgid "Aerror allocating"
+msgstr ""
+
+#: e2fsck/message.c:105
+msgid "bblock"
+msgstr ""
+
+#: e2fsck/message.c:106
+msgid "Bbitmap"
+msgstr ""
+
+#: e2fsck/message.c:107
+msgid "ccompress"
+msgstr ""
+
+#: e2fsck/message.c:108
+msgid "Cconflicts with some other fs @b"
+msgstr ""
+
+#: e2fsck/message.c:109
+msgid "iinode"
+msgstr ""
+
+#: e2fsck/message.c:110
+msgid "Iillegal"
+msgstr ""
+
+#: e2fsck/message.c:111
+msgid "jjournal"
+msgstr ""
+
+#: e2fsck/message.c:112
+msgid "Ddeleted"
+msgstr ""
+
+#: e2fsck/message.c:113
+msgid "ddirectory"
+msgstr ""
+
+#: e2fsck/message.c:114
+msgid "eentry"
+msgstr ""
+
+#: e2fsck/message.c:115
+msgid "E at e '%Dn' in %p (%i)"
+msgstr ""
+
+#: e2fsck/message.c:116
+msgid "ffilesystem"
+msgstr ""
+
+#: e2fsck/message.c:117
+msgid "Ffor @i %i (%Q) is"
+msgstr ""
+
+#: e2fsck/message.c:118
+msgid "ggroup"
+msgstr ""
+
+#: e2fsck/message.c:119
+#, fuzzy
+msgid "llost+found"
+msgstr ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: mklost+found\n"
+
+#: e2fsck/message.c:120
+msgid "Lis a link"
+msgstr ""
+
+#: e2fsck/message.c:121
+msgid "oorphaned"
+msgstr ""
+
+#: e2fsck/message.c:122
+msgid "rroot @i"
+msgstr ""
+
+#: e2fsck/message.c:123
+msgid "sshould be"
+msgstr ""
+
+#: e2fsck/message.c:124
+msgid "Ssuper at b"
+msgstr ""
+
+#: e2fsck/message.c:125
+msgid "uunattached"
+msgstr ""
+
+#: e2fsck/message.c:126
+msgid "vdevice"
+msgstr ""
+
+#: e2fsck/message.c:127
+msgid "zzero-length"
+msgstr ""
+
+#: e2fsck/message.c:138
+msgid "<The NULL inode>"
+msgstr ""
+
+#. 0
+#: e2fsck/message.c:139
+msgid "<The bad blocks inode>"
+msgstr ""
+
+#. 1
+#. 2
+#: e2fsck/message.c:141
+msgid "<The ACL index inode>"
+msgstr ""
+
+#. 3
+#: e2fsck/message.c:142
+msgid "<The ACL data inode>"
+msgstr ""
+
+#. 4
+#: e2fsck/message.c:143
+msgid "<The boot loader inode>"
+msgstr ""
+
+#. 5
+#: e2fsck/message.c:144
+msgid "<The undelete directory inode>"
+msgstr ""
+
+#. 6
+#: e2fsck/message.c:145
+msgid "<The group descriptor inode>"
+msgstr ""
+
+#. 7
+#: e2fsck/message.c:146
+msgid "<The journal inode>"
+msgstr ""
+
+#. 8
+#: e2fsck/message.c:147
+msgid "<Reserved inode 9>"
+msgstr ""
+
+#. 9
+#: e2fsck/message.c:148
+msgid "<Reserved inode 10>"
+msgstr ""
+
+#: e2fsck/pass1b.c:127
+msgid "multiply claimed inode map"
+msgstr ""
+
+#: e2fsck/pass1b.c:539 e2fsck/pass1b.c:650
+#, c-format
+msgid "internal error; can't find dup_blk for %d\n"
+msgstr ""
+
+#: e2fsck/pass1b.c:687
+msgid "returned from clone_file_block"
+msgstr ""
+
+#.
+#. * Allocate bitmaps structures
+#.
+#: e2fsck/pass1.c:290
+msgid "in-use inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:299
+msgid "directory inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:307
+msgid "regular file inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:314
+msgid "in-use block map"
+msgstr ""
+
+#: e2fsck/pass1.c:361
+msgid "doing inode scan"
+msgstr ""
+
+#: e2fsck/pass1.c:737
+msgid "Pass 1"
+msgstr ""
+
+#: e2fsck/pass1.c:795
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr ""
+
+#: e2fsck/pass1.c:837
+msgid "bad inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:859
+msgid "inode in bad block map"
+msgstr ""
+
+#: e2fsck/pass1.c:879
+msgid "imagic inode map"
+msgstr ""
+
+#: e2fsck/pass1.c:906
+msgid "multiply claimed block map"
+msgstr ""
+
+#: e2fsck/pass1.c:1006
+msgid "ext attr block map"
+msgstr ""
+
+#: e2fsck/pass1.c:1673
+msgid "block bitmap"
+msgstr ""
+
+#: e2fsck/pass1.c:1677
+msgid "inode bitmap"
+msgstr ""
+
+#: e2fsck/pass1.c:1681
+msgid "inode table"
+msgstr ""
+
+#.
+#. * Allocate some bitmaps to do loop detection.
+#.
+#: e2fsck/pass3.c:85
+msgid "inode done bitmap"
+msgstr ""
+
+#: e2fsck/pass3.c:96
+msgid "Peak memory"
+msgstr ""
+
+#: e2fsck/pass3.c:141
+msgid "Pass 3"
+msgstr ""
+
+#: e2fsck/pass3.c:331
+msgid "inode loop detection bitmap"
+msgstr ""
+
+#. Should never happen
+#: e2fsck/pass3.c:584
+msgid "Debug error in e2fsck adjust_inode_count, should never happen.\n"
+msgstr ""
+
+#: e2fsck/pass4.c:163
+msgid "Pass 4"
+msgstr ""
+
+#: e2fsck/pass5.c:70
+msgid "Pass 5"
+msgstr ""
+
+#: e2fsck/problem.c:47
+msgid "(no prompt)"
+msgstr ""
+
+#. 0
+#: e2fsck/problem.c:48
+msgid "Fix"
+msgstr ""
+
+#. 1
+#: e2fsck/problem.c:49
+msgid "Clear"
+msgstr ""
+
+#. 2
+#: e2fsck/problem.c:50
+msgid "Relocate"
+msgstr ""
+
+#. 3
+#: e2fsck/problem.c:51
+msgid "Allocate"
+msgstr ""
+
+#. 4
+#: e2fsck/problem.c:52
+msgid "Expand"
+msgstr ""
+
+#. 5
+#: e2fsck/problem.c:53
+msgid "Connect to /lost+found"
+msgstr ""
+
+#. 6
+#: e2fsck/problem.c:54
+msgid "Create"
+msgstr ""
+
+#. 7
+#: e2fsck/problem.c:55
+msgid "Salvage"
+msgstr ""
+
+#. 8
+#: e2fsck/problem.c:56
+msgid "Truncate"
+msgstr ""
+
+#. 9
+#: e2fsck/problem.c:57
+msgid "Clear inode"
+msgstr ""
+
+#. 10
+#: e2fsck/problem.c:58
+msgid "Abort"
+msgstr ""
+
+#. 11
+#: e2fsck/problem.c:59
+msgid "Split"
+msgstr ""
+
+#. 12
+#: e2fsck/problem.c:60
+msgid "Continue"
+msgstr ""
+
+#. 13
+#: e2fsck/problem.c:61
+msgid "Clone duplicate/bad blocks"
+msgstr ""
+
+#. 14
+#: e2fsck/problem.c:62
+msgid "Delete file"
+msgstr ""
+
+#. 15
+#: e2fsck/problem.c:63
+msgid "Suppress messages"
+msgstr ""
+
+#. 16
+#: e2fsck/problem.c:64
+msgid "Unlink"
+msgstr ""
+
+#: e2fsck/problem.c:72
+msgid "(NONE)"
+msgstr ""
+
+#. 0
+#: e2fsck/problem.c:73
+msgid "FIXED"
+msgstr ""
+
+#. 1
+#: e2fsck/problem.c:74
+msgid "CLEARED"
+msgstr ""
+
+#. 2
+#: e2fsck/problem.c:75
+msgid "RELOCATED"
+msgstr ""
+
+#. 3
+#: e2fsck/problem.c:76
+msgid "ALLOCATED"
+msgstr ""
+
+#. 4
+#: e2fsck/problem.c:77
+msgid "EXPANDED"
+msgstr ""
+
+#. 5
+#: e2fsck/problem.c:78
+msgid "RECONNECTED"
+msgstr ""
+
+#. 6
+#: e2fsck/problem.c:79
+msgid "CREATED"
+msgstr ""
+
+#. 7
+#: e2fsck/problem.c:80
+msgid "SALVAGED"
+msgstr ""
+
+#. 8
+#: e2fsck/problem.c:81
+msgid "TRUNCATED"
+msgstr ""
+
+#. 9
+#: e2fsck/problem.c:82
+msgid "INODE CLEARED"
+msgstr ""
+
+#. 10
+#: e2fsck/problem.c:83
+msgid "ABORTED"
+msgstr ""
+
+#. 11
+#: e2fsck/problem.c:84
+msgid "SPLIT"
+msgstr ""
+
+#. 12
+#: e2fsck/problem.c:85
+msgid "CONTINUING"
+msgstr ""
+
+#. 13
+#: e2fsck/problem.c:86
+msgid "DUPLICATE/BAD BLOCKS CLONED"
+msgstr ""
+
+#. 14
+#: e2fsck/problem.c:87
+msgid "FILE DELETED"
+msgstr ""
+
+#. 15
+#: e2fsck/problem.c:88
+msgid "SUPPRESSED"
+msgstr ""
+
+#. 16
+#: e2fsck/problem.c:89
+msgid "UNLINKED"
+msgstr ""
+
+#. Pre-Pass 1 errors
+#. Block bitmap not in group
+#: e2fsck/problem.c:97
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr ""
+
+#. Inode bitmap not in group
+#: e2fsck/problem.c:101
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr ""
+
+#: e2fsck/problem.c:106
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+
+#: e2fsck/problem.c:112
+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:121
+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:128
+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:135
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr ""
+
+#: e2fsck/problem.c:140
+msgid "@S first_data_ at b = %b, should have been %c\n"
+msgstr ""
+
+#: e2fsck/problem.c:145
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:150
+msgid ""
+"Note: if there is several inode or block bitmap blocks\n"
+"which require relocation, or one part of the inode table\n"
+"which must be moved, you may wish to try running e2fsck\n"
+"with the '-b %S' option first. The problem may lie only\n"
+"with the primary block group descriptor, and the backup\n"
+"block group descriptor may be OK.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:160
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr ""
+
+#: e2fsck/problem.c:165
+#, c-format
+msgid "Error determining size of the physical @v: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:170
+msgid "@i count in @S is %i, should be %j.\n"
+msgstr ""
+
+#: e2fsck/problem.c:174
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr ""
+
+#: e2fsck/problem.c:179
+#, c-format
+msgid "@S has a bad ext3 @j (@i %i).\n"
+msgstr ""
+
+#: e2fsck/problem.c:184
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr ""
+
+#: e2fsck/problem.c:189
+msgid "Can't find external @j\n"
+msgstr ""
+
+#: e2fsck/problem.c:194
+msgid "External @j has bad @S\n"
+msgstr ""
+
+#: e2fsck/problem.c:199
+msgid "External @j does not support this @f\n"
+msgstr ""
+
+#: e2fsck/problem.c:204
+msgid ""
+"Ext3 @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:212
+msgid "Ext3 @j @S is corrupt.\n"
+msgstr ""
+
+#: e2fsck/problem.c:217
+#, c-format
+msgid "@S doesn't have has_journal flag, but has ext3 @j %s.\n"
+msgstr ""
+
+#: e2fsck/problem.c:222
+msgid "@S has ext3 needs_recovery flag set, but no @j.\n"
+msgstr ""
+
+#: e2fsck/problem.c:227
+msgid "*** WARNING *** leaving data in the @j may be DANGEROUS.\n"
+msgstr ""
+
+#: e2fsck/problem.c:232
+msgid "ext3 recovery flag clear, but journal has data.\n"
+msgstr ""
+
+#: e2fsck/problem.c:237
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr ""
+
+#: e2fsck/problem.c:242
+msgid "@I @b #%B (%b) found in @o @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:247
+msgid "Already cleared @b #%B (%b) found in @o @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:252
+#, c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr ""
+
+#: e2fsck/problem.c:257
+#, c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr ""
+
+#: e2fsck/problem.c:267
+msgid "Ext3 @j @S has an unknown read-only feature flag set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:272
+msgid "Ext3 @j @S has an unknown incompatible feature flag set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:277
+msgid "@j version not supported by this e2fsck.\n"
+msgstr ""
+
+#: e2fsck/problem.c:282
+#, c-format
+msgid ""
+"Moving @j from /%s to hidden inode.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:287
+#, c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:292
+msgid ""
+"Found invalid V2 @j @S fields (from V1 journal).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:300
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr ""
+
+#. Root directory is not an inode
+#: e2fsck/problem.c:304
+msgid "@r is not a @d. "
+msgstr ""
+
+#: e2fsck/problem.c:309
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr ""
+
+#: e2fsck/problem.c:314
+msgid "Reserved @i %i %Q has bad mode. "
+msgstr ""
+
+#: e2fsck/problem.c:319
+#, c-format
+msgid "@D @i %i has zero dtime. "
+msgstr ""
+
+#: e2fsck/problem.c:324
+#, c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr ""
+
+#: e2fsck/problem.c:329
+#, c-format
+msgid "@i %i is a @z @d. "
+msgstr ""
+
+#: e2fsck/problem.c:334
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr ""
+
+#: e2fsck/problem.c:339
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr ""
+
+#: e2fsck/problem.c:344
+msgid "@g %g's @i table at %b @C.\n"
+msgstr ""
+
+#: e2fsck/problem.c:349
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr ""
+
+#: e2fsck/problem.c:354
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr ""
+
+#: e2fsck/problem.c:359
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr ""
+
+#: e2fsck/problem.c:364
+msgid "@i %i, i_ at bs is %Ib, @s %N. "
+msgstr ""
+
+#: e2fsck/problem.c:369
+msgid "@I @b #%B (%b) in @i %i. "
+msgstr ""
+
+#: e2fsck/problem.c:374
+msgid "@b #%B (%b) overlaps @f metadata in @i %i. "
+msgstr ""
+
+#: e2fsck/problem.c:379
+#, c-format
+msgid "@i %i has illegal @b(s). "
+msgstr ""
+
+#: e2fsck/problem.c:384
+#, c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:389
+msgid "@I @b #%B (%b) in bad @b @i. "
+msgstr ""
+
+#: e2fsck/problem.c:394
+msgid "Bad @b @i has illegal @b(s). "
+msgstr ""
+
+#: e2fsck/problem.c:399
+msgid "Duplicate or bad @b in use!\n"
+msgstr ""
+
+#: e2fsck/problem.c:404
+msgid "Bad @b %b used as bad @b indirect @b?!?\n"
+msgstr ""
+
+#: e2fsck/problem.c:409
+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 ""
+
+#: e2fsck/problem.c:417
+msgid ""
+"\n"
+"If the @b is really bad, the @f can not be fixed.\n"
+msgstr ""
+
+#: e2fsck/problem.c:422
+msgid ""
+"You can clear the this @b (and hope for the best) from the\n"
+"bad @b list and hope that @b is really OK, but there are no\n"
+"guarantees.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:429
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr ""
+
+#: e2fsck/problem.c:434
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr ""
+
+#: e2fsck/problem.c:440
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr ""
+
+#: e2fsck/problem.c:445
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr ""
+
+#: e2fsck/problem.c:451
+msgid "Programming error? @b #%b claimed for no reason in process_bad_ at b.\n"
+msgstr ""
+
+#: e2fsck/problem.c:457
+msgid "@A %N @b(s) for %s: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:462
+#, c-format
+msgid "@A @b buffer for relocating %s\n"
+msgstr ""
+
+#: e2fsck/problem.c:467
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr ""
+
+#: e2fsck/problem.c:472
+#, c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr ""
+
+#: e2fsck/problem.c:477
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:482
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:497
+#, c-format
+msgid "@A icount link information: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:502
+#, c-format
+msgid "@A @d @b array: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:507
+#, c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:512
+#, c-format
+msgid "Error while iterating over @bs in @i %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:517
+msgid "Error storing @i count information (@i=%i, count=%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:522
+msgid "Error storing @d @b information (@i=%i, @b=%b, num=%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:528
+#, c-format
+msgid "Error reading @i %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:536
+#, c-format
+msgid "@i %i has imagic flag set. "
+msgstr ""
+
+#: e2fsck/problem.c:541
+#, c-format
+msgid ""
+"Special (@v/socket/fifo/symlink) file (@i %i) has immutable\n"
+"or append-only flag set. "
+msgstr ""
+
+#: e2fsck/problem.c:547
+#, c-format
+msgid "@i %i has @cion flag set on @f without @cion support. "
+msgstr ""
+
+#: e2fsck/problem.c:567
+msgid "@j is not regular file. "
+msgstr ""
+
+#: e2fsck/problem.c:572
+#, c-format
+msgid "@i %i was part of the orphaned @i list. "
+msgstr ""
+
+#: e2fsck/problem.c:578
+msgid "@is that were part of a corrupted orphan linked list found. "
+msgstr ""
+
+#: e2fsck/problem.c:588
+msgid "Error reading @a @b %b for @i %i. "
+msgstr ""
+
+#: e2fsck/problem.c:593
+msgid "@i %i has a bad @a @b %b. "
+msgstr ""
+
+#: e2fsck/problem.c:598
+msgid "Error reading @a @b %b (%m). "
+msgstr ""
+
+#: e2fsck/problem.c:603
+msgid "@a @b %b has reference count %B, should be %N. "
+msgstr ""
+
+#: e2fsck/problem.c:608
+msgid "Error writing @a @b %b (%m). "
+msgstr ""
+
+#: e2fsck/problem.c:613
+msgid "@a @b %b has h_blocks > 1. "
+msgstr ""
+
+#: e2fsck/problem.c:618
+msgid "Error allocating @a @b %b. "
+msgstr ""
+
+#: e2fsck/problem.c:623
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr ""
+
+#: e2fsck/problem.c:628
+msgid "@a @b %b is corrupt (invalid name). "
+msgstr ""
+
+#: e2fsck/problem.c:633
+msgid "@a @b %b is corrupt (invalid value). "
+msgstr ""
+
+#: e2fsck/problem.c:640
+msgid ""
+"Duplicate @bs found... invoking duplicate @b passes.\n"
+"Pass 1B: Rescan for duplicate/bad @bs\n"
+msgstr ""
+
+#: e2fsck/problem.c:646
+#, c-format
+msgid "Duplicate/bad @b(s) in @i %i:"
+msgstr ""
+
+#: e2fsck/problem.c:661
+#, c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:666
+#, c-format
+msgid "@A @i @B (inode_dup_map): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:671
+#, c-format
+msgid "Error while iterating over @bs in @i %i (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:676
+msgid "Pass 1C: Scan directories for @is with dup @bs.\n"
+msgstr ""
+
+#: e2fsck/problem.c:682
+msgid "Pass 1D: Reconciling duplicate @bs\n"
+msgstr ""
+
+#: e2fsck/problem.c:687
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %B duplicate @b(s), shared with %N file(s):\n"
+msgstr ""
+
+#: e2fsck/problem.c:693
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr ""
+
+#: e2fsck/problem.c:698
+msgid "\t<@f metadata>\n"
+msgstr ""
+
+#: e2fsck/problem.c:703
+msgid ""
+"(There are %N @is containing duplicate/bad @bs.)\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:708
+msgid ""
+"Duplicated @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:721
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:727
+msgid "Pass 2: Checking @d structure\n"
+msgstr ""
+
+#: e2fsck/problem.c:732
+#, c-format
+msgid "Bad @i number for '.' in @d @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:737
+msgid "@E has bad @i #: %Di.\n"
+msgstr ""
+
+#: e2fsck/problem.c:742
+msgid "@E has @D/unused @i %Di. "
+msgstr ""
+
+#: e2fsck/problem.c:747
+msgid "@E @L to '.' "
+msgstr ""
+
+#: e2fsck/problem.c:752
+msgid "@E points to @i (%Di) located in a bad @b.\n"
+msgstr ""
+
+#: e2fsck/problem.c:757
+msgid "@E @L to @d %P (%Di).\n"
+msgstr ""
+
+#: e2fsck/problem.c:762
+msgid "@E @L to the @r.\n"
+msgstr ""
+
+#: e2fsck/problem.c:767
+msgid "@E has illegal characters in its name.\n"
+msgstr ""
+
+#: e2fsck/problem.c:772
+#, c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:777
+#, c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:782
+msgid "First @e '%Dn' (inode=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr ""
+
+#: e2fsck/problem.c:787
+msgid "Second @e '%Dn' (inode=%Di) in @d @i %i @s '..'\n"
+msgstr ""
+
+#: e2fsck/problem.c:792
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:797
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:802
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:807
+msgid "i_frag @F %N, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:812
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr ""
+
+#: e2fsck/problem.c:817
+msgid "@i %i (%Q) has a bad mode (%Im).\n"
+msgstr ""
+
+#: e2fsck/problem.c:822
+msgid "@d @i %i, @b %B, offset %N: @d corrupted\n"
+msgstr ""
+
+#: e2fsck/problem.c:827
+msgid "@d @i %i, @b %B, offset %N: filename too long\n"
+msgstr ""
+
+#: e2fsck/problem.c:832
+msgid "@d @i %i has an unallocated @b #%B. "
+msgstr ""
+
+#: e2fsck/problem.c:837
+#, c-format
+msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+
+#: e2fsck/problem.c:842
+#, c-format
+msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
+msgstr ""
+
+#: e2fsck/problem.c:847
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr ""
+
+#: e2fsck/problem.c:852
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr ""
+
+#: e2fsck/problem.c:857
+msgid "@E is duplicate '.' @e.\n"
+msgstr ""
+
+#: e2fsck/problem.c:862
+msgid "@E is duplicate '..' @e.\n"
+msgstr ""
+
+#: e2fsck/problem.c:867 e2fsck/problem.c:1069
+#, c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr ""
+
+#: e2fsck/problem.c:872
+msgid "@E has rec_len of %Dr, should be %N.\n"
+msgstr ""
+
+#: e2fsck/problem.c:877
+#, c-format
+msgid "@A icount structure: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:882
+#, c-format
+msgid "Error interating over @d @bs: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:887
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:892
+msgid "Error writing @d @b %b (@i %i): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:897
+#, c-format
+msgid "@A new @d @b for @i %i (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:902
+#, c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:907
+msgid "@d @e for '.' is big. "
+msgstr ""
+
+#: e2fsck/problem.c:912
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr ""
+
+#: e2fsck/problem.c:917
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr ""
+
+#: e2fsck/problem.c:922
+msgid "Setting filetype for @E to %N.\n"
+msgstr ""
+
+#: e2fsck/problem.c:927
+msgid "@E has an incorrect filetype (was %Dt, should be %N).\n"
+msgstr ""
+
+#: e2fsck/problem.c:932
+msgid "@E has filetype set.\n"
+msgstr ""
+
+#: e2fsck/problem.c:937
+msgid "@E has a zero-length name.\n"
+msgstr ""
+
+#: e2fsck/problem.c:942
+msgid "Symlink %Q (@i #%i) has an invalid size (%Is).\n"
+msgstr ""
+
+#: e2fsck/problem.c:947
+msgid "@a @b @F is invalid (%If).\n"
+msgstr ""
+
+#: e2fsck/problem.c:952
+msgid "@f contains large files, but lacks LARGE_FILE flag in @S.\n"
+msgstr ""
+
+#: e2fsck/problem.c:959
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr ""
+
+#: e2fsck/problem.c:964
+msgid "@r not allocated. "
+msgstr ""
+
+#: e2fsck/problem.c:969
+msgid "No room in @l @d. "
+msgstr ""
+
+#: e2fsck/problem.c:974
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr ""
+
+#: e2fsck/problem.c:979
+msgid "/@l not found. "
+msgstr ""
+
+#: e2fsck/problem.c:984
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr ""
+
+#: e2fsck/problem.c:989
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr ""
+
+#: e2fsck/problem.c:994
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:999
+#, c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1004
+#, c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1009
+#, c-format
+msgid "ext2fs_new_ at b: %m while trying to create /@l @d\n"
+msgstr ""
+
+#: e2fsck/problem.c:1014
+#, c-format
+msgid "ext2fs_new_ at i: %m while trying to create /@l @d\n"
+msgstr ""
+
+#: e2fsck/problem.c:1019
+#, c-format
+msgid "ext2fs_new_dir_ at b: %m while creating new @d @b\n"
+msgstr ""
+
+#: e2fsck/problem.c:1024
+#, c-format
+msgid "ext2fs_write_dir_ at b: %m while writing the @d @b for /@l\n"
+msgstr ""
+
+#: e2fsck/problem.c:1029
+#, c-format
+msgid "Error while adjusting @i count on @i %i\n"
+msgstr ""
+
+#: e2fsck/problem.c:1034
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: %m\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1039
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d entry\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:1044
+msgid "@A @i @B (%N): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1049
+#, c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1054
+#, c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr ""
+
+#: e2fsck/problem.c:1059
+msgid "@r is not a @d; aborting.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1064
+msgid "Cannot proceed without a @r.\n"
+msgstr ""
+
+#: e2fsck/problem.c:1074
+#, c-format
+msgid "/@l is not a @d (ino=%i)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1081
+msgid "Pass 4: Checking reference counts\n"
+msgstr ""
+
+#: e2fsck/problem.c:1096
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr ""
+
+#: e2fsck/problem.c:1100
+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 should be the same!\n"
+msgstr ""
+
+#: e2fsck/problem.c:1110
+msgid "Pass 5: Checking @g summary information\n"
+msgstr ""
+
+#: e2fsck/problem.c:1115
+msgid "Padding at end of @i @B is not set. "
+msgstr ""
+
+#: e2fsck/problem.c:1120
+msgid "Padding at end of @b @B is not set. "
+msgstr ""
+
+#: e2fsck/problem.c:1125
+msgid "@b @B differences: "
+msgstr ""
+
+#: e2fsck/problem.c:1145
+msgid "@i @B differences: "
+msgstr ""
+
+#: e2fsck/problem.c:1165
+msgid "Free @is count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1170
+msgid "Directories count wrong for @g #%g (%i, counted=%j).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1175
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1180
+msgid "Free @bs count wrong for @g #%g (%b, counted=%c).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1185
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr ""
+
+#: e2fsck/problem.c:1190
+msgid ""
+"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
+"endpoints (%i, %j)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1196
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr ""
+
+#: e2fsck/problem.c:1308
+#, c-format
+msgid "Unhandled error code (%d)!\n"
+msgstr ""
+
+#: e2fsck/problem.c:1382
+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:200
+#, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr ""
+
+#: e2fsck/super.c:266
+msgid "Truncating"
+msgstr ""
+
+#: e2fsck/super.c:267
+msgid "Clearing"
+msgstr ""
+
+#: e2fsck/swapfs.c:98
+msgid "while calling ext2fs_block_iterate"
+msgstr ""
+
+#: e2fsck/swapfs.c:104
+msgid "while calling iterator function"
+msgstr ""
+
+#: e2fsck/swapfs.c:125
+msgid "while allocating inode buffer"
+msgstr ""
+
+#: e2fsck/swapfs.c:137
+#, c-format
+msgid "while reading inode table (group %d)"
+msgstr ""
+
+#: e2fsck/swapfs.c:175
+#, c-format
+msgid "while writing inode table (group %d)"
+msgstr ""
+
+#: e2fsck/swapfs.c:196
+msgid "Pass 0: Doing byte-swap of filesystem\n"
+msgstr ""
+
+#: e2fsck/swapfs.c:203
+#, c-format
+msgid ""
+"%s: the filesystem must be freshly checked using fsck\n"
+"and not mounted before trying to byte-swap it.\n"
+msgstr ""
+
+#: e2fsck/swapfs.c:229
+msgid "Byte swap"
+msgstr ""
+
+#: e2fsck/unix.c:66
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-panyrcdfvstFSV] [-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 ext-journal] device\n"
+msgstr ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: %s [-panyrcdfvstFSV] [-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] device\n"
+
+#: e2fsck/unix.c:71
+#, fuzzy
+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\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Yup, it looks like you could use some emergency help all right... IDIOT.\n"
+"\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\n"
+" -f Force checking even if filesystem is marked clean\n"
+" -v Be verbose\n"
+" -b superblock Use alternative superblock\n"
+" -B blocksize Force blocksize when looking for superblock\n"
+" -l bad_blocks_file Add to badblocks list\n"
+" -L bad_blocks_file Set badblocks list\n"
+
+#: e2fsck/unix.c:77
+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:111
+#, c-format
+msgid "%s: %d/%d files (%0d.%d%% non-contiguous), %d/%d blocks\n"
+msgstr ""
+"%s: %d/%d stupid files (%0d.%d%% non-contiguous), %d/%d blocks wasted on "
+"your worthless data\n"
+
+#: e2fsck/unix.c:126
+#, c-format
+msgid ""
+"\n"
+"%8d inodes used (%d%%)\n"
+msgstr ""
+
+#: e2fsck/unix.c:128
+#, c-format
+msgid "%8d non-contiguous inodes (%0d.%d%%)\n"
+msgstr ""
+
+#: e2fsck/unix.c:130
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %d/%d/%d\n"
+msgstr ""
+
+#: e2fsck/unix.c:132
+#, c-format
+msgid ""
+"%8d blocks used (%d%%)\n"
+"%8d bad blocks\n"
+msgstr ""
+
+#: e2fsck/unix.c:136
+#, c-format
+msgid "%8d large files\n"
+msgstr ""
+
+#: e2fsck/unix.c:137
+#, c-format
+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 ""
+
+#: e2fsck/unix.c:170
+#, c-format
+msgid "%8d large file%s\n"
+msgstr ""
+
+#: e2fsck/unix.c:212 misc/badblocks.c:612 misc/tune2fs.c:665 misc/util.c:110
+#: resize/main.c:96
+#, c-format
+msgid "while determining whether %s is mounted."
+msgstr ""
+
+#: e2fsck/unix.c:227
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr ""
+
+#: e2fsck/unix.c:231
+#, c-format
+msgid "%s is mounted. "
+msgstr ""
+
+#: e2fsck/unix.c:233
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:234
+msgid ""
+"\n"
+"\n"
+"WARNING!!! Running e2fsck on a mounted filesystem may cause\n"
+"SEVERE filesystem damage.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/unix.c:237
+msgid "Do you really want to continue"
+msgstr ""
+
+#: e2fsck/unix.c:239
+msgid "check aborted.\n"
+msgstr ""
+
+#: e2fsck/unix.c:260
+msgid " contains a file system with errors"
+msgstr ""
+
+#: e2fsck/unix.c:262
+msgid " was not cleanly unmounted"
+msgstr ""
+
+#: e2fsck/unix.c:266
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr ""
+
+#: e2fsck/unix.c:277
+msgid ", check forced.\n"
+msgstr ""
+
+#: e2fsck/unix.c:280
+#, c-format
+msgid "%s: clean, %d/%d files, %d/%d blocks\n"
+msgstr ""
+
+#: e2fsck/unix.c:411
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr ""
+
+#: e2fsck/unix.c:482
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:486
+msgid "Invalid completion information file descriptor"
+msgstr ""
+
+#: e2fsck/unix.c:510
+msgid "The -t option is not supported on this version of e2fsck.\n"
+msgstr ""
+
+#: e2fsck/unix.c:578
+msgid "Byte-swapping filesystems not compiled in this version of e2fsck\n"
+msgstr ""
+
+#: e2fsck/unix.c:614
+msgid "Incompatible options not allowed when byte-swapping.\n"
+msgstr ""
+
+#: e2fsck/unix.c:687
+msgid "Error: ext2fs library version out of date!\n"
+msgstr ""
+
+#: e2fsck/unix.c:695
+msgid "while trying to initialize program"
+msgstr ""
+
+#: e2fsck/unix.c:709
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr ""
+
+#: e2fsck/unix.c:721
+msgid "need terminal for interactive repairs"
+msgstr ""
+
+#: e2fsck/unix.c:755
+#, c-format
+msgid "%s trying backup blocks...\n"
+msgstr ""
+
+#: e2fsck/unix.c:756
+msgid "Couldn't find ext2 superblock,"
+msgstr ""
+
+#: e2fsck/unix.c:757
+msgid "Group descriptors look bad..."
+msgstr ""
+
+#: e2fsck/unix.c:768
+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:774
+msgid "Could this be a zero-length partition?\n"
+msgstr ""
+
+#: e2fsck/unix.c:776
+#, c-format
+msgid "You must have %s access to the filesystem or be root\n"
+msgstr ""
+
+#: e2fsck/unix.c:781
+msgid "Possibly non-existent or swap device?\n"
+msgstr ""
+
+#: e2fsck/unix.c:784
+msgid ""
+"Disk write-protected; use the -n option to do a read-only\n"
+"check of the device.\n"
+msgstr ""
+
+#: e2fsck/unix.c:800
+msgid "Get a newer version of e2fsck!"
+msgstr ""
+
+#: e2fsck/unix.c:826
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr ""
+
+#: e2fsck/unix.c:838
+msgid ""
+"Warning: skipping journal recovery because doing a read-only filesystem "
+"check.\n"
+msgstr ""
+
+#: e2fsck/unix.c:846
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr ""
+
+#: e2fsck/unix.c:874
+msgid "Warning: compression support is experimental.\n"
+msgstr ""
+
+#: e2fsck/unix.c:910
+#, c-format
+msgid "%s: Filesystem byte order already normalized.\n"
+msgstr ""
+
+#: e2fsck/unix.c:930
+msgid "while reading bad blocks inode"
+msgstr ""
+
+#: e2fsck/unix.c:932
+msgid "This doesn't bode well, but we'll try to go on...\n"
+msgstr ""
+
+#: e2fsck/unix.c:939
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr ""
+
+#: e2fsck/unix.c:943
+msgid "while resetting context"
+msgstr ""
+
+#: e2fsck/unix.c:960
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+
+#: e2fsck/unix.c:963
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr ""
+
+#: e2fsck/unix.c:971
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:76 misc/util.c:51
+msgid "yY"
+msgstr ""
+
+#: e2fsck/util.c:77
+msgid "nN"
+msgstr ""
+
+#: e2fsck/util.c:91
+msgid "<y>"
+msgstr ""
+
+#: e2fsck/util.c:93
+msgid "<n>"
+msgstr ""
+
+#: e2fsck/util.c:95
+msgid " (y/n)"
+msgstr ""
+
+#: e2fsck/util.c:125
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:129
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+
+#: e2fsck/util.c:133
+msgid "yes"
+msgstr ""
+
+#: e2fsck/util.c:133
+msgid "no"
+msgstr ""
+
+#: e2fsck/util.c:146
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr ""
+
+#: e2fsck/util.c:151
+msgid "reading inode and block bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:156
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:168
+msgid "writing block bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:173
+#, c-format
+msgid "while retrying to write block bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:180
+msgid "writing inode bitmaps"
+msgstr ""
+
+#: e2fsck/util.c:185
+#, c-format
+msgid "while retrying to write inode bitmaps for %s"
+msgstr ""
+
+#: e2fsck/util.c:198
+#, 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:263
+#, c-format
+msgid "Memory used: %dk/%dk (%dk/%dk), "
+msgstr ""
+
+#: e2fsck/util.c:267
+#, c-format
+msgid "Memory used: %d, "
+msgstr ""
+
+#: e2fsck/util.c:273
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr ""
+
+#: e2fsck/util.c:278
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr ""
+
+#: e2fsck/util.c:292
+#, c-format
+msgid "while reading inode %ld in %s"
+msgstr ""
+
+#: e2fsck/util.c:305
+#, c-format
+msgid "while writing inode %ld in %s"
+msgstr ""
+
+#: misc/badblocks.c:57
+msgid "done \n"
+msgstr ""
+
+#: misc/badblocks.c:67
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnf]\n"
+" [-c blocks_at_once] [-p num_passes] device [last_block [start_count]]\n"
+msgstr ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwn]\n"
+" [-c blocks_at_once] [-p num_passes] device blocks_count [start_count]\n"
+
+#: misc/badblocks.c:171 misc/badblocks.c:198
+msgid "during seek"
+msgstr ""
+
+#: misc/badblocks.c:178
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr ""
+
+#: misc/badblocks.c:219
+msgid "during ext2fs_sync_device"
+msgstr ""
+
+#: misc/badblocks.c:235 misc/badblocks.c:411
+msgid "while beginning bad block list iteration"
+msgstr ""
+
+#: misc/badblocks.c:245 misc/badblocks.c:314 misc/badblocks.c:421
+msgid "while allocating buffers"
+msgstr ""
+
+#: misc/badblocks.c:250
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr ""
+
+#: misc/badblocks.c:251 misc/badblocks.c:323 misc/badblocks.c:440
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr ""
+
+#: misc/badblocks.c:259
+msgid "Checking for bad blocks (read-only test): "
+msgstr ""
+
+#: misc/badblocks.c:322
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:329
+#, c-format
+msgid "Writing pattern 0x%08x: "
+msgstr ""
+
+#: misc/badblocks.c:343 misc/badblocks.c:368
+#, c-format
+msgid "during seek on block %d"
+msgstr ""
+
+#: misc/badblocks.c:355
+msgid "Reading and comparing: "
+msgstr ""
+
+#: misc/badblocks.c:428
+msgid "Initializing random test data\n"
+msgstr ""
+
+#: misc/badblocks.c:439
+msgid "Checking for bad blocks in non-destructive read-write mode\n"
+msgstr ""
+
+#: misc/badblocks.c:443
+msgid "Checking for bad blocks (non-destructive read-write test): "
+msgstr ""
+
+#: misc/badblocks.c:452
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+
+#: misc/badblocks.c:509
+#, c-format
+msgid "during test data write, block %lu"
+msgstr ""
+
+#: misc/badblocks.c:619 misc/util.c:117
+#, c-format
+msgid "%s is mounted; "
+msgstr ""
+
+#: misc/badblocks.c:621
+msgid "badblocks forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/badblocks.c:625
+msgid "it's not safe to run badblocks!\n"
+msgstr ""
+
+#: misc/badblocks.c:667 misc/mke2fs.c:825
+#, c-format
+msgid "bad block size - %s"
+msgstr ""
+
+#: misc/badblocks.c:730
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size manually\n"
+msgstr ""
+
+#: misc/badblocks.c:736
+msgid "while trying to determine device size"
+msgstr ""
+
+#: misc/badblocks.c:742 misc/mke2fs.c:985
+#, c-format
+msgid "bad blocks count - %s"
+msgstr ""
+
+#: misc/badblocks.c:751
+#, c-format
+msgid "bad starting block - %s"
+msgstr ""
+
+#: misc/badblocks.c:757
+#, c-format
+msgid "bad blocks range: %lu-%lu"
+msgstr ""
+
+#: misc/badblocks.c:812
+msgid "creating in-memory bad blocks list"
+msgstr ""
+
+#: misc/badblocks.c:827
+msgid "adding to in-memory bad block list"
+msgstr ""
+
+#: misc/badblocks.c:851
+#, c-format
+msgid "Pass completed, %u bad blocks found.\n"
+msgstr ""
+
+#: misc/chattr.c:81
+#, fuzzy, c-format
+msgid "usage: %s [-RV] [-+=AacdijsSu] [-v version] files...\n"
+msgstr ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: %s [-RVadlv] [files...]\n"
+
+#: misc/chattr.c:139
+#, c-format
+msgid "bad version - %s\n"
+msgstr ""
+
+#: misc/chattr.c:183 misc/lsattr.c:107
+#, c-format
+msgid "while trying to stat %s"
+msgstr ""
+
+#: misc/chattr.c:200 misc/chattr.c:216
+#, c-format
+msgid "Flags of %s set as "
+msgstr ""
+
+#: misc/chattr.c:209
+#, c-format
+msgid "while reading flags on %s"
+msgstr ""
+
+#: misc/chattr.c:222
+#, c-format
+msgid "while setting flags on %s"
+msgstr ""
+
+#: misc/chattr.c:227
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr ""
+
+#: misc/chattr.c:230
+#, c-format
+msgid "while setting version on %s"
+msgstr ""
+
+#: misc/chattr.c:244
+msgid "Couldn't allocate path variable in chattr_dir_proc"
+msgstr ""
+
+#: misc/chattr.c:275
+msgid "= is incompatible with - and +\n"
+msgstr ""
+
+#: misc/chattr.c:283
+msgid "Must use '-v', =, - or +\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:52
+#, fuzzy, c-format
+msgid "Usage: %s [-bfhixV] [-ob superblock] [-oB blocksize] device\n"
+msgstr ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: %s [-bV] [-ob superblock] [-oB blocksize] device\n"
+
+#: misc/dumpe2fs.c:112
+#, c-format
+msgid "Group %lu: (Blocks 0x%04x -- 0x%04x)\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:113
+#, c-format
+msgid "Group %lu: (Blocks %u -- %u)\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:116
+#, c-format
+msgid " %s Superblock at 0x%04x, Group Descriptors at 0x%04x-0x%04x\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:118
+#, c-format
+msgid " %s Superblock at %u, Group Descriptors at %u-%u\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:120
+msgid "Primary"
+msgstr ""
+
+#: misc/dumpe2fs.c:120
+msgid "Backup"
+msgstr ""
+
+#: misc/dumpe2fs.c:123
+#, c-format
+msgid ""
+" Block bitmap at 0x%04x (+%d), Inode bitmap at 0x%04x (+%d)\n"
+" Inode table at 0x%04x-0x%04x (+%d)\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:126
+#, c-format
+msgid ""
+" Block bitmap at %u (+%d), Inode bitmap at %u (+%d)\n"
+" Inode table at %u-%u (+%d)\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:137
+#, c-format
+msgid " %d free blocks, %d free inodes, %d directories\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:141
+msgid " Free blocks: "
+msgstr ""
+
+#: misc/dumpe2fs.c:146
+msgid " Free inodes: "
+msgstr ""
+
+#: misc/dumpe2fs.c:169 misc/dumpe2fs.c:195
+msgid "while printing bad block list"
+msgstr ""
+
+#: misc/dumpe2fs.c:173
+#, c-format
+msgid "Bad blocks: %d"
+msgstr ""
+
+#: misc/dumpe2fs.c:214 misc/tune2fs.c:136
+msgid "while reading journal superblock"
+msgstr ""
+
+#: misc/dumpe2fs.c:222
+msgid "Couldn't find journal superblock magic numbers"
+msgstr ""
+
+#. Print version number and exit
+#: misc/dumpe2fs.c:292 misc/mke2fs.c:971
+#, c-format
+msgid "\tUsing %s\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:318 misc/e2image.c:435 misc/tune2fs.c:652 resize/main.c:198
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:329
+msgid "Note: This is a byte-swapped filesystem\n"
+msgstr ""
+
+#: misc/dumpe2fs.c:345
+msgid "while trying to read the bitmaps"
+msgstr ""
+
+#: misc/e2label.c:57
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr ""
+
+#: misc/e2label.c:62
+msgid "e2label: cannot seek to superblock\n"
+msgstr ""
+
+#: misc/e2label.c:67
+msgid "e2label: error reading superblock\n"
+msgstr ""
+
+#: misc/e2label.c:71
+msgid "e2label: not an ext2 filesystem\n"
+msgstr ""
+
+#: misc/e2label.c:96 misc/tune2fs.c:753
+msgid "Warning: label too long, truncating.\n"
+msgstr ""
+
+#: misc/e2label.c:99
+msgid "e2label: cannot seek to superblock again\n"
+msgstr ""
+
+#: misc/e2label.c:104
+msgid "e2label: error writing superblock\n"
+msgstr ""
+
+#: misc/e2label.c:116 misc/tune2fs.c:411
+msgid "Usage: e2label device [newlabel]\n"
+msgstr ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: e2label device [newlabel]\n"
+
+#: misc/e2image.c:50
+#, fuzzy, c-format
+msgid "Usage: %s [-r] device file\n"
+msgstr ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: %s [-RVadlv] [files...]\n"
+
+#: misc/e2image.c:61
+msgid "Couldn't allocate header buffer\n"
+msgstr ""
+
+#: misc/e2image.c:80
+#, c-format
+msgid "short write (only %d bytes) forwriting image header"
+msgstr ""
+
+#: misc/e2image.c:99
+msgid "while writing superblock"
+msgstr ""
+
+#: misc/e2image.c:107
+msgid "while writing inode table"
+msgstr ""
+
+#: misc/e2image.c:114
+msgid "while writing block bitmap"
+msgstr ""
+
+#: misc/e2image.c:121
+msgid "while writing inode bitmap"
+msgstr ""
+
+#: misc/findsuper.c:117
+msgid "Usage: findsuper device [skiprate [start]]\n"
+msgstr ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: findsuper device [skiprate [start]]\n"
+
+#: misc/findsuper.c:124
+msgid "Do you really want to skip less than a sector??\n"
+msgstr ""
+
+#: misc/findsuper.c:130
+#, c-format
+msgid "Have to start at 0 or greater,not %ld\n"
+msgstr ""
+
+#: misc/findsuper.c:143
+msgid "read failed"
+msgstr ""
+
+#: misc/findsuper.c:156
+#, c-format
+msgid "Failed on %d at %ld\n"
+msgstr ""
+
+#: misc/fsck.c:251
+#, c-format
+msgid "Could not determine filesystem type for %s\n"
+msgstr ""
+
+#: misc/fsck.c:271
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr ""
+
+#: misc/fsck.c:281
+#, c-format
+msgid "WARNING: bad format on line %d of %s\n"
+msgstr ""
+
+#: misc/fsck.c:301
+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:415
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr ""
+
+#: misc/fsck.c:498
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr ""
+
+#: misc/fsck.c:520
+#, c-format
+msgid "Warning... %s for device %s exited with signal %d.\n"
+msgstr ""
+
+#: misc/fsck.c:526
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr ""
+
+#: misc/fsck.c:615
+#, c-format
+msgid "%s: Error %d while executing fsck.%s for %s\n"
+msgstr ""
+
+#: misc/fsck.c:635
+msgid ""
+"Either all or none of the filesystem types passed to -t must be prefixed\n"
+"with 'no' or '!'.\n"
+msgstr ""
+
+#: misc/fsck.c:654
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr ""
+
+#: misc/fsck.c:794
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr ""
+
+#: misc/fsck.c:851
+msgid "Checking all file systems.\n"
+msgstr ""
+
+#: misc/fsck.c:921
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr ""
+
+#: misc/fsck.c:942
+msgid "Usage: fsck [-ACNPRTV] [-t fstype] [fs-options] filesys\n"
+msgstr ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: fsck [-ACNPRTV] [-t fstype] [fs-options] filesys\n"
+
+#: misc/fsck.c:968
+#, c-format
+msgid "%s: too many devices\n"
+msgstr ""
+
+#: misc/fsck.c:978 misc/fsck.c:1049
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr ""
+
+#: misc/fsck.c:1103
+msgid ""
+"\n"
+"No devices specified to be checked!\n"
+msgstr ""
+
+#: misc/get_device_by_label.c:265
+#, c-format
+msgid "WARNING: %s: bad UUID"
+msgstr ""
+
+#: misc/lsattr.c:67
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: %s [-RVadlv] [files...]\n"
+
+#: misc/lsattr.c:77
+#, c-format
+msgid "While reading flags on %s"
+msgstr ""
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading version on %s"
+msgstr ""
+
+#: misc/mke2fs.c:89
+#, fuzzy, c-format
+msgid ""
+"Usage: %s [-c|-t|-l filename] [-b block-size] [-f fragment-size]\n"
+"\t[-i bytes-per-inode] [-j] [-J journal-options] [-N number-of-inodes]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os] [-g blocks-per-group]\n"
+"\t[-L volume-label] [-M last-mounted-directory] [-O feature[,...]]\n"
+"\t[-r fs-revision] [-R raid_opts] [-qvSV] device [blocks-count]\n"
+msgstr ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: %s [-c|-t|-l filename] [-b block-size] [-f fragment-size]\n"
+"\t[-i bytes-per-inode] [-N number-of-inodes]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os] [-g blocks-per-group]\n"
+"\t[-L volume-label] [-M last-mounted-directory] [-O feature[,...]]\n"
+"\t[-r fs-revision] [-R raid_opts] [-s sparse-super-flag]\n"
+"\t[-qvSV] device [blocks-count]\n"
+
+#: misc/mke2fs.c:222
+#, c-format
+msgid "Running command: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:226
+#, c-format
+msgid "while trying run '%s'"
+msgstr ""
+
+#: misc/mke2fs.c:233
+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 %d through %d 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 %d contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:302
+msgid "while marking bad blocks as used"
+msgstr ""
+
+#: misc/mke2fs.c:355
+msgid "done \n"
+msgstr ""
+
+#: misc/mke2fs.c:390
+msgid "while allocating zeroizing buffer"
+msgstr ""
+
+#: misc/mke2fs.c:431
+msgid "Writing inode tables: "
+msgstr ""
+
+#: misc/mke2fs.c:442
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %d: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:465
+msgid "while creating root dir"
+msgstr ""
+
+#: misc/mke2fs.c:472
+msgid "while reading root inode"
+msgstr ""
+
+#: misc/mke2fs.c:481
+msgid "while setting root inode ownership"
+msgstr ""
+
+#: misc/mke2fs.c:498
+msgid "while creating /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:505
+msgid "while looking up /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:515
+msgid "while expanding /lost+found"
+msgstr ""
+
+#: misc/mke2fs.c:531
+msgid "while setting bad block inode"
+msgstr ""
+
+#: misc/mke2fs.c:564
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:580
+msgid "while initializing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:586
+msgid "Zeroing journal device: "
+msgstr ""
+
+#: misc/mke2fs.c:593
+#, c-format
+msgid "while zeroing journal device (block %u, count %d)"
+msgstr ""
+
+#: misc/mke2fs.c:604
+msgid "while writing journal superblock"
+msgstr ""
+
+#: misc/mke2fs.c:618
+#, c-format
+msgid ""
+"warning: %d blocks unused.\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:623
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr ""
+
+#: misc/mke2fs.c:624
+msgid "OS type: "
+msgstr ""
+
+#: misc/mke2fs.c:629
+msgid "(unknown os)"
+msgstr ""
+
+#: misc/mke2fs.c:632
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:634
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr ""
+
+#: misc/mke2fs.c:636
+#, c-format
+msgid "%u inodes, %u blocks\n"
+msgstr ""
+
+#: misc/mke2fs.c:638
+#, c-format
+msgid "%u blocks (%2.2f%%) reserved for the super user\n"
+msgstr ""
+
+#: misc/mke2fs.c:641
+#, c-format
+msgid "First data block=%u\n"
+msgstr ""
+
+#: misc/mke2fs.c:643
+#, c-format
+msgid "%u block groups\n"
+msgstr ""
+
+#: misc/mke2fs.c:645
+#, c-format
+msgid "%u block group\n"
+msgstr ""
+
+#: misc/mke2fs.c:646
+#, c-format
+msgid "%u blocks per group, %u fragments per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:648
+#, c-format
+msgid "%u inodes per group\n"
+msgstr ""
+
+#: misc/mke2fs.c:655
+msgid "Superblock backups stored on blocks: "
+msgstr ""
+
+#: misc/mke2fs.c:705
+msgid "Couldn't allocate memory to parse raid options!\n"
+msgstr ""
+
+#: misc/mke2fs.c:730
+msgid "Invalid stride parameter.\n"
+msgstr ""
+
+#: misc/mke2fs.c:738
+msgid ""
+"\n"
+"Bad raid options specified.\n"
+"\n"
+"Raid options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid raid options are:\n"
+"\tstride=<stride length in blocks>\n"
+"\n"
+msgstr ""
+
+#: misc/mke2fs.c:840
+#, c-format
+msgid "bad fragment size - %s"
+msgstr ""
+
+#: misc/mke2fs.c:846
+msgid "Warning: fragments not supported. Ignoring -f option\n"
+msgstr ""
+
+#: misc/mke2fs.c:853
+msgid "Illegal number for blocks per group"
+msgstr ""
+
+#: misc/mke2fs.c:858
+msgid "blocks per group must be multiple of 8"
+msgstr ""
+
+#: misc/mke2fs.c:867
+#, c-format
+msgid "bad inode ratio - %s"
+msgstr ""
+
+#: misc/mke2fs.c:884
+msgid "in malloc for bad_blocks_filename"
+msgstr ""
+
+#: misc/mke2fs.c:893
+#, c-format
+msgid "bad reserved blocks percent - %s"
+msgstr ""
+
+#: misc/mke2fs.c:956 misc/tune2fs.c:265
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1009 misc/mke2fs.c:1270
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr ""
+
+#: misc/mke2fs.c:1034
+msgid "filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:1047 resize/main.c:221
+msgid "while trying to determine filesystem size"
+msgstr ""
+
+#: misc/mke2fs.c:1053
+msgid ""
+"Couldn't determine device size; you must specify\n"
+"the size of the filesystem\n"
+msgstr ""
+
+#: misc/mke2fs.c:1060
+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:1075
+msgid "Filesystem larger than apparent filesystem size."
+msgstr ""
+
+#: misc/mke2fs.c:1093
+msgid "blocks per group count out of range"
+msgstr ""
+
+#: misc/mke2fs.c:1133
+msgid "while setting up superblock"
+msgstr ""
+
+#: misc/mke2fs.c:1161
+#, c-format
+msgid "unknown os - %s"
+msgstr ""
+
+#: misc/mke2fs.c:1216
+msgid "while trying to allocate filesystem tables"
+msgstr ""
+
+#: misc/mke2fs.c:1247
+#, c-format
+msgid "zeroing block %u at end of filesystem"
+msgstr ""
+
+#: misc/mke2fs.c:1263 misc/tune2fs.c:340
+msgid "journal"
+msgstr ""
+
+#: misc/mke2fs.c:1275
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr ""
+
+#: misc/mke2fs.c:1282
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+
+#: misc/mke2fs.c:1287 misc/mke2fs.c:1311 misc/tune2fs.c:362 misc/tune2fs.c:376
+msgid "done\n"
+msgstr ""
+
+#: misc/mke2fs.c:1299
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr ""
+
+#: misc/mke2fs.c:1307
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+
+#: misc/mke2fs.c:1316
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr ""
+
+#: misc/mke2fs.c:1320
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+
+#: misc/mke2fs.c:1323
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+
+#: misc/mklost+found.c:47
+msgid "Usage: mklost+found\n"
+msgstr ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: mklost+found\n"
+
+#: misc/partinfo.c:21
+#, c-format
+msgid "%s failed for %s: %s\n"
+msgstr ""
+
+#: misc/partinfo.c:37
+#, c-format
+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 ""
+"Hey stupid! Do you need help using this program?\n"
+"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"
+
+#: misc/partinfo.c:54
+msgid "HDIO_GETGEO ioctl"
+msgstr ""
+
+#: misc/partinfo.c:61
+msgid "BLKGETSIZE ioctl"
+msgstr ""
+
+#: misc/tune2fs.c:72
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr ""
+
+#: misc/tune2fs.c:77
+#, 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]\n"
+"\t[-l] [-s sparse-flag] [-m reserved-blocks-percent]\n"
+"\t[-r reserved-blocks-count] [-u user] [-C mount-count]\n"
+"\t[-L volume-label] [-M last-mounted-dir] [-U UUID]\n"
+"\t[-O [^]feature[,...]] device\n"
+msgstr ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: %s [-c max-mounts-count] [-e errors-behavior] [-g group]\n"
+"\t[-i interval[d|m|w]] [-l] [-s sparse-flag] [-m reserved-blocks-percent]\n"
+"\t[-r reserved-blocks-count] [-u user] [-C mount-count]\n"
+"\t[-L volume-label] [-M last-mounted-dir] [-U UUID]\n"
+"\t[-O [^]feature[,...]] device\n"
+
+#: misc/tune2fs.c:124
+msgid "while trying to open external journal"
+msgstr ""
+
+#: misc/tune2fs.c:128
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:143
+msgid "Journal superblock not found!\n"
+msgstr ""
+
+#: misc/tune2fs.c:156
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr ""
+
+#: misc/tune2fs.c:176
+msgid "Journal NOT removed\n"
+msgstr ""
+
+#: misc/tune2fs.c:183
+msgid "Journal removed\n"
+msgstr ""
+
+#: misc/tune2fs.c:214
+msgid "while reading journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:221
+msgid "while reading bitmaps"
+msgstr ""
+
+#: misc/tune2fs.c:228
+msgid "while clearing journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:239
+msgid "while writing journal inode"
+msgstr ""
+
+#: misc/tune2fs.c:279
+msgid ""
+"The has_journal flag may only be cleared when the filesystem is\n"
+"unmounted or mounted read-only.\n"
+msgstr ""
+
+#: misc/tune2fs.c:288
+msgid ""
+"The needs_recovery flag is set. Please run e2fsck before clearing\n"
+"the has_journal flag.\n"
+msgstr ""
+
+#: misc/tune2fs.c:335
+msgid "The filesystem already has a journal.\n"
+msgstr ""
+
+#: misc/tune2fs.c:346
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+
+#: misc/tune2fs.c:350
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr ""
+
+#: misc/tune2fs.c:358
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr ""
+
+#: misc/tune2fs.c:364
+msgid "Creating journal inode: "
+msgstr ""
+
+#: misc/tune2fs.c:373
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+
+#: misc/tune2fs.c:439 misc/tune2fs.c:452
+#, c-format
+msgid "bad mounts count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:468
+#, c-format
+msgid "bad error behavior - %s"
+msgstr ""
+
+#: misc/tune2fs.c:491
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:524
+#, c-format
+msgid "bad interval - %s"
+msgstr ""
+
+#: misc/tune2fs.c:552
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr ""
+
+#: misc/tune2fs.c:567
+msgid "-O may only be specified once"
+msgstr ""
+
+#: misc/tune2fs.c:577
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr ""
+
+#: misc/tune2fs.c:601
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr ""
+
+#: misc/tune2fs.c:675
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:681
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:686
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr ""
+
+#: misc/tune2fs.c:691
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:696
+#, c-format
+msgid "Setting interval between check %lu seconds\n"
+msgstr ""
+
+#: misc/tune2fs.c:702
+#, c-format
+msgid "Setting reserved blocks percentage to %lu (%u blocks)\n"
+msgstr ""
+
+#: misc/tune2fs.c:708
+#, c-format
+msgid "reserved blocks count is too big (%ul)"
+msgstr ""
+
+#: misc/tune2fs.c:714
+#, c-format
+msgid "Setting reserved blocks count to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:720
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+
+#: misc/tune2fs.c:727
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+
+#: misc/tune2fs.c:734
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks disabled.\n"
+msgstr ""
+
+#: misc/tune2fs.c:742
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag cleared. %s"
+msgstr ""
+
+#: misc/tune2fs.c:749
+#, c-format
+msgid "Setting reserved blocks uid to %lu\n"
+msgstr ""
+
+#: misc/tune2fs.c:780
+msgid "Invalid UUID format\n"
+msgstr ""
+
+#: misc/uuidgen.c:30
+#, c-format
+msgid "Usage: %s [-r] [-t]\n"
+msgstr ""
+"Hey stupid! Do you need help using this program?\n"
+"Usage: %s [-r] [-t]\n"
+
+#: misc/util.c:55
+msgid "Proceed anyway? (y,n) "
+msgstr ""
+
+#: misc/util.c:70
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr ""
+
+#: misc/util.c:73
+msgid ""
+"\n"
+"The device apparently does not exist; did you specify it correctly?\n"
+msgstr ""
+
+#: misc/util.c:78
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr ""
+
+#: misc/util.c:95
+#, c-format
+msgid "%s is entire device, not just one partition!\n"
+msgstr ""
+
+#: misc/util.c:119
+msgid "mke2fs forced anyway. Hope /etc/mtab is incorrect.\n"
+msgstr ""
+
+#: misc/util.c:122
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr ""
+
+#: misc/util.c:136
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr ""
+
+#: misc/util.c:178
+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 raid options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\n"
+"The journal size must be between 1024 and 102400 filesystem blocks.\n"
+"\n"
+msgstr ""
+
+#: misc/util.c:205
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+
+#: misc/util.c:213
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 102400 blocks. Aborting.\n"
+msgstr ""
+
+#: misc/util.c:221
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+
+#: misc/util.c:240
+#, 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 ""
+
+#: resize/main.c:31
+#, c-format
+msgid ""
+"usage: %s [-d debug_flags] [-f] [-F] [-p] device [new-size]\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:52
+msgid "Extending the inode table"
+msgstr ""
+
+#: resize/main.c:55
+msgid "Relocating blocks"
+msgstr ""
+
+#: resize/main.c:58
+msgid "Scanning inode table"
+msgstr ""
+
+#: resize/main.c:61
+msgid "Updating inode references"
+msgstr ""
+
+#: resize/main.c:64
+msgid "Moving inode table"
+msgstr ""
+
+#: resize/main.c:67
+msgid "Unknown pass?!?"
+msgstr ""
+
+#: resize/main.c:70
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr ""
+
+#: resize/main.c:95
+msgid "ext2fs_check_if_mount"
+msgstr ""
+
+#: resize/main.c:103
+#, c-format
+msgid ""
+"%s is mounted; can't resize a mounted filesystem!\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:125
+#, c-format
+msgid "resize2fs %s (%s)\n"
+msgstr ""
+
+#: resize/main.c:158
+#, c-format
+msgid "bad filesystem size - %s"
+msgstr ""
+
+#: resize/main.c:227
+#, c-format
+msgid ""
+"The containing partition (or device) is only %d blocks.\n"
+"You requested a new size of %d blocks.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:234
+#, c-format
+msgid ""
+"The filesystem is already %d blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:239
+#, c-format
+msgid ""
+"Please run 'e2fsck -f %s' first.\n"
+"\n"
+msgstr ""
+
+#: resize/main.c:247
+#, c-format
+msgid "while trying to resize %s"
+msgstr ""
+
+#: resize/main.c:251
+#, c-format
+msgid ""
+"The filesystem on %s is now %d blocks long.\n"
+"\n"
+msgstr ""
+
+#: resize/resize2fs.c:108
+#, c-format
+msgid "Number of free blocks: %d/%d, Needed: %d\n"
+msgstr ""
+
+#: resize/resize2fs.c:426
+msgid "meta-data blocks"
+msgstr ""
+
+#: resize/resize2fs.c:489
+msgid "reserved blocks"
+msgstr ""
+
+#: resize/resize2fs.c:494
+msgid "blocks to be moved"
+msgstr ""
+
+#: resize/resize2fs.c:725
+msgid "Going into desperation mode for block allocations\n"
+msgstr ""
+
+#: resize/resize2fs.c:814
+#, c-format
+msgid "Moving %d blocks %u->%u\n"
+msgstr ""
+
+#: resize/resize2fs.c:884
+#, c-format
+msgid "ino=%ld, blockcnt=%ld, %u->%u\n"
+msgstr ""
+
+#: resize/resize2fs.c:1040
+#, c-format
+msgid "Inode moved %ld->%ld\n"
+msgstr ""
+
+#: resize/resize2fs.c:1103
+#, c-format
+msgid "Inode translate (dir=%ld, name=%.*s, %u->%ld)\n"
+msgstr ""
+
+#: resize/resize2fs.c:1222
+#, c-format
+msgid "Itable move group %d block %u->%u (diff %d)\n"
+msgstr ""
+
+#: resize/resize2fs.c:1248
+#, c-format
+msgid "%d blocks of zeros...\n"
+msgstr ""
+
+#: resize/resize2fs.c:1283
+msgid "Inode table move finished.\n"
+msgstr ""
+
+#: resize/extent.c:197
+msgid "# Extent dump:\n"
+msgstr ""
+
+#: resize/extent.c:198
+#, c-format
+msgid "#\tNum=%d, Size=%d, Cursor=%d, Sorted=%d\n"
+msgstr ""
+
+#: resize/extent.c:201
+#, c-format
+msgid "#\t\t %u -> %u (%d)\n"
+msgstr ""
Added: trunk/yaboot/lib/e2fsprogs-1.27/po/tr.po
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/po/tr.po 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/po/tr.po 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,3894 @@
+# Turkish translations for e2fsprogs messages.
+# Copyright (C) 2001 Free Software Foundation, Inc.
+# Nilgün Belma Bugüner <nilgun at fide.org>, 2001.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: e2fsprogs 1.25\n"
+"POT-Creation-Date: 2001-10-08 11:47-0400\n"
+"PO-Revision-Date: 2001-10-06 07:25+300\n"
+"Last-Translator: Nilgün Belma Bugüner <nilgun at fide.org>\n"
+"Language-Team: Turkish <gnu-tr-u12a at lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-9\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 0.9.5\n"
+
+#: e2fsck/badblocks.c:22 misc/mke2fs.c:181
+#, c-format
+msgid "Bad block %u out of range; ignored.\n"
+msgstr "Hatalý blok %u kapsamdýþý; yoksayýldý.\n"
+
+#: e2fsck/badblocks.c:45
+msgid "while sanity checking the bad blocks inode"
+msgstr "- hatalý bloklar düðümünde doðruluk denetlenirken hata oluþtu"
+
+#: e2fsck/badblocks.c:57
+msgid "while reading the bad blocks inode"
+msgstr "- hatalý bloklar düðümü okunurken hata oluþtu"
+
+#: e2fsck/badblocks.c:71 e2fsck/iscan.c:110 e2fsck/scantest.c:107
+#: e2fsck/unix.c:765 e2fsck/unix.c:797 misc/badblocks.c:767
+#: misc/badblocks.c:776 misc/badblocks.c:790 misc/badblocks.c:801
+#: misc/dumpe2fs.c:316 misc/e2image.c:433 misc/e2image.c:449 misc/mke2fs.c:197
+#: misc/tune2fs.c:649 resize/main.c:196
+#, c-format
+msgid "while trying to open %s"
+msgstr "- %s açýlmaya çalýþýlýrken hata oluþtu"
+
+#: e2fsck/badblocks.c:81
+#, c-format
+msgid "while trying popen '%s'"
+msgstr "- '%s' veri yolu açýlmaya çalýþýlýrken hata oluþtu"
+
+#: e2fsck/badblocks.c:92 misc/mke2fs.c:204
+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:102
+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ý: Kuraldýþý %u bloðu hatalý bloklar düðümünde bulundu. Temizlendi.\n"
+
+#: e2fsck/ehandler.c:53
+#, 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:56
+#, c-format
+msgid "Error reading block %lu (%s). "
+msgstr "blok %lu okunurken hata oluþtu (%s). "
+
+#: e2fsck/ehandler.c:59 e2fsck/ehandler.c:103
+msgid "Ignore error"
+msgstr "Hata görmezden gelindi"
+
+#: e2fsck/ehandler.c:97
+#, 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:100
+#, c-format
+msgid "Error writing block %lu (%s). "
+msgstr "%lu bloðu yazýlýrken hata: %s. "
+
+#: e2fsck/emptydir.c:56
+msgid "empty dirblocks"
+msgstr "boþ dizin bloklarý"
+
+#: e2fsck/emptydir.c:61
+msgid "empty dir map"
+msgstr "boþ dizin eþlemi"
+
+#. Inode number 11 is usually lost+found
+#: e2fsck/emptydir.c:97
+#, c-format
+msgid "Empty directory block %d (#%d) in inode %d\n"
+msgstr "Düðüm %3d deki dizin bloku %1d (#%2d) boþ\n"
+
+#: e2fsck/extend.c:21
+#, c-format
+msgid "%s: %s filename nblocks blocksize\n"
+msgstr "%s: %s dosya_ismi blok_sayýsý blok_boyu\n"
+
+#: e2fsck/extend.c:43
+msgid "Illegal number of blocks!\n"
+msgstr "Blok sayýsý kuraldýþý!\n"
+
+#: e2fsck/extend.c:49
+#, c-format
+msgid "Couldn't allocate block buffer (size=%d)\n"
+msgstr "Blok tamponu ayrýlamadý (boyu=%d)\n"
+
+#: e2fsck/flushb.c:44
+#, c-format
+msgid "Usage: %s disk\n"
+msgstr "Kullanýmý: %s disk\n"
+
+#: e2fsck/flushb.c:73
+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 dosya_indeksi_tampon_bloklarý] aygýt\n"
+
+#: e2fsck/iscan.c:81 e2fsck/unix.c:599 resize/main.c:173
+#, 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:605 resize/main.c:180
+#, 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:340
+msgid "while opening inode scan"
+msgstr "dosya indeksi taramasý baþlatýlýrken hata oluþtu"
+
+#: e2fsck/iscan.c:127 misc/e2image.c:355
+msgid "while getting next inode"
+msgstr "sonraki dosya indeksine geçilirken hata oluþtu"
+
+#: e2fsck/iscan.c:136
+#, c-format
+msgid "%d inodes scanned.\n"
+msgstr "%d dosya indeksi tarandý.\n"
+
+#: e2fsck/journal.c:47
+#, c-format
+msgid "bmap journal inode %ld, block %d\n"
+msgstr "bmap jurnal dosya indeksi %ld, blok %d\n"
+
+#: e2fsck/journal.c:384
+msgid "reading journal superblock\n"
+msgstr "jurnal super bloku okunuyor\n"
+
+#: e2fsck/journal.c:441
+#, c-format
+msgid "%s: no valid journal superblock found\n"
+msgstr "%s: geçerli jurnal super bloku yok\n"
+
+#: e2fsck/journal.c:450
+#, c-format
+msgid "%s: journal too short\n"
+msgstr "%s: jurnal çok kýsa\n"
+
+#: e2fsck/journal.c:702
+#, c-format
+msgid "%s: recovering journal\n"
+msgstr "%s: jurnal kurtarýlýyor\n"
+
+#: e2fsck/journal.c:704
+#, c-format
+msgid "%s: won't do journal recovery while read-only\n"
+msgstr "%s: salt-okunur durumdayken jurnal kurtarmasý yapýlamaz\n"
+
+#: e2fsck/journal.c:725
+#, c-format
+msgid "while trying to re-open %s"
+msgstr "%s yeniden açýlmaya çalýþýlýrken hata oluþtu"
+
+#: e2fsck/message.c:103
+msgid "aextended attribute"
+msgstr "aek özellik"
+
+#: e2fsck/message.c:104
+msgid "Aerror allocating"
+msgstr "Aayrýlýrken hata oluþtu"
+
+#: e2fsck/message.c:105
+msgid "bblock"
+msgstr "bblok"
+
+#: e2fsck/message.c:106
+msgid "Bbitmap"
+msgstr "Bbiteþlem"
+
+#: e2fsck/message.c:107
+msgid "ccompress"
+msgstr "csýkýþtýrma"
+
+#: e2fsck/message.c:108
+msgid "Cconflicts with some other fs @b"
+msgstr "Cbazý dosya sistemi bloklarý ile çeliþiyor"
+
+#: e2fsck/message.c:109
+msgid "iinode"
+msgstr "idosya indeksi"
+
+#: e2fsck/message.c:110
+msgid "Iillegal"
+msgstr "Ikuraldýþý"
+
+#: e2fsck/message.c:111
+msgid "jjournal"
+msgstr "jjurnal"
+
+#: e2fsck/message.c:112
+msgid "Ddeleted"
+msgstr "Dsilinen"
+
+#: e2fsck/message.c:113
+msgid "ddirectory"
+msgstr "ddizin"
+
+#: e2fsck/message.c:114
+msgid "eentry"
+msgstr "egirdi"
+
+#: e2fsck/message.c:115
+msgid "E at e '%Dn' in %p (%i)"
+msgstr "E%2p (%3i) içindeki '%1Dn' girdisi"
+
+#: e2fsck/message.c:116
+msgid "ffilesystem"
+msgstr "fdosya sistemi"
+
+#: e2fsck/message.c:117
+msgid "Ffor @i %i (%Q) is"
+msgstr "F%i (%Q) dosya indeksi için"
+
+#: e2fsck/message.c:118
+msgid "ggroup"
+msgstr "ggrup"
+
+#: e2fsck/message.c:119
+msgid "llost+found"
+msgstr "llost+found"
+
+#: e2fsck/message.c:120
+msgid "Lis a link"
+msgstr "Lbir baðdýr"
+
+#: e2fsck/message.c:121
+msgid "oorphaned"
+msgstr "oartýk"
+
+#: e2fsck/message.c:122
+msgid "rroot @i"
+msgstr "rkök @i"
+
+#: e2fsck/message.c:123
+msgid "sshould be"
+msgstr "solmalýydý"
+
+#: e2fsck/message.c:124
+msgid "Ssuper at b"
+msgstr "Ssüper blok"
+
+#: e2fsck/message.c:125
+msgid "uunattached"
+msgstr "ubaðlantýsýz"
+
+#: e2fsck/message.c:126
+msgid "vdevice"
+msgstr "vaygýt"
+
+#: e2fsck/message.c:127
+msgid "zzero-length"
+msgstr "zsýfýr uzunluklu"
+
+#: e2fsck/message.c:138
+msgid "<The NULL inode>"
+msgstr "<NULL dosya indeksi>"
+
+#. 0
+#: e2fsck/message.c:139
+msgid "<The bad blocks inode>"
+msgstr "<Hatalý bloklar dosya indeksi>"
+
+#. 1
+#. 2
+#: e2fsck/message.c:141
+msgid "<The ACL index inode>"
+msgstr "<ACL indeksinin dosya indeksi>"
+
+#. 3
+#: e2fsck/message.c:142
+msgid "<The ACL data inode>"
+msgstr "<ACL verisinin dosya indeksi>"
+
+#. 4
+#: e2fsck/message.c:143
+msgid "<The boot loader inode>"
+msgstr "<Önyükleyici dosya indeksi>"
+
+#. 5
+#: e2fsck/message.c:144
+msgid "<The undelete directory inode>"
+msgstr "<Kurtarýlan dizin dosya indeksi>"
+
+#. 6
+#: e2fsck/message.c:145
+msgid "<The group descriptor inode>"
+msgstr "<Grup tanýmlayýcý dosya indeksi>"
+
+#. 7
+#: e2fsck/message.c:146
+msgid "<The journal inode>"
+msgstr "<Jurnal dosya indeksi>"
+
+#. 8
+#: e2fsck/message.c:147
+msgid "<Reserved inode 9>"
+msgstr "<Yedek dosya indeksi 9>"
+
+#. 9
+#: e2fsck/message.c:148
+msgid "<Reserved inode 10>"
+msgstr "<Yedek dosya indeksi 10>"
+
+#: e2fsck/pass1b.c:127
+msgid "multiply claimed inode map"
+msgstr "tekrarlanan bloklarýn dosya indeksi eþlemi"
+
+#: e2fsck/pass1b.c:539 e2fsck/pass1b.c:650
+#, c-format
+msgid "internal error; can't find dup_blk for %d\n"
+msgstr "iç hata; %d için dup_blk bulunamýyor\n"
+
+#: e2fsck/pass1b.c:687
+msgid "returned from clone_file_block"
+msgstr "clone_file_block iþlevinden döndürüldü"
+
+#.
+#. * Allocate bitmaps structures
+#.
+#: e2fsck/pass1.c:290
+msgid "in-use inode map"
+msgstr "kullanýmdaki dosya indeksi eþlemi"
+
+#: e2fsck/pass1.c:299
+msgid "directory inode map"
+msgstr "dizin indeksi eþlemi"
+
+#: e2fsck/pass1.c:307
+msgid "regular file inode map"
+msgstr "normal dosya indeksi eþlemi"
+
+#: e2fsck/pass1.c:314
+msgid "in-use block map"
+msgstr "kullanýmdaki blok eþlemi"
+
+#: e2fsck/pass1.c:361
+msgid "doing inode scan"
+msgstr "dosya indeksi taramasý yapýlýyor"
+
+#: e2fsck/pass1.c:737
+msgid "Pass 1"
+msgstr "1. geçiþ"
+
+#: e2fsck/pass1.c:795
+#, c-format
+msgid "reading indirect blocks of inode %u"
+msgstr "%u dosya indeksinin dolaylý bloklarý okunuyor"
+
+#: e2fsck/pass1.c:837
+msgid "bad inode map"
+msgstr "hatalý dosya indeksi eþlemi"
+
+#: e2fsck/pass1.c:859
+msgid "inode in bad block map"
+msgstr "hatalý blok eþlemindeki dosya indeksi"
+
+#: e2fsck/pass1.c:879
+msgid "imagic inode map"
+msgstr "imagic dosya indeksi eþlemi"
+
+#: e2fsck/pass1.c:906
+msgid "multiply claimed block map"
+msgstr "tekrarlanan bloklarýn eþlemi"
+
+#: e2fsck/pass1.c:1006
+msgid "ext attr block map"
+msgstr "ek öznitelik bloðu eþlemi"
+
+#: e2fsck/pass1.c:1673
+msgid "block bitmap"
+msgstr "blok biteþlemi"
+
+#: e2fsck/pass1.c:1677
+msgid "inode bitmap"
+msgstr "dosya indeksi biteþlemi"
+
+#: e2fsck/pass1.c:1681
+msgid "inode table"
+msgstr "dosya indeksi tablosu"
+
+#.
+#. * Allocate some bitmaps to do loop detection.
+#.
+#: e2fsck/pass3.c:85
+msgid "inode done bitmap"
+msgstr "dosya indeksi yapýlmýþ biteþlem"
+
+#: e2fsck/pass3.c:96
+msgid "Peak memory"
+msgstr "Doruk bellek"
+
+#: e2fsck/pass3.c:141
+msgid "Pass 3"
+msgstr "3. geçiþ"
+
+#: e2fsck/pass3.c:331
+msgid "inode loop detection bitmap"
+msgstr "dosya indeksi döngüsü saptama biteþlemi"
+
+#. Should never happen
+#: e2fsck/pass3.c:584
+msgid "Debug error in e2fsck adjust_inode_count, should never happen.\n"
+msgstr "e2fsck hata ayýklamasýnda adjust_inode_count hatasý olmamalýydý.\n"
+
+#: e2fsck/pass4.c:163
+msgid "Pass 4"
+msgstr "4. geçiþ"
+
+#: e2fsck/pass5.c:70
+msgid "Pass 5"
+msgstr "5. geçiþ"
+
+#: e2fsck/problem.c:47
+msgid "(no prompt)"
+msgstr "(komut istemi yok)"
+
+#. 0
+#: e2fsck/problem.c:48
+msgid "Fix"
+msgstr "Düzelt"
+
+#. 1
+#: e2fsck/problem.c:49
+msgid "Clear"
+msgstr "Temizle"
+
+#. 2
+#: e2fsck/problem.c:50
+msgid "Relocate"
+msgstr "Konumlandýr"
+
+#. 3
+#: e2fsck/problem.c:51
+msgid "Allocate"
+msgstr "Tahsis et"
+
+#. 4
+#: e2fsck/problem.c:52
+msgid "Expand"
+msgstr "Geniþlet"
+
+#. 5
+#: e2fsck/problem.c:53
+msgid "Connect to /lost+found"
+msgstr "/lost+found a baðlan"
+
+#. 6
+#: e2fsck/problem.c:54
+msgid "Create"
+msgstr "Oluþtur"
+
+#. 7
+#: e2fsck/problem.c:55
+msgid "Salvage"
+msgstr "Kurtarýlacaklar"
+
+#. 8
+#: e2fsck/problem.c:56
+msgid "Truncate"
+msgstr "Kýrp"
+
+#. 9
+#: e2fsck/problem.c:57
+msgid "Clear inode"
+msgstr "Dosya indeksini temizle"
+
+#. 10
+#: e2fsck/problem.c:58
+msgid "Abort"
+msgstr "Vazgeç"
+
+#. 11
+#: e2fsck/problem.c:59
+msgid "Split"
+msgstr "Ayýr"
+
+#. 12
+#: e2fsck/problem.c:60
+msgid "Continue"
+msgstr "Devam et"
+
+#. 13
+#: e2fsck/problem.c:61
+msgid "Clone duplicate/bad blocks"
+msgstr "tekrarlý/hatalý bloklalarý kopyala"
+
+#. 14
+#: e2fsck/problem.c:62
+msgid "Delete file"
+msgstr "Dosyayý Sil"
+
+#. 15
+#: e2fsck/problem.c:63
+msgid "Suppress messages"
+msgstr "Ýletileri engelle"
+
+#. 16
+#: e2fsck/problem.c:64
+msgid "Unlink"
+msgstr "Baðý kaldýr"
+
+#: e2fsck/problem.c:72
+msgid "(NONE)"
+msgstr "(HÝÇBÝRÝ)"
+
+#. 0
+#: e2fsck/problem.c:73
+msgid "FIXED"
+msgstr "DÜZELTÝLDÝ"
+
+#. 1
+#: e2fsck/problem.c:74
+msgid "CLEARED"
+msgstr "TEMÝZLENDÝ"
+
+#. 2
+#: e2fsck/problem.c:75
+msgid "RELOCATED"
+msgstr "KONUMLANDI"
+
+#. 3
+#: e2fsck/problem.c:76
+msgid "ALLOCATED"
+msgstr "TAHSÝS EDÝLDÝ"
+
+#. 4
+#: e2fsck/problem.c:77
+msgid "EXPANDED"
+msgstr "GENÝÞLETÝLDÝ"
+
+#. 5
+#: e2fsck/problem.c:78
+msgid "RECONNECTED"
+msgstr "TEKRAR BAÐLANDI"
+
+#. 6
+#: e2fsck/problem.c:79
+msgid "CREATED"
+msgstr "OLUÞTURULDU"
+
+#. 7
+#: e2fsck/problem.c:80
+msgid "SALVAGED"
+msgstr "KURTARILABÝLÝRLER LÝSTELENDÝ"
+
+#. 8
+#: e2fsck/problem.c:81
+msgid "TRUNCATED"
+msgstr "KIRPILDI"
+
+#. 9
+#: e2fsck/problem.c:82
+msgid "INODE CLEARED"
+msgstr "DOSYA ÝNDEKSÝ TEMÝZLENDÝ"
+
+#. 10
+#: e2fsck/problem.c:83
+msgid "ABORTED"
+msgstr "VAZGEÇÝLDÝ"
+
+#. 11
+#: e2fsck/problem.c:84
+msgid "SPLIT"
+msgstr "AYRILDI"
+
+#. 12
+#: e2fsck/problem.c:85
+msgid "CONTINUING"
+msgstr "SÜRÜYOR"
+
+#. 13
+#: e2fsck/problem.c:86
+msgid "DUPLICATE/BAD BLOCKS CLONED"
+msgstr "TEKRARLI/HATALI BLOKLAR KOPYALANDI"
+
+#. 14
+#: e2fsck/problem.c:87
+msgid "FILE DELETED"
+msgstr "DOSYA SÝLÝNDÝ"
+
+#. 15
+#: e2fsck/problem.c:88
+msgid "SUPPRESSED"
+msgstr "ENGELLENDÝ"
+
+#. 16
+#: e2fsck/problem.c:89
+msgid "UNLINKED"
+msgstr "BAÐ KALDIRILDI"
+
+#. Pre-Pass 1 errors
+#. Block bitmap not in group
+#: e2fsck/problem.c:97
+msgid "@b @B for @g %g is not in @g. (@b %b)\n"
+msgstr "%g grubunun @b biteþlemi @g içinde deðil. (%b @b)\n"
+
+#. Inode bitmap not in group
+#: e2fsck/problem.c:101
+msgid "@i @B for @g %g is not in @g. (@b %b)\n"
+msgstr "%g grubunun @i biteþlemi @g içinde deðil. (%b @b)\n"
+
+#: e2fsck/problem.c:106
+msgid ""
+"@i table for @g %g is not in @g. (@b %b)\n"
+"WARNING: SEVERE DATA LOSS POSSIBLE.\n"
+msgstr ""
+"%g grubunun @i tablosu @g içinde deðil. (%b @b)\n"
+"UYARI: CÝDDÝ VERÝ KAYBI OLASILIÐI.\n"
+
+#: e2fsck/problem.c:112
+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"
+"Super blok okunamýyor ya da doðru ext2 @f tanýmlamýyor.\n"
+"Aygýt geçerliyse ve gerçekten bir ext2 @f içeriyorsa,\n"
+"(ve bir takas bölümü veya ufs ya da her neyse deðilse)\n"
+"@S bozulmuþ demektir. Baþka bir @S ile e2fsck çalýþtýrmayý\n"
+"denemelisiniz:\n"
+" e2fsck -b %S <@v>\n"
+"\n"
+
+#: e2fsck/problem.c:121
+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 ile iliþkili) %b @b,\n"
+"@výn gerçek boyutu ise %c @btur.\n"
+"Hem @S hem de disk bölümleme tablosu bozuk olabilir!\n"
+
+#: e2fsck/problem.c:128
+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_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"
+
+#: e2fsck/problem.c:135
+msgid "@S @bs_per_group = %b, should have been %c\n"
+msgstr "@S grup_baþýna_blok_sayýsý = %b, %c olmalýydý\n"
+
+#: e2fsck/problem.c:140
+msgid "@S first_data_ at b = %b, should have been %c\n"
+msgstr "@S ilk_veri_bloðu = %b, %c olmalýydý\n"
+
+#: e2fsck/problem.c:145
+msgid ""
+"@f did not have a UUID; generating one.\n"
+"\n"
+msgstr "@f bir UUID içermiyor; bir tane üretiliyor.\n"
+
+#: e2fsck/problem.c:150
+msgid ""
+"Note: if there is several inode or block bitmap blocks\n"
+"which require relocation, or one part of the inode table\n"
+"which must be moved, you may wish to try running e2fsck\n"
+"with the '-b %S' option first. The problem may lie only\n"
+"with the primary block group descriptor, and the backup\n"
+"block group descriptor may be OK.\n"
+"\n"
+msgstr ""
+"Bilgi: Taþýnmasý gereken dosya indeksi tablosunun bir parçasý olan\n"
+"ya da yeniden konumlanmasý gereken blok biteþlemi bloklarý ya da\n"
+"dosya indeksleri varsa, e2fsck'yý önce '-b %S' seçeneðiyle çalýþtýrmak\n"
+"isteyebilirsiniz. Sorun sadece birincil blok grubu tanýmlayýcýsý ile\n"
+"ilgili olabilir ve yedekleme bloðu grubu tanýmlayýcýsý da doðru olabilir.\n"
+"\n"
+
+#: e2fsck/problem.c:160
+msgid "Corruption found in @S. (%s = %N).\n"
+msgstr "Super blok içinde bozukluk saptandý. (%s = %N).\n"
+
+#: e2fsck/problem.c:165
+#, 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"
+
+#: e2fsck/problem.c:170
+msgid "@i count in @S is %i, should be %j.\n"
+msgstr "@S içindeki @i sayýsý %i, %j olmalýydý.\n"
+
+#: e2fsck/problem.c:174
+msgid "The Hurd does not support the filetype feature.\n"
+msgstr "Hurd, dosya türü özelliðini desteklemiyor.\n"
+
+#: e2fsck/problem.c:179
+#, c-format
+msgid "@S has a bad ext3 @j (@i %i).\n"
+msgstr "@S hatalý bir @j içeriyor (%i @i).\n"
+
+#: e2fsck/problem.c:184
+msgid "External @j has multiple @f users (unsupported).\n"
+msgstr "Dýþ @j çok sayýda @f kullanýcýsý içeriyor. (desteklenmiyor)\n"
+
+#: e2fsck/problem.c:189
+msgid "Can't find external @j\n"
+msgstr "Dýþ @j bulunamýyor\n"
+
+#: e2fsck/problem.c:194
+msgid "External @j has bad @S\n"
+msgstr "Dýþ @j hatalý @S içeriyor\n"
+
+#: e2fsck/problem.c:199
+msgid "External @j does not support this @f\n"
+msgstr "Dýþ @j bu @fni desteklemiyor\n"
+
+#: e2fsck/problem.c:204
+msgid ""
+"Ext3 @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 @j @S türü %N bilinmiyor (desteklenmiyor).\n"
+"Bu kopya, bu @f tarafýndan desteklenmeyen ve/ya\n"
+"eski bir biçem gibi görünüyor.\n"
+"Ayrýca, @j super bloðunun bozuk olmasý da mümkün.\n"
+
+#: e2fsck/problem.c:212
+msgid "Ext3 @j @S is corrupt.\n"
+msgstr "Ext3 @j super bloðu bozuk.\n"
+
+#: e2fsck/problem.c:217
+#, c-format
+msgid "@S doesn't have has_journal flag, but has ext3 @j %s.\n"
+msgstr "@S jurnal_var bayraðý içermiyor, ama ext3 @j %s içeriyor.\n"
+
+#: e2fsck/problem.c:222
+msgid "@S has ext3 needs_recovery flag set, but no @j.\n"
+msgstr "@S ext3 kurtarma_gerekir bayraðý içeriyor ama @j yok.\n"
+
+#: e2fsck/problem.c:227
+msgid "*** WARNING *** leaving data in the @j may be DANGEROUS.\n"
+msgstr "*** UYARI *** @j içinde veri býrakmak TEHLÝKELÝ olabilir.\n"
+
+#: e2fsck/problem.c:232
+msgid "ext3 recovery flag clear, but journal has data.\n"
+msgstr "exf3 kurtarma bayraðý temizlendi, ama jurnal veri içeriyor.\n"
+
+#: e2fsck/problem.c:237
+msgid "%s @o @i %i (uid=%Iu, gid=%Ig, mode=%Im, size=%Is)\n"
+msgstr "%s @o @i %i (kull_kiml=%Iu, grup_kiml=%Ig, kip=%Im, boy=%Is)\n"
+
+#: e2fsck/problem.c:242
+msgid "@I @b #%B (%b) found in @o @i %i.\n"
+msgstr "@i %3i içindeki @b #%1B (%2b) @I.\n"
+
+#: e2fsck/problem.c:247
+msgid "Already cleared @b #%B (%b) found in @o @i %i.\n"
+msgstr "@o @i %3i içindeki @b #1%B (%2b) zaten temizlenmiþ.\n"
+
+#: e2fsck/problem.c:252
+#, c-format
+msgid "@I @o @i %i in @S.\n"
+msgstr "@S içindeki @o @i %i @I.\n"
+
+#: e2fsck/problem.c:257
+#, c-format
+msgid "@I @i %i in @o @i list.\n"
+msgstr "@o @i listesindeki @i %i @I\n"
+
+#: e2fsck/problem.c:267
+msgid "Ext3 @j @S has an unknown read-only feature flag set.\n"
+msgstr "Ext3 @j @S bilinmeyen salt-okunur özellikli bir bayrak içeriyor.\n"
+
+#: e2fsck/problem.c:272
+msgid "Ext3 @j @S has an unknown incompatible feature flag set.\n"
+msgstr "Ext3 @j @S bilinmeyen uyumsuz özellikli bir bayrak içeriyor.\n"
+
+#: e2fsck/problem.c:277
+msgid "@j version not supported by this e2fsck.\n"
+msgstr "@j sürümü bu e2fsck tarafýndan desteklenmiyor.\n"
+
+#: e2fsck/problem.c:282
+#, c-format
+msgid ""
+"Moving @j from /%s to hidden inode.\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:287
+#, fuzzy, c-format
+msgid ""
+"Error moving @j: %m\n"
+"\n"
+msgstr "Düðüm %i okunurken hata oluþtu: %m\n"
+
+#: e2fsck/problem.c:292
+msgid ""
+"Found invalid V2 @j @S fields (from V1 journal).\n"
+"Clearing fields beyond the V1 @j @S...\n"
+"\n"
+msgstr ""
+
+#: e2fsck/problem.c:300
+msgid "Pass 1: Checking @is, @bs, and sizes\n"
+msgstr "1. geçiþ: dosya indeksleri, @blar ve uzunluklar denetleniyor\n"
+
+#. Root directory is not an inode
+#: e2fsck/problem.c:304
+msgid "@r is not a @d. "
+msgstr "@r bir @d deðildir. "
+
+#: e2fsck/problem.c:309
+msgid "@r has dtime set (probably due to old mke2fs). "
+msgstr "@r için dtime belirtilmiþ (eski mke2fs'den dolayý olabilir). "
+
+#: e2fsck/problem.c:314
+msgid "Reserved @i %i %Q has bad mode. "
+msgstr "Yedek @i %i %Q hatalý kip içeriyor. "
+
+#: e2fsck/problem.c:319
+#, c-format
+msgid "@D @i %i has zero dtime. "
+msgstr "@D @i %i sýfýr dtime içeriyor. "
+
+#: e2fsck/problem.c:324
+#, c-format
+msgid "@i %i is in use, but has dtime set. "
+msgstr "@i %i kullanýmda, ama dtime belirtilmiþ. "
+
+#: e2fsck/problem.c:329
+#, c-format
+msgid "@i %i is a @z @d. "
+msgstr "@i %i bir @z @ddir. "
+
+#: e2fsck/problem.c:334
+msgid "@g %g's @b @B at %b @C.\n"
+msgstr "%g grubunun %b deki @b @Binde @C.\n"
+
+#: e2fsck/problem.c:339
+msgid "@g %g's @i @B at %b @C.\n"
+msgstr "%g grubunun %b deki @i @Binde @C.\n"
+
+#: e2fsck/problem.c:344
+msgid "@g %g's @i table at %b @C.\n"
+msgstr "%g grubunun %b deki @i tablosunda @C.\n"
+
+#: e2fsck/problem.c:349
+msgid "@g %g's @b @B (%b) is bad. "
+msgstr "%g grubunun @b @Bi (%b) hatalý. "
+
+#: e2fsck/problem.c:354
+msgid "@g %g's @i @B (%b) is bad. "
+msgstr "%g grubunun @i @Bi (%b) hatalý. "
+
+#: e2fsck/problem.c:359
+msgid "@i %i, i_size is %Is, @s %N. "
+msgstr "@i %i indeks uzunluðu %Is, %N @s. "
+
+#: e2fsck/problem.c:364
+msgid "@i %i, i_ at bs is %Ib, @s %N. "
+msgstr "@i %i, @b indeksi %Ib, %N @s. "
+
+#: e2fsck/problem.c:369
+msgid "@I @b #%B (%b) in @i %i. "
+msgstr "@i %3i içindeki @b #1%B (2%b) @I. "
+
+#: e2fsck/problem.c:374
+msgid "@b #%B (%b) overlaps @f metadata in @i %i. "
+msgstr "@i %3i içindeki @b #1%B (%2b) @f metaverisinin üzerine taþýyor. "
+
+#: e2fsck/problem.c:379
+#, c-format
+msgid "@i %i has illegal @b(s). "
+msgstr "@i %i @I @b(lar) içeriyor. "
+
+#: e2fsck/problem.c:384
+#, c-format
+msgid "Too many illegal @bs in @i %i.\n"
+msgstr "Düðüm %i içinde çok fazla kuraldýþý blok.\n"
+
+#: e2fsck/problem.c:389
+msgid "@I @b #%B (%b) in bad @b @i. "
+msgstr "Hatalý blok düðümü içindeki blok %B (%b) kuraldýþý. "
+
+#: e2fsck/problem.c:394
+msgid "Bad @b @i has illegal @b(s). "
+msgstr "Hatalý blok düðümü kuraldýþý blok(lar) içeriyor. "
+
+#: e2fsck/problem.c:399
+msgid "Duplicate or bad @b in use!\n"
+msgstr "Tekrarlanmýþ ya da hatalý blok kullanýmda!\n"
+
+#: e2fsck/problem.c:404
+msgid "Bad @b %b used as bad @b indirect @b?!?\n"
+msgstr ""
+"Hatalý blok %b, hatalý blok yerine kullanýlan blok olarak kullanýlmýþ?!?\n"
+
+#: e2fsck/problem.c:409
+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"
+"Bu aykýrýlýk e2fsck ile düzeltilemez; düzeltmek için hatalý bloklar "
+"listesini\n"
+"dökümleyecek 'dumpe2fs -b' komutunu ve sonra onu tekrar geriye\n"
+"okuyacak olan 'e2fsck -L dosyaismi' komutunu kullanýn.\n"
+
+#: e2fsck/problem.c:417
+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"
+
+#: e2fsck/problem.c:422
+msgid ""
+"You can clear the this @b (and hope for the best) from the\n"
+"bad @b list and hope that @b is really OK, but there are no\n"
+"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"
+
+#: e2fsck/problem.c:429
+msgid "The primary @S (%b) is on the bad @b list.\n"
+msgstr "Birincil süperblok (%b) hatalý bloklar listesinde kayýtlý.\n"
+
+#: e2fsck/problem.c:434
+msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
+msgstr "Birincil grup tanýmýndaki blok %b, hatalý bloklar listesinde kayýtlý\n"
+
+#: e2fsck/problem.c:440
+msgid "Warning: Group %g's @S (%b) is bad.\n"
+msgstr "Uyarý: %g grubunun superbloðu (%b) hatalý.\n"
+
+#: e2fsck/problem.c:445
+msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
+msgstr "Uyarý %g grubunun grup tanýmý kopyasý bir hatalý blok içeriyor (%b).\n"
+
+#: e2fsck/problem.c:451
+msgid "Programming error? @b #%b claimed for no reason in process_bad_ at b.\n"
+msgstr ""
+"Programlama hatasý? blok %b, hatalý blok iþleminde sebepsiz olarak talep "
+"edildi.\n"
+
+#: e2fsck/problem.c:457
+msgid "@A %N @b(s) for %s: %m\n"
+msgstr "%2s için %1N bloða yer ayrýlýrken hata oluþtu: %3m\n"
+
+#: e2fsck/problem.c:462
+#, 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"
+
+#: e2fsck/problem.c:467
+msgid "Relocating @g %g's %s from %b to %c...\n"
+msgstr "%g grubunun %s %b den %c ye aktarýlýyor...\n"
+
+#: e2fsck/problem.c:472
+#, c-format
+msgid "Relocating @g %g's %s to %c...\n"
+msgstr "%g grubunun %s %c ye aktarýlýyor...\n"
+
+#: e2fsck/problem.c:477
+msgid "Warning: could not read @b %b of %s: %m\n"
+msgstr "Uyarý: %2s nin %1b bloðu okunamadý: %3m\n"
+
+#: e2fsck/problem.c:482
+msgid "Warning: could not write @b %b for %s: %m\n"
+msgstr "Uyarý: %2s nin %1b bloðu yazýlamadý: %3m\n"
+
+#: e2fsck/problem.c:497
+#, 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"
+
+#: e2fsck/problem.c:502
+#, c-format
+msgid "@A @d @b array: %m\n"
+msgstr "Dizin bloðu dizisine yer ayrýlýrken hata oluþtu: %m\n"
+
+#: e2fsck/problem.c:507
+#, c-format
+msgid "Error while scanning @is (%i): %m\n"
+msgstr "Düðümler(%i) taranýrken hata oluþtu: %m\n"
+
+#: e2fsck/problem.c:512
+#, 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"
+
+#: e2fsck/problem.c:517
+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"
+
+#: e2fsck/problem.c:522
+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"
+
+#: e2fsck/problem.c:528
+#, c-format
+msgid "Error reading @i %i: %m\n"
+msgstr "Düðüm %i okunurken hata oluþtu: %m\n"
+
+#: e2fsck/problem.c:536
+#, c-format
+msgid "@i %i has imagic flag set. "
+msgstr "Düðüm %i imagic bayraðý içeriyor. "
+
+#: e2fsck/problem.c:541
+#, 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 (@i %i),\n"
+"salt-eklenir ya da deðiþmez bayraðý içeriyor. "
+
+#: e2fsck/problem.c:547
+#, 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. "
+
+#: e2fsck/problem.c:567
+msgid "@j is not regular file. "
+msgstr "Jurnal normal bir dosya deðil. "
+
+#: e2fsck/problem.c:572
+#, c-format
+msgid "@i %i was part of the orphaned @i list. "
+msgstr "Düðüm %i artýk düðüm listesinin parçasýydý. "
+
+#: e2fsck/problem.c:578
+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. "
+
+#: e2fsck/problem.c:588
+msgid "Error reading @a @b %b for @i %i. "
+msgstr "Düðüm %2i için ek özellik bloðu %1b okunurken hata oluþtu. "
+
+#: e2fsck/problem.c:593
+msgid "@i %i has a bad @a @b %b. "
+msgstr "Düðüm %i bir hatalý ek özellik bloðu %b içeriyor. "
+
+#: e2fsck/problem.c:598
+msgid "Error reading @a @b %b (%m). "
+msgstr "Ek özellik bloðu %b okunurken hata oluþtu (%m). "
+
+#: e2fsck/problem.c:603
+msgid "@a @b %b has reference count %B, should be %N. "
+msgstr "Ek özellik bloðu %b %B baþvuru sayýsýna sahip, %N olmalýydý. "
+
+#: e2fsck/problem.c:608
+msgid "Error writing @a @b %b (%m). "
+msgstr "Ek özellik bloðu %b yazýlýrken hata oluþtu (%m). "
+
+#: e2fsck/problem.c:613
+msgid "@a @b %b has h_blocks > 1. "
+msgstr "Ek özellik bloðu %b için çoklu EA bloklarý desteklenmiyor. "
+
+#: e2fsck/problem.c:618
+msgid "Error allocating @a @b %b. "
+msgstr "Ek özellik bloðu %b ayrýlýrken hata oluþtu. "
+
+#: e2fsck/problem.c:623
+msgid "@a @b %b is corrupt (allocation collision). "
+msgstr "Ek özellik bloðu %b bozuk (tahsis çatýþmasý). "
+
+#: e2fsck/problem.c:628
+msgid "@a @b %b is corrupt (invalid name). "
+msgstr "Ek özellik bloðu %b bozuk (geçersiz isim). "
+
+#: e2fsck/problem.c:633
+msgid "@a @b %b is corrupt (invalid value). "
+msgstr "Ek özellik bloðu %b bozuk (geçersiz deðer). "
+
+#: e2fsck/problem.c:640
+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"
+
+#: e2fsck/problem.c:646
+#, c-format
+msgid "Duplicate/bad @b(s) in @i %i:"
+msgstr "Düðüm %i içindeki tekrarlanmýþ/hatalý blok(lar):"
+
+#: e2fsck/problem.c:661
+#, c-format
+msgid "Error while scanning inodes (%i): %m\n"
+msgstr "Düðümler (%i) taranýrken hata oluþtu: %m\n"
+
+#: e2fsck/problem.c:666
+#, c-format
+msgid "@A @i @B (inode_dup_map): %m\n"
+msgstr "Düðüm biteþlemi (inode_dup_map) için yer ayrýlýrken hata oluþtu: %m\n"
+
+#: e2fsck/problem.c:671
+#, 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"
+
+#: e2fsck/problem.c:676
+msgid "Pass 1C: Scan directories for @is with dup @bs.\n"
+msgstr "Geçiþ 1C: tekrarlanmýþ bloklu düðümler için dizinler taranýyor.\n"
+
+#: e2fsck/problem.c:682
+msgid "Pass 1D: Reconciling duplicate @bs\n"
+msgstr "Geçiþ 1D: tekrarlanan bloklar yeniden uzlaþýlýyor\n"
+
+#: e2fsck/problem.c:687
+msgid ""
+"File %Q (@i #%i, mod time %IM) \n"
+" has %B duplicate @b(s), shared with %N file(s):\n"
+msgstr ""
+"Dosya %Q (düðüm %i, deðiþiklik zamaný %IM) \n"
+" tekrarlanan %B blok içeriyor ve %N dosya ile paylaþýmlý:\n"
+
+#: e2fsck/problem.c:693
+msgid "\t%Q (@i #%i, mod time %IM)\n"
+msgstr "\t%Q (düðüm %i, deðiþiklik zamaný %IM)\n"
+
+#: e2fsck/problem.c:698
+msgid "\t<@f metadata>\n"
+msgstr "\t<dosya sistemi metaverisi>\n"
+
+#: e2fsck/problem.c:703
+msgid ""
+"(There are %N @is containing duplicate/bad @bs.)\n"
+"\n"
+msgstr ""
+"(Tekrarlanan/hatalý bloklarý içeren %N düðüm var.)\n"
+"\n"
+
+#: e2fsck/problem.c:708
+msgid ""
+"Duplicated @bs already reassigned or cloned.\n"
+"\n"
+msgstr ""
+"Tekrarlanan bloklar zaten yeniden atandý ya da kopyalandý.\n"
+"\n"
+
+#: e2fsck/problem.c:721
+#, c-format
+msgid "Couldn't clone file: %m\n"
+msgstr "Dosya kopyalanamadý: %m\n"
+
+#: e2fsck/problem.c:727
+msgid "Pass 2: Checking @d structure\n"
+msgstr "Geçiþ 2: Dizin yapýsý denetleniyor\n"
+
+#: e2fsck/problem.c:732
+#, c-format
+msgid "Bad @i number for '.' in @d @i %i.\n"
+msgstr "Dizin düðümü %i içindeki '.' için düðüm numarasý hatalý.\n"
+
+#: e2fsck/problem.c:737
+msgid "@E has bad @i #: %Di.\n"
+msgstr "@E hatalý düðüm numarasý içeriyor: %Di.\n"
+
+#: e2fsck/problem.c:742
+msgid "@E has @D/unused @i %Di. "
+msgstr "@E silinmiþ/kullanýlmayan düðüm %Di içeriyor. "
+
+#: e2fsck/problem.c:747
+msgid "@E @L to '.' "
+msgstr "@E '.' ya bir baðdýr. "
+
+#: e2fsck/problem.c:752
+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"
+
+#: e2fsck/problem.c:757
+msgid "@E @L to @d %P (%Di).\n"
+msgstr "@E dizin %P (%Di) için bir baðdýr.\n"
+
+#: e2fsck/problem.c:762
+msgid "@E @L to the @r.\n"
+msgstr "@E kök düðümüne bir baðdýr.\n"
+
+#: e2fsck/problem.c:767
+msgid "@E has illegal characters in its name.\n"
+msgstr "@E isminde kuraldýþý karakterler içeriyor.\n"
+
+#: e2fsck/problem.c:772
+#, c-format
+msgid "Missing '.' in @d @i %i.\n"
+msgstr "Dizin düðümü %i içinde '.' eksik.\n"
+
+#: e2fsck/problem.c:777
+#, c-format
+msgid "Missing '..' in @d @i %i.\n"
+msgstr "Dizin düðümü %i içinde '..' eksik.\n"
+
+#: e2fsck/problem.c:782
+msgid "First @e '%Dn' (inode=%Di) in @d @i %i (%p) @s '.'\n"
+msgstr ""
+"Dizin düðümü %3i (%4p) içindeki ilk girdi '%1Dn' (@i=%2Di) '.' olmalý.\n"
+
+#: e2fsck/problem.c:787
+msgid "Second @e '%Dn' (inode=%Di) in @d @i %i @s '..'\n"
+msgstr ""
+"Dizin düðümü %3i (%4p) içindeki ikinci girdi '%1Dn' (düðüm = %2Di) '..' "
+"olmalý\n"
+
+#: e2fsck/problem.c:792
+msgid "i_faddr @F %IF, @s zero.\n"
+msgstr "@F i_faddr %IF, sýfýr olmalý.\n"
+
+#: e2fsck/problem.c:797
+msgid "i_file_acl @F %If, @s zero.\n"
+msgstr "@F i_file_acl %If, sýfýr olmalý.\n"
+
+#: e2fsck/problem.c:802
+msgid "i_dir_acl @F %Id, @s zero.\n"
+msgstr "@F i_dir_acl %Id, sýfýr olmalý.\n"
+
+#: e2fsck/problem.c:807
+msgid "i_frag @F %N, @s zero.\n"
+msgstr "@F i_frag %N, sýfýr olmalý.\n"
+
+#: e2fsck/problem.c:812
+msgid "i_fsize @F %N, @s zero.\n"
+msgstr "@F i_fsize %N, sýfýr olmalý.\n"
+
+#: e2fsck/problem.c:817
+msgid "@i %i (%Q) has a bad mode (%Im).\n"
+msgstr "Düðüm %i (%Q) bir hatalý kip (%Im) içeriyor.\n"
+
+#: e2fsck/problem.c:822
+msgid "@d @i %i, @b %B, offset %N: @d corrupted\n"
+msgstr "Dizin düðümü %i, blok %B, konum %N: dizin bozuk\n"
+
+#: e2fsck/problem.c:827
+msgid "@d @i %i, @b %B, offset %N: filename too long\n"
+msgstr "Dizin düðümü %i, blok %B, konum %N: dosya ismi çok uzun\n"
+
+#: e2fsck/problem.c:832
+msgid "@d @i %i has an unallocated @b #%B. "
+msgstr "Dizin düðümü %i bir ayrýlmayan blok #%B içeriyor. "
+
+#: e2fsck/problem.c:837
+#, 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"
+
+#: e2fsck/problem.c:842
+#, 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"
+
+#: e2fsck/problem.c:847
+msgid "@i %i (%Q) is an @I character @v.\n"
+msgstr "Düðüm %i (%Q) bir kuraldýþý karakter aygýtý.\n"
+
+#: e2fsck/problem.c:852
+msgid "@i %i (%Q) is an @I @b @v.\n"
+msgstr "Düðüm %i (%Q) bir kuraldýþý blok aygýtý.\n"
+
+#: e2fsck/problem.c:857
+msgid "@E is duplicate '.' @e.\n"
+msgstr "@E tekrarlayan '.' girdisi içeriyor.\n"
+
+#: e2fsck/problem.c:862
+msgid "@E is duplicate '..' @e.\n"
+msgstr "@E tekrarlayan '..' girdisi içeriyor.\n"
+
+#: e2fsck/problem.c:867 e2fsck/problem.c:1069
+#, c-format
+msgid "Internal error: couldn't find dir_info for %i.\n"
+msgstr "Ýç hata: %i için dizin bilgileri bulunamýyor.\n"
+
+#: e2fsck/problem.c:872
+msgid "@E has rec_len of %Dr, should be %N.\n"
+msgstr "@E %Dr kayýt uzunluðunda, %N olmalýydý.\n"
+
+#: e2fsck/problem.c:877
+#, c-format
+msgid "@A icount structure: %m\n"
+msgstr "icount veri yapýsý için yer ayrýlýrken hata oluþtu: %m\n"
+
+#: e2fsck/problem.c:882
+#, c-format
+msgid "Error interating over @d @bs: %m\n"
+msgstr "Dizin bloklarý üzerinde yineleme yapýlýrken hata oluþtu: %m\n"
+
+#: e2fsck/problem.c:887
+msgid "Error reading @d @b %b (@i %i): %m\n"
+msgstr "Dizin bloðu %b (düðüm %i) okunurken hata oluþtu: %m\n"
+
+#: e2fsck/problem.c:892
+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"
+
+#: e2fsck/problem.c:897
+#, 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"
+
+#: e2fsck/problem.c:902
+#, c-format
+msgid "Error deallocating @i %i: %m\n"
+msgstr "Düðüm %i býrakýlýrken hata: %m\n"
+
+#: e2fsck/problem.c:907
+msgid "@d @e for '.' is big. "
+msgstr "'.' için dizin girdisi büyük. "
+
+#: e2fsck/problem.c:912
+msgid "@i %i (%Q) is an @I FIFO.\n"
+msgstr "Düðüm %i (%Q) bir kuraldýþý FIFO.\n"
+
+#: e2fsck/problem.c:917
+msgid "@i %i (%Q) is an @I socket.\n"
+msgstr "Düðüm %i (%Q) bir kuraldýþý soket.\n"
+
+#: e2fsck/problem.c:922
+msgid "Setting filetype for @E to %N.\n"
+msgstr "@E için dosya türü %N olarak belirleniyor.\n"
+
+#: e2fsck/problem.c:927
+msgid "@E has an incorrect filetype (was %Dt, should be %N).\n"
+msgstr "@E yanlýþ dosya türünde (%Dt, %N olmalýydý).\n"
+
+#: e2fsck/problem.c:932
+msgid "@E has filetype set.\n"
+msgstr "@E için dosya türü belirtilmiþ.\n"
+
+#: e2fsck/problem.c:937
+msgid "@E has a zero-length name.\n"
+msgstr "@Enin ismi sýfýr uzunlukta.\n"
+
+#: e2fsck/problem.c:942
+msgid "Symlink %Q (@i #%i) has an invalid size (%Is).\n"
+msgstr "Sembolik bað %Q (düðüm #%i) uzunluðu geçersiz (%Is).\n"
+
+#: e2fsck/problem.c:947
+msgid "@a @b @F is invalid (%If).\n"
+msgstr "@F ek özellik bloðu geçersiz (%If).\n"
+
+#: e2fsck/problem.c:952
+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üperblok LARGE_FILE "
+"bayraksýz\n"
+
+#: e2fsck/problem.c:959
+msgid "Pass 3: Checking @d connectivity\n"
+msgstr "Geçiþ 3: Dizin baðlanabilirliði denetleniyor\n"
+
+#: e2fsck/problem.c:964
+msgid "@r not allocated. "
+msgstr "Kök düðümü tahsisli deðil. "
+
+#: e2fsck/problem.c:969
+msgid "No room in @l @d. "
+msgstr "/lost+found dizininde yer yok. "
+
+#: e2fsck/problem.c:974
+#, c-format
+msgid "Unconnected @d @i %i (%p)\n"
+msgstr "Dizin düðümü %i (%p) baðlanamadý\n"
+
+#: e2fsck/problem.c:979
+msgid "/@l not found. "
+msgstr "/lost+found dizini yok. "
+
+#: e2fsck/problem.c:984
+msgid "'..' in %Q (%i) is %P (%j), @s %q (%d).\n"
+msgstr "%Q (%i) daki '..' %P (%j), süperblok %q (%d).\n"
+
+#: e2fsck/problem.c:989
+msgid "Bad or non-existent /@l. Cannot reconnect.\n"
+msgstr "/lost+found dizini ya yok ya da hatalý. tekrar baðlanýlamýyor.\n"
+
+#: e2fsck/problem.c:994
+#, c-format
+msgid "Could not expand /@l: %m\n"
+msgstr "/lost+found dizini geniþletilemiyor: %m\n"
+
+#: e2fsck/problem.c:999
+#, c-format
+msgid "Could not reconnect %i: %m\n"
+msgstr "%i ye tekrar baðlanýlamýyor: %m\n"
+
+#: e2fsck/problem.c:1004
+#, c-format
+msgid "Error while trying to find /@l: %m\n"
+msgstr "/lost+found dizini bulunmaya çalýþýlýrkan hata oluþtu: %m\n"
+
+#: e2fsck/problem.c:1009
+#, c-format
+msgid "ext2fs_new_ at 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"
+
+#: e2fsck/problem.c:1014
+#, c-format
+msgid "ext2fs_new_ at 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"
+
+#: e2fsck/problem.c:1019
+#, c-format
+msgid "ext2fs_new_dir_ at b: %m while creating new @d @b\n"
+msgstr ""
+"ext2fs_new_dir_block: %m\n"
+"yeni dizin bloðu oluþturulurken hata.\n"
+
+#: e2fsck/problem.c:1024
+#, c-format
+msgid "ext2fs_write_dir_ at 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"
+
+#: e2fsck/problem.c:1029
+#, 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"
+
+#: e2fsck/problem.c:1034
+#, 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"
+
+#: e2fsck/problem.c:1039
+#, c-format
+msgid ""
+"Couldn't fix parent of @i %i: Couldn't find parent @d entry\n"
+"\n"
+msgstr ""
+"Düðüm %i için üst düðüm belirlenemedi: üst dizin girdisi bulunamadý\n"
+"\n"
+
+#: e2fsck/problem.c:1044
+msgid "@A @i @B (%N): %m\n"
+msgstr "Düðüm biteþlemi (%N) ayrýlýrken hata oluþtu: %m\n"
+
+#: e2fsck/problem.c:1049
+#, c-format
+msgid "Error creating root @d (%s): %m\n"
+msgstr "Kök dizini oluþturulurken hata (%s): %m\n"
+
+#: e2fsck/problem.c:1054
+#, c-format
+msgid "Error creating /@l @d (%s): %m\n"
+msgstr "/lost+found dizini oluþturulurken hata (%s): %m\n"
+
+#: e2fsck/problem.c:1059
+msgid "@r is not a @d; aborting.\n"
+msgstr "Kök düðümü bir dizin deðil; çýkýlýyor.\n"
+
+#: e2fsck/problem.c:1064
+msgid "Cannot proceed without a @r.\n"
+msgstr "Bir kök düðümü olmaksýzýn iþlenemez.\n"
+
+#: e2fsck/problem.c:1074
+#, 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:1081
+msgid "Pass 4: Checking reference counts\n"
+msgstr "Geçiþ 4: Baþvuru sayýsý denetleniyor\n"
+
+#: e2fsck/problem.c:1096
+msgid "@i %i ref count is %Il, @s %N. "
+msgstr "düðüm %i baþvuru sayýsý %Il, süperblok %N. "
+
+#: e2fsck/problem.c:1100
+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 should be the same!\n"
+msgstr ""
+"UYARI: E2FSCK'DA YAZILIM HATASI!\n"
+"\tYA DA BÝR MANKAFA (SÝZ)\n"
+"(pardon, yazar BONEHEAD (YOU) yazmýþ da)\n"
+"\tBAÐLI (CANLI) DOSYA SÝSTEMÝNÝ DENETLETÝYOR.\n"
+"düðüm_baðý_bilgileri[%i] = %N, düðüm.düðüm_baðý_sayýsý = %Il.\n"
+"Bunlar ayný olmalýydý!\n"
+
+#: e2fsck/problem.c:1110
+msgid "Pass 5: Checking @g summary information\n"
+msgstr "Geçiþ 5: grup özet bilgileri denetleniyor\n"
+
+#: e2fsck/problem.c:1115
+msgid "Padding at end of @i @B is not set. "
+msgstr "Düðüm biteþleminin sonundaki alan belirlenmemiþ. "
+
+#: e2fsck/problem.c:1120
+msgid "Padding at end of @b @B is not set. "
+msgstr "Blok biteþleminin sonundaki alan belirlenmemiþ. "
+
+#: e2fsck/problem.c:1125
+msgid "@b @B differences: "
+msgstr "blok biteþlemi farklarý: "
+
+#: e2fsck/problem.c:1145
+msgid "@i @B differences: "
+msgstr "düðüm biteþlemi farklarý: "
+
+#: e2fsck/problem.c:1165
+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"
+
+#: e2fsck/problem.c:1170
+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"
+
+#: e2fsck/problem.c:1175
+msgid "Free @is count wrong (%i, counted=%j).\n"
+msgstr "Serbest düðüm sayýsý yanlýþ (%i, sayýlan = %j).\n"
+
+#: e2fsck/problem.c:1180
+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"
+
+#: e2fsck/problem.c:1185
+msgid "Free @bs count wrong (%b, counted=%c).\n"
+msgstr "Serbest blok sayýsý yanlýþ (%b, sayýlan = %c).\n"
+
+#: e2fsck/problem.c:1190
+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"
+"hesaplanan biteþlem sýnýrlarý (%i, %j) ile uyuþmuyor\n"
+
+#: e2fsck/problem.c:1196
+msgid "Internal error: fudging end of bitmap (%N)\n"
+msgstr "Ýç hata: biteþlemin sonunda bozulma (%N)\n"
+
+#: e2fsck/problem.c:1308
+#, c-format
+msgid "Unhandled error code (%d)!\n"
+msgstr "Elde edilemeyen hata kodu (%d)!\n"
+
+#: e2fsck/problem.c:1382
+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:200
+#, fuzzy, c-format
+msgid "while calling ext2fs_block_iterate for inode %d"
+msgstr "ext2fs_block_iterate iþlevi çaðrýlýrken hata oluþtu"
+
+#: e2fsck/super.c:266
+#, fuzzy
+msgid "Truncating"
+msgstr "Kýrp"
+
+#: e2fsck/super.c:267
+#, fuzzy
+msgid "Clearing"
+msgstr "Temizle"
+
+#: e2fsck/swapfs.c:98
+msgid "while calling ext2fs_block_iterate"
+msgstr "ext2fs_block_iterate iþlevi çaðrýlýrken hata oluþtu"
+
+#: e2fsck/swapfs.c:104
+msgid "while calling iterator function"
+msgstr "- yineleme iþlevi çaðrýlýrken hata oluþtu"
+
+#: e2fsck/swapfs.c:125
+msgid "while allocating inode buffer"
+msgstr "- düðüm tampon belleði ayrýlýrken hata oluþtu"
+
+#: e2fsck/swapfs.c:137
+#, c-format
+msgid "while reading inode table (group %d)"
+msgstr "- düðüm tablosu okunurken hata oluþtu (grup %d)"
+
+#: e2fsck/swapfs.c:175
+#, c-format
+msgid "while writing inode table (group %d)"
+msgstr "- düðüm tablosu yazýlýrken hata oluþtu (grup %d)"
+
+#: e2fsck/swapfs.c:196
+msgid "Pass 0: Doing byte-swap of filesystem\n"
+msgstr "Geçiþ 0: dosya sisteminin baytlarý düzeltiliyor\n"
+
+#: e2fsck/swapfs.c:203
+#, c-format
+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"
+
+#: e2fsck/swapfs.c:229
+msgid "Byte swap"
+msgstr "Ters baytlý"
+
+#: e2fsck/unix.c:66
+#, c-format
+msgid ""
+"Usage: %s [-panyrcdfvstFSV] [-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 ext-journal] device\n"
+msgstr ""
+"Kullanýmý: %s [-panyrcdfvstFSV] [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"
+" -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"
+" -I tampon_blok_sayýsý\n"
+" -P iþlem_dosya_indeksi_boyu\n"
+"\n"
+"Çeviri hatalarýný <gnu-tr-u12a at lists.sourceforge.net> adresine bildiriniz.\n"
+"\n"
+
+#: e2fsck/unix.c:71
+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\n"
+" -f Force checking even if filesystem is marked clean\n"
+msgstr ""
+"\n"
+"Acil yardým:\n"
+" -c hatalý bloklar bulunur ve belirlenir\n"
+" -f disk bölümü temiz bile olsa denetim yapý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"
+" -p Hiçbir soru üretilmeden sistem otomatik "
+"onarýlýr\n"
+" -y Denetim sýrasýnda tüm sorulara EVET cevabý\n"
+" verildiði varsayýlýr.\n"
+
+#: e2fsck/unix.c:77
+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 ""
+" -b süperblok normal süperblok yerine kullanýlacak süperblok\n"
+" -B blokboyu süperblokun aranacaðý blok boyu belirtilir\n"
+" -j dýþ-jurnal-aygýtý jurnal dosyasýnýn aranacaðý aygýt belirtilir\n"
+" -l DOSYA DOSYAdaki hatalý bloklar, hatalý bloklar\n"
+" listesine eklenir\n"
+" -L DOSYA DOSYAdaki hatalý bloklar hatalý bloklar\n"
+" listesindekilerle deðiþtirilir\n"
+" -v ayrýntýlý bilgi verilir\n"
+
+#: e2fsck/unix.c:111
+#, c-format
+msgid "%s: %d/%d files (%0d.%d%% non-contiguous), %d/%d blocks\n"
+msgstr "%s: %d/%d dosya (%0d.%%%d yanyana olmayan düðüm), %d/%d blok\n"
+
+#: e2fsck/unix.c:126
+#, c-format
+msgid ""
+"\n"
+"%8d inodes used (%d%%)\n"
+msgstr ""
+"\n"
+"%8d düðüm kullanýlmýþ (%%%d)\n"
+
+#: e2fsck/unix.c:128
+#, c-format
+msgid "%8d non-contiguous inodes (%0d.%d%%)\n"
+msgstr "%8d yanyana olmayan düðüm (%0d.%d%%)\n"
+
+#: e2fsck/unix.c:130
+#, c-format
+msgid " # of inodes with ind/dind/tind blocks: %d/%d/%d\n"
+msgstr " ind/dind/tind bloklarýnýn düðüm sayýlarý: %d/%d/%d\n"
+
+#: e2fsck/unix.c:132
+#, c-format
+msgid ""
+"%8d blocks used (%d%%)\n"
+"%8d bad blocks\n"
+msgstr ""
+"%8d blok kullanýlmýþ (%%%d)\n"
+"%8d hatalý blok\n"
+
+#: e2fsck/unix.c:136
+#, c-format
+msgid "%8d large files\n"
+msgstr "%8d büyük dosya\n"
+
+#: e2fsck/unix.c:137
+#, c-format
+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 normal dosya\n"
+"%8d dizin\n"
+"%8d karakter özellikli aygýt dosyasý\n"
+"%8d blok özellikli aygýt dosyasý\n"
+"%8d fifo\n"
+"%8d dosya baðý\n"
+"%8d sembolik bað (%d hýzlý sembolik bað)\n"
+"%8d soket\n"
+"--------\n"
+"%8d dosya\n"
+
+#: e2fsck/unix.c:170
+#, c-format
+msgid "%8d large file%s\n"
+msgstr ""
+"%8d büyük dosya\n"
+"%s\n"
+
+#: e2fsck/unix.c:212 misc/badblocks.c:612 misc/tune2fs.c:665 misc/util.c:110
+#: resize/main.c:96
+#, 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:227
+#, c-format
+msgid "Warning! %s is mounted.\n"
+msgstr "Uyarý! %s baðlý.\n"
+
+#: e2fsck/unix.c:231
+#, c-format
+msgid "%s is mounted. "
+msgstr "%s baðlandý. "
+
+#: e2fsck/unix.c:233
+msgid ""
+"Cannot continue, aborting.\n"
+"\n"
+msgstr ""
+"Devam edilemiyor. çýkýlýyor.\n"
+"\n"
+
+#: e2fsck/unix.c:234
+msgid ""
+"\n"
+"\n"
+"WARNING!!! Running e2fsck on a mounted filesystem may cause\n"
+"SEVERE filesystem damage.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"UYARI!!! e2fsck'nýn baðlý bir dosya sisteminde çalýþtýrýlmasý\n"
+"ÇOK CÝDDÝ hasarlara sebep olabilir.\n"
+"\n"
+
+#: e2fsck/unix.c:237
+msgid "Do you really want to continue"
+msgstr "Gerçekten devam etmek istiyor musunuz?"
+
+#: e2fsck/unix.c:239
+msgid "check aborted.\n"
+msgstr "denetim durdu.\n"
+
+#: e2fsck/unix.c:260
+msgid " contains a file system with errors"
+msgstr " hatalý bir dosya sistemi içeriyor"
+
+#: e2fsck/unix.c:262
+msgid " was not cleanly unmounted"
+msgstr " usulünce sistemden ayrýlmamýþ"
+
+#: e2fsck/unix.c:266
+#, c-format
+msgid " has been mounted %u times without being checked"
+msgstr " denetlenmeksizin %u kere baðlandý"
+
+#: e2fsck/unix.c:271
+#, c-format
+msgid " has gone %u days without being checked"
+msgstr " denetlenmeksizin %u gün geçti"
+
+#: e2fsck/unix.c:277
+msgid ", check forced.\n"
+msgstr ", denetim baþlatýlacak.\n"
+
+#: e2fsck/unix.c:280
+#, c-format
+msgid "%s: clean, %d/%d files, %d/%d blocks\n"
+msgstr "%s: temiz, %d/%d dosya, %d/%d blok\n"
+
+#: e2fsck/unix.c:411
+#, c-format
+msgid "ERROR: Couldn't open /dev/null (%s)\n"
+msgstr "HATA: /dev/null açýlamadý (%s)\n"
+
+#: e2fsck/unix.c:482
+#, c-format
+msgid "Error validating file descriptor %d: %s\n"
+msgstr "Dosya tanýmý %d deðerlendirilirken hata: %s\n"
+
+#: e2fsck/unix.c:486
+msgid "Invalid completion information file descriptor"
+msgstr "Tamamlama bilgisi dosya tanýmý geçersiz"
+
+#: e2fsck/unix.c:510
+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:578
+msgid "Byte-swapping filesystems not compiled in this version of e2fsck\n"
+msgstr "Ters baytlý sistemleri e2fsck'nýn bu sürümünde derlenmemiþ\n"
+
+#: e2fsck/unix.c:614
+msgid "Incompatible options not allowed when byte-swapping.\n"
+msgstr "Ters baytlý sistemlerde uyumsuz seçeneklere izin verilmez.\n"
+
+#: e2fsck/unix.c:687
+msgid "Error: ext2fs library version out of date!\n"
+msgstr "Hata: ext2fs kitaplýk sürümü uygun deðil!\n"
+
+#: e2fsck/unix.c:695
+msgid "while trying to initialize program"
+msgstr "- uygulama baþlatýlmaya çelýþýlýrken hata oluþtu"
+
+#: e2fsck/unix.c:709
+#, c-format
+msgid "\tUsing %s, %s\n"
+msgstr "\t%s, %s kullanýlýyor\n"
+
+#: e2fsck/unix.c:721
+msgid "need terminal for interactive repairs"
+msgstr "etkileþimli onarým için terminal gerekli"
+
+#: e2fsck/unix.c:755
+#, c-format
+msgid "%s trying backup blocks...\n"
+msgstr "%s yedek bloklar deneniyor...\n"
+
+#: e2fsck/unix.c:756
+msgid "Couldn't find ext2 superblock,"
+msgstr "ext2 süperbloðu bulunamadý,"
+
+#: e2fsck/unix.c:757
+msgid "Group descriptors look bad..."
+msgstr "Grup tanýmlarý hatalý görünüyor..."
+
+#: e2fsck/unix.c:768
+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:774
+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:776
+#, 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:781
+msgid "Possibly non-existent or swap device?\n"
+msgstr "Bu mevcut olmayan bir aygýt ya da bir takas aygýtý olmalý?\n"
+
+#: e2fsck/unix.c:784
+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 kullanrak salt-oku kipinde\n"
+"denetim yapýnýz.\n"
+
+#: e2fsck/unix.c:800
+msgid "Get a newer version of e2fsck!"
+msgstr "e2fsck'nýn daha yeni bir sürümünü alýn!"
+
+#: e2fsck/unix.c:826
+#, c-format
+msgid "while checking ext3 journal for %s"
+msgstr "- %s için ext3 jurnali denetlenirken hata oluþtu"
+
+#: e2fsck/unix.c:838
+msgid ""
+"Warning: skipping journal recovery because doing a read-only filesystem "
+"check.\n"
+msgstr ""
+"Uyarý: Dosya sistemi salt-oku kipinde denetlendiðinden\n"
+"jurnal kurtarmasý atlanýyor.\n"
+
+#: e2fsck/unix.c:846
+#, c-format
+msgid "while recovering ext3 journal of %s"
+msgstr "- %s ext3 jurnal dosyasý kurtarýlmaya çalýþýlýrken hata oluþtu"
+
+#: e2fsck/unix.c:874
+msgid "Warning: compression support is experimental.\n"
+msgstr "Uyarý: sýkýþtýrma desteði deneyseldir.\n"
+
+#: e2fsck/unix.c:910
+#, c-format
+msgid "%s: Filesystem byte order already normalized.\n"
+msgstr "%s Dosya sisteminde baytlar zaten normal.\n"
+
+#: e2fsck/unix.c:930
+msgid "while reading bad blocks inode"
+msgstr "- hatalý bloklar düðümü okunmaya çalýþýlýrken hata oluþtu"
+
+#: e2fsck/unix.c:932
+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:939
+msgid "Restarting e2fsck from the beginning...\n"
+msgstr "e2fsck baþtan baþlýyor...\n"
+
+#: e2fsck/unix.c:943
+msgid "while resetting context"
+msgstr "- baðlam sýfýrlanýrken hata oluþtu"
+
+#: e2fsck/unix.c:960
+#, c-format
+msgid ""
+"\n"
+"%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
+msgstr ""
+"\n"
+"%s: ***** DOSYA SÝSTEMÝ DEÐÝÞTÝRÝLDÝ *****\n"
+
+#: e2fsck/unix.c:963
+#, c-format
+msgid "%s: ***** REBOOT LINUX *****\n"
+msgstr "%s: ***** MAKÝNAYI YENÝDEN BAÞLATIN *****\n"
+
+#: e2fsck/unix.c:971
+#, c-format
+msgid ""
+"\n"
+"%s: ********** WARNING: Filesystem still has errors **********\n"
+"\n"
+msgstr ""
+"\n"
+"%s: ********** UYARI: Dosya sistemi hala hatalý **********\n"
+"\n"
+
+#: e2fsck/util.c:76 misc/util.c:51
+msgid "yY"
+msgstr "eE"
+
+#: e2fsck/util.c:77
+msgid "nN"
+msgstr "hH"
+
+#: e2fsck/util.c:91
+msgid "<y>"
+msgstr "<e>"
+
+#: e2fsck/util.c:93
+msgid "<n>"
+msgstr "<h>"
+
+#: e2fsck/util.c:95
+msgid " (y/n)"
+msgstr " (e/h)"
+
+#: e2fsck/util.c:125
+#, c-format
+msgid ""
+"%s? no\n"
+"\n"
+msgstr ""
+"%s? hayýr\n"
+"\n"
+
+#: e2fsck/util.c:129
+#, c-format
+msgid ""
+"%s? yes\n"
+"\n"
+msgstr ""
+"%s? evet\n"
+"\n"
+
+#: e2fsck/util.c:133
+msgid "yes"
+msgstr "evet"
+
+#: e2fsck/util.c:133
+msgid "no"
+msgstr "hayýr"
+
+#: e2fsck/util.c:146
+#, c-format
+msgid "e2fsck_read_bitmaps: illegal bitmap block(s) for %s"
+msgstr "e2fsck_read_bitmaps: %s için blok(larýn) biteþlemi kuraldýþý"
+
+#: e2fsck/util.c:151
+msgid "reading inode and block bitmaps"
+msgstr "düðüm ve blok biteþlemleri okunuyor"
+
+#: e2fsck/util.c:156
+#, c-format
+msgid "while retrying to read bitmaps for %s"
+msgstr "- %s için biteþlemlerin okunmasý yinelenirken hata oluþtu"
+
+#: e2fsck/util.c:168
+msgid "writing block bitmaps"
+msgstr "blok biteþlemleri yazýlýyor"
+
+#: e2fsck/util.c:173
+#, c-format
+msgid "while retrying to write block bitmaps for %s"
+msgstr "- %s için blok biteþlemlerinin yazýlmasý yinelenirken hata oluþtu"
+
+#: e2fsck/util.c:180
+msgid "writing inode bitmaps"
+msgstr "düðüm biteþlemleri yazýlýyor"
+
+#: e2fsck/util.c:185
+#, c-format
+msgid "while retrying to write inode bitmaps for %s"
+msgstr "- %s için düðüm biteþlemlerinin yazýlmasý yinelenirken hata oluþtu"
+
+#: e2fsck/util.c:198
+#, 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 UYUMSUZLUK; fsck ÇALIÞTIRMALISINIZ.\n"
+"\t(-a ve -p seçeneklerini kullanmadan)\n"
+
+#: e2fsck/util.c:263
+#, c-format
+msgid "Memory used: %dk/%dk (%dk/%dk), "
+msgstr "Kullanýlan bellek: %dk/%dk (%dk/%dk), "
+
+#: e2fsck/util.c:267
+#, c-format
+msgid "Memory used: %d, "
+msgstr "Kullanýlan bellek: %d, "
+
+#: e2fsck/util.c:273
+#, c-format
+msgid "time: %5.2f/%5.2f/%5.2f\n"
+msgstr "zaman: %5.2f/%5.2f/%5.2f\n"
+
+#: e2fsck/util.c:278
+#, c-format
+msgid "elapsed time: %6.3f\n"
+msgstr "geçen süre: %6.3f\n"
+
+#: e2fsck/util.c:292
+#, c-format
+msgid "while reading inode %ld in %s"
+msgstr "- %ld düðümü %s den okunurken hata oluþtu"
+
+#: e2fsck/util.c:305
+#, c-format
+msgid "while writing inode %ld in %s"
+msgstr "- %ld düðümü %s e yazýlýrken hata oluþtu"
+
+#: misc/badblocks.c:57
+msgid "done \n"
+msgstr "bitti \n"
+
+#: misc/badblocks.c:67
+#, c-format
+msgid ""
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnf]\n"
+" [-c blocks_at_once] [-p num_passes] device [last_block [start_count]]\n"
+msgstr ""
+"Kullanýmý: %s [seçenekler] aygýt [bitiþ_bloðu [baþlangýç_bloðu]]\n"
+"\n"
+"Bir aygýttaki hatalý bloklarýn aranmasýnda kullanýlýr.\n"
+"\n"
+" bitiþ bloðu: verilmezse aygýtýn son bloðu öntanýmlýdýr.\n"
+"\n"
+" baþlangýç bloðu: bitiþ bloðu verilmesi halinde verilmesi isteðe baðlýdýr.\n"
+" verilmezse arama aygýtýn ilk bloðundan baþlatýlýr.\n"
+"\n"
+"Seçenekler:\n"
+" -b block_boyu blok uzunluðu, bayt olarak verilir\n"
+" -c blok_sayýsý bir kerede denetlenecek blok sayýsý, öntanýmlý deðeri "
+"16\n"
+" -f normalde hatalý bloklara oku-yaz iþlemi yapýlmaz.\n"
+" Bu, sistem baðlý deðilken -f seçeneði ile aþýlabilir.\n"
+" -i girdi_dosyasý bilinen hatalý bloklar bu dosyadan okunur\n"
+" -o çýktý_dosyasý hatalý bloklar bu dosyaya yazýlýr. Bu dosya daha sonra\n"
+" mke2fs ya da e2fsck tarafýndan -l seçeneði ile\n"
+" kullanýlabilir\n"
+" -p deneme_sayýsý hatalý bloklarýn bulunmasý için normalde tek deneme\n"
+" yapýlýr. Bu seçenekle deneme sayýsý belirtilebilir\n"
+" -n veri bozmayan salt-oku kipi yerine veri bozmayan\n"
+" oku-yaz kipi kullanýlýr\n"
+" -s iþlenen blok sayýsý ile sürecin izlenmesi saðlanýr\n"
+" -v iþlem sýrasýnda daha fazla ayrýntý verilir\n"
+" -w yazýlan deðer ile blok içeriðini karþýlaþtýran oku-yaz\n"
+" kipi kullanýlýr.\n"
+"ÖNEMLÝ: -w seçeneði verileri sildiðinden veri içeren dosya sistemlerinde\n"
+" kullanýlmamalýdýr.\n"
+"\n"
+"Çeviri hatalarýný <gnu-tr-u12a at lists.sourceforge.net> adresine bildiriniz.\n"
+"\n"
+
+#: misc/badblocks.c:171 misc/badblocks.c:198
+msgid "during seek"
+msgstr "eriþim sýrasýnda"
+
+#: misc/badblocks.c:178
+#, c-format
+msgid "Weird value (%ld) in do_read\n"
+msgstr "do_read için tuhaf deðer (%ld)\n"
+
+#: misc/badblocks.c:219
+msgid "during ext2fs_sync_device"
+msgstr "ext2fs_sync_device sýrasýnda"
+
+#: misc/badblocks.c:235 misc/badblocks.c:411
+msgid "while beginning bad block list iteration"
+msgstr "- hatalý blok listesi yinelemesine baþlanýrken hata oluþtu"
+
+#: misc/badblocks.c:245 misc/badblocks.c:314 misc/badblocks.c:421
+msgid "while allocating buffers"
+msgstr "- tampon bellek ayrýlýrken hata oluþtu"
+
+#: misc/badblocks.c:250
+msgid "Checking for bad blocks in read-only mode\n"
+msgstr "Hatalý bloklar salt-oku kipinde denetleniyor\n"
+
+#: misc/badblocks.c:251 misc/badblocks.c:323 misc/badblocks.c:440
+#, c-format
+msgid "From block %lu to %lu\n"
+msgstr "Blok %lu dan %lu ya kadar\n"
+
+#: misc/badblocks.c:259
+msgid "Checking for bad blocks (read-only test): "
+msgstr "Hatalý bloklar için denetleniyor (salt-oku testi): "
+
+#: misc/badblocks.c:322
+msgid "Checking for bad blocks in read-write mode\n"
+msgstr "Hatalý bloklar oku-yaz kipinde denetleniyor\n"
+
+#: misc/badblocks.c:329
+#, c-format
+msgid "Writing pattern 0x%08x: "
+msgstr "Maske 0x%08x yazýlýyor: "
+
+#: misc/badblocks.c:343 misc/badblocks.c:368
+#, c-format
+msgid "during seek on block %d"
+msgstr "%d bloðuna eriþim sýrasýnda"
+
+#: misc/badblocks.c:355
+msgid "Reading and comparing: "
+msgstr "Okunuyor ve karþýlaþtýrýlýyor: "
+
+#: misc/badblocks.c:428
+msgid "Initializing random test data\n"
+msgstr "Rasgele test verisi hazýrlanýyor\n"
+
+#: misc/badblocks.c:439
+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:443
+msgid "Checking for bad blocks (non-destructive read-write test): "
+msgstr "Hatalý bloklar için denetleniyor (veri bozmayan oku-yaz testi): "
+
+#: misc/badblocks.c:452
+msgid ""
+"\n"
+"Interrupt caught, cleaning up\n"
+msgstr ""
+"\n"
+"Kesme yakalandý, kaldýrýlýyor\n"
+
+#: misc/badblocks.c:509
+#, c-format
+msgid "during test data write, block %lu"
+msgstr "veri yazma denemesi sýrasýnda, blok %lu"
+
+#: misc/badblocks.c:619 misc/util.c:117
+#, c-format
+msgid "%s is mounted; "
+msgstr "%s baðlandý; "
+
+#: misc/badblocks.c:621
+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:625
+msgid "it's not safe to run badblocks!\n"
+msgstr "'badblocks' çalýþtýrmak güvenli deðil!\n"
+
+#: misc/badblocks.c:667 misc/mke2fs.c:825
+#, c-format
+msgid "bad block size - %s"
+msgstr "blok uzunluðu hatalý - %s"
+
+#: misc/badblocks.c:730
+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:736
+msgid "while trying to determine device size"
+msgstr "- aygýt alaný saptanmaya çalýþýlýrken hata oluþtu"
+
+#: misc/badblocks.c:742 misc/mke2fs.c:985
+#, c-format
+msgid "bad blocks count - %s"
+msgstr "blok sayýsý hatalý - %s"
+
+#: misc/badblocks.c:751
+#, c-format
+msgid "bad starting block - %s"
+msgstr "baþlangýç bloðu hatalý - %s"
+
+#: misc/badblocks.c:757
+#, c-format
+msgid "bad blocks range: %lu-%lu"
+msgstr "hatalý bloklar aralýðý: %lu-%lu"
+
+#: misc/badblocks.c:812
+msgid "creating in-memory bad blocks list"
+msgstr "hatalý bloklar listesi bellekte oluþturuluyor"
+
+#: misc/badblocks.c:827
+msgid "adding to in-memory bad block list"
+msgstr "bellekteki hatalý bloklar listesine ekleniyor"
+
+#: misc/badblocks.c:851
+#, c-format
+msgid "Pass completed, %u bad blocks found.\n"
+msgstr "Geçiþ tamamlandý, %u hatalý blok bulundu.\n"
+
+#: misc/chattr.c:81
+#, c-format
+msgid "usage: %s [-RV] [-+=AacdijsSu] [-v version] files...\n"
+msgstr ""
+"kullanýmý: %s [seçenekler] 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"
+" 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: jurnal; 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-u12a at lists.sourceforge.net> adresine bildiriniz.\n"
+"\n"
+
+#: misc/chattr.c:139
+#, c-format
+msgid "bad version - %s\n"
+msgstr "sürüm hatalý - %s\n"
+
+#: misc/chattr.c:183 misc/lsattr.c:107
+#, c-format
+msgid "while trying to stat %s"
+msgstr "- stat %s yapýlmaya çalýþýlýrken hata oluþtu"
+
+#: misc/chattr.c:200 misc/chattr.c:216
+#, c-format
+msgid "Flags of %s set as "
+msgstr "Belirlenen %s bayraklarý: "
+
+#: misc/chattr.c:209
+#, c-format
+msgid "while reading flags on %s"
+msgstr "- %s üzerinde bayraklar okunurken hata oluþtu"
+
+#: misc/chattr.c:222
+#, c-format
+msgid "while setting flags on %s"
+msgstr "- %s üzerinde bayraklar belirlenirken hata oluþtu"
+
+#: misc/chattr.c:227
+#, c-format
+msgid "Version of %s set as %lu\n"
+msgstr "%s sürümü %lu olarak belirlendi\n"
+
+#: misc/chattr.c:230
+#, c-format
+msgid "while setting version on %s"
+msgstr "- %s üzerinde sürüm belirlenirken hata oluþtu"
+
+#: misc/chattr.c:244
+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:275
+msgid "= is incompatible with - and +\n"
+msgstr "= ile + ve - uyumsuz\n"
+
+#: misc/chattr.c:283
+msgid "Must use '-v', =, - or +\n"
+msgstr "'-v', =, - veya + kullanýlmalý\n"
+
+#: misc/dumpe2fs.c:52
+#, c-format
+msgid "Usage: %s [-bfhixV] [-ob superblock] [-oB blocksize] device\n"
+msgstr ""
+"Kullanýmý: %s [seçenekler] 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 blok-boyu dosya sistemini tanýmlayan blok uzunluðu belirtilir\n"
+"\n"
+"Çeviri hatalarýný <gnu-tr-u12a at lists.sourceforge.net> adresine bildiriniz.\n"
+"\n"
+
+#: misc/dumpe2fs.c:112
+#, c-format
+msgid "Group %lu: (Blocks 0x%04x -- 0x%04x)\n"
+msgstr "Grup %lu: (0x%04x ile 0x%04x arasýndaki bloklar)\n"
+
+#: misc/dumpe2fs.c:113
+#, c-format
+msgid "Group %lu: (Blocks %u -- %u)\n"
+msgstr "Grup %lu: (%u ile %u arasýndaki bloklar)\n"
+
+#: misc/dumpe2fs.c:116
+#, c-format
+msgid " %s Superblock at 0x%04x, Group Descriptors at 0x%04x-0x%04x\n"
+msgstr ""
+" %s süperbloðun yeri: 0x%04x\n"
+" Grup tanýmýnýn yeri: 0x%04x-0x%04x\n"
+
+#: misc/dumpe2fs.c:118
+#, c-format
+msgid " %s Superblock at %u, Group Descriptors at %u-%u\n"
+msgstr ""
+" %s süperbloðun yeri: %u\n"
+" Grup tanýmýnýn yeri: %u-%u\n"
+
+#: misc/dumpe2fs.c:120
+msgid "Primary"
+msgstr " Ýlk"
+
+#: misc/dumpe2fs.c:120
+msgid "Backup"
+msgstr "Yedek"
+
+#: misc/dumpe2fs.c:123
+#, c-format
+msgid ""
+" Block bitmap at 0x%04x (+%d), Inode bitmap at 0x%04x (+%d)\n"
+" Inode table at 0x%04x-0x%04x (+%d)\n"
+msgstr ""
+" Blok biteþleminin yeri: 0x%04x (+%d)\n"
+" Düðüm biteþleminin yeri: 0x%04x (+%d)\n"
+" Düðüm tablosunun yeri: 0x%04x-0x%04x (+%d)\n"
+
+#: misc/dumpe2fs.c:126
+#, c-format
+msgid ""
+" Block bitmap at %u (+%d), Inode bitmap at %u (+%d)\n"
+" Inode table at %u-%u (+%d)\n"
+msgstr ""
+" Blok biteþleminin yeri: %u (+%d)\n"
+" Düðüm biteþleminin yeri: %u (+%d)\n"
+" Düðüm tablosunun yeri: %u-%u (+%d)\n"
+
+#: misc/dumpe2fs.c:137
+#, c-format
+msgid " %d free blocks, %d free inodes, %d directories\n"
+msgstr ""
+" Serbest blok sayýsý: %d\n"
+" Serbest düðüm sayýsý: %d\n"
+" Dizin sayýsý: %d\n"
+
+#: misc/dumpe2fs.c:141
+msgid " Free blocks: "
+msgstr " Serbest bloklar: "
+
+#: misc/dumpe2fs.c:146
+msgid " Free inodes: "
+msgstr " Serbest düðümler: "
+
+#: misc/dumpe2fs.c:169 misc/dumpe2fs.c:195
+msgid "while printing bad block list"
+msgstr "- hatalý bloklar listesi basýlýrken hata oluþtu"
+
+#: misc/dumpe2fs.c:173
+#, c-format
+msgid "Bad blocks: %d"
+msgstr "Hatalý bloklar: %d"
+
+#: misc/dumpe2fs.c:214 misc/tune2fs.c:136
+msgid "while reading journal superblock"
+msgstr "- jurnal süperbloðu okunurken hata oluþtu"
+
+#: misc/dumpe2fs.c:222
+msgid "Couldn't find journal superblock magic numbers"
+msgstr "Jurnal süperbloðu taným numarasý bulunamadý"
+
+#. Print version number and exit
+#: misc/dumpe2fs.c:292 misc/mke2fs.c:971
+#, c-format
+msgid "\tUsing %s\n"
+msgstr "\t%s kullanýlýyor\n"
+
+#: misc/dumpe2fs.c:318 misc/e2image.c:435 misc/tune2fs.c:652 resize/main.c:198
+msgid "Couldn't find valid filesystem superblock.\n"
+msgstr "Geçerli süperblok bulunamadý.\n"
+
+#: misc/dumpe2fs.c:329
+msgid "Note: This is a byte-swapped filesystem\n"
+msgstr "Bilgi: Bu bir ters-baytlý dosya sistemi\n"
+
+#: misc/dumpe2fs.c:345
+msgid "while trying to read the bitmaps"
+msgstr "- biteþlemler okunmaya çalýþýlýrken hata oluþtu"
+
+#: misc/e2label.c:57
+#, c-format
+msgid "e2label: cannot open %s\n"
+msgstr "e2label: %s açýlamýyor\n"
+
+#: misc/e2label.c:62
+msgid "e2label: cannot seek to superblock\n"
+msgstr "e2label: süperbloka eriþilemiyor\n"
+
+#: misc/e2label.c:67
+msgid "e2label: error reading superblock\n"
+msgstr "e2label: süperblok okunurken hata oluþtu\n"
+
+#: misc/e2label.c:71
+msgid "e2label: not an ext2 filesystem\n"
+msgstr "e2label: bir ext2 dosya sistemi deðil\n"
+
+#: misc/e2label.c:96 misc/tune2fs.c:753
+msgid "Warning: label too long, truncating.\n"
+msgstr "Uyarý: etiket çok uzun, kýrpýlýyor.\n"
+
+#: misc/e2label.c:99
+msgid "e2label: cannot seek to superblock again\n"
+msgstr "e2label: süperbloða yine eriþilemedi\n"
+
+#: misc/e2label.c:104
+msgid "e2label: error writing superblock\n"
+msgstr "e2label: süperbloða yazýlýrken hata oluþtu\n"
+
+#: misc/e2label.c:116 misc/tune2fs.c:411
+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/e2image.c:50
+#, c-format
+msgid "Usage: %s [-r] device file\n"
+msgstr ""
+"Kullanýmý: %s [-r] 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çemli 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:61
+msgid "Couldn't allocate header buffer\n"
+msgstr "Baþlýk için tampon bellek ayrýlamadý\n"
+
+#: misc/e2image.c:80
+#, c-format
+msgid "short write (only %d bytes) forwriting image header"
+msgstr "görüntü baþlýðýný yazmak için kýsa yazma (sadece %d bayt)"
+
+#: misc/e2image.c:99
+msgid "while writing superblock"
+msgstr "- süperbloða yazýlýrken hata oluþtu"
+
+#: misc/e2image.c:107
+msgid "while writing inode table"
+msgstr "- düðüm tablosuna yazýlýrken hata oluþtu"
+
+#: misc/e2image.c:114
+msgid "while writing block bitmap"
+msgstr "- blok biteþlemi yazýlýrken hata oluþtu"
+
+#: misc/e2image.c:121
+msgid "while writing inode bitmap"
+msgstr "- düðüm biteþlemi yazýlýrken hata oluþtu"
+
+#: misc/findsuper.c:117
+msgid "Usage: findsuper device [skiprate [start]]\n"
+msgstr "Kullanýmý: findsuper aygýt [atlama_uzunluðu [baþlangýç_bloðu]]\n"
+
+#: misc/findsuper.c:124
+msgid "Do you really want to skip less than a sector??\n"
+msgstr ""
+"Gerçekten bir sektörden küçük atlamalar yapýlmasýný istiyor musunuz??\n"
+
+#: misc/findsuper.c:130
+#, c-format
+msgid "Have to start at 0 or greater,not %ld\n"
+msgstr "Baþlangýç 0 ya da daha büyük olmalý, %ld deðil\n"
+
+#: misc/findsuper.c:143
+msgid "read failed"
+msgstr "okuma baþarýsýz"
+
+#: misc/findsuper.c:156
+#, c-format
+msgid "Failed on %d at %ld\n"
+msgstr "%d üstünde %ld de baþarýsýz olundu\n"
+
+#: misc/fsck.c:251
+#, c-format
+msgid "Could not determine filesystem type for %s\n"
+msgstr "%s için dosya sistemi türü saptanamadý\n"
+
+#: misc/fsck.c:271
+#, c-format
+msgid "WARNING: couldn't open %s: %s\n"
+msgstr "UYARI: %s açýlamadý: %s\n"
+
+#: misc/fsck.c:281
+#, 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:301
+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 ""
+"UYARI: /etc/fstab dosyanýzda fsck geçiþ sayýsý alaný bulunmuyor.\n"
+"\tBu seferlik iþlem yapýlacak, ancak en kýsa zamanda bu dosyayý\n"
+"\tdüzeltmelisiniz.\n"
+"\n"
+
+#: misc/fsck.c:415
+#, c-format
+msgid "fsck: %s: not found\n"
+msgstr "fsck: %s: yok\n"
+
+#: misc/fsck.c:498
+#, c-format
+msgid "%s: wait: No more child process?!?\n"
+msgstr "%s: bekliyor: Baþka ast süreç yok?!?\n"
+
+#: misc/fsck.c:520
+#, 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:526
+#, c-format
+msgid "%s %s: status is %x, should never happen.\n"
+msgstr "%s %s: durum %x, asla olmamalýydý.\n"
+
+#: misc/fsck.c:615
+#, 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:635
+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:654
+msgid "Couldn't allocate memory for filesystem types\n"
+msgstr "Dosya sistemi türleri için bellek ayrýlamadý\n"
+
+#: misc/fsck.c:794
+#, c-format
+msgid "fsck: cannot check %s: fsck.%s not found\n"
+msgstr "fsck: %s denetlenemiyor: fsck.%s yok\n"
+
+#: misc/fsck.c:851
+msgid "Checking all file systems.\n"
+msgstr "Tüm dosya sistemleri denetleniyor.\n"
+
+#: misc/fsck.c:921
+#, c-format
+msgid "--waiting-- (pass %d)\n"
+msgstr "--beklemede-- (%d geçiþi)\n"
+
+#: misc/fsck.c:942
+msgid "Usage: fsck [-ACNPRTV] [-t fstype] [fs-options] filesys\n"
+msgstr ""
+"Kullanýmý:\n"
+" fsck [seçenekler] dosya-sistemi... [--] [fsck-seçenekleri]\n"
+"\n"
+"Bir ya da daha fazla dosya sistemini denetlemek veya istenirse onarmak\n"
+"için kullanýlýr. dosya-sistemi olarak bir disk bölümü, bir baðlama noktasý,\n"
+"bir bölüm etiketi ya da UUID verilebilir.\n"
+"\n"
+"Seçenekler:\n"
+" -s Denetimi hýzlandýrýr. Etkileþimli kipte iyi bir "
+"seçimdir.\n"
+" -t ds-listesi Denetlenecek dosya sistemlerinin türleri belirtilir.\n"
+" -A /etc/fstab dosyasýndaki denetlenmesi öngörülmüþ "
+"sistemlerin\n"
+" denetimleri yapýlýr.\n"
+" -C Denetim süreci bir göstergeyle gösterilir.\n"
+" -N Denetim yapýlýyormuþ gibi görünür, bir þey yapýlmaz.\n"
+" -P -A seçeneði ile birlikte kullanýlarak kök dosya sistemi\n"
+" denetlenirken diðer dosya sistemleri de paralel "
+"denetlenir\n"
+" -R -A seçeneði ile kullanýldýðýnda kök dosya sistemi\n"
+" denetlenmez.\n"
+" -T Baþlangýçta baþlýk gösterilmez.\n"
+" -V Ýþlemler sýrasýnda daha fazla ayrýntý verilir.\n"
+"\n"
+"fsck seçenekleri:\n"
+"\n"
+"Bu seçenekler e2fs dýþýndaki dosya sistemleri için garanti edilmez.\n"
+"\n"
+" -a Hiç bir soru sormadan sistem otomatik olarak denetlenir "
+"ve\n"
+" onarýlýr.\n"
+" -r Ýþlemler etkileþimli olarak yapýlýr. Paralel denetimler\n"
+" için önerilmez.\n"
+"\n"
+"Çeviri hatalarýný <gnu-tr-u12a at lists.sourceforge.net> adresine bildiriniz.\n"
+"\n"
+
+#: misc/fsck.c:968
+#, c-format
+msgid "%s: too many devices\n"
+msgstr "%s: aygýt sayýsý çok fazla\n"
+
+#: misc/fsck.c:978 misc/fsck.c:1049
+#, c-format
+msgid "%s: too many arguments\n"
+msgstr "%s: argüman sayýsý fazla\n"
+
+#: misc/fsck.c:1103
+msgid ""
+"\n"
+"No devices specified to be checked!\n"
+msgstr ""
+"\n"
+"Denetlenecek aygýt(lar) belirtilmedi!\n"
+
+#: misc/get_device_by_label.c:265
+#, c-format
+msgid "WARNING: %s: bad UUID"
+msgstr "UYARI: %s: Evrensel tek kimlik (UUID) hatalý"
+
+#: misc/lsattr.c:67
+#, c-format
+msgid "Usage: %s [-RVadlv] [files...]\n"
+msgstr ""
+"Kullanýmý: %s [seçenekler] [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-u12a at lists.sourceforge.net> adresine bildiriniz.\n"
+"\n"
+
+#: misc/lsattr.c:77
+#, c-format
+msgid "While reading flags on %s"
+msgstr "- %s üzerinde bayraklar okunurken hata oluþtu"
+
+#: misc/lsattr.c:84
+#, c-format
+msgid "While reading version on %s"
+msgstr "- %s üzerinde sürüm okunurken hata oluþtu"
+
+#: misc/mke2fs.c:89
+#, c-format
+msgid ""
+"Usage: %s [-c|-t|-l filename] [-b block-size] [-f fragment-size]\n"
+"\t[-i bytes-per-inode] [-j] [-J journal-options] [-N number-of-inodes]\n"
+"\t[-m reserved-blocks-percentage] [-o creator-os] [-g blocks-per-group]\n"
+"\t[-L volume-label] [-M last-mounted-directory] [-O feature[,...]]\n"
+"\t[-r fs-revision] [-R raid_opts] [-qvSV] 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"
+" -F aygýt blok özellikli olmasa bile bir dosya\n"
+" sistemi oluþturulur\n"
+" -g her-gruptaki-blok-sayýsý\n"
+" -i dosya-indeksi-uzunluðu boþ bir dizinin disk üzerinde kaplayabileceði\n"
+" en küçük alan, bayt cinsinden verilir.\n"
+" -j ext3 dosya sistemi için jurnal dosyasý "
+"oluþturur\n"
+" -J ile jurnal 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 jurnal-seçenekleri jurnal 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 istemine son baðlanan dizin belirtilir\n"
+" -n dosya sistemi oluþturulmaz, sadece iþlemleri\n"
+" gösterir\n"
+" -N dosya-indeksi-sayýsý sistemdeki toplam dosya indeksi 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"
+" -T dosya-sistemi-türü dosya sisteminin nasýl kullanýlacaðý "
+"belirtilir\n"
+" Türler için man sayfasýna bakýnýz.\n"
+" -v iþlem sýrasýnda ayrýntýlý bilgi verilir\n"
+" -V sürüm bilgileri gösterilir ve çýkar\n"
+"Jurnal seçenekleri:\n"
+" size=jurnal-uzunluðu Jurnal dosyasýnýn uzunluðu MB olarak "
+"belirtilir\n"
+" device=dýþ-jurnal-aygýtý Baþka bir aygýt üzerindeki jurnal 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 jurnal dosyasý "
+"oluþturur.\n"
+"\n"
+"Çeviri hatalarýný <gnu-tr-u12a at lists.sourceforge.net> adresine bildiriniz.\n"
+"\n"
+
+#: misc/mke2fs.c:222
+#, c-format
+msgid "Running command: %s\n"
+msgstr "Çalýþan komut: %s\n"
+
+#: misc/mke2fs.c:226
+#, c-format
+msgid "while trying run '%s'"
+msgstr "- '%s' çalýþtýrýlýrken hata oluþtu"
+
+#: misc/mke2fs.c:233
+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 %d through %d must be good in order to build a filesystem.\n"
+msgstr ""
+"Bir dosya sistemi oluþturulurken %d den %d 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 %d contain\n"
+"\tbad blocks.\n"
+"\n"
+msgstr ""
+"Uyarý: Blok %d deki yedek süperblok/grup tanýmý\n"
+"\"hatalý bloklar\" içeriyor.\n"
+"\n"
+
+#: misc/mke2fs.c:302
+msgid "while marking bad blocks as used"
+msgstr "- hatalý bloklar kullanýlmýþ olarak imlenirken hata oluþtu"
+
+#: misc/mke2fs.c:355
+msgid "done \n"
+msgstr "bitti \n"
+
+#: misc/mke2fs.c:390
+msgid "while allocating zeroizing buffer"
+msgstr "- sýfýrlama tampon belleði ayrýlýrken hata oluþtu"
+
+#: misc/mke2fs.c:431
+msgid "Writing inode tables: "
+msgstr "Düðüm tablolarý yazýlýyor: "
+
+#: misc/mke2fs.c:442
+#, c-format
+msgid ""
+"\n"
+"Could not write %d blocks in inode table starting at %d: %s\n"
+msgstr ""
+"\n"
+"%2d de baþlayan düðüm tablosundaki %1d blok yazýlamadý: %3s\n"
+
+#: misc/mke2fs.c:465
+msgid "while creating root dir"
+msgstr "- kök dizin oluþturulurken hata"
+
+#: misc/mke2fs.c:472
+msgid "while reading root inode"
+msgstr "- kök düðümü okunurken hata oluþtu"
+
+#: misc/mke2fs.c:481
+msgid "while setting root inode ownership"
+msgstr "- kök düðümünün sahibi belirlenirken hata oluþtu"
+
+#: misc/mke2fs.c:498
+msgid "while creating /lost+found"
+msgstr "- /lost+found dizini oluþturulurken hata oluþtu"
+
+#: misc/mke2fs.c:505
+msgid "while looking up /lost+found"
+msgstr "- /lost+found dizine bakýlýrken hata oluþtu"
+
+#: misc/mke2fs.c:515
+msgid "while expanding /lost+found"
+msgstr "- /lost+found dizini geniþletilirken hata oluþtu"
+
+#: misc/mke2fs.c:531
+msgid "while setting bad block inode"
+msgstr "- hatalý blok düðümü belirlenirken hata oluþtu"
+
+#: misc/mke2fs.c:564
+#, c-format
+msgid "Warning: could not erase sector %d: %s\n"
+msgstr "Uyarý: %d. sektör silinemedi: %s\n"
+
+#: misc/mke2fs.c:580
+msgid "while initializing journal superblock"
+msgstr "- jurnal superbloðu ilklendirilirken hata oluþtu"
+
+#: misc/mke2fs.c:586
+msgid "Zeroing journal device: "
+msgstr "Jurnal aygýtý temizleniyor: "
+
+#: misc/mke2fs.c:593
+#, c-format
+msgid "while zeroing journal device (block %u, count %d)"
+msgstr "- jurnal aygýtý temizlenirken (blok %u, %d blok) hata oluþtu"
+
+#: misc/mke2fs.c:604
+msgid "while writing journal superblock"
+msgstr "- jurnal süperbloðu yazýlýrken hata oluþtu"
+
+#: misc/mke2fs.c:618
+#, c-format
+msgid ""
+"warning: %d blocks unused.\n"
+"\n"
+msgstr ""
+"uyarý: %d blok kullanýlmamýþ.\n"
+"\n"
+
+#: misc/mke2fs.c:623
+#, c-format
+msgid "Filesystem label=%s\n"
+msgstr "Dosya sistemi ismi = %s\n"
+
+#: misc/mke2fs.c:624
+msgid "OS type: "
+msgstr "Ýþl. Sist. türü: "
+
+#: misc/mke2fs.c:629
+msgid "(unknown os)"
+msgstr "(bilinmeyen iþl. sist.)"
+
+#: misc/mke2fs.c:632
+#, c-format
+msgid "Block size=%u (log=%u)\n"
+msgstr "Blok boyu = %u (günlük kaydý = %u)\n"
+
+#: misc/mke2fs.c:634
+#, c-format
+msgid "Fragment size=%u (log=%u)\n"
+msgstr "Adýmlama boyu = %u (günlük kaydý = %u)\n"
+
+#: misc/mke2fs.c:636
+#, c-format
+msgid "%u inodes, %u blocks\n"
+msgstr "%u düðüm, %u blok\n"
+
+#: misc/mke2fs.c:638
+#, c-format
+msgid "%u 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:641
+#, c-format
+msgid "First data block=%u\n"
+msgstr "Ýlk veri bloðu = %u\n"
+
+#: misc/mke2fs.c:643
+#, c-format
+msgid "%u block groups\n"
+msgstr "%u blok grubu\n"
+
+#: misc/mke2fs.c:645
+#, c-format
+msgid "%u block group\n"
+msgstr "%u blok grubu\n"
+
+#: misc/mke2fs.c:646
+#, 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:648
+#, c-format
+msgid "%u inodes per group\n"
+msgstr "grup baþýna %u düðüm\n"
+
+#: misc/mke2fs.c:655
+msgid "Superblock backups stored on blocks: "
+msgstr "Süperbloklarýn bulunduðu bloklar:"
+
+#: misc/mke2fs.c:705
+msgid "Couldn't allocate memory to parse raid options!\n"
+msgstr "Raid seçenekleri için bellek ayrýlamadý!\n"
+
+#: misc/mke2fs.c:730
+msgid "Invalid stride parameter.\n"
+msgstr "'stride' parametresi geçersiz.\n"
+
+#: misc/mke2fs.c:738
+msgid ""
+"\n"
+"Bad raid options specified.\n"
+"\n"
+"Raid options are separated by commas, and may take an argument which\n"
+"\tis set off by an equals ('=') sign.\n"
+"\n"
+"Valid raid options are:\n"
+"\tstride=<stride length in blocks>\n"
+"\n"
+msgstr ""
+"\n"
+"Belirtilen raid seçenekleri hatalý.\n"
+"\n"
+"Raid seçenekleri '=' iþaretli çiftler virgüllerle ayrýlarak verilir.\n"
+"\n"
+"Geçerli raid seçenekleri:\n"
+"\tstride=<bloklardaki adým uzunluðu>\n"
+"\n"
+
+#: misc/mke2fs.c:840
+#, c-format
+msgid "bad fragment size - %s"
+msgstr "sekme boyu hatalý - %s"
+
+#: misc/mke2fs.c:846
+msgid "Warning: fragments not supported. Ignoring -f option\n"
+msgstr "Uyarý: sekmeler desteklenmediðinden -f seçeneði yoksayýlýyor\n"
+
+#: misc/mke2fs.c:853
+msgid "Illegal number for blocks per group"
+msgstr "Grup baþýna blok sayýsý kuraldýþý"
+
+#: misc/mke2fs.c:858
+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:867
+#, c-format
+msgid "bad inode ratio - %s"
+msgstr "düðüm oraný hatalý - %s"
+
+#: misc/mke2fs.c:884
+msgid "in malloc for bad_blocks_filename"
+msgstr "- bad_blocks_filename için bellek ayrýlýrken"
+
+#: misc/mke2fs.c:893
+#, c-format
+msgid "bad reserved blocks percent - %s"
+msgstr "yedek blok yüzdesi hatalý - %s"
+
+#: misc/mke2fs.c:956 misc/tune2fs.c:265
+#, c-format
+msgid "Invalid filesystem option set: %s\n"
+msgstr "Geçersiz dosya sistemi seçeneði: %s\n"
+
+#: misc/mke2fs.c:1009 misc/mke2fs.c:1270
+#, c-format
+msgid "while trying to open journal device %s\n"
+msgstr "- %s jurnal aygýtý açýlmaya çalýþýlýrken hata\n"
+
+#: misc/mke2fs.c:1034
+msgid "filesystem"
+msgstr "dosya sistemi"
+
+#: misc/mke2fs.c:1047 resize/main.c:221
+msgid "while trying to determine filesystem size"
+msgstr "- dosya sistemi uzunluðu saptanmaya çalýþýlýrken hata oluþtu"
+
+#: misc/mke2fs.c:1053
+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:1060
+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:1075
+msgid "Filesystem larger than apparent filesystem size."
+msgstr "Dosya sisteminin uzunluðu görünürdeki uzunluktan büyük."
+
+#: misc/mke2fs.c:1093
+msgid "blocks per group count out of range"
+msgstr "Grup baþýna blok sayýsý kapsamdýþý"
+
+#: misc/mke2fs.c:1133
+msgid "while setting up superblock"
+msgstr "- süperblok ayarlanýrken hata oluþtu"
+
+#: misc/mke2fs.c:1161
+#, c-format
+msgid "unknown os - %s"
+msgstr "bilinmeyen iþletim sistemi - %s"
+
+#: misc/mke2fs.c:1216
+msgid "while trying to allocate filesystem tables"
+msgstr "- dosya sistemi tablolarý ayrýlmaya çalýþýlýrken hata oluþtu"
+
+#: misc/mke2fs.c:1247
+#, c-format
+msgid "zeroing block %u at end of filesystem"
+msgstr "sýfýrlama bloðu %u dosya sisteminin sonunda"
+
+#: misc/mke2fs.c:1263 misc/tune2fs.c:340
+msgid "journal"
+msgstr "jurnal"
+
+#: misc/mke2fs.c:1275
+#, c-format
+msgid "Adding journal to device %s: "
+msgstr "%s'e jurnal ekleniyor: "
+
+#: misc/mke2fs.c:1282
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to add journal to device %s"
+msgstr ""
+"\n"
+"\tjurnal %s e eklenmeye çalýþýlýrken hata oluþtu"
+
+#: misc/mke2fs.c:1287 misc/mke2fs.c:1311 misc/tune2fs.c:362 misc/tune2fs.c:376
+msgid "done\n"
+msgstr "tamam\n"
+
+#: misc/mke2fs.c:1299
+#, c-format
+msgid "Creating journal (%d blocks): "
+msgstr "Jurnal oluþturuluyor (%d blok): "
+
+#: misc/mke2fs.c:1307
+msgid ""
+"\n"
+"\twhile trying to create journal"
+msgstr ""
+"\n"
+"\tjurnal oluþturulmaya çalýþýlýrken hata oluþtu"
+
+#: misc/mke2fs.c:1316
+msgid "Writing superblocks and filesystem accounting information: "
+msgstr "Süperbloklarýn ve dosya sisteminin hesap bilgileri yazýlýyor: "
+
+#: misc/mke2fs.c:1320
+msgid ""
+"\n"
+"Warning, had trouble writing out superblocks."
+msgstr ""
+"\n"
+"Uyarý, süperbloklarýn tamamýna yazma sorunu var."
+
+#: misc/mke2fs.c:1323
+msgid ""
+"done\n"
+"\n"
+msgstr ""
+"bitti\n"
+"\n"
+
+#: misc/mklost+found.c:47
+msgid "Usage: mklost+found\n"
+msgstr "Kullanýmý: mklost+found\n"
+
+#: misc/partinfo.c:21
+#, c-format
+msgid "%s failed for %s: %s\n"
+msgstr "%s %s için baþarýsýz: %s\n"
+
+#: misc/partinfo.c:37
+#, c-format
+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 ""
+"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:54
+msgid "HDIO_GETGEO ioctl"
+msgstr "HDIO_GETGEO ioctl"
+
+#: misc/partinfo.c:61
+msgid "BLKGETSIZE ioctl"
+msgstr "BLKGETSIZE ioctl"
+
+#: misc/tune2fs.c:72
+msgid "Please run e2fsck on the filesystem.\n"
+msgstr "Lütfen dosya sisteminde e2fsck çalýþtýrýn.\n"
+
+#: misc/tune2fs.c:77
+#, 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]\n"
+"\t[-l] [-s sparse-flag] [-m reserved-blocks-percent]\n"
+"\t[-r reserved-blocks-count] [-u user] [-C mount-count]\n"
+"\t[-L volume-label] [-M last-mounted-dir] [-U UUID]\n"
+"\t[-O [^]feature[,...]] 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 dosya sistemi 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 jurnal dosyasý eklenir. -J\n"
+" seçeneði ile seçenekler belirtilmezse dosya\n"
+" öntanýmlý özelliklerle oluþtururlur.\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 [^]özellik[,...] Aþaðýda açýklamalarý verilen özellikler burada\n"
+" virgüllerle ayrýlarak verilebilir.\n"
+" -r 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"
+" -U clear|random|time Dosya sisteminin evrensel tek kimliðinin (UUID)\n"
+" hangi yöntemle belirleneceði belirtilir.'clear' "
+"ile\n"
+" silinir; 'random' rasgele, 'time' zamana göre bir\n"
+" kimlik üretir.\n"
+"\n"
+"Jurnal seçenekleri:\n"
+" size=jurnal-uzunluðu Jurnal dosyasýnýn uzunluðu MB olarak "
+"belirtilir\n"
+" device=dýþ-jurnal-aygýtý Baþka bir aygýt üzerindeki jurnal 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 jurnal dosyasý "
+"oluþturur.\n"
+"\n"
+"Çeviri hatalarýný <gnu-tr-u12a at lists.sourceforge.net> adresine bildiriniz.\n"
+"\n"
+
+#: misc/tune2fs.c:124
+msgid "while trying to open external journal"
+msgstr "- dýþ jurnal açýlmaya çalýþýlýrken hata oluþtu"
+
+#: misc/tune2fs.c:128
+#, c-format
+msgid "%s is not a journal device.\n"
+msgstr "%s bir jurnal aygýtý deðil.\n"
+
+#: misc/tune2fs.c:143
+msgid "Journal superblock not found!\n"
+msgstr "Jurnal süperbloðu yok!\n"
+
+#: misc/tune2fs.c:156
+msgid "Filesystem's UUID not found on journal device.\n"
+msgstr "Jurnal aygýtýnda dosya sisteminin evrensel tek kimliði (UUID) yok.\n"
+
+#: misc/tune2fs.c:176
+msgid "Journal NOT removed\n"
+msgstr "Jurnal silinMEdi\n"
+
+#: misc/tune2fs.c:183
+msgid "Journal removed\n"
+msgstr "Jurnal silindi\n"
+
+#: misc/tune2fs.c:214
+msgid "while reading journal inode"
+msgstr "- jurnal düðümü okunurken hata oluþtu"
+
+#: misc/tune2fs.c:221
+msgid "while reading bitmaps"
+msgstr "- biteþlemler okunurken hata oluþtu"
+
+#: misc/tune2fs.c:228
+msgid "while clearing journal inode"
+msgstr "- jurnal düðümü temizlenirken hata oluþtu"
+
+#: misc/tune2fs.c:239
+msgid "while writing journal inode"
+msgstr "- jurnal düðümü yazýlýrken hata oluþtu"
+
+#: misc/tune2fs.c:279
+msgid ""
+"The has_journal flag 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:288
+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:335
+msgid "The filesystem already has a journal.\n"
+msgstr "Dosya sisteminde bir jurnal dosyasý zaten var.\n"
+
+#: misc/tune2fs.c:346
+#, c-format
+msgid ""
+"\n"
+"\twhile trying to open journal on %s\n"
+msgstr ""
+"\n"
+"\t%s üzerindeki jurnal açýlmaya çalýþýlýrken hata oluþtu\n"
+
+#: misc/tune2fs.c:350
+#, c-format
+msgid "Creating journal on device %s: "
+msgstr "%s üzerinde jurnal dosyasý oluþturuluyor: "
+
+#: misc/tune2fs.c:358
+#, c-format
+msgid "while adding filesystem to journal on %s"
+msgstr "- %s üzerindeki jurnal dosyasýna dosya sistemi eklenirken hata oluþtu"
+
+#: misc/tune2fs.c:364
+msgid "Creating journal inode: "
+msgstr "Jurnal düðümü oluþturuluyor: "
+
+#: misc/tune2fs.c:373
+msgid ""
+"\n"
+"\twhile trying to create journal file"
+msgstr ""
+"\n"
+"\tjurnal dosyasý oluþturulmaya çalýþýlýrken hata oluþtu"
+
+#: misc/tune2fs.c:439 misc/tune2fs.c:452
+#, c-format
+msgid "bad mounts count - %s"
+msgstr "baðlama sayýsý hatalý - %s"
+
+#: misc/tune2fs.c:468
+#, c-format
+msgid "bad error behavior - %s"
+msgstr "hata davranýþý hatalý - %s"
+
+#: misc/tune2fs.c:491
+#, c-format
+msgid "bad gid/group name - %s"
+msgstr "grup ismi/numarasý hatalý -%s"
+
+#: misc/tune2fs.c:524
+#, c-format
+msgid "bad interval - %s"
+msgstr "süre hatalý - %s"
+
+#: misc/tune2fs.c:552
+#, c-format
+msgid "bad reserved block ratio - %s"
+msgstr "yedek blok oraný hatalý - %s"
+
+#: misc/tune2fs.c:567
+msgid "-O may only be specified once"
+msgstr "-O virgüllerle ayrýlmýþ özellikleriyle yalnýz bir kere kullanýlabilir"
+
+#: misc/tune2fs.c:577
+#, c-format
+msgid "bad reserved blocks count - %s"
+msgstr "yedek blok sayýsý hatalý - %s"
+
+#: misc/tune2fs.c:601
+#, c-format
+msgid "bad uid/user name - %s"
+msgstr "kullanýcý ismi/numarasý hatalý - %s"
+
+#: misc/tune2fs.c:675
+#, c-format
+msgid "Setting maximal mount count to %d\n"
+msgstr "En fazla baðlama sayýsý %d olarak belirleniyor\n"
+
+#: misc/tune2fs.c:681
+#, c-format
+msgid "Setting current mount count to %d\n"
+msgstr "Þimdiki baðlama sayýsý %d olarak belirleniyor\n"
+
+#: misc/tune2fs.c:686
+#, c-format
+msgid "Setting error behavior to %d\n"
+msgstr "Hata davranýþý %d olarak belirleniyor\n"
+
+#: misc/tune2fs.c:691
+#, c-format
+msgid "Setting reserved blocks gid to %lu\n"
+msgstr "Yedek bloklarýn grup numarasý %lu olarak belirleniyor\n"
+
+#: misc/tune2fs.c:696
+#, c-format
+msgid "Setting interval between check %lu seconds\n"
+msgstr "Denetimler arasýndaki süre %lu saniye olarak belirleniyor\n"
+
+#: misc/tune2fs.c:702
+#, c-format
+msgid "Setting reserved blocks percentage to %lu (%u blocks)\n"
+msgstr "Yedek bloklarýn yüzdesi %lu (%u blok) olarak belirleniyor\n"
+
+#: misc/tune2fs.c:708
+#, c-format
+msgid "reserved blocks count is too big (%ul)"
+msgstr "yedek blok sayýsý çok büyük (%ul)"
+
+#: misc/tune2fs.c:714
+#, c-format
+msgid "Setting reserved blocks count to %lu\n"
+msgstr "Yedek blok sayýsý %lu olarak belirleniyor\n"
+
+#: misc/tune2fs.c:720
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks.\n"
+msgstr ""
+"\n"
+"Dosya sistemindeki süperbloklar zaten azaltýlmýþ.\n"
+
+#: misc/tune2fs.c:727
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag set. %s"
+msgstr ""
+"\n"
+"Süperblok azaltma bayraðý konuldu. %s"
+
+#: misc/tune2fs.c:734
+msgid ""
+"\n"
+"The filesystem already has sparse superblocks disabled.\n"
+msgstr ""
+"\n"
+"Dosya sisteminde süperblok azaltma bayraðý zaten etkin deðil.\n"
+
+#: misc/tune2fs.c:742
+#, c-format
+msgid ""
+"\n"
+"Sparse superblock flag cleared. %s"
+msgstr ""
+"\n"
+"Süperblok azaltma bayraðý temizlendi. %s"
+
+#: misc/tune2fs.c:749
+#, 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:780
+msgid "Invalid UUID format\n"
+msgstr "Geçersiz UUID biçemi\n"
+
+#: misc/uuidgen.c:30
+#, 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-u12a at lists.sourceforge.net> adresine bildiriniz.\n"
+"\n"
+
+#: misc/util.c:55
+msgid "Proceed anyway? (y,n) "
+msgstr "Yine de devam edilsin mi? (e/h) "
+
+#: misc/util.c:70
+#, c-format
+msgid "Could not stat %s --- %s\n"
+msgstr "stat %s yapýlamadý --- %s\n"
+
+#: misc/util.c:73
+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:78
+#, c-format
+msgid "%s is not a block special device.\n"
+msgstr "%s blok özellikli bir aygýt deðil.\n"
+
+#: misc/util.c:95
+#, 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:119
+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:122
+#, c-format
+msgid "will not make a %s here!\n"
+msgstr "burada bir %s yapýlmayacak!\n"
+
+#: misc/util.c:136
+msgid "Couldn't allocate memory to parse journal options!\n"
+msgstr "Jurnal seçenekleri için bellek ayrýlamadý!\n"
+
+#: misc/util.c:178
+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 raid options are:\n"
+"\tsize=<journal size in megabytes>\n"
+"\tdevice=<journal device>\n"
+"\n"
+"The journal size must be between 1024 and 102400 filesystem blocks.\n"
+"\n"
+msgstr ""
+"\n"
+"Jurnal seçenekleri hatalý belirtilmiþ.\n"
+"\n"
+"Jurnal seçenekleri '=' iþaretli çiftler halinde\n"
+"virgüllerle ayrýlarak verilir.\n"
+"\n"
+"Geçerli jurnal seçenekleri:\n"
+"\tsize=<MB olarak jurnal uzunluðu>\n"
+"\tdevice=<jurnal dosyasýnýn bulunacaðý aygýt>\n"
+"\n"
+"Jurnal dosyasýnýn uzunluðu 1024 ile 102400 blok arasýnda seçilebilir.\n"
+"\n"
+
+#: misc/util.c:205
+msgid ""
+"\n"
+"Filesystem too small for a journal\n"
+msgstr ""
+"\n"
+"Dosya sistemi bir jurnal için çok küçük\n"
+
+#: misc/util.c:213
+#, c-format
+msgid ""
+"\n"
+"The requested journal size is %d blocks; it must be\n"
+"between 1024 and 102400 blocks. Aborting.\n"
+msgstr ""
+"\n"
+"Jurnal dosyasýnýn uzunluðu %d blok olarak belirtilmiþ.\n"
+"1024 ile 102400 blok arasýnda olmalý. Çýkýlýyor.\n"
+
+#: misc/util.c:221
+msgid ""
+"\n"
+"Journal size too big for filesystem.\n"
+msgstr ""
+"\n"
+"Jurnal dosyasý dosya sistemi için çok büyük.\n"
+
+#: misc/util.c:240
+#, 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"
+
+#: resize/main.c:31
+#, c-format
+msgid ""
+"usage: %s [-d debug_flags] [-f] [-F] [-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-u12a at lists.sourceforge.net> adresine bildiriniz.\n"
+"\n"
+
+#: resize/main.c:52
+msgid "Extending the inode table"
+msgstr "Dosya indeksi tablosu geniþletiliyor"
+
+#: resize/main.c:55
+msgid "Relocating blocks"
+msgstr "Bloklar yeniden konumlandýrýlýyor"
+
+#: resize/main.c:58
+msgid "Scanning inode table"
+msgstr "Dosya indeksi tablosu taranýyor"
+
+#: resize/main.c:61
+msgid "Updating inode references"
+msgstr "Dosya indeksi baþvurularý güncelleniyor"
+
+#: resize/main.c:64
+msgid "Moving inode table"
+msgstr "Dosya indeksi tablosu taþýnýyor"
+
+#: resize/main.c:67
+msgid "Unknown pass?!?"
+msgstr "bilinmeyen geçiþ?!?"
+
+#: resize/main.c:70
+#, c-format
+msgid "Begin pass %d (max = %lu)\n"
+msgstr "Geçiþ %d baþlýyor (en çok = %lu)\n"
+
+#: resize/main.c:95
+msgid "ext2fs_check_if_mount"
+msgstr "ext2fs_check_if_mount"
+
+#: resize/main.c:103
+#, c-format
+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"
+
+#: resize/main.c:125
+#, c-format
+msgid "resize2fs %s (%s)\n"
+msgstr "resize2fs %s (%s)\n"
+
+#: resize/main.c:158
+#, c-format
+msgid "bad filesystem size - %s"
+msgstr "dosya sistemi uzunluðu hatalý - %s"
+
+#: resize/main.c:227
+#, c-format
+msgid ""
+"The containing partition (or device) is only %d blocks.\n"
+"You requested a new size of %d blocks.\n"
+"\n"
+msgstr ""
+"Ýstenen %d blokluk uzunluk mümkün deðil.\n"
+"Disk bölümü (ya da disk) zaten %d blok uzunlukta.\n"
+"\n"
+
+#: resize/main.c:234
+#, c-format
+msgid ""
+"The filesystem is already %d blocks long. Nothing to do!\n"
+"\n"
+msgstr ""
+"Dosya sistemi zaten %d blok uzunlukta. Hiçbir þey yapýlmadý!\n"
+"\n"
+
+#: resize/main.c:239
+#, 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:247
+#, c-format
+msgid "while trying to resize %s"
+msgstr "- %s yeniden boyutlandýrýlýrken hata oluþtu"
+
+#: resize/main.c:251
+#, c-format
+msgid ""
+"The filesystem on %s is now %d blocks long.\n"
+"\n"
+msgstr ""
+"%s üzerindeki dosya sistemi þimdi %d blok uzunlukta.\n"
+"\n"
+
+#: resize/resize2fs.c:108
+#, c-format
+msgid "Number of free blocks: %d/%d, Needed: %d\n"
+msgstr "Serbest blok sayýsý: %d/%d, Gereken: %d\n"
+
+#: resize/resize2fs.c:426
+msgid "meta-data blocks"
+msgstr "meta-veri bloklarý"
+
+#: resize/resize2fs.c:489
+msgid "reserved blocks"
+msgstr "yedek bloklar"
+
+#: resize/resize2fs.c:494
+msgid "blocks to be moved"
+msgstr "taþýnacak bloklar"
+
+#: resize/resize2fs.c:725
+msgid "Going into desperation mode for block allocations\n"
+msgstr "Blok tahsislerinde umutsuz kipe geçiliyor\n"
+
+#: resize/resize2fs.c:814
+#, c-format
+msgid "Moving %d blocks %u->%u\n"
+msgstr "%d blok taþýnýyor %u->%u\n"
+
+#: resize/resize2fs.c:884
+#, c-format
+msgid "ino=%ld, blockcnt=%ld, %u->%u\n"
+msgstr "düðüm = %ld, block sayýsý = %ld, %u -> %u\n"
+
+#: resize/resize2fs.c:1040
+#, c-format
+msgid "Inode moved %ld->%ld\n"
+msgstr "Düðüm taþýndý %ld->%ld\n"
+
+#: resize/resize2fs.c:1103
+#, c-format
+msgid "Inode translate (dir=%ld, name=%.*s, %u->%ld)\n"
+msgstr "Düðüm çevirisi (dizin = %ld, isim= %.*s, %u -> %ld)\n"
+
+#: resize/resize2fs.c:1222
+#, c-format
+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"
+
+#: resize/resize2fs.c:1248
+#, c-format
+msgid "%d blocks of zeros...\n"
+msgstr "%d sýfýrlý blok...\n"
+
+#: resize/resize2fs.c:1283
+msgid "Inode table move finished.\n"
+msgstr "Düðüm tablosunun taþýnmasý tamamlandý.\n"
+
+#: resize/extent.c:197
+msgid "# Extent dump:\n"
+msgstr "# Ek döküm:\n"
+
+#: resize/extent.c:198
+#, c-format
+msgid "#\tNum=%d, Size=%d, Cursor=%d, Sorted=%d\n"
+msgstr "#\tNum = %d, Boy = %d, Ýmleç = %d, Sýralý = %d\n"
+
+#: resize/extent.c:201
+#, c-format
+msgid "#\t\t %u -> %u (%d)\n"
+msgstr "#\t\t %u -> %u (%d)\n"
Added: trunk/yaboot/lib/e2fsprogs-1.27/resize/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/resize/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/resize/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,4 @@
+Makefile
+resize2fs.8
+test_extent
+resize2fs
Added: trunk/yaboot/lib/e2fsprogs-1.27/resize/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/resize/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/resize/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,317 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-03-07 Theodore Tso <tytso at mit.edu>
+
+ * resize2fs.c (process_block, inode_scan_and_fix,
+ check_and_change_inodes): Fix gcc -Wall complaints in
+ debug code.
+
+ * Makefile.in (check): Use LD_LIBRARY_PATH to run test programs.
+ (From Philipp Thomas <pthomas at suse.de>)
+
+2002-02-24 Theodore Tso <tytso at mit.edu>
+
+ * Makefile.in (install): Remove any compressed man pages before
+ installing the man pages.
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-06-01 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in: Move include/asm/types.h.in to
+ lib/ext2fs/ext2_types.h.in.
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2001-05-14 Theodore Tso <tytso at valinux.com>
+
+ * resize2fs.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
+
+2001-01-11 <tytso at snap.thunk.org>
+
+ * main.c (main): Use ext2fs_sync_device() instead of calling the
+ BLKFLSBUF ioctl directly.
+
+ * extent.c, main.c, resize2fs.c: Change ino_t to ext2_ino_t.
+
+2001-01-01 <tytso at snap.thunk.org>
+
+ * main.c (main): Replace use of struct ext2fs_sb with struct
+ ext2_super_block.
+
+2000-12-08 <tytso at snap.thunk.org>
+
+ * Makefile.in: Fix so that top-level "make check" works correctly.
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+2000-07-05 <tytso at snap.thunk.org>
+
+ * Makefile.in (install): Install resize2fs in /sbin, not /usr/sbin.
+
+2000-06-12 Theodore Ts'o <tytso at valinux.com>
+
+ * main.c, resize2fs.c, resize2fs.h, extent.c: Add NLS support.
+
+2000-04-06 Theodore Ts'o <tytso at valinux.com>
+
+ * Update copyright of files in preparation for release of
+ resize2fs. Also removed the (obsolete) beta-test check
+ that had been in the code, as well as the old spec files
+ used to package the separate distribution of resize2fs.
+
+ * Makefile.in: No longer build resize2fs.static, since there's no
+ real point in it any more.
+
+2000-04-03 Theodore Ts'o <tytso at valinux.com>
+
+ * main.c: For platforms that don't define optarg.h, manually
+ define optarg and optind.
+
+2000-02-02 Theodore Ts'o <tytso at valinux.com>
+
+ * resize2fs.h: Remove unneeded #include of linux/fs.h
+
+ * main.c: Fix gcc -Wall bug. main() should return an int.
+
+1999-11-19 <tytso at valinux.com>
+
+ * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
+ the source directory.
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-07-18 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.15
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-12-03 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Updated dependencies.
+
+1998-09-29 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * main.c (main): Print a feedback message stating the new size of
+ the filesystem when we're through.
+
+1998-09-02 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * resize2fs.c: Rename max to max_groups and max_dirs to avoid
+ possible conflicts with a cpp macro named "max".
+
+1998-07-26 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * resize2fs.h: Protect include of unistd.h with HAVE_UNISTD_H.
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+1998-06-10 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * resize2fs.c (process_block): Change blkcnt_t to be e2_blkcnt_t
+ to avoid collision with LFS API.
+
+1998-04-28 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * extent.c (ext2fs_create_extent_table): Use ext2fs_free_mem
+ instead of free().
+ (extent_cmp): Use EXT2_QSORT_TYPE to define the appropriate
+ return type for comparison functions for qsort.
+
+1998-04-26 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * resize2fs.c (adjust_superblock):
+ * extent.c (ext2fs_add_extent_entry): Update functions to
+ pass the old size of the memory to be resized to
+ ext2fs_resize_mem().
+
+1998-03-30 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Change to use new installation directory variables
+ convention. Fix uninstall rules to take $(DESTDIR) into
+ account. Remove cat8dir from the installdirs target,
+ since modern man package don't necessarily put the cat
+ directory in /usr/man/cat?.
+
+1998-03-29 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * extent.c (extent_cmp): Add const to cast to prevent -Wall warning.
+
+ * main.c (check_mount): Rename function argument to prevent -Wall
+ warning.
+
+1998-03-24 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * main.c (main): Check to make sure we can really resize this
+ filesystem. If there are compatible feature sets that we
+ don't support, we need to abort.
+
+ * resize2fs.c: Change to use the new prototype required by
+ block_iterate2 (which uses blkcnt_t for the blockcount).
+
+1998-03-20 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * resize2fs.c (inode_scan_and_fix): If we are expanding the
+ filesystem, temporarily set
+ rfs->old_fs->super->s_blocks_count to ultimate size of the
+ filesystem, to avoid catching an error on the block
+ iterator.
+
+Mon Mar 9 12:02:47 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * main.c: Use a local version.h file.
+
+Sat Mar 7 18:18:04 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Change the name of the complete source file that we
+ built (that includes resize2fs) to be
+ e2fsprogs-ALL-<version>.tar.gz. Don't link with libuuid,
+ since it's not needed.
+
+ * main.c (main): Add copyright notice.
+
+ * resize2fs.c (blocks_to_move): Create the meta_bmap using the old
+ filesystem, not the new filesystem.
+ (get_new_block): Don't try checking the old block bitmap
+ if the block we're testing is beyond the boundaries of the
+ old filesystem.
+
+Fri Feb 27 01:02:50 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Add rule to build a static version of resize2fs.
+ Update dependency rules.
+
+ * main.c: #include ../version.h, instead of using a hard-coded
+ version string.
+
+Tue Feb 24 15:22:52 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Change the progress function to return an errcode_t; this allows
+ the progress function to return a error indicating a
+ user-requested cancel.
+
+1998-02-20 Theodore Y. Ts'o <tytso at edt.mit.edu>
+
+ * main.c (check_mount, main): Resize2fs now checks the size of the
+ partition, and uses this as a default new_size of the
+ partition if one is not specified. Resize2fs will not let
+ you resize a mounted partition.
+
+ * resize2fs.c: Change how the progress function for the INODE_SCAN
+ pass is performed, so that the maximum size is never zero.
+
+ * resize2fs.8.in: Updated man page.
+
+Mon Feb 16 17:13:01 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * resize2fs.c, resize2fs.h, main.c, ext2_block_move.c,
+ ext2_inode_move.c: Major reoganization of how resizing
+ works. Functions in ext2_block_move.c, and
+ ext2_inode_move.c moved into resize2fs.c. Multiple passes
+ in those two files also combined into a single inode
+ scanning pass. Made the inode table moving function
+ better handling the case where it needs to abort
+ mid-operation. When moving blocks around, made the block
+ allocation function preferentially avoid the old group
+ descriptor blocks, to make resize2fs more robust.
+
+Fri Feb 13 17:15:43 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * resize2fs.c, resize2fs.h, ext2_block_move.c, ext2_inode_move.c,
+ main.c: Reorganize how the progress functions are called.
+
+Mon Jan 19 09:12:28 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * resize2fs.h: If EXT2_FLAT_INCLUDES is defined, then assume all
+ of the ext2-specific header files are in a flat directory.
+
+ * ext2_block_move.c, ext2_inode_move.c, extent.c, resize2fs.c,
+ resize2fs.h: Rename variables named "new" to "new_block",
+ "new_inode", or "new_loc" to avoid C++ reserved word
+ clash.
+
+ * ext2_block_move.c, ext2_inode_move.c, extent.c, resize2fs.c,
+ sim_progress.c: Use ext2fs_get_memory(),
+ ext2fs_free_memory(), et. al., instead of malloc() and
+ free().
+
+ * ext2_block_move.c, ext2_inode_move.c, extent.c: Explicitly cast
+ all assignments from void * to be compatible with C++.
+
+Mon Dec 29 19:09:45 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * banalysis.c, banalysis.h, ext2_inode_move.c, ext2_block_move.c:
+ Change private to priv_data to avoid C++ namespace clash.
+
+Mon Nov 3 14:45:06 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * resize2fs.h: Remove STDC magic, since everyone is STDC these days.
+
+ * resize2fs.c, ext2_block_move.c ext2_inode_move.c: Only include
+ printf statements if RESIZE2FS_DEBUG is defined.
+
+ * main.c: Don't read in the bitmaps since resize2fs.c does that.
+
+Sun Oct 19 20:40:42 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * resize2fs.h: Add #ifdef's for HAVE_SYS_TYPES_H and HAVE_SYS_TIME_H.
+
+Wed Sep 3 17:31:49 1997 Theodore Y. Ts'o <tytso at edt.mit.edu>
+
+ * resize2fs.h: Add #include for errno.h
+
+Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.11
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/resize/Makefile.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/resize/Makefile.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/resize/Makefile.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,149 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = resize
+INSTALL = @INSTALL@
+LDFLAG_STATIC = @LDFLAG_STATIC@
+
+ at MCONFIG@
+
+PROGS= resize2fs
+TEST_PROGS= test_extent
+MANPAGES= resize2fs.8
+
+RESIZE_OBJS= extent.o resize2fs.o main.o sim_progress.o
+
+TEST_EXTENT_OBJS= extent.o test_extent.o
+
+SRCS= $(srcdir)/extent.c \
+ $(srcdir)/resize2fs.c \
+ $(srcdir)/main.c \
+ $(srcdir)/sim_progress.c
+
+LIBS= $(LIBEXT2FS) $(LIBCOM_ERR)
+DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR)
+
+STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+
+.c.o:
+ $(CC) -c $(ALL_CFLAGS) $< -o $@
+
+all:: $(PROGS) $(TEST_PROGS) $(MANPAGES)
+
+resize2fs: $(RESIZE_OBJS) $(DEPLIBS)
+ $(CC) $(ALL_LDFLAGS) -o resize2fs $(RESIZE_OBJS) $(LIBS)
+
+resize2fs.static: $(RESIZE_OBJS) $(STATIC_DEPLIBS)
+ $(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o resize2fs.static \
+ $(RESIZE_OBJS) $(STATIC_LIBS)
+
+resize2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/resize2fs.8.in
+ $(SUBSTITUTE) $(srcdir)/resize2fs.8.in resize2fs.8
+
+test_extent: $(TEST_EXTENT_OBJS)
+ $(CC) $(ALL_LDFLAGS) -o test_extent $(TEST_EXTENT_OBJS) $(LIBS)
+
+installdirs:
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(root_sbindir) \
+ $(DESTDIR)$(man8dir)
+
+install: $(PROGS) $(MANPAGES) installdirs
+ for i in $(PROGS); do \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
+ $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
+ done
+ for i in $(MANPAGES); do \
+ $(RM) -f $(DESTDIR)$(man8dir)/$$i.gz; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$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) ./test_extent < $(srcdir)/test_extent.in \
+ > test_extent.out
+
+check:: test_extent.out
+ @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- at 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- at E2FSPROGS_VERSION@.tar.gz \
+ >> $(top_srcdir)/.exclude-file
+ echo $(SRCROOT)/e2fsprogs-ALL- at 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- at 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 $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+resize2fs.o: $(srcdir)/resize2fs.c $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+main.o: $(srcdir)/main.c $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/version.h
+sim_progress.o: $(srcdir)/sim_progress.c $(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/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
Added: trunk/yaboot/lib/e2fsprogs-1.27/resize/extent.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/resize/extent.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/resize/extent.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,236 @@
+/*
+ * 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 {
+ __u32 old_loc, new_loc;
+ int size;
+};
+
+struct _ext2_extent {
+ struct ext2_extent_entry *list;
+ int cursor;
+ int size;
+ int num;
+ int sorted;
+};
+
+/*
+ * Create an extent table
+ */
+errcode_t ext2fs_create_extent_table(ext2_extent *ret_extent, int size)
+{
+ ext2_extent extent;
+ errcode_t retval;
+
+ retval = ext2fs_get_mem(sizeof(struct _ext2_extent),
+ (void **) &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_mem(sizeof(struct ext2_extent_entry) *
+ extent->size, (void **) &extent->list);
+ if (retval) {
+ ext2fs_free_mem((void **) &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((void **) &extent->list);
+ extent->list = 0;
+ extent->size = 0;
+ extent->num = 0;
+ ext2fs_free_mem((void **) &extent);
+}
+
+/*
+ * Add an entry to the extent table
+ */
+errcode_t ext2fs_add_extent_entry(ext2_extent extent, __u32 old_loc, __u32 new_loc)
+{
+ struct ext2_extent_entry *ent;
+ errcode_t retval;
+ int newsize;
+ int 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, (void **) &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.
+ */
+__u32 ext2fs_extent_translate(ext2_extent extent, __u32 old_loc)
+{
+ int low, high, mid;
+ __u32 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);
+ mid = low + ((int) (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)
+{
+ int i;
+ struct ext2_extent_entry *ent;
+
+ fputs(_("# Extent dump:\n"), out);
+ fprintf(out, _("#\tNum=%d, Size=%d, Cursor=%d, Sorted=%d\n"),
+ extent->num, extent->size, extent->cursor, extent->sorted);
+ for (i=0, ent=extent->list; i < extent->num; i++, ent++) {
+ fprintf(out, _("#\t\t %u -> %u (%d)\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, __u32 *old_loc,
+ __u32 *new_loc, int *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;
+}
+
+
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/resize/main.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/resize/main.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/resize/main.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,254 @@
+/*
+ * main.c --- ext2 resizer main program
+ *
+ * Copyright (C) 1997, 1998 by Theodore Ts'o and
+ * PowerQuest, Inc.
+ *
+ * Copyright (C) 1999, 2000, 2001 by Theosore Ts'o
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
+#include <fcntl.h>
+
+#include "resize2fs.h"
+
+#include "../version.h"
+
+char *program_name, *device_name;
+
+static void usage (char *prog)
+{
+ fprintf (stderr, _("usage: %s [-d debug_flags] [-f] [-F] [-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 check_mount(char *device)
+{
+ 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))
+ return;
+
+ fprintf(stderr, _("%s is mounted; can't resize a "
+ "mounted filesystem!\n\n"), device);
+ 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 fd;
+ blk_t new_size = 0;
+ blk_t max_size = 0;
+ io_manager io_ptr;
+ char *tmp;
+
+ initialize_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:fFhp")) != EOF) {
+ switch (c) {
+ case 'h':
+ usage(program_name);
+ break;
+ case 'f':
+ force = 1;
+ break;
+ case 'F':
+ flush = 1;
+ break;
+ case 'd':
+ flags |= atoi(optarg);
+ break;
+ case 'p':
+ flags |= RESIZE_PERCENT_COMPLETE;
+ break;
+ default:
+ usage(program_name);
+ }
+ }
+ if (optind == argc)
+ usage(program_name);
+
+ device_name = argv[optind++];
+ if (optind < argc) {
+ new_size = strtoul(argv[optind++], &tmp, 0);
+ if (*tmp) {
+ com_err(program_name, 0, _("bad filesystem size - %s"),
+ argv[optind - 1]);
+ exit(1);
+ }
+ }
+ if (optind < argc)
+ usage(program_name);
+
+ check_mount(device_name);
+
+ if (flush) {
+ fd = open(device_name, O_RDONLY, 0);
+
+ if (fd < 0) {
+ com_err("open", errno,
+ _("while opening %s for flushing"),
+ device_name);
+ exit(1);
+ }
+ retval = ext2fs_sync_device(fd, 1);
+ if (retval) {
+ com_err(argv[0], retval,
+ _("while trying to flush %s"),
+ device_name);
+ exit(1);
+ }
+ close(fd);
+ }
+
+ if (flags & RESIZE_DEBUG_IO) {
+ io_ptr = test_io_manager;
+ test_io_backing_manager = unix_io_manager;
+ } else
+ io_ptr = unix_io_manager;
+
+ retval = ext2fs_open (device_name, EXT2_FLAG_RW, 0, 0,
+ io_ptr, &fs);
+ if (retval) {
+ com_err (program_name, retval, _("while trying to open %s"),
+ device_name);
+ printf (_("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) ||
+ (fs->super->s_feature_incompat & ~EXT2_LIB_FEATURE_RO_COMPAT_SUPP)) {
+ com_err(program_name, EXT2_ET_UNSUPP_FEATURE,
+ "(%s)", device_name);
+ exit(1);
+ }
+
+ /*
+ * Get the size of the containing partition, and use this for
+ * defaults and for making sure the new filesystme doesn't
+ * exceed the partition size.
+ */
+ retval = ext2fs_get_device_size(device_name, fs->blocksize,
+ &max_size);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while trying to determine filesystem size"));
+ exit(1);
+ }
+ if (!new_size)
+ new_size = max_size;
+ if (!force && (new_size > max_size)) {
+ fprintf(stderr, _("The containing partition (or device)"
+ " is only %d blocks.\nYou requested a new size"
+ " of %d blocks.\n\n"), max_size,
+ new_size);
+ exit(1);
+ }
+ if (new_size == fs->super->s_blocks_count) {
+ fprintf(stderr, _("The filesystem is already %d blocks "
+ "long. Nothing to do!\n\n"), new_size);
+ exit(0);
+ }
+ if (!force && (fs->super->s_lastcheck < fs->super->s_mtime)) {
+ fprintf(stderr, _("Please run 'e2fsck -f %s' first.\n\n"),
+ device_name);
+ exit(1);
+ }
+ retval = resize_fs(fs, new_size, flags,
+ ((flags & RESIZE_PERCENT_COMPLETE) ?
+ resize_progress_func : 0));
+ if (retval) {
+ com_err(program_name, retval, _("while trying to resize %s"),
+ device_name);
+ ext2fs_close (fs);
+ }
+ printf(_("The filesystem on %s is now %d blocks long.\n\n"),
+ device_name, new_size);
+ return (0);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/resize/resize2fs.8.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/resize/resize2fs.8.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/resize/resize2fs.8.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,105 @@
+.\" -*- 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 file system resizer
+.SH SYNOPSIS
+.B resize2fs
+[
+.B \-d
+.I debug-flags
+]
+[
+.B \-f
+]
+[
+.B \-F
+]
+[
+.B \-p
+]
+.I device
+[
+.I size
+]
+.SH DESCRIPTION
+The
+.B resize2fs
+program will resize ext2 file systems. It can be used to enlarge or
+shrink an ext2 file system located on
+.I device
+so that it will have
+.I size
+blocks.
+If the
+.I size
+parameter is not specified, it will default to the size of the partition.
+The
+.I size
+parameter may never be larger than the size of the partition.
+.PP
+The
+.B resize2fs
+program does not manipulate the size of partitions. If you wish to enlarge
+a filesystem, you must first 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. 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.
+.PP
+If you wish to shrink the 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
+.I \-d debug-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
+\ 1\ \-\ Print out all disk I/O
+.br
+\ 2\ \-\ Debug block relocations
+.br
+\ 8\ \-\ Debug inode relocations
+.br
+\ 16\ \-\ Debug moving the inode table
+.TP
+.I \-p
+Prints out a percentage completion bars for each
+.B resize2fs
+operation, so that the user can keep track of what
+the program is doing.
+.TP
+.I \-f
+Forces resize2fs to proceed with the filesystem resize operation, overriding
+some safety checks which resize2fs normally enforces.
+.TP
+.I \-F
+Flush the filesystem device's buffer caches before beginning. Only
+really useful for doing
+.B resize2fs
+time trials.
+.SH AUTHOR
+.B resize2fs
+was written by Theodore Ts'o <tytso at 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)
Added: trunk/yaboot/lib/e2fsprogs-1.27/resize/resize2fs.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/resize/resize2fs.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/resize/resize2fs.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1347 @@
+/*
+ * 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"
+
+#ifdef __linux__ /* Kludge for debugging */
+#define RESIZE2FS_DEBUG
+#endif
+
+static errcode_t adjust_superblock(ext2_resize_t rfs, blk_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 ext2fs_calculate_summary_stats(ext2_filsys fs);
+
+/*
+ * Some helper CPP macros
+ */
+#define FS_BLOCK_BM(fs, i) ((fs)->group_desc[(i)].bg_block_bitmap)
+#define FS_INODE_BM(fs, i) ((fs)->group_desc[(i)].bg_inode_bitmap)
+#define FS_INODE_TB(fs, i) ((fs)->group_desc[(i)].bg_inode_table)
+
+#define IS_BLOCK_BM(fs, i, blk) ((blk) == FS_BLOCK_BM((fs),(i)))
+#define IS_INODE_BM(fs, i, blk) ((blk) == FS_INODE_BM((fs),(i)))
+
+#define IS_INODE_TB(fs, i, blk) (((blk) >= FS_INODE_TB((fs), (i))) && \
+ ((blk) < (FS_INODE_TB((fs), (i)) + \
+ (fs)->inode_blocks_per_group)))
+
+
+
+/*
+ * This is the top-level routine which does the dirty deed....
+ */
+errcode_t resize_fs(ext2_filsys fs, blk_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;
+
+ retval = ext2fs_read_bitmaps(fs);
+ if (retval)
+ return retval;
+
+ /*
+ * Create the data structure
+ */
+ retval = ext2fs_get_mem(sizeof(struct ext2_resize_struct),
+ (void **) &rfs);
+ if (retval)
+ return retval;
+ memset(rfs, 0, sizeof(struct ext2_resize_struct));
+
+ rfs->old_fs = fs;
+ rfs->flags = flags;
+ rfs->itable_buf = 0;
+ rfs->progress = progress;
+ retval = ext2fs_dup_handle(fs, &rfs->new_fs);
+ if (retval)
+ goto errout;
+
+ retval = adjust_superblock(rfs, new_size);
+ if (retval)
+ goto errout;
+
+ retval = blocks_to_move(rfs);
+ if (retval)
+ goto errout;
+
+#ifdef RESIZE2FS_DEBUG
+ if (rfs->flags & RESIZE_DEBUG_BMOVE)
+ printf(_("Number of free blocks: %d/%d, Needed: %d\n"),
+ rfs->old_fs->super->s_free_blocks_count,
+ rfs->new_fs->super->s_free_blocks_count,
+ rfs->needed_blocks);
+#endif
+
+ retval = block_mover(rfs);
+ if (retval)
+ goto errout;
+
+ retval = inode_scan_and_fix(rfs);
+ if (retval)
+ goto errout;
+
+ retval = inode_ref_fix(rfs);
+ if (retval)
+ goto errout;
+
+ retval = ext2fs_calculate_summary_stats(rfs->new_fs);
+ if (retval)
+ goto errout;
+
+ retval = move_itables(rfs);
+ if (retval)
+ goto errout;
+
+ 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((void **) &rfs->itable_buf);
+ ext2fs_free_mem((void **) &rfs);
+
+ return 0;
+
+errout:
+ if (rfs->new_fs)
+ ext2fs_free(rfs->new_fs);
+ if (rfs->itable_buf)
+ ext2fs_free_mem((void **) &rfs->itable_buf);
+ ext2fs_free_mem((void **) &rfs);
+ return retval;
+}
+
+/* --------------------------------------------------------------------
+ *
+ * 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.
+ * --------------------------------------------------------------------
+ */
+
+/*
+ * This routine adjusts the superblock and other data structures...
+ */
+static errcode_t adjust_superblock(ext2_resize_t rfs, blk_t new_size)
+{
+ ext2_filsys fs;
+ int overhead = 0;
+ int rem, adj = 0;
+ errcode_t retval;
+ ext2_ino_t real_end;
+ blk_t blk, group_block;
+ unsigned long i, j;
+ int old_numblocks, numblocks, adjblocks;
+ unsigned long max_group;
+
+ fs = rfs->new_fs;
+ fs->super->s_blocks_count = new_size;
+ ext2fs_mark_super_dirty(fs);
+ ext2fs_mark_bb_dirty(fs);
+ ext2fs_mark_ib_dirty(fs);
+
+retry:
+ fs->group_desc_count = (fs->super->s_blocks_count -
+ fs->super->s_first_data_block +
+ EXT2_BLOCKS_PER_GROUP(fs->super) - 1)
+ / EXT2_BLOCKS_PER_GROUP(fs->super);
+ if (fs->group_desc_count == 0)
+ return EXT2_ET_TOOSMALL;
+ fs->desc_blocks = (fs->group_desc_count +
+ EXT2_DESC_PER_BLOCK(fs->super) - 1)
+ / 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.
+ *
+ * XXX Not all block groups need the descriptor blocks, but
+ * being clever is tricky...
+ */
+ overhead = 3 + fs->desc_blocks + fs->inode_blocks_per_group;
+
+ /*
+ * See if the last group is big enough to support the
+ * necessary data structures. If not, we need to get rid of
+ * it.
+ */
+ rem = (fs->super->s_blocks_count - 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 (rem && (rem < overhead+50)) {
+ fs->super->s_blocks_count -= rem;
+ goto retry;
+ }
+ /*
+ * Adjust the number of inodes
+ */
+ fs->super->s_inodes_count = fs->super->s_inodes_per_group *
+ fs->group_desc_count;
+
+ /*
+ * Adjust the number of free blocks
+ */
+ blk = rfs->old_fs->super->s_blocks_count;
+ if (blk > fs->super->s_blocks_count)
+ fs->super->s_free_blocks_count -=
+ (blk - fs->super->s_blocks_count);
+ else
+ fs->super->s_free_blocks_count +=
+ (fs->super->s_blocks_count - blk);
+
+ /*
+ * Adjust the number of reserved blocks
+ */
+ blk = rfs->old_fs->super->s_r_blocks_count * 100 /
+ rfs->old_fs->super->s_blocks_count;
+ fs->super->s_r_blocks_count = ((fs->super->s_blocks_count * blk)
+ / 100);
+
+ /*
+ * Adjust the bitmaps for size
+ */
+ retval = ext2fs_resize_inode_bitmap(fs->super->s_inodes_count,
+ fs->super->s_inodes_count,
+ fs->inode_map);
+ if (retval) goto errout;
+
+ real_end = ((EXT2_BLOCKS_PER_GROUP(fs->super)
+ * fs->group_desc_count)) - 1 +
+ fs->super->s_first_data_block;
+ retval = ext2fs_resize_block_bitmap(fs->super->s_blocks_count-1,
+ real_end, fs->block_map);
+
+ if (retval) goto errout;
+
+ /*
+ * Reallocate the group descriptors as necessary.
+ */
+ if (rfs->old_fs->desc_blocks != fs->desc_blocks) {
+ retval = ext2fs_resize_mem(rfs->old_fs->desc_blocks *
+ fs->blocksize,
+ fs->desc_blocks * fs->blocksize,
+ (void **) &fs->group_desc);
+ 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;
+ }
+ /*
+ * Fix the count of the last (old) block group
+ */
+ old_numblocks = (rfs->old_fs->super->s_blocks_count -
+ rfs->old_fs->super->s_first_data_block) %
+ rfs->old_fs->super->s_blocks_per_group;
+ if (!old_numblocks)
+ old_numblocks = rfs->old_fs->super->s_blocks_per_group;
+ if (rfs->old_fs->group_desc_count == fs->group_desc_count) {
+ numblocks = (rfs->new_fs->super->s_blocks_count -
+ rfs->new_fs->super->s_first_data_block) %
+ rfs->new_fs->super->s_blocks_per_group;
+ if (!numblocks)
+ numblocks = rfs->new_fs->super->s_blocks_per_group;
+ } else
+ numblocks = rfs->new_fs->super->s_blocks_per_group;
+ i = rfs->old_fs->group_desc_count - 1;
+ fs->group_desc[i].bg_free_blocks_count += (numblocks-old_numblocks);
+
+ /*
+ * 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;
+ }
+ /*
+ * Initialize the new block group descriptors
+ */
+ retval = ext2fs_get_mem(fs->blocksize * fs->inode_blocks_per_group,
+ (void **) &rfs->itable_buf);
+ if (retval)
+ goto errout;
+
+ memset(rfs->itable_buf, 0, fs->blocksize * fs->inode_blocks_per_group);
+ group_block = fs->super->s_first_data_block +
+ rfs->old_fs->group_desc_count * fs->super->s_blocks_per_group;
+
+ adj = rfs->old_fs->group_desc_count;
+ max_group = fs->group_desc_count - adj;
+ if (rfs->progress) {
+ retval = rfs->progress(rfs, E2_RSZ_EXTEND_ITABLE_PASS,
+ 0, max_group);
+ if (retval)
+ goto errout;
+ }
+ for (i = rfs->old_fs->group_desc_count;
+ i < fs->group_desc_count; i++) {
+ memset(&fs->group_desc[i], 0,
+ sizeof(struct ext2_group_desc));
+ adjblocks = 0;
+
+ if (i == fs->group_desc_count-1) {
+ numblocks = (fs->super->s_blocks_count -
+ 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;
+
+ if (ext2fs_bg_has_super(fs, i)) {
+ for (j=0; j < fs->desc_blocks+1; j++)
+ ext2fs_mark_block_bitmap(fs->block_map,
+ group_block + j);
+ adjblocks = 1 + fs->desc_blocks;
+ }
+ adjblocks += 2 + fs->inode_blocks_per_group;
+
+ numblocks -= adjblocks;
+ fs->super->s_free_blocks_count -= adjblocks;
+ fs->super->s_free_inodes_count +=
+ fs->super->s_inodes_per_group;
+ fs->group_desc[i].bg_free_blocks_count = numblocks;
+ fs->group_desc[i].bg_free_inodes_count =
+ fs->super->s_inodes_per_group;
+ fs->group_desc[i].bg_used_dirs_count = 0;
+
+ retval = ext2fs_allocate_group_table(fs, i, 0);
+ if (retval) goto errout;
+
+ /*
+ * Write out the new inode table
+ */
+ retval = io_channel_write_blk(fs->io,
+ fs->group_desc[i].bg_inode_table,
+ 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 *ret_bmap)
+{
+ blk_t block, b;
+ int i,j;
+ ext2fs_block_bitmap bmap;
+ errcode_t retval;
+
+ retval = ext2fs_allocate_block_bitmap(fs, _("meta-data blocks"),
+ &bmap);
+ if (retval)
+ return retval;
+
+ block = fs->super->s_first_data_block;
+ for (i = 0; i < fs->group_desc_count; i++) {
+ if (ext2fs_bg_has_super(fs, i)) {
+ /*
+ * Mark this group's copy of the superblock
+ */
+ ext2fs_mark_block_bitmap(bmap, block);
+
+ /*
+ * Mark this group's copy of the descriptors
+ */
+ for (j = 0; j < fs->desc_blocks; j++)
+ ext2fs_mark_block_bitmap(bmap, block + j + 1);
+ }
+
+ /*
+ * Mark the blocks used for the inode table
+ */
+ for (j = 0, b = fs->group_desc[i].bg_inode_table;
+ j < fs->inode_blocks_per_group;
+ j++, b++)
+ ext2fs_mark_block_bitmap(bmap, b);
+
+ /*
+ * Mark block used for the block bitmap
+ */
+ ext2fs_mark_block_bitmap(bmap,
+ fs->group_desc[i].bg_block_bitmap);
+ /*
+ * Mark block used for the inode bitmap
+ */
+ ext2fs_mark_block_bitmap(bmap,
+ fs->group_desc[i].bg_inode_bitmap);
+ block += fs->super->s_blocks_per_group;
+ }
+ *ret_bmap = bmap;
+ return 0;
+}
+
+/*
+ * 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 i, j, max_groups;
+ blk_t blk, group_blk;
+ unsigned long old_blocks, new_blocks;
+ errcode_t retval;
+ ext2_filsys fs, old_fs;
+ ext2fs_block_bitmap meta_bmap;
+
+ fs = rfs->new_fs;
+ old_fs = rfs->old_fs;
+ if (old_fs->super->s_blocks_count > fs->super->s_blocks_count)
+ fs = rfs->old_fs;
+
+ retval = ext2fs_allocate_block_bitmap(fs, _("reserved blocks"),
+ &rfs->reserve_blocks);
+ if (retval)
+ return retval;
+
+ retval = ext2fs_allocate_block_bitmap(fs, _("blocks to be moved"),
+ &rfs->move_blocks);
+ 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 all of
+ * the blocks that don't fit any more
+ */
+ for (blk = fs->super->s_blocks_count;
+ blk < old_fs->super->s_blocks_count; blk++) {
+ if (ext2fs_test_block_bitmap(old_fs->block_map, blk) &&
+ !ext2fs_test_block_bitmap(meta_bmap, blk)) {
+ ext2fs_mark_block_bitmap(rfs->move_blocks, blk);
+ rfs->needed_blocks++;
+ }
+ ext2fs_mark_block_bitmap(rfs->reserve_blocks, blk);
+ }
+
+ old_blocks = old_fs->desc_blocks;
+ new_blocks = fs->desc_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_unmark_block_bitmap(fs->block_map,
+ blk);
+ 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....
+ */
+ for (i = 0; i < max_groups; i++) {
+ if (!ext2fs_bg_has_super(fs, i))
+ goto next_group;
+
+ for (blk = group_blk;
+ blk < group_blk + 1 + new_blocks; blk++) {
+ ext2fs_mark_block_bitmap(rfs->reserve_blocks, blk);
+ ext2fs_mark_block_bitmap(fs->block_map, blk);
+
+ /*
+ * 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, i, blk)) {
+ FS_BLOCK_BM(fs, i) = 0;
+ rfs->needed_blocks++;
+ } else if (IS_INODE_BM(fs, i, blk)) {
+ FS_INODE_BM(fs, i) = 0;
+ rfs->needed_blocks++;
+ } else if (IS_INODE_TB(fs, i, blk)) {
+ FS_INODE_TB(fs, i) = 0;
+ rfs->needed_blocks++;
+ } else if (ext2fs_test_block_bitmap(old_fs->block_map,
+ blk) &&
+ !ext2fs_test_block_bitmap(meta_bmap, blk)) {
+ ext2fs_mark_block_bitmap(rfs->move_blocks,
+ blk);
+ rfs->needed_blocks++;
+ }
+ }
+ if (fs->group_desc[i].bg_inode_table &&
+ fs->group_desc[i].bg_inode_bitmap &&
+ fs->group_desc[i].bg_block_bitmap)
+ goto next_group;
+
+ /*
+ * Reserve the existing meta blocks that we know
+ * aren't to be moved.
+ */
+ if (fs->group_desc[i].bg_block_bitmap)
+ ext2fs_mark_block_bitmap(rfs->reserve_blocks,
+ fs->group_desc[i].bg_block_bitmap);
+ if (fs->group_desc[i].bg_inode_bitmap)
+ ext2fs_mark_block_bitmap(rfs->reserve_blocks,
+ fs->group_desc[i].bg_inode_bitmap);
+ if (fs->group_desc[i].bg_inode_table)
+ for (blk = fs->group_desc[i].bg_inode_table, j=0;
+ j < fs->inode_blocks_per_group ; j++, blk++)
+ ext2fs_mark_block_bitmap(rfs->reserve_blocks,
+ blk);
+
+ /*
+ * Allocate the missing data structures
+ */
+ 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 (FS_BLOCK_BM(old_fs, i) !=
+ (blk = FS_BLOCK_BM(fs, i))) {
+ ext2fs_mark_block_bitmap(fs->block_map, blk);
+ if (ext2fs_test_block_bitmap(old_fs->block_map, blk) &&
+ !ext2fs_test_block_bitmap(meta_bmap, blk))
+ ext2fs_mark_block_bitmap(rfs->move_blocks,
+ blk);
+ }
+ if (FS_INODE_BM(old_fs, i) !=
+ (blk = FS_INODE_BM(fs, i))) {
+ ext2fs_mark_block_bitmap(fs->block_map, blk);
+ if (ext2fs_test_block_bitmap(old_fs->block_map, blk) &&
+ !ext2fs_test_block_bitmap(meta_bmap, blk))
+ ext2fs_mark_block_bitmap(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 (FS_INODE_TB(fs, i) == FS_INODE_TB(old_fs, i))
+ goto next_group; /* 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 = fs->group_desc[i].bg_inode_table, j=0;
+ j < fs->inode_blocks_per_group ; j++, blk++) {
+ ext2fs_mark_block_bitmap(fs->block_map, blk);
+ if (ext2fs_test_block_bitmap(old_fs->block_map, blk) &&
+ !ext2fs_test_block_bitmap(meta_bmap, blk))
+ ext2fs_mark_block_bitmap(rfs->move_blocks,
+ blk);
+ }
+
+ /*
+ * Make sure the old inode table is reserved in the
+ * block reservation bitmap.
+ */
+ for (blk = rfs->old_fs->group_desc[i].bg_inode_table, j=0;
+ j < fs->inode_blocks_per_group ; j++, blk++)
+ ext2fs_mark_block_bitmap(rfs->reserve_blocks, blk);
+
+ next_group:
+ group_blk += rfs->new_fs->super->s_blocks_per_group;
+ }
+ 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 (rfs->new_fs->super->s_blocks_count >
+ rfs->old_fs->super->s_blocks_count)
+ rfs->new_blk = rfs->old_fs->super->s_blocks_count;
+#endif
+}
+
+static blk_t get_new_block(ext2_resize_t rfs)
+{
+ ext2_filsys fs = rfs->new_fs;
+
+ while (1) {
+ if (rfs->new_blk >= fs->super->s_blocks_count) {
+ 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_bitmap(fs->block_map, rfs->new_blk) ||
+ ext2fs_test_block_bitmap(rfs->reserve_blocks,
+ rfs->new_blk) ||
+ ((rfs->alloc_state == AVOID_OLD) &&
+ (rfs->new_blk < rfs->old_fs->super->s_blocks_count) &&
+ ext2fs_test_block_bitmap(rfs->old_fs->block_map,
+ rfs->new_blk))) {
+ rfs->new_blk++;
+ continue;
+ }
+ return rfs->new_blk;
+ }
+}
+
+static errcode_t block_mover(ext2_resize_t rfs)
+{
+ blk_t blk, old_blk, new_blk;
+ ext2_filsys fs = rfs->new_fs;
+ ext2_filsys old_fs = rfs->old_fs;
+ errcode_t retval;
+ int size, c;
+ int to_move, moved;
+
+ new_blk = fs->super->s_first_data_block;
+ if (!rfs->itable_buf) {
+ retval = ext2fs_get_mem(fs->blocksize *
+ fs->inode_blocks_per_group,
+ (void **) &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 = old_fs->super->s_first_data_block;
+ blk < old_fs->super->s_blocks_count; blk++) {
+ if (!ext2fs_test_block_bitmap(old_fs->block_map, blk))
+ continue;
+ if (!ext2fs_test_block_bitmap(rfs->move_blocks, blk))
+ continue;
+
+ new_blk = get_new_block(rfs);
+ if (!new_blk) {
+ retval = ENOSPC;
+ goto errout;
+ }
+ ext2fs_mark_block_bitmap(fs->block_map, new_blk);
+ ext2fs_add_extent_entry(rfs->bmap, blk, new_blk);
+ to_move++;
+ }
+
+ if (to_move == 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;
+#ifdef RESIZE2FS_DEBUG
+ if (rfs->flags & RESIZE_DEBUG_BMOVE)
+ printf(_("Moving %d blocks %u->%u\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_blk(fs->io, old_blk, c,
+ rfs->itable_buf);
+ if (retval) goto errout;
+ retval = io_channel_write_blk(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:
+ return retval;
+}
+
+
+/* --------------------------------------------------------------------
+ *
+ * Resize processing, phase 3
+ *
+ * --------------------------------------------------------------------
+ */
+
+
+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, blk_t *block_nr,
+ e2_blkcnt_t blockcnt, blk_t ref_block,
+ int ref_offset, void *priv_data)
+{
+ struct process_block_struct *pb;
+ errcode_t retval;
+ blk_t block, new_block;
+ int ret = 0;
+
+ pb = (struct process_block_struct *) priv_data;
+ block = *block_nr;
+ if (pb->rfs->bmap) {
+ new_block = ext2fs_extent_translate(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, %u->%u\n"),
+ pb->ino, blockcnt, block, new_block);
+#endif
+ block = new_block;
+ }
+ }
+ if (pb->is_dir) {
+ retval = ext2fs_add_dir_block(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,
+ 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;
+ ext2_inode_scan scan = NULL;
+ errcode_t retval;
+ int group;
+ char *block_buf = 0;
+ ext2_ino_t start_to_move;
+ blk_t orig_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 = rfs->old_fs->super->s_blocks_count;
+ if (orig_size < rfs->new_fs->super->s_blocks_count)
+ rfs->old_fs->super->s_blocks_count =
+ rfs->new_fs->super->s_blocks_count;
+
+ 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_mem(rfs->old_fs->blocksize * 3,
+ (void **) &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);
+ /*
+ * First, copy all of the inodes that need to be moved
+ * elsewhere in the inode table
+ */
+ while (1) {
+ retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ if (retval) goto errout;
+ if (!ino)
+ break;
+
+ if (inode.i_links_count == 0)
+ continue; /* inode not in use */
+
+ pb.is_dir = LINUX_S_ISDIR(inode.i_mode);
+ pb.changed = 0;
+
+ if (ext2fs_inode_has_valid_blocks(&inode) &&
+ (rfs->bmap || pb.is_dir)) {
+ pb.ino = ino;
+ retval = ext2fs_block_iterate2(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
+ */
+ while (1) {
+ if (!ext2fs_test_inode_bitmap(rfs->new_fs->inode_map,
+ new_inode))
+ break;
+ new_inode++;
+ if (new_inode > rfs->new_fs->super->s_inodes_count) {
+ retval = ENOSPC;
+ goto errout;
+ }
+ }
+ ext2fs_mark_inode_bitmap(rfs->new_fs->inode_map, new_inode);
+ if (pb.changed) {
+ /* Get the new version of the inode */
+ retval = ext2fs_read_inode(rfs->old_fs, ino, &inode);
+ if (retval) goto errout;
+ }
+ retval = ext2fs_write_inode(rfs->old_fs, new_inode, &inode);
+ if (retval) goto errout;
+
+ group = (new_inode-1) / EXT2_INODES_PER_GROUP(rfs->new_fs->super);
+ if (LINUX_S_ISDIR(inode.i_mode))
+ rfs->new_fs->group_desc[group].bg_used_dirs_count++;
+
+#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:
+ rfs->old_fs->super->s_blocks_count = 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((void **) &block_buf);
+ return retval;
+}
+
+/* --------------------------------------------------------------------
+ *
+ * Resize processing, phase 4.
+ *
+ * --------------------------------------------------------------------
+ */
+
+struct istruct {
+ ext2_resize_t rfs;
+ errcode_t err;
+ unsigned long max_dirs;
+ int num;
+};
+
+static int check_and_change_inodes(ext2_ino_t dir, int entry,
+ struct ext2_dir_entry *dirent, int offset,
+ int blocksize, char *buf, void *priv_data)
+{
+ struct istruct *is = (struct istruct *) priv_data;
+ ext2_ino_t new_inode;
+
+ 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, dirent->name,
+ dirent->inode, new_inode);
+#endif
+
+ dirent->inode = new_inode;
+
+ 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_count(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;
+ }
+
+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 i, n, num, max_groups, size, diff;
+ ext2_filsys fs = rfs->new_fs;
+ char *cp;
+ blk_t old_blk, new_blk;
+ errcode_t retval;
+ int 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, (void **) &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 (rfs->old_fs->group_desc[i].bg_inode_table !=
+ fs->group_desc[i].bg_inode_table)
+ 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 = rfs->old_fs->group_desc[i].bg_inode_table;
+ new_blk = fs->group_desc[i].bg_inode_table;
+ diff = new_blk - old_blk;
+
+#ifdef RESIZE2FS_DEBUG
+ if (rfs->flags & RESIZE_DEBUG_ITABLEMOVE)
+ printf(_("Itable move group %d block "
+ "%u->%u (diff %d)\n"),
+ i, old_blk, new_blk, diff);
+#endif
+
+ if (!diff)
+ continue;
+
+ retval = io_channel_read_blk(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, 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_blk(fs->io, new_blk,
+ num, rfs->itable_buf);
+ if (retval) {
+ io_channel_write_blk(fs->io, old_blk,
+ num, rfs->itable_buf);
+ goto errout;
+ }
+ if (n > diff) {
+ retval = io_channel_write_blk(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;
+ }
+ rfs->old_fs->group_desc[i].bg_inode_table = new_blk;
+ ext2fs_mark_super_dirty(rfs->old_fs);
+ if (rfs->progress) {
+ ext2fs_flush(rfs->old_fs);
+ retval = rfs->progress(rfs, E2_RSZ_MOVE_ITABLE_PASS,
+ ++moved, to_move);
+ if (retval)
+ goto errout;
+ }
+ }
+ ext2fs_flush(fs);
+#ifdef RESIZE2FS_DEBUG
+ if (rfs->flags & RESIZE_DEBUG_ITABLEMOVE)
+ printf(_("Inode table move finished.\n"));
+#endif
+ return 0;
+
+errout:
+ return retval;
+}
+
+/*
+ * Finally, recalculate the summary information
+ */
+static errcode_t ext2fs_calculate_summary_stats(ext2_filsys fs)
+{
+ blk_t blk;
+ ext2_ino_t ino;
+ int group = 0;
+ 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 < fs->super->s_blocks_count; blk++) {
+ if (!ext2fs_fast_test_block_bitmap(fs->block_map, blk)) {
+ group_free++;
+ total_free++;
+ }
+ count++;
+ if ((count == fs->super->s_blocks_per_group) ||
+ (blk == fs->super->s_blocks_count-1)) {
+ fs->group_desc[group++].bg_free_blocks_count =
+ group_free;
+ count = 0;
+ group_free = 0;
+ }
+ }
+ fs->super->s_free_blocks_count = total_free;
+
+ /*
+ * Next, calculate the inode statistics
+ */
+ group_free = 0;
+ total_free = 0;
+ count = 0;
+ group = 0;
+ for (ino = 1; ino <= fs->super->s_inodes_count; ino++) {
+ if (!ext2fs_fast_test_inode_bitmap(fs->inode_map, ino)) {
+ group_free++;
+ total_free++;
+ }
+ count++;
+ if ((count == fs->super->s_inodes_per_group) ||
+ (ino == fs->super->s_inodes_count)) {
+ fs->group_desc[group++].bg_free_inodes_count =
+ group_free;
+ count = 0;
+ group_free = 0;
+ }
+ }
+ fs->super->s_free_inodes_count = total_free;
+ ext2fs_mark_super_dirty(fs);
+ return 0;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/resize/resize2fs.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/resize/resize2fs.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/resize/resize2fs.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,146 @@
+/*
+ * 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"
+#else
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.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
+/* FIXME */
+#define NLS_CAT_NAME "e2fsprogs"
+#define LOCALEDIR "/usr/share/locale"
+/* FIXME */
+#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_PERCENT_COMPLETE 0x0100
+#define RESIZE_VERBOSE 0x0200
+
+/*
+ * 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;
+ int needed_blocks;
+ int flags;
+ char *itable_buf;
+
+ /*
+ * For the block allocator
+ */
+ blk_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, blk_t new_size, int flags,
+ errcode_t (*progress)(ext2_resize_t rfs,
+ int pass, unsigned long cur,
+ unsigned long max));
+
+/* extent.c */
+extern errcode_t ext2fs_create_extent_table(ext2_extent *ret_extent,
+ int size);
+extern void ext2fs_free_extent_table(ext2_extent extent);
+extern errcode_t ext2fs_add_extent_entry(ext2_extent extent,
+ __u32 old_loc, __u32 new_loc);
+extern __u32 ext2fs_extent_translate(ext2_extent extent, __u32 old_loc);
+extern void ext2fs_extent_dump(ext2_extent extent, FILE *out);
+extern errcode_t ext2fs_iterate_extent(ext2_extent extent, __u32 *old_loc,
+ __u32 *new_loc, int *size);
+
+/* 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);
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/resize/sim_progress.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/resize/sim_progress.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/resize/sim_progress.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,118 @@
+/*
+ * sim_progress.c --- simple progress meter
+ *
+ * Copyright (C) 1997, 1998 by Theodore Ts'o and
+ * PowerQuest, Inc.
+ *
+ * Copyright (C) 1999, 2000 by 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),
+ (void **) &prog);
+ if (!prog)
+ return retval;
+ memset(prog, 0, sizeof(struct ext2_sim_progress));
+
+ retval = ext2fs_get_mem(strlen(label)+1, (void **) &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((void **) &prog->label);
+ ext2fs_free_mem((void **) &prog);
+ printf("\n");
+ return;
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/resize/test_extent.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/resize/test_extent.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/resize/test_extent.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,117 @@
+/*
+ * 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;
+ __u32 num1, num2;
+ int 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: %u%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, "# %u -> %u (%d)\n",
+ num1, num2, size);
+ }
+ } else
+ fputs("# Syntax error\n", out);
+ }
+}
+
+int main(int argc, char **argv)
+{
+ do_test(stdin, stdout);
+ exit(0);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/resize/test_extent.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/resize/test_extent.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/resize/test_extent.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -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)
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Makefile
+test_script
+*.1.log
+*.2.log
+*.log
+*.ok
+*.failed
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,442 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-03-07 <tytso at mit.edu>
+
+ * f_miss_journal, f_extra_journal: Added new test cases.
+
+2002-03-06 <tytso at mit.edu>
+
+ * f_badorphan, f_badtable, f_bbinode, f_dupsuper, f_expand,
+ f_illbbitmap, f_illibitmap, f_illitable, f_imagic,
+ f_imagic_fs, f_lotsbad, f_lpf, f_messy_inode,
+ f_miss_blk_bmap, f_misstable, f_overfsblks: Adjust expect
+ files to deal with the fact that e2fsck is now reporting
+ ranges during pass 5.
+
+2002-02-12 Theodore Tso <tytso at mit.edu>
+
+ * run_e2fsck (status): Use separate sed invocations for greater
+ portabilty. AIX's sed doesn't support multiple -e
+ specifications, even though it's required by Unix 98.
+
+ * test_script.in: Use printf instead of "echo -n", since the -n
+ option to echo is a BSD'ism which isn't specified by the
+ Unix 98 / SUSv3 specification. (And which of course, AIX
+ doesn't implement as a result.)
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2002-02-03 Theodore Tso <tytso at valinux.com>
+
+ * f_swapfs: Fix expect script to deal with extra spaces now
+ printed by debugfs's ls command.
+
+2002-01-06 Andreas Dilger <adilger at turbolinux.com>
+
+ * Makefile: Add new target "make testnew" which will create a new
+ testcase for e2fsck with an empty 8MB filesystem. After
+ the test filesystem is appropriately "broken" the new
+ target "make testend" will create expect files for it.
+
+2001-12-16 Theodore Tso <tytso at mit.edu>
+
+ * f_ext_journal: Add new test which checks e2fsck's ability to use
+ an external journal.
+
+2001-11-30 Gabriel Paubert <paubert at iram.es>
+
+ * f_badorphan: Revert previous, erroneous change.
+
+2001-11-30 Theodore Tso <tytso at mit.edu>
+
+ * f_badorphan, f_journal: Update expect files to reflect the fact
+ that new e2fsck's will move the .journal file to a hidden
+ inode.
+
+2001-11-26 Theodore Tso <tytso at mit.edu>
+
+ * f_miss_blk_bmap: Add new test which checks for bug in e2fsck
+ where it wouldn't allocate a missing block bitmap on
+ filesystems with a blocksize of 2k or 4k.
+
+2001-10-07 Theodore Tso <tytso at mit.edu>
+
+ * f_bad_local_jnl: New test which tests for a V2 journal with bad
+ fields caused by a botched V1->V2 upgrade.
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-08-04 Theodore Tso <tytso at valinux.com>
+
+ * f_bad_inode, f_badsymlinks: Update expect files to reflect
+ changes in the problem code texts.
+
+ * f_swapfs: The image file used by f_swapfs had bugs which got
+ caught by Andreas' changes to be more strict about
+ symlinks.
+
+2001-07-26 Andreas Dilger <adilger at turbolinux.com>
+
+ * f_symlinks: Add several fast symlink error cases to test.
+
+2001-07-27 Theodore Tso <tytso at valinux.com>
+
+ * f_filetype: Update expect.1 to match changed problem message
+ text and the fact that symlinks shouldn't be immutable.
+
+2001-07-07 Theodore Tso <tytso at valinux.com>
+
+ * f_badinode: Update expect.1 to match change in invalid symlink
+ size text.
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-22 Theodore Tso <tytso at valinux.com>
+
+ * run_e2fsck, defaults/e_script: Filter out CR characters from the
+ output, since BK filtered \r fromthe expect files. This
+ is needed to make the regression test suite work again.
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-06-02 Theodore Tso <tytso at valinux.com>
+
+ * f_badinode: Added a fast symlink with an invalid size to test
+ e2fsck's handling of this case.
+
+ * f_dup3: New test case which checks handling of blocks claimed
+ multiple times by one inode which weren't handled
+ correctly by e2fsck 1.20.
+
+ * d_loaddump: Fix test script to remove bash'isms, and make the
+ shell script more robust in cases where the user has
+ overridden CFLAGS so that the debugfs binary isn't
+ compiled with -g, and is smaller than 128k. Also specify
+ the blocksize to be used explictly to avoid problems with
+ people who change the mke2fs default parameters.
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2001-05-14 Theodore Tso <tytso at valinux.com>
+
+ * f_badorphan: New test which verifies corrupted orphan list
+ handling.
+
+2001-05-05 Theodore Tso <tytso at valinux.com>
+
+ * d_loaddump: New test which verifies debugfs's dump and load
+ routines.
+
+2000-10-24 <tytso at snap.thunk.org>
+
+ * f_journal: Update to take into account new printing by the
+ e2fsck program.
+
+2000-08-22 <tytso at valinux.com>
+
+ * f_journal: Make the test check for a wide variety of mixed sizes
+ of orphaned inodes (and not just a size of 0).
+
+2000-08-20 <tytso at valinux.com>
+
+ * run_e2fsck: Filter out JFS DEBUG messages when comparing e2fsck
+ output.
+
+ * f_journal: New test case which checks out running the ext3
+ journal.
+
+ * f_orphan: New test case which checks clearing the list of orphan
+ inodes (files and directories).
+
+ * f_swapfs/expect: Update to reflect new debugfs format for
+ dumping the blocks of an inode.
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+2000-05-25 <tytso at snap.thunk.org>
+
+ * test_script.in: Ignore files in the test directory (to avoid
+ spurious messages when builddir==srcdir).
+
+2000-05-08 Theodore Ts'o <tytso at valinux.com>
+
+ * f_hurd: Add test for Hurd-specific features (right now, just
+ checks to make sure the filetype feature is cleared)
+
+2000-04-06 Theodore Ts'o <tytso at valinux.com>
+
+ * f_filetype: Updated expect script to match with new text for
+ immutable/append-only files.
+
+2000-02-07 Theodore Ts'o <tytso at valinux.com>
+
+ * f_swapfs: Fix expected text to match changed debugfs dump
+ command for i_generation field.
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-11-10 <tytso at valinux.com>
+
+ * f_imagic: New test case which tests handling of imagic inodes in
+ an non-imagic-enabled filessystem.
+
+ * f_imagic_fs: New test case which tests handling of imagic inodes
+ in an imagic-enabled filesystem.
+
+ * f_filetype: New test case which tests setting filetype
+ information in a filesystem. Also tests handling of
+ immutable special files (device/fifo).
+
+ * run_e2fsck: Add support for PREP_CMD, which allows a test case
+ to specify some commands which will be run (via eval)
+ after the image is compressed and before running e2fsck.
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-09-16 <tytso at rsts-11.mit.edu>
+
+ * f_dupdot: New test case which tests duplicate '.' and '..' entries.
+
+1999-09-07 <tytso at rsts-11.mit.edu>
+
+ * f_expand: Make test case better by testing increasing the size
+ of lost+found where an indirect block must be created.
+ Also add checks to see what happens when directories are
+ disconnected because their containing directory is
+ destroyed (turned into a socket :-)
+
+1999-08-02 <tytso at rsts-11.mit.edu>
+
+ * f_dupfsblks: Add additional test cases where files share
+ duplicate blocks with both other files and filesystem
+ metadata.
+
+1999-07-30 <tytso at valinux.com>
+
+ * f_swapfs: Change to deal with new dump_inode command.
+
+1999-07-18 Theodore Ts'o <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.15
+
+1999-06-25 <tytso at rsts-11.mit.edu>
+
+ * f_recnect_bad: New test which checks the case where a disconnect
+ inode also bad inode fields; we need to make sure e2fsck
+ offers to fix the inode (or clear the inode, as necessary).
+
+1999-03-14 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * f_lpffile: New test which checks how e2fsck handles a the case
+ where lost+found exists, but it's not a directory.
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-12-04 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * f_badtable, f_illitable, f_lpf: Update to deal with the fact
+ that e2fsck will now create a lost+found directory at the
+ end of pass 3 if one isn't present.
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+1998-07-05 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * f_swapfs: Fix script to ignore the version string header which
+ debugfs now prints when it starts up.
+
+1998-03-23 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * f_messy_inode: Modify test to deal with changes to support
+ 64-bit size files. (/MAKEDEV had i_dir_acl, now
+ i_size_high, set.)
+
+1998-02-20 Theodore Y. Ts'o <tytso at edt.mit.edu>
+
+ * f_badinode: Set the immutable flag on the block and
+ character device so that e2fsck notices them as bad
+ devices, and offers to fix them. E2fsck currently
+ only checks devices with the immutable flag set, since
+ otherwise there might be some false positives --- the
+ kernel doesn't always clear the all of i_blocks[n],
+ n>=4, due to a race condition.
+
+Sat Oct 25 18:38:56 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Add scripts to skip the e_brel_bma and e_irel_ima tests (since
+ they have been removed from the library for now)
+
+Thu Aug 14 11:25:23 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * f_badinode: Modify test to check for "bad" character and block
+ devices (i.e., ones which contain garbage block entries)
+
+Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.11
+
+Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * Release of E2fsprogs version 1.10
+
+Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.09
+
+Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.08
+
+Wed Mar 26 09:29:25 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * e_icount_normal, e_icount_opt: New tests which validate the
+ icount abstraction.
+
+ * test_script.in: New feature; an argument of a single character
+ means do all the tests in that series.
+
+Tue Mar 18 15:11:04 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * test_config (LANG): Set the language to be C so that the brel
+ and irel tests don't fail.
+
+Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso at mit.edu>
+
+ * Release of E2fsprogs version 1.07
+
+Thu Mar 6 23:23:07 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * f_misstable: New test case which checks what happens when the
+ inode table for a block group is missing
+
+ * f_reconnect: New test case which makes sure a simple
+ disconnected inode is properly handled.
+
+Mon Dec 2 09:33:31 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * test_script.in: Add error checking to make sure a requested test
+ exists.
+
+Tue Oct 15 00:10:37 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * f_bbinode: New test case which exercises what happens when a bad
+ block appears in the inode table.
+
+Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.06
+
+Mon Oct 7 07:52:41 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * f_preen: New test case which makes sure that e2fsck -p won't
+ bash the backup superblock in case of a corrupted master
+ superblock.
+
+ * test_script.in: Let the environment variable TEST_CONFIG to
+ override the location of the test_config file. Move
+ definition of TMP_DIR to test_config.
+
+ * test_config: Add new defnitions for mke2fs, dumpe2fs, tune2fs,
+ lsattr, and chattr.
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
+Mon Sep 9 23:09:47 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (check): Add explicit ./ to test_script invokation,
+ since not all people will have "." in their path.
+
+Tue Sep 3 15:13:05 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * test_config (PAGER): Unset pager to prevent debugfs forking a
+ pager, since the escape sequences confuse the expect
+ script.
+
+Sun May 19 23:37:35 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * test_script: New feature; second optional argument allows
+ developers to only run one test case.
+
+ * f_crashdisk: New test case which contains a patently illegal
+ superblock with a valid magic number.
+
+Thu May 16 11:12:30 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.04
+
+Wed May 15 21:41:29 1996 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * f_illibitmap/expect.1, f_illbbitmap/expect.1: Changed
+ expected output to reflect hint which e2fsck will print when
+ there is a illegal block in the block group
+ descriptors, pointing at a block bitmap, inode bitmap,
+ or block in the inode table.
+
+Wed Mar 27 00:33:40 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.03
+
+Wed Jan 31 11:06:08 1996 <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.02
+
+Mon Sep 4 23:06:06 1995 Remy Card <card at bbj>
+
+ * Makefile.in (clean, distclean): Use the -f option when removing
+ files.
+
+Fri Aug 11 10:10:30 1995 Theodore Y. Ts'o <tytso at lurch.mit.edu>
+
+ * test_script: Count up the number of passed and failed tests by
+ tallying the *.ok and *.failed files.
+
+ * run_e2fsck: Create foo.ok and foo.failed files when tests
+ succeed or fail, respectively.
+
+ * test_config (TZ): Set the timezone to be GMT, so that test
+ results are consistent.
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/Makefile.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/Makefile.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/Makefile.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,59 @@
+#
+# Makefile for the tests directory
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = tests
+INSTALL = @INSTALL@
+
+ at MCONFIG@
+
+all:: @DO_TEST_SUITE@
+
+test_script: test_script.in Makefile
+ @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
+
+check:: test_script
+ @echo "Running e2fsprogs test suite..."
+ @echo " "
+ @./test_script
+
+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
+ 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_script ${TDIR}/image
+ gzip -9 ${TDIR}/image
+ @OUT1=${EXPECT1} OUT2=${EXPECT2} ./test_script ${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 test.img test_script
+
+distclean:: clean
+ $(RM) -f Makefile
+ $(RM) -rf ${TDIR}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/README
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/README 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/README 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/d_loaddump/expect
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/d_loaddump/expect 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/d_loaddump/expect 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,18 @@
+debugfs load/dump test
+mke2fs -Fq -b 1024 ./test.img 512
+Exit status is 0
+debugfs -R ''write test.data 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), 156/512 blocks
+Exit status is 0
+debugfs -R ''dump test_data test.verify'' ./test.img
+Exit status is 0
+cmp test.data test.verify
+Exit status is 0
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/d_loaddump/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/d_loaddump/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/d_loaddump/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+debugfs load/dump test
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/d_loaddump/script
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/d_loaddump/script 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/d_loaddump/script 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,61 @@
+OUT=$test_name.log
+EXP=$test_dir/expect
+VERIFY_FSCK_OPT=-yf
+
+TEST_DATA=test.data
+VERIFY_DATA=test.verify
+
+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 $TMPFILE 512" >> $OUT
+
+$MKE2FS -Fq $TMPFILE 512 > /dev/null 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+dd if=$DEBUGFS 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 $TMPFILE" > $OUT.new
+$DEBUGFS -R "write $TEST_DATA test_data" -w $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -e '2d' $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 -e '2d' $OUT.new >> $OUT
+
+echo "debugfs -R ''dump test_data $VERIFY_DATA'' $TMPFILE" > $OUT.new
+$DEBUGFS -R "dump test_data $VERIFY_DATA" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -e '2d' $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 $test_name.ok $test_name.failed $VERIFY_DATA $TEST_DATA $TMPFILE
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "ok"
+ touch $test_name.ok
+else
+ echo "failed"
+ diff -c $EXP $OUT > $test_name.failed
+fi
+
+unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/defaults/e_script
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/defaults/e_script 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/defaults/e_script 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 '\r' > $OUT
+
+cmp -s $EXPECT $OUT
+status=$?
+
+rm -f $test_name.failed $test_name.ok
+
+if [ "$status" = 0 ] ; then
+ echo "ok"
+ touch $test_name.ok
+else
+ echo "failed"
+ diff -c $EXPECT $OUT > $test_name.failed
+fi
+
+unset EXPECT OUT class instance
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/defaults/f_script
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/defaults/f_script 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/defaults/f_script 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+. $cmd_dir/run_e2fsck
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/e_brel_bma/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/e_brel_bma/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/e_brel_bma/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+block relocation table using the memory array implementation
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/e_brel_bma/script
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/e_brel_bma/script 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/e_brel_bma/script 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2 @@
+rm -f $test_name.ok $test_name.failed
+echo "skipped"
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/e_icount_normal/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/e_icount_normal/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/e_icount_normal/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+inode counting abstraction optimized for storing inode counts
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/e_icount_opt/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/e_icount_opt/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/e_icount_opt/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+inode counting abstraction optimized for counting
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/e_irel_ima/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/e_irel_ima/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/e_irel_ima/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+inode relocation table using the memory array implementation
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/e_irel_ima/script
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/e_irel_ima/script 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/e_irel_ima/script 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2 @@
+rm -f $test_name.ok $test_name.failed
+echo "skipped"
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,10 @@
+Found invalid V2 journal superblock fields (from V1 journal).
+Clearing fields beyond the V1 journal superblock...
+
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bad_local_jnl/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+test for corrupt local journal (bad V1->V2 journal upgrade)
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 block #-1 (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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badbblocks/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+illegal blocks in bad block inode
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -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 bad 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddir/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+corrupted directory entries
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_baddotdir/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+bad '.' and '..' entries
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,44 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Inode 12 (/motd) has a bad mode (0110444).
+Clear? yes
+
+i_fsize for inode 13 (/timings) is 4, should be zero.
+Clear? yes
+
+i_file_acl for inode 13 (/timings) is 39, 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) has an invalid size (100).
+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
+
+Free inodes count wrong for group #0 (16, counted=20).
+Fix? yes
+
+Free inodes count wrong (16, counted=20).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/32 files (0.0% non-contiguous), 23/100 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badinode/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+corrupted inode entries
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,75 @@
+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)
+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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badorphan/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+corrupted orphan list
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,29 @@
+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 clear the this block (and hope for the best) from the
+bad block list and hope that 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 clear the this block (and hope for the best) from the
+bad block list and hope that 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badprimary/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+bad blocks in the primary superblock and group descriptors
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,44 @@
+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 ??? (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
+Free blocks count wrong for group #0 (77, counted=76).
+Fix? yes
+
+Free blocks count wrong (77, counted=76).
+Fix? yes
+
+Free inodes count wrong for group #0 (20, counted=19).
+Fix? yes
+
+Directories count wrong for group #0 (2, counted=3).
+Fix? yes
+
+Free inodes count wrong (20, counted=19).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/32 files (0.0% non-contiguous), 24/100 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badroot/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+file in root directory inode
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,53 @@
+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
+
+Pass 2: Checking directory structure
+Symlink /empty_link (inode #17) has an invalid size (0).
+Clear? yes
+
+Symlink /long_fastlink (inode #13) has an invalid size (99).
+Clear? yes
+
+Symlink /long_link (inode #14) has an invalid size (1234567890).
+Clear? yes
+
+Symlink /high_link (inode #16) has an invalid size (4294967358).
+Clear? yes
+
+Symlink /empty_fastlink (inode #12) has an invalid size (0).
+Clear? yes
+
+Symlink /bad_link (inode #19) has an invalid size (62).
+Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -26
+Fix? yes
+
+Free blocks count wrong for group #0 (997, counted=1001).
+Fix? yes
+
+Free blocks count wrong (997, counted=1001).
+Fix? yes
+
+Free inodes count wrong for group #0 (12, counted=18).
+Fix? yes
+
+Free inodes count wrong (12, counted=18).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/32 files (0.0% non-contiguous), 23/1024 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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), 23/1024 blocks
+Exit status is 0
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badsymlinks/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+corrupted fast symlinks
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,42 @@
+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 (78, counted=87).
+Fix? yes
+
+Free blocks count wrong (78, counted=87).
+Fix? yes
+
+Inode bitmap differences: +(12--16) +(25--32)
+Fix? yes
+
+Free inodes count wrong for group #0 (21, counted=7).
+Fix? yes
+
+Free inodes count wrong (21, 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_badtable/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+bad blocks in bitmaps and inode table
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,47 @@
+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...
+Duplicate blocks found... invoking duplicate block passes.
+Pass 1B: Rescan for duplicate/bad blocks
+Duplicate/bad block(s) in inode 2: 21
+Duplicate/bad block(s) in inode 11: 9 10 11 12 13 14 15 16 17 18 19 20
+Duplicate/bad block(s) in inode 12: 25 26
+Pass 1C: Scan directories for inodes with dup blocks.
+Pass 1D: Reconciling duplicate blocks
+(There are 3 inodes containing duplicate/bad blocks.)
+
+File /termcap (inode #12, mod time Sun Jan 2 08:29:13 1994)
+ has 2 duplicate block(s), shared with 1 file(s):
+ <The bad blocks inode> (inode #1, mod time Sun Jul 17 00:47:58 1994)
+Clone duplicate/bad blocks? yes
+
+File /lost+found (inode #11, mod time Sun Jan 2 08:28:40 1994)
+ has 12 duplicate block(s), shared with 1 file(s):
+ <The bad blocks inode> (inode #1, mod time Sun Jul 17 00:47:58 1994)
+Clone duplicate/bad blocks? yes
+
+File / (inode #2, mod time Sun Jan 2 08:29:13 1994)
+ has 1 duplicate block(s), shared with 1 file(s):
+ <The bad blocks inode> (inode #1, mod time Sun Jul 17 00:47:58 1994)
+Clone duplicate/bad 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbfile/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+bad blocks in files
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bbinode/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+bad blocks in inode table
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_bitmaps/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+corrupted inode and block bitmaps
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,9 @@
+../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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+Superblock with illegal values
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/script
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/script 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_crashdisk/script 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,2 @@
+ONE_PASS_ONLY="true"
+. $cmd_dir/run_e2fsck
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dirlink/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+directory hard links
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,37 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Duplicate blocks found... invoking duplicate block passes.
+Pass 1B: Rescan for duplicate/bad blocks
+Duplicate/bad block(s) in inode 12: 25 26
+Duplicate/bad block(s) in inode 13: 25 26
+Pass 1C: Scan directories for inodes with dup blocks.
+Pass 1D: Reconciling duplicate blocks
+(There are 2 inodes containing duplicate/bad blocks.)
+
+File /motd (inode #13, mod time Tue Sep 21 03:19:20 1993)
+ has 2 duplicate block(s), shared with 1 file(s):
+ /termcap (inode #12, mod time Tue Sep 21 03:19:14 1993)
+Clone duplicate/bad blocks? yes
+
+File /termcap (inode #12, mod time Tue Sep 21 03:19:14 1993)
+ has 2 duplicate block(s), shared with 1 file(s):
+ /motd (inode #13, mod time Tue Sep 21 03:19:20 1993)
+Duplicated 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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 (7.7% non-contiguous), 40/100 blocks
+Exit status is 0
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+blocks claimed by two different files
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,44 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Duplicate blocks found... invoking duplicate block passes.
+Pass 1B: Rescan for duplicate/bad blocks
+Duplicate/bad block(s) in inode 12: 25 26
+Duplicate/bad block(s) in inode 13: 25 26 57 58
+Duplicate/bad block(s) in inode 14: 57 58
+Pass 1C: Scan directories for inodes with dup blocks.
+Pass 1D: Reconciling duplicate blocks
+(There are 3 inodes containing duplicate/bad blocks.)
+
+File /pass1.c (inode #14, mod time Tue Sep 21 04:28:37 1993)
+ has 2 duplicate block(s), shared with 1 file(s):
+ /motd (inode #13, mod time Tue Sep 21 03:19:20 1993)
+Clone duplicate/bad blocks? yes
+
+File /motd (inode #13, mod time Tue Sep 21 03:19:20 1993)
+ has 4 duplicate 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 duplicate/bad blocks? yes
+
+File /termcap (inode #12, mod time Tue Sep 21 03:19:14 1993)
+ has 2 duplicate block(s), shared with 1 file(s):
+ /motd (inode #13, mod time Tue Sep 21 03:19:20 1993)
+Duplicated 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup2/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+blocks claimed by three different files
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,44 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 16, i_blocks is 22, should be 24. Fix? yes
+
+Duplicate blocks found... invoking duplicate block passes.
+Pass 1B: Rescan for duplicate/bad blocks
+Duplicate/bad block(s) in inode 11: 24 24
+Duplicate/bad block(s) in inode 14: 69 69
+Duplicate/bad block(s) in inode 16: 99 99
+Pass 1C: Scan directories for inodes with dup blocks.
+Pass 1D: Reconciling duplicate blocks
+(There are 3 inodes containing duplicate/bad blocks.)
+
+File /e2fsck (inode #16, mod time Tue Sep 21 04:32:22 1993)
+ has 2 duplicate block(s), shared with 0 file(s):
+Clone duplicate/bad blocks? yes
+
+File /pass1.c (inode #14, mod time Tue Sep 21 04:28:37 1993)
+ has 2 duplicate block(s), shared with 0 file(s):
+Clone duplicate/bad blocks? yes
+
+File /lost+found (inode #11, mod time Mon Sep 20 03:26:36 1993)
+ has 2 duplicate block(s), shared with 0 file(s):
+Clone duplicate/bad 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dup3/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+blocks claimed by one file multiple times
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,28 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry '.' in ??? (12) is duplicate '.' entry.
+Fix? yes
+
+Entry '..' in ??? (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
+Free inodes count wrong for group #0 (2, counted=3).
+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), 22/100 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupdot/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+duplicate '.' and '..' entries
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,63 @@
+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
+
+Duplicate blocks found... invoking duplicate block passes.
+Pass 1B: Rescan for duplicate/bad blocks
+Duplicate/bad block(s) in inode 12: 3 4 6 1
+Duplicate/bad block(s) in inode 13: 2 3
+Duplicate/bad block(s) in inode 14: 2
+Pass 1C: Scan directories for inodes with dup blocks.
+Pass 1D: Reconciling duplicate blocks
+(There are 3 inodes containing duplicate/bad blocks.)
+
+File /quux (inode #14, mod time Thu Aug 5 07:18:09 1999)
+ has 1 duplicate block(s), shared with 2 file(s):
+ <filesystem metadata>
+ /bar (inode #13, mod time Thu Aug 5 07:17:17 1999)
+Clone duplicate/bad blocks? yes
+
+File /bar (inode #13, mod time Thu Aug 5 07:17:17 1999)
+ has 2 duplicate block(s), shared with 3 file(s):
+ <filesystem metadata>
+ /quux (inode #14, mod time Thu Aug 5 07:18:09 1999)
+ /foo (inode #12, mod time Thu Apr 28 17:57:53 1994)
+Clone duplicate/bad blocks? yes
+
+File /foo (inode #12, mod time Thu Apr 28 17:57:53 1994)
+ has 4 duplicate block(s), shared with 2 file(s):
+ <filesystem metadata>
+ /bar (inode #13, mod time Thu Aug 5 07:17:17 1999)
+Clone duplicate/bad 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 deleted/unused inode 32. 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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 (7.1% non-contiguous), 30/100 blocks
+Exit status is 0
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupfsblks/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+blocks claimed by a file and bitmaps or inode tables
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,26 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+Duplicate blocks found... invoking duplicate block passes.
+Pass 1B: Rescan for duplicate/bad blocks
+Duplicate/bad block(s) in inode 12: 2 3 1
+Pass 1C: Scan directories for inodes with dup blocks.
+Pass 1D: Reconciling duplicate blocks
+(There are 1 inodes containing duplicate/bad blocks.)
+
+File /termcap (inode #12, mod time Sun Jan 2 08:29:13 1994)
+ has 3 duplicate block(s), shared with 1 file(s):
+ <filesystem metadata>
+Clone duplicate/bad 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_dupsuper/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+blocks claimed by a file and superblock or group descriptors
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_end-bitmap/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+corruption at end of block bitmap
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,11476 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Unconnected directory inode 310 (???)
+Connect to /lost+found? yes
+
+Unconnected directory inode 1520 (???)
+Connect to /lost+found? yes
+
+Unconnected directory inode 1805 (???)
+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 0, should be 1. Fix? yes
+
+Unattached inode 13
+Connect to /lost+found? yes
+
+Inode 13 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 14
+Connect to /lost+found? yes
+
+Inode 14 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 15
+Connect to /lost+found? yes
+
+Inode 15 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 16
+Connect to /lost+found? yes
+
+Inode 16 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 17
+Connect to /lost+found? yes
+
+Inode 17 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 18
+Connect to /lost+found? yes
+
+Inode 18 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 19
+Connect to /lost+found? yes
+
+Inode 19 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 20
+Connect to /lost+found? yes
+
+Inode 20 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 21
+Connect to /lost+found? yes
+
+Inode 21 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 22
+Connect to /lost+found? yes
+
+Inode 22 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 23
+Connect to /lost+found? yes
+
+Inode 23 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 24
+Connect to /lost+found? yes
+
+Inode 24 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 25
+Connect to /lost+found? yes
+
+Inode 25 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 26
+Connect to /lost+found? yes
+
+Inode 26 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 27
+Connect to /lost+found? yes
+
+Inode 27 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 28
+Connect to /lost+found? yes
+
+Inode 28 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 29
+Connect to /lost+found? yes
+
+Inode 29 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 30
+Connect to /lost+found? yes
+
+Inode 30 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 31
+Connect to /lost+found? yes
+
+Inode 31 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 32
+Connect to /lost+found? yes
+
+Inode 32 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 33
+Connect to /lost+found? yes
+
+Inode 33 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 34
+Connect to /lost+found? yes
+
+Inode 34 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 35
+Connect to /lost+found? yes
+
+Inode 35 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 36
+Connect to /lost+found? yes
+
+Inode 36 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 37
+Connect to /lost+found? yes
+
+Inode 37 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 38
+Connect to /lost+found? yes
+
+Inode 38 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 39
+Connect to /lost+found? yes
+
+Inode 39 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 40
+Connect to /lost+found? yes
+
+Inode 40 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 41
+Connect to /lost+found? yes
+
+Inode 41 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 42
+Connect to /lost+found? yes
+
+Inode 42 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 43
+Connect to /lost+found? yes
+
+Inode 43 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 44
+Connect to /lost+found? yes
+
+Inode 44 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 45
+Connect to /lost+found? yes
+
+Inode 45 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 46
+Connect to /lost+found? yes
+
+Inode 46 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 47
+Connect to /lost+found? yes
+
+Inode 47 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 48
+Connect to /lost+found? yes
+
+Inode 48 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 49
+Connect to /lost+found? yes
+
+Inode 49 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 50
+Connect to /lost+found? yes
+
+Inode 50 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 51
+Connect to /lost+found? yes
+
+Inode 51 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 52
+Connect to /lost+found? yes
+
+Inode 52 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 53
+Connect to /lost+found? yes
+
+Inode 53 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 54
+Connect to /lost+found? yes
+
+Inode 54 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 55
+Connect to /lost+found? yes
+
+Inode 55 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 56
+Connect to /lost+found? yes
+
+Inode 56 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 57
+Connect to /lost+found? yes
+
+Inode 57 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 58
+Connect to /lost+found? yes
+
+Inode 58 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 59
+Connect to /lost+found? yes
+
+Inode 59 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 60
+Connect to /lost+found? yes
+
+Inode 60 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 61
+Connect to /lost+found? yes
+
+Inode 61 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 62
+Connect to /lost+found? yes
+
+Inode 62 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 63
+Connect to /lost+found? yes
+
+Inode 63 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 64
+Connect to /lost+found? yes
+
+Inode 64 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 65
+Connect to /lost+found? yes
+
+Inode 65 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 66
+Connect to /lost+found? yes
+
+Inode 66 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 67
+Connect to /lost+found? yes
+
+Inode 67 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 68
+Connect to /lost+found? yes
+
+Inode 68 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 69
+Connect to /lost+found? yes
+
+Inode 69 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 70
+Connect to /lost+found? yes
+
+Inode 70 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 71
+Connect to /lost+found? yes
+
+Inode 71 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 72
+Connect to /lost+found? yes
+
+Inode 72 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 73
+Connect to /lost+found? yes
+
+Inode 73 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 74
+Connect to /lost+found? yes
+
+Inode 74 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 75
+Connect to /lost+found? yes
+
+Inode 75 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 76
+Connect to /lost+found? yes
+
+Inode 76 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 77
+Connect to /lost+found? yes
+
+Inode 77 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 78
+Connect to /lost+found? yes
+
+Inode 78 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 79
+Connect to /lost+found? yes
+
+Inode 79 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 80
+Connect to /lost+found? yes
+
+Inode 80 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 81
+Connect to /lost+found? yes
+
+Inode 81 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 82
+Connect to /lost+found? yes
+
+Inode 82 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 83
+Connect to /lost+found? yes
+
+Inode 83 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 84
+Connect to /lost+found? yes
+
+Inode 84 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 85
+Connect to /lost+found? yes
+
+Inode 85 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 86
+Connect to /lost+found? yes
+
+Inode 86 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 87
+Connect to /lost+found? yes
+
+Inode 87 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 88
+Connect to /lost+found? yes
+
+Inode 88 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 89
+Connect to /lost+found? yes
+
+Inode 89 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 90
+Connect to /lost+found? yes
+
+Inode 90 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 91
+Connect to /lost+found? yes
+
+Inode 91 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 92
+Connect to /lost+found? yes
+
+Inode 92 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 93
+Connect to /lost+found? yes
+
+Inode 93 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 94
+Connect to /lost+found? yes
+
+Inode 94 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 95
+Connect to /lost+found? yes
+
+Inode 95 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 96
+Connect to /lost+found? yes
+
+Inode 96 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 97
+Connect to /lost+found? yes
+
+Inode 97 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 98
+Connect to /lost+found? yes
+
+Inode 98 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 99
+Connect to /lost+found? yes
+
+Inode 99 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 100
+Connect to /lost+found? yes
+
+Inode 100 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 101
+Connect to /lost+found? yes
+
+Inode 101 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 102
+Connect to /lost+found? yes
+
+Inode 102 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 103
+Connect to /lost+found? yes
+
+Inode 103 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 104
+Connect to /lost+found? yes
+
+Inode 104 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 105
+Connect to /lost+found? yes
+
+Inode 105 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 106
+Connect to /lost+found? yes
+
+Inode 106 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 107
+Connect to /lost+found? yes
+
+Inode 107 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 108
+Connect to /lost+found? yes
+
+Inode 108 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 109
+Connect to /lost+found? yes
+
+Inode 109 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 110
+Connect to /lost+found? yes
+
+Inode 110 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 111
+Connect to /lost+found? yes
+
+Inode 111 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 112
+Connect to /lost+found? yes
+
+Inode 112 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 113
+Connect to /lost+found? yes
+
+Inode 113 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 114
+Connect to /lost+found? yes
+
+Inode 114 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 115
+Connect to /lost+found? yes
+
+Inode 115 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 116
+Connect to /lost+found? yes
+
+Inode 116 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 117
+Connect to /lost+found? yes
+
+Inode 117 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 118
+Connect to /lost+found? yes
+
+Inode 118 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 119
+Connect to /lost+found? yes
+
+Inode 119 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 120
+Connect to /lost+found? yes
+
+Inode 120 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 121
+Connect to /lost+found? yes
+
+Inode 121 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 122
+Connect to /lost+found? yes
+
+Inode 122 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 123
+Connect to /lost+found? yes
+
+Inode 123 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 124
+Connect to /lost+found? yes
+
+Inode 124 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 125
+Connect to /lost+found? yes
+
+Inode 125 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 126
+Connect to /lost+found? yes
+
+Inode 126 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 127
+Connect to /lost+found? yes
+
+Inode 127 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 128
+Connect to /lost+found? yes
+
+Inode 128 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 129
+Connect to /lost+found? yes
+
+Inode 129 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 130
+Connect to /lost+found? yes
+
+Inode 130 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 131
+Connect to /lost+found? yes
+
+Inode 131 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 132
+Connect to /lost+found? yes
+
+Inode 132 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 133
+Connect to /lost+found? yes
+
+Inode 133 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 134
+Connect to /lost+found? yes
+
+Inode 134 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 135
+Connect to /lost+found? yes
+
+Inode 135 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 136
+Connect to /lost+found? yes
+
+Inode 136 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 137
+Connect to /lost+found? yes
+
+Inode 137 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 138
+Connect to /lost+found? yes
+
+Inode 138 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 139
+Connect to /lost+found? yes
+
+Inode 139 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 140
+Connect to /lost+found? yes
+
+Inode 140 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 141
+Connect to /lost+found? yes
+
+Inode 141 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 142
+Connect to /lost+found? yes
+
+Inode 142 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 143
+Connect to /lost+found? yes
+
+Inode 143 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 144
+Connect to /lost+found? yes
+
+Inode 144 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 145
+Connect to /lost+found? yes
+
+Inode 145 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 146
+Connect to /lost+found? yes
+
+Inode 146 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 147
+Connect to /lost+found? yes
+
+Inode 147 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 148
+Connect to /lost+found? yes
+
+Inode 148 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 149
+Connect to /lost+found? yes
+
+Inode 149 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 150
+Connect to /lost+found? yes
+
+Inode 150 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 151
+Connect to /lost+found? yes
+
+Inode 151 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 152
+Connect to /lost+found? yes
+
+Inode 152 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 153
+Connect to /lost+found? yes
+
+Inode 153 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 154
+Connect to /lost+found? yes
+
+Inode 154 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 155
+Connect to /lost+found? yes
+
+Inode 155 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 156
+Connect to /lost+found? yes
+
+Inode 156 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 157
+Connect to /lost+found? yes
+
+Inode 157 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 158
+Connect to /lost+found? yes
+
+Inode 158 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 159
+Connect to /lost+found? yes
+
+Inode 159 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 160
+Connect to /lost+found? yes
+
+Inode 160 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 161
+Connect to /lost+found? yes
+
+Inode 161 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 162
+Connect to /lost+found? yes
+
+Inode 162 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 163
+Connect to /lost+found? yes
+
+Inode 163 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 164
+Connect to /lost+found? yes
+
+Inode 164 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 165
+Connect to /lost+found? yes
+
+Inode 165 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 166
+Connect to /lost+found? yes
+
+Inode 166 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 167
+Connect to /lost+found? yes
+
+Inode 167 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 168
+Connect to /lost+found? yes
+
+Inode 168 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 169
+Connect to /lost+found? yes
+
+Inode 169 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 170
+Connect to /lost+found? yes
+
+Inode 170 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 171
+Connect to /lost+found? yes
+
+Inode 171 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 172
+Connect to /lost+found? yes
+
+Inode 172 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 173
+Connect to /lost+found? yes
+
+Inode 173 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 174
+Connect to /lost+found? yes
+
+Inode 174 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 175
+Connect to /lost+found? yes
+
+Inode 175 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 176
+Connect to /lost+found? yes
+
+Inode 176 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 177
+Connect to /lost+found? yes
+
+Inode 177 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 178
+Connect to /lost+found? yes
+
+Inode 178 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 179
+Connect to /lost+found? yes
+
+Inode 179 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 180
+Connect to /lost+found? yes
+
+Inode 180 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 181
+Connect to /lost+found? yes
+
+Inode 181 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 182
+Connect to /lost+found? yes
+
+Inode 182 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 183
+Connect to /lost+found? yes
+
+Inode 183 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 184
+Connect to /lost+found? yes
+
+Inode 184 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 185
+Connect to /lost+found? yes
+
+Inode 185 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 186
+Connect to /lost+found? yes
+
+Inode 186 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 187
+Connect to /lost+found? yes
+
+Inode 187 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 188
+Connect to /lost+found? yes
+
+Inode 188 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 189
+Connect to /lost+found? yes
+
+Inode 189 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 190
+Connect to /lost+found? yes
+
+Inode 190 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 191
+Connect to /lost+found? yes
+
+Inode 191 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 192
+Connect to /lost+found? yes
+
+Inode 192 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 193
+Connect to /lost+found? yes
+
+Inode 193 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 194
+Connect to /lost+found? yes
+
+Inode 194 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 195
+Connect to /lost+found? yes
+
+Inode 195 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 196
+Connect to /lost+found? yes
+
+Inode 196 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 197
+Connect to /lost+found? yes
+
+Inode 197 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 198
+Connect to /lost+found? yes
+
+Inode 198 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 199
+Connect to /lost+found? yes
+
+Inode 199 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 200
+Connect to /lost+found? yes
+
+Inode 200 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 201
+Connect to /lost+found? yes
+
+Inode 201 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 202
+Connect to /lost+found? yes
+
+Inode 202 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 203
+Connect to /lost+found? yes
+
+Inode 203 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 204
+Connect to /lost+found? yes
+
+Inode 204 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 205
+Connect to /lost+found? yes
+
+Inode 205 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 206
+Connect to /lost+found? yes
+
+Inode 206 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 207
+Connect to /lost+found? yes
+
+Inode 207 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 208
+Connect to /lost+found? yes
+
+Inode 208 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 209
+Connect to /lost+found? yes
+
+Inode 209 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 210
+Connect to /lost+found? yes
+
+Inode 210 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 211
+Connect to /lost+found? yes
+
+Inode 211 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 212
+Connect to /lost+found? yes
+
+Inode 212 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 213
+Connect to /lost+found? yes
+
+Inode 213 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 214
+Connect to /lost+found? yes
+
+Inode 214 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 215
+Connect to /lost+found? yes
+
+Inode 215 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 216
+Connect to /lost+found? yes
+
+Inode 216 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 217
+Connect to /lost+found? yes
+
+Inode 217 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 218
+Connect to /lost+found? yes
+
+Inode 218 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 219
+Connect to /lost+found? yes
+
+Inode 219 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 220
+Connect to /lost+found? yes
+
+Inode 220 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 221
+Connect to /lost+found? yes
+
+Inode 221 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 222
+Connect to /lost+found? yes
+
+Inode 222 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 223
+Connect to /lost+found? yes
+
+Inode 223 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 224
+Connect to /lost+found? yes
+
+Inode 224 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 225
+Connect to /lost+found? yes
+
+Inode 225 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 226
+Connect to /lost+found? yes
+
+Inode 226 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 227
+Connect to /lost+found? yes
+
+Inode 227 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 228
+Connect to /lost+found? yes
+
+Inode 228 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 229
+Connect to /lost+found? yes
+
+Inode 229 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 230
+Connect to /lost+found? yes
+
+Inode 230 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 231
+Connect to /lost+found? yes
+
+Inode 231 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 232
+Connect to /lost+found? yes
+
+Inode 232 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 233
+Connect to /lost+found? yes
+
+Inode 233 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 234
+Connect to /lost+found? yes
+
+Inode 234 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 235
+Connect to /lost+found? yes
+
+Inode 235 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 236
+Connect to /lost+found? yes
+
+Inode 236 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 237
+Connect to /lost+found? yes
+
+Inode 237 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 238
+Connect to /lost+found? yes
+
+Inode 238 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 239
+Connect to /lost+found? yes
+
+Inode 239 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 240
+Connect to /lost+found? yes
+
+Inode 240 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 241
+Connect to /lost+found? yes
+
+Inode 241 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 242
+Connect to /lost+found? yes
+
+Inode 242 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 243
+Connect to /lost+found? yes
+
+Inode 243 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 244
+Connect to /lost+found? yes
+
+Inode 244 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 245
+Connect to /lost+found? yes
+
+Inode 245 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 246
+Connect to /lost+found? yes
+
+Inode 246 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 247
+Connect to /lost+found? yes
+
+Inode 247 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 248
+Connect to /lost+found? yes
+
+Inode 248 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 249
+Connect to /lost+found? yes
+
+Inode 249 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 250
+Connect to /lost+found? yes
+
+Inode 250 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 251
+Connect to /lost+found? yes
+
+Inode 251 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 252
+Connect to /lost+found? yes
+
+Inode 252 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 253
+Connect to /lost+found? yes
+
+Inode 253 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 254
+Connect to /lost+found? yes
+
+Inode 254 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 255
+Connect to /lost+found? yes
+
+Inode 255 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 256
+Connect to /lost+found? yes
+
+Inode 256 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 257
+Connect to /lost+found? yes
+
+Inode 257 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 258
+Connect to /lost+found? yes
+
+Inode 258 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 259
+Connect to /lost+found? yes
+
+Inode 259 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 260
+Connect to /lost+found? yes
+
+Inode 260 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 261
+Connect to /lost+found? yes
+
+Inode 261 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 262
+Connect to /lost+found? yes
+
+Inode 262 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 263
+Connect to /lost+found? yes
+
+Inode 263 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 264
+Connect to /lost+found? yes
+
+Inode 264 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 265
+Connect to /lost+found? yes
+
+Inode 265 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 266
+Connect to /lost+found? yes
+
+Inode 266 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 267
+Connect to /lost+found? yes
+
+Inode 267 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 268
+Connect to /lost+found? yes
+
+Inode 268 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 269
+Connect to /lost+found? yes
+
+Inode 269 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 270
+Connect to /lost+found? yes
+
+Inode 270 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 271
+Connect to /lost+found? yes
+
+Inode 271 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 272
+Connect to /lost+found? yes
+
+Inode 272 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 273
+Connect to /lost+found? yes
+
+Inode 273 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 274
+Connect to /lost+found? yes
+
+Inode 274 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 275
+Connect to /lost+found? yes
+
+Inode 275 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 276
+Connect to /lost+found? yes
+
+Inode 276 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 277
+Connect to /lost+found? yes
+
+Inode 277 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 278
+Connect to /lost+found? yes
+
+Inode 278 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 279
+Connect to /lost+found? yes
+
+Inode 279 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 280
+Connect to /lost+found? yes
+
+Inode 280 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 281
+Connect to /lost+found? yes
+
+Inode 281 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 282
+Connect to /lost+found? yes
+
+Inode 282 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 283
+Connect to /lost+found? yes
+
+Inode 283 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 284
+Connect to /lost+found? yes
+
+Inode 284 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 285
+Connect to /lost+found? yes
+
+Inode 285 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 286
+Connect to /lost+found? yes
+
+Inode 286 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 287
+Connect to /lost+found? yes
+
+Inode 287 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 288
+Connect to /lost+found? yes
+
+Inode 288 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 289
+Connect to /lost+found? yes
+
+Inode 289 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 290
+Connect to /lost+found? yes
+
+Inode 290 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 291
+Connect to /lost+found? yes
+
+Inode 291 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 292
+Connect to /lost+found? yes
+
+Inode 292 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 293
+Connect to /lost+found? yes
+
+Inode 293 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 294
+Connect to /lost+found? yes
+
+Inode 294 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 295
+Connect to /lost+found? yes
+
+Inode 295 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 296
+Connect to /lost+found? yes
+
+Inode 296 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 297
+Connect to /lost+found? yes
+
+Inode 297 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 298
+Connect to /lost+found? yes
+
+Inode 298 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 299
+Connect to /lost+found? yes
+
+Inode 299 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 300
+Connect to /lost+found? yes
+
+Inode 300 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 301
+Connect to /lost+found? yes
+
+Inode 301 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 302
+Connect to /lost+found? yes
+
+Inode 302 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 303
+Connect to /lost+found? yes
+
+Inode 303 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 304
+Connect to /lost+found? yes
+
+Inode 304 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 305
+Connect to /lost+found? yes
+
+Inode 305 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 306
+Connect to /lost+found? yes
+
+Inode 306 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 307
+Connect to /lost+found? yes
+
+Inode 307 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 308
+Connect to /lost+found? yes
+
+Inode 308 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 309
+Connect to /lost+found? yes
+
+Inode 309 ref count is 2, should be 1. Fix? yes
+
+Inode 310 ref count is 3, should be 2. Fix? yes
+
+Unattached inode 1079
+Connect to /lost+found? yes
+
+Inode 1079 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1080
+Connect to /lost+found? yes
+
+Inode 1080 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1081
+Connect to /lost+found? yes
+
+Inode 1081 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1082
+Connect to /lost+found? yes
+
+Inode 1082 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1083
+Connect to /lost+found? yes
+
+Inode 1083 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1084
+Connect to /lost+found? yes
+
+Inode 1084 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1085
+Connect to /lost+found? yes
+
+Inode 1085 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1086
+Connect to /lost+found? yes
+
+Inode 1086 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1087
+Connect to /lost+found? yes
+
+Inode 1087 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1088
+Connect to /lost+found? yes
+
+Inode 1088 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1089
+Connect to /lost+found? yes
+
+Inode 1089 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1090
+Connect to /lost+found? yes
+
+Inode 1090 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1091
+Connect to /lost+found? yes
+
+Inode 1091 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1092
+Connect to /lost+found? yes
+
+Inode 1092 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1093
+Connect to /lost+found? yes
+
+Inode 1093 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1094
+Connect to /lost+found? yes
+
+Inode 1094 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1095
+Connect to /lost+found? yes
+
+Inode 1095 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1096
+Connect to /lost+found? yes
+
+Inode 1096 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1097
+Connect to /lost+found? yes
+
+Inode 1097 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1098
+Connect to /lost+found? yes
+
+Inode 1098 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1099
+Connect to /lost+found? yes
+
+Inode 1099 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1100
+Connect to /lost+found? yes
+
+Inode 1100 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1101
+Connect to /lost+found? yes
+
+Inode 1101 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1102
+Connect to /lost+found? yes
+
+Inode 1102 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1103
+Connect to /lost+found? yes
+
+Inode 1103 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1104
+Connect to /lost+found? yes
+
+Inode 1104 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1105
+Connect to /lost+found? yes
+
+Inode 1105 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1106
+Connect to /lost+found? yes
+
+Inode 1106 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1107
+Connect to /lost+found? yes
+
+Inode 1107 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1108
+Connect to /lost+found? yes
+
+Inode 1108 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1109
+Connect to /lost+found? yes
+
+Inode 1109 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1110
+Connect to /lost+found? yes
+
+Inode 1110 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1111
+Connect to /lost+found? yes
+
+Inode 1111 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1112
+Connect to /lost+found? yes
+
+Inode 1112 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1113
+Connect to /lost+found? yes
+
+Inode 1113 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1114
+Connect to /lost+found? yes
+
+Inode 1114 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1115
+Connect to /lost+found? yes
+
+Inode 1115 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1116
+Connect to /lost+found? yes
+
+Inode 1116 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1117
+Connect to /lost+found? yes
+
+Inode 1117 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1118
+Connect to /lost+found? yes
+
+Inode 1118 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1119
+Connect to /lost+found? yes
+
+Inode 1119 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1120
+Connect to /lost+found? yes
+
+Inode 1120 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1121
+Connect to /lost+found? yes
+
+Inode 1121 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1122
+Connect to /lost+found? yes
+
+Inode 1122 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1123
+Connect to /lost+found? yes
+
+Inode 1123 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1124
+Connect to /lost+found? yes
+
+Inode 1124 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1125
+Connect to /lost+found? yes
+
+Inode 1125 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1126
+Connect to /lost+found? yes
+
+Inode 1126 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1127
+Connect to /lost+found? yes
+
+Inode 1127 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1128
+Connect to /lost+found? yes
+
+Inode 1128 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1129
+Connect to /lost+found? yes
+
+Inode 1129 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1130
+Connect to /lost+found? yes
+
+Inode 1130 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1131
+Connect to /lost+found? yes
+
+Inode 1131 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1132
+Connect to /lost+found? yes
+
+Inode 1132 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1133
+Connect to /lost+found? yes
+
+Inode 1133 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1134
+Connect to /lost+found? yes
+
+Inode 1134 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1135
+Connect to /lost+found? yes
+
+Inode 1135 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1136
+Connect to /lost+found? yes
+
+Inode 1136 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1137
+Connect to /lost+found? yes
+
+Inode 1137 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1138
+Connect to /lost+found? yes
+
+Inode 1138 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1139
+Connect to /lost+found? yes
+
+Inode 1139 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1140
+Connect to /lost+found? yes
+
+Inode 1140 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1141
+Connect to /lost+found? yes
+
+Inode 1141 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1142
+Connect to /lost+found? yes
+
+Inode 1142 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1143
+Connect to /lost+found? yes
+
+Inode 1143 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1144
+Connect to /lost+found? yes
+
+Inode 1144 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1145
+Connect to /lost+found? yes
+
+Inode 1145 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1146
+Connect to /lost+found? yes
+
+Inode 1146 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1147
+Connect to /lost+found? yes
+
+Inode 1147 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1148
+Connect to /lost+found? yes
+
+Inode 1148 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1149
+Connect to /lost+found? yes
+
+Inode 1149 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1150
+Connect to /lost+found? yes
+
+Inode 1150 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1151
+Connect to /lost+found? yes
+
+Inode 1151 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1152
+Connect to /lost+found? yes
+
+Inode 1152 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1153
+Connect to /lost+found? yes
+
+Inode 1153 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1154
+Connect to /lost+found? yes
+
+Inode 1154 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1155
+Connect to /lost+found? yes
+
+Inode 1155 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1156
+Connect to /lost+found? yes
+
+Inode 1156 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1157
+Connect to /lost+found? yes
+
+Inode 1157 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1158
+Connect to /lost+found? yes
+
+Inode 1158 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1159
+Connect to /lost+found? yes
+
+Inode 1159 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1160
+Connect to /lost+found? yes
+
+Inode 1160 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1161
+Connect to /lost+found? yes
+
+Inode 1161 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1162
+Connect to /lost+found? yes
+
+Inode 1162 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1163
+Connect to /lost+found? yes
+
+Inode 1163 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1164
+Connect to /lost+found? yes
+
+Inode 1164 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1165
+Connect to /lost+found? yes
+
+Inode 1165 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1166
+Connect to /lost+found? yes
+
+Inode 1166 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1167
+Connect to /lost+found? yes
+
+Inode 1167 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1168
+Connect to /lost+found? yes
+
+Inode 1168 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1169
+Connect to /lost+found? yes
+
+Inode 1169 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1170
+Connect to /lost+found? yes
+
+Inode 1170 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1171
+Connect to /lost+found? yes
+
+Inode 1171 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1172
+Connect to /lost+found? yes
+
+Inode 1172 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1173
+Connect to /lost+found? yes
+
+Inode 1173 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1174
+Connect to /lost+found? yes
+
+Inode 1174 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1175
+Connect to /lost+found? yes
+
+Inode 1175 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1176
+Connect to /lost+found? yes
+
+Inode 1176 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1177
+Connect to /lost+found? yes
+
+Inode 1177 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1178
+Connect to /lost+found? yes
+
+Inode 1178 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1179
+Connect to /lost+found? yes
+
+Inode 1179 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1180
+Connect to /lost+found? yes
+
+Inode 1180 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1181
+Connect to /lost+found? yes
+
+Inode 1181 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1182
+Connect to /lost+found? yes
+
+Inode 1182 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1183
+Connect to /lost+found? yes
+
+Inode 1183 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1184
+Connect to /lost+found? yes
+
+Inode 1184 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1185
+Connect to /lost+found? yes
+
+Inode 1185 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1186
+Connect to /lost+found? yes
+
+Inode 1186 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1187
+Connect to /lost+found? yes
+
+Inode 1187 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1188
+Connect to /lost+found? yes
+
+Inode 1188 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1189
+Connect to /lost+found? yes
+
+Inode 1189 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1190
+Connect to /lost+found? yes
+
+Inode 1190 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1191
+Connect to /lost+found? yes
+
+Inode 1191 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1192
+Connect to /lost+found? yes
+
+Inode 1192 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1193
+Connect to /lost+found? yes
+
+Inode 1193 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1194
+Connect to /lost+found? yes
+
+Inode 1194 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1195
+Connect to /lost+found? yes
+
+Inode 1195 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1196
+Connect to /lost+found? yes
+
+Inode 1196 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1197
+Connect to /lost+found? yes
+
+Inode 1197 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1198
+Connect to /lost+found? yes
+
+Inode 1198 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1199
+Connect to /lost+found? yes
+
+Inode 1199 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1200
+Connect to /lost+found? yes
+
+Inode 1200 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1201
+Connect to /lost+found? yes
+
+Inode 1201 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1202
+Connect to /lost+found? yes
+
+Inode 1202 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1203
+Connect to /lost+found? yes
+
+Inode 1203 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1204
+Connect to /lost+found? yes
+
+Inode 1204 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1205
+Connect to /lost+found? yes
+
+Inode 1205 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1206
+Connect to /lost+found? yes
+
+Inode 1206 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1207
+Connect to /lost+found? yes
+
+Inode 1207 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1208
+Connect to /lost+found? yes
+
+Inode 1208 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1209
+Connect to /lost+found? yes
+
+Inode 1209 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1210
+Connect to /lost+found? yes
+
+Inode 1210 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1211
+Connect to /lost+found? yes
+
+Inode 1211 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1212
+Connect to /lost+found? yes
+
+Inode 1212 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1213
+Connect to /lost+found? yes
+
+Inode 1213 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1214
+Connect to /lost+found? yes
+
+Inode 1214 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1215
+Connect to /lost+found? yes
+
+Inode 1215 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1216
+Connect to /lost+found? yes
+
+Inode 1216 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1217
+Connect to /lost+found? yes
+
+Inode 1217 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1218
+Connect to /lost+found? yes
+
+Inode 1218 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1219
+Connect to /lost+found? yes
+
+Inode 1219 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1220
+Connect to /lost+found? yes
+
+Inode 1220 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1221
+Connect to /lost+found? yes
+
+Inode 1221 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1222
+Connect to /lost+found? yes
+
+Inode 1222 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1223
+Connect to /lost+found? yes
+
+Inode 1223 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1224
+Connect to /lost+found? yes
+
+Inode 1224 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1225
+Connect to /lost+found? yes
+
+Inode 1225 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1226
+Connect to /lost+found? yes
+
+Inode 1226 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1227
+Connect to /lost+found? yes
+
+Inode 1227 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1228
+Connect to /lost+found? yes
+
+Inode 1228 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1229
+Connect to /lost+found? yes
+
+Inode 1229 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1230
+Connect to /lost+found? yes
+
+Inode 1230 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1231
+Connect to /lost+found? yes
+
+Inode 1231 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1232
+Connect to /lost+found? yes
+
+Inode 1232 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1233
+Connect to /lost+found? yes
+
+Inode 1233 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1234
+Connect to /lost+found? yes
+
+Inode 1234 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1235
+Connect to /lost+found? yes
+
+Inode 1235 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1236
+Connect to /lost+found? yes
+
+Inode 1236 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1237
+Connect to /lost+found? yes
+
+Inode 1237 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1238
+Connect to /lost+found? yes
+
+Inode 1238 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1239
+Connect to /lost+found? yes
+
+Inode 1239 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1240
+Connect to /lost+found? yes
+
+Inode 1240 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1241
+Connect to /lost+found? yes
+
+Inode 1241 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1242
+Connect to /lost+found? yes
+
+Inode 1242 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1243
+Connect to /lost+found? yes
+
+Inode 1243 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1244
+Connect to /lost+found? yes
+
+Inode 1244 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1245
+Connect to /lost+found? yes
+
+Inode 1245 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1246
+Connect to /lost+found? yes
+
+Inode 1246 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1247
+Connect to /lost+found? yes
+
+Inode 1247 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1248
+Connect to /lost+found? yes
+
+Inode 1248 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1249
+Connect to /lost+found? yes
+
+Inode 1249 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1250
+Connect to /lost+found? yes
+
+Inode 1250 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1251
+Connect to /lost+found? yes
+
+Inode 1251 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1252
+Connect to /lost+found? yes
+
+Inode 1252 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1253
+Connect to /lost+found? yes
+
+Inode 1253 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1254
+Connect to /lost+found? yes
+
+Inode 1254 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1255
+Connect to /lost+found? yes
+
+Inode 1255 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1256
+Connect to /lost+found? yes
+
+Inode 1256 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1257
+Connect to /lost+found? yes
+
+Inode 1257 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1258
+Connect to /lost+found? yes
+
+Inode 1258 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1259
+Connect to /lost+found? yes
+
+Inode 1259 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1260
+Connect to /lost+found? yes
+
+Inode 1260 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1261
+Connect to /lost+found? yes
+
+Inode 1261 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1262
+Connect to /lost+found? yes
+
+Inode 1262 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1263
+Connect to /lost+found? yes
+
+Inode 1263 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1264
+Connect to /lost+found? yes
+
+Inode 1264 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1265
+Connect to /lost+found? yes
+
+Inode 1265 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1266
+Connect to /lost+found? yes
+
+Inode 1266 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1267
+Connect to /lost+found? yes
+
+Inode 1267 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1268
+Connect to /lost+found? yes
+
+Inode 1268 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1269
+Connect to /lost+found? yes
+
+Inode 1269 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1270
+Connect to /lost+found? yes
+
+Inode 1270 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1271
+Connect to /lost+found? yes
+
+Inode 1271 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1272
+Connect to /lost+found? yes
+
+Inode 1272 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1273
+Connect to /lost+found? yes
+
+Inode 1273 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1274
+Connect to /lost+found? yes
+
+Inode 1274 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1275
+Connect to /lost+found? yes
+
+Inode 1275 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1276
+Connect to /lost+found? yes
+
+Inode 1276 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1277
+Connect to /lost+found? yes
+
+Inode 1277 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1278
+Connect to /lost+found? yes
+
+Inode 1278 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1279
+Connect to /lost+found? yes
+
+Inode 1279 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1280
+Connect to /lost+found? yes
+
+Inode 1280 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1281
+Connect to /lost+found? yes
+
+Inode 1281 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1282
+Connect to /lost+found? yes
+
+Inode 1282 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1283
+Connect to /lost+found? yes
+
+Inode 1283 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1284
+Connect to /lost+found? yes
+
+Inode 1284 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1285
+Connect to /lost+found? yes
+
+Inode 1285 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1286
+Connect to /lost+found? yes
+
+Inode 1286 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1287
+Connect to /lost+found? yes
+
+Inode 1287 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1288
+Connect to /lost+found? yes
+
+Inode 1288 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1289
+Connect to /lost+found? yes
+
+Inode 1289 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1290
+Connect to /lost+found? yes
+
+Inode 1290 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1291
+Connect to /lost+found? yes
+
+Inode 1291 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1292
+Connect to /lost+found? yes
+
+Inode 1292 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1293
+Connect to /lost+found? yes
+
+Inode 1293 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1294
+Connect to /lost+found? yes
+
+Inode 1294 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1295
+Connect to /lost+found? yes
+
+Inode 1295 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1296
+Connect to /lost+found? yes
+
+Inode 1296 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1297
+Connect to /lost+found? yes
+
+Inode 1297 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1298
+Connect to /lost+found? yes
+
+Inode 1298 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1299
+Connect to /lost+found? yes
+
+Inode 1299 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1300
+Connect to /lost+found? yes
+
+Inode 1300 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1301
+Connect to /lost+found? yes
+
+Inode 1301 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1302
+Connect to /lost+found? yes
+
+Inode 1302 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1303
+Connect to /lost+found? yes
+
+Inode 1303 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1304
+Connect to /lost+found? yes
+
+Inode 1304 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1305
+Connect to /lost+found? yes
+
+Inode 1305 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1306
+Connect to /lost+found? yes
+
+Inode 1306 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1307
+Connect to /lost+found? yes
+
+Inode 1307 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1308
+Connect to /lost+found? yes
+
+Inode 1308 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1309
+Connect to /lost+found? yes
+
+Inode 1309 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1310
+Connect to /lost+found? yes
+
+Inode 1310 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1311
+Connect to /lost+found? yes
+
+Inode 1311 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1312
+Connect to /lost+found? yes
+
+Inode 1312 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1313
+Connect to /lost+found? yes
+
+Inode 1313 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1314
+Connect to /lost+found? yes
+
+Inode 1314 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1315
+Connect to /lost+found? yes
+
+Inode 1315 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1316
+Connect to /lost+found? yes
+
+Inode 1316 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1317
+Connect to /lost+found? yes
+
+Inode 1317 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1318
+Connect to /lost+found? yes
+
+Inode 1318 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1319
+Connect to /lost+found? yes
+
+Inode 1319 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1320
+Connect to /lost+found? yes
+
+Inode 1320 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1321
+Connect to /lost+found? yes
+
+Inode 1321 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1322
+Connect to /lost+found? yes
+
+Inode 1322 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1323
+Connect to /lost+found? yes
+
+Inode 1323 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1324
+Connect to /lost+found? yes
+
+Inode 1324 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1325
+Connect to /lost+found? yes
+
+Inode 1325 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1326
+Connect to /lost+found? yes
+
+Inode 1326 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1327
+Connect to /lost+found? yes
+
+Inode 1327 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1328
+Connect to /lost+found? yes
+
+Inode 1328 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1329
+Connect to /lost+found? yes
+
+Inode 1329 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1330
+Connect to /lost+found? yes
+
+Inode 1330 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1331
+Connect to /lost+found? yes
+
+Inode 1331 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1332
+Connect to /lost+found? yes
+
+Inode 1332 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1333
+Connect to /lost+found? yes
+
+Inode 1333 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1334
+Connect to /lost+found? yes
+
+Inode 1334 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1335
+Connect to /lost+found? yes
+
+Inode 1335 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1336
+Connect to /lost+found? yes
+
+Inode 1336 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1337
+Connect to /lost+found? yes
+
+Inode 1337 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1338
+Connect to /lost+found? yes
+
+Inode 1338 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1339
+Connect to /lost+found? yes
+
+Inode 1339 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1340
+Connect to /lost+found? yes
+
+Inode 1340 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1341
+Connect to /lost+found? yes
+
+Inode 1341 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1342
+Connect to /lost+found? yes
+
+Inode 1342 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1343
+Connect to /lost+found? yes
+
+Inode 1343 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1344
+Connect to /lost+found? yes
+
+Inode 1344 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1345
+Connect to /lost+found? yes
+
+Inode 1345 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1346
+Connect to /lost+found? yes
+
+Inode 1346 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1347
+Connect to /lost+found? yes
+
+Inode 1347 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1348
+Connect to /lost+found? yes
+
+Inode 1348 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1349
+Connect to /lost+found? yes
+
+Inode 1349 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1350
+Connect to /lost+found? yes
+
+Inode 1350 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1351
+Connect to /lost+found? yes
+
+Inode 1351 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1352
+Connect to /lost+found? yes
+
+Inode 1352 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1353
+Connect to /lost+found? yes
+
+Inode 1353 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1354
+Connect to /lost+found? yes
+
+Inode 1354 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1355
+Connect to /lost+found? yes
+
+Inode 1355 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1356
+Connect to /lost+found? yes
+
+Inode 1356 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1357
+Connect to /lost+found? yes
+
+Inode 1357 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1358
+Connect to /lost+found? yes
+
+Inode 1358 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1359
+Connect to /lost+found? yes
+
+Inode 1359 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1360
+Connect to /lost+found? yes
+
+Inode 1360 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1361
+Connect to /lost+found? yes
+
+Inode 1361 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1362
+Connect to /lost+found? yes
+
+Inode 1362 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1363
+Connect to /lost+found? yes
+
+Inode 1363 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1364
+Connect to /lost+found? yes
+
+Inode 1364 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1365
+Connect to /lost+found? yes
+
+Inode 1365 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1366
+Connect to /lost+found? yes
+
+Inode 1366 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1367
+Connect to /lost+found? yes
+
+Inode 1367 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1368
+Connect to /lost+found? yes
+
+Inode 1368 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1369
+Connect to /lost+found? yes
+
+Inode 1369 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1370
+Connect to /lost+found? yes
+
+Inode 1370 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1371
+Connect to /lost+found? yes
+
+Inode 1371 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1372
+Connect to /lost+found? yes
+
+Inode 1372 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1373
+Connect to /lost+found? yes
+
+Inode 1373 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1374
+Connect to /lost+found? yes
+
+Inode 1374 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1375
+Connect to /lost+found? yes
+
+Inode 1375 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1376
+Connect to /lost+found? yes
+
+Inode 1376 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1377
+Connect to /lost+found? yes
+
+Inode 1377 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1378
+Connect to /lost+found? yes
+
+Inode 1378 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1379
+Connect to /lost+found? yes
+
+Inode 1379 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1380
+Connect to /lost+found? yes
+
+Inode 1380 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1381
+Connect to /lost+found? yes
+
+Inode 1381 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1382
+Connect to /lost+found? yes
+
+Inode 1382 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1383
+Connect to /lost+found? yes
+
+Inode 1383 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1384
+Connect to /lost+found? yes
+
+Inode 1384 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1385
+Connect to /lost+found? yes
+
+Inode 1385 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1386
+Connect to /lost+found? yes
+
+Inode 1386 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1387
+Connect to /lost+found? yes
+
+Inode 1387 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1388
+Connect to /lost+found? yes
+
+Inode 1388 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1389
+Connect to /lost+found? yes
+
+Inode 1389 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1390
+Connect to /lost+found? yes
+
+Inode 1390 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1391
+Connect to /lost+found? yes
+
+Inode 1391 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1392
+Connect to /lost+found? yes
+
+Inode 1392 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1393
+Connect to /lost+found? yes
+
+Inode 1393 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1394
+Connect to /lost+found? yes
+
+Inode 1394 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1395
+Connect to /lost+found? yes
+
+Inode 1395 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1396
+Connect to /lost+found? yes
+
+Inode 1396 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1397
+Connect to /lost+found? yes
+
+Inode 1397 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1398
+Connect to /lost+found? yes
+
+Inode 1398 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1399
+Connect to /lost+found? yes
+
+Inode 1399 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1400
+Connect to /lost+found? yes
+
+Inode 1400 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1401
+Connect to /lost+found? yes
+
+Inode 1401 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1402
+Connect to /lost+found? yes
+
+Inode 1402 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1403
+Connect to /lost+found? yes
+
+Inode 1403 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1404
+Connect to /lost+found? yes
+
+Inode 1404 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1405
+Connect to /lost+found? yes
+
+Inode 1405 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1406
+Connect to /lost+found? yes
+
+Inode 1406 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1407
+Connect to /lost+found? yes
+
+Inode 1407 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1408
+Connect to /lost+found? yes
+
+Inode 1408 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1409
+Connect to /lost+found? yes
+
+Inode 1409 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1410
+Connect to /lost+found? yes
+
+Inode 1410 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1411
+Connect to /lost+found? yes
+
+Inode 1411 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1412
+Connect to /lost+found? yes
+
+Inode 1412 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1413
+Connect to /lost+found? yes
+
+Inode 1413 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1414
+Connect to /lost+found? yes
+
+Inode 1414 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1415
+Connect to /lost+found? yes
+
+Inode 1415 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1416
+Connect to /lost+found? yes
+
+Inode 1416 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1417
+Connect to /lost+found? yes
+
+Inode 1417 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1418
+Connect to /lost+found? yes
+
+Inode 1418 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1419
+Connect to /lost+found? yes
+
+Inode 1419 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1420
+Connect to /lost+found? yes
+
+Inode 1420 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1421
+Connect to /lost+found? yes
+
+Inode 1421 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1422
+Connect to /lost+found? yes
+
+Inode 1422 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1423
+Connect to /lost+found? yes
+
+Inode 1423 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1424
+Connect to /lost+found? yes
+
+Inode 1424 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1425
+Connect to /lost+found? yes
+
+Inode 1425 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1426
+Connect to /lost+found? yes
+
+Inode 1426 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1427
+Connect to /lost+found? yes
+
+Inode 1427 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1428
+Connect to /lost+found? yes
+
+Inode 1428 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1429
+Connect to /lost+found? yes
+
+Inode 1429 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1430
+Connect to /lost+found? yes
+
+Inode 1430 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1431
+Connect to /lost+found? yes
+
+Inode 1431 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1432
+Connect to /lost+found? yes
+
+Inode 1432 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1433
+Connect to /lost+found? yes
+
+Inode 1433 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1434
+Connect to /lost+found? yes
+
+Inode 1434 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1435
+Connect to /lost+found? yes
+
+Inode 1435 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1436
+Connect to /lost+found? yes
+
+Inode 1436 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1437
+Connect to /lost+found? yes
+
+Inode 1437 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1438
+Connect to /lost+found? yes
+
+Inode 1438 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1439
+Connect to /lost+found? yes
+
+Inode 1439 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1440
+Connect to /lost+found? yes
+
+Inode 1440 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1441
+Connect to /lost+found? yes
+
+Inode 1441 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1442
+Connect to /lost+found? yes
+
+Inode 1442 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1443
+Connect to /lost+found? yes
+
+Inode 1443 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1444
+Connect to /lost+found? yes
+
+Inode 1444 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1445
+Connect to /lost+found? yes
+
+Inode 1445 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1446
+Connect to /lost+found? yes
+
+Inode 1446 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1447
+Connect to /lost+found? yes
+
+Inode 1447 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1448
+Connect to /lost+found? yes
+
+Inode 1448 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1449
+Connect to /lost+found? yes
+
+Inode 1449 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1450
+Connect to /lost+found? yes
+
+Inode 1450 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1451
+Connect to /lost+found? yes
+
+Inode 1451 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1452
+Connect to /lost+found? yes
+
+Inode 1452 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1453
+Connect to /lost+found? yes
+
+Inode 1453 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1454
+Connect to /lost+found? yes
+
+Inode 1454 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1455
+Connect to /lost+found? yes
+
+Inode 1455 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1456
+Connect to /lost+found? yes
+
+Inode 1456 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1457
+Connect to /lost+found? yes
+
+Inode 1457 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1458
+Connect to /lost+found? yes
+
+Inode 1458 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1459
+Connect to /lost+found? yes
+
+Inode 1459 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1460
+Connect to /lost+found? yes
+
+Inode 1460 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1461
+Connect to /lost+found? yes
+
+Inode 1461 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1462
+Connect to /lost+found? yes
+
+Inode 1462 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1463
+Connect to /lost+found? yes
+
+Inode 1463 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1464
+Connect to /lost+found? yes
+
+Inode 1464 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1465
+Connect to /lost+found? yes
+
+Inode 1465 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1466
+Connect to /lost+found? yes
+
+Inode 1466 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1467
+Connect to /lost+found? yes
+
+Inode 1467 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1468
+Connect to /lost+found? yes
+
+Inode 1468 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1469
+Connect to /lost+found? yes
+
+Inode 1469 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1470
+Connect to /lost+found? yes
+
+Inode 1470 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1471
+Connect to /lost+found? yes
+
+Inode 1471 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1472
+Connect to /lost+found? yes
+
+Inode 1472 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1473
+Connect to /lost+found? yes
+
+Inode 1473 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1474
+Connect to /lost+found? yes
+
+Inode 1474 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1475
+Connect to /lost+found? yes
+
+Inode 1475 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1476
+Connect to /lost+found? yes
+
+Inode 1476 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1477
+Connect to /lost+found? yes
+
+Inode 1477 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1478
+Connect to /lost+found? yes
+
+Inode 1478 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1479
+Connect to /lost+found? yes
+
+Inode 1479 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1480
+Connect to /lost+found? yes
+
+Inode 1480 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1481
+Connect to /lost+found? yes
+
+Inode 1481 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1482
+Connect to /lost+found? yes
+
+Inode 1482 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1483
+Connect to /lost+found? yes
+
+Inode 1483 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1484
+Connect to /lost+found? yes
+
+Inode 1484 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1485
+Connect to /lost+found? yes
+
+Inode 1485 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1486
+Connect to /lost+found? yes
+
+Inode 1486 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1487
+Connect to /lost+found? yes
+
+Inode 1487 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1488
+Connect to /lost+found? yes
+
+Inode 1488 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1489
+Connect to /lost+found? yes
+
+Inode 1489 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1490
+Connect to /lost+found? yes
+
+Inode 1490 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1491
+Connect to /lost+found? yes
+
+Inode 1491 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1492
+Connect to /lost+found? yes
+
+Inode 1492 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1493
+Connect to /lost+found? yes
+
+Inode 1493 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1494
+Connect to /lost+found? yes
+
+Inode 1494 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1495
+Connect to /lost+found? yes
+
+Inode 1495 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1496
+Connect to /lost+found? yes
+
+Inode 1496 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1497
+Connect to /lost+found? yes
+
+Inode 1497 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1498
+Connect to /lost+found? yes
+
+Inode 1498 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1499
+Connect to /lost+found? yes
+
+Inode 1499 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1500
+Connect to /lost+found? yes
+
+Inode 1500 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1501
+Connect to /lost+found? yes
+
+Inode 1501 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1502
+Connect to /lost+found? yes
+
+Inode 1502 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1503
+Connect to /lost+found? yes
+
+Inode 1503 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1504
+Connect to /lost+found? yes
+
+Inode 1504 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1505
+Connect to /lost+found? yes
+
+Inode 1505 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1506
+Connect to /lost+found? yes
+
+Inode 1506 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1507
+Connect to /lost+found? yes
+
+Inode 1507 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1508
+Connect to /lost+found? yes
+
+Inode 1508 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1509
+Connect to /lost+found? yes
+
+Inode 1509 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1510
+Connect to /lost+found? yes
+
+Inode 1510 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1511
+Connect to /lost+found? yes
+
+Inode 1511 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1512
+Connect to /lost+found? yes
+
+Inode 1512 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1513
+Connect to /lost+found? yes
+
+Inode 1513 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1514
+Connect to /lost+found? yes
+
+Inode 1514 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1515
+Connect to /lost+found? yes
+
+Inode 1515 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1516
+Connect to /lost+found? yes
+
+Inode 1516 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1517
+Connect to /lost+found? yes
+
+Inode 1517 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1518
+Connect to /lost+found? yes
+
+Inode 1518 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1519
+Connect to /lost+found? yes
+
+Inode 1519 ref count is 2, should be 1. Fix? yes
+
+Inode 1520 ref count is 3, should be 2. Fix? yes
+
+Unattached inode 1521
+Connect to /lost+found? yes
+
+Inode 1521 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1522
+Connect to /lost+found? yes
+
+Inode 1522 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1523
+Connect to /lost+found? yes
+
+Inode 1523 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1524
+Connect to /lost+found? yes
+
+Inode 1524 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1525
+Connect to /lost+found? yes
+
+Inode 1525 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1526
+Connect to /lost+found? yes
+
+Inode 1526 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1527
+Connect to /lost+found? yes
+
+Inode 1527 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1528
+Connect to /lost+found? yes
+
+Inode 1528 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1529
+Connect to /lost+found? yes
+
+Inode 1529 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1530
+Connect to /lost+found? yes
+
+Inode 1530 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1531
+Connect to /lost+found? yes
+
+Inode 1531 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1532
+Connect to /lost+found? yes
+
+Inode 1532 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1533
+Connect to /lost+found? yes
+
+Inode 1533 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1534
+Connect to /lost+found? yes
+
+Inode 1534 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1535
+Connect to /lost+found? yes
+
+Inode 1535 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1536
+Connect to /lost+found? yes
+
+Inode 1536 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1537
+Connect to /lost+found? yes
+
+Inode 1537 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1538
+Connect to /lost+found? yes
+
+Inode 1538 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1539
+Connect to /lost+found? yes
+
+Inode 1539 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1540
+Connect to /lost+found? yes
+
+Inode 1540 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1541
+Connect to /lost+found? yes
+
+Inode 1541 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1542
+Connect to /lost+found? yes
+
+Inode 1542 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1543
+Connect to /lost+found? yes
+
+Inode 1543 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1544
+Connect to /lost+found? yes
+
+Inode 1544 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1545
+Connect to /lost+found? yes
+
+Inode 1545 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1546
+Connect to /lost+found? yes
+
+Inode 1546 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1547
+Connect to /lost+found? yes
+
+Inode 1547 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1548
+Connect to /lost+found? yes
+
+Inode 1548 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1549
+Connect to /lost+found? yes
+
+Inode 1549 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1550
+Connect to /lost+found? yes
+
+Inode 1550 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1551
+Connect to /lost+found? yes
+
+Inode 1551 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1552
+Connect to /lost+found? yes
+
+Inode 1552 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1553
+Connect to /lost+found? yes
+
+Inode 1553 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1554
+Connect to /lost+found? yes
+
+Inode 1554 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1555
+Connect to /lost+found? yes
+
+Inode 1555 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1556
+Connect to /lost+found? yes
+
+Inode 1556 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1557
+Connect to /lost+found? yes
+
+Inode 1557 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1558
+Connect to /lost+found? yes
+
+Inode 1558 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1559
+Connect to /lost+found? yes
+
+Inode 1559 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1560
+Connect to /lost+found? yes
+
+Inode 1560 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1561
+Connect to /lost+found? yes
+
+Inode 1561 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1562
+Connect to /lost+found? yes
+
+Inode 1562 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1563
+Connect to /lost+found? yes
+
+Inode 1563 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1564
+Connect to /lost+found? yes
+
+Inode 1564 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1565
+Connect to /lost+found? yes
+
+Inode 1565 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1566
+Connect to /lost+found? yes
+
+Inode 1566 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1567
+Connect to /lost+found? yes
+
+Inode 1567 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1568
+Connect to /lost+found? yes
+
+Inode 1568 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1569
+Connect to /lost+found? yes
+
+Inode 1569 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1570
+Connect to /lost+found? yes
+
+Inode 1570 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1571
+Connect to /lost+found? yes
+
+Inode 1571 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1572
+Connect to /lost+found? yes
+
+Inode 1572 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1573
+Connect to /lost+found? yes
+
+Inode 1573 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1574
+Connect to /lost+found? yes
+
+Inode 1574 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1575
+Connect to /lost+found? yes
+
+Inode 1575 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1576
+Connect to /lost+found? yes
+
+Inode 1576 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1577
+Connect to /lost+found? yes
+
+Inode 1577 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1578
+Connect to /lost+found? yes
+
+Inode 1578 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1579
+Connect to /lost+found? yes
+
+Inode 1579 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1580
+Connect to /lost+found? yes
+
+Inode 1580 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1581
+Connect to /lost+found? yes
+
+Inode 1581 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1582
+Connect to /lost+found? yes
+
+Inode 1582 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1583
+Connect to /lost+found? yes
+
+Inode 1583 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1584
+Connect to /lost+found? yes
+
+Inode 1584 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1585
+Connect to /lost+found? yes
+
+Inode 1585 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1586
+Connect to /lost+found? yes
+
+Inode 1586 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1587
+Connect to /lost+found? yes
+
+Inode 1587 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1588
+Connect to /lost+found? yes
+
+Inode 1588 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1589
+Connect to /lost+found? yes
+
+Inode 1589 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1590
+Connect to /lost+found? yes
+
+Inode 1590 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1591
+Connect to /lost+found? yes
+
+Inode 1591 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1592
+Connect to /lost+found? yes
+
+Inode 1592 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1593
+Connect to /lost+found? yes
+
+Inode 1593 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1594
+Connect to /lost+found? yes
+
+Inode 1594 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1595
+Connect to /lost+found? yes
+
+Inode 1595 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1596
+Connect to /lost+found? yes
+
+Inode 1596 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1597
+Connect to /lost+found? yes
+
+Inode 1597 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1598
+Connect to /lost+found? yes
+
+Inode 1598 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1599
+Connect to /lost+found? yes
+
+Inode 1599 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1600
+Connect to /lost+found? yes
+
+Inode 1600 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1601
+Connect to /lost+found? yes
+
+Inode 1601 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1602
+Connect to /lost+found? yes
+
+Inode 1602 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1603
+Connect to /lost+found? yes
+
+Inode 1603 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1604
+Connect to /lost+found? yes
+
+Inode 1604 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1605
+Connect to /lost+found? yes
+
+Inode 1605 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1606
+Connect to /lost+found? yes
+
+Inode 1606 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1607
+Connect to /lost+found? yes
+
+Inode 1607 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1608
+Connect to /lost+found? yes
+
+Inode 1608 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1609
+Connect to /lost+found? yes
+
+Inode 1609 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1610
+Connect to /lost+found? yes
+
+Inode 1610 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1611
+Connect to /lost+found? yes
+
+Inode 1611 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1612
+Connect to /lost+found? yes
+
+Inode 1612 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1613
+Connect to /lost+found? yes
+
+Inode 1613 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1614
+Connect to /lost+found? yes
+
+Inode 1614 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1615
+Connect to /lost+found? yes
+
+Inode 1615 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1616
+Connect to /lost+found? yes
+
+Inode 1616 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1617
+Connect to /lost+found? yes
+
+Inode 1617 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1618
+Connect to /lost+found? yes
+
+Inode 1618 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1619
+Connect to /lost+found? yes
+
+Inode 1619 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1620
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 1620 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1621
+Connect to /lost+found? yes
+
+Inode 1621 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1622
+Connect to /lost+found? yes
+
+Inode 1622 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1623
+Connect to /lost+found? yes
+
+Inode 1623 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1624
+Connect to /lost+found? yes
+
+Inode 1624 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1625
+Connect to /lost+found? yes
+
+Inode 1625 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1626
+Connect to /lost+found? yes
+
+Inode 1626 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1627
+Connect to /lost+found? yes
+
+Inode 1627 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1628
+Connect to /lost+found? yes
+
+Inode 1628 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1629
+Connect to /lost+found? yes
+
+Inode 1629 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1630
+Connect to /lost+found? yes
+
+Inode 1630 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1631
+Connect to /lost+found? yes
+
+Inode 1631 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1632
+Connect to /lost+found? yes
+
+Inode 1632 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1633
+Connect to /lost+found? yes
+
+Inode 1633 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1634
+Connect to /lost+found? yes
+
+Inode 1634 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1635
+Connect to /lost+found? yes
+
+Inode 1635 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1636
+Connect to /lost+found? yes
+
+Inode 1636 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1637
+Connect to /lost+found? yes
+
+Inode 1637 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1638
+Connect to /lost+found? yes
+
+Inode 1638 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1639
+Connect to /lost+found? yes
+
+Inode 1639 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1640
+Connect to /lost+found? yes
+
+Inode 1640 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1641
+Connect to /lost+found? yes
+
+Inode 1641 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1642
+Connect to /lost+found? yes
+
+Inode 1642 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1643
+Connect to /lost+found? yes
+
+Inode 1643 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1644
+Connect to /lost+found? yes
+
+Inode 1644 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1645
+Connect to /lost+found? yes
+
+Inode 1645 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1646
+Connect to /lost+found? yes
+
+Inode 1646 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1647
+Connect to /lost+found? yes
+
+Inode 1647 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1648
+Connect to /lost+found? yes
+
+Inode 1648 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1649
+Connect to /lost+found? yes
+
+Inode 1649 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1650
+Connect to /lost+found? yes
+
+Inode 1650 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1651
+Connect to /lost+found? yes
+
+Inode 1651 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1652
+Connect to /lost+found? yes
+
+Inode 1652 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1653
+Connect to /lost+found? yes
+
+Inode 1653 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1654
+Connect to /lost+found? yes
+
+Inode 1654 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1655
+Connect to /lost+found? yes
+
+Inode 1655 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1656
+Connect to /lost+found? yes
+
+Inode 1656 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1657
+Connect to /lost+found? yes
+
+Inode 1657 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1658
+Connect to /lost+found? yes
+
+Inode 1658 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1659
+Connect to /lost+found? yes
+
+Inode 1659 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1660
+Connect to /lost+found? yes
+
+Inode 1660 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1661
+Connect to /lost+found? yes
+
+Inode 1661 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1662
+Connect to /lost+found? yes
+
+Inode 1662 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1663
+Connect to /lost+found? yes
+
+Inode 1663 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1664
+Connect to /lost+found? yes
+
+Inode 1664 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1665
+Connect to /lost+found? yes
+
+Inode 1665 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1666
+Connect to /lost+found? yes
+
+Inode 1666 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1667
+Connect to /lost+found? yes
+
+Inode 1667 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1668
+Connect to /lost+found? yes
+
+Inode 1668 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1669
+Connect to /lost+found? yes
+
+Inode 1669 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1670
+Connect to /lost+found? yes
+
+Inode 1670 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1671
+Connect to /lost+found? yes
+
+Inode 1671 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1672
+Connect to /lost+found? yes
+
+Inode 1672 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1673
+Connect to /lost+found? yes
+
+Inode 1673 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1674
+Connect to /lost+found? yes
+
+Inode 1674 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1675
+Connect to /lost+found? yes
+
+Inode 1675 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1676
+Connect to /lost+found? yes
+
+Inode 1676 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1677
+Connect to /lost+found? yes
+
+Inode 1677 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1678
+Connect to /lost+found? yes
+
+Inode 1678 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1679
+Connect to /lost+found? yes
+
+Inode 1679 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1680
+Connect to /lost+found? yes
+
+Inode 1680 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1681
+Connect to /lost+found? yes
+
+Inode 1681 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1682
+Connect to /lost+found? yes
+
+Inode 1682 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1683
+Connect to /lost+found? yes
+
+Inode 1683 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1684
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 1684 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1685
+Connect to /lost+found? yes
+
+Inode 1685 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1686
+Connect to /lost+found? yes
+
+Inode 1686 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1687
+Connect to /lost+found? yes
+
+Inode 1687 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1688
+Connect to /lost+found? yes
+
+Inode 1688 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1689
+Connect to /lost+found? yes
+
+Inode 1689 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1690
+Connect to /lost+found? yes
+
+Inode 1690 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1691
+Connect to /lost+found? yes
+
+Inode 1691 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1692
+Connect to /lost+found? yes
+
+Inode 1692 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1693
+Connect to /lost+found? yes
+
+Inode 1693 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1694
+Connect to /lost+found? yes
+
+Inode 1694 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1695
+Connect to /lost+found? yes
+
+Inode 1695 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1696
+Connect to /lost+found? yes
+
+Inode 1696 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1697
+Connect to /lost+found? yes
+
+Inode 1697 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1698
+Connect to /lost+found? yes
+
+Inode 1698 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1699
+Connect to /lost+found? yes
+
+Inode 1699 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1700
+Connect to /lost+found? yes
+
+Inode 1700 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1701
+Connect to /lost+found? yes
+
+Inode 1701 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1702
+Connect to /lost+found? yes
+
+Inode 1702 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1703
+Connect to /lost+found? yes
+
+Inode 1703 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1704
+Connect to /lost+found? yes
+
+Inode 1704 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1705
+Connect to /lost+found? yes
+
+Inode 1705 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1706
+Connect to /lost+found? yes
+
+Inode 1706 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1707
+Connect to /lost+found? yes
+
+Inode 1707 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1708
+Connect to /lost+found? yes
+
+Inode 1708 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1709
+Connect to /lost+found? yes
+
+Inode 1709 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1710
+Connect to /lost+found? yes
+
+Inode 1710 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1711
+Connect to /lost+found? yes
+
+Inode 1711 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1712
+Connect to /lost+found? yes
+
+Inode 1712 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1713
+Connect to /lost+found? yes
+
+Inode 1713 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1714
+Connect to /lost+found? yes
+
+Inode 1714 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1715
+Connect to /lost+found? yes
+
+Inode 1715 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1716
+Connect to /lost+found? yes
+
+Inode 1716 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1717
+Connect to /lost+found? yes
+
+Inode 1717 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1718
+Connect to /lost+found? yes
+
+Inode 1718 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1719
+Connect to /lost+found? yes
+
+Inode 1719 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1720
+Connect to /lost+found? yes
+
+Inode 1720 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1721
+Connect to /lost+found? yes
+
+Inode 1721 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1722
+Connect to /lost+found? yes
+
+Inode 1722 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1723
+Connect to /lost+found? yes
+
+Inode 1723 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1724
+Connect to /lost+found? yes
+
+Inode 1724 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1725
+Connect to /lost+found? yes
+
+Inode 1725 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1726
+Connect to /lost+found? yes
+
+Inode 1726 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1727
+Connect to /lost+found? yes
+
+Inode 1727 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1728
+Connect to /lost+found? yes
+
+Inode 1728 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1729
+Connect to /lost+found? yes
+
+Inode 1729 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1730
+Connect to /lost+found? yes
+
+Inode 1730 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1731
+Connect to /lost+found? yes
+
+Inode 1731 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1732
+Connect to /lost+found? yes
+
+Inode 1732 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1733
+Connect to /lost+found? yes
+
+Inode 1733 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1734
+Connect to /lost+found? yes
+
+Inode 1734 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1735
+Connect to /lost+found? yes
+
+Inode 1735 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1736
+Connect to /lost+found? yes
+
+Inode 1736 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1737
+Connect to /lost+found? yes
+
+Inode 1737 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1738
+Connect to /lost+found? yes
+
+Inode 1738 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1739
+Connect to /lost+found? yes
+
+Inode 1739 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1740
+Connect to /lost+found? yes
+
+Inode 1740 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1741
+Connect to /lost+found? yes
+
+Inode 1741 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1742
+Connect to /lost+found? yes
+
+Inode 1742 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1743
+Connect to /lost+found? yes
+
+Inode 1743 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1744
+Connect to /lost+found? yes
+
+Inode 1744 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1745
+Connect to /lost+found? yes
+
+Inode 1745 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1746
+Connect to /lost+found? yes
+
+Inode 1746 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1747
+Connect to /lost+found? yes
+
+Inode 1747 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1748
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 1748 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1749
+Connect to /lost+found? yes
+
+Inode 1749 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1750
+Connect to /lost+found? yes
+
+Inode 1750 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1751
+Connect to /lost+found? yes
+
+Inode 1751 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1752
+Connect to /lost+found? yes
+
+Inode 1752 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1753
+Connect to /lost+found? yes
+
+Inode 1753 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1754
+Connect to /lost+found? yes
+
+Inode 1754 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1755
+Connect to /lost+found? yes
+
+Inode 1755 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1756
+Connect to /lost+found? yes
+
+Inode 1756 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1757
+Connect to /lost+found? yes
+
+Inode 1757 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1758
+Connect to /lost+found? yes
+
+Inode 1758 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1759
+Connect to /lost+found? yes
+
+Inode 1759 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1760
+Connect to /lost+found? yes
+
+Inode 1760 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1761
+Connect to /lost+found? yes
+
+Inode 1761 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1762
+Connect to /lost+found? yes
+
+Inode 1762 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1763
+Connect to /lost+found? yes
+
+Inode 1763 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1764
+Connect to /lost+found? yes
+
+Inode 1764 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1765
+Connect to /lost+found? yes
+
+Inode 1765 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1766
+Connect to /lost+found? yes
+
+Inode 1766 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1767
+Connect to /lost+found? yes
+
+Inode 1767 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1768
+Connect to /lost+found? yes
+
+Inode 1768 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1769
+Connect to /lost+found? yes
+
+Inode 1769 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1770
+Connect to /lost+found? yes
+
+Inode 1770 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1771
+Connect to /lost+found? yes
+
+Inode 1771 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1772
+Connect to /lost+found? yes
+
+Inode 1772 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1773
+Connect to /lost+found? yes
+
+Inode 1773 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1774
+Connect to /lost+found? yes
+
+Inode 1774 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1775
+Connect to /lost+found? yes
+
+Inode 1775 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1776
+Connect to /lost+found? yes
+
+Inode 1776 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1777
+Connect to /lost+found? yes
+
+Inode 1777 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1778
+Connect to /lost+found? yes
+
+Inode 1778 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1779
+Connect to /lost+found? yes
+
+Inode 1779 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1780
+Connect to /lost+found? yes
+
+Inode 1780 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1781
+Connect to /lost+found? yes
+
+Inode 1781 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1782
+Connect to /lost+found? yes
+
+Inode 1782 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1783
+Connect to /lost+found? yes
+
+Inode 1783 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1784
+Connect to /lost+found? yes
+
+Inode 1784 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1785
+Connect to /lost+found? yes
+
+Inode 1785 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1786
+Connect to /lost+found? yes
+
+Inode 1786 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1787
+Connect to /lost+found? yes
+
+Inode 1787 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1788
+Connect to /lost+found? yes
+
+Inode 1788 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1789
+Connect to /lost+found? yes
+
+Inode 1789 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1790
+Connect to /lost+found? yes
+
+Inode 1790 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1791
+Connect to /lost+found? yes
+
+Inode 1791 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1792
+Connect to /lost+found? yes
+
+Inode 1792 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1793
+Connect to /lost+found? yes
+
+Inode 1793 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1794
+Connect to /lost+found? yes
+
+Inode 1794 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1795
+Connect to /lost+found? yes
+
+Inode 1795 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1796
+Connect to /lost+found? yes
+
+Inode 1796 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1797
+Connect to /lost+found? yes
+
+Inode 1797 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1798
+Connect to /lost+found? yes
+
+Inode 1798 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1799
+Connect to /lost+found? yes
+
+Inode 1799 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1800
+Connect to /lost+found? yes
+
+Inode 1800 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1801
+Connect to /lost+found? yes
+
+Inode 1801 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1802
+Connect to /lost+found? yes
+
+Inode 1802 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1803
+Connect to /lost+found? yes
+
+Inode 1803 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 1804
+Connect to /lost+found? yes
+
+Inode 1804 ref count is 2, should be 1. Fix? yes
+
+Inode 1805 ref count is 3, should be 2. Fix? yes
+
+Unattached inode 3854
+Connect to /lost+found? yes
+
+Inode 3854 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3855
+Connect to /lost+found? yes
+
+Inode 3855 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3856
+Connect to /lost+found? yes
+
+Inode 3856 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3857
+Connect to /lost+found? yes
+
+Inode 3857 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3858
+Connect to /lost+found? yes
+
+Inode 3858 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3859
+Connect to /lost+found? yes
+
+Inode 3859 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3860
+Connect to /lost+found? yes
+
+Inode 3860 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3861
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 3861 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3862
+Connect to /lost+found? yes
+
+Inode 3862 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3863
+Connect to /lost+found? yes
+
+Inode 3863 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3864
+Connect to /lost+found? yes
+
+Inode 3864 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3865
+Connect to /lost+found? yes
+
+Inode 3865 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3866
+Connect to /lost+found? yes
+
+Inode 3866 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3867
+Connect to /lost+found? yes
+
+Inode 3867 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3868
+Connect to /lost+found? yes
+
+Inode 3868 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3869
+Connect to /lost+found? yes
+
+Inode 3869 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3870
+Connect to /lost+found? yes
+
+Inode 3870 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3871
+Connect to /lost+found? yes
+
+Inode 3871 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3872
+Connect to /lost+found? yes
+
+Inode 3872 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3873
+Connect to /lost+found? yes
+
+Inode 3873 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3874
+Connect to /lost+found? yes
+
+Inode 3874 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3875
+Connect to /lost+found? yes
+
+Inode 3875 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3876
+Connect to /lost+found? yes
+
+Inode 3876 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3877
+Connect to /lost+found? yes
+
+Inode 3877 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3878
+Connect to /lost+found? yes
+
+Inode 3878 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3879
+Connect to /lost+found? yes
+
+Inode 3879 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3880
+Connect to /lost+found? yes
+
+Inode 3880 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3881
+Connect to /lost+found? yes
+
+Inode 3881 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3882
+Connect to /lost+found? yes
+
+Inode 3882 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3883
+Connect to /lost+found? yes
+
+Inode 3883 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3884
+Connect to /lost+found? yes
+
+Inode 3884 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3885
+Connect to /lost+found? yes
+
+Inode 3885 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3886
+Connect to /lost+found? yes
+
+Inode 3886 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3887
+Connect to /lost+found? yes
+
+Inode 3887 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3888
+Connect to /lost+found? yes
+
+Inode 3888 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3889
+Connect to /lost+found? yes
+
+Inode 3889 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3890
+Connect to /lost+found? yes
+
+Inode 3890 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3891
+Connect to /lost+found? yes
+
+Inode 3891 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3892
+Connect to /lost+found? yes
+
+Inode 3892 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3893
+Connect to /lost+found? yes
+
+Inode 3893 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3894
+Connect to /lost+found? yes
+
+Inode 3894 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3895
+Connect to /lost+found? yes
+
+Inode 3895 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3896
+Connect to /lost+found? yes
+
+Inode 3896 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3897
+Connect to /lost+found? yes
+
+Inode 3897 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3898
+Connect to /lost+found? yes
+
+Inode 3898 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3899
+Connect to /lost+found? yes
+
+Inode 3899 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3900
+Connect to /lost+found? yes
+
+Inode 3900 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3901
+Connect to /lost+found? yes
+
+Inode 3901 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3902
+Connect to /lost+found? yes
+
+Inode 3902 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3903
+Connect to /lost+found? yes
+
+Inode 3903 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3904
+Connect to /lost+found? yes
+
+Inode 3904 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3905
+Connect to /lost+found? yes
+
+Inode 3905 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3906
+Connect to /lost+found? yes
+
+Inode 3906 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3907
+Connect to /lost+found? yes
+
+Inode 3907 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3908
+Connect to /lost+found? yes
+
+Inode 3908 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3909
+Connect to /lost+found? yes
+
+Inode 3909 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3910
+Connect to /lost+found? yes
+
+Inode 3910 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3911
+Connect to /lost+found? yes
+
+Inode 3911 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3912
+Connect to /lost+found? yes
+
+Inode 3912 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3913
+Connect to /lost+found? yes
+
+Inode 3913 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3914
+Connect to /lost+found? yes
+
+Inode 3914 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3915
+Connect to /lost+found? yes
+
+Inode 3915 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3916
+Connect to /lost+found? yes
+
+Inode 3916 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3917
+Connect to /lost+found? yes
+
+Inode 3917 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3918
+Connect to /lost+found? yes
+
+Inode 3918 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3919
+Connect to /lost+found? yes
+
+Inode 3919 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3920
+Connect to /lost+found? yes
+
+Inode 3920 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3921
+Connect to /lost+found? yes
+
+Inode 3921 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3922
+Connect to /lost+found? yes
+
+Inode 3922 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3923
+Connect to /lost+found? yes
+
+Inode 3923 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3924
+Connect to /lost+found? yes
+
+Inode 3924 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3925
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 3925 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3926
+Connect to /lost+found? yes
+
+Inode 3926 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3927
+Connect to /lost+found? yes
+
+Inode 3927 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3928
+Connect to /lost+found? yes
+
+Inode 3928 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3929
+Connect to /lost+found? yes
+
+Inode 3929 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3930
+Connect to /lost+found? yes
+
+Inode 3930 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3931
+Connect to /lost+found? yes
+
+Inode 3931 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3932
+Connect to /lost+found? yes
+
+Inode 3932 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3933
+Connect to /lost+found? yes
+
+Inode 3933 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3934
+Connect to /lost+found? yes
+
+Inode 3934 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3935
+Connect to /lost+found? yes
+
+Inode 3935 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3936
+Connect to /lost+found? yes
+
+Inode 3936 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3937
+Connect to /lost+found? yes
+
+Inode 3937 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3938
+Connect to /lost+found? yes
+
+Inode 3938 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3939
+Connect to /lost+found? yes
+
+Inode 3939 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3940
+Connect to /lost+found? yes
+
+Inode 3940 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3941
+Connect to /lost+found? yes
+
+Inode 3941 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3942
+Connect to /lost+found? yes
+
+Inode 3942 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3943
+Connect to /lost+found? yes
+
+Inode 3943 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3944
+Connect to /lost+found? yes
+
+Inode 3944 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3945
+Connect to /lost+found? yes
+
+Inode 3945 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3946
+Connect to /lost+found? yes
+
+Inode 3946 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3947
+Connect to /lost+found? yes
+
+Inode 3947 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3948
+Connect to /lost+found? yes
+
+Inode 3948 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3949
+Connect to /lost+found? yes
+
+Inode 3949 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3950
+Connect to /lost+found? yes
+
+Inode 3950 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3951
+Connect to /lost+found? yes
+
+Inode 3951 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3952
+Connect to /lost+found? yes
+
+Inode 3952 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3953
+Connect to /lost+found? yes
+
+Inode 3953 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3954
+Connect to /lost+found? yes
+
+Inode 3954 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3955
+Connect to /lost+found? yes
+
+Inode 3955 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3956
+Connect to /lost+found? yes
+
+Inode 3956 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3957
+Connect to /lost+found? yes
+
+Inode 3957 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3958
+Connect to /lost+found? yes
+
+Inode 3958 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3959
+Connect to /lost+found? yes
+
+Inode 3959 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3960
+Connect to /lost+found? yes
+
+Inode 3960 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3961
+Connect to /lost+found? yes
+
+Inode 3961 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3962
+Connect to /lost+found? yes
+
+Inode 3962 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3963
+Connect to /lost+found? yes
+
+Inode 3963 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3964
+Connect to /lost+found? yes
+
+Inode 3964 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3965
+Connect to /lost+found? yes
+
+Inode 3965 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3966
+Connect to /lost+found? yes
+
+Inode 3966 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3967
+Connect to /lost+found? yes
+
+Inode 3967 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3968
+Connect to /lost+found? yes
+
+Inode 3968 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3969
+Connect to /lost+found? yes
+
+Inode 3969 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3970
+Connect to /lost+found? yes
+
+Inode 3970 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3971
+Connect to /lost+found? yes
+
+Inode 3971 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3972
+Connect to /lost+found? yes
+
+Inode 3972 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3973
+Connect to /lost+found? yes
+
+Inode 3973 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3974
+Connect to /lost+found? yes
+
+Inode 3974 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3975
+Connect to /lost+found? yes
+
+Inode 3975 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3976
+Connect to /lost+found? yes
+
+Inode 3976 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3977
+Connect to /lost+found? yes
+
+Inode 3977 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3978
+Connect to /lost+found? yes
+
+Inode 3978 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3979
+Connect to /lost+found? yes
+
+Inode 3979 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3980
+Connect to /lost+found? yes
+
+Inode 3980 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3981
+Connect to /lost+found? yes
+
+Inode 3981 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3982
+Connect to /lost+found? yes
+
+Inode 3982 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3983
+Connect to /lost+found? yes
+
+Inode 3983 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3984
+Connect to /lost+found? yes
+
+Inode 3984 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3985
+Connect to /lost+found? yes
+
+Inode 3985 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3986
+Connect to /lost+found? yes
+
+Inode 3986 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3987
+Connect to /lost+found? yes
+
+Inode 3987 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3988
+Connect to /lost+found? yes
+
+Inode 3988 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3989
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 3989 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3990
+Connect to /lost+found? yes
+
+Inode 3990 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3991
+Connect to /lost+found? yes
+
+Inode 3991 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3992
+Connect to /lost+found? yes
+
+Inode 3992 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3993
+Connect to /lost+found? yes
+
+Inode 3993 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3994
+Connect to /lost+found? yes
+
+Inode 3994 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3995
+Connect to /lost+found? yes
+
+Inode 3995 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3996
+Connect to /lost+found? yes
+
+Inode 3996 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3997
+Connect to /lost+found? yes
+
+Inode 3997 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3998
+Connect to /lost+found? yes
+
+Inode 3998 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 3999
+Connect to /lost+found? yes
+
+Inode 3999 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4000
+Connect to /lost+found? yes
+
+Inode 4000 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4001
+Connect to /lost+found? yes
+
+Inode 4001 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4002
+Connect to /lost+found? yes
+
+Inode 4002 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4003
+Connect to /lost+found? yes
+
+Inode 4003 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4004
+Connect to /lost+found? yes
+
+Inode 4004 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4005
+Connect to /lost+found? yes
+
+Inode 4005 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4006
+Connect to /lost+found? yes
+
+Inode 4006 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4007
+Connect to /lost+found? yes
+
+Inode 4007 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4008
+Connect to /lost+found? yes
+
+Inode 4008 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4009
+Connect to /lost+found? yes
+
+Inode 4009 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4010
+Connect to /lost+found? yes
+
+Inode 4010 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4011
+Connect to /lost+found? yes
+
+Inode 4011 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4012
+Connect to /lost+found? yes
+
+Inode 4012 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4013
+Connect to /lost+found? yes
+
+Inode 4013 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4014
+Connect to /lost+found? yes
+
+Inode 4014 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4015
+Connect to /lost+found? yes
+
+Inode 4015 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4016
+Connect to /lost+found? yes
+
+Inode 4016 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4017
+Connect to /lost+found? yes
+
+Inode 4017 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4018
+Connect to /lost+found? yes
+
+Inode 4018 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4019
+Connect to /lost+found? yes
+
+Inode 4019 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4020
+Connect to /lost+found? yes
+
+Inode 4020 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4021
+Connect to /lost+found? yes
+
+Inode 4021 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4022
+Connect to /lost+found? yes
+
+Inode 4022 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4023
+Connect to /lost+found? yes
+
+Inode 4023 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4024
+Connect to /lost+found? yes
+
+Inode 4024 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4025
+Connect to /lost+found? yes
+
+Inode 4025 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4026
+Connect to /lost+found? yes
+
+Inode 4026 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4027
+Connect to /lost+found? yes
+
+Inode 4027 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4028
+Connect to /lost+found? yes
+
+Inode 4028 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4029
+Connect to /lost+found? yes
+
+Inode 4029 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4030
+Connect to /lost+found? yes
+
+Inode 4030 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4031
+Connect to /lost+found? yes
+
+Inode 4031 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4032
+Connect to /lost+found? yes
+
+Inode 4032 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4033
+Connect to /lost+found? yes
+
+Inode 4033 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4034
+Connect to /lost+found? yes
+
+Inode 4034 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4035
+Connect to /lost+found? yes
+
+Inode 4035 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4036
+Connect to /lost+found? yes
+
+Inode 4036 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4037
+Connect to /lost+found? yes
+
+Inode 4037 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4038
+Connect to /lost+found? yes
+
+Inode 4038 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4039
+Connect to /lost+found? yes
+
+Inode 4039 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4040
+Connect to /lost+found? yes
+
+Inode 4040 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4041
+Connect to /lost+found? yes
+
+Inode 4041 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4042
+Connect to /lost+found? yes
+
+Inode 4042 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4043
+Connect to /lost+found? yes
+
+Inode 4043 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4044
+Connect to /lost+found? yes
+
+Inode 4044 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4045
+Connect to /lost+found? yes
+
+Inode 4045 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4046
+Connect to /lost+found? yes
+
+Inode 4046 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4047
+Connect to /lost+found? yes
+
+Inode 4047 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4048
+Connect to /lost+found? yes
+
+Inode 4048 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4049
+Connect to /lost+found? yes
+
+Inode 4049 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4050
+Connect to /lost+found? yes
+
+Inode 4050 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4051
+Connect to /lost+found? yes
+
+Inode 4051 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4052
+Connect to /lost+found? yes
+
+Inode 4052 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4053
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 4053 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4054
+Connect to /lost+found? yes
+
+Inode 4054 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4055
+Connect to /lost+found? yes
+
+Inode 4055 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4056
+Connect to /lost+found? yes
+
+Inode 4056 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4057
+Connect to /lost+found? yes
+
+Inode 4057 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4058
+Connect to /lost+found? yes
+
+Inode 4058 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4059
+Connect to /lost+found? yes
+
+Inode 4059 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4060
+Connect to /lost+found? yes
+
+Inode 4060 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4061
+Connect to /lost+found? yes
+
+Inode 4061 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4062
+Connect to /lost+found? yes
+
+Inode 4062 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4063
+Connect to /lost+found? yes
+
+Inode 4063 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4064
+Connect to /lost+found? yes
+
+Inode 4064 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4065
+Connect to /lost+found? yes
+
+Inode 4065 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4066
+Connect to /lost+found? yes
+
+Inode 4066 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4067
+Connect to /lost+found? yes
+
+Inode 4067 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4068
+Connect to /lost+found? yes
+
+Inode 4068 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4069
+Connect to /lost+found? yes
+
+Inode 4069 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4070
+Connect to /lost+found? yes
+
+Inode 4070 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4071
+Connect to /lost+found? yes
+
+Inode 4071 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4072
+Connect to /lost+found? yes
+
+Inode 4072 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4073
+Connect to /lost+found? yes
+
+Inode 4073 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4074
+Connect to /lost+found? yes
+
+Inode 4074 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4075
+Connect to /lost+found? yes
+
+Inode 4075 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4076
+Connect to /lost+found? yes
+
+Inode 4076 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4077
+Connect to /lost+found? yes
+
+Inode 4077 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4078
+Connect to /lost+found? yes
+
+Inode 4078 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4079
+Connect to /lost+found? yes
+
+Inode 4079 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4080
+Connect to /lost+found? yes
+
+Inode 4080 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4081
+Connect to /lost+found? yes
+
+Inode 4081 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4082
+Connect to /lost+found? yes
+
+Inode 4082 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4083
+Connect to /lost+found? yes
+
+Inode 4083 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4084
+Connect to /lost+found? yes
+
+Inode 4084 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4085
+Connect to /lost+found? yes
+
+Inode 4085 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4086
+Connect to /lost+found? yes
+
+Inode 4086 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4087
+Connect to /lost+found? yes
+
+Inode 4087 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4088
+Connect to /lost+found? yes
+
+Inode 4088 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4089
+Connect to /lost+found? yes
+
+Inode 4089 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4090
+Connect to /lost+found? yes
+
+Inode 4090 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4091
+Connect to /lost+found? yes
+
+Inode 4091 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4092
+Connect to /lost+found? yes
+
+Inode 4092 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4093
+Connect to /lost+found? yes
+
+Inode 4093 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4094
+Connect to /lost+found? yes
+
+Inode 4094 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4095
+Connect to /lost+found? yes
+
+Inode 4095 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4096
+Connect to /lost+found? yes
+
+Inode 4096 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4097
+Connect to /lost+found? yes
+
+Inode 4097 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4098
+Connect to /lost+found? yes
+
+Inode 4098 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4099
+Connect to /lost+found? yes
+
+Inode 4099 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4100
+Connect to /lost+found? yes
+
+Inode 4100 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4101
+Connect to /lost+found? yes
+
+Inode 4101 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4102
+Connect to /lost+found? yes
+
+Inode 4102 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4103
+Connect to /lost+found? yes
+
+Inode 4103 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4104
+Connect to /lost+found? yes
+
+Inode 4104 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4105
+Connect to /lost+found? yes
+
+Inode 4105 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4106
+Connect to /lost+found? yes
+
+Inode 4106 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4107
+Connect to /lost+found? yes
+
+Inode 4107 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4108
+Connect to /lost+found? yes
+
+Inode 4108 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4109
+Connect to /lost+found? yes
+
+Inode 4109 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4110
+Connect to /lost+found? yes
+
+Inode 4110 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4111
+Connect to /lost+found? yes
+
+Inode 4111 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4112
+Connect to /lost+found? yes
+
+Inode 4112 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4113
+Connect to /lost+found? yes
+
+Inode 4113 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4114
+Connect to /lost+found? yes
+
+Inode 4114 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4115
+Connect to /lost+found? yes
+
+Inode 4115 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4116
+Connect to /lost+found? yes
+
+Inode 4116 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4117
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 4117 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4118
+Connect to /lost+found? yes
+
+Inode 4118 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4119
+Connect to /lost+found? yes
+
+Inode 4119 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4120
+Connect to /lost+found? yes
+
+Inode 4120 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4121
+Connect to /lost+found? yes
+
+Inode 4121 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4122
+Connect to /lost+found? yes
+
+Inode 4122 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4123
+Connect to /lost+found? yes
+
+Inode 4123 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4124
+Connect to /lost+found? yes
+
+Inode 4124 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4125
+Connect to /lost+found? yes
+
+Inode 4125 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4126
+Connect to /lost+found? yes
+
+Inode 4126 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4127
+Connect to /lost+found? yes
+
+Inode 4127 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4128
+Connect to /lost+found? yes
+
+Inode 4128 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4129
+Connect to /lost+found? yes
+
+Inode 4129 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4130
+Connect to /lost+found? yes
+
+Inode 4130 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4131
+Connect to /lost+found? yes
+
+Inode 4131 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4132
+Connect to /lost+found? yes
+
+Inode 4132 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4133
+Connect to /lost+found? yes
+
+Inode 4133 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4134
+Connect to /lost+found? yes
+
+Inode 4134 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4135
+Connect to /lost+found? yes
+
+Inode 4135 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4136
+Connect to /lost+found? yes
+
+Inode 4136 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4137
+Connect to /lost+found? yes
+
+Inode 4137 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4138
+Connect to /lost+found? yes
+
+Inode 4138 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4139
+Connect to /lost+found? yes
+
+Inode 4139 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4140
+Connect to /lost+found? yes
+
+Inode 4140 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4141
+Connect to /lost+found? yes
+
+Inode 4141 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4142
+Connect to /lost+found? yes
+
+Inode 4142 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4143
+Connect to /lost+found? yes
+
+Inode 4143 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4144
+Connect to /lost+found? yes
+
+Inode 4144 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4145
+Connect to /lost+found? yes
+
+Inode 4145 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4146
+Connect to /lost+found? yes
+
+Inode 4146 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4147
+Connect to /lost+found? yes
+
+Inode 4147 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4148
+Connect to /lost+found? yes
+
+Inode 4148 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4149
+Connect to /lost+found? yes
+
+Inode 4149 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4150
+Connect to /lost+found? yes
+
+Inode 4150 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4151
+Connect to /lost+found? yes
+
+Inode 4151 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4152
+Connect to /lost+found? yes
+
+Inode 4152 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4153
+Connect to /lost+found? yes
+
+Inode 4153 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4154
+Connect to /lost+found? yes
+
+Inode 4154 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4155
+Connect to /lost+found? yes
+
+Inode 4155 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4156
+Connect to /lost+found? yes
+
+Inode 4156 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4157
+Connect to /lost+found? yes
+
+Inode 4157 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4158
+Connect to /lost+found? yes
+
+Inode 4158 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4159
+Connect to /lost+found? yes
+
+Inode 4159 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4160
+Connect to /lost+found? yes
+
+Inode 4160 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4161
+Connect to /lost+found? yes
+
+Inode 4161 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4162
+Connect to /lost+found? yes
+
+Inode 4162 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4163
+Connect to /lost+found? yes
+
+Inode 4163 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4164
+Connect to /lost+found? yes
+
+Inode 4164 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4165
+Connect to /lost+found? yes
+
+Inode 4165 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4166
+Connect to /lost+found? yes
+
+Inode 4166 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4167
+Connect to /lost+found? yes
+
+Inode 4167 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4168
+Connect to /lost+found? yes
+
+Inode 4168 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4169
+Connect to /lost+found? yes
+
+Inode 4169 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4170
+Connect to /lost+found? yes
+
+Inode 4170 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4171
+Connect to /lost+found? yes
+
+Inode 4171 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4172
+Connect to /lost+found? yes
+
+Inode 4172 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4173
+Connect to /lost+found? yes
+
+Inode 4173 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4174
+Connect to /lost+found? yes
+
+Inode 4174 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4175
+Connect to /lost+found? yes
+
+Inode 4175 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4176
+Connect to /lost+found? yes
+
+Inode 4176 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4177
+Connect to /lost+found? yes
+
+Inode 4177 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4178
+Connect to /lost+found? yes
+
+Inode 4178 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4179
+Connect to /lost+found? yes
+
+Inode 4179 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4180
+Connect to /lost+found? yes
+
+Inode 4180 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4181
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 4181 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4182
+Connect to /lost+found? yes
+
+Inode 4182 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4183
+Connect to /lost+found? yes
+
+Inode 4183 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4184
+Connect to /lost+found? yes
+
+Inode 4184 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4185
+Connect to /lost+found? yes
+
+Inode 4185 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4186
+Connect to /lost+found? yes
+
+Inode 4186 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4187
+Connect to /lost+found? yes
+
+Inode 4187 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4188
+Connect to /lost+found? yes
+
+Inode 4188 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4189
+Connect to /lost+found? yes
+
+Inode 4189 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4190
+Connect to /lost+found? yes
+
+Inode 4190 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4191
+Connect to /lost+found? yes
+
+Inode 4191 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4192
+Connect to /lost+found? yes
+
+Inode 4192 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4193
+Connect to /lost+found? yes
+
+Inode 4193 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4194
+Connect to /lost+found? yes
+
+Inode 4194 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4195
+Connect to /lost+found? yes
+
+Inode 4195 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4196
+Connect to /lost+found? yes
+
+Inode 4196 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4197
+Connect to /lost+found? yes
+
+Inode 4197 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4198
+Connect to /lost+found? yes
+
+Inode 4198 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4199
+Connect to /lost+found? yes
+
+Inode 4199 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4200
+Connect to /lost+found? yes
+
+Inode 4200 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4201
+Connect to /lost+found? yes
+
+Inode 4201 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4202
+Connect to /lost+found? yes
+
+Inode 4202 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4203
+Connect to /lost+found? yes
+
+Inode 4203 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4204
+Connect to /lost+found? yes
+
+Inode 4204 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4205
+Connect to /lost+found? yes
+
+Inode 4205 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4206
+Connect to /lost+found? yes
+
+Inode 4206 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4207
+Connect to /lost+found? yes
+
+Inode 4207 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4208
+Connect to /lost+found? yes
+
+Inode 4208 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4209
+Connect to /lost+found? yes
+
+Inode 4209 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4210
+Connect to /lost+found? yes
+
+Inode 4210 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4211
+Connect to /lost+found? yes
+
+Inode 4211 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4212
+Connect to /lost+found? yes
+
+Inode 4212 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4213
+Connect to /lost+found? yes
+
+Inode 4213 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4214
+Connect to /lost+found? yes
+
+Inode 4214 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4215
+Connect to /lost+found? yes
+
+Inode 4215 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4216
+Connect to /lost+found? yes
+
+Inode 4216 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4217
+Connect to /lost+found? yes
+
+Inode 4217 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4218
+Connect to /lost+found? yes
+
+Inode 4218 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4219
+Connect to /lost+found? yes
+
+Inode 4219 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4220
+Connect to /lost+found? yes
+
+Inode 4220 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4221
+Connect to /lost+found? yes
+
+Inode 4221 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4222
+Connect to /lost+found? yes
+
+Inode 4222 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4223
+Connect to /lost+found? yes
+
+Inode 4223 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4224
+Connect to /lost+found? yes
+
+Inode 4224 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4225
+Connect to /lost+found? yes
+
+Inode 4225 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4226
+Connect to /lost+found? yes
+
+Inode 4226 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4227
+Connect to /lost+found? yes
+
+Inode 4227 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4228
+Connect to /lost+found? yes
+
+Inode 4228 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4229
+Connect to /lost+found? yes
+
+Inode 4229 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4230
+Connect to /lost+found? yes
+
+Inode 4230 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4231
+Connect to /lost+found? yes
+
+Inode 4231 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4232
+Connect to /lost+found? yes
+
+Inode 4232 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4233
+Connect to /lost+found? yes
+
+Inode 4233 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4234
+Connect to /lost+found? yes
+
+Inode 4234 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4235
+Connect to /lost+found? yes
+
+Inode 4235 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4236
+Connect to /lost+found? yes
+
+Inode 4236 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4237
+Connect to /lost+found? yes
+
+Inode 4237 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4238
+Connect to /lost+found? yes
+
+Inode 4238 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4239
+Connect to /lost+found? yes
+
+Inode 4239 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4240
+Connect to /lost+found? yes
+
+Inode 4240 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4241
+Connect to /lost+found? yes
+
+Inode 4241 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4242
+Connect to /lost+found? yes
+
+Inode 4242 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4243
+Connect to /lost+found? yes
+
+Inode 4243 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4244
+Connect to /lost+found? yes
+
+Inode 4244 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4245
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 4245 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4246
+Connect to /lost+found? yes
+
+Inode 4246 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4247
+Connect to /lost+found? yes
+
+Inode 4247 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4248
+Connect to /lost+found? yes
+
+Inode 4248 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4249
+Connect to /lost+found? yes
+
+Inode 4249 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4250
+Connect to /lost+found? yes
+
+Inode 4250 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4251
+Connect to /lost+found? yes
+
+Inode 4251 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4252
+Connect to /lost+found? yes
+
+Inode 4252 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4253
+Connect to /lost+found? yes
+
+Inode 4253 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4254
+Connect to /lost+found? yes
+
+Inode 4254 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4255
+Connect to /lost+found? yes
+
+Inode 4255 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4256
+Connect to /lost+found? yes
+
+Inode 4256 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4257
+Connect to /lost+found? yes
+
+Inode 4257 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4258
+Connect to /lost+found? yes
+
+Inode 4258 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4259
+Connect to /lost+found? yes
+
+Inode 4259 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4260
+Connect to /lost+found? yes
+
+Inode 4260 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4261
+Connect to /lost+found? yes
+
+Inode 4261 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4262
+Connect to /lost+found? yes
+
+Inode 4262 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4263
+Connect to /lost+found? yes
+
+Inode 4263 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4264
+Connect to /lost+found? yes
+
+Inode 4264 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4265
+Connect to /lost+found? yes
+
+Inode 4265 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4266
+Connect to /lost+found? yes
+
+Inode 4266 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4267
+Connect to /lost+found? yes
+
+Inode 4267 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4268
+Connect to /lost+found? yes
+
+Inode 4268 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4269
+Connect to /lost+found? yes
+
+Inode 4269 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4270
+Connect to /lost+found? yes
+
+Inode 4270 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4271
+Connect to /lost+found? yes
+
+Inode 4271 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4272
+Connect to /lost+found? yes
+
+Inode 4272 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4273
+Connect to /lost+found? yes
+
+Inode 4273 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4274
+Connect to /lost+found? yes
+
+Inode 4274 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4275
+Connect to /lost+found? yes
+
+Inode 4275 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4276
+Connect to /lost+found? yes
+
+Inode 4276 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4277
+Connect to /lost+found? yes
+
+Inode 4277 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4278
+Connect to /lost+found? yes
+
+Inode 4278 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4279
+Connect to /lost+found? yes
+
+Inode 4279 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4280
+Connect to /lost+found? yes
+
+Inode 4280 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4281
+Connect to /lost+found? yes
+
+Inode 4281 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4282
+Connect to /lost+found? yes
+
+Inode 4282 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4283
+Connect to /lost+found? yes
+
+Inode 4283 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4284
+Connect to /lost+found? yes
+
+Inode 4284 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4285
+Connect to /lost+found? yes
+
+Inode 4285 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4286
+Connect to /lost+found? yes
+
+Inode 4286 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4287
+Connect to /lost+found? yes
+
+Inode 4287 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4288
+Connect to /lost+found? yes
+
+Inode 4288 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4289
+Connect to /lost+found? yes
+
+Inode 4289 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4290
+Connect to /lost+found? yes
+
+Inode 4290 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4291
+Connect to /lost+found? yes
+
+Inode 4291 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4292
+Connect to /lost+found? yes
+
+Inode 4292 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4293
+Connect to /lost+found? yes
+
+Inode 4293 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4294
+Connect to /lost+found? yes
+
+Inode 4294 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4295
+Connect to /lost+found? yes
+
+Inode 4295 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4296
+Connect to /lost+found? yes
+
+Inode 4296 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4297
+Connect to /lost+found? yes
+
+Inode 4297 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4298
+Connect to /lost+found? yes
+
+Inode 4298 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4299
+Connect to /lost+found? yes
+
+Inode 4299 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4300
+Connect to /lost+found? yes
+
+Inode 4300 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4301
+Connect to /lost+found? yes
+
+Inode 4301 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4302
+Connect to /lost+found? yes
+
+Inode 4302 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4303
+Connect to /lost+found? yes
+
+Inode 4303 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4304
+Connect to /lost+found? yes
+
+Inode 4304 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4305
+Connect to /lost+found? yes
+
+Inode 4305 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4306
+Connect to /lost+found? yes
+
+Inode 4306 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4307
+Connect to /lost+found? yes
+
+Inode 4307 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4308
+Connect to /lost+found? yes
+
+Inode 4308 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4309
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 4309 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4310
+Connect to /lost+found? yes
+
+Inode 4310 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4311
+Connect to /lost+found? yes
+
+Inode 4311 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4312
+Connect to /lost+found? yes
+
+Inode 4312 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4313
+Connect to /lost+found? yes
+
+Inode 4313 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4314
+Connect to /lost+found? yes
+
+Inode 4314 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4315
+Connect to /lost+found? yes
+
+Inode 4315 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4316
+Connect to /lost+found? yes
+
+Inode 4316 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4317
+Connect to /lost+found? yes
+
+Inode 4317 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4318
+Connect to /lost+found? yes
+
+Inode 4318 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4319
+Connect to /lost+found? yes
+
+Inode 4319 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4320
+Connect to /lost+found? yes
+
+Inode 4320 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4321
+Connect to /lost+found? yes
+
+Inode 4321 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4322
+Connect to /lost+found? yes
+
+Inode 4322 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4323
+Connect to /lost+found? yes
+
+Inode 4323 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4324
+Connect to /lost+found? yes
+
+Inode 4324 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4325
+Connect to /lost+found? yes
+
+Inode 4325 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4326
+Connect to /lost+found? yes
+
+Inode 4326 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4327
+Connect to /lost+found? yes
+
+Inode 4327 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4328
+Connect to /lost+found? yes
+
+Inode 4328 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4329
+Connect to /lost+found? yes
+
+Inode 4329 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4330
+Connect to /lost+found? yes
+
+Inode 4330 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4331
+Connect to /lost+found? yes
+
+Inode 4331 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4332
+Connect to /lost+found? yes
+
+Inode 4332 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4333
+Connect to /lost+found? yes
+
+Inode 4333 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4334
+Connect to /lost+found? yes
+
+Inode 4334 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4335
+Connect to /lost+found? yes
+
+Inode 4335 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4336
+Connect to /lost+found? yes
+
+Inode 4336 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4337
+Connect to /lost+found? yes
+
+Inode 4337 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4338
+Connect to /lost+found? yes
+
+Inode 4338 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4339
+Connect to /lost+found? yes
+
+Inode 4339 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4340
+Connect to /lost+found? yes
+
+Inode 4340 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4341
+Connect to /lost+found? yes
+
+Inode 4341 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4342
+Connect to /lost+found? yes
+
+Inode 4342 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4343
+Connect to /lost+found? yes
+
+Inode 4343 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4344
+Connect to /lost+found? yes
+
+Inode 4344 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4345
+Connect to /lost+found? yes
+
+Inode 4345 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4346
+Connect to /lost+found? yes
+
+Inode 4346 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4347
+Connect to /lost+found? yes
+
+Inode 4347 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4348
+Connect to /lost+found? yes
+
+Inode 4348 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4349
+Connect to /lost+found? yes
+
+Inode 4349 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4350
+Connect to /lost+found? yes
+
+Inode 4350 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4351
+Connect to /lost+found? yes
+
+Inode 4351 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4352
+Connect to /lost+found? yes
+
+Inode 4352 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4353
+Connect to /lost+found? yes
+
+Inode 4353 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4354
+Connect to /lost+found? yes
+
+Inode 4354 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4355
+Connect to /lost+found? yes
+
+Inode 4355 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4356
+Connect to /lost+found? yes
+
+Inode 4356 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4357
+Connect to /lost+found? yes
+
+Inode 4357 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4358
+Connect to /lost+found? yes
+
+Inode 4358 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4359
+Connect to /lost+found? yes
+
+Inode 4359 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4360
+Connect to /lost+found? yes
+
+Inode 4360 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4361
+Connect to /lost+found? yes
+
+Inode 4361 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4362
+Connect to /lost+found? yes
+
+Inode 4362 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4363
+Connect to /lost+found? yes
+
+Inode 4363 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4364
+Connect to /lost+found? yes
+
+Inode 4364 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4365
+Connect to /lost+found? yes
+
+Inode 4365 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4366
+Connect to /lost+found? yes
+
+Inode 4366 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4367
+Connect to /lost+found? yes
+
+Inode 4367 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4368
+Connect to /lost+found? yes
+
+Inode 4368 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4369
+Connect to /lost+found? yes
+
+Inode 4369 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4370
+Connect to /lost+found? yes
+
+Inode 4370 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4371
+Connect to /lost+found? yes
+
+Inode 4371 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4372
+Connect to /lost+found? yes
+
+Inode 4372 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4373
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 4373 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4374
+Connect to /lost+found? yes
+
+Inode 4374 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4375
+Connect to /lost+found? yes
+
+Inode 4375 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4376
+Connect to /lost+found? yes
+
+Inode 4376 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4377
+Connect to /lost+found? yes
+
+Inode 4377 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4378
+Connect to /lost+found? yes
+
+Inode 4378 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4379
+Connect to /lost+found? yes
+
+Inode 4379 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4380
+Connect to /lost+found? yes
+
+Inode 4380 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4381
+Connect to /lost+found? yes
+
+Inode 4381 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4382
+Connect to /lost+found? yes
+
+Inode 4382 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4383
+Connect to /lost+found? yes
+
+Inode 4383 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4384
+Connect to /lost+found? yes
+
+Inode 4384 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4385
+Connect to /lost+found? yes
+
+Inode 4385 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4386
+Connect to /lost+found? yes
+
+Inode 4386 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4387
+Connect to /lost+found? yes
+
+Inode 4387 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4388
+Connect to /lost+found? yes
+
+Inode 4388 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4389
+Connect to /lost+found? yes
+
+Inode 4389 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4390
+Connect to /lost+found? yes
+
+Inode 4390 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4391
+Connect to /lost+found? yes
+
+Inode 4391 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4392
+Connect to /lost+found? yes
+
+Inode 4392 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4393
+Connect to /lost+found? yes
+
+Inode 4393 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4394
+Connect to /lost+found? yes
+
+Inode 4394 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4395
+Connect to /lost+found? yes
+
+Inode 4395 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4396
+Connect to /lost+found? yes
+
+Inode 4396 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4397
+Connect to /lost+found? yes
+
+Inode 4397 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4398
+Connect to /lost+found? yes
+
+Inode 4398 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4399
+Connect to /lost+found? yes
+
+Inode 4399 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4400
+Connect to /lost+found? yes
+
+Inode 4400 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4401
+Connect to /lost+found? yes
+
+Inode 4401 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4402
+Connect to /lost+found? yes
+
+Inode 4402 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4403
+Connect to /lost+found? yes
+
+Inode 4403 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4404
+Connect to /lost+found? yes
+
+Inode 4404 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4405
+Connect to /lost+found? yes
+
+Inode 4405 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4406
+Connect to /lost+found? yes
+
+Inode 4406 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4407
+Connect to /lost+found? yes
+
+Inode 4407 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4408
+Connect to /lost+found? yes
+
+Inode 4408 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4409
+Connect to /lost+found? yes
+
+Inode 4409 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4410
+Connect to /lost+found? yes
+
+Inode 4410 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4411
+Connect to /lost+found? yes
+
+Inode 4411 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4412
+Connect to /lost+found? yes
+
+Inode 4412 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4413
+Connect to /lost+found? yes
+
+Inode 4413 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4414
+Connect to /lost+found? yes
+
+Inode 4414 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4415
+Connect to /lost+found? yes
+
+Inode 4415 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4416
+Connect to /lost+found? yes
+
+Inode 4416 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4417
+Connect to /lost+found? yes
+
+Inode 4417 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4418
+Connect to /lost+found? yes
+
+Inode 4418 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4419
+Connect to /lost+found? yes
+
+Inode 4419 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4420
+Connect to /lost+found? yes
+
+Inode 4420 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4421
+Connect to /lost+found? yes
+
+Inode 4421 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4422
+Connect to /lost+found? yes
+
+Inode 4422 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4423
+Connect to /lost+found? yes
+
+Inode 4423 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4424
+Connect to /lost+found? yes
+
+Inode 4424 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4425
+Connect to /lost+found? yes
+
+Inode 4425 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4426
+Connect to /lost+found? yes
+
+Inode 4426 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4427
+Connect to /lost+found? yes
+
+Inode 4427 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4428
+Connect to /lost+found? yes
+
+Inode 4428 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4429
+Connect to /lost+found? yes
+
+Inode 4429 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4430
+Connect to /lost+found? yes
+
+Inode 4430 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4431
+Connect to /lost+found? yes
+
+Inode 4431 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4432
+Connect to /lost+found? yes
+
+Inode 4432 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4433
+Connect to /lost+found? yes
+
+Inode 4433 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4434
+Connect to /lost+found? yes
+
+Inode 4434 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4435
+Connect to /lost+found? yes
+
+Inode 4435 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4436
+Connect to /lost+found? yes
+
+Inode 4436 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4437
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 4437 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4438
+Connect to /lost+found? yes
+
+Inode 4438 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4439
+Connect to /lost+found? yes
+
+Inode 4439 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4440
+Connect to /lost+found? yes
+
+Inode 4440 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4441
+Connect to /lost+found? yes
+
+Inode 4441 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4442
+Connect to /lost+found? yes
+
+Inode 4442 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4443
+Connect to /lost+found? yes
+
+Inode 4443 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4444
+Connect to /lost+found? yes
+
+Inode 4444 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4445
+Connect to /lost+found? yes
+
+Inode 4445 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4446
+Connect to /lost+found? yes
+
+Inode 4446 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4447
+Connect to /lost+found? yes
+
+Inode 4447 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4448
+Connect to /lost+found? yes
+
+Inode 4448 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4449
+Connect to /lost+found? yes
+
+Inode 4449 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4450
+Connect to /lost+found? yes
+
+Inode 4450 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4451
+Connect to /lost+found? yes
+
+Inode 4451 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4452
+Connect to /lost+found? yes
+
+Inode 4452 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4453
+Connect to /lost+found? yes
+
+Inode 4453 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4454
+Connect to /lost+found? yes
+
+Inode 4454 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4455
+Connect to /lost+found? yes
+
+Inode 4455 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4456
+Connect to /lost+found? yes
+
+Inode 4456 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4457
+Connect to /lost+found? yes
+
+Inode 4457 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4458
+Connect to /lost+found? yes
+
+Inode 4458 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4459
+Connect to /lost+found? yes
+
+Inode 4459 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4460
+Connect to /lost+found? yes
+
+Inode 4460 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4461
+Connect to /lost+found? yes
+
+Inode 4461 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4462
+Connect to /lost+found? yes
+
+Inode 4462 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4463
+Connect to /lost+found? yes
+
+Inode 4463 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4464
+Connect to /lost+found? yes
+
+Inode 4464 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4465
+Connect to /lost+found? yes
+
+Inode 4465 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4466
+Connect to /lost+found? yes
+
+Inode 4466 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4467
+Connect to /lost+found? yes
+
+Inode 4467 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4468
+Connect to /lost+found? yes
+
+Inode 4468 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4469
+Connect to /lost+found? yes
+
+Inode 4469 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4470
+Connect to /lost+found? yes
+
+Inode 4470 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4471
+Connect to /lost+found? yes
+
+Inode 4471 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4472
+Connect to /lost+found? yes
+
+Inode 4472 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4473
+Connect to /lost+found? yes
+
+Inode 4473 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4474
+Connect to /lost+found? yes
+
+Inode 4474 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4475
+Connect to /lost+found? yes
+
+Inode 4475 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4476
+Connect to /lost+found? yes
+
+Inode 4476 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4477
+Connect to /lost+found? yes
+
+Inode 4477 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4478
+Connect to /lost+found? yes
+
+Inode 4478 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4479
+Connect to /lost+found? yes
+
+Inode 4479 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4480
+Connect to /lost+found? yes
+
+Inode 4480 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4481
+Connect to /lost+found? yes
+
+Inode 4481 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4482
+Connect to /lost+found? yes
+
+Inode 4482 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4483
+Connect to /lost+found? yes
+
+Inode 4483 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4484
+Connect to /lost+found? yes
+
+Inode 4484 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4485
+Connect to /lost+found? yes
+
+Inode 4485 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4486
+Connect to /lost+found? yes
+
+Inode 4486 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4487
+Connect to /lost+found? yes
+
+Inode 4487 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4488
+Connect to /lost+found? yes
+
+Inode 4488 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4489
+Connect to /lost+found? yes
+
+Inode 4489 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4490
+Connect to /lost+found? yes
+
+Inode 4490 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4491
+Connect to /lost+found? yes
+
+Inode 4491 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4492
+Connect to /lost+found? yes
+
+Inode 4492 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4493
+Connect to /lost+found? yes
+
+Inode 4493 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4494
+Connect to /lost+found? yes
+
+Inode 4494 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4495
+Connect to /lost+found? yes
+
+Inode 4495 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4496
+Connect to /lost+found? yes
+
+Inode 4496 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4497
+Connect to /lost+found? yes
+
+Inode 4497 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4498
+Connect to /lost+found? yes
+
+Inode 4498 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4499
+Connect to /lost+found? yes
+
+Inode 4499 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4500
+Connect to /lost+found? yes
+
+Inode 4500 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4501
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 4501 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4502
+Connect to /lost+found? yes
+
+Inode 4502 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4503
+Connect to /lost+found? yes
+
+Inode 4503 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4504
+Connect to /lost+found? yes
+
+Inode 4504 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4505
+Connect to /lost+found? yes
+
+Inode 4505 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4506
+Connect to /lost+found? yes
+
+Inode 4506 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4507
+Connect to /lost+found? yes
+
+Inode 4507 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4508
+Connect to /lost+found? yes
+
+Inode 4508 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4509
+Connect to /lost+found? yes
+
+Inode 4509 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4510
+Connect to /lost+found? yes
+
+Inode 4510 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4511
+Connect to /lost+found? yes
+
+Inode 4511 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4512
+Connect to /lost+found? yes
+
+Inode 4512 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4513
+Connect to /lost+found? yes
+
+Inode 4513 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4514
+Connect to /lost+found? yes
+
+Inode 4514 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4515
+Connect to /lost+found? yes
+
+Inode 4515 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4516
+Connect to /lost+found? yes
+
+Inode 4516 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4517
+Connect to /lost+found? yes
+
+Inode 4517 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4518
+Connect to /lost+found? yes
+
+Inode 4518 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4519
+Connect to /lost+found? yes
+
+Inode 4519 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4520
+Connect to /lost+found? yes
+
+Inode 4520 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4521
+Connect to /lost+found? yes
+
+Inode 4521 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4522
+Connect to /lost+found? yes
+
+Inode 4522 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4523
+Connect to /lost+found? yes
+
+Inode 4523 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4524
+Connect to /lost+found? yes
+
+Inode 4524 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4525
+Connect to /lost+found? yes
+
+Inode 4525 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4526
+Connect to /lost+found? yes
+
+Inode 4526 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4527
+Connect to /lost+found? yes
+
+Inode 4527 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4528
+Connect to /lost+found? yes
+
+Inode 4528 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4529
+Connect to /lost+found? yes
+
+Inode 4529 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4530
+Connect to /lost+found? yes
+
+Inode 4530 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4531
+Connect to /lost+found? yes
+
+Inode 4531 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4532
+Connect to /lost+found? yes
+
+Inode 4532 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4533
+Connect to /lost+found? yes
+
+Inode 4533 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4534
+Connect to /lost+found? yes
+
+Inode 4534 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4535
+Connect to /lost+found? yes
+
+Inode 4535 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4536
+Connect to /lost+found? yes
+
+Inode 4536 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4537
+Connect to /lost+found? yes
+
+Inode 4537 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4538
+Connect to /lost+found? yes
+
+Inode 4538 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4539
+Connect to /lost+found? yes
+
+Inode 4539 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4540
+Connect to /lost+found? yes
+
+Inode 4540 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4541
+Connect to /lost+found? yes
+
+Inode 4541 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4542
+Connect to /lost+found? yes
+
+Inode 4542 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4543
+Connect to /lost+found? yes
+
+Inode 4543 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4544
+Connect to /lost+found? yes
+
+Inode 4544 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4545
+Connect to /lost+found? yes
+
+Inode 4545 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4546
+Connect to /lost+found? yes
+
+Inode 4546 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4547
+Connect to /lost+found? yes
+
+Inode 4547 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4548
+Connect to /lost+found? yes
+
+Inode 4548 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4549
+Connect to /lost+found? yes
+
+Inode 4549 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4550
+Connect to /lost+found? yes
+
+Inode 4550 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4551
+Connect to /lost+found? yes
+
+Inode 4551 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4552
+Connect to /lost+found? yes
+
+Inode 4552 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4553
+Connect to /lost+found? yes
+
+Inode 4553 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4554
+Connect to /lost+found? yes
+
+Inode 4554 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4555
+Connect to /lost+found? yes
+
+Inode 4555 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4556
+Connect to /lost+found? yes
+
+Inode 4556 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4557
+Connect to /lost+found? yes
+
+Inode 4557 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4558
+Connect to /lost+found? yes
+
+Inode 4558 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4559
+Connect to /lost+found? yes
+
+Inode 4559 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4560
+Connect to /lost+found? yes
+
+Inode 4560 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4561
+Connect to /lost+found? yes
+
+Inode 4561 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4562
+Connect to /lost+found? yes
+
+Inode 4562 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4563
+Connect to /lost+found? yes
+
+Inode 4563 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4564
+Connect to /lost+found? yes
+
+Inode 4564 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4565
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 4565 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4566
+Connect to /lost+found? yes
+
+Inode 4566 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4567
+Connect to /lost+found? yes
+
+Inode 4567 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4568
+Connect to /lost+found? yes
+
+Inode 4568 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4569
+Connect to /lost+found? yes
+
+Inode 4569 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4570
+Connect to /lost+found? yes
+
+Inode 4570 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4571
+Connect to /lost+found? yes
+
+Inode 4571 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4572
+Connect to /lost+found? yes
+
+Inode 4572 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4573
+Connect to /lost+found? yes
+
+Inode 4573 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4574
+Connect to /lost+found? yes
+
+Inode 4574 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4575
+Connect to /lost+found? yes
+
+Inode 4575 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4576
+Connect to /lost+found? yes
+
+Inode 4576 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4577
+Connect to /lost+found? yes
+
+Inode 4577 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4578
+Connect to /lost+found? yes
+
+Inode 4578 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4579
+Connect to /lost+found? yes
+
+Inode 4579 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4580
+Connect to /lost+found? yes
+
+Inode 4580 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4581
+Connect to /lost+found? yes
+
+Inode 4581 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4582
+Connect to /lost+found? yes
+
+Inode 4582 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4583
+Connect to /lost+found? yes
+
+Inode 4583 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4584
+Connect to /lost+found? yes
+
+Inode 4584 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4585
+Connect to /lost+found? yes
+
+Inode 4585 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4586
+Connect to /lost+found? yes
+
+Inode 4586 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4587
+Connect to /lost+found? yes
+
+Inode 4587 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4588
+Connect to /lost+found? yes
+
+Inode 4588 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4589
+Connect to /lost+found? yes
+
+Inode 4589 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4590
+Connect to /lost+found? yes
+
+Inode 4590 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4591
+Connect to /lost+found? yes
+
+Inode 4591 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4592
+Connect to /lost+found? yes
+
+Inode 4592 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4593
+Connect to /lost+found? yes
+
+Inode 4593 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4594
+Connect to /lost+found? yes
+
+Inode 4594 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4595
+Connect to /lost+found? yes
+
+Inode 4595 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4596
+Connect to /lost+found? yes
+
+Inode 4596 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4597
+Connect to /lost+found? yes
+
+Inode 4597 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4598
+Connect to /lost+found? yes
+
+Inode 4598 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4599
+Connect to /lost+found? yes
+
+Inode 4599 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4600
+Connect to /lost+found? yes
+
+Inode 4600 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4601
+Connect to /lost+found? yes
+
+Inode 4601 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4602
+Connect to /lost+found? yes
+
+Inode 4602 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4603
+Connect to /lost+found? yes
+
+Inode 4603 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4604
+Connect to /lost+found? yes
+
+Inode 4604 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4605
+Connect to /lost+found? yes
+
+Inode 4605 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4606
+Connect to /lost+found? yes
+
+Inode 4606 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4607
+Connect to /lost+found? yes
+
+Inode 4607 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4608
+Connect to /lost+found? yes
+
+Inode 4608 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4609
+Connect to /lost+found? yes
+
+Inode 4609 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4610
+Connect to /lost+found? yes
+
+Inode 4610 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4611
+Connect to /lost+found? yes
+
+Inode 4611 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4612
+Connect to /lost+found? yes
+
+Inode 4612 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4613
+Connect to /lost+found? yes
+
+Inode 4613 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4614
+Connect to /lost+found? yes
+
+Inode 4614 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4615
+Connect to /lost+found? yes
+
+Inode 4615 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4616
+Connect to /lost+found? yes
+
+Inode 4616 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4617
+Connect to /lost+found? yes
+
+Inode 4617 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4618
+Connect to /lost+found? yes
+
+Inode 4618 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4619
+Connect to /lost+found? yes
+
+Inode 4619 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4620
+Connect to /lost+found? yes
+
+Inode 4620 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4621
+Connect to /lost+found? yes
+
+Inode 4621 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4622
+Connect to /lost+found? yes
+
+Inode 4622 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4623
+Connect to /lost+found? yes
+
+Inode 4623 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4624
+Connect to /lost+found? yes
+
+Inode 4624 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4625
+Connect to /lost+found? yes
+
+Inode 4625 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4626
+Connect to /lost+found? yes
+
+Inode 4626 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4627
+Connect to /lost+found? yes
+
+Inode 4627 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4628
+Connect to /lost+found? yes
+
+Inode 4628 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4629
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 4629 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4630
+Connect to /lost+found? yes
+
+Inode 4630 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4631
+Connect to /lost+found? yes
+
+Inode 4631 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4632
+Connect to /lost+found? yes
+
+Inode 4632 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4633
+Connect to /lost+found? yes
+
+Inode 4633 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4634
+Connect to /lost+found? yes
+
+Inode 4634 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4635
+Connect to /lost+found? yes
+
+Inode 4635 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4636
+Connect to /lost+found? yes
+
+Inode 4636 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4637
+Connect to /lost+found? yes
+
+Inode 4637 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4638
+Connect to /lost+found? yes
+
+Inode 4638 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4639
+Connect to /lost+found? yes
+
+Inode 4639 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4640
+Connect to /lost+found? yes
+
+Inode 4640 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4641
+Connect to /lost+found? yes
+
+Inode 4641 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4642
+Connect to /lost+found? yes
+
+Inode 4642 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4643
+Connect to /lost+found? yes
+
+Inode 4643 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4644
+Connect to /lost+found? yes
+
+Inode 4644 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4645
+Connect to /lost+found? yes
+
+Inode 4645 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4646
+Connect to /lost+found? yes
+
+Inode 4646 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4647
+Connect to /lost+found? yes
+
+Inode 4647 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4648
+Connect to /lost+found? yes
+
+Inode 4648 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4649
+Connect to /lost+found? yes
+
+Inode 4649 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4650
+Connect to /lost+found? yes
+
+Inode 4650 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4651
+Connect to /lost+found? yes
+
+Inode 4651 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4652
+Connect to /lost+found? yes
+
+Inode 4652 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4653
+Connect to /lost+found? yes
+
+Inode 4653 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4654
+Connect to /lost+found? yes
+
+Inode 4654 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4655
+Connect to /lost+found? yes
+
+Inode 4655 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4656
+Connect to /lost+found? yes
+
+Inode 4656 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4657
+Connect to /lost+found? yes
+
+Inode 4657 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4658
+Connect to /lost+found? yes
+
+Inode 4658 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4659
+Connect to /lost+found? yes
+
+Inode 4659 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4660
+Connect to /lost+found? yes
+
+Inode 4660 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4661
+Connect to /lost+found? yes
+
+Inode 4661 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4662
+Connect to /lost+found? yes
+
+Inode 4662 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4663
+Connect to /lost+found? yes
+
+Inode 4663 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4664
+Connect to /lost+found? yes
+
+Inode 4664 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4665
+Connect to /lost+found? yes
+
+Inode 4665 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4666
+Connect to /lost+found? yes
+
+Inode 4666 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4667
+Connect to /lost+found? yes
+
+Inode 4667 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4668
+Connect to /lost+found? yes
+
+Inode 4668 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4669
+Connect to /lost+found? yes
+
+Inode 4669 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4670
+Connect to /lost+found? yes
+
+Inode 4670 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4671
+Connect to /lost+found? yes
+
+Inode 4671 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4672
+Connect to /lost+found? yes
+
+Inode 4672 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4673
+Connect to /lost+found? yes
+
+Inode 4673 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4674
+Connect to /lost+found? yes
+
+Inode 4674 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4675
+Connect to /lost+found? yes
+
+Inode 4675 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4676
+Connect to /lost+found? yes
+
+Inode 4676 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4677
+Connect to /lost+found? yes
+
+Inode 4677 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4678
+Connect to /lost+found? yes
+
+Inode 4678 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4679
+Connect to /lost+found? yes
+
+Inode 4679 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4680
+Connect to /lost+found? yes
+
+Inode 4680 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4681
+Connect to /lost+found? yes
+
+Inode 4681 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4682
+Connect to /lost+found? yes
+
+Inode 4682 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4683
+Connect to /lost+found? yes
+
+Inode 4683 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4684
+Connect to /lost+found? yes
+
+Inode 4684 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4685
+Connect to /lost+found? yes
+
+Inode 4685 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4686
+Connect to /lost+found? yes
+
+Inode 4686 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4687
+Connect to /lost+found? yes
+
+Inode 4687 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4688
+Connect to /lost+found? yes
+
+Inode 4688 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4689
+Connect to /lost+found? yes
+
+Inode 4689 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4690
+Connect to /lost+found? yes
+
+Inode 4690 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4691
+Connect to /lost+found? yes
+
+Inode 4691 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4692
+Connect to /lost+found? yes
+
+Inode 4692 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4693
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 4693 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4694
+Connect to /lost+found? yes
+
+Inode 4694 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4695
+Connect to /lost+found? yes
+
+Inode 4695 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4696
+Connect to /lost+found? yes
+
+Inode 4696 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4697
+Connect to /lost+found? yes
+
+Inode 4697 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4698
+Connect to /lost+found? yes
+
+Inode 4698 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4699
+Connect to /lost+found? yes
+
+Inode 4699 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4700
+Connect to /lost+found? yes
+
+Inode 4700 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4701
+Connect to /lost+found? yes
+
+Inode 4701 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4702
+Connect to /lost+found? yes
+
+Inode 4702 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4703
+Connect to /lost+found? yes
+
+Inode 4703 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4704
+Connect to /lost+found? yes
+
+Inode 4704 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4705
+Connect to /lost+found? yes
+
+Inode 4705 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4706
+Connect to /lost+found? yes
+
+Inode 4706 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4707
+Connect to /lost+found? yes
+
+Inode 4707 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4708
+Connect to /lost+found? yes
+
+Inode 4708 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4709
+Connect to /lost+found? yes
+
+Inode 4709 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4710
+Connect to /lost+found? yes
+
+Inode 4710 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4711
+Connect to /lost+found? yes
+
+Inode 4711 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4712
+Connect to /lost+found? yes
+
+Inode 4712 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4713
+Connect to /lost+found? yes
+
+Inode 4713 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4714
+Connect to /lost+found? yes
+
+Inode 4714 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4715
+Connect to /lost+found? yes
+
+Inode 4715 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4716
+Connect to /lost+found? yes
+
+Inode 4716 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4717
+Connect to /lost+found? yes
+
+Inode 4717 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4718
+Connect to /lost+found? yes
+
+Inode 4718 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4719
+Connect to /lost+found? yes
+
+Inode 4719 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4720
+Connect to /lost+found? yes
+
+Inode 4720 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4721
+Connect to /lost+found? yes
+
+Inode 4721 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4722
+Connect to /lost+found? yes
+
+Inode 4722 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4723
+Connect to /lost+found? yes
+
+Inode 4723 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4724
+Connect to /lost+found? yes
+
+Inode 4724 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4725
+Connect to /lost+found? yes
+
+Inode 4725 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4726
+Connect to /lost+found? yes
+
+Inode 4726 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4727
+Connect to /lost+found? yes
+
+Inode 4727 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4728
+Connect to /lost+found? yes
+
+Inode 4728 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4729
+Connect to /lost+found? yes
+
+Inode 4729 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4730
+Connect to /lost+found? yes
+
+Inode 4730 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4731
+Connect to /lost+found? yes
+
+Inode 4731 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4732
+Connect to /lost+found? yes
+
+Inode 4732 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4733
+Connect to /lost+found? yes
+
+Inode 4733 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4734
+Connect to /lost+found? yes
+
+Inode 4734 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4735
+Connect to /lost+found? yes
+
+Inode 4735 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4736
+Connect to /lost+found? yes
+
+Inode 4736 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4737
+Connect to /lost+found? yes
+
+Inode 4737 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4738
+Connect to /lost+found? yes
+
+Inode 4738 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4739
+Connect to /lost+found? yes
+
+Inode 4739 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4740
+Connect to /lost+found? yes
+
+Inode 4740 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4741
+Connect to /lost+found? yes
+
+Inode 4741 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4742
+Connect to /lost+found? yes
+
+Inode 4742 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4743
+Connect to /lost+found? yes
+
+Inode 4743 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4744
+Connect to /lost+found? yes
+
+Inode 4744 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4745
+Connect to /lost+found? yes
+
+Inode 4745 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4746
+Connect to /lost+found? yes
+
+Inode 4746 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4747
+Connect to /lost+found? yes
+
+Inode 4747 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4748
+Connect to /lost+found? yes
+
+Inode 4748 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4749
+Connect to /lost+found? yes
+
+Inode 4749 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4750
+Connect to /lost+found? yes
+
+Inode 4750 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4751
+Connect to /lost+found? yes
+
+Inode 4751 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4752
+Connect to /lost+found? yes
+
+Inode 4752 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4753
+Connect to /lost+found? yes
+
+Inode 4753 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4754
+Connect to /lost+found? yes
+
+Inode 4754 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4755
+Connect to /lost+found? yes
+
+Inode 4755 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4756
+Connect to /lost+found? yes
+
+Inode 4756 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4757
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 4757 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4758
+Connect to /lost+found? yes
+
+Inode 4758 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4759
+Connect to /lost+found? yes
+
+Inode 4759 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4760
+Connect to /lost+found? yes
+
+Inode 4760 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4761
+Connect to /lost+found? yes
+
+Inode 4761 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4762
+Connect to /lost+found? yes
+
+Inode 4762 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4763
+Connect to /lost+found? yes
+
+Inode 4763 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4764
+Connect to /lost+found? yes
+
+Inode 4764 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4765
+Connect to /lost+found? yes
+
+Inode 4765 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4766
+Connect to /lost+found? yes
+
+Inode 4766 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4767
+Connect to /lost+found? yes
+
+Inode 4767 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4768
+Connect to /lost+found? yes
+
+Inode 4768 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4769
+Connect to /lost+found? yes
+
+Inode 4769 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4770
+Connect to /lost+found? yes
+
+Inode 4770 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4771
+Connect to /lost+found? yes
+
+Inode 4771 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4772
+Connect to /lost+found? yes
+
+Inode 4772 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4773
+Connect to /lost+found? yes
+
+Inode 4773 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4774
+Connect to /lost+found? yes
+
+Inode 4774 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4775
+Connect to /lost+found? yes
+
+Inode 4775 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4776
+Connect to /lost+found? yes
+
+Inode 4776 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4777
+Connect to /lost+found? yes
+
+Inode 4777 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4778
+Connect to /lost+found? yes
+
+Inode 4778 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4779
+Connect to /lost+found? yes
+
+Inode 4779 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4780
+Connect to /lost+found? yes
+
+Inode 4780 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4781
+Connect to /lost+found? yes
+
+Inode 4781 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4782
+Connect to /lost+found? yes
+
+Inode 4782 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4783
+Connect to /lost+found? yes
+
+Inode 4783 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4784
+Connect to /lost+found? yes
+
+Inode 4784 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4785
+Connect to /lost+found? yes
+
+Inode 4785 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4786
+Connect to /lost+found? yes
+
+Inode 4786 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4787
+Connect to /lost+found? yes
+
+Inode 4787 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4788
+Connect to /lost+found? yes
+
+Inode 4788 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4789
+Connect to /lost+found? yes
+
+Inode 4789 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4790
+Connect to /lost+found? yes
+
+Inode 4790 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4791
+Connect to /lost+found? yes
+
+Inode 4791 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4792
+Connect to /lost+found? yes
+
+Inode 4792 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4793
+Connect to /lost+found? yes
+
+Inode 4793 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4794
+Connect to /lost+found? yes
+
+Inode 4794 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4795
+Connect to /lost+found? yes
+
+Inode 4795 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4796
+Connect to /lost+found? yes
+
+Inode 4796 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4797
+Connect to /lost+found? yes
+
+Inode 4797 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4798
+Connect to /lost+found? yes
+
+Inode 4798 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4799
+Connect to /lost+found? yes
+
+Inode 4799 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4800
+Connect to /lost+found? yes
+
+Inode 4800 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4801
+Connect to /lost+found? yes
+
+Inode 4801 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4802
+Connect to /lost+found? yes
+
+Inode 4802 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4803
+Connect to /lost+found? yes
+
+Inode 4803 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4804
+Connect to /lost+found? yes
+
+Inode 4804 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4805
+Connect to /lost+found? yes
+
+Inode 4805 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4806
+Connect to /lost+found? yes
+
+Inode 4806 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4807
+Connect to /lost+found? yes
+
+Inode 4807 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4808
+Connect to /lost+found? yes
+
+Inode 4808 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4809
+Connect to /lost+found? yes
+
+Inode 4809 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4810
+Connect to /lost+found? yes
+
+Inode 4810 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4811
+Connect to /lost+found? yes
+
+Inode 4811 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4812
+Connect to /lost+found? yes
+
+Inode 4812 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4813
+Connect to /lost+found? yes
+
+Inode 4813 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4814
+Connect to /lost+found? yes
+
+Inode 4814 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4815
+Connect to /lost+found? yes
+
+Inode 4815 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4816
+Connect to /lost+found? yes
+
+Inode 4816 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4817
+Connect to /lost+found? yes
+
+Inode 4817 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4818
+Connect to /lost+found? yes
+
+Inode 4818 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4819
+Connect to /lost+found? yes
+
+Inode 4819 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4820
+Connect to /lost+found? yes
+
+Inode 4820 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4821
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 4821 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4822
+Connect to /lost+found? yes
+
+Inode 4822 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4823
+Connect to /lost+found? yes
+
+Inode 4823 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4824
+Connect to /lost+found? yes
+
+Inode 4824 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4825
+Connect to /lost+found? yes
+
+Inode 4825 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4826
+Connect to /lost+found? yes
+
+Inode 4826 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4827
+Connect to /lost+found? yes
+
+Inode 4827 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4828
+Connect to /lost+found? yes
+
+Inode 4828 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4829
+Connect to /lost+found? yes
+
+Inode 4829 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4830
+Connect to /lost+found? yes
+
+Inode 4830 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4831
+Connect to /lost+found? yes
+
+Inode 4831 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4832
+Connect to /lost+found? yes
+
+Inode 4832 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4833
+Connect to /lost+found? yes
+
+Inode 4833 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4834
+Connect to /lost+found? yes
+
+Inode 4834 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4835
+Connect to /lost+found? yes
+
+Inode 4835 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4836
+Connect to /lost+found? yes
+
+Inode 4836 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4837
+Connect to /lost+found? yes
+
+Inode 4837 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4838
+Connect to /lost+found? yes
+
+Inode 4838 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4839
+Connect to /lost+found? yes
+
+Inode 4839 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4840
+Connect to /lost+found? yes
+
+Inode 4840 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4841
+Connect to /lost+found? yes
+
+Inode 4841 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4842
+Connect to /lost+found? yes
+
+Inode 4842 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4843
+Connect to /lost+found? yes
+
+Inode 4843 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4844
+Connect to /lost+found? yes
+
+Inode 4844 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4845
+Connect to /lost+found? yes
+
+Inode 4845 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4846
+Connect to /lost+found? yes
+
+Inode 4846 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4847
+Connect to /lost+found? yes
+
+Inode 4847 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4848
+Connect to /lost+found? yes
+
+Inode 4848 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4849
+Connect to /lost+found? yes
+
+Inode 4849 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4850
+Connect to /lost+found? yes
+
+Inode 4850 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4851
+Connect to /lost+found? yes
+
+Inode 4851 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4852
+Connect to /lost+found? yes
+
+Inode 4852 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4853
+Connect to /lost+found? yes
+
+Inode 4853 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4854
+Connect to /lost+found? yes
+
+Inode 4854 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4855
+Connect to /lost+found? yes
+
+Inode 4855 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4856
+Connect to /lost+found? yes
+
+Inode 4856 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4857
+Connect to /lost+found? yes
+
+Inode 4857 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4858
+Connect to /lost+found? yes
+
+Inode 4858 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4859
+Connect to /lost+found? yes
+
+Inode 4859 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4860
+Connect to /lost+found? yes
+
+Inode 4860 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4861
+Connect to /lost+found? yes
+
+Inode 4861 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4862
+Connect to /lost+found? yes
+
+Inode 4862 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4863
+Connect to /lost+found? yes
+
+Inode 4863 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4864
+Connect to /lost+found? yes
+
+Inode 4864 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4865
+Connect to /lost+found? yes
+
+Inode 4865 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4866
+Connect to /lost+found? yes
+
+Inode 4866 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4867
+Connect to /lost+found? yes
+
+Inode 4867 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4868
+Connect to /lost+found? yes
+
+Inode 4868 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4869
+Connect to /lost+found? yes
+
+Inode 4869 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4870
+Connect to /lost+found? yes
+
+Inode 4870 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4871
+Connect to /lost+found? yes
+
+Inode 4871 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4872
+Connect to /lost+found? yes
+
+Inode 4872 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4873
+Connect to /lost+found? yes
+
+Inode 4873 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4874
+Connect to /lost+found? yes
+
+Inode 4874 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4875
+Connect to /lost+found? yes
+
+Inode 4875 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4876
+Connect to /lost+found? yes
+
+Inode 4876 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4877
+Connect to /lost+found? yes
+
+Inode 4877 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4878
+Connect to /lost+found? yes
+
+Inode 4878 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4879
+Connect to /lost+found? yes
+
+Inode 4879 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4880
+Connect to /lost+found? yes
+
+Inode 4880 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4881
+Connect to /lost+found? yes
+
+Inode 4881 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4882
+Connect to /lost+found? yes
+
+Inode 4882 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4883
+Connect to /lost+found? yes
+
+Inode 4883 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4884
+Connect to /lost+found? yes
+
+Inode 4884 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4885
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 4885 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4886
+Connect to /lost+found? yes
+
+Inode 4886 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4887
+Connect to /lost+found? yes
+
+Inode 4887 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4888
+Connect to /lost+found? yes
+
+Inode 4888 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4889
+Connect to /lost+found? yes
+
+Inode 4889 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4890
+Connect to /lost+found? yes
+
+Inode 4890 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4891
+Connect to /lost+found? yes
+
+Inode 4891 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4892
+Connect to /lost+found? yes
+
+Inode 4892 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4893
+Connect to /lost+found? yes
+
+Inode 4893 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4894
+Connect to /lost+found? yes
+
+Inode 4894 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4895
+Connect to /lost+found? yes
+
+Inode 4895 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4896
+Connect to /lost+found? yes
+
+Inode 4896 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4897
+Connect to /lost+found? yes
+
+Inode 4897 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4898
+Connect to /lost+found? yes
+
+Inode 4898 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4899
+Connect to /lost+found? yes
+
+Inode 4899 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4900
+Connect to /lost+found? yes
+
+Inode 4900 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4901
+Connect to /lost+found? yes
+
+Inode 4901 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4902
+Connect to /lost+found? yes
+
+Inode 4902 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4903
+Connect to /lost+found? yes
+
+Inode 4903 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4904
+Connect to /lost+found? yes
+
+Inode 4904 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4905
+Connect to /lost+found? yes
+
+Inode 4905 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4906
+Connect to /lost+found? yes
+
+Inode 4906 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4907
+Connect to /lost+found? yes
+
+Inode 4907 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4908
+Connect to /lost+found? yes
+
+Inode 4908 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4909
+Connect to /lost+found? yes
+
+Inode 4909 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4910
+Connect to /lost+found? yes
+
+Inode 4910 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4911
+Connect to /lost+found? yes
+
+Inode 4911 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4912
+Connect to /lost+found? yes
+
+Inode 4912 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4913
+Connect to /lost+found? yes
+
+Inode 4913 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4914
+Connect to /lost+found? yes
+
+Inode 4914 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4915
+Connect to /lost+found? yes
+
+Inode 4915 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4916
+Connect to /lost+found? yes
+
+Inode 4916 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4917
+Connect to /lost+found? yes
+
+Inode 4917 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4918
+Connect to /lost+found? yes
+
+Inode 4918 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4919
+Connect to /lost+found? yes
+
+Inode 4919 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4920
+Connect to /lost+found? yes
+
+Inode 4920 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4921
+Connect to /lost+found? yes
+
+Inode 4921 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4922
+Connect to /lost+found? yes
+
+Inode 4922 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4923
+Connect to /lost+found? yes
+
+Inode 4923 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4924
+Connect to /lost+found? yes
+
+Inode 4924 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4925
+Connect to /lost+found? yes
+
+Inode 4925 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4926
+Connect to /lost+found? yes
+
+Inode 4926 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4927
+Connect to /lost+found? yes
+
+Inode 4927 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4928
+Connect to /lost+found? yes
+
+Inode 4928 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4929
+Connect to /lost+found? yes
+
+Inode 4929 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4930
+Connect to /lost+found? yes
+
+Inode 4930 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4931
+Connect to /lost+found? yes
+
+Inode 4931 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4932
+Connect to /lost+found? yes
+
+Inode 4932 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4933
+Connect to /lost+found? yes
+
+Inode 4933 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4934
+Connect to /lost+found? yes
+
+Inode 4934 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4935
+Connect to /lost+found? yes
+
+Inode 4935 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4936
+Connect to /lost+found? yes
+
+Inode 4936 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4937
+Connect to /lost+found? yes
+
+Inode 4937 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4938
+Connect to /lost+found? yes
+
+Inode 4938 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4939
+Connect to /lost+found? yes
+
+Inode 4939 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4940
+Connect to /lost+found? yes
+
+Inode 4940 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4941
+Connect to /lost+found? yes
+
+Inode 4941 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4942
+Connect to /lost+found? yes
+
+Inode 4942 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4943
+Connect to /lost+found? yes
+
+Inode 4943 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4944
+Connect to /lost+found? yes
+
+Inode 4944 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4945
+Connect to /lost+found? yes
+
+Inode 4945 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4946
+Connect to /lost+found? yes
+
+Inode 4946 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4947
+Connect to /lost+found? yes
+
+Inode 4947 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4948
+Connect to /lost+found? yes
+
+Inode 4948 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4949
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 4949 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4950
+Connect to /lost+found? yes
+
+Inode 4950 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4951
+Connect to /lost+found? yes
+
+Inode 4951 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4952
+Connect to /lost+found? yes
+
+Inode 4952 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4953
+Connect to /lost+found? yes
+
+Inode 4953 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4954
+Connect to /lost+found? yes
+
+Inode 4954 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4955
+Connect to /lost+found? yes
+
+Inode 4955 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4956
+Connect to /lost+found? yes
+
+Inode 4956 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4957
+Connect to /lost+found? yes
+
+Inode 4957 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4958
+Connect to /lost+found? yes
+
+Inode 4958 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4959
+Connect to /lost+found? yes
+
+Inode 4959 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4960
+Connect to /lost+found? yes
+
+Inode 4960 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4961
+Connect to /lost+found? yes
+
+Inode 4961 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4962
+Connect to /lost+found? yes
+
+Inode 4962 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4963
+Connect to /lost+found? yes
+
+Inode 4963 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4964
+Connect to /lost+found? yes
+
+Inode 4964 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4965
+Connect to /lost+found? yes
+
+Inode 4965 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4966
+Connect to /lost+found? yes
+
+Inode 4966 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4967
+Connect to /lost+found? yes
+
+Inode 4967 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4968
+Connect to /lost+found? yes
+
+Inode 4968 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4969
+Connect to /lost+found? yes
+
+Inode 4969 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4970
+Connect to /lost+found? yes
+
+Inode 4970 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4971
+Connect to /lost+found? yes
+
+Inode 4971 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4972
+Connect to /lost+found? yes
+
+Inode 4972 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4973
+Connect to /lost+found? yes
+
+Inode 4973 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4974
+Connect to /lost+found? yes
+
+Inode 4974 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4975
+Connect to /lost+found? yes
+
+Inode 4975 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4976
+Connect to /lost+found? yes
+
+Inode 4976 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4977
+Connect to /lost+found? yes
+
+Inode 4977 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4978
+Connect to /lost+found? yes
+
+Inode 4978 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4979
+Connect to /lost+found? yes
+
+Inode 4979 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4980
+Connect to /lost+found? yes
+
+Inode 4980 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4981
+Connect to /lost+found? yes
+
+Inode 4981 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4982
+Connect to /lost+found? yes
+
+Inode 4982 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4983
+Connect to /lost+found? yes
+
+Inode 4983 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4984
+Connect to /lost+found? yes
+
+Inode 4984 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4985
+Connect to /lost+found? yes
+
+Inode 4985 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4986
+Connect to /lost+found? yes
+
+Inode 4986 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4987
+Connect to /lost+found? yes
+
+Inode 4987 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4988
+Connect to /lost+found? yes
+
+Inode 4988 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4989
+Connect to /lost+found? yes
+
+Inode 4989 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4990
+Connect to /lost+found? yes
+
+Inode 4990 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4991
+Connect to /lost+found? yes
+
+Inode 4991 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4992
+Connect to /lost+found? yes
+
+Inode 4992 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4993
+Connect to /lost+found? yes
+
+Inode 4993 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4994
+Connect to /lost+found? yes
+
+Inode 4994 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4995
+Connect to /lost+found? yes
+
+Inode 4995 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4996
+Connect to /lost+found? yes
+
+Inode 4996 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4997
+Connect to /lost+found? yes
+
+Inode 4997 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4998
+Connect to /lost+found? yes
+
+Inode 4998 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 4999
+Connect to /lost+found? yes
+
+Inode 4999 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5000
+Connect to /lost+found? yes
+
+Inode 5000 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5001
+Connect to /lost+found? yes
+
+Inode 5001 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5002
+Connect to /lost+found? yes
+
+Inode 5002 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5003
+Connect to /lost+found? yes
+
+Inode 5003 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5004
+Connect to /lost+found? yes
+
+Inode 5004 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5005
+Connect to /lost+found? yes
+
+Inode 5005 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5006
+Connect to /lost+found? yes
+
+Inode 5006 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5007
+Connect to /lost+found? yes
+
+Inode 5007 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5008
+Connect to /lost+found? yes
+
+Inode 5008 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5009
+Connect to /lost+found? yes
+
+Inode 5009 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5010
+Connect to /lost+found? yes
+
+Inode 5010 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5011
+Connect to /lost+found? yes
+
+Inode 5011 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5012
+Connect to /lost+found? yes
+
+Inode 5012 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5013
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 5013 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5014
+Connect to /lost+found? yes
+
+Inode 5014 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5015
+Connect to /lost+found? yes
+
+Inode 5015 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5016
+Connect to /lost+found? yes
+
+Inode 5016 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5017
+Connect to /lost+found? yes
+
+Inode 5017 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5018
+Connect to /lost+found? yes
+
+Inode 5018 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5019
+Connect to /lost+found? yes
+
+Inode 5019 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5020
+Connect to /lost+found? yes
+
+Inode 5020 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5021
+Connect to /lost+found? yes
+
+Inode 5021 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5022
+Connect to /lost+found? yes
+
+Inode 5022 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5023
+Connect to /lost+found? yes
+
+Inode 5023 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5024
+Connect to /lost+found? yes
+
+Inode 5024 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5025
+Connect to /lost+found? yes
+
+Inode 5025 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5026
+Connect to /lost+found? yes
+
+Inode 5026 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5027
+Connect to /lost+found? yes
+
+Inode 5027 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5028
+Connect to /lost+found? yes
+
+Inode 5028 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5029
+Connect to /lost+found? yes
+
+Inode 5029 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5030
+Connect to /lost+found? yes
+
+Inode 5030 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5031
+Connect to /lost+found? yes
+
+Inode 5031 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5032
+Connect to /lost+found? yes
+
+Inode 5032 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5033
+Connect to /lost+found? yes
+
+Inode 5033 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5034
+Connect to /lost+found? yes
+
+Inode 5034 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5035
+Connect to /lost+found? yes
+
+Inode 5035 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5036
+Connect to /lost+found? yes
+
+Inode 5036 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5037
+Connect to /lost+found? yes
+
+Inode 5037 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5038
+Connect to /lost+found? yes
+
+Inode 5038 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5039
+Connect to /lost+found? yes
+
+Inode 5039 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5040
+Connect to /lost+found? yes
+
+Inode 5040 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5041
+Connect to /lost+found? yes
+
+Inode 5041 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5042
+Connect to /lost+found? yes
+
+Inode 5042 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5043
+Connect to /lost+found? yes
+
+Inode 5043 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5044
+Connect to /lost+found? yes
+
+Inode 5044 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5045
+Connect to /lost+found? yes
+
+Inode 5045 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5046
+Connect to /lost+found? yes
+
+Inode 5046 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5047
+Connect to /lost+found? yes
+
+Inode 5047 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5048
+Connect to /lost+found? yes
+
+Inode 5048 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5049
+Connect to /lost+found? yes
+
+Inode 5049 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5050
+Connect to /lost+found? yes
+
+Inode 5050 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5051
+Connect to /lost+found? yes
+
+Inode 5051 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5052
+Connect to /lost+found? yes
+
+Inode 5052 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5053
+Connect to /lost+found? yes
+
+Inode 5053 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5054
+Connect to /lost+found? yes
+
+Inode 5054 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5055
+Connect to /lost+found? yes
+
+Inode 5055 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5056
+Connect to /lost+found? yes
+
+Inode 5056 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5057
+Connect to /lost+found? yes
+
+Inode 5057 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5058
+Connect to /lost+found? yes
+
+Inode 5058 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5059
+Connect to /lost+found? yes
+
+Inode 5059 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5060
+Connect to /lost+found? yes
+
+Inode 5060 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5061
+Connect to /lost+found? yes
+
+Inode 5061 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5062
+Connect to /lost+found? yes
+
+Inode 5062 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5063
+Connect to /lost+found? yes
+
+Inode 5063 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5064
+Connect to /lost+found? yes
+
+Inode 5064 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5065
+Connect to /lost+found? yes
+
+Inode 5065 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5066
+Connect to /lost+found? yes
+
+Inode 5066 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5067
+Connect to /lost+found? yes
+
+Inode 5067 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5068
+Connect to /lost+found? yes
+
+Inode 5068 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5069
+Connect to /lost+found? yes
+
+Inode 5069 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5070
+Connect to /lost+found? yes
+
+Inode 5070 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5071
+Connect to /lost+found? yes
+
+Inode 5071 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5072
+Connect to /lost+found? yes
+
+Inode 5072 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5073
+Connect to /lost+found? yes
+
+Inode 5073 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5074
+Connect to /lost+found? yes
+
+Inode 5074 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5075
+Connect to /lost+found? yes
+
+Inode 5075 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5076
+Connect to /lost+found? yes
+
+Inode 5076 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5077
+Connect to /lost+found? yes
+
+No room in lost+found directory. Expand? yes
+
+Inode 5077 ref count is 3, should be 1. Fix? yes
+
+Unattached inode 5078
+Connect to /lost+found? yes
+
+Inode 5078 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5079
+Connect to /lost+found? yes
+
+Inode 5079 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5080
+Connect to /lost+found? yes
+
+Inode 5080 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5081
+Connect to /lost+found? yes
+
+Inode 5081 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5082
+Connect to /lost+found? yes
+
+Inode 5082 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5083
+Connect to /lost+found? yes
+
+Inode 5083 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5084
+Connect to /lost+found? yes
+
+Inode 5084 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5085
+Connect to /lost+found? yes
+
+Inode 5085 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5086
+Connect to /lost+found? yes
+
+Inode 5086 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5087
+Connect to /lost+found? yes
+
+Inode 5087 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5088
+Connect to /lost+found? yes
+
+Inode 5088 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5089
+Connect to /lost+found? yes
+
+Inode 5089 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5090
+Connect to /lost+found? yes
+
+Inode 5090 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5091
+Connect to /lost+found? yes
+
+Inode 5091 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5092
+Connect to /lost+found? yes
+
+Inode 5092 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5093
+Connect to /lost+found? yes
+
+Inode 5093 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5094
+Connect to /lost+found? yes
+
+Inode 5094 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5095
+Connect to /lost+found? yes
+
+Inode 5095 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5096
+Connect to /lost+found? yes
+
+Inode 5096 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5097
+Connect to /lost+found? yes
+
+Inode 5097 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5098
+Connect to /lost+found? yes
+
+Inode 5098 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5099
+Connect to /lost+found? yes
+
+Inode 5099 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5100
+Connect to /lost+found? yes
+
+Inode 5100 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5101
+Connect to /lost+found? yes
+
+Inode 5101 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5102
+Connect to /lost+found? yes
+
+Inode 5102 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5103
+Connect to /lost+found? yes
+
+Inode 5103 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5104
+Connect to /lost+found? yes
+
+Inode 5104 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5105
+Connect to /lost+found? yes
+
+Inode 5105 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5106
+Connect to /lost+found? yes
+
+Inode 5106 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5107
+Connect to /lost+found? yes
+
+Inode 5107 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5108
+Connect to /lost+found? yes
+
+Inode 5108 ref count is 2, should be 1. Fix? yes
+
+Unattached inode 5109
+Connect to /lost+found? yes
+
+Inode 5109 ref count is 2, should be 1. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -(776--786)
+Fix? yes
+
+Free blocks count wrong for group #0 (86, counted=97).
+Fix? yes
+
+Free blocks count wrong (86, counted=97).
+Fix? yes
+
+Directories count wrong for group #0 (6, counted=5).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 5109/5504 files (0.0% non-contiguous), 803/900 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_expand/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+expanding lost+found
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/journal.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/journal.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/script
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/script 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_ext_journal/script 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,23 @@
+Superblock doesn't have has_journal flag, but has ext3 journal inode.
+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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_extra_journal/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+Valid journal inode, but has_journal feature not present
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,43 @@
+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
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 17/64 files (0.0% non-contiguous), 27/100 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_filetype/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+set filetype information and illegal special files
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,26 @@
+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
+
+Directory inode 11 has an unallocated block #11. Allocate? 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/32 files (9.1% non-contiguous), 22/100 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_holedir/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+directory with holes and illegal blocks
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_hurd/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+GNU/Hurd specific tests
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,28 @@
+Note: if there is several inode or block bitmap blocks
+which require relocation, or one part of the inode table
+which must be moved, you may wish to try running e2fsck
+with the '-b 8193' option first. The problem may lie only
+with the primary block group descriptor, and the backup
+block group descriptor 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illbbitmap/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+illegal block bitmap
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,25 @@
+Note: if there is several inode or block bitmap blocks
+which require relocation, or one part of the inode table
+which must be moved, you may wish to try running e2fsck
+with the '-b 8193' option first. The problem may lie only
+with the primary block group descriptor, and the backup
+block group descriptor 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illibitmap/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+illegal inode bitmap
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,40 @@
+Note: if there is several inode or block bitmap blocks
+which require relocation, or one part of the inode table
+which must be moved, you may wish to try running e2fsck
+with the '-b 8193' option first. The problem may lie only
+with the primary block group descriptor, and the backup
+block group descriptor 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 (78, counted=89).
+Fix? yes
+
+Free blocks count wrong (78, counted=89).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/32 files (0.0% non-contiguous), 11/100 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_illitable/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+illegal inode table
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,38 @@
+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 (76, counted=87).
+Fix? yes
+
+Free blocks count wrong (76, counted=87).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/16 files (0.0% non-contiguous), 13/100 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+non-imagic filesystem with imagic inodes
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,22 @@
+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 (76, counted=87).
+Fix? yes
+
+Free blocks count wrong (76, counted=87).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/16 files (0.0% non-contiguous), 13/100 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+imagic filesystem with imagic inodes
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/script
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/script 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_imagic_fs/script 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,3 @@
+IMAGE=$test_dir/../f_imagic/image.gz
+PREP_CMD='$DEBUGFS -w -R "feature imagic_inodes" $TMPFILE > /dev/null 2>&1'
+. $cmd_dir/run_e2fsck
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,60 @@
+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)
+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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_journal/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+recover journal
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,49 @@
+Filesystem did not have a UUID; generating one.
+
+Pass 1: Checking inodes, blocks, and sizes
+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
+Pass 5: Checking group summary information
+Block bitmap differences: -(27--41) -(44--45)
+Fix? yes
+
+Free blocks count wrong for group #0 (41, counted=58).
+Fix? yes
+
+Free blocks count wrong (41, counted=58).
+Fix? yes
+
+Inode bitmap differences: -12
+Fix? yes
+
+Free inodes count wrong for group #0 (20, counted=21).
+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), 42/100 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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), 42/100 blocks
+Exit status is 0
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lotsbad/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+too many illegal blocks in inode
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,51 @@
+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 (25, counted=33).
+Fix? yes
+
+Free blocks count wrong (39, counted=33).
+Fix? yes
+
+Inode bitmap differences: +13
+Fix? yes
+
+Free inodes count wrong for group #0 (2, counted=0).
+Fix? yes
+
+Directories count wrong for group #0 (1, counted=2).
+Fix? yes
+
+Free inodes count wrong (2, 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpf/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+missing lost+found
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,47 @@
+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
+Free blocks count wrong for group #0 (86, counted=85).
+Fix? yes
+
+Free blocks count wrong (86, counted=85).
+Fix? yes
+
+Free inodes count wrong for group #0 (18, counted=17).
+Fix? yes
+
+Directories count wrong for group #0 (1, counted=2).
+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), 15/100 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_lpffile/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+lost+found is not a directory
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_messy_inode/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+bad file and directory acl pointers
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,19 @@
+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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_blk_bmap/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+missing block bitmap
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,23 @@
+Superblock has a bad ext3 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
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/256 files (0.0% non-contiguous), 50/2048 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_miss_journal/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+Non-existent journal inode
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,48 @@
+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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_misstable/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+missing inode table
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,19 @@
+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
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 15/32 files (0.0% non-contiguous), 25/100 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_mke2fs2b/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+mke2fs version 0.2b created filesystem
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,48 @@
+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 blocks count wrong for group #0 (75, counted=74).
+Fix? yes
+
+Free blocks count wrong (75, counted=74).
+Fix? yes
+
+Free inodes count wrong for group #0 (17, counted=16).
+Fix? yes
+
+Directories count wrong for group #0 (4, counted=5).
+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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_noroot/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+missing root directory
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,11 @@
+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: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/2048 files (0.0% non-contiguous), 274/8193 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_okgroup/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+8193 block long filesystem
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_orphan/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+clearing orphan inodes
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,18 @@
+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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_overfsblks/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+overlapping inode and block bitmaps
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,12 @@
+which require relocation, or one part of the inode table
+which must be moved, you may wish to try running e2fsck
+with the '-b 8193' option first. The problem may lie only
+with the primary block group descriptor, and the backup
+block group descriptor 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+preen shouldn't destroy backup superblocks
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/script
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/script 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_preen/script 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,4 @@
+FSCK_OPT=-pf
+SECOND_FSCK_OPT=-yfb8193
+
+. $cmd_dir/run_e2fsck
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,29 @@
+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_faddr for inode 13 (/test/???) is 12, should be zero.
+Clear? yes
+
+i_file_acl 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
+
+Inode 28 (...) has a bad mode (0177777).
+Clear? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 15/32 files (0.0% non-contiguous), 26/100 blocks
+Exit status is 1
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_recnect_bad/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+Reconnecting bad inode
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_reconnect/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+simple disconnected file inode
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/debugfs.cmd
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/debugfs.cmd 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/debugfs.cmd 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,5 @@
+ls
+stat sym
+stat double-indirect-test
+cat fluff
+quit
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/expect
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/expect 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/expect 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,133 @@
+Swapfs test
+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: 25/256 files (0.0% non-contiguous), 418/1024 blocks
+Exit status is 0
+e2fsck -Sy -N test_filesys
+Pass 0: Doing byte-swap of 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: 25/256 files (0.0% non-contiguous), 418/1024 blocks
+Exit status is 0
+Running debugfs....
+debugfs: ls
+ 2 (12) . 2 (12) .. 11 (20) lost+found 12 (16) fluff
+ 13 (28) indirect-fluff-test 14 (28) double-indirect-test
+ 15 (20) sym 16 (24) long-sym-test 17 (864) dir-test
+debugfs: stat sym
+Inode: 15 Type: symlink Mode: 0777 Flags: 0x0 Generation: 1
+User: 0 Group: 0 Size: 5
+File ACL: 0 Directory ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ctime: 0x322737e2 -- Fri Aug 30 18:50:10 1996
+atime: 0x322737e2 -- Fri Aug 30 18:50:10 1996
+mtime: 0x322737e2 -- Fri Aug 30 18:50:10 1996
+Fast_link_dest: fluff
+debugfs: stat double-indirect-test
+Inode: 14 Type: regular Mode: 0644 Flags: 0x0 Generation: 1
+User: 0 Group: 0 Size: 348960
+File ACL: 0 Directory ACL: 0
+Links: 1 Blockcount: 688
+Fragment: Address: 0 Number: 0 Size: 0
+ctime: 0x322488cf -- Wed Aug 28 17:58:39 1996
+atime: 0x322488cf -- Wed Aug 28 17:58:39 1996
+mtime: 0x322488cf -- Wed Aug 28 17:58:39 1996
+BLOCKS:
+(0-11):70-81, (IND):82, (12-267):83-338, (DIND):339, (IND):340, (268-340):341-413
+TOTAL: 344
+
+debugfs: cat fluff
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+
+debugfs: quit
+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: 25/256 files (0.0% non-contiguous), 418/1024 blocks
+Exit status is 0
+e2fsck -sy -N test_filesys
+Pass 0: Doing byte-swap of 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: 25/256 files (0.0% non-contiguous), 418/1024 blocks
+Exit status is 0
+Running debugfs....
+debugfs: ls
+ 2 (12) . 2 (12) .. 11 (20) lost+found 12 (16) fluff
+ 13 (28) indirect-fluff-test 14 (28) double-indirect-test
+ 15 (20) sym 16 (24) long-sym-test 17 (864) dir-test
+debugfs: stat sym
+Inode: 15 Type: symlink Mode: 0777 Flags: 0x0 Generation: 1
+User: 0 Group: 0 Size: 5
+File ACL: 0 Directory ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ctime: 0x322737e2 -- Fri Aug 30 18:50:10 1996
+atime: 0x322737e2 -- Fri Aug 30 18:50:10 1996
+mtime: 0x322737e2 -- Fri Aug 30 18:50:10 1996
+Fast_link_dest: fluff
+debugfs: stat double-indirect-test
+Inode: 14 Type: regular Mode: 0644 Flags: 0x0 Generation: 1
+User: 0 Group: 0 Size: 348960
+File ACL: 0 Directory ACL: 0
+Links: 1 Blockcount: 688
+Fragment: Address: 0 Number: 0 Size: 0
+ctime: 0x322488cf -- Wed Aug 28 17:58:39 1996
+atime: 0x322488cf -- Wed Aug 28 17:58:39 1996
+mtime: 0x322488cf -- Wed Aug 28 17:58:39 1996
+BLOCKS:
+(0-11):70-81, (IND):82, (12-267):83-338, (DIND):339, (IND):340, (268-340):341-413
+TOTAL: 344
+
+debugfs: cat fluff
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+yabba dabba doo. cocka doodle doo. yabba dabba doo. cocka doodle doo. yipyip
+
+debugfs: quit
+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: 25/256 files (0.0% non-contiguous), 418/1024 blocks
+Exit status is 0
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/image
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/image
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+checking the e2fsck swapfs functionality
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/script
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/script 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_swapfs/script 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,73 @@
+IMAGE=$test_dir/image.gz
+VERIFY_FSCK_OPT=-yf
+SWAP_FSCK_OPT=-Sy
+NATIVE_FSCK_OPT=-sy
+OUT=$test_name.log
+EXP=$test_dir/expect
+
+gunzip < $IMAGE > $TMPFILE
+
+echo "Swapfs test" > $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 -e '2d' $OUT.new >> $OUT
+
+echo e2fsck $SWAP_FSCK_OPT -N test_filesys > $OUT.new
+$FSCK $SWAP_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -e '2d' $OUT.new >> $OUT
+
+echo Running debugfs.... >> $OUT
+$DEBUGFS -f $test_dir/debugfs.cmd $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -e '1d' $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 -e '2d' $OUT.new >> $OUT
+
+echo e2fsck $NATIVE_FSCK_OPT -N test_filesys > $OUT.new
+$FSCK $NATIVE_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -e '2d' $OUT.new >> $OUT
+
+echo Running debugfs.... >> $OUT
+$DEBUGFS -f $test_dir/debugfs.cmd $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -e '1d' $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 -e '2d' $OUT.new >> $OUT
+rm -f $OUT.new
+
+rm $TMPFILE
+
+#
+# Do the verification
+#
+
+rm -f $test_name.ok $test_name.failed
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "ok"
+ touch $test_name.ok
+else
+ echo "failed"
+ diff -c $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE VERIFY_FSCK_OPT SWAP_FSCK_OPT NATIVE_FSCK_OPT OUT EXP
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,22 @@
+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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_group/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+fallback for damaged group descriptors
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/expect.1
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/expect.1 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/expect.1 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,22 @@
+Couldn't find ext2 superblock, 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/expect.2
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/expect.2 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/expect.2 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and 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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/image.gz
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/image.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/name
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/name 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/f_zero_super/name 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+fallback for damaged superblock
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,3 @@
+Makefile
+test_icount
+test_icount_cmds.c
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,167 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-06-01 Theodore Tso <tytso at valinux.com>
+
+ * Makefile.in: Move include/asm/types.h.in to
+ lib/ext2fs/ext2_types.h.in.
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2001-05-14 Theodore Tso <tytso at valinux.com>
+
+ * test_icount.c, test_rel.c: Change location of ext2_fs.h to be
+ ext2fs/ext2_fs.h
+
+2001-05-10 Theodore Tso <tytso at valinux.com>
+
+ * random_exercise.c: Also do some random truncating as well.
+
+2001-01-11 <tytso at snap.thunk.org>
+
+ * test_icount.c, test_rel.c: Change ino_t to ext2_ino_t
+
+2000-12-08 <tytso at snap.thunk.org>
+
+ * Makefile.in (srcdir): Fix so that top-level "make check" works
+ correctly.
+
+2000-10-18 <tytso at valinux.com>
+
+ * random_exercise.c: Add support for making the test files have a
+ certain size, and also add directories as test inodes as
+ well.
+
+2000-08-20 <tytso at valinux.com>
+
+ * random_exercise.c: New file which feeds a lot of file creations
+ and deletions (while leaving the file descriptor open, and
+ then closing the file descriptor later). This generates
+ lots of fodder for the orphan list code, as well as for
+ the ext3 journal.
+
+ * hold_inode.c: New file which holds an inode or a directory open
+ (for testing orphan list code).
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+2000-07-04 <tytso at snap.thunk.org>
+
+ * Makefile.in: Use _SS_DIR_OVERRIDE to make sure we get the
+ mk_cmds support files from the source tree.
+
+1999-11-19 <tytso at valinux.com>
+
+ * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
+ the source directory.
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-07-18 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.15
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+1998-06-27 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * test_icount.c (main): The variable which gets the return value
+ from getopt should be an int so that the comparisons
+ against EOF work on systems with unsigned chars.
+
+1998-06-25 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * test_icount.c (main): Fix main() declaration so that it returns
+ int, not void.
+
+1998-03-31 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in: Add uninstall target (which is a just a no-op).
+
+1998-03-29 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * test_icount.h (do_dump, do_validate): Add prototypes to fix
+ -Wall warnings.
+
+ * test_icount.c: Fix -Wall warnings.
+
+Sat Oct 25 18:50:33 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Makefile.in (PROGS): Remove test_rel from the test programs that
+ we build for now.
+
+ * test_icount.c: Fix some random lint warnings.
+
+Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.11
+
+Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso at localhost.mit.edu>
+
+ * Release of E2fsprogs version 1.10
+
+Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.09
+
+Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.08
+
+Wed Mar 26 15:38:52 1997 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * test_icount.c: New file which tests the icount abstraction.
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/Makefile.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/Makefile.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/Makefile.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,67 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ../..
+my_dir = tests/progs
+INSTALL = @INSTALL@
+
+ at MCONFIG@
+
+MK_CMDS= _SS_DIR_OVERRIDE=../../lib/ss ../../lib/ss/mk_cmds
+
+PROGS= test_icount
+
+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) $(LIBSS) $(LIBCOM_ERR)
+
+.c.o:
+ $(CC) -c $(ALL_CFLAGS) $< -o $@
+
+all:: $(PROGS)
+
+test_rel: $(TEST_REL_OBJS) $(DEPLIBS)
+ $(LD) $(ALL_LDFLAGS) -o test_rel $(TEST_REL_OBJS) $(LIBS)
+
+test_rel_cmds.c: test_rel_cmds.ct
+ $(MK_CMDS) $(srcdir)/test_rel_cmds.ct
+
+test_icount: $(TEST_ICOUNT_OBJS) $(DEPLIBS)
+ $(LD) $(ALL_LDFLAGS) -o test_icount $(TEST_ICOUNT_OBJS) $(LIBS)
+
+test_icount_cmds.c: test_icount_cmds.ct
+ $(MK_CMDS) $(srcdir)/test_icount_cmds.ct
+
+clean:
+ $(RM) -f $(PROGS) test_rel_cmds.c test_icount_cmds.c \
+ \#* *.s *.o *.a *~ core
+
+install:
+
+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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/hold_inode.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/hold_inode.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/hold_inode.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -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);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/random_exercise.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/random_exercise.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/random_exercise.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -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;
+ }
+ }
+}
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/bma.setup
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/bma.setup 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/bma.setup 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+-bma_create test 23
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/expect.brel
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/expect.brel 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/expect.brel 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/expect.icount
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/expect.icount 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/expect.icount 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,191 @@
+test_icount: validate
+Icount structure successfully validated
+test_icount: store 0
+usage: store inode counttest_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_increment
+test_icount: store 20001
+usage: store inode counttest_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_increment
+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_increment
+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_increment
+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_increment
+test_icount: decrement 4
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_increment
+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_increment
+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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/expect.irel
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/expect.irel 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/expect.irel 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/ima.setup
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/ima.setup 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/ima.setup 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+-ima_create test 23
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/normal.setup
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/normal.setup 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/normal.setup 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+-create
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/opt.setup
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/opt.setup 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/opt.setup 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+-create -i
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/test.brel
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/test.brel 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/test.brel 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/test.icount
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/test.icount 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/test.icount 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
+fetch 0
+increment 0
+decrement 0
+store 20001
+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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/test.irel
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/test.irel 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_data/test.irel 2006-07-10 20:52:46 UTC (rev 35)
@@ -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
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_icount.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_icount.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_icount.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,358 @@
+/*
+ * 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";
+ 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";
+ 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";
+ 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_increment");
+ return;
+ }
+ printf("Count is now %u\n", count);
+}
+
+void do_store(int argc, char **argv)
+{
+ const char *usage = "usage: %s inode count";
+ 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", i);
+ return;
+ }
+ if (count)
+ printf("%lu: %u\n", 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", 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);
+ }
+ }
+ 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 retval;
+ int sci_idx;
+ const char *usage = "Usage: test_icount [-R request] [-f cmd_file]";
+ 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(¶m, 0, sizeof(struct ext2_super_block));
+ param.s_blocks_count = 80000;
+ param.s_inodes_count = 20000;
+ retval = ext2fs_initialize("/dev/null", 0, ¶m,
+ 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);
+ 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);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_icount.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_icount.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_icount.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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);
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_icount_cmds.ct
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_icount_cmds.ct 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_icount_cmds.ct 2006-07-10 20:52:46 UTC (rev 35)
@@ -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;
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_rel.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_rel.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_rel.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,761 @@
+/*
+ * 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);
+ }
+ }
+ 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]";
+ char 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);
+}
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_rel.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_rel.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_rel.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -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);
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_rel_cmds.ct
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_rel_cmds.ct 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/progs/test_rel_cmds.ct 2006-07-10 20:52:46 UTC (rev 35)
@@ -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;
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/run_e2fsck
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/run_e2fsck 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/run_e2fsck 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,75 @@
+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
+ EXP1=$test_dir/expect.1
+fi
+
+if [ "$EXP2"x = x ]; then
+ EXP2=$test_dir/expect.2
+fi
+
+gunzip < $IMAGE > $TMPFILE
+
+eval $PREP_CMD
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT1.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT1.new
+sed -e '1d' $OUT1.new | sed -e '/^JFS DEBUG:/d' | tr -d '\r' > $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 -e '1d' $OUT2.new | sed -e '/^JFS DEBUG:/d' > $OUT2
+ rm -f $OUT2.new
+fi
+
+rm $TMPFILE
+
+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 [ "$status1" = 0 -a "$status2" = 0 ] ; then
+ echo "ok"
+ touch $test_name.ok
+ else
+ echo "failed"
+ diff -c $EXP1 $OUT1 > $test_name.failed
+ if [ "$ONE_PASS_ONLY" != "true" ]; then
+ diff -c $EXP2 $OUT2 >> $test_name.failed
+ fi
+ fi
+fi
+
+if [ "$SKIP_CLEANUP" != "true" ] ; then
+ unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2 ONE_PASS_ONLY PREP_CMD
+fi
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/test_config
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/test_config 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/test_config 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,21 @@
+#
+# Test configuration
+#
+
+FSCK=../e2fsck/e2fsck
+MKE2FS=../misc/mke2fs
+DUMPE2FS=../misc/dumpe2fs
+TUNE2FS=../misc/tune2fs
+CHATTR=../misc/chattr
+LSATTR=../misc/lsattr
+DEBUGFS=../debugfs/debugfs
+TEST_REL=../tests/progs/test_rel
+TEST_ICOUNT=../tests/progs/test_icount
+LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss
+TMPFILE=./test.img
+export LD_LIBRARY_PATH
+TZ=GMT
+export TZ
+LANG=C
+export LANG
+unset PAGER
Added: trunk/yaboot/lib/e2fsprogs-1.27/tests/test_script.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/tests/test_script.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/tests/test_script.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,61 @@
+#!/bin/sh
+#
+# Test script for e2fsck
+#
+
+if test "$1"x = x ; then
+ TESTS=`ls -d $SRCDIR/[a-zA-Z]_* | egrep -v "\.failed|\.new"`
+else
+ TESTS=
+ for i
+ do
+ case $i in
+ *.failed|*.new) continue ;;
+ [a-zA-Z]) TESTS="$TESTS $SRCDIR/${i}_*" ;;
+ *) TESTS="$TESTS $SRCDIR/$i" ;;
+ esac
+ done
+fi
+
+cmd_dir=$SRCDIR
+
+if test "$TEST_CONFIG"x = x; then
+ TEST_CONFIG=$SRCDIR/test_config
+fi
+
+. $TEST_CONFIG
+
+for test_dir in $TESTS
+do
+ test_name=`echo $test_dir | sed -e 's;.*/;;'`
+ if [ -f $test_dir ] ; then
+ continue;
+ fi
+ if [ ! -d $test_dir ] ; then
+ echo "The test '$test_name' does not exist."
+ continue;
+ fi
+ if [ -f $test_dir/name ]; then
+ test_description=`cat $test_dir/name`
+ printf "%s: %s: " "$test_name" "$test_description"
+ else
+ printf "%s: " "$test_name"
+ fi
+ 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 "Missing test script!"
+ fi
+ fi
+done
+
+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"
+
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/tests/test_script.in
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/util/.cvsignore
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/util/.cvsignore 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/util/.cvsignore 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,3 @@
+Makefile
+subst.conf
+subst
Added: trunk/yaboot/lib/e2fsprogs-1.27/util/ChangeLog
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/util/ChangeLog 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/util/ChangeLog 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,140 @@
+2002-03-08 Theodore Tso <tytso at mit.edu>
+
+ * Release of E2fsprogs 1.27
+
+2002-02-03 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.26
+
+2001-09-20 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.25
+
+2001-09-02 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24a
+
+2001-08-30 Theodore Tso <tytso at thunk.org>
+
+ * Release of E2fsprogs 1.24
+
+2001-08-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.23
+
+2001-07-27 Theodore Tso <tytso at valinux.com>
+
+ * subst.conf.in: Enable documentation of the external journal
+ functionality in mke2fs, e2fsck, and tune2fs.
+
+2001-06-23 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.22
+
+2001-06-15 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.21
+
+2001-05-25 Theodore Tso <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.20
+
+2001-04-21 Theodore Tso <tytso at valinux.com>
+
+ * subst.conf.in: Add definition of JDEV for mke2fs' and tune2fs'
+ man page.
+
+2001-04-17 Theodore Tso <tytso at valinux.com>
+
+ * subst.c (replace_string): Fix replace_string so that it
+ correctly handles replacing a substitution variable with a
+ zero-length string.
+
+2001-01-14 Theodore Ts'o <tytso at valinux.com>
+
+ * gcc-wall-cleanup: Remove additional annoying warning messages
+ emited by gcc 2.95.2.
+
+2001-01-11 <tytso at snap.thunk.org>
+
+ * gcc-wall-cleanup: New file which is used to clean up unnecessary
+ crud from gcc -Wall that we're not interested in seeing
+
+2000-07-13 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.19
+
+2000-04-03 Theodore Ts'o <tytso at valinux.com>
+
+ * subst.c: For platforms that don't define optarg.h, manually
+ define optarg and optind.
+
+1999-11-19 <tytso at valinux.com>
+
+ * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
+ the source directory.
+
+1999-11-10 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.18
+
+1999-10-26 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.17
+
+1999-10-26 <tytso at valinux.com>
+
+ * subst.c (substitute_line): Removed some unused variables.
+
+1999-10-22 <tytso at valinux.com>
+
+ * Release of E2fsprogs 1.16
+
+1999-07-18 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.15
+
+1999-07-03 <tytso at valinux.com>
+
+ * Makefile.in (subst): Build subst using $(BUILD_CC), since it's a
+ helper program which must be built using the native C
+ compiler during a cross-compilation.
+
+1999-01-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.14
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.13
+
+1998-12-15 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * subst.c (get_subst_symbol): Add [0-9] to the list of valid
+ characters for a substitution symbol.
+
+1998-08-01 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * subst.c: Add the ability to substitute apparent shell/make
+ variables such as ${prefix}, since this is needed to make
+ the shell scripts work correctly.
+
+ * subst.conf.in: Add ${prefix} to the list of substitutions which
+ subst should make.
+
+1998-07-09 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * Release of E2fsprogs 1.12
+
+1998-03-31 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * subst.conf.in: Add substitution for @datadir@
+
+Mon Jan 19 09:25:24 1998 Theodore Ts'o <tytso at rsts-11.mit.edu>
+
+ * subst.c: Rename "new" to "new_f" to avoid C++ reserved word
+ clash.
+
+ * subst.c: Explicitly cast all assignments from void * to be
+ compatible with C++.
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/util/Makefile.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/util/Makefile.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/util/Makefile.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,39 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = util
+INSTALL = @INSTALL@
+
+SRCS = $(srcdir)/subst.c
+
+ at MCONFIG@
+
+.c.o:
+ $(BUILD_CC) -c $(ALL_CFLAGS) $< -o $@
+
+PROGS= subst
+
+all:: $(PROGS)
+
+subst: subst.o
+ $(BUILD_CC) $(ALL_LDFLAGS) -o subst subst.o
+
+clean:
+ $(RM) -f $(PROGS) \#* *.s *.o *.a *~ core
+
+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
Added: trunk/yaboot/lib/e2fsprogs-1.27/util/gcc-wall-cleanup
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/util/gcc-wall-cleanup 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/util/gcc-wall-cleanup 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,17 @@
+#!/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
+/does not support the `ll' 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
+/^[ ]*from/d
+
Property changes on: trunk/yaboot/lib/e2fsprogs-1.27/util/gcc-wall-cleanup
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/util/libecho.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/util/libecho.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/util/libecho.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -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);
+}
Added: trunk/yaboot/lib/e2fsprogs-1.27/util/subst.c
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/util/subst.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/util/subst.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,374 @@
+/*
+ * 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>
+
+#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;
+};
+
+struct subst_entry *subst_table = 0;
+
+static int add_subst(char *name, char *value)
+{
+ struct subst_entry *ent = 0;
+ int retval;
+
+ retval = ENOMEM;
+ 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) {
+ if (ent->name)
+ free(ent->name);
+ if (ent->value)
+ free(ent->value);
+ free(ent);
+ }
+ return retval;
+}
+
+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, int 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;
+ int 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 at 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);
+ }
+ /*
+ * 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)
+ 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;
+
+ while ((c = getopt (argc, argv, "f:v")) != EOF) {
+ switch (c) {
+ case 'f':
+ in = fopen(optarg, "r");
+ if (!in) {
+ perror(optarg);
+ exit(1);
+ }
+ parse_config_file(in);
+ fclose(in);
+ 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) {
+ if (compare_file(outfn, newfn)) {
+ if (verbose)
+ printf("No change, keeping %s.\n", outfn);
+ unlink(newfn);
+ } else {
+ if (verbose)
+ printf("Creating or replacing %s.\n", outfn);
+ rename(newfn, outfn);
+ }
+ }
+ return (0);
+}
+
+
Added: trunk/yaboot/lib/e2fsprogs-1.27/util/subst.conf.in
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/util/subst.conf.in 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/util/subst.conf.in 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,16 @@
+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@
+datadir @datadir@
+$prefix @prefix@
+# Enable the documentation for the journal device mke2fs, tune2fs, and
+# e2fsck's man page
+JDEV
Added: trunk/yaboot/lib/e2fsprogs-1.27/version.h
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/version.h 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/version.h 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,10 @@
+/*
+ * version.h --- controls the version number printed by the e2fs
+ * programs.
+ *
+ * Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 by Theodore
+ * Ts'o. This file may be redistributed under the GNU Public License.
+ */
+
+#define E2FSPROGS_VERSION "1.27"
+#define E2FSPROGS_DATE "8-Mar-2002"
Added: trunk/yaboot/lib/e2fsprogs-1.27/wordwrap.pl
===================================================================
--- trunk/yaboot/lib/e2fsprogs-1.27/wordwrap.pl 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/e2fsprogs-1.27/wordwrap.pl 2006-07-10 20:52:46 UTC (rev 35)
@@ -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;
+ split;
+ while (defined($word = shift @_)) {
+ $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");
+}
Added: trunk/yaboot/lib/libext2fs.a
===================================================================
(Binary files differ)
Property changes on: trunk/yaboot/lib/libext2fs.a
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/yaboot/lib/malloc.c
===================================================================
--- trunk/yaboot/lib/malloc.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/malloc.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,111 @@
+/* malloc.c - Dumb memory allocation routines
+ *
+ * Copyright (C) 1997 Paul Mackerras
+ * 1996 Maurizio Plaza
+ * 1996 Jakub Jelinek
+ *
+ * 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.
+ */
+
+#include "types.h"
+#include "stddef.h"
+
+/* Imported functions */
+extern void prom_printf (char *fmt, ...);
+
+static char *malloc_ptr = 0;
+static char *malloc_top = 0;
+static char *last_alloc = 0;
+
+void malloc_init(void *bottom, unsigned long size)
+{
+ malloc_ptr = bottom;
+ malloc_top = bottom + size;
+}
+
+void malloc_dispose(void)
+{
+ malloc_ptr = 0;
+ last_alloc = 0;
+}
+
+void *malloc (unsigned int size)
+{
+ char *caddr;
+
+ if (!malloc_ptr)
+ return NULL;
+ if ((malloc_ptr + size + sizeof(int)) > malloc_top) {
+ prom_printf("malloc failed\n");
+ return NULL;
+ }
+ *(int *)malloc_ptr = size;
+ caddr = malloc_ptr + sizeof(int);
+ malloc_ptr += size + sizeof(int);
+ last_alloc = caddr;
+ malloc_ptr = (char *) ((((unsigned int) malloc_ptr) + 3) & (~3));
+ return caddr;
+}
+
+void *realloc(void *ptr, unsigned int size)
+{
+ char *caddr, *oaddr = ptr;
+
+ if (!malloc_ptr)
+ return NULL;
+ if (oaddr == last_alloc) {
+ if (oaddr + size > malloc_top) {
+ prom_printf("realloc failed\n");
+ return NULL;
+ }
+ *(int *)(oaddr - sizeof(int)) = size;
+ malloc_ptr = oaddr + size;
+ return oaddr;
+ }
+ caddr = malloc(size);
+ if (caddr != 0 && oaddr != 0)
+ memcpy(caddr, oaddr, *(int *)(oaddr - sizeof(int)));
+ return caddr;
+}
+
+void free (void *m)
+{
+ if (!malloc_ptr)
+ return;
+ if (m == last_alloc)
+ malloc_ptr = (char *) last_alloc - sizeof(int);
+}
+
+void mark (void **ptr)
+{
+ if (!malloc_ptr)
+ return;
+ *ptr = (void *) malloc_ptr;
+}
+
+void release (void *ptr)
+{
+ if (!malloc_ptr)
+ return;
+ malloc_ptr = (char *) ptr;
+}
+
+char *strdup(char const *str)
+{
+ char *p = malloc(strlen(str) + 1);
+ if (p)
+ strcpy(p, str);
+ return p;
+}
Added: trunk/yaboot/lib/nosys.c
===================================================================
--- trunk/yaboot/lib/nosys.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/nosys.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,5 @@
+/* we got no time */
+long time()
+{
+ return 0;
+}
Added: trunk/yaboot/lib/string.S
===================================================================
--- trunk/yaboot/lib/string.S 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/string.S 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,255 @@
+/*
+ * string.S - String handling functions for PowerPC.
+ *
+ * Copyright (C) 1996 Paul Mackerras.
+ *
+ * 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.
+ */
+
+#include "asm/processor.h"
+#include "asm/ppc_asm.tmpl"
+
+ .globl strcpy
+strcpy:
+ addi r5,r3,-1
+ addi r4,r4,-1
+1: lbzu r0,1(r4)
+ cmpwi 0,r0,0
+ stbu r0,1(r5)
+ bne 1b
+ blr
+
+ .globl strncpy
+strncpy:
+ cmpwi 0,r5,0
+ beqlr
+ mtctr r5
+ addi r6,r3,-1
+ addi r4,r4,-1
+1: lbzu r0,1(r4)
+ cmpwi 0,r0,0
+ stbu r0,1(r6)
+ bdnzf 2,1b /* dec ctr, branch if ctr != 0 && !cr0.eq */
+ blr
+
+ .globl strcat
+strcat:
+ addi r5,r3,-1
+ addi r4,r4,-1
+1: lbzu r0,1(r5)
+ cmpwi 0,r0,0
+ bne 1b
+ addi r5,r5,-1
+1: lbzu r0,1(r4)
+ cmpwi 0,r0,0
+ stbu r0,1(r5)
+ bne 1b
+ blr
+
+ .globl strcmp
+strcmp:
+ addi r5,r3,-1
+ addi r4,r4,-1
+1: lbzu r3,1(r5)
+ cmpwi 1,r3,0
+ lbzu r0,1(r4)
+ subf. r3,r0,r3
+ beqlr 1
+ beq 1b
+ blr
+
+ .globl strncmp
+strncmp:
+ cmpwi 0,r5,0
+ addi r6,r3,-1
+ addi r4,r4,-1
+ beqlr
+ mtctr r5
+1: lbzu r3,1(r6)
+ cmpwi 1,r3,0
+ lbzu r0,1(r4)
+ subf. r3,r0,r3
+ beqlr 1
+ bdnzt 2,1b /* dec ctr, branch if ctr != 0 && cr0.eq */
+ blr
+
+ .globl strlen
+strlen:
+ addi r4,r3,-1
+1: lbzu r0,1(r4)
+ cmpwi 0,r0,0
+ bne 1b
+ subf r3,r3,r4
+ blr
+
+ .globl strchr
+strchr:
+ addi r3,r3,-1
+1: lbzu r0,1(r3)
+ cmpw 0,r0,r4
+ cmpwi 1,r0,0
+ beqlr
+ bne 1,1b
+ li r3,0
+ blr
+
+ .globl strrchr
+strrchr:
+ addi r5,r3,-1
+ li r3,0
+1: lbzu r0,1(r5)
+ cmpwi 0,r0,0
+ cmpw 1,r0,r4
+ beqlr
+ bne 1,1b
+ mr r3,r5
+ b 1b
+
+ .globl memset
+memset:
+ rlwimi r4,r4,8,16,23
+ rlwimi r4,r4,16,0,15
+ addi r6,r3,-4
+ cmplwi 0,r5,4
+ blt 7f
+ stwu r4,4(r6)
+ beqlr
+ andi. r0,r6,3
+ add r5,r0,r5
+ subf r6,r0,r6
+ rlwinm r0,r5,32-2,2,31
+ mtctr r0
+ bdz 6f
+1: stwu r4,4(r6)
+ bdnz 1b
+6: andi. r5,r5,3
+7: cmpwi 0,r5,0
+ beqlr
+ mtctr r5
+ addi r6,r6,3
+8: stbu r4,1(r6)
+ bdnz 8b
+ blr
+
+ .globl bcopy
+bcopy:
+ mr r6,r3
+ mr r3,r4
+ mr r4,r6
+ b memcpy
+
+ .globl __bzero
+__bzero:
+ mr r5, r4
+ li r4, 0
+ b memset
+
+ .globl memmove
+memmove:
+ cmplw 0,r3,r4
+ bgt backwards_memcpy
+ /* fall through */
+
+ .globl memcpy
+memcpy:
+ rlwinm. r7,r5,32-3,3,31 /* r0 = r5 >> 3 */
+ addi r6,r3,-4
+ addi r4,r4,-4
+ beq 2f /* if less than 8 bytes to do */
+ andi. r0,r6,3 /* get dest word aligned */
+ mtctr r7
+ bne 5f
+1: lwz r7,4(r4)
+ lwzu r8,8(r4)
+ stw r7,4(r6)
+ stwu r8,8(r6)
+ bdnz 1b
+ andi. r5,r5,7
+2: cmplwi 0,r5,4
+ blt 3f
+ lwzu r0,4(r4)
+ addi r5,r5,-4
+ stwu r0,4(r6)
+3: cmpwi 0,r5,0
+ beqlr
+ mtctr r5
+ addi r4,r4,3
+ addi r6,r6,3
+4: lbzu r0,1(r4)
+ stbu r0,1(r6)
+ bdnz 4b
+ blr
+5: subfic r0,r0,4
+ mtctr r0
+6: lbz r7,4(r4)
+ addi r4,r4,1
+ stb r7,4(r6)
+ addi r6,r6,1
+ bdnz 6b
+ subf r5,r0,r5
+ rlwinm. r7,r5,32-3,3,31
+ beq 2b
+ mtctr r7
+ b 1b
+
+ .globl backwards_memcpy
+backwards_memcpy:
+ rlwinm. r7,r5,32-3,3,31 /* r0 = r5 >> 3 */
+ add r6,r3,r5
+ add r4,r4,r5
+ beq 2f
+ andi. r0,r6,3
+ mtctr r7
+ bne 5f
+1: lwz r7,-4(r4)
+ lwzu r8,-8(r4)
+ stw r7,-4(r6)
+ stwu r8,-8(r6)
+ bdnz 1b
+ andi. r5,r5,7
+2: cmplwi 0,r5,4
+ blt 3f
+ lwzu r0,-4(r4)
+ subi r5,r5,4
+ stwu r0,-4(r6)
+3: cmpwi 0,r5,0
+ beqlr
+ mtctr r5
+4: lbzu r0,-1(r4)
+ stbu r0,-1(r6)
+ bdnz 4b
+ blr
+5: mtctr r0
+6: lbzu r7,-1(r4)
+ stbu r7,-1(r6)
+ bdnz 6b
+ subf r5,r0,r5
+ rlwinm. r7,r5,32-3,3,31
+ beq 2b
+ mtctr r7
+ b 1b
+
+ .globl memcmp
+memcmp:
+ cmpwi 0,r5,0
+ blelr
+ mtctr r5
+ addi r6,r3,-1
+ addi r4,r4,-1
+1: lbzu r3,1(r6)
+ lbzu r0,1(r4)
+ subf. r3,r0,r3
+ bdnzt 2,1b
+ blr
Added: trunk/yaboot/lib/strstr.c
===================================================================
--- trunk/yaboot/lib/strstr.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/strstr.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,119 @@
+/* Return the offset of one string within another.
+ Copyright (C) 1994, 1996, 1997 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. */
+
+/*
+ * My personal strstr() implementation that beats most other algorithms.
+ * Until someone tells me otherwise, I assume that this is the
+ * fastest implementation of strstr() in C.
+ * I deliberately chose not to comment it. You should have at least
+ * as much fun trying to understand it, as I had to write it :-).
+ *
+ * Stephen R. van den Berg, berg at pool.informatik.rwth-aachen.de */
+
+#include <string.h>
+
+typedef unsigned chartype;
+
+#undef strstr
+
+char *
+strstr (phaystack, pneedle)
+ const char *phaystack;
+ const char *pneedle;
+{
+ register const unsigned char *haystack, *needle;
+ register chartype b, c;
+
+ haystack = (const unsigned char *) phaystack;
+ needle = (const unsigned char *) pneedle;
+
+ b = *needle;
+ if (b != '\0')
+ {
+ haystack--; /* possible ANSI violation */
+ do
+ {
+ c = *++haystack;
+ if (c == '\0')
+ goto ret0;
+ }
+ while (c != b);
+
+ c = *++needle;
+ if (c == '\0')
+ goto foundneedle;
+ ++needle;
+ goto jin;
+
+ for (;;)
+ {
+ register chartype a;
+ register const unsigned char *rhaystack, *rneedle;
+
+ do
+ {
+ a = *++haystack;
+ if (a == '\0')
+ goto ret0;
+ if (a == b)
+ break;
+ a = *++haystack;
+ if (a == '\0')
+ goto ret0;
+shloop: }
+ while (a != b);
+
+jin: a = *++haystack;
+ if (a == '\0')
+ goto ret0;
+
+ if (a != c)
+ goto shloop;
+
+ rhaystack = haystack-- + 1;
+ rneedle = needle;
+ a = *rneedle;
+
+ if (*rhaystack == a)
+ do
+ {
+ if (a == '\0')
+ goto foundneedle;
+ ++rhaystack;
+ a = *++needle;
+ if (*rhaystack != a)
+ break;
+ if (a == '\0')
+ goto foundneedle;
+ ++rhaystack;
+ a = *++needle;
+ }
+ while (*rhaystack == a);
+
+ needle = rneedle; /* took the register-poor approach */
+
+ if (a == '\0')
+ break;
+ }
+ }
+foundneedle:
+ return (char*) haystack;
+ret0:
+ return 0;
+}
Added: trunk/yaboot/lib/strtol.c
===================================================================
--- trunk/yaboot/lib/strtol.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/strtol.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,140 @@
+/* Copyright (C) 1991, 1992, 1994, 1995 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., 675 Mass Ave,
+ Cambridge, MA 02139, USA. */
+
+/* Convert NPTR to an `unsigned long int' or `long int' in base BASE.
+ If BASE is 0 the base is determined by the presence of a leading
+ zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal.
+ If BASE is < 2 or > 36, it is reset to 10.
+ If ENDPTR is not NULL, a pointer to the character after the last
+ one converted is stored in *ENDPTR. */
+
+#include "ctype.h"
+
+int strtol (nptr, endptr, base)
+const char *nptr;
+char **endptr;
+int base;
+{
+ int negative;
+ register unsigned int cutoff;
+ register unsigned int cutlim;
+ register unsigned int i;
+ register const char *s;
+ register unsigned char c;
+ const char *save, *end;
+ int overflow;
+
+ if (base < 0 || base == 1 || base > 36)
+ base = 10;
+
+ save = s = nptr;
+
+ /* Skip white space. */
+ while (((unsigned char) *s) <= 32 && *s)
+ ++s;
+ if (*s == '\0')
+ goto noconv;
+
+ /* Check for a sign. */
+ if (*s == '-') {
+ negative = 1;
+ ++s;
+ } else if (*s == '+') {
+ negative = 0;
+ ++s;
+ } else
+ negative = 0;
+
+ if ((base == 16 && s[0] == '0' && (s[1] == 'X')) || (s[1] == 'x'))
+ s += 2;
+
+ /* If BASE is zero, figure it out ourselves. */
+ if (base == 0) {
+ if (*s == '0') {
+ if (s[1] == 'X' || s[1] == 'x') {
+ s += 2;
+ base = 16;
+ } else
+ base = 8;
+ } else
+ base = 10;
+ }
+
+ /* Save the pointer so we can check later if anything happened. */
+ save = s;
+
+ end = 0;
+
+ cutoff = 0x7FFFFFFF / (unsigned int) base;
+ cutlim = 0x7FFFFFFF % (unsigned int) base;
+
+ overflow = 0;
+ i = 0;
+ for (c = *s; c != '\0'; c = *++s) {
+ if (s == end)
+ break;
+ if (c >= '0' && c <= '9')
+ c -= '0';
+ else if (c >= 'A' && c <= 'Z')
+ c = c - 'A' + 10;
+ else if (c >= 'a' && c <= 'z')
+ c = c - 'a' + 10;
+ else
+ break;
+ if (c >= base)
+ break;
+ /* Check for overflow. */
+ if (i > cutoff || (i == cutoff && c > cutlim))
+ overflow = 1;
+ else {
+ i *= (unsigned int) base;
+ i += c;
+ }
+ }
+
+ /* Check if anything actually happened. */
+ if (s == save)
+ goto noconv;
+
+ /* Store in ENDPTR the address of one character
+ past the last character we converted. */
+ if (endptr)
+ *endptr = (char *) s;
+
+ if (overflow)
+ return negative ? (int) 0x80000000 : (int) 0x7FFFFFFF;
+
+ /* Return the result of the appropriate sign. */
+ return (negative ? -i : i);
+
+ noconv:
+ /* We must handle a special case here: the base is 0 or 16 and the
+ first two characters and '0' and 'x', but the rest are no
+ hexadecimal digits. This is no error case. We return 0 and
+ ENDPTR points to the `x`. */
+ if (endptr) {
+ if (save - nptr >= 2 && tolower (save[-1]) == 'x' && save[-2] == '0')
+ *endptr = (char *) &save[-1];
+ else
+ /* There was no number to convert. */
+ *endptr = (char *) nptr;
+ }
+
+ return 0L;
+}
Added: trunk/yaboot/lib/vsprintf.c
===================================================================
--- trunk/yaboot/lib/vsprintf.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/lib/vsprintf.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,396 @@
+/*
+ * linux/lib/vsprintf.c
+ *
+ * Copyright (C) 1991, 1992 Linus Torvalds
+ */
+
+/* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */
+/*
+ * Wirzenius wrote this portably, Torvalds fucked it up :-)
+ */
+
+#include <stdarg.h>
+#include <types.h>
+#include <string.h>
+#include <ctype.h>
+
+
+/**
+ * simple_strtoul - convert a string to an unsigned long
+ * @cp: The start of the string
+ * @endp: A pointer to the end of the parsed string will be placed here
+ * @base: The number base to use
+ */
+unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base)
+{
+ unsigned long result = 0,value;
+
+ if (!base) {
+ base = 10;
+ if (*cp == '0') {
+ base = 8;
+ cp++;
+ if ((*cp == 'x') && isxdigit(cp[1])) {
+ cp++;
+ base = 16;
+ }
+ }
+ }
+ while (isxdigit(*cp) &&
+ (value = isdigit(*cp) ? *cp-'0' : toupper(*cp)-'A'+10) < base) {
+ result = result*base + value;
+ cp++;
+ }
+ if (endp)
+ *endp = (char *)cp;
+ return result;
+}
+
+/**
+ * simple_strtol - convert a string to a signed long
+ * @cp: The start of the string
+ * @endp: A pointer to the end of the parsed string will be placed here
+ * @base: The number base to use
+ */
+long simple_strtol(const char *cp,char **endp,unsigned int base)
+{
+ if(*cp=='-')
+ return -simple_strtoul(cp+1,endp,base);
+ return simple_strtoul(cp,endp,base);
+}
+
+/**
+ * simple_strtoull - convert a string to an unsigned long long
+ * @cp: The start of the string
+ * @endp: A pointer to the end of the parsed string will be placed here
+ * @base: The number base to use
+ */
+unsigned long long simple_strtoull(const char *cp,char **endp,unsigned int base)
+{
+ unsigned long long result = 0,value;
+
+ if (!base) {
+ base = 10;
+ if (*cp == '0') {
+ base = 8;
+ cp++;
+ if ((*cp == 'x') && isxdigit(cp[1])) {
+ cp++;
+ base = 16;
+ }
+ }
+ }
+ while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp)
+ ? toupper(*cp) : *cp)-'A'+10) < base) {
+ result = result*base + value;
+ cp++;
+ }
+ if (endp)
+ *endp = (char *)cp;
+ return result;
+}
+
+/**
+ * simple_strtoll - convert a string to a signed long long
+ * @cp: The start of the string
+ * @endp: A pointer to the end of the parsed string will be placed here
+ * @base: The number base to use
+ */
+long long simple_strtoll(const char *cp,char **endp,unsigned int base)
+{
+ if(*cp=='-')
+ return -simple_strtoull(cp+1,endp,base);
+ return simple_strtoull(cp,endp,base);
+}
+
+static int skip_atoi(const char **s)
+{
+ int i=0;
+
+ while (isdigit(**s))
+ i = i*10 + *((*s)++) - '0';
+ return i;
+}
+
+#define ZEROPAD 1 /* pad with zero */
+#define SIGN 2 /* unsigned/signed long */
+#define PLUS 4 /* show plus */
+#define SPACE 8 /* space if plus */
+#define LEFT 16 /* left justified */
+#define SPECIAL 32 /* 0x */
+#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
+
+static char * number(char * str, long long num, int base, int size, int precision, int type)
+{
+ char c,sign,tmp[66];
+ const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";
+ int i;
+
+ if (type & LARGE)
+ digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ if (type & LEFT)
+ type &= ~ZEROPAD;
+ if (base < 2 || base > 36)
+ return 0;
+ c = (type & ZEROPAD) ? '0' : ' ';
+ sign = 0;
+ if (type & SIGN) {
+ if (num < 0) {
+ sign = '-';
+ num = -num;
+ size--;
+ } else if (type & PLUS) {
+ sign = '+';
+ size--;
+ } else if (type & SPACE) {
+ sign = ' ';
+ size--;
+ }
+ }
+ if (type & SPECIAL) {
+ if (base == 16)
+ size -= 2;
+ else if (base == 8)
+ size--;
+ }
+ i = 0;
+ if (num == 0)
+ tmp[i++]='0';
+ else while (num != 0)
+ {
+ int t = ((long long) num) % (unsigned int) base;
+ tmp[i++] = digits[t];
+ num = ((long long) num) / (unsigned int) base;
+ }
+ if (i > precision)
+ precision = i;
+ size -= precision;
+ if (!(type&(ZEROPAD+LEFT)))
+ while(size-->0)
+ *str++ = ' ';
+ if (sign)
+ *str++ = sign;
+ if (type & SPECIAL) {
+ if (base==8)
+ *str++ = '0';
+ else if (base==16) {
+ *str++ = '0';
+ *str++ = digits[33];
+ }
+ }
+ if (!(type & LEFT))
+ while (size-- > 0)
+ *str++ = c;
+ while (i < precision--)
+ *str++ = '0';
+ while (i-- > 0)
+ *str++ = tmp[i];
+ while (size-- > 0)
+ *str++ = ' ';
+ return str;
+}
+
+/**
+ * vsprintf - Format a string and place it in a buffer
+ * @buf: The buffer to place the result into
+ * @fmt: The format string to use
+ * @args: Arguments for the format string
+ *
+ * Call this function if you are already dealing with a va_list.
+ * You probably want sprintf instead.
+ */
+int vsprintf(char *buf, const char *fmt, va_list args)
+{
+ int len;
+ unsigned long long num;
+ int i, base;
+ char * str;
+ const char *s;
+
+ int flags; /* flags to number() */
+
+ int field_width; /* width of output field */
+ int precision; /* min. # of digits for integers; max
+ number of chars for from string */
+ int qualifier; /* 'h', 'l', or 'L' for integer fields */
+ /* 'z' support added 23/7/1999 S.H. */
+ /* 'z' changed to 'Z' --davidm 1/25/99 */
+
+
+ for (str=buf ; *fmt ; ++fmt) {
+ if (*fmt != '%') {
+ *str++ = *fmt;
+ continue;
+ }
+
+ /* process flags */
+ flags = 0;
+ repeat:
+ ++fmt; /* this also skips first '%' */
+ switch (*fmt) {
+ case '-': flags |= LEFT; goto repeat;
+ case '+': flags |= PLUS; goto repeat;
+ case ' ': flags |= SPACE; goto repeat;
+ case '#': flags |= SPECIAL; goto repeat;
+ case '0': flags |= ZEROPAD; goto repeat;
+ }
+
+ /* get field width */
+ field_width = -1;
+ if (isdigit(*fmt))
+ field_width = skip_atoi(&fmt);
+ else if (*fmt == '*') {
+ ++fmt;
+ /* it's the next argument */
+ field_width = va_arg(args, int);
+ if (field_width < 0) {
+ field_width = -field_width;
+ flags |= LEFT;
+ }
+ }
+
+ /* get the precision */
+ precision = -1;
+ if (*fmt == '.') {
+ ++fmt;
+ if (isdigit(*fmt))
+ precision = skip_atoi(&fmt);
+ else if (*fmt == '*') {
+ ++fmt;
+ /* it's the next argument */
+ precision = va_arg(args, int);
+ }
+ if (precision < 0)
+ precision = 0;
+ }
+
+ /* get the conversion qualifier */
+ qualifier = -1;
+ if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt =='Z') {
+ qualifier = *fmt;
+ ++fmt;
+ }
+
+ /* default base */
+ base = 10;
+
+ switch (*fmt) {
+ case 'c':
+ if (!(flags & LEFT))
+ while (--field_width > 0)
+ *str++ = ' ';
+ *str++ = (unsigned char) va_arg(args, int);
+ while (--field_width > 0)
+ *str++ = ' ';
+ continue;
+
+ case 's':
+ s = va_arg(args, char *);
+ if (!s)
+ s = "<NULL>";
+
+ len = strnlen(s, precision);
+
+ if (!(flags & LEFT))
+ while (len < field_width--)
+ *str++ = ' ';
+ for (i = 0; i < len; ++i)
+ *str++ = *s++;
+ while (len < field_width--)
+ *str++ = ' ';
+ continue;
+
+ case 'p':
+ if (field_width == -1) {
+ field_width = 2*sizeof(void *);
+ flags |= ZEROPAD;
+ }
+ str = number(str,
+ (unsigned long) va_arg(args, void *), 16,
+ field_width, precision, flags);
+ continue;
+
+
+ case 'n':
+ if (qualifier == 'l') {
+ long * ip = va_arg(args, long *);
+ *ip = (str - buf);
+ } else if (qualifier == 'Z') {
+ size_t * ip = va_arg(args, size_t *);
+ *ip = (str - buf);
+ } else {
+ int * ip = va_arg(args, int *);
+ *ip = (str - buf);
+ }
+ continue;
+
+ case '%':
+ *str++ = '%';
+ continue;
+
+ /* integer number formats - set up the flags and "break" */
+ case 'o':
+ base = 8;
+ break;
+
+ case 'X':
+ flags |= LARGE;
+ case 'x':
+ base = 16;
+ break;
+
+ case 'd':
+ case 'i':
+ flags |= SIGN;
+ case 'u':
+ break;
+
+ default:
+ *str++ = '%';
+ if (*fmt)
+ *str++ = *fmt;
+ else
+ --fmt;
+ continue;
+ }
+ if (qualifier == 'L') {
+ num = va_arg(args, unsigned long long);
+ if( flags & SIGN)
+ num = (signed long long) num;
+ } else if (qualifier == 'l') {
+ num = va_arg(args, unsigned long);
+ if (flags & SIGN)
+ num = (signed long) num;
+ } else if (qualifier == 'Z') {
+ num = va_arg(args, size_t);
+ } else if (qualifier == 'h') {
+ num = (unsigned short) va_arg(args, int);
+ if (flags & SIGN)
+ num = (signed short) num;
+ } else {
+ num = va_arg(args, unsigned int);
+ if (flags & SIGN)
+ num = (signed int) num;
+ }
+ str = number(str, num, base, field_width, precision, flags);
+ }
+ *str = '\0';
+ return str-buf;
+}
+
+/**
+ * sprintf - Format a string and place it in a buffer
+ * @buf: The buffer to place the result into
+ * @fmt: The format string to use
+ * @...: Arguments for the format string
+ */
+int sprintf(char * buf, const char *fmt, ...)
+{
+ va_list args;
+ int i;
+
+ va_start(args, fmt);
+ i=vsprintf(buf,fmt,args);
+ va_end(args);
+ return i;
+}
Added: trunk/yaboot/man/bootstrap.8
===================================================================
--- trunk/yaboot/man/bootstrap.8 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/man/bootstrap.8 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,272 @@
+.\" Hey Emacs! This file is -*- nroff -*- source.
+.\" NewWorld section written by Ethan Benson OldWorld section taken
+.\" from bootstrap(8) from the quik package.
+.\"
+.TH BOOTSTRAP 8 "28 April 2001" "GNU/Linux PowerPC" "System Manager's Manual"
+.SH NAME
+.B bootstrap
+\- Disk boot process for PowerMac GNU/Linux
+.SH DESCRIPTION
+This man page describes the \fBbootstrap\fR process for both OldWorld and
+NewWorld PowerMacs. OldWorld PowerMacs all have a hardware MacOS ROM
+and the case is beige in color. NewWorld PowerMacs do not have a hardware
+MacOS ROM, and are in colored, translucent cases. All G3s in colored
+cases are NewWorld, as are all G4s and later. This man page is
+divided into three sections, OLDWORLD, NEWWORLD, and IBM. Please read the
+section appropriate to your hardware.
+.SH OLDWORLD
+The process of booting PowerMac/Linux from a disk starts with Open
+Firmware loading the boot block from the first bootable partition of
+the boot disk into memory. The user specifies which device is to be
+the boot disk by setting the \fBboot-device\fR environment variable to
+the Open Firmware name of the boot disk, or by giving it as an
+explicit argument to the Open Firmware \fBboot\fR command. OldWorld
+PowerMacs typically do not require \fBbootstrap\fR partitions like
+NewWorld PowerMacs do.
+
+Open Firmware then transfers control to the first-stage bootstrap
+(\fBfirst.b\fR), located at the beginning of the boot block. The boot
+block also contains the list of block numbers for the second-stage
+bootstrap. \fBFirst.b\fR reads these blocks into memory, thus loading
+the second-stage bootstrap.
+
+The task of the second-stage bootstrap (\fBsecond.b\fR) is to load the
+Linux kernel into memory and pass it any arguments given by the user.
+\fBSecond.b\fR can also be used for loading other programs, such as
+diagnostic programs or other operating systems, as long as they are
+present as an ELF binary in an ext2 filesystem.
+
+\fBSecond.b\fR gets two string values from Open Firmware,
+called \fIbootpath\fR and \fIbootargs\fR. \fIBootpath\fR is the Open
+Firmware name of the boot disk (i.e., the device that the first-stage
+bootstrap was loaded from). If Open Firmware auto-booted, or if the
+\fBboot\fR command was given without arguments, then \fIbootpath\fR
+and \fIbootargs\fR are set to the values of the \fBboot-device\fR and
+\fBboot-file\fR variables, respectively. If the \fBboot\fR command
+was given with arguments, the first argument becomes \fIbootpath\fR
+and any subsequent arguments are saved in \fIbootargs\fR.
+
+\fBSecond.b\fR uses the Open Firmware input and output devices for
+communicating with the user. By default, the modem port is used for
+both, but this can be changed by setting the Open Firmware
+\fBinput-device\fR and \fBoutput-device\fR variables.
+
+\fBSecond.b\fR starts by printing a message to indicate
+that it has started, and then reads the configuration file. By
+default, the configuration file is \fB/etc/quik.conf\fR(5) on the same
+partition as the boot block, but this can be overridden with \fBquik\fR(8).
+The configuration file must be on the same disk as the boot block.
+The format of the configuration file is described in \fBquik.conf\fR(5).
+
+Then \fBsecond.b\fR prints its \fBboot:\fR prompt and waits for the
+user to type a command line. Normally the configuration file
+specifies a timeout, and if the user does not type anything within
+that period of time, \fBsecond.b\fR proceeds using the \fIbootargs\fR
+value as the command line. If the timeout value is 0, \fBsecond.b\fR
+will always use the \fIbootargs\fR value, ignoring anything the user
+types. This can be useful when a modem is connected to the
+modem port.
+
+Having obtained a command line, \fBsecond.b\fR takes the first word
+(whitespace-separated) as the name of the program to load. Any
+remaining words on the line become arguments to be passed to the
+program when it is loaded. If the command line is empty,
+\fBsecond.b\fR uses the value of the \fBdefault\fR keyword in the
+configuration file, or failing that, the first program specified in
+the configuration file.
+
+The configuration file can specify several alternative programs to
+load (referred to as \fIimages\fR in the configuration file syntax),
+along with shorthand labels for them and extra arguments to be
+prepended to those specified by the user. The program name given in
+the command line can be either an explicit path name or a shorthand
+label. If it is a shorthand label, the configuration file gives the
+corresponding path name.
+
+Path names are of the form
+
+.RS
+.RI [ device\fB: ][ partno ]\fB/ filepath
+.RE
+
+where \fIdevice\fR is the Open Firmware name of the disk, \fIpartno\fR
+is the (decimal) number of the partition on that disk, and
+\fIfilepath\fR is the path to the file in the ext2 filesystem on that
+partition. The default for \fIdevice\fR is \fIbootpath\fR, and the
+default for \fIpartno\fR is the first bootable partition on
+\fIdevice\fR. Alternatively, the \fB/\fIfilepath\fR section can be
+replaced by a span of 512-byte blocks to load using the syntax
+.BI [ start - end ]
+where \fIstart\fR and \fIend\fR are decimal block numbers.
+
+\fBSecond.b\fR will attempt to open the file identified by the path
+name and load it into memory as an ELF binary. If the file cannot be
+found, or if it is not an ELF binary, \fBsecond.b\fR will print an
+error message and print its \fBboot:\fR prompt again. In this case
+there is no timeout and \fBsecond.b\fR does not use the \fIbootargs\fR
+value.
+
+Once \fBsecond.b\fR has loaded the program into memory, it transfers
+control to it, passing it the list of arguments.
+.SH NEWWORLD
+The process of booting so called NewWorld PowerMacs from disk starts
+with OpenFirmware first attempting to execute the file specified in
+the \fIboot-device\fR variable. Unlike older versions of OpenFirmware
+the NewWorld version will not attempt to read a boot sector. By
+default OpenFirmware attempts to load a file with HFS file type
+\*(lqtbxi\*(rq in the \*(lqblessed\*(rq directory from each partition
+of each disk OpenFirmware is aware of, the first partition/disk that
+is found to be bootable is booted immediately.
+
+.BR Ybin (8)
+configures a \fBbootstrap\fR partition to pass all of OpenFirmware's
+tests to determine if the partition is considered to be bootable or
+not. The boot script is given file type \*(lqtbxi\*(rq and the root
+directory is marked as \*(lqblessed\*(rq, the blessing is important
+because OpenFirmware will immediately consider a partition unbootable
+if no directory is marked as blessed (you can still manually execute a
+loader such as \fByaboot\fR(8) with OpenFirmware even without a blessed
+directory but it will not happen automatically).
+
+The MacOS System Folder is always marked as blessed, this is required
+for MacOS as well as OpenFirmware. The MacOS System Folder also
+contains its own boot loader which has the tbxi file type, this makes
+installing \fByaboot\fR(8) onto a MacOS partition is difficult. The only way
+to install \fByaboot\fR(8) on a MacOS boot partition is to modify
+OpenFirmware to boot the CHRP script directly. Given this it is
+highly recommended that you create a dedicated \fBbootstrap\fR
+partition for \fByaboot\fR(8).
+
+Since OpenFirmware boots the first partition it finds to be bootable
+it is important that the \fBbootstrap\fR partition be first on the
+disk before any MacOS partition, otherwise MacOS will be booted
+instead of a dual boot menu used with \fByaboot\fR(8).
+
+The \fBbootstrap\fR partition should also NOT be mountable by MacOS,
+the reason is MacOS will (almost always) closely inspect any blessed
+directories to make sure its real MacOS, if it is not satisfied that
+the contents are a real copy of MacOS it will unbless the directory,
+resulting in OpenFirmware no longer considering it bootable. The best
+way to protect against this is to create the \fBbootstrap\fR partition
+with the partition type \*(lqApple_Bootstrap\*(rq which OpenFirmware
+accepts as a valid HFS partition, but MacOS will ignore and refuse to
+mount. The \fBbootstrap\fR partition need not be any larger then
+800K. 800K is the minimum size of an HFS filesystem, and is much more
+then enough for this purpose. You need not, and should not keep
+kernels on this partition, \fByaboot\fR(8) will load them from your
+ext2fs root partition just fine, as well as from any HFS or HFS+
+partitions (\fByaboot\fR(8) uses OpenFirmware's HFS+ filesystem support).
+
+To create the \fBbootstrap\fR partition, use GNU \fBparted\fR(8) or
+\fBmac-fdisk\fR(8) to create a partiton of type \*(lqApple_Bootstrap\*(rq.
+This is documented better in \fBmac-fdisks-basics\fR
+(http://penguinppc.org/usr/ybin/doc/mac-fdisk-basics.shtml).
+
+The \fBbootstrap\fR need not and should not be mounted anywhere on
+your filesystem, especially not on top of /boot. \fBYaboot\fR(8) is
+able to load the kernels from the ext2fs root partition so that is
+where they should be kept.
+
+OpenFirmware maintains a hierarchy of all the hardware it is aware of.
+To access or specify a boot device you must use the OpenFirmware path.
+For example: the path to a SCSI hard disk partition might look like
+this: /pci at 80000000/pci-bridge at d/ADPT,2930CU at 2/@2:2 . The first part,
+pci at 80000000, shows that the target device is accessed through the PCI
+bus. The next part is the PCI bridge, the next is the name of the SCSI host
+adapter installed (this name is provided by a BootROM on the card
+itself), and after that is the SCSI ID number. The colon delimits the
+device from partition specification, so the last 2 means the second
+partition of this device. After the partition number we can specify
+pathnames to files in two ways: lazy and absolute. The \*(lq,\*(rq delimits
+the OpenFirmware path from the location of the bootfile. \*(lq,\e\e:tbxi\*(rq
+specifies the file that has a HFS file type of
+\*(lqtbxi\*(rq in the blessed directory. If there is not blessed
+directory this will fail. The second is to specify a absolute
+pathname to an arbitrary file on the disk, example: 2:,yaboot would
+load the file named \*(lqyaboot\*(rq in the root directory of the
+filesystem. It is possible to load files in subdirectories but
+OpenFirmware does not always do this reliably, and any special
+characters such as an embedded space must be expressed like %20 (for a
+space) the directory separator used by OpenFirmware is the backslash
+\e. Example: 2:,\eboot\eyaboot. Determining the OpenFirmware path to
+a given device is unfortunately not a trivial task. If you are using
+the built in ATA hard disk you can use the alias \*(lqhd:\*(rq.
+
+\fBYbin\fR also includes a utility \fBofpath\fR(8) which can in most
+cases find the OpenFirmware device path from a unix device node (ie
+/dev/hda2).
+
+In addition to binary executables OpenFirmware can also execute a CHRP
+script. This is somewhat similar to a shell script. A CHRP script is
+useful to create simple boot menus, among other things. CHRP scripts
+are divided into sections in a way similar to HTML. Here is a basic
+example of a CHRP script used as a wrapper to \fByaboot\fR(8) (since
+OpenFirmware will only load a file with type \*(lqtbxi\*(rq if it is a
+CHRP script).
+.IP
+.nf
+<CHRP-BOOT>
+<COMPATIBLE>
+MacRISC
+</COMPATIBLE>
+<DESCRIPTION>
+GNU/Linux PowerPC bootloader
+</DESCRIPTION>
+<BOOT-SCRIPT>
+boot hd:,\\\\yaboot
+</BOOT-SCRIPT>
+</CHRP-BOOT>
+.fi
+.P
+The \fICOMPATIBLE\fR section defines what machines this script is
+compatible with, if the machine name encoded into the ROM does not
+match one of these entries OpenFirmware will print out a lot of
+incomprehensible junk and fail to load the script. The
+\fIDESCRIPTION\fR is ignored by OpenFirmware as far as I know. The
+\fIBOOT-SCRIPT\fR section is where arbitrary OpenFirmware Forth
+commands may go. They are executed the same way as you would enter
+them on the OpenFirmware command line. The entire script is wrapped
+with the \fICHRP-BOOT\fR tags so that such a script may be attached as
+a header to a binary file. Much more complicated and elaborate CHRP
+scripts are possible but that is beyond the scope of this document.
+
+\fBYbin\fR as of version 0.17 includes a more robust script that is
+automatically configured with the correct OpenFirmware paths based on
+/etc/yaboot.conf. This new script need not and should not be edited
+by the user.
+
+If you have G4 hardware then your OpenFirmware may already have a
+graphical boot selector built in. This selector can be accessed by
+holding down the option key when booting the machine. You should see
+a screen with buttons for each bootable partition. The current
+version (as of \fBybin\fR(8) 0.13) of ofboot includes a badge icon,
+the button with a penguin icon is your \fBbootstrap\fR partition. If
+you decide to use this built in selector you really do not need to use
+a CHRP script that provides a boot menu. Thanks to Nicholas Humfrey
+for creating the Badge icon.
+.SH IBM
+IBM hardware such as the RS/6000 require msdos style partition tables.
+In order to boot from the disk they require a type 0x41 PReP Boot
+\fBbootstrap\fR partition large enough to hold the bootloader
+(typically \fByaboot\fR(8)). The bootloader is copied onto the raw
+partition as there is no filesystem. This is done either with \fBdd\fR(1)
+or \fBmkofboot\fR(8).
+.SH BUGS
+OpenFirmware
+.SH AUTHORS
+\fBybin\fR, and the NEWWORLD, and IBM sections of this man page
+written by Ethan Benson <erbenson at alaska.net>
+.P
+The OLDWORLD section of this man page was taken from the \fBquik\fR(8)
+package, which was written by Paul Mackerras.
+.P
+.B yaboot
+was written by Benjamin Herrenschmidt <benh at kernel.crashing.org>.
+.SH SEE ALSO
+.BR dd (1),
+.BR mkofboot (8),
+.BR ofpath (8),
+.BR quik (8),
+.BR quik.conf (5),
+.BR yaboot (8),
+.BR ybin (8).
Added: trunk/yaboot/man/mkofboot.8
===================================================================
--- trunk/yaboot/man/mkofboot.8 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/man/mkofboot.8 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,208 @@
+.\" Hey Emacs! This file is -*- nroff -*- source.
+.\"
+.\" ybin (YaBoot INstaller) installs/updates the yaboot boot loader.
+.\" Copyright (C) 2000, 2001 Ethan Benson
+.\"
+.\" 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.
+.\"
+.TH MKOFBOOT 8 "21 November 2001" "GNU/Linux PowerPC" "System Manager's Manual"
+.SH NAME
+.B mkofboot
+\- format bootstrap partition and install the yaboot boot loader
+.SH SYNOPSIS
+.B mkofboot
+.RB [ \ \-b | \-\-boot\ \fIdevice\ ]
+.RB [ \ \-o | \-\-ofboot\ \fIof-path\ ]
+.RB [ \ \-i | \-\-install\ \fIboot-file\ ]
+.RB [ \ \-C | \-\-config\ \fIconfig-file\ ]
+.RB [ \ \-m | \-\-magicboot\ \fIchrp-file\ ]
+.RB [ \ \-\-filesystem\ \fIhfs | \fImsdos | \fIraw\ ]
+.RB [ \ \-\-nobless\ ]
+.RB [ \ \-M | \-\-mount\ ]
+.RB [ \ \-\-hide\ ]
+.RB [ \ \-\-protect\ ]
+.RB [ \ \-\-nonvram\ ]
+.RB [ \ \-\-force\ ]
+.RB [ \ \-v | \-\-verbose\ ]
+.RB [ \ \-\-debug\ ]
+.RB [ \ \-h | \-\-help\ ]
+.RB [ \ \-V | \-\-version\ ]
+.SH DESCRIPTION
+This manual page explains
+.B mkofboot
+the initial installer for the
+.BR yaboot (8)
+boot loader enabling GNU/Linux to be booted by OpenFirmware.
+
+.B mkofboot
+does exactly the same thing as
+.BR ybin (8)
+except that it erases and creates a new filesystem (specified by
+\-\-filesystem) on the \fBbootstrap\fR(8) partition before copying the
+boot loader files to it. See the
+.BR ybin (8)
+man page for more details on the installation process.
+
+The \fBbootstrap\fR(8) need not and should not be mounted anywhere on
+your filesystem, especially not on top of /boot. \fBYaboot\fR(8) is able
+to load the kernels from the ext2fs root partition so that is where
+they should be kept. \fBMkofboot\fR will refuse to operate on the
+\fBbootstrap\fR(8) partition if it is mounted.
+.SH OPTIONS
+NOTE:
+.B mkofboot
+uses the exact same command line options as
+.BR ybin (8)
+so if you have already read the \fBybin\fR(8) man page you can skip this
+section.
+.TP
+.BR \-b ,\ \-\-boot\ \fIdevice
+Install the boot loader onto the specified device. This device should
+be that of your \fBbootstrap\fR(8) partition. For example, if your
+\fBbootstrap\fR partition is located on your first primary IDE drive in the
+second partition, your device would be: \fI/dev/hda2\fR.
+.TP
+.BR \-o ,\ \-\-ofboot\ \fIof-path
+The OpenFirmware device path to the \fBbootstrap\fR(8) partition. This
+is needed so the first stage \fIofboot\fR loader can be configured
+properly. It should include the OpenFirmware path including the
+partition number (but not any filename). Example: if your
+\fBbootstrap\fR(8) partition is /dev/hda2, the OF path will likely be
+hd:2. As of \fBmkofboot\fR 0.18 you no longer are required to specify
+this option. If left undefined \fBmkofboot\fR will attempt to figure
+out the OpenFirmware path automatically using the \fBofpath\fR(8)
+utility. You should only need to define this option if
+\fBofpath\fR(8) fails.
+.TP
+.BR \-i ,\ \-\-install\ \fIboot-file
+Use \fIboot-file\fR as the primary boot loader executable, instead of
+the default\fI/usr/local/lib/yaboot/yaboot\fR(8).
+.TP
+.BR \-C ,\ \-\-config\ \fIconfig-file
+Use \fIconfig-file\fR as the \fBmkofboot\fR/\fByaboot\fR(8) configuration
+file instead of the default \fI/etc/yaboot.conf\fR.
+.TP
+.BR \-m ,\ \-\-magicboot\ \fIchrp-script
+Use \fIchrp-script\fR as the boot loader \*(lqwrapper\*(rq. This
+script is needed to either provide a boot menu for dual boot with
+MacOS or to load yaboot (due to an OpenFirmware bug).
+.TP
+.BR \-\-filesystem\ \fIhfs\fR|\fImsdos\fR|\fIraw\fR
+Set the filesystem type that \fBmkofboot\fR will create on the
+\fBbootstrap\fR(8). The \*(lqraw\*(rq filesystem type causes
+\fBmkofboot\fR to copy the bootloader (the value of \fIinstall=\fR
+directly to the \fBbootstrap\fR(8) partition without creating a
+filesystem. \*(lqraw\*(rq is required on IBM hardware. CAUTION: this
+will destroy any data or filesystem on the \fBbootstrap\fR(8)
+partition (value of \fIboot=\fR) if you specify something like
+\fIboot=/dev/sda\fR you will destroy the partition table and lose ALL
+data on the disk. The default is HFS.
+.TP
+.BR \-M ,\ \-\-mount
+Do not use the userspace
+.BR hfsutils (1)
+to modify the \fBbootstrap\fR(8), instead try and mount the filesystem
+directly. NOTE: Attributes cannot be set on the filesystem or the
+boot loader files using this method, your system will NOT be bootable
+without modifying OpenFirmware's \*(lqboot-device\*(rq variable to something
+like: \*(lqhd:2,ofboot\*(rq (no quotes).
+.TP
+.BR \-\-nobless
+Do not \*(lqbless\*(rq the root directory of the \fBbootstrap\fR(8)
+partition's filesystem. Only use this option if the \fBbootstrap\fR(8)
+partition is actually a MacOS boot partition. This option is ignored
+unless the filesystem is HFS, and is ignored when used with \-\-mount.
+.TP
+.BR \-\-hide
+.br
+Set the invisible bit on all the boot loader files once copied to the
+\fBbootstrap\fR(8) partition. This setting is useful if you must install
+the boot loader onto a MacOS boot partition and do not with to see the
+boot loader files cluttering up the MacOS root directory. This option
+is ignored unless the filesystem is HFS, and will not work
+with \-\-mount.
+.TP
+.BR \-\-protect
+Set the read-only bit on all boot loader files once copied to the
+\fBbootstrap\fR(8) partition. This setting is useful if you must install
+the bootloader onto a MacOS boot partition and want to discourage
+alterations/deletion of the boot loader. This option works for both
+HFS and MSDOS filesystems.
+.TP
+.BR \-\-nonvram
+Prevent \fBmkofboot\fR from setting the OpenFirmware boot-device
+variable with \fBnvsetenv\fR(8).
+.TP
+.BR \-v ,\ \-\-verbose
+This option causes \fBmkofboot\fR to be more verbose as it proceeds.
+.TP
+.BR \-f ,\ \-\-force
+This option suppresses any confirmation questions.
+.TP
+.BR \-\-debug
+This option causes \fBmkofboot\fR to output some boring details useful
+only for debugging \fBmkofboot\fR itself.
+.TP
+.BR \-h ,\ \-\-help
+Print out usage information and exit.
+.TP
+.BR \-V ,\ \-\-version
+Print out the version number and exit.
+.SH FILES
+.nf
+/usr/local/lib/yaboot/yaboot \- boot loader executable
+/usr/local/lib/yaboot/ofboot \- OpenFirmware boot script
+/etc/yaboot.conf \- boot loader/mkofboot configuration file
+.fi
+.SH ENVIRONMENT
+.TP
+.B TMPDIR
+.br
+The temporary directory \fBmkofboot\fR will use.
+.SH SECURITY
+Temporary files are created with
+.BR mktemp (1)
+it is important that your system use a secure
+.BR mktemp (1)
+program otherwise \fBmkofboot\fR will be vulnerable to race conditions.
+The Debian mktemp is derived from OpenBSD and thus should be secure.
+
+\fI/usr/local/lib/yaboot/ofboot\fR now contains code executed by /bin/sh (by
+\fBmkofboot\fR) it is thus critical that it not be writable by anyone
+but root. It is also critical that \fI/etc/yaboot.conf\fR not be
+writable by anyone but root since a different \fIofboot\fR script could be
+specified there.
+.SH BUGS
+.B Mkofboot
+should be able to take care of OpenFirmware variables as needed on IBM
+hardware.
+.SH AUTHORS
+.BR mkofboot (8)
+, and this man page written by Ethan Benson.
+.br
+.BR yaboot (8)
+was written by Benjamin Herrenschmidt.
+.SH REPORTING BUGS
+Report bugs to <erbenson at alaska.net>
+.SH SEE ALSO
+.BR bootstrap (8),
+.BR hfsutils (1),
+.BR mkofboot (8),
+.BR mktemp (1),
+.BR mount (8),
+.BR nvsetenv (8),
+.BR ofpath (8),
+.BR yaboot (8),
+.BR yaboot.conf (5).
Added: trunk/yaboot/man/ofpath.8
===================================================================
--- trunk/yaboot/man/ofpath.8 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/man/ofpath.8 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,87 @@
+.\" Hey Emacs! This file is -*- nroff -*- source.
+.\"
+.\" ofpath: determine OpenFirmware path from unix device node
+.\" Copyright (C) 2000, 2001 Ethan Benson
+.\"
+.\" Portions based on show_of_path.sh:
+.\"
+.\" Copyright (C) 2000 Olaf Hering <olh at 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.
+.\"
+.TH OFPATH 8 "27 May 2001" "GNU/Linux PowerPC" "System Manager's Manual"
+.SH NAME
+.B ofpath
+\- determine OpenFirmware path from unix device node.
+.SH SYNOPSIS
+.B ofpath
+.RB [ \ \-\-debug\ ]
+.RB [ \ \-h | \-\-help\ ]
+.RB [ \ \-V | \-\-version\ ]
+.IB FILE
+.SH DESCRIPTION
+This manual page explains
+.BR ofpath ,
+the utility used to find the OpenFirmware device path corresponding to
+a unix device node, such as \fI/dev/hda2\fR.
+
+.B ofpath
+will work on NewWorld PowerMacs only if yaboot is used as the
+bootloader. It will \fInot\fR work on NewWorld macs booted with BootX.
+
+.B ofpath
+will also work on some OldWorld PowerMacs. Unlike NewWorld, it will
+work on BootX-booted OldWorld machines. Note that OldWorld support is
+not well tested and may not give accurate results.
+
+\fBYbin\fR(8) uses this utility to automatically convert unix device
+nodes to OpenFirmware paths as needed.
+.SH OPTIONS
+.TP
+.BR \-\-debug
+This option causes \fBofpath\fR to output some boring details useful
+only for debugging \fBofpath\fR itself.
+.TP
+.BR \-h ,\ \-\-help
+Print out usage information and exit.
+.TP
+.BR \-V ,\ \-\-version
+Print out the version number and exit.
+
+.SH BUGS
+.B Ofpath
+may not accurately find all SCSI devices, and does not support all
+SCSI adapters/drivers.
+
+.B Ofpath
+also does not support all IDE devices.
+
+.B Ofpath
+does not support IBM hardware. Send a tarball of /proc/device-tree
+along with /proc/cpuinfo to <erbenson at alaska.net>
+.SH AUTHORS
+.B Ofpath
+is based on show_of_path.sh written by Olaf Hering, it was
+rewritten to work with /bin/ash and stripped down systems such as
+boot/rescue floppies by Ethan Benson. This man page was written by
+Ethan Benson.
+.SH REPORTING BUGS
+Report bugs to <erbenson at alaska.net>
+.SH SEE ALSO
+.BR bootstrap (8),
+.BR mkofboot (8),
+.BR yaboot (8),
+.BR yaboot.conf (5),
+.BR ybin (8).
Added: trunk/yaboot/man/yaboot.8
===================================================================
--- trunk/yaboot/man/yaboot.8 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/man/yaboot.8 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,131 @@
+.\" Hey Emacs! This file is -*- nroff -*- source.
+.\"
+.TH YABOOT 8 "21 November 2001" "GNU/Linux PowerPC" "System Manager's Manual"
+.SH NAME
+.B yaboot
+\- PowerMac OpenFirmware boot loader
+.SH SYNOPSIS
+.B Yaboot
+is an OpenFirmware ELF executable that bootstraps the Linux kernel.
+.SH DESCRIPTION
+This manual page explains the \fByaboot\fR OpenFirmware boot loader.
+
+.B yaboot
+is \fInot\fR a Linux or MacOS executable file. Attempting to execute
+\fByaboot\fR from a Linux shell will only result in a Segmentation
+Fault. \fByaboot\fR is meant to be executed only by OpenFirmware.
+
+.B yaboot
+is executed from OpenFirmare in the following manner:
+.I boot hd:2,yaboot
+where \fIhd:\fR is the OpenFirmware path for the hard disk, and the
+\fI2\fR is the partition number \fByaboot\fR is located on. In this
+example, the hard disk path is actually an OpenFirmware alias which is
+present on all NewWorld powermacs. It usually points to the internal
+ATA hard disk. If you have a SCSI disk, then you might execute
+\fByaboot\fR with this command:
+.I boot /pci at 80000000/pci-bridge at d/ADPT,2930CU at 2/@1:2,yaboot
+This path will vary depending on what kind of SCSI host adapter you
+have. For a more detailed explanation of OpenFirmware's [disgusting]
+paths, see man \fBbootstrap\fR(8). On IBM hardware \fByaboot\fR is
+directly copied to the \fBbootstrap\fR(8) partition raw, without any
+filesystem. OpenFirmare will boot from a type 0x41 PReP Boot parition
+marked bootable, this must contain \fByaboot\fR. On IBM hardware the
+config file is read directly from the root filesystem. On PowerMac
+hardware it must be present on the \fBbootstrap\fR(8) partition but
+.BR ybin (8)
+will take care of that.
+
+Fortunately you do not normally have to execute \fByaboot\fR manually.
+If you have partitioned your disk with a \fBbootstrap\fR(8) partition
+and used \fBybin\fR(8) to install \fByaboot\fR then you will not have
+to execute \fByaboot\fR yourself. (If this does not work you can also
+set the \fIboot-device\fR variable in OpenFirmware to have it boot
+automatically, see man \fBbootstrap\fR(8).)
+
+Once \fByaboot\fR has been executed by OpenFirmware it will display a
+\fIboot:\fR prompt where you may enter a label for a kernel image
+defined in \fByaboot.conf\fR(5). If there is no kernel image defined
+in \fByaboot.conf\fR(5) you can still boot an arbitrary image by
+specifying its absolute OpenFirmware path, similar to the above
+commands for executing \fByaboot\fR itself. Simply omit the \fIboot\fR
+command and enter only the pathname. (See EXAMPLES below)
+
+When booting an image (either as a predefined label or absolute path)
+any arguments are passed to the image. For example:
+.I boot: linux root=/dev/hda3
+which would pass the argument \fIroot=/dev/hda3\fR to the kernel.
+
+.B yaboot
+should preferably be installed on a dedicated \fBbootstrap\fR(8)
+partition (type Apple_Bootstrap for PowerMacs, type 0x41 PReP Boot for
+IBM hardware). This allows the partition to be modified in such a way
+that OpenFirmare will load \fByaboot\fR or a boot menu automatically
+with a default OF configuration. If \fByaboot\fR cannot be installed
+on a \fBbootstrap\fR(8) partition it can be installed on the root of a
+MacOS boot partition instead. \fByaboot\fR however should not be
+installed in a subdirectory of the MacOS filesystem as this is less
+reliable and more difficult to execute from OpenFirmware. See the
+\fBybin\fR(8) man page for more details on installing \fByaboot\fR
+(\fBybin\fR(8) is a utility for installing \fByaboot\fR with minimal
+difficulty).
+
+The \fByaboot.conf\fR(5) file must be next to the yaboot executable on
+the \fBbootstrap\fR(8) partition. \fBybin\fR(8) will take care of this.
+
+OpenFirmware may be accessed by holding down the \fIcommand, option,
+o, f\fR keys immediately upon power-up.
+
+OpenFirmware's settings may be reset to default values by holding down
+the \fIcommand, option, p, r\fR keys while cold booting.
+
+If you have G4 hardware then your OpenFirmware may already have a
+graphical boot selector built in. This selector can be accessed by
+holding down the option key when booting the machine. You should see
+a screen with buttons for each bootable partition. The current
+version (included with \fBybin\fR(8) 0.13) of ofboot includes a
+badge icon, the button with a penguin icon is your \fBbootstrap\fR(8)
+partition. Thanks to Nicholas Humfrey for creating the Badge icon.
+
+The \fBbootstrap\fR(8) need not and
+.B should not
+be mounted anywhere on your filesystem, especially not on top of /boot. \fBYaboot\fR is able
+to load the kernels from the ext2fs root partition so that is where
+they should be kept.
+.SH EXAMPLES
+boot \fByaboot\fR from internal ATA disk, partition 2:
+
+.I boot hd:2,yaboot
+
+boot \fByaboot\fR from partition 2 of a disk with SCSI ID 2 attached to a
+Adaptec 2930 SCSI Host adapter (this is on a rev1 blue G3, it may vary
+on other models):
+
+.I boot /pci at 80000000/pci-bridge at d/ADPT,2930CU at 2/@2:2,yaboot
+
+boot a kernel image located on partition number 3 of internal ATA
+disk (from \fByaboot's\fR \fIboot:\fR prompt):
+
+.I hd:3,/boot/vmlinux
+
+boot a kernel image located on partition 3 of SCSI disk ID 2 on a
+Adaptec 2930 Host adapter (from \fByaboot's\fR \fIboot:\fR prompt):
+
+.I /pci at 80000000/pci-bridge at d/ADPT,2930CU at 2/@2:3,/vmlinux
+.SH FILES
+.nf
+/etc/yaboot.conf \- boot loader configuration file
+.fi
+.SH BUGS
+OpenFirmware
+.SH AUTHORS
+This man page was written by Ethan Benson <erbenson at alaska.net>.
+.P
+.B yaboot
+was written by Benjamin Herrenschmidt <benh at kernel.crashing.org>.
+.SH REPORTING BUGS
+Bugs in \fByaboot\fR should be reported to Ethan Benson <erbenson at alaska.net>
+.SH SEE ALSO
+.BR bootstrap (8),
+.BR yaboot.conf (5),
+.BR ybin (8).
Added: trunk/yaboot/man/yaboot.conf.5
===================================================================
--- trunk/yaboot/man/yaboot.conf.5 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/man/yaboot.conf.5 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,643 @@
+.\" Copyright (c) 2001 Ethan Benson <erbenson at alaska.net>
+.\" Portions of this manual page from silo.conf documentation
+.\" Copyright (c) 1999 Jakub Jelinek <jakub at redhat.com>
+.\" Portions of this manual page from lilo.conf documentation
+.\" Copyright (c) 1992-1998 Werner Almesberger
+.\" This program is distributed according to the Gnu General Public License.
+.\" See the file COPYING in the ybin source distribution.
+.\"
+.TH YABOOT.CONF 5 "28 October 2001" "GNU/Linux PowerPC" "File Formats"
+.SH NAME
+.B yaboot.conf
+\- Configuration file format used by
+.BR yaboot (8)
+and
+.BR ybin (8).
+.SH SYNOPSIS
+.BI "/etc/yaboot.conf"
+.SH DESCRIPTION
+The \fByaboot.conf\fP file is a configuration file for \fByaboot\fP
+which is read during booting, and for \fBybin\fR(8) to generate a boot
+menu and to properly install \fByaboot\fP onto the \fBbootstrap\fP(8)
+partition.
+
+\fByaboot.conf\fP provides instructions for \fByaboot\fP. This
+includes which kernels to load and what options to pass to them.
+\fByaboot\fP reads and parses its configuration file found on the
+\fBbootstrap\fR(8) partition on PowerMacs, and directly from the root
+filesystem on IBM PowerPC hardware. On PowerMacs you must run the
+\fBybin\fR(8) command each time you modify \fB/etc/yaboot.conf\fR.
+
+\fByaboot\fP is able to boot kernels even without this configuration file or
+if this file is crippled or contains syntax errors, but the user has to
+enter full OpenFirmware names and full path of the images to load and all options
+required for them manually.
+.SH "FILE FORMAT"
+The file consists of comments and variable assignments.
+.TP
+Comments
+Start with a \fI#\fP character, and continue to
+the end of the line.
+.TP
+Flag variables
+Consist of a single keyword and are followed by whitespace
+or the end of the file.
+.TP
+String variables
+Consist of the variable name, optional whitespace, a
+\fI=\fP character, optional whitespace, the value and required
+newline. IMPORTANT: \fBybin\fR(8) specific options do not support
+embedded spaces. It is important that there be no trailing whitespace
+at the end of a line.
+.TP
+File names
+Some string variables are expecting file names. A file name format in \fByaboot\fP
+is:
+
+ [<devicename>][<part>]<absolute_pathname>
+
+ or
+
+ [<devicename>][<part>][\fB[\fP<m>\fB-\fP<n>\fB]\fP]
+
+The first form refers to a file or directory on some supported filesystem
+(currently \fIext2\fP, \fIhfs\fP, \fIhfs+\fP or \fIiso9660\fP), the latter
+refers to a range of 512B blocks on a device. For a device block range,
+either <devicename>, or <part>, or [<m>-<n>] must be given.
+
+Optional <devicename> is the OpenFirmware name of the device the file or range
+is located on. See below for its syntax. For OpenFirmware the device
+name must be immediately followed by the \fI:\fP character. The default is
+the boot device yaboot was booted from, or the value of \fIdevice=\fR
+in \fB/etc/yaboot.conf\fR.
+
+Optional <part> is the 1 based partition number on the device. First
+partition is 1 (e.g. on \fI/dev/sda\fP in Linux is this \fI/dev/sda1\fP).
+The default is the default partition (the value of the \fIpartition\fP
+variable in the config file). Note that on Apple partition tables the
+first partition is always the partition table itself (/dev/sda1 is the
+partition table).
+
+<absolute_pathname> must start with a \fI/\fP character and is the
+pathname from the root of the filesystem on that device (unless it is the
+root filesystem this is different to the pathname you will see in GNU/Linux).
+
+<m> is the first block number (in blocksize 512 bytes) of the range to
+be loaded and <n> is the last block number plus one.
+.TP
+Device name syntax is:
+
+ <fully_qualified_prom_device_name>[\fB:\fP<part_number>]
+
+where the fully qualified OpenFirmware device name starts with a
+\fI/\fP character for the root of the OpenFirmware device tree and
+contains all the nodes from the root in the tree up to the disk device
+node. If some node contains more than one child node with the same
+name and the path has to go through such node, a \fI@\fP character
+followed by hexadecimal address pair is desirable to resolve the
+ambiguity. Optional partition number is a number that follows the
+\fI:\fP character \fI1\fP (for first partition) \fI2\fP (for second,
+partition, etc). OpenFirmware device names might look like:
+
+ /pci at 80000000/pci-bridge at d/ADPT,2930CU at 2/@0:
+ /pci/@d/mac-io/ata-3 at 20000/disk at 1:
+ /pci/@d/pci-ata at 1/ata-4 at 0/disk at 0:
+ /pci/@d/pci-ata at 1/ata-4 at 0/disk at 1:
+
+OpenFirmware device names if specified as part of the file name (see above)
+should be followed by the \fI:\fP character to separate the device name from
+the optional Linux partition number, as shown above. For more information on
+this topic, consult
+.BR bootstrap (8).
+
+OpenFirmware also has some predefined aliases which are used instead
+of the longer canonical device names. Standard aliases include:
+
+ hd: - The primary master IDE hard disk.
+ ultra1: - The primary slave IDE hard disk.
+ cd: - The secondary master device (usually CDROM).
+ zip: - The secondary slave device (usually zip drive).
+.PP
+Variable names are case sensitive, values of string variables are also
+case sensitive.
+
+Blanks and equal signs may only be part of a variable name or a value if
+they are escaped by a backslash or if the value is embedded in double
+quotes. An equal sign may not be the only character in a name or value.
+
+An escaped tab is converted to an escaped blank. An escaped newline is
+removed from the input stream. An escaped backslash (i.e. two
+backslashes) is converted to a backslash. Inside quoted strings, only
+double quotes, backslashes and newlines can be escaped.
+
+Example:
+
+ # Simple yaboot.conf
+ boot=/dev/hda2
+ device=hd:
+ partition=3
+ magicboot=/usr/local/lib/yaboot/ofboot
+ timeout=50
+ root=/dev/hda3
+ read-only
+ # End of global variables - begin image labels
+ image=/boot/vmlinux
+ label=linux
+ image=/boot/vmlinux.old
+ label=old
+
+This file contains options for two distinct programs: the
+\fBybin\fR(8) (and \fBmkofboot\fR(8)) \fBbootstrap\fR(8) installer, and the
+\fByaboot\fR(8) bootloader, each ignores the other's configuration
+options.
+
+The \fBybin\fR/\fBmkofboot\fR options are:
+.B boot=
+.B ofboot=
+.B install=
+.B magicboot=
+.B delay=
+.B bsd=
+.B macos=
+.B macosx=
+.B darwin=
+.B defaultos=
+.B usemount
+.B mntpoint=
+.B fstype=
+.B hfstype=
+.B nobless
+.B hide
+.B protect
+.B nonvram
+.B enablecdboot
+.B enablenetboot
+.B enableofboot
+.B brokenosx
+
+The remaining options belong to \fByaboot\fR(8).
+.SH "GLOBAL OPTIONS"
+\fB/etc/yaboot.conf\fP begins with a possibly empty global options section.
+This section contains all variable assignments up to the first \fIimage\fP
+setting.
+
+The following global options are recognized:
+.TP
+.BI "boot=" boot-device
+Specifies the \fBbootstrap\fR(8) partition \fBybin\fR(8) will install
+the boot loader on. This partition needs to have an HFS or MSDOS
+filesystem created on it (except on IBM hardware). \fBybin\fR(8) will
+not create a filesystem. If a filesystem is not present run
+\fBmkofboot\fR(8) instead of \fBybin\fR(8) for the first time. The
+\fBbootstrap\fR(8) partition must have a partition type of
+Apple_Bootstrap to prevent MacOS[X] from mounting it. If MacOS is able
+to mount the \fBbootstrap\fR(8) partition it will make it unbootable
+by removing the attributes \fBybin\fR(8) set to make the partition
+bootable by OpenFirmware. The \fBbootstrap\fR partition must not be
+mounted anywhere on your filesystem, \fBybin\fR(8) and
+\fBmkofboot\fR(8) will refuse to operate on it if it is mounted. On
+IBM hardware the \fBbootstrap\fR(8) should be a type 0x41 PReP Boot
+partition.
+.TP
+.BI "ofboot=" of-path
+This option defines the OpenFirmware device path to the
+\fBbootstrap\fR(8) partition. This is needed so the first stage
+\fIofboot.b\fR loader can be configured properly. It should include
+the OpenFirmware path including the partition number (but not a
+filename). Example: if your bootstrap partition is /dev/hda2 the OF
+path will likely be hd:2. As of \fBybin\fR(8) 0.18 you no longer are
+required to (and should not) specify this option. If left undefined
+\fBybin\fR(8) will attempt to figure out the OpenFirmware path
+automatically using the \fBofpath\fR(8) utility. You should only need
+to define this option if \fBofpath\fR(8) fails.
+.TP
+.BI "install=" boot-loader
+Specifies the path to the \fByaboot\fR(8) OpenFirmware executable
+file. This file is copied by \fBybin\fR(8) to the \fBbootstrap\fR(8)
+partition. The default if this is not specified is
+\fI/usr/local/lib/yaboot/yaboot\fR or \fI/usr/lib/yaboot/yaboot\fR.
+.TP
+.BI "magicboot=" magicboot-script
+Specifies the path to an OpenFirmware CHRP script that \fBybin\fR(8)
+will copy to the \fBbootstrap\fR(8) partition. Such a script contains
+Forth commands that can allow you to do interesting things such as
+creating a boot menu to choose between MacOS or GNU/Linux. Currently
+you must use a magicboot script do to a bug in OpenFirmware.
+Eventually a CHRP header could be added to the \fByaboot\fR(8)
+executable so this can be optional. When this option is defined the
+magicboot script will be executed by OF automatically at boot (instead
+of the \fBinstall\fR file.) See man \fBbootstrap\fR(8) for more
+information on this. As of ybin 0.22 you should set this to
+/usr/local/lib/yaboot/ofboot which is a autoconfiguring first stage
+loader for yaboot. It is capable of presenting a dual boot menu for
+GNU/Linux, MacOS and MacOSX. If dual booting is not required or
+configured it will simply load yaboot directly. You must specify this
+for most PowerMacs or they will fail to boot. You cannot use
+magicboot scripts with IBM hardware.
+.TP
+.BI "default=" name
+Uses the specified image as the default boot image. If `default' is omitted,
+the image appearing first in the configuration file is used.
+.TP
+.BI "defaultos=" linux|bsd|macos|macosx|darwin
+Defines the default OS for the first stage multiboot menu to load, by
+default this is linux, which really means \fByaboot\fR.
+Valid values are: linux, bsd, macos, macosx, and
+darwin. This is only relevant if you have \fIbsd=\fR, \fImacos=\fR,
+\fImacosx=\fR, or \fIdarwin=\fR options defined.
+.TP
+.BI "message=" message_filename
+Specifies a file containing a message that is displayed before the
+boot prompt. You may specify either a plain pathname, in which case
+the default device and partition will be derived from the
+\fIdevice=\fR and \fIpartition=\fR lines in the global section of
+\fByaboot.conf\fR, or you can specify a full OpenFirmware device path,
+the file may be on any \fByaboot\fR(8) supported filesystem. The message
+file must be plain ASCII text with UNIX newlines. Note: only the
+first 2000 bytes of this file will be read.
+.TP
+.BI "password=" password
+Protect booting by a password. The password is given in either
+cleartext or an md5 hash (of the same format as used in GNU/Linux
+passwd files)in the configuration file. Because of that, the
+configuration file should be only readable by the superuser and the
+password should differ if possible from other passwords on the system.
+See
+.BR chmod (1)
+to set permissions on
+.BR yaboot.conf (5).
+Passwords currently do not affect the multiboot menu entries
+(\fImacos=\fR, \fImacosx=\fR, etc).
+.TP
+.BI "timeout=" tsecs
+Sets a timeout (in tenths of a second) for keyboard input. If no key is
+pressed for the specified time, the first image is automatically booted.
+.TP
+.BI "delay=" secs
+Sets a timeout (in seconds) for an OS choice in the first stage
+\fIofboot\fR loader. If no key is pressed for the specified time, the
+default OS defined by \fIdefaultos=\fR (or GNU/Linux) is automatically
+booted. If this is left unset, the value of \fItimeout=\fR (converted
+to seconds) will be used.
+.TP
+.BI "init-code=" string
+Specifies that \fByaboot\fR(8) should call OpenFirmware to
+execute the string given (a series of forth commands) before printing
+the boot prompt.
+.TP
+.BI "fgcolor=" string
+Specifies the foreground (text) color used by \fByaboot\fR(8) and the
+multiboot menu. Available colors are: black, blue, light-blue, green,
+light-green, cyan, light-cyan, red, light-red, purple, light-purple,
+brown, light-gray, dark-gray, yellow, and white. The default is white.
+.TP
+.BI "bgcolor=" string
+Specifies the background color used by \fByaboot\fR(8) and the
+mulitboot menu. Available colors are: black, blue, light-blue, green,
+light-green, cyan, light-cyan, red, light-red, purple, light-purple,
+brown, light-gray, dark-gray, yellow, and white. The default is
+black.
+.TP
+.BI "bsd=" of-path
+The OpenFirmware or Unix device path to a NetBSD or OpenBSD root
+partition, this partition must have the BSD kernel located at \fI/bsd\fR.
+You must also have the BSD bootloader
+\fIofwboot\fR installed at \fI/usr/local/lib/yaboot/ofwboot\fR,
+\fBybin\fR(8) will install this onto the \fBbootstrap\fR(8) partition.
+When you define this option you will be presented with a simple menu at
+bootup allowing you to hit L to boot GNU/Linux or B to boot BSD (along
+with other choices if configured). This will only work if you are
+using the new \fI/usr/local/lib/yaboot/ofboot\fR script. When this is
+set to a unix device node (ie \fI/dev/hda11\fR) then ybin will use the
+\fBofpath\fR(8) utility to determine the OpenFirmware device path.
+.TP
+.BI "macos=" of-path
+The OpenFirmware or Unix device path to a MacOS 8.* or 9.* boot
+partition. When you define this option you will be presented with a
+simple menu at bootup allowing you to hit L to boot GNU/Linux or M to
+boot MacOS (along with other choices if configured). This will only
+work if you are using the new \fI/usr/local/lib/yaboot/ofboot\fR
+script. When this is set to a unix device node (ie \fI/dev/hda11\fR)
+then ybin will use the \fBofpath\fR(8) utility to determine the
+OpenFirmware device path.
+.TP
+.BI "macosx=" of-path
+The OpenFirmware or unix device path to a MacOS X boot partition.
+When you define this option you will be presented with a simple menu
+at bootup allowing you to hit L to boot GNU/Linux or X to boot MacOSX
+(along with other choices if configured). This will only work if you
+are using the new \fI/usr/local/lib/yaboot/ofboot\fR script. When
+this is set to a unix device node (ie \fI/dev/hda11\fR) then ybin will
+use the \fBofpath\fR(8) utility to determine the OpenFirmware device
+path.
+.TP
+.B "brokenosx"
+This option causes the menu entry for MacOSX to execute
+\\System\\Library\\CoreServices\\BootX from the macosx=device instead
+of the usual \\\\:tbxi. This is necessary if OSX is installed onto an
+HFS+ filesystem instead of UFS. When OSX is installed on an HFS+
+filesystem MacOS will mount and debless the OSX partition. Add this
+option if the OSX menu entry breaks after booting MacOS. You should
+not use this option if OSX is installed on a UFS filesystem, for UFS
+installs you specify the OSX bootstrap partition which is protected
+against MacOS. This option requires \fImacosx=\fR to be set.
+.TP
+.BI "darwin=" of-path
+The OpenFirmware or unix device path to a Darwin boot partition.
+When you define this option you will be presented with a simple menu
+at bootup allowing you to hit L to boot GNU/Linux or D to boot Darwin
+(along with other choices if configured). This will only work if you
+are using the new \fI/usr/local/lib/yaboot/ofboot\fR script. When
+this is set to a unix device node (ie \fI/dev/hda11\fR) then ybin will
+use the \fBofpath\fR(8) utility to determine the OpenFirmware device
+path.
+.TP
+.B "enablecdboot"
+This option adds an entry to the multiboot menu to boot from the CDROM drive.
+.TP
+.B "enablenetboot"
+This option adds an entry to the multiboot menu to boot from the network.
+.TP
+.B "enableofboot"
+This option adds an entry to the multiboot menu to boot into an
+OpenFirmware prompt.
+.TP
+.B "usemount"
+This option causes \fBybin\fR to use the regular \fBmount\fR(8)
+utilities to access the filesystem on the \fBbootstrap\fR(8) partition
+instead of the userspace \fBhfsutils\fR(1). This is not recommended
+for HFS filesystems since it is not possible to set all the attributes
+required for automatic OpenFirmware booting. If you use this option
+you will have to modify OpenFirmware's boot-device variable to make
+your machine bootable (see man \fBbootstrap\fR(8)). Without this option
+you can normally reset OpenFirmware to its default configuration and
+your system will boot automatically into GNU/Linux. (See
+\fBbootstrap\fR(8) for details) This option is required for MSDOS
+filesystems.
+.TP
+.BI "mntpoint=" /path/to/directory
+Requires \fIusemount\fR this works exactly like usemount does except it
+does not mount the \fBbootstrap\fR(8) partition but rather installs the
+bootloader into the directory defined as the mountpoint. The pathname
+MUST be clean, ie no embedded spaces or metacharacters. The directory
+may not be more then one subdirectory deep from the root of the
+partition (not necessarily the unix /). You must not have a trailing
+/ either. This option is NOT recommended since it has the same
+limitations as usemount, your system will not be bootable by
+OpenFirmware, it will only be manually bootable or bootable if you
+change the boot-device variable to the direct pathname to the
+bootloader (which \fBybin\fR(8) will attempt to do). WARNING: This
+option is not secure if untrusted users can write to the value of
+\fImntpoint=\fR, and the filesystem supports links.
+.TP
+.BI "fstype=" hfs|msdos|raw
+Specifies what kind of filesystem is created on the \fBbootstrap\fR(8)
+partition by \fBmkofboot\fR(8). It must be either \fIhfs\fR or
+\fImsdos\fR or \fIraw\fR. For Apple PowerMacs HFS is the only
+workable option unless you have partitioned your disk with Intel
+partition tables. \fBYbin\fR(8) also uses this option to determine how
+to access the partition properly. The \fIraw\fR type causes
+\fBybin\fR(8) or \fBmkofboot\fR(8) to copy the bootloader (value of
+\fIinstall=\fR) to the \fBbootstrap\fR(8) partition without any
+filesystem. CAUTION: this will destroy any data or filesystem on the
+\fBbootstrap\fR(8) partition (value of \fIboot=\fR) if you specify
+something like \fIboot=/dev/sda\fR you will destroy the partition
+table and lose ALL data on the disk. The default if omitted, is hfs.
+.TP
+.BI "hfstype=" type-code
+Specifies the four character HFS type code that is given to the boot
+loader (or magicboot script). The default is \fItbxi\fR and should
+not be changed unless you really know what you are doing, OpenFirmware
+(on PowerMacs) looks for a file of this type to execute as a boot
+loader so if you change this your system will not boot automatically.
+This is only meant for users who must use a MacOS boot partition as
+the bootstrap partition, otherwise the conflict of two \fItbxi\fR
+files could potentially cause MacOS to fail to boot. This code is
+only given to the file intended for OpenFirmware to boot. This option
+is ignored on non-HFS filesystems.
+.TP
+.B "nobless"
+This prevents \fBybin\fR(8) from \*(lqblessing\*(rq the root directory of
+the \fBbootstrap\fR(8) partition. Blessing the root directory is required
+for OpenFirmware to boot correctly. This should only be used when a
+MacOS boot partition is being used as the \fBbootstrap\fR(8) in which case
+blessing the root directory would make MacOS unbootable. If you use
+this option you must manually configure OpenFirmware to boot
+\fByaboot\fR(8). (see \fBbootstrap\fR(8))
+.TP
+.B "hide"
+This causes \fBybin\fR(8) to set the HFS invisible bit on all the boot
+loader files. OpenFirmware ignores this bit, but MacOS will not show
+invisible files in the Finder. This is useful if the \fBbootstrap\fR(8)
+partition is MacOS mountable and you want to prevent annoying MacOS
+lusers from screwing up your GNU/Linux boot loader ;-). This option is
+ignored for non-HFS filesystems.
+.TP
+.B "protect"
+This causes \fBybin\fR(8) to set the HFS/MSDOS read-only bit on all the boot
+loader files. MacOS will not allow a read-only file to be modified or
+deleted (but does not prevent anyone from removing this bit) This is
+only useful if the \fBbootstrap\fR(8) partition is MacOS mountable and
+you want to discourage modification/deletion of the boot loader.
+.TP
+.B "nonvram"
+This option prevents \fBybin\fR(8) from setting the OpenFirmware
+boot-device variable with \fBnvsetenv\fR(8).
+.PP
+In addition to these global options, per-image options \fIappend\fP,
+\fIdevice\fP, \fIimage\fP, \fIinitrd-prompt\fP, \fIinitrd-size\fP,
+\fIinitrd\fP, \fIpartition\fP, \fIpause-after\fP, \fIpause-message\fP,
+\fIramdisk\fP, \fIread-only\fP, \fIread-write\fP, \fIroot\fP and
+\fIrestricted\fR can be specified in the global section. They are used
+as defaults if they aren't specified in the configuration sections of
+the respective kernel images and will be used also for the arbitrary
+images specified on the input line and not mentioned in the
+configuration file (unless overridden by input line options).
+.SH "PER-IMAGE SECTIONS"
+A per-image section starts with either a line
+
+ \fBimage=\fP\fIfilename\fP
+
+(for booting from files)
+From the \fIimage\fP line on until next \fIimage\fP line are variable
+assignments and flags for this image's section. The following options
+and flags are recognized:
+.TP
+.BI "label=" name
+The bootloader uses the main file name (without its path) of each image
+specification to identify that image. A different name can be used by
+setting the variable `label'.
+.TP
+.BI "alias=" name
+A second name for the same entry can be used by specifying an alias.
+.TP
+.BI "partition=" part_no
+Specifies the default partition number (a digit, hda1 is part_no 1) to
+be used if some filename does not specify a partition number
+explicitly. The kernel images should be located on the root
+filesystem, thus \fIpartition\fR should usually be set to the root
+partition number. For example if the root partition is /dev/hda3 (the
+third partition), then \fIpartition\fR should be set to
+\fIpartition=3\fR.
+.TP
+.BI "device=" device_name
+Specifies the default device name to be used if some filename does not
+specify a device name explicitly. This defaults to the device
+\fByaboot\fP has been booted from if you don't specify \fIdevice\fP in either
+the global section or per-image section of the config file.
+.TP
+.BI "append=" string
+Appends the options specified to the parameter line
+passed to the kernel. This is typically used to
+specify parameters of hardware that can't be
+entirely auto-detected or for which probing may be
+dangerous. Example:
+
+ append = "video=ofonly"
+.TP
+.BI "literal=" string
+Like `append', but removes all other options (e.g. setting of the root
+device). Because vital options can be removed unintentionally with
+`literal', this option cannot be set in the global options section.
+.TP
+.BI "ramdisk=" size
+This specifies the size of the optional RAM disk. A value of zero indicates
+that no RAM disk should be created. If this variable is omitted, the RAM
+disk size configured into the boot image is used.
+.TP
+.BI "read-only"
+This specifies that the root file system should be mounted read-only.
+Typically, the system startup procedure re-mounts the root file system
+read-write later (e.g. after fsck'ing it).
+.TP
+.BI "read-write"
+This specifies that the root file system should be mounted read-write.
+.TP
+.BI "root=" root-device
+This specifies the device that should be mounted as root.
+.TP
+.BI "initrd=" filename
+Specifies the file that will be loaded at boot time as the initial RAM disk.
+Example:
+
+ initrd=/images/initrd.img
+
+yaboot will not decompress the initial ramdisk, the Linux kernel will do that.
+If the initial ramdisk does not fit on one media (usually floppy), you can
+split it into several pieces and separate the filenames in the list by
+\fI|\fP characters. In this case, you have to provide a non-zero
+\fIinitrd-size\fP and, if the images reside on different medias,
+\fIinitrd-prompt\fP as well.
+Example (on the first floppy is initrd1.img, on the second initrd2.img
+always in the root directory and the sum of both image sizes is 1700000
+bytes):
+
+ initrd=/initrd1.img|/initrd2.img
+ initrd-size=1700000
+ initrd-prompt
+.TP
+.BI "initrd-size=" size
+When more than one initial ramdisk part is specified in the \fIinitrd\fP
+setting, this option is required to be the sum of sizes of all the images
+mentioned on that line, in bytes. It is required so that yaboot can reserve
+space for the image, even though size of some parts has not been determined
+yet.
+.TP
+.BI "initrd-prompt"
+If more than one initial ramdisk part is specified, wait for user pressing a
+key between loading the different images, so that the user can exchange
+media. This flag is needed if some initrd parts reside on the same device,
+but different removable media. On the other side, if you e.g. load one part
+from a floppy and the second part from a hard disk, such option is not
+needed (the question is who'd write something like that into yaboot.conf).
+.TP
+.BI "pause-after"
+If this flag is specified, yaboot will stop after loading the kernel (and
+initial ramdisks if specified) and ask the user to press a key before
+continuing.
+.TP
+.BI "pause-message=" string
+If \fIpause-after\fP is specified, this variable specifies the string to
+print to the user when asking him to press a key. The default is:
+
+ Press ENTER to continue.
+.TP
+.BI "sysmap=" filename
+Specifies the path for the System.map file that goes with the kernel
+image (\fIimage=\fR). This is for 2.4 kernels with a kernel debugger only.
+.TP
+.BI "single-key"
+Enables booting the image by hitting a single key when the cursor is at the
+first character in the input line, without the need to press <ENTER>
+afterwards. \fIsingle-key\fP requires that either the image's label or its
+alias (or both) is a single character. If you need to specify parameters for
+such an image, or if you want to boot some other image which happens to
+start with the same letter, then you need to start the input line with at
+least one space which will be removed before processing but will disable
+this single-key feature.
+.TP
+.BI "restricted"
+Restricted limits the ability to customize command line arguments.
+\fIrestricted\fR has no effect if \fIpassword=\fR is not specified.
+A password is only required to boot the image specified in
+\fB/etc/yaboot.conf\fP if parameters are specified on the command line
+or if the user enters an image that is not specified in the configuration
+file at all (arbitrary file load). For an image not including
+the \fIrestricted\fR keyword (unless \fIrestricted\fR is in the global
+section), the password will be required. If \fIrestricted\fR
+is in the global section, all boot labels act as above (duh:).
+.SH EXAMPLES
+Here is an example \fIyaboot.conf\fR file:
+.IP
+.nf
+boot=/dev/hda2
+device=hd:
+root=/dev/hda3
+partition=3
+timeout=20
+install=/usr/local/lib/yaboot/yaboot
+magicboot=/usr/local/lib/yaboot/ofboot
+fgcolor=black
+bgcolor=green
+default=Linux
+defaultos=linux
+password=secret
+
+image=/boot/vmlinux
+ label=Linux
+ read-only
+ restricted
+
+image=/boot/vmlinux.old
+ label=linux.old
+ read-only
+
+macos=hd:9
+macosx=/dev/hda10
+.fi
+.SH NOTES
+The format defined in this man page will not work with versions of
+\fByaboot\fR(8) older then 0.6. The color options only work with
+yaboot 1.0 and later.
+.SH BUGS
+Some
+.B yaboot
+options may not be implemented fully.
+.SH AUTHORS
+This man page was derived from \fBsilo.conf\fR(5) written by Jakub
+Jelinek and the SparcLinux team, and modified for
+\fByaboot\fR(8)/\fBybin\fR(8) by Ethan Benson.
+.P
+\fByaboot\fR(8) was written by Benjamin Herrenschmidt <benh at kernel.crashing.org>.
+.P
+\fBybin\fR(8) was written by Ethan Benson <erbenson at alaska.net>.
+.SH SEE ALSO
+.BR bootstrap (8),
+.BR chmod (1),
+.BR hfsutils (1),
+.BR mkofboot (8),
+.BR mount (8),
+.BR nvsetenv (8),
+.BR ofpath (8),
+.BR yaboot (8),
+.BR ybin (8).
Added: trunk/yaboot/man/yabootconfig.8
===================================================================
--- trunk/yaboot/man/yabootconfig.8 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/man/yabootconfig.8 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,141 @@
+.\" Hey Emacs! This file is -*- nroff -*- source.
+.\"
+.\" yabootconfig generates a simple /etc/yaboot.conf
+.\" Copyright (C) 2001 Ethan Benson
+.\"
+.\" 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.
+.\"
+.TH YABOOTCONFIG 8 "24 November 2001" "GNU/Linux PowerPC" "System Manager's Manual"
+.SH NAME
+.B yabootconfig
+\- generates a simple /etc/yaboot.conf
+.SH SYNOPSIS
+.B yabootconfig
+.RB [ \ \-t | \-\-chroot\ \\fIdirectory\ ]
+.RB [ \ \-b | \-\-boot\ \fIdevice\ ]
+.RB [ \ \-r | \-\-root\ \fIdevice\ ]
+.RB [ \ \-\-kernel-args\ \\fI"kernel_args"\ ]
+.RB [ \ \-q | \-\-quiet\ ]
+.RB [ \ \-\-noinstall\ ]
+.RB [ \ \-\-debug\ ]
+.RB [ \ \-h | \-\-help\ ]
+.RB [ \ \-V | \-\-version\ ]
+.SH DESCRIPTION
+This manual page explains
+.B yabootconfig
+the configurator for the
+.BR yaboot (8)
+boot loader enabling GNU/Linux to be booted by OpenFirmware.
+Specifically it inspects the running system, generates a working
+.BR /etc/yaboot.conf (5)
+and then runs \fBmkofboot\fR(8) to make the system bootable.
+
+.B yabootconfig
+requires an 800K bootstrap partition on the same disk as the root
+partition. It must be type \*(lqApple_Bootstrap\*(rq for PowerMacs,
+and type \*(lq0x41 PPC PReP Boot\*(rq for IBM CHRP hardware.
+
+The \fBbootstrap\fR(8) must not be mounted anywhere on your
+filesystem, especially not on top of /boot. \fBYaboot\fR is able to
+load the kernels from the ext2fs root partition so that is where they
+should be kept. \fBmkofboot\fR will refuse to operate on the
+\fBbootstrap\fR(8) partition if it is mounted.
+
+.B yabootconfig
+requires \fBofpath\fR(8) in order to get the OpenFirmware device name
+for the root disk on PowerMacs.
+.SH OPTIONS
+.TP
+.BR \-t ,\ \-\-chroot\ \fIdirectory
+Cause \fByabootconfig\fR to work as if \fIdirectory\fR is the /
+directory. This is useful when booting from a rescue floppy or CDROM
+in which case you mount your true root filesystem on /target or /mnt.
+\fByabootconfig\fR will generate \fI<chroot>/etc/yaboot.conf\fR and
+pass the \*(lq-C <chroot>/etc/yaboot.conf\*(rq arguments to \fBmkofboot\fR(8).
+Example: yabootconfig --chroot /target
+.TP
+.BR \-r ,\ \-\-root\ \fIdevice
+Normally \fByabootconfig\fR will automatically determine the root
+partition by inspecting \fI<chroot>/etc/fstab\fR(5). This option
+forces it to use \fIdevice\fR instead of auto-detecting it. This
+option is only intended to be used by distribution installers which
+should already know with absolute certainty what the root partition
+device is.
+.TP
+.BR \-b ,\ \-\-boot\ \fIdevice
+Normally \fByabootconfig\fR will automatically find your
+\fBbootstrap\fR partition, this option forces it to use \fIdevice\fR
+instead of auto-detecting it. This option is only intended to be used
+by distribution installers which should already know with absolute
+certainty what the \fBbootstrap\fR partition device is. The
+\fBbootstrap\fR partition is where \fBmkofboot\fR(8) will install the
+bootloader onto, this device should be that of your \fBbootstrap\fR(8)
+partition. For example, if your \fBbootstrap\fR partition is located
+on your first primary IDE drive in the second partition, your device
+would be: \fI/dev/hda2\fR. IMPORTANT: The \fBbootstrap\fR partition
+WILL BE ERASED when \fByabootconfig\fR runs \fBmkofboot\fR(8).
+.TP
+.BR \-\-kernel\-args
+This option allows you to specify additional kernel arguments which
+will be placed in an \fIappend=\fR configuration variable in
+\fI/etc/yaboot.conf\fR(5). You must quote the arguments you supply to this
+option. Example: --kernel-args "video=ofonly"
+.TP
+.BR \-q ,\ \-\-quiet
+Normally \fByabootconfig\fR will ask permission and explain what it is
+about to do before proceeding, this option prevents \fByabootconfig\fR
+from asking any questions or displaying any informational messages
+except errors. This option also prevents \fByabootconfig\fR from
+interactively asking the user to locate a kernel image if it fails to
+find one in the standard locations. This option is only intended to
+be used by distribution installers which may run \fByabootconfig\fR in
+the background in order to make the disk bootable after OS installation.
+.TP
+.BR \-\-noinstall
+Normally \fByabootconfig\fR will automatically run \fBmkofboot\fR(8)
+after it successfully generates a valid
+\fI<chroot>/etc/yaboot.conf\fR. This option causes \fByabootconfig\fR
+to only generate the config file without installing the \fBbootstrap\fR.
+.TP
+.BR \-\-debug
+This option causes \fByabootconfig\fR to output some boring details useful
+only for debugging \fByabootconfig\fR itself.
+.TP
+.BR \-h ,\ \-\-help
+Print out usage information and exit.
+.TP
+.BR \-V ,\ \-\-version
+Print out the version number and exit.
+.SH FILES
+.nf
+/etc/fstab \- static information about the filesystems
+.br
+/etc/yaboot.conf \- bootloader/ybin configuration file
+.fi
+.SH AUTHORS
+.B yabootconfig
+and this man page was written by Ethan Benson.
+.br
+.B yaboot
+was written by Benjamin Herrenschmidt.
+.SH REPORTING BUGS
+Report bugs to <erbenson at alaska.net>
+.SH SEE ALSO
+.BR bootstrap (8),
+.BR fstab (5),
+.BR mkofboot (8),
+.BR ofpath (8),
+.BR yaboot (8),
+.BR yaboot.conf (5),
Added: trunk/yaboot/man/ybin.8
===================================================================
--- trunk/yaboot/man/ybin.8 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/man/ybin.8 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,221 @@
+.\" Hey Emacs! This file is -*- nroff -*- source.
+.\"
+.\" ybin (YaBoot INstaller) installs/updates the yaboot boot loader.
+.\" Copyright (C) 2000, 2001 Ethan Benson
+.\"
+.\" 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.
+.\"
+.TH YBIN 8 "21 November 2001" "GNU/Linux PowerPC" "System Manager's Manual"
+.SH NAME
+.B ybin
+\- install the yaboot boot loader to a bootstrap partition.
+.SH SYNOPSIS
+.B ybin
+.RB [ \ \-b | \-\-boot\ \fIdevice\ ]
+.RB [ \ \-o | \-\-ofboot\ \fIof-path\ ]
+.RB [ \ \-i | \-\-install\ \fIboot-file\ ]
+.RB [ \ \-C | \-\-config\ \fIconfig-file\ ]
+.RB [ \ \-m | \-\-magicboot\ \fIchrp-file\ ]
+.RB [ \ \-\-filesystem\ \fIhfs | \fImsdos | \fIraw\ ]
+.RB [ \ \-\-nobless\ ]
+.RB [ \ \-M | \-\-mount\ ]
+.RB [ \ \-\-hide\ ]
+.RB [ \ \-\-protect\ ]
+.RB [ \ \-\-nonvram\ ]
+.RB [ \ \-\-force\ ]
+.RB [ \ \-v | \-\-verbose\ ]
+.RB [ \ \-\-debug\ ]
+.RB [ \ \-h | \-\-help\ ]
+.RB [ \ \-V | \-\-version\ ]
+.SH DESCRIPTION
+This manual page explains
+.B ybin
+the installer for the
+.BR yaboot (8)
+boot loader enabling GNU/Linux to be booted by OpenFirmware.
+Specifically it copies the
+.B yaboot
+binary and
+.BR yaboot.conf (5)
+and usually a \*(lqmagicboot\*(rq script to a
+.BR bootstrap (8)
+partition.
+
+.B Ybin
+will set attributes on the boot loader files and to the
+.BR bootstrap (8)
+partition itself to allow OpenFirmware to recognise it as bootable,
+[usually] without requiring alterations to OpenFirmware's configuration.
+
+.B Ybin
+will also set the OpenFirmware boot-device variable to the device path
+of the \fBbootstrap\fR(8) partition using \fBnvsetenv\fR(8) when a
+NewWorld compatible version of \fBnvsetenv\fR(8) is available.
+
+.B Ybin
+requires that the
+.BR bootstrap (8)
+partition have an HFS filesystem already on it. For IBM
+hardware there is no filesystem on the \fBbootstrap\fR(8) partition,
+in this case use fstype=raw. When using the raw filesystem type
+\fBybin\fR requires that an ELF binary have already been installed on
+the \fBbootstrap\fR(8) partition. Use the companion
+.BR mkofboot (8)
+utility to install the boot loader onto a new
+.BR bootstrap (8)
+partition.
+
+The \fBbootstrap\fR(8) need not and should not be mounted anywhere on
+your filesystem, especially not on top of /boot. \fBYaboot\fR is able
+to load the kernels from the ext2fs root partition so that is where
+they should be kept. \fBYbin\fR will refuse to operate on the
+\fBbootstrap\fR(8) partition if it is mounted.
+.SH OPTIONS
+.TP
+.BR \-b ,\ \-\-boot\ \fIdevice
+Install the boot loader onto the specified device, this device should
+be that of your \fBbootstrap\fR(8) partition. For example, if your
+\fBbootstrap\fR partition is located on your first primary IDE drive in the
+second partition, your device would be: \fI/dev/hda2\fR.
+.TP
+.BR \-o ,\ \-\-ofboot\ \fIof-path
+The OpenFirmware device path to the \fBbootstrap\fR(8) partition. This
+is needed so the first stage \fIofboot\fR loader can be configured
+properly. It should include the OpenFirmware path including the
+partition number (but not any filename). Example: if your
+\fBbootstrap\fR(8) partition is /dev/hda2 the OF path will likely be
+hd:2. As of \fBybin\fR 0.18 you no longer are required to specify this
+option, if left undefined ybin will attempt to figure out the
+OpenFirmware path automatically using the \fBofpath\fR(8) utility.
+You should only need to define this option if \fBofpath\fR(8) fails.
+.TP
+.BR \-i ,\ \-\-install\ \fIboot-file
+Use \fIboot-file\fR as the primary boot loader executable, instead of
+the default \fI/usr/local/lib/yaboot/yaboot\fR.
+.TP
+.BR \-C ,\ \-\-config\ \fIconfig-file
+Use \fIconfig-file\fR as the \fBybin\fR/\fByaboot\fR(8) configuration
+file instead of the default \fI/etc/yaboot.conf\fR.
+.TP
+.BR \-m ,\ \-\-magicboot\ \fIchrp-script
+Use \fIchrp-script\fR as the boot loader \*(lqwrapper\*(rq. This
+script is needed to either provide a boot menu for dual boot with
+MacOS or to load yaboot (due to an OpenFirmware bug).
+.TP
+.BR \-\-filesystem\ \fIhfs\fR|\fImsdos\fR|\fIraw
+Set the filesystem type that \fBybin\fR expects to find on the
+\fBbootstrap\fR(8). The \*(lqraw\*(rq filesystem type causes \fBybin\fR
+to copy the bootloader (the value of \fIinstall=\fR directly to the
+\fBbootstrap\fR(8) partition without creating a filesystem.
+\*(lqraw\*(rq is required on IBM hardware. CAUTION: this will destroy any data or
+filesystem on the bootstrap partition (value of \fIboot=\fR) if you
+specify something like \fIboot=/dev/sda\fR you will destroy the
+partition table and lose ALL data on the disk. The default is HFS.
+.TP
+.BR \-M ,\ \-\-mount
+Do not use the userspace
+.BR hfsutils (1)
+to modify the \fBbootstrap\fR(8), instead try and mount the filesystem
+directly. NOTE: Attributes cannot be set on the filesystem or the
+boot loader files using this method, your system will NOT be bootable
+without modifying OpenFirmware's \*(lqboot-device\*(rq variable to
+something like: \*(lqhd:2,ofboot\*(rq (no quotes).
+.TP
+.BR \-\-nobless
+Do not \*(lqbless\*(rq the root directory of the \fBbootstrap\fR(8)
+partition's filesystem. Only use this option if the \fBbootstrap\fR(8)
+partition is actually a MacOS boot partition. This option is ignored
+unless the filesystem is HFS, and is ignored when used with \-\-mount.
+.TP
+.BR \-\-hide
+.br
+Set the invisible bit on all the boot loader files once copied to the
+\fBbootstrap\fR(8) partition. This setting is useful if you must install
+the boot loader onto a MacOS boot partition and do not with to see the
+boot loader files cluttering up the MacOS root directory. This option
+is ignored unless the filesystem is HFS, and will not work with
+\-\-mount.
+.TP
+.BR \-\-protect
+Set the read-only bit on all boot loader files once copied to the
+\fBbootstrap\fR(8) partition. This setting is useful if you must install
+the bootloader onto a MacOS boot partition and want to discourage
+alterations/deletion of the boot loader. This option works for both
+HFS and MSDOS filesystems.
+.TP
+.BR \-\-nonvram
+Prevent \fBybin\fR from setting the OpenFirmware boot-device
+variable with \fBnvsetenv\fR(8).
+.TP
+.BR \-v ,\ \-\-verbose
+This option causes \fBybin\fR to be more verbose as it proceeds.
+.TP
+.BR \-f ,\ \-\-force
+This option suppresses any confirmation questions.
+.TP
+.BR \-\-debug
+This option causes \fBybin\fR to output some boring details useful
+only for debugging \fBybin\fR itself.
+.TP
+.BR \-h ,\ \-\-help
+Print out usage information and exit.
+.TP
+.BR \-V ,\ \-\-version
+Print out the version number and exit.
+.SH FILES
+.nf
+/usr/local/lib/yaboot/yaboot \- boot loader executable
+/usr/local/lib/yaboot/ofboot \- OpenFirmware boot script
+/etc/yaboot.conf \- boot loader/ybin configuration file
+.fi
+.SH ENVIRONMENT
+.TP
+.B TMPDIR
+.br
+The temporary directory \fBybin\fR will use.
+.SH SECURITY
+Temporary files are created with
+.BR mktemp (1).
+It is important that your system use a secure
+.BR mktemp (1)
+program, otherwise \fBybin\fR will be vulnerable to race conditions.
+The Debian mktemp is derived from OpenBSD and thus should be secure.
+
+\fI/usr/local/lib/yaboot/ofboot\fR now contains code executed by /bin/sh (by
+\fBybin\fR). It is thus critical that it not be writable by anyone but
+root. It is also critical that \fI/etc/yaboot.conf\fR not be writable
+by anyone but root since a different \fIofboot\fR script could be
+specified there.
+.SH BUGS
+.B Ybin
+should be able to take care of OpenFirmware variables as needed on IBM
+hardware.
+.SH AUTHORS
+.B ybin
+and this man page was written by Ethan Benson.
+.br
+.B yaboot
+was written by Benjamin Herrenschmidt.
+.SH REPORTING BUGS
+Report bugs to <erbenson at alaska.net>
+.SH SEE ALSO
+.BR bootstrap (8),
+.BR hfsutils (1),
+.BR mkofboot (8),
+.BR mktemp (1),
+.BR nvsetenv (8),
+.BR ofpath (8),
+.BR yaboot (8),
+.BR yaboot.conf (5),
Added: trunk/yaboot/man.patch
===================================================================
--- trunk/yaboot/man.patch 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/man.patch 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,132 @@
+diff -urN -x CVS man/mkofboot.8 man.deb/mkofboot.8
+--- man/mkofboot.8 Wed Nov 21 04:08:07 2001
++++ man.deb/mkofboot.8 Wed Nov 21 04:09:00 2001
+@@ -88,7 +88,7 @@
+ .TP
+ .BR \-i ,\ \-\-install\ \fIboot-file
+ Use \fIboot-file\fR as the primary boot loader executable, instead of
+-the default\fI/usr/local/lib/yaboot/yaboot\fR(8).
++the default\fI/usr/lib/yaboot/yaboot\fR(8).
+ .TP
+ .BR \-C ,\ \-\-config\ \fIconfig-file
+ Use \fIconfig-file\fR as the \fBmkofboot\fR/\fByaboot\fR(8) configuration
+@@ -162,8 +162,8 @@
+ Print out the version number and exit.
+ .SH FILES
+ .nf
+-/usr/local/lib/yaboot/yaboot \- boot loader executable
+-/usr/local/lib/yaboot/ofboot \- OpenFirmware boot script
++/usr/lib/yaboot/yaboot \- boot loader executable
++/usr/lib/yaboot/ofboot \- OpenFirmware boot script
+ /etc/yaboot.conf \- boot loader/mkofboot configuration file
+ .fi
+ .SH ENVIRONMENT
+@@ -179,7 +179,7 @@
+ program otherwise \fBmkofboot\fR will be vulnerable to race conditions.
+ The Debian mktemp is derived from OpenBSD and thus should be secure.
+
+-\fI/usr/local/lib/yaboot/ofboot\fR now contains code executed by /bin/sh (by
++\fI/usr/lib/yaboot/ofboot\fR now contains code executed by /bin/sh (by
+ \fBmkofboot\fR) it is thus critical that it not be writable by anyone
+ but root. It is also critical that \fI/etc/yaboot.conf\fR not be
+ writable by anyone but root since a different \fIofboot\fR script could be
+diff -urN -x CVS man/yaboot.conf.5 man.deb/yaboot.conf.5
+--- man/yaboot.conf.5 Sun Oct 28 00:09:33 2001
++++ man.deb/yaboot.conf.5 Wed Nov 21 04:09:00 2001
+@@ -136,7 +136,7 @@
+ boot=/dev/hda2
+ device=hd:
+ partition=3
+- magicboot=/usr/local/lib/yaboot/ofboot
++ magicboot=/usr/lib/yaboot/ofboot
+ timeout=50
+ root=/dev/hda3
+ read-only
+@@ -228,7 +228,7 @@
+ magicboot script will be executed by OF automatically at boot (instead
+ of the \fBinstall\fR file.) See man \fBbootstrap\fR(8) for more
+ information on this. As of ybin 0.22 you should set this to
+-/usr/local/lib/yaboot/ofboot which is a autoconfiguring first stage
++/usr/lib/yaboot/ofboot which is a autoconfiguring first stage
+ loader for yaboot. It is capable of presenting a dual boot menu for
+ GNU/Linux, MacOS and MacOSX. If dual booting is not required or
+ configured it will simply load yaboot directly. You must specify this
+@@ -307,7 +307,7 @@
+ When you define this option you will be presented with a simple menu at
+ bootup allowing you to hit L to boot GNU/Linux or B to boot BSD (along
+ with other choices if configured). This will only work if you are
+-using the new \fI/usr/local/lib/yaboot/ofboot\fR script. When this is
++using the new \fI/usr/lib/yaboot/ofboot\fR script. When this is
+ set to a unix device node (ie \fI/dev/hda11\fR) then ybin will use the
+ \fBofpath\fR(8) utility to determine the OpenFirmware device path.
+ .TP
+@@ -316,7 +316,7 @@
+ partition. When you define this option you will be presented with a
+ simple menu at bootup allowing you to hit L to boot GNU/Linux or M to
+ boot MacOS (along with other choices if configured). This will only
+-work if you are using the new \fI/usr/local/lib/yaboot/ofboot\fR
++work if you are using the new \fI/usr/lib/yaboot/ofboot\fR
+ script. When this is set to a unix device node (ie \fI/dev/hda11\fR)
+ then ybin will use the \fBofpath\fR(8) utility to determine the
+ OpenFirmware device path.
+@@ -326,7 +326,7 @@
+ When you define this option you will be presented with a simple menu
+ at bootup allowing you to hit L to boot GNU/Linux or X to boot MacOSX
+ (along with other choices if configured). This will only work if you
+-are using the new \fI/usr/local/lib/yaboot/ofboot\fR script. When
++are using the new \fI/usr/lib/yaboot/ofboot\fR script. When
+ this is set to a unix device node (ie \fI/dev/hda11\fR) then ybin will
+ use the \fBofpath\fR(8) utility to determine the OpenFirmware device
+ path.
+@@ -347,7 +347,7 @@
+ When you define this option you will be presented with a simple menu
+ at bootup allowing you to hit L to boot GNU/Linux or D to boot Darwin
+ (along with other choices if configured). This will only work if you
+-are using the new \fI/usr/local/lib/yaboot/ofboot\fR script. When
++are using the new \fI/usr/lib/yaboot/ofboot\fR script. When
+ this is set to a unix device node (ie \fI/dev/hda11\fR) then ybin will
+ use the \fBofpath\fR(8) utility to determine the OpenFirmware device
+ path.
+@@ -595,8 +595,8 @@
+ root=/dev/hda3
+ partition=3
+ timeout=20
+-install=/usr/local/lib/yaboot/yaboot
+-magicboot=/usr/local/lib/yaboot/ofboot
++install=/usr/lib/yaboot/yaboot
++magicboot=/usr/lib/yaboot/ofboot
+ fgcolor=black
+ bgcolor=green
+ default=Linux
+diff -urN -x CVS man/ybin.8 man.deb/ybin.8
+--- man/ybin.8 Wed Nov 21 04:08:35 2001
++++ man.deb/ybin.8 Wed Nov 21 04:09:00 2001
+@@ -103,7 +103,7 @@
+ .TP
+ .BR \-i ,\ \-\-install\ \fIboot-file
+ Use \fIboot-file\fR as the primary boot loader executable, instead of
+-the default \fI/usr/local/lib/yaboot/yaboot\fR.
++the default \fI/usr/lib/yaboot/yaboot\fR.
+ .TP
+ .BR \-C ,\ \-\-config\ \fIconfig-file
+ Use \fIconfig-file\fR as the \fBybin\fR/\fByaboot\fR(8) configuration
+@@ -176,8 +176,8 @@
+ Print out the version number and exit.
+ .SH FILES
+ .nf
+-/usr/local/lib/yaboot/yaboot \- boot loader executable
+-/usr/local/lib/yaboot/ofboot \- OpenFirmware boot script
++/usr/lib/yaboot/yaboot \- boot loader executable
++/usr/lib/yaboot/ofboot \- OpenFirmware boot script
+ /etc/yaboot.conf \- boot loader/ybin configuration file
+ .fi
+ .SH ENVIRONMENT
+@@ -193,7 +193,7 @@
+ program, otherwise \fBybin\fR will be vulnerable to race conditions.
+ The Debian mktemp is derived from OpenBSD and thus should be secure.
+
+-\fI/usr/local/lib/yaboot/ofboot\fR now contains code executed by /bin/sh (by
++\fI/usr/lib/yaboot/ofboot\fR now contains code executed by /bin/sh (by
+ \fBybin\fR). It is thus critical that it not be writable by anyone but
+ root. It is also critical that \fI/etc/yaboot.conf\fR not be writable
+ by anyone but root since a different \fIofboot\fR script could be
Added: trunk/yaboot/second/cache.S
===================================================================
--- trunk/yaboot/second/cache.S 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/cache.S 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,79 @@
+/*
+ * cache.S - PowerPC version
+ *
+ * Copyright (C) 1995-1996 Gary Thomas (gdt at linuxppc.org)
+ *
+ * Copyright (C) 1996 Paul Mackerras
+ *
+ * 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.
+ */
+
+#include "asm/ppc_asm.tmpl"
+#include "asm/processor.h"
+
+/*
+ * Write any modified data cache blocks out to memory
+ * and invalidate the corresponding instruction cache blocks.
+ * This is a no-op on the 601.
+ *
+ * flush_icache_range(unsigned long start, unsigned long stop)
+ */
+
+CACHE_LINE_SIZE = 32
+LG_CACHE_LINE_SIZE = 5
+
+ .text
+ .globl flush_icache_range
+ .type flush_icache_range, at function
+flush_icache_range:
+ mfspr r5,PVR
+ rlwinm r5,r5,16,16,31
+ cmpi 0,r5,1
+ beqlr /* for 601, do nothing */
+ li r5,CACHE_LINE_SIZE-1
+ andc r3,r3,r5
+ subf r4,r3,r4
+ add r4,r4,r5
+ srwi. r4,r4,LG_CACHE_LINE_SIZE
+ beqlr
+ mtctr r4
+ mr r6,r3
+1: dcbst 0,r3
+ addi r3,r3,CACHE_LINE_SIZE
+ bdnz 1b
+ sync /* wait for dcbst's to get to ram */
+ mtctr r4
+2: icbi 0,r6
+ addi r6,r6,CACHE_LINE_SIZE
+ bdnz 2b
+ sync
+ isync
+ blr
+
+ .text
+ .globl turn_off_mmu
+ .type turn_off_mmu, at function
+turn_off_mmu:
+ lis r0,1f at h
+ ori r0,r0,1f at l
+ mtspr SRR0,r0
+ mfmsr r0
+ lis r2,(~(MSR_DR|MSR_IR))@h
+ ori r2,r2,(~(MSR_DR|MSR_IR))@l
+ and r0,r0,r2
+ mtspr SRR1,r0
+ rfi
+1:
+ blr
Added: trunk/yaboot/second/cfg.c
===================================================================
--- trunk/yaboot/second/cfg.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/cfg.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,463 @@
+/*
+ * cfg.c - Handling and parsing of yaboot.conf
+ *
+ * Copyright (C) 1995 Werner Almesberger
+ * 1996 Jakub Jelinek
+ *
+ * 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.
+ */
+
+#include "setjmp.h"
+#include "stdarg.h"
+#include "stdlib.h"
+#include "string.h"
+#include "types.h"
+#include "prom.h"
+
+/* Imported functions */
+extern int strcasecmp(const char *s1, const char *s2);
+
+typedef enum {
+ cft_strg, cft_flag, cft_end
+} CONFIG_TYPE;
+
+typedef struct {
+ CONFIG_TYPE type;
+ char *name;
+ void *data;
+} CONFIG;
+
+#define MAX_TOKEN 200
+#define MAX_VAR_NAME MAX_TOKEN
+#define EOF -1
+
+CONFIG cf_options[] =
+{
+ {cft_strg, "device", NULL},
+ {cft_strg, "partition", NULL},
+ {cft_strg, "default", NULL},
+ {cft_strg, "timeout", NULL},
+ {cft_strg, "password", NULL},
+ {cft_flag, "restricted", NULL},
+ {cft_strg, "message", NULL},
+ {cft_strg, "root", NULL},
+ {cft_strg, "ramdisk", NULL},
+ {cft_flag, "read-only", NULL},
+ {cft_flag, "read-write", NULL},
+ {cft_strg, "append", NULL},
+ {cft_strg, "initrd", NULL},
+ {cft_flag, "initrd-prompt", NULL},
+ {cft_strg, "initrd-size", NULL},
+ {cft_flag, "pause-after", NULL},
+ {cft_strg, "pause-message", NULL},
+ {cft_strg, "init-code", NULL},
+ {cft_strg, "init-message", NULL},
+ {cft_strg, "fgcolor", NULL},
+ {cft_strg, "bgcolor", NULL},
+ {cft_strg, "ptypewarning", NULL},
+ {cft_end, NULL, NULL}};
+
+CONFIG cf_image[] =
+{
+ {cft_strg, "image", NULL},
+ {cft_strg, "label", NULL},
+ {cft_strg, "alias", NULL},
+ {cft_flag, "single-key", NULL},
+ {cft_flag, "restricted", NULL},
+ {cft_strg, "device", NULL},
+ {cft_strg, "partition", NULL},
+ {cft_strg, "root", NULL},
+ {cft_strg, "ramdisk", NULL},
+ {cft_flag, "read-only", NULL},
+ {cft_flag, "read-write", NULL},
+ {cft_strg, "append", NULL},
+ {cft_strg, "literal", NULL},
+ {cft_strg, "initrd", NULL},
+ {cft_flag, "initrd-prompt", NULL},
+ {cft_strg, "initrd-size", NULL},
+ {cft_flag, "pause-after", NULL},
+ {cft_strg, "pause-message", NULL},
+ {cft_flag, "novideo", NULL},
+ {cft_strg, "sysmap", NULL},
+ {cft_end, NULL, NULL}};
+
+static char flag_set;
+static char *last_token = NULL, *last_item = NULL, *last_value = NULL;
+static int line_num;
+static int back = 0; /* can go back by one char */
+static char *currp = NULL;
+static char *endp = NULL;
+static char *file_name = NULL;
+static CONFIG *curr_table = cf_options;
+static jmp_buf env;
+
+static struct IMAGES {
+ CONFIG table[sizeof (cf_image) / sizeof (cf_image[0])];
+ struct IMAGES *next;
+} *images = NULL;
+
+void cfg_error (char *msg,...)
+{
+ va_list ap;
+
+ va_start (ap, msg);
+ prom_printf ("Config file error: ");
+ prom_vprintf (msg, ap);
+ va_end (ap);
+ prom_printf (" near line %d in file %s\n", line_num, file_name);
+ longjmp (env, 1);
+}
+
+void cfg_warn (char *msg,...)
+{
+ va_list ap;
+
+ va_start (ap, msg);
+ prom_printf ("Config file warning: ");
+ prom_vprintf (msg, ap);
+ va_end (ap);
+ prom_printf (" near line %d in file %s\n", line_num, file_name);
+}
+
+inline int getc ()
+{
+ if (currp == endp)
+ return EOF;
+ return *currp++;
+}
+
+#define next_raw next
+static int next (void)
+{
+ int ch;
+
+ if (!back)
+ return getc ();
+ ch = back;
+ back = 0;
+ return ch;
+}
+
+static void again (int ch)
+{
+ back = ch;
+}
+
+static char *cfg_get_token (void)
+{
+ char buf[MAX_TOKEN + 1];
+ char *here;
+ int ch, escaped;
+
+ if (last_token) {
+ here = last_token;
+ last_token = NULL;
+ return here;
+ }
+ while (1) {
+ while (ch = next (), ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r')
+ if (ch == '\n' || ch == '\r')
+ line_num++;
+ if (ch == EOF || ch == (int)NULL)
+ return NULL;
+ if (ch != '#')
+ break;
+ while (ch = next_raw (), (ch != '\n' && ch != '\r'))
+ if (ch == EOF)
+ return NULL;
+ line_num++;
+ }
+ if (ch == '=')
+ return strdup ("=");
+ if (ch == '"') {
+ here = buf;
+ while (here - buf < MAX_TOKEN) {
+ if ((ch = next ()) == EOF)
+ cfg_error ("EOF in quoted string");
+ if (ch == '"') {
+ *here = 0;
+ return strdup (buf);
+ }
+ if (ch == '\\') {
+ ch = next ();
+ switch (ch) {
+ case '"':
+ case '\\':
+ break;
+ case '\n':
+ case '\r':
+ while ((ch = next ()), ch == ' ' || ch == '\t');
+ if (!ch)
+ continue;
+ again (ch);
+ ch = ' ';
+ break;
+ case 'n':
+ ch = '\n';
+ break;
+ default:
+ cfg_error ("Bad use of \\ in quoted string");
+ }
+ } else if ((ch == '\n') || (ch == '\r'))
+ cfg_error ("newline is not allowed in quoted strings");
+ *here++ = ch;
+ }
+ cfg_error ("Quoted string is too long");
+ return 0; /* not reached */
+ }
+ here = buf;
+ escaped = 0;
+ while (here - buf < MAX_TOKEN) {
+ if (escaped) {
+ if (ch == EOF)
+ cfg_error ("\\ precedes EOF");
+ if (ch == '\n')
+ line_num++;
+ else
+ *here++ = ch == '\t' ? ' ' : ch;
+ escaped = 0;
+ } else {
+ if (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r' || ch == '#' ||
+ ch == '=' || ch == EOF) {
+ again (ch);
+ *here = 0;
+ return strdup (buf);
+ }
+ if (!(escaped = (ch == '\\')))
+ *here++ = ch;
+ }
+ ch = next ();
+ }
+ cfg_error ("Token is too long");
+ return 0; /* not reached */
+}
+
+static void cfg_return_token (char *token)
+{
+ last_token = token;
+}
+
+static int cfg_next (char **item, char **value)
+{
+ char *this;
+
+ if (last_item) {
+ *item = last_item;
+ *value = last_value;
+ last_item = NULL;
+ return 1;
+ }
+ *value = NULL;
+ if (!(*item = cfg_get_token ()))
+ return 0;
+ if (!strcmp (*item, "="))
+ cfg_error ("Syntax error");
+ if (!(this = cfg_get_token ()))
+ return 1;
+ if (strcmp (this, "=")) {
+ cfg_return_token (this);
+ return 1;
+ }
+ if (!(*value = cfg_get_token ()))
+ cfg_error ("Value expected at EOF");
+ if (!strcmp (*value, "="))
+ cfg_error ("Syntax error after %s", *item);
+ return 1;
+}
+
+#if 0
+// The one and only call to this procedure is commented out
+// below, so we don't need this unless we decide to use it again.
+static void cfg_return (char *item, char *value)
+{
+ last_item = item;
+ last_value = value;
+}
+#endif
+
+static int cfg_set (char *item, char *value)
+{
+ CONFIG *walk;
+
+ if (!strcasecmp (item, "image")) {
+ struct IMAGES **p = &images;
+
+ while (*p)
+ p = &((*p)->next);
+ *p = (struct IMAGES *)malloc (sizeof (struct IMAGES));
+ if (*p == NULL) {
+ prom_printf("malloc error in cfg_set\n");
+ return -1;
+ }
+ (*p)->next = 0;
+ curr_table = ((*p)->table);
+ memcpy (curr_table, cf_image, sizeof (cf_image));
+ }
+ for (walk = curr_table; walk->type != cft_end; walk++) {
+ if (walk->name && !strcasecmp (walk->name, item)) {
+ if (value && walk->type != cft_strg)
+ cfg_warn ("'%s' doesn't have a value", walk->name);
+ else if (!value && walk->type == cft_strg)
+ cfg_warn ("Value expected for '%s'", walk->name);
+ else {
+ if (walk->data)
+ cfg_warn ("Duplicate entry '%s'", walk->name);
+ if (walk->type == cft_flag)
+ walk->data = &flag_set;
+ else if (walk->type == cft_strg)
+ walk->data = value;
+ }
+ break;
+ }
+ }
+ if (walk->type != cft_end)
+ return 1;
+// cfg_return (item, value);
+ return 0;
+}
+
+int cfg_parse (char *cfg_file, char *buff, int len)
+{
+ char *item, *value;
+
+ file_name = cfg_file;
+ currp = buff;
+ endp = currp + len;
+
+ if (setjmp (env))
+ return -1;
+ while (1) {
+ if (!cfg_next (&item, &value))
+ return 0;
+ if (!cfg_set (item, value)) {
+#if DEBUG
+ prom_printf("Can't set item %s to value %s\n", item, value);
+#endif
+ }
+ free (item);
+ }
+}
+
+static char *cfg_get_strg_i (CONFIG * table, char *item)
+{
+ CONFIG *walk;
+
+ for (walk = table; walk->type != cft_end; walk++)
+ if (walk->name && !strcasecmp (walk->name, item))
+ return walk->data;
+ return 0;
+}
+
+char *cfg_get_strg (char *image, char *item)
+{
+ struct IMAGES *p;
+ char *label, *alias;
+ char *ret;
+
+ if (!image)
+ return cfg_get_strg_i (cf_options, item);
+ for (p = images; p; p = p->next) {
+ label = cfg_get_strg_i (p->table, "label");
+ if (!label) {
+ label = cfg_get_strg_i (p->table, "image");
+ alias = strrchr (label, '/');
+ if (alias)
+ label = alias + 1;
+ }
+ alias = cfg_get_strg_i (p->table, "alias");
+ if (!strcmp (label, image) || (alias && !strcmp (alias, image))) {
+ ret = cfg_get_strg_i (p->table, item);
+ if (!ret)
+ ret = cfg_get_strg_i (cf_options, item);
+ return ret;
+ }
+ }
+ return 0;
+}
+
+int cfg_get_flag (char *image, char *item)
+{
+ return !!cfg_get_strg (image, item);
+}
+
+static int printl_count = 0;
+static void printlabel (char *label, int defflag)
+{
+ int len = strlen (label);
+
+ if (!printl_count)
+ prom_printf ("\n");
+ prom_printf ("%s %s",defflag?"*":" ", label);
+ while (len++ < 25)
+ prom_putchar (' ');
+ printl_count++;
+ if (printl_count == 3)
+ printl_count = 0;
+}
+
+void cfg_print_images (void)
+{
+ struct IMAGES *p;
+ char *label, *alias;
+
+ char *ret = cfg_get_strg_i (cf_options, "default");
+ int defflag=0;
+
+ printl_count = 0;
+ for (p = images; p; p = p->next) {
+ label = cfg_get_strg_i (p->table, "label");
+ if (!label) {
+ label = cfg_get_strg_i (p->table, "image");
+ alias = strrchr (label, '/');
+ if (alias)
+ label = alias + 1;
+ }
+ if(!strcmp(ret,label))
+ defflag=1;
+ else
+ defflag=0;
+ alias = cfg_get_strg_i (p->table, "alias");
+ printlabel (label, defflag);
+ if (alias)
+ printlabel (alias, 0);
+ }
+ prom_printf("\n");
+}
+
+char *cfg_get_default (void)
+{
+ char *label;
+ char *ret = cfg_get_strg_i (cf_options, "default");
+
+ if (ret)
+ return ret;
+ if (!images)
+ return 0;
+ ret = cfg_get_strg_i (images->table, "label");
+ if (!ret) {
+ ret = cfg_get_strg_i (images->table, "image");
+ label = strrchr (ret, '/');
+ if (label)
+ ret = label + 1;
+ }
+ return ret;
+}
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 5
+ * End:
+ */
Added: trunk/yaboot/second/cmdline.c
===================================================================
--- trunk/yaboot/second/cmdline.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/cmdline.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,88 @@
+/*
+ * cmdline.c - Prompt handling
+ *
+ * Copyright (C) 2001, 2002 Ethan Benson
+ *
+ * Adapted from SILO
+ *
+ * Copyright (C) 1996 Maurizio Plaza
+ * 1996 Jakub Jelinek
+ *
+ * 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.
+ */
+
+#include "types.h"
+#include "stdarg.h"
+#include "prom.h"
+#include "string.h"
+#include "cfg.h"
+
+#define CMD_LENG 512
+char cbuff[CMD_LENG];
+char passwdbuff[CMD_LENG];
+extern int useconf;
+
+void cmdinit()
+{
+ cbuff[0] = 0;
+ passwdbuff[0] = 0;
+}
+
+void cmdedit (void (*tabfunc) (void), int password)
+{
+ int x, c;
+ char *buff = password ? passwdbuff : cbuff;
+ for (x = 0; x < CMD_LENG - 1; x++) {
+ if (buff[x] == 0)
+ break;
+ else if (password)
+ prom_printf("*");
+ }
+ if (!password)
+ prom_printf(buff, x);
+
+ for (;;) {
+ c = prom_getchar ();
+ if (c == -1)
+ break;
+ if (c == '\n' || c == '\r') {
+ break;
+ }
+ if (c == '\t' && !x && tabfunc)
+ (*tabfunc) ();
+ if (c == '\b' || c == 0x7F) {
+ if (x > 0) {
+ --x;
+ buff[x] = 0;
+ prom_printf("\b \b");
+ }
+ } else if ((c & 0xE0) != 0) {
+ if (x < CMD_LENG - 1) {
+ buff[x] = c;
+ buff[x + 1] = 0;
+ if (password)
+ prom_printf("*");
+ else
+ prom_printf(buff + x);
+ x++;
+ }
+ if (x == 1 && !password && useconf) {
+ if (cfg_get_flag (cbuff, "single-key"))
+ break;
+ }
+ }
+ }
+ buff[x] = 0;
+}
Added: trunk/yaboot/second/crt0.S
===================================================================
--- trunk/yaboot/second/crt0.S 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/crt0.S 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,32 @@
+#include "asm/ppc_asm.tmpl"
+#include "asm/processor.h"
+
+/*
+ * Main entry point. should add code to clear BSS and more ...
+ */
+_GLOBAL(_start)
+ lis r10,edata at h
+ ori r10,r10,edata at l
+ lis r11,end at h
+ ori r11,r11,end at l
+ subi r10,r10,4
+ subi r11,r11,4
+ li r0, 0
+1: stwu r0,4(r10)
+ cmp 0,r10,r11
+ bne 1b
+ b yaboot_start
+
+/*
+ * Returns (address we're running at) - (address we were linked at)
+ * for use before the text and data are mapped to KERNELBASE.
+ */
+_GLOBAL(reloc_offset)
+ mflr r0
+ bl 1f
+1: mflr r3
+ lis r4,1b at ha
+ addi r4,r4,1b at l
+ subf r3,r4,r3
+ mtlr r0
+ blr
Added: trunk/yaboot/second/file.c
===================================================================
--- trunk/yaboot/second/file.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/file.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,272 @@
+/*
+ * file.c - Filesystem related interfaces
+ *
+ * Copyright (C) 2001, 2002 Ethan Benson
+ *
+ * parse_device_path()
+ *
+ * Copyright (C) 2001 Colin Walters
+ *
+ * Copyright (C) 1999 Benjamin Herrenschmidt
+ *
+ * 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.
+ */
+
+#include "ctype.h"
+#include "types.h"
+#include "stddef.h"
+#include "stdlib.h"
+#include "file.h"
+#include "prom.h"
+#include "string.h"
+#include "partition.h"
+#include "fs.h"
+#include "errors.h"
+#include "debug.h"
+
+extern char bootdevice[1024];
+
+/* This function follows the device path in the devtree and separates
+ the device name, partition number, and other datas (mostly file name)
+ the string passed in parameters is changed since 0 are put in place
+ of some separators to terminate the various strings.
+
+ when a default device is supplied imagepath will be assumed to be a
+ plain filename unless it contains a : otherwise if defaultdev is
+ NULL imagepath will be assumed to be a device path.
+
+ returns 1 on success 0 on failure.
+
+ Supported examples:
+ - /pci at 80000000/pci-bridge at d/ADPT,2930CU at 2/@1:4
+ - /pci at 80000000/pci-bridge at d/ADPT,2930CU at 2/@1:4,/boot/vmlinux
+ - hd:3,/boot/vmlinux
+ - enet:10.0.0.1,/tftpboot/vmlinux
+ - enet:,/tftpboot/vmlinux
+ - enet:bootp
+ - enet:0
+ Supported only if defdevice == NULL
+ - disc
+ - any other device path lacking a :
+ Unsupported examples:
+ - hd:2,\\:tbxi <- no filename will be detected due to the extra :
+ - enet:192.168.2.1,bootme,c-iaddr,g-iaddr,subnet-mask,bootp-retries,tftp-retries */
+
+int
+parse_device_path(char *imagepath, char *defdevice, int defpart,
+ char *deffile, struct boot_fspec_t *result)
+{
+ char *ptr;
+ char *ipath = NULL;
+ char *defdev = NULL;
+
+ result->dev = NULL;
+ result->part = -1;
+ result->file = NULL;
+
+ if (!imagepath)
+ return 0;
+ else
+ ipath = strdup(imagepath);
+
+ if (defdevice)
+ defdev = strdup(defdevice);
+
+ if (defdev) {
+ if (!strstr(defdev, "ethernet") && !strstr(defdev, "enet")) {
+ if ((ptr = strrchr(defdev, ':')) != NULL)
+ *ptr = 0; /* remove trailing : from defdevice if necessary */
+ }
+ }
+
+ /* if there is no : then there is no filename or partition. must
+ use strrchr() since enet:,10.0.0.1,file is legal */
+
+ if (strchr(ipath, ':') != NULL) {
+ if ((ptr = strrchr(ipath, ',')) != NULL) {
+ char *colon = strrchr(ipath, ':');
+ /* If a ':' occurs *after* a ',', then we assume that there is
+ no filename */
+ if (!colon || colon < ptr) {
+ result->file = strdup(ptr+1);
+ /* Trim the filename off */
+ *ptr = 0;
+ }
+ }
+ }
+
+ if (strstr(ipath, "ethernet") || strstr(ipath, "enet"))
+ if ((ptr = strstr(ipath, "bootp")) != NULL) { /* `n' key booting boots enet:bootp */
+ *ptr = 0;
+ result->dev = strdup(ipath);
+ } else
+ result->dev = strdup(ipath);
+ else if ((ptr = strchr(ipath, ':')) != NULL) {
+ *ptr = 0;
+ result->dev = strdup(ipath);
+ if (*(ptr+1))
+ result->part = simple_strtol(ptr+1, NULL, 10);
+ } else if (!defdev) {
+ result->dev = strdup(ipath);
+ } else if (strlen(ipath)) {
+ result->file = strdup(ipath);
+ } else {
+ return 0;
+ }
+
+ if (!result->dev && defdev)
+ result->dev = strdup(defdev);
+
+ if (result->part < 0)
+ result->part = defpart;
+
+ if (!result->file)
+ result->file = strdup(deffile);
+
+ free(ipath);
+ if (defdev)
+ free(defdev);
+ return 1;
+}
+
+
+static int
+file_block_open( struct boot_file_t* file,
+ const char* dev_name,
+ const char* file_name,
+ int partition)
+{
+ struct partition_t* parts;
+ struct partition_t* p;
+ struct partition_t* found;
+
+ parts = partitions_lookup(dev_name);
+ found = NULL;
+
+#if DEBUG
+ if (parts)
+ prom_printf("partitions:\n");
+ else
+ prom_printf("no partitions found.\n");
+#endif
+ for (p = parts; p && !found; p=p->next) {
+ DEBUG_F("number: %02d, start: 0x%08lx, length: 0x%08lx\n",
+ p->part_number, p->part_start, p->part_size );
+ if (partition == -1) {
+ file->fs = fs_open( file, dev_name, p, file_name );
+ if (file->fs == NULL || fserrorno != FILE_ERR_OK)
+ continue;
+ else {
+ partition = p->part_number;
+ goto done;
+ }
+ }
+ if ((partition >= 0) && (partition == p->part_number))
+ found = p;
+#if DEBUG
+ if (found)
+ prom_printf(" (match)\n");
+#endif
+ }
+
+ /* Note: we don't skip when found is NULL since we can, in some
+ * cases, let OF figure out a default partition.
+ */
+ DEBUG_F( "Using OF defaults.. (found = %p)\n", found );
+ file->fs = fs_open( file, dev_name, found, file_name );
+
+done:
+ if (parts)
+ partitions_free(parts);
+
+ return fserrorno;
+}
+
+static int
+file_net_open( struct boot_file_t* file,
+ const char* dev_name,
+ const char* file_name)
+{
+ file->fs = fs_of_netboot;
+ return fs_of_netboot->open(file, dev_name, NULL, file_name);
+}
+
+static int
+default_read( struct boot_file_t* file,
+ unsigned int size,
+ void* buffer)
+{
+ prom_printf("WARNING ! default_read called !\n");
+ return FILE_ERR_EOF;
+}
+
+static int
+default_seek( struct boot_file_t* file,
+ unsigned int newpos)
+{
+ prom_printf("WARNING ! default_seek called !\n");
+ return FILE_ERR_EOF;
+}
+
+static int
+default_close( struct boot_file_t* file)
+{
+ prom_printf("WARNING ! default_close called !\n");
+ return FILE_ERR_OK;
+}
+
+static struct fs_t fs_default =
+{
+ "defaults",
+ NULL,
+ default_read,
+ default_seek,
+ default_close
+};
+
+
+int open_file(const struct boot_fspec_t* spec, struct boot_file_t* file)
+{
+ int result;
+
+ memset(file, 0, sizeof(struct boot_file_t*));
+ file->fs = &fs_default;
+
+ DEBUG_F("dev_path = %s\nfile_name = %s\npartition = %d\n",
+ spec->dev, spec->file, spec->part);
+
+ result = prom_get_devtype(spec->dev);
+ if (result > 0)
+ file->device_kind = result;
+ else
+ return result;
+
+ switch(file->device_kind) {
+ case FILE_DEVICE_BLOCK:
+ DEBUG_F("device is a block device\n");
+ return file_block_open(file, spec->dev, spec->file, spec->part);
+ case FILE_DEVICE_NET:
+ DEBUG_F("device is a network device\n");
+ return file_net_open(file, spec->dev, spec->file);
+ }
+ return 0;
+}
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 5
+ * End:
+ */
Added: trunk/yaboot/second/fs.c
===================================================================
--- trunk/yaboot/second/fs.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/fs.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,75 @@
+/*
+ * fs.c - Filesystem common definitions
+ *
+ * Copyright (C) 2001, 2002 Ethan Benson
+ *
+ * Copyright (C) 1999 Benjamin Herrenschmidt
+ *
+ * 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.
+ */
+
+#include "stdlib.h"
+#include "fs.h"
+#include "errors.h"
+
+extern const struct fs_t of_filesystem;
+extern const struct fs_t of_net_filesystem;
+extern const struct fs_t ext2_filesystem;
+//extern const struct fs_t iso_filesystem;
+
+/* Configurable filesystems */
+
+#ifdef CONFIG_FS_XFS
+extern const struct fs_t xfs_filesystem;
+#endif /* CONFIG_FS_XFS */
+
+#ifdef CONFIG_FS_REISERFS
+extern const struct fs_t reiserfs_filesystem;
+#endif /* CONFIG_FS_REISERFS */
+
+/* Filesystem handlers yaboot knows about */
+static const struct fs_t *block_filesystems[] = {
+ &ext2_filesystem, /* ext2 */
+#ifdef CONFIG_FS_XFS
+ &xfs_filesystem, /* XFS */
+#endif /* CONFIG_FS_XFS */
+#ifdef CONFIG_FS_REISERFS
+ &reiserfs_filesystem, /* reiserfs */
+#endif /* CONFIG_FS_REISERFS */
+ &of_filesystem, /* HFS/HFS+, ISO9660, UDF, UFS */
+ NULL
+};
+
+const struct fs_t *fs_of = &of_filesystem; /* needed by ISO9660 */
+const struct fs_t *fs_of_netboot = &of_net_filesystem; /* needed by file.c */
+
+const struct fs_t *
+fs_open(struct boot_file_t *file, const char *dev_name,
+ struct partition_t *part, const char *file_name)
+{
+ const struct fs_t **fs;
+ for (fs = block_filesystems; *fs; fs++)
+ if ((fserrorno = (*fs)->open(file, dev_name, part, file_name)) != FILE_ERR_BAD_FSYS)
+ break;
+
+ return *fs;
+}
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 5
+ * End:
+ */
Added: trunk/yaboot/second/fs_ext2.c
===================================================================
--- trunk/yaboot/second/fs_ext2.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/fs_ext2.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,627 @@
+/*
+ * fs_ext2.c - an implementation for the Ext2/Ext3 filesystem
+ *
+ * Copyright (C) 2001, 2002 Ethan Benson
+ *
+ * Copyright (C) 1999 Benjamin Herrenschmidt
+ *
+ * Adapted from quik/silo
+ *
+ * Copyright (C) 1996 Maurizio Plaza
+ * 1996 Jakub Jelinek
+ *
+ * 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.
+ */
+
+#include "ctype.h"
+#include "types.h"
+#include "stddef.h"
+#include "file.h"
+#include "prom.h"
+#include "string.h"
+#include "partition.h"
+#include "fs.h"
+#include "errors.h"
+#include "debug.h"
+
+#define FAST_VERSION
+#define MAX_READ_RANGE 256
+#undef VERBOSE_DEBUG
+
+typedef int FILE;
+#include "linux/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+
+static int ext2_open( struct boot_file_t* file,
+ const char* dev_name,
+ struct partition_t* part,
+ const char* file_name);
+static int ext2_read( struct boot_file_t* file,
+ unsigned int size,
+ void* buffer);
+static int ext2_seek( struct boot_file_t* file,
+ unsigned int newpos);
+static int ext2_close( struct boot_file_t* file);
+
+struct fs_t ext2_filesystem =
+{
+ "ext2",
+ ext2_open,
+ ext2_read,
+ ext2_seek,
+ ext2_close
+};
+
+/* IO manager structure for the ext2 library */
+
+static errcode_t linux_open (const char *name, int flags, io_channel * channel);
+static errcode_t linux_close (io_channel channel);
+static errcode_t linux_set_blksize (io_channel channel, int blksize);
+static errcode_t linux_read_blk (io_channel channel, unsigned long block, int count, void *data);
+static errcode_t linux_write_blk (io_channel channel, unsigned long block, int count, const void *data);
+static errcode_t linux_flush (io_channel channel);
+
+static struct struct_io_manager struct_linux_manager =
+{
+ EXT2_ET_MAGIC_IO_MANAGER,
+ "linux I/O Manager",
+ linux_open,
+ linux_close,
+ linux_set_blksize,
+ linux_read_blk,
+ linux_write_blk,
+ linux_flush
+};
+
+static io_manager linux_io_manager = &struct_linux_manager;
+
+/* Currently, we have a mess between what is in the file structure
+ * and what is stored globally here. I'll clean this up later
+ */
+static int opened = 0; /* We can't open twice ! */
+static unsigned int bs; /* Blocksize */
+static unsigned long long doff; /* Byte offset where partition starts */
+static ino_t root,cwd;
+static ext2_filsys fs = 0;
+static struct boot_file_t* cur_file;
+static char *block_buffer = NULL;
+
+#ifdef FAST_VERSION
+static unsigned long read_range_start;
+static unsigned long read_range_count;
+static unsigned long read_last_logical;
+static unsigned long read_total;
+static unsigned long read_max;
+static struct boot_file_t* read_cur_file;
+static errcode_t read_result;
+static char* read_buffer;
+
+static int read_dump_range(void);
+static int read_iterator(ext2_filsys fs, blk_t *blocknr, int lg_block, void *private);
+#else /* FAST_VERSION */
+static struct ext2_inode cur_inode;
+#endif /* FAST_VERSION */
+
+void com_err (const char *a, long i, const char *fmt,...)
+{
+ prom_printf ((char *) fmt);
+}
+
+static int
+ext2_open( struct boot_file_t* file,
+ const char* dev_name,
+ struct partition_t* part,
+ const char* file_name)
+{
+ int result = 0;
+ int error = FILE_ERR_NOTFOUND;
+ static char buffer[1024];
+ int ofopened = 0;
+
+ DEBUG_ENTER;
+ DEBUG_OPEN;
+
+ if (opened) {
+ DEBUG_LEAVE(FILE_ERR_FSBUSY);
+ return FILE_ERR_FSBUSY;
+ }
+ if (file->device_kind != FILE_DEVICE_BLOCK) {
+ DEBUG_LEAVE(FILE_ERR_BADDEV);
+ return FILE_ERR_BADDEV;
+ }
+
+ fs = NULL;
+
+ /* We don't care too much about the device block size since we run
+ * thru the deblocker. We may have to change that is we plan to be
+ * compatible with older versions of OF
+ */
+ bs = 1024;
+ doff = 0;
+ if (part)
+ doff = (unsigned long long)(part->part_start) * part->blocksize;
+ cur_file = file;
+
+
+ DEBUG_F("partition offset: %Lu\n", doff);
+
+ /* Open the OF device for the entire disk */
+ strncpy(buffer, dev_name, 1020);
+ strcat(buffer, ":0");
+
+ DEBUG_F("<%s>\n", buffer);
+
+ file->of_device = prom_open(buffer);
+
+ DEBUG_F("file->of_device = %p\n", file->of_device);
+
+ if (file->of_device == PROM_INVALID_HANDLE) {
+
+ DEBUG_F("Can't open device %p\n", file->of_device);
+ DEBUG_LEAVE(FILE_IOERR);
+ return FILE_IOERR;
+ }
+ ofopened = 1;
+
+ /* Open the ext2 filesystem */
+ result = ext2fs_open (buffer, EXT2_FLAG_RW, 0, 0, linux_io_manager, &fs);
+ if (result) {
+
+ if(result == EXT2_ET_BAD_MAGIC)
+ {
+ DEBUG_F( "ext2fs_open returned bad magic loading file %p\n",
+ file );
+ }
+ else
+ {
+ DEBUG_F( "ext2fs_open error #%d while loading file %s\n",
+ result, file_name);
+ }
+ error = FILE_ERR_BAD_FSYS;
+ goto bail;
+ }
+
+ /* Allocate the block buffer */
+ block_buffer = malloc(fs->blocksize * 2);
+ if (!block_buffer) {
+
+ DEBUG_F("ext2fs: can't alloc block buffer (%d bytes)\n", fs->blocksize * 2);
+ error = FILE_IOERR;
+ goto bail;
+ }
+
+ /* Lookup file by pathname */
+ root = cwd = EXT2_ROOT_INO;
+ result = ext2fs_namei_follow(fs, root, cwd, file_name, &file->inode);
+ if (result) {
+
+ DEBUG_F("ext2fs_namei error #%d while loading file %s\n", result, file_name);
+ if (result == EXT2_ET_SYMLINK_LOOP)
+ error = FILE_ERR_SYMLINK_LOOP;
+ else if (result == EXT2_ET_FILE_NOT_FOUND)
+ error = FILE_ERR_NOTFOUND;
+ else
+ error = FILE_IOERR;
+ goto bail;
+ }
+
+#if 0
+ result = ext2fs_follow_link(fs, root, cwd, file->inode, &file->inode);
+ if (result) {
+
+ DEBUG_F("ext2fs_follow_link error #%d while loading file %s\n", result, file_name);
+ error = FILE_ERR_NOTFOUND;
+ goto bail;
+ }
+#endif
+
+#ifndef FAST_VERSION
+ result = ext2fs_read_inode(fs, file->inode, &cur_inode);
+ if (result) {
+
+ DEBUG_F("ext2fs_read_inode error #%d while loading file %s\n", result, file_name);
+ if (result == EXT2_ET_FILE_TOO_BIG)
+ error = FILE_ERR_LENGTH;
+ else if (result == EXT2_ET_LLSEEK_FAILED)
+ error = FILE_CANT_SEEK;
+ else if (result == EXT2_ET_FILE_NOT_FOUND)
+ error = FILE_ERR_NOTFOUND;
+ else
+ error = FILE_IOERR;
+ goto bail;
+ }
+#endif /* FAST_VERSION */
+ file->pos = 0;
+
+ opened = 1;
+bail:
+ if (!opened) {
+ if (fs)
+ ext2fs_close(fs);
+ fs = NULL;
+ if (ofopened)
+ prom_close(file->of_device);
+ if (block_buffer)
+ free(block_buffer);
+ block_buffer = NULL;
+ cur_file = NULL;
+
+ DEBUG_LEAVE_F(error);
+ return error;
+ }
+
+ DEBUG_LEAVE(FILE_ERR_OK);
+ return FILE_ERR_OK;
+}
+
+#ifdef FAST_VERSION
+
+static int
+read_dump_range(void)
+{
+ int count = read_range_count;
+ int size;
+
+#ifdef VERBOSE_DEBUG
+ DEBUG_F(" dumping range: start: 0x%x count: 0x%x\n",
+ read_range_count, read_range_start);
+#endif
+ /* Check if we need to handle a special case for the last block */
+ if ((count * bs) > read_max)
+ count--;
+ if (count) {
+ size = count * bs;
+ read_result = io_channel_read_blk(fs->io, read_range_start, count, read_buffer);
+ if (read_result)
+ return BLOCK_ABORT;
+ read_buffer += size;
+ read_max -= size;
+ read_total += size;
+ read_cur_file->pos += size;
+ read_range_count -= count;
+ read_range_start += count;
+ read_last_logical += count;
+ }
+ /* Handle remaining block */
+ if (read_max && read_range_count) {
+ read_result = io_channel_read_blk(fs->io, read_range_start, 1, block_buffer);
+ if (read_result)
+ return BLOCK_ABORT;
+ memcpy(read_buffer, block_buffer, read_max);
+ read_cur_file->pos += read_max;
+ read_total += read_max;
+ read_max = 0;
+ }
+ read_range_count = read_range_start = 0;
+
+ return (read_max == 0) ? BLOCK_ABORT : 0;
+}
+
+static int
+read_iterator(ext2_filsys fs, blk_t *blocknr, int lg_block, void *private)
+{
+#ifdef VERBOSE_DEBUG
+ DEBUG_F("read_it: p_bloc: 0x%x, l_bloc: 0x%x, f_pos: 0x%x, rng_pos: 0x%x ",
+ *blocknr, lg_block, read_cur_file->pos, read_last_logical);
+#endif
+ if (lg_block < 0) {
+#ifdef VERBOSE_DEBUG
+ DEBUG_F(" <skip lg>\n");
+#endif
+ return 0;
+ }
+
+ /* If we have not reached the start block yet, we skip */
+ if (lg_block < read_cur_file->pos / bs) {
+#ifdef VERBOSE_DEBUG
+ DEBUG_F(" <skip pos>\n");
+#endif
+ return 0;
+ }
+
+ /* If block is contiguous to current range, just extend range,
+ * exit if we pass the remaining bytes count to read
+ */
+ if (read_range_start && read_range_count < MAX_READ_RANGE
+ && (*blocknr == read_range_start + read_range_count)
+ && (lg_block == read_last_logical + read_range_count)) {
+#ifdef VERBOSE_DEBUG
+ DEBUG_F(" block in range\n");
+#endif
+ ++read_range_count;
+ return ((read_range_count * bs) >= read_max) ? BLOCK_ABORT : 0;
+ }
+
+ /* Range doesn't match. Dump existing range */
+ if (read_range_start) {
+#ifdef VERBOSE_DEBUG
+ DEBUG_F(" calling dump range \n");
+#endif
+ if (read_dump_range())
+ return BLOCK_ABORT;
+ }
+
+ /* Here we handle holes in the file */
+ if (lg_block && lg_block != read_last_logical) {
+ unsigned long nzero;
+#ifdef VERBOSE_DEBUG
+ DEBUG_F(" hole from lg_bloc 0x%x\n", read_last_logical);
+#endif
+ if (read_cur_file->pos % bs) {
+ int offset = read_cur_file->pos % bs;
+ int size = bs - offset;
+ if (size > read_max)
+ size = read_max;
+ memset(read_buffer, 0, size);
+ read_max -= size;
+ read_total += size;
+ read_buffer += size;
+ read_cur_file->pos += size;
+ ++read_last_logical;
+ if (read_max == 0)
+ return BLOCK_ABORT;
+ }
+ nzero = (lg_block - read_last_logical) * bs;
+ if (nzero) {
+ if (nzero > read_max)
+ nzero = read_max;
+ memset(read_buffer, 0, nzero);
+ read_max -= nzero;
+ read_total += nzero;
+ read_buffer += nzero;
+ read_cur_file->pos += nzero;
+ if (read_max == 0)
+ return BLOCK_ABORT;
+ }
+ read_last_logical = lg_block;
+ }
+
+ /* If we are not aligned, handle that case */
+ if (read_cur_file->pos % bs) {
+ int offset = read_cur_file->pos % bs;
+ int size = bs - offset;
+#ifdef VERBOSE_DEBUG
+ DEBUG_F(" handle unaligned start\n");
+#endif
+ read_result = io_channel_read_blk(fs->io, *blocknr, 1, block_buffer);
+ if (read_result)
+ return BLOCK_ABORT;
+ if (size > read_max)
+ size = read_max;
+ memcpy(read_buffer, block_buffer + offset, size);
+ read_cur_file->pos += size;
+ read_max -= size;
+ read_total += size;
+ read_buffer += size;
+ read_last_logical = lg_block + 1;
+ return (read_max == 0) ? BLOCK_ABORT : 0;
+ }
+
+ /* If there is still a physical block to add, then create a new range */
+ if (*blocknr) {
+#ifdef VERBOSE_DEBUG
+ DEBUG_F(" new range\n");
+#endif
+ read_range_start = *blocknr;
+ read_range_count = 1;
+ return (bs >= read_max) ? BLOCK_ABORT : 0;
+ }
+
+#ifdef VERBOSE_DEBUG
+ DEBUG_F("\n");
+#endif
+ return 0;
+}
+
+#endif /* FAST_VERSION */
+
+static int
+ext2_read( struct boot_file_t* file,
+ unsigned int size,
+ void* buffer)
+{
+ errcode_t retval;
+
+#ifdef FAST_VERSION
+ if (!opened)
+ return FILE_IOERR;
+
+
+ DEBUG_F("ext_read() from pos 0x%Lx, size: 0x%ux\n", file->pos, size);
+
+
+ read_cur_file = file;
+ read_range_start = 0;
+ read_range_count = 0;
+ read_last_logical = file->pos / bs;
+ read_total = 0;
+ read_max = size;
+ read_buffer = (unsigned char*)buffer;
+ read_result = 0;
+
+ retval = ext2fs_block_iterate(fs, file->inode, 0, 0, read_iterator, 0);
+ if (retval == BLOCK_ABORT)
+ retval = read_result;
+ if (!retval && read_range_start) {
+#ifdef VERBOSE_DEBUG
+ DEBUG_F("on exit: range_start is 0x%x, calling dump...\n",
+ read_range_start);
+#endif
+ read_dump_range();
+ retval = read_result;
+ }
+ if (retval)
+ prom_printf ("ext2: i/o error %ld in read\n", (long) retval);
+
+ return read_total;
+
+#else /* FAST_VERSION */
+ int status;
+ unsigned int read = 0;
+
+ if (!opened)
+ return FILE_IOERR;
+
+
+ DEBUG_F("ext_read() from pos 0x%x, size: 0x%x\n", file->pos, size);
+
+
+ while(size) {
+ blk_t fblock = file->pos / bs;
+ blk_t pblock;
+ unsigned int blkorig, s, b;
+
+ pblock = 0;
+ status = ext2fs_bmap(fs, file->inode, &cur_inode,
+ block_buffer, 0, fblock, &pblock);
+ if (status) {
+
+ DEBUG_F("ext2fs_bmap(fblock:%d) return: %d\n", fblock, status);
+ return read;
+ }
+ blkorig = fblock * bs;
+ b = file->pos - blkorig;
+ s = ((bs - b) > size) ? size : (bs - b);
+ if (pblock) {
+ unsigned long long pos =
+ ((unsigned long long)pblock) * (unsigned long long)bs;
+ pos += doff;
+ prom_lseek(file->of_device, pos);
+ status = prom_read(file->of_device, block_buffer, bs);
+ if (status != bs) {
+ prom_printf("ext2: io error in read, ex: %d, got: %d\n",
+ bs, status);
+ return read;
+ }
+ } else
+ memset(block_buffer, 0, bs);
+
+ memcpy(buffer, block_buffer + b, s);
+ read += s;
+ size -= s;
+ buffer += s;
+ file->pos += s;
+ }
+ return read;
+#endif /* FAST_VERSION */
+}
+
+static int
+ext2_seek( struct boot_file_t* file,
+ unsigned int newpos)
+{
+ if (!opened)
+ return FILE_CANT_SEEK;
+
+ file->pos = newpos;
+ return FILE_ERR_OK;
+}
+
+static int
+ext2_close( struct boot_file_t* file)
+{
+ if (!opened)
+ return FILE_IOERR;
+
+ if (block_buffer)
+ free(block_buffer);
+ block_buffer = NULL;
+
+ if (fs)
+ ext2fs_close(fs);
+ fs = NULL;
+
+ prom_close(file->of_device);
+ DEBUG_F("ext2_close called\n");
+
+ opened = 0;
+
+ return 0;
+}
+
+static errcode_t linux_open (const char *name, int flags, io_channel * channel)
+{
+ io_channel io;
+
+
+ if (!name)
+ return EXT2_ET_BAD_DEVICE_NAME;
+ io = (io_channel) malloc (sizeof (struct struct_io_channel));
+ if (!io)
+ return EXT2_ET_BAD_DEVICE_NAME;
+ memset (io, 0, sizeof (struct struct_io_channel));
+ io->magic = EXT2_ET_MAGIC_IO_CHANNEL;
+ io->manager = linux_io_manager;
+ io->name = (char *) malloc (strlen (name) + 1);
+ strcpy (io->name, name);
+ io->block_size = bs;
+ io->read_error = 0;
+ io->write_error = 0;
+ *channel = io;
+
+ return 0;
+}
+
+static errcode_t linux_close (io_channel channel)
+{
+ free(channel);
+ return 0;
+}
+
+static errcode_t linux_set_blksize (io_channel channel, int blksize)
+{
+ channel->block_size = bs = blksize;
+ if (block_buffer) {
+ free(block_buffer);
+ block_buffer = malloc(bs * 2);
+ }
+ return 0;
+}
+
+static errcode_t linux_read_blk (io_channel channel, unsigned long block, int count, void *data)
+{
+ int size;
+ unsigned long long tempb;
+
+ if (count == 0)
+ return 0;
+
+ tempb = (((unsigned long long) block) *
+ ((unsigned long long)bs)) + (unsigned long long)doff;
+ size = (count < 0) ? -count : count * bs;
+ prom_lseek(cur_file->of_device, tempb);
+ if (prom_read(cur_file->of_device, data, size) != size) {
+ DEBUG_F("\nRead error on block %ld\n", block);
+ return EXT2_ET_SHORT_READ;
+ }
+ return 0;
+}
+
+static errcode_t linux_write_blk (io_channel channel, unsigned long block, int count, const void *data)
+{
+ return 0;
+}
+
+static errcode_t linux_flush (io_channel channel)
+{
+ return 0;
+}
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 5
+ * End:
+ */
Added: trunk/yaboot/second/fs_iso.c
===================================================================
--- trunk/yaboot/second/fs_iso.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/fs_iso.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,86 @@
+/*
+ * fs_iso.c - a non-implementation for the ISO9660 filesystem
+ *
+ * Copyright (C) 1999 Benjamin Herrenschnidt
+ *
+ * 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.
+ */
+
+#include "ctype.h"
+#include "types.h"
+#include "stddef.h"
+#include "file.h"
+#include "prom.h"
+#include "string.h"
+#include "partition.h"
+#include "fs.h"
+#include "errors.h"
+
+static int iso_open( struct boot_file_t* file,
+ const char* dev_name,
+ struct partition_t* part,
+ const char* file_name);
+static int iso_read( struct boot_file_t* file,
+ unsigned int size,
+ void* buffer);
+static int iso_seek( struct boot_file_t* file,
+ unsigned int newpos);
+static int iso_close( struct boot_file_t* file);
+
+struct fs_t iso_filesystem =
+{
+ "iso9660",
+ iso_open,
+ iso_read,
+ iso_seek,
+ iso_close
+};
+
+static int
+iso_open( struct boot_file_t* file,
+ const char* dev_name,
+ struct partition_t* part,
+ const char* file_name)
+{
+ return FILE_ERR_BAD_FSYS;
+}
+
+static int
+iso_read( struct boot_file_t* file,
+ unsigned int size,
+ void* buffer)
+{
+ return FILE_ERR_BAD_FSYS;
+}
+
+static int
+iso_seek( struct boot_file_t* file,
+ unsigned int newpos)
+{
+ return FILE_ERR_BAD_FSYS;
+}
+
+static int
+iso_close( struct boot_file_t* file)
+{
+ return 0;
+}
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 5
+ * End:
+ */
Added: trunk/yaboot/second/fs_of.c
===================================================================
--- trunk/yaboot/second/fs_of.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/fs_of.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,244 @@
+/*
+ * fs_of.c - an implementation for OpenFirmware supported filesystems
+ *
+ * Copyright (C) 2001, 2002 Ethan Benson
+ *
+ * Copyright (C) 1999 Benjamin Herrenschmidt
+ *
+ * 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.
+ */
+
+/*
+ * BrokenFirmware cannot "read" from the network. We use tftp "load"
+ * method for network boot for now, we may provide our own NFS
+ * implementation in a later version. That means that we allocate a
+ * huge block of memory for the entire file before loading it. We use
+ * the location where the kernel puts RTAS, it's not used by the
+ * bootloader and if freed when the kernel is booted. This will have
+ * to be changed if we plan to instanciate RTAS in the bootloader
+ * itself
+ */
+
+#include "ctype.h"
+#include "types.h"
+#include "stddef.h"
+#include "stdlib.h"
+#include "file.h"
+#include "prom.h"
+#include "string.h"
+#include "partition.h"
+#include "fs.h"
+#include "errors.h"
+#include "debug.h"
+
+#define LOAD_BUFFER_POS 0x600000
+/* this cannot be safely increased any further */
+#define LOAD_BUFFER_SIZE 0x600000
+
+static int of_open(struct boot_file_t* file, const char* dev_name,
+ struct partition_t* part, const char* file_name);
+static int of_read(struct boot_file_t* file, unsigned int size, void* buffer);
+static int of_seek(struct boot_file_t* file, unsigned int newpos);
+static int of_close(struct boot_file_t* file);
+
+
+static int of_net_open(struct boot_file_t* file, const char* dev_name,
+ struct partition_t* part, const char* file_name);
+static int of_net_read(struct boot_file_t* file, unsigned int size, void* buffer);
+static int of_net_seek(struct boot_file_t* file, unsigned int newpos);
+
+
+struct fs_t of_filesystem =
+{
+ "built-in",
+ of_open,
+ of_read,
+ of_seek,
+ of_close
+};
+
+struct fs_t of_net_filesystem =
+{
+ "built-in network",
+ of_net_open,
+ of_net_read,
+ of_net_seek,
+ of_close
+};
+
+static int
+of_open(struct boot_file_t* file, const char* dev_name,
+ struct partition_t* part, const char* file_name)
+{
+ static char buffer[1024];
+ char *filename;
+ char *p;
+
+ DEBUG_ENTER;
+ DEBUG_OPEN;
+
+ strncpy(buffer, dev_name, 768);
+ strcat(buffer, ":");
+ if (part) {
+ char pn[3];
+ sprintf(pn, "%02d", part->part_number);
+ strcat(buffer, pn);
+ }
+ if (file_name && strlen(file_name)) {
+ if (part)
+ strcat(buffer, ",");
+ filename = strdup(file_name);
+ for (p = filename; *p; p++)
+ if (*p == '/')
+ *p = '\\';
+ strcat(buffer, filename);
+ free(filename);
+ }
+
+ DEBUG_F("opening: \"%s\"\n", buffer);
+
+ file->of_device = prom_open(buffer);
+
+ DEBUG_F("file->of_device = %p\n", file->of_device);
+
+ file->pos = 0;
+ file->buffer = NULL;
+ if ((file->of_device == PROM_INVALID_HANDLE) || (file->of_device == 0))
+ {
+ DEBUG_LEAVE(FILE_ERR_BAD_FSYS);
+ return FILE_ERR_BAD_FSYS;
+ }
+
+ DEBUG_LEAVE(FILE_ERR_OK);
+ return FILE_ERR_OK;
+}
+
+static int
+of_net_open(struct boot_file_t* file, const char* dev_name,
+ struct partition_t* part, const char* file_name)
+{
+ static char buffer[1024];
+ char *filename;
+ char *p;
+
+ DEBUG_ENTER;
+ DEBUG_OPEN;
+
+ strncpy(buffer, dev_name, 768);
+ if (file_name && strlen(file_name)) {
+ strcat(buffer, ",");
+ filename = strdup(file_name);
+ for (p = filename; *p; p++)
+ if (*p == '/')
+ *p = '\\';
+ strcat(buffer, filename);
+ free(filename);
+ }
+
+ DEBUG_F("Opening: \"%s\"\n", buffer);
+
+ file->of_device = prom_open(buffer);
+
+ DEBUG_F("file->of_device = %p\n", file->of_device);
+
+ file->pos = 0;
+ if ((file->of_device == PROM_INVALID_HANDLE) || (file->of_device == 0))
+ {
+ DEBUG_LEAVE(FILE_ERR_BAD_FSYS);
+ return FILE_ERR_BAD_FSYS;
+ }
+
+ file->buffer = prom_claim((void *)LOAD_BUFFER_POS, LOAD_BUFFER_SIZE, 0);
+ if (file->buffer == (void *)-1) {
+ prom_printf("Can't claim memory for TFTP download\n");
+ prom_close(file->of_device);
+ DEBUG_LEAVE(FILE_IOERR);
+ return FILE_IOERR;
+ }
+ memset(file->buffer, 0, LOAD_BUFFER_SIZE);
+
+ DEBUG_F("TFP...\n");
+
+ file->len = prom_loadmethod(file->of_device, file->buffer);
+
+ DEBUG_F("result: %Ld\n", file->len);
+
+ DEBUG_LEAVE(FILE_ERR_OK);
+ return FILE_ERR_OK;
+}
+
+static int
+of_read(struct boot_file_t* file, unsigned int size, void* buffer)
+{
+ unsigned int count;
+
+ count = prom_read(file->of_device, buffer, size);
+ file->pos += count;
+ return count;
+}
+
+static int
+of_net_read(struct boot_file_t* file, unsigned int size, void* buffer)
+{
+ unsigned int count, av;
+
+ av = file->len - file->pos;
+ count = size > av ? av : size;
+ memcpy(buffer, file->buffer + file->pos, count);
+ file->pos += count;
+ return count;
+}
+
+static int
+of_seek(struct boot_file_t* file, unsigned int newpos)
+{
+ if (prom_seek(file->of_device, newpos)) {
+ file->pos = newpos;
+ return FILE_ERR_OK;
+ }
+
+ return FILE_CANT_SEEK;
+}
+
+static int
+of_net_seek(struct boot_file_t* file, unsigned int newpos)
+{
+ file->pos = (newpos > file->len) ? file->len : newpos;
+ return FILE_ERR_OK;
+}
+
+static int
+of_close(struct boot_file_t* file)
+{
+
+ DEBUG_ENTER;
+ DEBUG_F("<@%p>\n", file->of_device);
+
+ if (file->buffer) {
+ prom_release(file->buffer, LOAD_BUFFER_SIZE);
+ }
+ prom_close(file->of_device);
+ DEBUG_F("of_close called\n");
+
+ DEBUG_LEAVE(0);
+ return 0;
+}
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 5
+ * End:
+ */
Added: trunk/yaboot/second/fs_reiserfs.c
===================================================================
--- trunk/yaboot/second/fs_reiserfs.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/fs_reiserfs.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1055 @@
+/*
+ * fs_reiserfs.c - an implementation for the Reiser filesystem
+ *
+ * Copyright (C) 2001 Jeffrey Mahoney (jeffm at suse.com)
+ *
+ * Adapted from Grub
+ *
+ * Copyright (C) 2000, 2001 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 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.
+ */
+
+#include "types.h"
+#include "ctype.h"
+#include "string.h"
+#include "stdlib.h"
+#include "fs.h"
+#include "errors.h"
+#include "debug.h"
+#include "reiserfs/reiserfs.h"
+
+/* Exported in struct fs_t */
+static int reiserfs_open( struct boot_file_t *file, const char *dev_name,
+ struct partition_t *part, const char *file_name );
+static int reiserfs_read( struct boot_file_t *file, unsigned int size,
+
+ void *buffer );
+static int reiserfs_seek( struct boot_file_t *file, unsigned int newpos );
+static int reiserfs_close( struct boot_file_t *file );
+
+struct fs_t reiserfs_filesystem = {
+ name:"reiserfs",
+ open:reiserfs_open,
+ read:reiserfs_read,
+ seek:reiserfs_seek,
+ close:reiserfs_close
+};
+
+static int reiserfs_read_super( void );
+static int reiserfs_open_file( char *dirname );
+static int reiserfs_read_data( char *buf, __u32 len );
+
+
+static struct reiserfs_state reiserfs;
+static struct reiserfs_state *INFO = &reiserfs;
+
+/* Adapted from GRUB: */
+static char FSYS_BUF[FSYSREISER_CACHE_SIZE];
+int errnum;
+
+
+static int
+reiserfs_open( struct boot_file_t *file, const char *dev_name,
+ struct partition_t *part, const char *file_name )
+{
+ static char buffer[1024];
+
+ DEBUG_ENTER;
+ DEBUG_OPEN;
+
+ memset( INFO, 0, sizeof(struct reiserfs_state) );
+ INFO->file = file;
+
+ if (part)
+ {
+ DEBUG_F( "Determining offset for partition %d\n", part->part_number );
+ INFO->partition_offset = ((uint64_t)part->part_start) * part->blocksize;
+ DEBUG_F( "%Lu = %lu * %hu\n", INFO->partition_offset,
+ part->part_start,
+ part->blocksize );
+ }
+ else
+ INFO->partition_offset = 0;
+
+ sprintf( buffer, "%s:%d", dev_name, 0 ); /* 0 is full disk in OF */
+ file->of_device = prom_open( buffer );
+ DEBUG_F( "Trying to open dev_name=%s; filename=%s; partition offset=%Lu\n",
+ buffer, file_name, INFO->partition_offset );
+
+ if ( file->of_device == PROM_INVALID_HANDLE || file->of_device == NULL )
+ {
+ DEBUG_F( "Can't open device %p\n", file->of_device );
+ DEBUG_LEAVE(FILE_ERR_BADDEV);
+ return FILE_ERR_BADDEV;
+ }
+
+ DEBUG_F("%p was successfully opened\n", file->of_device);
+
+ if ( reiserfs_read_super() != 1 )
+ {
+ DEBUG_F( "Couldn't open ReiserFS @ %s/%Lu\n", buffer, INFO->partition_offset );
+ prom_close( file->of_device );
+ DEBUG_LEAVE(FILE_ERR_BAD_FSYS);
+ return FILE_ERR_BAD_FSYS;
+ }
+
+ DEBUG_F( "Attempting to open %s\n", file_name );
+ strcpy(buffer, file_name); /* reiserfs_open_file modifies argument */
+ if (reiserfs_open_file(buffer) == 0)
+ {
+ DEBUG_F( "reiserfs_open_file failed. errnum = %d\n", errnum );
+ prom_close( file->of_device );
+ DEBUG_LEAVE_F(errnum);
+ return errnum;
+ }
+
+ DEBUG_F( "Successfully opened %s\n", file_name );
+
+ DEBUG_LEAVE(FILE_ERR_OK);
+ DEBUG_SLEEP;
+ return FILE_ERR_OK;
+}
+
+static int
+reiserfs_read( struct boot_file_t *file, unsigned int size, void *buffer )
+{
+ return reiserfs_read_data( buffer, size );
+}
+
+static int
+reiserfs_seek( struct boot_file_t *file, unsigned int newpos )
+{
+ file->pos = newpos;
+ return FILE_ERR_OK;
+}
+
+static int
+reiserfs_close( struct boot_file_t *file )
+{
+ if( file->of_device )
+ {
+ prom_close(file->of_device);
+ file->of_device = 0;
+ DEBUG_F("reiserfs_close called\n");
+ }
+ return FILE_ERR_OK;
+}
+
+
+static __inline__ __u32
+log2( __u32 word )
+{
+ int i = 0;
+ while( word && (word & (1 << ++i)) == 0 );
+ return i;
+}
+
+static __inline__ int
+is_power_of_two( unsigned long word )
+{
+ return ( word & -word ) == word;
+}
+
+static int
+read_disk_block( struct boot_file_t *file, __u32 block, __u32 start,
+ __u32 length, void *buf )
+{
+ __u16 fs_blocksize = INFO->blocksize == 0 ? REISERFS_OLD_BLOCKSIZE
+ : INFO->blocksize;
+ unsigned long long pos = (unsigned long long)block * (unsigned long long)fs_blocksize;
+ pos += (unsigned long long)INFO->partition_offset + (unsigned long long)start;
+ DEBUG_F( "Reading %u bytes, starting at block %u, disk offset %Lu\n",
+ length, block, pos );
+ if (!prom_lseek( file->of_device, pos )) {
+ DEBUG_F("prom_lseek failed\n");
+ return 0;
+ }
+ return prom_read( file->of_device, buf, length );
+}
+
+
+static int
+journal_read( __u32 block, __u32 len, char *buffer )
+{
+ return read_disk_block( INFO->file,
+ (INFO->journal_block + block), 0,
+ len, buffer );
+}
+
+/* Read a block from ReiserFS file system, taking the journal into
+ * account. If the block nr is in the journal, the block from the
+ * journal taken.
+ */
+static int
+block_read( __u32 blockNr, __u32 start, __u32 len, char *buffer )
+{
+ __u32 transactions = INFO->journal_transactions;
+ __u32 desc_block = INFO->journal_first_desc;
+ __u32 journal_mask = INFO->journal_block_count - 1;
+ __u32 translatedNr = blockNr;
+ __u32 *journal_table = JOURNAL_START;
+
+// DEBUG_F( "block_read( %u, %u, %u, ..)\n", blockNr, start, len );
+
+ while ( transactions-- > 0 )
+ {
+ int i = 0;
+ int j_len;
+
+ if ( *journal_table != 0xffffffff )
+ {
+ /* Search for the blockNr in cached journal */
+ j_len = le32_to_cpu(*journal_table++);
+ while ( i++ < j_len )
+ {
+ if ( le32_to_cpu(*journal_table++) == blockNr )
+ {
+ journal_table += j_len - i;
+ goto found;
+ }
+ }
+ }
+ else
+ {
+ /* This is the end of cached journal marker. The remaining
+ * transactions are still on disk. */
+ struct reiserfs_journal_desc desc;
+ struct reiserfs_journal_commit commit;
+
+ if ( !journal_read( desc_block, sizeof(desc), (char *) &desc ) )
+ return 0;
+
+ j_len = le32_to_cpu(desc.j_len);
+ while ( i < j_len && i < JOURNAL_TRANS_HALF )
+ if ( le32_to_cpu(desc.j_realblock[i++]) == blockNr )
+ goto found;
+
+ if ( j_len >= JOURNAL_TRANS_HALF )
+ {
+ int commit_block = ( desc_block + 1 + j_len ) & journal_mask;
+
+ if ( !journal_read( commit_block,
+ sizeof(commit), (char *) &commit ) )
+ return 0;
+
+ while ( i < j_len )
+ if ( le32_to_cpu(commit.j_realblock[i++ - JOURNAL_TRANS_HALF]) == blockNr )
+ goto found;
+ }
+ }
+ goto not_found;
+
+ found:
+ translatedNr =
+ INFO->journal_block + ( ( desc_block + i ) & journal_mask );
+
+ DEBUG_F( "block_read: block %u is mapped to journal block %u.\n",
+ blockNr, translatedNr - INFO->journal_block );
+
+ /* We must continue the search, as this block may be overwritten in
+ * later transactions. */
+ not_found:
+ desc_block = (desc_block + 2 + j_len) & journal_mask;
+ }
+
+ return read_disk_block( INFO->file, translatedNr, start, len, buffer );
+}
+
+/* Init the journal data structure. We try to cache as much as
+ * possible in the JOURNAL_START-JOURNAL_END space, but if it is full
+ * we can still read the rest from the disk on demand.
+ *
+ * The first number of valid transactions and the descriptor block of the
+ * first valid transaction are held in INFO. The transactions are all
+ * adjacent, but we must take care of the journal wrap around.
+ */
+static int
+journal_init( void )
+{
+ struct reiserfs_journal_header header;
+ struct reiserfs_journal_desc desc;
+ struct reiserfs_journal_commit commit;
+ __u32 block_count = INFO->journal_block_count;
+ __u32 desc_block;
+ __u32 commit_block;
+ __u32 next_trans_id;
+ __u32 *journal_table = JOURNAL_START;
+
+ journal_read( block_count, sizeof ( header ), ( char * ) &header );
+ desc_block = le32_to_cpu(header.j_first_unflushed_offset);
+ if ( desc_block >= block_count )
+ return 0;
+
+ INFO->journal_transactions = 0;
+ INFO->journal_first_desc = desc_block;
+ next_trans_id = le32_to_cpu(header.j_last_flush_trans_id) + 1;
+
+ DEBUG_F( "journal_init: last flushed %u\n", le32_to_cpu(header.j_last_flush_trans_id) );
+
+ while ( 1 )
+ {
+ journal_read( desc_block, sizeof(desc), (char *) &desc );
+ if ( strcmp( JOURNAL_DESC_MAGIC, desc.j_magic ) != 0
+ || desc.j_trans_id != next_trans_id
+ || desc.j_mount_id != header.j_mount_id )
+ /* no more valid transactions */
+ break;
+
+ commit_block = ( desc_block + le32_to_cpu(desc.j_len) + 1 ) & ( block_count - 1 );
+ journal_read( commit_block, sizeof(commit), (char *) &commit );
+ if ( desc.j_trans_id != commit.j_trans_id
+ || desc.j_len != commit.j_len )
+ /* no more valid transactions */
+ break;
+
+
+ DEBUG_F( "Found valid transaction %u/%u at %u.\n",
+ le32_to_cpu(desc.j_trans_id), le32_to_cpu(desc.j_mount_id),
+ desc_block );
+
+
+ next_trans_id++;
+ if ( journal_table < JOURNAL_END )
+ {
+ if ( ( journal_table + 1 + le32_to_cpu(desc.j_len) ) >= JOURNAL_END )
+ {
+ /* The table is almost full; mark the end of the cached * *
+ * journal. */
+ *journal_table = 0xffffffff;
+ journal_table = JOURNAL_END;
+ }
+ else
+ {
+ int i;
+
+ /* Cache the length and the realblock numbers in the table. *
+ * The block number of descriptor can easily be computed. *
+ * and need not to be stored here. */
+ *journal_table++ = desc.j_len;
+ for ( i = 0; i < le32_to_cpu(desc.j_len) && i < JOURNAL_TRANS_HALF; i++ )
+ {
+ *journal_table++ = desc.j_realblock[i];
+
+ DEBUG_F( "block %u is in journal %u.\n",
+ le32_to_cpu(desc.j_realblock[i]), desc_block );
+
+ }
+ for ( ; i < le32_to_cpu(desc.j_len); i++ )
+ {
+ *journal_table++ =
+ commit.j_realblock[i - JOURNAL_TRANS_HALF];
+
+ DEBUG_F( "block %u is in journal %u.\n",
+ le32_to_cpu(commit.j_realblock[i - JOURNAL_TRANS_HALF]),
+ desc_block );
+
+ }
+ }
+ }
+ desc_block = (commit_block + 1) & (block_count - 1);
+ }
+
+ DEBUG_F( "Transaction %u/%u at %u isn't valid.\n",
+ le32_to_cpu(desc.j_trans_id), le32_to_cpu(desc.j_mount_id),
+ desc_block );
+
+
+ INFO->journal_transactions
+ = next_trans_id - le32_to_cpu(header.j_last_flush_trans_id) - 1;
+ return (errnum == 0);
+}
+
+/* check filesystem types and read superblock into memory buffer */
+static int
+reiserfs_read_super( void )
+{
+ struct reiserfs_super_block super;
+ __u64 superblock = REISERFS_SUPERBLOCK_BLOCK;
+
+ if (read_disk_block(INFO->file, superblock, 0, sizeof(super), &super) != sizeof(super)) {
+ DEBUG_F("read_disk_block failed!\n");
+ return 0;
+ }
+
+ DEBUG_F( "Found super->magic: \"%s\"\n", super.s_magic );
+
+ if( strcmp( REISER2FS_SUPER_MAGIC_STRING, super.s_magic ) != 0 &&
+ strcmp( REISERFS_SUPER_MAGIC_STRING, super.s_magic ) != 0 )
+ {
+ /* Try old super block position */
+ superblock = REISERFS_OLD_SUPERBLOCK_BLOCK;
+
+ if (read_disk_block( INFO->file, superblock, 0, sizeof (super), &super ) != sizeof(super)) {
+ DEBUG_F("read_disk_block failed!\n");
+ return 0;
+ }
+
+ if ( strcmp( REISER2FS_SUPER_MAGIC_STRING, super.s_magic ) != 0 &&
+ strcmp( REISERFS_SUPER_MAGIC_STRING, super.s_magic ) != 0 )
+ {
+ /* pre journaling super block - untested */
+ if ( strcmp( REISERFS_SUPER_MAGIC_STRING,
+ (char *) ((__u32) &super + 20 ) ) != 0 )
+ return 0;
+
+ super.s_blocksize = cpu_to_le16(REISERFS_OLD_BLOCKSIZE);
+ super.s_journal_block = 0;
+ super.s_version = 0;
+ }
+ }
+
+ DEBUG_F( "ReiserFS superblock data:\n" );
+ DEBUG_F( "Block count: %u\n", le32_to_cpu(super.s_block_count) )
+ DEBUG_F( "Free blocks: %u\n", le32_to_cpu(super.s_free_blocks) );
+ DEBUG_F( "Journal block: %u\n", le32_to_cpu(super.s_journal_block) );
+ DEBUG_F( "Journal size (in blocks): %u\n",
+ le32_to_cpu(super.s_orig_journal_size) );
+ DEBUG_F( "Root block: %u\n\n", le32_to_cpu(super.s_root_block) );
+
+
+ INFO->version = le16_to_cpu(super.s_version);
+ INFO->blocksize = le16_to_cpu(super.s_blocksize);
+ INFO->blocksize_shift = log2( INFO->blocksize );
+
+ INFO->journal_block = le32_to_cpu(super.s_journal_block);
+ INFO->journal_block_count = le32_to_cpu(super.s_orig_journal_size);
+
+ INFO->cached_slots = (FSYSREISER_CACHE_SIZE >> INFO->blocksize_shift) - 1;
+
+ /* At this point, we've found a valid superblock. If we run into problems
+ * mounting the FS, the user should probably know. */
+
+ /* A few sanity checks ... */
+ if ( INFO->version > REISERFS_MAX_SUPPORTED_VERSION )
+ {
+ prom_printf( "ReiserFS: Unsupported version field: %u\n",
+ INFO->version );
+ return 0;
+ }
+
+ if ( INFO->blocksize < FSYSREISER_MIN_BLOCKSIZE
+ || INFO->blocksize > FSYSREISER_MAX_BLOCKSIZE )
+ {
+ prom_printf( "ReiserFS: Unsupported block size: %u\n",
+ INFO->blocksize );
+ return 0;
+ }
+
+ /* Setup the journal.. */
+ if ( INFO->journal_block != 0 )
+ {
+ if ( !is_power_of_two( INFO->journal_block_count ) )
+ {
+ prom_printf( "ReiserFS: Unsupported journal size, "
+ "not a power of 2: %u\n",
+ INFO->journal_block_count );
+ return 0;
+ }
+
+ journal_init();
+ /* Read in super block again, maybe it is in the journal */
+ block_read( superblock, 0, sizeof (struct reiserfs_super_block),
+ (char *) &super );
+ }
+
+ /* Read in the root block */
+ if ( !block_read( le32_to_cpu(super.s_root_block), 0,
+ INFO->blocksize, ROOT ) )
+ {
+ prom_printf( "ReiserFS: Failed to read in root block\n" );
+ return 0;
+ }
+
+ /* The root node is always the "deepest", so we can
+ determine the hieght of the tree using it. */
+ INFO->tree_depth = blkh_level(BLOCKHEAD(ROOT));
+
+
+ DEBUG_F( "root read_in: block=%u, depth=%u\n",
+ le32_to_cpu(super.s_root_block), INFO->tree_depth );
+
+ if ( INFO->tree_depth >= REISERFS_MAX_TREE_HEIGHT )
+ {
+ prom_printf( "ReiserFS: Unsupported tree depth (too deep): %u\n",
+ INFO->tree_depth );
+ return 0;
+ }
+
+ if ( INFO->tree_depth == BLKH_LEVEL_LEAF )
+ {
+ /* There is only one node in the whole filesystem, which is
+ simultanously leaf and root */
+ memcpy( LEAF, ROOT, INFO->blocksize );
+ }
+ return 1;
+}
+
+/***************** TREE ACCESSING METHODS *****************************/
+
+/* I assume you are familiar with the ReiserFS tree, if not go to
+ * http://devlinux.com/projects/reiserfs/
+ *
+ * My tree node cache is organized as following
+ * 0 ROOT node
+ * 1 LEAF node (if the ROOT is also a LEAF it is copied here
+ * 2-n other nodes on current path from bottom to top.
+ * if there is not enough space in the cache, the top most are
+ * omitted.
+ *
+ * I have only two methods to find a key in the tree:
+ * search_stat(dir_id, objectid) searches for the stat entry (always
+ * the first entry) of an object.
+ * next_key() gets the next key in tree order.
+ *
+ * This means, that I can only sequential reads of files are
+ * efficient, but this really doesn't hurt for grub.
+ */
+
+/* Read in the node at the current path and depth into the node cache.
+ * You must set INFO->blocks[depth] before.
+ */
+static char *
+read_tree_node( __u32 blockNr, __u16 depth )
+{
+ char *cache = CACHE(depth);
+ int num_cached = INFO->cached_slots;
+ errnum = 0;
+
+ if ( depth < num_cached )
+ {
+ /* This is the cached part of the path.
+ Check if same block is needed. */
+ if ( blockNr == INFO->blocks[depth] )
+ return cache;
+ }
+ else
+ cache = CACHE(num_cached);
+
+ DEBUG_F( " next read_in: block=%u (depth=%u)\n", blockNr, depth );
+
+ if ( !block_read( blockNr, 0, INFO->blocksize, cache ) )
+ {
+ DEBUG_F( "block_read failed\n" );
+ return 0;
+ }
+
+ DEBUG_F( "FOUND: blk_level=%u, blk_nr_item=%u, blk_free_space=%u\n",
+ blkh_level(BLOCKHEAD(cache)),
+ blkh_nr_item(BLOCKHEAD(cache)),
+ le16_to_cpu(BLOCKHEAD(cache)->blk_free_space) );
+
+ /* Make sure it has the right node level */
+ if ( blkh_level(BLOCKHEAD(cache)) != depth )
+ {
+ DEBUG_F( "depth = %u != %u\n", blkh_level(BLOCKHEAD(cache)), depth );
+ DEBUG_LEAVE(FILE_ERR_BAD_FSYS);
+ errnum = FILE_ERR_BAD_FSYS;
+ return 0;
+ }
+
+ INFO->blocks[depth] = blockNr;
+ return cache;
+}
+
+/* Get the next key, i.e. the key following the last retrieved key in
+ * tree order. INFO->current_ih and
+ * INFO->current_info are adapted accordingly. */
+static int
+next_key( void )
+{
+ __u16 depth;
+ struct item_head *ih = INFO->current_ih + 1;
+ char *cache;
+
+
+ DEBUG_F( "next_key:\n old ih: key %u:%u:%u:%u version:%u\n",
+ le32_to_cpu(INFO->current_ih->ih_key.k_dir_id),
+ le32_to_cpu(INFO->current_ih->ih_key.k_objectid),
+ le32_to_cpu(INFO->current_ih->ih_key.u.k_offset_v1.k_offset),
+ le32_to_cpu(INFO->current_ih->ih_key.u.k_offset_v1.k_uniqueness),
+ ih_version(INFO->current_ih) );
+
+
+ if ( ih == &ITEMHEAD[blkh_nr_item(BLOCKHEAD( LEAF ))] )
+ {
+ depth = BLKH_LEVEL_LEAF;
+ /* The last item, was the last in the leaf node. * Read in the next
+ * * block */
+ do
+ {
+ if ( depth == INFO->tree_depth )
+ {
+ /* There are no more keys at all. * Return a dummy item with
+ * * MAX_KEY */
+ ih =
+ ( struct item_head * )
+ &BLOCKHEAD( LEAF )->blk_right_delim_key;
+ goto found;
+ }
+ depth++;
+
+ DEBUG_F( " depth=%u, i=%u\n", depth, INFO->next_key_nr[depth] );
+
+ }
+ while ( INFO->next_key_nr[depth] == 0 );
+
+ if ( depth == INFO->tree_depth )
+ cache = ROOT;
+ else if ( depth <= INFO->cached_slots )
+ cache = CACHE( depth );
+ else
+ {
+ cache = read_tree_node( INFO->blocks[depth], --depth );
+ if ( !cache )
+ return 0;
+ }
+
+ do
+ {
+ __u16 nr_item = blkh_nr_item(BLOCKHEAD( cache ));
+ int key_nr = INFO->next_key_nr[depth]++;
+
+
+ DEBUG_F( " depth=%u, i=%u/%u\n", depth, key_nr, nr_item );
+
+ if ( key_nr == nr_item )
+ /* This is the last item in this block, set the next_key_nr *
+ * to 0 */
+ INFO->next_key_nr[depth] = 0;
+
+ cache =
+ read_tree_node( dc_block_number( &(DC( cache )[key_nr])),
+ --depth );
+ if ( !cache )
+ return 0;
+ }
+ while ( depth > BLKH_LEVEL_LEAF );
+
+ ih = ITEMHEAD;
+ }
+found:
+ INFO->current_ih = ih;
+ INFO->current_item = &LEAF[ih_location(ih)];
+
+ DEBUG_F( " new ih: key %u:%u:%u:%u version:%u\n",
+ le32_to_cpu(INFO->current_ih->ih_key.k_dir_id),
+ le32_to_cpu(INFO->current_ih->ih_key.k_objectid),
+ le32_to_cpu(INFO->current_ih->ih_key.u.k_offset_v1.k_offset),
+ le32_to_cpu(INFO->current_ih->ih_key.u.k_offset_v1.k_uniqueness),
+ ih_version(INFO->current_ih) );
+
+ return 1;
+}
+
+/* preconditions: reiserfs_read_super already executed, therefore
+ * INFO block is valid
+ * returns: 0 if error (errnum is set),
+ * nonzero iff we were able to find the key successfully.
+ * postconditions: on a nonzero return, the current_ih and
+ * current_item fields describe the key that equals the
+ * searched key. INFO->next_key contains the next key after
+ * the searched key.
+ * side effects: messes around with the cache.
+ */
+static int
+search_stat( __u32 dir_id, __u32 objectid )
+{
+ char *cache;
+ int depth;
+ int nr_item;
+ int i;
+ struct item_head *ih;
+ errnum = 0;
+
+ DEBUG_F( "search_stat:\n key %u:%u:0:0\n", le32_to_cpu(dir_id),
+ le32_to_cpu(objectid) );
+
+
+ depth = INFO->tree_depth;
+ cache = ROOT;
+
+ DEBUG_F( "depth = %d\n", depth );
+ while ( depth > BLKH_LEVEL_LEAF )
+ {
+ struct key *key;
+
+ nr_item = blkh_nr_item(BLOCKHEAD( cache ));
+
+ key = KEY( cache );
+
+ for ( i = 0; i < nr_item; i++ )
+ {
+ if (le32_to_cpu(key->k_dir_id) > le32_to_cpu(dir_id)
+ || (key->k_dir_id == dir_id
+ && (le32_to_cpu(key->k_objectid) > le32_to_cpu(objectid)
+ || (key->k_objectid == objectid
+ && (key->u.k_offset_v1.k_offset
+ | key->u.k_offset_v1.k_uniqueness) > 0))))
+ break;
+ key++;
+ }
+
+
+ DEBUG_F( " depth=%d, i=%d/%d\n", depth, i, nr_item );
+
+ INFO->next_key_nr[depth] = ( i == nr_item ) ? 0 : i + 1;
+ cache = read_tree_node( dc_block_number(&(DC(cache)[i])), --depth );
+ if ( !cache )
+ return 0;
+ }
+
+ /* cache == LEAF */
+ nr_item = blkh_nr_item(BLOCKHEAD(LEAF));
+ ih = ITEMHEAD;
+ DEBUG_F( "nr_item = %d\n", nr_item );
+ for ( i = 0; i < nr_item; i++ )
+ {
+ if ( ih->ih_key.k_dir_id == dir_id
+ && ih->ih_key.k_objectid == objectid
+ && ih->ih_key.u.k_offset_v1.k_offset == 0
+ && ih->ih_key.u.k_offset_v1.k_uniqueness == 0 )
+ {
+
+ DEBUG_F( " depth=%d, i=%d/%d\n", depth, i, nr_item );
+
+ INFO->current_ih = ih;
+ INFO->current_item = &LEAF[ih_location(ih)];
+
+ return 1;
+ }
+
+ ih++;
+ }
+
+ DEBUG_LEAVE(FILE_ERR_BAD_FSYS);
+ errnum = FILE_ERR_BAD_FSYS;
+ return 0;
+}
+
+static int
+reiserfs_read_data( char *buf, __u32 len )
+{
+ __u32 blocksize;
+ __u32 offset;
+ __u32 to_read;
+ char *prev_buf = buf;
+ errnum = 0;
+
+ DEBUG_F( "reiserfs_read_data: INFO->file->pos=%Lu len=%u, offset=%Lu\n",
+ INFO->file->pos, len, (__u64) IH_KEY_OFFSET(INFO->current_ih) - 1 );
+
+
+ if ( INFO->current_ih->ih_key.k_objectid != INFO->fileinfo.k_objectid
+ || IH_KEY_OFFSET( INFO->current_ih ) > INFO->file->pos + 1 )
+ {
+ search_stat( INFO->fileinfo.k_dir_id, INFO->fileinfo.k_objectid );
+ goto get_next_key;
+ }
+
+ while ( errnum == 0 )
+ {
+ if ( INFO->current_ih->ih_key.k_objectid != INFO->fileinfo.k_objectid )
+ break;
+
+ offset = INFO->file->pos - IH_KEY_OFFSET( INFO->current_ih ) + 1;
+ blocksize = ih_item_len(INFO->current_ih);
+
+
+ DEBUG_F( " loop: INFO->file->pos=%Lu len=%u, offset=%u blocksize=%u\n",
+ INFO->file->pos, len, offset, blocksize );
+
+
+ if ( IH_KEY_ISTYPE( INFO->current_ih, TYPE_DIRECT )
+ && offset < blocksize )
+ {
+ to_read = blocksize - offset;
+ if ( to_read > len )
+ to_read = len;
+
+ memcpy( buf, INFO->current_item + offset, to_read );
+ goto update_buf_len;
+ }
+ else if ( IH_KEY_ISTYPE( INFO->current_ih, TYPE_INDIRECT ) )
+ {
+ blocksize = ( blocksize >> 2 ) << INFO->blocksize_shift;
+
+ while ( offset < blocksize )
+ {
+ __u32 blocknr = le32_to_cpu(((__u32 *)
+ INFO->current_item)[offset >> INFO->blocksize_shift]);
+
+ int blk_offset = offset & (INFO->blocksize - 1);
+
+ to_read = INFO->blocksize - blk_offset;
+ if ( to_read > len )
+ to_read = len;
+
+ /* Journal is only for meta data.
+ Data blocks can be read directly without using block_read */
+ read_disk_block( INFO->file, blocknr, blk_offset, to_read,
+ buf );
+
+ update_buf_len:
+ len -= to_read;
+ buf += to_read;
+ offset += to_read;
+ INFO->file->pos += to_read;
+ if ( len == 0 )
+ goto done;
+ }
+ }
+ get_next_key:
+ next_key();
+ }
+done:
+ return (errnum != 0) ? 0 : buf - prev_buf;
+}
+
+
+/* preconditions: reiserfs_read_super already executed, therefore
+ * INFO block is valid
+ * returns: 0 if error, nonzero iff we were able to find the file successfully
+ * postconditions: on a nonzero return, INFO->fileinfo contains the info
+ * of the file we were trying to look up, filepos is 0 and filemax is
+ * the size of the file.
+ */
+static int
+reiserfs_open_file( char *dirname )
+{
+ struct reiserfs_de_head *de_head;
+ char *rest, ch;
+ __u32 dir_id, objectid, parent_dir_id = 0, parent_objectid = 0;
+
+ char linkbuf[PATH_MAX]; /* buffer for following symbolic links */
+ int link_count = 0;
+ int mode;
+ errnum = 0;
+
+ dir_id = cpu_to_le32(REISERFS_ROOT_PARENT_OBJECTID);
+ objectid = cpu_to_le32(REISERFS_ROOT_OBJECTID);
+
+ while ( 1 )
+ {
+
+ DEBUG_F( "dirname=%s\n", dirname );
+
+ /* Search for the stat info first. */
+ if ( !search_stat( dir_id, objectid ) )
+ return 0;
+
+
+ DEBUG_F( "sd_mode=0%o sd_size=%Lu\n",
+ sd_mode((struct stat_data *) INFO->current_item ),
+ sd_size(INFO->current_ih, INFO->current_item ));
+
+
+ mode = sd_mode((struct stat_data *)INFO->current_item);
+
+ /* If we've got a symbolic link, then chase it. */
+ if ( S_ISLNK( mode ) )
+ {
+ int len = 0;
+
+ DEBUG_F("link count = %d\n", link_count);
+ DEBUG_SLEEP;
+ if ( ++link_count > MAX_LINK_COUNT )
+ {
+ DEBUG_F("Symlink loop\n");
+ errnum = FILE_ERR_SYMLINK_LOOP;
+ return 0;
+ }
+
+ /* Get the symlink size. */
+ INFO->file->len = sd_size(INFO->current_ih, INFO->current_item);
+
+ /* Find out how long our remaining name is. */
+ while ( dirname[len] && !isspace( dirname[len] ) )
+ len++;
+
+ if ( INFO->file->len + len > sizeof ( linkbuf ) - 1 )
+ {
+ errnum = FILE_ERR_LENGTH;
+ return 0;
+ }
+
+ /* Copy the remaining name to the end of the symlink data. Note *
+ * that DIRNAME and LINKBUF may overlap! */
+ memmove( linkbuf + INFO->file->len, dirname, len + 1 );
+
+ INFO->fileinfo.k_dir_id = dir_id;
+ INFO->fileinfo.k_objectid = objectid;
+ INFO->file->pos = 0;
+ if ( !next_key()
+ || reiserfs_read_data( linkbuf, INFO->file->len ) != INFO->file->len ) {
+ DEBUG_F("reiserfs_open_file - if !next_key || reiserfs_read_data\n");
+ DEBUG_SLEEP;
+ errnum = FILE_IOERR;
+ return 0;
+ }
+
+
+ DEBUG_F( "symlink=%s\n", linkbuf );
+ DEBUG_SLEEP;
+
+ dirname = linkbuf;
+ if ( *dirname == '/' )
+ {
+ /* It's an absolute link, so look it up in root. */
+ dir_id = cpu_to_le32(REISERFS_ROOT_PARENT_OBJECTID);
+ objectid = cpu_to_le32(REISERFS_ROOT_OBJECTID);
+ }
+ else
+ {
+ /* Relative, so look it up in our parent directory. */
+ dir_id = parent_dir_id;
+ objectid = parent_objectid;
+ }
+
+ /* Now lookup the new name. */
+ continue;
+ }
+
+ /* if we have a real file (and we're not just printing *
+ * possibilities), then this is where we want to exit */
+
+ if ( !*dirname || isspace( *dirname ) )
+ {
+ if ( !S_ISREG( mode ) )
+ {
+ errnum = FILE_ERR_BAD_TYPE;
+ return 0;
+ }
+
+ INFO->file->pos = 0;
+ INFO->file->len = sd_size(INFO->current_ih, INFO->current_item);
+
+ INFO->fileinfo.k_dir_id = dir_id;
+ INFO->fileinfo.k_objectid = objectid;
+ return next_key();
+ }
+
+ /* continue with the file/directory name interpretation */
+ while ( *dirname == '/' )
+ dirname++;
+ if ( !S_ISDIR( mode ) )
+ {
+ errnum = FILE_ERR_NOTDIR;
+ return 0;
+ }
+ for ( rest = dirname; ( ch = *rest ) && !isspace( ch ) && ch != '/';
+ rest++ ) ;
+ *rest = 0;
+
+ while ( 1 )
+ {
+ char *name_end;
+ int num_entries;
+
+ if ( !next_key() )
+ return 0;
+
+ if ( INFO->current_ih->ih_key.k_objectid != objectid )
+ break;
+
+ name_end = INFO->current_item + ih_item_len(INFO->current_ih);
+ de_head = ( struct reiserfs_de_head * ) INFO->current_item;
+ num_entries = ih_entry_count(INFO->current_ih);
+ while ( num_entries > 0 )
+ {
+ char *filename = INFO->current_item + deh_location(de_head);
+ char tmp = *name_end;
+
+ if( deh_state(de_head) & (1 << DEH_Visible))
+ {
+ int cmp;
+
+ /* Directory names in ReiserFS are not null * terminated.
+ * We write a temporary 0 behind it. * NOTE: that this
+ * may overwrite the first block in * the tree cache.
+ * That doesn't hurt as long as we * don't call next_key
+ * () in between. */
+ *name_end = 0;
+ cmp = strcmp( dirname, filename );
+ *name_end = tmp;
+ if ( cmp == 0 )
+ goto found;
+ }
+ /* The beginning of this name marks the end of the next name.
+ */
+ name_end = filename;
+ de_head++;
+ num_entries--;
+ }
+ }
+
+ errnum = FILE_ERR_NOTFOUND;
+ *rest = ch;
+ return 0;
+
+ found:
+ *rest = ch;
+ dirname = rest;
+
+ parent_dir_id = dir_id;
+ parent_objectid = objectid;
+ dir_id = de_head->deh_dir_id; /* LE */
+ objectid = de_head->deh_objectid; /* LE */
+ }
+}
+
+
+
+#ifndef __LITTLE_ENDIAN
+typedef union {
+ struct offset_v2 offset_v2;
+ __u64 linear;
+} offset_v2_esafe_overlay;
+
+inline __u16
+offset_v2_k_type( struct offset_v2 *v2 )
+{
+ offset_v2_esafe_overlay tmp = *(offset_v2_esafe_overlay *)v2;
+ tmp.linear = le64_to_cpu( tmp.linear );
+ return tmp.offset_v2.k_type;
+}
+
+inline loff_t
+offset_v2_k_offset( struct offset_v2 *v2 )
+{
+ offset_v2_esafe_overlay tmp = *(offset_v2_esafe_overlay *)v2;
+ tmp.linear = le64_to_cpu( tmp.linear );
+ return tmp.offset_v2.k_offset;
+}
+#endif
+
+inline int
+uniqueness2type (__u32 uniqueness)
+{
+ switch (uniqueness) {
+ case V1_SD_UNIQUENESS: return TYPE_STAT_DATA;
+ case V1_INDIRECT_UNIQUENESS: return TYPE_INDIRECT;
+ case V1_DIRECT_UNIQUENESS: return TYPE_DIRECT;
+ case V1_DIRENTRY_UNIQUENESS: return TYPE_DIRENTRY;
+ }
+ return TYPE_ANY;
+}
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 5
+ * End:
+ */
Added: trunk/yaboot/second/fs_xfs.c
===================================================================
--- trunk/yaboot/second/fs_xfs.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/fs_xfs.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,786 @@
+/*
+ * fs_xfs.c - an implementation for the SGI XFS file system
+ *
+ * Copyright (C) 2001, 2002 Ethan Benson
+ *
+ * Adapted from Grub
+ *
+ * Copyright (C) 2001 Serguei Tzukanov
+ *
+ * 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.
+ */
+
+#include "types.h"
+#include "ctype.h"
+#include "string.h"
+#include "stdlib.h"
+#include "fs.h"
+#include "xfs/xfs.h"
+#include "errors.h"
+#include "debug.h"
+
+#define SECTOR_BITS 9
+
+int xfs_mount (void);
+int xfs_read_data (char *buf, int len);
+int xfs_dir (char *dirname);
+
+/* Exported in struct fs_t */
+static int xfs_open(struct boot_file_t *file, const char *dev_name,
+ struct partition_t *part, const char *file_name);
+static int xfs_read(struct boot_file_t *file, unsigned int size, void *buffer);
+static int xfs_seek(struct boot_file_t *file, unsigned int newpos);
+static int xfs_close(struct boot_file_t *file);
+
+struct fs_t xfs_filesystem = {
+ name:"xfs",
+ open:xfs_open,
+ read:xfs_read,
+ seek:xfs_seek,
+ close:xfs_close
+};
+
+struct boot_file_t *xfs_file;
+static char FSYS_BUF[32768];
+uint64_t partition_offset;
+int errnum;
+
+static int
+xfs_open(struct boot_file_t *file, const char *dev_name,
+ struct partition_t *part, const char *file_name)
+{
+ static char buffer[1024];
+
+ DEBUG_ENTER;
+ DEBUG_OPEN;
+
+ if (part)
+ {
+ DEBUG_F("Determining offset for partition %d\n", part->part_number);
+ partition_offset = ((uint64_t) part->part_start) * part->blocksize;
+ DEBUG_F("%Lu = %lu * %hu\n", partition_offset,
+ part->part_start,
+ part->blocksize);
+ }
+ else
+ partition_offset = 0;
+
+ sprintf(buffer, "%s:%d", dev_name, 0); /* 0 is full disk in OF */
+ DEBUG_F("Trying to open dev_name=%s; filename=%s; partition offset=%Lu\n",
+ buffer, file_name, partition_offset);
+ file->of_device = prom_open(buffer);
+
+ if (file->of_device == PROM_INVALID_HANDLE || file->of_device == NULL)
+ {
+ DEBUG_F("Can't open device %p\n", file->of_device);
+ DEBUG_LEAVE(FILE_ERR_BADDEV);
+ return FILE_ERR_BADDEV;
+ }
+
+ DEBUG_F("%p was successfully opened\n", file->of_device);
+
+ xfs_file = file;
+
+ if (xfs_mount() != 1)
+ {
+ DEBUG_F("Couldn't open XFS @ %s/%Lu\n", buffer, partition_offset);
+ prom_close(file->of_device);
+ DEBUG_LEAVE(FILE_ERR_BAD_FSYS);
+ DEBUG_SLEEP;
+ return FILE_ERR_BAD_FSYS;
+ }
+
+ DEBUG_F("Attempting to open %s\n", file_name);
+ strcpy(buffer, file_name); /* xfs_dir modifies argument */
+ if(!xfs_dir(buffer))
+ {
+ DEBUG_F("xfs_dir() failed. errnum = %d\n", errnum);
+ prom_close( file->of_device );
+ DEBUG_LEAVE_F(errnum);
+ DEBUG_SLEEP;
+ return errnum;
+ }
+
+ DEBUG_F("Successfully opened %s\n", file_name);
+
+ DEBUG_LEAVE(FILE_ERR_OK);
+ return FILE_ERR_OK;
+}
+
+static int
+xfs_read(struct boot_file_t *file, unsigned int size, void *buffer)
+{
+ return xfs_read_data(buffer, size);
+}
+
+static int
+xfs_seek(struct boot_file_t *file, unsigned int newpos)
+{
+ file->pos = newpos;
+ return FILE_ERR_OK;
+}
+
+static int
+xfs_close(struct boot_file_t *file)
+{
+ if(file->of_device)
+ {
+ prom_close(file->of_device);
+ file->of_device = 0;
+ DEBUG_F("xfs_close called\n");
+ }
+ return FILE_ERR_OK;
+}
+
+static int
+read_disk_block(struct boot_file_t *file, uint64_t block, int start,
+ int length, void *buf)
+{
+ uint64_t pos = block * 512;
+ pos += partition_offset + start;
+ DEBUG_F("Reading %d bytes, starting at block %Lu, disk offset %Lu\n",
+ length, block, pos);
+ if (!prom_lseek(file->of_device, pos)) {
+ DEBUG_F("prom_lseek failed\n");
+ return 0;
+ }
+ return prom_read(file->of_device, buf, length);
+}
+
+#define MAX_LINK_COUNT 8
+
+typedef struct xad {
+ xfs_fileoff_t offset;
+ xfs_fsblock_t start;
+ xfs_filblks_t len;
+} xad_t;
+
+struct xfs_info {
+ int bsize;
+ int dirbsize;
+ int isize;
+ unsigned int agblocks;
+ int bdlog;
+ int blklog;
+ int inopblog;
+ int agblklog;
+ int agnolog;
+ int dirblklog;
+ unsigned int nextents;
+ xfs_daddr_t next;
+ xfs_daddr_t daddr;
+ xfs_dablk_t forw;
+ xfs_dablk_t dablk;
+ xfs_bmbt_rec_32_t *xt;
+ xfs_bmbt_ptr_t ptr0;
+ int btnode_ptr0_off;
+ int i8param;
+ int dirpos;
+ int dirmax;
+ int blkoff;
+ int fpos;
+ xfs_ino_t rootino;
+};
+
+static struct xfs_info xfs;
+
+#define dirbuf ((char *)FSYS_BUF)
+#define filebuf ((char *)FSYS_BUF + 4096)
+#define inode ((xfs_dinode_t *)((char *)FSYS_BUF + 8192))
+#define icore (inode->di_core)
+
+#define mask32lo(n) (((__uint32_t)1 << (n)) - 1)
+
+#define XFS_INO_MASK(k) ((__uint32_t)((1ULL << (k)) - 1))
+#define XFS_INO_OFFSET_BITS xfs.inopblog
+#define XFS_INO_AGBNO_BITS xfs.agblklog
+#define XFS_INO_AGINO_BITS (xfs.agblklog + xfs.inopblog)
+#define XFS_INO_AGNO_BITS xfs.agnolog
+
+static inline xfs_agblock_t
+agino2agbno (xfs_agino_t agino)
+{
+ return agino >> XFS_INO_OFFSET_BITS;
+}
+
+static inline xfs_agnumber_t
+ino2agno (xfs_ino_t ino)
+{
+ return ino >> XFS_INO_AGINO_BITS;
+}
+
+static inline xfs_agino_t
+ino2agino (xfs_ino_t ino)
+{
+ return ino & XFS_INO_MASK(XFS_INO_AGINO_BITS);
+}
+
+static inline int
+ino2offset (xfs_ino_t ino)
+{
+ return ino & XFS_INO_MASK(XFS_INO_OFFSET_BITS);
+}
+
+/* XFS is big endian, powerpc is big endian */
+#define le16(x) (x)
+#define le32(x) (x)
+#define le64(x) (x)
+
+static xfs_fsblock_t
+xt_start (xfs_bmbt_rec_32_t *r)
+{
+ return (((xfs_fsblock_t)(le32 (r->l1) & mask32lo(9))) << 43) |
+ (((xfs_fsblock_t)le32 (r->l2)) << 11) |
+ (((xfs_fsblock_t)le32 (r->l3)) >> 21);
+}
+
+static xfs_fileoff_t
+xt_offset (xfs_bmbt_rec_32_t *r)
+{
+ return (((xfs_fileoff_t)le32 (r->l0) &
+ mask32lo(31)) << 23) |
+ (((xfs_fileoff_t)le32 (r->l1)) >> 9);
+}
+
+static xfs_filblks_t
+xt_len (xfs_bmbt_rec_32_t *r)
+{
+ return le32(r->l3) & mask32lo(21);
+}
+
+static const char xfs_highbit[256] = {
+ -1, 0, 1, 1, 2, 2, 2, 2, /* 00 .. 07 */
+ 3, 3, 3, 3, 3, 3, 3, 3, /* 08 .. 0f */
+ 4, 4, 4, 4, 4, 4, 4, 4, /* 10 .. 17 */
+ 4, 4, 4, 4, 4, 4, 4, 4, /* 18 .. 1f */
+ 5, 5, 5, 5, 5, 5, 5, 5, /* 20 .. 27 */
+ 5, 5, 5, 5, 5, 5, 5, 5, /* 28 .. 2f */
+ 5, 5, 5, 5, 5, 5, 5, 5, /* 30 .. 37 */
+ 5, 5, 5, 5, 5, 5, 5, 5, /* 38 .. 3f */
+ 6, 6, 6, 6, 6, 6, 6, 6, /* 40 .. 47 */
+ 6, 6, 6, 6, 6, 6, 6, 6, /* 48 .. 4f */
+ 6, 6, 6, 6, 6, 6, 6, 6, /* 50 .. 57 */
+ 6, 6, 6, 6, 6, 6, 6, 6, /* 58 .. 5f */
+ 6, 6, 6, 6, 6, 6, 6, 6, /* 60 .. 67 */
+ 6, 6, 6, 6, 6, 6, 6, 6, /* 68 .. 6f */
+ 6, 6, 6, 6, 6, 6, 6, 6, /* 70 .. 77 */
+ 6, 6, 6, 6, 6, 6, 6, 6, /* 78 .. 7f */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* 80 .. 87 */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* 88 .. 8f */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* 90 .. 97 */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* 98 .. 9f */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* a0 .. a7 */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* a8 .. af */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* b0 .. b7 */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* b8 .. bf */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* c0 .. c7 */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* c8 .. cf */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* d0 .. d7 */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* d8 .. df */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* e0 .. e7 */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* e8 .. ef */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* f0 .. f7 */
+ 7, 7, 7, 7, 7, 7, 7, 7, /* f8 .. ff */
+};
+
+static int
+xfs_highbit32(__uint32_t v)
+{
+ int i;
+
+ if (v & 0xffff0000)
+ if (v & 0xff000000)
+ i = 24;
+ else
+ i = 16;
+ else if (v & 0x0000ffff)
+ if (v & 0x0000ff00)
+ i = 8;
+ else
+ i = 0;
+ else
+ return -1;
+ return i + xfs_highbit[(v >> i) & 0xff];
+}
+
+static int
+isinxt (xfs_fileoff_t key, xfs_fileoff_t offset, xfs_filblks_t len)
+{
+ return (key >= offset) ? (key < offset + len ? 1 : 0) : 0;
+}
+
+static xfs_daddr_t
+agb2daddr (xfs_agnumber_t agno, xfs_agblock_t agbno)
+{
+ return ((xfs_fsblock_t)agno*xfs.agblocks + agbno) << xfs.bdlog;
+}
+
+static xfs_daddr_t
+fsb2daddr (xfs_fsblock_t fsbno)
+{
+ return agb2daddr ((xfs_agnumber_t)(fsbno >> xfs.agblklog),
+ (xfs_agblock_t)(fsbno & mask32lo(xfs.agblklog)));
+}
+
+static inline int
+btroot_maxrecs (void)
+{
+ int tmp = icore.di_forkoff ? (icore.di_forkoff << 3) : xfs.isize;
+
+ return (tmp - sizeof(xfs_bmdr_block_t) -
+ (int)((char *)&inode->di_u - (char*)inode)) /
+ (sizeof (xfs_bmbt_key_t) + sizeof (xfs_bmbt_ptr_t));
+}
+
+static int
+di_read (xfs_ino_t ino)
+{
+ xfs_agino_t agino;
+ xfs_agnumber_t agno;
+ xfs_agblock_t agbno;
+ xfs_daddr_t daddr;
+ int offset;
+
+ agno = ino2agno (ino);
+ agino = ino2agino (ino);
+ agbno = agino2agbno (agino);
+ offset = ino2offset (ino);
+ daddr = agb2daddr (agno, agbno);
+
+ read_disk_block(xfs_file, daddr, offset*xfs.isize, xfs.isize, (char *)inode);
+
+ xfs.ptr0 = *(xfs_bmbt_ptr_t *)
+ (inode->di_u.di_c + sizeof(xfs_bmdr_block_t)
+ + btroot_maxrecs ()*sizeof(xfs_bmbt_key_t));
+
+ return 1;
+}
+
+static void
+init_extents (void)
+{
+ xfs_bmbt_ptr_t ptr0;
+ xfs_btree_lblock_t h;
+
+ switch (icore.di_format) {
+ case XFS_DINODE_FMT_EXTENTS:
+ xfs.xt = inode->di_u.di_bmx;
+ xfs.nextents = le32 (icore.di_nextents);
+ break;
+ case XFS_DINODE_FMT_BTREE:
+ ptr0 = xfs.ptr0;
+ for (;;) {
+ xfs.daddr = fsb2daddr (le64(ptr0));
+ read_disk_block(xfs_file, xfs.daddr, 0,
+ sizeof(xfs_btree_lblock_t), (char *)&h);
+ if (!h.bb_level) {
+ xfs.nextents = le16(h.bb_numrecs);
+ xfs.next = fsb2daddr (le64(h.bb_leftsib));
+ xfs.fpos = sizeof(xfs_btree_block_t);
+ return;
+ }
+ read_disk_block(xfs_file, xfs.daddr, xfs.btnode_ptr0_off,
+ sizeof(xfs_bmbt_ptr_t), (char *)&ptr0);
+ }
+ }
+}
+
+static xad_t *
+next_extent (void)
+{
+ static xad_t xad;
+
+ switch (icore.di_format) {
+ case XFS_DINODE_FMT_EXTENTS:
+ if (xfs.nextents == 0)
+ return NULL;
+ break;
+ case XFS_DINODE_FMT_BTREE:
+ if (xfs.nextents == 0) {
+ xfs_btree_lblock_t h;
+ if (xfs.next == 0)
+ return NULL;
+ xfs.daddr = xfs.next;
+ read_disk_block(xfs_file, xfs.daddr, 0,
+ sizeof(xfs_btree_lblock_t), (char *)&h);
+ xfs.nextents = le16(h.bb_numrecs);
+ xfs.next = fsb2daddr (le64(h.bb_leftsib));
+ xfs.fpos = sizeof(xfs_btree_block_t);
+ }
+ /* Yeah, I know that's slow, but I really don't care */
+ read_disk_block(xfs_file, xfs.daddr, xfs.fpos,
+ sizeof(xfs_bmbt_rec_t), filebuf);
+ xfs.xt = (xfs_bmbt_rec_32_t *)filebuf;
+ xfs.fpos += sizeof(xfs_bmbt_rec_32_t);
+ break;
+ default:
+ return NULL;
+ }
+ xad.offset = xt_offset (xfs.xt);
+ xad.start = xt_start (xfs.xt);
+ xad.len = xt_len (xfs.xt);
+ ++xfs.xt;
+ --xfs.nextents;
+
+ return &xad;
+}
+
+/*
+ * Name lies - the function reads only first 100 bytes
+ */
+static void
+xfs_dabread (void)
+{
+ xad_t *xad;
+ xfs_fileoff_t offset;;
+
+ init_extents ();
+ while ((xad = next_extent ())) {
+ offset = xad->offset;
+ if (isinxt (xfs.dablk, offset, xad->len)) {
+ read_disk_block(xfs_file, fsb2daddr (xad->start + xfs.dablk - offset),
+ 0, 100, dirbuf);
+ break;
+ }
+ }
+}
+
+static inline xfs_ino_t
+sf_ino (char *sfe, int namelen)
+{
+ void *p = sfe + namelen + 3;
+
+ return (xfs.i8param == 0)
+ ? le64(*(xfs_ino_t *)p) : le32(*(__uint32_t *)p);
+}
+
+static inline xfs_ino_t
+sf_parent_ino (void)
+{
+ return (xfs.i8param == 0)
+ ? le64(*(xfs_ino_t *)(&inode->di_u.di_dir2sf.hdr.parent))
+ : le32(*(__uint32_t *)(&inode->di_u.di_dir2sf.hdr.parent));
+}
+
+static inline int
+roundup8 (int n)
+{
+ return ((n+7)&~7);
+}
+
+static char *
+next_dentry (xfs_ino_t *ino)
+{
+ int namelen = 1;
+ int toread;
+ static char *usual[2] = {".", ".."};
+ static xfs_dir2_sf_entry_t *sfe;
+ char *name = usual[0];
+
+ if (xfs.dirpos >= xfs.dirmax) {
+ if (xfs.forw == 0)
+ return NULL;
+ xfs.dablk = xfs.forw;
+ xfs_dabread ();
+#define h ((xfs_dir2_leaf_hdr_t *)dirbuf)
+ xfs.dirmax = le16 (h->count) - le16 (h->stale);
+ xfs.forw = le32 (h->info.forw);
+#undef h
+ xfs.dirpos = 0;
+ }
+
+ switch (icore.di_format) {
+ case XFS_DINODE_FMT_LOCAL:
+ switch (xfs.dirpos) {
+ case -2:
+ *ino = 0;
+ break;
+ case -1:
+ *ino = sf_parent_ino ();
+ ++name;
+ ++namelen;
+ sfe = (xfs_dir2_sf_entry_t *)
+ (inode->di_u.di_c
+ + sizeof(xfs_dir2_sf_hdr_t)
+ - xfs.i8param);
+ break;
+ default:
+ namelen = sfe->namelen;
+ *ino = sf_ino ((char *)sfe, namelen);
+ name = sfe->name;
+ sfe = (xfs_dir2_sf_entry_t *)
+ ((char *)sfe + namelen + 11 - xfs.i8param);
+ }
+ break;
+ case XFS_DINODE_FMT_BTREE:
+ case XFS_DINODE_FMT_EXTENTS:
+#define dau ((xfs_dir2_data_union_t *)dirbuf)
+ for (;;) {
+ if (xfs.blkoff >= xfs.dirbsize) {
+ xfs.blkoff = sizeof(xfs_dir2_data_hdr_t);
+ xfs_file->pos &= ~(xfs.dirbsize - 1);
+ xfs_file->pos |= xfs.blkoff;
+ }
+ xfs_read_data (dirbuf, 4);
+ xfs.blkoff += 4;
+ if (dau->unused.freetag == XFS_DIR2_DATA_FREE_TAG) {
+ toread = roundup8 (le16(dau->unused.length)) - 4;
+ xfs.blkoff += toread;
+ xfs_file->pos += toread;
+ continue;
+ }
+ break;
+ }
+ xfs_read_data ((char *)dirbuf + 4, 5);
+ *ino = le64 (dau->entry.inumber);
+ namelen = dau->entry.namelen;
+#undef dau
+ toread = roundup8 (namelen + 11) - 9;
+ xfs_read_data (dirbuf, toread);
+ name = (char *)dirbuf;
+ xfs.blkoff += toread + 5;
+ break;
+ }
+ ++xfs.dirpos;
+ name[namelen] = 0;
+
+ return name;
+}
+
+static char *
+first_dentry (xfs_ino_t *ino)
+{
+ xfs.forw = 0;
+ switch (icore.di_format) {
+ case XFS_DINODE_FMT_LOCAL:
+ xfs.dirmax = inode->di_u.di_dir2sf.hdr.count;
+ xfs.i8param = inode->di_u.di_dir2sf.hdr.i8count ? 0 : 4;
+ xfs.dirpos = -2;
+ break;
+ case XFS_DINODE_FMT_EXTENTS:
+ case XFS_DINODE_FMT_BTREE:
+ xfs_file->pos = 0;
+ xfs_file->len = le64 (icore.di_size);
+ xfs_read_data (dirbuf, sizeof(xfs_dir2_data_hdr_t));
+ if (((xfs_dir2_data_hdr_t *)dirbuf)->magic == le32(XFS_DIR2_BLOCK_MAGIC)) {
+#define tail ((xfs_dir2_block_tail_t *)dirbuf)
+ xfs_file->pos = xfs.dirbsize - sizeof(*tail);
+ xfs_read_data (dirbuf, sizeof(*tail));
+ xfs.dirmax = le32 (tail->count) - le32 (tail->stale);
+#undef tail
+ } else {
+ xfs.dablk = (1ULL << 35) >> xfs.blklog;
+#define h ((xfs_dir2_leaf_hdr_t *)dirbuf)
+#define n ((xfs_da_intnode_t *)dirbuf)
+ for (;;) {
+ xfs_dabread ();
+ if ((n->hdr.info.magic == le16(XFS_DIR2_LEAFN_MAGIC))
+ || (n->hdr.info.magic == le16(XFS_DIR2_LEAF1_MAGIC))) {
+ xfs.dirmax = le16 (h->count) - le16 (h->stale);
+ xfs.forw = le32 (h->info.forw);
+ break;
+ }
+ xfs.dablk = le32 (n->btree[0].before);
+ }
+#undef n
+#undef h
+ }
+ xfs.blkoff = sizeof(xfs_dir2_data_hdr_t);
+ xfs_file->pos = xfs.blkoff;
+ xfs.dirpos = 0;
+ break;
+ }
+ return next_dentry (ino);
+}
+
+int
+xfs_mount (void)
+{
+ xfs_sb_t super;
+
+ if (read_disk_block(xfs_file, 0, 0, sizeof(super), &super) != sizeof(super)) {
+ DEBUG_F("read_disk_block failed!\n");
+ return 0;
+ } else if (super.sb_magicnum != XFS_SB_MAGIC) {
+ DEBUG_F("xfs_mount: Bad magic: %x\n", super.sb_magicnum);
+ return 0;
+ } else if ((super.sb_versionnum & XFS_SB_VERSION_NUMBITS) != XFS_SB_VERSION_4) {
+ DEBUG_F("xfs_mount: Bad version: %x\n", super.sb_versionnum);
+ return 0;
+ }
+
+ xfs.bsize = le32 (super.sb_blocksize);
+ xfs.blklog = super.sb_blocklog;
+ xfs.bdlog = xfs.blklog - SECTOR_BITS;
+ xfs.rootino = le64 (super.sb_rootino);
+ xfs.isize = le16 (super.sb_inodesize);
+ xfs.agblocks = le32 (super.sb_agblocks);
+ xfs.dirblklog = super.sb_dirblklog;
+ xfs.dirbsize = xfs.bsize << super.sb_dirblklog;
+
+ xfs.inopblog = super.sb_inopblog;
+ xfs.agblklog = super.sb_agblklog;
+ xfs.agnolog = xfs_highbit32 (le32 (super.sb_agcount) - 1) + 1;
+
+ xfs.btnode_ptr0_off =
+ ((xfs.bsize - sizeof(xfs_btree_block_t)) /
+ (sizeof (xfs_bmbt_key_t) + sizeof (xfs_bmbt_ptr_t)))
+ * sizeof(xfs_bmbt_key_t) + sizeof(xfs_btree_block_t);
+
+ return 1;
+}
+
+int
+xfs_read_data (char *buf, int len)
+{
+ xad_t *xad;
+ xfs_fileoff_t endofprev, endofcur, offset;
+ xfs_filblks_t xadlen;
+ int toread, startpos, endpos;
+
+ if (icore.di_format == XFS_DINODE_FMT_LOCAL) {
+ memmove(buf, inode->di_u.di_c + xfs_file->pos, len);
+ xfs_file->pos += len;
+ return len;
+ }
+
+ startpos = xfs_file->pos;
+ endpos = xfs_file->pos + len;
+ if (endpos > xfs_file->len)
+ endpos = xfs_file->len;
+ endofprev = (xfs_fileoff_t)-1;
+ init_extents ();
+ while (len > 0 && (xad = next_extent ())) {
+ offset = xad->offset;
+ xadlen = xad->len;
+ if (isinxt (xfs_file->pos >> xfs.blklog, offset, xadlen)) {
+ endofcur = (offset + xadlen) << xfs.blklog;
+ toread = (endofcur >= endpos)
+ ? len : (endofcur - xfs_file->pos);
+ read_disk_block(xfs_file, fsb2daddr (xad->start),
+ xfs_file->pos - (offset << xfs.blklog), toread, buf);
+ buf += toread;
+ len -= toread;
+ xfs_file->pos += toread;
+ } else if (offset > endofprev) {
+ toread = ((offset << xfs.blklog) >= endpos)
+ ? len : ((offset - endofprev) << xfs.blklog);
+ len -= toread;
+ xfs_file->pos += toread;
+ for (; toread; toread--) {
+ *buf++ = 0;
+ }
+ continue;
+ }
+ endofprev = offset + xadlen;
+ }
+
+ return xfs_file->pos - startpos;
+}
+
+int
+xfs_dir (char *dirname)
+{
+ xfs_ino_t ino, parent_ino, new_ino;
+ xfs_fsize_t di_size;
+ int di_mode;
+ int cmp, n, link_count;
+ char linkbuf[xfs.bsize];
+ char *rest, *name, ch;
+
+ DEBUG_ENTER;
+
+ parent_ino = ino = xfs.rootino;
+ link_count = 0;
+ for (;;) {
+ di_read (ino);
+ di_size = le64 (icore.di_size);
+ di_mode = le16 (icore.di_mode);
+
+ DEBUG_F("di_mode: %o\n", di_mode);
+ if ((di_mode & IFMT) == IFLNK) {
+ if (++link_count > MAX_LINK_COUNT) {
+ errnum = FILE_ERR_SYMLINK_LOOP;
+ DEBUG_LEAVE(FILE_ERR_SYMLINK_LOOP);
+ return 0;
+ }
+ if (di_size < xfs.bsize - 1) {
+ xfs_file->pos = 0;
+ xfs_file->len = di_size;
+ n = xfs_read_data (linkbuf, xfs_file->len);
+ } else {
+ errnum = FILE_ERR_LENGTH;
+ DEBUG_LEAVE(FILE_ERR_LENGTH);
+ return 0;
+ }
+
+ ino = (linkbuf[0] == '/') ? xfs.rootino : parent_ino;
+ while (n < (xfs.bsize - 1) && (linkbuf[n++] = *dirname++));
+ linkbuf[n] = 0;
+ dirname = linkbuf;
+ continue;
+ }
+
+ DEBUG_F("*dirname: %s\n", dirname);
+ if (!*dirname || isspace (*dirname)) {
+ if ((di_mode & IFMT) != IFREG) {
+ errnum = FILE_ERR_BAD_TYPE;
+ DEBUG_LEAVE(FILE_ERR_BAD_TYPE);
+ return 0;
+ }
+ xfs_file->pos = 0;
+ xfs_file->len = di_size;
+ DEBUG_LEAVE(1);
+ return 1;
+ }
+
+ if ((di_mode & IFMT) != IFDIR) {
+ errnum = FILE_ERR_NOTDIR;
+ DEBUG_LEAVE(FILE_ERR_NOTDIR);
+ return 0;
+ }
+
+ for (; *dirname == '/'; dirname++);
+
+ for (rest = dirname; (ch = *rest) && !isspace (ch) && ch != '/'; rest++);
+ *rest = 0;
+
+ name = first_dentry (&new_ino);
+ for (;;) {
+ cmp = (!*dirname) ? -1 : strcmp(dirname, name);
+ if (cmp == 0) {
+ parent_ino = ino;
+ if (new_ino)
+ ino = new_ino;
+ *(dirname = rest) = ch;
+ break;
+ }
+ name = next_dentry (&new_ino);
+ if (name == NULL) {
+ errnum = FILE_ERR_NOTFOUND;
+ DEBUG_LEAVE(FILE_ERR_NOTFOUND);
+ *rest = ch;
+ return 0;
+ }
+ }
+ }
+}
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 8
+ * End:
+ */
Added: trunk/yaboot/second/iso_util.c
===================================================================
--- trunk/yaboot/second/iso_util.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/iso_util.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,92 @@
+/*
+ * linux/fs/isofs/util.c
+ *
+ * The special functions in the file are numbered according to the section
+ * of the iso 9660 standard in which they are described. isonum_733 will
+ * convert numbers according to section 7.3.3, etc.
+ *
+ * isofs special functions. This file was lifted in its entirety from
+ * the 386BSD iso9660 filesystem, by Pace Willisson <pace at blitz.com>.
+ */
+
+int
+isonum_711 (char * p)
+{
+ return (*p & 0xff);
+}
+
+int
+isonum_712 (char * p)
+{
+ int val;
+
+ val = *p;
+ if (val & 0x80)
+ val |= 0xffffff00;
+ return (val);
+}
+
+int
+isonum_721 (char * p)
+{
+ return ((p[0] & 0xff) | ((p[1] & 0xff) << 8));
+}
+
+int
+isonum_722 (char * p)
+{
+ return (((p[0] & 0xff) << 8) | (p[1] & 0xff));
+}
+
+int
+isonum_723 (char * p)
+{
+#if 0
+ if (p[0] != p[3] || p[1] != p[2]) {
+ fprintf (stderr, "invalid format 7.2.3 number\n");
+ exit (1);
+ }
+#endif
+ return (isonum_721 (p));
+}
+
+int
+isonum_731 (char * p)
+{
+ return ((p[0] & 0xff)
+ | ((p[1] & 0xff) << 8)
+ | ((p[2] & 0xff) << 16)
+ | ((p[3] & 0xff) << 24));
+}
+
+int
+isonum_732 (char * p)
+{
+ return (((p[0] & 0xff) << 24)
+ | ((p[1] & 0xff) << 16)
+ | ((p[2] & 0xff) << 8)
+ | (p[3] & 0xff));
+}
+
+int
+isonum_733 (char * p)
+{
+#if 0
+ int i;
+
+ for (i = 0; i < 4; i++) {
+ if (p[i] != p[7-i]) {
+ fprintf (stderr, "bad format 7.3.3 number\n");
+ exit (1);
+ }
+ }
+#endif
+ return (isonum_731 (p));
+}
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 8
+ * End:
+ */
Added: trunk/yaboot/second/md5.c
===================================================================
--- trunk/yaboot/second/md5.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/md5.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,383 @@
+/*
+ * md5.c - an implementation of the MD5 algorithm and MD5 crypt
+ *
+ * Copyright (C) 2001, 2002 Ethan Benson
+ *
+ * Adapted from GRUB
+ *
+ * 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 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.
+ */
+
+/* See RFC 1321 for a description of the MD5 algorithm. */
+
+#include "string.h"
+#include "md5.h"
+
+#ifdef TEST
+# include <stdio.h>
+# define USE_MD5_PASSWORDS
+# define USE_MD5
+#endif
+
+#ifdef USE_MD5_PASSWORDS
+# define USE_MD5
+#endif
+
+#ifdef USE_MD5
+#define cpu_to_le32(x) le32_to_cpu((x))
+unsigned long le32_to_cpu(unsigned long x)
+{
+ return (((x & 0x000000ffU) << 24) |
+ ((x & 0x0000ff00U) << 8) |
+ ((x & 0x00ff0000U) >> 8) |
+ ((x & 0xff000000U) >> 24));
+}
+
+typedef unsigned int UINT4;
+
+/* F, G, H and I are basic MD5 functions.
+ */
+#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
+#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
+#define H(x, y, z) ((x) ^ (y) ^ (z))
+#define I(x, y, z) ((y) ^ ((x) | (~z)))
+
+/* ROTATE_LEFT rotates x left n bits.
+ */
+#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x >> (32 - (n)))))
+
+static UINT4 initstate[4] =
+{
+ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476
+};
+
+static char s1[4] = { 7, 12, 17, 22 };
+static char s2[4] = { 5, 9, 14, 20 };
+static char s3[4] = { 4, 11, 16, 23 };
+static char s4[4] = { 6, 10, 15, 21 };
+
+static UINT4 T[64] =
+{
+ 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee,
+ 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501,
+ 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be,
+ 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821,
+ 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa,
+ 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8,
+ 0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed,
+ 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a,
+ 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c,
+ 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70,
+ 0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x04881d05,
+ 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665,
+ 0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039,
+ 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1,
+ 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1,
+ 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391
+};
+
+static const char *b64t =
+"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+
+static UINT4 state[4];
+static unsigned int length;
+static unsigned char buffer[64];
+
+static void
+md5_transform (const unsigned char block[64])
+{
+ int i, j;
+ UINT4 a,b,c,d,tmp;
+ const UINT4 *x = (UINT4 *) block;
+
+ a = state[0];
+ b = state[1];
+ c = state[2];
+ d = state[3];
+
+ /* Round 1 */
+ for (i = 0; i < 16; i++)
+ {
+ tmp = a + F (b, c, d) + le32_to_cpu (x[i]) + T[i];
+ tmp = ROTATE_LEFT (tmp, s1[i & 3]);
+ tmp += b;
+ a = d; d = c; c = b; b = tmp;
+ }
+ /* Round 2 */
+ for (i = 0, j = 1; i < 16; i++, j += 5)
+ {
+ tmp = a + G (b, c, d) + le32_to_cpu (x[j & 15]) + T[i+16];
+ tmp = ROTATE_LEFT (tmp, s2[i & 3]);
+ tmp += b;
+ a = d; d = c; c = b; b = tmp;
+ }
+ /* Round 3 */
+ for (i = 0, j = 5; i < 16; i++, j += 3)
+ {
+ tmp = a + H (b, c, d) + le32_to_cpu (x[j & 15]) + T[i+32];
+ tmp = ROTATE_LEFT (tmp, s3[i & 3]);
+ tmp += b;
+ a = d; d = c; c = b; b = tmp;
+ }
+ /* Round 4 */
+ for (i = 0, j = 0; i < 16; i++, j += 7)
+ {
+ tmp = a + I (b, c, d) + le32_to_cpu (x[j & 15]) + T[i+48];
+ tmp = ROTATE_LEFT (tmp, s4[i & 3]);
+ tmp += b;
+ a = d; d = c; c = b; b = tmp;
+ }
+
+ state[0] += a;
+ state[1] += b;
+ state[2] += c;
+ state[3] += d;
+}
+
+static void
+md5_init(void)
+{
+ memcpy ((char *) state, (char *) initstate, sizeof (initstate));
+ length = 0;
+}
+
+static void
+md5_update (const char *input, int inputlen)
+{
+ int buflen = length & 63;
+ length += inputlen;
+ if (buflen + inputlen < 64)
+ {
+ memcpy (buffer + buflen, input, inputlen);
+ buflen += inputlen;
+ return;
+ }
+
+ memcpy (buffer + buflen, input, 64 - buflen);
+ md5_transform (buffer);
+ input += 64 - buflen;
+ inputlen -= 64 - buflen;
+ while (inputlen >= 64)
+ {
+ md5_transform (input);
+ input += 64;
+ inputlen -= 64;
+ }
+ memcpy (buffer, input, inputlen);
+ buflen = inputlen;
+}
+
+static unsigned char *
+md5_final()
+{
+ int i, buflen = length & 63;
+
+ buffer[buflen++] = 0x80;
+ memset (buffer+buflen, 0, 64 - buflen);
+ if (buflen > 56)
+ {
+ md5_transform (buffer);
+ memset (buffer, 0, 64);
+ buflen = 0;
+ }
+
+ *(UINT4 *) (buffer + 56) = cpu_to_le32 (8 * length);
+ *(UINT4 *) (buffer + 60) = 0;
+ md5_transform (buffer);
+
+ for (i = 0; i < 4; i++)
+ state[i] = cpu_to_le32 (state[i]);
+ return (unsigned char *) state;
+}
+
+#ifdef USE_MD5_PASSWORDS
+/* If CHECK is true, check a password for correctness. Returns 0
+ if password was correct, and a value != 0 for error, similarly
+ to strcmp.
+ If CHECK is false, crypt KEY and save the result in CRYPTED.
+ CRYPTED must have a salt. */
+int
+md5_password (const char *key, char *crypted, int check)
+{
+ int keylen = strlen (key);
+ char *salt = crypted + 3; /* skip $1$ header */
+ char *p;
+ int saltlen;
+ int i, n;
+ unsigned char alt_result[16];
+ unsigned char *digest;
+
+ if (check)
+ saltlen = strstr (salt, "$") - salt;
+ else
+ {
+ char *end = strstr (salt, "$");
+ if (end && end - salt < 8)
+ saltlen = end - salt;
+ else
+ saltlen = 8;
+
+ salt[saltlen] = '$';
+ }
+
+ md5_init ();
+ md5_update (key, keylen);
+ md5_update (salt, saltlen);
+ md5_update (key, keylen);
+ digest = md5_final ();
+ memcpy (alt_result, digest, 16);
+
+ memcpy ((char *) state, (char *) initstate, sizeof (initstate));
+ length = 0;
+ md5_update (key, keylen);
+ md5_update (crypted, 3 + saltlen); /* include the $1$ header */
+ for (i = keylen; i > 16; i -= 16)
+ md5_update (alt_result, 16);
+ md5_update (alt_result, i);
+
+ for (i = keylen; i > 0; i >>= 1)
+ md5_update (key + ((i & 1) ? keylen : 0), 1);
+ digest = md5_final ();
+
+ for (i = 0; i < 1000; i++)
+ {
+ memcpy (alt_result, digest, 16);
+
+ memcpy ((char *) state, (char *) initstate, sizeof (initstate));
+ length = 0;
+ if ((i & 1) != 0)
+ md5_update (key, keylen);
+ else
+ md5_update (alt_result, 16);
+
+ if (i % 3 != 0)
+ md5_update (salt, saltlen);
+
+ if (i % 7 != 0)
+ md5_update (key, keylen);
+
+ if ((i & 1) != 0)
+ md5_update (alt_result, 16);
+ else
+ md5_update (key, keylen);
+ digest = md5_final ();
+ }
+
+ p = salt + saltlen + 1;
+ for (i = 0; i < 5; i++)
+ {
+ unsigned int w =
+ digest[i == 4 ? 5 : 12+i] | (digest[6+i] << 8) | (digest[i] << 16);
+ for (n = 4; n-- > 0;)
+ {
+ if (check)
+ {
+ if (*p++ != b64t[w & 0x3f])
+ return 1;
+ }
+ else
+ {
+ *p++ = b64t[w & 0x3f];
+ }
+
+ w >>= 6;
+ }
+ }
+ {
+ unsigned int w = digest[11];
+ for (n = 2; n-- > 0;)
+ {
+ if (check)
+ {
+ if (*p++ != b64t[w & 0x3f])
+ return 1;
+ }
+ else
+ {
+ *p++ = b64t[w & 0x3f];
+ }
+
+ w >>= 6;
+ }
+ }
+
+ if (! check)
+ *p = '\0';
+
+ return *p;
+}
+#endif
+
+#ifdef TEST
+static char *
+md5 (const char *input)
+{
+ memcpy ((char *) state, (char *) initstate, sizeof (initstate));
+ length = 0;
+ md5_update (input, strlen (input));
+ return md5_final ();
+}
+
+static void
+test (char *buffer, char *expected)
+{
+ char result[16 * 3 +1];
+ unsigned char* digest = md5 (buffer);
+ int i;
+
+ for (i=0; i < 16; i++)
+ sprintf (result+2*i, "%02x", digest[i]);
+
+ if (strcmp (result, expected))
+ printf ("MD5(%s) failed: %s\n", buffer, result);
+ else
+ printf ("MD5(%s) OK\n", buffer);
+}
+
+int
+main (void)
+{
+ test ("", "d41d8cd98f00b204e9800998ecf8427e");
+ test ("a", "0cc175b9c0f1b6a831c399e269772661");
+ test ("abc", "900150983cd24fb0d6963f7d28e17f72");
+ test ("message digest", "f96b697d7cb7938d525a2f31aaf161d0");
+ test ("abcdefghijklmnopqrstuvwxyz", "c3fcd3d76192e4007dfb496cca67e13b");
+ test ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
+ "d174ab98d277d9f5a5611c2c9f419d9f");
+ test ("12345678901234567890123456789012345678901234567890123456789012345678901234567890",
+ "57edf4a22be3c955ac49da2e2107b67a");
+ test ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz3456",
+ "6831fa90115bb9a54fbcd4f9fee0b5c4");
+ test ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz345",
+ "bc40505cc94a43b7ff3e2ac027325233");
+ test ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz34567",
+ "fa94b73a6f072a0239b52acacfbcf9fa");
+ test ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz345678901234",
+ "bd201eae17f29568927414fa326f1267");
+ test ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz34567890123",
+ "80063db1e6b70a2e91eac903f0e46b85");
+
+ if (check_md5_password ("Hello world!",
+ "$1$saltstri$YMyguxXMBpd2TEZ.vS/3q1"))
+ printf ("Password differs\n");
+ else
+ printf ("Password OK\n");
+ return 0;
+}
+#endif
+
+#endif
Added: trunk/yaboot/second/partition.c
===================================================================
--- trunk/yaboot/second/partition.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/partition.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,335 @@
+/*
+ * partition.c - partition table support
+ *
+ * Copyright (C) 2001, 2002 Ethan Benson
+ *
+ * Copyright (C) 1999 Benjamin Herrenschmidt
+ *
+ * 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.
+ */
+
+/*
+ * Todo: Add disklabel (or let OF do it ?). Eventually think about
+ * fixing CDROM handling by directly using the ATAPI layer.
+ */
+
+#include "ctype.h"
+#include "types.h"
+#include "stddef.h"
+#include "stdlib.h"
+#include "mac-part.h"
+#include "fdisk-part.h"
+#include "partition.h"
+#include "prom.h"
+#include "string.h"
+#include "linux/iso_fs.h"
+#include "debug.h"
+#include "errors.h"
+
+/* We currently don't check the partition type, some users
+ * are putting crap there and still expect it to work...
+ */
+#undef CHECK_FOR_VALID_MAC_PARTITION_TYPE
+
+#ifdef CHECK_FOR_VALID_MAC_PARTITION_TYPE
+static const char *valid_mac_partition_types[] = {
+ "apple_unix_svr2",
+ "linux",
+ "apple_hfs",
+ "apple_boot",
+ "apple_bootstrap",
+ NULL
+};
+#endif
+
+
+/* Local functions */
+static unsigned long swab32(unsigned long value);
+
+#define MAX_BLOCK_SIZE 2048
+static unsigned char block_buffer[MAX_BLOCK_SIZE];
+
+static void
+add_new_partition(struct partition_t** list, int part_number, const char *part_type,
+ const char *part_name, unsigned long part_start, unsigned long part_size,
+ unsigned short part_blocksize)
+{
+ struct partition_t* part;
+ part = (struct partition_t*)malloc(sizeof(struct partition_t));
+
+ part->part_number = part_number;
+ strncpy(part->part_type, part_type, MAX_PART_NAME);
+ strncpy(part->part_name, part_name, MAX_PART_NAME);
+ part->part_start = part_start;
+ part->part_size = part_size;
+ part->blocksize = part_blocksize;
+
+ /* Tack this entry onto the list */
+ part->next = *list;
+ *list = part;
+}
+
+/* Note, we rely on partitions being dev-block-size aligned,
+ * I have to check if it's true. If it's not, then things will get
+ * a bit more complicated
+ */
+static void
+partition_mac_lookup( const char *dev_name, prom_handle disk,
+ unsigned int prom_blksize, struct partition_t** list )
+{
+ int block, map_size;
+
+ /* block_buffer contains block 0 from the partitions_lookup() stage */
+ struct mac_partition* part = (struct mac_partition *)block_buffer;
+ unsigned short ptable_block_size =
+ ((struct mac_driver_desc *)block_buffer)->block_size;
+
+ map_size = 1;
+ for (block=1; block < map_size + 1; block++)
+ {
+#ifdef CHECK_FOR_VALID_MAC_PARTITION_TYPE
+ int valid = 0;
+ const char *ptype;
+#endif
+ if (prom_readblocks(disk, block, 1, block_buffer) != 1) {
+ prom_printf("Can't read partition %d\n", block);
+ break;
+ }
+ if (part->signature != MAC_PARTITION_MAGIC) {
+#if 0
+ prom_printf("Wrong partition %d signature\n", block);
+#endif
+ break;
+ }
+ if (block == 1)
+ map_size = part->map_count;
+
+#ifdef CHECK_FOR_VALID_MAC_PARTITION_TYPE
+ /* We don't bother looking at swap partitions of any type,
+ * and the rest are the ones we know about */
+ for (ptype = valid_mac_partition_types; ptype; ptype++)
+ if (!strcmp (part->type, ptype))
+ {
+ valid = 1;
+ break;
+ }
+#if DEBUG
+ if (!valid)
+ prom_printf( "MAC: Unsupported partition #%d; type=%s\n",
+ block, part->type );
+#endif
+#endif
+
+
+#ifdef CHECK_FOR_VALID_MAC_PARTITION_TYPE
+ if (valid)
+#endif
+ /* We use the partition block size from the partition table.
+ * The filesystem implmentations are responsible for mapping
+ * to their own fs blocksize */
+ add_new_partition(
+ list, /* partition list */
+ block, /* partition number */
+ part->type, /* type */
+ part->name, /* name */
+ part->start_block + part->data_start, /* start */
+ part->data_count, /* size */
+ ptable_block_size );
+ }
+}
+
+/*
+ * Same function as partition_mac_lookup(), except for fdisk
+ * partitioned disks.
+ */
+static void
+partition_fdisk_lookup( const char *dev_name, prom_handle disk,
+ unsigned int prom_blksize, struct partition_t** list )
+{
+ int partition;
+
+ /* fdisk partition tables start at offset 0x1be
+ * from byte 0 of the boot drive.
+ */
+ struct fdisk_partition* part =
+ (struct fdisk_partition *) (block_buffer + 0x1be);
+
+ for (partition=1; partition <= 4 ;partition++, part++) {
+ if (part->sys_ind == LINUX_NATIVE) {
+ add_new_partition( list,
+ partition,
+ "Linux", /* type */
+ '\0', /* name */
+ swab32(*(unsigned int *)(part->start4)),
+ swab32(*(unsigned int *)(part->size4)),
+ 512 /*blksize*/ );
+ }
+ }
+}
+
+/* I don't know if it's possible to handle multisession and other multitrack
+ * stuffs with the current OF disklabel package. This can still be implemented
+ * with direct calls to atapi stuffs.
+ * Currently, we enter this code for any device of block size 0x2048 who lacks
+ * a MacOS partition map signature.
+ */
+static int
+identify_iso_fs(ihandle device, unsigned int *iso_root_block)
+{
+ int block;
+
+ for (block = 16; block < 100; block++) {
+ struct iso_volume_descriptor * vdp;
+
+ if (prom_readblocks(device, block, 1, block_buffer) != 1) {
+ prom_printf("Can't read volume desc block %d\n", block);
+ break;
+ }
+
+ vdp = (struct iso_volume_descriptor *)block_buffer;
+
+ /* Due to the overlapping physical location of the descriptors,
+ * ISO CDs can match hdp->id==HS_STANDARD_ID as well. To ensure
+ * proper identification in this case, we first check for ISO.
+ */
+ if (strncmp (vdp->id, ISO_STANDARD_ID, sizeof vdp->id) == 0) {
+ *iso_root_block = block;
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+struct partition_t*
+partitions_lookup(const char *device)
+{
+ ihandle disk;
+ struct mac_driver_desc *desc = (struct mac_driver_desc *)block_buffer;
+ struct partition_t* list = NULL;
+ unsigned int prom_blksize, iso_root_block;
+
+ strncpy(block_buffer, device, 2040);
+ strcat(block_buffer, ":0");
+
+ /* Open device */
+ disk = prom_open(block_buffer);
+ if (disk == NULL) {
+ prom_printf("Can't open device <%s>\n", block_buffer);
+ goto bail;
+ }
+ prom_blksize = prom_getblksize(disk);
+ DEBUG_F("block size of device is %d\n", prom_blksize);
+
+ if (prom_blksize <= 1)
+ prom_blksize = 512;
+ if (prom_blksize > MAX_BLOCK_SIZE) {
+ prom_printf("block_size %d not supported !\n", prom_blksize);
+ goto bail;
+ }
+
+ /* Read boot blocs */
+ if (prom_readblocks(disk, 0, 1, block_buffer) != 1) {
+ prom_printf("Can't read boot blocks\n");
+ goto bail;
+ }
+ if (desc->signature == MAC_DRIVER_MAGIC) {
+ /* pdisk partition format */
+ partition_mac_lookup(device, disk, prom_blksize, &list);
+ } else if ((block_buffer[510] == 0x55) && (block_buffer[511] == 0xaa)) {
+ /* fdisk partition format */
+ partition_fdisk_lookup(device, disk, prom_blksize, &list);
+ } else if (prom_blksize == 2048 && identify_iso_fs(disk, &iso_root_block)) {
+ add_new_partition(&list,
+ 0,
+ '\0',
+ '\0',
+ iso_root_block,
+ 0,
+ prom_blksize);
+ prom_printf("ISO9660 disk\n");
+ } else {
+ prom_printf("No supported partition table detected\n");
+ goto bail;
+ }
+
+bail:
+ prom_close(disk);
+
+ return list;
+}
+
+char *
+get_part_type(char *device, int partition)
+{
+ struct partition_t* parts;
+ struct partition_t* p;
+ struct partition_t* found;
+ char *type = NULL;
+
+ if (prom_get_devtype(device) != FILE_DEVICE_BLOCK)
+ return NULL;
+
+ parts = partitions_lookup(device);
+ found = NULL;
+
+ if (!parts)
+ return '\0';
+
+ for (p = parts; p && !found; p=p->next) {
+ DEBUG_F("number: %02d, start: 0x%08lx, length: 0x%08lx, type: %s, name: %s\n",
+ p->part_number, p->part_start, p->part_size, p->part_type, p->part_name);
+ if ((partition >= 0) && (partition == p->part_number)) {
+ type = strdup(p->part_type);
+ break;
+ }
+ }
+ if (parts)
+ partitions_free(parts);
+ return type;
+}
+
+/* Freed in reverse order of allocation to help malloc'ator */
+void
+partitions_free(struct partition_t* list)
+{
+ struct partition_t* next;
+
+ while(list) {
+ next = list->next;
+ free(list);
+ list = next;
+ }
+}
+unsigned long
+swab32(unsigned long value)
+{
+ __u32 result;
+
+ __asm__("rlwimi %0,%1,24,16,23\n\t"
+ "rlwimi %0,%1,8,8,15\n\t"
+ "rlwimi %0,%1,24,0,7"
+ : "=r" (result)
+ : "r" (value), "0" (value >> 24));
+ return result;
+}
+
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 5
+ * End:
+ */
Added: trunk/yaboot/second/prom.c
===================================================================
--- trunk/yaboot/second/prom.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/prom.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,639 @@
+/*
+ * prom.c - Routines for talking to the Open Firmware PROM
+ *
+ * Copyright (C) 2001, 2002 Ethan Benson
+ *
+ * Copyright (C) 1999 Benjamin Herrenschmidt
+ *
+ * Copyright (C) 1999 Marius Vollmer
+ *
+ * Copyright (C) 1996 Paul Mackerras.
+ *
+ * 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.
+ */
+
+#include "prom.h"
+#include "stdarg.h"
+#include "stddef.h"
+#include "stdlib.h"
+#include "types.h"
+#include "ctype.h"
+#include "asm/processor.h"
+#include "errors.h"
+#include "debug.h"
+
+#define READ_BLOCKS_USE_READ 1
+
+prom_entry prom;
+
+ihandle prom_stdin, prom_stdout;
+
+//extern int vsprintf(char *buf, const char *fmt, va_list args);
+
+static ihandle prom_mem, prom_mmu;
+static ihandle prom_chosen, prom_options;
+
+struct prom_args {
+ const char *service;
+ int nargs;
+ int nret;
+ void *args[10];
+};
+
+void *
+call_prom (const char *service, int nargs, int nret, ...)
+{
+ va_list list;
+ int i;
+ struct prom_args prom_args;
+
+ prom_args.service = service;
+ prom_args.nargs = nargs;
+ prom_args.nret = nret;
+ va_start (list, nret);
+ for (i = 0; i < nargs; ++i)
+ prom_args.args[i] = va_arg(list, void *);
+ va_end(list);
+ for (i = 0; i < nret; ++i)
+ prom_args.args[i + nargs] = 0;
+ prom (&prom_args);
+ if (nret > 0)
+ return prom_args.args[nargs];
+ else
+ return 0;
+}
+
+void *
+call_prom_return (const char *service, int nargs, int nret, ...)
+{
+ va_list list;
+ int i;
+ void* result;
+ struct prom_args prom_args;
+
+ prom_args.service = service;
+ prom_args.nargs = nargs;
+ prom_args.nret = nret;
+ va_start (list, nret);
+ for (i = 0; i < nargs; ++i)
+ prom_args.args[i] = va_arg(list, void *);
+ for (i = 0; i < nret; ++i)
+ prom_args.args[i + nargs] = 0;
+ if (prom (&prom_args) != 0)
+ return PROM_INVALID_HANDLE;
+ if (nret > 0) {
+ result = prom_args.args[nargs];
+ for (i=1; i<nret; i++) {
+ void** rp = va_arg(list, void**);
+ *rp = prom_args.args[i+nargs];
+ }
+ } else
+ result = 0;
+ va_end(list);
+ return result;
+}
+
+static void *
+call_method_1 (char *method, prom_handle h, int nargs, ...)
+{
+ va_list list;
+ int i;
+ struct prom_args prom_args;
+
+ prom_args.service = "call-method";
+ prom_args.nargs = nargs+2;
+ prom_args.nret = 2;
+ prom_args.args[0] = method;
+ prom_args.args[1] = h;
+ va_start (list, nargs);
+ for (i = 0; i < nargs; ++i)
+ prom_args.args[2+i] = va_arg(list, void *);
+ va_end(list);
+ prom_args.args[2+nargs] = 0;
+ prom_args.args[2+nargs+1] = 0;
+
+ prom (&prom_args);
+
+ if (prom_args.args[2+nargs] != 0)
+ {
+ prom_printf ("method '%s' failed %p\n", method, prom_args.args[2+nargs]);
+ return 0;
+ }
+ return prom_args.args[2+nargs+1];
+}
+
+
+prom_handle
+prom_finddevice (char *name)
+{
+ return call_prom ("finddevice", 1, 1, name);
+}
+
+prom_handle
+prom_findpackage(char *path)
+{
+ return call_prom ("find-package", 1, 1, path);
+}
+
+int
+prom_getprop (prom_handle pack, char *name, void *mem, int len)
+{
+ return (int)call_prom ("getprop", 4, 1, pack, name, mem, len);
+}
+
+int
+prom_get_chosen (char *name, void *mem, int len)
+{
+ return prom_getprop (prom_chosen, name, mem, len);
+}
+
+int
+prom_get_options (char *name, void *mem, int len)
+{
+ if (prom_options == (void *)-1)
+ return -1;
+ return prom_getprop (prom_options, name, mem, len);
+}
+
+int
+prom_get_devtype (char *device)
+{
+ phandle dev;
+ int result;
+ char tmp[64];
+
+ /* Find OF device phandle */
+ dev = prom_finddevice(device);
+ if (dev == PROM_INVALID_HANDLE) {
+ return FILE_ERR_BADDEV;
+ }
+
+ /* Check the kind of device */
+ result = prom_getprop(dev, "device_type", tmp, 63);
+ if (result == -1) {
+ prom_printf("can't get <device_type> for device: %s\n", device);
+ return FILE_ERR_BADDEV;
+ }
+ tmp[result] = 0;
+ if (!strcmp(tmp, "block"))
+ return FILE_DEVICE_BLOCK;
+ else if (!strcmp(tmp, "network"))
+ return FILE_DEVICE_NET;
+ else {
+ prom_printf("Unkown device type <%s>\n", tmp);
+ return FILE_ERR_BADDEV;
+ }
+}
+
+void
+prom_init (prom_entry pp)
+{
+ prom = pp;
+
+ prom_chosen = prom_finddevice ("/chosen");
+ if (prom_chosen == (void *)-1)
+ prom_exit ();
+ prom_options = prom_finddevice ("/options");
+ if (prom_get_chosen ("stdout", &prom_stdout, sizeof(prom_stdout)) <= 0)
+ prom_exit();
+ if (prom_get_chosen ("stdin", &prom_stdin, sizeof(prom_stdin)) <= 0)
+ prom_abort ("\nCan't open stdin");
+ if (prom_get_chosen ("memory", &prom_mem, sizeof(prom_mem)) <= 0)
+ prom_abort ("\nCan't get mem handle");
+ if (prom_get_chosen ("mmu", &prom_mmu, sizeof(prom_mmu)) <= 0)
+ prom_abort ("\nCan't get mmu handle");
+
+ // move cursor to fresh line
+ prom_printf ("\n");
+
+ /* Add a few OF methods (thanks Darwin) */
+#if DEBUG
+ prom_printf ("Adding OF methods...\n");
+#endif
+
+ prom_interpret (
+ /* All values in this forth code are in hex */
+ "hex "
+ /* Those are a few utilities ripped from Apple */
+ ": D2NIP decode-int nip nip ;\r" // A useful function to save space
+ ": GPP$ get-package-property 0= ;\r" // Another useful function to save space
+ ": ^on0 0= if -1 throw then ;\r" // Bail if result zero
+ ": $CM $call-method ;\r"
+ );
+
+ /* Some forth words used by the release method */
+ prom_interpret (
+ " \" /chosen\" find-package if "
+ "dup \" memory\" rot GPP$ if "
+ "D2NIP swap " // ( MEMORY-ihandle "/chosen"-phandle )
+ "\" mmu\" rot GPP$ if "
+ "D2NIP " // ( MEMORY-ihandle MMU-ihandle )
+ "else "
+ "0 " // ( MEMORY-ihandle 0 )
+ "then "
+ "else "
+ "0 0 " // ( 0 0 )
+ "then "
+ "else "
+ "0 0 " // ( 0 0 )
+ "then\r"
+ "value mmu# "
+ "value mem# "
+ );
+
+ prom_interpret (
+ ": ^mem mem# $CM ; "
+ ": ^mmu mmu# $CM ; "
+ );
+
+ DEBUG_F("OF interface initialized.\n");
+}
+
+prom_handle
+prom_open (char *spec)
+{
+ return call_prom ("open", 1, 1, spec, strlen(spec));
+}
+
+void
+prom_close (prom_handle file)
+{
+ call_prom ("close", 1, 0, file);
+}
+
+int
+prom_read (prom_handle file, void *buf, int n)
+{
+ int result = 0;
+ int retries = 10;
+
+ if (n == 0)
+ return 0;
+ while(--retries) {
+ result = (int)call_prom ("read", 3, 1, file, buf, n);
+ if (result != 0)
+ break;
+ call_prom("interpret", 1, 1, " 10 ms");
+ }
+
+ return result;
+}
+
+int
+prom_write (prom_handle file, void *buf, int n)
+{
+ return (int)call_prom ("write", 3, 1, file, buf, n);
+}
+
+int
+prom_seek (prom_handle file, int pos)
+{
+ int status = (int)call_prom ("seek", 3, 1, file, 0, pos);
+ return status == 0 || status == 1;
+}
+
+int
+prom_lseek (prom_handle file, unsigned long long pos)
+{
+ int status = (int)call_prom ("seek", 3, 1, file,
+ (unsigned int)(pos >> 32), (unsigned int)(pos & 0xffffffffUL));
+ return status == 0 || status == 1;
+}
+
+int
+prom_loadmethod (prom_handle device, void* addr)
+{
+ return (int)call_method_1 ("load", device, 1, addr);
+}
+
+int
+prom_getblksize (prom_handle file)
+{
+ return (int)call_method_1 ("block-size", file, 0);
+}
+
+int
+prom_readblocks (prom_handle dev, int blockNum, int blockCount, void *buffer)
+{
+#if READ_BLOCKS_USE_READ
+ int status;
+ unsigned int blksize;
+
+ blksize = prom_getblksize(dev);
+ if (blksize <= 1)
+ blksize = 512;
+ status = prom_seek(dev, blockNum * blksize);
+ if (status != 1) {
+ return 0;
+ prom_printf("Can't seek to 0x%x\n", blockNum * blksize);
+ }
+
+ status = prom_read(dev, buffer, blockCount * blksize);
+// prom_printf("prom_readblocks, bl: %d, cnt: %d, status: %d\n",
+// blockNum, blockCount, status);
+
+ return status == (blockCount * blksize);
+#else
+ int result;
+ int retries = 10;
+
+ if (blockCount == 0)
+ return blockCount;
+ while(--retries) {
+ result = call_method_1 ("read-blocks", dev, 3, buffer, blockNum, blockCount);
+ if (result != 0)
+ break;
+ call_prom("interpret", 1, 1, " 10 ms");
+ }
+
+ return result;
+#endif
+}
+
+int
+prom_getchar ()
+{
+ char c[4];
+ int a;
+
+ while ((a = (int)call_prom ("read", 3, 1, prom_stdin, c, 4)) == 0)
+ ;
+ if (a == -1)
+ prom_abort ("EOF on console\n");
+ if (a == 3 && c[0] == '\e' && c[1] == '[')
+ return 0x100 | c[2];
+ return c[0];
+}
+
+int
+prom_nbgetchar()
+{
+ char ch;
+
+ return (int) call_prom("read", 3, 1, prom_stdin, &ch, 1) > 0? ch: -1;
+}
+
+void
+prom_putchar (char c)
+{
+ if (c == '\n')
+ call_prom ("write", 3, 1, prom_stdout, "\r\n", 2);
+ else
+ call_prom ("write", 3, 1, prom_stdout, &c, 1);
+}
+
+void
+prom_puts (prom_handle file, char *s)
+{
+ const char *p, *q;
+
+ for (p = s; *p != 0; p = q)
+ {
+ for (q = p; *q != 0 && *q != '\n'; ++q)
+ ;
+ if (q > p)
+ call_prom ("write", 3, 1, file, p, q - p);
+ if (*q != 0)
+ {
+ ++q;
+ call_prom ("write", 3, 1, file, "\r\n", 2);
+ }
+ }
+}
+
+void
+prom_vfprintf (prom_handle file, char *fmt, va_list ap)
+{
+ static char printf_buf[2048];
+ vsprintf (printf_buf, fmt, ap);
+ prom_puts (file, printf_buf);
+}
+
+void
+prom_vprintf (char *fmt, va_list ap)
+{
+ static char printf_buf[2048];
+ vsprintf (printf_buf, fmt, ap);
+ prom_puts (prom_stdout, printf_buf);
+}
+
+void
+prom_fprintf (prom_handle file, char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ prom_vfprintf (file, fmt, ap);
+ va_end (ap);
+}
+
+void
+prom_printf (char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ prom_vfprintf (prom_stdout, fmt, ap);
+ va_end (ap);
+}
+
+void
+prom_perror (int error, char *filename)
+{
+ if (error == FILE_ERR_EOF)
+ prom_printf("%s: Unexpected End Of File\n", filename);
+ else if (error == FILE_ERR_NOTFOUND)
+ prom_printf("%s: No such file or directory\n", filename);
+ else if (error == FILE_CANT_SEEK)
+ prom_printf("%s: Seek error\n", filename);
+ else if (error == FILE_IOERR)
+ prom_printf("%s: Input/output error\n", filename);
+ else if (error == FILE_BAD_PATH)
+ prom_printf("%s: Path too long\n", filename);
+ else if (error == FILE_ERR_BAD_TYPE)
+ prom_printf("%s: Not a regular file\n", filename);
+ else if (error == FILE_ERR_NOTDIR)
+ prom_printf("%s: Not a directory\n", filename);
+ else if (error == FILE_ERR_BAD_FSYS)
+ prom_printf("%s: Unknown or corrupt filesystem\n", filename);
+ else if (error == FILE_ERR_SYMLINK_LOOP)
+ prom_printf("%s: Too many levels of symbolic links\n", filename);
+ else if (error == FILE_ERR_LENGTH)
+ prom_printf("%s: File too large\n", filename);
+ else if (error == FILE_ERR_FSBUSY)
+ prom_printf("%s: Filesystem busy\n", filename);
+ else if (error == FILE_ERR_BADDEV)
+ prom_printf("%s: Unable to open file, Invalid device\n", filename);
+ else
+ prom_printf("%s: Unknown error\n", filename);
+}
+
+void
+prom_readline (char *prompt, char *buf, int len)
+{
+ int i = 0;
+ int c;
+
+ if (prompt)
+ prom_puts (prom_stdout, prompt);
+
+ while (i < len-1 && (c = prom_getchar ()) != '\r')
+ {
+ if (c >= 0x100)
+ continue;
+ if (c == 8)
+ {
+ if (i > 0)
+ {
+ prom_puts (prom_stdout, "\b \b");
+ i--;
+ }
+ else
+ prom_putchar ('\a');
+ }
+ else if (isprint (c))
+ {
+ prom_putchar (c);
+ buf[i++] = c;
+ }
+ else
+ prom_putchar ('\a');
+ }
+ prom_putchar ('\n');
+ buf[i] = 0;
+}
+
+#ifdef CONFIG_SET_COLORMAP
+int prom_set_color(prom_handle device, int color, int r, int g, int b)
+{
+ return (int)call_prom( "call-method", 6, 1, "color!", device, color, b, g, r );
+}
+#endif /* CONFIG_SET_COLORMAP */
+
+void
+prom_exit ()
+{
+ call_prom ("exit", 0, 0);
+}
+
+void
+prom_abort (char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ prom_vfprintf (prom_stdout, fmt, ap);
+ va_end (ap);
+ prom_exit ();
+}
+
+void
+prom_sleep (int seconds)
+{
+ int end;
+ end = (prom_getms() + (seconds * 1000));
+ while (prom_getms() <= end);
+}
+
+void *
+prom_claim (void *virt, unsigned int size, unsigned int align)
+{
+ return call_prom ("claim", 3, 1, virt, size, align);
+}
+
+void
+prom_release(void *virt, unsigned int size)
+{
+ call_prom ("release", 2, 0, virt, size);
+#if 0 /* this is bullshit, newworld OF RELEASE method works fine. */
+
+ /* release in not enough, it needs also an unmap call. This bit of forth
+ * code inspired from Darwin's bootloader but could be replaced by direct
+ * calls to the MMU package if needed
+ */
+ call_prom ("interpret", 3, 1,
+#if DEBUG
+ ".\" ReleaseMem:\" 2dup . . cr "
+#endif
+ "over \" translate\" ^mmu " // Find out physical base
+ "^on0 " // Bail if translation failed
+ "drop " // Leaving phys on top of stack
+ "2dup \" unmap\" ^mmu " // Unmap the space first
+ "2dup \" release\" ^mmu " // Then free the virtual pages
+ "\" release\" ^mem " // Then free the physical pages
+ ,size, virt
+ );
+#endif /* bullshit */
+}
+
+void
+prom_map (void *phys, void *virt, int size)
+{
+ unsigned long msr = mfmsr();
+
+ /* Only create a mapping if we're running with relocation enabled. */
+ if ( (msr & MSR_IR) && (msr & MSR_DR) )
+ call_method_1 ("map", prom_mmu, 4, -1, size, virt, phys);
+}
+
+void
+prom_unmap (void *phys, void *virt, int size)
+{
+ unsigned long msr = mfmsr();
+
+ /* Only unmap if we're running with relocation enabled. */
+ if ( (msr & MSR_IR) && (msr & MSR_DR) )
+ call_method_1 ("map", prom_mmu, 4, -1, size, virt, phys);
+}
+
+char *
+prom_getargs ()
+{
+ static char args[256];
+ int l;
+
+ l = prom_get_chosen ("bootargs", args, 255);
+ args[l] = '\0';
+ return args;
+}
+
+void
+prom_setargs (char *args)
+{
+ int l = strlen (args)+1;
+ if ((int)call_prom ("setprop", 4, 1, prom_chosen, "bootargs", args, l) != l)
+ prom_printf ("can't set args\n");
+}
+
+int prom_interpret (char *forth)
+{
+ return (int)call_prom("interpret", 1, 1, forth);
+}
+
+int
+prom_getms(void)
+{
+ return (int) call_prom("milliseconds", 0, 1);
+}
+
+void
+prom_pause(void)
+{
+ call_prom("enter", 0, 0);
+}
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 5
+ * End:
+ */
Added: trunk/yaboot/second/setjmp.S
===================================================================
--- trunk/yaboot/second/setjmp.S 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/setjmp.S 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,56 @@
+ .globl __sigsetjmp
+__sigsetjmp:
+ mflr 0
+ stw 1,0(3)
+ stw 2,4(3)
+ stw 0,8(3)
+ stw 14,12(3)
+ stw 15,16(3)
+ stw 16,20(3)
+ stw 17,24(3)
+ stw 18,28(3)
+ stw 19,32(3)
+ stw 20,36(3)
+ stw 21,40(3)
+ stw 22,44(3)
+ stw 23,48(3)
+ stw 24,52(3)
+ stw 25,56(3)
+ stw 26,60(3)
+ stw 27,64(3)
+ stw 28,68(3)
+ stw 29,72(3)
+ stw 30,76(3)
+ stw 31,80(3)
+ li 3,0
+ blr
+
+ .globl longjmp
+longjmp:
+ cmpwi 0,4,0
+ bne 1f
+ li 4,1
+1: lwz 1,0(3)
+ lwz 2,4(3)
+ lwz 0,8(3)
+ lwz 14,12(3)
+ lwz 15,16(3)
+ lwz 16,20(3)
+ lwz 17,24(3)
+ lwz 18,28(3)
+ lwz 19,32(3)
+ lwz 20,36(3)
+ lwz 21,40(3)
+ lwz 22,44(3)
+ lwz 23,48(3)
+ lwz 24,52(3)
+ lwz 25,56(3)
+ lwz 26,60(3)
+ lwz 27,64(3)
+ lwz 28,68(3)
+ lwz 29,72(3)
+ lwz 30,76(3)
+ lwz 31,80(3)
+ mtlr 0
+ mr 3,4
+ blr
Added: trunk/yaboot/second/yaboot.c
===================================================================
--- trunk/yaboot/second/yaboot.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/second/yaboot.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1538 @@
+/*
+ * Yaboot - secondary boot loader for Linux on PowerPC.
+ *
+ * Copyright (C) 2001, 2002 Ethan Benson
+ *
+ * Copyright (C) 1999, 2000, 2001 Benjamin Herrenschmidt
+ *
+ * IBM CHRP support
+ *
+ * Copyright (C) 2001 Peter Bergner
+ *
+ * portions based on poof
+ *
+ * Copyright (C) 1999 Marius Vollmer
+ *
+ * portions based on quik
+ *
+ * Copyright (C) 1996 Paul Mackerras.
+ *
+ * Because this program is derived from the corresponding file in the
+ * silo-0.64 distribution, it is also
+ *
+ * Copyright (C) 1996 Pete A. Zaitcev
+ * 1996 Maurizio Plaza
+ * 1996 David S. Miller
+ * 1996 Miguel de Icaza
+ * 1996 Jakub Jelinek
+ *
+ * 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.
+ */
+
+#include "stdarg.h"
+#include "string.h"
+#include "ctype.h"
+#include "stdlib.h"
+#include "prom.h"
+#include "file.h"
+#include "errors.h"
+#include "cfg.h"
+#include "cmdline.h"
+#include "yaboot.h"
+#include "linux/elf.h"
+#include "bootinfo.h"
+#include "debug.h"
+
+#define CONFIG_FILE_NAME "yaboot.conf"
+#define CONFIG_FILE_MAX 0x8000 /* 32k */
+
+#ifdef USE_MD5_PASSWORDS
+#include "md5.h"
+#endif /* USE_MD5_PASSWORDS */
+
+/* align addr on a size boundry - adjust address up if needed -- Cort */
+#define _ALIGN(addr,size) (((addr)+size-1)&(~(size-1)))
+
+/* Addresses where the PPC32 and PPC64 vmlinux kernels are linked at.
+ * These are used to determine whether we are booting a vmlinux, in
+ * which case, it will be loaded at KERNELADDR. Otherwise (eg zImage),
+ * we load the binary where it was linked at (ie, e_entry field in
+ * the ELF header).
+ */
+#define KERNEL_LINK_ADDR_PPC32 0xC0000000UL
+#define KERNEL_LINK_ADDR_PPC64 0xC000000000000000ULL
+
+typedef struct {
+ union {
+ Elf32_Ehdr elf32hdr;
+ Elf64_Ehdr elf64hdr;
+ } elf;
+ void* base;
+ unsigned long memsize;
+ unsigned long filesize;
+ unsigned long offset;
+ unsigned long load_loc;
+ unsigned long entry;
+} loadinfo_t;
+
+typedef void (*kernel_entry_t)( void *,
+ unsigned long,
+ prom_entry,
+ unsigned long,
+ unsigned long );
+
+/* Imported functions */
+extern unsigned long reloc_offset(void);
+extern long flush_icache_range(unsigned long start, unsigned long stop);
+
+/* Exported functions */
+int yaboot_start(unsigned long r3, unsigned long r4, unsigned long r5);
+
+/* Local functions */
+static int yaboot_main(void);
+static int is_elf32(loadinfo_t *loadinfo);
+static int is_elf64(loadinfo_t *loadinfo);
+static int load_elf32(struct boot_file_t *file, loadinfo_t *loadinfo);
+static int load_elf64(struct boot_file_t *file, loadinfo_t *loadinfo);
+static void setup_display(void);
+
+/* Locals & globals */
+
+int useconf = 0;
+char bootdevice[1024];
+char *password = NULL;
+struct boot_fspec_t boot;
+int _machine = _MACH_Pmac;
+int flat_vmlinux;
+
+#ifdef CONFIG_COLOR_TEXT
+
+/* Color values for text ui */
+static struct ansi_color_t {
+ char* name;
+ int index;
+ int value;
+} ansi_color_table[] = {
+ { "black", 2, 30 },
+ { "blue", 0, 31 },
+ { "green", 0, 32 },
+ { "cyan", 0, 33 },
+ { "red", 0, 34 },
+ { "purple", 0, 35 },
+ { "brown", 0, 36 },
+ { "light-gray", 0, 37 },
+ { "dark-gray", 1, 30 },
+ { "light-blue", 1, 31 },
+ { "light-green", 1, 32 },
+ { "light-cyan", 1, 33 },
+ { "light-red", 1, 34 },
+ { "light-purple", 1, 35 },
+ { "yellow", 1, 36 },
+ { "white", 1, 37 },
+ { NULL, 0, 0 },
+};
+
+/* Default colors for text ui */
+int fgcolor = 15;
+int bgcolor = 0;
+#endif /* CONFIG_COLOR_TEXT */
+
+#if DEBUG
+static int test_bss;
+static int test_data = 0;
+#endif
+static int pause_after;
+static char *pause_message = "Type go<return> to continue.\n";
+static char given_bootargs[1024];
+static int given_bootargs_by_user = 0;
+
+extern unsigned char linux_logo_red[];
+extern unsigned char linux_logo_green[];
+extern unsigned char linux_logo_blue[];
+
+#define DEFAULT_TIMEOUT -1
+
+/* Entry, currently called directly by crt0 (bss not inited) */
+
+extern char* __bss_start;
+extern char* _end;
+
+static struct first_info *quik_fip = NULL;
+
+int
+yaboot_start (unsigned long r3, unsigned long r4, unsigned long r5)
+{
+ int result;
+ void* malloc_base = NULL;
+ prom_handle root;
+
+ /* OF seems to do it, but I'm not very confident */
+ memset(&__bss_start, 0, &_end - &__bss_start);
+
+ /* Check for quik first stage bootloader (but I don't think we are
+ * compatible with it anyway, I'll look into backporting to older OF
+ * versions later
+ */
+ if (r5 == 0xdeadbeef) {
+ r5 = r3;
+ quik_fip = (struct first_info *)r4;
+ }
+
+ /* Initialize OF interface */
+ prom_init ((prom_entry) r5);
+
+ /* Allocate some memory for malloc'ator */
+ malloc_base = prom_claim((void *)MALLOCADDR, MALLOCSIZE, 0);
+ if (malloc_base == (void *)-1) {
+ prom_printf("Can't claim malloc buffer (%d bytes at 0x%08x)\n",
+ MALLOCSIZE, MALLOCADDR);
+ return -1;
+ }
+ malloc_init(malloc_base, MALLOCSIZE);
+ DEBUG_F("Malloc buffer allocated at %p (%d bytes)\n",
+ malloc_base, MALLOCSIZE);
+
+ /* A few useless DEBUG_F's */
+ DEBUG_F("reloc_offset : %ld (should be 0)\n", reloc_offset());
+ DEBUG_F("test_bss : %d (should be 0)\n", test_bss);
+ DEBUG_F("test_data : %d (should be 0)\n", test_data);
+ DEBUG_F("&test_data : %p\n", &test_data);
+ DEBUG_F("&test_bss : %p\n", &test_bss);
+ DEBUG_F("linked at : 0x%08x\n", TEXTADDR);
+
+ /* ask the OF info if we're a chrp or pmac */
+ /* we need to set _machine before calling finish_device_tree */
+ root = prom_finddevice("/");
+ if (root != 0) {
+ static char model[256];
+ if (prom_getprop(root, "device_type", model, 256 ) > 0 &&
+ !strncmp("chrp", model, 4))
+ _machine = _MACH_chrp;
+ else {
+ if (prom_getprop(root, "model", model, 256 ) > 0 &&
+ !strncmp(model, "IBM", 3))
+ _machine = _MACH_chrp;
+ }
+ }
+
+ DEBUG_F("Running on _machine = %d\n", _machine);
+ DEBUG_SLEEP;
+
+ /* Call out main */
+ result = yaboot_main();
+
+ /* Get rid of malloc pool */
+ malloc_dispose();
+ prom_release(malloc_base, MALLOCSIZE);
+ DEBUG_F("Malloc buffer released. Exiting with code %d\n",
+ result);
+
+ /* Return to OF */
+ prom_exit();
+
+ return result;
+
+}
+
+#ifdef CONFIG_COLOR_TEXT
+/*
+ * Validify color for text ui
+ */
+static int
+check_color_text_ui(char *color)
+{
+ int i = 0;
+ while(ansi_color_table[i].name) {
+ if (!strcmp(color, ansi_color_table[i].name))
+ return i;
+ i++;
+ }
+ return -1;
+}
+#endif /* CONFIG_COLOR_TEXT */
+
+
+void print_message_file(char *filename)
+{
+ char *msg = NULL;
+ char *p, *endp;
+ char *defdev = boot.dev;
+ int defpart = boot.part;
+ char msgpath[1024];
+ int opened = 0;
+ int result = 0;
+ int n;
+ struct boot_file_t file;
+ struct boot_fspec_t msgfile;
+
+ defdev = cfg_get_strg(0, "device");
+ if (!defdev)
+ defdev = boot.dev;
+ p = cfg_get_strg(0, "partition");
+ if (p) {
+ n = simple_strtol(p, &endp, 10);
+ if (endp != p && *endp == 0)
+ defpart = n;
+ }
+
+ strncpy(msgpath, filename, sizeof(msgpath));
+ if (!parse_device_path(msgpath, defdev, defpart, "/etc/yaboot.msg", &msgfile)) {
+ prom_printf("%s: Unable to parse\n", msgpath);
+ goto done;
+ }
+
+ result = open_file(&msgfile, &file);
+ if (result != FILE_ERR_OK) {
+ prom_printf("%s:%d,", msgfile.dev, msgfile.part);
+ prom_perror(result, msgfile.file);
+ goto done;
+ } else
+ opened = 1;
+
+ msg = malloc(2001);
+ if (!msg)
+ goto done;
+ else
+ memset(msg, 0, 2001);
+
+ if (file.fs->read(&file, 2000, msg) <= 0)
+ goto done;
+ else
+ prom_printf("%s", msg);
+
+done:
+ if (opened)
+ file.fs->close(&file);
+ if (msg)
+ free(msg);
+}
+
+/* Currently, the config file must be at the root of the filesystem.
+ * todo: recognize the full path to myself and use it to load the
+ * config file. Handle the "\\" (blessed system folder)
+ */
+static int
+load_config_file(char *device, char* path, int partition)
+{
+ char *conf_file = NULL, *p;
+ struct boot_file_t file;
+ int sz, opened = 0, result = 0;
+ char conf_path[512];
+ struct boot_fspec_t fspec;
+
+ /* Allocate a buffer for the config file */
+ conf_file = malloc(CONFIG_FILE_MAX);
+ if (!conf_file) {
+ prom_printf("Can't alloc config file buffer\n");
+ goto bail;
+ }
+
+ /* Build the path to the file */
+ if (_machine == _MACH_chrp)
+ strcpy(conf_path, "/etc/");
+ else if (path && *path)
+ strcpy(conf_path, path);
+ else
+ conf_path[0] = 0;
+ strcat(conf_path, CONFIG_FILE_NAME);
+
+ /* Open it */
+ fspec.dev = device;
+ fspec.file = conf_path;
+ fspec.part = partition;
+ result = open_file(&fspec, &file);
+ if (result != FILE_ERR_OK) {
+ prom_printf("%s:%d,", fspec.dev, fspec.part);
+ prom_perror(result, fspec.file);
+ prom_printf("Can't open config file\n");
+ goto bail;
+ }
+ opened = 1;
+
+ /* Read it */
+ sz = file.fs->read(&file, CONFIG_FILE_MAX, conf_file);
+ if (sz <= 0) {
+ prom_printf("Error, can't read config file\n");
+ goto bail;
+ }
+ prom_printf("Config file read, %d bytes\n", sz);
+
+ /* Close the file */
+ if (opened)
+ file.fs->close(&file);
+ opened = 0;
+
+ /* Call the parsing code in cfg.c */
+ if (cfg_parse(conf_path, conf_file, sz) < 0) {
+ prom_printf ("Syntax error or read error config\n");
+ goto bail;
+ }
+
+ DEBUG_F("Config file successfully parsed, %d bytes\n", sz);
+
+ /* Now, we do the initialisations stored in the config file */
+ p = cfg_get_strg(0, "init-code");
+ if (p)
+ prom_interpret(p);
+
+ password = cfg_get_strg(0, "password");
+
+#ifdef CONFIG_COLOR_TEXT
+ p = cfg_get_strg(0, "fgcolor");
+ if (p) {
+ DEBUG_F("fgcolor=%s\n", p);
+ fgcolor = check_color_text_ui(p);
+ if (fgcolor == -1) {
+ prom_printf("Invalid fgcolor: \"%s\".\n", p);
+ }
+ }
+ p = cfg_get_strg(0, "bgcolor");
+ if (p) {
+ DEBUG_F("bgcolor=%s\n", p);
+ bgcolor = check_color_text_ui(p);
+ if (bgcolor == -1)
+ prom_printf("Invalid bgcolor: \"%s\".\n", p);
+ }
+ if (bgcolor >= 0) {
+ char temp[64];
+ sprintf(temp, "%x to background-color", bgcolor);
+ prom_interpret(temp);
+#if !DEBUG
+ prom_printf("\xc");
+#endif /* !DEBUG */
+ }
+ if (fgcolor >= 0) {
+ char temp[64];
+ sprintf(temp, "%x to foreground-color", fgcolor);
+ prom_interpret(temp);
+ }
+#endif /* CONFIG_COLOR_TEXT */
+
+ p = cfg_get_strg(0, "init-message");
+ if (p)
+ prom_printf("%s\n", p);
+
+ p = cfg_get_strg(0, "message");
+ if (p)
+ print_message_file(p);
+
+ result = 1;
+
+bail:
+
+ if (opened)
+ file.fs->close(&file);
+
+ if (result != 1 && conf_file)
+ free(conf_file);
+
+ return result;
+}
+
+void maintabfunc (void)
+{
+ if (useconf) {
+ cfg_print_images();
+ prom_printf("boot: %s", cbuff);
+ }
+}
+
+void
+word_split(char **linep, char **paramsp)
+{
+ char *p;
+
+ *paramsp = 0;
+ p = *linep;
+ if (p == 0)
+ return;
+ while (*p == ' ')
+ ++p;
+ if (*p == 0) {
+ *linep = 0;
+ return;
+ }
+ *linep = p;
+ while (*p != 0 && *p != ' ')
+ ++p;
+ while (*p == ' ')
+ *p++ = 0;
+ if (*p != 0)
+ *paramsp = p;
+}
+
+char *
+make_params(char *label, char *params)
+{
+ char *p, *q;
+ static char buffer[2048];
+
+ q = buffer;
+ *q = 0;
+
+ p = cfg_get_strg(label, "literal");
+ if (p) {
+ strcpy(q, p);
+ q = strchr(q, 0);
+ if (params) {
+ if (*p)
+ *q++ = ' ';
+ strcpy(q, params);
+ }
+ return buffer;
+ }
+
+ p = cfg_get_strg(label, "root");
+ if (p) {
+ strcpy (q, "root=");
+ strcpy (q + 5, p);
+ q = strchr (q, 0);
+ *q++ = ' ';
+ }
+ if (cfg_get_flag(label, "read-only")) {
+ strcpy (q, "ro ");
+ q += 3;
+ }
+ if (cfg_get_flag(label, "read-write")) {
+ strcpy (q, "rw ");
+ q += 3;
+ }
+ p = cfg_get_strg(label, "ramdisk");
+ if (p) {
+ strcpy (q, "ramdisk=");
+ strcpy (q + 8, p);
+ q = strchr (q, 0);
+ *q++ = ' ';
+ }
+ p = cfg_get_strg(label, "initrd-size");
+ if (p) {
+ strcpy (q, "ramdisk_size=");
+ strcpy (q + 13, p);
+ q = strchr (q, 0);
+ *q++ = ' ';
+ }
+ if (cfg_get_flag(label, "novideo")) {
+ strcpy (q, "video=ofonly");
+ q = strchr (q, 0);
+ *q++ = ' ';
+ }
+ p = cfg_get_strg (label, "append");
+ if (p) {
+ strcpy (q, p);
+ q = strchr (q, 0);
+ *q++ = ' ';
+ }
+ *q = 0;
+ pause_after = cfg_get_flag (label, "pause-after");
+ p = cfg_get_strg(label, "pause-message");
+ if (p)
+ pause_message = p;
+ if (params)
+ strcpy(q, params);
+
+ return buffer;
+}
+
+void check_password(char *str)
+{
+ int i;
+
+ prom_printf("\n%s", str);
+ for (i = 0; i < 3; i++) {
+ prom_printf ("\nPassword: ");
+ passwdbuff[0] = 0;
+ cmdedit ((void (*)(void)) 0, 1);
+ prom_printf ("\n");
+#ifdef USE_MD5_PASSWORDS
+ if (!strncmp (password, "$1$", 3)) {
+ if (!check_md5_password(passwdbuff, password))
+ return;
+ }
+ else if (!strcmp (password, passwdbuff))
+ return;
+#else /* !MD5 */
+ if (!strcmp (password, passwdbuff))
+ return;
+#endif /* USE_MD5_PASSWORDS */
+ if (i < 2) {
+ prom_sleep(1);
+ prom_printf ("Incorrect password. Try again.");
+ }
+ }
+ prom_printf(" ___________________\n< Permission denied >\n -------------------\n"
+ " \\ ^__^\n \\ (oo)\\_______\n (__)\\ )\\/\\\n"
+ " ||----w |\n || ||\n");
+ prom_sleep(4);
+ prom_interpret("reset-all");
+}
+
+int get_params(struct boot_param_t* params)
+{
+ int defpart;
+ char *defdevice = 0;
+ char *p, *q, *endp;
+ int c, n;
+ char *imagename = 0, *label;
+ int timeout = -1;
+ int beg = 0, end;
+ int singlekey = 0;
+ int restricted = 0;
+ static int first = 1;
+ static char bootargs[1024];
+ static char imagepath[1024];
+ static char initrdpath[1024];
+ static char sysmappath[1024];
+
+ pause_after = 0;
+ memset(params, 0, sizeof(*params));
+ params->args = "";
+ params->kernel.part = -1;
+ params->rd.part = -1;
+ params->sysmap.part = -1;
+ defpart = boot.part;
+
+ cmdinit();
+
+ if (first) {
+ first = 0;
+ prom_get_chosen("bootargs", bootargs, sizeof(bootargs));
+ imagename = bootargs;
+ word_split(&imagename, ¶ms->args);
+ timeout = DEFAULT_TIMEOUT;
+ if (imagename) {
+ prom_printf("Default supplied on the command line: %s ", imagename);
+ if (params->args)
+ prom_printf("%s", params->args);
+ prom_printf("\n");
+ }
+ if (useconf && (q = cfg_get_strg(0, "timeout")) != 0 && *q != 0)
+ timeout = simple_strtol(q, NULL, 0);
+ }
+
+ prom_printf("boot: ");
+ c = -1;
+ if (timeout != -1) {
+ beg = prom_getms();
+ if (timeout > 0) {
+ end = beg + 100 * timeout;
+ do {
+ c = prom_nbgetchar();
+ } while (c == -1 && prom_getms() <= end);
+ }
+ if (c == -1)
+ c = '\n';
+ else if (c != '\n' && c != '\t' && c != '\r' && c != '\b' ) {
+ cbuff[0] = c;
+ cbuff[1] = 0;
+ }
+ }
+
+ if (c != -1 && c != '\n' && c != '\r') {
+ if (c == '\t') {
+ maintabfunc ();
+ } else if (c >= ' ') {
+ cbuff[0] = c;
+ cbuff[1] = 0;
+ if ((cfg_get_flag (cbuff, "single-key")) && useconf) {
+ imagename = cbuff;
+ singlekey = 1;
+ prom_printf("%s\n", cbuff);
+ }
+ }
+ }
+
+ if (c == '\n' || c == '\r') {
+ if (!imagename)
+ imagename = cfg_get_default();
+ if (imagename)
+ prom_printf("%s", imagename);
+ if (params->args)
+ prom_printf(" %s", params->args);
+ prom_printf("\n");
+ } else if (!singlekey) {
+ cmdedit(maintabfunc, 0);
+ prom_printf("\n");
+ strcpy(given_bootargs, cbuff);
+ given_bootargs_by_user = 1;
+ imagename = cbuff;
+ word_split(&imagename, ¶ms->args);
+ }
+
+ /* chrp gets this wrong, force it -- Cort */
+ if ( useconf && (!imagename || imagename[0] == 0 ))
+ imagename = cfg_get_default();
+
+ label = 0;
+ defdevice = boot.dev;
+
+ if (useconf) {
+ defdevice = cfg_get_strg(0, "device");
+ p = cfg_get_strg(0, "partition");
+ if (p) {
+ n = simple_strtol(p, &endp, 10);
+ if (endp != p && *endp == 0)
+ defpart = n;
+ }
+ p = cfg_get_strg(0, "pause-message");
+ if (p)
+ pause_message = p;
+ if (cfg_get_flag(0, "restricted"))
+ restricted = 1;
+ p = cfg_get_strg(imagename, "image");
+ if (p && *p) {
+ label = imagename;
+ imagename = p;
+ defdevice = cfg_get_strg(label, "device");
+ if(!defdevice) defdevice=boot.dev;
+ p = cfg_get_strg(label, "partition");
+ if (p) {
+ n = simple_strtol(p, &endp, 10);
+ if (endp != p && *endp == 0)
+ defpart = n;
+ }
+ if (cfg_get_flag(label, "restricted"))
+ restricted = 1;
+ if (label) {
+ if (params->args && password && restricted)
+ check_password ("To specify arguments for this image "
+ "you must enter the password.");
+ else if (password && !restricted)
+ check_password ("This image is restricted.");
+ }
+ params->args = make_params(label, params->args);
+ }
+ }
+
+ if (!strcmp (imagename, "help")) {
+ /* FIXME: defdevice shouldn't need to be reset all over the place */
+ if(!defdevice) defdevice = boot.dev;
+ prom_printf(
+ "\nPress the tab key for a list of defined images.\n"
+ "The label marked with a \"*\" is is the default image, "
+ "press <return> to boot it.\n\n"
+ "To boot any other label simply type its name and press <return>.\n\n"
+ "To boot a kernel image which is not defined in the yaboot configuration \n"
+ "file, enter the kernel image name as [[device:][partno],]/path, where \n"
+ "\"device:\" is the OpenFirmware device path to the disk the image \n"
+ "resides on, and \"partno\" is the partition number the image resides on.\n"
+ "Note that the comma (,) is only required if you specify an OpenFirmware\n"
+ "device, if you only specify a filename you should not start it with a \",\"\n\n"
+ "If you omit \"device:\" and \"partno\" yaboot will use the values of \n"
+ "\"device=\" and \"partition=\" in yaboot.conf, right now those are set to: \n"
+ "device=%s\n"
+ "partition=%d\n\n", defdevice, defpart);
+ return 0;
+ }
+
+ if (!strcmp (imagename, "halt")) {
+ if (password)
+ check_password ("Restricted command.");
+ prom_pause();
+ return 0;
+ }
+ if (!strcmp (imagename, "bye")) {
+ if (password) {
+ check_password ("Restricted command.");
+ return 1;
+ }
+ return 1;
+ }
+
+ if (imagename[0] == '$') {
+ /* forth command string */
+ if (password)
+ check_password ("OpenFirmware commands are restricted.");
+ prom_interpret(imagename+1);
+ return 0;
+ }
+
+ strncpy(imagepath, imagename, 1024);
+
+ if (!label && password)
+ check_password ("To boot a custom image you must enter the password.");
+
+ if (!parse_device_path(imagepath, defdevice, defpart,
+ "/vmlinux", ¶ms->kernel)) {
+ prom_printf("%s: Unable to parse\n", imagepath);
+ return 0;
+ }
+ DEBUG_F("after parse_device_path: dev=%s part=%d file=%s\n", params->kernel.dev,
+ params->kernel.part, params->kernel.file);
+
+ if (useconf) {
+ p = cfg_get_strg(label, "initrd");
+ if (p && *p) {
+ DEBUG_F("Parsing initrd path <%s>\n", p);
+ strncpy(initrdpath, p, 1024);
+ if (!parse_device_path(initrdpath, defdevice, defpart,
+ "/root.bin", ¶ms->rd)) {
+ prom_printf("%s: Unable to parse\n", imagepath);
+ return 0;
+ }
+ }
+ p = cfg_get_strg(label, "sysmap");
+ if (p && *p) {
+ DEBUG_F("Parsing sysmap path <%s>\n", p);
+ strncpy(sysmappath, p, 1024);
+ if (!parse_device_path(sysmappath, defdevice, defpart,
+ "/boot/System.map", ¶ms->sysmap)) {
+ prom_printf("%s: Unable to parse\n", imagepath);
+ return 0;
+ }
+ }
+ }
+ return 0;
+}
+
+/* This is derived from quik core. To be changed to first parse the headers
+ * doing lazy-loading, and then claim the memory before loading the kernel
+ * to it
+ * We also need to add initrd support to this whole mecanism
+ */
+void
+yaboot_text_ui(void)
+{
+#define MAX_HEADERS 32
+
+ struct boot_file_t file;
+ int result;
+ static struct boot_param_t params;
+ void *initrd_base;
+ unsigned long initrd_size;
+ void *sysmap_base;
+ unsigned long sysmap_size;
+ kernel_entry_t kernel_entry;
+ struct bi_record* birec;
+ char* loc=NULL;
+ loadinfo_t loadinfo;
+ void *initrd_more,*initrd_want;
+ unsigned long initrd_read;
+
+ loadinfo.load_loc = 0;
+
+ for (;;) {
+ initrd_size = 0;
+ initrd_base = 0;
+ sysmap_base = 0;
+ sysmap_size = 0;
+
+ if (get_params(¶ms))
+ return;
+ if (!params.kernel.file)
+ continue;
+
+ prom_printf("Please wait, loading kernel...\n");
+
+ memset(&file, 0, sizeof(file));
+
+ if (strlen(boot.file) && !strcmp(boot.file,"\\\\") && params.kernel.file[0] != '/'
+ && params.kernel.file[0] != '\\') {
+ loc=(char*)malloc(strlen(params.kernel.file)+3);
+ if (!loc) {
+ prom_printf ("malloc error\n");
+ goto next;
+ }
+ strcpy(loc,boot.file);
+ strcat(loc,params.kernel.file);
+ free(params.kernel.file);
+ params.kernel.file=loc;
+ }
+ result = open_file(¶ms.kernel, &file);
+ if (result != FILE_ERR_OK) {
+ prom_printf("%s:%d,", params.kernel.dev, params.kernel.part);
+ prom_perror(result, params.kernel.file);
+ goto next;
+ }
+
+ /* Read the Elf e_ident, e_type and e_machine fields to
+ * determine Elf file type
+ */
+ if (file.fs->read(&file, sizeof(Elf_Ident), &loadinfo.elf) < sizeof(Elf_Ident)) {
+ prom_printf("\nCan't read Elf e_ident/e_type/e_machine info\n");
+ file.fs->close(&file);
+ memset(&file, 0, sizeof(file));
+ goto next;
+ }
+
+ if (is_elf32(&loadinfo)) {
+ if (!load_elf32(&file, &loadinfo)) {
+ file.fs->close(&file);
+ memset(&file, 0, sizeof(file));
+ goto next;
+ }
+ prom_printf(" Elf32 kernel loaded...\n");
+ } else if (is_elf64(&loadinfo)) {
+ if (!load_elf64(&file, &loadinfo)) {
+ file.fs->close(&file);
+ memset(&file, 0, sizeof(file));
+ goto next;
+ }
+ prom_printf(" Elf64 kernel loaded...\n");
+ } else {
+ prom_printf ("%s: Not a valid ELF image\n", params.kernel.file);
+ file.fs->close(&file);
+ memset(&file, 0, sizeof(file));
+ goto next;
+ }
+ file.fs->close(&file);
+ memset(&file, 0, sizeof(file));
+
+ /* If sysmap, load it (only if booting a vmlinux).
+ */
+ if (flat_vmlinux && params.sysmap.file) {
+ prom_printf("Loading System.map ...\n");
+ if(strlen(boot.file) && !strcmp(boot.file,"\\\\") && params.sysmap.file[0] != '/'
+ && params.sysmap.file[0] != '\\') {
+ if (loc) free(loc);
+ loc=(char*)malloc(strlen(params.sysmap.file)+3);
+ if (!loc) {
+ prom_printf ("malloc error\n");
+ goto next;
+ }
+ strcpy(loc,boot.file);
+ strcat(loc,params.sysmap.file);
+ free(params.sysmap.file);
+ params.sysmap.file=loc;
+ }
+
+ result = open_file(¶ms.sysmap, &file);
+ if (result != FILE_ERR_OK) {
+ prom_printf("%s:%d,", params.sysmap.dev, params.sysmap.part);
+ prom_perror(result, params.sysmap.file);
+ }
+ else {
+ sysmap_base = prom_claim(loadinfo.base+loadinfo.memsize, 0x100000, 0);
+ if (sysmap_base == (void *)-1) {
+ prom_printf("Claim failed for sysmap memory\n");
+ sysmap_base = 0;
+ } else {
+ sysmap_size = file.fs->read(&file, 0xfffff, sysmap_base);
+ if (sysmap_size == 0)
+ sysmap_base = 0;
+ else
+ ((char *)sysmap_base)[sysmap_size++] = 0;
+ }
+ file.fs->close(&file);
+ memset(&file, 0, sizeof(file));
+ }
+ if (sysmap_base) {
+ prom_printf("System.map loaded at %p, size: %lu Kbytes\n",
+ sysmap_base, sysmap_size >> 10);
+ loadinfo.memsize += _ALIGN(0x100000, 0x1000);
+ } else {
+ prom_printf("System.map load failed !\n");
+ prom_pause();
+ }
+ }
+
+ /* If ramdisk, load it (only if booting a vmlinux). For now, we
+ * can't tell the size it will be so we claim an arbitrary amount
+ * of 4Mb.
+ */
+ if (flat_vmlinux && params.rd.file) {
+ if(strlen(boot.file) && !strcmp(boot.file,"\\\\") && params.rd.file[0] != '/'
+ && params.kernel.file[0] != '\\')
+ {
+ if (loc) free(loc);
+ loc=(char*)malloc(strlen(params.rd.file)+3);
+ if (!loc) {
+ prom_printf ("Malloc error\n");
+ goto next;
+ }
+ strcpy(loc,boot.file);
+ strcat(loc,params.rd.file);
+ free(params.rd.file);
+ params.rd.file=loc;
+ }
+ prom_printf("Loading ramdisk...\n");
+ result = open_file(¶ms.rd, &file);
+ if (result != FILE_ERR_OK) {
+ prom_printf("%s:%d,", params.rd.dev, params.rd.part);
+ prom_perror(result, params.rd.file);
+ }
+ else {
+#define INITRD_CHUNKSIZE 0x400000
+ initrd_base = prom_claim(loadinfo.base+loadinfo.memsize, INITRD_CHUNKSIZE, 0);
+ if (initrd_base == (void *)-1) {
+ prom_printf("Claim failed for initrd memory\n");
+ initrd_base = 0;
+ } else {
+ initrd_size = file.fs->read(&file, INITRD_CHUNKSIZE, initrd_base);
+ if (initrd_size == 0)
+ initrd_base = 0;
+ initrd_read = initrd_size;
+ initrd_more = initrd_base;
+ while (initrd_read == INITRD_CHUNKSIZE ) { /* need to read more? */
+ initrd_want = (void *)((unsigned long)initrd_more+INITRD_CHUNKSIZE);
+ initrd_more = prom_claim(initrd_want, INITRD_CHUNKSIZE, 0);
+ if (initrd_more != initrd_want) {
+ prom_printf("Claim failed for initrd memory at %p rc=%p\n",initrd_want,initrd_more);
+ break;
+ }
+ initrd_read = file.fs->read(&file, INITRD_CHUNKSIZE, initrd_more);
+ DEBUG_F(" block at %p rc=%lu\n",initrd_more,initrd_read);
+ initrd_size += initrd_read;
+ }
+ }
+ file.fs->close(&file);
+ memset(&file, 0, sizeof(file));
+ }
+ if (initrd_base)
+ prom_printf("ramdisk loaded at %p, size: %lu Kbytes\n",
+ initrd_base, initrd_size >> 10);
+ else {
+ prom_printf("ramdisk load failed !\n");
+ prom_pause();
+ }
+ }
+
+ DEBUG_F("setting kernel args to: %s\n", params.args);
+ prom_setargs(params.args);
+ DEBUG_F("flushing icache...");
+ flush_icache_range ((long)loadinfo.base, (long)loadinfo.base+loadinfo.memsize);
+ DEBUG_F(" done\n");
+
+ if (flat_vmlinux) {
+ /*
+ * Fill new boot infos (only if booting a vmlinux).
+ *
+ * The birec is low on memory, probably inside the malloc pool,
+ * so we don't write it earlier. At this point, we should not
+ * use anything coming from the malloc pool.
+ */
+ birec = (struct bi_record *)_ALIGN(loadinfo.filesize+(1<<20)-1,(1<<20));
+
+ /* We make sure it's mapped. We map only 64k for now, it's
+ * plenty enough we don't claim since this precise memory
+ * range may already be claimed by the malloc pool.
+ */
+ prom_map (birec, birec, 0x10000);
+ DEBUG_F("birec at %p\n", birec);
+ DEBUG_SLEEP;
+
+ birec->tag = BI_FIRST;
+ birec->size = sizeof(struct bi_record);
+ birec = (struct bi_record *)((ulong)birec + birec->size);
+
+ birec->tag = BI_BOOTLOADER_ID;
+ sprintf( (char *)birec->data, "yaboot");
+ birec->size = sizeof(struct bi_record) + strlen("yaboot") + 1;
+ birec = (struct bi_record *)((ulong)birec + birec->size);
+
+ birec->tag = BI_MACHTYPE;
+ birec->data[0] = _machine;
+ birec->size = sizeof(struct bi_record) + sizeof(ulong);
+ birec = (struct bi_record *)((ulong)birec + birec->size);
+
+ if (sysmap_base) {
+ birec->tag = BI_SYSMAP;
+ birec->data[0] = (ulong)sysmap_base;
+ birec->data[1] = sysmap_size;
+ birec->size = sizeof(struct bi_record) + sizeof(ulong)*2;
+ birec = (struct bi_record *)((ulong)birec + birec->size);
+ }
+ birec->tag = BI_LAST;
+ birec->size = sizeof(struct bi_record);
+ birec = (struct bi_record *)((ulong)birec + birec->size);
+ }
+
+ /* compute the kernel's entry point. */
+ kernel_entry = loadinfo.base + loadinfo.entry - loadinfo.load_loc;
+
+ DEBUG_F("Kernel entry point = %p\n", kernel_entry);
+ DEBUG_F("kernel: arg1 = %p,\n"
+ " arg2 = 0x%08lx,\n"
+ " prom = %p,\n"
+ " arg4 = %d,\n"
+ " arg5 = %d\n\n",
+ initrd_base + loadinfo.load_loc, initrd_size, prom, 0, 0);
+
+ DEBUG_F("Entering kernel...\n");
+
+ /* call the kernel with our stack. */
+ kernel_entry(initrd_base + loadinfo.load_loc, initrd_size, prom, 0, 0);
+ continue;
+ next:
+ ; /* do nothing */
+ }
+}
+
+static int
+load_elf32(struct boot_file_t *file, loadinfo_t *loadinfo)
+{
+ int i;
+ Elf32_Ehdr *e = &(loadinfo->elf.elf32hdr);
+ Elf32_Phdr *p, *ph;
+ int size = sizeof(Elf32_Ehdr) - sizeof(Elf_Ident);
+ unsigned long addr, loadaddr;
+
+ /* Read the rest of the Elf header... */
+ if ((*(file->fs->read))(file, size, &e->e_version) < size) {
+ prom_printf("\nCan't read Elf32 image header\n");
+ return 0;
+ }
+
+ DEBUG_F("Elf32 header:\n");
+ DEBUG_F(" e.e_type = %d\n", (int)e->e_type);
+ DEBUG_F(" e.e_machine = %d\n", (int)e->e_machine);
+ DEBUG_F(" e.e_version = %d\n", (int)e->e_version);
+ DEBUG_F(" e.e_entry = 0x%08x\n", (int)e->e_entry);
+ DEBUG_F(" e.e_phoff = 0x%08x\n", (int)e->e_phoff);
+ DEBUG_F(" e.e_shoff = 0x%08x\n", (int)e->e_shoff);
+ DEBUG_F(" e.e_flags = %d\n", (int)e->e_flags);
+ DEBUG_F(" e.e_ehsize = 0x%08x\n", (int)e->e_ehsize);
+ DEBUG_F(" e.e_phentsize = 0x%08x\n", (int)e->e_phentsize);
+ DEBUG_F(" e.e_phnum = %d\n", (int)e->e_phnum);
+
+ loadinfo->entry = e->e_entry;
+
+ if (e->e_phnum > MAX_HEADERS) {
+ prom_printf ("Can only load kernels with one program header\n");
+ return 0;
+ }
+
+ ph = (Elf32_Phdr *)malloc(sizeof(Elf32_Phdr) * e->e_phnum);
+ if (!ph) {
+ prom_printf ("Malloc error\n");
+ return 0;
+ }
+
+ /* Now, we read the section header */
+ if ((*(file->fs->seek))(file, e->e_phoff) != FILE_ERR_OK) {
+ prom_printf ("seek error\n");
+ return 0;
+ }
+ if ((*(file->fs->read))(file, sizeof(Elf32_Phdr) * e->e_phnum, ph) !=
+ sizeof(Elf32_Phdr) * e->e_phnum) {
+ prom_printf ("read error\n");
+ return 0;
+ }
+
+ /* Scan through the program header
+ * HACK: We must return the _memory size of the kernel image, not the
+ * file size (because we have to leave room before other boot
+ * infos. This code works as a side effect of the fact that
+ * we have one section and vaddr == p_paddr
+ */
+ loadinfo->memsize = loadinfo->filesize = loadinfo->offset = 0;
+ p = ph;
+ for (i = 0; i < e->e_phnum; ++i, ++p) {
+ if (p->p_type != PT_LOAD || p->p_offset == 0)
+ continue;
+ if (loadinfo->memsize == 0) {
+ loadinfo->offset = p->p_offset;
+ loadinfo->memsize = p->p_memsz;
+ loadinfo->filesize = p->p_filesz;
+ loadinfo->load_loc = p->p_vaddr;
+ } else {
+ loadinfo->memsize = p->p_offset + p->p_memsz - loadinfo->offset; /* XXX Bogus */
+ loadinfo->filesize = p->p_offset + p->p_filesz - loadinfo->offset;
+ }
+ }
+
+ if (loadinfo->memsize == 0) {
+ prom_printf("Can't find a loadable segment !\n");
+ return 0;
+ }
+
+ /* leave some room (1Mb) for boot infos */
+ loadinfo->memsize = _ALIGN(loadinfo->memsize,(1<<20)) + 0x100000;
+ /* Claim OF memory */
+ DEBUG_F("Before prom_claim, mem_sz: 0x%08lx\n", loadinfo->memsize);
+
+ /* Determine whether we are trying to boot a vmlinux or some
+ * other binary image (eg, zImage). We load vmlinux's at
+ * KERNELADDR and all other binaries at their e_entry value.
+ */
+ if (e->e_entry == KERNEL_LINK_ADDR_PPC32) {
+ flat_vmlinux = 1;
+ loadaddr = KERNELADDR;
+ } else {
+ flat_vmlinux = 0;
+ loadaddr = e->e_entry;
+ }
+
+ /* On some systems, loadaddr may already be claimed, so try some
+ * other nearby addresses before giving up.
+ */
+ for(addr=loadaddr; addr <= loadaddr * 8 ;addr+=0x100000) {
+ loadinfo->base = prom_claim((void *)addr, loadinfo->memsize, 0);
+ if (loadinfo->base != (void *)-1) break;
+ }
+ if (loadinfo->base == (void *)-1) {
+ prom_printf("Claim error, can't allocate kernel memory\n");
+ return 0;
+ }
+
+ DEBUG_F("After ELF parsing, load base: %p, mem_sz: 0x%08lx\n",
+ loadinfo->base, loadinfo->memsize);
+ DEBUG_F(" wanted load base: 0x%08lx, mem_sz: 0x%08lx\n",
+ loadaddr, loadinfo->memsize);
+
+ /* Load the program segments... */
+ p = ph;
+ for (i = 0; i < e->e_phnum; ++i, ++p) {
+ unsigned long offset;
+ if (p->p_type != PT_LOAD || p->p_offset == 0)
+ continue;
+
+ /* Now, we skip to the image itself */
+ if ((*(file->fs->seek))(file, p->p_offset) != FILE_ERR_OK) {
+ prom_printf ("Seek error\n");
+ prom_release(loadinfo->base, loadinfo->memsize);
+ return 0;
+ }
+ offset = p->p_vaddr - loadinfo->load_loc;
+ if ((*(file->fs->read))(file, p->p_filesz, loadinfo->base+offset) != p->p_filesz) {
+ prom_printf ("Read failed\n");
+ prom_release(loadinfo->base, loadinfo->memsize);
+ return 0;
+ }
+ }
+
+ free(ph);
+
+ /* Return success at loading the Elf32 kernel */
+ return 1;
+}
+
+static int
+load_elf64(struct boot_file_t *file, loadinfo_t *loadinfo)
+{
+ int i;
+ Elf64_Ehdr *e = &(loadinfo->elf.elf64hdr);
+ Elf64_Phdr *p, *ph;
+ int size = sizeof(Elf64_Ehdr) - sizeof(Elf_Ident);
+ unsigned long addr, loadaddr;
+
+ /* Read the rest of the Elf header... */
+ if ((*(file->fs->read))(file, size, &e->e_version) < size) {
+ prom_printf("\nCan't read Elf64 image header\n");
+ return 0;
+ }
+
+ DEBUG_F("Elf64 header:\n");
+ DEBUG_F(" e.e_type = %d\n", (int)e->e_type);
+ DEBUG_F(" e.e_machine = %d\n", (int)e->e_machine);
+ DEBUG_F(" e.e_version = %d\n", (int)e->e_version);
+ DEBUG_F(" e.e_entry = 0x%016lx\n", (long)e->e_entry);
+ DEBUG_F(" e.e_phoff = 0x%016lx\n", (long)e->e_phoff);
+ DEBUG_F(" e.e_shoff = 0x%016lx\n", (long)e->e_shoff);
+ DEBUG_F(" e.e_flags = %d\n", (int)e->e_flags);
+ DEBUG_F(" e.e_ehsize = 0x%08x\n", (int)e->e_ehsize);
+ DEBUG_F(" e.e_phentsize = 0x%08x\n", (int)e->e_phentsize);
+ DEBUG_F(" e.e_phnum = %d\n", (int)e->e_phnum);
+
+ loadinfo->entry = e->e_entry;
+
+ if (e->e_phnum > MAX_HEADERS) {
+ prom_printf ("Can only load kernels with one program header\n");
+ return 0;
+ }
+
+ ph = (Elf64_Phdr *)malloc(sizeof(Elf64_Phdr) * e->e_phnum);
+ if (!ph) {
+ prom_printf ("Malloc error\n");
+ return 0;
+ }
+
+ /* Now, we read the section header */
+ if ((*(file->fs->seek))(file, e->e_phoff) != FILE_ERR_OK) {
+ prom_printf ("Seek error\n");
+ return 0;
+ }
+ if ((*(file->fs->read))(file, sizeof(Elf64_Phdr) * e->e_phnum, ph) !=
+ sizeof(Elf64_Phdr) * e->e_phnum) {
+ prom_printf ("Read error\n");
+ return 0;
+ }
+
+ /* Scan through the program header
+ * HACK: We must return the _memory size of the kernel image, not the
+ * file size (because we have to leave room before other boot
+ * infos. This code works as a side effect of the fact that
+ * we have one section and vaddr == p_paddr
+ */
+ loadinfo->memsize = loadinfo->filesize = loadinfo->offset = 0;
+ p = ph;
+ for (i = 0; i < e->e_phnum; ++i, ++p) {
+ if (p->p_type != PT_LOAD || p->p_offset == 0)
+ continue;
+ if (loadinfo->memsize == 0) {
+ loadinfo->offset = p->p_offset;
+ loadinfo->memsize = p->p_memsz;
+ loadinfo->filesize = p->p_filesz;
+ loadinfo->load_loc = p->p_vaddr;
+ } else {
+ loadinfo->memsize = p->p_offset + p->p_memsz - loadinfo->offset; /* XXX Bogus */
+ loadinfo->filesize = p->p_offset + p->p_filesz - loadinfo->offset;
+ }
+ }
+
+ if (loadinfo->memsize == 0) {
+ prom_printf("Can't find a loadable segment !\n");
+ return 0;
+ }
+
+ /* leave some room (1Mb) for boot infos */
+ loadinfo->memsize = _ALIGN(loadinfo->memsize,(1<<20)) + 0x100000;
+ /* Claim OF memory */
+ DEBUG_F("Before prom_claim, mem_sz: 0x%08lx\n", loadinfo->memsize);
+
+ /* Determine whether we are trying to boot a vmlinux or some
+ * other binary image (eg, zImage). We load vmlinux's at
+ * KERNELADDR and all other binaries at their e_entry value.
+ */
+ if (e->e_entry == KERNEL_LINK_ADDR_PPC64) {
+ flat_vmlinux = 1;
+ loadaddr = KERNELADDR;
+ } else {
+ flat_vmlinux = 0;
+ loadaddr = e->e_entry;
+ }
+
+ /* On some systems, loadaddr may already be claimed, so try some
+ * other nearby addresses before giving up.
+ */
+ for(addr=loadaddr; addr <= loadaddr * 8 ;addr+=0x100000) {
+ loadinfo->base = prom_claim((void *)addr, loadinfo->memsize, 0);
+ if (loadinfo->base != (void *)-1) break;
+ }
+ if (loadinfo->base == (void *)-1) {
+ prom_printf("Claim error, can't allocate kernel memory\n");
+ return 0;
+ }
+
+ DEBUG_F("After ELF parsing, load base: %p, mem_sz: 0x%08lx\n",
+ loadinfo->base, loadinfo->memsize);
+ DEBUG_F(" wanted load base: 0x%08lx, mem_sz: 0x%08lx\n",
+ loadaddr, loadinfo->memsize);
+
+ /* Load the program segments... */
+ p = ph;
+ for (i = 0; i < e->e_phnum; ++i, ++p) {
+ unsigned long offset;
+ if (p->p_type != PT_LOAD || p->p_offset == 0)
+ continue;
+
+ /* Now, we skip to the image itself */
+ if ((*(file->fs->seek))(file, p->p_offset) != FILE_ERR_OK) {
+ prom_printf ("Seek error\n");
+ prom_release(loadinfo->base, loadinfo->memsize);
+ return 0;
+ }
+ offset = p->p_vaddr - loadinfo->load_loc;
+ if ((*(file->fs->read))(file, p->p_filesz, loadinfo->base+offset) != p->p_filesz) {
+ prom_printf ("Read failed\n");
+ prom_release(loadinfo->base, loadinfo->memsize);
+ return 0;
+ }
+ }
+
+ free(ph);
+
+ /* Return success at loading the Elf64 kernel */
+ return 1;
+}
+
+static int
+is_elf32(loadinfo_t *loadinfo)
+{
+ Elf32_Ehdr *e = &(loadinfo->elf.elf32hdr);
+
+ return (e->e_ident[EI_MAG0] == ELFMAG0 &&
+ e->e_ident[EI_MAG1] == ELFMAG1 &&
+ e->e_ident[EI_MAG2] == ELFMAG2 &&
+ e->e_ident[EI_MAG3] == ELFMAG3 &&
+ e->e_ident[EI_CLASS] == ELFCLASS32 &&
+ e->e_ident[EI_DATA] == ELFDATA2MSB &&
+ e->e_type == ET_EXEC &&
+ e->e_machine == EM_PPC);
+}
+
+static int
+is_elf64(loadinfo_t *loadinfo)
+{
+ Elf64_Ehdr *e = &(loadinfo->elf.elf64hdr);
+
+ return (e->e_ident[EI_MAG0] == ELFMAG0 &&
+ e->e_ident[EI_MAG1] == ELFMAG1 &&
+ e->e_ident[EI_MAG2] == ELFMAG2 &&
+ e->e_ident[EI_MAG3] == ELFMAG3 &&
+ e->e_ident[EI_CLASS] == ELFCLASS64 &&
+ e->e_ident[EI_DATA] == ELFDATA2MSB &&
+ e->e_type == ET_EXEC &&
+ e->e_machine == EM_PPC64);
+}
+
+static void
+setup_display(void)
+{
+#ifdef CONFIG_SET_COLORMAP
+ static unsigned char default_colors[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xaa,
+ 0x00, 0xaa, 0x00,
+ 0x00, 0xaa, 0xaa,
+ 0xaa, 0x00, 0x00,
+ 0xaa, 0x00, 0xaa,
+ 0xaa, 0x55, 0x00,
+ 0xaa, 0xaa, 0xaa,
+ 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0xff,
+ 0x55, 0xff, 0x55,
+ 0x55, 0xff, 0xff,
+ 0xff, 0x55, 0x55,
+ 0xff, 0x55, 0xff,
+ 0xff, 0xff, 0x55,
+ 0xff, 0xff, 0xff
+ };
+ int i, result;
+ prom_handle scrn = PROM_INVALID_HANDLE;
+
+ /* Try Apple's mac-boot screen ihandle */
+ result = (int)call_prom_return("interpret", 1, 2,
+ "\" _screen-ihandle\" $find if execute else 0 then", &scrn);
+ DEBUG_F("Trying to get screen ihandle, result: %d, scrn: %p\n", result, scrn);
+
+ if (scrn == 0 || scrn == PROM_INVALID_HANDLE) {
+ char type[32];
+ /* Hrm... check to see if stdout is a display */
+ scrn = call_prom ("instance-to-package", 1, 1, prom_stdout);
+ DEBUG_F("instance-to-package of stdout is: %p\n", scrn);
+ if (prom_getprop(scrn, "device_type", type, 32) > 0 && !strncmp(type, "display", 7)) {
+ DEBUG_F("got it ! stdout is a screen\n");
+ scrn = prom_stdout;
+ } else {
+ /* Else, we try to open the package */
+ scrn = (prom_handle)call_prom( "open", 1, 1, "screen" );
+ DEBUG_F("Open screen result: %p\n", scrn);
+ }
+ }
+
+ if (scrn == PROM_INVALID_HANDLE) {
+ prom_printf("No screen device found !/n");
+ return;
+ }
+ for(i=0;i<16;i++) {
+ prom_set_color(scrn, i, default_colors[i*3],
+ default_colors[i*3+1], default_colors[i*3+2]);
+ }
+ prom_printf("\x1b[1;37m\x1b[2;40m");
+#ifdef COLOR_TEST
+ for (i=0;i<16; i++) {
+ prom_printf("\x1b[%d;%dm\x1b[1;47m%s \x1b[2;40m %s\n",
+ ansi_color_table[i].index,
+ ansi_color_table[i].value,
+ ansi_color_table[i].name,
+ ansi_color_table[i].name);
+ prom_printf("\x1b[%d;%dm\x1b[1;37m%s \x1b[2;30m %s\n",
+ ansi_color_table[i].index,
+ ansi_color_table[i].value+10,
+ ansi_color_table[i].name,
+ ansi_color_table[i].name);
+ }
+ prom_printf("\x1b[1;37m\x1b[2;40m");
+#endif /* COLOR_TEST */
+
+#if !DEBUG
+ prom_printf("\xc");
+#endif /* !DEBUG */
+
+#endif /* CONFIG_SET_COLORMAP */
+}
+
+int
+yaboot_main(void)
+{
+ char *ptype;
+
+ if (_machine == _MACH_Pmac)
+ setup_display();
+
+ prom_get_chosen("bootpath", bootdevice, sizeof(bootdevice));
+ DEBUG_F("/chosen/bootpath = %s\n", bootdevice);
+ if (bootdevice[0] == 0) {
+ prom_get_options("boot-device", bootdevice, sizeof(bootdevice));
+ DEBUG_F("boot-device = %s\n", bootdevice);
+ }
+ if (bootdevice[0] == 0) {
+ prom_printf("Couldn't determine boot device\n");
+ return -1;
+ }
+
+ if (!parse_device_path(bootdevice, NULL, -1, "", &boot)) {
+ prom_printf("%s: Unable to parse\n", bootdevice);
+ return -1;
+ }
+ DEBUG_F("After parse_device_path: dev=%s, part=%d, file=%s\n",
+ boot.dev, boot.part, boot.file);
+
+ if (strlen(boot.file)) {
+ if (!strncmp(boot.file, "\\\\", 2))
+ boot.file = "\\\\";
+ else {
+ char *p, *last;
+ p = last = boot.file;
+ while(*p) {
+ if (*p == '\\')
+ last = p;
+ p++;
+ }
+ if (p)
+ *(last) = 0;
+ else
+ boot.file = "";
+ if (strlen(boot.file))
+ strcat(boot.file, "\\");
+ }
+ }
+ DEBUG_F("After pmac path kludgeup: dev=%s, part=%d, file=%s\n",
+ boot.dev, boot.part, boot.file);
+
+ useconf = load_config_file(boot.dev, boot.file, boot.part);
+
+ prom_printf("Welcome to yaboot version " VERSION "\n");
+ prom_printf("Enter \"help\" to get some basic usage information\n");
+
+ /* I am fed up with lusers using the wrong partition type and
+ mailing me *when* it breaks */
+
+ if (_machine == _MACH_Pmac) {
+ char *entry = cfg_get_strg(0, "ptypewarning");
+ int warn = 1;
+ if (entry)
+ warn = strcmp(entry,
+ "I_know_the_partition_type_is_wrong_and_will_NOT_send_mail_when_booting_breaks");
+ if (warn) {
+ ptype = get_part_type(boot.dev, boot.part);
+ if ((ptype != NULL) && (strcmp(ptype, "Apple_Bootstrap")))
+ prom_printf("\nWARNING: Bootstrap partition type is wrong: \"%s\"\n"
+ " type should be: \"Apple_Bootstrap\"\n\n", ptype);
+ }
+ }
+
+ yaboot_text_ui();
+
+ prom_printf("Bye.\n");
+ return 0;
+}
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 5
+ * End:
+ */
Added: trunk/yaboot/util/addnote.c
===================================================================
--- trunk/yaboot/util/addnote.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/util/addnote.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,180 @@
+/*
+ * addnote.c - Program to hack in a PT_NOTE program header entry in an ELF file.
+ * This is needed for OF on RS/6000s to load an image correctly.
+ * Note that OF needs a program header entry for the note, not an
+ * ELF section.
+ *
+ * Copyright 2000 Paul Mackerras.
+ *
+ * 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.
+ */
+
+/* Usage: addnote zImage */
+
+#include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+
+char arch[] = "PowerPC";
+
+#define N_DESCR 6
+unsigned int descr[N_DESCR] = {
+ 0xffffffff, /* real-mode = true */
+ 0x00c00000, /* real-base, i.e. where we expect OF to be */
+ 0xffffffff, /* real-size */
+ 0xffffffff, /* virt-base */
+ 0xffffffff, /* virt-size */
+ 0x4000, /* load-base */
+};
+
+unsigned char buf[512];
+
+#define GET_16BE(off) ((buf[off] << 8) + (buf[(off)+1]))
+#define GET_32BE(off) ((GET_16BE(off) << 16) + GET_16BE((off)+2))
+#define PUT_16BE(off, v) (buf[off] = ((v) >> 8) & 0xff, \
+ buf[(off) + 1] = (v) & 0xff)
+#define PUT_32BE(off, v) (PUT_16BE((off), (v) >> 16), \
+ PUT_16BE((off) + 2, (v)))
+
+/* Structure of an ELF file */
+#define E_IDENT 0 /* ELF header */
+#define E_PHOFF 28
+#define E_PHENTSIZE 42
+#define E_PHNUM 44
+#define E_HSIZE 52 /* size of ELF header */
+
+#define EI_MAGIC 0 /* offsets in E_IDENT area */
+#define EI_CLASS 4
+#define EI_DATA 5
+
+#define PH_TYPE 0 /* ELF program header */
+#define PH_OFFSET 4
+#define PH_FILESZ 16
+#define PH_HSIZE 32 /* size of program header */
+
+#define PT_NOTE 4 /* Program header type = note */
+
+#define ELFCLASS32 1
+#define ELFDATA2MSB 2
+
+unsigned char elf_magic[4] = { 0x7f, 'E', 'L', 'F' };
+
+int
+main(int ac, char **av)
+{
+ int fd, n, i;
+ int ph, ps, np;
+ int nnote, ns;
+
+ if (ac != 2) {
+ fprintf(stderr, "Usage: %s elf-file\n", av[0]);
+ exit(1);
+ }
+ fd = open(av[1], O_RDWR);
+ if (fd < 0) {
+ perror(av[1]);
+ exit(1);
+ }
+
+ nnote = strlen(arch) + 1 + (N_DESCR + 3) * 4;
+
+ n = read(fd, buf, sizeof(buf));
+ if (n < 0) {
+ perror("read");
+ exit(1);
+ }
+
+ if (n < E_HSIZE || memcmp(&buf[E_IDENT+EI_MAGIC], elf_magic, 4) != 0)
+ goto notelf;
+
+ if (buf[E_IDENT+EI_CLASS] != ELFCLASS32
+ || buf[E_IDENT+EI_DATA] != ELFDATA2MSB) {
+ fprintf(stderr, "%s is not a big-endian 32-bit ELF image\n",
+ av[1]);
+ exit(1);
+ }
+
+ ph = GET_32BE(E_PHOFF);
+ ps = GET_16BE(E_PHENTSIZE);
+ np = GET_16BE(E_PHNUM);
+ if (ph < E_HSIZE || ps < PH_HSIZE || np < 1)
+ goto notelf;
+ if (ph + (np + 1) * ps + nnote > n)
+ goto nospace;
+
+ for (i = 0; i < np; ++i) {
+ if (GET_32BE(ph + PH_TYPE) == PT_NOTE) {
+ fprintf(stderr, "%s already has a note entry\n",
+ av[1]);
+ exit(0);
+ }
+ ph += ps;
+ }
+
+ /* XXX check that the area we want to use is all zeroes */
+ for (i = 0; i < ps + nnote; ++i)
+ if (buf[ph + i] != 0)
+ goto nospace;
+
+ /* fill in the program header entry */
+ ns = ph + ps;
+ PUT_32BE(ph + PH_TYPE, PT_NOTE);
+ PUT_32BE(ph + PH_OFFSET, ns);
+ PUT_32BE(ph + PH_FILESZ, nnote);
+
+ /* fill in the note area we point to */
+ /* XXX we should probably make this a proper section */
+ PUT_32BE(ns, strlen(arch) + 1);
+ PUT_32BE(ns + 4, N_DESCR * 4);
+ PUT_32BE(ns + 8, 0x1275);
+ strcpy(&buf[ns + 12], arch);
+ ns += 12 + strlen(arch) + 1;
+ for (i = 0; i < N_DESCR; ++i)
+ PUT_32BE(ns + i * 4, descr[i]);
+
+ /* Update the number of program headers */
+ PUT_16BE(E_PHNUM, np + 1);
+
+ /* write back */
+ lseek(fd, (long) 0, SEEK_SET);
+ i = write(fd, buf, n);
+ if (i < 0) {
+ perror("write");
+ exit(1);
+ }
+ if (i < n) {
+ fprintf(stderr, "%s: write truncated\n", av[1]);
+ exit(1);
+ }
+
+ exit(0);
+
+notelf:
+ fprintf(stderr, "%s does not appear to be an ELF file\n", av[1]);
+ exit(1);
+
+nospace:
+ fprintf(stderr, "sorry, I can't find space in %s to put the note\n",
+ av[1]);
+ exit(1);
+}
+
+/*
+ * Local variables:
+ * c-file-style: "k&r"
+ * c-basic-offset: 5
+ * End:
+ */
Added: trunk/yaboot/util/elfextract.c
===================================================================
--- trunk/yaboot/util/elfextract.c 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/util/elfextract.c 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,123 @@
+/*
+ * elfextract.c - Extract the loadable program segment from an elf file.
+ *
+ * Copyright 1996 Paul Mackerras.
+ *
+ * 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.
+ */
+
+#include <stdio.h>
+#include <linux/elf.h>
+
+FILE *fi, *fo;
+char *ni, *no;
+char buf[65536];
+
+void
+rd(void *buf, int len)
+{
+ int nr;
+
+ nr = fread(buf, 1, len, fi);
+ if (nr == len)
+ return;
+ if (ferror(fi))
+ fprintf(stderr, "%s: read error\n", ni);
+ else
+ fprintf(stderr, "%s: short file\n", ni);
+ exit(1);
+}
+
+int
+main(int ac, char **av)
+{
+ unsigned nb, len, i;
+ Elf32_Ehdr eh;
+ Elf32_Phdr ph;
+ unsigned long phoffset = 0;
+ unsigned long phsize = 0;
+ unsigned long prevaddr = 0;
+
+ if (ac > 3 || (ac > 1 && av[1][0] == '-')) {
+ fprintf(stderr, "Usage: %s [elf-file [image-file]]\n", av[0]);
+ exit(0);
+ }
+
+ fi = stdin;
+ ni = "(stdin)";
+ fo = stdout;
+ no = "(stdout)";
+
+ if (ac > 1) {
+ ni = av[1];
+ fi = fopen(ni, "rb");
+ if (fi == NULL) {
+ perror(ni);
+ exit(1);
+ }
+ }
+
+ rd(&eh, sizeof(eh));
+ if (eh.e_ident[EI_MAG0] != ELFMAG0
+ || eh.e_ident[EI_MAG1] != ELFMAG1
+ || eh.e_ident[EI_MAG2] != ELFMAG2
+ || eh.e_ident[EI_MAG3] != ELFMAG3) {
+ fprintf(stderr, "%s: not an ELF file\n", ni);
+ exit(1);
+ }
+
+ fseek(fi, eh.e_phoff, 0);
+ phsize = 0;
+ for (i = 0; i < eh.e_phnum; ++i) {
+ rd(&ph, sizeof(ph));
+ if (ph.p_type != PT_LOAD)
+ continue;
+ if (phsize == 0 || prevaddr == 0) {
+ phoffset = ph.p_offset;
+ phsize = ph.p_filesz;
+ } else
+ phsize = ph.p_offset + ph.p_filesz - phoffset;
+ prevaddr = ph.p_vaddr;
+ }
+ if (phsize == 0) {
+ fprintf(stderr, "%s: doesn't have a loadable segment\n", ni);
+ exit(1);
+ }
+
+ if (ac > 2) {
+ no = av[2];
+ fo = fopen(no, "wb");
+ if (fo == NULL) {
+ perror(no);
+ exit(1);
+ }
+ }
+
+ fseek(fi, phoffset, 0);
+ for (len = phsize; len != 0; len -= nb) {
+ nb = len;
+ if (nb > sizeof(buf))
+ nb = sizeof(buf);
+ rd(buf, nb);
+ if (fwrite(buf, 1, nb, fo) != nb) {
+ fprintf(stderr, "%s: write error\n", no);
+ exit(1);
+ }
+ }
+
+ fclose(fo);
+ fclose(fi);
+ exit(0);
+}
Added: trunk/yaboot/ybin/mkofboot
===================================================================
--- trunk/yaboot/ybin/mkofboot 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/ybin/mkofboot 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1 @@
+link ybin
\ No newline at end of file
Property changes on: trunk/yaboot/ybin/mkofboot
___________________________________________________________________
Name: svn:special
+ *
Added: trunk/yaboot/ybin/ofpath
===================================================================
--- trunk/yaboot/ybin/ofpath 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/ybin/ofpath 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,950 @@
+#! /bin/sh
+
+###############################################################################
+##
+## ofpath: determine OpenFirmware path from unix device node
+## Copyright (C) 2000, 2001, 2002, 2003 Ethan Benson
+##
+## Portions based on show_of_path.sh:
+##
+## Copyright (C) 2000 Olaf Hering <olh at 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.
+##
+###############################################################################
+
+PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
+PRG="${0##*/}"
+VERSION=1.0.7
+DEBUG=0
+export LC_COLLATE=C
+
+## --version output.
+version()
+{
+echo \
+"$PRG $VERSION
+Written by Ethan Benson
+Portions based on show_of_path.sh written by Olaf Hering
+
+Copyright (C) 2000, 2001, 2002, 2003 Ethan Benson
+Portions Copyright (C) 2000 Olaf Hering
+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 output.
+usage()
+{
+echo \
+"Usage: $PRG [OPTION]... FILE
+Find OpenFirmware device path from unix device node.
+
+ --debug print boring junk only useful for debugging
+ -h, --help display this help and exit
+ -V, --version output version information and exit"
+}
+
+## a small seq replacement, seq is not present on boot/rescue floppies.
+smallseq()
+{
+ local v="$1"
+ local n=1
+ echo 1
+ while [ "$v" -gt 1 ] ; do
+ echo "$(($n + 1))"
+ local n="$(($n + 1))"
+ local v="$(($v - 1))"
+ done
+ return 0
+}
+
+## a kludge to replace wc -l, wc is not present on boot/rescue
+## floppies. max file is 145 lines, 3 hosts * 16 devs each * 3 lines
+## per device, + 1 "Attached Devices:" line.
+linecount()
+{
+ if [ $# = 0 ] ; then
+ local file="$(cat)"
+ local v="$file"
+ else
+ local file="$(cat $1)"
+ local v="$file"
+ fi
+
+ if [ -z "$file" ] ; then
+ echo 0
+ return 0
+ fi
+
+ ## use real wc if available
+ if (command -v wc > /dev/null 2>&1) ; then
+ if [ -x `command -v wc` ] ; then
+ lines="$(echo "$file" | wc -l)"
+ if [ $? = 0 ] ; then
+ echo $lines
+ unset lines
+ return 0
+ fi
+ fi
+ fi
+
+ while true ; do
+ for i in `smallseq 145` ; do
+ local b="$(echo "$file" | tail -n $i)"
+ if [ "$v" = "$b" ] ; then
+ echo "$i"
+ break 2
+ fi
+ done
+ done
+ return 0
+}
+
+## small tr replacment which handles a specific need of this script.
+smalltr()
+{
+ case "$1" in
+ a) echo 1 ;; b) echo 2 ;; c) echo 3 ;; d) echo 4 ;; e) echo 5 ;; f) echo 6 ;;
+ g) echo 7 ;; h) echo 8 ;; i) echo 9 ;; j) echo 10 ;; k) echo 11 ;; l) echo 12 ;;
+ m) echo 13 ;; n) echo 14 ;; o) echo 15 ;; p) echo 16 ;;
+ 1) echo a ;; 2) echo b ;; 3) echo c ;; 4) echo d ;; 5) echo e ;;
+ 6) echo f ;; 7) echo g ;; 8) echo h ;; 9) echo i ;; 10) echo j ;;
+ 11) echo k ;; 12) echo l ;; 13) echo m ;; 14) echo n ;; 15) echo o ;;
+ 16) echo p ;;
+ esac
+ return 0
+}
+
+## replacment for grep -l which is not supported by busybox grep.
+## echo $(cat..) hack needed because busybox grep barfs with `line too
+## long' when fed /proc files. the for loop is needed since busybox
+## grep seems to have somewhat broken regexp support.
+## usage: lgrep filename regexp regexp ...
+lgrep()
+{
+ local f="$1"
+ shift
+ for i in "$@" ; do
+ echo "$(cat "$f")" | grep -q "$i" && echo "$f" && break
+ done
+ return 0
+}
+
+## if readlink is missing use a kludge
+if (command -v readlink > /dev/null 2>&1) ; then
+ true
+else
+ readlink()
+ {
+ local SYMTARGET="$(v=`ls -l "$1" 2>/dev/null` ; echo ${v##*> })"
+ if [ -n "$SYMTARGET" ] ; then
+ echo "$SYMTARGET"
+ return 0
+ else
+ return 1
+ fi
+ }
+fi
+
+## a function to print relevant scsi host path when there is more then
+## one. this function also takes care of stripping off the trailing
+## /compatible.
+printhost()
+{
+ case "$1" in
+ 1)
+ echo "${2%/*}"
+ ;;
+ 2)
+ echo "${3%/*}"
+ ;;
+ 3)
+ echo "${4%/*}"
+ ;;
+ 4)
+ echo "${5%/*}"
+ ;;
+ esac
+ return 0
+}
+
+## this finds information we need on both newworld and oldworld macs.
+## mainly what scsi host a disk is attached to.
+scsiinfo()
+{
+ ## see if system has scsi at all
+ if [ ! -f /proc/scsi/scsi ] ; then
+ local kver="$(uname -r)"
+ case "$kver" in
+ 2.5.*|2.6.*)
+ if [ -d /sys/bus/scsi/devices -a \
+ -n "$(ls /sys/bus/scsi/devices 2>/dev/null)" ] ; then
+ echo 1>&2 "$PRG: /proc/scsi/scsi does not exist"
+ echo 1>&2 "$PRG: Make sure you compiled your kernel with CONFIG_SCSI_PROC_FS=y"
+ return 1
+ fi
+ ;;
+ esac
+ echo 1>&2 "$PRG: /dev/$DEVNODE: Device not configured"
+ return 1
+ fi
+
+ ## first we have to figure out the SCSI ID, have to do that
+ ## anyway [to] find the attached scsi disks = "Direct-Access" and
+ ## stop at sda=1 sdb=2 or whatever count in 3 lines steps
+
+ ## get last letter of device node, ie sda -> a
+ SUBNODE=${DEVNODE##*sd}
+
+ ## turn SUBNODE above into a number starting at 1, ie a -> 1
+ SUBDEV="$(smalltr $SUBNODE)"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: SUBNODE=$SUBNODE SUBDEV=$SUBDEV"
+
+ DEVCOUNT=0
+
+ ## copy scsi file into a variable removing "Attached Devices"
+ ## which is the first line. this avoids a lot of
+ ## [incmopatible] crap later, and improves readability.
+
+ ## find number of lines once and recycle that number, to save
+ ## some time (linecount is a bit slow). subtract one line
+ ## to scrap Attached Devices:
+
+ SCSILINES="$(($(linecount /proc/scsi/scsi) - 1))"
+
+ if [ "$SUBDEV" -gt "$(cat /proc/scsi/scsi | grep Direct-Access | linecount)" ] ; then
+ echo 1>&2 "$PRG: /dev/$DEVNODE: Device not configured"
+ return 1
+ fi
+
+ PROCSCSI="$(cat /proc/scsi/scsi | tail -n $SCSILINES)"
+
+ for i in $(smallseq $(($SCSILINES / 3))) ; do
+
+ ## put every scsi device into one single line
+ DEVINFO="$(echo "$PROCSCSI" | head -n $(($i * 3)) | tail -n 3)"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVINFO=$DEVINFO"
+
+ ## cut the type field, expect "Direct-Access" later.
+ DEVTYPE="$(v=$(echo ${DEVINFO##*Type: }) ; echo ${v%% *})"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVTYPE=$DEVTYPE"
+
+ ## get the device id.
+ DEVID="$(v=$(echo ${DEVINFO##*Id: }) ; n=$(echo ${v%% *}) ; echo ${n#*0})"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVID=$DEVID"
+
+ ## get the scsi host id.
+ DEVHOST="$(v=$(echo ${DEVINFO##*Host: scsi}) ; echo ${v%% *})"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVHOST=$DEVHOST"
+
+ if [ "$DEVTYPE" = "Direct-Access" ] ; then
+ DEVCOUNT="$(($DEVCOUNT + 1))"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVCOUNT=$DEVCOUNT"
+ if [ "$SUBDEV" = "$DEVCOUNT" ] ; then
+ DEVICE_HOST=$DEVHOST
+ DEVICE_ID=$DEVID
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVICE_HOST=$DEVICE_HOST"
+ break
+ fi
+ fi
+ done
+
+ ## figure out what the scsi driver is, it is /proc/scsi/dirname.
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVICE_HOST=$DEVICE_HOST"
+ SCSI_DRIVER="$(x=`ls /proc/scsi/*/$DEVICE_HOST 2>/dev/null | cat` ; y=`echo ${x##*proc/scsi/}` ; echo ${y%%/*})"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: SCSI_DRIVER=$SCSI_DRIVER"
+
+ ## figure out which host we found.
+ SCSI_HOSTNUMBER="$(v=`ls /proc/scsi/$SCSI_DRIVER/* 2>/dev/null | cat | grep -n "$DEVICE_HOST\>"` ; echo ${v%%:*})"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: SCSI_HOSTNUMBER=$SCSI_HOSTNUMBER"
+
+ return 0
+}
+
+## generic function that can find OF device paths for scsi devices,
+## must be run after scsiinfo().
+scsi_ofpath()
+{
+ case "$SCSI_DRIVER" in
+ aic7xxx)
+ HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do
+ lgrep "$i" "^ADPT" "^pci900[45]" "^pciclass,01000" ; done)"
+ DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
+ echo "${DEVICE_PATH##*device-tree}/@$DEVICE_ID:$PARTITION"
+ ;;
+ sym53c8xx)
+ HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do
+ lgrep "$i" "^Symbios" "^pci1000" "^pciclass,01000" ; done)"
+ DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
+ echo "${DEVICE_PATH##*device-tree}/@$DEVICE_ID:$PARTITION"
+ ;;
+ mesh)
+ HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do
+ lgrep "$i" "mesh" ; done)"
+ DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
+ echo "${DEVICE_PATH##*device-tree}/@$DEVICE_ID:$PARTITION"
+ ;;
+ ata_k2|sata_svw)
+ HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do
+ lgrep "$i" "k2-s-ata" ; done)"
+ DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
+ echo "${DEVICE_PATH##*device-tree}/k2-sata@$DEVICE_ID/disk at 0:$PARTITION"
+ ;;
+ *)
+ echo 1>&2 "$PRG: Driver: $SCSI_DRIVER is not supported"
+ return 1
+ ;;
+ esac
+ return 0
+}
+
+ide_ofpath()
+{
+ if [ ! -L "/proc/ide/$DEVNODE" ] ; then
+ echo 1>&2 "$PRG: /dev/$DEVNODE: Device not configured"
+ return 1
+ fi
+
+ local IDEBUS="$(v=`readlink /proc/ide/$DEVNODE` ; echo ${v%%/*} )"
+ if [ -z "$IDEBUS" ] ; then
+ echo 1>&2 "$PRG: BUG: IDEBUS == NULL"
+ return 1
+ fi
+
+ case "$(uname -r)" in
+ 2.5.*|2.6.0*|2.6.1|2.6.1-*|2.6.2|2.6.2-*)
+ echo 1>&2 "$PRG: Linux kernel `uname -r` is not supported"
+ return 1
+ ;;
+ 2.6.*|2.7.*)
+ if ! (grep -q '.* .* sysfs ' /proc/mounts 2> /dev/null) ; then
+ echo 1>&2 "$PRG: sysfs must be mounted for ofpath to support this system"
+ return 1
+ fi
+ local SYS="$(m=`grep '.* .* sysfs ' /proc/mounts | head -n 1` ; echo `d=${m#* };echo ${d%% *}`)"
+ if [ -z "$SYS" -o ! -d "$SYS" ] ; then
+ echo 1>&2 "$PRG: Unable to determine sysfs mountpoint"
+ return 1
+ fi
+ local OF1275IDE="${SYS}/block/${DEVNODE}/device/../../devspec"
+ ;;
+ *)
+ local OF1275IDE="/proc/ide/$IDEBUS/devspec"
+ ;;
+ esac
+
+ if [ ! -f "$OF1275IDE" ] ; then
+ case "$(cat /proc/device-tree/model)" in
+ PowerMac3*|PowerMac4*|PowerMac5*|PowerMac6*|PowerMac7*|RackMac*)
+ local CDROM="$(grep "^drive name:" /proc/sys/dev/cdrom/info 2> /dev/null | grep $DEVNODE)"
+ if [ -z "$CDROM" ] ; then
+ echo 1>&2 "$PRG: WARNING: Your kernel is too old for proper support, device may be innaccurate."
+ echo "ultra2:$PARTITION"
+ else
+ echo "cd:$PARTITION"
+ fi
+ ;;
+ *)
+ local CDROM="$(grep "^drive name:" /proc/sys/dev/cdrom/info 2> /dev/null | grep $DEVNODE)"
+ if [ -z "$CDROM" ] ; then
+ if [ "$DEVNODE" = hda ] ; then
+ echo "hd:$PARTITION"
+ else
+ echo "ultra1:$PARTITION"
+ fi
+ else
+ echo "cd:$PARTITION"
+ fi
+ ;;
+ esac
+ else
+ local DEVSPEC="$(cat $OF1275IDE)"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVSPEC=$DEVSPEC"
+ if [ -z "$DEVSPEC" ] ; then
+ echo 1>&2 "$PRG: KERNEL BUG: $OF1275IDE exists, but is empty"
+ return 1
+ fi
+
+ if [ ! -f "/proc/ide/${IDEBUS}/channel" ] ; then
+ echo 1>&2 "$PRG: KERNEL BUG: /proc/ide/${IDEBUS}/channel does not exist"
+ return 1
+ fi
+
+ case "$(cat /proc/device-tree${DEVSPEC}/device_type 2> /dev/null)" in
+ ide|ata)
+ local MASTER="/disk at 0"
+ local SLAVE="/disk at 1"
+ ;;
+ pci-ide|pci-ata)
+ local MASTER="/@$(cat /proc/ide/${IDEBUS}/channel)/disk at 0"
+ local SLAVE="/@$(cat /proc/ide/${IDEBUS}/channel)/disk at 1"
+ ;;
+ scsi) ## some lame controllers pretend they are scsi, hopefully all kludges are created equal.
+ local MASTER="/@$(($(cat /proc/ide/${IDEBUS}/channel) * 2 + 0))"
+ local SLAVE="/@$(($(cat /proc/ide/${IDEBUS}/channel) * 2 + 1))"
+ ;;
+ *)
+ echo 1>&2 "$PRG: Unsupported IDE device type: \"$(cat /proc/device-tree${DEVSPEC}/device_type 2> /dev/null)\""
+ return 1
+ ;;
+ esac
+
+ case "$DEVNODE" in
+ hda|hdc|hde|hdg|hdi|hdk|hdm|hdo)
+ echo "${DEVSPEC}${MASTER}:$PARTITION"
+ return 0
+ ;;
+ hdb|hdd|hdf|hdh|hdj|hdl|hdn|hdp)
+ echo "${DEVSPEC}${SLAVE}:$PARTITION"
+ return 0
+ ;;
+ *)
+ echo 1>&2 "$PRG: /dev/$DEVNODE is not supported"
+ return 1
+ ;;
+ esac
+ fi
+}
+
+## figure out the OpenFirmware device path for newworld macs.
+## sd* scsi disks , hd* ide disks.
+newworld()
+{
+ case "$DEVNODE" in
+ sd*)
+ if ls -l /proc/device-tree | grep -q ^lr ; then
+ true
+ else
+ echo 1>&2 "$PRG: /proc/device-tree is broken. Do not use BootX to boot, use yaboot."
+ echo 1>&2 "$PRG: The yaboot HOWTO can be found here: http://www.alaska.net/~erbenson/doc"
+ return 1
+ fi
+
+ ## use common scsiinfo function to get info we need.
+ scsiinfo || return 1
+
+ ## now we have the data for /@$DEVID:$PARTITION
+ ## find the actual OF path.
+ scsi_ofpath || return 1
+ ;;
+ hd*)
+ ide_ofpath || return 1
+ ;;
+ *)
+ echo 1>&2 "$PRG: Device: /dev/$DEVNODE is not supported"
+ return 1
+ ;;
+ esac
+ return 0
+}
+
+oldworld()
+{
+ ## for some reason 2.4 kernels put OF aliases in aliases at 0/ instead of plain aliases/
+ if [ -d "/proc/device-tree/aliases" ] ; then
+ local ALIASES="aliases"
+ elif [ -d "/proc/device-tree/aliases at 0" ] ; then
+ local ALIASES="aliases at 0"
+ else
+ echo 1>&2 "$PRG: Cannot find OpenFirmware aliases directory in /proc/device-tree/"
+ return 1
+ fi
+
+ local MODEL="$(cat /proc/device-tree/compatible)"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: Oldworld subarch: $MODEL"
+
+ case "$MODEL" in
+ AAPL,7300*|AAPL,7500*|AAPL,8500*|AAPL,9500*|AAPL,\?\?\?\?*)
+ case "$DEVNODE" in
+ sd*)
+ scsiinfo || return 1
+ case "$SCSI_DRIVER" in
+ mesh)
+ echo $(cat /proc/device-tree/$ALIASES/scsi-int)/sd\@$DEVICE_ID:$PARTITION
+ ;;
+ 53c94)
+ echo $(cat /proc/device-tree/$ALIASES/scsi)/sd\@$DEVICE_ID:$PARTITION
+ ;;
+ *)
+ echo 1>&2 "$PRG: Driver $SCSI_DRIVER is not supported"
+ return 1
+ ;;
+ esac
+ ;;
+ *)
+ echo 1>&2 "$PRG: Unsupported device: /dev/$DEVNODE"
+ return 1
+ ;;
+ esac
+ ;;
+ AAPL,e407*)
+ case "$DEVNODE" in
+ sd*)
+ scsiinfo || return 1
+ case "$SCSI_DRIVER" in
+ mesh)
+ echo $(cat /proc/device-tree/$ALIASES/scsi)/sd\@$DEVICE_ID:$PARTITION
+ ;;
+ *)
+ echo 1>&2 "$PRG: Driver $SCSI_DRIVER is not supported"
+ return 1
+ ;;
+ esac
+ ;;
+ hda*)
+ echo $(cat /proc/device-tree/$ALIASES/ata)/ATA-Disk\@0:$PARTITION
+ ;;
+ hdb*)
+ echo $(cat /proc/device-tree/$ALIASES/ata)/ATA-Disk\@1:$PARTITION
+ ;;
+ hd*)
+ echo 1>&2 "$PRG: Device: /dev/$DEVNODE is not supported"
+ ;;
+ esac
+ ;;
+ AAPL,e826*)
+ case "$DEVNODE" in
+ sd*)
+ scsiinfo || return 1
+ case "$SCSI_DRIVER" in
+ mesh)
+ echo $(cat /proc/device-tree/$ALIASES/scsi)/sd\@$DEVICE_ID:$PARTITION
+ ;;
+ *)
+ echo 1>&2 "$PRG: Driver $SCSI_DRIVER is not supported"
+ return 1
+ ;;
+ esac
+ ;;
+ hda*)
+ echo $(cat /proc/device-tree/$ALIASES/ata)/ata-disk\@0:$PARTITION
+ ;;
+ hdb*)
+ echo $(cat /proc/device-tree/$ALIASES/ata)/ata-disk\@1:$PARTITION
+ ;;
+ hd*)
+ echo 1>&2 "$PRG: Device: /dev/$DEVNODE is not supported"
+ ;;
+ esac
+ ;;
+ AAPL,Gossamer*|AAPL,PowerMac\ G3*)
+ case "$DEVNODE" in
+ sd*)
+ scsiinfo || return 1
+ case "$SCSI_DRIVER" in
+ mesh)
+ echo $(cat /proc/device-tree/$ALIASES/scsi)/sd\@$DEVICE_ID:$PARTITION
+ ;;
+ *)
+ echo 1>&2 "$PRG: Driver $SCSI_DRIVER is not supported"
+ return 1
+ ;;
+ esac
+ ;;
+ hda*)
+ echo $(cat /proc/device-tree/$ALIASES/ide0)/ata-disk\@0:$PARTITION
+ ;;
+ hdb*)
+ echo $(cat /proc/device-tree/$ALIASES/ide0)/ata-disk\@1:$PARTITION
+ ;;
+ hdc*)
+ echo $(cat /proc/device-tree/$ALIASES/ide1)/ata-disk\@0:$PARTITION
+ ;;
+ hdd*)
+ echo $(cat /proc/device-tree/$ALIASES/ide1)/ata-disk\@1:$PARTITION
+ ;;
+ hd*)
+ echo 1>&2 "$PRG: Device: /dev/$DEVNODE is not supported"
+ ;;
+ esac
+ ;;
+ AAPL,PowerBook1998*)
+ if [ -f /proc/device-tree/$ALIASES/ata0 ] ; then
+ local ATA0=ata0
+ else
+ local ATA0=ide0
+ fi
+ if [ -f /proc/device-tree/$ALIASES/ata1 ] ; then
+ local ATA1=ata1
+ else
+ local ATA1=bay-ata1
+ fi
+ case "$DEVNODE" in
+ sd*)
+ scsiinfo || return 1
+ case "$SCSI_DRIVER" in
+ mesh)
+ echo $(cat /proc/device-tree/$ALIASES/scsi)/sd\@$DEVICE_ID:$PARTITON
+ ;;
+ *)
+ echo 1>&2 "$PRG: Driver $SCSI_DRIVER is not supported"
+ return 1
+ ;;
+ esac
+ ;;
+ hda*)
+ echo $(cat /proc/device-tree/$ALIASES/$ATA0)/ata-disk\@0:$PARTITION
+ ;;
+ hdb*)
+ echo $(cat /proc/device-tree/$ALIASES/$ATA0)/ata-disk\@1:$PARTITION
+ ;;
+ hdc*)
+ echo $(cat /proc/device-tree/$ALIASES/$ATA1)/atapi-disk\@0:$PARTITION
+ ;;
+ hdd*)
+ echo $(cat /proc/device-tree/$ALIASES/$ATA1)/atapi-disk\@1:$PARTITION
+ ;;
+ *)
+ echo 1>&2 "$PRG: Unsupported device: /dev/$DEVNODE"
+ return 1
+ ;;
+ esac
+ ;;
+ AAPL,3400/2400*)
+ case "$DEVNODE" in
+ sd*)
+ scsiinfo || return 1
+ case "$SCSI_DRIVER" in
+ mesh)
+ echo $(cat /proc/device-tree/$ALIASES/scsi-int)/sd\@$DEVICE_ID:$PARTITON
+ ;;
+ 53c94)
+ echo $(cat /proc/device-tree/$ALIASES/scsi)/sd\@$DEVICE_ID:$PARTITON
+ ;;
+ *)
+ echo 1>&2 "$PRG: Driver $SCSI_DRIVER is not supported"
+ return 1
+ ;;
+ esac
+ ;;
+ hda*)
+ echo $(cat /proc/device-tree/$ALIASES/ata0)/ata-disk\@0:$PARTITION
+ ;;
+ hdb*)
+ echo $(cat /proc/device-tree/$ALIASES/ata0)/ata-disk\@1:$PARTITION
+ ;;
+ hdc*)
+ echo $(cat /proc/device-tree/$ALIASES/ata1)/atapi-disk\@0:$PARTITION
+ ;;
+ hdd*)
+ echo $(cat /proc/device-tree/$ALIASES/ata1)/atapi-disk\@1:$PARTITION
+ ;;
+ hde*)
+ echo $(cat /proc/device-tree/$ALIASES/ata2):$PARTITION
+ ;;
+ hdf*)
+ echo $(cat /proc/device-tree/$ALIASES/ata3):$PARTITION
+ ;;
+ *)
+ echo 1>&2 "$PRG: Unsupported device: /dev/$DEVNODE"
+ return 1
+ ;;
+ esac
+ ;;
+ *)
+ echo 1>&2 "$PRG: This machine is not supported: $MODEL"
+ return 1
+ ;;
+ esac
+ return 0
+}
+
+## find OpenFirmware device path for IBM CHRP hardware (scsi only)
+chrp()
+{
+ case "$DEVNODE" in
+ sd*)
+ if ls -l /proc/device-tree | grep -q ^lr ; then
+ true
+ else
+ echo 1>&2 "$PRG: /proc/device-tree is broken."
+ return 1
+ fi
+
+ ## use common scsiinfo function to get info we need.
+ scsiinfo || return 1
+
+ ## now we have the data for /@$DEVID:$PARTITION
+ ## find the actual OF path.
+ scsi_ofpath || return 1
+ ;;
+ *)
+ echo 1>&2 "$PRG: Device: /dev/$DEVNODE is not supported"
+ return 1
+ ;;
+ esac
+ return 0
+}
+
+## If we get lame devfs name, we need to make it foad
+ckdevfs()
+{
+ case "$1" in
+ /dev/ide/*|/dev/scsi/*|/dev/discs/*)
+ return 0
+ ;;
+ *)
+ return 1
+ ;;
+ esac
+}
+
+## convert devfs names into normal short ones, written by Tom Rini.
+fixdevfs()
+{
+ ## get partition number, if any
+ local PARTNUM="${1##*[a-z]}"
+ ## Find the bus type.
+ local TYPE="$(v=${1#/dev/} ; echo ${v%/host*})"
+ ## Find the host number.
+ local HOST="$(v=${1#/dev/*/host} ; echo ${v%/bus*})"
+ ## Find the bus number.
+ local BUS="$(v=${1#/dev/*/bus} ; echo ${v%/tar*})"
+ ## Find the target.
+ local TARGET="$(v=${1#/dev/*/target} ; echo ${v%/lun*})"
+
+ case "$TYPE" in
+ ide)
+ case "$HOST" in
+ 0)
+ case "$TARGET" in
+ 0)
+ local DEV=hda
+ ;;
+ 1)
+ local DEV=hdb
+ ;;
+ esac
+ ;;
+ 1)
+ case "$TARGET" in
+ 0)
+ local DEV=hdc
+ ;;
+ 1)
+ local DEV=hdd
+ ;;
+ esac
+ ;;
+ *)
+ echo 1>&2 "$PRG: $1: Unable to translate this device, try again without devfs."
+ return 1
+ esac
+ local DEV="${DEV}${PARTNUM}"
+ echo "/dev/$DEV"
+ return 0
+ ;;
+ scsi)
+ local LUN="$(v=${1#/dev/*/lun} ; echo ${v%/*})"
+
+ ## In this case, we need to figure out what number our device is
+ local DEVCOUNT=0
+
+ ## copy scsi file into a variable removing "Attached Devices"
+ ## which is the first line. this avoids a lot of
+ ## [incmopatible] crap later, and improves readability.
+
+ ## find number of lines once and recycle that number, to save
+ ## some time (linecount is a bit slow). subtract one line
+ ## to scrap Attached Devices:
+
+ local SCSILINES="$(($(linecount /proc/scsi/scsi) - 1))"
+ local PROCSCSI="$(cat /proc/scsi/scsi | tail -n $SCSILINES)"
+
+ for i in $(smallseq $(($SCSILINES / 3))) ; do
+
+ ## put every scsi device into one single line
+ local DEVINFO="$(echo "$PROCSCSI" | head -n $(($i * 3)) | tail -n 3)"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: fixdevfs: DEVINFO=$DEVINFO"
+
+ ## cut the type field, expect "Direct-Access" later.
+ local DEVTYPE="$(v=$(echo ${DEVINFO##*Type: }) ; echo ${v%% *})"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: fixdevfs: DEVTYPE=$DEVTYPE"
+
+ if [ "$DEVTYPE" = "Direct-Access" ] ; then
+ ## Lets find out some more information
+ ## get the device id.
+ local DEVID="$(v=$(echo ${DEVINFO##*Id: }) ; n=$(echo ${v%% *}) ; echo ${n#*0})"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: fixdevfs: DEVID=$DEVID"
+
+ ## get the device lun.
+ local DEVLUN="$(v=$(echo ${DEVINFO##*Lun: }) ; n=$(echo ${v%% *}) ; echo ${n#*0})"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: fixdevfs: DEVLUN=$DEVLUN"
+
+ ## get the device channel.
+ local DEVCHAN="$(v=$(echo ${DEVINFO##*Channel: }) ; n=$(echo ${v%% *}) ; echo ${n#*0})"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: fixdevfs: DEVCHAN=$DEVCHAN"
+
+ ## get the scsi host id.
+ local DEVHOST="$(v=$(echo ${DEVINFO##*Host: scsi}) ; echo ${v%% *})"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: fixdevfs: DEVHOST=$DEVHOST"
+
+ local DEVCOUNT="$(($DEVCOUNT + 1))"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: fixdevfs: DEVCOUNT=$DEVCOUNT"
+ if [ "$DEVHOST" = "$HOST" -a "$DEVCHAN" = "$BUS" -a \
+ "$DEVID" = "$TARGET" -a "$DEVLUN" = "$LUN" ] ; then
+ local DEV="sd$(smalltr $DEVCOUNT)${PARTNUM}"
+ echo "/dev/$DEV"
+ return 0
+ fi
+ fi
+ done
+ echo 1>&2 "$PRG: $1: Unable to translate this device, try again without devfs."
+ return 1
+ ;;
+ *)
+ echo 1>&2 "$PRG: Unknown bus $TYPE"
+ return 1
+ ;;
+ esac
+ ## we should never get here
+ return 1
+}
+
+## make sure that find, head and tail can be found. otherwise the
+## script will silently give bogus paths. these are the only /usr/*
+## utilities this script depends on.
+checkutils()
+{
+ if command -v find > /dev/null 2>&1 ; then
+ [ -x `command -v find` ] || FAIL=1 ; else FAIL=1 ; fi
+ if command -v head > /dev/null 2>&1 ; then
+ [ -x `command -v head` ] || FAIL=1 ; else FAIL=1 ; fi
+ if command -v tail > /dev/null 2>&1 ; then
+ [ -x `command -v tail` ] || FAIL=1 ; else FAIL=1 ; fi
+
+ if [ "$FAIL" = 1 ] ; then
+ echo 1>&2 "$PRG: \`find', \`head', or \`tail' could not be found, aborting."
+ return 1
+ else
+ return 0
+ fi
+}
+
+## parse command line switches.
+if [ $# != 0 ] ; then
+ while true ; do
+ case "$1" in
+ -V|--version)
+ version
+ exit 0
+ ;;
+ -h|--help)
+ usage
+ exit 0
+ ;;
+ --debug)
+ DEBUG=1
+ shift
+ ;;
+ -*)
+ echo 1>&2 "$PRG: unrecognized option \`$1'"
+ echo 1>&2 "$PRG: Try \`$PRG --help' for more information."
+ exit 1
+ ;;
+ "")
+ echo 1>&2 "$PRG: You must specify a filename"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ ;;
+ *)
+ device="$1"
+ break
+ ;;
+ esac
+ done
+else
+ echo 1>&2 "$PRG: You must specify a /dev device"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+fi
+
+## check that FILE is a block device and exists.
+if [ ! -e "$device" ] ; then
+ echo 1>&2 "$PRG: $device: No such file or directory"
+ exit 1
+elif [ ! -b "$device" ] ; then
+ echo 1>&2 "$PRG: $device is not a block device"
+ exit 1
+fi
+
+## check that we are running on a GNU/Linux system, OSX/BSD does not
+## have the same /proc stuff
+if [ `uname -s` != Linux ] ; then
+ echo 1>&2 "$PRG: This utility will only work with GNU/Linux"
+ exit 1
+fi
+
+## check for ppc, i think uname -m is safe for this...
+if [ `uname -m` != ppc -a `uname -m` != ppc64 ] ; then
+ echo 1>&2 "$PRG: This utility will only work on PowerPC hardware"
+ exit 1
+fi
+
+## ofpath cannot live without procfs
+if [ ! -f /proc/uptime ] ; then
+ echo 1>&2 "$PRG: This utility requires the /proc filesystem"
+ exit 1
+fi
+
+## check for retarded devfs names and tell them to foad.
+if ckdevfs "$device" ; then
+ device="$(fixdevfs $device)" || exit 1
+fi
+
+## check for newworld mac. use cat hack due to /proc wierdness.
+if [ "$(v=`cat /proc/cpuinfo 2>/dev/null | grep pmac-generation` ; echo ${v##*:[ ]})" = NewWorld ] ; then
+ SUBARCH=NewWorld
+elif [ "$(v=`cat /proc/cpuinfo 2>/dev/null | grep pmac-generation` ; echo ${v##*:[ ]})" = OldWorld ] ; then
+ SUBARCH=OldWorld
+elif (cat /proc/cpuinfo 2>/dev/null | grep ^motherboard | grep -q AAPL) ; then
+ SUBARCH=OldWorld
+elif (cat /proc/cpuinfo 2> /dev/null | grep ^machine | grep -q 'CHRP IBM') ; then
+ SUBARCH=CHRP
+else
+ echo 1>&2 "$PRG: This machine is not yet supported"
+ exit 1
+fi
+
+## make sure /proc/device-tree exists
+if [ ! -d /proc/device-tree ] ; then
+ echo 1>&2 "$PRG: /proc/device-tree does not exist"
+ echo 1>&2 "$PRG: Make sure you compiled your kernel with CONFIG_PROC_DEVICETREE=y"
+ exit 1
+fi
+
+## make sure we have what we need.
+checkutils || exit 1
+
+## get the base device node and scrap /dev/ ie /dev/hda2 -> hda
+DEVICE="${device##*/}"
+DEVNODE="${DEVICE%%[0-9]*}"
+PARTITION="${DEVICE##*[a-z]}"
+
+## use appropriate search for right sub arch.
+case "$SUBARCH" in
+ NewWorld)
+ newworld || exit 1
+ ;;
+ OldWorld)
+ oldworld || exit 1
+ ;;
+ CHRP)
+ chrp || exit 1
+ ;;
+esac
+
+exit 0
Property changes on: trunk/yaboot/ybin/ofpath
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/ybin/yabootconfig
===================================================================
--- trunk/yaboot/ybin/yabootconfig 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/ybin/yabootconfig 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,811 @@
+#! /bin/sh
+
+###############################################################################
+##
+## yabootconfig generates a simple /etc/yaboot.conf
+## Copyright (C) 2001, 2002, 2003 Ethan Benson
+##
+## 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.
+##
+###############################################################################
+
+PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
+## allow to run out of /target in boot-floppies
+if [ -n "$PATH_PREFIX" ] ; then
+ PATH="${PATH}:${PATH_PREFIX}/sbin:${PATH_PREFIX}/bin:${PATH_PREFIX}/usr/sbin:${PATH_PREFIX}/usr/bin:${PATH_PREFIX}/usr/local/sbin:${PATH_PREFIX}/usr/local/bin"
+fi
+PRG="${0##*/}"
+VERSION=1.0.8
+CHROOT=/
+## $CONFIG is relative to $CHROOT
+CONFIG=etc/yaboot.conf
+NOINSTALL=0
+QUIET=0
+DEBUG=0
+SIGINT="$PRG: Interrupt caught ... exiting"
+export LC_COLLATE=C
+
+## avoid older versions of ofpath shipped in debian boot-floppies etc.
+if [ -x "${PATH_PREFIX}/usr/sbin/ofpath" ] ; then
+ OFPATH="${PATH_PREFIX}/usr/sbin/ofpath"
+else
+ OFPATH=ofpath
+fi
+
+## catch signals, clean up temporary file
+trap "cleanup" 0
+trap "exit 129" 1
+trap "echo 1>&2 $SIGINT ; exit 130" 2
+trap "exit 131" 3
+trap "exit 143" 15
+
+## check for printf, use it if possible otherwise fall back on
+## unreliable echo -e -n ("SUS" says echo shall support no switches)
+if [ "$(printf printf_test 2>/dev/null)" = printf_test ] ; then
+ PRINTF=printf
+else
+ PRINTF="echo -e -n"
+fi
+
+## make sure echo is not lame if we must use it.
+if [ "$PRINTF" != printf ] ; then
+ if [ "$(echo -e -n echo_test)" != "echo_test" ] ; then
+ echo 1>&2 "$PRG: printf unavailable and echo is broken, sorry."
+ exit 1
+ fi
+fi
+
+## make fake `id' if its missing, outputs 0 since if its missing we
+## are probably running on boot floppies and thus are root.
+if (command -v id > /dev/null 2>&1) ; then
+ true
+else
+ id()
+ {
+ echo 0
+ }
+fi
+
+## --version output
+version()
+{
+echo \
+"$PRG $VERSION
+Written by Ethan Benson
+
+Copyright (C) 2001, 2002, 2003 Ethan Benson
+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 output.
+usage()
+{
+echo \
+"Usage: $PRG [OPTION]...
+Generate a working /etc/yaboot.conf.
+
+ -t, --chroot set root directory $PRG should work from
+ -r, --root set root partition, Example: /dev/hda3
+ default: determined from {chroot}/etc/fstab
+ -b, --boot set bootstrap partition, Example: /dev/hda2
+ default: first type: Apple_Bootstrap partition
+ --kernel-args add an append= line with specified arguments
+ -q, --quiet don't ask any questions/confirmation
+ --noinstall don't automatically run mkofboot
+ -h, --help display this help and exit
+ -V, --version output version information and exit"
+}
+
+debug()
+{
+ [ "$DEBUG" = 0 ] && return 0
+ $PRINTF 1>&2 "$PRG: DEBUG: $1"
+}
+
+confirm()
+{
+ $PRINTF \
+"yaboot is the Linux Loader for PowerPC. $PRG sets up your system to boot directly
+from your hard disk, without the need for a boot CD, floppy or a network boot.\n"
+[ "$NOINSTALL" = 0 ] && $PRINTF "Install yaboot bootstrap on $BOOT to boot Linux from $ROOT? [Yes] "
+[ "$NOINSTALL" = 1 ] && $PRINTF "Create simple ${CHROOT}${CONFIG} to boot Linux from $ROOT? [Yes] "
+ read ans
+ case "$ans" in
+ Y|y|Yes|yes|YES|"")
+ echo "Creating a simple ${CHROOT}${CONFIG}..."
+ return 0
+ ;;
+ *)
+ if [ "$NOINSTALL" = 0 ] ; then
+ $PRINTF "Create simple ${CHROOT}${CONFIG} without installing the bootstrap? [Yes] "
+ read ans
+ case "$ans" in
+ Y|y|Yes|yes|YES|"")
+ NOINSTALL=1
+ echo 1>&2 "Creating a simple ${CHROOT}${CONFIG}..."
+ return 0
+ ;;
+ *)
+ echo "OK, quitting"
+ return 1
+ ;;
+ esac
+ else
+ echo "OK, quitting"
+ return 1
+ fi
+ ;;
+ esac
+}
+
+## find out whether we have mac-fdisk or pdisk (they work the same)
+ckmacfdisk()
+{
+ if (command -v mac-fdisk > /dev/null 2>&1) ; then
+ FDISK=mac-fdisk
+ elif (command -v pdisk > /dev/null 2>&1) ; then
+ FDISK=pdisk
+ else
+ echo 1>&2 "$PRG: Unable to locate mac-fdisk"
+ return 1
+ fi
+
+ if [ ! -x `command -v $FDISK` 2> /dev/null ] ; then
+ echo 1>&2 "$PRG: `command -v $FDISK`: Permission denied"
+ return 1
+ fi
+ debug "mac-fdisk is: $FDISK\n"
+ return 0
+}
+
+## find out if we have ddisk or fdisk (fdisk for dos labels) debian
+## uses both names
+ckfdisk()
+{
+ if (command -v ddisk > /dev/null 2>&1) ; then
+ FDISK=ddisk
+ elif (command -v fdisk > /dev/null 2>&1) ; then
+ FDISK=fdisk
+ else
+ echo 1>&2 "$PRG: Unable to locate fdisk"
+ return 1
+ fi
+
+ if [ ! -x `command -v $FDISK` 2> /dev/null ] ; then
+ echo 1>&2 "$PRG: `command -v $FDISK`: Permission denied"
+ return 1
+ fi
+ debug "fdisk is: $FDISK\n"
+ return 0
+}
+
+## find bootstrap partition, supports IBM CHRP with msdos disklabels
+findbootblock()
+{
+ ## mac partition table magic == ER
+ if [ "$(dd if="$DISK" bs=2 count=1 2> /dev/null)" = ER ] ; then
+ ckmacfdisk || return 1
+ if [ "$FDISK" = pdisk ] ; then
+ ## handle braindamaged pdisk
+ debug "dealing with pdisk deficiency...\n"
+ BOOT="$(v=`$FDISK -l "$DISK" 2>/dev/null | grep '\<Apple_Bootstrap\>'` ; echo ${v%%:*})"
+ debug "BOOT before fixup: $BOOT\n"
+ if [ -n "$BOOT" ] ; then
+ BOOT="${DISK}${BOOT}"
+ fi
+ debug "BOOT after fixup: $BOOT\n"
+ else
+ BOOT="$(v=`$FDISK -l "$DISK" 2>/dev/null | grep '\<Apple_Bootstrap\>'` ; echo ${v%%[ ]*})"
+ debug "BOOT=$BOOT\n"
+ fi
+ if [ -z "$BOOT" ] ; then
+ echo 1>&2 "$PRG: Unable to locate bootstrap partition on $DISK..."
+ echo 1>&2 "$PRG: You must create an 800K type: Apple_Bootstrap partition to make the disk bootable"
+ return 1
+ fi
+ else
+ ckfdisk || return 1
+ BOOT="$(v=`$FDISK -l "$DISK" 2>/dev/null | grep '\<PPC PReP Boot\>'` ; echo ${v%%[ ]*})"
+ debug "BOOT=$BOOT\n"
+ if [ -z "$BOOT" ] ; then
+ echo 1>&2 "$PRG: Unable to locate bootstrap partition on $DISK..."
+ echo 1>&2 "$PRG: You must create an 800K type: 0x41 PPC PReP Boot partition to make the disk bootable"
+ return 1
+ fi
+ fi
+ return 0
+}
+
+## if readlink is missing use a kludge
+if (command -v readlink > /dev/null 2>&1) ; then
+ true
+else
+ readlink()
+ {
+ SYMTARGET="$(v=`ls -l "$2" 2>/dev/null` ; echo ${v##*> })"
+ if [ -n "$SYMTARGET" ] ; then
+ echo "$SYMTARGET"
+ return 0
+ else
+ return 1
+ fi
+ }
+fi
+
+## we have to do some things differently with a retarded devfs name.
+ckdevfs()
+{
+ case "$1" in
+ /dev/ide/*|/dev/scsi/*|/dev/discs/*)
+ return 0
+ ;;
+ *)
+ return 1
+ ;;
+ esac
+}
+
+cleanup()
+{
+ if [ -n "$TMPCONF" ] ; then rm -f "$TMPCONF" ; fi
+ return 0
+}
+
+##########
+## Main ##
+##########
+
+if [ $# != 0 ] ; then
+ while true ; do
+ case "$1" in
+ -V|--version)
+ version
+ exit 0
+ ;;
+ -h|--help)
+ usage
+ exit 0
+ ;;
+ -t|--chroot)
+ if [ -n "$2" ] ; then
+ CHROOT="$2"
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ -b|--boot)
+ if [ -n "$2" ] ; then
+ BOOT="$2"
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ -r|--root)
+ if [ -n "$2" ] ; then
+ ROOT="$2"
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ --kernel-args)
+ if [ -n "$2" ] ; then
+ KERNARGS="$2"
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ -q|--quiet)
+ QUIET=1
+ shift 1
+ ;;
+ --noinstall)
+ NOINSTALL=1
+ shift 1
+ ;;
+ --debug)
+ DEBUG=1
+ shift 1
+ ;;
+ "")
+ break
+ ;;
+ *)
+ echo 1>&2 "$PRG: unrecognized option \`$1'"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ ;;
+ esac
+ done
+fi
+
+if [ `id -u` != 0 ] ; then
+ echo 1>&2 "$PRG: You are not root, go away"
+ exit 1
+fi
+
+## we need /proc because df does
+if [ ! -f /proc/uptime ] ; then
+ echo 1>&2 "$PRG: This utility requires the /proc filesystem"
+ exit 1
+fi
+
+## check that chroot exists
+if [ -d "$CHROOT" ] ; then
+ ## HACK: add trailing / to chroot, otherwise are paths later get b0rked.
+ case "$CHROOT" in
+ */)
+ true
+ ;;
+ *)
+ CHROOT="${CHROOT}/"
+ ;;
+ esac
+elif [ ! -e "$CHROOT" ] ; then
+ echo 1>&2 "$PRG: $CHROOT: No such file or directory"
+ exit 1
+elif [ ! -d "$CHROOT" ] ; then
+ echo 1>&2 "$PRG: $CHROOT: Not a directory"
+ exit 1
+fi
+
+## make sure the chroot is an actual root filesystem
+if [ ! -f "${CHROOT}etc/fstab" ] ; then
+ echo 1>&2 "$PRG: $CHROOT does not appear to be a valid root filesystem"
+ exit 1
+fi
+
+## find / device
+if [ -z "$ROOT" ] ; then
+ ## IMPORTANT! that last substitution is [<space><tab>] thats all ash will grok
+ ROOT="$(v=`grep '^[^#].*[[:blank:]]/[[:blank:]]' ${CHROOT}etc/fstab` ; echo ${v%%[ ]*})"
+ debug "ROOT=$ROOT\n"
+ if [ -z "$ROOT" ] ; then
+ echo 1>&2 "$PRG: Could not determine root partition, aborting..."
+ exit 1
+ fi
+fi
+
+## dereference label or uuid if necessary
+case "$ROOT" in
+ LABEL=*|UUID=*)
+ if ! (command -v findfs > /dev/null 2>&1) ; then
+ echo 1>&2 "$PRG: Unable to locate findfs, aborting..."
+ exit 1
+ fi
+ ROOT="$(findfs "$ROOT")"
+ if [ -z "$ROOT" -o $? != 0 ] ; then
+ echo 1>&2 "$PRG: Could not determine root partition, aborting..."
+ exit 1
+ fi
+ ;;
+esac
+
+## make sure root device exists
+if [ ! -e "$ROOT" ] ; then
+ echo 1>&2 "$PRG: $ROOT: No such file or directory"
+ exit 1
+fi
+
+## find root disk.
+if ckdevfs "$ROOT" ; then
+ DISK="${ROOT%/*}/disc"
+else
+ DISK="${ROOT%%[0-9]*}"
+fi
+if [ -z "$DISK" ] ; then
+ echo 1>&2 "$PRG: Could not determine root disk, aborting..."
+ exit 1
+fi
+
+## make sure main disk exists
+if [ ! -e "$DISK" ] ; then
+ echo 1>&2 "$PRG: $DISK: No such file or directory"
+ exit 1
+fi
+
+## find bootstrap partition
+if [ -z "$BOOT" ] ; then
+ findbootblock || exit 1
+fi
+
+## make sure bootstrap device exists
+if [ ! -e "$BOOT" ] ; then
+ echo 1>&2 "$PRG: $BOOT: No such file or directory"
+ exit 1
+fi
+
+## sanity check
+for i in "$DISK" "$ROOT" "$BOOT" ; do
+ if [ ! -b "$i" ] ; then
+ echo 1>&2 "$PRG: $i: Not a block device"
+ exit 1
+ fi
+done
+
+## unless --quiet ask permission to proceed
+if [ "$QUIET" = 0 ] ; then
+ confirm || exit 2
+fi
+
+## find the kernel in the usual places and (if not --quiet) ask the
+## user if we cannot find one.
+if [ -f "${CHROOT}vmlinux" ] ; then
+ KERNEL="${CHROOT}vmlinux"
+ if [ -f "${CHROOT}initrd" ] ; then
+ INITRD="${CHROOT}initrd"
+ elif [ -f "${CHROOT}initrd.img" ] ; then
+ INITRD="${CHROOT}initrd.img"
+ elif [ -f "${CHROOT}initrd.gz" ] ; then
+ INITRD="${CHROOT}initrd.gz"
+ fi
+elif [ -f "${CHROOT}boot/vmlinux" ] ; then
+ KERNEL="${CHROOT}boot/vmlinux"
+ if [ -f "${CHROOT}boot/initrd" ] ; then
+ INITRD="${CHROOT}boot/initrd"
+ elif [ -f "${CHROOT}boot/initrd.img" ] ; then
+ INITRD="${CHROOT}boot/initrd.img"
+ elif [ -f "${CHROOT}boot/initrd.gz" ] ; then
+ INITRD="${CHROOT}boot/initrd.gz"
+ fi
+elif [ -f "${CHROOT}boot/vmlinux-`uname -r`" ] ; then
+ KERNEL="${CHROOT}boot/vmlinux-`uname -r`"
+ if [ -f "${CHROOT}boot/initrd-`uname -r`" ] ; then
+ INITRD="${CHROOT}boot/initrd-`uname -r`"
+ elif [ -f "${CHROOT}boot/initrd-`uname -r`.img" ] ; then
+ INITRD="${CHROOT}boot/initrd-`uname -r`.img"
+ elif [ -f "${CHROOT}boot/initrd-`uname -r`.gz" ] ; then
+ INITRD="${CHROOT}boot/initrd-`uname -r`.gz"
+ fi
+elif [ -f "${CHROOT}vmlinux-`uname -r`" ] ; then
+ KERNEL="${CHROOT}vmlinux-`uname -r`"
+ if [ -f "${CHROOT}initrd-`uname -r`" ] ; then
+ INITRD="${CHROOT}initrd-`uname -r`"
+ elif [ -f "${CHROOT}initrd-`uname -r`.img" ] ; then
+ INITRD="${CHROOT}initrd-`uname -r`.img"
+ elif [ -f "${CHROOT}initrd-`uname -r`.gz" ] ; then
+ INITRD="${CHROOT}initrd-`uname -r`.gz"
+ fi
+elif [ "$QUIET" = 0 ] ; then
+ echo 1>&2 "$PRG: Cannot find a kernel, please locate one"
+ while true ; do
+ $PRINTF 1>&2 "Enter path to a kernel image: "
+ read KERN
+ if [ -f "$KERN" ] ; then
+ KERNEL="$KERN"
+ break
+ elif [ ! -e "$KERN" ] ; then
+ echo 1>&2 "$PRG: $KERN: No such file or directory"
+ elif [ -d "$KERN" ] ; then
+ echo 1>&2 "$PRG: $KERN: Is a directory"
+ else
+ echo 1>&2 "$PRG: $KERN: Is not a regular file"
+ fi
+ done
+ while true ; do
+ $PRINTF 1>&2 "Enter path to an initrd image (hit Enter for none): "
+ read IRD
+ if [ -z "$IRD" ] ; then
+ break
+ fi
+ if [ -f "$IRD" ] ; then
+ INITRD="$IRD"
+ break
+ elif [ ! -e "$IRD" ] ; then
+ echo 1>&2 "$PRG: $IRD: No such file or directory"
+ elif [ -d "$IRD" ] ; then
+ echo 1>&2 "$PRG: $IRD: Is a directory"
+ else
+ echo 1>&2 "$PRG: $IRD: Is not a regular file"
+ fi
+ done
+else
+ echo 1>&2 "$PRG: Cannot find a kernel, aborting..."
+ exit 1
+fi
+
+debug "KERNEL=$KERNEL\n"
+debug "INITRD=$INITRD\n"
+
+## get partition number the kernel lives on, and the OF device= name
+## of the whole disk.
+KERNDEV="$(v=`df "$KERNEL" 2> /dev/null | grep ^/dev/` ; echo ${v%%[ ]*})"
+KERNDIR="$(v=`df "$KERNEL" 2> /dev/null | grep ^/dev/` ; echo ${v##*[ ]})"
+LINKDEV="$(v=`df "${KERNEL%/*}/" 2>/dev/null | grep ^/dev/` ; echo ${v%%[ ]*})"
+PARTITION="${KERNDEV##*[a-z]}"
+
+if ckdevfs "$KERNDEV" ; then
+ KERNELDISK="${KERNDEV%/*}/disc"
+else
+ KERNELDISK="${KERNDEV%%[0-9]*}"
+fi
+
+if [ -n "$INITRD" ] ; then
+ ## get partition number the initrd lives on, and the OF device= name
+ ## of the whole disk.
+ IRDDEV="$(v=`df "$INITRD" 2> /dev/null | grep ^/dev/` ; echo ${v%%[ ]*})"
+ IRDDIR="$(v=`df "$INITRD" 2> /dev/null | grep ^/dev/` ; echo ${v##*[ ]})"
+ IRDLINKDEV="$(v=`df "${INITRD%/*}/" 2>/dev/null | grep ^/dev/` ; echo ${v%%[ ]*})"
+ IRDPARTITION="${KERNDEV##*[a-z]}"
+
+ if ckdevfs "$IRDDEV" ; then
+ INITRDDISK="${IRDDEV%/*}/disc"
+ else
+ INITRDDISK="${IRDDEV%%[0-9]*}"
+ fi
+fi
+
+debug "KERNEL=$KERNEL\nKERNDEV=$KERNDEV\nKERNDIR=$KERNDIR\nLINKDEV=$LINKDEV\nPARTITION=$PARTITION\nKERNELDISK=$KERNELDISK\n"
+
+if [ -n "$INITRD" ] ; then
+ debug "INITRD=$INITRD\nIRDDEV=$IRDDEV\nIRDDIR=$IRDDIR\nIRDLINKDEV=$IRDLINKDEV\nIRDPARTITION=$IRDPARTITION\nINITRDDISK=$INITRDDISK\n"
+fi
+
+## sanity check
+for i in "$KERNDEV" "$KERNDIR" "$LINKDEV" "$PARTITION" "$KERNELDISK" ; do
+ if [ -z "$i" ] ; then
+ echo 1>&2 "$PRG: Could not determine necessary information, aborting..."
+ echo 1>&2 "$PRG: Are you using chroot $PRG instead of $PRG --chroot ?"
+ exit 1
+ fi
+done
+
+if [ -n "$INITRD" ] ; then
+ ## sanity check
+ for i in "$IRDDEV" "$IRDDIR" "$IRDLINKDEV" "$IRDPARTITION" "$INITRDDISK" ; do
+ if [ -z "$i" ] ; then
+ echo 1>&2 "$PRG: Could not determine necessary information, aborting..."
+ echo 1>&2 "$PRG: Are you using chroot $PRG instead of $PRG --chroot ?"
+ exit 1
+ fi
+ done
+fi
+
+## check for cross device symlink
+if [ -L "$KERNEL" ] ; then
+ if [ "$KERNDEV" != "$LINKDEV" ] ; then
+ echo 1>&2 "$PRG: Warning: Cross device symlink $KERNEL, using it's target instead"
+ KERNEL="$(readlink -f "$KERNEL" 2>/dev/null)"
+ if [ ! -f "$KERNEL" ] ; then
+ echo 1>&2 "$PRG: Unable to canonicalize symlink's target. Do not create cross device symlinks."
+ exit 1
+ fi
+ fi
+fi
+
+if [ -n "$INITRD" ] ; then
+ ## initrd must be on same device as kernel.
+ if [ "$IRDDEV" != "$KERNDEV" -o "$IRDPARTITION" != "$IRDPARTITION" -o "$INITRDDISK" != "$KERNELDISK" ] ; then
+ echo 1>&2 "$PRG: Initrd image must be on same device as kernel image."
+ exit 1
+ fi
+
+ ## check for cross device symlink
+ if [ -L "$INITRD" ] ; then
+ if [ "$IRDDEV" != "$IRDLINKDEV" ] ; then
+ echo 1>&2 "$PRG: Warning: Cross device symlink $INITRD, using it's target instead"
+ INITRD="$(readlink -f "$INITRD" 2>/dev/null)"
+ if [ ! -f "$INITRD" ] ; then
+ echo 1>&2 "$PRG: Unable to canonicalize symlink's target. Do not create cross device symlinks."
+ exit 1
+ fi
+ fi
+ fi
+fi
+
+## only powermacs appear to need device=
+if (cat /proc/cpuinfo 2>/dev/null | grep -q pmac-generation 2> /dev/null) ; then
+ DEVICE="\ndevice=$($OFPATH $KERNELDISK)"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Unable to determine OpenFirmware device name to $KERNELDISK, aborting..."
+ exit 1
+ fi
+fi
+
+## if there is a separate /boot partition we must strip off the /boot
+## mountpoint or else yaboot will not find the kernel.
+if [ "$KERNDIR" != "$CHROOT" ] ; then
+ IMAGE="${KERNEL##*$KERNDIR}"
+else
+ IMAGE="$KERNEL"
+fi
+
+## fix chrooted path
+if [ "$CHROOT" != / ] ; then
+ IMAGE="${IMAGE##*$CHROOT}"
+fi
+
+## fix relative path (caused by chroot path fix)
+case "$IMAGE" in
+ /*)
+ true
+ ;;
+ *)
+ IMAGE="/${IMAGE}"
+ ;;
+esac
+
+if [ -n "$INITRD" ] ; then
+ ## if there is a separate /boot partition we must strip off the /boot
+ ## mountpoint or else yaboot will not find the kernel.
+ if [ "$IRDDIR" != "$CHROOT" ] ; then
+ INITRDIMG="${INITRD##*$IRDDIR}"
+ else
+ INITRDIMG="$INITRD"
+ fi
+
+ ## fix chrooted path
+ if [ "$CHROOT" != / ] ; then
+ INITRDIMG="${INITRDIMG##*$CHROOT}"
+ fi
+
+ ## fix relative path (caused by chroot path fix)
+ case "$INITRDIMG" in
+ /*)
+ true
+ ;;
+ *)
+ INITRDIMG="/${INITRDIMG}"
+ ;;
+ esac
+fi
+
+## figure out if yaboot is installed in /usr/local or not
+if [ -f /usr/local/lib/yaboot/yaboot ] ; then
+ INSTALL=/usr/local/lib/yaboot/yaboot
+elif [ -f /usr/lib/yaboot/yaboot ] ; then
+ INSTALL=/usr/lib/yaboot/yaboot
+else
+ echo 1>&2 "$PRG: yaboot is not installed correctly"
+ exit 1
+fi
+
+## newworld powermacs need the ofboot first stage loader
+if [ "$(v=`cat /proc/cpuinfo 2>/dev/null | grep pmac-generation` ; echo ${v##*:})" = NewWorld ] ; then
+ if [ -f /usr/local/lib/yaboot/ofboot ] ; then
+ OFBOOT="\nmagicboot=/usr/local/lib/yaboot/ofboot"
+ elif [ -f /usr/lib/yaboot/ofboot ] ; then
+ OFBOOT="\nmagicboot=/usr/lib/yaboot/ofboot"
+ else
+ echo 1>&2 "$PRG: yaboot is not installed correctly"
+ exit 1
+ fi
+fi
+
+## check for properly (read debian) packaged yaboot.
+if [ -d ${CHROOT}usr/share/doc/yaboot/examples ] ; then
+ HEADER="## see also: /usr/share/doc/yaboot/examples for example configurations.\n"
+fi
+
+## setup append line
+if [ -n "$KERNARGS" ] ; then
+ APPEND="\tappend=\"${KERNARGS}\"\n"
+fi
+
+## avoid user confusion when they boot an installer with video=ofonly
+## (usually via a install-safe label) and then reboot and have the box
+## not boot properly again.
+if [ -z "$APPEND" ] ; then
+ if (grep -q '\<video=ofonly\>' /proc/cmdline 2> /dev/null) ; then
+ APPEND="\tappend=\"video=ofonly\"\n"
+ fi
+fi
+
+## generate initrd= lines
+if [ -n "$INITRDIMG" ] ; then
+ INITRDIMGS="\tinitrd=$INITRDIMG\n\tinitrd-size=8192\n"
+fi
+
+## generate global section of yaboot.conf
+GLOBAL="## yaboot.conf generated by $PRG $VERSION
+##
+## run: \"man yaboot.conf\" for details. Do not make changes until you have!!
+${HEADER}##
+## For a dual-boot menu, add one or more of:
+## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ\n
+boot=${BOOT}${DEVICE:-}
+partition=$PARTITION
+root=$ROOT
+timeout=30
+install=${INSTALL}${OFBOOT:-}\n"
+
+## generate image= section
+IMAGES="
+image=$IMAGE
+\tlabel=Linux
+\tread-only\n${APPEND:-}${INITRDIMGS:-}"
+
+## safely create a tmp file then move it into place after we are sure
+## it was written.
+TMPCONF=`mktemp -q "${CHROOT}${CONFIG}.XXXXXX"`
+if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Unable to write to ${CHROOT}${CONFIG%/*}"
+ exit 1
+fi
+
+$PRINTF "${GLOBAL}${IMAGES}" > "$TMPCONF"
+if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Unable to write temporary file ${TMPCONF}, aborting..."
+ exit 1
+fi
+
+## rotate backups of /etc/yaboot.conf, 3 backups are kept
+if [ -f "${CHROOT}${CONFIG}.old" ] ; then
+ for i in 1 0 ; do
+ if [ -f "${CHROOT}${CONFIG}.old.${i}" ] ; then
+ mv -f "${CHROOT}${CONFIG}.old.$i" "${CHROOT}${CONFIG}.old.$(($i + 1))"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Unable to make backup of existing ${CHROOT}${CONFIG}.old.$i, aborting..."
+ exit 1
+ fi
+ fi
+ done
+
+ mv -f "${CHROOT}${CONFIG}.old" "${CHROOT}${CONFIG}.old.0"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Unable to make backup of existing ${CHROOT}${CONFIG}.old, aborting..."
+ exit 1
+ fi
+fi
+
+## backup /etc/yaboot.conf
+if [ -f "${CHROOT}${CONFIG}" ] ; then
+ mv -f "${CHROOT}${CONFIG}" "${CHROOT}${CONFIG}.old"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Unable to make backup of existing ${CHROOT}${CONFIG}, aborting..."
+ exit 1
+ fi
+fi
+
+## move new config into place
+mv -f "${TMPCONF}" "${CHROOT}${CONFIG}"
+if [ $? != 0 ] ; then
+ echo "$PRG: Unable to write file ${CHROOT}${CONFIG}"
+ exit 1
+else
+ ## nothing sensitive in generated config, comply with debian policy
+ chmod 644 "${CHROOT}${CONFIG}"
+fi
+
+## tell mkofboot where to find the config file if necessary
+if [ "${CHROOT}${CONFIG}" != /etc/yaboot.conf ] ; then
+ YBINARGS="-C ${CHROOT}${CONFIG}"
+fi
+
+## run mkofboot to install the bootstrap, unless --noinstall
+if [ "$NOINSTALL" = 0 ] ; then
+ if (command -v mkofboot 2>&1 > /dev/null) ; then
+ [ "$QUIET" = 0 ] && echo "Running mkofboot to make the disk bootable..."
+ mkofboot -f $YBINARGS || exit 1
+ [ "$QUIET" = 0 ] && echo "Done"
+ else
+ echo 1>&2 "$PRG: yaboot is not installed correctly, not running mkofboot"
+ exit 1
+ fi
+fi
+
+exit 0
Property changes on: trunk/yaboot/ybin/yabootconfig
___________________________________________________________________
Name: svn:executable
+
Added: trunk/yaboot/ybin/ybin
===================================================================
--- trunk/yaboot/ybin/ybin 2006-06-27 21:30:55 UTC (rev 34)
+++ trunk/yaboot/ybin/ybin 2006-07-10 20:52:46 UTC (rev 35)
@@ -0,0 +1,1730 @@
+#! /bin/sh
+
+###############################################################################
+##
+## ybin (YaBoot INstaller) installs/updates the yaboot bootloader.
+## Copyright (C) 2000, 2001, 2002, 2003 Ethan Benson
+##
+## 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.
+##
+###############################################################################
+
+PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
+## allow to run out of /target in boot-floppies
+if [ -n "$PATH_PREFIX" ] ; then
+ PATH="${PATH}:${PATH_PREFIX}/sbin:${PATH_PREFIX}/bin:${PATH_PREFIX}/usr/sbin:${PATH_PREFIX}/usr/bin:${PATH_PREFIX}/usr/local/sbin:${PATH_PREFIX}/usr/local/bin"
+fi
+PRG="${0##*/}"
+SIGINT="$PRG: Interrupt caught ... exiting"
+VERSION=1.3.13
+DEBUG=0
+VERBOSE=0
+TMP="${TMPDIR:-/tmp}"
+export LC_COLLATE=C
+
+## avoid older versions of ofpath shipped in debian boot-floppies etc.
+if [ -x "${PATH_PREFIX}/usr/sbin/ofpath" ] ; then
+ OFPATH="${PATH_PREFIX}/usr/sbin/ofpath"
+else
+ OFPATH=ofpath
+fi
+
+## catch signals, clean up junk in /tmp.
+trap "cleanup" 0
+trap "exit 129" 1
+trap "echo 1>&2 $SIGINT ; exit 130" 2
+trap "exit 131" 3
+trap "exit 143" 15
+
+## allow for non-existent config file, in which case it will be
+## generated from command line arguments.
+if [ -f /etc/yaboot.conf ] ; then
+ CONF=/etc/yaboot.conf
+ bootconf=$CONF
+ ERR=" Error in $CONF:"
+else
+ CONF=/dev/null
+ bootconf=/dev/null
+fi
+
+## define default configuration
+boot=unconfigured
+
+## allow default to work on packaged and non-packaged yaboot.
+## no default for magicboot since it is not required everywhere.
+if [ -f /usr/local/lib/yaboot/yaboot ] ; then
+ install=/usr/local/lib/yaboot/yaboot
+elif [ -f /usr/lib/yaboot/yaboot ] ; then
+ install=/usr/lib/yaboot/yaboot
+fi
+
+## defaults
+usemount=no
+if (cat /proc/cpuinfo 2> /dev/null | grep ^machine | grep -q 'CHRP IBM') ; then
+ fstype=raw
+else
+ fstype=hfs
+fi
+hfstype=tbxi
+hfscreator=UNIX
+bless=yes
+protect=no
+hide=no
+nonvram=0
+defaultos=linux
+brokenosx=no
+cdrom=no
+network=no
+of=no
+fgcolor=white
+bgcolor=black
+
+## yaboot autoconf defaults
+label=Linux
+timeout=40
+image=/vmlinux
+partition=3
+root=/dev/hda3
+device=hd:
+
+## this program behaves differently based on how its called, this
+## ensures that nothing nasty happens if someone makes a bogus
+## symlink.
+case "$PRG" in
+ ybin)
+ ;;
+ mkofboot)
+ ;;
+ *)
+ echo 1>&2 "This program must be called as either \`ybin' or \`mkofboot'"
+ exit 1
+ ;;
+esac
+
+## check for printf, use it if possible otherwise fall back on
+## unreliable echo -e -n ("SUS" says echo shall support no switches)
+if [ "$(printf printf_test 2>/dev/null)" = printf_test ] ; then
+ PRINTF=printf
+else
+ PRINTF="echo -e -n"
+fi
+
+## make fake `id' if its missing, outputs 0 since if its missing we
+## are probably running on boot floppies and thus are root.
+if (command -v id > /dev/null 2>&1) ; then
+ true
+else
+ id()
+ {
+ echo 0
+ }
+fi
+
+## --version output
+version()
+{
+echo \
+"$PRG $VERSION
+Written by Ethan Benson
+
+Copyright (C) 2000, 2001, 2002, 2003 Ethan Benson
+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 output.
+usage()
+{
+echo \
+"Usage: $PRG [OPTION]...
+Update/install bootloader onto a bootstrap partition.
+
+ -b, --boot set bootstrap partition device [ -b /dev/hda2 ]
+ -o, --ofboot set bootstrap partition OpenFirmware device
+ default: automatically determined [ -o hd:2 ]
+ -i, --install pathname to the actual bootloader binary
+ default: /usr/{local/}lib/yaboot/yaboot same as
+ install= in config file [ -i bootloader_file ]
+ -C, --config use alternate configuration file (ybin and yaboot)
+ [ -C config_file ]
+ -m, --magicboot pathname to a OpenFirmware magicboot (CHRP) script
+ --filesystem set the filesystem type of the bootstrap partition
+ available options are hfs, msdos, and raw
+ [ --filesystem hfs ] default is hfs
+ --nobless don't bless the root directory, this should only
+ be used if you are using a MacOS boot partition
+ as the bootstrap partition (not recommended)
+ -M, --mount don't use userspace hfsutils to modify the
+ bootstrap instead try and mount the filesystem
+ directly. Note that attributes cannot be set
+ this way and you will have to manually modify
+ OpenFirmware to make your system bootable
+ --protect set the read-only (locked) bit on all bootstrap
+ files
+ --hide set the invisible bit on all bootstrap files
+ this is useful of you don't want them to be
+ visible from MacOS.
+ --nonvram do not update the boot-device variable in nvram.
+ --force don't ever ask for confirmation
+ -v, --verbose make $PRG more verbose
+ --debug print boring junk only useful for debugging
+ -h, --help display this help and exit
+ -V, --version output version information and exit"
+}
+
+## configuration file parsing. FIXME: need a method which can parse
+## image= sections.
+parseconf()
+{
+case "$1" in
+ str)
+ v=`grep "^$2[\ ,=]" "$CONF"` ; echo "${v#*=}"
+ ;;
+ flag)
+ grep "^$2\>" "$CONF" > /dev/null && echo 0 || echo 1
+ ;;
+ ck)
+ grep "^$2[\ ,=]" "$CONF" > /dev/null && echo 0 || echo 1
+ ;;
+esac
+}
+
+## check for existence of a configuration file, and make sure we have
+## read permission.
+confexist()
+{
+ if [ ! -e "$CONF" ] ; then
+ echo 1>&2 "$PRG: $CONF: No such file or directory"
+ return 1
+ elif [ ! -f "$CONF" ] ; then
+ echo 1>&2 "$PRG: $CONF: Not a regular file"
+ return 1
+ elif [ ! -r "$CONF" ] ; then
+ echo 1>&2 "$PRG: $CONF: Permission denied"
+ return 1
+ else
+ return 0
+ fi
+}
+
+## check to make sure the configuration file is sane and correct.
+## maybe this is an insane ammount of error checking, but I want to
+## make sure (hopfully) nothing unexpected ever happens. and i just
+## like useful errors from programs. every error just marks an error
+## variable so we give the user as much info as possible before we
+## abandon ship.
+checkconf()
+{
+ if [ ! -e "$boot" ] ; then
+ echo 1>&2 "$PRG: $boot: No such file or directory"
+ local CONFERR=1
+ elif [ ! -b "$boot" -a ! -f "$boot" ] ; then
+ echo 1>&2 "$PRG: $boot: Not a regular file or block device"
+ local CONFERR=1
+ elif [ ! -w "$boot" -o ! -r "$boot" ] ; then
+ [ -z "$mntpoint" ] && echo 1>&2 "$PRG: $boot: Permission denied"
+ [ -z "$mntpoint" ] && CONFERR=1
+ fi
+
+ if [ ! -e "$install" ] ; then
+ echo 1>&2 "$PRG: $install: No such file or directory"
+ local CONFERR=1
+ elif [ ! -f "$install" ] ; then
+ echo 1>&2 "$PRG: $bootconf: Not a regular file"
+ local CONFERR=1
+ elif [ ! -r "$install" ] ; then
+ echo 1>&2 "$PRG: $install: Permission denied"
+ local CONFERR=1
+ fi
+
+ if [ "$bootconf" = auto ] ; then
+ true
+ elif [ ! -e "$bootconf" ] ; then
+ echo 1>&2 "$PRG: $bootconf: No such file or directory"
+ local CONFERR=1
+ elif [ ! -f "$bootconf" ] ; then
+ echo 1>&2 "$PRG: $bootconf: Not a regular file"
+ local CONFERR=1
+ elif [ ! -r "$bootconf" ] ; then
+ echo 1>&2 "$PRG: $bootconf: Permission denied"
+ local CONFERR=1
+ fi
+
+ if [ -n "$magicboot" ] ; then
+ if [ ! -e "$magicboot" ] ; then
+ echo 1>&2 "$PRG: $magicboot: No such file or directory"
+ local CONFERR=1
+ elif [ ! -f "$magicboot" ] ; then
+ echo 1>&2 "$PRG: $magicboot: Not a regular file"
+ local CONFERR=1
+ elif [ ! -r "$magicboot" ] ; then
+ echo 1>&2 "$PRG: $magicboot: Permission denied"
+ local CONFERR=1
+ fi
+ fi
+
+ case "$fstype" in
+ hfs|msdos|raw)
+ ;;
+ *)
+ if [ "$ARGFS" = 1 ] ; then
+ echo 1>&2 "$PRG: --filesystem must be either \`hfs', \`msdos', or \`raw'"
+ else
+ echo 1>&2 "$PRG:$ERR \`fstype' must be either \`hfs', \`msdos', or \`raw'"
+ fi
+ local CONFERR=1
+ ;;
+ esac
+
+ ## if we are not using HFS filesystems we don't care about HFS
+ ## specific options.
+ if [ "$fstype" = hfs ] ; then
+ if [ `echo ${#hfstype}` != 4 ] ; then
+ if [ "$ARGTP" = 1 ] ; then
+ echo 1>&2 "$PRG: --type must be 4 characters"
+ else
+ echo 1>&2 "$PRG:$ERR \`hfstype' must be 4 characters"
+ fi
+ local CONFERR=1
+ fi
+
+ if [ `echo ${#hfscreator}` != 4 ] ; then
+ if [ "$ARGCT" = 1 ] ; then
+ echo 1>&2 "$PRG: --creator must be 4 characters"
+ else
+ echo 1>&2 "$PRG:$ERR \`hfscreator' must be 4 characters"
+ fi
+ local CONFERR=1
+ fi
+ fi
+
+ ## some options are not compatible with fstype=raw
+ if [ "$fstype" = raw ] ; then
+ if [ -n "$mntpoint" ] ; then
+ echo 1>&2 "$PRG:$ERR \`mntpoint' is not compatible with fstype=raw"
+ local CONFERR=1
+ fi
+ if [ "$usemount" = yes ] ; then
+ echo 1>&2 "$PRG:$ERR \`usemount' is not compatible with fstype=raw"
+ local CONFERR=1
+ fi
+ if [ -n "$magicboot" ] ; then
+ echo 1>&2 "$PRG:$ERR \`magicboot' scripts cannot be used with fstype=raw"
+ local CONFERR=1
+ fi
+ fi
+
+ if [ -n "$mntpoint" ] ; then
+ ## standard checks
+ if [ ! -e "$mntpoint" ] ; then
+ echo 1>&2 "$PRG: $mntpoint: No such file or directory"
+ local CONFERR=1
+ elif [ ! -d "$mntpoint" ] ; then
+ echo 1>&2 "$PRG: $mntpoint: Not a directory"
+ local CONFERR=1
+ elif [ ! -w "$mntpoint" -o ! -r "$mntpoint" ] ; then
+ echo 1>&2 "$PRG: $mntpoint: Permission denied"
+ local CONFERR=1
+ elif [ ! -O "$mntpoint" -a `id -u` != 0 ] ; then
+ echo 1>&2 "$PRG: $mntpoint: Permission denied (not owner)"
+ local CONFERR=1
+ fi
+
+ ## make sure no embedded spaces exist
+ echo "$mntpoint" | grep -q [[:space:]]
+ if [ $? = 0 ] ; then
+ echo 1>&2 "$PRG:$ERR \`mntpoint=$mntpoint' contains embedded spaces, don't use lame filenames"
+ local CONFERR=1
+ fi
+
+ ## make sure $mntpoint is on $boot, this matters to nvram updating.
+ if [ "$(v=`df "$mntpoint" 2> /dev/null | grep ^/dev/` ; echo ${v%%[ ]*})" != "$boot" -a -d "$mntpoint" ] ; then
+ echo 1>&2 "$PRG: $mntpoint is not located on $boot"
+ local CONFERR=1
+ ## more then one subdirectory deep is not supported. no sed available on boot floppies ( / -> \ )
+ elif [ "$mntpoint" != "$(v=`df "$mntpoint" 2> /dev/null | grep ^/dev/` ; echo ${v##*[ ]})" ] ; then
+ echo "$(v=`df "$mntpoint" 2>/dev/null | grep ^/dev/`; m=${v##*[ ]}; echo "${mntpoint##*$m/}")" | grep -q /
+ if [ $? = 0 ] ; then
+ echo 1>&2 "$PRG:$ERR $mntpoint is more then one subdirectory deep from root of $boot"
+ local CONFERR=1
+ else
+ OFDIR="$(v=`df "$mntpoint" 2>/dev/null | grep ^/dev/`; m=${v##*[ ]}; echo "${mntpoint##*$m/}")"
+ fi
+ fi
+
+ if [ "$usemount" = no ] ; then
+ echo 1>&2 "$PRG:$ERR \`mntpoint=' requires \`usemount' be set"
+ local CONFERR=1
+ fi
+ fi
+
+ if [ -n "$magicboot" ] ; then
+ ## check for bsd loader
+ if [ -n "$bsd" ] ; then
+ if [ -f /usr/lib/yaboot/ofwboot -a -r /usr/lib/yaboot/ofwboot ] ; then
+ BSDLOADER="/usr/lib/yaboot/ofwboot"
+ elif [ -f /usr/local/lib/yaboot/ofwboot -a -r /usr/local/lib/yaboot/ofwboot ] ; then
+ BSDLOADER="/usr/local/lib/yaboot/ofwboot"
+ else
+ echo 1>&2 "$PRG: /usr/local/lib/yaboot/ofwboot: No such file or directory"
+ echo 1>&2 "$PRG: With the bsd= option set you must have the bsd boot loader ofwboot"
+ CONFERR=1
+ fi
+ fi
+
+ ## convert defaultos variable
+ case "$defaultos" in
+ linux|Linux|GNU|Gnu|gnu)
+ defaultos=bootyaboot
+ ;;
+ bootyaboot)
+ ;;
+ bsd)
+ defaultos=bootbsd
+ if [ -z "$bsd" ] ; then
+ echo 1>&2 "$PRG:$ERR no entry for \`bsd' found, but defaultos is set to \`bsd'"
+ local CONFERR=1
+ fi
+ ;;
+ macos)
+ defaultos=bootmacos
+ if [ -z "$macos" ] ; then
+ echo 1>&2 "$PRG:$ERR no entry for \`macos' found, but defaultos is set to \`macos'"
+ local CONFERR=1
+ fi
+ ;;
+ macosx)
+ defaultos=bootmacosx
+ if [ -z "$macosx" ] ; then
+ echo 1>&2 "$PRG:$ERR no entry for \`macosx' found, but defaultos is set to \`macosx'"
+ local CONFERR=1
+ fi
+ ;;
+ darwin)
+ defaultos=bootdarwin
+ if [ -z "$darwin" ] ; then
+ echo 1>&2 "$PRG:$ERR no entry for \`darwin' found, but defaultos is set to \`darwin'"
+ local CONFERR=1
+ fi
+ ;;
+ *)
+ echo 1>&2 "$PRG:$ERR \`defaultos' must be either \`linux', \`bsd', \`macos' or \`macosx'"
+ local CONFERR=1
+ ;;
+ esac
+ fi
+
+ ## nvsetenv requires /proc
+ if [ ! -f /proc/uptime -a "$nonvram" = 0 ] ; then
+ echo 1>&2 "$PRG: /proc filesystem is not mounted, nvram will not be updated"
+ nonvram=1
+ fi
+
+ if [ "$nonvram" = 0 ] ; then
+ ## see if nvsetenv exists and is executable
+ if (command -v nvsetenv > /dev/null 2>&1) ; then
+ [ -x `command -v nvsetenv` ] || MISSING=1 ; else MISSING=1
+ fi
+
+ if [ "$nonvram" = 0 ] ; then
+ ## if nvsetenv exists see if its the old broken version
+ if [ "$MISSING" != 1 ] ; then
+ nvsetenv --version > /dev/null 2>&1 || OLD=1
+ else
+ nonvram=1
+ echo 1>&2 "$PRG: Warning: \`nvsetenv' could not be found, nvram will not be updated"
+ fi
+
+ if [ "$OLD" = 1 ] ; then
+ ## i check this myself to avoid misleading error
+ ## messages. nvsetenv should REALLY support --version.
+ if [ ! -e /dev/nvram ] ; then
+ echo 1>&2 "$PRG: /dev/nvram: No such file or directory"
+ echo 1>&2 "$PRG: Warning: nvram will not be updated"
+ nonvram=1
+ elif [ ! -c /dev/nvram ] ; then
+ echo 1>&2 "$PRG: /dev/nvram: Not a character device"
+ echo 1>&2 "$PRG: Warning: nvram will not be updated"
+ nonvram=1
+ elif [ ! -w /dev/nvram -o ! -r /dev/nvram ] ; then
+ echo 1>&2 "$PRG: /dev/nvram: Permission denied"
+ echo 1>&2 "$PRG: Warning: nvram will not be updated"
+ nonvram=1
+ elif ! (dd if=/dev/nvram of=/dev/null bs=1 count=10 > /dev/null 2>&1) ; then
+ echo 1>&2 "$PRG: /dev/nvram: No such device"
+ echo 1>&2 "$PRG: Warning: nvram will not be updated"
+ nonvram=1
+ else
+ nonvram=1
+ echo 1>&2 "$PRG: Warning: Incompatible version of \`nvsetenv', nvram will not be updated"
+ fi
+ fi
+ fi
+
+ if [ -f "$boot" ] ; then
+ echo 1>&2 "$PRG: $boot is a regular file, disabling nvram updating"
+ nonvram=1
+ fi
+ fi
+
+ ## check for newworld mac. use cat hack due to /proc wierdness.
+ ## do not bail if we are on an OldWorld only warn (very loudly).
+ if [ "$(v=`cat /proc/cpuinfo 2>/dev/null | grep pmac-generation` ; echo ${v##*:})" = NewWorld ] ; then
+ true
+ elif [ "$(v=`cat /proc/cpuinfo 2>/dev/null | grep pmac-generation` ; echo ${v##*:})" = OldWorld ] ; then
+ echo 1>&2
+ echo 1>&2 '@@@@@@@@@@@@@@ WARNING!! WARNING!! WARNING!! @@@@@@@@@@@@@@'
+ echo 1>&2 "$PRG: Warning: This is an OldWorld PowerMac, $boot will **NOT** be bootable on this machine"
+ echo 1>&2 "$PRG: Oldworld PowerMacs need to use the quik bootloader, not yaboot"
+ echo 1>&2 '@@@@@@@@@@@@@@ WARNING!! WARNING!! WARNING!! @@@@@@@@@@@@@@'
+ echo 1>&2
+ [ "$nonvram" = 0 ] && echo 1>&2 "$PRG: OldWorld PowerMac, nvram will not be updated"
+ nonvram=1
+ elif (cat /proc/cpuinfo 2>/dev/null | grep ^motherboard | grep -q AAPL) ; then
+ echo 1>&2
+ echo 1>&2 '@@@@@@@@@@@@@@ WARNING!! WARNING!! WARNING!! @@@@@@@@@@@@@@'
+ echo 1>&2 "$PRG: Warning: This is an OldWorld PowerMac, $boot will **NOT** be bootable on this machine"
+ echo 1>&2 "$PRG: Oldworld PowerMacs need to use the quik bootloader, not yaboot"
+ echo 1>&2 '@@@@@@@@@@@@@@ WARNING!! WARNING!! WARNING!! @@@@@@@@@@@@@@'
+ echo 1>&2
+ [ "$nonvram" = 0 ] && echo 1>&2 "$PRG: OldWorld PowerMac, nvram will not be updated"
+ nonvram=1
+ elif (cat /proc/cpuinfo 2> /dev/null | grep ^machine | grep -q 'CHRP IBM') ; then
+ ## IBM hardware does not need nvram update AFAICT
+ nonvram=1
+ ADDNOTE=yes
+ else
+ #echo 1>&2 "$PRG: Warning: Unknown archetecture, $boot may not be bootable on this machine"
+ [ "$nonvram" = 0 ] && echo 1>&2 "$PRG: Warning: Unknown architecture, nvram will not be updated"
+ nonvram=1
+ fi
+
+ ## convert human readable color values from config to proper color
+ ## codes
+ case "$fgcolor" in
+ black) fgc=0 ;; blue) fgc=1 ;; green) fgc=2 ;; cyan) fgc=3 ;;
+ red) fgc=4 ;; purple) fgc=5 ;; brown) fgc=6 ;; light-gray) fgc=7 ;;
+ dark-gray) fgc=8 ;; light-blue) fgc=9 ;; light-green) fgc=a ;;
+ light-cyan) fgc=b ;; light-red) fgc=c ;; light-purple) fgc=d ;;
+ yellow) fgc=e ;; white) fgc=f ;;
+ *)
+ echo 1>&2 "$PRG:$ERR Invalid fgcolor: \`$fgcolor'"
+ local CONFERR=1
+ ;;
+ esac
+ case "$bgcolor" in
+ black) bgc=0 ;; blue) bgc=1 ;; green) bgc=2 ;; cyan) bgc=3 ;;
+ red) bgc=4 ;; purple) bgc=5 ;; brown) bgc=6 ;; light-gray) bgc=7 ;;
+ dark-gray) bgc=8 ;; light-blue) bgc=9 ;; light-green) bgc=a ;;
+ light-cyan) bgc=b ;; light-red) bgc=c ;; light-purple) bgc=d ;;
+ yellow) bgc=e ;; white) bgc=f ;;
+ *)
+ echo 1>&2 "$PRG:$ERR Invalid bgcolor: \`$bgcolor'"
+ local CONFERR=1
+ ;;
+ esac
+
+ ## if delay is not set use yaboot's timeout
+ if [ -z "$delay" ] ; then
+ delay="$(($timeout / 10))"
+ fi
+
+ if [ "$CONFERR" = 1 ] ; then
+ return 1
+ else
+ return 0
+ fi
+}
+
+
+## if readlink is missing use a kludge
+if (command -v readlink > /dev/null 2>&1) ; then
+ true
+else
+ readlink()
+ {
+ local SYMTARGET="$(v=`ls -l "$2" 2>/dev/null` ; echo ${v##*> })"
+ if [ -n "$SYMTARGET" ] ; then
+ echo "$SYMTARGET"
+ return 0
+ else
+ return 1
+ fi
+ }
+fi
+
+## /etc/yaboot.conf with password should not be world readable.
+permcheck()
+{
+if [ -L "$bootconf" ] ; then
+ local realfile="$(readlink -f "$bootconf")" || return 0
+else
+ local realfile="$bootconf"
+fi
+
+## don't bother if we could not read the symlink
+[ -z "$realfile" ] && return 0
+[ ! -f "$realfile" ] && return 0
+
+## get permissions, and don't bother checking if we can't
+local PERM=`v=$(ls -l "$realfile" 2>/dev/null) ; echo ${v%% *}`
+[ -z "$PERM" ] && return 0
+[ `echo ${#PERM}` != 10 ] && return 0
+
+case "$PERM" in
+ -rw-------|-r--------)
+ if [ ! -O "$realfile" -a `id -u` = 0 ] ; then
+ echo 1>&2 "$PRG: Warning: $bootconf is not owned by root"
+ fi
+ ;;
+ -rw-r-----|-r--r-----)
+ if [ ! -O "$realfile" -a `id -u` = 0 ] ; then
+ echo 1>&2 "$PRG: Warning: $bootconf is not owned by root"
+ fi
+ if [ ! -G "$realfile" -a `id -g` = 0 ] ; then
+ echo 1>&2 "$PRG: Warning: $bootconf is not owned by group root"
+ fi
+ ;;
+ -r--r--r--|-rw-r--r--|-rw-rw-r--|-rw-rw-rw-|-rw-rw----)
+ echo 1>&2 "$PRG: Warning: Insecure permissions on $bootconf: $PERM should be -rw-------"
+ ;;
+ *)
+ echo 1>&2 "$PRG: Warning: Incorrect permissions on $bootconf: $PERM should be -rw-------"
+ ;;
+esac
+}
+
+convertpath()
+{
+ ## figure out bootstrap device OF pathname if user did not supply it.
+ if [ -z "$ofboot" ] ; then
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Finding OpenFirmware device path to \`$boot'..."
+ ofboot="$($OFPATH $boot)"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Unable to find OpenFirmware path for boot=$boot"
+ echo 1>&2 "$PRG: Please add ofboot=<path> where <path> is the OpenFirmware path to $boot to $CONF"
+ local CONVERR=1
+ fi
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: ofboot set to \`$ofboot'"
+ fi
+
+ ## figure out OF device path for macos/macosx if user supplied a unix device node.
+ if [ -n "$bsd" ] ; then
+ case "$bsd" in
+ /dev/*)
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Finding OpenFirmware device path to \`$bsd'..."
+ local sbsd="$bsd"
+ bsd="$($OFPATH $bsd)"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Unable to determine OpenFirmware path for bsd=$sbsd"
+ echo 1>&2 "$PRG: Try specifying the real OpenFirmware path for bsd=$sbsd in $CONF"
+ local CONVERR=1
+ fi
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: bsd set to \`$bsd' from \`$sbsd'"
+ ;;
+ *)
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: bsd left alone: \`$bsd'"
+ ;;
+ esac
+ fi
+
+ if [ -n "$macos" ] ; then
+ case "$macos" in
+ /dev/*)
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Finding OpenFirmware device path to \`$macos'..."
+ local smacos="$macos"
+ macos="$($OFPATH $macos)"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Unable to determine OpenFirmware path for macos=$smacos"
+ echo 1>&2 "$PRG: Try specifying the real OpenFirmware path for macos=$smacos in $CONF"
+ local CONVERR=1
+ fi
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: macos set to \`$macos' from \`$smacos'"
+ ;;
+ *)
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: macos left alone: \`$macos'"
+ ;;
+ esac
+ fi
+
+ if [ -n "$macosx" ] ; then
+ case "$macosx" in
+ /dev/*)
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Finding OpenFirmware device path to \`$macosx'..."
+ local smacosx="$macosx"
+ macosx="$($OFPATH $macosx)"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Unable to determine OpenFirmware path for macosx=$smacosx"
+ echo 1>&2 "$PRG: Try specifying the real OpenFirmware path for macosx=$smacosx in $CONF"
+ local CONVERR=1
+ fi
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: macosx set to \`$macosx' from \`$smacosx'"
+ ;;
+ *)
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: macosx left alone: \`$macosx'"
+ ;;
+ esac
+ fi
+
+ if [ -n "$darwin" ] ; then
+ case "$darwin" in
+ /dev/*)
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Finding OpenFirmware device path to \`$darwin'..."
+ local sdarwin="$darwin"
+ darwin="$($OFPATH $darwin)"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Unable to determine OpenFirmware path for darwin=$sdarwin"
+ echo 1>&2 "$PRG: Try specifying the real OpenFirmware path for darwin=$sdarwin in $CONF"
+ local CONVERR=1
+ fi
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: darwin set to \`$darwin' from \`$sdarwin'"
+ ;;
+ *)
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: darwin left alone: \`$darwin'"
+ ;;
+ esac
+ fi
+
+ if [ "$CONVERR" = 1 ] ; then
+ return 1
+ else
+ return 0
+ fi
+}
+
+## make sure the hfsutils we need are installed and executable.
+checkhfsutils()
+{
+ if (command -v hmount > /dev/null 2>&1) ; then
+ [ -x `command -v hmount` ] || FAIL=1 ; else FAIL=1 ; fi
+ if (command -v humount > /dev/null 2>&1) ; then
+ [ -x `command -v humount` ] || FAIL=1 ; else FAIL=1 ; fi
+ if (command -v hcopy > /dev/null 2>&1) ; then
+ [ -x `command -v hcopy` ] || FAIL=1 ; else FAIL=1 ; fi
+ if (command -v hattrib > /dev/null 2>&1) ; then
+ [ -x `command -v hattrib` ] || FAIL=1 ; else FAIL=1 ; fi
+ if (command -v hformat > /dev/null 2>&1) ; then
+ [ -x `command -v hformat` ] || FAIL=1 ; else FAIL=1 ; fi
+
+ if [ "$FAIL" = 1 ] ; then
+ return 1
+ else
+ return 0
+ fi
+}
+
+## This is gross, IBM CHRP OF needs a .note added to the yaboot
+## binary, nobody knows whether this note will affect PowerMac OF or
+## not (or could in the future).
+hack_yaboot()
+{
+ local YBDIR="${install%/*}"
+ if [ -x "$YBDIR/addnote" ] ; then
+ TMPYABOOT=`mktemp -q "$TMP/yaboot.XXXXXX"`
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Could not create temporary file, aborting."
+ return 1
+ else
+ if (cat "$install" > "$TMPYABOOT" 2> /dev/null) ; then
+ install="$TMPYABOOT"
+ else
+ echo 1>&2 "$PRG: Could not create temporary file, aborting."
+ return 1
+ fi
+ fi
+ [ "$DEBUG" = 1 ] && echo "$PRG: Embedding CHRP note section in temp yaboot..."
+ "$YBDIR/addnote" "$install" > /dev/null 2>&1
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Could not install note section required by your architecture"
+ return 1
+ fi
+ else
+ echo 1>&2 "$PRG: Your architecture requires $YBDIR/addnote which cannot be found"
+ return 1
+ fi
+ return 0
+}
+
+## install using userspace utilities rather then kernel filesytem
+## support. hfsutils only, mtools not supported.
+util_install()
+{
+ ## catch signals, and humount, cleanup done by trap 0.
+ trap "humount $boot ; exit 129" 1
+ trap "echo 1>&2 $SIGINT ; humount $boot ; exit 130" 2
+ trap "humount $boot ; exit 131" 3
+ trap "humount $boot ; exit 143" 15
+
+ ## filenames on bootstrap partition. ofboot hard codes yaboot.
+ local BTFILE=yaboot
+ local CFFILE=yaboot.conf
+
+ ## if there is a magicboot script to install we will give it the
+ ## hfstype (should be "tbxi") and give yaboot type "boot".
+ if [ -n "$magicboot" ] ; then
+ local BTTYPE=boot
+ else
+ local BTTYPE="$hfstype"
+ fi
+
+ if [ -n "$magicboot" ] ; then
+ local WRAP="${magicboot##*/}"
+ fi
+
+ ## set verbose messages here so they don't show temporary file paths
+ local INSTALLFIRST="$PRG: Installing first stage bootstrap $magicboot onto $boot..."
+ local INSTALLPRIMARY="$PRG: Installing primary bootstrap $install onto $boot..."
+
+ ## repoint magicboot as the real first stage loader if using the
+ ## modern automatic generating ofboot.b.
+ if [ -n "$FIRST" ] ; then
+ magicboot="$FIRST"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: set magicboot to $FIRST"
+ fi
+
+ ## gross hack, add note section for IBM CHRP
+ if [ "$ADDNOTE" = yes ] ; then
+ hack_yaboot || return 1
+ fi
+
+ if [ "$fstype" = hfs ] ; then
+ if [ "$protect" = yes ] ; then
+ local LOCK="+l"
+ fi
+
+ if [ "$hide" = yes ] ; then
+ local INVISIBLE="+i"
+ fi
+
+ ## make sure the device is not mounted as a filesystem before
+ ## we start mucking with it directly.
+ mount | grep "^$boot\>" > /dev/null
+ if [ $? = 0 ] ; then
+ echo 1>&2 "$PRG: $boot appears to be mounted! aborting."
+ return 1
+ fi
+
+ ## hmount is really more of a way to make sure we have a valid HFS
+ ## filesystem before proceding, and hcopy requires it...
+ hmount "$boot" > /dev/null
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: $boot appears to have never had a bootstrap installed, please run mkofboot"
+ return 1
+ fi
+
+ ## must be explicit with target filename to avoid hfsutils
+ ## braindamage ("_" -> " " filename mangling) also avoid
+ ## ambiguity in the bootstrap partition.
+ if [ -n "$magicboot" ] ; then
+ [ "$VERBOSE" = 1 ] && echo "$INSTALLFIRST"
+ hcopy -r "$magicboot" :ofboot.b
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: An error occured while writing to $boot"
+ return 1
+ fi
+ fi
+
+ [ "$VERBOSE" = 1 ] && echo "$INSTALLPRIMARY"
+ hcopy -r "$install" :"$BTFILE"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: An error occured while writing to $boot"
+ return 1
+ fi
+
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Installing $bootconf onto $boot..."
+ hcopy -r "$bootconf" :"$CFFILE"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: An error occured while writing to $boot"
+ return 1
+ fi
+
+ if [ -n "$BSDLOADER" ] ; then
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Installing $BSDLOADER onto $boot..."
+ hcopy -r "$BSDLOADER" :ofwboot
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: An error occured while writing to $boot"
+ return 1
+ fi
+ fi
+
+ ## set all file's attributes, if a magicboot script exists it
+ ## gets the configured hfstype instead of yaboot (should be
+ ## "tbxi") so it gets booted by OF.
+ if [ -n "$magicboot" ] ; then
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Setting attributes on $WRAP..."
+ hattrib -t "$hfstype" -c "$hfscreator" $INVISIBLE $LOCK :ofboot.b
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Warning: error setting attributes on $WRAP"
+ echo 1>&2 "$PRG: This is probably bad but we'll ignore it."
+ fi
+ fi
+
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Setting attributes on $BTFILE..."
+ hattrib -t "$BTTYPE" -c "$hfscreator" $INVISIBLE $LOCK :"$BTFILE"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Warning: error setting attributes on $BTFILE"
+ echo 1>&2 "$PRG: This is probably bad but we'll ignore it"
+ fi
+
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Setting attributes on $CFFILE..."
+ hattrib -t "conf" -c "$hfscreator" $INVISIBLE $LOCK :"$CFFILE"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Warning: error setting attributes on $CFFILE"
+ echo 1>&2 "$PRG: This is probably unimportant so we'll ignore it"
+ fi
+
+ if [ -n "$BSDLOADER" ] ; then
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Setting attributes on ofwboot..."
+ hattrib -t "bsdb" -c "$hfscreator" $INVISIBLE $LOCK :ofwboot
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Warning: error setting attributes on ofwboot"
+ echo 1>&2 "$PRG: This is probably unimportant so we'll ignore it"
+ fi
+ fi
+
+ ## bless the root directory so OF will find the boot file
+ if [ "$bless" = yes ] ; then
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Blessing $boot with Holy Penguin Pee..."
+ hattrib -b :
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Warning: error blessing $boot"
+ echo 1>&2 "$PRG: This is probably bad but we'll ignore it"
+ fi
+ fi
+
+ ## clean up the ~/.hcwd file hmount creates
+ humount "$boot" > /dev/null
+ sync ; sync
+
+ ## use explicit filename if we don't bless.
+ if [ "$bless" = yes ] ; then
+ local OFFILE='\\:tbxi'
+ else
+ if [ -n "$magicboot" ] ; then
+ local OFFILE=ofboot.b
+ else
+ local OFFILE="$BTFILE"
+ fi
+ fi
+
+ ## update the boot-device variable in OF nvram.
+ if [ "$nonvram" = 0 ] ; then
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Updating OpenFirmware boot-device variable in nvram..."
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: boot-device=${ofboot},${OFFILE}"
+ nvsetenv boot-device "${ofboot},${OFFILE}"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: An error occured while updating nvram, we'll ignore it"
+ fi
+ fi
+
+ else
+ echo 1>&2 "$PRG: mtools support is not implemented"
+ echo 1>&2 "$PRG: Use --mount or add \`usemount' to $CONF"
+ return 1
+ fi
+
+ return 0
+}
+
+## used by mnt_install so mntpoint= can be supported in a cleaner way.
+mnt()
+{
+ ## we can even create bootstrap filesystem images directly if you
+ ## ever wanted too.
+ if [ -f "$boot" ] ; then
+ local loop=",loop"
+ fi
+
+ if [ -e "$TMP/bootstrap.$$" ] ; then
+ echo 1>&2 "$PRG: $TMP/bootstrap.$$ exists, aborting."
+ return 1
+ fi
+
+ mkdir -m 700 "$TMP/bootstrap.$$"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Could not create mountpoint directory, aborting."
+ return 1
+ fi
+
+ mount | grep "^$boot\>" > /dev/null
+ if [ $? = 0 ] ; then
+ echo 1>&2 "$PRG: $boot appears to be mounted! aborting."
+ return 1
+ fi
+
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Mounting $boot..."
+ mount -t "$fstype" -o rw,umask=077$loop "$boot" "$TMP/bootstrap.$$"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: An error occured mounting $boot"
+ return 1
+ fi
+
+ ## catch signals, set here to avoid umounting something we did not
+ ## mount. cleanup done by trap 0.
+ trap "umount $boot ; exit 129" 1
+ trap "echo 1>&2 $SIGINT ; umount $boot ; exit 130" 2
+ trap "umount $boot ; exit 131" 3
+ trap "umount $boot ; exit 143" 15
+
+ TARGET="$TMP/bootstrap.$$"
+ return 0
+}
+
+## umnt funtion which checks whether we mounted anything or not, for
+## mntpoint= this makes the code below cleaner IMO.
+umnt()
+{
+ if [ -z "$mntpoint" ] ; then
+ [ "$1" = failure ] && echo 1>&2 "$PRG: Attempting to umount $boot..."
+ umount "$2"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: umount of $boot failed!"
+ return 1
+ else
+ [ "$1" = failure ] && echo 1>&2 "$PRG: umount successfull"
+ return 0
+ fi
+ else
+ return 0
+ fi
+}
+
+## Use kernel filesytem drivers to mount the bootstrap partition like
+## any other filesystem and copy the files there with standard un*x
+## utilities.
+mnt_install()
+{
+ local BTFILE=yaboot
+
+ ## msdosfs is broken, yaboot may not support this filename.
+ if [ "$fstype" = msdos ] ; then
+ local CFFILE=yaboot.cnf
+ else
+ local CFFILE=yaboot.conf
+ fi
+
+ if [ -n "$magicboot" ] ; then
+ local WRAP="${magicboot##*/}"
+ fi
+
+ ## set verbose messages here so they don't show temporary file paths
+ local INSTALLFIRST="$PRG: Installing first stage bootstrap $magicboot onto $boot..."
+ local INSTALLPRIMARY="$PRG: Installing primary bootstrap $install onto $boot..."
+
+ ## repoint magicboot as the real first stage loader if using the
+ ## modern automatic generating ofboot.b.
+ if [ -n "$FIRST" ] ; then
+ magicboot="$FIRST"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: set magicboot to $FIRST"
+ fi
+
+ ## gross hack, add note section for IBM CHRP
+ if [ "$ADDNOTE" = yes ] ; then
+ hack_yaboot || return 1
+ fi
+
+ ## call mnt() function to take care of mounting filesystem if needed
+ if [ -z "$mntpoint" ] ; then
+ mnt || return 1
+ else
+ TARGET="$mntpoint"
+ fi
+
+ ## this is probably insecure on modern filesystems, but i think
+ ## safe on crippled hfs/dosfs. user should ensure mntpoint= is safe.
+ if [ -n "$magicboot" ] ; then
+ [ "$VERBOSE" = 1 ] && echo "$INSTALLFIRST"
+ cp -f "$magicboot" "$TARGET/ofboot.b"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: An error occured while writing to $boot"
+ umnt failure "$TARGET"
+ return 1
+ fi
+ fi
+
+ [ "$VERBOSE" = 1 ] && echo "$INSTALLPRIMARY"
+ cp -f "$install" "$TARGET/$BTFILE"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: An error occured while writing to $boot"
+ umnt failure "$TARGET"
+ return 1
+ fi
+
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Installing $bootconf onto $boot..."
+ cp -f "$bootconf" "$TARGET/$CFFILE"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: An error occured while writing to $boot"
+ umnt failure "$TARGET"
+ return 1
+ fi
+
+ if [ -n "$BSDLOADER" ] ; then
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Installing $BSDLOADER onto $boot..."
+ cp -f "$BSDLOADER" "$TARGET/ofwboot"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: An error occured while writing to $boot"
+ umnt failure "$TARGET"
+ return 1
+ fi
+ fi
+
+ if [ "$protect" = yes ] ; then
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Setting read-only attributes..."
+ chmod a-w "$TARGET/$BTFILE"
+ chmod a-w "$TARGET/$CFFILE"
+ if [ -n "$magicboot" ] ; then
+ chmod a-w "$TARGET/ofboot.b"
+ fi
+ if [ -n "$BSDLOADER" ] ; then
+ chmod a-w "$TARGET/ofwboot"
+ fi
+ fi
+
+ sync ; sync
+ umnt success "$TARGET" || return 1
+
+ ## make variable with a \ to avoid shell fsckage. ugly ugly ugly.
+ local BS='\'
+ if [ -n "$magicboot" ] ; then
+ [ -n "$OFDIR" ] && OFDIR="${BS}${OFDIR}${BS}"
+ local OFFILE="${OFDIR}ofboot.b"
+ else
+ [ -n "$OFDIR" ] && OFDIR="${BS}${OFDIR}${BS}"
+ local OFFILE="${OFDIR}${BTFILE}"
+ fi
+
+ ## update the boot-device variable in OF nvram.
+ if [ "$nonvram" = 0 ] ; then
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Updating OpenFirmware boot-device variable in nvram..."
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: boot-device=${ofboot},${OFFILE}"
+ nvsetenv boot-device "${ofboot},${OFFILE}"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: An error occured while updating nvram, we'll ignore it"
+ fi
+ else
+ echo 1>&2 "$PRG: Warning: You must manually configure OpenFirmware to boot."
+ fi
+
+ return 0
+}
+
+## raw installation, for IBM RS/6000 hardware, yaboot is dded to the
+## bootstrap partition.
+raw_install()
+{
+ ## make sure the device is not mounted as a filesystem before
+ ## we start mucking with it directly.
+ mount | grep "^$boot\>" > /dev/null
+ if [ $? = 0 ] ; then
+ echo 1>&2 "$PRG: $boot appears to be mounted! aborting."
+ return 1
+ fi
+
+ ## set verbosity message before munging the yaboot pathname
+ local INSTALLPRIMARY="$PRG: Installing primary bootstrap $install onto $boot..."
+
+ ## gross hack, add note section for IBM CHRP
+ if [ "$ADDNOTE" = yes ] ; then
+ hack_yaboot || return 1
+ fi
+
+ [ "$VERBOSE" = 1 ] && echo "$INSTALLPRIMARY"
+ dd if=/dev/zero of="$boot" bs=512 count=1600 > /dev/null 2>&1
+ dd if="$install" of="$boot" bs=512 > /dev/null 2>&1
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Installation failed."
+ return 1
+ fi
+ sync ; sync
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Installation successful"
+}
+
+## make sure the first stage ofboot generator is compatible.
+checkfirststage()
+{
+ grep -q "^#%ybinscript-" "$magicboot" 2> /dev/null
+ if [ "$?" = 0 ] ; then
+ local magic=`grep "^#%ybinscript-" "$magicboot"`
+ local ver="${magic##*-}"
+ if [ "$ver" = "1.1" ] ; then
+ FIRSTSTG=compat
+ return 0
+ else
+ echo 1>&2 "$PRG: Incompatible version of first stage loader $magicboot. aborting..."
+ return 1
+ fi
+ else
+ FIRSTSTG=old
+ return 0
+ fi
+}
+
+## build the first stage loader.
+mkfirststage()
+{
+ ## must have 7 backslashes to == \\ printf + shell = bizarre... or,
+ ## make special variable to contain a \ (need \\ to make \) to work
+ ## around echo -e -n brokeness.
+ local BS='\\'
+ local OS=1
+
+ ## deal with mntpoint=
+ [ -n "$OFDIR" ] && local OFDIR="${BS}${OFDIR}${BS}"
+
+ ## some misguided people insist on installing OSX on
+ ## HorribleFileSystem+ instead of UFS, as a result MacOS deblesses
+ ## OSX, making it unbootable. if apple localizes the filesystem hierarchy again screw it.
+ [ "$brokenosx" = yes ] && local OSXBOOT="${BS}System${BS}Library${BS}CoreServices${BS}BootX"
+ [ "$brokenosx" = no ] && local OSXBOOT="${BS}${BS}:tbxi"
+
+ ## assign variables for configured menu options.
+ [ "$usemount" = no -a "$bless" = yes ] && local YB="yaboot GNU l $ofboot ,${BS}${BS}yaboot"
+ [ "$usemount" = yes -o "$bless" = no ] && local YB="yaboot GNU l $ofboot ,${OFDIR}yaboot"
+ [ -n "$bsd" ] && OS="$(($OS + 1))" && local BSD="ybsd BSD b $ofboot ,${BS}${BS}ofwboot/$bsd"
+ [ -n "$macos" ] && OS="$(($OS + 1))" && local MAC="macos MacOS m $macos ,${BS}${BS}:tbxi"
+ [ -n "$macosx" ] && OS="$(($OS + 1))" && local MX="macosx MacOSX x $macosx ,${OSXBOOT}"
+ [ -n "$darwin" ] && OS="$(($OS + 1))" && local DW="darwin Darwin d $darwin ,${BS}${BS}:tbxi"
+ [ "$cdrom" = yes ] && OS="$(($OS + 1))" && local CD="cd CDROM c cd: ,${BS}${BS}:tbxi"
+ [ "$network" = yes ] && OS="$(($OS + 1))" && local NET="net Network n enet: 0"
+ [ "$of" = yes ] && OS="$(($OS + 1))" && local OF="of OpenFirmware o quit now"
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: OS=$OS"
+
+ ## call ofboot,
+ ## Usage: OS-count defaultos timeout fgc bgc osname oslabel oskey osdev osfile ...
+ [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: /bin/sh $magicboot $OS $defaultos $delay $fbc $bgc $YB $BSD $MAC $MX $DW $CD $NET $OF\n"
+ FIRST="$(/bin/sh "$magicboot" "$OS" "$defaultos" "$delay" $fgc $bgc ${YB} ${BSD} ${MAC} ${MX} ${DW} ${CD} ${NET} ${OF})" || return 1
+
+ return 0
+}
+
+## mkofboot function.
+mkoffs()
+{
+ mount | grep "^$boot\>" > /dev/null
+ if [ $? = 0 ] ; then
+ echo 1>&2 "$PRG: $boot appears to be mounted! aborting."
+ return 1
+ fi
+
+ case "$fstype" in
+ hfs)
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Creating HFS filesystem on $boot..."
+ if (command -v dd > /dev/null 2>&1) ; then
+ dd if=/dev/zero of="$boot" bs=512 count=1600 > /dev/null 2>&1
+ fi
+ hformat -l bootstrap "$boot" > /dev/null
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: HFS filesystem creation failed!"
+ return 1
+ fi
+ humount "$boot" ## otherwise we might get confused.
+ return 0
+ ;;
+ msdos)
+ if (command -v mkdosfs > /dev/null 2>&1) ; then
+ [ -x `command -v mkdosfs` ] || FAIL=1 ; else FAIL=1 ; fi
+ if [ "$FAIL" = 1 ] ; then
+ echo 1>&2 "$PRG: mkdosfs is not installed or cannot be found"
+ return 1
+ fi
+
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Creating DOS filesystem on $boot..."
+ if (command -v dd > /dev/null 2>&1) ; then
+ dd if=/dev/zero of="$boot" bs=512 count=1600 > /dev/null 2>&1
+ fi
+ mkdosfs -n bootstrap "$boot" > /dev/null
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: DOS filesystem creation failed!"
+ return 1
+ fi
+ return 0
+ ;;
+ esac
+}
+
+confirm()
+{
+ if [ "$FORCE" = yes ] ; then
+ return 0
+ else
+ echo 1>&2
+ [ "$fstype" = raw ] && $PRINTF 1>&2 "$PRG: Overwrite contents of $boot with $install? [y/N] "
+ [ "$fstype" != raw ] && $PRINTF 1>&2 "$PRG: Create $fstype filesystem on $boot? [y/N] "
+ read ans
+ case "$ans" in
+ y|Y)
+ return 0
+ ;;
+ *)
+ echo 1>&2 "$PRG: Abort."
+ return 2
+ ;;
+ esac
+ fi
+}
+
+## for fstype=raw check if an ELF binary has already been dded.
+luserck()
+{
+ if [ "$(dd if="$boot" bs=1 skip=1 count=3 2>/dev/null)" = ELF ] ; then
+ return 0
+ else
+ echo 1>&2 "$PRG: This partition has never had yaboot installed before, please run mkofboot"
+ return 1
+ fi
+}
+
+mkconf()
+{
+## defaults for this are defined at the beginning of the script with
+## other variables.
+
+echo \
+"## yaboot configuration file generated by ybin $VERSION
+
+device=$device
+timeout=$timeout
+
+image=$image
+ label=$label
+ partition=$partition
+ root=$root
+ read-only
+" > "$TMPCONF" || return 1
+
+[ "$DEBUG" = 1 ] && $PRINTF 1>&2 "\nDEBUG: autoconf:\n----\n" && cat "$TMPCONF" 1>&2 && echo 1>&2 "----"
+return 0
+}
+
+## take out the trash.
+cleanup()
+{
+ if [ -n "$TMPCONF" ] ; then rm -f "$TMPCONF" ; fi
+ if [ -n "$FIRST" ] ; then rm -f "$FIRST" ; fi
+ if [ -n "$TMPYABOOT" ] ; then rm -f "$TMPYABOOT" ; fi
+ if [ -d "$TMP/bootstrap.$$" -a "$usemount" = yes ] ; then rmdir "$TMP/bootstrap.$$" ; fi
+ return 0
+}
+
+##########
+## Main ##
+##########
+
+## absurdly bloated case statement to parse command line options.
+if [ $# != 0 ] ; then
+ while true ; do
+ case "$1" in
+ -V|--version)
+ version
+ exit 0
+ ;;
+ -h|--help)
+ usage
+ exit 0
+ ;;
+ --debug)
+ DEBUG=1
+ shift
+ ;;
+ -v|--verbose)
+ VERBOSE=1
+ shift
+ ;;
+ -f|--force)
+ FORCE=yes
+ shift
+ ;;
+ -b|--boot)
+ if [ -n "$2" ] ; then
+ boot="$2"
+ ARGBT=1
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ -o|--ofboot)
+ if [ -n "$2" ] ; then
+ ofboot="$2"
+ ARGOB=1
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ -i|--install)
+ if [ -n "$2" ] ; then
+ install="$2"
+ ARGBF=1
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ -C|--config)
+ if [ -n "$2" ] ; then
+ CONF="$2"
+ bootconf="$2"
+ ERR=" Error in $CONF:"
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ -m|--magicboot)
+ if [ -n "$2" ] ; then
+ magicboot="$2"
+ ARGWP=1
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ --filesystem)
+ if [ -n "$2" ] ; then
+ fstype="$2"
+ ARGFS=1
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ --nobless)
+ bless=no
+ ARGBS=1
+ shift
+ ;;
+ -M|--mount)
+ usemount=yes
+ ARGMT=1
+ shift
+ ;;
+ --protect)
+ protect=yes
+ ARGPT=1
+ shift
+ ;;
+ --hide)
+ hide=yes
+ ARGHD=1
+ shift
+ ;;
+ --nonvram)
+ nonvram=1
+ ARGNV=1
+ shift
+ ;;
+ --device)
+ if [ -n "$2" ] ; then
+ device="$2"
+ bootconf=auto
+ echo 1>&2 "$PRG: WARNING: Deprecated option --device"
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ --timeout)
+ if [ -n "$2" ] ; then
+ timeout="$2"
+ bootconf=auto
+ echo 1>&2 "$PRG: WARNING: Deprecated option --device"
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ --image)
+ if [ -n "$2" ] ; then
+ image="$2"
+ bootconf=auto
+ echo 1>&2 "$PRG: WARNING: Deprecated option --device"
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ --label)
+ if [ -n "$2" ] ; then
+ label="$2"
+ bootconf=auto
+ echo 1>&2 "$PRG: WARNING: Deprecated option --device"
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ --partition)
+ if [ -n "$2" ] ; then
+ partition="$2"
+ bootconf=auto
+ echo 1>&2 "$PRG: WARNING: Deprecated option --device"
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ --root)
+ if [ -n "$2" ] ; then
+ root="$2"
+ bootconf=auto
+ echo 1>&2 "$PRG: WARNING: Deprecated option --device"
+ shift 2
+ else
+ echo 1>&2 "$PRG: option requires an argument $1"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ fi
+ ;;
+ "")
+ break
+ ;;
+ *)
+ echo 1>&2 "$PRG: unrecognized option \`$1'"
+ echo 1>&2 "Try \`$PRG --help' for more information."
+ exit 1
+ ;;
+ esac
+ done
+fi
+
+## check that specified config file exists, unless its /dev/null in
+## which case we assume all options are done on the command line.
+if [ "$CONF" = /dev/null ] ; then
+ true
+else
+ confexist || exit 1
+fi
+
+## if there is no config file use the automatic generation to make a
+## generic yaboot.conf. do this before the confcheck to avoid wierd errors.
+if [ "$bootconf" = /dev/null ] ; then
+ if (command -v yabootconfig > /dev/null 2>&1) ; then
+ echo 1>&2 "$PRG: Warning: no /etc/yaboot.conf, running yabootconfig to make one"
+ yabootconfig --noinstall --quiet
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: yabootconfig failed, please supply a valid /etc/yaboot.conf"
+ echo 1>&2 "$PRG: You may also use $PRG's --boot, --image, --partition, and --device switches"
+ echo 1>&2 "$PRG: These switches will cause $PRG to generate a basic yaboot.conf on the fly"
+ exit 1
+ else
+ CONF=/etc/yaboot.conf
+ bootconf=$CONF
+ ERR=" Error in $CONF:"
+ confexist || exit 1
+ fi
+ fi
+fi
+
+## Checks if each option was defined on the command line, and if so
+## don't read it from the configuration file. this avoids
+## configuration options from being set null, as well as command line
+## options from being clobbered.
+[ "$ARGBT" != 1 -a $(parseconf ck boot) = 0 ] && boot=`parseconf str boot`
+[ "$ARGOB" != 1 -a $(parseconf ck ofboot) = 0 ] && ofboot=`parseconf str ofboot`
+[ "$ARGBF" != 1 -a $(parseconf ck install) = 0 ] && install=`parseconf str install`
+[ "$ARGWP" != 1 -a $(parseconf ck magicboot) = 0 ] && magicboot=`parseconf str magicboot`
+[ "$ARGMT" != 1 -a $(parseconf flag usemount) = 0 ] && usemount=yes
+[ "$ARGFS" != 1 -a $(parseconf ck fstype) = 0 ] && fstype=`parseconf str fstype`
+[ "$ARGBS" != 1 -a $(parseconf flag nobless) = 0 ] && bless=no
+[ "$ARGPT" != 1 -a $(parseconf flag protect) = 0 ] && protect=yes
+[ "$ARGHD" != 1 -a $(parseconf flag hide) = 0 ] && hide=yes
+[ "$ARGNV" != 1 -a $(parseconf flag nonvram) = 0 ] && nonvram=1
+[ $(parseconf ck hfstype) = 0 ] && hfstype=`parseconf str hfstype`
+[ $(parseconf ck hfscreator) = 0 ] && hfscreator=`parseconf str hfscreator`
+[ $(parseconf ck mntpoint) = 0 ] && mntpoint=`parseconf str mntpoint`
+[ $(parseconf ck delay) = 0 ] && delay=`parseconf str delay`
+[ $(parseconf ck timeout) = 0 ] && timeout=`parseconf str timeout`
+[ $(parseconf ck bsd) = 0 ] && bsd=`parseconf str bsd`
+[ $(parseconf ck macos) = 0 ] && macos=`parseconf str macos`
+[ $(parseconf ck macosx) = 0 ] && macosx=`parseconf str macosx`
+[ $(parseconf ck darwin) = 0 ] && darwin=`parseconf str darwin`
+[ $(parseconf ck defaultos) = 0 ] && defaultos=`parseconf str defaultos`
+[ $(parseconf ck fgcolor) = 0 ] && fgcolor=`parseconf str fgcolor`
+[ $(parseconf ck bgcolor) = 0 ] && bgcolor=`parseconf str bgcolor`
+[ $(parseconf ck icon) = 0 ] && export YBINOFICON=`parseconf str icon`
+[ $(parseconf flag enablecdboot) = 0 ] && cdrom=yes
+[ $(parseconf flag enablenetboot) = 0 ] && network=yes
+[ $(parseconf flag enableofboot) = 0 ] && of=yes
+[ $(parseconf flag brokenosx) = 0 ] && brokenosx=yes
+
+## ffs!! rtfm! foad!
+if [ "$boot" = unconfigured ] ; then
+ echo 1>&2 "$PRG: You must specify the device for the bootstrap partition. (ie: boot=/dev/hdaX)"
+ echo 1>&2 "$PRG: Try \`$PRG --help' for more information."
+ exit 1
+fi
+
+## if there is still no config file use the automatic generation to make a
+## generic yaboot.conf. do this before the confcheck to avoid wierd errors.
+if [ "$bootconf" = /dev/null ] ; then
+ echo 1>&2 "$PRG: Warning: no yaboot.conf, using generic configuration."
+ bootconf=auto
+fi
+
+## mntpoint is incompatible with mkofboot.
+if [ "$PRG" = mkofboot -a -n "$mntpoint" ] ; then
+ echo 1>&2 "$PRG: Cannot be used with \`mntpoint='"
+ exit 1
+fi
+
+## validate configuration for sanity.
+checkconf || exit 1
+
+## check that we can use ofpath, its only needed for magicboot script
+## building and nvram updates.
+if [ -n "$magicboot" -o "$nonvram" = 0 ] ; then
+ if [ -z "$ofboot" -o -n "$macos" -o -n "$macosx" -o -n "$darwin" ] ; then
+ if (command -v ofpath > /dev/null 2>&1) ; then
+ [ -x `command -v ofpath` ]
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: ofpath could not be found, aborting."
+ exit 1
+ fi
+ else
+ echo 1>&2 "$PRG: ofpath could not be found, aborting."
+ exit 1
+ fi
+ fi
+fi
+
+## if password is set in yaboot.conf make sure permissions on that
+## file are safe, warn if not.
+if (grep -q '^[[:space:]]*password[[:space:]]*=' "$bootconf" > /dev/null 2>&1) ; then
+ permcheck
+fi
+
+## check if we are root if needed.
+if [ "$usemount" = yes -a -z "$mntpoint" ] ; then
+ if [ `id -u` != 0 ] ; then
+ echo 1>&2 "$PRG: \`usemount' requires root privileges, go away."
+ exit 1
+ fi
+fi
+
+if [ "$fstype" = hfs ] ; then
+ checkhfsutils
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: hfsutils is not installed or cannot be found"
+ echo 1>&2 "$PRG: Try --mount if `uname -sr` supports HFS"
+ exit 1
+ fi
+fi
+
+## convert unix device nodes to OpenFirmware pathnames
+if [ -n "$magicboot" -o "$nonvram" = 0 ] ; then
+ convertpath || exit 1
+fi
+
+## yaboot.conf autogeneration. MUST have secure mktemp to
+## avoid race conditions. Debian's mktemp qualifies.
+if [ "$bootconf" = auto ] ; then
+ TMPCONF=`mktemp -q "$TMP/$PRG.XXXXXX"`
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: Could not create temporary file, aborting."
+ exit 1
+ fi
+
+ mkconf
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: An error occured generating yaboot.conf, aborting."
+ exit 1
+ fi
+
+ bootconf="$TMPCONF"
+fi
+
+if [ -n "$magicboot" ] ; then
+ checkfirststage || exit 1
+ if [ "$FIRSTSTG" = compat ] ; then
+ mkfirststage
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: An error occured while building first stage loader. aborting..."
+ exit 1
+ fi
+ fi
+fi
+
+case "$PRG" in
+ ybin)
+ case "$usemount" in
+ no)
+ if [ "$fstype" = raw ] ; then
+ luserck || exit 1
+ raw_install || exit 1
+ else
+ util_install || exit 1
+ fi
+ exit 0
+ ;;
+ yes)
+ mnt_install || exit 1
+ exit 0
+ ;;
+ esac
+ ;;
+ mkofboot)
+ case "$usemount" in
+ no)
+ ## its not nice to erase the partition and then bail!
+ if [ "$fstype" = msdos ] ; then
+ echo 1>&2 "$PRG: mtools support is not implemented"
+ echo 1>&2 "$PRG: Use --mount or add \`usemount' to $CONF"
+ exit 1
+ fi
+ confirm || exit 2
+ if [ "$fstype" = raw ] ; then
+ raw_install || exit 1
+ else
+ mkoffs || exit 1
+ util_install || exit 1
+ fi
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Installation complete."
+ exit 0
+ ;;
+ yes)
+ confirm || exit 2
+ mkoffs || exit 1
+ mnt_install || exit 1
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Installation complete."
+ exit 0
+ ;;
+ esac
+ ;;
+esac
+
+exit 0
Property changes on: trunk/yaboot/ybin/ybin
___________________________________________________________________
Name: svn:executable
+
More information about the Debootloaders-devel
mailing list