summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2020-02-13 19:42:46 +0530
committerAmit Pundir <amit.pundir@linaro.org>2020-02-13 20:10:22 +0530
commita95578fd5955b88aa05acb60c5d8a4edf86bba5a (patch)
treefc32e500da7a66d8c0348ea35dcfbfc82a5c91d5
parent11a59cd90e80f67fa3650620d58bb228d6ce0e7d (diff)
TODO: RMTFS: ANDROID: Open /dev/qcom_rmtfs_memX fd and fix partition by-name path
/dev/qcom_rmtfs_mem0 fd is required to share the data. Also folded John's patch to find correct partition by-name on newer kernels. Change-Id: Ibf5f516cabdf7b01b712880b7f492bb5d7022f1f Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
-rw-r--r--qcom/rmtfs/sharedmem.c8
-rw-r--r--qcom/rmtfs/storage.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/qcom/rmtfs/sharedmem.c b/qcom/rmtfs/sharedmem.c
index 66bbd5d..fb31720 100644
--- a/qcom/rmtfs/sharedmem.c
+++ b/qcom/rmtfs/sharedmem.c
@@ -211,6 +211,14 @@ static int rmtfs_mem_open_rfsa(struct rmtfs_mem *rmem, int client_id)
errno = 0;
+ snprintf(path, sizeof(path), "/dev/qcom_rmtfs_mem%d", client_id);
+ rmem->fd = open(path, O_RDWR);
+ if (rmem->fd < 0) {
+ saved_errno = errno;
+ fprintf(stderr, "failed to open %s: %s\n", path, strerror(errno));
+ return -saved_errno;
+ }
+
snprintf(path, sizeof(path), "/sys/class/rmtfs/qcom_rmtfs_mem%d/phys_addr", client_id);
fd = open(path, O_RDONLY);
if (fd < 0) {
diff --git a/qcom/rmtfs/storage.c b/qcom/rmtfs/storage.c
index d31f757..bce002a 100644
--- a/qcom/rmtfs/storage.c
+++ b/qcom/rmtfs/storage.c
@@ -14,7 +14,7 @@
#ifndef ANDROID
#define BY_PARTLABEL_PATH "/dev/disk/by-partlabel"
#else
-#define BY_PARTLABEL_PATH "/dev/block/by-name"
+#define BY_PARTLABEL_PATH "/dev/block/platform/soc@0/1d84000.ufshc/by-name"
#endif
#define MIN(x, y) ((x) < (y) ? (x) : (y))