diff options
author | Warner Losh <imp@bsdimp.com> | 2023-02-13 16:02:03 -0700 |
---|---|---|
committer | Warner Losh <imp@bsdimp.com> | 2023-03-01 11:09:18 -0700 |
commit | 0867507857f7e305ec3ade01c6b28c32edf593c1 (patch) | |
tree | e41a04ee5bd03eb2b2f4c12040ce11478c313a01 /authz/base.c | |
parent | fb96f5dfed8a45f44356899c92d6fcba0e7658a5 (diff) |
bsd-user: various helper routines for sysctl
cap_memory - Caps the memory to just below MAXINT
scale_to_guest_pages - Account for difference in host / guest page size
h2g_long_sat - converts a int64_t to a int32_t, saturating at max / min values
h2g_ulong_sat - converts a uint64_t to a uint32_t, saturating at max value
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'authz/base.c')
0 files changed, 0 insertions, 0 deletions