diff options
author | Jens Wiklander <jens.wiklander@linaro.org> | 2016-10-18 17:07:26 +0200 |
---|---|---|
committer | Jens Wiklander <jens.wiklander@linaro.org> | 2016-10-25 12:44:02 +0200 |
commit | e4302df3411aa05a45383413c488926e1af0f7eb (patch) | |
tree | 684300bec957b2b639a79b45dfe3f2e965499680 /core/tee/tee_fs_rpc.c | |
parent | 850c8ebb05d57009ea1bc974269e1ab50f037017 (diff) |
core: FS: remove unused legacy RPC functions
Removes unused legacy wrapper functions for FS RPC operations.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU)
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'core/tee/tee_fs_rpc.c')
-rw-r--r-- | core/tee/tee_fs_rpc.c | 189 |
1 files changed, 0 insertions, 189 deletions
diff --git a/core/tee/tee_fs_rpc.c b/core/tee/tee_fs_rpc.c index 8cec4d87..91134919 100644 --- a/core/tee/tee_fs_rpc.c +++ b/core/tee/tee_fs_rpc.c @@ -178,27 +178,6 @@ exit: return rc; } -int tee_fs_rpc_close(int id, int fd) -{ - struct tee_fs_rpc head = { 0 }; - TEE_Result res; - int rc = RPC_FAILED; - - DMSG("(id: %d, fd: %d)...", id, fd); - - head.op = TEE_FS_CLOSE; - head.fd = fd; - - res = tee_fs_rpc_send_cmd(id, &head, NULL, 0, TEE_FS_MODE_NONE); - if (res != TEE_SUCCESS) - goto exit; - - rc = head.res; -exit: - DMSG("...%d", rc); - return rc; -} - int tee_fs_rpc_end_transaction(int id, bool rollback) { struct tee_fs_rpc head = { 0 }; @@ -223,28 +202,6 @@ exit: return rc; } -int tee_fs_rpc_ftruncate(int id, int fd, tee_fs_off_t length) -{ - struct tee_fs_rpc head = { 0 }; - TEE_Result res; - int rc = RPC_FAILED; - - DMSG("(id: %d, fd: %d, length: %" PRId64 ")...", id, fd, length); - - head.op = TEE_FS_TRUNC; - head.fd = fd; - head.arg = length; - - res = tee_fs_rpc_send_cmd(id, &head, NULL, 0, TEE_FS_MODE_NONE); - if (res != TEE_SUCCESS) - goto exit; - - rc = head.res; -exit: - DMSG("...%d", rc); - return rc; -} - int tee_fs_rpc_link(int id, const char *old, const char *nw) { size_t len_old; @@ -283,31 +240,6 @@ exit: return rc; } -tee_fs_off_t tee_fs_rpc_lseek(int id, int fd, tee_fs_off_t offset, - int whence) -{ - struct tee_fs_rpc head = { 0 }; - tee_fs_off_t rc = RPC_FAILED; - TEE_Result res; - - DMSG("(id: %d, fd: %d, offset: %" PRId64 ", whence: %d)...", id, fd, - offset, whence); - - head.op = TEE_FS_SEEK; - head.fd = fd; - head.arg = offset; - head.flags = whence; - - res = tee_fs_rpc_send_cmd(id, &head, NULL, 0, TEE_FS_MODE_NONE); - if (res != TEE_SUCCESS) - goto exit; - - rc = head.res; -exit: - DMSG("...%" PRId64, rc); - return rc; -} - int tee_fs_rpc_mkdir(int id, const char *path, tee_fs_mode_t mode) { struct tee_fs_rpc head = { 0 }; @@ -338,36 +270,6 @@ exit: return rc; } -int tee_fs_rpc_open(int id, const char *file, int flags) -{ - struct tee_fs_rpc head = { 0 }; - TEE_Result res; - int rc = RPC_FAILED; - size_t len; - - DMSG("(id: %d, file: %s, flags: %d)...", id, file, flags); - - if (!file) - goto exit; - - len = strlen(file) + 1; - if (len <= 1) - goto exit; - - head.op = TEE_FS_OPEN; - head.flags = flags; - - res = tee_fs_rpc_send_cmd(id, &head, (void *)file, len, - TEE_FS_MODE_IN); - if (res != TEE_SUCCESS) - goto exit; - - rc = head.res; -exit: - DMSG("...%d", rc); - return rc; -} - struct tee_fs_dir *tee_fs_rpc_opendir(int id, const char *name) { struct tee_fs_rpc head = { 0 }; @@ -410,38 +312,6 @@ exit: return dir; } -int tee_fs_rpc_read(int id, int fd, void *buf, size_t len) -{ - struct tee_fs_rpc head = { 0 }; - TEE_Result res; - int rc = RPC_FAILED; - - DMSG("(id: %d, fd: %d, buf: %p, len: %zu)...", id, fd, (void *)buf, - len); - - if (!len) { - res = 0; - goto exit; - } - - if (!buf) - goto exit; - - head.op = TEE_FS_READ; - head.fd = fd; - head.len = (uint32_t)len; - - res = tee_fs_rpc_send_cmd(id, &head, (void *)buf, len, - TEE_FS_MODE_OUT); - if (res != TEE_SUCCESS) - goto exit; - - rc = head.res; -exit: - DMSG("...%d", rc); - return rc; -} - struct tee_fs_dirent *tee_fs_rpc_readdir(int id, struct tee_fs_dir *d) { struct tee_fs_dirent *rc = NULL; @@ -520,36 +390,6 @@ exit: return rc; } -int tee_fs_rpc_write(int id, int fd, const void *buf, size_t len) -{ - struct tee_fs_rpc head = { 0 }; - TEE_Result res; - int rc = RPC_FAILED; - - DMSG("(id: %d, fd: %d, buf: %p, len: %zu)...", id, fd, buf, len); - - if (!len) { - res = 0; - goto exit; - } - - if (!buf) - goto exit; - - head.op = TEE_FS_WRITE; - head.fd = fd; - head.len = (uint32_t)len; - - res = tee_fs_rpc_send_cmd(id, &head, (void *)buf, len, TEE_FS_MODE_IN); - if (res != TEE_SUCCESS) - goto exit; - - rc = head.res; -exit: - DMSG("...%d", rc); - return rc; -} - int tee_fs_rpc_closedir(int id, struct tee_fs_dir *d) { struct tee_fs_rpc head = { 0 }; @@ -609,35 +449,6 @@ exit: return rc; } -int tee_fs_rpc_unlink(int id, const char *file) -{ - struct tee_fs_rpc head = { 0 }; - size_t len; - TEE_Result res; - int rc = RPC_FAILED; - - DMSG("(id: %d, file: %s)...", id, file); - - if (!file) - goto exit; - - len = strlen(file) + 1; - if (len <= 1) - goto exit; - - head.op = TEE_FS_UNLINK; - - res = tee_fs_rpc_send_cmd(id, &head, (void *)file, len, - TEE_FS_MODE_IN); - if (res != TEE_SUCCESS) - goto exit; - - rc = head.res; -exit: - DMSG("...%d", rc); - return rc; -} - static TEE_Result operation_commit(struct tee_fs_rpc_operation *op) { return thread_rpc_cmd(op->id, op->num_params, op->params); |