From owner-svn-soc-all@FreeBSD.ORG Sat Jun 29 13:45:48 2013 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 15A28550 for ; Sat, 29 Jun 2013 13:45:48 +0000 (UTC) (envelope-from dpl@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) by mx1.freebsd.org (Postfix) with ESMTP id 079ED16E6 for ; Sat, 29 Jun 2013 13:45:48 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5TDjlcM044823 for ; Sat, 29 Jun 2013 13:45:47 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.7/8.14.6/Submit) id r5TDjlie044820 for svn-soc-all@FreeBSD.org; Sat, 29 Jun 2013 13:45:47 GMT (envelope-from dpl@FreeBSD.org) Date: Sat, 29 Jun 2013 13:45:47 GMT Message-Id: <201306291345.r5TDjlie044820@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to dpl@FreeBSD.org using -f From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r253682 - in soc2013/dpl/head: contrib/bzip2 usr.bin/bzip2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jun 2013 13:45:48 -0000 Author: dpl Date: Sat Jun 29 13:45:47 2013 New Revision: 253682 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=253682 Log: Added debugging printf. Modified: soc2013/dpl/head/contrib/bzip2/bzip2.c soc2013/dpl/head/usr.bin/bzip2/Makefile Modified: soc2013/dpl/head/contrib/bzip2/bzip2.c ============================================================================== --- soc2013/dpl/head/contrib/bzip2/bzip2.c Sat Jun 29 13:33:23 2013 (r253681) +++ soc2013/dpl/head/contrib/bzip2/bzip2.c Sat Jun 29 13:45:47 2013 (r253682) @@ -235,7 +235,7 @@ struct msghdr msg; struct cmsghdr *cmsg; - char buf = { 0 }; + char buf = { "!" }; struct iovec io[1]; io[0].iov_base = buf; @@ -248,11 +248,13 @@ msg.msg_control = cmsg; msg.msg_controllen = CMSG_LEN(sizeof(int)); + printf("About to set CMSG\n"); cmsg->cmsg_len = msg.msg_controllen; cmsg->cmsg_level = SOL_SOCKET; cmsg->cmsg_type = SCM_RIGHTS; + printf("About to set CMSG_DATA as fd\n"); *(int *)CMSG_DATA(cmsg) = fd; - /*Why does sendmsg set errno to 9 EBADF.*/ + printf("CMSG_DATA = fd\n"); if(sendmsg(s, &msg, 0) < 0) return -1; return 0; @@ -261,12 +263,11 @@ int recvfd(int s) { - printf("recvfd on socket:%d\n",s); int fd; struct msghdr msg; struct cmsghdr *cmsg; - char buf = { 0 }; + char buf = { "!" }; struct iovec io[1]; io[0].iov_base = buf; Modified: soc2013/dpl/head/usr.bin/bzip2/Makefile ============================================================================== --- soc2013/dpl/head/usr.bin/bzip2/Makefile Sat Jun 29 13:33:23 2013 (r253681) +++ soc2013/dpl/head/usr.bin/bzip2/Makefile Sat Jun 29 13:45:47 2013 (r253682) @@ -7,6 +7,7 @@ CFLAGS+= -D_FILE_OFFSET_BITS=64 #TODO: Delete this. CFLAGS+= -fno-color-diagnostics +CFLAGS+= -Wall CFLAGS+= -g WARNS?= 3