summaryrefslogtreecommitdiff
path: root/c_src
diff options
context:
space:
mode:
Diffstat (limited to 'c_src')
-rw-r--r--c_src/cmd_data.c3
-rw-r--r--c_src/tools-util.c9
2 files changed, 12 insertions, 0 deletions
diff --git a/c_src/cmd_data.c b/c_src/cmd_data.c
index 70d945a6..190c178c 100644
--- a/c_src/cmd_data.c
+++ b/c_src/cmd_data.c
@@ -315,6 +315,9 @@ static int cmd_data_job(int argc, char *argv[])
op.op = read_string_list_or_die(job, bch2_data_ops_strs, "bad job type");
+ if (op.op == BCH_DATA_OP_scrub)
+ die("scrub should be invoked with 'bcachefs data scrub'");
+
char *fs_path = arg_pop();
if (!fs_path)
fs_path = ".";
diff --git a/c_src/tools-util.c b/c_src/tools-util.c
index 150925eb..a31adcb0 100644
--- a/c_src/tools-util.c
+++ b/c_src/tools-util.c
@@ -681,6 +681,15 @@ static int kstrtouint_symbolic(const char *s, unsigned int base, unsigned *res)
struct bpos bpos_parse(char *buf)
{
+ if (!strcmp(buf, "POS_MIN"))
+ return POS_MIN;
+
+ if (!strcmp(buf, "POS_MAX"))
+ return POS_MAX;
+
+ if (!strcmp(buf, "SPOS_MAX"))
+ return SPOS_MAX;
+
char *orig = strdup(buf);
char *s = buf;