diff options
author | Theodore Ts'o <tytso@mit.edu> | 2017-12-12 23:45:02 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-12-12 23:45:02 -0500 |
commit | 3829c16c10f89204ca50546f26fc7f08165b0e11 (patch) | |
tree | 352d50c54c2ff64bff3ef3f33ef304bfe8062f67 | |
parent | edc14d97d0de738e73ca5808b36ab613e3ac2891 (diff) | |
parent | ed580fc16fc5b271c0a8fb853ac7b39752e8ce1d (diff) | |
download | e2fsprogs-3829c16c10f89204ca50546f26fc7f08165b0e11.tar.gz |
Merge branch 'maint' into next
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | debian/control.in | 3 | ||||
-rw-r--r-- | debian/e2fsprogs-l10n.copyright | 26 | ||||
-rw-r--r-- | e2fsck/unix.c | 20 | ||||
-rw-r--r-- | lib/config.h.in | 3 | ||||
-rw-r--r-- | lib/ext2fs/digest_encode.c | 9 | ||||
-rw-r--r-- | lib/ext2fs/sha256.c | 1 | ||||
-rw-r--r-- | lib/ext2fs/sha512.c | 1 | ||||
-rw-r--r-- | misc/Makefile.in | 6 | ||||
-rw-r--r-- | misc/create_inode.c | 4 |
11 files changed, 58 insertions, 20 deletions
@@ -7236,6 +7236,8 @@ main () if (*(data + i) != *(data3 + i)) return 14; close (fd); + free (data); + free (data3); return 0; } _ACEOF @@ -12369,7 +12371,7 @@ fi done fi -for ac_header in dirent.h errno.h execinfo.h getopt.h malloc.h mntent.h paths.h semaphore.h setjmp.h signal.h stdarg.h stdint.h stdlib.h termios.h termio.h unistd.h utime.h attr/xattr.h linux/falloc.h linux/fd.h linux/fsmap.h linux/major.h linux/loop.h linux/types.h net/if_dl.h netinet/in.h sys/acl.h sys/disklabel.h sys/disk.h sys/file.h sys/ioctl.h sys/key.h sys/mkdev.h sys/mman.h sys/mount.h sys/prctl.h sys/resource.h sys/select.h sys/socket.h sys/sockio.h sys/stat.h sys/syscall.h sys/sysctl.h sys/sysmacros.h sys/time.h sys/types.h sys/un.h sys/wait.h +for ac_header in dirent.h errno.h execinfo.h getopt.h malloc.h mntent.h paths.h semaphore.h setjmp.h signal.h stdarg.h stdint.h stdlib.h termios.h termio.h unistd.h utime.h attr/xattr.h linux/falloc.h linux/fd.h linux/fsmap.h linux/major.h linux/loop.h linux/types.h net/if_dl.h netinet/in.h sys/acl.h sys/disklabel.h sys/disk.h sys/file.h sys/ioctl.h sys/key.h sys/mkdev.h sys/mman.h sys/mount.h sys/prctl.h sys/resource.h sys/select.h sys/socket.h sys/sockio.h sys/stat.h sys/syscall.h sys/sysctl.h sys/sysmacros.h sys/time.h sys/types.h sys/un.h sys/wait.h sys/xattr.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" diff --git a/configure.ac b/configure.ac index 4ec461705..739295919 100644 --- a/configure.ac +++ b/configure.ac @@ -946,6 +946,7 @@ AC_CHECK_HEADERS(m4_flatten([ sys/types.h sys/un.h sys/wait.h + sys/xattr.h ])) dnl Check where to find a dd(1) that supports iflag=fullblock dnl and oflag=append diff --git a/debian/control.in b/debian/control.in index 89e8801bf..aed81d644 100644 --- a/debian/control.in +++ b/debian/control.in @@ -38,6 +38,7 @@ Priority: optional Depends: e2fsprogs (>= ${binary:Version}), e2fsprogs (<< ${binary:Version}+c~), ${misc:Depends} Replaces: e2fsprogs (<< 1.43.5-1) Architecture: all +Multi-Arch: foreign Description: ext2/ext3/ext4 file system utilities - translations The ext2, ext3 and ext4 file systems are successors of the original ext ("extended") file system. They are the main file system types used for @@ -66,6 +67,7 @@ Depends: libc6-dev | libc-dev, libcomerr2 (= ${mainBinary}), ${misc:Depends} Suggests: doc-base Replaces: e2fslibs-dev (<< 1.33-2), libkrb5-dev (<< 1.3) Architecture: any +Multi-Arch: same Description: common error description library - headers and static libraries libcom_err is an attempt to present a common error-handling mechanism to manipulate the most common form of error code in a fashion that does not @@ -92,6 +94,7 @@ Section: libdevel Priority: optional Depends: libc6-dev | libc-dev, libss2 (= ${mainBinary}), comerr-dev, ${misc:Depends} Architecture: any +Multi-Arch: same Description: command-line interface parsing library - headers and static libraries This package includes a tool that parses a command table to generate a simple command-line interface parser, the include files needed to diff --git a/debian/e2fsprogs-l10n.copyright b/debian/e2fsprogs-l10n.copyright new file mode 100644 index 000000000..cb9a549cc --- /dev/null +++ b/debian/e2fsprogs-l10n.copyright @@ -0,0 +1,26 @@ +This is the Debian GNU/Linux prepackaged version of the translation +files of the EXT2 file system utilities. The EXT2 utilities were +written by Theodore Ts'o <tytso@mit.edu> and Remy Card +<card@masi.ibp.fr>. + +Sources were obtained from http://sourceforge.net/projects/e2fsprogs + +Packaging is Copyright (c) 2003-2006 Theodore Ts'o <tytso@mit.edu> + Copyright (c) 1997-2003 Yann Dirson <dirson@debian.org> + Copyright (c) 2001 Alcove <http://www.alcove.com/> + Copyright (c) 1997 Klee Dienes + Copyright (c) 1995-1996 Michael Nonweiler <mrn20@cam.ac.uk> + +Upstream Author: Theodore Ts'o <tytso@mit.edu> + +Copyright notice: + +This package, the EXT2 filesystem utilities, is protected by the GNU +Public License. + + Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Theodore Ts'o + +On Debian GNU systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2'. + diff --git a/e2fsck/unix.c b/e2fsck/unix.c index b46dcb2dc..2e9be8b88 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -106,7 +106,7 @@ static void show_stats(e2fsck_t ctx) unsigned int dir_links; unsigned int num_files, num_links; __u32 *mask, m; - int frag_percent_file, frag_percent_dir, frag_percent_total; + int frag_percent_file = 0, frag_percent_dir = 0, frag_percent_total = 0; int i, j, printed = 0; dir_links = 2 * ctx->fs_directory_count - 1; @@ -119,16 +119,18 @@ static void show_stats(e2fsck_t ctx) blocks_used = (ext2fs_blocks_count(fs->super) - ext2fs_free_blocks_count(fs->super)); - frag_percent_file = (10000 * ctx->fs_fragmented) / inodes_used; - frag_percent_file = (frag_percent_file + 5) / 10; + if (inodes_used > 0) { + frag_percent_file = (10000 * ctx->fs_fragmented) / inodes_used; + frag_percent_file = (frag_percent_file + 5) / 10; - frag_percent_dir = (10000 * ctx->fs_fragmented_dir) / inodes_used; - frag_percent_dir = (frag_percent_dir + 5) / 10; + frag_percent_dir = (10000 * ctx->fs_fragmented_dir) / inodes_used; + frag_percent_dir = (frag_percent_dir + 5) / 10; - frag_percent_total = ((10000 * (ctx->fs_fragmented + - ctx->fs_fragmented_dir)) - / inodes_used); - frag_percent_total = (frag_percent_total + 5) / 10; + frag_percent_total = ((10000 * (ctx->fs_fragmented + + ctx->fs_fragmented_dir)) + / inodes_used); + frag_percent_total = (frag_percent_total + 5) / 10; + } if (!verbose) { log_out(ctx, _("%s: %u/%u files (%0d.%d%% non-contiguous), " diff --git a/lib/config.h.in b/lib/config.h.in index 91e869e7d..9cc079387 100644 --- a/lib/config.h.in +++ b/lib/config.h.in @@ -545,6 +545,9 @@ /* Define to 1 if you have the <sys/wait.h> header file. */ #undef HAVE_SYS_WAIT_H +/* Define to 1 if you have the <sys/xattr.h> header file. */ +#undef HAVE_SYS_XATTR_H + /* Define to 1 if you have the <termios.h> header file. */ #undef HAVE_TERMIOS_H diff --git a/lib/ext2fs/digest_encode.c b/lib/ext2fs/digest_encode.c index d90b3006b..075963ffc 100644 --- a/lib/ext2fs/digest_encode.c +++ b/lib/ext2fs/digest_encode.c @@ -78,7 +78,7 @@ int ext2fs_digest_decode(const char *src, int len, char *dst) static const struct { unsigned char d[32]; unsigned int len; - const unsigned char *ed; + const char *ed; } tests[] = { { { 0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, @@ -126,9 +126,9 @@ static const struct { int main(int argc, char **argv) { - int i, ret, len, len2; + int i, ret, len; int errors = 0; - unsigned char tmp[1024], tmp2[1024]; + char tmp[1024], tmp2[1024]; if (argc == 3 && !strcmp(argv[1], "encode")) { memset(tmp, 0, sizeof(tmp)); @@ -145,7 +145,8 @@ int main(int argc, char **argv) } for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) { memset(tmp, 0, sizeof(tmp)); - ret = ext2fs_digest_encode(tests[i].d, tests[i].len, tmp); + ret = ext2fs_digest_encode((const char *) tests[i].d, + tests[i].len, tmp); len = strlen(tmp); printf("Test Digest %d (returned %d): ", i, ret); if (ret != len) { diff --git a/lib/ext2fs/sha256.c b/lib/ext2fs/sha256.c index 103c33876..f67848d4f 100644 --- a/lib/ext2fs/sha256.c +++ b/lib/ext2fs/sha256.c @@ -235,7 +235,6 @@ int main(int argc, char **argv) int i; int errors = 0; unsigned char tmp[32]; - struct hash_state md; for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) { unsigned char *msg = (unsigned char *) tests[i].msg; diff --git a/lib/ext2fs/sha512.c b/lib/ext2fs/sha512.c index f1130538b..fe2dd52e4 100644 --- a/lib/ext2fs/sha512.c +++ b/lib/ext2fs/sha512.c @@ -283,7 +283,6 @@ int main(int argc, char **argv) int i; int errors = 0; unsigned char tmp[64]; - struct hash_state md; for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) { unsigned char *msg = (unsigned char *) tests[i].msg; diff --git a/misc/Makefile.in b/misc/Makefile.in index 4bb92ace2..6f631eb1c 100644 --- a/misc/Makefile.in +++ b/misc/Makefile.in @@ -392,19 +392,19 @@ fuse2fs: $(FUSE2FS_OBJS) $(DEPLIBS) $(DEPLIBBLKID) $(DEPLIBUUID) \ $(CLOCK_GETTIME_LIB) $(SYSLIBS) journal.o: $(srcdir)/../debugfs/journal.c - $(E) " CC $@" + $(E) " CC $<" $(Q) $(CC) -c $(JOURNAL_CFLAGS) -I$(srcdir) \ $(srcdir)/../debugfs/journal.c -o $@ @PROFILE_CMT@ $(Q) $(CC) $(JOURNAL_CFLAGS) -g -pg -o profiled/$*.o -c $< recovery.o: $(srcdir)/../e2fsck/recovery.c - $(E) " CC $@" + $(E) " CC $<" $(Q) $(CC) -c $(JOURNAL_CFLAGS) -I$(srcdir) \ $(srcdir)/../e2fsck/recovery.c -o $@ @PROFILE_CMT@ $(Q) $(CC) $(JOURNAL_CFLAGS) -g -pg -o profiled/$*.o -c $< revoke.o: $(srcdir)/../e2fsck/revoke.c - $(E) " CC $@" + $(E) " CC $<" $(Q) $(CC) -c $(JOURNAL_CFLAGS) -I$(srcdir) \ $(srcdir)/../e2fsck/revoke.c -o $@ @PROFILE_CMT@ $(Q) $(CC) $(JOURNAL_CFLAGS) -g -pg -o profiled/$*.o -c $< diff --git a/misc/create_inode.c b/misc/create_inode.c index 2dbb433c3..a07f8328e 100644 --- a/misc/create_inode.c +++ b/misc/create_inode.c @@ -18,7 +18,9 @@ #include <sys/types.h> #include <unistd.h> #include <limits.h> /* for PATH_MAX */ -#ifdef HAVE_ATTR_XATTR_H +#if defined HAVE_SYS_XATTR_H +#include <sys/xattr.h> +#elif defined HAVE_ATTR_XATTR_H #include <attr/xattr.h> #endif #include <sys/ioctl.h> |