]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: Use new errno identifiers
authorChristopher Hoffman <choffman@redhat.com>
Thu, 20 Feb 2025 14:55:32 +0000 (14:55 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Wed, 5 Nov 2025 13:59:34 +0000 (13:59 +0000)
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
src/client/Client.cc
src/libcephfs.cc

index ebb3e98e818305d9e0ee4844cea1355d825615fd..1528ff3a67d2aa1c6c5e80a1e3853919348bd6d1 100644 (file)
@@ -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);
 }
index 98f63185c83da6c3c71f02e97bc61167a62fddb3..d8f54032b0b3a3ebf1bf87731fb2facdc2c4f42a 100644 (file)
@@ -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);
 }