From 98e79e16d5a19ae898cacaccd4cec8e6499fbfb9 Mon Sep 17 00:00:00 2001 From: Varsha Rao Date: Wed, 24 Feb 2021 16:46:47 +0530 Subject: [PATCH] pybind/cephfs: DT_REG and DT_LNK values are wrong 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 (cherry picked from commit 91e2275f4cd6a72bc3a78418236db009f5c9c547) --- src/pybind/cephfs/cephfs.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/cephfs/cephfs.pyx b/src/pybind/cephfs/cephfs.pyx index 9fcf187ea82ff..ed0bb227af6e0 100644 --- a/src/pybind/cephfs/cephfs.pyx +++ b/src/pybind/cephfs/cephfs.pyx @@ -316,8 +316,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 -- 2.39.5