Date: Fri, 14 Mar 2008 03:04:34 GMT From: Zhouyi ZHOU <zhouzhouyi@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 137667 for review Message-ID: <200803140304.m2E34YOs076589@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=137667 Change 137667 by zhouzhouyi@zhouzhouyi_mactest on 2008/03/14 03:03:53 prepare the program to test vn_poll for MAC Framework Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/mactest.c#17 edit Differences ... ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/mactest.c#17 (text+ko) ==== @@ -45,7 +45,7 @@ #include <assert.h> #include <signal.h> #include "mactest.h" - +#include <poll.h> #ifndef HAS_TRUNCATE64 #define truncate64 truncate @@ -88,6 +88,7 @@ ACTION_TRUNCATE, ACTION_STAT, ACTION_LSTAT, + ACTION_VNPOLL, }; #define SIGUSER1 30 #define TYPE_NONE 0x0000 @@ -131,6 +132,7 @@ { "truncate", ACTION_TRUNCATE, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, { "stat", ACTION_STAT, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, { "lstat", ACTION_LSTAT, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, + { "vnpoll", ACTION_VNPOLL, { TYPE_STRING, TYPE_NONE } }, { NULL, -1, { TYPE_NONE } } }; @@ -528,6 +530,22 @@ return (i); } break; + case ACTION_VNPOLL: + { + + struct pollfd pfd; + int fd; + fd = open("/root/pf.conf", O_RDWR); + if (fd <= 0) + goto erropen; + pfd.fd = fd; + pfd.events = POLLWRNORM; + pfd.revents = 0; + poll(&pfd, 1, 1); + close(fd); + erropen: + break; + } default: fprintf(stderr, "unsupported syscall\n"); close(logfd);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803140304.m2E34YOs076589>