Commit f769dd1c authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Bail out with arg error if specifying a size larger than the file

system size

This is to spot obvious typos
parent 1f4067c9
......@@ -182,6 +182,10 @@ STV_FileSize(int fd, const char *size, unsigned *granularity, const char *ctx)
if (l < 1024*1024)
ARGV_ERR("(%s) size \"%s\": too small, "
"did you forget to specify M or G?\n", ctx, size);
if (l > fssize)
ARGV_ERR("(%s) size \"%s\": larger than file system\n",
ctx, size);
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment