svn commit: r286632 - head/sys/compat/cloudabi

Ed Schouten ed at FreeBSD.org
Tue Aug 11 14:07:05 UTC 2015


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);


More information about the svn-src-all mailing list