]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/test/test-path-util.c
util: add generic calls for prefixing a root directory to a path
authorLennart Poettering <lennart@poettering.net>
Wed, 13 May 2015 15:42:10 +0000 (17:42 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 13 May 2015 15:42:10 +0000 (17:42 +0200)
commit1d13f648d0fade38194db74b4f82ca68c8a26856
treeb85c22b0007e0c8c6e612b8c9f5606bcd84f0451
parent8b44a3d22c1fdfc5ce5fcb77e38a90ec02ba8019
util: add generic calls for prefixing a root directory to a path

So far a number of utilities implemented their own calls for this, unify
them in prefix_root() and prefix_roota(). The former uses heap memory,
the latter allocates from the stack via alloca().

Port over most users of a --root= logic.
src/firstboot/firstboot.c
src/shared/conf-files.c
src/shared/path-util.c
src/shared/path-util.h
src/sysusers/sysusers.c
src/test/test-path-util.c
src/tmpfiles/tmpfiles.c