Module Name:    src
Committed By:   christos
Date:           Wed Mar 30 21:34:08 UTC 2011

Modified Files:
        src/sys/net: bpf.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/sys/net/bpf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/bpf.c
diff -u src/sys/net/bpf.c:1.163 src/sys/net/bpf.c:1.164
--- src/sys/net/bpf.c:1.163	Wed Mar 30 14:04:27 2011
+++ src/sys/net/bpf.c	Wed Mar 30 17:34:08 2011
@@ -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;
 }

Reply via email to