stubs: include stubs only if needed

Currently it is not documented anywhere why some functions need to
be stubbed.

Group the files in stubs/meson.build according to who needs them, both
to reduce the size of the compilation and to clarify the use of stubs.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20240408155330.522792-18-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2024-04-08 17:53:29 +02:00
parent 957eca9e73
commit 3a15604900
2 changed files with 75 additions and 47 deletions

18
stubs/monitor-internal.c Normal file
View file

@ -0,0 +1,18 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "monitor/monitor.h"
#include "../monitor/monitor-internal.h"
int monitor_get_fd(Monitor *mon, const char *name, Error **errp)
{
error_setg(errp, "only QEMU supports file descriptor passing");
return -1;
}
void monitor_init_hmp(Chardev *chr, bool use_readline, Error **errp)
{
}
void monitor_fdsets_cleanup(void)
{
}