From 8d5eec3f3f05eb3ec617e8c51b6c8f293227899a Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sat, 29 Apr 2017 16:33:36 +0300 Subject: [PATCH] Rename nncp-xfer -force to -mkdir for clarity --- doc/cmds.texi | 4 ++-- doc/news.texi | 2 ++ doc/usecases.texi | 7 +++---- src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/cmds.texi b/doc/cmds.texi index 2426e33..edf21d0 100644 --- a/doc/cmds.texi +++ b/doc/cmds.texi @@ -347,7 +347,7 @@ running this command as a daemon. @section nncp-xfer @verbatim -% nncp-xfer [options] [-force] [-keep] [-rx|-tx] DIR +% nncp-xfer [options] [-mkdir] [-keep] [-rx|-tx] DIR @end verbatim Search for directory in @file{DIR} containing inbound packets for us and @@ -355,7 +355,7 @@ move them to local @ref{Spool, spool} directory. Also search for known neighbours directories and move locally queued outbound packets to them. This command is used for offline packets transmission. -If @option{-force} option is specified, then outbound neighbour(s) +If @option{-mkdir} option is specified, then outbound neighbour(s) directories will be created. This is useful for the first time usage, when storage device does not have any directories tree. diff --git a/doc/news.texi b/doc/news.texi index 5f3bd27..0ca08d2 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -11,6 +11,8 @@ encrypted temporary file for that. entry. Useful for transferring big files over small storage devices. @item @option{freqminsize} configuration file option, analogue to @option{-minsize} one. +@item @command{nncp-xfer}'s @option{-force} option is renamed to +@option{-mkdir} for clarity. @item Cryptographic libraries (dependecies) are updated. @end itemize diff --git a/doc/usecases.texi b/doc/usecases.texi index 175c8e8..b72681c 100644 --- a/doc/usecases.texi +++ b/doc/usecases.texi @@ -115,10 +115,9 @@ device, mount it and run @ref{nncp-xfer}: % nncp-xfer -node bob /media/usbstick @end verbatim -to copy all outbound packets related to @emph{bob}'s node. Use -@option{-force} option to forcefully create related directory on USB -storage if they are missing (for example when running for the first -time). +to copy all outbound packets related to @emph{bob}. Use @option{-mkdir} +option to create related directory on USB storage if they are missing +(for example when running for the first time). If you use single storage device to transfer data both to @emph{bob} and @emph{alice}, then just omit @option{-node} option to copy all existing diff --git a/src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go b/src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go index 7aa57b3..bcd7625 100644 --- a/src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go +++ b/src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go @@ -48,7 +48,7 @@ func main() { niceRaw = flag.Int("nice", 255, "Minimal required niceness") rxOnly = flag.Bool("rx", false, "Only receive packets") txOnly = flag.Bool("tx", false, "Only transfer packets") - force = flag.Bool("force", false, "Force outbound directories creation") + mkdir = flag.Bool("mkdir", false, "Create necessary outbound directories") keep = flag.Bool("keep", false, "Do not delete transferred packets") quiet = flag.Bool("quiet", false, "Print only errors") debug = flag.Bool("debug", false, "Print debug messages") @@ -241,7 +241,7 @@ Tx: if err != nil { if os.IsNotExist(err) { ctx.LogD("nncp-xfer", sds, "does not exist") - if !*force { + if !*mkdir { ctx.UnlockDir(dirLock) continue } -- 2.44.0