mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 05:20:50 +00:00
fdsets: use weak aliases instead of qemu-tool.c/qemu-user.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
d249e1fc4f
commit
0100fbbe73
5
cutils.c
5
cutils.c
@ -280,11 +280,6 @@ int qemu_parse_fd(const char *param)
|
||||
return fd;
|
||||
}
|
||||
|
||||
int qemu_parse_fdset(const char *param)
|
||||
{
|
||||
return qemu_parse_fd(param);
|
||||
}
|
||||
|
||||
/* round down to the nearest power of 2*/
|
||||
int64_t pow2floor(int64_t value)
|
||||
{
|
||||
|
30
osdep.c
30
osdep.c
@ -144,6 +144,11 @@ fail:
|
||||
errno = serrno;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int qemu_parse_fdset(const char *param)
|
||||
{
|
||||
return qemu_parse_fd(param);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -404,3 +409,28 @@ bool fips_get_state(void)
|
||||
{
|
||||
return fips_enabled;
|
||||
}
|
||||
|
||||
|
||||
static int default_fdset_get_fd(int64_t fdset_id, int flags)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
QEMU_WEAK_ALIAS(monitor_fdset_get_fd, default_fdset_get_fd);
|
||||
|
||||
static int default_fdset_dup_fd_add(int64_t fdset_id, int dup_fd)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
QEMU_WEAK_ALIAS(monitor_fdset_dup_fd_add, default_fdset_dup_fd_add);
|
||||
|
||||
static int default_fdset_dup_fd_remove(int dup_fd)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
QEMU_WEAK_ALIAS(monitor_fdset_dup_fd_remove, default_fdset_dup_fd_remove);
|
||||
|
||||
static int default_fdset_dup_fd_find(int dup_fd)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
QEMU_WEAK_ALIAS(monitor_fdset_dup_fd_find, default_fdset_dup_fd_find);
|
||||
|
@ -167,7 +167,6 @@ int qemu_fls(int i);
|
||||
int qemu_fdatasync(int fd);
|
||||
int fcntl_setfl(int fd, int flag);
|
||||
int qemu_parse_fd(const char *param);
|
||||
int qemu_parse_fdset(const char *param);
|
||||
|
||||
/*
|
||||
* strtosz() suffixes used to specify the default treatment of an
|
||||
|
20
qemu-tool.c
20
qemu-tool.c
@ -68,26 +68,6 @@ void monitor_protocol_event(MonitorEvent event, QObject *data)
|
||||
{
|
||||
}
|
||||
|
||||
int monitor_fdset_get_fd(int64_t fdset_id, int flags)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int monitor_fdset_dup_fd_add(int64_t fdset_id, int dup_fd)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int monitor_fdset_dup_fd_remove(int dup_fd)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int monitor_fdset_dup_fd_find(int dup_fd)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int64_t cpu_get_clock(void)
|
||||
{
|
||||
return qemu_get_clock_ns(rt_clock);
|
||||
|
20
qemu-user.c
20
qemu-user.c
@ -35,23 +35,3 @@ void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
|
||||
void monitor_set_error(Monitor *mon, QError *qerror)
|
||||
{
|
||||
}
|
||||
|
||||
int monitor_fdset_get_fd(int64_t fdset_id, int flags)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int monitor_fdset_dup_fd_add(int64_t fdset_id, int dup_fd)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int monitor_fdset_dup_fd_remove(int dup_fd)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int monitor_fdset_dup_fd_find(int dup_fd)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user