diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-07-08 11:05:31 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-07-08 14:09:10 +0200 |
commit | 7d757d6ac3be143bb08d2deb61a4b2211b4d22cd (patch) | |
tree | 2259fa81b479789adc244fe92b895d6236ffe7bc | |
parent | 83301d8b5a96823a90ab3f25effd2d4c28a6d8c9 (diff) | |
download | samba-7d757d6ac3be143bb08d2deb61a4b2211b4d22cd.tar.gz samba-7d757d6ac3be143bb08d2deb61a4b2211b4d22cd.tar.bz2 samba-7d757d6ac3be143bb08d2deb61a4b2211b4d22cd.zip |
s3:libsmb: remove unused smb_dos_errstr()
metze
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/libsmb/smberr.c | 42 |
2 files changed, 0 insertions, 43 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 822ed1cd15..5d15e4e77a 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1135,7 +1135,6 @@ bool netsamlogon_cache_have(const struct dom_sid *user_sid); const char *smb_dos_err_name(uint8 e_class, uint16 num); const char *get_dos_error_msg(WERROR result); const char *smb_dos_err_class(uint8 e_class); -char *smb_dos_errstr(char *inbuf); WERROR map_werror_from_unix(int error); /* The following definitions come from libsmb/trustdom_cache.c */ diff --git a/source3/libsmb/smberr.c b/source3/libsmb/smberr.c index 1156a9d75d..21d7f8860b 100644 --- a/source3/libsmb/smberr.c +++ b/source3/libsmb/smberr.c @@ -214,48 +214,6 @@ const char *smb_dos_err_class(uint8 e_class) return result; } -/**************************************************************************** -return a SMB string from an SMB buffer -****************************************************************************/ -char *smb_dos_errstr(char *inbuf) -{ - char *result; - int e_class = CVAL(inbuf,smb_rcls); - int num = SVAL(inbuf,smb_err); - int i,j; - - for (i=0;err_classes[i].e_class;i++) - if (err_classes[i].code == e_class) { - if (err_classes[i].err_msgs) { - err_code_struct *err = err_classes[i].err_msgs; - for (j=0;err[j].name;j++) - if (num == err[j].code) { - if (DEBUGLEVEL > 0) - result = talloc_asprintf( - talloc_tos(), "%s - %s (%s)", - err_classes[i].e_class, - err[j].name,err[j].message); - else - result = talloc_asprintf( - talloc_tos(), "%s - %s", - err_classes[i].e_class, - err[j].name); - goto done; - } - } - - result = talloc_asprintf(talloc_tos(), "%s - %d", - err_classes[i].e_class, num); - goto done; - } - - result = talloc_asprintf(talloc_tos(), "Error: Unknown error (%d,%d)", - e_class, num); - done: - SMB_ASSERT(result != NULL); - return result; -} - /***************************************************************************** map a unix errno to a win32 error *****************************************************************************/ |