Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpuffs From Evgeniy Ivanov: puffs_node_readdir() shoul...
details: https://anonhg.NetBSD.org/src/rev/5e7787ad08ee
branches: trunk
changeset: 766551:5e7787ad08ee
user: manu <manu%NetBSD.org@localhost>
date: Mon Jun 27 12:06:19 2011 +0000
description:
>From Evgeniy Ivanov: puffs_node_readdir() should set eofflag to one, when
end-of-directory is reached.
diffstat:
lib/libpuffs/null.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 5bf4413334aa -r 5e7787ad08ee lib/libpuffs/null.c
--- a/lib/libpuffs/null.c Mon Jun 27 11:52:22 2011 +0000
+++ b/lib/libpuffs/null.c Mon Jun 27 12:06:19 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: null.c,v 1.29 2011/06/24 16:59:29 manu Exp $ */
+/* $NetBSD: null.c,v 1.30 2011/06/27 12:06:19 manu Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
-__RCSID("$NetBSD: null.c,v 1.29 2011/06/24 16:59:29 manu Exp $");
+__RCSID("$NetBSD: null.c,v 1.30 2011/06/27 12:06:19 manu Exp $");
#endif /* !lint */
/*
@@ -578,8 +578,13 @@
*/
while (i--) {
rv = readdir_r(dp, &entry, &result);
- if (rv || !result)
+ if (rv != 0)
goto out;
+
+ if (!result) {
+ *eofflag = 1;
+ goto out;
+ }
}
for (;;) {
Home |
Main Index |
Thread Index |
Old Index