svn commit: r201234 - head/sys/xen

Justin T. Gibbs gibbs at FreeBSD.org
Tue Dec 29 23:28:14 UTC 2009


Author: gibbs
Date: Tue Dec 29 23:28:13 2009
New Revision: 201234
URL: http://svn.freebsd.org/changeset/base/201234

Log:
  Correct bug introduced while purging the -ERRNO Linuxism from the
  grant table API.  Valid grant refs are in the range of positive 32bit
  integers.  ENOSPACE, being 29, is also a positive integer.  Return
  GNTTAB_LIST_END (-1) instead when gnttab_claim_grant_reference() fails.

Modified:
  head/sys/xen/gnttab.c

Modified: head/sys/xen/gnttab.c
==============================================================================
--- head/sys/xen/gnttab.c	Tue Dec 29 23:27:15 2009	(r201233)
+++ head/sys/xen/gnttab.c	Tue Dec 29 23:28:13 2009	(r201234)
@@ -325,7 +325,7 @@ gnttab_claim_grant_reference(grant_ref_t
 	grant_ref_t g = *private_head;
 
 	if (unlikely(g == GNTTAB_LIST_END))
-		return (ENOSPC);
+		return (g);
 	*private_head = gnttab_entry(g);
 	return (g);
 }


More information about the svn-src-head mailing list