[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 17/33] tools/xl: support new 9pfs backend xen-9pfsd



On Thu, Jan 04, 2024 at 10:00:39AM +0100, Juergen Gross wrote:
> @@ -2242,6 +2256,28 @@ void parse_config_data(const char *config_source,
>  
>              libxl_string_list_dispose(&pairs);
>  
> +            if (p9->type == LIBXL_P9_TYPE_UNKNOWN) {
> +                p9->type = LIBXL_P9_TYPE_QEMU;

The defaulting is normally done in libxl, so that it works for all users
of libxl. Can this be done instead in libxl? Hopefully, it's enough to
do it in libxl__device_p9_setdefault().

Same question for the followup checks and default values.

> +            }
> +            if (p9->type == LIBXL_P9_TYPE_QEMU &&
> +                (p9->max_files || p9->max_open_files || p9->max_space ||
> +                 p9->auto_delete)) {
> +                fprintf(stderr, "Illegal 9pfs parameter combination\n");
> +                exit(1);
> +            }
> +            if (p9->type == LIBXL_P9_TYPE_XEN_9PFSD) {
> +                if (!p9->tag) {
> +                    replace_string(&p9->tag, "Xen");
> +                }
> +                if (!p9->path) {
> +                    char *path;
> +
> +                    xasprintf(&path, XEN_LOG_DIR "/guests/%s", c_info->name);
> +                    replace_string(&p9->path, path);
> +                    free(path);
> +                }
> +            }

Thanks,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.