btrfs-progs: Remove btrfs-debug-tree command
authorNikolay Borisov <nborisov@suse.com>
Tue, 27 Mar 2018 07:45:43 +0000 (10:45 +0300)
committerDavid Sterba <dsterba@suse.com>
Tue, 24 Apr 2018 11:00:10 +0000 (13:00 +0200)
There is already a replacement in the face of btrfs inspect-internal
dump-tree. And this command is just a simple wrapper around it. Just
remove it and adjust the show-blocks script to call the main btrfs
binary to achieve the same effect.

Informally deprecated since 4.4.

Issue: #97
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
.gitignore
Documentation/Makefile.in
Documentation/btrfs.asciidoc
Makefile
btrfs-debug-tree.c [deleted file]
show-blocks

index 4ec04cb..237a451 100644 (file)
@@ -10,7 +10,6 @@ Documentation/*.gz
 Documentation/*.html
 btrfs
 btrfs.static
-btrfs-debug-tree
 btrfs-map-logical
 btrfs-fragments
 btrfsck
index 64947af..0a90f80 100644 (file)
@@ -103,7 +103,6 @@ install-man: man
        $(INSTALL) -m 644 $(GZ_MAN8) $(DESTDIR)$(man8dir)
        $(LN_S) -f btrfs-check.8.gz $(DESTDIR)$(man8dir)/btrfsck.8.gz
        $(LN_S) -f btrfs-rescue.8.gz $(DESTDIR)$(man8dir)/btrfs-zero-log.8.gz
-       $(LN_S) -f btrfs-inspect-internal.8.gz $(DESTDIR)$(man8dir)/btrfs-debug-tree.8.gz
        $(LN_S) -f btrfs-inspect-internal.8.gz $(DESTDIR)$(man8dir)/btrfs-show-super.8.gz
 
 uninstall:
index 8253023..b9d277c 100644 (file)
@@ -120,7 +120,8 @@ Tools that are still in active use without an equivalent in *btrfs*:
 
 Deprecated and obsolete tools:
 
-*btrfs-debug-tree*:: moved to *btrfs inspect-internal dump-tree*
+*btrfs-debug-tree*:: moved to *btrfs inspect-internal dump-tree*. Removed from
+source distribution.
 *btrfs-show-super*:: moved to *btrfs inspect-internal dump-super*
 *btrfs-zero-log*:: moved to *btrfs rescue zero-log*
 
index 5ba76d2..c5d1d51 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -210,8 +210,7 @@ MAKEOPTS = --no-print-directory Q=$(Q)
 progs = $(progs_install) btrfsck btrfs-corrupt-block
 
 # install only selected
-progs_install = btrfs mkfs.btrfs btrfs-debug-tree \
-       btrfs-map-logical btrfs-image btrfs-zero-log \
+progs_install = btrfs mkfs.btrfs btrfs-map-logical btrfs-image btrfs-zero-log \
        btrfs-find-root btrfstune \
        btrfs-select-super
 
@@ -229,7 +228,6 @@ endif
 btrfs_convert_cflags = -DBTRFSCONVERT_EXT2=$(BTRFSCONVERT_EXT2)
 btrfs_convert_cflags += -DBTRFSCONVERT_REISERFS=$(BTRFSCONVERT_REISERFS)
 btrfs_fragments_libs = -lgd -lpng -ljpeg -lfreetype
-btrfs_debug_tree_objects = cmds-inspect-dump-tree.o
 btrfs_show_super_objects = cmds-inspect-dump-super.o
 btrfs_calc_size_objects = cmds-inspect-tree-stats.o
 cmds_restore_cflags = -DBTRFSRESTORE_ZSTD=$(BTRFSRESTORE_ZSTD)
diff --git a/btrfs-debug-tree.c b/btrfs-debug-tree.c
deleted file mode 100644 (file)
index 7bee018..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2007 Oracle.  All rights reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License v2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 021110-1307, USA.
- */
-
-#include "disk-io.h"
-#include "volumes.h"
-#include "utils.h"
-#include "commands.h"
-#include "help.h"
-
-int main(int argc, char **argv)
-{
-       int ret;
-
-       set_argv0(argv);
-
-       if (argc > 1 && !strcmp(argv[1], "--help"))
-               usage(cmd_inspect_dump_tree_usage);
-
-       radix_tree_init();
-
-       ret = cmd_inspect_dump_tree(argc, argv);
-
-       btrfs_close_all_devices();
-
-       return ret;
-}
index 49e1770..3876b2a 100755 (executable)
@@ -108,7 +108,7 @@ def loaddata(fh,delimiter=None, converters=None):
     return X
 
 def run_debug_tree(device):
-    p = os.popen('btrfs-debug-tree -e ' + device)
+    p = os.popen('btrfs inspect-internal dump-tree -e ' + device)
     data = loaddata(p)
     return data