From 5f4f2420364098835522da868a9e75205c9e4f9c Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 5 Oct 2015 10:18:00 -0500 Subject: mountinfo: fix --netdev and --nonetdev on Linux On Linux, the --netdev and --nonetdev switches were not working. They were both returning false. After this change, they operate based on the presence or abscence of the _netdev option in mount options. --- src/rc/mountinfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/rc') diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c index 3972a77a..53f2890b 100644 --- a/src/rc/mountinfo.c +++ b/src/rc/mountinfo.c @@ -305,7 +305,6 @@ find_mounts(struct args *args) buffer = xmalloc(sizeof(char) * PATH_MAX * 3); while (fgets(buffer, PATH_MAX * 3, fp)) { - netdev = -1; p = buffer; from = strsep(&p, " "); to = strsep(&p, " "); @@ -315,6 +314,8 @@ find_mounts(struct args *args) if ((ent = getmntfile(to))) { if (strstr(ent->mnt_opts, "_netdev")) netdev = 0; + else + netdev = 1; } process_mount(list, args, from, to, fst, opts, netdev); -- cgit v1.2.3