Utils/Console: Fix DirectoryNode::add(...) API
[senf.git] / senf / Utils / Console / Server.cc
index a1bad60..b46cd6e 100644 (file)
@@ -33,9 +33,9 @@
 #include <boost/iostreams/device/file_descriptor.hpp>
 #include <boost/iostreams/stream.hpp>
 #include <boost/bind.hpp>
-#include "../../Utils/senfassert.hh"
-#include "../../Utils/membind.hh"
-#include "../../Utils/Logger/SenfLog.hh"
+#include <senf/Utils/senfassert.hh>
+#include <senf/Utils/membind.hh>
+#include <senf/Utils/Logger/SenfLog.hh>
 #include "LineEditor.hh"
 #include "ScopedDirectory.hh"
 #include "Sysdir.hh"
@@ -354,8 +354,10 @@ prefix_ unsigned senf::console::Client::getWidth(std::ostream & os, unsigned def
 
 prefix_ senf::console::Client::SysBacktrace::SysBacktrace()
 {
-    sysdir().node().add("backtrace", &SysBacktrace::backtrace)
-        .doc("Display the backtrace of the last error / exception in this console");
+    namespace fty = senf::console::factory;
+
+    sysdir().add("backtrace", fty::Command(&SysBacktrace::backtrace)
+                 .doc("Display the backtrace of the last error / exception in this console") );
 }
 
 prefix_ void senf::console::Client::SysBacktrace::backtrace(std::ostream & os)