]> git.ipfire.org Git - thirdparty/systemd.git/commit - meson.build
mount-tool: use libmount to parse /proc/self/mountinfo
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 4 Apr 2019 11:41:47 +0000 (13:41 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 23 Apr 2019 21:29:29 +0000 (23:29 +0200)
commit7d991d4818dcf55916c1076003c3508c91df9934
tree7550d27b42d31dd7c9aaa35e91772352586dfbb1
parent13dcfe4661b467131c943620d0f44711798bfd54
mount-tool: use libmount to parse /proc/self/mountinfo

Same motivation as in other places: let's use a single logic to parse this.

Use path_equal() to compare the path.

A bug in error handling is fixed: if we failed after the GREEDY_REALLOC but
before the line that sets the last item to NULL, we would jump to
_cleanup_strv_free_ with the strv unterminated. Let's use GREEDY_REALLOC0
to avoid the issue.
meson.build
src/mount/mount-tool.c