Whamcloud - gitweb
LU-8257 utils: fix mtab symlink logic 60/21260/4
authorBob Glossman <bob.glossman@intel.com>
Tue, 12 Jul 2016 18:19:39 +0000 (11:19 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 6 Aug 2016 06:24:58 +0000 (06:24 +0000)
commit1136148d2f07a282c45c45124039eca83a16f2cc
treee80ca52a6e837d0ed3c2f7cfb2bba87276d3ebc7
parent7a4001e2a3b5da093ea27899cb952daa3a48429b
LU-8257 utils: fix mtab symlink logic

Existing logic to check if /etc/mtab is symlinked to /proc
fails if the symlink is ../proc/self/mounts.  This is in fact
the case in many newer linux distros, for example recent Fedora
versions.

This mod updates the logic in mtab_is_proc() to give the correct
answer for any symlink into /proc.
It also cleans up the exact text on some error messages.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I49989f580c32e6baf820b88f6f9e6432aeded43d
Reviewed-on: http://review.whamcloud.com/21260
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/utils/mount_utils.c