git: libkern: Change idr_replace() return value to align with Linux
Aaron LI
aly at crater.dragonflybsd.org
Thu Jan 22 17:05:03 PST 2026
commit 45c654dfde28d50ce4b85041e948c899005bce2f
Author: Aaron LI <aly at aaronly.me>
Date: Tue Jan 20 19:58:27 2026 +0800
libkern: Change idr_replace() return value to align with Linux
The Linux implementation of idr_replace() returns -ENOENT when the `id`
could not be found. Change our implementation to do the same to be
compatible with Linux's.
In addition, Linux's documentation says idr_replace() would return
-EINVAL if the given pointer was not valid [1]. This should be checked
in the future.
[1] https://www.kernel.org/doc/html/v4.20/core-api/idr.html#c.idr_replace
Summary of changes:
share/man/man9/idr.9 | 8 +-------
sys/libkern/linux_idr.c | 2 +-
2 files changed, 2 insertions(+), 8 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/45c654dfde28d50ce4b85041e948c899005bce2f
--
DragonFly BSD source repository
More information about the Commits
mailing list