summaryrefslogtreecommitdiff
path: root/src/shutdown
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-04-04 13:36:19 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-04-23 23:29:29 +0200
commit13dcfe4661b467131c943620d0f44711798bfd54 (patch)
tree848fe89e5ec5b230c81f7197ddac2d36c46161c8 /src/shutdown
parentf5f899ef044e4b159e723b273ff35fda935f6427 (diff)
downloadsystemd-13dcfe4661b467131c943620d0f44711798bfd54.tar.gz
systemd-13dcfe4661b467131c943620d0f44711798bfd54.tar.bz2
systemd-13dcfe4661b467131c943620d0f44711798bfd54.zip
shared/mount-util: convert to libmount
It seems better to use just a single parsing algorithm for /proc/self/mountinfo. Also, unify the naming of variables in all places that use mnt_table_next_fs(). It makes it easier to compare the different call sites.
Diffstat (limited to 'src/shutdown')
-rw-r--r--src/shutdown/umount.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c
index 6afa512bff..ea9fba8831 100644
--- a/src/shutdown/umount.c
+++ b/src/shutdown/umount.c
@@ -55,18 +55,18 @@ void mount_points_list_free(MountPoint **head) {
}
int mount_points_list_get(const char *mountinfo, MountPoint **head) {
- _cleanup_(mnt_free_tablep) struct libmnt_table *t = NULL;
- _cleanup_(mnt_free_iterp) struct libmnt_iter *i = NULL;
+ _cleanup_(mnt_free_tablep) struct libmnt_table *table = NULL;
+ _cleanup_(mnt_free_iterp) struct libmnt_iter *iter = NULL;
int r;
assert(head);
- t = mnt_new_table();
- i = mnt_new_iter(MNT_ITER_FORWARD);
- if (!t || !i)
+ table = mnt_new_table();
+ iter = mnt_new_iter(MNT_ITER_FORWARD);
+ if (!table || !iter)
return log_oom();
- r = mnt_table_parse_mtab(t, mountinfo);
+ r = mnt_table_parse_mtab(table, mountinfo);
if (r < 0)
return log_error_errno(r, "Failed to parse %s: %m", mountinfo);
@@ -79,7 +79,7 @@ int mount_points_list_get(const char *mountinfo, MountPoint **head) {
bool try_remount_ro;
_cleanup_free_ MountPoint *m = NULL;
- r = mnt_table_next_fs(t, i, &fs);
+ r = mnt_table_next_fs(table, iter, &fs);
if (r == 1)
break;
if (r < 0)