aboutsummaryrefslogtreecommitdiff
path: root/src/rc
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2015-10-05 10:18:00 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2015-10-05 10:18:00 -0500
commit5f4f2420364098835522da868a9e75205c9e4f9c (patch)
treef73563ab1e39d4bc48d27924a866716c61f0eaf1 /src/rc
parentb3f7ff901f7d3ed00b9f73c601193ac507f62eaf (diff)
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.
Diffstat (limited to 'src/rc')
-rw-r--r--src/rc/mountinfo.c3
1 files changed, 2 insertions, 1 deletions
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);