diff options
author | des <des@FreeBSD.org> | 2001-12-09 00:38:59 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2001-12-09 00:38:59 +0000 |
commit | 6dec2d1dfe0e71a2ff4ff83cf9a97889348600ee (patch) | |
tree | 4a1e0efa77d4116ee6c69fe6e931057ee50c301b /sys/compat/linprocfs | |
parent | 2a99d8ecbaa3d51a61ed77d7ffd60401f8ed86de (diff) | |
download | FreeBSD-src-6dec2d1dfe0e71a2ff4ff83cf9a97889348600ee.zip FreeBSD-src-6dec2d1dfe0e71a2ff4ff83cf9a97889348600ee.tar.gz |
Pull in more stuff from procfs now that it's been pseudofsized.
Diffstat (limited to 'sys/compat/linprocfs')
-rw-r--r-- | sys/compat/linprocfs/linprocfs.c | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index a23e561..06f0f38 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -652,16 +652,6 @@ linprocfs_doprocstatus(PFS_FILL_ARGS) } /* - * Filler function for proc/self - */ -static int -linprocfs_doselflink(PFS_FILL_ARGS) -{ - sbuf_printf(sb, "%ld", (long)td->td_proc->p_pid); - return (0); -} - -/* * Filler function for proc/pid/cmdline */ static int @@ -698,22 +688,6 @@ linprocfs_doproccmdline(PFS_FILL_ARGS) } /* - * Filler function for proc/pid/exe - */ -static int -linprocfs_doprocexe(PFS_FILL_ARGS) -{ - char *fullpath = "unknown"; - char *freepath = NULL; - - vn_fullpath(td, td->td_proc->p_textvp, &fullpath, &freepath); - sbuf_printf(sb, "%s", fullpath); - if (freepath) - free(freepath, M_TEMP); - return (0); -} - -/* * Filler function for proc/net/dev */ static int @@ -818,7 +792,7 @@ linprocfs_init(PFS_INIT_ARGS) PFS_CREATE_FILE(uptime); PFS_CREATE_FILE(version); #undef PFS_CREATE_FILE - pfs_create_link(root, "self", &linprocfs_doselflink, + pfs_create_link(root, "self", &procfs_docurproc, NULL, NULL, 0); dir = pfs_create_dir(root, "net", NULL, NULL, 0); @@ -828,12 +802,10 @@ linprocfs_init(PFS_INIT_ARGS) dir = pfs_create_dir(root, "pid", NULL, NULL, PFS_PROCDEP); pfs_create_file(dir, "cmdline", &linprocfs_doproccmdline, NULL, NULL, PFS_RD); - pfs_create_link(dir, "exe", &linprocfs_doprocexe, - NULL, NULL, 0); -#if 0 + pfs_create_link(dir, "exe", &procfs_doprocfile, + NULL, &procfs_notsystem, 0); pfs_create_file(dir, "mem", &procfs_doprocmem, &procfs_attr, &procfs_candebug, PFS_RDWR|PFS_RAW); -#endif pfs_create_file(dir, "stat", &linprocfs_doprocstat, NULL, NULL, PFS_RD); pfs_create_file(dir, "status", &linprocfs_doprocstatus, |