mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
Update for sysfs changes
This commit is contained in:
parent
565b4a74d6
commit
851e945db8
@ -246,9 +246,9 @@ int cmd_device_add(int argc, char *argv[])
|
|||||||
dev_opts.fd = open_for_format(dev_opts.path, force);
|
dev_opts.fd = open_for_format(dev_opts.path, force);
|
||||||
|
|
||||||
format_opts.block_size =
|
format_opts.block_size =
|
||||||
read_file_u64(fs.sysfs_fd, "block_size_bytes") >> 9;
|
read_file_u64(fs.sysfs_fd, "block_size") >> 9;
|
||||||
format_opts.btree_node_size =
|
format_opts.btree_node_size =
|
||||||
read_file_u64(fs.sysfs_fd, "btree_node_size_bytes") >> 9;
|
read_file_u64(fs.sysfs_fd, "btree_node_size") >> 9;
|
||||||
|
|
||||||
struct bch_sb *sb = bch2_format(format_opts, &dev_opts, 1);
|
struct bch_sb *sb = bch2_format(format_opts, &dev_opts, 1);
|
||||||
free(sb);
|
free(sb);
|
||||||
@ -284,7 +284,7 @@ int cmd_device_remove(int argc, char *argv[])
|
|||||||
{ "help", 0, NULL, 'h' },
|
{ "help", 0, NULL, 'h' },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
int opt, flags = 0;
|
int opt, flags = BCH_FORCE_IF_DEGRADED;
|
||||||
|
|
||||||
while ((opt = getopt_long(argc, argv, "fh", longopts, NULL)) != -1)
|
while ((opt = getopt_long(argc, argv, "fh", longopts, NULL)) != -1)
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
|
Loading…
Reference in New Issue
Block a user