]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/path: add ul_path_stat(), fix absolute paths
authorKarel Zak <kzak@redhat.com>
Tue, 15 Oct 2019 09:59:16 +0000 (11:59 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 15 Oct 2019 09:59:16 +0000 (11:59 +0200)
commitb1418ed14691567b4b1d6fc8b465821e3b060d5d
treee96f56511ad246c3cab22e927b277c440e67bebf
parent9ae113ca7343ba7d0a9c0c2e8eb572f811b31262
lib/path: add ul_path_stat(), fix absolute paths

* add ul_path_stat()

* make sure all paths for ul_path_..() functions are always
interpreted relatively to the context directory and prefix. This is
difference between ul_path_ API and standard libc "at" functions. We
do not use any exception for absolute paths. The reason is that we
need to read from prefixed paths although application assume absolute
path (/dev/sda1 means /prefix/dev/sda1 if a /prefix is defined).

Signed-off-by: Karel Zak <kzak@redhat.com>
include/path.h
lib/path.c