From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8A0EA13888F for ; Mon, 5 Oct 2015 15:27:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1D663E07F5; Mon, 5 Oct 2015 15:27:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B29B4E07F5 for ; Mon, 5 Oct 2015 15:27:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 77A7D34090B for ; Mon, 5 Oct 2015 15:27:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5314F740 for ; Mon, 5 Oct 2015 15:27:06 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1444058280.5f4f2420364098835522da868a9e75205c9e4f9c.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/mountinfo.c X-VCS-Directories: src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 5f4f2420364098835522da868a9e75205c9e4f9c X-VCS-Branch: master Date: Mon, 5 Oct 2015 15:27:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 87505670-b794-4db2-b8b1-bf5b9b27aec0 X-Archives-Hash: 4d0ecd528dc836b23ef6fe642c56bc21 commit: 5f4f2420364098835522da868a9e75205c9e4f9c Author: William Hubbs gmail com> AuthorDate: Mon Oct 5 15:18:00 2015 +0000 Commit: William Hubbs gentoo 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);