-/* $OpenBSD: machdep.c,v 1.273 2021/03/11 11:16:55 jsg Exp $ */
+/* $OpenBSD: machdep.c,v 1.274 2021/05/01 16:18:28 gnezdo Exp $ */
/* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */
/*-
const struct sysctl_bounded_args cpuctl_vars[] = {
{ CPU_LIDACTION, &lid_action, 0, 2 },
{ CPU_PWRACTION, &pwr_action, 0, 2 },
- { CPU_CPUID, &cpu_id, 1, 0 },
- { CPU_CPUFEATURE, &cpu_feature, 1, 0 },
- { CPU_XCRYPT, &amd64_has_xcrypt, 1, 0 },
- { CPU_INVARIANTTSC, &tsc_is_invariant, 1, 0 },
+ { CPU_CPUID, &cpu_id, SYSCTL_INT_READONLY },
+ { CPU_CPUFEATURE, &cpu_feature, SYSCTL_INT_READONLY },
+ { CPU_XCRYPT, &amd64_has_xcrypt, SYSCTL_INT_READONLY },
+ { CPU_INVARIANTTSC, &tsc_is_invariant, SYSCTL_INT_READONLY },
};
/*
-/* $OpenBSD: machdep.c,v 1.644 2021/01/09 21:01:20 gnezdo Exp $ */
+/* $OpenBSD: machdep.c,v 1.645 2021/05/01 16:18:28 gnezdo Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
const struct sysctl_bounded_args cpuctl_vars[] = {
{ CPU_LIDACTION, &lid_action, 0, 2 },
- { CPU_CPUID, &cpu_id, 1, 0 },
- { CPU_OSFXSR, &i386_use_fxsave, 1, 0 },
- { CPU_SSE, &i386_has_sse, 1, 0 },
- { CPU_SSE2, &i386_has_sse2, 1, 0 },
- { CPU_XCRYPT, &i386_has_xcrypt, 1, 0 },
+ { CPU_CPUID, &cpu_id, SYSCTL_INT_READONLY },
+ { CPU_OSFXSR, &i386_use_fxsave, SYSCTL_INT_READONLY },
+ { CPU_SSE, &i386_has_sse, SYSCTL_INT_READONLY },
+ { CPU_SSE2, &i386_has_sse2, SYSCTL_INT_READONLY },
+ { CPU_XCRYPT, &i386_has_xcrypt, SYSCTL_INT_READONLY },
};
/*
-/* $OpenBSD: kern_sysctl.c,v 1.391 2021/04/30 13:52:48 bluhm Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.392 2021/05/01 16:18:28 gnezdo Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
extern int global_ptrace;
const struct sysctl_bounded_args kern_vars[] = {
- {KERN_OSREV, &openbsd, 1, 0},
+ {KERN_OSREV, &openbsd, SYSCTL_INT_READONLY},
{KERN_MAXVNODES, &maxvnodes, 0, INT_MAX},
{KERN_MAXPROC, &maxprocess, 0, INT_MAX},
{KERN_MAXFILES, &maxfiles, 0, INT_MAX},
- {KERN_NFILES, &numfiles, 1, 0},
- {KERN_TTYCOUNT, &tty_count, 1, 0},
- {KERN_ARGMAX, &arg_max, 1, 0},
- {KERN_NSELCOLL, &nselcoll, 1, 0},
- {KERN_POSIX1, &posix_version, 1, 0},
- {KERN_NGROUPS, &ngroups_max, 1, 0},
- {KERN_JOB_CONTROL, &int_one, 1, 0},
- {KERN_SAVED_IDS, &int_one, 1, 0},
- {KERN_MAXPARTITIONS, &maxpartitions, 1, 0},
- {KERN_RAWPARTITION, &raw_part, 1, 0},
+ {KERN_NFILES, &numfiles, SYSCTL_INT_READONLY},
+ {KERN_TTYCOUNT, &tty_count, SYSCTL_INT_READONLY},
+ {KERN_ARGMAX, &arg_max, SYSCTL_INT_READONLY},
+ {KERN_NSELCOLL, &nselcoll, SYSCTL_INT_READONLY},
+ {KERN_POSIX1, &posix_version, SYSCTL_INT_READONLY},
+ {KERN_NGROUPS, &ngroups_max, SYSCTL_INT_READONLY},
+ {KERN_JOB_CONTROL, &int_one, SYSCTL_INT_READONLY},
+ {KERN_SAVED_IDS, &int_one, SYSCTL_INT_READONLY},
+ {KERN_MAXPARTITIONS, &maxpartitions, SYSCTL_INT_READONLY},
+ {KERN_RAWPARTITION, &raw_part, SYSCTL_INT_READONLY},
{KERN_MAXTHREAD, &maxthread, 0, INT_MAX},
- {KERN_NTHREADS, &nthreads, 1, 0},
+ {KERN_NTHREADS, &nthreads, SYSCTL_INT_READONLY},
{KERN_SOMAXCONN, &somaxconn, 0, SHRT_MAX},
{KERN_SOMINCONN, &sominconn, 0, SHRT_MAX},
{KERN_NOSUIDCOREDUMP, &nosuidcoredump, 0, 3},
- {KERN_FSYNC, &int_one, 1, 0},
+ {KERN_FSYNC, &int_one, SYSCTL_INT_READONLY},
{KERN_SYSVMSG,
#ifdef SYSVMSG
&int_one,
#else
&int_zero,
#endif
- 1, 0},
+ SYSCTL_INT_READONLY},
{KERN_SYSVSEM,
#ifdef SYSVSEM
&int_one,
#else
&int_zero,
#endif
- 1, 0},
+ SYSCTL_INT_READONLY},
{KERN_SYSVSHM,
#ifdef SYSVSHM
&int_one,
#else
&int_zero,
#endif
- 1, 0},
- {KERN_FSCALE, &fscale, 1, 0},
- {KERN_CCPU, &ccpu, 1, 0},
- {KERN_NPROCS, &nprocesses, 1, 0},
+ SYSCTL_INT_READONLY},
+ {KERN_FSCALE, &fscale, SYSCTL_INT_READONLY},
+ {KERN_CCPU, &ccpu, SYSCTL_INT_READONLY},
+ {KERN_NPROCS, &nprocesses, SYSCTL_INT_READONLY},
{KERN_SPLASSERT, &splassert_ctl, 0, 3},
{KERN_MAXLOCKSPERUID, &maxlocksperuid, 0, INT_MAX},
{KERN_WXABORT, &uvm_wxabort, 0, 1},
- {KERN_NETLIVELOCKS, &int_zero, 1, 0},
+ {KERN_NETLIVELOCKS, &int_zero, SYSCTL_INT_READONLY},
#ifdef PTRACE
{KERN_GLOBAL_PTRACE, &global_ptrace, 0, 1},
#endif
static int page_size = PAGE_SIZE;
const struct sysctl_bounded_args hw_vars[] = {
- {HW_NCPU, &ncpus, 1, 0},
- {HW_NCPUFOUND, &ncpusfound, 1, 0},
- {HW_BYTEORDER, &byte_order, 1, 0},
- {HW_PAGESIZE, &page_size, 1, 0},
- {HW_DISKCOUNT, &disk_count, 1, 0},
+ {HW_NCPU, &ncpus, SYSCTL_INT_READONLY},
+ {HW_NCPUFOUND, &ncpusfound, SYSCTL_INT_READONLY},
+ {HW_BYTEORDER, &byte_order, SYSCTL_INT_READONLY},
+ {HW_PAGESIZE, &page_size, SYSCTL_INT_READONLY},
+ {HW_DISKCOUNT, &disk_count, SYSCTL_INT_READONLY},
};
int
-/* $OpenBSD: fuse_vfsops.c,v 1.44 2020/11/17 03:23:10 gnezdo Exp $ */
+/* $OpenBSD: fuse_vfsops.c,v 1.45 2021/05/01 16:18:29 gnezdo Exp $ */
/*
* Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
extern int stat_fbufs_in, stat_fbufs_wait, stat_opened_fusedev;
const struct sysctl_bounded_args fusefs_vars[] = {
- { FUSEFS_OPENDEVS, &stat_opened_fusedev, 1, 0 },
- { FUSEFS_INFBUFS, &stat_fbufs_in, 1, 0 },
- { FUSEFS_WAITFBUFS, &stat_fbufs_wait, 1, 0 },
- { FUSEFS_POOL_NBPAGES, &fusefs_fbuf_pool.pr_npages, 1, 0 },
+ { FUSEFS_OPENDEVS, &stat_opened_fusedev, SYSCTL_INT_READONLY },
+ { FUSEFS_INFBUFS, &stat_fbufs_in, SYSCTL_INT_READONLY },
+ { FUSEFS_WAITFBUFS, &stat_fbufs_wait, SYSCTL_INT_READONLY },
+ { FUSEFS_POOL_NBPAGES, &fusefs_fbuf_pool.pr_npages, SYSCTL_INT_READONLY },
};
int
-/* $OpenBSD: ffs_vfsops.c,v 1.188 2020/11/07 05:24:20 gnezdo Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.189 2021/05/01 16:18:29 gnezdo Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
#ifdef FFS_SOFTUPDATES
{ FFS_MAX_SOFTDEPS, &max_softdeps, 0, INT_MAX },
{ FFS_SD_TICKDELAY, &tickdelay, 2, INT_MAX },
- { FFS_SD_WORKLIST_PUSH, &stat_worklist_push, 1, 0 }, /* read-only */
- { FFS_SD_BLK_LIMIT_PUSH, &stat_blk_limit_push, 1, 0 },
- { FFS_SD_INO_LIMIT_PUSH, &stat_ino_limit_push, 1, 0 },
- { FFS_SD_BLK_LIMIT_HIT, &stat_blk_limit_hit, 1, 0 },
- { FFS_SD_INO_LIMIT_HIT, &stat_ino_limit_hit, 1, 0 },
- { FFS_SD_SYNC_LIMIT_HIT, &stat_sync_limit_hit, 1, 0 },
- { FFS_SD_INDIR_BLK_PTRS, &stat_indir_blk_ptrs, 1, 0 },
- { FFS_SD_INODE_BITMAP, &stat_inode_bitmap, 1, 0 },
- { FFS_SD_DIRECT_BLK_PTRS, &stat_direct_blk_ptrs, 1, 0 },
- { FFS_SD_DIR_ENTRY, &stat_dir_entry, 1, 0 },
+ { FFS_SD_WORKLIST_PUSH, &stat_worklist_push, SYSCTL_INT_READONLY },
+ { FFS_SD_BLK_LIMIT_PUSH, &stat_blk_limit_push, SYSCTL_INT_READONLY },
+ { FFS_SD_INO_LIMIT_PUSH, &stat_ino_limit_push, SYSCTL_INT_READONLY },
+ { FFS_SD_BLK_LIMIT_HIT, &stat_blk_limit_hit, SYSCTL_INT_READONLY },
+ { FFS_SD_INO_LIMIT_HIT, &stat_ino_limit_hit, SYSCTL_INT_READONLY },
+ { FFS_SD_SYNC_LIMIT_HIT, &stat_sync_limit_hit, SYSCTL_INT_READONLY },
+ { FFS_SD_INDIR_BLK_PTRS, &stat_indir_blk_ptrs, SYSCTL_INT_READONLY },
+ { FFS_SD_INODE_BITMAP, &stat_inode_bitmap, SYSCTL_INT_READONLY },
+ { FFS_SD_DIRECT_BLK_PTRS, &stat_direct_blk_ptrs, SYSCTL_INT_READONLY },
+ { FFS_SD_DIR_ENTRY, &stat_dir_entry, SYSCTL_INT_READONLY },
#endif
#ifdef UFS_DIRHASH
{ FFS_DIRHASH_DIRSIZE, &ufs_mindirhashsize, 0, INT_MAX },
{ FFS_DIRHASH_MAXMEM, &ufs_dirhashmaxmem, 0, INT_MAX },
- { FFS_DIRHASH_MEM, &ufs_dirhashmem, 1, 0 },
+ { FFS_DIRHASH_MEM, &ufs_dirhashmem, SYSCTL_INT_READONLY },
#endif
};