Re: [PATCH v10 2/9] test: add new function to get current file-prefix arg

Stephen Hemminger
2026-01-02T17:10:50Z

On Fri, 2 Jan 2026 12:50:14 +0000
Marat Khalili <marat.khalili@huawei.com> wrote:

> > +/* Return a --file-prefix=XXXX argument or NULL */
> > +static inline const char *
> > +file_prefix_arg(void)
> > +{
> > + static char prefix[NAME_MAX + sizeof("--file-prefix=")];
> > + char tmp[NAME_MAX];
>
> Can current prefix change? Can we verify that it is filled already and return immediately?

file prefix comes from command line and does not change.
Given that it is used to setup memory and ipc it really can't change at runtime.