Rename fill_file -> fill_file2, since that's the KERN_FILE2 sysctl.

This commit is contained in:
maxv 2018-11-24 16:25:20 +00:00
parent 579fcfddc5
commit 572947b34e

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_descrip.c,v 1.239 2018/11/02 12:27:47 maxv Exp $ */
/* $NetBSD: kern_descrip.c,v 1.240 2018/11/24 16:25:20 maxv Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.239 2018/11/02 12:27:47 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.240 2018/11/24 16:25:20 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -118,7 +118,7 @@ static int filedescopen(dev_t, int, int, lwp_t *);
static int sysctl_kern_file(SYSCTLFN_PROTO);
static int sysctl_kern_file2(SYSCTLFN_PROTO);
static void fill_file(struct kinfo_file *, const file_t *, const fdfile_t *,
static void fill_file2(struct kinfo_file *, const file_t *, const fdfile_t *,
int, pid_t);
const struct cdevsw filedesc_cdevsw = {
@ -2235,7 +2235,7 @@ sysctl_kern_file2(SYSCTLFN_ARGS)
}
if (len >= elem_size && elem_count > 0) {
mutex_enter(&fp->f_lock);
fill_file(&kf, fp, ff, i, p->p_pid);
fill_file2(&kf, fp, ff, i, p->p_pid);
mutex_exit(&fp->f_lock);
mutex_exit(&fd->fd_lock);
error = sysctl_copyout(l,
@ -2286,7 +2286,7 @@ sysctl_kern_file2(SYSCTLFN_ARGS)
}
static void
fill_file(struct kinfo_file *kp, const file_t *fp, const fdfile_t *ff,
fill_file2(struct kinfo_file *kp, const file_t *fp, const fdfile_t *ff,
int i, pid_t pid)
{
const bool allowaddr = get_expose_address(curproc);