summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/bbackupctl/bbackupctl.cpp17
-rw-r--r--modules.txt2
2 files changed, 17 insertions, 2 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;
}
diff --git a/modules.txt b/modules.txt
index 670f4ac4..cfa41271 100644
--- a/modules.txt
+++ b/modules.txt
@@ -33,7 +33,7 @@ bin/bbstored lib/raidfile lib/server lib/backupstore
bin/bbstoreaccounts lib/raidfile lib/backupstore
bin/bbackupd lib/server lib/backupclient qdbm
bin/bbackupquery lib/server lib/backupclient
-bin/bbackupctl lib/server lib/backupclient
+bin/bbackupctl bin/bbackupd
test/backupstore bin/bbstored bin/bbstoreaccounts lib/server lib/backupstore lib/backupclient lib/raidfile
test/backupstorefix bin/bbstored bin/bbstoreaccounts lib/backupstore lib/raidfile bin/bbackupquery bin/bbackupd bin/bbackupctl