[Box Backup-commit] COMMIT r2126 - box/trunk/bin/bbstoreaccounts

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Fri Apr 4 22:59:40 BST 2008

Author: chris
Date: 2008-04-04 21:59:40 +0000 (Fri, 04 Apr 2008)
New Revision: 2126

[hg-svn @ 30cb6d2b5a2f18881f50ce8df5f7bd9e429f9fbb]
Add command-line help (usage info) to bbstoreaccounts, merges [2089].

Original author: chris at rocio.int.aidworld.org
Date: 2008-03-16 19:51:27+00:00

Modified: box/trunk/bin/bbstoreaccounts/bbstoreaccounts.cpp
--- box/trunk/bin/bbstoreaccounts/bbstoreaccounts.cpp	2008-04-04 21:59:36 UTC (rev 2125)
+++ box/trunk/bin/bbstoreaccounts/bbstoreaccounts.cpp	2008-04-04 21:59:40 UTC (rev 2126)
@@ -112,7 +112,7 @@
 		BOX_FATAL(string << " has an invalid units specifier "
-			"(use B for blocks, M for Mb, G for Gb, eg 2Gb)");
+			"(use B for blocks, M for MB, G for GB, eg 2GB)");
@@ -403,8 +403,32 @@
 void PrintUsageAndExit()
-	printf("Usage: bbstoreaccounts [-c config_file] action account_id [args]\nAccount ID is integer specified in hex\n");
-	exit(1);
+	printf(
+"Usage: bbstoreaccounts [-c config_file] action account_id [args]\n"
+"Account ID is integer specified in hex\n"
+"Commands (and arguments):\n"
+"  create <account> <discnum> <softlimit> <hardlimit>\n"
+"        Creates the specified account number (in hex with no 0x) on the\n"
+"        specified raidfile disc set number (see raidfile.conf for valid\n"
+"        set numbers) with the specified soft and hard limits (in blocks\n"
+"        if suffixed with B, MB with M, GB with G)\n"
+"  info <account>\n"
+"        Prints information about the specified account including number\n"
+"        of blocks used.\n"
+"  setlimit <accounts> <softlimit> <hardlimit>\n"
+"        Changes the limits of the account as specified. Numbers are\n"
+"        interpreted as for the 'create' command (suffixed with B, M or G)\n"
+"  delete <account> [yes]\n"
+"        Deletes the specified account. Prompts for confirmation unless\n"
+"        the optional 'yes' parameter is provided.\n"
+"  check <account> [fix] [quiet]\n"
+"        Checks the specified account for errors. If the 'fix' option is\n"
+"        provided, any errors discovered that can be fixed automatically\n"
+"        will be fixed. If the 'quiet' option is provided, less output is\n"
+"        produced.\n"
+	);
+	exit(2);
 int main(int argc, const char *argv[])

More information about the Boxbackup-commit mailing list