diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-04-04 21:59:40 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-04-04 21:59:40 +0000 |
commit | d5f9f9c253584cc12cd88c83afd6c6bfcc6ebd68 (patch) | |
tree | 213f8681ab7fc38f3483b03346e1a19853f97900 | |
parent | 92e18cd7a86d74197aa772d9d584b2dbe4c45812 (diff) |
[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
-rw-r--r-- | bin/bbstoreaccounts/bbstoreaccounts.cpp | 30 |
1 files changed, 27 insertions, 3 deletions
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 <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[]) |