btrfs-progs: Remove btrfs-debug-tree command
[platform/upstream/btrfs-progs.git] / btrfs-zero-log.c
index f5ca9fc..2fce59e 100644 (file)
 #include "disk-io.h"
 #include "transaction.h"
 #include "utils.h"
+#include "help.h"
 
 __attribute__((noreturn)) static void print_usage(void)
 {
-       fprintf(stderr, "usage: btrfs-zero-log dev\n");
+       printf("usage: btrfs-zero-log dev\n");
        exit(1);
 }
 
@@ -67,6 +68,7 @@ int main(int argc, char **argv)
                        (unsigned long long)btrfs_super_log_root(sb),
                        (unsigned)btrfs_super_log_root_level(sb));
        trans = btrfs_start_transaction(root, 1);
+       BUG_ON(IS_ERR(trans));
        btrfs_set_super_log_root(root->fs_info->super_copy, 0);
        btrfs_set_super_log_root_level(root->fs_info->super_copy, 0);
        btrfs_commit_transaction(trans, root);