common/page.cc \
common/lockdep.cc \
common/DoutStreambuf.cc \
- common/debug.cc
+ common/debug.cc \
+ common/version.cc
libcrush_a_SOURCES = \
crush/builder.c \
common/LogEntry.h\
common/WorkQueue.h\
common/debug.h\
+ common/version.h\
common/errno.h\
common/likely.h\
common/lockdep.h\
*/
pthread_mutex_t _dout_lock = PTHREAD_MUTEX_INITIALIZER;
-#define _STR(x) #x
-#define STRINGIFY(x) _STR(x)
-
-std::string ceph_version_to_string(void)
-{
- std::ostringstream oss;
- oss << "ceph version " << VERSION << " (commit:"
- << STRINGIFY(CEPH_GIT_VER) << ")";
- return oss.str();
-}
-
-void dout_output_ceph_version(void)
-{
- generic_dout(-1) << ceph_version_to_string() << dendl;
-}
-
void _dout_open_log()
{
// should hold _dout_lock here
extern bool _dout_need_open;
extern pthread_mutex_t _dout_lock;
-extern std::string ceph_version_to_string(void);
-
-extern void dout_output_ceph_version(void);
-
extern void _dout_open_log();
extern int dout_handle_daemonize();
--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2011 New Dream Network
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software
+ * Foundation. See file COPYING.
+ *
+ */
+
+#include "config.h"
+#include "ceph_ver.h"
+#include "common/debug.h"
+#include "common/version.h"
+
+#include <sstream>
+#include <string>
+
+#define _STR(x) #x
+#define STRINGIFY(x) _STR(x)
+
+std::string ceph_version_to_string(void)
+{
+ std::ostringstream oss;
+ oss << "ceph version " << VERSION << " (commit:"
+ << STRINGIFY(CEPH_GIT_VER) << ")";
+ return oss.str();
+}
+
+void dout_output_ceph_version(void)
+{
+ generic_dout(-1) << ceph_version_to_string() << dendl;
+}
--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2011 New Dream Network
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software
+ * Foundation. See file COPYING.
+ *
+ */
+
+#ifndef CEPH_COMMON_VERSION_H
+#define CEPH_COMMON_VERSION_H
+
+// Return a string describing the Ceph version
+std::string ceph_version_to_string(void);
+
+// Output Ceph version to dout with prio -1
+void dout_output_ceph_version(void);
+
+#endif
#include "common/ProfLogger.h"
#include "common/common_init.h"
#include "common/dyn_snprintf.h"
+#include "common/version.h"
#include "config.h"
#include "include/atomic.h"
#include "include/str_list.h"