diff options
author | Mike Zeller <mike@mikezeller.net> | 2020-03-31 16:56:38 -0400 |
---|---|---|
committer | Mike Zeller <mike@mikezeller.net> | 2020-03-31 16:57:52 -0400 |
commit | d6c067fb0129a30fc6d54dde2bb028677c6df070 (patch) | |
tree | dbcc7285a46f80620ca723f45a54c803d24ed691 | |
parent | a24936cb55a961181e79ce5cc16b5ce8bad4d982 (diff) | |
download | illumos-joyent-OS-8150.tar.gz |
XXX make "Max open files" a constantOS-8150
-rw-r--r-- | usr/src/uts/common/brand/lx/procfs/lx_prvnops.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c b/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c index f6a6aa33ce..c44c32ef29 100644 --- a/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c +++ b/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c @@ -470,6 +470,8 @@ typedef struct lxpr_rlimtab { char *rlim_rctl; /* rctl source */ } lxpr_rlimtab_t; +#define RLIM_MAXFD "Max open files" + static lxpr_rlimtab_t lxpr_rlimtab[] = { { "Max cpu time", "seconds", "process.max-cpu-time" }, { "Max file size", "bytes", "process.max-file-size" }, @@ -478,7 +480,7 @@ static lxpr_rlimtab_t lxpr_rlimtab[] = { { "Max core file size", "bytes", "process.max-core-size" }, { "Max resident set", "bytes", "zone.max-physical-memory" }, { "Max processes", "processes", "zone.max-lwps" }, - { "Max open files", "files", "process.max-file-descriptor" }, + { RLIM_MAXFD, "files", "process.max-file-descriptor" }, { "Max locked memory", "bytes", "zone.max-locked-memory" }, { "Max address space", "bytes", "process.max-address-space" }, { "Max file locks", "locks", NULL }, @@ -1732,9 +1734,9 @@ lxpr_read_pid_limits(lxpr_node_t *lxpnp, lxpr_uiobuf_t *uiobuf) } /* * If "Max open files" is still set to RLIM_INFINITY, make it - * match the max value so that we do not ouput "unlimited". + * match the max value so that we do not output "unlimited". */ - if (strcmp(lxpr_rlimtab[i].rlim_name, "Max open files") == 0 && + if (strcmp(lxpr_rlimtab[i].rlim_name, RLIM_MAXFD) == 0 && cur[i] == RLIM_INFINITY) cur[i] = max[i]; |