From: Christopher Hoffman Date: Thu, 20 Feb 2025 14:55:32 +0000 (+0000) Subject: client: Use new errno identifiers X-Git-Tag: testing/wip-vshankar-testing-20260120.085915-debug^2~13^2~80 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8b3bcef6cdbf354566d3be291e77e83528c7d3c8;p=ceph-ci.git client: Use new errno identifiers Signed-off-by: Christopher Hoffman --- diff --git a/src/client/Client.cc b/src/client/Client.cc index ebb3e98e818..1528ff3a67d 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -18482,7 +18482,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); @@ -18961,7 +18961,7 @@ SubvolumeMetricTracker::aggregate(bool clean) { 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 @@ -18976,7 +18976,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 98f63185c83..d8f54032b0b 100644 --- a/src/libcephfs.cc +++ b/src/libcephfs.cc @@ -2510,7 +2510,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); } @@ -2520,7 +2520,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); } @@ -2529,7 +2529,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); } @@ -2538,7 +2538,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); } @@ -2626,7 +2626,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); }