shared/mount-util: make sure utab is ignored in umount_recursive()
See https://github.com/systemd/systemd/pull/12218#pullrequestreview-226029985.
This commit is contained in:
parent
e2857b3d87
commit
2f2d81d957
|
@ -29,10 +29,15 @@ static inline int libmount_parse(
|
|||
if (!table || !iter)
|
||||
return -ENOMEM;
|
||||
|
||||
/* If source or path are specified, we use on the functions which ignore utab.
|
||||
* Only if both are empty, we use mnt_table_parse_mtab(). */
|
||||
|
||||
if (source)
|
||||
r = mnt_table_parse_stream(table, source, path);
|
||||
else if (path)
|
||||
r = mnt_table_parse_file(table, path);
|
||||
else
|
||||
r = mnt_table_parse_mtab(table, path);
|
||||
r = mnt_table_parse_mtab(table, NULL);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ int umount_recursive(const char *prefix, int flags) {
|
|||
|
||||
again = false;
|
||||
|
||||
r = libmount_parse(NULL, NULL, &table, &iter);
|
||||
r = libmount_parse("/proc/self/mountinfo", NULL, &table, &iter);
|
||||
if (r < 0)
|
||||
return log_debug_errno(r, "Failed to parse /proc/self/mountinfo: %m");
|
||||
|
||||
|
|
Loading…
Reference in a new issue