*/
/*
* 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
#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"
{
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)
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,