* callback.c (fdbad): Return EBADF rather than EINVAL for bad
authorKevin Buettner <kevinb@redhat.com>
Fri, 25 Feb 2011 22:28:57 +0000 (22:28 +0000)
committerKevin Buettner <kevinb@redhat.com>
Fri, 25 Feb 2011 22:28:57 +0000 (22:28 +0000)
file descriptors.

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

index 11f1d34c9a9bff7337c8989e49f7aef9ca312ce1..b88fc3257371cedfb33ae254371368b66b3c9fdd 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 8f8aa9c804df34d29d45ebbaf02d3d97053d8396..f811304a5499fb9de05451f1b16324607682b62b 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;