diff options
author | Huang Ying <ying.huang@intel.com> | 2009-06-03 09:08:17 +0800 |
---|---|---|
committer | Huang Ying <ying.huang@intel.com> | 2009-06-03 09:08:17 +0800 |
commit | 290d7d01a20fb5c5deafbd64585cda097532e696 (patch) | |
tree | e566fa2b951790e4a14daa64baeae8468a4785b1 | |
parent | 10b2c30c26aefc4e844321e2e38719a1c4086e17 (diff) | |
download | mce-test-290d7d01a20fb5c5deafbd64585cda097532e696.tar.gz |
Canonicalise $KSRC_DIR in kdump driver
$KSRC_DIR may be a symbol link, this may break "find" used on that.
So convert it into canonical form before usage, this can check whether
it is a valid directory too.
-rwxr-xr-x | drivers/kdump/driver.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/kdump/driver.sh b/drivers/kdump/driver.sh index bc4a62a..a11dfde 100755 --- a/drivers/kdump/driver.sh +++ b/drivers/kdump/driver.sh @@ -108,6 +108,12 @@ dump_gcov() if [ -z "$KSRC_DIR" ]; then echo " Failed: please set KSRC_DIR for GCOV" return + else + KSRC_DIR=$(set -P && cd "$KSRC_DIR" && pwd) + if [ -z "$KSRC_DIR"]; then + echo " Failed: Invalid KSRC_DIR, please check your setup" + return + fi fi export KSRC_DIR local gcov_head_raw=$WDIR/dump_gcov_head_raw |