From: Michael Tokarev Date: Mon, 18 Nov 2024 09:45:08 +0000 (+0300) Subject: libsamba-errors: eliminate dependency on samba-debug X-Git-Tag: tdb-1.4.13~245 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6ba12c5dedfd34ad1e4390c7d0007b06ef418101;p=thirdparty%2Fsamba.git libsamba-errors: eliminate dependency on samba-debug libsamba-errors is a collection of error codes/descriptions like strerror(), - it is a set of simple functions converting error code to string or the like. However, in one single place there's a DBG_DEBUG() "call" in errmap_unix.c, in map_errno_from_nt_status(), which is here for a very long time (since before samba3, initially with debug level 10). Drop this debugging info, and eliminate extra dependency. This makes libsamba-errors independent and self-contained, with a well-known and stable ABI. Signed-off-by: Michael Tokarev Reviewed-by: Andreas Schneider Reviewed-by: Pavel Filipenský --- diff --git a/libcli/util/errmap_unix.c b/libcli/util/errmap_unix.c index 16c7b4916e7..60e570cca90 100644 --- a/libcli/util/errmap_unix.c +++ b/libcli/util/errmap_unix.c @@ -277,10 +277,7 @@ int map_errno_from_nt_status(NTSTATUS status) { size_t i; - DBG_DEBUG("32 bit codes: code=%08x\n", NT_STATUS_V(status)); - /* Status codes without this bit set are not errors */ - if (!(NT_STATUS_V(status) & 0xc0000000)) { return 0; } diff --git a/libcli/util/wscript_build b/libcli/util/wscript_build index 64bd21e19ca..19c5d3bd24e 100644 --- a/libcli/util/wscript_build +++ b/libcli/util/wscript_build @@ -6,7 +6,7 @@ bld.SAMBA_LIBRARY('samba-errors', private_headers='nterr_private.h', header_path='core', source='doserr.c errormap.c nterr.c errmap_unix.c hresult.c', - public_deps='talloc samba-debug', + public_deps='talloc', deps='gnutls', # private_library=True, pc_files=[],