From owner-p4-projects@FreeBSD.ORG Sun Sep 11 22:06:23 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B13BE16A421; Sun, 11 Sep 2005 22:06:22 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86DDF16A41F for ; Sun, 11 Sep 2005 22:06:22 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5132A43D49 for ; Sun, 11 Sep 2005 22:06:22 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j8BM6MMF081427 for ; Sun, 11 Sep 2005 22:06:22 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j8BM6Mae081424 for perforce@freebsd.org; Sun, 11 Sep 2005 22:06:22 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 11 Sep 2005 22:06:22 GMT Message-Id: <200509112206.j8BM6Mae081424@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 83422 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2005 22:06:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=83422 Change 83422 by rwatson@rwatson_peppercorn on 2005/09/11 22:05:22 When generating polling results for fifos, don't report read-only fifos as writable, or write-only fifos as readable. That would be dumb. Affected files ... .. //depot/projects/netsmp/src/sys/fs/fifofs/fifo_vnops.c#3 edit Differences ... ==== //depot/projects/netsmp/src/sys/fs/fifofs/fifo_vnops.c#3 (text+ko) ==== @@ -615,7 +615,7 @@ fip = fp->f_data; levents = events & (POLLIN | POLLINIGNEOF | POLLPRI | POLLRDNORM | POLLRDBAND); - if (levents) { + if ((fp->f_flag & FREAD) && levents) { /* * If POLLIN or POLLRDNORM is requested and POLLINIGNEOF is * not, then convert the first two to the last one. This @@ -641,7 +641,7 @@ } } levents = events & (POLLOUT | POLLWRNORM | POLLWRBAND); - if (levents) { + if ((fp->f_flag & FWRITE) && levents) { filetmp.f_data = fip->fi_writesock; filetmp.f_cred = cred; if (filetmp.f_data) {