From c518c522c62e0f383dbcc0a086e4954e57478925 Mon Sep 17 00:00:00 2001 From: Akhil Mohan Date: Wed, 27 Nov 2024 14:43:33 +0530 Subject: [PATCH] add inotify error when during init Signed-off-by: Akhil Mohan --- cgroup2/manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgroup2/manager.go b/cgroup2/manager.go index 4a4292d5..abfa018f 100644 --- a/cgroup2/manager.go +++ b/cgroup2/manager.go @@ -676,7 +676,7 @@ func (c *Manager) MemoryEventFD() (int, uint32, error) { fpath := filepath.Join(c.path, "memory.events") fd, err := unix.InotifyInit() if err != nil { - return 0, 0, errors.New("failed to create inotify fd") + return 0, 0, fmt.Errorf("failed to create inotify fd: %w", err) } wd, err := unix.InotifyAddWatch(fd, fpath, unix.IN_MODIFY) if err != nil {