syscall_emul: update getrlimit to use warn
authorBrandon Potter <brandon.potter@amd.com>
Wed, 22 Apr 2015 14:51:27 +0000 (07:51 -0700)
committerBrandon Potter <brandon.potter@amd.com>
Wed, 22 Apr 2015 14:51:27 +0000 (07:51 -0700)
Don't use std::cerr directly, and just return EINVAL instead of aborting.

src/sim/syscall_emul.hh

index 3b584260faffbf699828aff3163329dfafa542a0..bb73e1fd288e9bc835d8a94ca5c2a5c6620bc296 100644 (file)
@@ -1274,9 +1274,8 @@ getrlimitFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
             break;
 
         default:
-            std::cerr << "getrlimitFunc: unimplemented resource " << resource
-                << std::endl;
-            abort();
+            warn("getrlimit: unimplemented resource %d", resource);
+            return -EINVAL;
             break;
     }