Changes in kernel/generic/src/security/perm.c [7f11dc6:719a208] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/security/perm.c
r7f11dc6 r719a208 84 84 * 85 85 */ 86 static int perm_grant(task_id_t taskid, perm_t perms)86 static sysarg_t perm_grant(task_id_t taskid, perm_t perms) 87 87 { 88 88 if (!(perm_get(TASK) & PERM_PERM)) 89 return EPERM;89 return (sysarg_t) EPERM; 90 90 91 91 irq_spinlock_lock(&tasks_lock, true); … … 94 94 if ((!task) || (!container_check(CONTAINER, task->container))) { 95 95 irq_spinlock_unlock(&tasks_lock, true); 96 return ENOENT;96 return (sysarg_t) ENOENT; 97 97 } 98 98 … … 102 102 103 103 irq_spinlock_unlock(&tasks_lock, true); 104 return EOK;104 return 0; 105 105 } 106 106 … … 116 116 * 117 117 */ 118 static int perm_revoke(task_id_t taskid, perm_t perms)118 static sysarg_t perm_revoke(task_id_t taskid, perm_t perms) 119 119 { 120 120 irq_spinlock_lock(&tasks_lock, true); … … 123 123 if ((!task) || (!container_check(CONTAINER, task->container))) { 124 124 irq_spinlock_unlock(&tasks_lock, true); 125 return ENOENT;125 return (sysarg_t) ENOENT; 126 126 } 127 127 … … 136 136 irq_spinlock_unlock(&TASK->lock, false); 137 137 irq_spinlock_unlock(&tasks_lock, true); 138 return EPERM;138 return (sysarg_t) EPERM; 139 139 } 140 140 … … 143 143 144 144 irq_spinlock_unlock(&tasks_lock, true); 145 return EOK;145 return 0; 146 146 } 147 147
Note:
See TracChangeset
for help on using the changeset viewer.