X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fumount.c;h=2ae8f86ecd103cc98ff01dee344343a2f7a5c1f7;hp=ca4dbc23627665c07887fee4db08ad7c51a92cbe;hb=761163046260b42c0bed075c17d43e0e6c3dd3a4;hpb=3d20ed6d51e38968cd646e2b3b24f36673408024 diff --git a/src/umount.c b/src/umount.c index ca4dbc236..2ae8f86ec 100644 --- a/src/umount.c +++ b/src/umount.c @@ -105,7 +105,7 @@ static int mount_points_list_get(MountPoint **head) { goto finish; } - if (mount_point_is_api(p)) { + if (mount_point_is_api(p) || mount_point_ignore(p)) { free(p); continue; } @@ -400,12 +400,13 @@ static int mount_points_list_umount(MountPoint **head, bool *changed) { assert(head); LIST_FOREACH_SAFE(mount_point, m, n, *head) { - if (streq(m->path, "/")) + if (streq(m->path, "/")) { + n_failed++; continue; + } /* Trying to umount. Forcing to umount if busy (only for NFS mounts) */ if (umount2(m->path, MNT_FORCE) == 0) { - if (changed) *changed = true;