Message ID | 20191106101457.11237-2-lczerner@redhat.com |
---|---|
State | Superseded |
Headers | show |
Series | [01/17] vfs: Handle fs_param_neg_with_empty | expand |
diff --git a/fs/fs_parser.c b/fs/fs_parser.c index d1930adce68d..f95997a76738 100644 --- a/fs/fs_parser.c +++ b/fs/fs_parser.c @@ -129,6 +129,11 @@ int fs_parse(struct fs_context *fc, case fs_param_is_string: if (param->type != fs_value_is_string) goto bad_value; + if ((p->flags & fs_param_neg_with_empty) && + (!result->has_value || !param->string[0])) { + result->negated = true; + goto okay; + } if (!result->has_value) { if (p->flags & fs_param_v_optional) goto okay;