diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2026-05-17 16:23:50 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2026-05-17 16:23:50 +0000 |
| commit | 363ea40c765424b3cbd9b96790235af030fcc8ff (patch) | |
| tree | 7c1fe5bf3a25e9086aaa6ae8903f29360bae3ee9 | |
| parent | 4cee16d471d47f4673e4d2c66f7a96d4e6d86ee9 (diff) | |
limits: Further RLIMIT_VMM cleanup
Teach limits(1), sh(1), and setclassresources(3) about RLIMIT_VMM.
Fixes: 1092ec8b3375 ("kern: Introduce RLIMIT_VMM")
Reviewed by: bnovkov
Differential Revision: https://reviews.freebsd.org/D57031
| -rw-r--r-- | bin/sh/miscbltin.c | 5 | ||||
| -rw-r--r-- | lib/libutil/login_class.c | 1 | ||||
| -rw-r--r-- | usr.bin/limits/limits.c | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c index bbf0aa5b8bde..f96f96ba43d2 100644 --- a/bin/sh/miscbltin.c +++ b/bin/sh/miscbltin.c @@ -518,6 +518,9 @@ static const struct limits limits[] = { #ifdef RLIMIT_PIPEBUF { "pipebuf", (char *)0, RLIMIT_PIPEBUF, 1024, 'y' }, #endif +#ifdef RLIMIT_VMM + { "virtual machines", (char *)0, RLIMIT_VMM, 1, 'V' }, +#endif { (char *) 0, (char *)0, 0, 0, '\0' } }; @@ -553,7 +556,7 @@ ulimitcmd(int argc __unused, char **argv __unused) struct rlimit limit; what = 'f'; - while ((optc = nextopt("HSatfdsmcnuvlbpwkoy")) != '\0') + while ((optc = nextopt("abcdfHklmnopSstuVvwy")) != '\0') switch (optc) { case 'H': how = HARD; diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c index 9478b4dc98ca..90e4e01f7c3b 100644 --- a/lib/libutil/login_class.c +++ b/lib/libutil/login_class.c @@ -66,6 +66,7 @@ static struct login_res { { "kqueues", login_getcapsize, RLIMIT_KQUEUES }, { "umtxp", login_getcapnum, RLIMIT_UMTXP }, { "pipebuf", login_getcapnum, RLIMIT_PIPEBUF }, + { "vms", login_getcapnum, RLIMIT_VMM }, { NULL, 0, 0 } }; diff --git a/usr.bin/limits/limits.c b/usr.bin/limits/limits.c index 57551c556c25..fbb19289e6ca 100644 --- a/usr.bin/limits/limits.c +++ b/usr.bin/limits/limits.c @@ -92,6 +92,7 @@ static struct { { " kqueues%-4s %8s", "\n", 1 }, { " umtxp%-4s %8s", "\n", 1 }, { " pipebuf%-4s %8s", " kB\n", 1024 }, + { " vms%-4s %8s", "\n", 1 }, } }, { "sh", "unlimited", "", " -H", " -S", "", @@ -112,6 +113,7 @@ static struct { { "ulimit%s -k %s", ";\n", 1 }, { "ulimit%s -o %s", ";\n", 1 }, { "ulimit%s -y %s", ";\n", 1024 }, + { "ulimit%s -V %s", ";\n", 1 }, } }, { "csh", "unlimited", "", " -h", "", NULL, |
