Commit Graph

15 Commits (a46300fe703a03185575ad1b45ff03e90d76f04c)

Author SHA1 Message Date
Darrick J. Wong a46300fe70 misc: create better-packaged static analysis reports
Fix some minor bugs relating to passing CFLAGS to cppcheck, and
package the cppcheck output into nicer looking reports.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-05-11 18:32:07 -04:00
Theodore Ts'o c9bc7484cc Merge branch 'maint' into next
Conflicts:
	e2fsck/pass1.c
2014-05-11 18:30:11 -04:00
David Michael 4e2d9f7f4e Add a make variable for the pkgconfig install dir
Adding the pkgconfigdir variable allows specifying an installation
location for pkg-config files independent of libdir.

Signed-off-by: David Michael <fedora.dm0@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-05-07 10:51:50 -04:00
Darrick J. Wong f1605243a4 all: Introduce cppcheck static checking for make C=1
Introduce more static checking via cppcheck.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-03-14 09:32:50 -04:00
Theodore Ts'o c714d02482 Fix up the Makefiles dependencies in lib/ext2fs and lib/quota
Also use angle brackets for the #include of dirpaths.h to avoid the
need to manually massage the Makefile.in for the util directory.  This
is needed because we have to create a fake dirpaths.h file in the util
directory.  The fake dirpaths.h file is rquired to break the circular
dependency caused by util/subst creating dirpaths.h, while
util/subst.c is including config.h, which includes dirpaths.h.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-30 18:48:23 -05:00
Darrick J. Wong 832cb612f8 e2fsprogs: add (optional) sparse checking to the build
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>
2013-10-11 23:12:40 -04:00
Theodore Ts'o d5aa6a82b3 Put ELF_OTHER_LIBS in the right place for the linker
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>
2012-08-06 12:30:49 -04:00
Jan Kara 2ae58b6d5c libquota: remove unnecessary definitions
Quite some definitions in quota library are not necessary. Remove them.
Also fold quota.h file into quotaio.h since it didn't contain that many
definitions.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-06-04 12:51:55 -04:00
Aditya Kali a86d55da8b libquota: cleanup libquota code
This patch cleans up the quota code as suggested in previous reviews. This
includes
* remove BUG_ON()s and 'exit()' calls from library code
* remove calls to malloc/free and instead use ext2fs_get/free_mem functions.
* lib/quota/common.c file in not needed anymore and is removed.
* rename exported functions to start with quota_
  (ex: init_quota_context --> quota_init_context)
* better error handling in quota library

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-14 10:55:54 -05:00
Theodore Ts'o 756690a29e libext2fs, libquota: fix some makefile dependency issues
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-03 14:57:51 -04:00
Theodore Ts'o 8f9d708f6a libquota: only build a static library
Since the libquota library has namespace contamination issues, don't
build a shared library and link against it statically.  Don't include
it as part of the Debian packages.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-19 13:39:38 -04:00
Theodore Ts'o d1154eb460 Shorten compile commands run by the build system
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>
2011-09-18 17:34:37 -04:00
Theodore Ts'o cd0b97ed93 libquota: indicate in the ELF library image that it requires libext2fs
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-16 11:12:59 -04:00
Theodore Ts'o 449c87a49c libquota: fix "make install" so it works in with a VPATH build directory
Also fix up the name of the header file which we are installing so it
is correct.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-14 13:47:35 -04:00
Aditya Kali f239fefc14 e2fsprogs: add quota library to e2fsprogs
This patch adds the quota library (ported form Jan Kara's quota-tools) in
e2fsprogs in order to make quotas as a first class supported feature in Ext4.
This patch also provides interface in lib/quota/mkquota.h that will be used by
mke2fs, tune2fs, e2fsck, etc. to initialize and update quota files.
This first version of the quota library does not support reading existing quota
files. This support will be added in the near future.
Thanks to Jan Kara for his work on quota-tools. Most of the files in this patch
are taken as-is from quota tools and were simply modified to work with
libext2fs in e2fsprogs.

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-08-31 15:21:40 -04:00