From b9ddf9d364ec3c635bcfb79dfe6c7e241e01be82 Mon Sep 17 00:00:00 2001 From: Christopher Hoffman Date: Thu, 20 Feb 2025 14:55:32 +0000 Subject: [PATCH] client: Use new errno identifiers Signed-off-by: Christopher Hoffman --- src/client/Client.cc | 6 +++--- src/libcephfs.cc | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 87ea197a2d2..2d9a245edb9 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -18363,7 +18363,7 @@ int Client::set_fscrypt_policy_v2(int fd, const struct fscrypt_policy_v2& policy { Fh *f = get_filehandle(fd); if (!f) { - return -CEPHFS_EBADF; + return -EBADF; } return ll_set_fscrypt_policy_v2(f->inode.get(), policy); @@ -18725,7 +18725,7 @@ mds_rank_t Client::_get_random_up_mds() const int Client::get_inode_flags(const Inode* in, int* file_attr_out) { if (!file_attr_out) - return -CEPHFS_EINVAL; + return -EINVAL; *file_attr_out = 0; // set or clear the encryption flag depending on the inode status @@ -18740,7 +18740,7 @@ int Client::get_inode_flags(const Inode* in, int* file_attr_out) { int Client::get_inode_flags(int fd, int* file_attr_out) { Fh *fh = get_filehandle(fd); if (!fh) { - return -CEPHFS_EBADF; + return -EBADF; } return get_inode_flags(fh->inode.get(), file_attr_out); } diff --git a/src/libcephfs.cc b/src/libcephfs.cc index 455016c5606..f6e18f8f5b8 100644 --- a/src/libcephfs.cc +++ b/src/libcephfs.cc @@ -2500,7 +2500,7 @@ extern "C" int ceph_add_fscrypt_key(struct ceph_mount_info *cmount, int user) { if (!cmount->is_mounted()) - return -CEPHFS_ENOTCONN; + return -ENOTCONN; return cmount->get_client()->add_fscrypt_key(key_data, key_len, kid, user); } @@ -2510,7 +2510,7 @@ extern "C" int ceph_remove_fscrypt_key(struct ceph_mount_info *cmount, int user) { if (!cmount->is_mounted()) - return -CEPHFS_ENOTCONN; + return -ENOTCONN; return cmount->get_client()->remove_fscrypt_key(kid, user); } @@ -2519,7 +2519,7 @@ extern "C" int ceph_get_fscrypt_key_status(struct ceph_mount_info *cmount, struct fscrypt_get_key_status_arg *arg) { if (!cmount->is_mounted()) - return -CEPHFS_ENOTCONN; + return -ENOTCONN; return cmount->get_client()->get_fscrypt_key_status(arg); } @@ -2528,7 +2528,7 @@ extern "C" int ceph_set_fscrypt_policy_v2(struct ceph_mount_info *cmount, int fd, const struct fscrypt_policy_v2 *policy) { if (!cmount->is_mounted()) - return -CEPHFS_ENOTCONN; + return -ENOTCONN; return cmount->get_client()->set_fscrypt_policy_v2(fd, *policy); } @@ -2616,7 +2616,7 @@ extern "C" int ceph_get_perf_counters(struct ceph_mount_info *cmount, char **per extern "C" int get_inode_flags(struct ceph_mount_info *cmount, int fd, int* file_attr_out) { if (!cmount->is_mounted()) - return -CEPHFS_ENOTCONN; + return -ENOTCONN; return cmount->get_client()->get_inode_flags(fd, file_attr_out); } -- 2.39.5