"Superblock commands:\n"
" format Format a new filesystem\n"
" show-super Dump superblock information to stdout\n"
+ " set-option Set a filesystem option\n"
+ "\n"
+ "Mount:\n"
+ " mount Mount a filesystem\n"
"\n"
"Repair:\n"
" fsck Check an existing filesystem for errors\n"
"\n"
- "Startup/shutdown, assembly of multi device filesystems:\n"
#if 0
+ "Startup/shutdown, assembly of multi device filesystems:\n"
" assemble Assemble an existing multi device filesystem\n"
" incremental Incrementally assemble an existing multi device filesystem\n"
" run Start a partially assembled filesystem\n"
" stop Stop a running filesystem\n"
-#endif
"\n"
+#endif
"Commands for managing a running filesystem:\n"
" fs usage Show disk usage\n"
"\n"
" device resize-journal Resize journal on a device\n"
"\n"
"Commands for managing subvolumes and snapshots:\n"
- " subvolume create Create a new subvolume\n"
- " subvolume delete Delete an existing subvolume\n"
- " subvolume snapshot Create a snapshot\n"
+ " subvolume create Create a new subvolume\n"
+ " subvolume delete Delete an existing subvolume\n"
+ " subvolume snapshot Create a snapshot\n"
"\n"
"Commands for managing filesystem data:\n"
" data rereplicate Rereplicate degraded data\n"
setvbuf(stdout, NULL, _IOLBF, 0);
char *cmd = pop_cmd(&argc, argv);
- if (argc < 1) {
+ if (!cmd) {
puts("missing command\n");
goto usage;
}
return cmd_version(argc, argv);
if (!strcmp(cmd, "show-super"))
return cmd_show_super(argc, argv);
-
- if (argc < 2) {
- printf("%s: missing command\n", argv[0]);
- usage();
- exit(EXIT_FAILURE);
- }
+ if (!strcmp(cmd, "set-option"))
+ return cmd_set_option(argc, argv);
#if 0
if (!strcmp(cmd, "assemble"))
return cmd_list(argc, argv);
if (!strcmp(cmd, "list_journal"))
return cmd_list_journal(argc, argv);
+ if (!strcmp(cmd, "kill_btree_node"))
+ return cmd_kill_btree_node(argc, argv);
if (!strcmp(cmd, "setattr"))
return cmd_setattr(argc, argv);
+ if (!strcmp(cmd, "mount")) {
+ cmd_mount(argc, argv);
+ return 0;
+ }
+
#ifdef BCACHEFS_FUSE
if (!strcmp(cmd, "fusemount"))
return cmd_fusemount(argc, argv);