smatch: get the smatch bin dir correctly when it's a symlink
commit250e354525d82cc08335da539ee231fceeb2ed66
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 12 Jan 2018 08:34:43 +0000 (12 11:34 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 12 Jan 2018 08:34:43 +0000 (12 11:34 +0300)
treeccc9430de8aa022c9152e5a9e5746b65875e670b
parentbd3362c966996070006b0d05a625059a182354f3
smatch: get the smatch bin dir correctly when it's a symlink

Say you have a symlink from ~/bin/smatch to ~/src/smatch/smatch then Smatch
was expecting to find the smatch_data/ directory in ~/bin/smatch_data
instead of ~/src/smatch/smatch_data/.

We can find the actual bin location from reading in /proc.

Reported-by: Knut Omang <knut.omang@oracle.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch.c