Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net lib/44807: something broken in stat(2), return that ...



details:   https://anonhg.NetBSD.org/src/rev/ae45d39d3777
branches:  trunk
changeset: 763692:ae45d39d3777
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Mar 30 21:34:08 2011 +0000

description:
lib/44807: something broken in stat(2), return that we are a character
device in st_mode.

diffstat:

 sys/net/bpf.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 1835c50ab783 -r ae45d39d3777 sys/net/bpf.c
--- a/sys/net/bpf.c     Wed Mar 30 19:59:04 2011 +0000
+++ b/sys/net/bpf.c     Wed Mar 30 21:34:08 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bpf.c,v 1.163 2011/03/30 18:04:27 bouyer Exp $ */
+/*     $NetBSD: bpf.c,v 1.164 2011/03/30 21:34:08 christos Exp $       */
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.163 2011/03/30 18:04:27 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.164 2011/03/30 21:34:08 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_bpf.h"
@@ -1178,6 +1178,7 @@
        st->st_ctimespec = st->st_birthtimespec = d->bd_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;
 }



Home | Main Index | Thread Index | Old Index