From: Andrei Tatar Date: Wed, 25 Sep 2024 15:39:00 +0000 (+0200) Subject: lib/posix-timerfd: Give name to opened timerfds X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5dfa3ed208aa57dc590ebad16bd7d55ac1036f55;p=unikraft%2Funikraft.git 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 --- 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; }