Changeset 15d0046 in mainline for uspace/lib/c/generic/bd_srv.c


Ignore:
Timestamp:
2014-09-12T13:22:33Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9b20126
Parents:
8db09e4 (diff), 105d8d6 (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.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/bd_srv.c

    r8db09e4 r15d0046  
    128128}
    129129
     130static void bd_sync_cache_srv(bd_srv_t *srv, ipc_callid_t callid,
     131    ipc_call_t *call)
     132{
     133        aoff64_t ba;
     134        size_t cnt;
     135        int rc;
     136
     137        ba = MERGE_LOUP32(IPC_GET_ARG1(*call), IPC_GET_ARG2(*call));
     138        cnt = IPC_GET_ARG3(*call);
     139
     140        if (srv->srvs->ops->sync_cache == NULL) {
     141                async_answer_0(callid, ENOTSUP);
     142                return;
     143        }
     144
     145        rc = srv->srvs->ops->sync_cache(srv, ba, cnt);
     146        async_answer_0(callid, rc);
     147}
     148
    130149static void bd_write_blocks_srv(bd_srv_t *srv, ipc_callid_t callid,
    131150    ipc_call_t *call)
     
    190209        bd_srv_t *srv;
    191210
    192         srv = calloc(1, sizeof(srv));
     211        srv = calloc(1, sizeof(bd_srv_t));
    193212        if (srv == NULL)
    194213                return NULL;
     
    244263                        bd_read_toc_srv(srv, callid, &call);
    245264                        break;
     265                case BD_SYNC_CACHE:
     266                        bd_sync_cache_srv(srv, callid, &call);
     267                        break;
    246268                case BD_WRITE_BLOCKS:
    247269                        bd_write_blocks_srv(srv, callid, &call);
Note: See TracChangeset for help on using the changeset viewer.