aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ss
Commit message (Collapse)AuthorAgeFilesLines
* Switch back to 1.42.9 now that there is a fixJP Abgrall2014-03-1913-85/+75
| | | | | | Revert "Revert changes that moved from 1.41.14 to 1.42.9" This reverts commit 65f0aab98b20b5994a726ab90d355248bcddfffd.
* Revert changes that moved from 1.41.14 to 1.42.9JP Abgrall2014-03-0613-75/+85
| | | | | | | | | | | | | | | | Revert "e2fsck: Don't use e2fsck_global_ctx unless HAVE_SIGNAL_H" commit e80e74c41d85ff93f3d212ba6512340f48054a93. Revert "Merge remote-tracking branch 'linaro/linaro-1.42.9' into aosp_master" This reverts commit e97b2b6fc82f840e84dfc631b87f21be44ff2421, reversing changes made to 7e2fb9d09c245eba70ee008b78007315e9c0f1df. Revert "Prepare for upstream 1.42.9" This reverts commit 7e2fb9d09c245eba70ee008b78007315e9c0f1df. Bug: 13340735 Change-Id: If48b153a95ef5f69f7cdccb00e23524abff3c5a8 Signed-off-by: JP Abgrall <jpa@google.com>
* Add files that would normally be generated by the e2fsprogs build systemBernhard Rosenkränzer2014-01-0514-14/+0
| | | | | | | | | | | | | | | | | 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>
* Clean up sparse warningsTheodore Ts'o2013-12-168-58/+20
| | | | | | | Mostly by adding static and removing excess extern qualifiers. Also convert a few remaining non-ANSI function declarations to ANSI. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libss: fix memory handling errorsDarrick J. Wong2013-12-123-1/+10
| | | | | | | Fix memory allocation calculations and check for NULL pointer returns. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libss: fix fd error handlingDarrick J. Wong2013-12-122-0/+6
| | | | | Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* e2fsprogs: add (optional) sparse checking to the buildDarrick J. Wong2013-10-111-0/+1
| | | | | | | | | | Run sparse against source files when building e2fsprogs with 'make C=1'. If instead C=2, it configures basic ext2 types for bitwise checking with sparse, which can help find the (many many) spots where conversion errors are (possibly) happening. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Try to use secure_getenv() in preference to __secure_getenv()Theodore Ts'o2013-06-161-1/+6
| | | | | | | | | If secure_getenv() use it in preference to __secure_getenv(). Starting with (e)glibc version 2.17, secure_getenv() exists, while __secure_getenv() only works with shared library links (where it is a weak symbol), but not for static links with /lib/libc.a Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Put ELF_OTHER_LIBS in the right place for the linkerTheodore Ts'o2012-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | Commit a7c17431b9 attempted to fix a problem where the system libraries might get used instead of local libraries for things like -lcom_err. It tried to accomplish this by moving $(ELF_OTHER_LIBS) to before $(LDFLAGS). Unfortunately, this was the wrong fix; $(ELF_OTHER_LIBS) *MUST* be after the object files, or the linker might not pull in the necessary library and not include it into the DT_NEEDED section of the shared library. The proper fix is to add a -L$(LIB) before $(LDFLAGS), and then remove the -L option from all of the ELF_OTHER_LIBS definitions in the library Makefiles. Addresses-Sourceforge-Bug: #3554345 Cc: Olivier Blin <olivier.blin@softathome.com> Reported-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Change pkg-config files so that both <et/com_err.h> and <com_err.h> workTheodore Ts'o2012-05-141-1/+1
| | | | | | | | | | | | | | | | | | | Change the include path in the Cflags field so that #include <lib/foo.h> and <foo.h> will work. We had originally used a C flags which allowed <foo.h> to work, but many applications (especially those not using pkg-config) had been using the <lob/foo.h> formulation which didn't require an explicit -I{$includedir} option to the C compiler. If those applications then converted over to pkg-config, and the e2fsprogs libraries were installed with a prefix other than /usr, so that the header files were in some directory such as /usr/local/include, a program that used #include <lib/foo.h> would fail to compile. So change the pkg-config files to include both -I{$includedir} and -I{$includir}/lib. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* debugfs: use ss_safe_getenv() instead of getenv()Theodore Ts'o2012-02-151-0/+1
| | | | | | | | In the case where debugfs (or rdebugfs) is installed setgid disk, or some such, we need to disable the use of environment variables for the obvious reasons. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Shorten compile commands run by the build systemTheodore Ts'o2011-09-1815-23/+43
| | | | | | | | | | | | | | | The DEFS line in MCONFIG had gotten so long that it exceeded 4k, and this was starting to cause some tools heartburn. It also made "make V=1" almost useless, since trying to following the individual commands run by make was lost in the noise of all of the defines. So fix this by putting the configure-generated defines in lib/config.h and the directory pathnames to lib/dirpaths.h. In addition, clean up some vestigal defines in configure.in and in the Makefiles to further shorten the cc command lines. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libcom_err: Only output ^M when tty is in raw modeTheodore Ts'o2010-05-151-2/+2
| | | | | | | | | This fixes a long-standing botch in the com_err library, and solves a regression test problem for libss that gets tickled by source code management systems (like Perforce) that don't preserve CRLF line endings with fidelity. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libss: add newer libreadline to dlopen pathEric Sandeen2010-02-051-1/+1
| | | | | | | | | | | Rawhide now has libreadline.so.6 ... add it to the ever-expanding list of libs to look for. Unfortunately without commit 06ef971be505678ee462ae1844204ed24f14aedc this fails in a rather cryptic way. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libss: initialize function pointer for readline_shutdown()Theodore Ts'o2009-11-121-0/+1
| | | | | | | | | | | Clear the function pointer for readline_shutdown() so that if libss is linking against a readline library which doesn't supply a readline_shutdown() function, ss_delete_invocation() won't seg fault. Thanks to Solar Designer <solar@openwall.com> for reporting this problem to me. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Add support for configure --enable-verbose-makecmdsTheodore Ts'o2009-07-021-38/+38
| | | | | | | | | | | | | | | | | Some people don't want to see the concise "kernel-style" make output. This configure option allows build engines that want to see the full set of commands executed by the makefile to get what they want. Most people will find this more distracting than useful, unless they need to debug the Makefiles. (It is not necessary to rerun configure to enable this verbose make output temprarily; if a developer wants to do a quick debug of a directory's makefile, he or she can simply edit the definition of the $(E) and $(Q) variables in the Makefile; instructions can be found in the MCONFIG file which is included in at the beginning of every Makefile.) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Fix Makefile dependencies for libcom_errTheodore Ts'o2009-07-011-1/+1
| | | | | | | | | | | | | | The e2fsprogs makefiles were using the same Makefile variable LIBCOM_ERR for the link-line arguments as well as the dependencies. Since LIBCOM_ERR can now include non-file arguments such as "-lpthread", we need to use a separate DEPLIBCOM_ERR variable that only has build file dependencies. Do the same thing for STATIC_LIBCOM_ERR and PROFILED_LIBCOM_ERR. Addresses-Sourceforge-Patches: #2813809 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libss: Fix warn_unused_result warnings from gccTheodore Ts'o2009-04-221-1/+20
| | | | | | | Fixed a potential bug where by partial returns from the write system call could the fallback pager to drop characters. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libss: ss_execute_line: reflect any error codes from system() to the callerTheodore Ts'o2009-04-221-2/+6
| | | | | | | | This is primarily to silence a gcc warning, but it's better to reflect the error from system() up to the caller. In this case we don't actually use it for anything, but that's OK. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libss: Avoid leak upon failed realloc in ss_add_request_table()Jim Meyering2009-03-081-3/+4
| | | | | Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* remove useless if-before-free testsJim Meyering2009-03-081-2/+1
| | | | | | | | | | | | | | | | | | | In case you're wondering about whether this change is safe from a portability standpoint, fear not. This has been beaten to death in other forums. Here are a few threads: http://thread.gmane.org/gmane.comp.version-control.git/74187 http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/12712 http://thread.gmane.org/gmane.emacs.devel/98144 http://thread.gmane.org/gmane.comp.lib.glibc.alpha/13092 There has been debate about whether it's a good idea from a performance standpoint, too, but imho you'll have a hard time finding an instance where this sort of change induces a measurable performance penalty. If you do, please let me know. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Use format strings directly to prevent -Werror=format-security failuresTheodore Ts'o2009-01-201-2/+2
| | | | | | | | | | | | | | | | | Gcc is too stupid to realize that: const char *usage="String which has no percent signs"; com_err(progname, 0, usage); is OK. I refuse to bow to stupidity with: com_err(progname, 0, "%s", usage); but I will use the string directly for the sake of people who like to build with -Werror=format-security. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Fix pkg-config files: use Requires.private and fix the include directoryTheodore Ts'o2008-09-021-2/+2
| | | | | | Addresses-Sourceforge-Bug: #2089537 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Remove trailing whitespace for the entire source treeTheodore Ts'o2008-08-276-24/+24
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Don't assume that /bin/true is always in /binTheodore Ts'o2008-07-141-1/+1
| | | | | | ... because it isn't on MacOS X Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Flush stdio buffers before calling setbuf()Theodore Ts'o2008-07-131-0/+2
| | | | | | | On Solaris setbuf() will discard any pending output to the stream, so make we call fflush() before calling setbuf(). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Fix Solaris shell script portability issuesTheodore Ts'o2008-07-131-3/+3
| | | | | | | Solaris ships with a pathetically ancient shell in /bin/sh, so fix various shell scripts to accomodate. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Fix LIBSS dependency problem for tests/test_icount and lib/ss/test_ssTheodore Ts'o2008-06-071-1/+1
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Merge branch 'maint'Theodore Ts'o2008-04-171-1/+1
|\
| * Fix non-POSIX ">&" in the Makefile for lib/ss's "make check" ruleTheodore Ts'o2008-04-091-1/+1
| | | | | | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* | Merge branch 'maint' into nextTheodore Ts'o2008-01-011-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: configure debian/rules e2fsck/swapfs.c lib/ext2fs/ext2_fs.h
| * libss: Remove unnecessary Makefile dependency for test_ssTheodore Ts'o2008-01-011-1/+1
| | | | | | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* | Merge branch 'maint' into nextTheodore Ts'o2007-12-171-1/+1
|\| | | | | | | | | | | Conflicts: lib/ext2fs/closefs.c
| * libss: Fix "make check" test case to work portablyTheodore Ts'o2007-12-151-1/+1
| | | | | | | | | | | | | | | | | | The "make check" test in lib/ss would fail if '.' is not in the user's PATH, and if the libss shared library had not yet been installed yet. Addresses-Sourceforge-Bug: #1848974 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* | Merge branch 'maint' into nextTheodore Ts'o2007-12-095-103/+170
|\| | | | | | | | | | | Conflicts: lib/ext2fs/closefs.c
| * libss: Fix parallel build failureTheodore Ts'o2007-12-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | A missing dependency on ss_err.h meant that std_rqs.o could fail when e2fsprogs was being built using make -j. Thanks to Robert Kerr for reporting this bug. Addresses-Sourceforge-Bug: #1842331 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * Fix errors in test_ss.c so it can be an example application and test caseTheodore Ts'o2007-12-025-103/+168
| | | | | | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* | blkid.pc, ss.pc: Move private libs from "Libs:" to "Libs.private:"Dmitry V. Levin2007-11-011-1/+2
|/ | | | | | | | | | According to pkg-config(1) manual page, private libraries should be defined by "Libs.private:" line. Private libraries are libraries which are not exposed through our library, but are needed in the case of static linking. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Remove Changelog files since they're not used after the git migrationTheodore Ts'o2007-07-081-490/+0
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Make it clear in an error message that it is mk_cmds that is complainingTheodore Ts'o2007-06-301-1/+1
| | | | | | Obviates gentoo patch: e2fsprogs-1.32-mk_cmds-cosmetic.patch Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Update Release Notes, Changelogs, version.h, etc. for 1.40 releaseTheodore Ts'o2007-06-241-0/+4
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* [COVERITY] Fix memory leak in libss (ss_execute_line)Brian Behlendorf2007-03-212-1/+11
| | | | | | | | | | | | | | | Fix a memory leak by freeing the argv[] array if ss_parse_line returns 0 for argc 0 (which will happen if the user his return and sends an empty line to the application). Potentially need to free argv before early return since it was allocated memory. Need to be careful since it may be possible for ss_parse() to have freed the memory allocated to it if it detects an unbalanced set of quotes passed to it. Coverity ID: 21: Resource Leak Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
* [COVERITY] Fix bad error checking for NULL parameter in ss libraryBrian Behlendorf2007-03-192-1/+6
| | | | | | | | | | | | Looks like flawed reasoning. Here if info_dir is NULL then you are guaranteed to blow up since you will dereference it. It seems like the correct thing to do here (what the code author meant to do) was to set *code_ptr = SS_ET_NO_INFO_DIR if info_dir was NULL or if *info_dir was an empty string (aka *info_dir == '\0'). Coverity ID: 8: Forward Null Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
* Add libreadline.so.5 to the list of readline libraries used by libssTheodore Ts'o2006-11-172-1/+6
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Set local environment variables to C so mk_cmds and compile_et always workTheodore Ts'o2006-11-122-0/+18
| | | | | | Addresses SourceForge Bug: #1532177 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Add datarootdir definition for compatibility with autoconf 2.60Theodore Ts'o2006-10-222-0/+6
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Create the generated files read-only to remind developers not to edit them.Andreas Dilger2006-08-052-1/+7
| | | | | Signed-off-by: Andreas Dilger <adilger@clusterfs.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Address parallel build problem in the library MakefilesTheodore Ts'o2005-12-102-0/+8
| | | | | | | | | | Add a dependency to make sure that the subdirectories are created before creating all of the object files. Addresses Sourceforge Bug: #1261553 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Fix false positives from valgrind: prctl(PR_GET_DUMPABLE)Theodore Ts'o2005-07-252-2/+8
| | | | | | | | | Pass in zero to the unusued arguments of prctl(PR_GET_DUMPABLE) to avoid false positives from valgrind. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Update for e2fsprogs 1.38 release.Theodore Ts'o2005-06-301-0/+4
|