diff options
author | jhb <jhb@FreeBSD.org> | 2001-02-20 10:39:55 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-02-20 10:39:55 +0000 |
commit | a2bd088e1dccd04ac2f4a66680c2c395f62100d7 (patch) | |
tree | 5c31e5ee304d1b5d49c972ff1dc60d367a22ac53 /sys/kern | |
parent | 42c3bc11f77e4f4db20fe05eb17724708e022851 (diff) | |
download | FreeBSD-src-a2bd088e1dccd04ac2f4a66680c2c395f62100d7.zip FreeBSD-src-a2bd088e1dccd04ac2f4a66680c2c395f62100d7.tar.gz |
- In the KTR_EXTEND case, use a const char * to point to the passed in
filename insteada of copying the first 32 characters of it.
- Add in const modifiers for the passed in format strings and filenames
and their respective members in the ktr_entry struct.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_ktr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_ktr.c b/sys/kern/kern_ktr.c index cde019a..3f00c8d 100644 --- a/sys/kern/kern_ktr.c +++ b/sys/kern/kern_ktr.c @@ -108,11 +108,12 @@ SYSCTL_INT(_debug_ktr, OID_AUTO, verbose, CTLFLAG_RW, &ktr_verbose, 0, ""); #ifdef KTR #ifdef KTR_EXTEND void -ktr_tracepoint(u_int mask, char *filename, u_int line, char *format, ...) +ktr_tracepoint(u_int mask, const char *filename, u_int line, + const char *format, ...) #else void -ktr_tracepoint(u_int mask, char *format, u_long arg1, u_long arg2, u_long arg3, - u_long arg4, u_long arg5) +ktr_tracepoint(u_int mask, const char *format, u_long arg1, u_long arg2, + u_long arg3, u_long arg4, u_long arg5) #endif { struct ktr_entry *entry; @@ -147,8 +148,7 @@ ktr_tracepoint(u_int mask, char *format, u_long arg1, u_long arg2, u_long arg3, else nanotime(&entry->ktr_tv); #ifdef KTR_EXTEND - strncpy(entry->ktr_filename, filename, KTRFILENAMESIZE - 1); - entry->ktr_filename[KTRFILENAMESIZE - 1] = '\0'; + entry->ktr_filename = filename; entry->ktr_line = line; entry->ktr_cpu = KTR_CPU; va_start(ap, format); |