maint: refactor SMACK interface to a separate module 18/8318/1
authorPádraig Brady <P@draigBrady.com>
Tue, 2 Jul 2013 02:42:20 +0000 (03:42 +0100)
committerMichael Demeter <michael.demeter@intel.com>
Mon, 12 Aug 2013 22:55:31 +0000 (15:55 -0700)
commitff17cbca5ea4784266d5fd967bba06cb248ec901
tree20edc7483c18249b957f6d89cbf6252b09ffae34
parent0224b79c7cee7d7e6ca2b7d7fa2b81e644409f1f
maint: refactor SMACK interface to a separate module

Consolidate all smack routines and checks in a module.
We replace and wrap the most commonly used smack routines,
which allows removing ifdefs throughout the code.

* gl/lib/smack.h: A new header containing the implementation
of the wrapped and replacement routines.  Note the is_smack_enabled()
routine should be optimized out at compile time when compiled
on a system without libsmack.
* gl/modules/smack: Describe the new module and move the
configure time code here from ...
* m4/jm-macros.m4: ... here.
* bootstrap.conf: Reference the new module.
* src/id.c: Use the routines without ifdefs where possible.
* src/ls.c: Likewise.
* src/mkdir.c: Likewise.
* src/mkfifo.c: Likewise.
* src/mknod.c: Likewise.
bootstrap.conf
gl/lib/smack.h [new file with mode: 0644]
gl/modules/smack [new file with mode: 0644]
m4/jm-macros.m4
src/id.c
src/ls.c
src/mkdir.c
src/mkfifo.c
src/mknod.c