Set errno when we make a resource request....
authorKevin Klues <klueska@parcad.millennium.berkeley.edu>
Fri, 23 Apr 2010 23:44:02 +0000 (16:44 -0700)
committerKevin Klues <klueska@cs.berkeley.edu>
Thu, 3 Nov 2011 00:35:44 +0000 (17:35 -0700)
kern/src/resource.c

index 0002bbf..2024518 100644 (file)
@@ -181,8 +181,10 @@ error_t resource_req(struct proc *p, int type, size_t amt_wanted,
                case RES_CORES:
                        retval = core_request(p);
                        // i don't like this retval hackery
-                       if (retval < 0)
-                               return retval;
+                       if (retval < 0) {
+                               set_errno(current_tf, -retval);
+                               return -1;
+                       }
                        else
                                return 0;
                        break;