Add WERR_SERVICE_ALREADY_RUNNING.
[sfrench/samba-autobuild/.git] / source3 / libsmb / doserr.c
index 02db625685c82a55fabed78ca76fe95617266c89..52afb0d0229666ffd81693bfd07e67ed20f69392 100644 (file)
@@ -5,7 +5,7 @@
  *  
  *  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 2 of the License, or
+ *  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,
@@ -14,8 +14,7 @@
  *  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, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 /* DOS error codes.  please read doserr.h */
 
 typedef const struct
 {
-       char *dos_errstr;
+       const char *dos_errstr;
        WERROR werror;
 } werror_code_struct;
 
 werror_code_struct dos_errs[] =
 {
        { "WERR_OK", WERR_OK },
+       { "WERR_GENERAL_FAILURE", WERR_GENERAL_FAILURE },
        { "WERR_BADFILE", WERR_BADFILE },
        { "WERR_ACCESS_DENIED", WERR_ACCESS_DENIED },
        { "WERR_BADFID", WERR_BADFID },
        { "WERR_BADFUNC", WERR_BADFUNC },
        { "WERR_INSUFFICIENT_BUFFER", WERR_INSUFFICIENT_BUFFER },
+       { "WERR_SEM_TIMEOUT", WERR_SEM_TIMEOUT },
        { "WERR_NO_SUCH_SHARE", WERR_NO_SUCH_SHARE },
        { "WERR_ALREADY_EXISTS", WERR_ALREADY_EXISTS },
        { "WERR_INVALID_PARAM", WERR_INVALID_PARAM },
@@ -58,6 +59,7 @@ werror_code_struct dos_errs[] =
        { "WERR_JOB_NOT_FOUND", WERR_JOB_NOT_FOUND },
        { "WERR_DEST_NOT_FOUND", WERR_DEST_NOT_FOUND },
        { "WERR_NOT_LOCAL_DOMAIN", WERR_NOT_LOCAL_DOMAIN },
+       { "WERR_NO_LOGON_SERVERS", WERR_NO_LOGON_SERVERS },
        { "WERR_PRINTER_DRIVER_IN_USE", WERR_PRINTER_DRIVER_IN_USE },
        { "WERR_STATUS_MORE_ENTRIES  ", WERR_STATUS_MORE_ENTRIES },
        { "WERR_DFS_NO_SUCH_VOL", WERR_DFS_NO_SUCH_VOL },
@@ -65,15 +67,32 @@ werror_code_struct dos_errs[] =
        { "WERR_DFS_NO_SUCH_SERVER", WERR_DFS_NO_SUCH_SERVER },
        { "WERR_DFS_INTERNAL_ERROR", WERR_DFS_INTERNAL_ERROR },
        { "WERR_DFS_CANT_CREATE_JUNCT", WERR_DFS_CANT_CREATE_JUNCT },
+       { "WERR_MACHINE_LOCKED", WERR_MACHINE_LOCKED },
+       { "WERR_DOMAIN_CONTROLLER_NOT_FOUND", WERR_DOMAIN_CONTROLLER_NOT_FOUND },
+       { "WERR_DEVICE_NOT_AVAILABLE", WERR_DEVICE_NOT_AVAILABLE },
+       { "WERR_LOGON_FAILURE", WERR_LOGON_FAILURE },
+       { "WERR_NO_SUCH_DOMAIN", WERR_NO_SUCH_DOMAIN },
        { "WERR_INVALID_SECURITY_DESCRIPTOR", WERR_INVALID_SECURITY_DESCRIPTOR },
        { "WERR_INVALID_OWNER", WERR_INVALID_OWNER },
+       { "WERR_SERVER_UNAVAILABLE", WERR_SERVER_UNAVAILABLE },
+       { "WERR_IO_PENDING", WERR_IO_PENDING },
+       { "WERR_INVALID_SERVICE_CONTROL", WERR_INVALID_SERVICE_CONTROL },
+       { "WERR_SERVICE_ALREADY_RUNNING", WERR_SERVICE_ALREADY_RUNNING },
+       { "WERR_NET_NAME_NOT_FOUND", WERR_NET_NAME_NOT_FOUND },
+       { "WERR_REG_CORRUPT", WERR_REG_CORRUPT },
+       { "WERR_REG_IO_FAILURE", WERR_REG_IO_FAILURE },
+       { "WERR_REG_FILE_INVALID", WERR_REG_FILE_INVALID },
+       { "WERR_SERVICE_DISABLED", WERR_SERVICE_DISABLED },
+       { "WERR_CAN_NOT_COMPLETE", WERR_CAN_NOT_COMPLETE},
+       { "WERR_INVALID_FLAGS", WERR_INVALID_FLAGS},
        { NULL, W_ERROR(0) }
 };
 
 /*****************************************************************************
returns a DOS error message.  not amazingly helpful, but better than a number.
Returns a DOS error message.  not amazingly helpful, but better than a number.
  *****************************************************************************/
-char *dos_errstr(WERROR werror)
+
+const char *dos_errstr(WERROR werror)
 {
         static pstring msg;
         int idx = 0;