Changeset ebb1489 in mainline for uspace/lib/c/generic/device/hw_res.c


Ignore:
Timestamp:
2024-10-13T08:23:40Z (8 weeks ago)
Author:
GitHub <noreply@…>
Children:
0472cf17
Parents:
2a0c827c (diff), b3b79981 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
boba-buba <120932204+boba-buba@…> (2024-10-13 08:23:40)
git-committer:
GitHub <noreply@…> (2024-10-13 08:23:40)
Message:

Merge branch 'HelenOS:master' into topic/packet-capture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/device/hw_res.c

    r2a0c827c rebb1489  
    11/*
     2 * Copyright (c) 2024 Jiri Svoboda
    23 * Copyright (c) 2010 Lenka Trochtova
    34 * All rights reserved.
     
    161162}
    162163
     164/** Get bus flags.
     165 *
     166 * @param sess HW res session
     167 * @param rflags Place to store the flags
     168 *
     169 * @return Error code.
     170 *
     171 */
     172errno_t hw_res_get_flags(async_sess_t *sess, hw_res_flags_t *rflags)
     173{
     174        async_exch_t *exch = async_exchange_begin(sess);
     175
     176        sysarg_t flags;
     177        const errno_t ret = async_req_1_1(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
     178            HW_RES_GET_FLAGS, &flags);
     179
     180        async_exchange_end(exch);
     181
     182        if (ret == EOK)
     183                *rflags = flags;
     184
     185        return ret;
     186}
     187
    163188/** @}
    164189 */
Note: See TracChangeset for help on using the changeset viewer.