Whamcloud - gitweb
LU-14651 uapi: rename CONFIG_T_* to MGS_CFG_T_*
[fs/lustre-release.git] / lustre / utils / debug.c
index d9fe439..96bbf1d 100644 (file)
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/utils/debug.c
  * Some day I'll split all of this functionality into a cfs_debug module
@@ -69,8 +68,8 @@ static int debug_mask = ~0;
 
 #define MAX_MARK_SIZE 256
 
-static const char *libcfs_debug_subsystems[] = LIBCFS_DEBUG_SUBSYS_NAMES;
-static const char *libcfs_debug_masks[] = LIBCFS_DEBUG_MASKS_NAMES;
+static const char *const libcfs_debug_subsystems[] = LIBCFS_DEBUG_SUBSYS_NAMES;
+static const char *const libcfs_debug_masks[] = LIBCFS_DEBUG_MASKS_NAMES;
 
 #define DAEMON_CTL_NAME                "daemon_file"
 #define SUBSYS_DEBUG_CTL_NAME  "subsystem_debug"
@@ -197,7 +196,7 @@ static int applymask(char *param, int value)
 {
        int     rc;
        char    buf[64];
-       int     len = snprintf(buf, 64, "%d", value);
+       int     len = scnprintf(buf, sizeof(buf), "%d", value);
 
        int fd = dbg_open_ctlhandle(param);
        if (fd < 0)
@@ -286,7 +285,7 @@ static void print_rec(struct dbg_line ***linevp, int used, int fdout)
                int                      bytes;
                ssize_t                  bytes_written;
 
-               bytes = snprintf(out, sizeof(out),
+               bytes = scnprintf(out, sizeof(out),
                                "%08x:%08x:%u.%u%s:%u.%06llu:%u:%u:%u:"
                                "(%s:%u:%s()) %s",
                                hdr->ph_subsys, hdr->ph_mask,