docs/125546: [patch] ktrace(2) contains outdated struct ktr_header

Mateusz Guzik mjguzik at gmail.com
Sat Jul 12 17:30:01 UTC 2008


>Number:         125546
>Category:       docs
>Synopsis:       [patch] ktrace(2) contains outdated struct ktr_header
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 12 17:30:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Mateusz Guzik
>Release:        8.0-CURRENT
>Organization:
>Environment:
FreeBSD eternal 8.0-CURRENT FreeBSD 8.0-CURRENT #14: Tue Jul  8 02:28:46 CEST 2008     f at eternal:/usr/obj/usr/src/sys/ETERNAL  i386

>Description:
struct ktr_header in ktrace(2):
[..]
caddr_t ktr_buf;
};

struct ktr_header in /usr/include/sys/ktrace.h:
[..]
intptr_t        ktr_tid;        /* was ktr_buffer */
};

>How-To-Repeat:

>Fix:
Patch is attached.

Patch attached with submission follows:

--- ./lib/libc/sys/ktrace.2.orig	2008-07-12 18:54:22.000000000 +0200
+++ ./lib/libc/sys/ktrace.2	2008-07-12 19:16:53.000000000 +0200
@@ -99,11 +99,11 @@
 	int	ktr_len;		/* length of buf */
 	short	ktr_type;		/* trace record type */
 	pid_t	ktr_pid;		/* process id */
 	char	ktr_comm[MAXCOMLEN+1];	/* command name */
 	struct	timeval ktr_time;	/* timestamp */
-	caddr_t	ktr_buf;
+	intptr_t	ktr_tid;
 };
 .Ed
 .Pp
 The
 .Va ktr_len
@@ -118,12 +118,12 @@
 The
 .Va ktr_time
 field gives the time (with microsecond resolution)
 that the record was generated.
 The
-.Va ktr_buf
-is an internal kernel pointer and is not useful.
+.Va ktr_tid
+field holds a threadid.
 .Pp
 The generic header is followed by
 .Va ktr_len
 bytes of a
 .Va ktr_type


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-doc mailing list