diff options
author | Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> | 2013-12-31 14:43:20 +0100 |
---|---|---|
committer | Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> | 2014-01-05 00:15:37 +0100 |
commit | 18a1444b4f1e6a0948fd38fa0de382d86cfe04de (patch) | |
tree | 5fd12e10e50c4056337eea6f5f82063d7937c74f | |
parent | 5fe0b41dba699fa14432a633c863ea8cb7bf3f5d (diff) | |
download | android_external_e2fsprogs-18a1444b4f1e6a0948fd38fa0de382d86cfe04de.tar.gz android_external_e2fsprogs-18a1444b4f1e6a0948fd38fa0de382d86cfe04de.tar.bz2 android_external_e2fsprogs-18a1444b4f1e6a0948fd38fa0de382d86cfe04de.zip |
Add files that would normally be generated by the e2fsprogs build system
Android doesn't run ./configure and friends, so it has to rely on
pre-populated versions of the autogenerated files.
This is somewhat bogus (e.g. hardcoded little-endian reference in
lib/ext2fs/ext2_types.h) and should at some point be fixed, but it's
what Android has always done, not a regression from the 1.41.14 branch.
Also, don't #include config.h which we don't generate (we pass what it
usually contains as -D parameters from Android.mk) anywhere.
Add a new Android.mk file for the quota library.
Change-Id: I162c6327fee5bd06261d9cdcc34bda10f04a6f21
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
275 files changed, 1335 insertions, 472 deletions
diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b243fc22..00000000 --- a/.gitignore +++ /dev/null @@ -1,208 +0,0 @@ -autom4te.cache -build -build.profiled -build.static -FILES -^core -*~ -patches -Makefile -*.bak -*.dSYM -*.o -*.orig -*.pc -*.rej -*.swp -00[0-9][1-9]*.patch -MCONFIG -asm_types.h -config.log -config.status -debugfs/debug_cmds.c -debugfs/debugfs -debugfs/debugfs.8 -doc/libext2fs.aux -doc/libext2fs.cp -doc/libext2fs.dvi -doc/libext2fs.fn -doc/libext2fs.fns -doc/libext2fs.info -doc/libext2fs.ky -doc/libext2fs.log -doc/libext2fs.pg -doc/libext2fs.toc -doc/libext2fs.tp -doc/libext2fs.vr -e2fsck/crc32table.h -e2fsck/e2fsck -e2fsck/e2fsck.8 -e2fsck/e2fsck.conf.5 -e2fsck/e2fsck.shared -e2fsck/e2fsck.static -e2fsck/gen_crc32table -e2fsck/prof_err.c -e2fsck/prof_err.h -e2fsck/tst_crc32 -e2fsck/tst_problem -e2fsck/tst_refcount -e2fsck/tst_region -e2fsprogs.spec -lib/blkid/blkid.h -lib/blkid/blkid.pc -lib/blkid/blkid_types.h -lib/blkid/libblkid.3 -lib/blkid/libblkid.a -lib/blkid/subdirs -lib/blkid/test_probe -lib/blkid/tests/*.ok -lib/blkid/tests/*.out -lib/blkid/tests/tmp -lib/blkid/tst_cache -lib/blkid/tst_dev -lib/blkid/tst_devname -lib/blkid/tst_devno -lib/blkid/tst_getsize -lib/blkid/tst_probe -lib/blkid/tst_read -lib/blkid/tst_resolve -lib/blkid/tst_save -lib/blkid/tst_tag -lib/blkid/tst_types -lib/config.h -lib/dirpaths.h -lib/e2p/e2p.pc -lib/e2p/libe2p.a -lib/e2p/subdirs -lib/e2p/tst_feature -lib/e2p/tst_ostype -lib/et/com_err.pc -lib/et/compile_et -lib/et/libcom_err.a -lib/et/subdirs -lib/ext2fs/crc32c_table.h -lib/ext2fs/ext2_err.c -lib/ext2fs/ext2_err.et -lib/ext2fs/ext2_err.h -lib/ext2fs/ext2_types.h -lib/ext2fs/ext2fs.pc -lib/ext2fs/gen_crc32ctable -lib/ext2fs/libext2fs.a -lib/ext2fs/subdirs -lib/ext2fs/tst_badblocks -lib/ext2fs/tst_bitmaps -lib/ext2fs/tst_bitmaps_cmd.c -lib/ext2fs/tst_bitmaps_out -lib/ext2fs/tst_bitops -lib/ext2fs/tst_csum -lib/ext2fs/tst_crc32c -lib/ext2fs/tst_icount -lib/ext2fs/tst_inline -lib/ext2fs/tst_inode_size -lib/ext2fs/tst_iscan -lib/ext2fs/tst_super_size -lib/ext2fs/tst_types -lib/libblkid.a -lib/libcom_err.a -lib/libe2p.a -lib/libext2fs.a -lib/libquota.a -lib/libss.a -lib/libuuid.a -lib/quota/libquota.a -lib/quota/subdirs -lib/ss/libss.a -lib/ss/mk_cmds -lib/ss/ss.pc -lib/ss/ss_err.c -lib/ss/ss_err.h -lib/ss/std_rqs.c -lib/ss/subdirs -lib/ss/test.diff -lib/ss/test_cmd.c -lib/ss/test_out -lib/ss/test_ss -lib/uuid/libuuid.a -lib/uuid/subdirs -lib/uuid/tst_uuid -lib/uuid/uuid.3 -lib/uuid/uuid.h -lib/uuid/uuid.pc -lib/uuid/uuid_clear.3 -lib/uuid/uuid_compare.3 -lib/uuid/uuid_copy.3 -lib/uuid/uuid_generate.3 -lib/uuid/uuid_is_null.3 -lib/uuid/uuid_parse.3 -lib/uuid/uuid_time -lib/uuid/uuid_time.3 -lib/uuid/uuid_types.h -lib/uuid/uuid_unparse.3 -misc/badblocks -misc/badblocks.8 -misc/base_device -misc/base_device.out -misc/blkid -misc/blkid.8 -misc/chattr -misc/chattr.1 -misc/default_profile.c -misc/dumpe2fs -misc/dumpe2fs.8 -misc/e2freefrag -misc/e2freefrag.8 -misc/e2image -misc/e2image.8 -misc/e2initrd_helper -misc/e2label.8 -misc/e2undo -misc/e2undo.8 -misc/e4defrag -misc/e4defrag.8 -misc/filefrag -misc/filefrag.8 -misc/findfs.8 -misc/fsck -misc/fsck.8 -misc/logsave -misc/logsave.8 -misc/lsattr -misc/lsattr.1 -misc/mke2fs -misc/mke2fs.8 -misc/mke2fs.conf.5 -misc/mke2fs.conf -misc/mklost+found -misc/mklost+found.8 -misc/prof_err.c -misc/prof_err.h -misc/profile.h -misc/tune2fs -misc/tune2fs.8 -misc/uuidd -misc/uuidd.8 -misc/uuidgen -misc/uuidgen.1 -parse-types.log -po/Makefile.in -po/POTFILES -public_config.h -resize/resize2fs -resize/resize2fs.8 -resize/test_extent -resize/test_extent.out -tags -TAGS -tests/progs/test_icount -tests/progs/test_icount_cmds.c -tests/*.ok -tests/*.failed -tests/*.log -tests/*.tmp -tests/mke2fs.conf -tests/test_script -tests/test_one -util/gen-tarball -util/subst -util/subst.conf -Meta diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index cf7670bc..80662b1b 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -8,7 +8,6 @@ * Modifications by Robert Sanders <gt8134b@prism.gatech.edu> */ -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/debugfs/dump.c b/debugfs/dump.c index 51bc734a..750ff3c2 100644 --- a/debugfs/dump.c +++ b/debugfs/dump.c @@ -9,7 +9,6 @@ #define _GNU_SOURCE /* for O_LARGEFILE */ #endif -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/debugfs/extent_inode.c b/debugfs/extent_inode.c index b3c55f91..25b89465 100644 --- a/debugfs/extent_inode.c +++ b/debugfs/extent_inode.c @@ -5,7 +5,6 @@ * under the terms of the GNU Public License. */ -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/debugfs/filefrag.c b/debugfs/filefrag.c index 0adea405..67a76788 100644 --- a/debugfs/filefrag.c +++ b/debugfs/filefrag.c @@ -5,7 +5,6 @@ * under the terms of the GNU Public License. */ -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/debugfs/htree.c b/debugfs/htree.c index 24f8250c..03b62a75 100644 --- a/debugfs/htree.c +++ b/debugfs/htree.c @@ -5,7 +5,6 @@ * under the terms of the GNU Public License. */ -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/debugfs/icheck.c b/debugfs/icheck.c index 48f432aa..57fa80b1 100644 --- a/debugfs/icheck.c +++ b/debugfs/icheck.c @@ -5,7 +5,6 @@ * under the terms of the GNU Public License. */ -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/debugfs/logdump.c b/debugfs/logdump.c index 66a5428d..f257171c 100644 --- a/debugfs/logdump.c +++ b/debugfs/logdump.c @@ -9,7 +9,6 @@ * License. */ -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/debugfs/ls.c b/debugfs/ls.c index b4036de0..f21e96ed 100644 --- a/debugfs/ls.c +++ b/debugfs/ls.c @@ -5,7 +5,6 @@ * under the terms of the GNU Public License. */ -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/debugfs/lsdel.c b/debugfs/lsdel.c index e5b2d203..ecc8a880 100644 --- a/debugfs/lsdel.c +++ b/debugfs/lsdel.c @@ -6,7 +6,6 @@ * the GNU Public License. */ -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/debugfs/ncheck.c b/debugfs/ncheck.c index 58f3a503..b7faa639 100644 --- a/debugfs/ncheck.c +++ b/debugfs/ncheck.c @@ -5,7 +5,6 @@ * under the terms of the GNU Public License. */ -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/debugfs/set_fields.c b/debugfs/set_fields.c index 9c3b0001..116a15ac 100644 --- a/debugfs/set_fields.c +++ b/debugfs/set_fields.c @@ -17,7 +17,6 @@ #define STRTOULL strtoul #endif -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/debugfs/unused.c b/debugfs/unused.c index 4cb11918..b78d70b8 100644 --- a/debugfs/unused.c +++ b/debugfs/unused.c @@ -5,7 +5,6 @@ * under the terms of the GNU Public License. */ -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/debugfs/util.c b/debugfs/util.c index aafbc567..8b344906 100644 --- a/debugfs/util.c +++ b/debugfs/util.c @@ -8,7 +8,6 @@ #define _XOPEN_SOURCE 600 /* needed for strptime */ -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/debugfs/zap.c b/debugfs/zap.c index 81092097..1d4d02e0 100644 --- a/debugfs/zap.c +++ b/debugfs/zap.c @@ -5,7 +5,6 @@ * under the terms of the GNU Public License. */ -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/e2fsck/Android.mk b/e2fsck/Android.mk index 4c0ff428..c6e08c22 100644 --- a/e2fsck/Android.mk +++ b/e2fsck/Android.mk @@ -38,7 +38,8 @@ libext2_profile_cflags := -O2 -g -W -Wall \ -DHAVE_TYPE_SSIZE_T \ -DHAVE_SYS_TIME_H \ -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF + -DHAVE_SYSCONF \ + -DDISABLE_BACKTRACE=1 include $(CLEAR_VARS) @@ -78,6 +79,7 @@ e2fsck_src_files := \ pass3.c \ pass4.c \ pass5.c \ + logfile.c \ journal.c \ recovery.c \ revoke.c \ @@ -90,14 +92,17 @@ e2fsck_src_files := \ problem.c \ message.c \ ea_refcount.c \ + quota.c \ rehash.c \ - region.c + region.c \ + sigcatcher.c e2fsck_shared_libraries := \ libext2fs \ libext2_blkid \ libext2_uuid \ libext2_profile \ + libext2_quota \ libext2_com_err \ libext2_e2p e2fsck_system_shared_libraries := libc @@ -133,7 +138,8 @@ e2fsck_cflags := -O2 -g -W -Wall -fno-strict-aliasing \ -DENABLE_HTREE=1 \ -DHAVE_SYS_TIME_H \ -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF + -DHAVE_SYSCONF \ + -DDISABLE_BACKTRACE=1 include $(CLEAR_VARS) diff --git a/e2fsck/argv_parse.c b/e2fsck/argv_parse.c index d22f6344..c0c5bbe9 100644 --- a/e2fsck/argv_parse.c +++ b/e2fsck/argv_parse.c @@ -28,7 +28,6 @@ * Version 1.1, modified 2/27/1999 */ -#include "config.h" #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif diff --git a/e2fsck/badblocks.c b/e2fsck/badblocks.c index 8519df0d..74e414bf 100644 --- a/e2fsck/badblocks.c +++ b/e2fsck/badblocks.c @@ -5,7 +5,6 @@ * redistributed under the terms of the GNU Public License. */ -#include "config.h" #include <time.h> #ifdef HAVE_ERRNO_H #include <errno.h> diff --git a/e2fsck/crc32.c b/e2fsck/crc32.c index 0497a380..f092c03a 100644 --- a/e2fsck/crc32.c +++ b/e2fsck/crc32.c @@ -31,7 +31,6 @@ * Version 2. See the file COPYING for more details. */ -#include "config.h" #include <stdlib.h> #include <unistd.h> #include <string.h> diff --git a/e2fsck/crc32table.h b/e2fsck/crc32table.h new file mode 100644 index 00000000..57a79a28 --- /dev/null +++ b/e2fsck/crc32table.h @@ -0,0 +1,136 @@ +/* this file is generated - do not edit */ + +#ifdef UNITTEST +static const __u32 crc32table_le[] = { +tole(0x00000000L), tole(0x77073096L), tole(0xee0e612cL), tole(0x990951baL), +tole(0x076dc419L), tole(0x706af48fL), tole(0xe963a535L), tole(0x9e6495a3L), +tole(0x0edb8832L), tole(0x79dcb8a4L), tole(0xe0d5e91eL), tole(0x97d2d988L), +tole(0x09b64c2bL), tole(0x7eb17cbdL), tole(0xe7b82d07L), tole(0x90bf1d91L), +tole(0x1db71064L), tole(0x6ab020f2L), tole(0xf3b97148L), tole(0x84be41deL), +tole(0x1adad47dL), tole(0x6ddde4ebL), tole(0xf4d4b551L), tole(0x83d385c7L), +tole(0x136c9856L), tole(0x646ba8c0L), tole(0xfd62f97aL), tole(0x8a65c9ecL), +tole(0x14015c4fL), tole(0x63066cd9L), tole(0xfa0f3d63L), tole(0x8d080df5L), +tole(0x3b6e20c8L), tole(0x4c69105eL), tole(0xd56041e4L), tole(0xa2677172L), +tole(0x3c03e4d1L), tole(0x4b04d447L), tole(0xd20d85fdL), tole(0xa50ab56bL), +tole(0x35b5a8faL), tole(0x42b2986cL), tole(0xdbbbc9d6L), tole(0xacbcf940L), +tole(0x32d86ce3L), tole(0x45df5c75L), tole(0xdcd60dcfL), tole(0xabd13d59L), +tole(0x26d930acL), tole(0x51de003aL), tole(0xc8d75180L), tole(0xbfd06116L), +tole(0x21b4f4b5L), tole(0x56b3c423L), tole(0xcfba9599L), tole(0xb8bda50fL), +tole(0x2802b89eL), tole(0x5f058808L), tole(0xc60cd9b2L), tole(0xb10be924L), +tole(0x2f6f7c87L), tole(0x58684c11L), tole(0xc1611dabL), tole(0xb6662d3dL), +tole(0x76dc4190L), tole(0x01db7106L), tole(0x98d220bcL), tole(0xefd5102aL), +tole(0x71b18589L), tole(0x06b6b51fL), tole(0x9fbfe4a5L), tole(0xe8b8d433L), +tole(0x7807c9a2L), tole(0x0f00f934L), tole(0x9609a88eL), tole(0xe10e9818L), +tole(0x7f6a0dbbL), tole(0x086d3d2dL), tole(0x91646c97L), tole(0xe6635c01L), +tole(0x6b6b51f4L), tole(0x1c6c6162L), tole(0x856530d8L), tole(0xf262004eL), +tole(0x6c0695edL), tole(0x1b01a57bL), tole(0x8208f4c1L), tole(0xf50fc457L), +tole(0x65b0d9c6L), tole(0x12b7e950L), tole(0x8bbeb8eaL), tole(0xfcb9887cL), +tole(0x62dd1ddfL), tole(0x15da2d49L), tole(0x8cd37cf3L), tole(0xfbd44c65L), +tole(0x4db26158L), tole(0x3ab551ceL), tole(0xa3bc0074L), tole(0xd4bb30e2L), +tole(0x4adfa541L), tole(0x3dd895d7L), tole(0xa4d1c46dL), tole(0xd3d6f4fbL), +tole(0x4369e96aL), tole(0x346ed9fcL), tole(0xad678846L), tole(0xda60b8d0L), +tole(0x44042d73L), tole(0x33031de5L), tole(0xaa0a4c5fL), tole(0xdd0d7cc9L), +tole(0x5005713cL), tole(0x270241aaL), tole(0xbe0b1010L), tole(0xc90c2086L), +tole(0x5768b525L), tole(0x206f85b3L), tole(0xb966d409L), tole(0xce61e49fL), +tole(0x5edef90eL), tole(0x29d9c998L), tole(0xb0d09822L), tole(0xc7d7a8b4L), +tole(0x59b33d17L), tole(0x2eb40d81L), tole(0xb7bd5c3bL), tole(0xc0ba6cadL), +tole(0xedb88320L), tole(0x9abfb3b6L), tole(0x03b6e20cL), tole(0x74b1d29aL), +tole(0xead54739L), tole(0x9dd277afL), tole(0x04db2615L), tole(0x73dc1683L), +tole(0xe3630b12L), tole(0x94643b84L), tole(0x0d6d6a3eL), tole(0x7a6a5aa8L), +tole(0xe40ecf0bL), tole(0x9309ff9dL), tole(0x0a00ae27L), tole(0x7d079eb1L), +tole(0xf00f9344L), tole(0x8708a3d2L), tole(0x1e01f268L), tole(0x6906c2feL), +tole(0xf762575dL), tole(0x806567cbL), tole(0x196c3671L), tole(0x6e6b06e7L), +tole(0xfed41b76L), tole(0x89d32be0L), tole(0x10da7a5aL), tole(0x67dd4accL), +tole(0xf9b9df6fL), tole(0x8ebeeff9L), tole(0x17b7be43L), tole(0x60b08ed5L), +tole(0xd6d6a3e8L), tole(0xa1d1937eL), tole(0x38d8c2c4L), tole(0x4fdff252L), +tole(0xd1bb67f1L), tole(0xa6bc5767L), tole(0x3fb506ddL), tole(0x48b2364bL), +tole(0xd80d2bdaL), tole(0xaf0a1b4cL), tole(0x36034af6L), tole(0x41047a60L), +tole(0xdf60efc3L), tole(0xa867df55L), tole(0x316e8eefL), tole(0x4669be79L), +tole(0xcb61b38cL), tole(0xbc66831aL), tole(0x256fd2a0L), tole(0x5268e236L), +tole(0xcc0c7795L), tole(0xbb0b4703L), tole(0x220216b9L), tole(0x5505262fL), +tole(0xc5ba3bbeL), tole(0xb2bd0b28L), tole(0x2bb45a92L), tole(0x5cb36a04L), +tole(0xc2d7ffa7L), tole(0xb5d0cf31L), tole(0x2cd99e8bL), tole(0x5bdeae1dL), +tole(0x9b64c2b0L), tole(0xec63f226L), tole(0x756aa39cL), tole(0x026d930aL), +tole(0x9c0906a9L), tole(0xeb0e363fL), tole(0x72076785L), tole(0x05005713L), +tole(0x95bf4a82L), tole(0xe2b87a14L), tole(0x7bb12baeL), tole(0x0cb61b38L), +tole(0x92d28e9bL), tole(0xe5d5be0dL), tole(0x7cdcefb7L), tole(0x0bdbdf21L), +tole(0x86d3d2d4L), tole(0xf1d4e242L), tole(0x68ddb3f8L), tole(0x1fda836eL), +tole(0x81be16cdL), tole(0xf6b9265bL), tole(0x6fb077e1L), tole(0x18b74777L), +tole(0x88085ae6L), tole(0xff0f6a70L), tole(0x66063bcaL), tole(0x11010b5cL), +tole(0x8f659effL), tole(0xf862ae69L), tole(0x616bffd3L), tole(0x166ccf45L), +tole(0xa00ae278L), tole(0xd70dd2eeL), tole(0x4e048354L), tole(0x3903b3c2L), +tole(0xa7672661L), tole(0xd06016f7L), tole(0x4969474dL), tole(0x3e6e77dbL), +tole(0xaed16a4aL), tole(0xd9d65adcL), tole(0x40df0b66L), tole(0x37d83bf0L), +tole(0xa9bcae53L), tole(0xdebb9ec5L), tole(0x47b2cf7fL), tole(0x30b5ffe9L), +tole(0xbdbdf21cL), tole(0xcabac28aL), tole(0x53b39330L), tole(0x24b4a3a6L), +tole(0xbad03605L), tole(0xcdd70693L), tole(0x54de5729L), tole(0x23d967bfL), +tole(0xb3667a2eL), tole(0xc4614ab8L), tole(0x5d681b02L), tole(0x2a6f2b94L), +tole(0xb40bbe37L), tole(0xc30c8ea1L), tole(0x5a05df1bL), tole(0x2d02ef8dL) +}; +#endif /* UNITTEST */ +static const __u32 crc32table_be[] = { +tobe(0x00000000L), tobe(0x04c11db7L), tobe(0x09823b6eL), tobe(0x0d4326d9L), +tobe(0x130476dcL), tobe(0x17c56b6bL), tobe(0x1a864db2L), tobe(0x1e475005L), +tobe(0x2608edb8L), tobe(0x22c9f00fL), tobe(0x2f8ad6d6L), tobe(0x2b4bcb61L), +tobe(0x350c9b64L), tobe(0x31cd86d3L), tobe(0x3c8ea00aL), tobe(0x384fbdbdL), +tobe(0x4c11db70L), tobe(0x48d0c6c7L), tobe(0x4593e01eL), tobe(0x4152fda9L), +tobe(0x5f15adacL), tobe(0x5bd4b01bL), tobe(0x569796c2L), tobe(0x52568b75L), +tobe(0x6a1936c8L), tobe(0x6ed82b7fL), tobe(0x639b0da6L), tobe(0x675a1011L), +tobe(0x791d4014L), tobe(0x7ddc5da3L), tobe(0x709f7b7aL), tobe(0x745e66cdL), +tobe(0x9823b6e0L), tobe(0x9ce2ab57L), tobe(0x91a18d8eL), tobe(0x95609039L), +tobe(0x8b27c03cL), tobe(0x8fe6dd8bL), tobe(0x82a5fb52L), tobe(0x8664e6e5L), +tobe(0xbe2b5b58L), tobe(0xbaea46efL), tobe(0xb7a96036L), tobe(0xb3687d81L), +tobe(0xad2f2d84L), tobe(0xa9ee3033L), tobe(0xa4ad16eaL), tobe(0xa06c0b5dL), +tobe(0xd4326d90L), tobe(0xd0f37027L), tobe(0xddb056feL), tobe(0xd9714b49L), +tobe(0xc7361b4cL), tobe(0xc3f706fbL), tobe(0xceb42022L), tobe(0xca753d95L), +tobe(0xf23a8028L), tobe(0xf6fb9d9fL), tobe(0xfbb8bb46L), tobe(0xff79a6f1L), +tobe(0xe13ef6f4L), tobe(0xe5ffeb43L), tobe(0xe8bccd9aL), tobe(0xec7dd02dL), +tobe(0x34867077L), tobe(0x30476dc0L), tobe(0x3d044b19L), tobe(0x39c556aeL), +tobe(0x278206abL), tobe(0x23431b1cL), tobe(0x2e003dc5L), tobe(0x2ac12072L), +tobe(0x128e9dcfL), tobe(0x164f8078L), tobe(0x1b0ca6a1L), tobe(0x1fcdbb16L), +tobe(0x018aeb13L), tobe(0x054bf6a4L), tobe(0x0808d07dL), tobe(0x0cc9cdcaL), +tobe(0x7897ab07L), tobe(0x7c56b6b0L), tobe(0x71159069L), tobe(0x75d48ddeL), +tobe(0x6b93dddbL), tobe(0x6f52c06cL), tobe(0x6211e6b5L), tobe(0x66d0fb02L), +tobe(0x5e9f46bfL), tobe(0x5a5e5b08L), tobe(0x571d7dd1L), tobe(0x53dc6066L), +tobe(0x4d9b3063L), tobe(0x495a2dd4L), tobe(0x44190b0dL), tobe(0x40d816baL), +tobe(0xaca5c697L), tobe(0xa864db20L), tobe(0xa527fdf9L), tobe(0xa1e6e04eL), +tobe(0xbfa1b04bL), tobe(0xbb60adfcL), tobe(0xb6238b25L), tobe(0xb2e29692L), +tobe(0x8aad2b2fL), tobe(0x8e6c3698L), tobe(0x832f1041L), tobe(0x87ee0df6L), +tobe(0x99a95df3L), tobe(0x9d684044L), tobe(0x902b669dL), tobe(0x94ea7b2aL), +tobe(0xe0b41de7L), tobe(0xe4750050L), tobe(0xe9362689L), tobe(0xedf73b3eL), +tobe(0xf3b06b3bL), tobe(0xf771768cL), tobe(0xfa325055L), tobe(0xfef34de2L), +tobe(0xc6bcf05fL), tobe(0xc27dede8L), tobe(0xcf3ecb31L), tobe(0xcbffd686L), +tobe(0xd5b88683L), tobe(0xd1799b34L), tobe(0xdc3abdedL), tobe(0xd8fba05aL), +tobe(0x690ce0eeL), tobe(0x6dcdfd59L), tobe(0x608edb80L), tobe(0x644fc637L), +tobe(0x7a089632L), tobe(0x7ec98b85L), tobe(0x738aad5cL), tobe(0x774bb0ebL), +tobe(0x4f040d56L), tobe(0x4bc510e1L), tobe(0x46863638L), tobe(0x42472b8fL), +tobe(0x5c007b8aL), tobe(0x58c1663dL), tobe(0x558240e4L), tobe(0x51435d53L), +tobe(0x251d3b9eL), tobe(0x21dc2629L), tobe(0x2c9f00f0L), tobe(0x285e1d47L), +tobe(0x36194d42L), tobe(0x32d850f5L), tobe(0x3f9b762cL), tobe(0x3b5a6b9bL), +tobe(0x0315d626L), tobe(0x07d4cb91L), tobe(0x0a97ed48L), tobe(0x0e56f0ffL), +tobe(0x1011a0faL), tobe(0x14d0bd4dL), tobe(0x19939b94L), tobe(0x1d528623L), +tobe(0xf12f560eL), tobe(0xf5ee4bb9L), tobe(0xf8ad6d60L), tobe(0xfc6c70d7L), +tobe(0xe22b20d2L), tobe(0xe6ea3d65L), tobe(0xeba91bbcL), tobe(0xef68060bL), +tobe(0xd727bbb6L), tobe(0xd3e6a601L), tobe(0xdea580d8L), tobe(0xda649d6fL), +tobe(0xc423cd6aL), tobe(0xc0e2d0ddL), tobe(0xcda1f604L), tobe(0xc960ebb3L), +tobe(0xbd3e8d7eL), tobe(0xb9ff90c9L), tobe(0xb4bcb610L), tobe(0xb07daba7L), +tobe(0xae3afba2L), tobe(0xaafbe615L), tobe(0xa7b8c0ccL), tobe(0xa379dd7bL), +tobe(0x9b3660c6L), tobe(0x9ff77d71L), tobe(0x92b45ba8L), tobe(0x9675461fL), +tobe(0x8832161aL), tobe(0x8cf30badL), tobe(0x81b02d74L), tobe(0x857130c3L), +tobe(0x5d8a9099L), tobe(0x594b8d2eL), tobe(0x5408abf7L), tobe(0x50c9b640L), +tobe(0x4e8ee645L), tobe(0x4a4ffbf2L), tobe(0x470cdd2bL), tobe(0x43cdc09cL), +tobe(0x7b827d21L), tobe(0x7f436096L), tobe(0x7200464fL), tobe(0x76c15bf8L), +tobe(0x68860bfdL), tobe(0x6c47164aL), tobe(0x61043093L), tobe(0x65c52d24L), +tobe(0x119b4be9L), tobe(0x155a565eL), tobe(0x18197087L), tobe(0x1cd86d30L), +tobe(0x029f3d35L), tobe(0x065e2082L), tobe(0x0b1d065bL), tobe(0x0fdc1becL), +tobe(0x3793a651L), tobe(0x3352bbe6L), tobe(0x3e119d3fL), tobe(0x3ad08088L), +tobe(0x2497d08dL), tobe(0x2056cd3aL), tobe(0x2d15ebe3L), tobe(0x29d4f654L), +tobe(0xc5a92679L), tobe(0xc1683bceL), tobe(0xcc2b1d17L), tobe(0xc8ea00a0L), +tobe(0xd6ad50a5L), tobe(0xd26c4d12L), tobe(0xdf2f6bcbL), tobe(0xdbee767cL), +tobe(0xe3a1cbc1L), tobe(0xe760d676L), tobe(0xea23f0afL), tobe(0xeee2ed18L), +tobe(0xf0a5bd1dL), tobe(0xf464a0aaL), tobe(0xf9278673L), tobe(0xfde69bc4L), +tobe(0x89b8fd09L), tobe(0x8d79e0beL), tobe(0x803ac667L), tobe(0x84fbdbd0L), +tobe(0x9abc8bd5L), tobe(0x9e7d9662L), tobe(0x933eb0bbL), tobe(0x97ffad0cL), +tobe(0xafb010b1L), tobe(0xab710d06L), tobe(0xa6322bdfL), tobe(0xa2f33668L), +tobe(0xbcb4666dL), tobe(0xb8757bdaL), tobe(0xb5365d03L), tobe(0xb1f740b4L) +}; diff --git a/e2fsck/dict.c b/e2fsck/dict.c index 90c4d840..722b5b1c 100644 --- a/e2fsck/dict.c +++ b/e2fsck/dict.c @@ -26,7 +26,6 @@ #define EXT2FS_ATTR(x) #endif -#include "config.h" #include <stdlib.h> #include <stddef.h> #include <assert.h> diff --git a/e2fsck/dirinfo.c b/e2fsck/dirinfo.c index dc08f90a..3c183937 100644 --- a/e2fsck/dirinfo.c +++ b/e2fsck/dirinfo.c @@ -7,7 +7,6 @@ #undef DIRINFO_DEBUG -#include "config.h" #include "e2fsck.h" #include <sys/stat.h> #include <fcntl.h> diff --git a/e2fsck/dx_dirinfo.c b/e2fsck/dx_dirinfo.c index 7838a406..5c48d328 100644 --- a/e2fsck/dx_dirinfo.c +++ b/e2fsck/dx_dirinfo.c @@ -5,7 +5,6 @@ * under the terms of the GNU Public License. */ -#include "config.h" #include "e2fsck.h" #ifdef ENABLE_HTREE diff --git a/e2fsck/e2fsck.c b/e2fsck/e2fsck.c index 0ec15404..36931244 100644 --- a/e2fsck/e2fsck.c +++ b/e2fsck/e2fsck.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <errno.h> #include "e2fsck.h" diff --git a/e2fsck/ea_refcount.c b/e2fsck/ea_refcount.c index fcfaf497..e4ccd6db 100644 --- a/e2fsck/ea_refcount.c +++ b/e2fsck/ea_refcount.c @@ -5,7 +5,6 @@ * redistributed under the terms of the GNU Public License. */ -#include "config.h" #if HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/e2fsck/ehandler.c b/e2fsck/ehandler.c index 6dddf9c1..6e2f23cb 100644 --- a/e2fsck/ehandler.c +++ b/e2fsck/ehandler.c @@ -6,7 +6,6 @@ * under the terms of the GNU Public License. */ -#include "config.h" #include <stdlib.h> #include <unistd.h> #include <string.h> diff --git a/e2fsck/emptydir.c b/e2fsck/emptydir.c index a3bfd46f..cf9b521e 100644 --- a/e2fsck/emptydir.c +++ b/e2fsck/emptydir.c @@ -12,7 +12,6 @@ * blocks and get rid of them. */ -#include "config.h" #include "e2fsck.h" #include "problem.h" diff --git a/e2fsck/extend.c b/e2fsck/extend.c index bdb62c3e..2a849b21 100644 --- a/e2fsck/extend.c +++ b/e2fsck/extend.c @@ -8,7 +8,6 @@ * License. */ -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/e2fsck/flushb.c b/e2fsck/flushb.c index 6100fc61..95ca6f8d 100644 --- a/e2fsck/flushb.c +++ b/e2fsck/flushb.c @@ -13,7 +13,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #include <unistd.h> diff --git a/e2fsck/iscan.c b/e2fsck/iscan.c index 52cad11e..3d33c1f2 100644 --- a/e2fsck/iscan.c +++ b/e2fsck/iscan.c @@ -3,7 +3,6 @@ * anything else) */ -#include "config.h" #include <string.h> #include <fcntl.h> #include <ctype.h> diff --git a/e2fsck/jfs_user.h b/e2fsck/jfs_user.h index bfc1bcde..bb2c6302 100644 --- a/e2fsck/jfs_user.h +++ b/e2fsck/jfs_user.h @@ -61,8 +61,10 @@ typedef struct { #define cond_resched() do { } while (0) +#ifndef __BIONIC__ typedef unsigned int __be32; typedef __u64 __be64; +#endif #define __init diff --git a/e2fsck/journal.c b/e2fsck/journal.c index 11ccec58..c806ae21 100644 --- a/e2fsck/journal.c +++ b/e2fsck/journal.c @@ -12,7 +12,6 @@ * any later version. */ -#include "config.h" #ifdef HAVE_SYS_MOUNT_H #include <sys/param.h> #include <sys/mount.h> diff --git a/e2fsck/logfile.c b/e2fsck/logfile.c index c48b8eb8..40e5acb7 100644 --- a/e2fsck/logfile.c +++ b/e2fsck/logfile.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #ifdef HAVE_ERRNO_H #include <errno.h> #endif diff --git a/e2fsck/message.c b/e2fsck/message.c index 7b2cb623..5b20a164 100644 --- a/e2fsck/message.c +++ b/e2fsck/message.c @@ -86,7 +86,6 @@ * @z zero-length */ -#include "config.h" #include <stdlib.h> #include <unistd.h> #include <string.h> diff --git a/e2fsck/mtrace.c b/e2fsck/mtrace.c index 2b7b34a6..f34f19a9 100644 --- a/e2fsck/mtrace.c +++ b/e2fsck/mtrace.c @@ -21,8 +21,6 @@ Cambridge, MA 02139, USA. The author may be reached (Email) at the address mike@ai.mit.edu, or (US mail) as Mike Haertel c/o Free Software Foundation. */ -#include "config.h" - #ifndef _MALLOC_INTERNAL #define _MALLOC_INTERNAL #include "./mtrace.h" diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 71b3000a..50715aab 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -38,7 +38,6 @@ */ #define _GNU_SOURCE 1 /* get strnlen() */ -#include "config.h" #include <string.h> #include <time.h> #ifdef HAVE_ERRNO_H diff --git a/e2fsck/pass1b.c b/e2fsck/pass1b.c index 13bd9e98..932a171e 100644 --- a/e2fsck/pass1b.c +++ b/e2fsck/pass1b.c @@ -27,7 +27,6 @@ * */ -#include "config.h" #include <time.h> #ifdef HAVE_ERRNO_H #include <errno.h> diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c index 7277a7b3..f0873885 100644 --- a/e2fsck/pass2.c +++ b/e2fsck/pass2.c @@ -42,7 +42,6 @@ */ #define _GNU_SOURCE 1 /* get strnlen() */ -#include "config.h" #include <string.h> #include "e2fsck.h" diff --git a/e2fsck/pass3.c b/e2fsck/pass3.c index 32c05b5b..8f1898a0 100644 --- a/e2fsck/pass3.c +++ b/e2fsck/pass3.c @@ -34,7 +34,6 @@ * - The dirinfo directory information cache. */ -#include "config.h" #ifdef HAVE_ERRNO_H #include <errno.h> #endif diff --git a/e2fsck/pass4.c b/e2fsck/pass4.c index 21d93f0c..d47b662f 100644 --- a/e2fsck/pass4.c +++ b/e2fsck/pass4.c @@ -13,7 +13,6 @@ * - A bitmap of which inodes are imagic inodes. (inode_imagic_map) */ -#include "config.h" #include "e2fsck.h" #include "problem.h" #include <ext2fs/ext2_ext_attr.h> diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c index 4409d7fe..c04ffbd2 100644 --- a/e2fsck/pass5.c +++ b/e2fsck/pass5.c @@ -10,7 +10,6 @@ * */ -#include "config.h" #include <stdint.h> #include <sys/types.h> #include <sys/stat.h> diff --git a/e2fsck/problem.c b/e2fsck/problem.c index 83584a08..b78b56ea 100644 --- a/e2fsck/problem.c +++ b/e2fsck/problem.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdlib.h> #include <unistd.h> #include <string.h> diff --git a/e2fsck/problem.h b/e2fsck/problem.h index 6cb09cfb..e03d38b8 100644 --- a/e2fsck/problem.h +++ b/e2fsck/problem.h @@ -9,6 +9,9 @@ * %End-Header% */ +#include <stdint.h> +typedef uint32_t __u32; +typedef long errcode_t; typedef __u32 problem_t; struct problem_context { diff --git a/e2fsck/prof_err.c b/e2fsck/prof_err.c new file mode 100644 index 00000000..2c8d43bf --- /dev/null +++ b/e2fsck/prof_err.c @@ -0,0 +1,85 @@ +/* + * prof_err.c: + * This file is automatically generated; please do not edit it. + */ + +#include <stdlib.h> + +#define N_(a) a + +static const char * const text[] = { + N_("Profile version 0.0"), + N_("Bad magic value in profile_node"), + N_("Profile section not found"), + N_("Profile relation not found"), + N_( "Attempt to add a relation to node which is not a section"), + N_( "A profile section header has a non-zero value"), + N_("Bad linked list in profile structures"), + N_("Bad group level in profile structures"), + N_( "Bad parent pointer in profile structures"), + N_("Bad magic value in profile iterator"), + N_("Can't set value on section node"), + N_("Invalid argument passed to profile library"), + N_("Attempt to modify read-only profile"), + N_("Profile section header not at top level"), + N_("Syntax error in profile section header"), + N_("Syntax error in profile relation"), + N_("Extra closing brace in profile"), + N_("Missing open brace in profile"), + N_("Bad magic value in profile_t"), + N_("Bad magic value in profile_section_t"), + N_( "Iteration through all top level section not supported"), + N_("Invalid profile_section object"), + N_("No more sections"), + N_("Bad nameset passed to query routine"), + N_("No profile file open"), + N_("Bad magic value in profile_file_t"), + N_("Couldn't open profile file"), + N_("Section already exists"), + N_("Invalid boolean value"), + N_("Invalid integer value"), + N_("Bad magic value in profile_file_data_t"), + 0 +}; + +struct error_table { + char const * const * msgs; + long base; + int n_msgs; +}; +struct et_list { + struct et_list *next; + const struct error_table * table; +}; +extern struct et_list *_et_list; + +const struct error_table et_prof_error_table = { text, -1429577728L, 31 }; + +static struct et_list link = { 0, 0 }; + +void initialize_prof_error_table_r(struct et_list **list); +void initialize_prof_error_table(void); + +void initialize_prof_error_table(void) { + initialize_prof_error_table_r(&_et_list); +} + +/* For Heimdal compatibility */ +void initialize_prof_error_table_r(struct et_list **list) +{ + struct et_list *et, **end; + + for (end = list, et = *list; et; end = &et->next, et = et->next) + if (et->table->msgs == text) + return; + et = malloc(sizeof(struct et_list)); + if (et == 0) { + if (!link.table) + et = &link; + else + return; + } + et->table = &et_prof_error_table; + et->next = 0; + *end = et; +} diff --git a/e2fsck/prof_err.h b/e2fsck/prof_err.h new file mode 100644 index 00000000..e8066ddc --- /dev/null +++ b/e2fsck/prof_err.h @@ -0,0 +1,49 @@ +/* + * prof_err.h: + * This file is automatically generated; please do not edit it. + */ + +#include <et/com_err.h> + +#define PROF_VERSION (-1429577728L) +#define PROF_MAGIC_NODE (-1429577727L) +#define PROF_NO_SECTION (-1429577726L) +#define PROF_NO_RELATION (-1429577725L) +#define PROF_ADD_NOT_SECTION (-1429577724L) +#define PROF_SECTION_WITH_VALUE (-1429577723L) +#define PROF_BAD_LINK_LIST (-1429577722L) +#define PROF_BAD_GROUP_LVL (-1429577721L) +#define PROF_BAD_PARENT_PTR (-1429577720L) +#define PROF_MAGIC_ITERATOR (-1429577719L) +#define PROF_SET_SECTION_VALUE (-1429577718L) +#define PROF_EINVAL (-1429577717L) +#define PROF_READ_ONLY (-1429577716L) +#define PROF_SECTION_NOTOP (-1429577715L) +#define PROF_SECTION_SYNTAX (-1429577714L) +#define PROF_RELATION_SYNTAX (-1429577713L) +#define PROF_EXTRA_CBRACE (-1429577712L) +#define PROF_MISSING_OBRACE (-1429577711L) +#define PROF_MAGIC_PROFILE (-1429577710L) +#define PROF_MAGIC_SECTION (-1429577709L) +#define PROF_TOPSECTION_ITER_NOSUPP (-1429577708L) +#define PROF_INVALID_SECTION (-1429577707L) +#define PROF_END_OF_SECTIONS (-1429577706L) +#define PROF_BAD_NAMESET (-1429577705L) +#define PROF_NO_PROFILE (-1429577704L) +#define PROF_MAGIC_FILE (-1429577703L) +#define PROF_FAIL_OPEN (-1429577702L) +#define PROF_EXISTS (-1429577701L) +#define PROF_BAD_BOOLEAN (-1429577700L) +#define PROF_BAD_INTEGER (-1429577699L) +#define PROF_MAGIC_FILE_DATA (-1429577698L) +extern const struct error_table et_prof_error_table; +extern void initialize_prof_error_table(void); + +/* For compatibility with Heimdal */ +extern void initialize_prof_error_table_r(struct et_list **list); + +#define ERROR_TABLE_BASE_prof (-1429577728L) + +/* for compatibility with older versions... */ +#define init_prof_err_tbl initialize_prof_error_table +#define prof_err_base ERROR_TABLE_BASE_prof diff --git a/e2fsck/profile.c b/e2fsck/profile.c index 92aa8939..845b061b 100644 --- a/e2fsck/profile.c +++ b/e2fsck/profile.c @@ -48,7 +48,6 @@ * */ -#include "config.h" #ifdef HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/e2fsck/profile_helpers.c b/e2fsck/profile_helpers.c index 9c9080a1..c6b5c444 100644 --- a/e2fsck/profile_helpers.c +++ b/e2fsck/profile_helpers.c @@ -18,7 +18,6 @@ * %End-Header% */ -#include "config.h" #include <stdlib.h> #include <string.h> #include <errno.h> diff --git a/e2fsck/quota.c b/e2fsck/quota.c index 7a1476e7..7d24ccf4 100644 --- a/e2fsck/quota.c +++ b/e2fsck/quota.c @@ -3,7 +3,6 @@ * */ -#include "config.h" #ifdef HAVE_SYS_MOUNT_H #include <sys/param.h> #include <sys/mount.h> diff --git a/e2fsck/recovery.c b/e2fsck/recovery.c index e4e5ae1d..905edd91 100644 --- a/e2fsck/recovery.c +++ b/e2fsck/recovery.c @@ -14,7 +14,6 @@ */ #ifndef __KERNEL__ -#include "config.h" #include "jfs_user.h" #else #include <linux/time.h> diff --git a/e2fsck/region.c b/e2fsck/region.c index 4b669f08..547d3de3 100644 --- a/e2fsck/region.c +++ b/e2fsck/region.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #if HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/e2fsck/rehash.c b/e2fsck/rehash.c index 3aafbb12..fdfea21d 100644 --- a/e2fsck/rehash.c +++ b/e2fsck/rehash.c @@ -45,7 +45,6 @@ * require that e2fsck use VM first. */ -#include "config.h" #include <string.h> #include <ctype.h> #include <errno.h> diff --git a/e2fsck/revoke.c b/e2fsck/revoke.c index 38c265e4..c43e40e9 100644 --- a/e2fsck/revoke.c +++ b/e2fsck/revoke.c @@ -58,7 +58,6 @@ */ #ifndef __KERNEL__ -#include "config.h" #include "jfs_user.h" #else #include <linux/sched.h> diff --git a/e2fsck/scantest.c b/e2fsck/scantest.c index 16380b31..5ab97db6 100644 --- a/e2fsck/scantest.c +++ b/e2fsck/scantest.c @@ -2,7 +2,6 @@ * scantest.c - test the speed of the inode scan routine */ -#include "config.h" #include <string.h> #include <fcntl.h> #include <ctype.h> diff --git a/e2fsck/sigcatcher.c b/e2fsck/sigcatcher.c index e4d60ce8..183b1dff 100644 --- a/e2fsck/sigcatcher.c +++ b/e2fsck/sigcatcher.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <signal.h> diff --git a/e2fsck/super.c b/e2fsck/super.c index b0cc440f..d05c90e5 100644 --- a/e2fsck/super.c +++ b/e2fsck/super.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #ifdef HAVE_ERRNO_H #include <errno.h> #endif diff --git a/e2fsck/unix.c b/e2fsck/unix.c index 6f94644e..56f4924e 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -11,7 +11,6 @@ #define _XOPEN_SOURCE 600 /* for inclusion of sa_handler in Solaris */ -#include "config.h" #include <stdio.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> @@ -68,6 +67,10 @@ e2fsck_t e2fsck_global_ctx; /* Try your very best not to use this! */ int journal_enable_debug = -1; #endif +#ifndef ROOT_SYSCONFDIR +#define ROOT_SYSCONFDIR "/etc" +#endif + static void usage(e2fsck_t ctx) { fprintf(stderr, diff --git a/e2fsck/util.c b/e2fsck/util.c index 9f920b2c..89536e67 100644 --- a/e2fsck/util.c +++ b/e2fsck/util.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdlib.h> #include <stdio.h> #include <unistd.h> diff --git a/ext2ed/blockbitmap_com.c b/ext2ed/blockbitmap_com.c index 53e61dc8..996bbeb4 100644 --- a/ext2ed/blockbitmap_com.c +++ b/ext2ed/blockbitmap_com.c @@ -16,7 +16,6 @@ Copyright (C) 1995 Gadi Oxman */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/ext2ed/dir_com.c b/ext2ed/dir_com.c index ba852676..b023e7a3 100644 --- a/ext2ed/dir_com.c +++ b/ext2ed/dir_com.c @@ -28,7 +28,6 @@ Copyright (C) 1995 Gadi Oxman */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/ext2ed/disk.c b/ext2ed/disk.c index 5c243127..5e1cd7e2 100644 --- a/ext2ed/disk.c +++ b/ext2ed/disk.c @@ -22,7 +22,6 @@ Copyright (C) 1995 Gadi Oxman */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/ext2ed/ext2_com.c b/ext2ed/ext2_com.c index ed004f28..2f20a28d 100644 --- a/ext2ed/ext2_com.c +++ b/ext2ed/ext2_com.c @@ -16,7 +16,6 @@ Copyright (C) 1995 Gadi Oxman */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/ext2ed/file_com.c b/ext2ed/file_com.c index d6679599..9772f66d 100644 --- a/ext2ed/file_com.c +++ b/ext2ed/file_com.c @@ -14,7 +14,6 @@ Copyright (C) 1995 Gadi Oxman */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/ext2ed/general_com.c b/ext2ed/general_com.c index c9b2ffc4..03dc2615 100644 --- a/ext2ed/general_com.c +++ b/ext2ed/general_com.c @@ -14,7 +14,6 @@ Copyright (C) 1995 Gadi Oxman */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/ext2ed/group_com.c b/ext2ed/group_com.c index aaed16e4..25325533 100644 --- a/ext2ed/group_com.c +++ b/ext2ed/group_com.c @@ -12,7 +12,6 @@ Copyright (C) 1995 Gadi Oxman */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/ext2ed/init.c b/ext2ed/init.c index 7d9b526f..d4703ed0 100644 --- a/ext2ed/init.c +++ b/ext2ed/init.c @@ -14,7 +14,6 @@ Copyright (C) 1995 Gadi Oxman */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/ext2ed/inode_com.c b/ext2ed/inode_com.c index 2d3dd6d6..8d4b9f33 100644 --- a/ext2ed/inode_com.c +++ b/ext2ed/inode_com.c @@ -12,7 +12,6 @@ Copyright (C) 1995 Gadi Oxman */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/ext2ed/inodebitmap_com.c b/ext2ed/inodebitmap_com.c index 157807a2..e6022344 100644 --- a/ext2ed/inodebitmap_com.c +++ b/ext2ed/inodebitmap_com.c @@ -16,7 +16,6 @@ Copyright (C) 1995 Gadi Oxman */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/ext2ed/main.c b/ext2ed/main.c index 4a29979b..50a3f07f 100644 --- a/ext2ed/main.c +++ b/ext2ed/main.c @@ -22,7 +22,6 @@ Copyright (C) 1995 Gadi Oxman */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/ext2ed/super_com.c b/ext2ed/super_com.c index a998970e..57953ab6 100644 --- a/ext2ed/super_com.c +++ b/ext2ed/super_com.c @@ -14,7 +14,6 @@ Copyright (C) 1995 Gadi Oxman */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/ext2ed/win.c b/ext2ed/win.c index 23d0da13..113a28f3 100644 --- a/ext2ed/win.c +++ b/ext2ed/win.c @@ -17,7 +17,6 @@ Copyright (C) 1995 Gadi Oxman */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/lib/blkid/blkid.h b/lib/blkid/blkid.h new file mode 100644 index 00000000..81f3098c --- /dev/null +++ b/lib/blkid/blkid.h @@ -0,0 +1,110 @@ +/* + * blkid.h - Interface for libblkid, a library to identify block devices + * + * Copyright (C) 2001 Andreas Dilger + * Copyright (C) 2003 Theodore Ts'o + * + * %Begin-Header% + * This file may be redistributed under the terms of the + * GNU Lesser General Public License. + * %End-Header% + */ + +#ifndef _BLKID_BLKID_H +#define _BLKID_BLKID_H + +#include <sys/types.h> +#include <blkid/blkid_types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#define BLKID_VERSION "1.0.0" +#define BLKID_DATE "12-Feb-2003" + +typedef struct blkid_struct_dev *blkid_dev; +typedef struct blkid_struct_cache *blkid_cache; +typedef __s64 blkid_loff_t; + +typedef struct blkid_struct_tag_iterate *blkid_tag_iterate; +typedef struct blkid_struct_dev_iterate *blkid_dev_iterate; + +/* + * Flags for blkid_get_dev + * + * BLKID_DEV_CREATE Create an empty device structure if not found + * in the cache. + * BLKID_DEV_VERIFY Make sure the device structure corresponds + * with reality. + * BLKID_DEV_FIND Just look up a device entry, and return NULL + * if it is not found. + * BLKID_DEV_NORMAL Get a valid device structure, either from the + * cache or by probing the device. + */ +#define BLKID_DEV_FIND 0x0000 +#define BLKID_DEV_CREATE 0x0001 +#define BLKID_DEV_VERIFY 0x0002 +#define BLKID_DEV_NORMAL (BLKID_DEV_CREATE | BLKID_DEV_VERIFY) + +/* cache.c */ +extern void blkid_put_cache(blkid_cache cache); +extern int blkid_get_cache(blkid_cache *cache, const char *filename); +extern void blkid_gc_cache(blkid_cache cache); + +/* dev.c */ +extern const char *blkid_dev_devname(blkid_dev dev); + +extern blkid_dev_iterate blkid_dev_iterate_begin(blkid_cache cache); +extern int blkid_dev_set_search(blkid_dev_iterate iter, + char *search_type, char *search_value); +extern int blkid_dev_next(blkid_dev_iterate iterate, blkid_dev *dev); +extern void blkid_dev_iterate_end(blkid_dev_iterate iterate); + +/* devno.c */ +extern char *blkid_devno_to_devname(dev_t devno); + +/* devname.c */ +extern int blkid_probe_all(blkid_cache cache); +extern int blkid_probe_all_new(blkid_cache cache); +extern blkid_dev blkid_get_dev(blkid_cache cache, const char *devname, + int flags); + +/* getsize.c */ +extern blkid_loff_t blkid_get_dev_size(int fd); + +/* probe.c */ +int blkid_known_fstype(const char *fstype); +extern blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev); + +/* read.c */ + +/* resolve.c */ +extern char *blkid_get_tag_value(blkid_cache cache, const char *tagname, + const char *devname); +extern char *blkid_get_devname(blkid_cache cache, const char *token, + const char *value); + +/* tag.c */ +extern blkid_tag_iterate blkid_tag_iterate_begin(blkid_dev dev); +extern int blkid_tag_next(blkid_tag_iterate iterate, + const char **type, const char **value); +extern void blkid_tag_iterate_end(blkid_tag_iterate iterate); +extern int blkid_dev_has_tag(blkid_dev dev, const char *type, + const char *value); +extern blkid_dev blkid_find_dev_with_tag(blkid_cache cache, + const char *type, + const char *value); +extern int blkid_parse_tag_string(const char *token, char **ret_type, + char **ret_val); + +/* version.c */ +extern int blkid_parse_version_string(const char *ver_string); +extern int blkid_get_library_version(const char **ver_string, + const char **date_string); + +#ifdef __cplusplus +} +#endif + +#endif /* _BLKID_BLKID_H */ diff --git a/lib/blkid/blkid_types.h b/lib/blkid/blkid_types.h new file mode 100644 index 00000000..3ffaee54 --- /dev/null +++ b/lib/blkid/blkid_types.h @@ -0,0 +1,133 @@ +/* + * If linux/types.h is already been included, assume it has defined + * everything we need. (cross fingers) Other header files may have + * also defined the types that we need. + */ +#if (!defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \ + !defined(_EXT2_TYPES_H)) +#define _BLKID_TYPES_H + + +#ifdef __U8_TYPEDEF +typedef __U8_TYPEDEF __u8; +#else +typedef unsigned char __u8; +#endif + +#ifdef __S8_TYPEDEF +typedef __S8_TYPEDEF __s8; +#else +typedef signed char __s8; +#endif + +#ifdef __U16_TYPEDEF +typedef __U16_TYPEDEF __u16; +#else +#if (4 == 2) +typedef unsigned int __u16; +#else +#if (2 == 2) +typedef unsigned short __u16; +#else + ?==error: undefined 16 bit type +#endif /* SIZEOF_SHORT == 2 */ +#endif /* SIZEOF_INT == 2 */ +#endif /* __U16_TYPEDEF */ + +#ifdef __S16_TYPEDEF +typedef __S16_TYPEDEF __s16; +#else +#if (4 == 2) +typedef int __s16; +#else +#if (2 == 2) +typedef short __s16; +#else + ?==error: undefined 16 bit type +#endif /* SIZEOF_SHORT == 2 */ +#endif /* SIZEOF_INT == 2 */ +#endif /* __S16_TYPEDEF */ + + +#ifdef __U32_TYPEDEF +typedef __U32_TYPEDEF __u32; +#else +#if (4 == 4) +typedef unsigned int __u32; +#else +#if (4 == 4) +typedef unsigned long __u32; +#else +#if (2 == 4) +typedef unsigned short __u32; +#else + ?== error: undefined 32 bit type +#endif /* SIZEOF_SHORT == 4 */ +#endif /* SIZEOF_LONG == 4 */ +#endif /* SIZEOF_INT == 4 */ +#endif /* __U32_TYPEDEF */ + +#ifdef __S32_TYPEDEF +typedef __S32_TYPEDEF __s32; +#else +#if (4 == 4) +typedef int __s32; +#else +#if (4 == 4) +typedef long __s32; +#else +#if (2 == 4) +typedef short __s32; +#else + ?== error: undefined 32 bit type +#endif /* SIZEOF_SHORT == 4 */ +#endif /* SIZEOF_LONG == 4 */ +#endif /* SIZEOF_INT == 4 */ +#endif /* __S32_TYPEDEF */ + +#ifdef __U64_TYPEDEF +typedef __U64_TYPEDEF __u64; +#else +#if (4 == 8) +typedef unsigned int __u64; +#else +#if (8 == 8) +typedef unsigned long long __u64; +#else +#if (4 == 8) +typedef unsigned long __u64; +#endif /* SIZEOF_LONG == 8 */ +#endif /* SIZEOF_LONG_LONG == 8 */ +#endif /* SIZEOF_INT == 8 */ +#endif /* __U64_TYPEDEF */ + +#ifdef __S64_TYPEDEF +typedef __S64_TYPEDEF __s64; +#else +#if (4 == 8) +typedef int __s64; +#else +#if (8 == 8) +#if defined(__GNUC__) +typedef __signed__ long long __s64; +#else +typedef signed long long __s64; +#endif /* __GNUC__ */ +#else +#if (4 == 8) +typedef long __s64; +#endif /* SIZEOF_LONG == 8 */ +#endif /* SIZEOF_LONG_LONG == 8 */ +#endif /* SIZEOF_INT == 8 */ +#endif /* __S64_TYPEDEF */ + +#undef __S8_TYPEDEF +#undef __U8_TYPEDEF +#undef __S16_TYPEDEF +#undef __U16_TYPEDEF +#undef __S32_TYPEDEF +#undef __U32_TYPEDEF +#undef __S64_TYPEDEF +#undef __U64_TYPEDEF + +#endif /* _*_TYPES_H */ diff --git a/lib/blkid/cache.c b/lib/blkid/cache.c index 8bdd2399..e2ccafd2 100644 --- a/lib/blkid/cache.c +++ b/lib/blkid/cache.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #if HAVE_SECURE_GETENV #define _GNU_SOURCE #endif diff --git a/lib/blkid/dev.c b/lib/blkid/dev.c index 6d8eaeac..128a869d 100644 --- a/lib/blkid/dev.c +++ b/lib/blkid/dev.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdlib.h> #include <string.h> diff --git a/lib/blkid/devname.c b/lib/blkid/devname.c index a6673c17..b151354d 100644 --- a/lib/blkid/devname.c +++ b/lib/blkid/devname.c @@ -13,7 +13,6 @@ #define _GNU_SOURCE 1 -#include "config.h" #include <stdio.h> #include <string.h> #include <limits.h> diff --git a/lib/blkid/devno.c b/lib/blkid/devno.c index 479d9776..c9f5c92c 100644 --- a/lib/blkid/devno.c +++ b/lib/blkid/devno.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/blkid/getsize.c b/lib/blkid/getsize.c index c2a8f72a..ac4177e2 100644 --- a/lib/blkid/getsize.c +++ b/lib/blkid/getsize.c @@ -13,7 +13,6 @@ #define _LARGEFILE64_SOURCE /* include this before sys/queues.h! */ -#include "config.h" #include "blkidP.h" #include <stdio.h> diff --git a/lib/blkid/llseek.c b/lib/blkid/llseek.c index 658acc97..5bd0e516 100644 --- a/lib/blkid/llseek.c +++ b/lib/blkid/llseek.c @@ -12,7 +12,6 @@ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE -#include "config.h" #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif diff --git a/lib/blkid/probe.c b/lib/blkid/probe.c index bd31fe05..31385dbb 100644 --- a/lib/blkid/probe.c +++ b/lib/blkid/probe.c @@ -13,7 +13,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #include <stdlib.h> diff --git a/lib/blkid/read.c b/lib/blkid/read.c index efc348b9..ca2798f0 100644 --- a/lib/blkid/read.c +++ b/lib/blkid/read.c @@ -12,7 +12,6 @@ #define _XOPEN_SOURCE 600 /* for inclusion of strtoull */ -#include "config.h" #include <stdio.h> #include <ctype.h> #include <string.h> diff --git a/lib/blkid/resolve.c b/lib/blkid/resolve.c index 3bc37b0c..6c2e268d 100644 --- a/lib/blkid/resolve.c +++ b/lib/blkid/resolve.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/blkid/save.c b/lib/blkid/save.c index 6c20168b..6802e9dc 100644 --- a/lib/blkid/save.c +++ b/lib/blkid/save.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #include <stdlib.h> diff --git a/lib/blkid/tag.c b/lib/blkid/tag.c index 1eae7df7..639ef89e 100644 --- a/lib/blkid/tag.c +++ b/lib/blkid/tag.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <unistd.h> #include <stdlib.h> #include <string.h> diff --git a/lib/blkid/tst_types.c b/lib/blkid/tst_types.c index cb612aeb..3003c8b5 100644 --- a/lib/blkid/tst_types.c +++ b/lib/blkid/tst_types.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <sys/types.h> #include "blkid/blkid_types.h" diff --git a/lib/blkid/version.c b/lib/blkid/version.c index 54c17aa6..c9754fab 100644 --- a/lib/blkid/version.c +++ b/lib/blkid/version.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #if HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/lib/e2p/feature.c b/lib/e2p/feature.c index 96912638..bd8a64af 100644 --- a/lib/e2p/feature.c +++ b/lib/e2p/feature.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/lib/e2p/fgetflags.c b/lib/e2p/fgetflags.c index 2af84627..ca3ea166 100644 --- a/lib/e2p/fgetflags.c +++ b/lib/e2p/fgetflags.c @@ -19,7 +19,6 @@ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE -#include "config.h" #if HAVE_ERRNO_H #include <errno.h> #endif diff --git a/lib/e2p/fgetversion.c b/lib/e2p/fgetversion.c index e6cee8bf..37946f77 100644 --- a/lib/e2p/fgetversion.c +++ b/lib/e2p/fgetversion.c @@ -19,7 +19,6 @@ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE -#include "config.h" #if HAVE_ERRNO_H #include <errno.h> #endif diff --git a/lib/e2p/fsetflags.c b/lib/e2p/fsetflags.c index 167d16e8..08dd114d 100644 --- a/lib/e2p/fsetflags.c +++ b/lib/e2p/fsetflags.c @@ -19,7 +19,6 @@ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE -#include "config.h" #if HAVE_ERRNO_H #include <errno.h> #endif diff --git a/lib/e2p/fsetversion.c b/lib/e2p/fsetversion.c index d41d59f9..fc50cb1e 100644 --- a/lib/e2p/fsetversion.c +++ b/lib/e2p/fsetversion.c @@ -19,7 +19,6 @@ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE -#include "config.h" #if HAVE_ERRNO_H #include <errno.h> #endif diff --git a/lib/e2p/getflags.c b/lib/e2p/getflags.c index e4e2ad73..e8716848 100644 --- a/lib/e2p/getflags.c +++ b/lib/e2p/getflags.c @@ -16,7 +16,6 @@ * 93/10/30 - Creation */ -#include "config.h" #if HAVE_ERRNO_H #include <errno.h> #endif diff --git a/lib/e2p/getversion.c b/lib/e2p/getversion.c index 71031ffc..ec6621dc 100644 --- a/lib/e2p/getversion.c +++ b/lib/e2p/getversion.c @@ -16,7 +16,6 @@ * 93/10/30 - Creation */ -#include "config.h" #if HAVE_ERRNO_H #include <errno.h> #endif diff --git a/lib/e2p/hashstr.c b/lib/e2p/hashstr.c index a73758c7..5ee62370 100644 --- a/lib/e2p/hashstr.c +++ b/lib/e2p/hashstr.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/lib/e2p/iod.c b/lib/e2p/iod.c index 6a030dd4..c53aafeb 100644 --- a/lib/e2p/iod.c +++ b/lib/e2p/iod.c @@ -16,7 +16,6 @@ * 93/10/30 - Creation */ -#include "config.h" #include "e2p.h" #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/e2p/ls.c b/lib/e2p/ls.c index 5b3d3c8b..78cd335e 100644 --- a/lib/e2p/ls.c +++ b/lib/e2p/ls.c @@ -13,7 +13,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <sys/types.h> diff --git a/lib/e2p/mntopts.c b/lib/e2p/mntopts.c index d56cc527..9d3879e3 100644 --- a/lib/e2p/mntopts.c +++ b/lib/e2p/mntopts.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/lib/e2p/ostype.c b/lib/e2p/ostype.c index d002e75d..978315b8 100644 --- a/lib/e2p/ostype.c +++ b/lib/e2p/ostype.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include "e2p.h" #include <string.h> #include <stdlib.h> diff --git a/lib/e2p/parse_num.c b/lib/e2p/parse_num.c index e8d6283c..4caa3a3c 100644 --- a/lib/e2p/parse_num.c +++ b/lib/e2p/parse_num.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include "e2p.h" #include <stdlib.h> diff --git a/lib/e2p/pe.c b/lib/e2p/pe.c index 1f24545d..78c80993 100644 --- a/lib/e2p/pe.c +++ b/lib/e2p/pe.c @@ -16,7 +16,6 @@ * 94/01/09 - Creation */ -#include "config.h" #include <stdio.h> #include "e2p.h" diff --git a/lib/e2p/percent.c b/lib/e2p/percent.c index e340cd76..cfa7046e 100644 --- a/lib/e2p/percent.c +++ b/lib/e2p/percent.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include "e2p.h" #include <stdlib.h> diff --git a/lib/e2p/pf.c b/lib/e2p/pf.c index e2f8ce50..6dd29f63 100644 --- a/lib/e2p/pf.c +++ b/lib/e2p/pf.c @@ -16,7 +16,6 @@ * 93/10/30 - Creation */ -#include "config.h" #include <stdio.h> #include "e2p.h" diff --git a/lib/e2p/ps.c b/lib/e2p/ps.c index 757f8a66..e6ad60ab 100644 --- a/lib/e2p/ps.c +++ b/lib/e2p/ps.c @@ -16,7 +16,6 @@ * 93/12/22 - Creation */ -#include "config.h" #include <stdio.h> #include "e2p.h" diff --git a/lib/e2p/setflags.c b/lib/e2p/setflags.c index 0f6a3e04..b203606f 100644 --- a/lib/e2p/setflags.c +++ b/lib/e2p/setflags.c @@ -16,7 +16,6 @@ * 93/10/30 - Creation */ -#include "config.h" #if HAVE_ERRNO_H #include <errno.h> #endif diff --git a/lib/e2p/setversion.c b/lib/e2p/setversion.c index 202834f1..d72270b6 100644 --- a/lib/e2p/setversion.c +++ b/lib/e2p/setversion.c @@ -16,7 +16,6 @@ * 93/10/30 - Creation */ -#include "config.h" #if HAVE_ERRNO_H #include <errno.h> #endif diff --git a/lib/e2p/uuid.c b/lib/e2p/uuid.c index a1020927..310b01de 100644 --- a/lib/e2p/uuid.c +++ b/lib/e2p/uuid.c @@ -7,7 +7,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #include <ext2fs/ext2_types.h> diff --git a/lib/et/com_err.c b/lib/et/com_err.c index d38998a2..5cc5c089 100644 --- a/lib/et/com_err.c +++ b/lib/et/com_err.c @@ -11,7 +11,6 @@ * express or implied warranty. */ -#include "config.h" #include <stdio.h> #ifdef HAVE_TERMIOS_H #include <termios.h> diff --git a/lib/et/com_right.c b/lib/et/com_right.c index 2cceb54c..f00e9104 100644 --- a/lib/et/com_right.c +++ b/lib/et/com_right.c @@ -38,7 +38,6 @@ * SUCH DAMAGE. */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/lib/et/error_message.c b/lib/et/error_message.c index 5d8d2422..16a4bcfb 100644 --- a/lib/et/error_message.c +++ b/lib/et/error_message.c @@ -16,7 +16,6 @@ * express or implied warranty. */ -#include "config.h" #if HAVE_SECURE_GETENV #define _GNU_SOURCE #endif diff --git a/lib/et/et_name.c b/lib/et/et_name.c index d9a3e874..3a0790e2 100644 --- a/lib/et/et_name.c +++ b/lib/et/et_name.c @@ -11,7 +11,6 @@ * express or implied warranty. */ -#include "config.h" #include "com_err.h" #include "error_table.h" #include "internal.h" diff --git a/lib/et/init_et.c b/lib/et/init_et.c index 772660d8..bf27da11 100644 --- a/lib/et/init_et.c +++ b/lib/et/init_et.c @@ -16,7 +16,6 @@ * express or implied warranty. */ -#include "config.h" #include <stdio.h> #include <errno.h> #ifdef HAVE_STDLIB_H diff --git a/lib/et/vfprintf.c b/lib/et/vfprintf.c index e3fcd78c..a1dc1e8c 100644 --- a/lib/et/vfprintf.c +++ b/lib/et/vfprintf.c @@ -19,7 +19,6 @@ static char sccsid[] = "@(#)vfprintf.c 5.2 (Berkeley) 6/27/88"; #endif /* LIBC_SCCS and not lint */ -#include "config.h" #if !HAVE_VPRINTF && HAVE_DOPRNT #include <stdio.h> #include <varargs.h> diff --git a/lib/ext2fs/Android.mk b/lib/ext2fs/Android.mk index c34efd37..5cf6eb03 100644 --- a/lib/ext2fs/Android.mk +++ b/lib/ext2fs/Android.mk @@ -10,6 +10,9 @@ libext2fs_src_files := \ bb_inode.c \ bitmaps.c \ bitops.c \ + blkmap64_ba.c \ + blkmap64_rb.c \ + blknum.c \ block.c \ bmap.c \ check_desc.c \ @@ -25,10 +28,12 @@ libext2fs_src_files := \ expanddir.c \ ext_attr.c \ extent.c \ + fileio.c \ finddev.c \ flushb.c \ freefs.c \ gen_bitmap.c \ + gen_bitmap64.c \ get_pathname.c \ getsize.c \ getsectsize.c \ @@ -43,11 +48,15 @@ libext2fs_src_files := \ link.c \ llseek.c \ lookup.c \ + mmp.c \ mkdir.c \ mkjournal.c \ native.c \ newdir.c \ openfs.c \ + progress.c \ + punch.c \ + rbtree.c \ read_bb.c \ read_bb_file.c \ res_gdt.c \ diff --git a/lib/ext2fs/alloc.c b/lib/ext2fs/alloc.c index 0c829edb..21d3e5ef 100644 --- a/lib/ext2fs/alloc.c +++ b/lib/ext2fs/alloc.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/ext2fs/alloc_sb.c b/lib/ext2fs/alloc_sb.c index 223ec516..73ef2cea 100644 --- a/lib/ext2fs/alloc_sb.c +++ b/lib/ext2fs/alloc_sb.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/alloc_stats.c b/lib/ext2fs/alloc_stats.c index adec3636..9a6697e0 100644 --- a/lib/ext2fs/alloc_stats.c +++ b/lib/ext2fs/alloc_stats.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include "ext2_fs.h" diff --git a/lib/ext2fs/alloc_tables.c b/lib/ext2fs/alloc_tables.c index 9f3d4e04..885d2b23 100644 --- a/lib/ext2fs/alloc_tables.c +++ b/lib/ext2fs/alloc_tables.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/badblocks.c b/lib/ext2fs/badblocks.c index 0f23983b..4312e190 100644 --- a/lib/ext2fs/badblocks.c +++ b/lib/ext2fs/badblocks.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/bb_compat.c b/lib/ext2fs/bb_compat.c index 373792a2..a94e3e48 100644 --- a/lib/ext2fs/bb_compat.c +++ b/lib/ext2fs/bb_compat.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/bb_inode.c b/lib/ext2fs/bb_inode.c index 268eecf8..0b6c3dd2 100644 --- a/lib/ext2fs/bb_inode.c +++ b/lib/ext2fs/bb_inode.c @@ -13,7 +13,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/bitmaps.c b/lib/ext2fs/bitmaps.c index 84021917..f215122f 100644 --- a/lib/ext2fs/bitmaps.c +++ b/lib/ext2fs/bitmaps.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/bitops.c b/lib/ext2fs/bitops.c index 8e4c05c4..42328478 100644 --- a/lib/ext2fs/bitops.c +++ b/lib/ext2fs/bitops.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_SYS_TYPES_H #include <sys/types.h> diff --git a/lib/ext2fs/blkmap64_ba.c b/lib/ext2fs/blkmap64_ba.c index 8eddde9a..72ef3ebd 100644 --- a/lib/ext2fs/blkmap64_ba.c +++ b/lib/ext2fs/blkmap64_ba.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/blknum.c b/lib/ext2fs/blknum.c index 8ced1eec..e2f0f1bb 100644 --- a/lib/ext2fs/blknum.c +++ b/lib/ext2fs/blknum.c @@ -11,7 +11,6 @@ * %End-Header% */ -#include "config.h" #include "ext2fs.h" /* diff --git a/lib/ext2fs/block.c b/lib/ext2fs/block.c index b8c68798..3e4bbde2 100644 --- a/lib/ext2fs/block.c +++ b/lib/ext2fs/block.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/bmap.c b/lib/ext2fs/bmap.c index b944c273..28a33207 100644 --- a/lib/ext2fs/bmap.c +++ b/lib/ext2fs/bmap.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/bmove.c b/lib/ext2fs/bmove.c index e2ea405a..f9480c88 100644 --- a/lib/ext2fs/bmove.c +++ b/lib/ext2fs/bmove.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/brel_ma.c b/lib/ext2fs/brel_ma.c index a12afaeb..e398c1e0 100644 --- a/lib/ext2fs/brel_ma.c +++ b/lib/ext2fs/brel_ma.c @@ -12,7 +12,6 @@ * %End-Header% */ -#include "config.h" #include <fcntl.h> #include <stdio.h> #include <string.h> diff --git a/lib/ext2fs/check_desc.c b/lib/ext2fs/check_desc.c index 1a768f92..d2cc5659 100644 --- a/lib/ext2fs/check_desc.c +++ b/lib/ext2fs/check_desc.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c index 3e4af7f9..87403839 100644 --- a/lib/ext2fs/closefs.c +++ b/lib/ext2fs/closefs.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/ext2fs/crc16.c b/lib/ext2fs/crc16.c index 2fdeb24e..026f040b 100644 --- a/lib/ext2fs/crc16.c +++ b/lib/ext2fs/crc16.c @@ -5,7 +5,6 @@ * Version 2. See the file COPYING for more details. */ -#include "config.h" #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif diff --git a/lib/ext2fs/crc32c.c b/lib/ext2fs/crc32c.c index 2512528a..5907500b 100644 --- a/lib/ext2fs/crc32c.c +++ b/lib/ext2fs/crc32c.c @@ -28,7 +28,6 @@ * This source code is licensed under the GNU General Public License, * Version 2. See the file COPYING for more details. */ -#include "config.h" #include <stdint.h> #include <stdlib.h> #include <stdio.h> diff --git a/lib/ext2fs/csum.c b/lib/ext2fs/csum.c index b681d342..b588ead3 100644 --- a/lib/ext2fs/csum.c +++ b/lib/ext2fs/csum.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif diff --git a/lib/ext2fs/dblist.c b/lib/ext2fs/dblist.c index 3f6ea50d..e5b685a1 100644 --- a/lib/ext2fs/dblist.c +++ b/lib/ext2fs/dblist.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/ext2fs/dblist_dir.c b/lib/ext2fs/dblist_dir.c index d4d51114..07ed8afa 100644 --- a/lib/ext2fs/dblist_dir.c +++ b/lib/ext2fs/dblist_dir.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/ext2fs/dir_iterate.c b/lib/ext2fs/dir_iterate.c index 589af692..8412218c 100644 --- a/lib/ext2fs/dir_iterate.c +++ b/lib/ext2fs/dir_iterate.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/dirblock.c b/lib/ext2fs/dirblock.c index cb3a104c..73e1f0ab 100644 --- a/lib/ext2fs/dirblock.c +++ b/lib/ext2fs/dirblock.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/ext2fs/dirhash.c b/lib/ext2fs/dirhash.c index c4ac94e0..5477bfbc 100644 --- a/lib/ext2fs/dirhash.c +++ b/lib/ext2fs/dirhash.c @@ -11,7 +11,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> diff --git a/lib/ext2fs/dosio.c b/lib/ext2fs/dosio.c index 0defff8a..ff3bda69 100644 --- a/lib/ext2fs/dosio.c +++ b/lib/ext2fs/dosio.c @@ -11,7 +11,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <bios.h> #include <string.h> diff --git a/lib/ext2fs/dupfs.c b/lib/ext2fs/dupfs.c index 02721e1a..13a48121 100644 --- a/lib/ext2fs/dupfs.c +++ b/lib/ext2fs/dupfs.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/ext2fs/expanddir.c b/lib/ext2fs/expanddir.c index 153b838c..c89385be 100644 --- a/lib/ext2fs/expanddir.c +++ b/lib/ext2fs/expanddir.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/ext2_err.c b/lib/ext2fs/ext2_err.c new file mode 100644 index 00000000..3d6f0b4a --- /dev/null +++ b/lib/ext2fs/ext2_err.c @@ -0,0 +1,210 @@ +/* + * ext2_err.c: + * This file is automatically generated; please do not edit it. + */ + +#include <stdlib.h> + +#define N_(a) a + +static const char * const text[] = { + N_( "EXT2FS Library version 1.42.9"), + N_( "Wrong magic number for ext2_filsys structure"), + N_( "Wrong magic number for badblocks_list structure"), + N_( "Wrong magic number for badblocks_iterate structure"), + N_( "Wrong magic number for inode_scan structure"), + N_( "Wrong magic number for io_channel structure"), + N_( "Wrong magic number for unix io_channel structure"), + N_( "Wrong magic number for io_manager structure"), + N_( "Wrong magic number for block_bitmap structure"), + N_( "Wrong magic number for inode_bitmap structure"), + N_( "Wrong magic number for generic_bitmap structure"), + N_( "Wrong magic number for test io_channel structure"), + N_( "Wrong magic number for directory block list structure"), + N_( "Wrong magic number for icount structure"), + N_( "Wrong magic number for Powerquest io_channel structure"), + N_( "Wrong magic number for ext2 file structure"), + N_( "Wrong magic number for Ext2 Image Header"), + N_( "Wrong magic number for inode io_channel structure"), + N_( "Wrong magic number for ext4 extent handle"), + N_( "Bad magic number in super-block"), + N_( "Filesystem revision too high"), + N_( "Attempt to write to filesystem opened read-only"), + N_( "Can't read group descriptors"), + N_( "Can't write group descriptors"), + N_( "Corrupt group descriptor: bad block for block bitmap"), + N_( "Corrupt group descriptor: bad block for inode bitmap"), + N_( "Corrupt group descriptor: bad block for inode table"), + N_( "Can't write an inode bitmap"), + N_( "Can't read an inode bitmap"), + N_( "Can't write a block bitmap"), + N_( "Can't read a block bitmap"), + N_( "Can't write an inode table"), + N_( "Can't read an inode table"), + N_( "Can't read next inode"), + N_( "Filesystem has unexpected block size"), + N_( "EXT2 directory corrupted"), + N_( "Attempt to read block from filesystem resulted in short read"), + N_( "Attempt to write block to filesystem resulted in short write"), + N_( "No free space in the directory"), + N_( "Inode bitmap not loaded"), + N_( "Block bitmap not loaded"), + N_( "Illegal inode number"), + N_( "Illegal block number"), + N_( "Internal error in ext2fs_expand_dir"), + N_( "Not enough space to build proposed filesystem"), + N_( "Illegal block number passed to ext2fs_mark_block_bitmap"), + N_( "Illegal block number passed to ext2fs_unmark_block_bitmap"), + N_( "Illegal block number passed to ext2fs_test_block_bitmap"), + N_( "Illegal inode number passed to ext2fs_mark_inode_bitmap"), + N_( "Illegal inode number passed to ext2fs_unmark_inode_bitmap"), + N_( "Illegal inode number passed to ext2fs_test_inode_bitmap"), + N_( "Attempt to fudge end of block bitmap past the real end"), + N_( "Attempt to fudge end of inode bitmap past the real end"), + N_( "Illegal indirect block found" ), + N_( "Illegal doubly indirect block found" ), + N_( "Illegal triply indirect block found" ), + N_( "Block bitmaps are not the same"), + N_( "Inode bitmaps are not the same"), + N_( "Illegal or malformed device name"), + N_( "A block group is missing an inode table"), + N_( "The ext2 superblock is corrupt"), + N_( "Illegal generic bit number passed to ext2fs_mark_generic_bitmap"), + N_( "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"), + N_( "Illegal generic bit number passed to ext2fs_test_generic_bitmap"), + N_( "Too many symbolic links encountered."), + N_( "The callback function will not handle this case"), + N_( "The inode is from a bad block in the inode table"), + N_( "Filesystem has unsupported feature(s)"), + N_( "Filesystem has unsupported read-only feature(s)"), + N_( "IO Channel failed to seek on read or write"), + N_( "Memory allocation failed"), + N_( "Invalid argument passed to ext2 library"), + N_( "Could not allocate block in ext2 filesystem"), + N_( "Could not allocate inode in ext2 filesystem"), + N_( "Ext2 inode is not a directory"), + N_( "Too many references in table"), + N_( "File not found by ext2_lookup"), + N_( "File open read-only"), + N_( "Ext2 directory block not found"), + N_( "Ext2 directory already exists"), + N_( "Unimplemented ext2 library function"), + N_( "User cancel requested"), + N_( "Ext2 file too big"), + N_( "Supplied journal device not a block device"), + N_( "Journal superblock not found"), + N_( "Journal must be at least 1024 blocks"), + N_( "Unsupported journal version"), + N_( "Error loading external journal"), + N_( "Journal not found"), + N_( "Directory hash unsupported"), + N_( "Illegal extended attribute block number"), + N_( "Cannot create filesystem with requested number of inodes"), + N_( "E2image snapshot not in use"), + N_( "Too many reserved group descriptor blocks"), + N_( "Resize inode is corrupt"), + N_( "Tried to set block bmap with missing indirect block"), + N_( "TDB: Success"), + N_( "TDB: Corrupt database"), + N_( "TDB: IO Error"), + N_( "TDB: Locking error"), + N_( "TDB: Out of memory"), + N_( "TDB: Record exists"), + N_( "TDB: Lock exists on other keys"), + N_( "TDB: Invalid parameter"), + N_( "TDB: Record does not exist"), + N_( "TDB: Write not permitted"), + N_( "Ext2fs directory block list is empty"), + N_( "Attempt to modify a block mapping via a read-only block iterator"), + N_( "Wrong magic number for ext4 extent saved path"), + N_( "Wrong magic number for 64-bit generic bitmap"), + N_( "Wrong magic number for 64-bit block bitmap"), + N_( "Wrong magic number for 64-bit inode bitmap"), + N_( "Wrong magic number --- RESERVED_13"), + N_( "Wrong magic number --- RESERVED_14"), + N_( "Wrong magic number --- RESERVED_15"), + N_( "Wrong magic number --- RESERVED_16"), + N_( "Wrong magic number --- RESERVED_17"), + N_( "Wrong magic number --- RESERVED_18"), + N_( "Wrong magic number --- RESERVED_19"), + N_( "Corrupt extent header"), + N_( "Corrupt extent index"), + N_( "Corrupt extent"), + N_( "No free space in extent map"), + N_( "Inode does not use extents"), + N_( "No 'next' extent"), + N_( "No 'previous' extent"), + N_( "No 'up' extent"), + N_( "No 'down' extent"), + N_( "No current node"), + N_( "Ext2fs operation not supported"), + N_( "No room to insert extent in node"), + N_( "Splitting would result in empty node"), + N_( "Extent not found"), + N_( "Operation not supported for inodes containing extents"), + N_( "Extent length is invalid"), + N_( "I/O Channel does not support 64-bit block numbers"), + N_( "Can't check if filesystem is mounted due to missing mtab file"), + N_( "Filesystem too large to use legacy bitmaps"), + N_( "MMP: invalid magic number"), + N_( "MMP: device currently active"), + N_( "MMP: fsck being run"), + N_( "MMP: block number beyond filesystem range"), + N_( "MMP: undergoing an unknown operation"), + N_( "MMP: filesystem still in use"), + N_( "MMP: open with O_DIRECT failed"), + N_( "Block group descriptor size incorrect"), + N_( "Inode checksum does not match inode"), + N_( "Inode bitmap checksum does not match bitmap"), + N_( "Extent block checksum does not match extent block"), + N_( "Directory block does not have space for checksum"), + N_( "Directory block checksum does not match directory block"), + N_( "Extended attribute block checksum does not match block"), + N_( "Superblock checksum does not match superblock"), + N_( "Unknown checksum algorithm"), + N_( "MMP block checksum does not match MMP block"), + N_( "Ext2 file already exists"), + 0 +}; + +struct error_table { + char const * const * msgs; + long base; + int n_msgs; +}; +struct et_list { + struct et_list *next; + const struct error_table * table; +}; +extern struct et_list *_et_list; + +const struct error_table et_ext2_error_table = { text, 2133571328L, 156 }; + +static struct et_list link = { 0, 0 }; + +void initialize_ext2_error_table_r(struct et_list **list); +void initialize_ext2_error_table(void); + +void initialize_ext2_error_table(void) { + initialize_ext2_error_table_r(&_et_list); +} + +/* For Heimdal compatibility */ +void initialize_ext2_error_table_r(struct et_list **list) +{ + struct et_list *et, **end; + + for (end = list, et = *list; et; end = &et->next, et = et->next) + if (et->table->msgs == text) + return; + et = malloc(sizeof(struct et_list)); + if (et == 0) { + if (!link.table) + et = &link; + else + return; + } + et->table = &et_ext2_error_table; + et->next = 0; + *end = et; +} diff --git a/lib/ext2fs/ext2_err.h b/lib/ext2fs/ext2_err.h new file mode 100644 index 00000000..70224181 --- /dev/null +++ b/lib/ext2fs/ext2_err.h @@ -0,0 +1,174 @@ +/* + * ext2_err.h: + * This file is automatically generated; please do not edit it. + */ + +#include <et/com_err.h> + +#define EXT2_ET_BASE (2133571328L) +#define EXT2_ET_MAGIC_EXT2FS_FILSYS (2133571329L) +#define EXT2_ET_MAGIC_BADBLOCKS_LIST (2133571330L) +#define EXT2_ET_MAGIC_BADBLOCKS_ITERATE (2133571331L) +#define EXT2_ET_MAGIC_INODE_SCAN (2133571332L) +#define EXT2_ET_MAGIC_IO_CHANNEL (2133571333L) +#define EXT2_ET_MAGIC_UNIX_IO_CHANNEL (2133571334L) +#define EXT2_ET_MAGIC_IO_MANAGER (2133571335L) +#define EXT2_ET_MAGIC_BLOCK_BITMAP (2133571336L) +#define EXT2_ET_MAGIC_INODE_BITMAP (2133571337L) +#define EXT2_ET_MAGIC_GENERIC_BITMAP (2133571338L) +#define EXT2_ET_MAGIC_TEST_IO_CHANNEL (2133571339L) +#define EXT2_ET_MAGIC_DBLIST (2133571340L) +#define EXT2_ET_MAGIC_ICOUNT (2133571341L) +#define EXT2_ET_MAGIC_PQ_IO_CHANNEL (2133571342L) +#define EXT2_ET_MAGIC_EXT2_FILE (2133571343L) +#define EXT2_ET_MAGIC_E2IMAGE (2133571344L) +#define EXT2_ET_MAGIC_INODE_IO_CHANNEL (2133571345L) +#define EXT2_ET_MAGIC_EXTENT_HANDLE (2133571346L) +#define EXT2_ET_BAD_MAGIC (2133571347L) +#define EXT2_ET_REV_TOO_HIGH (2133571348L) +#define EXT2_ET_RO_FILSYS (2133571349L) +#define EXT2_ET_GDESC_READ (2133571350L) +#define EXT2_ET_GDESC_WRITE (2133571351L) +#define EXT2_ET_GDESC_BAD_BLOCK_MAP (2133571352L) +#define EXT2_ET_GDESC_BAD_INODE_MAP (2133571353L) +#define EXT2_ET_GDESC_BAD_INODE_TABLE (2133571354L) +#define EXT2_ET_INODE_BITMAP_WRITE (2133571355L) +#define EXT2_ET_INODE_BITMAP_READ (2133571356L) +#define EXT2_ET_BLOCK_BITMAP_WRITE (2133571357L) +#define EXT2_ET_BLOCK_BITMAP_READ (2133571358L) +#define EXT2_ET_INODE_TABLE_WRITE (2133571359L) +#define EXT2_ET_INODE_TABLE_READ (2133571360L) +#define EXT2_ET_NEXT_INODE_READ (2133571361L) +#define EXT2_ET_UNEXPECTED_BLOCK_SIZE (2133571362L) +#define EXT2_ET_DIR_CORRUPTED (2133571363L) +#define EXT2_ET_SHORT_READ (2133571364L) +#define EXT2_ET_SHORT_WRITE (2133571365L) +#define EXT2_ET_DIR_NO_SPACE (2133571366L) +#define EXT2_ET_NO_INODE_BITMAP (2133571367L) +#define EXT2_ET_NO_BLOCK_BITMAP (2133571368L) +#define EXT2_ET_BAD_INODE_NUM (2133571369L) +#define EXT2_ET_BAD_BLOCK_NUM (2133571370L) +#define EXT2_ET_EXPAND_DIR_ERR (2133571371L) +#define EXT2_ET_TOOSMALL (2133571372L) +#define EXT2_ET_BAD_BLOCK_MARK (2133571373L) +#define EXT2_ET_BAD_BLOCK_UNMARK (2133571374L) +#define EXT2_ET_BAD_BLOCK_TEST (2133571375L) +#define EXT2_ET_BAD_INODE_MARK (2133571376L) +#define EXT2_ET_BAD_INODE_UNMARK (2133571377L) +#define EXT2_ET_BAD_INODE_TEST (2133571378L) +#define EXT2_ET_FUDGE_BLOCK_BITMAP_END (2133571379L) +#define EXT2_ET_FUDGE_INODE_BITMAP_END (2133571380L) +#define EXT2_ET_BAD_IND_BLOCK (2133571381L) +#define EXT2_ET_BAD_DIND_BLOCK (2133571382L) +#define EXT2_ET_BAD_TIND_BLOCK (2133571383L) +#define EXT2_ET_NEQ_BLOCK_BITMAP (2133571384L) +#define EXT2_ET_NEQ_INODE_BITMAP (2133571385L) +#define EXT2_ET_BAD_DEVICE_NAME (2133571386L) +#define EXT2_ET_MISSING_INODE_TABLE (2133571387L) +#define EXT2_ET_CORRUPT_SUPERBLOCK (2133571388L) +#define EXT2_ET_BAD_GENERIC_MARK (2133571389L) +#define EXT2_ET_BAD_GENERIC_UNMARK (2133571390L) +#define EXT2_ET_BAD_GENERIC_TEST (2133571391L) +#define EXT2_ET_SYMLINK_LOOP (2133571392L) +#define EXT2_ET_CALLBACK_NOTHANDLED (2133571393L) +#define EXT2_ET_BAD_BLOCK_IN_INODE_TABLE (2133571394L) +#define EXT2_ET_UNSUPP_FEATURE (2133571395L) +#define EXT2_ET_RO_UNSUPP_FEATURE (2133571396L) +#define EXT2_ET_LLSEEK_FAILED (2133571397L) +#define EXT2_ET_NO_MEMORY (2133571398L) +#define EXT2_ET_INVALID_ARGUMENT (2133571399L) +#define EXT2_ET_BLOCK_ALLOC_FAIL (2133571400L) +#define EXT2_ET_INODE_ALLOC_FAIL (2133571401L) +#define EXT2_ET_NO_DIRECTORY (2133571402L) +#define EXT2_ET_TOO_MANY_REFS (2133571403L) +#define EXT2_ET_FILE_NOT_FOUND (2133571404L) +#define EXT2_ET_FILE_RO (2133571405L) +#define EXT2_ET_DB_NOT_FOUND (2133571406L) +#define EXT2_ET_DIR_EXISTS (2133571407L) +#define EXT2_ET_UNIMPLEMENTED (2133571408L) +#define EXT2_ET_CANCEL_REQUESTED (2133571409L) +#define EXT2_ET_FILE_TOO_BIG (2133571410L) +#define EXT2_ET_JOURNAL_NOT_BLOCK (2133571411L) +#define EXT2_ET_NO_JOURNAL_SB (2133571412L) +#define EXT2_ET_JOURNAL_TOO_SMALL (2133571413L) +#define EXT2_ET_JOURNAL_UNSUPP_VERSION (2133571414L) +#define EXT2_ET_LOAD_EXT_JOURNAL (2133571415L) +#define EXT2_ET_NO_JOURNAL (2133571416L) +#define EXT2_ET_DIRHASH_UNSUPP (2133571417L) +#define EXT2_ET_BAD_EA_BLOCK_NUM (2133571418L) +#define EXT2_ET_TOO_MANY_INODES (2133571419L) +#define EXT2_ET_NOT_IMAGE_FILE (2133571420L) +#define EXT2_ET_RES_GDT_BLOCKS (2133571421L) +#define EXT2_ET_RESIZE_INODE_CORRUPT (2133571422L) +#define EXT2_ET_SET_BMAP_NO_IND (2133571423L) +#define EXT2_ET_TDB_SUCCESS (2133571424L) +#define EXT2_ET_TDB_ERR_CORRUPT (2133571425L) +#define EXT2_ET_TDB_ERR_IO (2133571426L) +#define EXT2_ET_TDB_ERR_LOCK (2133571427L) +#define EXT2_ET_TDB_ERR_OOM (2133571428L) +#define EXT2_ET_TDB_ERR_EXISTS (2133571429L) +#define EXT2_ET_TDB_ERR_NOLOCK (2133571430L) +#define EXT2_ET_TDB_ERR_EINVAL (2133571431L) +#define EXT2_ET_TDB_ERR_NOEXIST (2133571432L) +#define EXT2_ET_TDB_ERR_RDONLY (2133571433L) +#define EXT2_ET_DBLIST_EMPTY (2133571434L) +#define EXT2_ET_RO_BLOCK_ITERATE (2133571435L) +#define EXT2_ET_MAGIC_EXTENT_PATH (2133571436L) +#define EXT2_ET_MAGIC_GENERIC_BITMAP64 (2133571437L) +#define EXT2_ET_MAGIC_BLOCK_BITMAP64 (2133571438L) +#define EXT2_ET_MAGIC_INODE_BITMAP64 (2133571439L) +#define EXT2_ET_MAGIC_RESERVED_13 (2133571440L) +#define EXT2_ET_MAGIC_RESERVED_14 (2133571441L) +#define EXT2_ET_MAGIC_RESERVED_15 (2133571442L) +#define EXT2_ET_MAGIC_RESERVED_16 (2133571443L) +#define EXT2_ET_MAGIC_RESERVED_17 (2133571444L) +#define EXT2_ET_MAGIC_RESERVED_18 (2133571445L) +#define EXT2_ET_MAGIC_RESERVED_19 (2133571446L) +#define EXT2_ET_EXTENT_HEADER_BAD (2133571447L) +#define EXT2_ET_EXTENT_INDEX_BAD (2133571448L) +#define EXT2_ET_EXTENT_LEAF_BAD (2133571449L) +#define EXT2_ET_EXTENT_NO_SPACE (2133571450L) +#define EXT2_ET_INODE_NOT_EXTENT (2133571451L) +#define EXT2_ET_EXTENT_NO_NEXT (2133571452L) +#define EXT2_ET_EXTENT_NO_PREV (2133571453L) +#define EXT2_ET_EXTENT_NO_UP (2133571454L) +#define EXT2_ET_EXTENT_NO_DOWN (2133571455L) +#define EXT2_ET_NO_CURRENT_NODE (2133571456L) +#define EXT2_ET_OP_NOT_SUPPORTED (2133571457L) +#define EXT2_ET_CANT_INSERT_EXTENT (2133571458L) +#define EXT2_ET_CANT_SPLIT_EXTENT (2133571459L) +#define EXT2_ET_EXTENT_NOT_FOUND (2133571460L) +#define EXT2_ET_EXTENT_NOT_SUPPORTED (2133571461L) +#define EXT2_ET_EXTENT_INVALID_LENGTH (2133571462L) +#define EXT2_ET_IO_CHANNEL_NO_SUPPORT_64 (2133571463L) +#define EXT2_ET_NO_MTAB_FILE (2133571464L) +#define EXT2_ET_CANT_USE_LEGACY_BITMAPS (2133571465L) +#define EXT2_ET_MMP_MAGIC_INVALID (2133571466L) +#define EXT2_ET_MMP_FAILED (2133571467L) +#define EXT2_ET_MMP_FSCK_ON (2133571468L) +#define EXT2_ET_MMP_BAD_BLOCK (2133571469L) +#define EXT2_ET_MMP_UNKNOWN_SEQ (2133571470L) +#define EXT2_ET_MMP_CHANGE_ABORT (2133571471L) +#define EXT2_ET_MMP_OPEN_DIRECT (2133571472L) +#define EXT2_ET_BAD_DESC_SIZE (2133571473L) +#define EXT2_ET_INODE_CSUM_INVALID (2133571474L) +#define EXT2_ET_INODE_BITMAP_CSUM_INVALID (2133571475L) +#define EXT2_ET_EXTENT_CSUM_INVALID (2133571476L) +#define EXT2_ET_DIR_NO_SPACE_FOR_CSUM (2133571477L) +#define EXT2_ET_DIR_CSUM_INVALID (2133571478L) +#define EXT2_ET_EXT_ATTR_CSUM_INVALID (2133571479L) +#define EXT2_ET_SB_CSUM_INVALID (2133571480L) +#define EXT2_ET_UNKNOWN_CSUM (2133571481L) +#define EXT2_ET_MMP_CSUM_INVALID (2133571482L) +#define EXT2_ET_FILE_EXISTS (2133571483L) +extern const struct error_table et_ext2_error_table; +extern void initialize_ext2_error_table(void); + +/* For compatibility with Heimdal */ +extern void initialize_ext2_error_table_r(struct et_list **list); + +#define ERROR_TABLE_BASE_ext2 (2133571328L) + +/* for compatibility with older versions... */ +#define init_ext2_err_tbl initialize_ext2_error_table +#define ext2_err_base ERROR_TABLE_BASE_ext2 diff --git a/lib/ext2fs/ext2_types.h b/lib/ext2fs/ext2_types.h new file mode 100644 index 00000000..18d4f9bd --- /dev/null +++ b/lib/ext2fs/ext2_types.h @@ -0,0 +1,137 @@ +/* + * If linux/types.h is already been included, assume it has defined + * everything we need. (cross fingers) Other header files may have + * also defined the types that we need. + */ +#if (!defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \ + !defined(_EXT2_TYPES_H)) +#define _EXT2_TYPES_H + + +#ifdef __U8_TYPEDEF +typedef __U8_TYPEDEF __u8; +#else +typedef unsigned char __u8; +#endif + +#ifdef __S8_TYPEDEF +typedef __S8_TYPEDEF __s8; +#else +typedef signed char __s8; +#endif + +#ifdef __U16_TYPEDEF +typedef __U16_TYPEDEF __u16; +#else +#if (4 == 2) +typedef unsigned int __u16; +#else +#if (2 == 2) +typedef unsigned short __u16; +#else + ?==error: undefined 16 bit type +#endif /* SIZEOF_SHORT == 2 */ +#endif /* SIZEOF_INT == 2 */ +#endif /* __U16_TYPEDEF */ + +#ifdef __S16_TYPEDEF +typedef __S16_TYPEDEF __s16; +#else +#if (4 == 2) +typedef int __s16; +#else +#if (2 == 2) +typedef short __s16; +#else + ?==error: undefined 16 bit type +#endif /* SIZEOF_SHORT == 2 */ +#endif /* SIZEOF_INT == 2 */ +#endif /* __S16_TYPEDEF */ + + +#ifdef __U32_TYPEDEF +typedef __U32_TYPEDEF __u32; +#else +#if (4 == 4) +typedef unsigned int __u32; +#else +#if (4 == 4) +typedef unsigned long __u32; +#else +#if (2 == 4) +typedef unsigned short __u32; +#else + ?== error: undefined 32 bit type +#endif /* SIZEOF_SHORT == 4 */ +#endif /* SIZEOF_LONG == 4 */ +#endif /* SIZEOF_INT == 4 */ +#endif /* __U32_TYPEDEF */ + +#ifdef __S32_TYPEDEF +typedef __S32_TYPEDEF __s32; +#else +#if (4 == 4) +typedef int __s32; +#else +#if (4 == 4) +typedef long __s32; +#else +#if (2 == 4) +typedef short __s32; +#else + ?== error: undefined 32 bit type +#endif /* SIZEOF_SHORT == 4 */ +#endif /* SIZEOF_LONG == 4 */ +#endif /* SIZEOF_INT == 4 */ +#endif /* __S32_TYPEDEF */ + +#ifdef __U64_TYPEDEF +typedef __U64_TYPEDEF __u64; +#else +#if (4 == 8) +typedef unsigned int __u64; +#else +#if (8 == 8) +typedef unsigned long long __u64; +#else +#if (4 == 8) +typedef unsigned long __u64; +#endif /* SIZEOF_LONG_LONG == 8 */ +#endif /* SIZEOF_LONG == 8 */ +#endif /* SIZEOF_INT == 8 */ +#endif /* __U64_TYPEDEF */ + +#ifdef __S64_TYPEDEF +typedef __S64_TYPEDEF __s64; +#else +#if (4 == 8) +typedef int __s64; +#else +#if (8 == 8) +#if defined(__GNUC__) +typedef __signed__ long long __s64; +#else +typedef signed long long __s64; +#endif /* __GNUC__ */ +#else +#if (4 == 8) +typedef long __s64; +#endif /* SIZEOF_LONG_LONG == 8 */ +#endif /* SIZEOF_LONG == 8 */ +#endif /* SIZEOF_INT == 8 */ +#endif /* __S64_TYPEDEF */ + +#undef __S8_TYPEDEF +#undef __U8_TYPEDEF +#undef __S16_TYPEDEF +#undef __U16_TYPEDEF +#undef __S32_TYPEDEF +#undef __U32_TYPEDEF +#undef __S64_TYPEDEF +#undef __U64_TYPEDEF + +#endif /* _*_TYPES_H */ + +/* These defines are needed for the public ext2fs.h header file */ +#define HAVE_SYS_TYPES_H 1 +#undef WORDS_BIGENDIAN diff --git a/lib/ext2fs/ext_attr.c b/lib/ext2fs/ext_attr.c index 1889824c..ddcc89f7 100644 --- a/lib/ext2fs/ext_attr.c +++ b/lib/ext2fs/ext_attr.c @@ -11,7 +11,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/ext2fs/extent.c b/lib/ext2fs/extent.c index 5cdc2e49..fc6c95b8 100644 --- a/lib/ext2fs/extent.c +++ b/lib/ext2fs/extent.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/fileio.c b/lib/ext2fs/fileio.c index 5a39c321..2e1b6824 100644 --- a/lib/ext2fs/fileio.c +++ b/lib/ext2fs/fileio.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/finddev.c b/lib/ext2fs/finddev.c index 311608de..88eb5cee 100644 --- a/lib/ext2fs/finddev.c +++ b/lib/ext2fs/finddev.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/flushb.c b/lib/ext2fs/flushb.c index 98821fc7..c4406fd1 100644 --- a/lib/ext2fs/flushb.c +++ b/lib/ext2fs/flushb.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_ERRNO_H #include <errno.h> diff --git a/lib/ext2fs/freefs.c b/lib/ext2fs/freefs.c index 1ad2d916..1e01ef5f 100644 --- a/lib/ext2fs/freefs.c +++ b/lib/ext2fs/freefs.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/ext2fs/gen_bitmap.c b/lib/ext2fs/gen_bitmap.c index 0bff8546..e4362345 100644 --- a/lib/ext2fs/gen_bitmap.c +++ b/lib/ext2fs/gen_bitmap.c @@ -10,7 +10,6 @@ */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c index 9ba77017..7f49fd9d 100644 --- a/lib/ext2fs/gen_bitmap64.c +++ b/lib/ext2fs/gen_bitmap64.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/get_pathname.c b/lib/ext2fs/get_pathname.c index 52aea624..93a9ec81 100644 --- a/lib/ext2fs/get_pathname.c +++ b/lib/ext2fs/get_pathname.c @@ -21,7 +21,6 @@ * */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/getsectsize.c b/lib/ext2fs/getsectsize.c index 9c3f4a2e..c7ae6594 100644 --- a/lib/ext2fs/getsectsize.c +++ b/lib/ext2fs/getsectsize.c @@ -13,7 +13,6 @@ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/ext2fs/getsize.c b/lib/ext2fs/getsize.c index a9a4812e..2f4495ed 100644 --- a/lib/ext2fs/getsize.c +++ b/lib/ext2fs/getsize.c @@ -15,7 +15,6 @@ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/ext2fs/i_block.c b/lib/ext2fs/i_block.c index 5ca57e49..f36c3c47 100644 --- a/lib/ext2fs/i_block.c +++ b/lib/ext2fs/i_block.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/ext2fs/icount.c b/lib/ext2fs/icount.c index c5ebf744..f99824f8 100644 --- a/lib/ext2fs/icount.c +++ b/lib/ext2fs/icount.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #if HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/lib/ext2fs/imager.c b/lib/ext2fs/imager.c index 378a3c88..5c7003a6 100644 --- a/lib/ext2fs/imager.c +++ b/lib/ext2fs/imager.c @@ -13,7 +13,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/ind_block.c b/lib/ext2fs/ind_block.c index aa82ae6b..722d3bdc 100644 --- a/lib/ext2fs/ind_block.c +++ b/lib/ext2fs/ind_block.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/initialize.c b/lib/ext2fs/initialize.c index 2db8b3c2..a57ffcb5 100644 --- a/lib/ext2fs/initialize.c +++ b/lib/ext2fs/initialize.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/inline.c b/lib/ext2fs/inline.c index 05da1f79..4d0f4ad1 100644 --- a/lib/ext2fs/inline.c +++ b/lib/ext2fs/inline.c @@ -15,7 +15,6 @@ #define _XOPEN_SOURCE 600 /* for posix_memalign() */ #endif -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H @@ -29,7 +28,7 @@ #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include <malloc.h> #endif diff --git a/lib/ext2fs/inode.c b/lib/ext2fs/inode.c index 573a8fa5..d0b528cf 100644 --- a/lib/ext2fs/inode.c +++ b/lib/ext2fs/inode.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/inode_io.c b/lib/ext2fs/inode_io.c index 8e0944ef..ced32448 100644 --- a/lib/ext2fs/inode_io.c +++ b/lib/ext2fs/inode_io.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/io_manager.c b/lib/ext2fs/io_manager.c index 34e48592..116f2aea 100644 --- a/lib/ext2fs/io_manager.c +++ b/lib/ext2fs/io_manager.c @@ -2,7 +2,6 @@ * io_manager.c --- the I/O manager abstraction */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/irel_ma.c b/lib/ext2fs/irel_ma.c index c64b7e76..b0557906 100644 --- a/lib/ext2fs/irel_ma.c +++ b/lib/ext2fs/irel_ma.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <fcntl.h> #include <stdio.h> #include <string.h> diff --git a/lib/ext2fs/ismounted.c b/lib/ext2fs/ismounted.c index 6c6ecff0..db80c460 100644 --- a/lib/ext2fs/ismounted.c +++ b/lib/ext2fs/ismounted.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/ext2fs/link.c b/lib/ext2fs/link.c index bf3c859a..8c5553c9 100644 --- a/lib/ext2fs/link.c +++ b/lib/ext2fs/link.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/llseek.c b/lib/ext2fs/llseek.c index c3a98a2c..774d1d4d 100644 --- a/lib/ext2fs/llseek.c +++ b/lib/ext2fs/llseek.c @@ -12,7 +12,6 @@ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE -#include "config.h" #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif diff --git a/lib/ext2fs/lookup.c b/lib/ext2fs/lookup.c index 0e66e712..97aa0887 100644 --- a/lib/ext2fs/lookup.c +++ b/lib/ext2fs/lookup.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/mkdir.c b/lib/ext2fs/mkdir.c index b12bf2dd..9b6b7996 100644 --- a/lib/ext2fs/mkdir.c +++ b/lib/ext2fs/mkdir.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/mkjournal.c b/lib/ext2fs/mkjournal.c index d09c4589..02ffb97c 100644 --- a/lib/ext2fs/mkjournal.c +++ b/lib/ext2fs/mkjournal.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/mmp.c b/lib/ext2fs/mmp.c index e4c7dccd..a9eae504 100644 --- a/lib/ext2fs/mmp.c +++ b/lib/ext2fs/mmp.c @@ -13,7 +13,6 @@ #define _GNU_SOURCE #endif -#include "config.h" #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/ext2fs/namei.c b/lib/ext2fs/namei.c index 307aecc8..dd710b89 100644 --- a/lib/ext2fs/namei.c +++ b/lib/ext2fs/namei.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/native.c b/lib/ext2fs/native.c index ba3e0c8e..c71a95ee 100644 --- a/lib/ext2fs/native.c +++ b/lib/ext2fs/native.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include "ext2_fs.h" diff --git a/lib/ext2fs/newdir.c b/lib/ext2fs/newdir.c index 3e2c0dbe..bccaecdb 100644 --- a/lib/ext2fs/newdir.c +++ b/lib/ext2fs/newdir.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/nt_io.c b/lib/ext2fs/nt_io.c index 0f10543a..a29e1d49 100644 --- a/lib/ext2fs/nt_io.c +++ b/lib/ext2fs/nt_io.c @@ -13,7 +13,6 @@ */ #ifdef HAVE_CONFIG_H -#include "config.h" #endif diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c index 4cdbde16..45b3627e 100644 --- a/lib/ext2fs/openfs.c +++ b/lib/ext2fs/openfs.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/progress.c b/lib/ext2fs/progress.c index 8c9a6f1d..ad6a3d4d 100644 --- a/lib/ext2fs/progress.c +++ b/lib/ext2fs/progress.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include "ext2fs.h" #include "ext2fsP.h" diff --git a/lib/ext2fs/punch.c b/lib/ext2fs/punch.c index 25d79532..adfcdecb 100644 --- a/lib/ext2fs/punch.c +++ b/lib/ext2fs/punch.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/qcow2.c b/lib/ext2fs/qcow2.c index 547edc02..9d56ae58 100644 --- a/lib/ext2fs/qcow2.c +++ b/lib/ext2fs/qcow2.c @@ -26,7 +26,6 @@ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE -#include "config.h" #include <fcntl.h> #include <grp.h> #include <pwd.h> diff --git a/lib/ext2fs/read_bb.c b/lib/ext2fs/read_bb.c index b5a0d7b4..e5d63227 100644 --- a/lib/ext2fs/read_bb.c +++ b/lib/ext2fs/read_bb.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/read_bb_file.c b/lib/ext2fs/read_bb_file.c index 8d1ad1a5..89c567bb 100644 --- a/lib/ext2fs/read_bb_file.c +++ b/lib/ext2fs/read_bb_file.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/res_gdt.c b/lib/ext2fs/res_gdt.c index 6449228c..acce650d 100644 --- a/lib/ext2fs/res_gdt.c +++ b/lib/ext2fs/res_gdt.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #include <time.h> diff --git a/lib/ext2fs/rw_bitmaps.c b/lib/ext2fs/rw_bitmaps.c index b7d65a9d..eacf86a5 100644 --- a/lib/ext2fs/rw_bitmaps.c +++ b/lib/ext2fs/rw_bitmaps.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c index 56c66cc4..46d60ef4 100644 --- a/lib/ext2fs/swapfs.c +++ b/lib/ext2fs/swapfs.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/ext2fs/symlink.c b/lib/ext2fs/symlink.c index ad804441..4478dffe 100644 --- a/lib/ext2fs/symlink.c +++ b/lib/ext2fs/symlink.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/tdb.c b/lib/ext2fs/tdb.c index 61e30ed2..869c4057 100644 --- a/lib/ext2fs/tdb.c +++ b/lib/ext2fs/tdb.c @@ -38,7 +38,6 @@ Last Changed Date: 2007-06-22 13:36:10 -0400 (Fri, 22 Jun 2007) #endif #define _XOPEN_SOURCE 600 -#include "config.h" #include <unistd.h> #include <stdio.h> #include <stdlib.h> diff --git a/lib/ext2fs/tdbtool.c b/lib/ext2fs/tdbtool.c index eeac0c87..130fc588 100644 --- a/lib/ext2fs/tdbtool.c +++ b/lib/ext2fs/tdbtool.c @@ -21,7 +21,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "config.h" #include <errno.h> #include <stdlib.h> #include <stdio.h> diff --git a/lib/ext2fs/test_io.c b/lib/ext2fs/test_io.c index cac67219..d79c6d58 100644 --- a/lib/ext2fs/test_io.c +++ b/lib/ext2fs/test_io.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #if HAVE_SECURE_GETENV #define _GNU_SOURCE #endif diff --git a/lib/ext2fs/tst_badblocks.c b/lib/ext2fs/tst_badblocks.c index 3b39ef13..717b95b9 100644 --- a/lib/ext2fs/tst_badblocks.c +++ b/lib/ext2fs/tst_badblocks.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/tst_bitmaps.c b/lib/ext2fs/tst_bitmaps.c index 57bfd6c8..d433e77d 100644 --- a/lib/ext2fs/tst_bitmaps.c +++ b/lib/ext2fs/tst_bitmaps.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <unistd.h> #include <stdlib.h> #include <stdio.h> diff --git a/lib/ext2fs/tst_bitops.c b/lib/ext2fs/tst_bitops.c index ed71447c..b64735cd 100644 --- a/lib/ext2fs/tst_bitops.c +++ b/lib/ext2fs/tst_bitops.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/tst_byteswap.c b/lib/ext2fs/tst_byteswap.c index c500cae3..d0f2ee42 100644 --- a/lib/ext2fs/tst_byteswap.c +++ b/lib/ext2fs/tst_byteswap.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/tst_getsectsize.c b/lib/ext2fs/tst_getsectsize.c index a6b234e0..5591b5d3 100644 --- a/lib/ext2fs/tst_getsectsize.c +++ b/lib/ext2fs/tst_getsectsize.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/tst_getsize.c b/lib/ext2fs/tst_getsize.c index 4ac2ea1f..9a578fab 100644 --- a/lib/ext2fs/tst_getsize.c +++ b/lib/ext2fs/tst_getsize.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/tst_inode_size.c b/lib/ext2fs/tst_inode_size.c index e20ec981..3f0ab82c 100644 --- a/lib/ext2fs/tst_inode_size.c +++ b/lib/ext2fs/tst_inode_size.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/lib/ext2fs/tst_iscan.c b/lib/ext2fs/tst_iscan.c index 70bfbecc..efeeb772 100644 --- a/lib/ext2fs/tst_iscan.c +++ b/lib/ext2fs/tst_iscan.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/tst_super_size.c b/lib/ext2fs/tst_super_size.c index 85d87e12..eef5a630 100644 --- a/lib/ext2fs/tst_super_size.c +++ b/lib/ext2fs/tst_super_size.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> diff --git a/lib/ext2fs/tst_types.c b/lib/ext2fs/tst_types.c index 3e411288..5274984c 100644 --- a/lib/ext2fs/tst_types.c +++ b/lib/ext2fs/tst_types.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> diff --git a/lib/ext2fs/undo_io.c b/lib/ext2fs/undo_io.c index 56b0eeb5..df55abf3 100644 --- a/lib/ext2fs/undo_io.c +++ b/lib/ext2fs/undo_io.c @@ -14,7 +14,6 @@ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c index 19be6308..419564fe 100644 --- a/lib/ext2fs/unix_io.c +++ b/lib/ext2fs/unix_io.c @@ -21,7 +21,6 @@ #define _GNU_SOURCE #endif -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/unlink.c b/lib/ext2fs/unlink.c index d2d31cc4..7ffeb9e8 100644 --- a/lib/ext2fs/unlink.c +++ b/lib/ext2fs/unlink.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #if HAVE_UNISTD_H diff --git a/lib/ext2fs/valid_blk.c b/lib/ext2fs/valid_blk.c index 895e36ef..7c3defc7 100644 --- a/lib/ext2fs/valid_blk.c +++ b/lib/ext2fs/valid_blk.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/lib/ext2fs/version.c b/lib/ext2fs/version.c index f8c8acfc..ab406fea 100644 --- a/lib/ext2fs/version.c +++ b/lib/ext2fs/version.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #if HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/lib/ext2fs/write_bb_file.c b/lib/ext2fs/write_bb_file.c index 58343408..70bcf08e 100644 --- a/lib/ext2fs/write_bb_file.c +++ b/lib/ext2fs/write_bb_file.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include "ext2_fs.h" diff --git a/lib/fpopen.c b/lib/fpopen.c index 60af2086..0df25e4e 100644 --- a/lib/fpopen.c +++ b/lib/fpopen.c @@ -21,7 +21,6 @@ * USE OF THIS SOFTWARE. */ -#include "config.h" #include <unistd.h> #include <stdlib.h> #include <stdio.h> diff --git a/lib/quota/Android.mk b/lib/quota/Android.mk new file mode 100644 index 00000000..8d0bfc32 --- /dev/null +++ b/lib/quota/Android.mk @@ -0,0 +1,61 @@ +LOCAL_PATH := $(call my-dir) + +libext2_quota_src_files := \ + mkquota.c \ + quotaio.c \ + quotaio_tree.c \ + quotaio_v2.c \ + ../../e2fsck/dict.c + +libext2_quota_c_includes := external/e2fsprogs/lib + +libext2_quota_cflags := -O2 -g -W -Wall \ + -DHAVE_UNISTD_H \ + -DHAVE_ERRNO_H \ + -DHAVE_NETINET_IN_H \ + -DHAVE_SYS_IOCTL_H \ + -DHAVE_SYS_MMAN_H \ + -DHAVE_SYS_MOUNT_H \ + -DHAVE_SYS_PRCTL_H \ + -DHAVE_SYS_RESOURCE_H \ + -DHAVE_SYS_SELECT_H \ + -DHAVE_SYS_STAT_H \ + -DHAVE_SYS_TYPES_H \ + -DHAVE_STDLIB_H \ + -DHAVE_STRDUP \ + -DHAVE_MMAP \ + -DHAVE_UTIME_H \ + -DHAVE_GETPAGESIZE \ + -DHAVE_LSEEK64 \ + -DHAVE_LSEEK64_PROTOTYPE \ + -DHAVE_EXT2_IOCTLS \ + -DHAVE_LINUX_FD_H \ + -DHAVE_TYPE_SSIZE_T \ + -DHAVE_SYS_TIME_H \ + -DHAVE_SYS_PARAM_H \ + -DHAVE_SYSCONF + +libext2_quota_shared_libraries := libext2fs libext2_com_err + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(libext2_quota_src_files) +LOCAL_C_INCLUDES := $(libext2_quota_c_includes) +LOCAL_CFLAGS := $(libext2_quota_cflags) +LOCAL_SYSTEM_SHARED_LIBRARIES := libc $(libext2_quota_shared_libraries) +LOCAL_PRELINK_MODULE := false +LOCAL_MODULE := libext2_quota +LOCAL_MODULE_TAGS := optional + +include $(BUILD_SHARED_LIBRARY) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(libext2_quota_src_files) +LOCAL_C_INCLUDES := $(libext2_quota_c_includes) +LOCAL_CFLAGS := $(libext2_quota_cflags) +LOCAL_MODULE := libext2_quota_host +LOCAL_MODULE_TAGS := optional +LOCAL_SHARED_LIBRARIES := $(addsuffix _host, $(libext2_quota_shared_libraries)) + +include $(BUILD_HOST_SHARED_LIBRARY) diff --git a/lib/quota/mkquota.c b/lib/quota/mkquota.c index 3aa81003..46e17b6c 100644 --- a/lib/quota/mkquota.c +++ b/lib/quota/mkquota.c @@ -3,7 +3,6 @@ * * Aditya Kali <adityakali@google.com> */ -#include "config.h" #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> diff --git a/lib/quota/quotaio.c b/lib/quota/quotaio.c index 1bdcba6c..b518bc86 100644 --- a/lib/quota/quotaio.c +++ b/lib/quota/quotaio.c @@ -5,7 +5,6 @@ * Aditya Kali <adityakali@google.com> - Ported to e2fsprogs */ -#include "config.h" #include <stdio.h> #include <errno.h> #include <string.h> diff --git a/lib/quota/quotaio_tree.c b/lib/quota/quotaio_tree.c index c1653a39..964494d1 100644 --- a/lib/quota/quotaio_tree.c +++ b/lib/quota/quotaio_tree.c @@ -4,7 +4,6 @@ * Jan Kara <jack@suse.cz> - sponsored by SuSE CR */ -#include "config.h" #include <sys/types.h> #include <errno.h> #include <stdio.h> diff --git a/lib/quota/quotaio_v2.c b/lib/quota/quotaio_v2.c index e7bf29c3..de53e7d4 100644 --- a/lib/quota/quotaio_v2.c +++ b/lib/quota/quotaio_v2.c @@ -4,7 +4,6 @@ * Jan Kara <jack@suse.cz> - sponsored by SuSE CR */ -#include "config.h" #include <sys/types.h> #include <errno.h> #include <stdio.h> diff --git a/lib/ss/data.c b/lib/ss/data.c index 80d1b295..8f7cda59 100644 --- a/lib/ss/data.c +++ b/lib/ss/data.c @@ -12,7 +12,6 @@ * express or implied warranty. */ -#include "config.h" #include <stdio.h> #include "ss_internal.h" diff --git a/lib/ss/error.c b/lib/ss/error.c index 8d345a9f..c7ebc4a2 100644 --- a/lib/ss/error.c +++ b/lib/ss/error.c @@ -12,7 +12,6 @@ * express or implied warranty. */ -#include "config.h" #include <stdio.h> #include "et/com_err.h" diff --git a/lib/ss/execute_cmd.c b/lib/ss/execute_cmd.c index d443a468..02dfbfde 100644 --- a/lib/ss/execute_cmd.c +++ b/lib/ss/execute_cmd.c @@ -11,7 +11,6 @@ * express or implied warranty. */ -#include "config.h" #ifdef HAS_STDLIB_H #include <stdlib.h> #endif diff --git a/lib/ss/get_readline.c b/lib/ss/get_readline.c index 8da85f12..4421052d 100644 --- a/lib/ss/get_readline.c +++ b/lib/ss/get_readline.c @@ -11,7 +11,6 @@ * express or implied warranty. */ -#include "config.h" #ifdef HAS_STDLIB_H #include <stdlib.h> #endif diff --git a/lib/ss/help.c b/lib/ss/help.c index 5204401b..fbc040f8 100644 --- a/lib/ss/help.c +++ b/lib/ss/help.c @@ -11,7 +11,6 @@ * express or implied warranty. */ -#include "config.h" #ifdef HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/lib/ss/invocation.c b/lib/ss/invocation.c index 61c2e350..57666ecc 100644 --- a/lib/ss/invocation.c +++ b/lib/ss/invocation.c @@ -11,7 +11,6 @@ * express or implied warranty. */ -#include "config.h" #ifdef HAS_STDLIB_H #include <stdlib.h> #endif diff --git a/lib/ss/list_rqs.c b/lib/ss/list_rqs.c index 6baed419..220534c7 100644 --- a/lib/ss/list_rqs.c +++ b/lib/ss/list_rqs.c @@ -10,7 +10,6 @@ * this software for any purpose. It is provided "as is" without * express or implied warranty. */ -#include "config.h" #include "ss_internal.h" #include <signal.h> #include <setjmp.h> diff --git a/lib/ss/listen.c b/lib/ss/listen.c index 9578c3e8..bd7c8c09 100644 --- a/lib/ss/listen.c +++ b/lib/ss/listen.c @@ -16,7 +16,6 @@ * express or implied warranty. */ -#include "config.h" #include "ss_internal.h" #include <stdio.h> #include <setjmp.h> diff --git a/lib/ss/pager.c b/lib/ss/pager.c index 330249ec..bb149d69 100644 --- a/lib/ss/pager.c +++ b/lib/ss/pager.c @@ -14,7 +14,6 @@ * express or implied warranty. */ -#include "config.h" #if HAVE_SECURE_GETENV #define _GNU_SOURCE #endif diff --git a/lib/ss/parse.c b/lib/ss/parse.c index e2928e22..54b768b8 100644 --- a/lib/ss/parse.c +++ b/lib/ss/parse.c @@ -11,7 +11,6 @@ * express or implied warranty. */ -#include "config.h" #ifdef HAS_STDLIB_H #include <stdlib.h> #endif diff --git a/lib/ss/prompt.c b/lib/ss/prompt.c index c56c2a09..6fe42637 100644 --- a/lib/ss/prompt.c +++ b/lib/ss/prompt.c @@ -16,7 +16,6 @@ * express or implied warranty. */ -#include "config.h" #include <stdio.h> #include "ss_internal.h" diff --git a/lib/ss/request_tbl.c b/lib/ss/request_tbl.c index 135cb28b..16cb4213 100644 --- a/lib/ss/request_tbl.c +++ b/lib/ss/request_tbl.c @@ -11,7 +11,6 @@ * express or implied warranty. */ -#include "config.h" #ifdef HAVE_ERRNO_H #include <errno.h> #endif diff --git a/lib/ss/requests.c b/lib/ss/requests.c index 33ce5d20..2e061000 100644 --- a/lib/ss/requests.c +++ b/lib/ss/requests.c @@ -13,7 +13,6 @@ * express or implied warranty. */ -#include "config.h" #include <stdio.h> #include "ss_internal.h" diff --git a/lib/ss/test_ss.c b/lib/ss/test_ss.c index 53ca99fc..41d84ea7 100644 --- a/lib/ss/test_ss.c +++ b/lib/ss/test_ss.c @@ -14,7 +14,6 @@ */ -#include "config.h" #include <unistd.h> #include <stdlib.h> #include <stdio.h> diff --git a/lib/uuid/clear.c b/lib/uuid/clear.c index 436f8f78..2d91fee9 100644 --- a/lib/uuid/clear.c +++ b/lib/uuid/clear.c @@ -32,7 +32,6 @@ * %End-Header% */ -#include "config.h" #include "string.h" #include "uuidP.h" diff --git a/lib/uuid/compare.c b/lib/uuid/compare.c index d5fc5037..f28a7267 100644 --- a/lib/uuid/compare.c +++ b/lib/uuid/compare.c @@ -34,7 +34,6 @@ * %End-Header% */ -#include "config.h" #include "uuidP.h" #include <string.h> diff --git a/lib/uuid/copy.c b/lib/uuid/copy.c index 32e6f502..ead33aa2 100644 --- a/lib/uuid/copy.c +++ b/lib/uuid/copy.c @@ -32,7 +32,6 @@ * %End-Header% */ -#include "config.h" #include "uuidP.h" void uuid_copy(uuid_t dst, const uuid_t src) diff --git a/lib/uuid/gen_uuid.c b/lib/uuid/gen_uuid.c index 1b23d112..ddc14d71 100644 --- a/lib/uuid/gen_uuid.c +++ b/lib/uuid/gen_uuid.c @@ -38,7 +38,6 @@ */ #define _SVID_SOURCE -#include "config.h" #ifdef _WIN32 #define _WIN32_WINNT 0x0500 diff --git a/lib/uuid/gen_uuid_nt.c b/lib/uuid/gen_uuid_nt.c index 79a40507..aa44bfd3 100644 --- a/lib/uuid/gen_uuid_nt.c +++ b/lib/uuid/gen_uuid_nt.c @@ -5,7 +5,6 @@ */ -#include "config.h" #include "uuidP.h" #pragma warning(push,4) diff --git a/lib/uuid/isnull.c b/lib/uuid/isnull.c index 170c9a20..931e7e7d 100644 --- a/lib/uuid/isnull.c +++ b/lib/uuid/isnull.c @@ -32,7 +32,6 @@ * %End-Header% */ -#include "config.h" #include "uuidP.h" /* Returns 1 if the uuid is the NULL uuid */ diff --git a/lib/uuid/pack.c b/lib/uuid/pack.c index 3db21aef..097516d2 100644 --- a/lib/uuid/pack.c +++ b/lib/uuid/pack.c @@ -32,7 +32,6 @@ * %End-Header% */ -#include "config.h" #include <string.h> #include "uuidP.h" diff --git a/lib/uuid/parse.c b/lib/uuid/parse.c index 4c0857df..074383ef 100644 --- a/lib/uuid/parse.c +++ b/lib/uuid/parse.c @@ -32,7 +32,6 @@ * %End-Header% */ -#include "config.h" #include <stdlib.h> #include <stdio.h> #include <ctype.h> diff --git a/lib/uuid/tst_uuid.c b/lib/uuid/tst_uuid.c index 33fb80b9..8c1b6552 100644 --- a/lib/uuid/tst_uuid.c +++ b/lib/uuid/tst_uuid.c @@ -32,7 +32,6 @@ * %End-Header% */ -#include "config.h" #ifdef _WIN32 #define _WIN32_WINNT 0x0500 diff --git a/lib/uuid/unpack.c b/lib/uuid/unpack.c index 2c8043df..beaaff3c 100644 --- a/lib/uuid/unpack.c +++ b/lib/uuid/unpack.c @@ -32,7 +32,6 @@ * %End-Header% */ -#include "config.h" #include <string.h> #include "uuidP.h" diff --git a/lib/uuid/unparse.c b/lib/uuid/unparse.c index c556ae63..a95bbb04 100644 --- a/lib/uuid/unparse.c +++ b/lib/uuid/unparse.c @@ -32,7 +32,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include "uuidP.h" diff --git a/lib/uuid/uuid.h b/lib/uuid/uuid.h new file mode 100644 index 00000000..ca846da0 --- /dev/null +++ b/lib/uuid/uuid.h @@ -0,0 +1,103 @@ +/* + * Public include file for the UUID library + * + * Copyright (C) 1996, 1997, 1998 Theodore Ts'o. + * + * %Begin-Header% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, and the entire permission notice in its entirety, + * including the disclaimer of warranties. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF + * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * %End-Header% + */ + +#ifndef _UUID_UUID_H +#define _UUID_UUID_H + +#include <sys/types.h> +#ifndef _WIN32 +#include <sys/time.h> +#endif +#include <time.h> + +typedef unsigned char uuid_t[16]; + +/* UUID Variant definitions */ +#define UUID_VARIANT_NCS 0 +#define UUID_VARIANT_DCE 1 +#define UUID_VARIANT_MICROSOFT 2 +#define UUID_VARIANT_OTHER 3 + +/* UUID Type definitions */ +#define UUID_TYPE_DCE_TIME 1 +#define UUID_TYPE_DCE_RANDOM 4 + +/* Allow UUID constants to be defined */ +#ifdef __GNUC__ +#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ + static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} +#else +#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ + static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* clear.c */ +void uuid_clear(uuid_t uu); + +/* compare.c */ +int uuid_compare(const uuid_t uu1, const uuid_t uu2); + +/* copy.c */ +void uuid_copy(uuid_t dst, const uuid_t src); + +/* gen_uuid.c */ +void uuid_generate(uuid_t out); +void uuid_generate_random(uuid_t out); +void uuid_generate_time(uuid_t out); + +/* isnull.c */ +int uuid_is_null(const uuid_t uu); + +/* parse.c */ +int uuid_parse(const char *in, uuid_t uu); + +/* unparse.c */ +void uuid_unparse(const uuid_t uu, char *out); +void uuid_unparse_lower(const uuid_t uu, char *out); +void uuid_unparse_upper(const uuid_t uu, char *out); + +/* uuid_time.c */ +time_t uuid_time(const uuid_t uu, struct timeval *ret_tv); +int uuid_type(const uuid_t uu); +int uuid_variant(const uuid_t uu); + +#ifdef __cplusplus +} +#endif + +#endif /* _UUID_UUID_H */ diff --git a/lib/uuid/uuid_time.c b/lib/uuid/uuid_time.c index 97fd3358..849427f1 100644 --- a/lib/uuid/uuid_time.c +++ b/lib/uuid/uuid_time.c @@ -34,8 +34,6 @@ * %End-Header% */ -#include "config.h" - #ifdef _WIN32 #define _WIN32_WINNT 0x0500 #include <windows.h> diff --git a/lib/uuid/uuid_types.h b/lib/uuid/uuid_types.h new file mode 100644 index 00000000..169a88a7 --- /dev/null +++ b/lib/uuid/uuid_types.h @@ -0,0 +1,50 @@ +/* + * If linux/types.h is already been included, assume it has defined + * everything we need. (cross fingers) Other header files may have + * also defined the types that we need. + */ +#if (!defined(_STDINT_H) && !defined(_UUID_STDINT_H)) +#define _UUID_STDINT_H + +typedef unsigned char uint8_t; +typedef signed char int8_t; + +#if (4 == 8) +typedef int int64_t; +typedef unsigned int uint64_t; +#elif (4 == 8) +typedef long int64_t; +typedef unsigned long uint64_t; +#elif (8 == 8) +#if defined(__GNUC__) +typedef __signed__ long long int64_t; +#else +typedef signed long long int64_t; +#endif +typedef unsigned long long uint64_t; +#endif + +#if (4 == 2) +typedef int int16_t; +typedef unsigned int uint16_t; +#elif (2 == 2) +typedef short int16_t; +typedef unsigned short uint16_t; +#else + ?==error: undefined 16 bit type +#endif + +#if (4 == 4) +typedef int int32_t; +typedef unsigned int uint32_t; +#elif (4 == 4) +typedef long int32_t; +typedef unsigned long uint32_t; +#elif (2 == 4) +typedef short int32_t; +typedef unsigned short uint32_t; +#else + ?== error: undefined 32 bit type +#endif + +#endif diff --git a/misc/badblocks.c b/misc/badblocks.c index 912ef286..87c87f63 100644 --- a/misc/badblocks.c +++ b/misc/badblocks.c @@ -33,7 +33,6 @@ #define _GNU_SOURCE /* for O_DIRECT */ #endif -#include "config.h" #include <errno.h> #include <fcntl.h> #ifdef HAVE_GETOPT_H diff --git a/misc/base_device.c b/misc/base_device.c index b2ce1380..aad2ba05 100644 --- a/misc/base_device.c +++ b/misc/base_device.c @@ -18,7 +18,6 @@ * License. * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/misc/blkid.c b/misc/blkid.c index a4a8db0b..388abad0 100644 --- a/misc/blkid.c +++ b/misc/blkid.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> diff --git a/misc/chattr.c b/misc/chattr.c index 39a60169..3567cfe0 100644 --- a/misc/chattr.c +++ b/misc/chattr.c @@ -20,7 +20,6 @@ #define _LARGEFILE64_SOURCE -#include "config.h" #include <sys/types.h> #include <dirent.h> #include <fcntl.h> diff --git a/misc/default_profile.c b/misc/default_profile.c new file mode 100644 index 00000000..ce312ffd --- /dev/null +++ b/misc/default_profile.c @@ -0,0 +1,55 @@ +const char *mke2fs_default_profile = + "[defaults]\n" + " base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr\n" + " default_mntopts = acl,user_xattr\n" + " enable_periodic_fsck = 0\n" + " blocksize = 4096\n" + " inode_size = 256\n" + " inode_ratio = 16384\n" + "\n" + "[fs_types]\n" + " ext3 = {\n" + " features = has_journal\n" + " }\n" + " ext4 = {\n" + " features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize\n" + " auto_64-bit_support = 1\n" + " inode_size = 256\n" + " }\n" + " ext4dev = {\n" + " features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize\n" + " inode_size = 256\n" + " options = test_fs=1\n" + " }\n" + " small = {\n" + " blocksize = 1024\n" + " inode_size = 128\n" + " inode_ratio = 4096\n" + " }\n" + " floppy = {\n" + " blocksize = 1024\n" + " inode_size = 128\n" + " inode_ratio = 8192\n" + " }\n" + " big = {\n" + " inode_ratio = 32768\n" + " }\n" + " huge = {\n" + " inode_ratio = 65536\n" + " }\n" + " news = {\n" + " inode_ratio = 4096\n" + " }\n" + " largefile = {\n" + " inode_ratio = 1048576\n" + " blocksize = -1\n" + " }\n" + " largefile4 = {\n" + " inode_ratio = 4194304\n" + " blocksize = -1\n" + " }\n" + " hurd = {\n" + " blocksize = 4096\n" + " inode_size = 128\n" + " }\n" +; diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c index d4bde8e5..9e5d2df4 100644 --- a/misc/dumpe2fs.c +++ b/misc/dumpe2fs.c @@ -20,7 +20,6 @@ * 94/02/27 - Ported to use the ext2fs library */ -#include "config.h" #ifdef HAVE_GETOPT_H #include <getopt.h> #else diff --git a/misc/e2freefrag.c b/misc/e2freefrag.c index 612ca445..00fdc4ec 100644 --- a/misc/e2freefrag.c +++ b/misc/e2freefrag.c @@ -11,7 +11,6 @@ * License version 2. * %End-Header% */ -#include "config.h" #include <stdio.h> #ifdef HAVE_UNISTD_H #include <unistd.h> diff --git a/misc/e2image.c b/misc/e2image.c index 0537b0d8..a924d10a 100644 --- a/misc/e2image.c +++ b/misc/e2image.c @@ -13,7 +13,6 @@ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE -#include "config.h" #include <fcntl.h> #include <grp.h> #ifdef HAVE_GETOPT_H diff --git a/misc/e2initrd_helper.c b/misc/e2initrd_helper.c index 765716d6..22672a3d 100644 --- a/misc/e2initrd_helper.c +++ b/misc/e2initrd_helper.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <unistd.h> #ifdef HAVE_STDLIB_H diff --git a/misc/e2label.c b/misc/e2label.c index bc87a428..e96101ae 100644 --- a/misc/e2label.c +++ b/misc/e2label.c @@ -11,7 +11,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <string.h> #include <fcntl.h> diff --git a/misc/e2undo.c b/misc/e2undo.c index a43c26fd..d5153737 100644 --- a/misc/e2undo.c +++ b/misc/e2undo.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #ifdef HAVE_GETOPT_H diff --git a/misc/e4defrag.c b/misc/e4defrag.c index c6a5f0da..d83e2e6e 100644 --- a/misc/e4defrag.c +++ b/misc/e4defrag.c @@ -19,7 +19,6 @@ #define _GNU_SOURCE #endif -#include "config.h" #include <ctype.h> #include <dirent.h> #include <endian.h> diff --git a/misc/filefrag.c b/misc/filefrag.c index a050a226..1a30a28b 100644 --- a/misc/filefrag.c +++ b/misc/filefrag.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #ifndef __linux__ #include <stdio.h> #include <stdlib.h> diff --git a/misc/findsuper.c b/misc/findsuper.c index eb9130ba..b03c8aaa 100644 --- a/misc/findsuper.c +++ b/misc/findsuper.c @@ -83,7 +83,6 @@ #define _FILE_OFFSET_BITS 64 -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/misc/fsck.c b/misc/fsck.c index 826aaebb..72505d7b 100644 --- a/misc/fsck.c +++ b/misc/fsck.c @@ -27,7 +27,6 @@ #define _XOPEN_SOURCE 600 /* for inclusion of sa_handler in Solaris */ -#include "config.h" #include <sys/types.h> #include <sys/wait.h> #include <sys/stat.h> diff --git a/misc/ismounted.c b/misc/ismounted.c index 6aa0e04d..ee662f4f 100644 --- a/misc/ismounted.c +++ b/misc/ismounted.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/misc/logsave.c b/misc/logsave.c index 8612edfb..e85bd6c2 100644 --- a/misc/logsave.c +++ b/misc/logsave.c @@ -12,7 +12,6 @@ #define _XOPEN_SOURCE 600 /* for inclusion of sa_handler in Solaris */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> diff --git a/misc/lsattr.c b/misc/lsattr.c index e5e59690..43acacef 100644 --- a/misc/lsattr.c +++ b/misc/lsattr.c @@ -19,7 +19,6 @@ #define _LARGEFILE64_SOURCE -#include "config.h" #include <sys/types.h> #include <dirent.h> #ifdef HAVE_ERRNO_H diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 2e8ba60c..ee73d39e 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -18,7 +18,6 @@ #define _XOPEN_SOURCE 600 /* for inclusion of PATH_MAX in Solaris */ -#include "config.h" #include <stdio.h> #include <string.h> #include <strings.h> @@ -71,6 +70,10 @@ extern int optind; #define ZAP_BOOTBLOCK #endif +#ifndef ROOT_SYSCONFDIR +#define ROOT_SYSCONFDIR "/etc" +#endif + #define DISCARD_STEP_MB (2048) extern int isatty(int); diff --git a/misc/mklost+found.c b/misc/mklost+found.c index 134e8241..db7d8682 100644 --- a/misc/mklost+found.c +++ b/misc/mklost+found.c @@ -13,7 +13,6 @@ * 93/04/22 - Creation */ -#include "config.h" #include <errno.h> #include <fcntl.h> #include <stdio.h> diff --git a/misc/partinfo.c b/misc/partinfo.c index c461e801..59616549 100644 --- a/misc/partinfo.c +++ b/misc/partinfo.c @@ -7,7 +7,6 @@ * */ -#include "config.h" #include <sys/types.h> #include <fcntl.h> #ifdef HAVE_SYS_IOCTL_H diff --git a/misc/tune2fs.c b/misc/tune2fs.c index 568fb30d..e22640da 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -26,7 +26,6 @@ */ #define _XOPEN_SOURCE 600 /* for inclusion of strptime() */ -#include "config.h" #include <fcntl.h> #include <grp.h> #ifdef HAVE_GETOPT_H diff --git a/misc/util.c b/misc/util.c index 40c8858c..e62cc7fd 100644 --- a/misc/util.c +++ b/misc/util.c @@ -12,7 +12,6 @@ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE -#include "config.h" #include <stdio.h> #include <string.h> #ifdef HAVE_ERRNO_H diff --git a/misc/uuidd.c b/misc/uuidd.c index 5a531380..c00c9e20 100644 --- a/misc/uuidd.c +++ b/misc/uuidd.c @@ -11,7 +11,6 @@ #define _GNU_SOURCE /* for setres[ug]id() */ -#include "config.h" #include <stdio.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> diff --git a/misc/uuidgen.c b/misc/uuidgen.c index f181d193..7385a5c4 100644 --- a/misc/uuidgen.c +++ b/misc/uuidgen.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> diff --git a/resize/extent.c b/resize/extent.c index ec81b944..d062f6a0 100644 --- a/resize/extent.c +++ b/resize/extent.c @@ -16,7 +16,6 @@ * %End-Header% */ -#include "config.h" #include "resize2fs.h" struct ext2_extent_entry { diff --git a/resize/main.c b/resize/main.c index 2b7abff3..7bafc16f 100644 --- a/resize/main.c +++ b/resize/main.c @@ -15,7 +15,6 @@ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE -#include "config.h" #ifdef HAVE_GETOPT_H #include <getopt.h> #else diff --git a/resize/online.c b/resize/online.c index defcac1d..897187e8 100644 --- a/resize/online.c +++ b/resize/online.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include "resize2fs.h" #ifdef HAVE_SYS_IOCTL_H #include <sys/ioctl.h> diff --git a/resize/resize2fs.c b/resize/resize2fs.c index c4c25170..865ff4c3 100644 --- a/resize/resize2fs.c +++ b/resize/resize2fs.c @@ -33,7 +33,6 @@ * 5. Move the inode tables, if necessary. */ -#include "config.h" #include "resize2fs.h" #include <time.h> diff --git a/resize/resource_track.c b/resize/resource_track.c index f0efe114..7908c951 100644 --- a/resize/resource_track.c +++ b/resize/resource_track.c @@ -10,7 +10,6 @@ */ -#include "config.h" #include "resize2fs.h" #include <time.h> #ifdef HAVE_MALLOC_H diff --git a/resize/sim_progress.c b/resize/sim_progress.c index d4206ba2..e7dba88e 100644 --- a/resize/sim_progress.c +++ b/resize/sim_progress.c @@ -12,7 +12,6 @@ * %End-Header% */ -#include "config.h" #include "resize2fs.h" struct ext2_sim_progress { diff --git a/resize/test_extent.c b/resize/test_extent.c index fa3f5052..a8678f1f 100644 --- a/resize/test_extent.c +++ b/resize/test_extent.c @@ -12,7 +12,6 @@ * %End-Header% */ -#include "config.h" #include "resize2fs.h" void do_test(FILE *in, FILE *out); diff --git a/tests/progs/crcsum.c b/tests/progs/crcsum.c index 9794e103..fd74da0d 100644 --- a/tests/progs/crcsum.c +++ b/tests/progs/crcsum.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <stdint.h> diff --git a/tests/progs/hold_inode.c b/tests/progs/hold_inode.c index 792aa71d..debf4a4e 100644 --- a/tests/progs/hold_inode.c +++ b/tests/progs/hold_inode.c @@ -10,7 +10,6 @@ * %End-Header% */ -#include "config.h" #include <unistd.h> #include <stdio.h> #include <dirent.h> diff --git a/tests/progs/random_exercise.c b/tests/progs/random_exercise.c index 38217ab5..0be389fb 100644 --- a/tests/progs/random_exercise.c +++ b/tests/progs/random_exercise.c @@ -13,7 +13,6 @@ * %End-Header% */ -#include "config.h" #include <unistd.h> #include <stdio.h> #include <sys/types.h> diff --git a/tests/progs/test_icount.c b/tests/progs/test_icount.c index d028a601..017cc4d8 100644 --- a/tests/progs/test_icount.c +++ b/tests/progs/test_icount.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/tests/progs/test_rel.c b/tests/progs/test_rel.c index 8f7280c7..954a7221 100644 --- a/tests/progs/test_rel.c +++ b/tests/progs/test_rel.c @@ -9,7 +9,6 @@ * %End-Header% */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> |