From d5f9f9c253584cc12cd88c83afd6c6bfcc6ebd68 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 4 Apr 2008 21:59:40 +0000 Subject: [hg-svn @ 30cb6d2b5a2f18881f50ce8df5f7bd9e429f9fbb] Add command-line help (usage info) to bbstoreaccounts, merges [2089]. Original author: chris@rocio.int.aidworld.org Date: 2008-03-16 19:51:27+00:00 --- bin/bbstoreaccounts/bbstoreaccounts.cpp | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'bin/bbstoreaccounts/bbstoreaccounts.cpp') diff --git a/bin/bbstoreaccounts/bbstoreaccounts.cpp b/bin/bbstoreaccounts/bbstoreaccounts.cpp index 65245ba3..a2155abe 100644 --- a/bin/bbstoreaccounts/bbstoreaccounts.cpp +++ b/bin/bbstoreaccounts/bbstoreaccounts.cpp @@ -112,7 +112,7 @@ int64_t SizeStringToBlocks(const char *string, int DiscSet) 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 @@ int CreateAccount(Configuration &rConfig, const std::string &rUsername, int32_t 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 \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 \n" +" Prints information about the specified account including number\n" +" of blocks used.\n" +" setlimit \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 [yes]\n" +" Deletes the specified account. Prompts for confirmation unless\n" +" the optional 'yes' parameter is provided.\n" +" check [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[]) -- cgit v1.2.3