aboutsummaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'maint' into nextTheodore Ts'o2018-08-183-69/+11
|\
| * Drop subset tarball and replace it with "configure --enable-subset"Theodore Ts'o2018-08-182-44/+1
| | | | | | | | | | | | | | | | | | There's no point creating two separate tarfiles. It's not clear anyone was actually using the subset tarball --- and if they are, they can replace it by the full source distribution and using the --enable-subset option. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * Stop generating e2fsprogs.spec automaticallyTheodore Ts'o2018-08-181-3/+0
| | | | | | | | | | | | | | It adds extra complexity for not much gain, and stands in the way of generating the release tarfile via git archive. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * Remove obsolete files from the repositoryTheodore Ts'o2018-08-181-10/+0
| | | | | | | | | | | | | | | | They are removed when we generate the tarball, and they serve no useful purpose, so let's remove them. This will be help us to create the tarball using git archive more easily. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * gen-tarball: handle symlinks correctly in the created the tar fileTheodore Ts'o2018-08-181-14/+12
| | | | | | | | | | | | | | | | | | Now that we use a symlink for the top-level RELEASE-NOTES file, the previous strategy of using a symlink to force the prefix in the tar file and then using tar -h won't work. So change how we generate the tar file to take advantage of GNU tar's --transform option. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | e2scrub: add service (cron, systemd) supportDarrick J. Wong2018-08-051-0/+3
| | | | | | | | | | | | | | | | Add the ability to run the e2scrub utilities as a periodically scheduled system service. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | e2scrub: create online fsck tool of sortsDarrick J. Wong2018-08-051-0/+3
|/ | | | | | | | | | | | Implement online fsck for ext* filesystems which live on LVM-managed logical volumes. The basic strategy mirrors that of e2croncheck -- create a snapshot, fsck the snapshot, report whatever errors appear, remove snapshot. Unlike e2croncheck, this utility accepts any LVM device path, knows about snapshots running out of space, and can call fstrim having validated that the fs metadata is ok. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* AOSP: Fix macOS build.David Anderson2018-08-051-1/+3
| | | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu> Bug: 111839488 Test: e2fsprogs builds on macOS. Change-Id: I4ddf332cc244fa44f928cba68470b7f9aa48a556 From AOSP commit: 4dc2456f0e6d10c73372e829e1875ec4095e8fa6
* AOSP: Always define HAVE_SYS_SYSMACROS_H on Android.David Anderson2018-08-051-1/+1
| | | | | | | | | | This is needed after 3fb715b55426875902dfef3056b2cf7335953178 which conditionally included sysmacros.h. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Change-Id: I52e3da4d9ea0f5efbf685a9c4a266f33357f8d8c From AOSP commit: a5deff7b7ee15a5ba5d65516326ce4c42daa1027
* AOSP: Conditionally define __bitwise__ on Android.David Anderson2018-08-051-0/+4
| | | | | | | | | | bionic does not define _LINUX_TYPES_H but does define __bitwise, so we conditionally define it here. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Change-Id: I500ccd469ea7de2e53ab8bd75720a412c86cf18b From AOSP commit: 77f2eea2717e18e80a31d80c7721b9e0ed8e0cba
* util: allow subst to build in cross build environemntRobert Schiele2018-03-201-0/+1
| | | | | | | | | | In a cross build environment we don't get definition of HAVE_SYS_STAT_H from config.h, therefore we need to define it locally in that case similar to HAVE_SYS_TIME_H. Fixes: 7fd537401270 ("misc: add missing declarations on maint") Signed-off-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Clean up util/android_config.hTheodore Ts'o2018-02-261-10/+2
| | | | | | Remove duplicate #defines and reorganize them to minimize excess Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* remove AOSP's lib/config.h and update util/android_config.hTheodore Ts'o2018-02-261-0/+7
| | | | | | | | | | | | While synchronizing with the AOSP e2fsprogs tree, lib/config.h was accidentally checked in. In the upstream repository, the official copy of lib/config.h for Android should be stored in util/android_config.h, since lib/config.h will confuse Unix builds. This means that when synchronizing with the AOSP tree, changes lib/config.h need to be reflected in util/android_config.h Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Merge branch 'maint' into nextTheodore Ts'o2017-10-153-3/+3
|\
| * Fix typos in code comments and developer docsSebastian Rasmussen2017-10-153-3/+3
| | | | | | | | | | | | Signed-off-by: Sebastian Rasmussen <sebras@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Andreas Dilger <adilger@dilger.ca>
* | Merge branch 'maint' into nextTheodore Ts'o2017-08-131-2/+8
|\|
| * Add options to gzip and tar to create reproducible artificatsTheodore Ts'o2017-08-131-2/+8
| | | | | | | | | | | | Also remove some long-unused rules from resize2fs's Makefile. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | AOSP: Define HAVE_SYS_SYSMACROS_H for Android.Elliott Hughes2017-05-232-2/+3
| | | | | | | | | | | | | | | | | | | | | | Also remove a duplicate copy of misc/create_inode.c that isn't upstream. Bug: https://github.com/android-ndk/ndk/issues/398 Test: builds Change-Id: Ibc475c82aa21f063673cb68bcf6e41ad9d821cd3 From AOSP commit: 37f805a9571cf33c95080c3dbd65c7a4e46fcd71 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | AOSP: android: libext2fs and com_err for windowsAdrien Schildknecht2017-05-231-35/+37
| | | | | | | | | | | | | | | | | | Test: m libext2fs-host && m libext2_com_err-host Change-Id: I92b6717b617a4f7f16182bf12af58cb22f20fa8f From AOSP commit: 1538eb4c580d53657f82e4e0170ca5ad5b67455c Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | Fix windows and mac buildJin Qian2017-05-231-0/+6
| | | | | | | | | | | | | | | | | | | | malloc.h is not available on mac. mntent.h and setmntent are not available on windows. Test: cd external/e2fsprogs && mm Change-Id: I3bc1b80156d3659f4d81975626a71f58d39ee61a (cherry picked from commit 8ca6180b52349968daf601bd89e15491eb2f271f)
* | AOSP: Fix "Can't use getmntent or getmntinfo to check for mounted ↵Elliott Hughes2017-05-231-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | filesystems!" warning. We do have <mntent.h> and setmntent(3). Also silence unused parameter warnings; C programmers don't care, so upstream is unlikely to fix that. Bug: N/A Test: builds Change-Id: I57db0cca68a617913e21c2ef7b6613cd1183d7c5 From AOSP commit: d5947f70714e6676bca2663af210bfb9f6118e83 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | AOSP: libext2fs: android sparse io managerAdrien Schildknecht2017-05-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a new io manager to directly output sparse images. Test: mke2fs [...] -E sparse_file; simg2img system.img system.ext4; e2fsck system.ext4 Change-Id: I41cf8c1b33d359be4f104e03fb4041863214843c From AOSP commit: f9e0f1d4a7cf32c4091eee7d2a1676cac1d17438 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | AOSP: Fix mac buildColin Cross2017-05-231-0/+8
|/ | | | | | | | | | | | | Disable linux-only features in config.h Fix one use of ino_t instead of ext2_ino_t. Test: mma -j Test: e2fsck -f -n $OUT/system.img Bug: 27599744 Change-Id: I3291ae888ac28a49813365ab2431a3c266de9907 From AOSP commit: bfa685deba9eb828b7ed35d6ccaf0345f6337ce3 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fsck: make sure system.data xattr is presentTheodore Ts'o2017-01-311-7/+17
| | | | | | | | | E2fsprogs used to assume that if i_size is less than 60 bytes, the system.data xattr isn't needed (and should be removed). The kernel disagree, and will declare the file system to be corrupted. Enforce the tighter constraints assumed by the kernel. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Add utility script which generates a small sample file systemTheodore Ts'o2017-01-311-0/+30
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Fix build reproducibility for mk_cmds and compile_etTheodore Ts'o2016-09-012-5/+3
| | | | | | | The mk_cmds and compile_et scripts include the build directory, which breaks the build reproducibility goal of Debian. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* libext2fs: replace 'unsigned long' by 'uintptr_t'Adrien Schildknecht2016-08-101-0/+2
| | | | | | | | This is needed for win64: sizeof(unsigned long) != sizeof(void*) Signed-off-by: Adrien Schildknecht <adriens@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Fix Android build warningsTheodore Ts'o2016-05-292-0/+2
| | | | | | | Also fix some additional gcc -Wall build warnings in a traditional Linux environment. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Add configure --disable-tdb which disables e2fsck's scratch_files featureTheodore Ts'o2016-05-291-0/+2
| | | | | | | | | | | | | The scratch_files feature is not really needed except on 32-bit platforms, since tdb's performance is pretty awful given how we are using it. Maybe SQLite would be faster, but for 64-bit platforms, enabling swap works fairly well, especially using the rbtree for the bitmap abstraction. We leave tdb for Android since it's unlikely that someone will be trying to connect petabyte+ sized file systems to a mobile handset. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Fix "make gcc-wall" for library codeTheodore Ts'o2016-05-291-0/+1
| | | | | | | | | | | | | Commit fd1677e80: "Add --enable-hardening which builds e2fsprogs with security hardening" broken the gcc warnings mode by changing how CFLAGS were used to build static and shared library objects. Also shut up GCC's whining about casting the return value from dlsym(2) to function pointers --- since due to conflicing standards, there is no way to use dlsym() without causing gcc to whine one way or another. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* util: remove lib/support from the e2fsprogs-libs tar distributionTheodore Ts'o2016-05-101-0/+1
| | | | | | | | The lib/support library is only used for internal e2fsprogs programs, and it won't compile correctly due to the fact that lib/ext2fs isn't included in the e2fsprogs-libs distribution anyway. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* util: add get-var scriptTheodore Ts'o2016-03-181-0/+4
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* gen-android-files: create the MODULE_LICENSE_GPL and README.version filesDamien Miller2016-03-152-1/+54
| | | | | | | These package version metadata files will be used for automated notification of external vulnerability reports in Android. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Merge branch 'maint' into nextTheodore Ts'o2016-03-061-0/+4
|\
| * misc: add missing declarations on maintAndreas Dilger2016-03-061-0/+4
| | | | | | | | | | | | | | Fix compile warnings for missing declarations on the maint branch. Signed-off-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | subst: work around an NFS bugTheodore Ts'o2015-09-181-4/+8
| | | | | | | | | | | | | | | | | | | | | | When running on NFS, opening files with 0444 perms for writing can sometimes fail. This is arguably an NFS server bug, but work around it by creating the file with 0644 permissions, and only change the permissions to be 0444 right before we close the file. URL: https://bugs.gentoo.org/550986 Reported-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | Merge branch 'maint' into nextTheodore Ts'o2015-07-221-1/+1
|\|
| * util: avoid off-by-one on long symlinksTobias Stoeckmann2015-07-221-1/+1
| | | | | | | | | | | | | | | | readlink does not nul terminate its result, therefore one extra byte has to be taken into account. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | Remove dropped const warning and enable pread/pwrite for Android buildTheodore Ts'o2015-07-131-0/+4
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | Eliminate unused variable and unused label warnings from Android buildTheodore Ts'o2015-07-131-0/+5
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | Eliminate unused parameter warnings from Android buildTheodore Ts'o2015-07-131-0/+2
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | Eliminate doubly defined _LARGEFILE_SOURCE warningTheodore Ts'o2015-07-121-0/+4
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | Move the check_plausibility() function from misc to lib/supportTheodore Ts'o2015-07-121-5/+2
| | | | | | | | | | | | | | | | The check_plausibility() function is now used all over the place, so we should move the plausible.c file to lib/support and remove the special case handling for that file that had been in the build system. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | Move the profile parsing functions from e2fsck to lib/supportTheodore Ts'o2015-07-121-6/+3
| | | | | | | | | | | | | | | | The profile functions started as something specific to e2fsck. It's now used by mke2fs and e2fsck, so it's better to move it into libsupport.a. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | gen-android-files: implement 'Add MODULE_LICENSE and NOTICE files"Theodore Ts'o2015-07-121-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Sync up with aosp's e2fsprogs commits: e1b2879841453d799dc6077f857c5c9db5e83fee e64b83185148d359b9b6cc1310172a3c213a61fb b823193090c770fe79507df2413a825250b1dcd2 9652dd6589d10675573c9a0acc90f6df5ac33397 a5f85097aed09890d03dba31f9d18db75ce50cd7 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | android_config: remove HAVE_TERMIO_HTheodore Ts'o2015-07-121-1/+0
| | | | | | | | | | | | | | | | | | | | Sync up with aosp's e2fsprogs commits: dc351db427e667b9f954c4338f69da83fa16222b 2ca3c65991609bb5b48004ec3c7a66f6b417beed 4ef951aa5e69116963f1836fe5ddcf6b87afbecd Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | configure: remove support to disable quota supportTheodore Ts'o2015-07-031-2/+0
| | | | | | | | | | | | | | | | | | For the 1.43 release, quota support will be the default. It's much simpler if we don't try to make quota support optional. This was done originally because the quota feature wasn't fully tested. It is now, so we can remove this as an option. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | configure: remove support to disable htree supportTheodore Ts'o2015-07-031-1/+0
| | | | | | | | | | | | | | The presence of --disable-htree is very much a legacy thing. Remove it since supporting the lack of htree support is pretty silly. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | Fix "make clean" and "make distclean"Theodore Ts'o2015-07-011-1/+1
| | | | | | | | | | | | | | There were some generated files that weren't getting removed by the clean and distclean targets; fix this. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | Allow debugfs to be built for use in AndroidTheodore Ts'o2015-05-251-1/+22
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>