Home | History | Annotate | Download | only in netbsd32
History log of /src/sys/compat/netbsd32/netbsd32_sysent.c
RevisionDateAuthorComments
 1.163  09-May-2025  martin PR 59352: netbsd32 compat for semtimedop(2): regen
 1.162  20-May-2024  christos branches: 1.162.2;
regen
 1.161  19-May-2024  christos regen
 1.160  01-May-2024  mlelstv Revert previous, the syscall needs to be enabled at runtime.

The compat_16 module just enables it for the "netbsd" emulation, but
nothing enables it yet for "netbsd32".
 1.159  30-Apr-2024  mlelstv Enable compat sigreturn system call.

The previous bug in netbsd32___sigaction_sigtramp hid the problem,
as it failed all but the first installation of a signal handler.
 1.158  30-Jul-2023  rin COMPAT_NETBSD32: Regen for syscalls.master,v 1.144
 1.157  30-Jul-2023  rin COMPANT_NETBSD32: Regen for syscalls.master,v 1.143
 1.156  29-Jul-2023  rin COMPAT_NETBSD32: Regen for syscalls.master,v 1.142
 1.155  20-Sep-2021  thorpej Regen for eventfd(2).
 1.154  20-Sep-2021  thorpej Regen for timerfd.
 1.153  10-Oct-2020  rin regen for getrandom(2)
 1.152  16-May-2020  christos Add ACL support for FFS. From FreeBSD.
 1.151  26-Apr-2020  thorpej Regen for native futex calls.
 1.150  22-Apr-2020  thorpej Regen for removal of _lwp_gettid(2).
 1.149  04-Apr-2020  thorpej branches: 1.149.2;
Regen for _lwp_gettid(2).
 1.148  12-Mar-2020  pgoyette regen
 1.147  07-Mar-2020  pgoyette Regen
 1.146  18-Jan-2020  pgoyette Regen generated files _after_ committing changes to the source file.

This gets the "Generated from" comments to use the new version number.

No functional change.
 1.145  18-Jan-2020  kamil Catch up after getpid/getgid/getuid changes in native ABI in 2008

getpid(), getuid() and getgid() used to call respectively sys_getpid(),
sys_getuid() and sys_getgid(). In the BSD4.3 compat mode there was a
fallback to call sys_getpid_with_ppid() and related functions.

In 2008 the compat ifdef was removed in sys/kern/syscalls.master r. 1.216.

For purity reasons we probably shall restore the NetBSD original behavior
and implement BSD4.3 one as a compat module, however it is not worth the
complexity.

Align the netbsd32 compat ABI to native ABI and call functions that return
two integers as in BSD4.3.
 1.144  04-Nov-2019  rin branches: 1.144.2;
regen
 1.143  04-Nov-2019  rin regen
 1.142  13-Oct-2019  christos regen
 1.141  22-Sep-2019  christos regen
 1.140  18-Jun-2019  christos branches: 1.140.2;
Regen
 1.139  18-Jun-2019  christos regen
 1.138  27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.137  24-Dec-2018  mrg regen.
 1.136  24-Dec-2018  mrg move mmap(), compat 40 mount(), pipe() and getfh() into their own files
as the implementation is non trivial or is compat. mark old mount()
properly instead of manually #if'ing ito to ENOSYS.
 1.135  10-Aug-2018  pgoyette Regen
 1.134  31-Jul-2018  rjs regen.
 1.133  10-May-2018  christos branches: 1.133.2;
regen
 1.132  06-Jan-2018  kamil branches: 1.132.2;
Revert vadvise(2) removal

This system call was used in legacy Lisp code, that was inherited to modern
age and still compiled against supported compat layers (e.g. in clisp,
oaklisp, Franz Lisp).

It used to instruct the kernel about paging policy (G/C aware, flush etc).

Newly compiled code (assuming that it will detect vadvise()) will use the
libc stub for vadvise(). The headers for this interface are gone.

vadvise(2) could be marked as COMPAT_80, but as long as we support ultrix,
sunos or aout68k ABI, don't bother with this.

Requested by <mrg>
 1.131  19-Dec-2017  kamil Drop SYS_vadvise

The (o)vadvise syscall is dummy since the beginning of NetBSD.

It is an obsolete remnant from the old UNIX.

Sponsored by <The NetBSD Foundation>
 1.130  19-Dec-2017  kamil Drop SYS_sbrk

sbrk - change data segment size

This syscall is dummy since the inception of the project.

Sponsored by <The NetBSD Foundation>
 1.129  19-Dec-2017  kamil Drop the sstk(2) syscall stub

sstk - change stack section size

This functionality has never been implemented and is a remnant from 16-bit
UNIX. This stub appeared with the first NetBSD commit.

Sponsored by <The NetBSD Foundation>
 1.128  10-May-2017  riastradh branches: 1.128.2;
regen
 1.127  16-Jan-2017  christos branches: 1.127.4;
regen
 1.126  13-Jan-2017  christos branches: 1.126.2;
regen
 1.125  28-Oct-2016  christos regen
 1.124  19-Oct-2016  skrll Regen
 1.123  23-Sep-2016  skrll regen
 1.122  10-Sep-2016  skrll Regen
 1.121  03-Dec-2015  pgoyette branches: 1.121.2;
Regen syscall definitions - the compat_netbsd32 sysv-ipc stuff is now
modular and can be autoloaded when needed
 1.120  01-Dec-2015  pgoyette Regen for new compat_netbsd32_mqueue module
 1.119  01-Dec-2015  pgoyette Regen.
 1.118  01-Dec-2015  pgoyette Regen
 1.117  24-Sep-2015  christos regen
 1.116  23-Jun-2015  dholland regen
 1.115  22-Jun-2015  mrg add netbsd32 support for nfssvc(2). we do this by defining 5 copyin/out
functions that do all the ugly work, are just plain copyin/out for the
native system calls, and do the necessary translations for netbsd32.

with this i'm able to run 32 bit nfsd and mountd on 64 bit kernel and
mount the file systems remotely.
 1.114  21-Jun-2015  martin Regen (pset_*)
 1.113  21-Jun-2015  martin regen (versioned mq_* calls)
 1.112  20-Jun-2015  martin Regen (sigqueinfo, modctl, mq_*)
 1.111  16-Jun-2015  martin Regen for posix_fallocate and fdiscard
 1.110  07-Mar-2015  christos regen
 1.109  25-Feb-2015  christos regen
 1.108  13-Jun-2014  joerg branches: 1.108.2; 1.108.4;
Regnerate
 1.107  15-May-2014  njoly Regen for setcontext signature.
 1.106  30-Apr-2014  njoly Regen for netbsd32_off_t.
 1.105  17-Oct-2013  njoly branches: 1.105.2;
Regen for mknodat(2) device argument type change.
 1.104  29-Mar-2013  christos branches: 1.104.4;
regen
 1.103  02-Oct-2012  christos regen
 1.102  08-Apr-2012  martin branches: 1.102.2;
Regen (posix_spawn)
 1.101  10-Mar-2012  joerg P1003_1B_SEMAPHORE is no longer optional.
 1.100  08-Mar-2012  joerg Implement sem_timedwait.
 1.99  19-Feb-2012  rmind Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.98  01-Feb-2012  dholland branches: 1.98.2;
Regen syscalls with proper id info.
 1.97  01-Feb-2012  dholland Update compat_netbsd32 for new quotactl.
 1.96  31-Jan-2012  matt Regen.
 1.95  08-Nov-2011  njoly branches: 1.95.4;
Regen for kqueue1.
 1.94  31-Aug-2011  njoly branches: 1.94.2;
Regen for dup3.
 1.93  05-Jul-2011  njoly Regen for pipe2.
 1.92  06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.91  02-Mar-2010  pooka branches: 1.91.2; 1.91.4; 1.91.6;
regen:
- remove nfssvc / fs_nfs.h / #ifdef NFS
- make getfh unconditional
 1.90  02-Mar-2010  pooka regen for conditional lfs syscall removal
 1.89  14-Dec-2009  matt branches: 1.89.2;
Regen (new makesyscalls.sh)
 1.88  14-Dec-2009  matt Merge from matt-nb5-mips64
 1.87  17-May-2009  pooka regen: pad -> PAD
 1.86  16-Mar-2009  njoly Regen for netbsd32_dev_t.
 1.85  26-Feb-2009  christos Regen
 1.84  13-Jan-2009  pooka branches: 1.84.2;
Regen to prove I didn't screw up the conversion: purely RCSID changes.
 1.83  13-Jan-2009  pooka regen: UNIMPL police
 1.82  11-Jan-2009  christos merge christos-time_t
 1.81  22-Nov-2008  mrg branches: 1.81.4;
regenerate
 1.80  19-Nov-2008  ad Regen.
 1.79  14-Nov-2008  ad Regen.
 1.78  12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.77  15-Oct-2008  wrstuden branches: 1.77.2; 1.77.4;
Merge wrstuden-revivesa into HEAD.
 1.76  24-Apr-2008  ad branches: 1.76.2; 1.76.4; 1.76.8;
Regen.
 1.75  24-Feb-2008  martin branches: 1.75.2;
Regen (old posix_fadvise ignored)
 1.74  27-Jan-2008  martin branches: 1.74.2; 1.74.6;
Regen (posix_fadvise versionend)
 1.73  26-Jan-2008  dsl regen
 1.72  19-Jan-2008  dsl Regen for netbsd32_mremap
 1.71  20-Dec-2007  dsl regen
 1.70  17-Dec-2007  dsl Regen without any 'const' members of the syscall argument structures.
 1.69  07-Dec-2007  ad branches: 1.69.4;
Reg... hang on, why don't we build this at compile time?!?
 1.68  09-Nov-2007  dsl branches: 1.68.2;
Regen
 1.67  15-Aug-2007  ad branches: 1.67.2; 1.67.6; 1.67.8;
Regen.
 1.66  07-Aug-2007  ad Regen.
 1.65  04-Mar-2007  christos branches: 1.65.2; 1.65.6; 1.65.10; 1.65.14;
fix fallout from caddr_t changes.
 1.64  19-Feb-2007  cube Regen (a few MPSAFE additions).
 1.63  18-Feb-2007  cube Regen (missing lwp syscalls).
 1.62  09-Feb-2007  ad branches: 1.62.2;
Merge newlock2 to head.
 1.61  09-Nov-2006  cube Regen (PR#34951 fixes).
 1.60  01-Sep-2006  matt branches: 1.60.2; 1.60.4;
Regen.
 1.59  30-Aug-2006  cube Regen (netbsd32_ptrace protection).
 1.58  31-Jul-2006  martin Make filehandles opaque to userland
 1.57  13-Jul-2006  pavel regen.
 1.56  13-Jul-2006  martin regen
 1.55  13-Jul-2006  martin Fix alignement problems for fhandle_t, exposed by gcc4.1.

While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).
 1.54  26-Jun-2006  mrg regenerate.
 1.53  31-May-2006  drochner branches: 1.53.2;
regen
 1.52  29-May-2006  drochner regen
 1.51  05-May-2006  cube branches: 1.51.2;
Regen (fhstat versioning, posix_fadvise).
 1.50  29-Mar-2006  cube Regen (_lwp*, sa_*).
 1.49  06-Mar-2006  cube branches: 1.49.2; 1.49.4;
Regen (SysV IPC).
 1.48  05-Mar-2006  cube branches: 1.48.2;
Regen (ksem_*).
 1.47  11-Dec-2005  christos branches: 1.47.4; 1.47.6;
merge ktrace-lwp.
 1.46  23-Oct-2005  cube Regen (kqueue, kevent).
 1.45  19-Aug-2005  christos branches: 1.45.2;
Fix lossage I created with the 64 bit ino_t change.
 1.44  23-Jul-2005  cube Regen (__sigtimedwait(2)).
 1.43  23-Jul-2005  cube Regen (timer_create(2) and friends).
 1.42  12-Jul-2005  cube Regen (*xattr(2)).
 1.41  11-Jul-2005  cube Regen (rasctl(2)).
 1.40  10-Jul-2005  cube Regen.
 1.39  10-Jul-2005  cube Regen.
 1.38  09-Jul-2005  cube Regen.
 1.37  08-Jul-2005  cube Regen.
 1.36  08-Jul-2005  cube Regen
 1.35  04-Jul-2005  cube branches: 1.35.2;
Regen
 1.34  30-May-2005  chs regen
 1.33  26-Feb-2005  perry regen
 1.32  17-Jun-2004  cube branches: 1.32.4; 1.32.6;
Regen.
 1.31  25-Oct-2003  chs regen
 1.30  13-Oct-2003  fvdl Implement 32bit get/setcontext entry points.
 1.29  18-Jan-2003  thorpej branches: 1.29.2;
Regen for correct RCS ID.
 1.28  18-Jan-2003  thorpej Regen: Merge the nathanw_sa branch.
 1.27  01-Nov-2002  jdolecek set nsysent to 512
 1.26  23-Oct-2002  scw Regen to pick up netbsd32___sigaction_sigtramp addition.
 1.25  29-Apr-2002  mrg regenerate.
 1.24  13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.23  30-May-2001  mrg branches: 1.23.2;
use _KERNEL_OPT.
 1.22  10-Apr-2001  kleink Regen.
 1.21  02-Feb-2001  mrg branches: 1.21.2;
regen
 1.20  27-Jan-2001  thorpej Regen; getpid(2) is MP-safe.
 1.19  27-Jan-2001  thorpej Regen; add sy_flags.
 1.18  09-Dec-2000  mycroft Regen.
 1.17  30-Nov-2000  jdolecek always include netbsd32_ntp_adjtime(), LKMify
 1.16  18-Aug-2000  cgd update for changed makesyscalls.master
 1.15  07-Aug-2000  bjh21 Second phase of changes to remove ntp_adjtime(2) from the kernel entirely if
NTP is not defined.

Also removes sysctl_ntptime, since that's unreferenced without NTP.

ntp_gettime(2) is left alone, since it doesn't raise SIGSYS, which sys_nosys()
does.
 1.14  09-Jul-2000  mrg regen
 1.13  31-Jan-2000  christos Regen
 1.12  30-Dec-1999  eeh Update to 32-bit compatibility routines.
 1.11  11-Oct-1999  eeh branches: 1.11.2;
Add netbsd32_compat_14.c

Rename everything from compat_netbsd32 -> netbsd32 so we don't have silly
names like compat_14_compat_netbsd32_sys_shmctl().
 1.10  09-Jun-1999  christos branches: 1.10.2;
Regen
 1.9  25-Mar-1999  mrg branches: 1.9.4;
regen
 1.8  25-Mar-1999  mrg move sparc32 to netbsd32; split out MD part (signal handling) (mostly via repository copy, rename and perl -pi :-)
 1.7  25-Mar-1999  mrg regen
 1.6  10-Dec-1998  christos Regen
 1.5  19-Oct-1998  tron Regen.
 1.4  01-Oct-1998  eeh Overhaul. Now will run simple things like /bin/sh and /bin/echo.
 1.3  26-Aug-1998  mrg regen.
 1.2  26-Aug-1998  mrg regen
 1.1  26-Aug-1998  mrg add a 32-bit compatibility module for the sparc64 port, so it can run NetBSD/sparc binaries with a LP64 kernel.
 1.9.4.2  02-Aug-1999  thorpej Regen.
 1.9.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.10.2.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.2.5  21-Apr-2001  bouyer Sync with HEAD
 1.11.2.4  11-Feb-2001  bouyer Sync with HEAD.
 1.11.2.3  13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.11.2.2  08-Dec-2000  bouyer Sync with HEAD.
 1.11.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.21.2.5  11-Nov-2002  nathanw Catch up to -current
 1.21.2.4  20-Jun-2002  nathanw Catch up to -current.
 1.21.2.3  29-May-2002  nathanw Regen.
 1.21.2.2  14-Nov-2001  nathanw Catch up to -current.
 1.21.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.23.2.2  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.23.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.29.2.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.29.2.4  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.29.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.29.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.29.2.1  03-Aug-2004  skrll Sync with HEAD
 1.32.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.32.4.1  29-Apr-2005  kent sync with -current
 1.35.2.8  27-Feb-2008  yamt sync with head.
 1.35.2.7  04-Feb-2008  yamt sync with head.
 1.35.2.6  21-Jan-2008  yamt sync with head
 1.35.2.5  15-Nov-2007  yamt sync with head.
 1.35.2.4  03-Sep-2007  yamt sync with head.
 1.35.2.3  26-Feb-2007  yamt sync with head.
 1.35.2.2  30-Dec-2006  yamt sync with head.
 1.35.2.1  21-Jun-2006  yamt sync with head.
 1.45.2.1  26-Oct-2005  yamt sync with head
 1.47.6.2  01-Jun-2006  kardel Sync with head.
 1.47.6.1  22-Apr-2006  simonb Sync with head.
 1.47.4.1  09-Sep-2006  rpaulo sync with head
 1.48.2.7  03-Sep-2006  yamt sync with head.
 1.48.2.6  11-Aug-2006  yamt sync with head
 1.48.2.5  26-Jun-2006  yamt sync with head.
 1.48.2.4  24-May-2006  yamt sync with head.
 1.48.2.3  01-Apr-2006  yamt sync with head.
 1.48.2.2  13-Mar-2006  yamt sync with head.
 1.48.2.1  05-Mar-2006  yamt file netbsd32_sysent.c was added on branch yamt-pdpolicy on 2006-03-13 09:07:08 +0000
 1.49.4.2  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.49.4.1  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.49.2.2  11-May-2006  elad sync with head
 1.49.2.1  19-Apr-2006  elad sync with head.
 1.51.2.1  19-Jun-2006  chap Sync with head.
 1.53.2.1  13-Jul-2006  gdamore Merge from HEAD.
 1.60.4.1  10-Dec-2006  yamt sync with head.
 1.60.2.2  30-Jan-2007  ad Remove support for SA. Ok core@.
 1.60.2.1  18-Nov-2006  ad Sync with head.
 1.62.2.2  12-Mar-2007  rmind Sync with HEAD.
 1.62.2.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.65.14.4  09-Dec-2007  jmcneill Sync with HEAD.
 1.65.14.3  11-Nov-2007  joerg Sync with HEAD.
 1.65.14.2  16-Aug-2007  jmcneill Sync with HEAD.
 1.65.14.1  09-Aug-2007  jmcneill Sync with HEAD.
 1.65.10.2  03-Sep-2007  skrll Sync with HEAD.
 1.65.10.1  15-Aug-2007  skrll Sync with HEAD.
 1.65.6.1  09-Dec-2007  reinoud Pullup to HEAD
 1.65.2.1  20-Aug-2007  ad Sync with HEAD.
 1.67.8.4  18-Feb-2008  mjf Sync with HEAD.
 1.67.8.3  27-Dec-2007  mjf Sync with HEAD.
 1.67.8.2  08-Dec-2007  mjf Sync with HEAD.
 1.67.8.1  19-Nov-2007  mjf Sync with HEAD.
 1.67.6.1  13-Nov-2007  bouyer Sync with HEAD
 1.67.2.2  23-Mar-2008  matt sync with HEAD
 1.67.2.1  09-Jan-2008  matt sync with HEAD
 1.68.2.2  26-Dec-2007  ad Sync with head.
 1.68.2.1  08-Dec-2007  ad Sync with head.
 1.69.4.2  20-Jan-2008  bouyer Sync with HEAD
 1.69.4.1  02-Jan-2008  bouyer Sync with HEAD
 1.74.6.3  17-Jan-2009  mjf Sync with HEAD.
 1.74.6.2  02-Jun-2008  mjf Sync with HEAD.
 1.74.6.1  03-Apr-2008  mjf Sync with HEAD.
 1.74.2.1  24-Mar-2008  keiichi sync with head.
 1.75.2.1  18-May-2008  yamt sync with head.
 1.76.8.2  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.76.8.1  19-Oct-2008  haad Sync with HEAD.
 1.76.4.3  28-Sep-2008  skrll Missed this one in the regen.
 1.76.4.2  14-May-2008  wrstuden Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.
 1.76.4.1  10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.76.2.3  11-Mar-2010  yamt sync with head
 1.76.2.2  20-Jun-2009  yamt sync with head
 1.76.2.1  04-May-2009  yamt sync with head.
 1.77.4.1  25-Nov-2008  snj branches: 1.77.4.1.4;
Regen for ticket 121.
 1.77.4.1.4.2  12-Sep-2009  matt Regen.
 1.77.4.1.4.1  12-Sep-2009  matt Regen.
 1.77.2.3  28-Apr-2009  skrll Sync with HEAD.
 1.77.2.2  03-Mar-2009  skrll Sync with HEAD.
 1.77.2.1  19-Jan-2009  skrll Sync with HEAD.
 1.81.4.3  04-Jan-2009  christos fix module build.
 1.81.4.2  04-Jan-2009  christos add new syscalls.
 1.81.4.1  22-Nov-2008  christos file netbsd32_sysent.c was added on branch christos-time_t on 2009-01-04 01:56:02 +0000
 1.84.2.2  23-Jul-2009  jym Sync with HEAD.
 1.84.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.89.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.91.6.2  09-Feb-2011  bouyer Regen
 1.91.6.1  20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.91.4.1  06-Jun-2011  jruoho Sync with HEAD.
 1.91.2.1  21-Apr-2011  rmind sync with head
 1.94.2.4  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.94.2.3  30-Oct-2012  yamt sync with head
 1.94.2.2  17-Apr-2012  yamt sync with head
 1.94.2.1  10-Nov-2011  yamt sync with head
 1.95.4.4  29-Apr-2012  mrg sync to latest -current.
 1.95.4.3  11-Mar-2012  mrg sync to latest -current
 1.95.4.2  24-Feb-2012  mrg sync to -current.
 1.95.4.1  18-Feb-2012  mrg merge to -current.
 1.98.2.2  14-Apr-2015  msaitoh Pull up following revision(s) (requested by khorben in ticket #1264):

include/unistd.h 1.144
sys/kern/init_sysent.c regen
sys/kern/syscalls.c regen
sys/kern/syscalls.master 1.272
sys/rump/include/rump/rump_syscalls.h regen
sys/rump/librump/rumpkern/rump_syscalls.c regen
sys/sys/syscall.h regen
sys/sys/syscallargs.h regen
sys/compat/netbds32/netbsd32_syscall.h regen
sys/compat/netbds32/netbsd32_syscallargs.h regen
sys/compat/netbds32/netbsd32_syscalls.c regen
sys/compat/netbds32/netbsd32_sysent.c regen
sys/compat/netbsd32/syscalls.master 1.102

Fix return type of the readlinkat(2) syscall. PR#49684.
 1.98.2.1  12-Apr-2012  riz Regen for ticket 175.
 1.102.2.4  03-Dec-2017  jdolecek update from HEAD
 1.102.2.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.102.2.2  23-Jun-2013  tls resync from head
 1.102.2.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.104.4.1  18-May-2014  rmind sync with head
 1.105.2.1  10-Aug-2014  tls Rebase.
 1.108.4.5  05-Dec-2016  skrll Sync with HEAD
 1.108.4.4  05-Oct-2016  skrll Sync with HEAD
 1.108.4.3  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.108.4.2  22-Sep-2015  skrll Sync with HEAD
 1.108.4.1  06-Apr-2015  skrll Sync with HEAD
 1.108.2.4  04-Nov-2019  martin Regen for ticket #1711
 1.108.2.3  06-Nov-2015  martin regen
 1.108.2.2  04-Nov-2015  riz Pull up following revision(s) (requested by mrg in ticket #956):
sys/compat/netbsd32/files.netbsd32: revision 1.36
sys/compat/netbsd32/netbsd32_sysent.c: revision 1.115
sys/compat/netbsd32/netbsd32_syscallargs.h: revision 1.116
sys/nfs/nfs_var.h: revision 1.93
sys/compat/netbsd32/netbsd32_conv.h: revision 1.30
sys/compat/netbsd32/netbsd32_syscall.h: revision 1.116
sys/compat/netbsd32/netbsd32_syscalls.c: revision 1.115
sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.1
sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.3
sys/nfs/nfs_syscalls.c: revision 1.156
sys/compat/netbsd32/syscalls.master: revision 1.108
sys/compat/netbsd32/netbsd32.h: revision 1.107
add netbsd32 support for nfssvc(2). we do this by defining 5 copyin/out
functions that do all the ugly work, are just plain copyin/out for the
native system calls, and do the necessary translations for netbsd32.
with this i'm able to run 32 bit nfsd and mountd on 64 bit kernel and
mount the file systems remotely.
don't copy the first netbsd32_export_args nexports times, but actually
advance the userland pointer each entry through the loop. oops.
 1.108.2.1  07-Mar-2015  snj regen for ticket 560
 1.121.2.2  20-Mar-2017  pgoyette Sync with HEAD
 1.121.2.1  04-Nov-2016  pgoyette Sync with HEAD
 1.126.2.1  21-Apr-2017  bouyer Sync with HEAD
 1.127.4.1  11-May-2017  pgoyette Sync with HEAD
 1.128.2.1  04-Nov-2019  martin Regen for ticket #398
 1.132.2.17  09-Jan-2019  pgoyette Regen - otherwise compat_40_mount() is wrongly included in sysent.c

Missed this during earlier conflict resolution.
 1.132.2.16  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.132.2.15  29-Sep-2018  pgoyette Regen
 1.132.2.14  29-Sep-2018  pgoyette Regen
 1.132.2.13  14-Sep-2018  pgoyette Regen
 1.132.2.12  14-Sep-2018  pgoyette Regen
 1.132.2.11  13-Sep-2018  pgoyette Regen
 1.132.2.10  12-Sep-2018  pgoyette Regen
 1.132.2.9  12-Sep-2018  pgoyette Regen
 1.132.2.8  12-Sep-2018  pgoyette regen
 1.132.2.7  12-Sep-2018  pgoyette Regen with updated module information for ntp 30 and 50 compat calls
 1.132.2.6  11-Sep-2018  pgoyette Regen
 1.132.2.5  11-Sep-2018  pgoyette And regen again
 1.132.2.4  11-Sep-2018  pgoyette Regen
 1.132.2.3  11-Sep-2018  pgoyette Regen syscall files and fix includes for syscallvar.h
 1.132.2.2  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.132.2.1  21-May-2018  pgoyette Sync with HEAD
 1.133.2.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.133.2.1  10-Jun-2019  christos Sync with HEAD
 1.140.2.2  08-Mar-2020  martin Regen (for ticket #761)
 1.140.2.1  04-Nov-2019  martin Regen for ticket #398
 1.144.2.1  25-Jan-2020  ad Sync with head.
 1.149.2.1  25-Apr-2020  bouyer Sync with bouyer-xenpvh-base2 (HEAD)
 1.162.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed