mirror of
https://github.com/linux-msm/rmtfs.git
synced 2024-12-04 01:24:14 +08:00
sharedmem: Keep /dev/qcom_rmtfs_memX fd open
/dev/qcom_rmtfs_mem0 fd is required to share the data.
Fixes: 9ef260ba6f
("ANDROID: Add Android support")
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
parent
9ef260ba6f
commit
ad5f456c18
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user