From ddcab787c408824ff753b929abd2240bc088451d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 1 Nov 2008 17:19:26 +0100 Subject: Rename dos_errstr() to win_errstr() for consistency with Samba 4. --- source3/libsmb/doserr.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) (limited to 'source3/libsmb') diff --git a/source3/libsmb/doserr.c b/source3/libsmb/doserr.c index 0cccae1e6af..f2f87dc2123 100644 --- a/source3/libsmb/doserr.c +++ b/source3/libsmb/doserr.c @@ -1,18 +1,18 @@ -/* +/* * Unix SMB/CIFS implementation. * DOS error routines * Copyright (C) Tim Potter 2002. - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ @@ -21,17 +21,17 @@ #include "includes.h" -typedef const struct { +struct werror_code_struct { const char *dos_errstr; WERROR werror; -} werror_code_struct; +}; -typedef const struct { +struct werror_str_struct { WERROR werror; const char *friendly_errstr; -} werror_str_struct; +}; -werror_code_struct dos_errs[] = +const struct werror_code_struct dos_errs[] = { { "WERR_OK", WERR_OK }, { "WERR_GENERAL_FAILURE", WERR_GENERAL_FAILURE }, @@ -126,7 +126,7 @@ werror_code_struct dos_errs[] = { NULL, W_ERROR(0) } }; -werror_str_struct dos_err_strs[] = { +const struct werror_str_struct dos_err_strs[] = { { WERR_OK, "Success" }, { WERR_ACCESS_DENIED, "Access is denied" }, { WERR_INVALID_PARAM, "Invalid parameter" }, @@ -159,7 +159,7 @@ werror_str_struct dos_err_strs[] = { Returns a DOS error message. not amazingly helpful, but better than a number. *****************************************************************************/ -const char *dos_errstr(WERROR werror) +const char *win_errstr(WERROR werror) { char *result; int idx = 0; @@ -192,11 +192,5 @@ const char *get_friendly_werror_msg(WERROR werror) } } - return dos_errstr(werror); -} - -/* compat function for samba4 */ -const char *win_errstr(WERROR werror) -{ - return dos_errstr(werror); + return win_errstr(werror); } -- cgit