/**
* virProcessSetMaxMemLock:
* @pid: process to be changed
- * @bytes: new limit (0 for no change)
+ * @bytes: new limit
*
* Sets a new limit on the amount of locked memory for a process.
*
{
struct rlimit rlim;
- if (bytes == 0)
- return 0;
-
/* We use VIR_DOMAIN_MEMORY_PARAM_UNLIMITED internally to represent
* unlimited memory amounts, but setrlimit() and prlimit() use
* RLIM_INFINITY for the same purpose, so we need to translate between
/**
* virProcessSetMaxProcesses:
* @pid: process to be changed
- * @procs: new limit (0 for no change)
+ * @procs: new limit
*
* Sets a new limit on the amount of processes for the user the
* process is running as.
{
struct rlimit rlim;
- if (procs == 0)
- return 0;
-
rlim.rlim_cur = rlim.rlim_max = procs;
if (virProcessSetLimit(pid, RLIMIT_NPROC, &rlim) < 0) {
/**
* virProcessSetMaxFiles:
* @pid: process to be changed
- * @files: new limit (0 for no change)
+ * @files: new limit
*
* Sets a new limit on the number of opened files for a process.
*
{
struct rlimit rlim;
- if (files == 0)
- return 0;
-
/* Max number of opened files is one greater than actual limit. See
* man setrlimit.
*