Changeset 719a208 in mainline for uspace


Ignore:
Timestamp:
2017-05-30T05:59:09Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f2460a50
Parents:
456c086
Message:

Rename SYS_CAP_GRANT/REVOKE to SYS_PERM_GRANT/REVOKE

Location:
uspace
Files:
2 edited
2 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/trace/syscalls.c

    r456c086 r719a208  
    6868    [SYS_IPC_EVENT_UNMASK] = { "ipc_event_unmask",      1,      V_ERRNO },
    6969
    70     [SYS_CAP_GRANT] = { "cap_grant",                    2,      V_ERRNO },
    71     [SYS_CAP_REVOKE] = { "cap_revoke",                  2,      V_ERRNO },
     70    [SYS_PERM_GRANT] = { "perm_grant",                  2,      V_ERRNO },
     71    [SYS_PERM_REVOKE] = { "perm_revoke",                2,      V_ERRNO },
    7272    [SYS_PHYSMEM_MAP] = { "physmem_map",                4,      V_ERRNO },
    7373    [SYS_IOSPACE_ENABLE] = { "iospace_enable",          1,      V_ERRNO },
  • uspace/lib/c/Makefile

    r456c086 r719a208  
    6363        generic/bd.c \
    6464        generic/bd_srv.c \
    65         generic/cap.c \
     65        generic/perm.c \
    6666        generic/clipboard.c \
    6767        generic/config.c \
  • uspace/lib/c/generic/perm.c

    r456c086 r719a208  
    3131 */
    3232/**
    33  * @file  cap.c
    34  * @brief Functions to grant/revoke capabilities to/from a task.
     33 * @file  perm.c
     34 * @brief Functions to grant/revoke permissions to/from a task.
    3535 */
    3636
    37 #include <cap.h>
     37#include <perm.h>
    3838#include <task.h>
    3939#include <libc.h>
    4040#include <libarch/types.h>
    4141
    42 /** Grant capabilities to a task.
     42/** Grant permissions to a task.
    4343 *
    44  * @param id   Destination task ID.
    45  * @param caps Capabilities to grant.
     44 * @param id    Destination task ID.
     45 * @param perms Permissions to grant.
    4646 *
    4747 * @return Zero on success or a value from @ref errno.h on failure.
    4848 *
    4949 */
    50 int cap_grant(task_id_t id, unsigned int caps)
     50int perm_grant(task_id_t id, unsigned int perms)
    5151{
    5252#ifdef __32_BITS__
    5353        sysarg64_t arg = (sysarg64_t) id;
    54         return __SYSCALL2(SYS_CAP_GRANT, (sysarg_t) &arg, (sysarg_t) caps);
     54        return __SYSCALL2(SYS_PERM_GRANT, (sysarg_t) &arg, (sysarg_t) perms);
    5555#endif
    5656       
    5757#ifdef __64_BITS__
    58         return __SYSCALL2(SYS_CAP_GRANT, (sysarg_t) id, (sysarg_t) caps);
     58        return __SYSCALL2(SYS_PERM_GRANT, (sysarg_t) id, (sysarg_t) perms);
    5959#endif
    6060}
    6161
    62 /** Revoke capabilities from a task.
     62/** Revoke permissions from a task.
    6363 *
    64  * @param id   Destination task ID.
    65  * @param caps Capabilities to revoke.
     64 * @param id    Destination task ID.
     65 * @param perms Permissions to revoke.
    6666 *
    6767 * @return Zero on success or a value from @ref errno.h on failure.
    6868 *
    6969 */
    70 int cap_revoke(task_id_t id, unsigned int caps)
     70int perm_revoke(task_id_t id, unsigned int perms)
    7171{
    7272#ifdef __32_BITS__
    7373        sysarg64_t arg = (sysarg64_t) id;
    74         return __SYSCALL2(SYS_CAP_REVOKE, (sysarg_t) &arg, (sysarg_t) caps);
     74        return __SYSCALL2(SYS_PERM_REVOKE, (sysarg_t) &arg, (sysarg_t) perms);
    7575#endif
    7676       
    7777#ifdef __64_BITS__
    78         return __SYSCALL2(SYS_CAP_REVOKE, (sysarg_t) id, (sysarg_t) caps);
     78        return __SYSCALL2(SYS_PERM_REVOKE, (sysarg_t) id, (sysarg_t) perms);
    7979#endif
    8080}
  • uspace/lib/c/include/perm.h

    r456c086 r719a208  
    3333 */
    3434
    35 #ifndef LIB_CAP_H_
    36 #define LIB_CAP_H_
     35#ifndef LIB_PERM_H_
     36#define LIB_PERM_H_
    3737
    3838#include <task.h>
    3939
    40 extern int cap_grant(task_id_t id, unsigned int caps);
    41 extern int cap_revoke(task_id_t id, unsigned int caps);
     40extern int perm_grant(task_id_t, unsigned int);
     41extern int perm_revoke(task_id_t, unsigned int);
    4242
    4343#endif
Note: See TracChangeset for help on using the changeset viewer.