From 5dfa3ed208aa57dc590ebad16bd7d55ac1036f55 Mon Sep 17 00:00:00 2001 From: Andrei Tatar Date: Wed, 25 Sep 2024 17:39:00 +0200 Subject: [PATCH] lib/posix-timerfd: Give name to opened timerfds This change names newly opened timerfds "timerfd". Signed-off-by: Andrei Tatar Approved-by: Sergiu Moga Reviewed-by: Sergiu Moga GitHub-Closes: #1592 --- lib/posix-timerfd/timerfd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/posix-timerfd/timerfd.c b/lib/posix-timerfd/timerfd.c index e360c7fad..75f13f01c 100644 --- a/lib/posix-timerfd/timerfd.c +++ b/lib/posix-timerfd/timerfd.c @@ -26,6 +26,8 @@ static const char TIMERFD_VOLID[] = "timerfd_vol"; +#define TIMERFD_FNAME "timerfd" +#define TIMERFD_FNAME_LEN (sizeof(TIMERFD_FNAME) - 1) struct timerfd_node { struct itimerspec set; @@ -299,7 +301,8 @@ int uk_sys_timerfd_create(clockid_t id, int flags) mode |= O_NONBLOCK; if (flags & TFD_CLOEXEC) mode |= O_CLOEXEC; - ret = uk_fdtab_open(timerf, mode); + ret = uk_fdtab_open_named(timerf, mode, TIMERFD_FNAME, + TIMERFD_FNAME_LEN); uk_file_release(timerf); return ret; } -- 2.39.5