From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-commits+bounces-380945-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1R1iIp-0007I2-6M
	for garchives@archives.gentoo.org; Thu, 08 Sep 2011 17:22:15 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id C3CCA21C106;
	Thu,  8 Sep 2011 17:22:07 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 9456521C106
	for <gentoo-commits@lists.gentoo.org>; Thu,  8 Sep 2011 17:22:07 +0000 (UTC)
Received: from pelican.gentoo.org (unknown [66.219.59.40])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id DA67F1B401F
	for <gentoo-commits@lists.gentoo.org>; Thu,  8 Sep 2011 17:22:06 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id 3869580044
	for <gentoo-commits@lists.gentoo.org>; Thu,  8 Sep 2011 17:22:06 +0000 (UTC)
From: "Christian Ruppert" <idl0r@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Christian Ruppert" <idl0r@gentoo.org>
Message-ID: <e2f1464f47588792494686ccb195fe6207ce416f.idl0r@gentoo>
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: idl0r
X-VCS-Committer-Name: Christian Ruppert
X-VCS-Revision: e2f1464f47588792494686ccb195fe6207ce416f
Date: Thu,  8 Sep 2011 17:22:06 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 
X-Archives-Hash: b7e06fb909cfc79033e1ccd93a28086f

commit:     e2f1464f47588792494686ccb195fe6207ce416f
Author:     Christian Ruppert <idl0r <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  8 17:20:20 2011 +0000
Commit:     Christian Ruppert <idl0r <AT> gentoo <DOT> org>
CommitDate: Thu Sep  8 17:20:20 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D=
commit;h=3De2f1464f

Use the real/actual path when looking for mounts

/proc/mounts contains real/actual paths so we should do the same in mount=
info.

---
 src/rc/mountinfo.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c
index 91cb979..5bbee06 100644
--- a/src/rc/mountinfo.c
+++ b/src/rc/mountinfo.c
@@ -387,6 +387,7 @@ mountinfo(int argc, char **argv)
 	regex_t *skip_point_regex =3D NULL;
 	RC_STRINGLIST *nodes;
 	RC_STRING *s;
+	char real_path[PATH_MAX + 1];
 	int opt;
 	int result;
 	bool quiet;
@@ -457,7 +458,10 @@ mountinfo(int argc, char **argv)
 		if (argv[optind][0] !=3D '/')
 			eerrorx("%s: `%s' is not a mount point",
 			    argv[0], argv[optind]);
-		rc_stringlist_add(args.mounts, argv[optind++]);
+		if (realpath(argv[optind++], real_path) =3D=3D NULL) {
+			eerrorx("%s: realpath() failed: %s", argv[0], strerror(errno));
+		}
+		rc_stringlist_add(args.mounts, real_path);
 	}
 	nodes =3D find_mounts(&args);
 	rc_stringlist_free(args.mounts);