#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)
{
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) {
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) {
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();