[Box Backup-commit] COMMIT r3336 - in box/trunk: . bin/bbackupctl
subversion at boxbackup.org
subversion at boxbackup.org
Fri Apr 18 09:47:38 BST 2014
Author: chris
Date: 2014-04-18 09:47:38 +0100 (Fri, 18 Apr 2014)
New Revision: 3336
Modified:
box/trunk/bin/bbackupctl/bbackupctl.cpp
box/trunk/modules.txt
Log:
Make bbackupctl status display the human-readable daemon state name.
Modified: box/trunk/bin/bbackupctl/bbackupctl.cpp
===================================================================
--- box/trunk/bin/bbackupctl/bbackupctl.cpp 2014-04-17 20:57:33 UTC (rev 3335)
+++ box/trunk/bin/bbackupctl/bbackupctl.cpp 2014-04-18 08:47:38 UTC (rev 3336)
@@ -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 @@
}
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;
}
Modified: box/trunk/modules.txt
===================================================================
--- box/trunk/modules.txt 2014-04-17 20:57:33 UTC (rev 3335)
+++ box/trunk/modules.txt 2014-04-18 08:47:38 UTC (rev 3336)
@@ -33,7 +33,7 @@
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
More information about the Boxbackup-commit
mailing list