From 05bb4903135916690bf10e4d6f4157a67c29d119 Mon Sep 17 00:00:00 2001 From: Akhil Mohan Date: Wed, 27 Nov 2024 14:43:33 +0530 Subject: [PATCH] add InotifyInit err to custom err message 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 d579cda7..a87681bb 100644 --- a/cgroup2/manager.go +++ b/cgroup2/manager.go @@ -716,7 +716,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 {