]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - cmd_debug.c
Update bcachefs sources to 14ce2a2031 bcachefs: fixes for building in userspace
[bcachefs-tools-debian] / cmd_debug.c
index d4613ecb8ccb810ad77fdfa89d94f7c14e111908..1a2c1dbd195c83b699d1cbcb6b81435ae2b83beb 100644 (file)
@@ -8,14 +8,14 @@
 #include "qcow2.h"
 #include "tools-util.h"
 
-#include "bcachefs.h"
-#include "alloc.h"
-#include "btree_cache.h"
-#include "btree_iter.h"
-#include "buckets.h"
-#include "error.h"
-#include "journal.h"
-#include "super.h"
+#include "libbcachefs/bcachefs.h"
+#include "libbcachefs/alloc.h"
+#include "libbcachefs/btree_cache.h"
+#include "libbcachefs/btree_iter.h"
+#include "libbcachefs/buckets.h"
+#include "libbcachefs/error.h"
+#include "libbcachefs/journal.h"
+#include "libbcachefs/super.h"
 
 static void dump_usage(void)
 {
@@ -88,10 +88,10 @@ int cmd_dump(int argc, char *argv[])
        bool force = false;
        int fd, opt;
 
-       opts.nochanges  = true;
-       opts.noreplay   = true;
-       opts.errors     = BCH_ON_ERROR_CONTINUE;
-       opts.degraded   = true;
+       opt_set(opts, nochanges,        true);
+       opt_set(opts, noreplay,         true);
+       opt_set(opts, degraded,         true);
+       opt_set(opts, errors,           BCH_ON_ERROR_CONTINUE);
 
        while ((opt = getopt(argc, argv, "o:fh")) != -1)
                switch (opt) {
@@ -265,10 +265,10 @@ int cmd_list(int argc, char *argv[])
        u64 inum;
        int mode = 0, opt;
 
-       opts.nochanges  = true;
-       opts.norecovery = true;
-       opts.errors     = BCH_ON_ERROR_CONTINUE;
-       opts.degraded   = true;
+       opt_set(opts, nochanges,        true);
+       opt_set(opts, norecovery,       true);
+       opt_set(opts, degraded,         true);
+       opt_set(opts, errors,           BCH_ON_ERROR_CONTINUE);
 
        while ((opt = getopt(argc, argv, "b:s:e:i:m:fvh")) != -1)
                switch (opt) {
@@ -293,11 +293,11 @@ int cmd_list(int argc, char *argv[])
                                                list_modes, "list mode");
                        break;
                case 'f':
-                       opts.fix_errors = FSCK_ERR_YES;
-                       opts.norecovery = false;
+                       opt_set(opts, fix_errors, FSCK_OPT_YES);
+                       opt_set(opts, norecovery, false);
                        break;
                case 'v':
-                       opts.verbose_recovery = true;
+                       opt_set(opts, verbose_recovery, true);
                        break;
                case 'h':
                        list_keys_usage();