]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/fileutils: add ul_basename()
authorKarel Zak <kzak@redhat.com>
Tue, 2 Jul 2024 09:14:06 +0000 (11:14 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 2 Jul 2024 12:08:20 +0000 (14:08 +0200)
commit0bb52bae9132daffc8c918b40fa31d08680b356e
tree7b02c385a9ab1f2a7f03dde1d4c7f4db8615cab1
parent459eca5a824dd65f3571bfb7436f67127a91c905
lib/fileutils: add ul_basename()

Unfortunately, the basename() function can be affected by the
creativity of different libc authors, resulting in varying behavior
across implementations.

Instead, use a local implementation to ensure consistency and
portability.

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit ff8ee29d648111eb222612ad4251e4c3b236a389)
include/fileutils.h
lib/fileutils.c