Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src putter_fop_stat(): set st_mode to S_IFCHR.
details: https://anonhg.NetBSD.org/src/rev/16b29f95b21e
branches: trunk
changeset: 767589:16b29f95b21e
user: hannken <hannken%NetBSD.org@localhost>
date: Sat Jul 23 14:28:28 2011 +0000
description:
putter_fop_stat(): set st_mode to S_IFCHR.
Fixes PR #44807: something broken in stat(2).
diffstat:
sys/dev/putter/putter.c | 5 +++--
tests/include/t_paths.c | 7 ++-----
2 files changed, 5 insertions(+), 7 deletions(-)
diffs (54 lines):
diff -r 145be4791131 -r 16b29f95b21e sys/dev/putter/putter.c
--- a/sys/dev/putter/putter.c Sat Jul 23 12:27:40 2011 +0000
+++ b/sys/dev/putter/putter.c Sat Jul 23 14:28:28 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: putter.c,v 1.31 2011/02/06 14:29:25 haad Exp $ */
+/* $NetBSD: putter.c,v 1.32 2011/07/23 14:28:28 hannken Exp $ */
/*
* Copyright (c) 2006, 2007 Antti Kantee. All Rights Reserved.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: putter.c,v 1.31 2011/02/06 14:29:25 haad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: putter.c,v 1.32 2011/07/23 14:28:28 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -420,6 +420,7 @@
st->st_ctimespec = st->st_birthtimespec = pi->pi_btime;
st->st_uid = kauth_cred_geteuid(fp->f_cred);
st->st_gid = kauth_cred_getegid(fp->f_cred);
+ st->st_mode = S_IFCHR;
KERNEL_UNLOCK_ONE(NULL);
return 0;
}
diff -r 145be4791131 -r 16b29f95b21e tests/include/t_paths.c
--- a/tests/include/t_paths.c Sat Jul 23 12:27:40 2011 +0000
+++ b/tests/include/t_paths.c Sat Jul 23 14:28:28 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_paths.c,v 1.6 2011/07/11 17:51:48 njoly Exp $ */
+/* $NetBSD: t_paths.c,v 1.7 2011/07/23 14:28:28 hannken Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_paths.c,v 1.6 2011/07/11 17:51:48 njoly Exp $");
+__RCSID("$NetBSD: t_paths.c,v 1.7 2011/07/23 14:28:28 hannken Exp $");
#include <sys/param.h>
#include <sys/stat.h>
@@ -160,9 +160,6 @@
if ((paths[i].flags & PATH_DEV) != 0) {
- if (strcmp(paths[i].path, _PATH_BPF) == 0)
- atf_tc_expect_fail("PR lib/44807");
-
ATF_CHECK(S_ISBLK(m) != 0 || S_ISCHR(m) != 0);
ATF_CHECK((paths[i].flags & PATH_DIR) == 0);
Home |
Main Index |
Thread Index |
Old Index