From owner-svn-src-head@freebsd.org Tue Aug 11 14:07:05 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 113F599F118; Tue, 11 Aug 2015 14:07:05 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F37DF191; Tue, 11 Aug 2015 14:07:04 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7BE74P2059729; Tue, 11 Aug 2015 14:07:04 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7BE74SJ059728; Tue, 11 Aug 2015 14:07:04 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201508111407.t7BE74SJ059728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Tue, 11 Aug 2015 14:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286632 - head/sys/compat/cloudabi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Aug 2015 14:07:05 -0000 Author: ed Date: Tue Aug 11 14:07:04 2015 New Revision: 286632 URL: https://svnweb.freebsd.org/changeset/base/286632 Log: Properly convert the error number to CloudABI's indexing. We currently return FreeBSD's errno value directly, which is of course not correct. Modified: head/sys/compat/cloudabi/cloudabi_sock.c Modified: head/sys/compat/cloudabi/cloudabi_sock.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_sock.c Tue Aug 11 13:47:23 2015 (r286631) +++ head/sys/compat/cloudabi/cloudabi_sock.c Tue Aug 11 14:07:04 2015 (r286632) @@ -236,7 +236,7 @@ cloudabi_sys_sock_stat_get(struct thread /* Set ss_error. */ SOCK_LOCK(so); - ss.ss_error = so->so_error; + ss.ss_error = cloudabi_convert_errno(so->so_error); if ((uap->flags & CLOUDABI_SOCKSTAT_CLEAR_ERROR) != 0) so->so_error = 0; SOCK_UNLOCK(so);