Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / arch / probe.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #include "arch/probe.h"
5
6 #include "arch/intel.h"
7 #include "arch/arm.h"
8 #include "arch/ppc.h"
9
10 int ceph_arch_probe(void)
11 {
12   if (ceph_arch_probed)
13     return 1;
14 #if defined(__i386__) || defined(__x86_64__)
15   ceph_arch_intel_probe();
16 #elif defined(__arm__) || defined(__aarch64__)
17   ceph_arch_arm_probe();
18 #elif defined(__powerpc__) || defined(__ppc__)
19   ceph_arch_ppc_probe();
20 #endif
21   ceph_arch_probed = 1;
22   return 1;
23 }
24
25 // do this once using the magic of c++.
26 int ceph_arch_probed = ceph_arch_probe();