btrfsprogs/0165-Revert-btrfs-progs-update-options-in-find-root.c.patch
Stephan Kulow 24434a14bd Accepting request 208360 from filesystems
Sync to a long-awaited upstream release. Version update. Only a handful of local packages that will be upstreamed later.

This set of changes is not suitable for direct copy to currently released products because there are changes in mkfs defaults (12.x, 13.x, SLES). Fine for Factory. (forwarded request 208357 from dsterba)

OBS-URL: https://build.opensuse.org/request/show/208360
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/btrfsprogs?expand=0&rev=36
2013-11-28 15:50:38 +00:00

50 lines
1.5 KiB
Diff

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);