]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/test/test-path-util.c
util-lib: add a new skip_dev_prefix() helper
authorLennart Poettering <lennart@poettering.net>
Wed, 9 Aug 2017 17:01:18 +0000 (19:01 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 9 Aug 2017 17:01:18 +0000 (19:01 +0200)
commita119ec7c824da4a618cb3f4c6e3557c38381b674
tree2f7061155f2c45d31509c660f334ec1f9efc16ea
parentb3f5897f6e46f6dc54d9f46ea16258f558173500
util-lib: add a new skip_dev_prefix() helper

This new helper removes a leading /dev if there is one. We have code
doing this all over the place, let's unify this, and correct it while
we are at it, by using path_startswith() rather than startswith() to
drop the prefix.
src/basic/path-util.h
src/basic/terminal-util.c
src/core/execute.c
src/test/test-path-util.c