From ad382bd8eb4950033413f4c04f59dc085e043768 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Sun, 29 Dec 2019 15:46:59 +0000 Subject: [PATCH] Make linprocfs(5) provide an empty /proc/modules. This should silence some warnings. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- sys/compat/linprocfs/linprocfs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 070213a9af5..ab41a5a4d93 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -1504,22 +1504,22 @@ linprocfs_dofilesystems(PFS_FILL_ARGS) return(0); } -#if 0 /* * Filler function for proc/modules */ static int linprocfs_domodules(PFS_FILL_ARGS) { +#if 0 struct linker_file *lf; TAILQ_FOREACH(lf, &linker_files, link) { sbuf_printf(sb, "%-20s%8lu%4d\n", lf->filename, (unsigned long)lf->size, lf->refs); } +#endif return (0); } -#endif /* * Filler function for proc/pid/fd @@ -1713,10 +1713,8 @@ linprocfs_init(PFS_INIT_ARGS) NULL, NULL, NULL, PFS_RD); pfs_create_file(root, "meminfo", &linprocfs_domeminfo, NULL, NULL, NULL, PFS_RD); -#if 0 pfs_create_file(root, "modules", &linprocfs_domodules, NULL, NULL, NULL, PFS_RD); -#endif pfs_create_file(root, "mounts", &linprocfs_domtab, NULL, NULL, NULL, PFS_RD); pfs_create_file(root, "mtab", &linprocfs_domtab,