Changeset a46e56b in mainline for uspace/srv/devman/main.c


Ignore:
Timestamp:
2018-03-22T06:49:35Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
77f0a1d
Parents:
3e242d2
git-author:
Jakub Jermar <jakub@…> (2018-03-21 23:29:06)
git-committer:
Jakub Jermar <jakub@…> (2018-03-22 06:49:35)
Message:

Prefer handle over ID in naming handle variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/main.c

    r3e242d2 ra46e56b  
    6666dev_tree_t device_tree;
    6767
    68 static void devman_connection_device(cap_call_handle_t iid, ipc_call_t *icall,
     68static void devman_connection_device(cap_call_handle_t icall_handle, ipc_call_t *icall,
    6969    void *arg)
    7070{
     
    9494                log_msg(LOG_DEFAULT, LVL_ERROR, "IPC forwarding failed - no device or "
    9595                    "function with handle %" PRIun " was found.", handle);
    96                 async_answer_0(iid, ENOENT);
     96                async_answer_0(icall_handle, ENOENT);
    9797                goto cleanup;
    9898        }
     
    102102                    "connect to handle %" PRIun ", refers to a device.",
    103103                    handle);
    104                 async_answer_0(iid, ENOENT);
     104                async_answer_0(icall_handle, ENOENT);
    105105                goto cleanup;
    106106        }
     
    116116                log_msg(LOG_DEFAULT, LVL_ERROR, "IPC forwarding refused - "
    117117                    "the device %" PRIun " is not in usable state.", handle);
    118                 async_answer_0(iid, ENOENT);
     118                async_answer_0(icall_handle, ENOENT);
    119119                goto cleanup;
    120120        }
     
    123123                log_msg(LOG_DEFAULT, LVL_ERROR,
    124124                    "Could not forward to driver `%s'.", driver->name);
    125                 async_answer_0(iid, EINVAL);
     125                async_answer_0(icall_handle, EINVAL);
    126126                goto cleanup;
    127127        }
     
    138138
    139139        async_exch_t *exch = async_exchange_begin(driver->sess);
    140         async_forward_fast(iid, exch, INTERFACE_DDF_CLIENT, handle, 0, IPC_FF_NONE);
     140        async_forward_fast(icall_handle, exch, INTERFACE_DDF_CLIENT, handle, 0, IPC_FF_NONE);
    141141        async_exchange_end(exch);
    142142
     
    149149}
    150150
    151 static void devman_connection_parent(cap_call_handle_t iid, ipc_call_t *icall,
     151static void devman_connection_parent(cap_call_handle_t icall_handle, ipc_call_t *icall,
    152152    void *arg)
    153153{
     
    177177                log_msg(LOG_DEFAULT, LVL_ERROR, "IPC forwarding failed - no device or "
    178178                    "function with handle %" PRIun " was found.", handle);
    179                 async_answer_0(iid, ENOENT);
     179                async_answer_0(icall_handle, ENOENT);
    180180                goto cleanup;
    181181        }
     
    196196                log_msg(LOG_DEFAULT, LVL_ERROR, "IPC forwarding refused - "
    197197                    "the device %" PRIun " is not in usable state.", handle);
    198                 async_answer_0(iid, ENOENT);
     198                async_answer_0(icall_handle, ENOENT);
    199199                goto cleanup;
    200200        }
     
    203203                log_msg(LOG_DEFAULT, LVL_ERROR,
    204204                    "Could not forward to driver `%s'.", driver->name);
    205                 async_answer_0(iid, EINVAL);
     205                async_answer_0(icall_handle, EINVAL);
    206206                goto cleanup;
    207207        }
     
    218218
    219219        async_exch_t *exch = async_exchange_begin(driver->sess);
    220         async_forward_fast(iid, exch, INTERFACE_DDF_DRIVER, fun_handle, 0, IPC_FF_NONE);
     220        async_forward_fast(icall_handle, exch, INTERFACE_DDF_DRIVER, fun_handle, 0, IPC_FF_NONE);
    221221        async_exchange_end(exch);
    222222
     
    229229}
    230230
    231 static void devman_forward(cap_call_handle_t iid, ipc_call_t *icall, void *arg)
     231static void devman_forward(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
    232232{
    233233        iface_t iface = IPC_GET_ARG1(*icall);
     
    242242                    "not found.\n");
    243243                fibril_rwlock_read_unlock(&device_tree.rwlock);
    244                 async_answer_0(iid, ENOENT);
     244                async_answer_0(icall_handle, ENOENT);
    245245                return;
    246246        }
     
    253253
    254254        async_exch_t *exch = async_exchange_begin(driver->sess);
    255         async_forward_fast(iid, exch, iface, handle, 0, IPC_FF_NONE);
     255        async_forward_fast(icall_handle, exch, iface, handle, 0, IPC_FF_NONE);
    256256        async_exchange_end(exch);
    257257
Note: See TracChangeset for help on using the changeset viewer.