chiark / gitweb /
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)
committerSven Eden <yamakuzure@gmx.net>
Mon, 25 Sep 2017 12:30:39 +0000 (14:30 +0200)
commit1af2863f2cc977ecc0bcbde641191627fc07a9f1
tree9ab03ef24cced3f1a0e7a6069ee5339533fb625e
parent9826bd0b4642ce3699b5b8ff6503c6f2e1f3f3be
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/terminal-util.c