From 3f2e9c4e1fa5587ec4f7ff07fbc5b5066c2d281e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 15 Nov 2011 14:36:55 -0600 Subject: mountinfo: Do not error out if realpath fails Reported-By: Dennis Schridde X-Gentoo-Bug: 383333 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=383333 --- src/rc/mountinfo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c index 5bbee06..adce434 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); -- cgit v1.2.3