From 6261f7e58b764ae48293bee3b1863b518e9f0442 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 19 Aug 2016 13:00:34 -0400 Subject: rename shard -> share This makes it clearer that it's not a chunk of data, but a Shamir share. --- CmdLine.hs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'CmdLine.hs') diff --git a/CmdLine.hs b/CmdLine.hs index 0213f28..bb96311 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -18,7 +18,7 @@ data CmdLine = CmdLine , localstorage :: Bool , gui :: Bool , testMode :: Bool - , customShardParams :: Maybe ShardParams + , customShareParams :: Maybe ShareParams } data Mode = Backup | Restore | UploadQueued | Benchmark @@ -31,7 +31,7 @@ parse = CmdLine <*> localstorageswitch <*> guiswitch <*> testmodeswitch - <*> optional (ShardParams <$> totalobjects <*> neededobjects) + <*> optional (ShareParams <$> totalobjects <*> neededobjects) where backup = flag' Backup ( long "backup" @@ -72,14 +72,14 @@ parse = CmdLine <> help "Use GUI interface for interaction. Default is to use readline interface when run in a terminal, and GUI otherwise." ) totalobjects = option auto - ( long "totalshards" + ( long "totalshares" <> metavar "M" - <> help ("Configure the number of shards to split encrypted secret key into. Default: " ++ show (totalObjects (shardParams defaultTunables)) ++ " (When this option is used to back up a key, it must also be provided at restore time.)") + <> help ("Configure the number of shares to split encrypted secret key into. Default: " ++ show (totalObjects (shareParams defaultTunables)) ++ " (When this option is used to back up a key, it must also be provided at restore time.)") ) neededobjects = option auto - ( long "neededshards" + ( long "neededshares" <> metavar "N" - <> help ("Configure the number of shards needed to restore. Default: " ++ show (neededObjects (shardParams defaultTunables)) ++ " (When this option is used to back up a key, it must also be provided at restore time.)") + <> help ("Configure the number of shares needed to restore. Default: " ++ show (neededObjects (shareParams defaultTunables)) ++ " (When this option is used to back up a key, it must also be provided at restore time.)") ) get :: IO CmdLine @@ -102,7 +102,7 @@ selectMode cmdline = case mode cmdline of present True = Backup present False = Restore -customizeShardParams :: CmdLine -> Tunables -> Tunables -customizeShardParams cmdline t = case customShardParams cmdline of +customizeShareParams :: CmdLine -> Tunables -> Tunables +customizeShareParams cmdline t = case customShareParams cmdline of Nothing -> t - Just ps -> t { shardParams = ps } + Just ps -> t { shareParams = ps } -- cgit v1.2.3