Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Fix error reporting in puffs_framev_enqueue_waitevent and ca...
details: https://anonhg.NetBSD.org/src/rev/4ff40743d1b2
branches: trunk
changeset: 772124:4ff40743d1b2
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Dec 19 15:36:26 2011 +0000
description:
Fix error reporting in puffs_framev_enqueue_waitevent and callers.
ok christos
diffstat:
lib/libpuffs/framebuf.c | 9 ++++-----
sbin/mount_portal/puffs_portal.c | 10 ++++------
2 files changed, 8 insertions(+), 11 deletions(-)
diffs (69 lines):
diff -r e8d799b2bd7b -r 4ff40743d1b2 lib/libpuffs/framebuf.c
--- a/lib/libpuffs/framebuf.c Mon Dec 19 15:09:52 2011 +0000
+++ b/lib/libpuffs/framebuf.c Mon Dec 19 15:36:26 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: framebuf.c,v 1.30 2010/01/12 18:42:38 pooka Exp $ */
+/* $NetBSD: framebuf.c,v 1.31 2011/12/19 15:36:26 riastradh Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
-__RCSID("$NetBSD: framebuf.c,v 1.30 2010/01/12 18:42:38 pooka Exp $");
+__RCSID("$NetBSD: framebuf.c,v 1.31 2011/12/19 15:36:26 riastradh Exp $");
#endif /* !lint */
#include <sys/types.h>
@@ -561,9 +561,8 @@
EV_SET(&kev, fd, EVFILT_READ, EV_ENABLE,
0, 0, (uintptr_t)fio);
- rv = kevent(pu->pu_kq, &kev, 1, NULL, 0, NULL);
- if (rv != 0)
- return errno;
+ if (kevent(pu->pu_kq, &kev, 1, NULL, 0, NULL) == -1)
+ return -1;
if (*what & PUFFS_FBIO_READ)
fio->rwait++;
diff -r e8d799b2bd7b -r 4ff40743d1b2 sbin/mount_portal/puffs_portal.c
--- a/sbin/mount_portal/puffs_portal.c Mon Dec 19 15:09:52 2011 +0000
+++ b/sbin/mount_portal/puffs_portal.c Mon Dec 19 15:36:26 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_portal.c,v 1.4 2011/08/29 14:35:02 joerg Exp $ */
+/* $NetBSD: puffs_portal.c,v 1.5 2011/12/19 15:36:27 riastradh Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: puffs_portal.c,v 1.4 2011/08/29 14:35:02 joerg Exp $");
+__RCSID("$NetBSD: puffs_portal.c,v 1.5 2011/12/19 15:36:27 riastradh Exp $");
#endif /* !lint */
#include <sys/types.h>
@@ -729,7 +729,6 @@
struct puffs_cc *pcc = puffs_cc_getcc(pu);
struct portal_node *portn = opc;
int what;
- int rv;
what = 0;
if (*events & POLLIN)
@@ -739,10 +738,9 @@
if (*events & POLLERR)
what |= PUFFS_FBIO_ERROR;
- rv = puffs_framev_enqueue_waitevent(pcc, portn->fd, &what);
- if (rv) {
+ if (puffs_framev_enqueue_waitevent(pcc, portn->fd, &what) == -1) {
*events = POLLERR;
- return rv;
+ return errno;
}
*events = 0;
Home |
Main Index |
Thread Index |
Old Index