Make val optional in arg parsing

This commit is contained in:
Tom Marshall 2019-10-30 10:07:54 -07:00
parent a2680aadf5
commit e58d404811
1 changed files with 3 additions and 3 deletions

View File

@ -343,10 +343,10 @@ compress_ctr(struct dm_target *ti, unsigned int argc, char **argv)
argn = 1;
while (argn < argc) {
const char* arg = argv[argn++];
const char* val = NULL;
const char* eq = strchr(arg, '=');
if (!eq) {
ti->error = "Invalid argument format";
return -EINVAL;
if (eq) {
val = eq + 1;
}
#if 0
if (!memcmp(arg, "verbose", 7)) {