From: Lucian Petrut Date: Fri, 18 Oct 2019 09:49:11 +0000 (+0000) Subject: common: skip undefined open flags on Windows X-Git-Tag: wip-pdonnell-testing-20200918.022351~492^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9ce91a6c515d0308280527e7409ab1032bac7959;p=ceph-ci.git common: skip undefined open flags on Windows O_NOFOLLOW and O_DIRECTORY are not available on Windows. We'll just skip those flags for now when converting flags. Signed-off-by: Lucian Petrut --- diff --git a/src/common/ceph_fs.cc b/src/common/ceph_fs.cc index 7a4b59f872a..380b401df30 100644 --- a/src/common/ceph_fs.cc +++ b/src/common/ceph_fs.cc @@ -76,8 +76,14 @@ int ceph_flags_sys2wire(int flags) ceph_sys2wire(O_CREAT); ceph_sys2wire(O_EXCL); ceph_sys2wire(O_TRUNC); + + #ifndef _WIN32 ceph_sys2wire(O_DIRECTORY); ceph_sys2wire(O_NOFOLLOW); + // In some cases, FILE_FLAG_BACKUP_SEMANTICS may be used instead + // of O_DIRECTORY. We may need some workarounds in order to handle + // the fact that those flags are not available on Windows. + #endif #undef ceph_sys2wire