From 5cc16bd4ad229277bc5af55d1942bf33e53c2f14 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Mon, 29 Dec 2014 09:00:14 +0100 Subject: [PATCH] Renames -s and -t to -S and -B. We need some free space in option names and these ones are anyway intended to be manual ones. --- HISTORY | 2 ++ Makefile.am | 10 +++++----- cmdline/snapraid.c | 10 +++++----- snapraid.1 | 6 +++--- snapraid.d | 6 +++--- snapraid.txt | 6 +++--- 6 files changed, 21 insertions(+), 19 deletions(-) diff --git a/HISTORY b/HISTORY index 3fcddf1e..83b229e4 100644 --- a/HISTORY +++ b/HISTORY @@ -5,6 +5,8 @@ SnapRAID HISTORY ================ * The -e, --filter-error option now is more efficient and triggers a lot less data to be read. + * Renamed the -s and -t options to -S and -B as they are intended to + be manual only operations. 7.1 2015/01 =========== diff --git a/Makefile.am b/Makefile.am index 84536ae7..559e15de 100644 --- a/Makefile.am +++ b/Makefile.am @@ -509,19 +509,19 @@ endif rm bench/disk2/a/5* rm bench/disk3/a/6* rm bench/disk4/a/6* - $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) -t 10 sync --test-force-content-text + $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) -B 10 sync --test-force-content-text cp bench/content bench/content.txt $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS_VERBOSE) -c $(CONF) test-rewrite $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS_VERBOSE) -c $(CONF) --test-force-content-text test-rewrite cmp bench/content bench/content.txt $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) check -l test.log $(TESTENV) ./mktest$(EXEEXT) generate 4 6 $(CHECKCOUNT) $(CHECKSIZE) - $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) -t 100 sync --test-force-content-text + $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) -B 100 sync --test-force-content-text cp bench/content bench/content.txt $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) test-rewrite $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-force-content-text test-rewrite cmp bench/content bench/content.txt - $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) -t 1000 sync + $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) -B 1000 sync $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) check -l test.log $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) sync $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) check @@ -562,7 +562,7 @@ endif echo --- Abort sync early with additions, delete them and recover with PAR2 echo --- This triggers the recovering with q using p to check the validity, but failing for new block being filled with zero cp -pR bench/disk1/a bench/disk1/a_copy - $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -t 1 --test-kill-after-sync -c $(CONF) sync + $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -B 1 --test-kill-after-sync -c $(CONF) sync rm -r bench/disk1/a_copy $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-expect-unrecoverable -c $(PAR2) fix -l test-fail-earlysyncadd.log rm -r bench/disk1/a_copy @@ -618,7 +618,7 @@ endif cp -pR bench/disk1/a bench/disk1/a_copy mv bench/disk1/a bench/a mv bench/disk1/b bench/b - $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) -t 1 --test-kill-after-sync sync + $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) -B 1 --test-kill-after-sync sync rm -r bench/disk2 mkdir bench/disk2 $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-expect-unrecoverable -c $(PAR1) fix -l test-fail-earlysyncdel.log diff --git a/cmdline/snapraid.c b/cmdline/snapraid.c index 6eac7082..6735dd97 100644 --- a/cmdline/snapraid.c +++ b/cmdline/snapraid.c @@ -249,8 +249,8 @@ struct option long_options[] = { { "filter-error", 0, 0, 'e' }, { "percentage", 1, 0, 'p' }, { "older-than", 1, 0, 'o' }, - { "start", 1, 0, 's' }, - { "count", 1, 0, 't' }, + { "start", 1, 0, 'S' }, + { "count", 1, 0, 'B' }, { "import", 1, 0, 'i' }, { "log", 1, 0, 'l' }, { "force-zero", 0, 0, 'Z' }, @@ -353,7 +353,7 @@ struct option long_options[] = { }; #endif -#define OPTIONS "c:f:d:mep:o:s:t:i:l:ZEUDNFahTC:vqHVG" +#define OPTIONS "c:f:d:mep:o:S:B:i:l:ZEUDNFahTC:vqHVG" volatile int global_interrupt = 0; @@ -492,7 +492,7 @@ int main(int argc, char* argv[]) /* LCOV_EXCL_STOP */ } break; - case 's' : + case 'S' : blockstart = strtoul(optarg, &e, 0); if (!e || *e) { /* LCOV_EXCL_START */ @@ -501,7 +501,7 @@ int main(int argc, char* argv[]) /* LCOV_EXCL_STOP */ } break; - case 't' : + case 'B' : blockcount = strtoul(optarg, &e, 0); if (!e || *e) { /* LCOV_EXCL_START */ diff --git a/snapraid.1 b/snapraid.1 index 87a770c6..d6f96462 100644 --- a/snapraid.1 +++ b/snapraid.1 @@ -38,7 +38,7 @@ snapraid [\-c, \-\-conf CONFIG] .PD 0 .PP .PD - [\-s, \-\-start BLKSTART] [\-t, \-\-count BLKCOUNT] + [\-S, \-\-start BLKSTART] [\-T, \-\-count BLKCOUNT] .PD 0 .PP .PD @@ -871,13 +871,13 @@ to enclose the name in \[dq], like \[dq]>>result.log\[dq]. To output the log to standard output or standard error, you can use respectively \[dq]>&1\[dq] and \[dq]>&2\[dq]. .TP -.B \-s, \-\-start BLKSTART +.B \-S, \-\-start BLKSTART Starts the processing from the specified block number. It could be useful to retry to check or fix some specific block, in case of a damaged disk. It\'s present mainly for advanced manual recovering. .TP -.B \-t, \-\-count BLKCOUNT +.B \-T, \-\-count BLKCOUNT Processes only the specified number of blocks. It\'s present mainly for advanced manual recovering. .TP diff --git a/snapraid.d b/snapraid.d index 51d0c0bf..e0b58024 100644 --- a/snapraid.d +++ b/snapraid.d @@ -11,7 +11,7 @@ Synopsis : [-U, --force-uuid] [-D, --force-device] : [-N, --force-nocopy] [-F, --force-full] : [-v, --verbose] [-l, --log FILE] - : [-s, --start BLKSTART] [-t, --count BLKCOUNT] + : [-S, --start BLKSTART] [-T, --count BLKCOUNT] : status|sync|scrub|fix|check|list|diff|dup|pool|rehash :snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT] @@ -634,13 +634,13 @@ Options To output the log to standard output or standard error, you can use respectively ">&1" and ">&2". - -s, --start BLKSTART + -S, --start BLKSTART Starts the processing from the specified block number. It could be useful to retry to check or fix some specific block, in case of a damaged disk. It's present mainly for advanced manual recovering. - -t, --count BLKCOUNT + -T, --count BLKCOUNT Processes only the specified number of blocks. It's present mainly for advanced manual recovering. diff --git a/snapraid.txt b/snapraid.txt index 316b9b65..96b60dc7 100644 --- a/snapraid.txt +++ b/snapraid.txt @@ -15,7 +15,7 @@ snapraid [-c, --conf CONFIG] [-U, --force-uuid] [-D, --force-device] [-N, --force-nocopy] [-F, --force-full] [-v, --verbose] [-l, --log FILE] - [-s, --start BLKSTART] [-t, --count BLKCOUNT] + [-S, --start BLKSTART] [-T, --count BLKCOUNT] status|sync|scrub|fix|check|list|diff|dup|pool|rehash snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT] @@ -679,13 +679,13 @@ SnapRAID provides the following options: To output the log to standard output or standard error, you can use respectively ">&1" and ">&2". - -s, --start BLKSTART + -S, --start BLKSTART Starts the processing from the specified block number. It could be useful to retry to check or fix some specific block, in case of a damaged disk. It's present mainly for advanced manual recovering. - -t, --count BLKCOUNT + -T, --count BLKCOUNT Processes only the specified number of blocks. It's present mainly for advanced manual recovering.