From 4e0b635e86afcc22c799022b478bca11cd274ba6 Mon Sep 17 00:00:00 2001 From: dholland Date: Mon, 27 Aug 2018 22:22:16 +0000 Subject: [PATCH] Fix lying comment; the point of the KERN_FILE2 sysctl, or much of it, is to not expose struct file directly. --- sys/sys/file.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/sys/file.h b/sys/sys/file.h index 79a020106603..2265ab82af33 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -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 @@ union file_data { * 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 */