From: Konrad Rzeszutek Wilk Subject: [PATCH RFC 02/14] libxc: xc_core_arch_memory_map_get populate errno Date: Fri, 13 Mar 2015 15:31:11 -0400 Message-ID: <1426275083-8454-3-git-send-email-konrad.wilk@oracle.com> References: <1426275083-8454-1-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YWVJL-0006gG-BX for xen-devel@lists.xenproject.org; Fri, 13 Mar 2015 19:31:55 +0000 In-Reply-To: <1426275083-8454-1-git-send-email-konrad.wilk@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, wei.liu2@citrix.com Cc: Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org with proper value (ENOMEM) when reporting failures. Signed-off-by: Konrad Rzeszutek Wilk --- tools/libxc/xc_core_arm.c | 1 + tools/libxc/xc_core_x86.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/libxc/xc_core_arm.c b/tools/libxc/xc_core_arm.c index 16508e7..888a3ac 100644 --- a/tools/libxc/xc_core_arm.c +++ b/tools/libxc/xc_core_arm.c @@ -55,6 +55,7 @@ xc_core_arch_memory_map_get(xc_interface *xch, struct xc_core_arch_context *unus if ( map == NULL ) { PERROR("Could not allocate memory"); + errno = ENOMEM; return -1; } diff --git a/tools/libxc/xc_core_x86.c b/tools/libxc/xc_core_x86.c index d8846f1..37b8522 100644 --- a/tools/libxc/xc_core_x86.c +++ b/tools/libxc/xc_core_x86.c @@ -60,6 +60,7 @@ xc_core_arch_memory_map_get(xc_interface *xch, struct xc_core_arch_context *unus if ( map == NULL ) { PERROR("Could not allocate memory"); + errno = ENOMEM; return -1; } -- 2.1.0