diff --git a/sharedmem.c b/sharedmem.c index 66bbd5d..fb31720 100644 --- a/sharedmem.c +++ b/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) {