The attached patch adds a central errno.h to libsepol and converts several existing error numbers. This will unify the error numbers, remove duplication, and prevent overlapping error numbers (a source of potential bugs). Existing return values from functions exposed as part of the binary interface are not changed. Signed-off-by: Karl MacMillan checkpolicy/policy_parse.y | 15 ++--- libsepol/include/sepol/errno.h | 38 +++++++++++++ libsepol/include/sepol/policydb/hashtab.h | 43 ++++++++++----- libsepol/include/sepol/policydb/link.h | 11 +-- libsepol/src/avtab.c | 18 +++--- libsepol/src/expand.c | 7 +- libsepol/src/hashtab.c | 45 +++++++++++----- libsepol/src/link.c | 33 ++++++----- libsepol/src/policydb.c | 6 +- libsepol/src/private.h | 4 + policycoreutils/semodule_deps/semodule_deps.c | 9 +-- 11 files changed, 156 insertions(+), 73 deletions(-)