]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
common/win32: Fixed function name typo
authorStefan Chivu <schivu@cloudbasesolutions.com>
Wed, 9 Nov 2022 13:03:37 +0000 (15:03 +0200)
committerStefan Chivu <schivu@cloudbasesolutions.com>
Thu, 10 Nov 2022 07:44:12 +0000 (09:44 +0200)
There was a typo in the function name cephfs_errno_to_ntsatus
defined in common/win32/errno.cc.

It has been replaced with cephfs_errno_to_ntstatus_map to avoid
conflicts with the existing cephfs_errno_to_ntstatus function.

Signed-off-by: Stefan Chivu <schivu@cloudbasesolutions.com>
src/common/win32/errno.cc
src/dokan/ceph_dokan.cc
src/include/win32/win32_errno.h

index bac9320a36121b920c41cb982d4eb4d2db8432c1..d0942fac9af3165568e625c531f4285b84172a6c 100644 (file)
@@ -638,7 +638,7 @@ static const ceph::unordered_map<int,NTSTATUS> cephfs_errno_to_ntstatus = {
   {CEPHFS_EOLDSNAPC,       STATUS_DATA_ERROR}
 };
 
-__u32 cephfs_errno_to_ntsatus(int cephfs_errno)
+__u32 cephfs_errno_to_ntstatus_map(int cephfs_errno)
 {
   cephfs_errno = abs(cephfs_errno);
 
index 65df2c13afa047347136b01bb042727dcdbe87e7..8147b4542dbb09e962968bdc8fa0fcc7a49b7e43 100644 (file)
@@ -93,7 +93,7 @@ static NTSTATUS do_open_file(
   if (fd < 0) {
     dout(2) << __func__ << " " << path
             << ": ceph_open failed. Error: " << fd << dendl;
-    return cephfs_errno_to_ntsatus(fd);
+    return cephfs_errno_to_ntstatus_map(fd);
   }
 
   fdc->fd = fd;
@@ -115,7 +115,7 @@ static NTSTATUS WinCephCreateDirectory(
   if (ret < 0) {
     dout(2) << __func__ << " " << path
             << ": ceph_mkdir failed. Error: " << ret << dendl;
-    return cephfs_errno_to_ntsatus(ret);
+    return cephfs_errno_to_ntstatus_map(ret);
   }
   return 0;
 }
@@ -335,7 +335,7 @@ static NTSTATUS WinCephReadFile(
     if (fd_new < 0) {
       dout(2) << __func__ << " " << path
               << ": ceph_open failed. Error: " << fd_new << dendl;
-      return cephfs_errno_to_ntsatus(fd_new);
+      return cephfs_errno_to_ntstatus_map(fd_new);
     }
 
     int ret = ceph_read(cmount, fd_new, (char*) Buffer, BufferLength, Offset);
@@ -345,7 +345,7 @@ static NTSTATUS WinCephReadFile(
               << ". Offset: " << Offset
               << "Buffer length: " << BufferLength << dendl;
       ceph_close(cmount, fd_new);
-      return cephfs_errno_to_ntsatus(ret);
+      return cephfs_errno_to_ntstatus_map(ret);
     }
     *ReadLength = ret;
     ceph_close(cmount, fd_new);
@@ -357,7 +357,7 @@ static NTSTATUS WinCephReadFile(
               << ": ceph_read failed. Error: " << ret
               << ". Offset: " << Offset
               << "Buffer length: " << BufferLength << dendl;
-      return cephfs_errno_to_ntsatus(ret);
+      return cephfs_errno_to_ntstatus_map(ret);
     }
     *ReadLength = ret;
     return 0;
@@ -386,7 +386,7 @@ static NTSTATUS WinCephWriteFile(
       if (ret) {
         dout(2) << __func__ << " " << path
                 << ": ceph_statx failed. Error: " << ret << dendl;
-        return cephfs_errno_to_ntsatus(ret);
+        return cephfs_errno_to_ntstatus_map(ret);
       }
 
       Offset = stbuf.stx_size;
@@ -422,7 +422,7 @@ static NTSTATUS WinCephWriteFile(
     if (fd_new < 0) {
       dout(2) << __func__ << " " << path
               << ": ceph_open failed. Error: " << fd_new << dendl;
-      return cephfs_errno_to_ntsatus(fd_new);
+      return cephfs_errno_to_ntstatus_map(fd_new);
     }
 
     int ret = ceph_write(cmount, fd_new, (char*) Buffer,
@@ -433,7 +433,7 @@ static NTSTATUS WinCephWriteFile(
               << ". Offset: " << Offset
               << "Buffer length: " << NumberOfBytesToWrite << dendl;
       ceph_close(cmount, fd_new);
-      return cephfs_errno_to_ntsatus(ret);
+      return cephfs_errno_to_ntstatus_map(ret);
     }
     *NumberOfBytesWritten = ret;
     ceph_close(cmount, fd_new);
@@ -446,7 +446,7 @@ static NTSTATUS WinCephWriteFile(
               << ": ceph_write failed. Error: " << ret
               << ". Offset: " << Offset
               << "Buffer length: " << NumberOfBytesToWrite << dendl;
-      return cephfs_errno_to_ntsatus(ret);
+      return cephfs_errno_to_ntstatus_map(ret);
     }
     *NumberOfBytesWritten = ret;
     return 0;
@@ -467,7 +467,7 @@ static NTSTATUS WinCephFlushFileBuffers(
   if (ret) {
     dout(2) << __func__ << " " << get_path(FileName)
             << ": ceph_sync failed. Error: " << ret << dendl;
-    return cephfs_errno_to_ntsatus(ret);
+    return cephfs_errno_to_ntstatus_map(ret);
   }
   return 0;
 }
@@ -490,14 +490,14 @@ static NTSTATUS WinCephGetFileInformation(
     if (ret) {
       dout(2) << __func__ << " " << path
               << ": ceph_statx failed. Error: " << ret << dendl;
-      return cephfs_errno_to_ntsatus(ret);
+      return cephfs_errno_to_ntstatus_map(ret);
     }
   } else {
     int ret = ceph_fstatx(cmount, fdc->fd, &stbuf, requested_attrs, 0);
     if (ret) {
       dout(2) << __func__ << " " << path
               << ": ceph_fstatx failed. Error: " << ret << dendl;
-      return cephfs_errno_to_ntsatus(ret);
+      return cephfs_errno_to_ntstatus_map(ret);
     }
   }
 
@@ -534,7 +534,7 @@ static NTSTATUS WinCephFindFiles(
   if (ret != 0) {
     dout(2) << __func__ << " " << path
             << ": ceph_mkdir failed. Error: " << ret << dendl;
-    return cephfs_errno_to_ntsatus(ret);
+    return cephfs_errno_to_ntstatus_map(ret);
   }
 
   WIN32_FIND_DATAW findData;
@@ -554,7 +554,7 @@ static NTSTATUS WinCephFindFiles(
     if (ret < 0) {
       dout(2) << __func__ << " " << path
               << ": ceph_readdirplus_r failed. Error: " << ret << dendl;
-      return cephfs_errno_to_ntsatus(ret);
+      return cephfs_errno_to_ntstatus_map(ret);
     }
 
     to_wstring(result.d_name).copy(findData.cFileName, MAX_PATH);
@@ -617,7 +617,7 @@ static NTSTATUS WinCephDeleteDirectory(
   if (ret != 0) {
     dout(2) << __func__ << " " << path
             << ": ceph_opendir failed. Error: " << ret << dendl;
-    return cephfs_errno_to_ntsatus(ret);
+    return cephfs_errno_to_ntstatus_map(ret);
   }
 
   WIN32_FIND_DATAW findData;
@@ -654,7 +654,7 @@ static NTSTATUS WinCephMoveFile(
             << ": ceph_rename failed. Error: " << ret << dendl;
   }
 
-  return cephfs_errno_to_ntsatus(ret);
+  return cephfs_errno_to_ntstatus_map(ret);
 }
 
 static NTSTATUS WinCephSetEndOfFile(
@@ -673,7 +673,7 @@ static NTSTATUS WinCephSetEndOfFile(
     dout(2) << __func__ << " " << get_path(FileName)
             << ": ceph_ftruncate failed. Error: " << ret
             << " Offset: " << ByteOffset << dendl;
-    return cephfs_errno_to_ntsatus(ret);
+    return cephfs_errno_to_ntstatus_map(ret);
   }
 
   return 0;
@@ -696,7 +696,7 @@ static NTSTATUS WinCephSetAllocationSize(
   if (ret) {
     dout(2) << __func__ << " " << get_path(FileName)
             << ": ceph_fstatx failed. Error: " << ret << dendl;
-    return cephfs_errno_to_ntsatus(ret);
+    return cephfs_errno_to_ntstatus_map(ret);
   }
 
   if ((unsigned long long) AllocSize < stbuf.stx_size) {
@@ -704,7 +704,7 @@ static NTSTATUS WinCephSetAllocationSize(
     if (ret) {
       dout(2) << __func__ << " " << get_path(FileName)
               << ": ceph_ftruncate failed. Error: " << ret << dendl;
-      return cephfs_errno_to_ntsatus(ret);
+      return cephfs_errno_to_ntstatus_map(ret);
     }
     return 0;
   }
@@ -756,7 +756,7 @@ static NTSTATUS WinCephSetFileTime(
   if (ret) {
     dout(2) << __func__ << " " << path
             << ": ceph_setattrx failed. Error: " << ret << dendl;
-    return cephfs_errno_to_ntsatus(ret);
+    return cephfs_errno_to_ntstatus_map(ret);
   }
   return 0;
 }
@@ -810,7 +810,7 @@ static NTSTATUS WinCephGetDiskFreeSpace(
   int ret = ceph_statfs(cmount, "/", &vfsbuf);
   if (ret) {
     derr << "ceph_statfs failed. Error: " << ret << dendl;
-    return cephfs_errno_to_ntsatus(ret);;
+    return cephfs_errno_to_ntstatus_map(ret);;
   }
 
   *FreeBytesAvailable   = vfsbuf.f_bsize * vfsbuf.f_bfree;
@@ -874,7 +874,7 @@ NTSTATUS get_volume_serial(PDWORD serial) {
                           fsid_str, sizeof(fsid_str));
   if (ret < 0) {
     dout(2) << "Coudln't retrieve the cluster fsid. Error: " << ret << dendl;
-    return cephfs_errno_to_ntsatus(ret);
+    return cephfs_errno_to_ntstatus_map(ret);
   }
 
   uuid_d fsid;
@@ -931,7 +931,7 @@ int do_map() {
   r = ceph_mount(cmount, g_cfg->root_path.c_str());
   if (r) {
     derr << "ceph_mount failed. Error: " << r << dendl;
-    return cephfs_errno_to_ntsatus(r);
+    return cephfs_errno_to_ntstatus_map(r);
   }
 
   if (g_cfg->win_vol_name.empty()) {
index c842b250f4b611383449bf215b41e2ec5247070f..dd8ff8474fb79138c945f44713dd865c9a3296a7 100644 (file)
@@ -137,7 +137,7 @@ extern "C" {
 
 __s32 wsae_to_errno(__s32 r);
 __u32 errno_to_ntstatus(__s32 r);
-__u32 cephfs_errno_to_ntsatus(int cephfs_errno);
+__u32 cephfs_errno_to_ntstatus_map(int cephfs_errno);
 
 #ifdef __cplusplus
 }