aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-11-15 14:36:55 -0600
committerWilliam Hubbs <williamh@gentoo.org>2011-11-15 15:19:55 -0600
commit3f2e9c4e1fa5587ec4f7ff07fbc5b5066c2d281e (patch)
tree08c32851e872fd77aaadc2e98c9b6380e7983a36 /src
parent476034dd9595c56dab4e19ce04424dcfd8431dea (diff)
mountinfo: Do not error out if realpath fails
Reported-By: Dennis Schridde <devurandom@gmx.net> X-Gentoo-Bug: 383333 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=383333
Diffstat (limited to 'src')
-rw-r--r--src/rc/mountinfo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c
index 5bbee06b..adce4344 100644
--- a/src/rc/mountinfo.c
+++ b/src/rc/mountinfo.c
@@ -458,10 +458,10 @@ mountinfo(int argc, char **argv)
if (argv[optind][0] != '/')
eerrorx("%s: `%s' is not a mount point",
argv[0], argv[optind]);
- if (realpath(argv[optind++], real_path) == NULL) {
- eerrorx("%s: realpath() failed: %s", argv[0], strerror(errno));
- }
- rc_stringlist_add(args.mounts, real_path);
+ char *this_path = argv[optind++];
+ if (realpath(this_path, real_path))
+ this_path = real_path;
+ rc_stringlist_add(args.mounts, this_path);
}
nodes = find_mounts(&args);
rc_stringlist_free(args.mounts);