File 0165-Revert-btrfs-progs-update-options-in-find-root.c.patch of Package btrfsprogs.openSUSE_13.1_Update

From 0c26634f696f3ced9636de0ca2fa5b7b9d732bc3 Mon Sep 17 00:00:00 2001
From: David Sterba <dsterba@suse.cz>
Date: Thu, 7 Feb 2013 18:00:23 +0100
Subject: [PATCH 165/170] Revert "btrfs-progs: update options in find-root.c"

This reverts commit 7f04a61b6da5a1231454b07e3e37cc24601a76e4.

Reintroduce the 'verbose' option.

Signed-off-by: David Sterba <dsterba@suse.cz>
---
 btrfs-find-root.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Index: btrfs-progs-v0.20-rc1-598-g8116550e1662/btrfs-find-root.c
===================================================================
--- btrfs-progs-v0.20-rc1-598-g8116550e1662.orig/btrfs-find-root.c
+++ btrfs-progs-v0.20-rc1-598-g8116550e1662/btrfs-find-root.c
@@ -35,6 +35,7 @@
 #include "utils.h"
 #include "crc32c.h"
 
+static int verbose = 0;
 static u16 csum_size = 0;
 static u64 search_objectid = BTRFS_ROOT_TREE_OBJECTID;
 static u64 search_generation = 0;
@@ -42,7 +43,7 @@ static unsigned long search_level = 0;
 
 static void usage(void)
 {
-	fprintf(stderr, "Usage: find-roots [-o search_objectid] "
+	fprintf(stderr, "Usage: find-roots [-v] "
 		"[ -g search_generation ] [ -l search_level ] <device>\n");
 }
 
@@ -286,9 +287,12 @@ int main(int argc, char **argv)
 	int opt;
 	int ret;
 
-	while ((opt = getopt(argc, argv, "l:o:g:")) != -1) {
+	while ((opt = getopt(argc, argv, "l:o:g:v")) != -1) {
 		switch(opt) {
 			errno = 0;
+			case 'v':
+				verbose++;
+				break;
 			case 'o':
 				search_objectid = (u64)strtoll(optarg, NULL,
 							       10);
openSUSE Build Service is sponsored by