OSDN Git Service

* callback.c (fdbad): Return EBADF rather than EINVAL for bad
authorkevinb <kevinb>
Sat, 26 Feb 2011 07:28:57 +0000 (07:28 +0000)
committerkevinb <kevinb>
Sat, 26 Feb 2011 07:28:57 +0000 (07:28 +0000)
file descriptors.

sim/common/ChangeLog
sim/common/callback.c

index 11f1d34..b88fc32 100644 (file)
@@ -1,3 +1,8 @@
+2011-02-25  Kevin Buettner  <kevinb@redhat.com>
+
+       * callback.c (fdbad): Return EBADF rather than EINVAL for bad
+       file descriptors.
+
 2011-02-14  Mike Frysinger  <vapier@gentoo.org>
 
        * hw-alloc.c (hw_alloc_data): Delete zalloc_p.
index 8f8aa9c..f811304 100644 (file)
@@ -121,7 +121,7 @@ fdbad (p, fd)
 {
   if (fd < 0 || fd > MAX_CALLBACK_FDS || p->fd_buddy[fd] < 0)
     {
-      p->last_errno = EINVAL;
+      p->last_errno = EBADF;
       return -1;
     }
   return 0;