mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-06 08:39:22 +00:00
shut up freezer_state
Not being able to get freezer state is perfectly valid - if the container does not exist. The old version of freezer_state only reported an error on actually reading the cgroup file, but not on not finding a cgroup file. Leave it to the caller to report the error if it is important, since we don't actually know any useful info here anyway. Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
3879935493
commit
e8d07ef205
@ -2090,10 +2090,8 @@ int freeze_unfreeze(const char *name, int freeze, const char *lxcpath)
|
||||
lxc_state_t freezer_state(const char *name, const char *lxcpath)
|
||||
{
|
||||
char v[100];
|
||||
if (lxc_cgroup_get("freezer.state", v, 100, name, lxcpath) < 0) {
|
||||
ERROR("Failed to get freezer state for %s:%s", lxcpath, name);
|
||||
if (lxc_cgroup_get("freezer.state", v, 100, name, lxcpath) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (v[strlen(v)-1] == '\n')
|
||||
v[strlen(v)-1] = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user