chardev: Remove __-prefixed names
Peter points out double underscore prefix names tend to be reserved for the system. Clean these up. Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-ID: <20240828043337.14587-3-npiggin@gmail.com>
This commit is contained in:
parent
651b386205
commit
3c8ab23fb3
@ -633,8 +633,8 @@ static void qemu_chardev_set_replay(Chardev *chr, Error **errp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Chardev *__qemu_chr_new_from_opts(QemuOpts *opts, GMainContext *context,
|
static Chardev *do_qemu_chr_new_from_opts(QemuOpts *opts, GMainContext *context,
|
||||||
bool replay, Error **errp)
|
bool replay, Error **errp)
|
||||||
{
|
{
|
||||||
const ChardevClass *cc;
|
const ChardevClass *cc;
|
||||||
Chardev *base = NULL, *chr = NULL;
|
Chardev *base = NULL, *chr = NULL;
|
||||||
@ -712,12 +712,12 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, GMainContext *context,
|
|||||||
Error **errp)
|
Error **errp)
|
||||||
{
|
{
|
||||||
/* XXX: should this really not record/replay? */
|
/* XXX: should this really not record/replay? */
|
||||||
return __qemu_chr_new_from_opts(opts, context, false, errp);
|
return do_qemu_chr_new_from_opts(opts, context, false, errp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Chardev *__qemu_chr_new(const char *label, const char *filename,
|
static Chardev *qemu_chr_new_from_name(const char *label, const char *filename,
|
||||||
bool permit_mux_mon, GMainContext *context,
|
bool permit_mux_mon,
|
||||||
bool replay)
|
GMainContext *context, bool replay)
|
||||||
{
|
{
|
||||||
const char *p;
|
const char *p;
|
||||||
Chardev *chr;
|
Chardev *chr;
|
||||||
@ -740,7 +740,7 @@ static Chardev *__qemu_chr_new(const char *label, const char *filename,
|
|||||||
if (!opts)
|
if (!opts)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
chr = __qemu_chr_new_from_opts(opts, context, replay, &err);
|
chr = do_qemu_chr_new_from_opts(opts, context, replay, &err);
|
||||||
if (!chr) {
|
if (!chr) {
|
||||||
error_report_err(err);
|
error_report_err(err);
|
||||||
goto out;
|
goto out;
|
||||||
@ -765,7 +765,8 @@ out:
|
|||||||
Chardev *qemu_chr_new_noreplay(const char *label, const char *filename,
|
Chardev *qemu_chr_new_noreplay(const char *label, const char *filename,
|
||||||
bool permit_mux_mon, GMainContext *context)
|
bool permit_mux_mon, GMainContext *context)
|
||||||
{
|
{
|
||||||
return __qemu_chr_new(label, filename, permit_mux_mon, context, false);
|
return qemu_chr_new_from_name(label, filename, permit_mux_mon, context,
|
||||||
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Chardev *qemu_chr_new_permit_mux_mon(const char *label,
|
static Chardev *qemu_chr_new_permit_mux_mon(const char *label,
|
||||||
@ -773,7 +774,8 @@ static Chardev *qemu_chr_new_permit_mux_mon(const char *label,
|
|||||||
bool permit_mux_mon,
|
bool permit_mux_mon,
|
||||||
GMainContext *context)
|
GMainContext *context)
|
||||||
{
|
{
|
||||||
return __qemu_chr_new(label, filename, permit_mux_mon, context, true);
|
return qemu_chr_new_from_name(label, filename, permit_mux_mon, context,
|
||||||
|
true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Chardev *qemu_chr_new(const char *label, const char *filename,
|
Chardev *qemu_chr_new(const char *label, const char *filename,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user