Source-Changes-HG archive

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

[src/trunk]: src/sys/sys Fix lying comment; the point of the KERN_FILE2 sysct...



details:   https://anonhg.NetBSD.org/src/rev/f7ef67873365
branches:  trunk
changeset: 364918:f7ef67873365
user:      dholland <dholland%NetBSD.org@localhost>
date:      Mon Aug 27 22:22:16 2018 +0000

description:
Fix lying comment; the point of the KERN_FILE2 sysctl, or much of it,
is to not expose struct file directly.

diffstat:

 sys/sys/file.h |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (24 lines):

diff -r 2b4c2d203fc6 -r f7ef67873365 sys/sys/file.h
--- a/sys/sys/file.h    Mon Aug 27 17:47:48 2018 +0000
+++ b/sys/sys/file.h    Mon Aug 27 22:22:16 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: file.h,v 1.83 2017/11/30 20:25:56 christos Exp $       */
+/*     $NetBSD: file.h,v 1.84 2018/08/27 22:22:16 dholland Exp $       */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -118,8 +118,12 @@
  * Kernel file descriptor.  One entry for each open kernel vnode and
  * socket.
  *
- * This structure is exported via the KERN_FILE and KERN_FILE2 sysctl
- * calls.  Only add members to the end, do not delete them.
+ * This structure is exported via the KERN_FILE sysctl.
+ * Only add members to the end, do not delete them.
+ *
+ * Note: new code should not use KERN_FILE; use KERN_FILE2 instead,
+ * which exports struct kinfo_file instead; struct kinfo_file is
+ * declared in sys/sysctl.h and is meant to be ABI-stable.
  */
 struct file {
        off_t           f_offset;       /* first, is 64-bit */



Home | Main Index | Thread Index | Old Index