db845c: qcom: rmtfs: Use -o option to override partition by-name
Instead of hardcoding BY_PARTLABEL_PATH for AOSP,
reuse -o option as suggested by Bjorn to expand John's
patch to find correct partition by-name on newer
kernels (which is /dev/block/platform/soc*/*.*/by-name).
For example: On db845c running v5.4+ kernel we run:
rmtfs -o /dev/block/platform/soc@0/1d84000.ufshc/by-name -P -r -s
Change-Id: I05a18566370aff1018a79ec2c83532a2849ca359
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
diff --git a/qcom/rmtfs/rmtfs.c b/qcom/rmtfs/rmtfs.c
index 795c021..26c0488 100644
--- a/qcom/rmtfs/rmtfs.c
+++ b/qcom/rmtfs/rmtfs.c
@@ -499,7 +499,11 @@
while ((option = getopt(argc, argv, "o:Prsv")) != -1) {
switch (option) {
- /* -o sets the directory where EFS images are stored. */
+ /*
+ * -o sets the directory where EFS images are stored,
+ * or sets the directory from where raw EFS partitions
+ * can be picked by-name when used with -P option.
+ */
case 'o':
storage_root = optarg;
break;