Date: Wed, 23 Feb 2011 10:31:41 +0100 From: Damien Fleuriot <ml@my.gd> To: freebsd-fs@freebsd.org Subject: Re: Why is procfs deprecated in favor of procstat? Message-ID: <4D64D3FD.5000301@my.gd> In-Reply-To: <20110223085755.GA1749@garage.freebsd.pl> References: <457880.36028.qm@web121501.mail.ne1.yahoo.com> <201102211707.p1LH7c8n075660@lurza.secnetix.de> <20110221174100.GA77744@icarus.home.lan> <20110223085755.GA1749@garage.freebsd.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2/23/11 9:57 AM, Pawel Jakub Dawidek wrote: > On Mon, Feb 21, 2011 at 09:41:00AM -0800, Jeremy Chadwick wrote: >> For years now I have been considering a sysctl filesystem (e.g. mounted >> as /sysctl) which would solve this dilemma. Read-only might be a wise >> choice for this too. But this is beyond my skill set at this time, and >> the existing documentation/examples for a pseudo filesystem are really >> not that great. > > http://www.mail-archive.com/freebsd-hackers@freebsd.org/msg38829.html > > :) > Yummy :) Find below the make output on 8.2-PRERELEASE 21/02/2011 I suppose a lot of stuff changed since 2002 and an update would be required. -- mybsd root /tmp/sysctlfs/sysctlfs # make "/usr/share/mk/bsd.compat.mk", line 35: warning: NOMAN is deprecated in favour of NO_MAN Warning: Object directory not changed from original /tmp/sysctlfs/sysctlfs @ -> /usr/src/sys machine -> /usr/src/sys/amd64/include awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -p awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -q awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -h cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c sysctlfs_subr.c In file included from sysctlfs_subr.c:16: vnode.h:46:26: error: machine/lock.h: No such file or directory In file included from sysctlfs_subr.c:16: vnode.h:118: error: field 'v_interlock' has incomplete type vnode.h:127: error: field 'vpi_lock' has incomplete type vnode.h:128: error: field 'vpi_selinfo' has incomplete type vnode.h:183: error: expected specifier-qualifier-list before 'udev_t' In file included from vnode_if.h:10, from vnode.h:532, from sysctlfs_subr.c:16: vnode_if_newproto.h:11: error: expected specifier-qualifier-list before 'vop_bypass_t' cc1: warnings being treated as errors In file included from vnode.h:532, from sysctlfs_subr.c:16: vnode_if.h: In function 'VOP_ISLOCKED': vnode_if.h:28: warning: passing argument 1 of 'VOP_ISLOCKED_APV' from incompatible pointer type vnode_if.h: In function 'VOP_LOOKUP': vnode_if.h:54: warning: passing argument 1 of 'VOP_LOOKUP_APV' from incompatible pointer type vnode_if.h: In function 'VOP_CACHEDLOOKUP': vnode_if.h:80: warning: passing argument 1 of 'VOP_CACHEDLOOKUP_APV' from incompatible pointer type vnode_if.h: In function 'VOP_CREATE': vnode_if.h:109: warning: passing argument 1 of 'VOP_CREATE_APV' from incompatible pointer type vnode_if.h: In function 'VOP_WHITEOUT': vnode_if.h:135: warning: passing argument 1 of 'VOP_WHITEOUT_APV' from incompatible pointer type vnode_if.h: In function 'VOP_MKNOD': vnode_if.h:164: warning: passing argument 1 of 'VOP_MKNOD_APV' from incompatible pointer type vnode_if.h: In function 'VOP_OPEN': vnode_if.h:196: warning: passing argument 1 of 'VOP_OPEN_APV' from incompatible pointer type vnode_if.h: In function 'VOP_CLOSE': vnode_if.h:225: warning: passing argument 1 of 'VOP_CLOSE_APV' from incompatible pointer type vnode_if.h: In function 'VOP_ACCESS': vnode_if.h:254: warning: passing argument 1 of 'VOP_ACCESS_APV' from incompatible pointer type vnode_if.h: In function 'VOP_ACCESSX': vnode_if.h:283: warning: passing argument 1 of 'VOP_ACCESSX_APV' from incompatible pointer type vnode_if.h: In function 'VOP_GETATTR': vnode_if.h:309: warning: passing argument 1 of 'VOP_GETATTR_APV' from incompatible pointer type vnode_if.h: In function 'VOP_SETATTR': vnode_if.h:335: warning: passing argument 1 of 'VOP_SETATTR_APV' from incompatible pointer type vnode_if.h: In function 'VOP_MARKATIME': vnode_if.h:355: warning: passing argument 1 of 'VOP_MARKATIME_APV' from incompatible pointer type vnode_if.h: In function 'VOP_READ': vnode_if.h:384: warning: passing argument 1 of 'VOP_READ_APV' from incompatible pointer type vnode_if.h: In function 'VOP_WRITE': vnode_if.h:413: warning: passing argument 1 of 'VOP_WRITE_APV' from incompatible pointer type vnode_if.h: In function 'VOP_IOCTL': vnode_if.h:448: warning: passing argument 1 of 'VOP_IOCTL_APV' from incompatible pointer type vnode_if.h: In function 'VOP_POLL': vnode_if.h:477: warning: passing argument 1 of 'VOP_POLL_APV' from incompatible pointer type vnode_if.h: In function 'VOP_KQFILTER': vnode_if.h:500: warning: passing argument 1 of 'VOP_KQFILTER_APV' from incompatible pointer type vnode_if.h: In function 'VOP_REVOKE': vnode_if.h:523: warning: passing argument 1 of 'VOP_REVOKE_APV' from incompatible pointer type vnode_if.h: In function 'VOP_FSYNC': vnode_if.h:549: warning: passing argument 1 of 'VOP_FSYNC_APV' from incompatible pointer type vnode_if.h: In function 'VOP_REMOVE': vnode_if.h:575: warning: passing argument 1 of 'VOP_REMOVE_APV' from incompatible pointer type vnode_if.h: In function 'VOP_LINK': vnode_if.h:601: warning: passing argument 1 of 'VOP_LINK_APV' from incompatible pointer type vnode_if.h: In function 'VOP_RENAME': vnode_if.h:636: warning: passing argument 1 of 'VOP_RENAME_APV' from incompatible pointer type vnode_if.h: In function 'VOP_MKDIR': vnode_if.h:665: warning: passing argument 1 of 'VOP_MKDIR_APV' from incompatible pointer type vnode_if.h: In function 'VOP_RMDIR': vnode_if.h:691: warning: passing argument 1 of 'VOP_RMDIR_APV' from incompatible pointer type vnode_if.h: In function 'VOP_SYMLINK': vnode_if.h:723: warning: passing argument 1 of 'VOP_SYMLINK_APV' from incompatible pointer type vnode_if.h: In function 'VOP_READDIR': vnode_if.h:758: warning: passing argument 1 of 'VOP_READDIR_APV' from incompatible pointer type vnode_if.h: In function 'VOP_READLINK': vnode_if.h:784: warning: passing argument 1 of 'VOP_READLINK_APV' from incompatible pointer type vnode_if.h: In function 'VOP_INACTIVE': vnode_if.h:807: warning: passing argument 1 of 'VOP_INACTIVE_APV' from incompatible pointer type vnode_if.h: In function 'VOP_RECLAIM': vnode_if.h:830: warning: passing argument 1 of 'VOP_RECLAIM_APV' from incompatible pointer type vnode_if.h: In function 'VOP_LOCK1': vnode_if.h:859: warning: passing argument 1 of 'VOP_LOCK1_APV' from incompatible pointer type vnode_if.h: In function 'VOP_UNLOCK': vnode_if.h:882: warning: passing argument 1 of 'VOP_UNLOCK_APV' from incompatible pointer type vnode_if.h: In function 'VOP_BMAP': vnode_if.h:917: warning: passing argument 1 of 'VOP_BMAP_APV' from incompatible pointer type vnode_if.h: In function 'VOP_STRATEGY': vnode_if.h:940: warning: passing argument 1 of 'VOP_STRATEGY_APV' from incompatible pointer type vnode_if.h: In function 'VOP_GETWRITEMOUNT': vnode_if.h:963: warning: passing argument 1 of 'VOP_GETWRITEMOUNT_APV' from incompatible pointer type vnode_if.h: In function 'VOP_PRINT': vnode_if.h:983: warning: passing argument 1 of 'VOP_PRINT_APV' from incompatible pointer type vnode_if.h: In function 'VOP_PATHCONF': vnode_if.h:1009: warning: passing argument 1 of 'VOP_PATHCONF_APV' from incompatible pointer type vnode_if.h: In function 'VOP_ADVLOCK': vnode_if.h:1041: warning: passing argument 1 of 'VOP_ADVLOCK_APV' from incompatible pointer type vnode_if.h: In function 'VOP_ADVLOCKASYNC': vnode_if.h:1079: warning: passing argument 1 of 'VOP_ADVLOCKASYNC_APV' from incompatible pointer type vnode_if.h: In function 'VOP_REALLOCBLKS': vnode_if.h:1102: warning: passing argument 1 of 'VOP_REALLOCBLKS_APV' from incompatible pointer type vnode_if.h: In function 'VOP_GETPAGES': vnode_if.h:1134: warning: passing argument 1 of 'VOP_GETPAGES_APV' from incompatible pointer type vnode_if.h: In function 'VOP_PUTPAGES': vnode_if.h:1169: warning: passing argument 1 of 'VOP_PUTPAGES_APV' from incompatible pointer type vnode_if.h: In function 'VOP_GETACL': vnode_if.h:1201: warning: passing argument 1 of 'VOP_GETACL_APV' from incompatible pointer type vnode_if.h: In function 'VOP_SETACL': vnode_if.h:1233: warning: passing argument 1 of 'VOP_SETACL_APV' from incompatible pointer type vnode_if.h: In function 'VOP_ACLCHECK': vnode_if.h:1265: warning: passing argument 1 of 'VOP_ACLCHECK_APV' from incompatible pointer type vnode_if.h: In function 'VOP_CLOSEEXTATTR': vnode_if.h:1294: warning: passing argument 1 of 'VOP_CLOSEEXTATTR_APV' from incompatible pointer type vnode_if.h: In function 'VOP_GETEXTATTR': vnode_if.h:1332: warning: passing argument 1 of 'VOP_GETEXTATTR_APV' from incompatible pointer type vnode_if.h: In function 'VOP_LISTEXTATTR': vnode_if.h:1367: warning: passing argument 1 of 'VOP_LISTEXTATTR_APV' from incompatible pointer type vnode_if.h: In function 'VOP_OPENEXTATTR': vnode_if.h:1393: warning: passing argument 1 of 'VOP_OPENEXTATTR_APV' from incompatible pointer type vnode_if.h: In function 'VOP_DELETEEXTATTR': vnode_if.h:1425: warning: passing argument 1 of 'VOP_DELETEEXTATTR_APV' from incompatible pointer type vnode_if.h: In function 'VOP_SETEXTATTR': vnode_if.h:1460: warning: passing argument 1 of 'VOP_SETEXTATTR_APV' from incompatible pointer type vnode_if.h: In function 'VOP_SETLABEL': vnode_if.h:1489: warning: passing argument 1 of 'VOP_SETLABEL_APV' from incompatible pointer type vnode_if.h: In function 'VOP_VPTOFH': vnode_if.h:1512: warning: passing argument 1 of 'VOP_VPTOFH_APV' from incompatible pointer type vnode_if.h: In function 'VOP_VPTOCNP': vnode_if.h:1544: warning: passing argument 1 of 'VOP_VPTOCNP_APV' from incompatible pointer type In file included from sysctlfs_subr.c:16: vnode.h: At top level: vnode.h:551: warning: 'struct vop_lease_args' declared inside parameter list vnode.h:551: warning: its scope is only this definition or declaration, which is probably not what you want vnode.h:554: error: expected declaration specifiers or '...' before 'udev_t' vnode.h:568: warning: 'struct vop_lease_args' declared inside parameter list vnode.h:619: warning: 'struct vop_lock_args' declared inside parameter list vnode.h:622: warning: 'struct vop_lock_args' declared inside parameter list vnode.h:628: warning: 'struct vop_lock_args' declared inside parameter list vnode.h:636: warning: 'struct vop_createvobject_args' declared inside parameter list vnode.h:637: warning: 'struct vop_destroyvobject_args' declared inside parameter list vnode.h:638: warning: 'struct vop_getvobject_args' declared inside parameter list sysctlfs_subr.c: In function 'sysctlfs_allocvp': sysctlfs_subr.c:152: error: 'securelevel' undeclared (first use in this function) sysctlfs_subr.c:152: error: (Each undeclared identifier is reported only once sysctlfs_subr.c:152: error: for each function it appears in.) sysctlfs_subr.c:154: error: 'struct proc' has no member named 'p_prison' sysctlfs_subr.c: In function 'sysctlfs_rw': sysctlfs_subr.c:251: error: 'struct uio' has no member named 'uio_procp' sysctlfs_subr.c: In function 'sysctlfs_sysctl': sysctlfs_subr.c:353: error: 'struct sysctl_req' has no member named 'p' sysctlfs_subr.c:376: error: 'securelevel' undeclared (first use in this function) sysctlfs_subr.c:382: error: 'struct sysctl_req' has no member named 'p' sysctlfs_subr.c:383: warning: implicit declaration of function 'suser_xxx' sysctlfs_subr.c:383: warning: nested extern declaration of 'suser_xxx' sysctlfs_subr.c:383: error: 'struct sysctl_req' has no member named 'p' sysctlfs_subr.c:384: error: 'PRISON_ROOT' undeclared (first use in this function) *** Error code 1 Stop in /tmp/sysctlfs/sysctlfs. ---
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D64D3FD.5000301>