]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/cephfs: DT_REG and DT_LNK values are wrong 40770/head
authorVarsha Rao <varao@redhat.com>
Wed, 24 Feb 2021 11:16:47 +0000 (16:46 +0530)
committerNathan Cutler <ncutler@suse.com>
Sat, 10 Apr 2021 21:12:23 +0000 (23:12 +0200)
DT_REG and DT_LNK don't match with values defined in
/usr/include/dirent.h

define DT_REG 8
define DT_LNK 10

This patch corrects them.

Fixes: https://tracker.ceph.com/issues/49459
Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit 91e2275f4cd6a72bc3a78418236db009f5c9c547)

src/pybind/cephfs/cephfs.pyx

index 04c9cca767c16f5608c94e66030c03f62446196b..e64e54347010feb30dd272134f0fa67ecf9a7359 100644 (file)
@@ -326,8 +326,8 @@ cdef make_ex(ret, msg):
 class DirEntry(namedtuple('DirEntry',
                ['d_ino', 'd_off', 'd_reclen', 'd_type', 'd_name'])):
     DT_DIR = 0x4
-    DT_REG = 0xA
-    DT_LNK = 0xC
+    DT_REG = 0x8
+    DT_LNK = 0xA
     def is_dir(self):
         return self.d_type == self.DT_DIR