From 38da189563b232d6dfd4566f74cf8a744904098b Mon Sep 17 00:00:00 2001 From: des Date: Tue, 25 Sep 2001 13:24:24 +0000 Subject: Clean up my source tree to avoid getting hit too badly by the next KSE or whatever mega-commit. No real functional changes, just some experiments / work in progress. --- sys/compat/linprocfs/linprocfs.c | 57 ++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 20 deletions(-) (limited to 'sys/compat') diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 987588a..b6f2ed1 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -42,12 +42,14 @@ */ #include -#include +#include #include #include #include +#include #include #include +#include #include #include #include @@ -55,10 +57,16 @@ #include #include #include +#include #include +#include #include +#include +#include #include +#include + #include #include #include @@ -67,10 +75,6 @@ #include #include -#include -#include -#include - #include #ifdef __alpha__ @@ -85,9 +89,6 @@ extern int ncpus; #include #endif /* __i386__ */ -#include -#include - #include #include @@ -646,12 +647,9 @@ linprocfs_donetdev(PFS_FILL_ARGS) struct ifnet *ifp; int eth_index = 0; - sbuf_printf(sb, - "Inter-| Receive " - " | Transmit\n" - " face |bytes packets errs drop fifo frame compressed " - "multicast|bytes packets errs drop fifo colls carrier " - "compressed\n"); + sbuf_printf(sb, "%6s|%58s|%s\n%6s|%58s|%5$s\n", + "Inter-", " Receive", " Transmit", " face", + "bytes packets errs drop fifo frame compressed"); TAILQ_FOREACH(ifp, &ifnet, if_link) { if (strcmp(ifp->if_name, "lo") == 0) { @@ -660,11 +658,10 @@ linprocfs_donetdev(PFS_FILL_ARGS) sbuf_printf(sb, "%5.5s%d:", "eth", eth_index); eth_index++; } - sbuf_printf(sb, - "%8lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu " - "%8lu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n", - 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, - 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L); + sbuf_printf(sb, "%8lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu ", + 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL); + sbuf_printf(sb, "%8lu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n", + 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL); } return (0); @@ -700,6 +697,23 @@ linprocfs_docmdline(PFS_FILL_ARGS) return (0); } +#if 0 +/* + * Filler function for proc/modules + */ +static int +linprocfs_domodules(PFS_FILL_ARGS) +{ + 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); + } + return (0); +} +#endif + /* * Directory structure */ @@ -733,6 +747,9 @@ static struct pfs_node linprocfs_root_nodes[] = { PFS_FILE( "devices", 0, 0, 0, 0444, linprocfs_dodevices), PFS_FILE( "loadavg", 0, 0, 0, 0444, linprocfs_doloadavg), PFS_FILE( "meminfo", 0, 0, 0, 0444, linprocfs_domeminfo), +#if 0 + PFS_FILE( "mdodules", 0, 0, 0, 0444, linprocfs_domodules), +#endif PFS_FILE( "stat", 0, 0, 0, 0444, linprocfs_dostat), PFS_FILE( "uptime", 0, 0, 0, 0444, linprocfs_douptime), PFS_FILE( "version", 0, 0, 0, 0444, linprocfs_doversion), @@ -745,6 +762,6 @@ static struct pfs_node linprocfs_root_nodes[] = { static struct pfs_node linprocfs_root = PFS_ROOT(linprocfs_root_nodes); -PSEUDOFS(linprocfs, linprocfs_root); +PSEUDOFS(linprocfs, linprocfs_root, 1); MODULE_DEPEND(linprocfs, linux, 1, 1, 1); MODULE_DEPEND(linprocfs, procfs, 1, 1, 1); -- cgit v1.1