From patchwork Mon Oct 29 18:07:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 195101 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id ACC832C008F for ; Tue, 30 Oct 2012 05:08:36 +1100 (EST) Received: from localhost ([::1]:52150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TStlK-000362-Ki for incoming@patchwork.ozlabs.org; Mon, 29 Oct 2012 14:08:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TStks-0002eT-7y for qemu-devel@nongnu.org; Mon, 29 Oct 2012 14:08:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TStkq-0005fH-U5 for qemu-devel@nongnu.org; Mon, 29 Oct 2012 14:08:06 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:61159) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TStkq-0005ZP-O8 for qemu-devel@nongnu.org; Mon, 29 Oct 2012 14:08:04 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so3395861pad.4 for ; Mon, 29 Oct 2012 11:08:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=hjKmsqDaUcAlVLNJVC89UWKled4RNY52Jki1yuzqgPA=; b=eILrvoWPa55v6fPZ982XNipGZIoMtPig5fBXeAFM0MWp/b7J0fZe3bjYK/akzD61Oz ApkQWvk91hWGp/qhiBV9mq9TiS3urOb6z4dl4m0y49y9dA3RhpVwNYR3uXY1qjZSTbEG D9xDzwnTjD31Yhl2t/7wy9VPgAL+khRtYfGx4TXyF2gjdsWpEb4xUMjbQUbTh0B0GEQK MK6an8hstycZAYtYtDm8zBt/1DLqDytdPVbYRG77Mt3N48BAW7byWOo2diCLajKOTQRJ 01kQI/DqsNw5+O8HjKayvLTOpRGqMsgDSg3gdKHaXpuOycY+wTli3obJesBqQ0Upo6jx +T3A== Received: by 10.68.251.197 with SMTP id zm5mr60691574pbc.30.1351534084409; Mon, 29 Oct 2012 11:08:04 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-169-1.ip50.fastwebnet.it. [93.34.169.1]) by mx.google.com with ESMTPS id vi9sm6327135pbc.41.2012.10.29.11.08.01 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Oct 2012 11:08:03 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 29 Oct 2012 19:07:12 +0100 Message-Id: <1351534038-15503-6-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1351534038-15503-1-git-send-email-pbonzini@redhat.com> References: <1351534038-15503-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.220.45 Subject: [Qemu-devel] [PATCH 05/11] fdsets: use weak aliases instead of qemu-tool.c/qemu-user.c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Paolo Bonzini --- cutils.c | 5 ----- osdep.c | 30 ++++++++++++++++++++++++++++++ qemu-common.h | 1 - qemu-tool.c | 20 -------------------- qemu-user.c | 20 -------------------- 5 file modificati, 30 inserzioni(+), 46 rimozioni(-) diff --git a/cutils.c b/cutils.c index 6f9f799..4f0692f 100644 --- a/cutils.c +++ b/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) { diff --git a/osdep.c b/osdep.c index 3b25297..0061f74 100644 --- a/osdep.c +++ b/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); diff --git a/qemu-common.h b/qemu-common.h index b54612b..36ce522 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -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 diff --git a/qemu-tool.c b/qemu-tool.c index f2f9813..84273ae 100644 --- a/qemu-tool.c +++ b/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); diff --git a/qemu-user.c b/qemu-user.c index 13fb9ae..08ccb0f 100644 --- a/qemu-user.c +++ b/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; -}