summaryrefslogtreecommitdiffhomepage
path: root/CmdLine.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-19 13:00:34 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-19 13:00:34 -0400
commit6261f7e58b764ae48293bee3b1863b518e9f0442 (patch)
treed9260d1beeced137e36c1ae1945c499d85e91608 /CmdLine.hs
parentd3323ab8e9e39bcb0a6493d33efa265073920a7d (diff)
downloadkeysafe-6261f7e58b764ae48293bee3b1863b518e9f0442.tar.gz
rename shard -> share
This makes it clearer that it's not a chunk of data, but a Shamir share.
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs18
1 files changed, 9 insertions, 9 deletions
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 }