summaryrefslogtreecommitdiff
path: root/bin/bbackupctl
diff options
context:
space:
mode:
Diffstat (limited to 'bin/bbackupctl')
-rw-r--r--bin/bbackupctl/bbackupctl.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/bin/bbackupctl/bbackupctl.cpp b/bin/bbackupctl/bbackupctl.cpp
index becb1fcf..e7b85fdc 100644
--- a/bin/bbackupctl/bbackupctl.cpp
+++ b/bin/bbackupctl/bbackupctl.cpp
@@ -19,6 +19,7 @@
#include "box_getopt.h"
#include "MainHelper.h"
+#include "BackupDaemon.h"
#include "BoxPortsAndFiles.h"
#include "BackupDaemonConfigVerify.h"
#include "Socket.h"
@@ -236,7 +237,21 @@ int main(int argc, const char *argv[])
}
else if (commandName == "status")
{
- BOX_NOTICE("state " << currentState);
+ std::string stateName;
+
+ #define STATE(x) case BackupDaemon::State_ ## x: stateName = #x; break;
+ switch (currentState)
+ {
+ STATE(Initialising);
+ STATE(Idle);
+ STATE(Connected);
+ STATE(Error);
+ STATE(StorageLimitExceeded);
+ default:
+ stateName = "unknown";
+ break;
+ }
+ BOX_NOTICE("state " << currentState << " " << stateName);
command = NoCommand;
}