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
This commit is contained in:
parent
476034dd95
commit
3f2e9c4e1f
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user