Whamcloud - gitweb
b=17167 libcfs: ensure all libcfs exported symbols to have cfs_ prefix
[fs/lustre-release.git] / libcfs / libcfs / posix / posix-debug.c
index f26a085..6ca0bb2 100644 (file)
@@ -16,8 +16,8 @@
  * in the LICENSE file that accompanied this code).
  *
  * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
  *
  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  * CA 95054 USA or visit www.sun.com if you need additional information or
@@ -65,8 +65,8 @@ static char source_nid[sizeof(tmp_utsname->nodename)];
 #endif /* HAVE_CATAMOUNT_DATA_H */
 
 static int source_pid;
-int smp_processor_id = 1;
-char debug_file_path[1024];
+int cfs_smp_processor_id = 1;
+char libcfs_debug_file_path[1024];
 FILE *debug_file_fd;
 
 int portals_do_debug_dumplog(void *arg)
@@ -176,15 +176,17 @@ int libcfs_debug_init(unsigned long bufsize)
 
         debug_filename = getenv("LIBLUSTRE_DEBUG_BASE");
         if (debug_filename)
-                strncpy(debug_file_path,debug_filename,sizeof(debug_file_path));
+                strncpy(libcfs_debug_file_path, debug_filename,
+                        sizeof(libcfs_debug_file_path));
 
         debug_filename = getenv("LIBLUSTRE_DEBUG_FILE");
         if (debug_filename)
                 strncpy(debug_file_name,debug_filename,sizeof(debug_file_name));
 
-        if (debug_file_name[0] == '\0' && debug_file_path[0] != '\0')
+        if (debug_file_name[0] == '\0' && libcfs_debug_file_path[0] != '\0')
                 snprintf(debug_file_name, sizeof(debug_file_name) - 1,
-                         "%s-%s-"CFS_TIME_T".log", debug_file_path, source_nid, time(0));
+                         "%s-%s-"CFS_TIME_T".log", libcfs_debug_file_path,
+                         source_nid, time(0));
 
         if (strcmp(debug_file_name, "stdout") == 0 ||
             strcmp(debug_file_name, "-") == 0) {
@@ -216,7 +218,7 @@ int libcfs_debug_clear_buffer(void)
         return 0;
 }
 
-int libcfs_debug_mark_buffer(char *text)
+int libcfs_debug_mark_buffer(const char *text)
 {
 
         fprintf(debug_file_fd, "*******************************************************************************\n");