]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - cmd_format.c
cmd_device_set_state: use buffered IO for writing superblock
[bcachefs-tools-debian] / cmd_format.c
index c3debe0a95f15ea5638d78179f7117d5a92244e8..4debc285f9101a3df0e8e0c474fbce43a9d00814 100644 (file)
@@ -79,7 +79,7 @@ static void usage(void)
             "Device specific options must come before corresponding devices, e.g.\n"
             "  bcachefs format --label cache /dev/sdb /dev/sdc\n"
             "\n"
-            "Report bugs to <linux-bcache@vger.kernel.org>");
+            "Report bugs to <linux-bcachefs@vger.kernel.org>");
 }
 
 enum {
@@ -197,9 +197,9 @@ int cmd_format(int argc, char *argv[])
                        initialize = false;
                        break;
                case O_no_opt:
-                       darray_push(device_paths, optarg);
+                       darray_push(&device_paths, optarg);
                        dev_opts.path = optarg;
-                       darray_push(devices, dev_opts);
+                       darray_push(&devices, dev_opts);
                        dev_opts.size = 0;
                        break;
                case O_quiet:
@@ -239,7 +239,7 @@ int cmd_format(int argc, char *argv[])
        if (!quiet) {
                struct printbuf buf = PRINTBUF;
 
-               buf.units = PRINTBUF_UNITS_HUMAN_READABLE;
+               buf.human_readable_units = true;
 
                bch2_sb_to_text(&buf, sb, false, 1 << BCH_SB_FIELD_members);
                printf("%s", buf.buf);
@@ -253,7 +253,7 @@ int cmd_format(int argc, char *argv[])
                free(opts.passphrase);
        }
 
-       darray_exit(devices);
+       darray_exit(&devices);
 
        if (initialize) {
                struct bch_opts mount_opts = bch2_opts_empty();
@@ -275,7 +275,7 @@ int cmd_format(int argc, char *argv[])
                bch2_fs_stop(c);
        }
 
-       darray_exit(device_paths);
+       darray_exit(&device_paths);
 
        return 0;
 }
@@ -289,7 +289,7 @@ static void show_super_usage(void)
             "  -f, --fields=(fields)       list of sections to print\n"
             "  -l, --layout                print superblock layout\n"
             "  -h, --help                  display this help and exit\n"
-            "Report bugs to <linux-bcache@vger.kernel.org>");
+            "Report bugs to <linux-bcachefs@vger.kernel.org>");
        exit(EXIT_SUCCESS);
 }
 
@@ -340,7 +340,7 @@ int cmd_show_super(int argc, char *argv[])
 
        struct printbuf buf = PRINTBUF;
 
-       buf.units = PRINTBUF_UNITS_HUMAN_READABLE;
+       buf.human_readable_units = true;
 
        bch2_sb_to_text(&buf, sb.sb, print_layout, fields);
        printf("%s", buf.buf);