Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 7f11dc6 in mainline for kernel/generic/src/security/perm.c


Ignore:
Timestamp:
2017-12-19T18:07:28Z (4 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master
Children:
897fd8f1
Parents:
219c530
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-19 17:08:09)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-19 18:07:28)
Message:

Numerous minor error code tweaks in kernel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/security/perm.c

    r219c530 r7f11dc6  
    8484 *
    8585 */
    86 static sysarg_t perm_grant(task_id_t taskid, perm_t perms)
     86static int perm_grant(task_id_t taskid, perm_t perms)
    8787{
    8888        if (!(perm_get(TASK) & PERM_PERM))
    89                 return (sysarg_t) EPERM;
     89                return EPERM;
    9090       
    9191        irq_spinlock_lock(&tasks_lock, true);
     
    9494        if ((!task) || (!container_check(CONTAINER, task->container))) {
    9595                irq_spinlock_unlock(&tasks_lock, true);
    96                 return (sysarg_t) ENOENT;
     96                return ENOENT;
    9797        }
    9898       
     
    102102       
    103103        irq_spinlock_unlock(&tasks_lock, true);
    104         return 0;
     104        return EOK;
    105105}
    106106
     
    116116 *
    117117 */
    118 static sysarg_t perm_revoke(task_id_t taskid, perm_t perms)
     118static int perm_revoke(task_id_t taskid, perm_t perms)
    119119{
    120120        irq_spinlock_lock(&tasks_lock, true);
     
    123123        if ((!task) || (!container_check(CONTAINER, task->container))) {
    124124                irq_spinlock_unlock(&tasks_lock, true);
    125                 return (sysarg_t) ENOENT;
     125                return ENOENT;
    126126        }
    127127       
     
    136136                irq_spinlock_unlock(&TASK->lock, false);
    137137                irq_spinlock_unlock(&tasks_lock, true);
    138                 return (sysarg_t) EPERM;
     138                return EPERM;
    139139        }
    140140       
     
    143143       
    144144        irq_spinlock_unlock(&tasks_lock, true);
    145         return 0;
     145        return EOK;
    146146}
    147147
Note: See TracChangeset for help on using the changeset viewer.