This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Improve _sock_family_str's sock_family string to tapset


Hi, everyone

I think it may be necessary to improve tapset's _sock_family_str function
in aux_syscalls.stp.

Because the following notes exists in /usr/include/linux/socket.h:
#define PF_LOCAL  1        /* Local to host (pipes and file-domain).  */
#define PF_UNIX   PF_LOCAL /* Old BSD name for PF_LOCAL.              */
#define PF_FILE   PF_LOCAL /* Another non-standard name for PF_LOCAL. */

I think stap should print PF_LOCAL instead of PF_UNIX when value of
sock_family is 1.

The bug can be fixed by the following patch:

Signed-off-by: "Zhaolei" zhaolei@cn.fujitsu.com

--- aux_syscalls.old.stp 2007-08-16 10:13:12.000000000 +0900
+++ aux_syscalls.stp 2007-08-16 10:14:31.000000000 +0900
@@ -1539,7 +1539,6 @@ function _sockopt_level_str(l) {
 
 function _sock_family_str(f) {
    if(f==0) return "PF_UNSPEC"
-   if(f==1) return "PF_UNIX"
    if(f==1) return "PF_LOCAL"
    if(f==2) return "PF_INET"
    if(f==3) return "PF_AX25"

Regards
Zhaolei


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]