socsvn commit: r253682 - in soc2013/dpl/head: contrib/bzip2 usr.bin/bzip2
dpl at FreeBSD.org
dpl at FreeBSD.org
Sat Jun 29 13:45:48 UTC 2013
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
More information about the svn-soc-all
mailing list