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.
This commit is contained in:
William Hubbs 2015-10-05 10:18:00 -05:00
parent b3f7ff901f
commit 5f4f242036

View File

@ -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);