@@ -44,8 +44,10 @@
#include "send.h"
#include "send-utils.h"
-/* default is 1 for historical reasons
- changing may break scripts */
+/*
+ * Default is 1 for historical reasons, changing may break scripts that expect
+ * the 'At subvol' message.
+ */
static int g_verbose = 1;
struct btrfs_send {
@@ -445,7 +447,7 @@ int cmd_send(int argc, char **argv)
g_verbose++;
break;
case 'q':
- g_verbose--;
+ g_verbose = 0;
break;
case 'e':
new_end_cmd_semantic = 1;
@@ -630,7 +632,8 @@ int cmd_send(int argc, char **argv)
}
if ((send_flags & BTRFS_SEND_FLAG_NO_FILE_DATA) && g_verbose > 1)
- fprintf(stderr, "Mode NO_FILE_DATA enabled\n");
+ if (g_verbose > 1)
+ fprintf(stderr, "Mode NO_FILE_DATA enabled\n");
for (i = optind; i < argc; i++) {
int is_first_subvol;
@@ -721,9 +724,6 @@ const char * const cmd_send_usage[] = {
"which case 'btrfs send' will determine a suitable parent among the",
"clone sources itself.",
"\n",
- "-v, --verbose Enable verbose debug output. Each occurrence of",
- " this option increases the verbose level more.",
- "-q, --quiet suppress messages to stderr.",
"-e If sending multiple subvols at once, use the new",
" format and omit the end-cmd between the subvols.",
"-p <parent> Send an incremental stream from <parent> to",
@@ -737,6 +737,8 @@ const char * const cmd_send_usage[] = {
" does not contain any file data and thus cannot be used",
" to transfer changes. This mode is faster and useful to",
" show the differences in metadata.",
- "--help display this help and exit",
+ "-v|--verbose enable verbose output to stderr, each occurrence of",
+ " this option increases verbosity",
+ "-q|--quiet suppress all messages, except errors",
NULL
};