]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Remove SMBC_errno()
authorVolker Lendecke <vl@samba.org>
Sat, 23 Sep 2023 01:44:14 +0000 (18:44 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 25 Sep 2023 19:01:34 +0000 (19:01 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/include/libsmb_internal.h
source3/libsmb/libsmb_misc.c

index 6ca265ad38a76d6be8916248acd5e0d116fb0405..b695995dbcc2857ffd9333b1dc2b1a1b660bca0b 100644 (file)
@@ -431,11 +431,6 @@ SMBC_ftruncate_ctx(SMBCCTX *context,
 /* Functions in libsmb_misc.c */
 bool SMBC_dlist_contains(SMBCFILE * list, SMBCFILE *p);
 
-int
-SMBC_errno(SMBCCTX *context,
-           struct cli_state *c);
-
-
 /* Functions in libsmb_path.c */
 int
 SMBC_parse_path(TALLOC_CTX *ctx,
index 28e2ca842cf141e40111d8debb8971634054f21b..450989567fcfaec379f5459d500af0b38e29ea53 100644 (file)
@@ -44,34 +44,3 @@ bool SMBC_dlist_contains(SMBCFILE * list, SMBCFILE *p)
        } while (list != NULL);
        return false;
 }
-
-
-/*
- * Convert an SMB error into a UNIX error ...
- */
-int
-SMBC_errno(SMBCCTX *context,
-           struct cli_state *c)
-{
-       int ret = cli_errno(c);
-
-        if (cli_is_dos_error(c)) {
-                uint8_t eclass;
-                uint32_t ecode;
-
-                cli_dos_error(c, &eclass, &ecode);
-
-                DEBUG(3,("smbc_error %d %d (0x%x) -> %d\n",
-                         (int)eclass, (int)ecode, (int)ecode, ret));
-        } else {
-                NTSTATUS status;
-
-                status = cli_nt_error(c);
-
-                DEBUG(3,("smbc errno %s -> %d\n",
-                         nt_errstr(status), ret));
-        }
-
-       return ret;
-}
-