Changeset 0ecfc62 in mainline for uspace/srv/volsrv/volsrv.c


Ignore:
Timestamp:
2015-10-09T18:11:08Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3a43785
Parents:
372df8f
Message:

Information structures need updating to new model.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/volsrv/volsrv.c

    r372df8f r0ecfc62  
    4040#include <ipc/vol.h>
    4141#include <loc.h>
     42#include <macros.h>
    4243#include <stdio.h>
    4344#include <stdlib.h>
     
    135136        }
    136137
    137         async_answer_3(iid, rc, pinfo.dcnt, pinfo.ltype, pinfo.flags);
     138        ipc_callid_t callid;
     139        size_t size;
     140        if (!async_data_read_receive(&callid, &size)) {
     141                async_answer_0(callid, EREFUSED);
     142                async_answer_0(iid, EREFUSED);
     143                return;
     144        }
     145
     146        if (size != sizeof(vol_part_info_t)) {
     147                async_answer_0(callid, EINVAL);
     148                async_answer_0(iid, EINVAL);
     149                return;
     150        }
     151
     152        rc = async_data_read_finalize(callid, &pinfo,
     153            min(size, sizeof(pinfo)));
     154        if (rc != EOK) {
     155                async_answer_0(callid, rc);
     156                async_answer_0(iid, rc);
     157                return;
     158        }
     159
     160        async_answer_0(iid, EOK);
    138161}
    139162
Note: See TracChangeset for help on using the changeset viewer.