Migrate to error constants in glacier
This commit is contained in:
parent
3ab9b4d818
commit
0b86a94f14
30 changed files with 171 additions and 114 deletions
|
|
@ -1,13 +1,15 @@
|
|||
#include "syscall/capability.h"
|
||||
|
||||
#include <glacier/status/error.h>
|
||||
|
||||
#include "scheduler/scheduler.h"
|
||||
|
||||
z_err_t CapDuplicate(ZCapDuplicateReq* req) {
|
||||
auto& proc = gScheduler->CurrentProcess();
|
||||
auto cap = proc.GetCapability(req->cap_in);
|
||||
if (!cap) {
|
||||
return Z_ERR_CAP_NOT_FOUND;
|
||||
return glcr::CAP_NOT_FOUND;
|
||||
}
|
||||
*req->cap_out = proc.AddExistingCapability(cap);
|
||||
return Z_OK;
|
||||
return glcr::OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue