-#define BTRFS_UUID_UNPARSED_SIZE 37
-
-#define ARGV0_BUF_SIZE 64
-
-int check_argc_exact(int nargs, int expected);
-int check_argc_min(int nargs, int expected);
-int check_argc_max(int nargs, int expected);
-
-void fixup_argv0(char **argv, const char *token);
-void set_argv0(char **argv);
+/*
+ * Output modes of size
+ */
+#define UNITS_RESERVED (0)
+#define UNITS_BYTES (1)
+#define UNITS_KBYTES (2)
+#define UNITS_MBYTES (3)
+#define UNITS_GBYTES (4)
+#define UNITS_TBYTES (5)
+#define UNITS_RAW (1U << UNITS_MODE_SHIFT)
+#define UNITS_BINARY (2U << UNITS_MODE_SHIFT)
+#define UNITS_DECIMAL (3U << UNITS_MODE_SHIFT)
+/* Interpret the u64 value as s64 */
+#define UNITS_NEGATIVE (4U << UNITS_MODE_SHIFT)
+#define UNITS_MODE_MASK ((1U << UNITS_MODE_SHIFT) - 1)
+#define UNITS_MODE_SHIFT (8)
+#define UNITS_HUMAN_BINARY (UNITS_BINARY)
+#define UNITS_HUMAN_DECIMAL (UNITS_DECIMAL)
+#define UNITS_HUMAN (UNITS_HUMAN_BINARY)
+#define UNITS_DEFAULT (UNITS_HUMAN)
+
+void units_set_mode(unsigned *units, unsigned mode);
+void units_set_base(unsigned *units, unsigned base);
+
+#define PREP_DEVICE_ZERO_END (1U << 0)
+#define PREP_DEVICE_DISCARD (1U << 1)
+#define PREP_DEVICE_VERBOSE (1U << 2)
+
+#define SEEN_FSID_HASH_SIZE 256
+struct seen_fsid {
+ u8 fsid[BTRFS_FSID_SIZE];
+ struct seen_fsid *next;
+ DIR *dirstream;
+ int fd;
+};