[ofa-general] ***SPAM*** [PATCH] libsdp: write fcntl argument in debug prints

Yossi Etigin yossi.openib at gmail.com
Wed Aug 20 09:51:24 PDT 2008


Log the actual argument, instead of 0.

Signed-off-by: Yossi Etigin <yosefe at voltaire.com>

---
 src/port.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: b/src/port.c
===================================================================
--- a/src/port.c	2008-08-18 22:31:24.000000000 +0300
+++ b/src/port.c	2008-08-18 22:31:55.000000000 +0300
@@ -745,16 +745,16 @@ fcntl(
 
 	shadow_fd = get_shadow_fd_by_fd( fd );
 
-	__sdp_log( 2, "FCNTL: <%s:%d:%d> command <%d> argument <%d>\n",
-				  program_invocation_short_name, fd, shadow_fd, cmd, 0 );
+	__sdp_log( 2, "FCNTL: <%s:%d:%d> command <%d> argument <%p>\n",
+				  program_invocation_short_name, fd, shadow_fd, cmd, arg );
 
 	ret = _socket_funcs.fcntl( fd, cmd, arg );
 	if ( ( ret >= 0 ) && ( -1 != shadow_fd ) ) {
 		sret = _socket_funcs.fcntl( shadow_fd, cmd, arg );
 		if ( sret < 0 ) {
 			__sdp_log( 9, "Error fcntl:"
-						  " <%d> calling fcntl(%d, %d, %x) for SDP socket. Closing it.\n",
-						  shadow_fd, cmd, 0, errno );
+						  " <%d> calling fcntl(%d, %d, %p) for SDP socket. Closing it.\n",
+						  shadow_fd, cmd, arg, errno );
 			cleanup_shadow( fd );
 		}
 	}



More information about the general mailing list