commit: 5f4f2420364098835522da868a9e75205c9e4f9c
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Oct 5 15:18:00 2015 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Oct 5 15:18:00 2015 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=5f4f2420
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(-)
diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c
index 3972a77..53f2890 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);