[Box Backup-commit] COMMIT r2089 - box/chris/general/bin/bbstoreaccounts

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Tue Feb 5 23:34:14 GMT 2008


Author: chris
Date: 2008-02-05 23:34:14 +0000 (Tue, 05 Feb 2008)
New Revision: 2089

Modified:
   box/chris/general/bin/bbstoreaccounts/bbstoreaccounts.cpp
Log:
Add list of commands and arguments to usage output.


Modified: box/chris/general/bin/bbstoreaccounts/bbstoreaccounts.cpp
===================================================================
--- box/chris/general/bin/bbstoreaccounts/bbstoreaccounts.cpp	2008-02-05 23:20:57 UTC (rev 2088)
+++ box/chris/general/bin/bbstoreaccounts/bbstoreaccounts.cpp	2008-02-05 23:34:14 UTC (rev 2089)
@@ -112,7 +112,7 @@
 	
 	default:
 		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)");
 		exit(1);
 		break;		
 	}
@@ -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"
+"\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