fault: rename fault.c to fault_s4.c
authorAndrew Tridgell <tridge@samba.org>
Tue, 22 Mar 2011 23:22:15 +0000 (10:22 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 23 Mar 2011 00:03:57 +0000 (11:03 +1100)
this is in preparation for merging the s3 fault code into common

lib/util/fault_s4.c [moved from lib/util/fault.c with 97% similarity]
lib/util/wscript_build

similarity index 97%
rename from lib/util/fault.c
rename to lib/util/fault_s4.c
index 29b45ee147e601cffc3b443a00102b957620f758..0f902b4f841863d0045e5b0708f4e6c0acb3f018 100644 (file)
@@ -1,18 +1,18 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
    Critical Fault handling
    Copyright (C) Andrew Tridgell 1992-1998
-   
+
    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 <http://www.gnu.org/licenses/>.
 */
@@ -58,9 +58,9 @@ _PUBLIC_ void call_backtrace(void)
        backtrace_size = backtrace(backtrace_stack,BACKTRACE_STACK_SIZE);
        backtrace_strings = backtrace_symbols(backtrace_stack, backtrace_size);
 
-       DEBUG(0, ("BACKTRACE: %lu stack frames:\n", 
+       DEBUG(0, ("BACKTRACE: %lu stack frames:\n",
                  (unsigned long)backtrace_size));
-       
+
        if (backtrace_strings) {
                int i;
 
@@ -156,7 +156,7 @@ report a fault
 _NORETURN_ static void fault_report(int sig)
 {
        static int counter;
-       
+
        if (counter) _exit(1);
 
        DEBUG(0,("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n"));
@@ -215,15 +215,15 @@ _PUBLIC_ void fault_setup_disable(void)
 
 
 /**
-  register a fault handler. 
+  register a fault handler.
   Should only be called once in the execution of smbd.
 */
-_PUBLIC_ bool register_fault_handler(const char *name, 
+_PUBLIC_ bool register_fault_handler(const char *name,
                                     void (*fault_handler)(int sig))
 {
        if (fault_handlers.name != NULL) {
                /* it's already registered! */
-               DEBUG(2,("fault handler '%s' already registered - failed '%s'\n", 
+               DEBUG(2,("fault handler '%s' already registered - failed '%s'\n",
                         fault_handlers.name, name));
                return false;
        }
index 7c18075faa5569c666a918b3b8d23f41cd650f5a..8cbb8bb8938422e5f1474568284f690ac6e4d6f2 100755 (executable)
@@ -20,7 +20,7 @@ bld.SAMBA_LIBRARY('samba-util-common',
 
 if bld.env._SAMBA_BUILD_ == 4:
     bld.SAMBA_LIBRARY('samba-util',
-                      source='''dprintf.c fault.c data_blob.c
+                      source='''dprintf.c fault_s4.c data_blob.c
                       ms_fnmatch.c parmlist.c substitute.c util_str.c
                       ''',
                       deps='samba-util-common',