-#include "opts.h"
-#include "util.h"
-
-#define OPTS \
-t("bcachefs format - create a new bcachefs filesystem on one or more devices") \
-t("Usage: bcachefs format [OPTION]... <devices>") \
-t("") \
-x('b', block_size, "size", NULL) \
-x(0, btree_node_size, "size", "Default 256k") \
-x(0, metadata_checksum_type, "(none|crc32c|crc64)", NULL) \
-x(0, data_checksum_type, "(none|crc32c|crc64)", NULL) \
-x(0, compression_type, "(none|lz4|gzip)", NULL) \
-x(0, data_replicas, "#", NULL) \
-x(0, metadata_replicas, "#", NULL) \
-x(0, encrypted, NULL, "Enable whole filesystem encryption (chacha20/poly1305)")\
-x(0, no_passphrase, NULL, "Don't encrypt master encryption key")\
-x('e', error_action, "(continue|readonly|panic)", NULL) \
-x('L', label, "label", NULL) \
-x('U', uuid, "uuid", NULL) \
-x('f', force, NULL, NULL) \
-t("") \
-t("Device specific options:") \
-x(0, fs_size, "size", "Size of filesystem on device")\
-x(0, bucket_size, "size", "Bucket size") \
-x('t', tier, "#", "Higher tier indicates slower devices")\
-x(0, discard, NULL, NULL) \
-x(0, data_allowed, "journal,btree,data", "Allowed types of data on this device")\
-t("Device specific options must come before corresponding devices, e.g.") \
-t(" bcachefs format --tier 0 /dev/sdb --tier 1 /dev/sdc") \
-t("") \
-x('q', quiet, NULL, "Only print errors") \
-x('h', help, NULL, "Display this help and exit")
+#include "libbcachefs/opts.h"
+#include "libbcachefs/super-io.h"
+#include "libbcachefs/util.h"
+
+#define OPTS \
+x(0, replicas, required_argument) \
+x(0, encrypted, no_argument) \
+x(0, no_passphrase, no_argument) \
+x('L', label, required_argument) \
+x('U', uuid, required_argument) \
+x(0, fs_size, required_argument) \
+x(0, superblock_size, required_argument) \
+x(0, bucket_size, required_argument) \
+x('g', group, required_argument) \
+x(0, discard, no_argument) \
+x(0, data_allowed, required_argument) \
+x(0, durability, required_argument) \
+x(0, version, required_argument) \
+x(0, no_initialize, no_argument) \
+x('f', force, no_argument) \
+x('q', quiet, no_argument) \
+x('h', help, no_argument)