From: J. Eric Ivancich Date: Tue, 30 Apr 2019 18:24:56 +0000 (-0400) Subject: rgw: add editor directive comments to rgw services source files X-Git-Tag: v15.1.0~2770^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F27897%2Fhead;p=ceph.git rgw: add editor directive comments to rgw services source files So that both vi and emacs help to correctly format the source files, add the directives to each of the source files. In addition, use `#pragma once` in the header files instead of the macro work-around. Signed-off-by: J. Eric Ivancich --- diff --git a/src/rgw/services/svc_finisher.cc b/src/rgw/services/svc_finisher.cc index d239ff3c4fa2..9e8bee0bf7a1 100644 --- a/src/rgw/services/svc_finisher.cc +++ b/src/rgw/services/svc_finisher.cc @@ -1,3 +1,6 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + #include "common/Finisher.h" #include "svc_finisher.h" diff --git a/src/rgw/services/svc_finisher.h b/src/rgw/services/svc_finisher.h index 116fd8fded07..c6c25f5a349d 100644 --- a/src/rgw/services/svc_finisher.h +++ b/src/rgw/services/svc_finisher.h @@ -1,6 +1,7 @@ -#ifndef CEPH_RGW_SERVICES_FINISHER_H -#define CEPH_RGW_SERVICES_FINISHER_H +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +#pragma once #include "rgw/rgw_service.h" @@ -41,5 +42,3 @@ public: void schedule_context(Context *c); }; - -#endif diff --git a/src/rgw/services/svc_notify.cc b/src/rgw/services/svc_notify.cc index f48b497b7fb9..bf61d1378392 100644 --- a/src/rgw/services/svc_notify.cc +++ b/src/rgw/services/svc_notify.cc @@ -1,3 +1,6 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + #include "include/random.h" #include "common/errno.h" diff --git a/src/rgw/services/svc_notify.h b/src/rgw/services/svc_notify.h index 306a5f337a4f..85780d36617b 100644 --- a/src/rgw/services/svc_notify.h +++ b/src/rgw/services/svc_notify.h @@ -1,6 +1,7 @@ -#ifndef CEPH_RGW_SERVICES_NOTIFY_H -#define CEPH_RGW_SERVICES_NOTIFY_H +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +#pragma once #include "rgw/rgw_service.h" @@ -96,6 +97,3 @@ public: void register_watch_cb(CB *cb); }; - -#endif - diff --git a/src/rgw/services/svc_quota.cc b/src/rgw/services/svc_quota.cc index f2baac36b452..38f68ccae36a 100644 --- a/src/rgw/services/svc_quota.cc +++ b/src/rgw/services/svc_quota.cc @@ -1,3 +1,6 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + #include "svc_quota.h" #include "svc_zone.h" diff --git a/src/rgw/services/svc_quota.h b/src/rgw/services/svc_quota.h index 7dfbf19b612b..01030e723844 100644 --- a/src/rgw/services/svc_quota.h +++ b/src/rgw/services/svc_quota.h @@ -1,6 +1,7 @@ -#ifndef CEPH_RGW_SERVICES_QUOTA_H -#define CEPH_RGW_SERVICES_QUOTA_H +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +#pragma once #include "rgw/rgw_service.h" @@ -19,5 +20,3 @@ public: const RGWQuotaInfo& get_bucket_quota() const; const RGWQuotaInfo& get_user_quota() const; }; - -#endif diff --git a/src/rgw/services/svc_rados.cc b/src/rgw/services/svc_rados.cc index 713068f4a930..6ec7376ff836 100644 --- a/src/rgw/services/svc_rados.cc +++ b/src/rgw/services/svc_rados.cc @@ -1,3 +1,6 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + #include "svc_rados.h" #include "include/rados/librados.hpp" diff --git a/src/rgw/services/svc_rados.h b/src/rgw/services/svc_rados.h index 89817f317b0b..ae9c2dcf91ba 100644 --- a/src/rgw/services/svc_rados.h +++ b/src/rgw/services/svc_rados.h @@ -1,6 +1,7 @@ -#ifndef CEPH_RGW_SERVICES_RADOS_H -#define CEPH_RGW_SERVICES_RADOS_H +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +#pragma once #include "rgw/rgw_service.h" @@ -173,5 +174,3 @@ public: friend Pool; friend Pool::List; }; - -#endif diff --git a/src/rgw/services/svc_sync_modules.cc b/src/rgw/services/svc_sync_modules.cc index ca6a7a303506..252bfa1b282d 100644 --- a/src/rgw/services/svc_sync_modules.cc +++ b/src/rgw/services/svc_sync_modules.cc @@ -1,3 +1,6 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + #include "svc_sync_modules.h" #include "rgw/rgw_sync_module.h" diff --git a/src/rgw/services/svc_sync_modules.h b/src/rgw/services/svc_sync_modules.h index 19c4ec57f7a7..6b5b224eaf72 100644 --- a/src/rgw/services/svc_sync_modules.h +++ b/src/rgw/services/svc_sync_modules.h @@ -1,6 +1,7 @@ -#ifndef CEPH_RGW_SERVICES_SYNC_MODULES_H -#define CEPH_RGW_SERVICES_SYNC_MODULES_H +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +#pragma once #include "rgw/rgw_service.h" @@ -21,6 +22,3 @@ public: void init(); }; - -#endif - diff --git a/src/rgw/services/svc_sys_obj.cc b/src/rgw/services/svc_sys_obj.cc index 8fd8530cc4b5..998dd2181e5a 100644 --- a/src/rgw/services/svc_sys_obj.cc +++ b/src/rgw/services/svc_sys_obj.cc @@ -1,3 +1,6 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + #include "svc_sys_obj.h" #include "svc_sys_obj_core.h" #include "svc_rados.h" diff --git a/src/rgw/services/svc_sys_obj.h b/src/rgw/services/svc_sys_obj.h index cce06131cdb4..462b94db1c6a 100644 --- a/src/rgw/services/svc_sys_obj.h +++ b/src/rgw/services/svc_sys_obj.h @@ -1,6 +1,7 @@ -#ifndef CEPH_RGW_SERVICES_SYS_OBJ_H -#define CEPH_RGW_SERVICES_SYS_OBJ_H +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +#pragma once #include "rgw/rgw_service.h" @@ -269,6 +270,3 @@ public: return sysobj_svc->get_obj(*this, obj); } }; - -#endif - diff --git a/src/rgw/services/svc_sys_obj_cache.cc b/src/rgw/services/svc_sys_obj_cache.cc index e2d41bfbedc1..faa38af8d8c4 100644 --- a/src/rgw/services/svc_sys_obj_cache.cc +++ b/src/rgw/services/svc_sys_obj_cache.cc @@ -1,3 +1,6 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + #include "svc_sys_obj_cache.h" #include "svc_zone.h" #include "svc_notify.h" diff --git a/src/rgw/services/svc_sys_obj_cache.h b/src/rgw/services/svc_sys_obj_cache.h index b8ff7039c9e8..69c6e10436c6 100644 --- a/src/rgw/services/svc_sys_obj_cache.h +++ b/src/rgw/services/svc_sys_obj_cache.h @@ -1,7 +1,7 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab -#ifndef CEPH_RGW_SERVICES_SYS_OBJ_CACHE_H -#define CEPH_RGW_SERVICES_SYS_OBJ_CACHE_H - +#pragma once #include "rgw/rgw_service.h" #include "rgw/rgw_cache.h" @@ -181,5 +181,3 @@ public: entries.clear(); } }; /* RGWChainedCacheImpl */ - -#endif diff --git a/src/rgw/services/svc_sys_obj_core.cc b/src/rgw/services/svc_sys_obj_core.cc index 6f715e9a655e..18c2e0aaee81 100644 --- a/src/rgw/services/svc_sys_obj_core.cc +++ b/src/rgw/services/svc_sys_obj_core.cc @@ -1,3 +1,6 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + #include "svc_sys_obj_core.h" #include "svc_rados.h" #include "svc_zone.h" diff --git a/src/rgw/services/svc_sys_obj_core.h b/src/rgw/services/svc_sys_obj_core.h index 38de7cfc8830..fa4c7e01d1f1 100644 --- a/src/rgw/services/svc_sys_obj_core.h +++ b/src/rgw/services/svc_sys_obj_core.h @@ -1,6 +1,7 @@ -#ifndef CEPH_RGW_SERVICES_SYS_OBJ_CORE_H -#define CEPH_RGW_SERVICES_SYS_OBJ_CORE_H +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +#pragma once #include "rgw/rgw_service.h" @@ -217,5 +218,3 @@ public: return zone_svc; } }; - -#endif diff --git a/src/rgw/services/svc_zone.cc b/src/rgw/services/svc_zone.cc index d3c3b3710407..ca8335c61ddd 100644 --- a/src/rgw/services/svc_zone.cc +++ b/src/rgw/services/svc_zone.cc @@ -1,3 +1,6 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + #include "svc_zone.h" #include "svc_rados.h" #include "svc_sys_obj.h" diff --git a/src/rgw/services/svc_zone.h b/src/rgw/services/svc_zone.h index 8c8dbebad43b..1672d6d94487 100644 --- a/src/rgw/services/svc_zone.h +++ b/src/rgw/services/svc_zone.h @@ -1,6 +1,7 @@ -#ifndef CEPH_RGW_SERVICES_ZONE_H -#define CEPH_RGW_SERVICES_ZONE_H +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +#pragma once #include "rgw/rgw_service.h" @@ -130,5 +131,3 @@ public: int list_periods(list& periods); int list_periods(const string& current_period, list& periods); }; - -#endif diff --git a/src/rgw/services/svc_zone_utils.cc b/src/rgw/services/svc_zone_utils.cc index ef9c9c88c334..dacc98cf10be 100644 --- a/src/rgw/services/svc_zone_utils.cc +++ b/src/rgw/services/svc_zone_utils.cc @@ -1,3 +1,6 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + #include "svc_zone_utils.h" #include "svc_rados.h" #include "svc_zone.h" diff --git a/src/rgw/services/svc_zone_utils.h b/src/rgw/services/svc_zone_utils.h index 158d2a926850..e2a2a4c32550 100644 --- a/src/rgw/services/svc_zone_utils.h +++ b/src/rgw/services/svc_zone_utils.h @@ -1,6 +1,7 @@ -#ifndef CEPH_RGW_SERVICES_ZONEUTILS_H -#define CEPH_RGW_SERVICES_ZONEUTILS_H +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +#pragma once #include "rgw/rgw_service.h" @@ -35,5 +36,3 @@ public: string unique_trans_id(const uint64_t unique_num); }; - -#endif