fuse: backport virtiofs to use fs_parameter_spec

We are missing this commit, which is difficult to apply right now.

Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Sat Sep 7 07:23:15 2019 -0400

    fs_parse: fold fs_parameter_desc/fs_parameter_spec

    The former contains nothing but a pointer to an array of the latter...

    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Change-Id: Ie7b01f06eaf8211bdcf00f3d3a0c9202552d740d
This commit is contained in:
Thomas Turner 2025-10-07 20:53:29 +01:00 • committed by Alexander Martinz
commit 65a6f1e52a
No known key found for this signature in database
GPG key ID: CF15BDD9A321A9B2

View file

@ -86,11 +86,15 @@ enum {
OPT_DAX,
};
static const struct fs_parameter_spec virtio_fs_parameters[] = {
static const struct fs_parameter_spec virtio_param_specs[] = {
fsparam_flag("dax", OPT_DAX),
{}
};
static const struct fs_parameter_description virtio_fs_parameters = {
.specs = virtio_param_specs,
};
static int virtio_fs_parse_param(struct fs_context *fc,
struct fs_parameter *param)
{
@ -98,7 +102,7 @@ static int virtio_fs_parse_param(struct fs_context *fc,
struct fuse_fs_context *ctx = fc->fs_private;
int opt;
opt = fs_parse(fc, virtio_fs_parameters, param, &result);
opt = fs_parse(fc, &virtio_fs_parameters, param, &result);
if (opt < 0)
return opt;