Skip to content

Commit

Permalink
libct/cg/fs.Set: fix error message
Browse files Browse the repository at this point in the history
There is no point in showing the underlying error when path == "",
because it is ENOENT.

Revert the change done in commit e158483.

Fixes: e158483
Signed-off-by: Kir Kolyshkin <[email protected]>
  • Loading branch information
kolyshkin committed Oct 23, 2023
1 parent 5ea7c60 commit 7f5daa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcontainer/cgroups/fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func (m *Manager) Set(r *configs.Resources) error {
if path == "" {
// We never created a path for this cgroup, so we cannot set
// limits for it (though we have already tried at this point).
return fmt.Errorf("cannot set %s limit: container could not join or create cgroup, and the error is %w", sys.Name(), err)
return fmt.Errorf("cannot set %s limit: container could not join or create cgroup", sys.Name())
}
return err
}
Expand Down

0 comments on commit 7f5daa8

Please sign in to comment.