From 35b54a3c247235b1bffe2a22784a1d5be10267f3 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 30 Jan 2017 00:45:05 +0100 Subject: libbb: match_fstype() is unreadable in the extreme, fixing it Signed-off-by: Denys Vlasenko --- util-linux/mount.c | 2 +- util-linux/umount.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'util-linux') diff --git a/util-linux/mount.c b/util-linux/mount.c index 4f5dced..f0245f7 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -2312,7 +2312,7 @@ int mount_main(int argc UNUSED_PARAM, char **argv) bb_error_msg_and_die(bb_msg_you_must_be_root); // Does type match? (NULL matches always) - if (!match_fstype(mtcur, fstype)) + if (!fstype_matches(mtcur->mnt_type, fstype)) continue; // Skip noauto and swap anyway diff --git a/util-linux/umount.c b/util-linux/umount.c index 78eef57..c958fd5 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c @@ -125,8 +125,8 @@ int umount_main(int argc UNUSED_PARAM, char **argv) } else { setup_common_bufsiz(); while (getmntent_r(fp, &me, bb_common_bufsiz1, COMMON_BUFSIZE)) { - /* Match fstype if passed */ - if (!match_fstype(&me, fstype)) + /* Match fstype (fstype==NULL matches always) */ + if (!fstype_matches(me.mnt_type, fstype)) continue; m = xzalloc(sizeof(*m)); m->next = mtl; -- cgit v1.1