summaryrefslogtreecommitdiff
path: root/checkpoint_gc
diff options
context:
space:
mode:
authorDaniel Rosenberg <drosen@google.com>2020-04-02 15:52:35 -0700
committerDaniel Rosenberg <drosen@google.com>2020-04-08 02:25:55 -0700
commit80205ee1d3a6fcabf1525d102fc030062ac0eb5b (patch)
treef313fe4912c553fc041c851a95e124eb2a3c0992 /checkpoint_gc
parent1ed5c4e9733647a36cf6046e0db5a87ef872629f (diff)
downloadextras-80205ee1d3a6fcabf1525d102fc030062ac0eb5b.tar.gz
Use realpath to grab underlying path for userdata
We may grab the by-name path for /data's block device. Use realpath to ensure we grab the correct name to access the sysfs entries. Bug: 153049163 Test: Run /vendor/bin/checkpoint_gc Change-Id: I297c7b60105d1966eb1304222a9727794035d3fc
Diffstat (limited to 'checkpoint_gc')
-rw-r--r--checkpoint_gc/checkpoint_gc.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/checkpoint_gc/checkpoint_gc.sh b/checkpoint_gc/checkpoint_gc.sh
index 682c8499..beaedcbc 100644
--- a/checkpoint_gc/checkpoint_gc.sh
+++ b/checkpoint_gc/checkpoint_gc.sh
@@ -31,7 +31,8 @@ MAX_TIME=3600
NAME=`while read dev dir type opt; do
if [ /data = ${dir} -a f2fs = ${type} ]; then
- echo ${dev##*/}
+ real_dev=$(realpath $dev)
+ echo ${real_dev##*/}
break
fi
done < /proc/mounts`