From ce644e17353b8c29fad129db98a6f4d971561560 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 23 Mar 2008 19:51:41 +0000 Subject: [PATCH] Report mounts in reverse order, Gentoo #214150. --- src/rc/mountinfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c index 3adff5de..0ad28231 100644 --- a/src/rc/mountinfo.c +++ b/src/rc/mountinfo.c @@ -453,7 +453,6 @@ int mountinfo(int argc, char **argv) } nodes = find_mounts(&args); rc_stringlist_free(args.mounts); - rc_stringlist_sort(&nodes); REG_FREE(args.fstype_regex); REG_FREE(args.skip_fstype_regex); @@ -464,6 +463,8 @@ int mountinfo(int argc, char **argv) result = EXIT_FAILURE; quiet = rc_yesno(getenv("EINFO_QUIET")); + + /* We should report the mounts in reverse order to ease unmounting */ TAILQ_FOREACH_REVERSE(s, nodes, rc_stringlist, entries) { if (point_regex && regexec(point_regex, s->value, 0, NULL, 0) != 0)