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

Changeset 96b02eb9 in mainline for kernel/generic/src/security/cap.c


Ignore:
Timestamp:
2010-12-14T12:52:38Z (11 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
Children:
6b10dab
Parents:
554debd
Message:

more unification of basic types

  • use sysarg_t and native_t (unsigned and signed variant) in both kernel and uspace
  • remove ipcarg_t in favour of sysarg_t

(no change in functionality)

File:
1 edited

Legend:

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

    r554debd r96b02eb9  
    8585 *
    8686 */
    87 unative_t sys_cap_grant(sysarg64_t *uspace_taskid_arg, cap_t caps)
     87sysarg_t sys_cap_grant(sysarg64_t *uspace_taskid_arg, cap_t caps)
    8888{
    8989        if (!(cap_get(TASK) & CAP_CAP))
    90                 return (unative_t) EPERM;
     90                return (sysarg_t) EPERM;
    9191       
    9292        sysarg64_t taskid_arg;
    9393        int rc = copy_from_uspace(&taskid_arg, uspace_taskid_arg, sizeof(sysarg64_t));
    9494        if (rc != 0)
    95                 return (unative_t) rc;
     95                return (sysarg_t) rc;
    9696       
    9797        irq_spinlock_lock(&tasks_lock, true);
     
    100100        if ((!task) || (!context_check(CONTEXT, task->context))) {
    101101                irq_spinlock_unlock(&tasks_lock, true);
    102                 return (unative_t) ENOENT;
     102                return (sysarg_t) ENOENT;
    103103        }
    104104       
     
    122122 *
    123123 */
    124 unative_t sys_cap_revoke(sysarg64_t *uspace_taskid_arg, cap_t caps)
     124sysarg_t sys_cap_revoke(sysarg64_t *uspace_taskid_arg, cap_t caps)
    125125{
    126126        sysarg64_t taskid_arg;
    127127        int rc = copy_from_uspace(&taskid_arg, uspace_taskid_arg, sizeof(sysarg64_t));
    128128        if (rc != 0)
    129                 return (unative_t) rc;
     129                return (sysarg_t) rc;
    130130       
    131131        irq_spinlock_lock(&tasks_lock, true);
     
    134134        if ((!task) || (!context_check(CONTEXT, task->context))) {
    135135                irq_spinlock_unlock(&tasks_lock, true);
    136                 return (unative_t) ENOENT;
     136                return (sysarg_t) ENOENT;
    137137        }
    138138       
     
    147147                irq_spinlock_unlock(&TASK->lock, false);
    148148                irq_spinlock_unlock(&tasks_lock, true);
    149                 return (unative_t) EPERM;
     149                return (sysarg_t) EPERM;
    150150        }
    151151       
Note: See TracChangeset for help on using the changeset viewer.